Greetings,
I am now trying to figure out how to run ripd(8) to replace the static
routes. I have two machines I'm trying to configure routing for, R1 and R2.
I suspect the two ripd processes I configured for R1 and R2 are sending
multicast packets but not actually listening/replying to each other.
R1 <--> Internet
10.1/16
^
|
|
|
R2 <-> R3 <-> R5 10.5/16
10.2/16 10.3/16
^ ^
\/
\ /
\/
\ /
> R4 <
10.4/16
Right now, I'm just looking at the link between R1 and R2. Both of them
have ripd running, but the routing tables aren't being updated like I
had expected.
Here's how I configure the interfaces:
r1# cat /etc/hostname.vport11
inet 10.1.2.1 0x
!route add -inet 10.2.1.1 -cloning -link -iface vport11
!route add -inet 10/8 10.2.1.1
up
r1# cat /etc/ripd.conf
#$OpenBSD: ripd.conf,v 1.1 2014/07/11 21:20:10 deraadt Exp $
fib-update yes
redistribute static
split-horizon poisoned
triggered-updates yes
interface vport11 {
cost 2
}
r1# ifconfig vport11
vport11: flags=8943 mtu 1500
lladdr fe:e1:ba:d1:c2:8b
index 12 priority 0 llprio 3
groups: vport
inet 10.1.2.1 netmask 0x broadcast 10.1.255.255
r2# cat /etc/hostname.vio0
inet 10.2.1.1 0x
!route add -inet 10.1.2.1 -cloning -link -iface vio0
!route add -inet 10.1/16 10.1.2.1
!route add -inet default 10.1.2.1
up
r2# cat /etc/hostname.vio1
inet 10.2.3.1 0x
!route add -inet 10.3.2.1 -cloning -link -iface vio1
!route add -inet 10.3/16 10.3.2.1
!route add -inet 10.5/16 10.3.2.1
r2# cat /etc/hostname.vio2
inet 10.2.4.1 0x
!route add -inet 10.4.2.1 -cloning -link -iface vio2
!route add -inet 10.4/16 10.4.2.1
up
r2# cat /etc/sysctl.conf
net.inet.ip.forwarding=1
net.inet6.ip6.forwarding=1
net.inet.ip.multipath=1
net.inet6.ip6.multipath=1
r2# cat /etc/ripd.conf
#$OpenBSD: ripd.conf,v 1.1 2014/07/11 21:20:10 deraadt Exp $
fib-update yes
redistribute static
split-horizon poisoned
triggered-updates yes
interface vio0 {
cost 2
}
interface vio1 {
cost 2
}
interface vio2 {
cost 2
}
r2# ifconfig vio0
vio0: flags=8b43 mtu
1500
lladdr e8:8b:21:21:21:21
index 1 priority 0 llprio 3
media: Ethernet autoselect
status: active
inet 10.2.1.1 netmask 0x broadcast 10.2.255.255
When I run ripd in debug mode, I see these errors on both r1 and r2:
r1# ripd -dvvv
startup
if_fsm: event 'UP' resulted in action 'START' and changing state for interface
vport11 from 'DOWN' to 'ACTIVE'
recv_packet: cannot find a matching interface
recv_packet: cannot find a matching interface
recv_packet: cannot find a matching interface
r2# ripd -dvvv
startup
if_fsm: event 'UP' resulted in action 'START' and changing state for interface
vio2 from 'DOWN' to 'ACTIVE'
if_fsm: event 'UP' resulted in action 'START' and changing state for interface
vio1 from 'DOWN' to 'ACTIVE'
if_fsm: event 'UP' resulted in action 'START' and changing state for interface
vio0 from 'DOWN' to 'ACTIVE'
recv_packet: cannot find a matching interface
recv_packet: cannot find a matching interface
recv_packet: cannot find a matching interface
I suspect that error message is due to the interface not being properly
configured for multicast packets, but I am not certain. The lladdr for r1's
vporrt11 is fe:e1:ba:d1:c2:8b, and the lladdr for r2's vio0 is
e8:8b:21:21:21:21. I don't think they have the ethernet multicast bit set.
When I check ripctl, it doesn't show any neighbors detected:
r1# ripctl show
Interface AddressState Linkstate Uptime
vport11 10.1.2.1/16ACTIVE unknown00:00:06
r1# ripctl show neighbor
ID State Address Iface Uptime
r2# ripctl show
Interface AddressState Linkstate Uptime
vio210.2.4.1/16ACTIVE active 00:00:13
vio110.2.3.1/16ACTIVE active 00:00:13
vio010.2.1.1/16ACTIVE active 00:00:13
r2# ripctl show neighbor
ID State Address Iface Uptime
Here's what I see when I run tcpdump on vport11:
$ doas tcpdump -ne -i vport11 'udp port 520'
tcpdump: listening on vport11, link-type EN10MB
20:17:32.003561 e8:8b:21:21:21:21 01:00:5e:00:00:09 0800 66: 10.2.1.1.520 >
224.0.0.9.520: RIPv2-req 24 [tos 0xc0] [ttl 1]
20:17:34.655769 fe:e1:ba:d1:c2:8b 01:00:5e:00:00:09 0800 66: 10.1.2.1.520 >
224.0.0.9.520: RIPv2-req 24 [tos 0xc0] [ttl 1]
20:18:03.029734 e8:8b:21:21:21:21 01:00:5e:00:00:09 0800 186: 10.2.1.1.520 >
224.0.0.9.520: RIPv2-resp [items 7]: {10.1.0.0/255.255.0.0}(16)
{10.1.2.1/255.255.255.255}(16) {10.3.0.0/255.255.0.0}(2)
{10.3.2.1/255.255.255.255}(2) {10.4.0.0/255.255.0.0}(2)
{1