* interface down: v6/v4 address deletion difference
@ 2008-08-14 17:25 Pekka Savola
2008-08-14 20:24 ` Vlad Yasevich
0 siblings, 1 reply; 2+ messages in thread
From: Pekka Savola @ 2008-08-14 17:25 UTC (permalink / raw)
To: netdev
Hi,
I recall there was discussion about this a couple of years back, but I
couldn't find it for all I could try.
There seems to be a difference in how v4/v6 addresses are handled when
interface goes down (manually added addresses are gone forever
regardless of whether it's tentative or nor; link local address is
deleted but reappears when link is back).
Example on 2.6.25.10-86.fc9 using pan0 interface (just because it's
easiest to play with it):
# ip l set up dev pan
# ip a a 10.0.0.1/24 dev pan0
# ip -6 a a 2001::1/64 dev pan0
# ip a l dev pan0
8: pan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN
link/ether 36:ca:62:2a:71:7b brd ff:ff:ff:ff:ff:ff
inet 10.0.0.1/24 scope global pan0
inet6 2001::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::34ca:62ff:fe2a:717b/64 scope link
valid_lft forever preferred_lft forever
# ip l set down dev pan0
# ip a l dev pan0
8: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN
link/ether 36:ca:62:2a:71:7b brd ff:ff:ff:ff:ff:ff
inet 10.0.0.1/24 scope global pan0
# ip l set up dev pan0
# ip a l dev pan0
8: pan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN
link/ether 36:ca:62:2a:71:7b brd ff:ff:ff:ff:ff:ff
inet 10.0.0.1/24 scope global pan0
inet6 fe80::34ca:62ff:fe2a:717b/64 scope link tentative
valid_lft forever preferred_lft forever
(and after a while 'tentative' flag goes away)
Shouldn't behaviour be consistent across v4/v6?
--
Pekka Savola "You each name yourselves king, yet the
Netcore Oy kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: interface down: v6/v4 address deletion difference
2008-08-14 17:25 interface down: v6/v4 address deletion difference Pekka Savola
@ 2008-08-14 20:24 ` Vlad Yasevich
0 siblings, 0 replies; 2+ messages in thread
From: Vlad Yasevich @ 2008-08-14 20:24 UTC (permalink / raw)
To: Pekka Savola; +Cc: netdev
Pekka Savola wrote:
> Hi,
>
> I recall there was discussion about this a couple of years back, but I
> couldn't find it for all I could try.
>
> There seems to be a difference in how v4/v6 addresses are handled when
> interface goes down (manually added addresses are gone forever
> regardless of whether it's tentative or nor; link local address is
> deleted but reappears when link is back).
>
> Example on 2.6.25.10-86.fc9 using pan0 interface (just because it's
> easiest to play with it):
>
> # ip l set up dev pan
> # ip a a 10.0.0.1/24 dev pan0
> # ip -6 a a 2001::1/64 dev pan0
> # ip a l dev pan0
> 8: pan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
> UNKNOWN
> link/ether 36:ca:62:2a:71:7b brd ff:ff:ff:ff:ff:ff
> inet 10.0.0.1/24 scope global pan0
> inet6 2001::1/64 scope global
> valid_lft forever preferred_lft forever
> inet6 fe80::34ca:62ff:fe2a:717b/64 scope link
> valid_lft forever preferred_lft forever
> # ip l set down dev pan0
> # ip a l dev pan0
> 8: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN
> link/ether 36:ca:62:2a:71:7b brd ff:ff:ff:ff:ff:ff
> inet 10.0.0.1/24 scope global pan0
> # ip l set up dev pan0
> # ip a l dev pan0
> 8: pan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
> UNKNOWN
> link/ether 36:ca:62:2a:71:7b brd ff:ff:ff:ff:ff:ff
> inet 10.0.0.1/24 scope global pan0
> inet6 fe80::34ca:62ff:fe2a:717b/64 scope link tentative
> valid_lft forever preferred_lft forever
> (and after a while 'tentative' flag goes away)
>
> Shouldn't behaviour be consistent across v4/v6?
>
>From what I remember explained to me, this is due to different
host models of operation between IPv4 and IPv6 in linux. IPv4 is
implemented using a weak host mode, while IPv6 is a strong host model.
So, when the interface is brought down, all IPv6 addresses
are removed since Linux considers them assigned to the interface
and not the host.
-vlad
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-14 20:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-14 17:25 interface down: v6/v4 address deletion difference Pekka Savola
2008-08-14 20:24 ` Vlad Yasevich
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).