Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Dec 1997 20:06:04 -0500
From:      Norman C Rice <nrice@emu.sourcee.com>
To:        Dean Hollister <dean@odyssey.apana.org.au>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Setting up routing to a router
Message-ID:  <19971208200604.07183@emu.sourcee.com>
In-Reply-To: <Pine.BSF.3.96.971208180855.12173A-100000@odyssey.apana.org.au>; from Dean Hollister on Mon, Dec 08, 1997 at 06:10:34PM %2B0800
References:  <Pine.BSF.3.96.971208180855.12173A-100000@odyssey.apana.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 08, 1997 at 06:10:34PM +0800, Dean Hollister wrote:
> 
> Hiyall,
> 
> We have a router, its ip is 203.11.114.5, which is connected to
> 203.11.114.1 via /dev/ed1. What is the exact syntax of the ifconfig
> command to setup its routing, I assume I have to add a default route for
> it in rc.local?
> 
> Regards,
> 
> d.
> 
> +-------------------------------------------------------+
> | Dean Hollister,           | dean@odyssey.apana.org.au |  
> | Perth, Western Australia. | deanh@iinet.net.au        |
> +-------------------------------------------------------+
> 

I assume you mean "ed1" not /dev/ed1 (there's no such thing). The file
that you want to edit is /etc/rc.conf (/etc/sysconfig on pre 2.2.2). 
The following assumes that you have a class C address; if not, change
the netmask entry.

network_interfaces="lo0 ed1" # List of network interfaces.
ifconfig_lo0="inet 127.0.0.1"   # default loopback device configuration.
ifconfig_ed1="inet 203.11.114.1  netmask 255.255.255.0"

### Network routing options: ### 
defaultrouter="203.11.114.5"       # Set to default gateway (or NO).

Reboot and a netstat "-rn" should show something similar to

Destination   Gateway            Flags     Refs     Use     Netif Expire
default       203.11.114.1       UGSc       33    33147       ed1
127.0.0.1     127.0.0.1          UH          0     1490       lo0
-- 
Regards,
Norman C. Rice, Jr.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971208200604.07183>