[NCLUG] Multiple nics same subnet

Bryan Stillwell bryan at bokeoa.com
Thu Mar 2 11:10:42 MST 2006


On Wed, Mar 01, 2006 at 04:26:22PM -0700, Chris Funk wrote:
>Anyway,  I thought I would give each server it's own path to one of the
>nics. So I setup  addresses  192.168.2.100 192.168.2.101, 192.168.2.102, and
>192.168.2.103.  I'm sure you know what is happening.  All the traffic get's
>sent back out the 192.168.2.100 nic.  I thought maybe shorewall and the
>routeback option would work but it didn't. 
>
>Anything I can do to make the traffic go back out the same interface it was
>received on?

You need to set up static routes to each of those IP addresses.

Try something like this:

   route add 192.168.2.100 netmask 255.255.255.255 dev eth0
   route add 192.168.2.101 netmask 255.255.255.255 dev eth1
   route add 192.168.2.102 netmask 255.255.255.255 dev eth2
   route add 192.168.2.103 netmask 255.255.255.255 dev eth3

If that doesn't work, look at 'man route'

Bryan



More information about the NCLUG mailing list