From owner-freebsd-questions Mon Sep 28 03:00:28 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA11410 for freebsd-questions-outgoing; Mon, 28 Sep 1998 03:00:28 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA11359 for ; Mon, 28 Sep 1998 03:00:12 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id TAA08533; Mon, 28 Sep 1998 19:29:27 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id TAA14058; Mon, 28 Sep 1998 19:29:18 +0930 (CST) Message-ID: <19980928192917.A26793@freebie.lemis.com> Date: Mon, 28 Sep 1998 19:29:17 +0930 From: Greg Lehey To: "fook-sheng.chan" , freebsd-questions@FreeBSD.ORG Subject: Re: how to configure two 3c509 References: <360F52E3.ACE76A1B@capgemini.com.sg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <360F52E3.ACE76A1B@capgemini.com.sg>; from fook-sheng.chan on Mon, Sep 28, 1998 at 05:12:07PM +0800 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 mtu 1500 ep0: flags=8843 mtu 1500 inet 192.109.197.160 netmask 0xffffff00 broadcast 192.109.197.255 ether 00:a0:24:37:0c:bd ep1: flags=8800 mtu 1500 tun0: flags=8150 mtu 1518 inet 192.109.197.137 --> 192.109.197.211 netmask 0xffffff00 sl0: flags=c010 mtu 552 ppp0: flags=8051 mtu 1500 inet 139.130.136.133 --> 139.130.136.129 netmask 0xffff0000 ppp1: flags=8010 mtu 1500 lo0: flags=8049 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 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