[PATCH 4/7] Babel: Documentation updates.

Toke Høiland-Jørgensen toke at toke.dk
Tue May 3 13:37:37 CEST 2016



On 3 May 2016 13:22:06 CEST, Baptiste Jonglez <baptiste at bitsofnetworks.org> wrote:
>On Mon, May 02, 2016 at 07:07:52PM +0200, Toke Høiland-Jørgensen wrote:
>> This updates the documentation to correctly mention Babel when
>protocols
>> are listed, and adds examples and route attribute documentation to
>the
>> Babel section of the docs.
>
>Thanks Toke :)

You're very welcome :)

>> +<sect1>Attributes
>> +
>> +<p>Babel defines just one attribute: the internal babel metric of
>the route. It
>> +is exposed as the <cf/babel_metric/ attribute and has range from 1
>to infinity
>> +(65535).
>
>I thought you were also exporting the router-id as an attribute, since
>it
>is shown in "show route all":
>
>bird> show route all
>2001:db8:8081:1a00::1/128 via fe80::e8db:78ff:fe05:8a64 on tap-fastd
>[babel1 12:53:53] * (130/1) [cc:5a:c9:1b:07:06:d2:c7]
>        Type: <NULL> unicast univ
>        Babel.metric: 1
>        Babel.router_id: cc:5a:c9:1b:07:06:d2:c7

It is exported, but as an opaque blob as far as the Bird core is concerned. 

>Would it make sense to export the router ID?  It would allow to filter
>routes based on the originating router (babeld allows that, but I have
>no
>idea whether it's actually used by somebody).

It would, I guess, but that would require teaching the core about 64-bit router IDs, and the parser would need to learn a syntax for them. So it's not trivial, unfortunately, and so I've punted on that for now.

>> +<sect1>Example
>> +
>> +<p><code>
>> +protocol babel {
>> +	interface "eth*" {
>> +		type wired;
>> +	};
>> +	interface "wlan0", "wlan1" {
>> +		type wireless;
>> +		hello interval 1;
>> +		rxcost 512;
>> +	};
>> +	interface "tap0";
>> +
>> +	# This matches the default of babeld: redistribute all addresses
>> +	# configured on local interfaces, plus re-distribute all routes
>received
>> +	# from other babel peers.
>> +	export where (source = RTS_DEVICE) || (source = RTS_BABEL);
>> +}
>> +</code>
>
>Great, that looks good!
>
>The filter can also be written as:
>
>  export where source ~ [RTS_DEVICE, RTS_BABEL];

Right. Note that I had also missed adding the RTS_BABEL keyword to the config parser. That's in the patch series as well somewhere.

>Can you mention that it needs "protocol direct" to work?  Maybe just
>add
>this at the beginning of the example:
>
>  protocol direct {
>    interface "*";
>  }

Well I figured that is already in the example config file shipped with Bird, and that most people would just use that as a starting point...

-Toke



More information about the Bird-users mailing list