netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hemmo Nieminen <hemmo.nieminen@iki.fi>
To: netdev@vger.kernel.org
Subject: [RFC] Route lost when src address is removed.
Date: Fri, 21 Dec 2012 14:09:53 +0200	[thread overview]
Message-ID: <20121221120953.GC15934@fcku.lan> (raw)

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

Hi,

A route is lost to a subnet, even if it still has addresses
in that subnet.

In normal situations, it seems, a route's source address is the
same as the subnet's primary address and if it gets removed, the
route's source address is updated to be the new primary address.

If, however, the route's source address has been changed to some
other IP address than the primary address, the route is lost
when the source address is removed. This leaves us with IP
addresses in a subnet but no route to that subnet.

I encountered this and was not able to figure out whether this
behaviour is intentional or not? I would sort of expect the
route the be updated to have e.g. the primary address as the new
source address but perhaps not in all cases... What do you
think?

Attached below an example run that should also include all the
information needed to reproduce this.

-- 
Hemmo

[-- Attachment #2: route.log --]
[-- Type: text/plain, Size: 2209 bytes --]

[root@fcku ~]# ip a s eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:23:54:20:73:3e brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.105/24 brd 192.168.1.255 scope global eth0
    inet6 fe80::223:54ff:fe20:733e/64 scope link 
       valid_lft forever preferred_lft forever
[root@fcku ~]# ip a a 1.1.1.1/24 dev eth0
[root@fcku ~]# ip a a 1.1.1.2/24 dev eth0
[root@fcku ~]# ip a a 1.1.1.3/24 dev eth0
[root@fcku ~]# ip a s eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:23:54:20:73:3e brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.105/24 brd 192.168.1.255 scope global eth0
    inet 1.1.1.1/24 scope global eth0
    inet 1.1.1.2/24 scope global secondary eth0
    inet 1.1.1.3/24 scope global secondary eth0
    inet6 fe80::223:54ff:fe20:733e/64 scope link 
       valid_lft forever preferred_lft forever
[root@fcku ~]# ip r s
default via 192.168.1.1 dev eth0  metric 202 
1.1.1.0/24 dev eth0  proto kernel  scope link  src 1.1.1.1 
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.105  metric 202 
[root@fcku ~]# ip r replace 1.1.1.0/24 dev eth0  proto kernel  scope link  src 1.1.1.2
[root@fcku ~]# ip r s
default via 192.168.1.1 dev eth0  metric 202 
1.1.1.0/24 dev eth0  proto kernel  scope link  src 1.1.1.2 
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.105  metric 202 
[root@fcku ~]# ip a d 1.1.1.2/24 dev eth0
[root@fcku ~]# ip a s eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:23:54:20:73:3e brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.105/24 brd 192.168.1.255 scope global eth0
    inet 1.1.1.1/24 scope global eth0
    inet 1.1.1.3/24 scope global secondary eth0
    inet6 fe80::223:54ff:fe20:733e/64 scope link 
       valid_lft forever preferred_lft forever
[root@fcku ~]# ip r s
default via 192.168.1.1 dev eth0  metric 202 
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.105  metric 202 
[root@fcku ~]# uname -a
Linux fcku 3.6.10-1-ARCH #1 SMP PREEMPT Tue Dec 11 09:40:17 CET 2012 x86_64 GNU/Linux
[root@fcku ~]# ip -V
ip utility, iproute2-ss121001
[root@fcku ~]# 

                 reply	other threads:[~2012-12-21 12:09 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=20121221120953.GC15934@fcku.lan \
    --to=hemmo.nieminen@iki.fi \
    --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;
as well as URLs for NNTP newsgroup(s).