1

This question already has an answer here:

I have my laptop connected to an internal network on eth0 and an external network on wlan0.

How can I configure my routes to forwarded all traffic for 10.1.1.1 out of eth0, and everything else out of wlan0?

marked as duplicate by Christopher, PersianGulf, mdpc, sam, roaima Jul 21 '16 at 18:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

I think this will work:

ip route add 10.1.1.1/32 dev eth0

So when you ping 10.1.1.1 it will route via eth0.

  • Yes, this will work if wlan0 is the default gateway of the laptop – DarkVex Jul 21 '16 at 15:04

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