tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Static interface routes for IP address on different subnet doesn't send an ARP who-has



Hello,

On FreeBSD 9.1-RELEASE, the network stack sends an ARP who-has request with the following network settings:

# ifconfig em0 inet 198.50.219.49 netmask 255.255.255.255 broadcast 198.50.219.49
# route add -host 198.50.219.62 -link -iface em0
add host 198.50.219.62: gateway em0
# ping 198.50.219.49
PING 198.50.219.49 (198.50.219.49): 56 data bytes
64 bytes from 198.l50.219.l49: icmp_seq=0 ttl=64 time=0.031 ms
64 bytes from 198.l50.219.l49: icmp_seq=1 ttl=64 time=0.026 ms
^C
--- 198.50.219.49 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.026/0.028/0.031/0.003 ms
# arp -a
? (198.50.219.49) at 52:54:00:51:57:30 on em0 permanent [ethernet]

How would you get a routing table entry that would provoke ARP? Even the NetBSD FAQ sdoesn't have a MAC address listed:

http://www.netbsd.org/docs/network/#nonsubnetgateway

-Peter

On 2013-08-22 8:57 AM, Greg Troxel wrote:
This does seem like a bug.  It's interesting that it works on FreeBSD,
since much of the code has shared heritage.

The basic approach to arp is to have a cloning route ("C" flag) which
causes arp procesing for addresses within the prefix but for which there
isn't an llinfo (L) entry.

   route add -host 198.50.219.62 -link -iface vioif0

Why are you giving "-link", with no mac address?  That seems wrong, and
it seems like a bug in route not to throw an error.  The trick is to
have a routing table entry that will provoke arp.

What command do you run on FreeBSD, and what does the routing table look
like?

I suggest running 'route -n monitor' while doing all of this, to watch
the routing socket.

--
Peter Kieser <peter%kieser.ca@localhost> / 604.338.9294


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Home | Main Index | Thread Index | Old Index