0

I'm using systemd (specifically netctl) and trying to create a network profile which has dhcp or stateless auto config IPv6 but also allows me to specify a static link-local IPv6 address. I've read the documentation and looked over the examples, and tried every sensible combination of options, and I just can't come up with a working configuration. The error I typically see is that I don't have a link-local address, which is particularly ironic since I'm trying to manually specify said address.

My broken config files usually look something like this:

IP6=dhcp-noaddr  #or stateless, or dhcp
Address6=fe80::1/64

I would write out all of the IPv6 settings, except that I don't have a static IPv6 address assigned to me. I don't want to change all the config settings on every computer each time my ISP changes my address. How can I make a static link-local address while also using DHCP/stateless autoconfig? The answer doesn't have to be netctl, but I am stuck with systemd.

(And yes, I'm aware that link-local addresses are ~~useless~~ not portable in linux. At this point I just want to know the answer.)

  • Note that systemd has nothing to do with this at all; you might be confusing netctl with systemd-networkd. (And link-local addresses aren't useless). – grawity Feb 4 '15 at 22:33
  • Okay, I fixed the title. link-local is somewhat broken in linux because you always have to specify the interface, and interface names have become hardware dependent. Thus any config files where you specify a link-local address has to be changed when the hardware changes. – Sophit Feb 4 '15 at 23:11
  • Link-local addresses aren't useless; in fact they're mandatory. You will always have one if IPv6 is working properly. And a link-local address will often be your default gateway. – Michael Hampton Feb 4 '15 at 23:11
  • Other types of IPv6 addresses don't require users to specify an interface when using the address. This is a special shortcoming of link-local addresses in linux. And yes, mandatory things can be useless. To be fair, let's just say they're "not portable" in linux. – Sophit Feb 4 '15 at 23:24
  • The name itself, "link-local", already implies non-portable; it's the same across all operating systems and to a certain extent even in IPv4. Doesn't make them useless – I've had at least three different uses for them over the past few months. Imagine that. – grawity Feb 5 '15 at 7:48
2

Try adding the address manually in a post-up command:

ExecUpPost="
    ip addr add fe80::1/64 dev $Interface scope local;
"
  • Good find, I had overlooked ExecUpPost in the documentation. In case this is unclear to future readers, ExecUpPost goes in the netctl profile file alongside the other options. – Sophit Feb 5 '15 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.