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

How can I determine the path traffic takes from a server with 2 Ethernet ports, each port connecting to a separate switch.

The switches are not cable of layer3 so I cannot use HSPR where I could make the one switch the default gateway.

Is there a layer two solution I can Implement?

share|improve this question
up vote 1 down vote accepted

Each server decides based on it's own routing table which interface to use when connecting out. Unless you use some special features like bonding, you should get useful output by entering sudo ip route show.

For example in my case the output looks like this:

root@mr-burns:~ ssh# ip route show
default via dev em1 via dev em2 dev em1  proto kernel  scope link  src dev em2  proto kernel  scope link  src dev lo  scope link 

I read this like following:

Let's say the destination is inside the network, it will use the interface em2 because of the second rule.

But if the destination is using the default gw because its not in any of the listed destination networks, it uses em1.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.