Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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 10.60.0.1 dev em1 
10.20.0.0/16 via 10.60.0.165 dev em2
10.60.0.0/16 dev em1  proto kernel  scope link  src 10.60.1.150 
10.60.0.0/16 dev em2  proto kernel  scope link  src 10.60.1.151 
127.0.0.0/8 dev lo  scope link 

I read this like following:

Let's say the destination is inside the network 10.20.0.0/16, 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

 
discard

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.