Can't create proxy-arp entries for subnet
Matthew Hudson
fbsd at synoptic.org
Wed Aug 2 23:07:34 UTC 2006
Hello everybody,
I believe I may have stumbled across a bug in the arp program and
the reproduction is simple (and should be easy to verify) so I'll
just jump to the point.
This is on 6.1-RELEASE-p3 i386
I discovered this while trying to create proxy-arp entries for a
subnet of a network I was directly connected to. The smaller subnet
is forwarded over a tun interface.
Basically, the network plugged into fxp0 is 2.2.2.0/24 however
there's a small subnet (2.2.2.8/30) that lives on the other side
of the tun2 interface and I want to proxy arp for it so other hosts
on the wire can reach it without static routes.
Basic repro instructions:
# dd if=/dev/zero of=/dev/tun count=0 ## create new tun interface
# ifconfig tun2 1.1.1.1 1.1.1.2
# ifconfig fxp0 2.2.2.1/24
# route add 2.2.2.8/30 1.1.1.2
add net 2.2.2.8: gateway 1.1.1.2
# arp -s 2.2.2.9 auto pub
using interface fxp0 for proxy with address 00:90:27:a5:cd:33
cannot intuit interface index and type for 2.2.2.9
The "cannot intuit interace index and type" is the failure.
The workaround is to add the static arp entries before you add the
subnet route, however it seems like this is still a bug. Can
anyone else verify that this shouldn't be?
Here's a more detailed log of the reproduction along with comments.
Comments are preceded by ']]'
---- script(1) start ----
# netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.48.254 UGS 0 3066 em0
127.0.0.1 127.0.0.1 UH 0 0 lo0
192.168.48 link#2 UC 0 0 em0
Internet6:
Destination Gateway Flags Netif Expire
::1 ::1 UH lo0
ff01:4::/32 ::1 UC lo0
ff02::%lo0/32 ::1 UC lo0
]] simple enough. Note that fxp0 is completely unconfigured.
]] The network on em0 should be entirely unrelated here but is shown
]] to illustrate 'nothing up my sleeve'
# ifconfig -a
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
ether 00:90:27:a5:cd:33
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=b<RXCSUM,TXCSUM,VLAN_MTU>
inet 192.168.48.154 netmask 0xffffff00 broadcast 192.168.48.255
ether 00:08:74:38:3f:ef
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
tun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
]] Again, we see fxp0 is unconfigured. tun2 is unconfigured as well.
# ifconfig tun2 1.1.1.1 1.1.1.2
# ifconfig fxp0 2.2.2.1/24
# route add 2.2.2.8/30 1.1.1.2
add net 2.2.2.8: gateway 1.1.1.2
]] We configure an address on tun2, fxp0, and set up the /30 subnet to
]] route over tun2.
# arp -s 2.2.2.9 auto pub
using interface fxp0 for proxy with address 00:90:27:a5:cd:33
cannot intuit interface index and type for 2.2.2.9
]] Here's the problem.
]] "cannot intuit interface index and type for 2.2.2.9"
# route delete 2.2.2.8/30
delete net 2.2.2.8
# arp -s 2.2.2.9 auto pub
using interface fxp0 for proxy with address 00:90:27:a5:cd:33
]] However if we delete the route, we can add the proxy arp no problem.
# route add 2.2.2.8/30 1.1.1.2
add net 2.2.2.8: gateway 1.1.1.2
]] We can even add the route *back* once the proxy arp is created.
# arp -d 2.2.2.9
2.2.2.9 (2.2.2.9) deleted
# arp -s 2.2.2.9 auto pub
using interface fxp0 for proxy with address 00:90:27:a5:cd:33
cannot intuit interface index and type for 2.2.2.9
]] However if we try to delete the proxy arp and then re-create it, no dice.
]] note the broken-symmetry.
---- script(1) end ----
Cheers,
Matthew
More information about the freebsd-net
mailing list