Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I faced the following problem. There is server (Ubuntu 12.04) with two NIC that have IPs (eth0) in subnet and (eth1) in subnet. Now we have the following routing table on server:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface  *      U     0      0        0 eth1  *      U     0      0        0 eth0
default         UG    99     0        0 eth1
default         UG    100    0        0 eth0

I try to ping both server IPs from in subnet and can do it only for The other one reports "Request timed out". And if I try traceroute I can see that there is always one successful hop to the gateway ( and another one either succeeds (for or fails (for

As I understand all ICMP packets successfully get to the server but when trying to return as soon as return address is from subnet other than or the resulting route will be the one of defaults. And exactly the one with the lower metric: default UG 99 0 0 eth1. If I will swap metrics than only address will be reachable from host.

My question is if I can configure server in any way to allow both IPs reachable from my client host?

share|improve this question
Hop up to the search box in the corner, type in "policy based routing", and you will find all the answers you desire. Works great in google too :) – NickW Oct 29 '13 at 16:46
If you just feel like clicking a link: – NickW Oct 29 '13 at 16:47
Thanks, I think it will help – revenforv Oct 30 '13 at 8:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.