Netdev List
 help / color / mirror / Atom feed
* ip route with duplicate ip addresses on two different interfaces
@ 2010-05-31 22:26 Alfred Monticello
  0 siblings, 0 replies; only message in thread
From: Alfred Monticello @ 2010-05-31 22:26 UTC (permalink / raw)
  To: netdev

eth0 is 192.168.1.15 which is also part of my default network, with 192.168.1.1  being my default route. this works fine.

ppp0 is an outside provider, that sometimes gives me the same IP as what I have on eth0. sometimes I get a different IP for ppp0, but is still within the same subnet as eth0.

when adding the following rule, to try and make any packets seen from 192.168.1.15 on dev ppp0, it still routes out through eth0:

ip rule add from 192.168.1.15 dev ppp0 table ppp0 pref 100
ip route add default via 192.168.1.15 dev ppp0 table ppp0

what am I doing wrong that it won't let me route packets out through dev ppp0 with the same IP as eth0 or an IP within the same subnet as eth0? I suppose the easy answer is to change my default network on eth0, which does work with the following rules, as long as it doesn't match what is on eth0:

ip rule add from 192.168.1.15 table ppp0 pref 100
ip route add default via 192.168.1.15 dev ppp0 table ppp0

...but as soon as I add: 
 
     ip rule add from 192.168.1.15 dev ppp0 table ppp0 pref 100
     ip route add default via 192.168.1.15 dev ppp0 table ppp0

it will not route properly. I've tried using 192.168.1.15/32, 192.168.1.0/24 but not having any luck.

Thanks in advance.


      

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-31 22:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-31 22:26 ip route with duplicate ip addresses on two different interfaces Alfred Monticello

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox