Subject: Two interfaces on same network
To: None <netbsd-help@netbsd.org>
From: Arto Huusko <arto.huusko@utu.fi>
List: netbsd-help
Date: 09/16/2001 10:23:50
So,

I have box which I'd like to make bridge. What I've been trying to do,
is to configure the two NICs on the machine to the same network and
then make a bridge between them.

This works quite nicely, meaning that the bridge does work. However,
the bridge box itself is useless now for anything else than bridging:
I can use either of the interfaces to access the network behind that
interface, but not both.

The configuration is like this (I'm building this at home, but it'll
go to real use later):

ne0: inet 10.0.0.5 netmask 255.255.255.0
ep0: inet 10.0.0.4 netmask 255.255.255.0

ne0 is connected to the internal LAN, ep0 is the way out.

Now, depending on which interface is configured first, I can access
that side of the LAN, and that side of the LAN can access the bridge
itself. But not at all from the otherside. But as I said, traffic
does go through.

Another strange thing that happens, when I boot up the box both
NICs get configured. And the above paragraph still holds true,
but additionally I can't access outside world at all from the
bridge. I have default route at 10.0.0.1 and can ping that, but
can't ping anything beyond that. If I start up with no interfaces
configured, and configure them hand by hand, I can access beyond
the default route. (Still, at all times the machines behind the
bridge can access everything (except the bridge)).

I've been playing around with this for a bit too long now. I assume
that I'd need to add some kind of routes to the other interface,
but I have no idea how to do this. I've tried "route add -interface"
but it didn't work (because I have no idea how it is supposed to
work [examples on man page would be nice]).

If someone could help, that'd be great. This is kind of urgent,
because I should get the box ready soon.

-- 
Arto Huusko (arto.huusko@utu.fi) | Diving Is Fun