IPv6 rip-only routing - no exchange of routes

Roman Hoog Antink rha at open.ch
Sun Oct 30 22:04:50 CET 2011


Hi Goesta

As you can see by this commit, RIP for IPv4 was fixed recently in the
git repo (after 1.3.4 came out).

https://git.nic.cz/redmine/projects/bird/repository/revisions/14a8f396e1d8fc5787041eace8ab026fe5a0896c

Before that, it was broken for more than a year:
http://marc.info/?l=bird-users&m=127633818913449&w=2
http://marc.info/?l=bird-users&m=130715340100894&w=2

The line with the comment /* Does not really work on Linux */ seems to
be the spot that breaks RIP with IPv6.

Suggestion: copy an array of four zeroed integers into rif->sock->saddr
instead and see if that works for you.

Watch your syslog. Can you see any suspicious messages from bird?

If that works, make sure multiple rip protocol instances on the same
host but different interfaces still work.

Cheers,
Roman

On 29/10/11 06:31, Goesta Smekal wrote:
> Dear list,
> 
>   looking for a small routing daemon for dynamic IPv6 routing on
> embedded devices, I came across bird recently. Looks pretty much like
> what I need, but I must have missed something ...
> 
>   The goal is to have two tiny routers, linked to a shared LAN segment
> (at eth0 in my test). Each router advertises an IPv6 prefix to a local
> network (wireless in the end, just another ethernet segment on eth1 so
> far). Nodes on the separate networks should be able to talk to each
> other via the two routers. And if a third router (ore some more) joins
> in, the new segment(s) should automatically appear in the routers
> routing tables - dynamic routing ;-)
> 
>   I compiled bird 1.3.4 from the sources on two test hosts (Debian
> GNU/Linux - not the embedded stuff yet) using the commands:
> 
> root at edge01:/usr/src/bird-1.3.4# ./configure --prefix=/usr/local
> --enable-ipv6 --with-protocols=static,radv,rip
> root at edge01:/usr/src/bird-1.3.4# make all && make install
> 
>   My first config looked like this:
> 
> ---8<---
> # bird.conf
> #
> # dynamic routing configuration
> #
> # v0.1 2011-10-21 GS (goesta at smekal.at)
> 
> # global parameters
> 
> log syslog all;
> debug protocols { routes, events, packets };
> 
> router id 192.168.0.34;
> 
> ## routing protocols
> 
> # device parameters
> protocol device {
>   scan time 10;
> }
> 
> # kernel routing table
> protocol kernel {
>   scan time 10;
>   persist yes;
>   learn yes;
>   import all;
>   export all;
> }
> 
> # router advertisements
> protocol radv {
>   interface "eth1";
> }
> 
> # dynamic routing using RIPng
> protocol rip{
>   authentication md5;
>   password "verysecure";
>   honor neighbor;
>   interface "eth*";
> }
> ---8<---
> 
>   Bird started fine on both nodes (obviously the router id was
> different, but the password was the same) but the routes did not appear
> on the other router. Router advertisements work fine.
> 
>   After some re-thinking and re-reading the docs I tried to add
> 'primary' statements to the "protocol device" section, and played with
> authentication and other rip specific parameters.
> 
>   Eventually I captured RIPng (UDP port 520) packets on the network with
> empty routes and after adding this:
> 
> ---8<---
> protocol direct{
>   interface "*";
> }
> ---8<---
> 
>   the packets contain the two prefixes, LAN and local subnet, I expect
> the routers to exchange. However the routes do not show up and wireshark
> mentions "Unknown address family 8193" in the packet details section of
> the RIPng packets.
> 
>   Here is what syslog says:
> 
> ---8<---
> Oct 28 21:13:50 edge01 bird6: device1: Initializing
> Oct 28 21:13:50 edge01 bird6: direct1: Initializing
> Oct 28 21:13:50 edge01 bird6: kernel1: Initializing
> Oct 28 21:13:50 edge01 bird6: radv1: Initializing
> Oct 28 21:13:50 edge01 bird6: rip1: Initializing
> Oct 28 21:13:50 edge01 bird6: device1: Starting
> Oct 28 21:13:50 edge01 bird6: device1: Scanning interfaces
> Oct 28 21:13:50 edge01 bird6: device1: State changed to feed
> Oct 28 21:13:50 edge01 bird6: direct1: Starting
> Oct 28 21:13:50 edge01 bird6: direct1: State changed to feed
> Oct 28 21:13:50 edge01 bird6: kernel1: Starting
> Oct 28 21:13:50 edge01 bird6: kernel1: State changed to feed
> Oct 28 21:13:50 edge01 bird6: radv1: Starting
> Oct 28 21:13:50 edge01 bird6: radv1: State changed to feed
> Oct 28 21:13:50 edge01 bird6: rip1: Starting
> Oct 28 21:13:50 edge01 bird6: rip1: Listening on (dummy), port 520, mode
> broadcast (::)
> Oct 28 21:13:50 edge01 bird6: rip1: State changed to feed
> Oct 28 21:13:50 edge01 bird6: Started
> Oct 28 21:13:50 edge01 bird6: device1: State changed to up
> Oct 28 21:13:50 edge01 bird6: direct1 < primary address ::1/128 on
> interface lo added
> Oct 28 21:13:50 edge01 bird6: direct1 < primary address
> 2001:aaaa:bbbb:ccb8::/64 on interface eth0 added
> Oct 28 21:13:50 edge01 bird6: direct1 > added [best]
> 2001:aaaa:bbbb:ccb8::/64 dev eth0
> Oct 28 21:13:50 edge01 bird6: direct1 < secondary address fe80::/64 on
> interface eth0 added
> Oct 28 21:13:50 edge01 bird6: direct1 < primary address
> 2001:aaaa:bbbb:ccee::/64 on interface eth1 added
> Oct 28 21:13:50 edge01 bird6: direct1 > added [best]
> 2001:aaaa:bbbb:ccee::/64 dev eth1
> Oct 28 21:13:50 edge01 bird6: direct1 < secondary address fe80::/64 on
> interface eth1 added
> Oct 28 21:13:50 edge01 bird6: direct1: State changed to up
> Oct 28 21:13:50 edge01 bird6: kernel1: Connected to table master
> Oct 28 21:13:50 edge01 bird6: kernel1 < rejected by protocol
> 2001:aaaa:bbbb:ccee::/64 dev eth1
> Oct 28 21:13:50 edge01 bird6: kernel1 < rejected by protocol
> 2001:aaaa:bbbb:ccb8::/64 dev eth0
> Oct 28 21:13:50 edge01 bird6: kernel1: State changed to up
> Oct 28 21:13:50 edge01 bird6: radv1 < interface lo goes up
> Oct 28 21:13:50 edge01 bird6: radv1 < primary address ::1/128 on
> interface lo added
> Oct 28 21:13:50 edge01 bird6: radv1 < interface eth0 goes up
> Oct 28 21:13:50 edge01 bird6: radv1 < primary address
> 2001:aaaa:bbbb:ccb8::/64 on interface eth0 added
> Oct 28 21:13:50 edge01 bird6: radv1 < secondary address fe80::/64 on
> interface eth0 added
> Oct 28 21:13:50 edge01 bird6: radv1 < interface eth1 goes up
> Oct 28 21:13:50 edge01 bird6: radv1: Adding interface eth1
> Oct 28 21:13:50 edge01 bird6: radv1 < primary address
> 2001:aaaa:bbbb:ccee::/64 on interface eth1 added
> Oct 28 21:13:50 edge01 bird6: radv1 < secondary address fe80::/64 on
> interface eth1 added
> Oct 28 21:13:50 edge01 bird6: radv1: State changed to up
> Oct 28 21:13:50 edge01 bird6: rip1: Connected to table master
> Oct 28 21:13:50 edge01 bird6: rip1 < interface lo goes up
> Oct 28 21:13:50 edge01 bird6: rip1 < interface eth0 goes up
> Oct 28 21:13:50 edge01 bird6: rip1 < interface eth1 goes up
> Oct 28 21:13:50 edge01 bird6: rip1 < added 2001:aaaa:bbbb:ccee::/64 dev eth1
> Oct 28 21:13:50 edge01 bird6: rip1 < added 2001:aaaa:bbbb:ccb8::/64 dev eth0
> Oct 28 21:13:50 edge01 bird6: rip1: State changed to up
> Oct 28 21:13:50 edge01 bird6: kernel1: Scanning routing table
> Oct 28 21:13:50 edge01 bird6: kernel1: ::/0: [alien] created
> Oct 28 21:13:50 edge01 bird6: kernel1: Pruning table master
> Oct 28 21:13:50 edge01 bird6: kernel1: Pruning inherited routes
> Oct 28 21:13:51 edge01 bird6: kernel1 > added [best] ::/0 via
> fe80::20c:29ff:fe04:48bc on eth0
> Oct 28 21:13:51 edge01 bird6: kernel1 < rejected by protocol ::/0 via
> fe80::20c:29ff:fe04:48bc on eth0
> Oct 28 21:13:51 edge01 bird6: rip1 < added ::/0 via
> fe80::20c:29ff:fe04:48bc on eth0
> Oct 28 21:13:51 edge01 bird6: rip1: Listening on eth1, port 520, mode
> multicast (ff02::9)
> Oct 28 21:13:51 edge01 bird6: rip1: Listening on eth0, port 520, mode
> multicast (ff02::9)
> Oct 28 21:13:51 edge01 bird6: radv1: Event Init on eth1
> Oct 28 21:13:51 edge01 bird6: radv1: Timer fired on eth1
> Oct 28 21:13:51 edge01 bird6: radv1: Sending RA via eth1
> Oct 28 21:14:00 edge01 bird6: device1: Scanning interfaces
> Oct 28 21:14:00 edge01 bird6: rip1: Broadcasting routing table to eth0
> Oct 28 21:14:00 edge01 bird6: rip1: Broadcasting routing table to eth1
> Oct 28 21:14:00 edge01 bird6: kernel1: Scanning routing table
> Oct 28 21:14:00 edge01 bird6: kernel1: ::/0: [alien] seen
> Oct 28 21:14:00 edge01 bird6: kernel1: Pruning table master
> Oct 28 21:14:00 edge01 bird6: kernel1: Pruning inherited routes
> Oct 28 21:14:06 edge01 bird6: radv1: Timer fired on eth1
> Oct 28 21:14:06 edge01 bird6: radv1: Sending RA via eth1
> ---8<---
> 
>   This is where the startup sequence is over, the last few lines repeat
> in a ten second interval (obviously, since this is configured in
> protocols "device" and "kernel" ...
> 
>   The configuration now looks like this:
> 
> ---8<---
> # bird.conf
> #
> # dynamic routing configuration
> #
> # v0.1 2011-10-21 GS (goesta at smekal.at)
> 
> # global parameters
> 
> log syslog all;
> debug protocols all;
> #debug protocols { routes, events, packets };
> 
> router id 192.168.0.34;
> 
> ## routing protocols
> 
> # device parameters
> protocol device {
>   scan time 10;
>   primary "eth0" 2001:aaaa:bbbb:ccb8::1:1:1;
>   primary "eth1" 2001:aaaa:bbbb:ccee::1:1:1;
> }
> 
> protocol direct{
>   interface "*";
> }
> 
> # kernel routing table
> protocol kernel {
>   scan time 10;
>   persist no;
>   learn yes;
>   import all;
>   export all;
> }
> 
> # router advertisements
> protocol radv {
>   interface "eth1";
> }
> 
> #protocol static{
> #  export all;
> #  route 2001:aaaa:bbbb:ccee::/64 via "eth1";
> #  route ::/0 via 2001:aaaa:bbbb:ccb8:20c:29ff:fe04:48bc;
> #}
> 
> # dynamic routing using RIPng
> protocol rip{
>   authentication none;
>   password "verysecure";
>   honor always;
>   import all;
>   export all;
>   interface "eth*";
> }
> ---8<---
> 
>   As you can see, I also fiddled around with static routes, which did no
> good either.
> 
>   There must be something missing somewhere, but I cannot figure it out
> ... Can anybody help?
> 
>   thanks in advance,
> 
>   Goesta
> 
> 




More information about the Bird-users mailing list