Hoi,
On 3/27/24 10:08, Benoit Chesneau
wrote:
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...
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). 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/