[plug] Separate networks on switch

Craig Ringer craig at postnewspapers.com.au
Mon Jun 6 21:28:06 WST 2005


On Mon, 2005-06-06 at 21:14 +0800, J Michael Gilks wrote:
> Just a quick question.
> I have 2 networks at home, eg 192.168.200.* and 192.168.201.*
> If I connect hosts from both networks to a switch will they still be able to 
> communicate.

Not directly, without additional configuration. You *can* add static
routes to the hosts to tell them about the other network. On Linux, for
a member of the 192.168.200.x network, you could:

$ ip route add 192.168.201.0/24 dev eth0

or in bernard-ish:

# ip r a 192.168.201.0/24 dev eth0

It's also possible, IIRC, for a DHCP server to tell a host to add static
routes. I don't know which DHCP clients / OSs actually obey this,
though.

Other than this, you'll need a router. You could nominate one of your
hosts to route between the two networks (yes, even though they're on the
same switch) - perhaps whatever's handing out the DHCP leases?

-- 
Craig Ringer




More information about the plug mailing list