netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Route lost when src address is removed.
@ 2012-12-21 12:09 Hemmo Nieminen
  0 siblings, 0 replies; only message in thread
From: Hemmo Nieminen @ 2012-12-21 12:09 UTC (permalink / raw)
  To: netdev

[-- 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 ~]# 

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

only message in thread, other threads:[~2012-12-21 12:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-21 12:09 [RFC] Route lost when src address is removed Hemmo Nieminen

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).