From owner-freebsd-questions  Wed Jan  7 16:03:50 1998
Return-Path: <owner-freebsd-questions>
Received: (from root@localhost)
          by hub.freebsd.org (8.8.7/8.8.7) id QAA27178
          for questions-outgoing; Wed, 7 Jan 1998 16:03:50 -0800 (PST)
          (envelope-from owner-freebsd-questions)
Received: from freebie.brann.org (doorman.brann.org [166.84.191.154])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA27162
          for <freebsd-questions@freebsd.org>; Wed, 7 Jan 1998 16:03:33 -0800 (PST)
          (envelope-from jbrann@freebie.brann.org)
Received: (from jbrann@localhost)
	by freebie.brann.org (8.8.8/8.8.7) id TAA10757;
	Wed, 7 Jan 1998 19:03:17 -0500 (EST)
	(envelope-from jbrann)
From: John Brann <jbrann@brann.org>
Message-Id: <199801080003.TAA10757@freebie.brann.org>
Subject: Re: GATEWAY???
In-Reply-To: <34B41053.3D09@internetmci.com> from Robert at "Jan 7, 98 05:31:31 pm"
To: mhi@internetmci.com (Robert)
Date: Wed, 7 Jan 1998 19:03:16 -0500 (EST)
Cc: freebsd-questions@freebsd.org
Organisation: Not while I'm at home
X-Mailer: ELM [version 2.4ME+ PL32 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: owner-freebsd-questions@freebsd.org
X-Loop: FreeBSD.org
Precedence: bulk

Robert wrote...
> how do I define a gateway on freeBSD??
> I just got an ISDN line and I need to make the router the gateway for
> the bsd box.
> 
> help!!
> thanks 
> Robert
> 

Whoa, slow down!

So you got an ISDN line, good for you.  You mention a router.  On the 
assumption that this is some device which talks to the ISDN line and an
ethernet (I have a Netopia, myself), then the command you need is:

add route default <hostname or IP address of router>
(as root, of course).

Just for good measure, you should modify rc.conf (on recent releases) or
/etc/sysconfig (on older ones) to indicate that you want a default route
and what it is.  The line for /etc/rc.conf is:

defaultrouter="<IP address of router>"    # Set to default gateway (or NO).

In this case, make sure you use the address.  This will make sure you get the
route back on a reboot.

Once you think its ready, do a 'netstat -nr' and you should see output of 
this form:

Destination        Gateway            Flags     Refs     Use     Netif Expire
default            10.0.0.1           UGSc       10        0       ed0
...

(Your Gateway IP address will be the one you specified, of course)

Of course, if you don't really have a router, then the story is quite 
different :-)


John



-- 
Prohibit work, prohibit pay - people are dying!  
			Situationist International slogan

finger jbrann@doorman.brann.org for pgp public key