# Multiple NIC Question

## Insanity5902

I will start off by saying I tried searching for the solution as I am sure it has been answered, but I am not quite sure as to what I hsould be searching for.

I am multiple nics in a webserver, all of which have multiple ip's.  Every IP on all the nics are on the same subnet.  

Ex.

```

eth0 - > 10.0.0.2; 10.0.0.20

eth1 - > 10.0.0.2; 10.0.0.31; 10.0.0.32

eth2 - > 10.0.0.4; 10.0.0.41; 10.0.0.42; 10.0.0.43

broadcast for all = 255.255.255.128

default gw 10.0.0.1

```

right now , no matter which which address you connect to, the connection is eventually moved over to eth0 for both sending and recieving.

How can I limit it so that when I request comes in for 10.0.0.31 it will go through eth1 and then go back out eth1 and continue doing this.

/* edit:

I know this has to be done with ip routing, I just can't find anything on it

*/

----------

## Telamon

I think what you are looking for is called "policy based routing."  Emerge sys-apps/iproute2 and then run "ip route help" or "man ip"  Also, check out section 4.2 of the Linux Advanced Routing and Traffic Control FAQ at http://ds9a.nl/2.4Networking/

----------

## Insanity5902

I have iproute2, and just started reading through the ip route help.  I just had no idea what it was called, so searching the web and forums was turning up nothing  :Razz:  thanks

----------

