route add -host ... -iface issues
Vladimir Grebenschikov
vova at fbsd.ru
Mon Nov 15 10:08:52 PST 2004
В пн, 15/11/2004 в 18:28 +0100, Sławek Żak пишет:
> Hi,
>
> I'd like to ask why a static arp entry is added when direct route to host is
> added like this?
>
> route add -host target -iface interface
>
> The route(8) manpage says, that such route entry is for hosts directly
> reachable over interface. But when packets go out on this interface, the MAC
> address of target host in each packet is set to local MAC for the interface,
> which effectively stops the target host from receiving the packet.
But anyway, I have question to our routing gurus, why we need install
broken routes in case of ethernet interfaces ? Like:
# route add 172.1.1.1 -iface fxp0
add host 172.1.1.1: gateway fxp0
# netstat -rn | fgrep 172
172.1.1.1 08:00:46:c8:45:b3 UHLS 0 0 fxp0
# ifconfig fxp0 ether
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
ether 08:00:46:c8:45:b3
#
Installed routing entry is definitely broken, and can't be used,
probably /sbin/route should add cloning flag automatically when direct
route added for some ethernet (and like) interface ?
I guess it is common mistake.
Also, everyone going to add route-entry via specific MAC address will be
puzzled. I know it is possible, but just now I can't remember how, and
route(8) does not show any light on this question.
> /S
--
Vladimir B. Grebenchikov
vova at fbsd.ru
More information about the freebsd-net
mailing list