Subject: Re: NetBSD as level 3 switch / routing?
To: Daniel Eggert <danieleggert@mac.com>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 02/02/2003 12:55:30
On Sun, Feb 02, 2003 at 01:01:31PM +0100, Daniel Eggert wrote:
> Maybe I got it all wrong, but...
> 
> On my gateway NetBSD box I have 3 NICs. One (sip0) is the uplink.
> 
> I want the other two (sip1 & sip2), to have the same ip (192.168.0.1) 
> and each to connect to a separate switch. All clients on these two 
> networks should see each other. Is this possible?

Short answer no, not like that.
You need to use two different subnets for the two networks,
eg 192.168.0.x and 192.168.1.x and ensure that the netmask on all
the systems is set to 255.255.255.0.

The gatway box has to have an address in both subnets.
However it doesn't matter which of its addresses the clients
use.

> When I set
> 	sysctl -w net.inet.ip.forwarding=1
> will NetBSD automatically forward packets from the sip1 net to sip2 if 
> a client on sip1 sends ip packets to a client on sip2? (Which is 
> sometimes misleadingly called level 3 switching)

Not misleading, level 1 = hardware, level 2 = MAC (ie bridge),
level 3 = network (IP in this case), level 4 = transport (TCP or
UDP here).

	David

-- 
David Laight: david@l8s.co.uk