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



Christos Zoulas wrote:
In article <521630F2.6030905%kieser.ca@localhost>, Peter Kieser  
<peter%kieser.ca@localhost> wrote:
-=-=-=-=-=-

Hello,

I have an ISP that requires that I use a subnet mask of 255.255.255.255 (/32) which requires that I add a static interface route for the gateway IP address because it's on a different subnet (http://help.ovh.ie/BridgeClient.) In Linux and FreeBSD this works as intended, and the network stack sends an ARP request for the gateway IP address when a static route is added.

On NetBSD, the network stack seems to make up a random MAC address and I don't see an ARP who-has request sent. Below, you can see that the MAC address of the gateway (198.50.219.62) is correct when the subnet is set to /27:

watson# arp -a
? (198.50.219.62) at 52:54:00:07:a6:f6 on vioif0
watson# ifconfig vioif0
vioif0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    address: 52:54:00:24:c2:c3
    inet 198.50.219.49 netmask 0xffffffe0 broadcast 198.50.219.63
    inet6 fe80::5054:ff:fe24:c2c3%vioif0 prefixlen 64 scopeid 0x1

If I set the subnet and broadcast domain how my ISP wants it, and follow http://www.netbsd.org/docs/network/#nonsubnetgateway the MAC address is replaced with garbage data:

watson# ifconfig vioif0 inet 198.50.219.49 netmask 255.255.255.255 broadcast 198.50.219.49
watson# route add -host 198.50.219.62 -link -iface vioif0
add host 198.50.219.62: gateway vioif0
watson# ping 198.50.219.62
PING 198.50.219.62 (198.50.219.62): 48 data bytes
^C
----198.50.219.62 PING Statistics----
3 packets transmitted, 0 packets received, 100.0% packet loss
watson# arp -a
? (198.50.219.62) at 76:69:6f:69:66:30:00:0e:00:00:00:00 on vioif0 permanent

Now, if I add the MAC address of the gateway (which isn't a reasonable solution, since my ISP has HRSP and other failovers setup) everything works out:

watson# route add -host 198.50.219.62 -link -iface vioif0:52540007a6f6

Does anyone have any idea how to get this configuration to work without the MAC address of the gateway being specified for the route? I feel like this is a bug, as with Linux and FreeBSD this configuration (while I believe it's not particular sane) works just fine, the operating system does an ARP who-has request and you can access the default gateway.

Looks like a bug :-) What is the correct MAC for the gateway?

Christos is right. The problem with a netmask of 255.255.255.255 reminds me
of getting a 3G/4G USB modem to work because that was how the telco was
answering the conversation.

And looking at how you went about getting it to work does not seem right.

In this case the vioif is not a broadcast link (subnet mask is 255.255.255.255 so quite clearly nothing else can be on that subnet), it is a point to point link.

Did you try doing this:

# ifconfig vioif0 inet 198.50.219.49 198.50.219.62

?

Cheers,
Darren



Home | Main Index | Thread Index | Old Index