Fwd: Re: Static route and arp problem in FreeBSD 13.0

Morgan Wesström freebsd-database at pp.dyndns.biz
Thu Aug 19 18:34:57 UTC 2021


> I have a similar setup at home and I can access the modem without any special 
> routes/arps.
> I'm assuming you've tried accessing the modem without any special config.

Yes, this does indeed seem to work at least when I try to ping the modem. The 
packets are as expected routed to the ISP's default gateway who ignores them as 
it should. But the modem is intercepting them and replies to the pings. This 
would probably work but looks like potential trouble just waiting to happen. :)

> 
> Can you try changing the route statement to "192.168.0.1/32 -iface em0"?
> This tells the system the address is directly connected and it will send arp 
> requests out em0.

The -iface is confusingly a flag but there's an -interface parameter to route 
so I modified the command as follows:

# route add -net 192.168.0.1/32 -interface em0
add net 192.168.0.1: gateway em0

This does indeed work as I would expect and seems to me a proper solution since 
it produces the same routing and arp entries as my original command. It has the 
added benefit I don't have to add a static arp entry. Thank you for the 
suggestion! :)

I'm still intrigued about the difference in behaviour between 12.2 and 13.0 and 
there seems to be a learning experience for me here. I ran the original command 
again but in debug mode and now it doesn't output any errors. But in debug mode 
it doesn't modify the routing table so I'm still at loss at what's wrong and 
there were no other information of interest in the output.

I'm satisfied with the new solution and will use it instead but if anyone has 
any insight in the strange output message from route I'm still interested to learn.

Kind regards
Morgan



More information about the freebsd-questions mailing list