Multi protocol route handling (IPv4 via IPv6)

Nico Schottelius nico.schottelius at ungleich.ch
Sat Nov 9 19:58:43 CET 2019


Hello,

I have setup an MP-BGP with 2 bird instances and my aim is to route IPv4
via IPv6, like cumulus is doing it.

Currently I receive the IPv4 and IPv6 routes via the IPv6 session, as
follows:

58.69.253.0/24       unicast [router2_place5_ungleich_ch_v6 18:11:21.625] ! (100) [AS36776i]
        via 2a0a:e5c0:1:8::4 on bond0.8
23.211.0.0/22        unicast [router2_place5_ungleich_ch_v6 18:11:21.625] ! (100) [AS16625i]
        via 2a0a:e5c0:1:8::4 on bond0.8
...

However bird seems not to add the routes into the kernel.
Testing it manually, I also get an error message:

router3:~# ip route add 185.50.77.0/24 via inet6 2a0a:e5c0:1:8::4
RTNETLINK answers: Invalid argument
router3:~# uname -a
Linux router3 4.19.75-0-vanilla #1-Alpine SMP Mon Sep 23 12:27:20 UTC 2019 x86_64 GNU/Linux
router3:~#

However using a different test system, it potentially works:

[root at diamond ~]# ip route add 185.12.3.0/24 via inet6 2a0a:e5c1:137::136
[root at diamond ~]# uname -a
Linux diamond 5.3.8-arch1-1 #1 SMP PREEMPT @1572357769 x86_64 GNU/Linux
[root at diamond ~]#

Now my question regarding bird:

If the kernel / i route actually supports it (as seen in the 2nd
system), should bird2 be able to install the IPv4 routes via IPv6 or
not?

According to the documentation RFC5549 is supported, but as far as I can
see that does not state whether or not the interface to the kernel needs
to be supported as well.

I have also just installed and tested bird 2.0.7 on the system with the
5.3.8 kernel and bird also does not setup the ipv4 route via ipv6:

[root at diamond ~]# birdc show route
BIRD 2.0.7 ready.
Table master4:
10.11.0.0/24         unicast [static4 19:50:31.005] * (200)
        via 192.168.43.1 on wlp0s20f3
10.10.0.0/24         unicast [static4 19:50:31.005] ! (200)
        via 2a0a:e5c1:137::136 on wgungleich

Table master6:
2001:db8::/32        unicast [static6 19:50:31.005] * (200)
        via 2a0a:e5c1:137::136 on wgungleich
[root at diamond ~]# ip r
default via 192.168.43.104 dev wlp0s20f3 proto dhcp src 192.168.43.38 metric 302
10.11.0.0/24 via 192.168.43.1 dev wlp0s20f3 proto bird metric 32
192.168.43.0/24 dev wlp0s20f3 proto dhcp scope link src 192.168.43.38 metric 302
[root at diamond ~]# cat /etc/bird.conf
router id 192.168.1.1;

protocol kernel kernel4 {
        ipv4 {
                import all;
                export all;
        };
}

protocol kernel kernel6 {
        ipv6 {
                import all;
                export all;
        };
}

protocol static static4 {
        ipv4;

        # this doesn't work
        route 10.10.0.0/24 via 2a0a:e5c1:137::136;

        # this works
        route 10.11.0.0/24 via 192.168.43.1;
}

protocol static static6 {
        ipv6;

        route 2001:db8::/32 via 2a0a:e5c1:137::136;
}

protocol device {
    scan time 10;
}

[root at diamond ~]#

If I read
https://bird.network.cz/pipermail/bird-users/2019-March/013144.html
correctly, the exclamation mark in the route output means it had a
problem pushing it into the kernel.

However doing it manually, works as expected:

[root at diamond ~]# ip route add 10.10.0.0/24 via inet6 2a0a:e5c1:137::136
[root at diamond ~]# ip r
default via 192.168.43.104 dev wlp0s20f3 proto dhcp src 192.168.43.38 metric 302
10.10.0.0/24 via inet6 2a0a:e5c1:137::136 dev wgungleich
10.11.0.0/24 via 192.168.43.1 dev wlp0s20f3 proto bird metric 32
192.168.43.0/24 dev wlp0s20f3 proto dhcp scope link src 192.168.43.38 metric 302
[root at diamond ~]#

Sorry for the long mail, I hope it is understandable what I am trying to
achieve.

Best,

Nico


--
Modern, affordable, Swiss Virtual Machines. Visit www.datacenterlight.ch


More information about the Bird-users mailing list