Re: ripd processes not exchanging routing tables

2024-07-10 Thread jrmu
Greetings,

> This looks strange to me. You do something here that is putting you in the
> warranty void bucket. Please configure your interfaces properly. Do not
> play games by injecting route commands to install cloning routes for a
> different network.
> 
> In short make sure that vport11 and vio0 share a common subnet and can
> talk directly to each other. After that ripd may actually work as well.

Thank you, this was the cause. I updated the configuration so that the
interfaces were in the same subnet, and now it works!

I documented it here:

https://wiki.ircnow.org/index.php?n=Ripd.Configure

Thanks so much for the help.

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



Re: ripd processes not exchanging routing tables

2024-07-08 Thread Claudio Jeker
On Sat, Jul 06, 2024 at 06:25:51PM -0700, jrmu wrote:
> 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

> 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

This looks strange to me. You do something here that is putting you in the
warranty void bucket. Please configure your interfaces properly. Do not
play games by injecting route commands to install cloning routes for a
different network.

In short make sure that vport11 and vio0 share a common subnet and can
talk directly to each other. After that ripd may actually work as well.

-- 
:wq Claudio



Re: ripd processes not exchanging routing tables

2024-07-07 Thread jrmu
On R2, I run this command:

r2# netstat -na -f inet
Active Internet connections (including servers)
Proto   Recv-Q Send-Q  Local Address  Foreign AddressTCP-State
tcp  0  0  127.0.0.1.25   *.*LISTEN
tcp  0  0  *.22   *.*LISTEN
Active Internet connections (including servers)
Proto   Recv-Q Send-Q  Local Address  Foreign Address
udp  0  0  10.2.1.1.3788  217.180.209.214.123
udp  0  0  10.2.1.1.12451 162.159.200.1.123
udp  0  0  10.2.1.1.29041 142.202.190.19.123
udp  0  0  10.2.1.1.8358  69.89.207.199.123
udp  0  0  10.2.1.1.23580 73.193.62.54.123
udp  0  0  *.520  *.*
udp  0  0  *.**.*
udp  0  0  *.**.*

I notice that there's no listener for 224.0.0.9. This looks like the
reason for failure is that the interface isn't set up to listen for
IP multicast packets. Does anyone know how to fix that? I can't seem to
find documentation for how to add the interface to listen to multicast
packets.

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



ripd processes not exchanging routing tables

2024-07-06 Thread jrmu
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