netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrea G Forte <andreaf@cs.columbia.edu>
To: "Martin A. Brown" <mabrown@securepipe.com>
Cc: Hasso Tepper <hasso@estpak.ee>,
	Henrik Nordstrom <hno@marasystems.com>,
	Harald Welte <laforge@gnumonks.org>,
	Neil Horman <nhorman@redhat.com>,
	linux-net@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: primary and secondary ip addresses
Date: Fri, 17 Dec 2004 15:54:32 -0500	[thread overview]
Message-ID: <41C34788.4070203@cs.columbia.edu> (raw)
In-Reply-To: <Pine.LNX.4.61.0412171206200.10943@gargoyle.wi.securepipe.com>

Martin A. Brown wrote:

>Hello Hasso and Andrea,
>
>We've gotten a little far afield from Neil Horman's initial question about 
>why there are primary and secondary IPs, and I can't address your concern 
>Andrea about the (route cache?) 500ms latency between the time that an 
>address is added (or removed) from an interface and the time that the 
>address is actually used.  Even so, the Linux routing code allows the 
>kernel to suggest an IP with the "src" keyword.
>
>  
>
I apologize if I moved the topic too far from its original scope.

> : > Why change the primary address? What is wrong with simply changing the
> : > route to use the other source IP?
> : 
> : There is no support for it in most of user space software.
> : None of the routing protocols suites support it etc.
>
>Though some software provides support for explicit configuration of source 
>address for initiated sockets, you can use INADDR_ANY and let the kernel 
>perform source address selection for you.  
>
>Linux select an IP based on the routing table. [0]  Example:
>
>  # ip route show 192.168.90.0/24
>  192.168.90.0/24 dev eth0  scope link  src 192.168.90.250
>  # ip route change 192.168.88.0/24 dev eth0 scope link src $SECONDARY
>
>If you want to be fancy about it, you can have a higher preference routing 
>table (make sure there's an entry in /etc/iproute2/rt_tables for 
>$SECONDARY_TABLE).  Then you can add and remove tables in this routing 
>table instead of changing the route in the main routing table.
>
>  # ip rule add prio table $SECONDARY_TABLE
>  # ip route add table $SECONDARY_TABLE $DESTNET dev $REALDEV src $SECONDARY
>
>  
>
I will give it a try and see if I get any improvement.
However, as last question (after this I will stop moving this topic 
further away from its original scope), do you guys know where I can find 
the code related to the routing cache in the kernel? I would like to see 
if there is a kind of timer for the update of such a cache.

Thank you again for all of your help.
Andrea


>Best of luck!
>
>-Martin
>
> [0] http://linux-ip.net/gl/ip-cref/node155.html
>
>  
>

  parent reply	other threads:[~2004-12-17 20:54 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <41912F7A.6000408@redhat.com>
     [not found] ` <Pine.LNX.4.61.0411100034320.10593@filer.marasystems.com>
2004-12-16  9:28   ` primary and secondary ip addresses Harald Welte
2004-12-16  9:53     ` Hasso Tepper
2004-12-16 10:07       ` Henrik Nordstrom
2004-12-16 11:02         ` Hasso Tepper
2004-12-16 16:02           ` Henrik Nordstrom
2004-12-17 15:10           ` Andrea G Forte
2004-12-17 15:27             ` Henrik Nordstrom
2004-12-17 15:58               ` Andrea G Forte
2004-12-17 16:39                 ` Henrik Nordstrom
2004-12-17 17:17                   ` Andrea G Forte
2004-12-17 19:17                     ` Henrik Nordstrom
2004-12-17 18:03                   ` Hasso Tepper
2004-12-17 18:37                     ` Martin A. Brown
2004-12-17 18:53                       ` Hasso Tepper
2004-12-17 19:25                         ` Henrik Nordstrom
2004-12-17 20:55                           ` Hasso Tepper
2004-12-17 20:54                       ` Andrea G Forte [this message]
2004-12-17 19:20                 ` David S. Miller
2004-12-17 19:48                   ` Henrik Nordstrom
2004-12-19 20:18                     ` jamal
2004-12-19 21:41                       ` Harald Welte
2004-12-19 22:02                         ` Thomas Graf
2004-12-19 22:59                           ` jamal
2004-12-19 23:56                             ` jamal
2004-12-20 13:55                               ` jamal
2004-12-20 14:29                                 ` Harald Welte
2005-04-12 10:54                                 ` Harald Welte
2005-05-08 12:31                                   ` Hasso Tepper
2005-05-26 18:11                                     ` Harald Welte
2005-05-26 18:21                                       ` Thomas Graf
2005-05-26 21:58                                       ` David S. Miller
2004-12-16 16:48     ` Paul Jakma

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=41C34788.4070203@cs.columbia.edu \
    --to=andreaf@cs.columbia.edu \
    --cc=hasso@estpak.ee \
    --cc=hno@marasystems.com \
    --cc=laforge@gnumonks.org \
    --cc=linux-net@vger.kernel.org \
    --cc=mabrown@securepipe.com \
    --cc=netdev@oss.sgi.com \
    --cc=nhorman@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).