Say I have two network interfaces, eth1 and eth2, both of them connected to a different ISP.

How can I instruct linux to use eth1 for all traffic to the IP while eth2 is used for all other traffic?

Thank you!

1 Answer 1


Set the default route to the next hop on eth2 and a separate route for Let's assume that is the next hop for eth1 then the command would be:

ip route add via

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .