From owner-freebsd-questions Mon Sep 28 22:01:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA10425 for freebsd-questions-outgoing; Mon, 28 Sep 1998 22:01:47 -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 WAA10409 for ; Mon, 28 Sep 1998 22:01:38 -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 OAA11386; Tue, 29 Sep 1998 14:31:23 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id OAA11582; Tue, 29 Sep 1998 14:31:19 +0930 (CST) Message-ID: <19980929143119.L15172@freebie.lemis.com> Date: Tue, 29 Sep 1998 14:31:19 +0930 From: Greg Lehey To: "fook-sheng.chan" Cc: FreeBSD Questions Subject: Re: how to configure two 3c509 References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: ; from fook-sheng.chan on Tue, Sep 29, 1998 at 12:30:11PM +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 [Format autorecovered at freebie.lemis.com] On Tuesday, 29 September 1998 at 12:30:11 +0800, fook-sheng.chan wrote: >> On Monday, September 28, 1998 5:59 PM, Greg Lehey wrote: >> >> On Monday, 28 September 1998 at 17:12:07 +0800, fook-sheng.chan wrote: >>> >>> 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. > > Thanks for your reply. > > However I can't find ep1 after typing ifconfig -a, only ep0 shows up. Above, you said that both boards were detected. This looks very much like the second one hasn't been detected. > So I thooght it may due to them having the same IRQ and I/O addr, Definitely. That can never work. > so I configure the 2nd nic to irq 11 and i/o 310, but it is the > same. trying ifconfig ep1 I get "interface ep1 does not exist" You need to tell the system about the I/O configuration. The GENERIC kernel only supports one 3C509, so you'll have to add a line like this to your kernel config file: device ep1 at isa? port 0x310 net irq 11 vector epintr Then rebuild and install the kernel, and try again. 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