Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Mar 1995 09:44:41 +0100
From:      jg@euronet.nl (Jan_Guldemond)
To:        questions@FreeBSD.org
Subject:   Routing and Ethernet
Message-ID:  <199503140844.JAA03075@mail.euronet.nl>

Next in thread | Raw E-Mail | Index | Archive | Help
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<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 193.78.175.2 netmask 0xffffff00 broadcast 193.78.175.255
	ether 00:00:1b:4f:b9:38 
ed1: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 193.78.175.3 netmask 0xffffff00 broadcast 193.78.175.255
	ether 00:00:1b:4f:bd:fc 
lp0: flags=810<POINTOPOINT,SIMPLEX> mtu 1500
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 65532
	inet 127.0.0.1 netmask 0xff000000 
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST> 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!





Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?199503140844.JAA03075>