0

The question of how to create a static ipv6 but with advertised prefix has already been asked here (the solution appears to be set token), but I'd like to understand exactly what is happening in my setup.

My system natively uses NetworkManager, but I'd like to implement the changes through ifupdown. I created a /etc/network/interfaces file with the following config

auto wlp2s0 allow-hotplug wlp2s0

iface wlp2s0 inet dhcp

iface wlp2s0 inet6 auto
address ::be70:f1ic:a1a1:d502/64
accept_ra 2

privext 0

When I start the networking daemon after creating this file, two addresses are added to the wlp2s0 interface, one global dynamic mngtmpaddr and one global dynamic mngtmpaddr noprefixroute (in addition to the original ones, which include on global dynamic, one privacy extension and the link one), neither of which has the prefix I wanted to fix. Furthermore, in this stage I am not able to access internet (actually, it appears that existing connections keep working while new ones cannot be stablished).

And if I reboot the system (I believe restarting NetworkManager may be enough but am not sure) my wireless adapter is not even able to start (the wlp2s0 interface stays down with no carrier).

Now, to my questions:

  1. I know that the proper way to do what I want is with a token, but why exactly does my config does not fix an IP to have my suffix?

  2. Why do I get two new addresses, one with noprefixroute and one without, instead of only one?

  3. Why rebooting the kernel kills the interface?

I appreciate any insights!

1 Answer 1

1

I know that the proper way to do what I want is with a token, but why exactly does my config does not fix an IP to have my suffix?

Because there is no logic or code in ifupdown that would recognize address ::foo/64 as "just the suffix to be combined with an advertised prefix". It is built on a very basic, literal substitution system and all it does is invoke ip -6 addr add %address% dev %iface% with the parameters you've specified.

Keep in mind that ifupdown does not have a "networking daemon" as such – all it does is one-shot configure the kernel to receive SLAAC (per accept_ra 2), and any SLAAC advertisement handling thereafter is up to the kernel – which means that ifupdown itself does not know anything about which prefixes are being advertised. So even if it had logic to recognize ::foo address definitions, about the only thing it would be able to do with that is configure the 'interface token' in the kernel's SLAAC client.

(And the way you tell the kernel to always use a specified suffix with SLAAC advertised prefixes is… by configuring the 'interface token.' Literally.)

Why do I get two new addresses, one with noprefixroute and one without, instead of only one?

Likely because you have both the kernel (accept_ra=2) and NetworkManager receiving Router Advertisements now, so they both receive a RA and they both derive addresses from the advertised prefix independently from each other.

And if I reboot the system (I believe restarting NetworkManager may be enough but am not sure) my wireless adapter is not even able to start (the wlp2s0 interface stays down with no carrier).

Go check the NetworkManager logs. You probably have the NetworkManager plugin that reads ifupdown configuration, so instead of the original connection profile it now uses the one defined in /etc/network/interfaces, and either a) it refuses ::foo as an interface address, so it doesn't even try bringing the profile up, or b) the profile has no SSID to connect to, so it cannot possibly bring it up.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.