Discussion:
[OpenWrt-Users] Restore IPv6 link local address after `ip address flush <dev>`
Bernd Naumann
2015-08-19 10:39:56 UTC
Permalink
/* Not directly OpenWRT related, but anyway... */

Hi @ all,

after runing `ip address flush dev <interface>` you no longer have any
IPv6 link local addresses left on your device. Rather in the
documentation of `iproute2` nor in any other user manual I have found
any information about how to "restore" link local connectivity. It
depends on the system, but sometimes restarting the network service
helps, but I think that is not a good solution. Also there are several
short (shell) scripts to calculate the link local address from the mac
addr, but this looks also hackish, because this should be available
directly via iprout2, IMHO. (Linke after bringing an interface in
upper state or something.)

So does anyone know a /clean/ way to accomplish this ( how to add an
ipv6 link local address to an interface)?

Thanks,
Bernd

- --
Bernd Naumann <***@kr217.de>

PGP: 0xA150A04F via pool.sks-keyservers.net
XMPP: ***@weimarnetz.de
Jo-Philipp Wich
2015-08-19 11:02:12 UTC
Permalink
Hi,

I usually do that:

sysctl -w net.ipv6.conf.eth0.disable_ipv6=1
sysctl -w net.ipv6.conf.eth0.disable_ipv6=0


~ Jow
Bernd Naumann
2015-08-19 12:12:02 UTC
Permalink
Hi,
sysctl -w net.ipv6.conf.eth0.disable_ipv6=1 sysctl -w
net.ipv6.conf.eth0.disable_ipv6=0
Thanks jow,

Jep, this works on OpenWrt, but for some reason not on my debian
machine... anyway, thanks for the hint!

Greetings,
Bernd

- --
Bernd Naumann <***@kr217.de>

PGP: 0xA150A04F via pool.sks-keyservers.net
XMPP: ***@weimarnetz.de
Bernd Naumann
2015-08-19 12:30:26 UTC
Permalink
Post by Bernd Naumann
Hi,
sysctl -w net.ipv6.conf.eth0.disable_ipv6=1 sysctl -w
net.ipv6.conf.eth0.disable_ipv6=0
Thanks jow,
Jep, this works on OpenWrt, but for some reason not on my debian
machine... anyway, thanks for the hint!
Appending:

I seams like, that is required to have besides a link state 'up' also
a carrier state 'up' to got a link local address on an interface to
got auto configuration by the kernel.

But is there is both, state up and carrier up, then toggle
disable_ipv6 works fine.

- --
Bernd Naumann <***@kr217.de>

PGP: 0xA150A04F via pool.sks-keyservers.net
XMPP: ***@weimarnetz.de
Karl O. Pinc
2015-08-19 15:00:49 UTC
Permalink
On Wed, 19 Aug 2015 14:30:26 +0200
Post by Bernd Naumann
I seams like, that is required to have besides a link state 'up' also
a carrier state 'up' to got a link local address on an interface to
got auto configuration by the kernel.
But is there is both, state up and carrier up, then toggle
disable_ipv6 works fine.
Presumably then if the link state was 'up' and the carrier
state 'down' then when you eventually plug the cable in
the kernel will autoconfigure the ipv6 link local address?
If so then it's harmless to toggle the sysctl when the
cable is unplugged but it's the right thing to do when
the cable is plugged in.


Karl <***@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
Ondřej Caletka
2015-08-20 08:47:19 UTC
Permalink
Post by Bernd Naumann
/* Not directly OpenWRT related, but anyway... */
after runing `ip address flush dev <interface>` you no longer have any
IPv6 link local addresses left on your device. Rather in the
Hi,

to prevent this from happening, you can add "scope global" to the ip
command, like this:

# ip -6 addr flush dev <interface> scope global


Cheers,
Ondřej Caletka
Bernd Naumann
2015-08-20 09:35:05 UTC
Permalink
Post by Ondřej Caletka
Post by Bernd Naumann
/* Not directly OpenWRT related, but anyway... */
after runing `ip address flush dev <interface>` you no longer
have any IPv6 link local addresses left on your device. Rather in
the
Hi,
to prevent this from happening, you can add "scope global" to the
# ip -6 addr flush dev <interface> scope global
Nice. Thanks a lot!


- --
Bernd Naumann <***@kr217.de>

PGP: 0xA150A04F via pool.sks-keyservers.net
XMPP: ***@weimarnetz.de

Loading...