DMYTRO SHYTYI

Variable SLAAC (IPv6). SLAAC with prefixes of arbitrary length in PIO

Variable SLAAC (IPv6). SLAAC with prefixes of arbitrary length in PIO

SLAAC – a process to autoconfigure interfaces of host in IP version 6. The autoconfiguration process includes generating a link-local address, generating global addresses via stateless address autoconfiguration, and the Duplicate Address Detection procedure to verify the uniqueness of the addresses on a link. [IETF: rfc4862]

Variable SLAAC – a process to autoconfigure interfaces of host in IP version 6 with network prefixes  of arbitrary length. [IETF: draft-mishra-6man-variable-slaac]

The main problem is that SLAAC RA or PD allocates a /64 by the Wireless carrier 4G, 5G to a mobile hotspot, however, segmentation of the /64 via SLAAC is required so that downstream interfaces can be further subnetted.

Problems are defined in this IETF document: https://datatracker.ietf.org/doc/draft-mishra-v6ops-variable-slaac-problem-stmt/

Example: uCPE device (4G+WI-FI enabled) receives /64 via Wireless, and assigns /72 to VNF-Firewall, /72 to WIFI, /72 to VNF-Router, /72 to Load-Balancer and /72 to wired connected devices.

The specification is defined in this IETF document: https://datatracker.ietf.org/doc/draft-mishra-6man-variable-slaac/

On the date of this post I implemented 2 methods to generate the IPv6 addresses:

  • Random host ID generation (option activated by default).
  • RFC 7217 stable + RFC4941 privacy extension.

Information about the implementation:
  hits [ GITHUB PAGE ]

Releases:

You may also download the linux kernel [linux 5.10.0-rc2] patch by following this link https://github.com/dmytroshytyi/variable-slaac

You may also download the linux kernel [linux 5.10.0-rc1] patch by following this link https://github.com/dmytroshytyi/variable-slaac

You may also download the linux kernel [linux 5.9.0-rc3] patch by following this link https://github.com/dmytroshytyi/variable-slaac

You may also download the linux kernel [linux 5.9.0-rc3] patch by following this link https://github.com/dmytroshytyi/variable-slaac

In order to activate generation of the IPv6 address  according to the RFC 7217 you have to generate a key (for enp0s3, for example) we can set:

 sysctl net.ipv6.conf.enp0s3.addr_gen_mode=3

And after to enable IPv6 stable privacy mode

 sysctl net.ipv6.conf.enp0s3.addr_gen_mode = 2

In order to activate generation of the IPv6 address  according to the RFC4941 you have to perform the next configuration:

sysctl  net.ipv6.conf.enp0s3.use_tempaddr = 2