0

I have a linux server that gets an IPv6 address using SLAAC from the router. However, this address seems to change every few hours, and I want to at least have a longer lease time, if not make it persistent until next reboot.

I know that I could configure a completely static IPv6 address out of the SLAAC subnet. But what if my IPv6 prefix changes? Then all devices would get a new address via SLAAC upon next connect, except for the server.

So is it possible to get a long-living address out of SLAAC? How to customize SLAAC IPv6 life time?

LukeLR
  • 1,483
  • 1
  • 14
  • 28
  • SLAAC addresses do not change. You are probably using privacy addressing with randomization. You need to disable that on the host to use SLAAC addressing, which the host itself creates (only the prefix comes from the router). If your prefix changes, then your address prefix will change, but the host portion of a SLAAC address will remain the same. You can distinguish a SLAAC address as the middle two bytes of the IID will be `ff:fe`. – Ron Maupin Jan 23 '19 at 21:01
  • You can search for 'disable ipv6 privacy extensions linux` to get specific instruction on how to disable that for your host so that you can use SLAAC. – Ron Maupin Jan 23 '19 at 21:03
  • Ahh, so SLAAC addresses usually don't change, but because of the privacy extensions they do? I'll try that out! Thanks so far. – LukeLR Jan 23 '19 at 21:10
  • 2
    That's not entirely correct. While SLAAC addresses (excluding Privacy addresses) don't change out of nowhere, they _may_ change for such reasons as the prefix changing, depending on the OS. – u1686_grawity Jan 23 '19 at 21:13
  • @grawity, I believe I covered that in my comment. – Ron Maupin Jan 23 '19 at 21:17
  • 1
    What Linux distribution is it? How is the network interface configured? – Michael Hampton Jan 23 '19 at 21:21
  • 2
    @RonMaupin Let's be careful with terminology. Temporary addresses based on randomized interface identifiers are an *extension of* SLAAC. So those addresses *are* SLAAC addresses, and you don't have to disable that part of SLAAC addressing to use the more traditional parts of SLAAC addressing (i.e. SLAAC addresses derived from a static IEEE identifier for the interface). See the very name of the relevant RFC, RFC4941, "Privacy Extensions for Stateless Address Autoconfiguration in IPv6". – Spiff Jan 23 '19 at 21:34
  • 1
    @Ron: My point is that SLAAC isn't exclusively just MAC/EUI64-based addresses. RFC7217 is also SLAAC and quite widely adopted – and it's generated addresses are static yet prefix-dependent. – u1686_grawity Jan 24 '19 at 04:58

0 Answers0