FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.21k stars 1.24k forks source link

RIPng Redistribution broken #346

Closed mwinter-osr closed 7 years ago

mwinter-osr commented 7 years ago

RIPng redistribution is broken (at least for static and connected routes)

Example Config:

interface r5-eth0
 description to sw7
 ipv6 address fc00:7::1/64
 no link-detect
!
interface r5-eth1
 description to sw6 - RIPng interface
 ipv6 address fc00:6::2/62
 no link-detect
!
router ripng
 network fc00:6::/62
 redistribute connected
 redistribute static
!
ipv6 route fc00:7:1111::/64 fc00:7::10
!

This config should run RIPng on interface r5-eth1 and redistribute fc00:7::1/64 (from the redistribute connected) and fc00:7:1111::/64 (from the redistribute static) to the FRR neighbor on the other side of r5-eth1.

Log claims the redistribution:

RIPNG: RIPNGd 2.0-ci.NetDEF.org-20170402.052803-git.3e71b5d starting: vty@2603
RIPNG: RIPng interface add lo index 1 flags 0x10049 metric 0 mtu 65536
RIPNG: RIPng connected address fe80::200:ff:fe00:0/64 add
RIPNG: RIPng interface add r5-eth0 index 3 flags 0x11043 metric 0 mtu 1500
RIPNG: RIPng interface add r5-eth1 index 2 flags 0x11043 metric 0 mtu 1500
RIPNG: RIPng connected address fc00:7::1/64 add
RIPNG: Redistribute new prefix fc00:7::/64 with nexthop fc00:7:: on the interface r5-eth0
RIPNG: RIPng triggered update!
RIPNG: Redistribute new prefix fc00:7:1111::/64 with nexthop fc00:7:1111:: on the interface r5-eth0
RIPNG: RIPng connected address fe80::9823:f3ff:fe88:b43d/64 add
RIPNG: RIPng connected address fe80::6847:76ff:fe28:6d8/64 add
RIPNG: RIPng triggered update!
RIPNG: RIPng update timer expired!

But the other side never receives an update for it.

rwestphal commented 7 years ago

I couldn't reproduce this bug here.

Please take a look at my test topology:

                                      +---------+
                                      |         |
                                      |   RT1   |
                                      | 1.1.1.1 |-lo1 (2001:db8:1000::1/128)
                                      |         |
                                      +---------+
                                           |rt1-eth0 (.1)
                                           |
                                           |2001:DB8:1::/64
                                           |
                                           |rt2-eth0 (.2)
                                      +---------+
                                      |         |
                                      |   RT2   |
                                      | 2.2.2.2 |-lo1 (2001:db8:1000::2/128)
                                      |         |
                                      +---------+
                                           |rt2-eth1 (.2)
                                           |
                                           |
                                +----------+-----------+
                                |    2001:DB8:2::/64   |
                                |                      |
                                |rt3-eth0 (.3)         |rt4-eth0 (.4)
                           +---------+            +---------+
                           |         |            |         |
(2001:db8:1000::3/128) lo1-|   RT3   |            |   RT4   |-lo1 (2001:db8:1000::4/128)
                           | 3.3.3.3 |            | 4.4.4.4 |
                           |         |            |         |
                           +---------+            +---------+

RT1's config:

interface rt1-eth0
 ipv6 address 2001:db8:1::1/64
!
interface rt1-lo1
 ipv6 address 2001:db8:1000::1/128
!

RT2's config:

interface rt2-eth0
 ipv6 address 2001:db8:1::2/64
!
interface rt2-eth1
 ipv6 address 2001:db8:2::2/64
!
interface rt2-lo1
 ipv6 address 2001:db8:1000::2/128
!
router ripng
 network rt2-eth1
 redistribute connected
 redistribute static
!
ipv6 route 2001:db8:1000::1/128 2001:db8:1::1

RT3's config:

interface rt3-eth0
 ipv6 address 2001:db8:2::3/64
!
interface rt3-lo1
 ipv6 address 2001:db8:1000::3/128
!
router ripng
 network rt3-lo1
 network rt3-eth0
!

RT4's config:

interface rt4-eth0
 ipv6 address 2001:db8:2::4/64
!
interface rt4-lo1
 ipv6 address 2001:db8:1000::4/128
!
router ripng
 network rt4-lo1
 network rt4-eth0
!

In summary, RT1 is not running RIPng and RT2 has a static route to RT1's loopback address. Also, RT2 is redistributing connected and static routes. This means that the following two routes must be present in RT3's and RT4's RIB:

This can be confirmed by the following commands:

RT3# show ipv6 route ripng 
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       v - VNC, V - VNC-Direct,
       > - selected route, * - FIB route

R>* 2001:db8:1::/64 [120/2] via fe80::a802:ff:fe00:2, rt3-eth0
R>* 2001:db8:1000::1/128 [120/2] via fe80::a802:ff:fe00:2, rt3-eth0
R>* 2001:db8:1000::2/128 [120/2] via fe80::a802:ff:fe00:2, rt3-eth0
R>* 2001:db8:1000::4/128 [120/2] via fe80::a804:ff:fe00:1, rt3-eth0

RT4# show ipv6 route ripng 
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       v - VNC, V - VNC-Direct,
       > - selected route, * - FIB route

R>* 2001:db8:1::/64 [120/2] via fe80::a802:ff:fe00:2, rt4-eth0
R>* 2001:db8:1000::1/128 [120/2] via fe80::a802:ff:fe00:2, rt4-eth0
R>* 2001:db8:1000::2/128 [120/2] via fe80::a802:ff:fe00:2, rt4-eth0
R>* 2001:db8:1000::3/128 [120/2] via fe80::a803:ff:fe00:1, rt4-eth0

Maybe redistribution didn't work for you because of split-horizon filtering? I'll investigate here if there are other possible causes for this problem.

rwestphal commented 7 years ago

I think I found what the problem is.

I can't see lines like these in your ripngd's log file:

RIPng turn on r5-eth1
RIPng r5-eth1 join to all-rip-routers multicast group

Presumably your r5-eth1 interface was shut down when you performed this test. Could you confirm that?

BTW, we definitely need a command like "show ipv6 ripng interfaces" to help troubleshooting problems like this.

mwinter-osr commented 7 years ago

No. Interface up and running and I've tested the same.in older Quagga releases where it works

rwestphal commented 7 years ago

So, according to your log file ripngd is not receiving the fc00:6::2/62 address from zebra. Without this information it can't enable RIPng on the r5-eth1 interface.

mwinter-osr commented 7 years ago

The topotest git now contains a new test (in branch ripng_topo1) which shows the issue (with FRR 2.0) See https://github.com/FRRouting/topotests/tree/ripng_topo1

mwinter-osr commented 7 years ago

Issue found by Renato: The test had duplicate IPv6 addresses. Test fixed, which solved the problem. This is NOT a FRR issue. Test was broken.