Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Nov 2004 21:08:50 +0300
From:      Vladimir Grebenschikov <vova@fbsd.ru>
To:        =?iso-8859-2?Q?S=B3awek_=AFak?= <zaks@prioris.mini.pw.edu.pl>
Cc:        freebsd-net <net@freebsd.org>
Subject:   Re: route add -host ... -iface issues
Message-ID:  <1100542130.935.39.camel@localhost>
In-Reply-To: <20041115172826.3E28911445@localhost>
References:  <20041115172826.3E28911445@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
=D0=92 =D0=BF=D0=BD, 15/11/2004 =D0=B2 18:28 +0100, S=C5=82awek =C5=BBak =
=D0=BF=D0=B8=D1=88=D0=B5=D1=82:
> Hi,
>=20
>     I'd like to ask why a static arp entry is added when direct route to =
host is
>     added like this?
>=20
>     route add -host target -iface interface
>=20
>     The route(8) manpage says, that such route entry is for hosts directl=
y
>     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 int=
erface,
>     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=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=3D8<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.=20

> /S   =20

--=20
Vladimir B. Grebenchikov
vova@fbsd.ru



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1100542130.935.39.camel>