0

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 111.222.111.222 while eth2 is used for all other traffic?

Thank you!

1 Answer 1

2

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

ip route add 111.222.111.222/32 via 1.2.3.4

You must log in to answer this question.

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