Netdev List
 help / color / mirror / Atom feed
From: Alfred Monticello <ajmcello@yahoo.com>
To: netdev@vger.kernel.org
Subject: ip route with duplicate ip addresses on two different interfaces
Date: Mon, 31 May 2010 15:26:14 -0700 (PDT)	[thread overview]
Message-ID: <341685.37969.qm@web58302.mail.re3.yahoo.com> (raw)

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.


      

                 reply	other threads:[~2010-05-31 22:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=341685.37969.qm@web58302.mail.re3.yahoo.com \
    --to=ajmcello@yahoo.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox