From owner-freebsd-questions Tue Mar 14 00:44:52 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id AAA03785 for questions-outgoing; Tue, 14 Mar 1995 00:44:52 -0800 Received: from mail.euronet.nl (mail.euronet.nl [193.67.112.150]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id AAA03779 for ; Tue, 14 Mar 1995 00:44:50 -0800 Received: from p54.euronet.nl (p54.euronet.nl [193.67.112.214]) by mail.euronet.nl (8.6.4.1/A/UX 3.1) with SMTP id JAA03075 for ; Tue, 14 Mar 1995 09:44:41 +0100 Date: Tue, 14 Mar 1995 09:44:41 +0100 Message-Id: <199503140844.JAA03075@mail.euronet.nl> X-Sender: jg@mail.euronet.nl Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: questions@FreeBSD.org From: jg@euronet.nl (Jan_Guldemond) Subject: Routing and Ethernet X-Mailer: Sender: questions-owner@FreeBSD.org Precedence: bulk Hi all, I'm having a bit of a problem setting up a FreeBSD-machine to connect two LAN's. The situation is as follows: |-------| |-------| |-------| |Pentium| | DX2-66| | DX2-66| (10 machines) | 66 | | | | | |-------| |-------| |-------| | | | | \--------------/ \--------------/ ethernet ethernet So the middle machine has TWO ethernet-cards to connect the two networks. The most left network is a very small network with only one server, but there will be more machines on that LAN in the near future. The most right LAN is our own office LAN where the normal working stations are. The problem is in the gateway: I have two NE2000 Plus - Eagle cards: ed0: addr.0x280, irq 10 ed1: addr.0x300, irq 11 Every time I boot FreeBSD I have to start with /kernel -c and type: irq ed0 10 irq ed1 11 to set up the ethernet cards. I would have to rebuild the kernel to get these setting permanent. Is there any FAQ or something about rebuilding the kernel?? But the real problem is as follows: I type ifconfig ed0 up ifconfig ed0 193.78.175.2 ifconfig ed1 up ifconfig ed1 193.78.175.3 I get: "ifconfig: ioctl (STOPCAIFADDR): File exists" So something went wrong configuring the second ethernet adapter. But I trief "ifconfig -a", and got: ed0: flags=8863 mtu 1500 inet 193.78.175.2 netmask 0xffffff00 broadcast 193.78.175.255 ether 00:00:1b:4f:b9:38 ed1: flags=8863 mtu 1500 inet 193.78.175.3 netmask 0xffffff00 broadcast 193.78.175.255 ether 00:00:1b:4f:bd:fc lp0: flags=810 mtu 1500 lo0: flags=8009 mtu 65532 inet 127.0.0.1 netmask 0xff000000 sl0: flags=c010 mtu 552 sl1: flags=c010 mtu 552 So it seems like both ethernet cards are configured. When I look at the routing ("netstat -rn"), I get: Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 193.78.175.1 8:0:0:19:67:32 UHLW 0 1430 ed0 195 193.78.175.2 0:0:1b:4f:b9:38 UHLW 1 8 lo0 224 link#1 UCS 0 0 ed0 -1005 There is no route to all the working stations (193.78.175.0), so I try to add this route ("route add 193.78.175.0 193.78.175.3"). After this when I look at the routing table: Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 193.78.175 193.78.175.3 UGSc 0 0 ed0 193.78.175.1 8:0:0:19:67:32 UHLW 0 1442 ed0 182 193.78.175.2 0:0:1b:4f:b9:38 UHLW 1 8 lo0 224 link#1 UCS 0 0 ed0 -1018 As you can see the route to 193.78.175.0 goes via 193.78.175.3, but the interface is ed0 and not ed1!!! So I deleted the route and tried to add the route with a specific interface ("route add -interface ed1 193.78.175.0 193.78.175.3"), but the systems hangs for a while and then: "ed1: bad value" So it seems like ed1 is not configured. Also because it is not added to the route table with the ethernet-address like ed0 is. When I try to ping the Pentium (193.78.175.1) it works and the Pentium can ping the gateway. But when one of the workstations on the second LAN tries to contact the gateway, the gateway just reboots!!!! Does anyone know why ed1 was not configured correct and how I can rebuild the kernel with the right settings (irq's)??? Thanks!