From owner-freebsd-net@FreeBSD.ORG Mon Nov 15 18:08:52 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 990DF16A4CE; Mon, 15 Nov 2004 18:08:52 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4463243D4C; Mon, 15 Nov 2004 18:08:52 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.43 (FreeBSD)) id 1CTlHW-000LC7-Rd; Mon, 15 Nov 2004 21:08:50 +0300 From: Vladimir Grebenschikov To: =?iso-8859-2?Q?S=B3awek_=AFak?= In-Reply-To: <20041115172826.3E28911445@localhost> References: <20041115172826.3E28911445@localhost> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Mon, 15 Nov 2004 21:08:50 +0300 Message-Id: <1100542130.935.39.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: "current@freebsd.org" cc: freebsd-net Subject: Re: route add -host ... -iface issues X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2004 18:08:52 -0000 =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 mtu 1500 options=3D8 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