Saturday, July 06, 2024

ripd processes not exchanging routing tables

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 0xffff0000
!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<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
lladdr fe:e1:ba:d1:c2:8b
index 12 priority 0 llprio 3
groups: vport
inet 10.1.2.1 netmask 0xffff0000 broadcast 10.1.255.255

r2# cat /etc/hostname.vio0
inet 10.2.1.1 0xffff0000
!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 0xffff0000
!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 0xffff0000
!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<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> 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 0xffff0000 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 Address State Linkstate Uptime
vport11 10.1.2.1/16 ACTIVE unknown 00:00:06

r1# ripctl show neighbor
ID State Address Iface Uptime


r2# ripctl show
Interface Address State Linkstate Uptime
vio2 10.2.4.1/16 ACTIVE active 00:00:13
vio1 10.2.3.1/16 ACTIVE active 00:00:13
vio0 10.2.1.1/16 ACTIVE 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) {10.4.2.1/255.255.255.255}(2) {10.5.0.0/255.255.0.0}(2) [tos 0xc0] [ttl 1]
20:18:10.669431 fe:e1:ba:d1:c2:8b 01:00:5e:00:00:09 0800 86: 10.1.2.1.520 > 224.0.0.9.520: RIPv2-resp [items 2]: {10.0.0.0/255.0.0.0}(16) {10.2.1.1/255.255.255.255}(16) [tos 0xc0] [ttl 1]
20:18:38.049714 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) {10.4.2.1/255.255.255.255}(2) {10.5.0.0/255.255.0.0}(2) [tos 0xc0] [ttl 1]
20:18:43.679243 fe:e1:ba:d1:c2:8b 01:00:5e:00:00:09 0800 86: 10.1.2.1.520 > 224.0.0.9.520: RIPv2-resp [items 2]: {10.0.0.0/255.0.0.0}(16) {10.2.1.1/255.255.255.255}(16) [tos 0xc0] [ttl 1]
20:19:11.069663 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) {10.4.2.1/255.255.255.255}(2) {10.5.0.0/255.255.0.0}(2) [tos 0xc0] [ttl 1]
20:19:14.689247 fe:e1:ba:d1:c2:8b 01:00:5e:00:00:09 0800 86: 10.1.2.1.520 > 224.0.0.9.520: RIPv2-resp [items 2]: {10.0.0.0/255.0.0.0}(16) {10.2.1.1/255.255.255.255}(16) [tos 0xc0] [ttl 1]

Here are the routing tables:

r1# route -n show -inet
Routing tables

Internet:
Destination Gateway Flags Refs Use Mtu Prio Iface
default 104.167.241.193 UGS 9 1107616 - 8 em1
224/4 127.0.0.1 URS 0 705 32768 8 lo0
10/8 10.2.1.1 UGS 0 24272 - 8 vport11
10.1/16 10.1.2.1 UCn 0 0 - 4 vport11
10.1.2.1 fe:e1:ba:d1:c2:8b UHLl 0 496 - 1 vport11
10.1.255.255 10.1.2.1 UHb 0 0 - 1 vport11
10.2.1.1 e8:8b:21:21:21:21 UHLch 1 6735 - 7 vport11
10.2.1.1 link#12 UHCS 1 0 - 8 vport11
104.167.241.192/26 104.167.241.211 UCn 1 286888 - 4 em1
104.167.241.193 ac:1f:6b:fe:ca:98 UHLch 3 138477 - 3 em1
104.167.241.211 00:25:90:5a:2d:92 UHLl 0 137570 - 1 em1
104.167.241.255 104.167.241.211 UHb 0 85674 - 1 em1
127/8 127.0.0.1 UGRS 0 0 32768 8 lo0
127.0.0.1 127.0.0.1 UHhl 2 323253 32768 1 lo0

r2# route -n show -inet
Routing tables

Internet:
Destination Gateway Flags Refs Use Mtu Prio Iface
224/4 127.0.0.1 URS 0 252 32768 8 lo0
10.1/16 10.1.2.1 UGS 0 0 - 8 vio0
10.1.2.1 fe:e1:ba:d1:c2:8b UHLch 1 4 - 7 vio0
10.1.2.1 link#1 UHCS 1 0 - 8 vio0
10.2/16 10.2.1.1 UCPn 0 2 - 4 vio0
10.2/16 10.2.3.1 UCPn 0 0 - 4 vio1
10.2/16 10.2.4.1 UCPn 0 0 - 4 vio2
10.2.1.1 e8:8b:21:21:21:21 UHLl 0 8 - 1 vio0
10.2.3.1 e8:8b:23:23:23:23 UHLl 0 10 - 1 vio1
10.2.4.1 e8:8b:24:24:24:24 UHLl 0 7 - 1 vio2
10.2.255.255 10.2.1.1 UHPb 0 0 - 1 vio0
10.2.255.255 10.2.3.1 UHPb 0 0 - 1 vio1
10.2.255.255 10.2.4.1 UHPb 0 0 - 1 vio2
10.3/16 10.3.2.1 UGS 0 0 - 8 vio1
10.3.2.1 e8:8b:32:32:32:32 UHLch 2 8 - 7 vio1
10.3.2.1 link#2 UHCS 1 0 - 8 vio1
10.4/16 10.4.2.1 UGS 0 0 - 8 vio2
10.4.2.1 link#3 UHLch 1 2 - 7 vio2
10.4.2.1 link#3 UHCS 1 0 - 8 vio2
10.5/16 10.3.2.1 UGS 0 1 - 8 vio1
127/8 127.0.0.1 UGRS 0 0 32768 8 lo0
127.0.0.1 127.0.0.1 UHhl 1 2 32768 1 lo0

Anyone have suggestions for what is wrong with my configuration?

--
jrmu
IRCNow (https://ircnow.org)

No comments:

Post a Comment