From owner-freebsd-net Tue Jul 20 1:18:37 1999 Delivered-To: freebsd-net@freebsd.org Received: from btm4r4.alcatel.be (btm4r4.alcatel.be [195.207.101.110]) by hub.freebsd.org (Postfix) with ESMTP id 028B3151A4; Tue, 20 Jul 1999 01:18:09 -0700 (PDT) (envelope-from livensw@rc.bel.alcatel.be) Received: from btmq9s.rc.bel.alcatel.be (btmq9s.rc.bel.alcatel.be [138.203.65.182]) by btm4r4.alcatel.be (8.9.1a/8.9.1) with ESMTP id KAA06904; Tue, 20 Jul 1999 10:11:13 +0200 (MET DST) Received: from btmq9z.rc.bel.alcatel.be (btmq9z [138.203.65.192]) by btmq9s.rc.bel.alcatel.be (8.8.8+Sun/8.8.8) with ESMTP id KAA27078; Tue, 20 Jul 1999 10:13:28 +0200 (MET DST) Received: (from livensw@localhost) by btmq9z.rc.bel.alcatel.be (8.8.8+Sun/8.8.8) id KAA13057; Tue, 20 Jul 1999 10:10:57 +0200 (MET DST) Date: Tue, 20 Jul 1999 10:10:57 +0200 From: Wim Livens To: Wes Peters , freebsd-hackers@freebsd.org, freebsd-net@freebsd.org Subject: Re: bug in ip_forward() ? Message-ID: <19990720101057.D1676@rc.bel.alcatel.be> References: <19990719172546.C1676@rc.bel.alcatel.be> <37937846.55C1867E@softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i In-Reply-To: <37937846.55C1867E@softweyr.com>; from Wes Peters on Mon, Jul 19, 1999 at 01:11:02PM -0600 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, Jul 19, 1999 at 01:11:02PM -0600, Wes Peters wrote: > > +------+ +------+ +------+ +------+ > > | |4.2 4.1| |2.1 2.2| |5.1 5.2| | > > |btm22t|---------|btm22q|---------|btm22r|---------|btm22u| > > | | | | | | | | > > +------+ +------+ +------+ +------+ > > > > And this is what I do: > > > > btm22t# ping 192.168.5.2 > > ok, it works... > > btm22q# route delete -net 192.168.5.0 -netmask 255.255.255.252 192.168.2.2 > > ok, ping stops. > > btm22q# route add -net 192.168.5.0 -netmask 255.255.255.252 192.168.2.2 > > ping doesn't work > > And it shouldn't, you haven't given it an appropriate route. From route(8): > > The other commands have the following syntax: > > route [-n] command [-net | -host] destination gateway > > where destination is the destination host or network, gateway is the > next-hop intermediary via which packets should be routed. > > There's the important part right there: gateway is the *next-hop* intermediary > via which packets should be routed. Note that the ping is done from btm22t while the route is deleted/added on btm22q. (I've ommited the 192.168 prefix in the addresses in the figure). Now, I think I did specify a correct next-hop, namely 192.168.2.2, which is a local destination for btm22q. Thanks anyway, I should have been more clear. Wim. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message