Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Sep 1998 19:29:17 +0930
From:      Greg Lehey <grog@lemis.com>
To:        "fook-sheng.chan" <fook-sheng.chan@capgemini.com.sg>, freebsd-questions@FreeBSD.ORG
Subject:   Re: how to configure two 3c509
Message-ID:  <19980928192917.A26793@freebie.lemis.com>
In-Reply-To: <360F52E3.ACE76A1B@capgemini.com.sg>; from fook-sheng.chan on Mon, Sep 28, 1998 at 05:12:07PM %2B0800
References:  <360F52E3.ACE76A1B@capgemini.com.sg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 28 September 1998 at 17:12:07 +0800, fook-sheng.chan wrote:
> Hi
>
> i would like to make my freebsd to be a router, using 2 nics(3c509), it
> did recognise the 2 nic, but i don't know how to configure them, using
> /stand/sysinstall i can only see ep0. can anyone tell me how to
> configure the ip for the second nic?(i have already configured the ip
> for the first nic)

/stand/sysinstall was never intended to be the complete system
administration utility.  The one you need for setting up Ethernet
boards is ifconfig.  Try this:

# ifconfig -a
lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
ep0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet 192.109.197.160 netmask 0xffffff00 broadcast 192.109.197.255
        ether 00:a0:24:37:0c:bd 
ep1: flags=8800<SIMPLEX,MULTICAST> mtu 1500
tun0: flags=8150<POINTOPOINT,RUNNING,PROMISC,MULTICAST> mtu 1518
        inet 192.109.197.137 --> 192.109.197.211 netmask 0xffffff00 
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
        inet 139.130.136.133 --> 139.130.136.129 netmask 0xffff0000 
ppp1: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000 

Here you see that ep1 has not been configured.  You can configure it
with, say, 

  # ifconfig ep1 <IP address>

See the man page for other parameters.  These are what you put in the
variables ifconfig_ep0 and ifconfig_ep1 in /etc/rc.conf.  For example,
I have the following (because I keep changing boards):

# Choose one
ifconfig_ep0="inet 192.109.197.137 netmask 255.255.255.0"
ifconfig_ed1="inet 192.109.197.137 netmask 255.255.255.0"
ifconfig_ed2="inet 192.109.197.137 netmask 255.255.255.0"

> is it the correct way to have 2 default gateways by editing
> defaultrouter="10.0.0.1 10.0.0.2" in /etc/rc.conf?

No.  There is no correct way to have two default gateways.  In
addition, 10.0.0.1 and 10.0.0.2 are non-routable addresses.  If you
really do have two connections to the net, you're going to have to
think carefully about what traffic you want to go over what gateway.

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



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