announce IPV4 loopback via an OSPF v3 backbone
Hi everyone, I was reading the ospv3 spec and this link https://networklessons.com/ospf/ospfv3-for-ipv4- and was wondering if such features is supported in bird 2. Can we announce loopbacks via OSPFv3 and remove the need to use OSPFv2 and ptp subnets ? I see it as a good opportunity to reduce the usage of the IPv4 addresses if we can just advertise loopbacks... Benoît
Hoi, On 3/27/24 10:08, Benoit Chesneau wrote:
I was reading the ospv3 spec and this linkhttps://networklessons.com/ospf/ospfv3-for-ipv4- and was wondering if such features is supported in bird 2. Can we announce loopbacks via OSPFv3 and remove the need to use OSPFv2 and ptp subnets ?
I see it as a good opportunity to reduce the usage of the IPv4 addresses if we can just advertise loopbacks... I tried this today on two machines directly connected as vpp0-2:e1 <-> vpp0-3:e0 (marked in *green*)
root@vpp0-2:~# ip -br a lo UNKNOWN 127.0.0.1/8 ::1/128 loop0 UNKNOWN 192.168.10.2/32 2001:678:d78:200::2/128 fe80::dcad:ff:fe00:0/64 e0 UP 192.168.10.2/32 2001:678:d78:200::2/128 fe80::5054:ff:fef0:1120/64 *e1 UP 192.168.10.2/32 2001:678:d78:200::2/128 fe80::5054:ff:fef0:1121/64 * e2 DOWN e3 DOWN root@vpp0-3:/etc/bird# ip -br a lo UNKNOWN 127.0.0.1/8 ::1/128 loop0 UNKNOWN 192.168.10.3/32 2001:678:d78:200::3/128 fe80::dcad:ff:fe00:0/64 *e0 UP 192.168.10.3/32 2001:678:d78:200::3/128 fe80::5054:ff:fef0:1130/64 * e1 UP 192.168.10.3/32 2001:678:d78:200::3/128 fe80::5054:ff:fef0:1131/64 e2 DOWN e3 DOWN They both took the following OSPF configuration with Bird 2.14 -- protocol ospf v3 ospf4 { *ipv4* { export where (source = RTS_DEVICE || source = RTS_STATIC); import all; }; area 0 { interface "loop0" { stub yes; }; interface "e0" { type pointopoint; cost 5; bfd off; }; interface "e1" { type pointopoint; cost 5; bfd off; }; interface "e2" { type pointopoint; cost 5; bfd off; }; interface "e3" { type pointopoint; cost 5; bfd off; }; }; } OSPFv3 adjacency did establish, but no routes were exchanged (also none with filter 'export all; import all;') -- root@vpp0-3:/etc/bird# birdc show os ne BIRD 2.14 ready. ospf4: Router ID Pri State DTime Interface Router IP 192.168.10.2 1 Full/PtP 30.036 e0 fe80::5054:ff:fef0:1121 root@vpp0-3:/etc/bird# birdc show route protocol ospf4 BIRD 2.14 ready. Table master4: 192.168.10.3/32 unicast [ospf4 15:29:07.337] I (150/0) [192.168.10.3] dev loop0 dev e0 dev e1 It would be really useful to let OSPF v3 learn and distribute IPv4 routes with link local nexthops, like so: | pim@vpp0-2:~$ sudo ip ro add 192.168.10.3/32 via inet6 *fe80::5054:ff:fef0:1130* dev e1 pim@vpp0-3:/etc/bird$ sudo ip ro add 192.168.10.2/32 via inet6 |*fe80::5054:ff:fef0:1121*|dev e0 pim@vpp0-3:/etc/bird$ ping ||192.168.10.2| |PING 192.168.10.2 (192.168.10.2) 56(84) bytes of data. 64 bytes from 192.168.10.2: icmp_seq=1 ttl=64 time=3.90 ms 64 bytes from 192.168.10.2: icmp_seq=2 ttl=64 time=3.61 ms | However, I think this is not quite working. I've attached (a tiny tar of) config and logs from `vpp0-3` in case somebody wants to double check. Can somebody confirm that the paragraph Benoit mentioned works for them? OSPFv2 needs one IPv4 channel. OSPFv3 needs either one IPv6 channel, or one IPv4 channel (RFC 5838 <http://www.rfc-editor.org/info/rfc5838>). Therefore, it is possible to use OSPFv3 for both IPv4 and Pv6 routing, but it is necessary to have two protocol instances anyway. If no channel is configured, appropriate channel is defined with default parameters. groet, Pim -- Pim van Pelt PBVP1-RIPE -https://ipng.ch/
Hoi, On 3/30/24 15:50, Pim van Pelt wrote:
OSPFv3 adjacency did establish, but no routes were exchanged (also none with filter 'export all; import all;') -- As a quick follow up to this: routes are exchanged, but they are not emitted to the kernel. root@vpp0-2:~# birdc show ospf state BIRD 2.14 ready.
area 0.0.0.0 router 192.168.10.2 distance 0 router 192.168.10.3 metric 5 stubnet 192.168.10.2/32 metric 0 stubnet 192.168.10.2/32 metric 0 stubnet 192.168.10.2/32 metric 0 external 192.168.10.2/32 metric2 10000 external 192.168.10.0/24 metric2 10000 router 192.168.10.3 distance 5 router 192.168.10.2 metric 5 stubnet 192.168.10.3/32 metric 0 stubnet 192.168.10.3/32 metric 0 stubnet 192.168.10.3/32 metric 0 external 192.168.10.3/32 metric2 10000 I am not seeing any Netlink route messages for any of the LSAs from neighbor 192.168.10.3 (colored in red above). Could it be that when using an ipv4 channel with OSPFv3, Bird ought to program these across address families? |pim@vpp0-2:~$ sudo ip ro add 192.168.10.3/32 via inet6 *fe80::5054:ff:fef0:1130* dev e1 | groet, Pim -- Pim van Pelt PBVP1-RIPE -https://ipng.ch/
I get the same result as well. On freebsd when starting I also get this message " Cannot find next hop address". Benoît On Saturday, March 30th, 2024 at 16:04, Pim van Pelt via Bird-users <bird-users@network.cz> wrote:
Hoi,
On 3/30/24 15:50, Pim van Pelt wrote:
OSPFv3 adjacency did establish, but no routes were exchanged (also none with filter 'export all; import all;') --
As a quick follow up to this: routes are exchanged, but they are not emitted to the kernel. root@vpp0-2:~# birdc show ospf state BIRD 2.14 ready.
area 0.0.0.0
router 192.168.10.2 distance 0 router 192.168.10.3 metric 5 stubnet 192.168.10.2/32 metric 0 stubnet 192.168.10.2/32 metric 0 stubnet 192.168.10.2/32 metric 0 external 192.168.10.2/32 metric2 10000 external 192.168.10.0/24 metric2 10000
router 192.168.10.3 distance 5 router 192.168.10.2 metric 5 stubnet 192.168.10.3/32 metric 0 stubnet 192.168.10.3/32 metric 0 stubnet 192.168.10.3/32 metric 0 external 192.168.10.3/32 metric2 10000 I am not seeing any Netlink route messages for any of the LSAs from neighbor 192.168.10.3 (colored in red above). Could it be that when using an ipv4 channel with OSPFv3, Bird ought to program these across address families?
pim@vpp0-2:~$ sudo ip ro add 192.168.10.3/32 via inet6 fe80::5054:ff:fef0:1130 dev e1 groet, Pim
-- Pim van Pelt PBVP1-RIPE - https://ipng.ch/
correction: the error message is not related particularly to bird but seems related to this issue in latest freebsd release: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275341 Once fixed though, I have the same results. routes are not applied to the kernel. ospfv3. Applying a `/31` to the point to point interface: ``` vlan200: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 150 0 options=4600703<RXCSUM,TXCSUM,TSO4,TSO6,LRO,RXCSUM_IPV6,TXCSUM_IPV6,MEXTPG> ether 9a:c7:bd:e8:62:dc inet 10.200.1.1 netmask 0xfffffffe broadcast 255.255.255.255 inet6 fe80::98c7:bdff:fee8:62dc%vlan200 prefixlen 64 scopeid 0x4 groups: vlan vlan: 200 vlanproto: 802.1q vlanpcp: 0 parent interface: iavf0 media: Ethernet autoselect (10Gbase-SR <full-duplex>) status: active nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> ``` allows the route to be shared . Configuration is : ``` protocol ospf v3 ospfv4 { ipv4 { import filter ospf_import; export filter ospf_export; }; area 0 { interface "lo1" { stub yes; }; interface "vlan200" { type ptp; cost 10; }; };} ``` Benoît Chesneau, Enki Multimedia — t. +33608655490 Sent with [Proton Mail](https://proton.me/) secure email. On Sunday, March 31st, 2024 at 01:42, Benoit Chesneau <benoitc@enki-multimedia.eu> wrote:
I get the same result as well. On freebsd when starting I also get this message " Cannot find next hop address".
Benoît
On Saturday, March 30th, 2024 at 16:04, Pim van Pelt via Bird-users <bird-users@network.cz> wrote:
Hoi,
On 3/30/24 15:50, Pim van Pelt wrote:
OSPFv3 adjacency did establish, but no routes were exchanged (also none with filter 'export all; import all;') --
As a quick follow up to this: routes are exchanged, but they are not emitted to the kernel. root@vpp0-2:~# birdc show ospf state BIRD 2.14 ready.
area 0.0.0.0
router 192.168.10.2 distance 0 router 192.168.10.3 metric 5 stubnet 192.168.10.2/32 metric 0 stubnet 192.168.10.2/32 metric 0 stubnet 192.168.10.2/32 metric 0 external 192.168.10.2/32 metric2 10000 external 192.168.10.0/24 metric2 10000
router 192.168.10.3 distance 5 router 192.168.10.2 metric 5 stubnet 192.168.10.3/32 metric 0 stubnet 192.168.10.3/32 metric 0 stubnet 192.168.10.3/32 metric 0 external 192.168.10.3/32 metric2 10000 I am not seeing any Netlink route messages for any of the LSAs from neighbor 192.168.10.3 (colored in red above). Could it be that when using an ipv4 channel with OSPFv3, Bird ought to program these across address families?
pim@vpp0-2:~$ sudo ip ro add 192.168.10.3/32 via inet6 fe80::5054:ff:fef0:1130 dev e1 groet, Pim
-- Pim van Pelt PBVP1-RIPE - https://ipng.ch/
On Wed, Mar 27, 2024 at 09:08:35AM +0000, Benoit Chesneau wrote:
Hi everyone,
I was reading the ospv3 spec and this link https://networklessons.com/ospf/ospfv3-for-ipv4- and was wondering if such features is supported in bird 2. Can we announce loopbacks via OSPFv3 and remove the need to use OSPFv2 and ptp subnets ?
I see it as a good opportunity to reduce the usage of the IPv4 addresses if we can just advertise loopbacks...
Hi This feature was not implemented in BIRD 2, i just implemented it yesterday: https://gitlab.nic.cz/labs/bird/-/commit/280daed57d061eb1ebc89013637c683fe23... If there is no IPv4 address on the iface, it chooses an IPv4 address from another OSPF-managed iface (preferably /32 or stub) and announces that. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) "To err is human -- to blame it on a computer is even more so."
participants (3)
-
Benoit Chesneau -
Ondrej Zajicek -
Pim van Pelt