*BSD News Article 93651


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!news.nacamar.de!newsfeed.nacamar.de!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: My routing table...how bad is it?
Date: 14 Apr 1997 21:12:34 GMT
Organization: Private BSD site, Dresden
Lines: 82
Message-ID: <5iu6k2$26m@uriah.heep.sax.de>
References: <Pine.A32.3.91.970413223313.18259A-100000-100000@pheebs.citytel.net>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:39143


"Keith W." <kwoody@pheebs.citytel.net> wrote:

> Destination        Gateway            Flags     Refs     Use     Netif Expire
> default            204.244.99.76      UGc         0        0      tun0
> 204.244.99.76      204.244.99.124     UH          1        0      tun0

> Here is the output from netstat -rn on my system. I am having a hard time
> getting the route correct as the ppp wants to pull the ip of the router I
> dial into as the gateway when its not. The gateway is 204.244.99.65. the
> router is 204.244.99.76 (there are two more at 74 adn 75 also) and in this
> example 204.244.99.124 was dynamically assigned.
> Are the last two ip's in the right place? should they not be reversed?
> 124 the destination and .76 the gateway?

I think they are correct, but i don't really understand your problem.
Maybe you should also post the output of ``ifconfig tun0'' here.  If
it looks like:

tun0: flags=xxx<UP,RUNNING,POINTOPOINT,MULTICAST> mtu 1500
	inet 204.244.99.124 <-> 204.244.99.76 netmask <any value>

it's okay.

> How do I make it so that the router (there are three of them I can dial
> into) is not recognized as paart of the route?

It must be, always.


   +---------------+		           +------------+
   |    	   |		           |            |
   |   your        |204.244.99.124         |  router    |
   |   box         |-----------------------|            |--~~~~>
   |               |	      204.244.99.76|            |    Internet
   |               |	  		   |    	|
   |               |	  		   +------------+
   +---------------+
	| 10.0.0.1
	|
     ------- your ethernet

So if you sit in `your box', and look towards `Internet', what's the
next interface outside?  204.244.99.76.  That's why this one must
become your default gateway.  Your local address doesn't come into the
game at all, it only serves two purposes: it will be put into the
header of all packets that go out the PPP line, and it serves the
`router' as a label to distinguish your end of the wire from the other
machines that are also connected to it at the same time.

Now, if you look down to your ethernet wire, and wanna route something
there, you gotta send it to a 10.x.x.x address, and it will go out
your 10.0.0.1 interface.

If you sit on machine 10.0.0.2 on your ether, and let's assume for a
moment the 10.x.x.x network were routed from the Internet, then the
picture would be a little different.  If you look towards the Internet
from that perspective, the next IP address (next hop) you're seeing
were 10.0.0.1, thus you need to add this one as the default gateway.
Once the packets arrive at this interface, `your box' will notice that
they aren't destined for itself, and will pass them on to
204.244.99.76 (since the default route is the only applicable route
for the destination address).

> And where can I get more info ont he flags?

From the man page, but on FreeBSD, not on AIX. :)  (AIX's man page
describes AIX's netstat program.)

> What should a proper route table look like for a machine dialed out via
> ppp with either a dynamcially assied ip or a staic one. (I can have both)

Both routing tables are basically identical.  The only advantage a
static address has is that you can make other systems halfways rely on
this address belonging to your machine when they see an arriving
packet.  The routing itself is identical.

--
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)