Cannot add IPv6 /128 loopback
-
I've configured a TNSR instance
tnsr-v20.08-3
on a supermicro baremetal, with OSPF, OSPF6 and BGP in a small network. OSPF and OSPF6 are both forming adjacencies using a /31 and /64 transit network respectively on an interface namedxe-0/2/2
(giving away what type of network I usually run):chbtl1 tnsr# show route dynamic ospf6 neighbor Neighbor ID Pri DeadTime State/IfState Duration I/F[State] 194.1.163.3 1 00:00:32 Full/PointToPoint 00:20:07 xe-0/2/2[PointToPoint] chbtl1 tnsr# show route dynamic ospf neighbor Neighbor ID Pri State Dead Time Address Interface RXmtL RqstL DBsmL 194.1.163.3 1 Full/DROther 44.429s 194.1.163.17 xe-0/2/2:194.1.163.16 0 0 0
I want iBGP sessions to be established between loopback addresses, so I've added a loopback interface loop0 and was able to successfully add an IPv4 /32 to it. That /32 is now visible in the other routers in OSPF. However, adding an IPv6 /128 to
loop0
gives me an awkward error:chbtl1 tnsr(config)# interface loop0 chbtl1 tnsr(config-interface)# ipv6 address 2001:678:d78::4/128 chbtl1 tnsr(config-interface)# exit Sep 29 23:52:13: Commit failed.: application operation-failed add:vpp/intf/2001:678:d78::4/128, Address in use, Address conflicts with 2001:678:d78:0:2::1/64 on xe-0/2/2
There's only two interfaces configured on the machine, that
xe-0/2/2
andloop0
.chbtl1 tnsr# show interface xe-0/2/2 Interface: xe-0/2/2 Admin status: up Link up, link-speed 10 Gbps, full duplex Link MTU: 9000 bytes MAC address: 9c:69:b4:61:a1:de IPv4 MTU: 0 bytes IPv4 Route Table: ipv4-VRF:0 IPv4 addresses: 194.1.163.16/31 IPv6 MTU: 0 bytes IPv6 Route Table: ipv6-VRF:0 IPv6 addresses: 2001:678:d78:0:2::1/64 fe80::9e69:b4ff:fe61:a1de/64 VLAN tag rewrite: disable Rx-queues queue-id 0 : cpu-id 1 counters: received: 40924902 bytes, 36747 packets, 0 errors transmitted: 1590880 bytes, 19596 packets, 0 errors protocols: 36414 IPv4, 263 IPv6 206 drops, 0 punts, 0 rx miss, 0 rx no buffer chbtl1 tnsr# show interface loop0 Interface: loop0 Admin status: up Link up, unknown duplex Link MTU: 9000 bytes MAC address: de:ad:00:00:00:00 IPv4 MTU: 0 bytes IPv4 Route Table: ipv4-VRF:0 IPv4 addresses: 194.1.163.4/32 IPv6 MTU: 0 bytes IPv6 Route Table: ipv6-VRF:0 IPv6 addresses: fe80::dcad:ff:fe00:0/64 VLAN tag rewrite: disable counters: received: 0 bytes, 0 packets, 0 errors transmitted: 5964 bytes, 70 packets, 1 errors protocols: 0 IPv4, 35 IPv6 27 drops, 0 punts, 0 rx miss, 0 rx no buffer
I think my OSPF config is reasonably vanilla:
chbtl1 tnsr# show route dynamic ospf config Building configuration... Current configuration: ! frr version 7.3.1-29~tnsr_v20.08_3 frr defaults traditional hostname chbtl1 ! interface loop0 ip ospf area 0.0.0.0 ! interface xe-0/2/2 ip ospf area 0.0.0.0 ip ospf dead-interval 45 ip ospf hello-interval 9 ip ospf network point-to-point ! router ospf ospf router-id 194.1.163.4 ! line vty ! end chbtl1 tnsr# show route dynamic ospf6 config Building configuration... Current configuration: ! frr version 7.3.1-29~tnsr_v20.08_3 frr defaults traditional hostname chbtl1 ! interface loop0 ipv6 ospf6 passive ! interface xe-0/2/2 ipv6 ospf6 network point-to-point ! router ospf6 interface loop0 area 0.0.0.0 interface xe-0/2/2 area 0.0.0.0 ! line vty ! end
I'm wondering what other things I could try to get this
loop0
interface to show up in OSPF6. I'm afraid I'm hitting a bug, becauseshow route table ipv6-VRF:0
definitely does not contain that IPv6 address and it's certainly not pingable (neither from thetnsr
machine, nor from the rest of my network). Any clues? -
Sometimes it helps to sleep on it. I found and fixed an issue with this configuration. The issue was PEBCAK. For posterity:
I had used
2001:678:d78:0:2::1/64
on xe-0/2/0 which is a supernet of2001:678:d78::4/128
. Once I changed the transit network into a /112 there was no longer overlap. This does beg a VPP question though -- why wouldn't it be OK to have a supernet and a subnet interface like this? Or, similarly, have identical IPv4 / IPv6 addresses on multiple interfaces?I scratched my head a little while due to
2001:678:d78::/128
(another router in my network) still not being reachable (ie pinging it from this machine would reach this machine rather than the actual router), but this was because the remote side of the same2001:678:d78:0:2::2/64
link was still using /64 erratically, so OSPF learned that, in fact,2001:678:d78:0:2::/64
was reachable over xe-0/2/0 and because ::0 is sometimes reserved for 'the link-local gateway', so thetnsr
machine responded to it.Once I also changed the remote OSPF speaker to announce
2001:678:d78:0:2::2/112
, all nodes in the IGP were reachable. -
Had the same issue some month ago. In some cases it can be usefull to have IP space overlapping on multiple interfaces. For example if you have a routed /24 which is bound to a loopback interfaces to prevent l3 loops while only having a smaller subnet assigned to a different interface.
eg:
185.121.69.0/24 dev lo
185.121.69.0/26 dev eth0.502
...However, the developer of TNSR are aware of this, I had a evaluation meeting longer ago where I explained this issue to them.