From owner-freebsd-net Mon Jul 2 2:50: 5 2001 Delivered-To: freebsd-net@freebsd.org Received: from shadow.otel.net (JuDiCaToR.OTEL.net [212.36.9.113]) by hub.freebsd.org (Postfix) with ESMTP id 7AA4237B407; Mon, 2 Jul 2001 02:49:50 -0700 (PDT) (envelope-from tbyte@tbyte.org) Received: from localhost (localhost [127.0.0.1]) by shadow.otel.net (8.11.4/8.11.1) with ESMTP id f629niK08434; Mon, 2 Jul 2001 12:49:46 +0300 (EEST) (envelope-from tbyte@tbyte.org) Date: Mon, 2 Jul 2001 12:49:44 +0300 (EEST) From: Iasen Kostoff X-Sender: tbyte@shadow.otel.net To: Ruslan Ermilov Cc: Wes Peters , net@FreeBSD.ORG Subject: Re: Indirect route with also indirect gateway (was: Re: fastforwarding?) In-Reply-To: <20010702115129.A67459@sunbay.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, 2 Jul 2001, Ruslan Ermilov wrote: > On Sun, Jul 01, 2001 at 03:15:56PM -0600, Wes Peters wrote: > > Ruslan Ermilov wrote: > > > > > > BTW, Wes, I'm still waiting for a working example of an indirect route > > > with also indirect gateway. > > > > Any indirect route via the opposite end of a point-to-point connection. > > Right? > > > You probably meant that the gateway is accessible via the opposite end. > > But the gateway value on a P2P link is a no-op. Whatever gateway you > specify, the actual gateway is always the "opposite end". Here, the > gateway only helps the routing code to select the right interface. > I.e., on a 1.1.1.1 -> 2.2.2.2 configured tun0 interface, the following > two commands are equivalent: > > route add -net 10 2.2.2.2 > route add -net 10 -iface tun0 > > Funny though that you're giving this example, as it only works starting > with revision 1.62 (from June 4, 2001) of sys/net/route.c. Before this, > routing code incorrectly set up the interface based on destination, not > the gateway: > > # ifconfig tun0 > tun0: flags=8051 mtu 1500 > inet 1.1.1.1 --> 2.2.2.2 netmask 0xff000000 > > # netstat -rn > Routing tables > > Internet: > Destination Gateway Flags Refs Use Netif Expire > default 192.168.4.65 UGSc 1 0 rl0 > 2.2.2.2 1.1.1.1 UH 0 0 tun0 > 3.3.3.3 tun0 UHS 1 0 tun0 > 127.0.0.1 127.0.0.1 UH 1 6 lo0 > 192.168.4 link#1 UC 3 0 rl0 => > 192.168.4.65 0:d0:b7:16:9c:c6 UHLW 2 1576 rl0 899 > 192.168.4.115 0:c0:df:3:2d:79 UHLW 2 2 lo0 > > # route add -net 10 3.3.3.3 > add net 10: gateway 3.3.3.3 > > # netstat -rn | grep 3.3.3.3 > 3.3.3.3 tun0 UHS 1 0 tun0 > 10 3.3.3.3 UGSc 0 0 rl0 > ^^^^ oops > > I still think we should disallow such routes on non-P2P interfaces, at > least. What do you think? > > > > Cheers, > -- > Ruslan Ermilov Oracle Developer/DBA, > ru@sunbay.com Sunbay Software AG, > ru@FreeBSD.org FreeBSD committer, > +380.652.512.251 Simferopol, Ukraine > > http://www.FreeBSD.org The Power To Serve > http://www.oracle.com Enabling The Information Age > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > If you speek about disallowing routes like : route add -net 10 3.3.3.3 I don't think we should. I'm using such routes now (ethernet bridges for leased lines) and don't want to loose this functionality. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message