#1059766 Support for tokenized interface identifiers with ifupdown in /etc/network/interfaces

Package:
ifupdown
Source:
ifupdown
Description:
high level tools to configure network interfaces
Submitter:
Oliver Freyermuth
Date:
2023-12-31 16:30:04 UTC
Severity:
normal
#1059766#5
Date:
2023-12-31 16:27:06 UTC
From:
To:
Issue
=====
Using "ip token", a command to specify a fixed Interface ID for IPv6 addressing, is not yet abstracted by ifupdown.
A common use case are dynamic-prefix environments in which a fixed interface ID is wanted, e.g. for firewall openings of home routers etc.

Using "ip token" manually requires several non-obvious "hacks" in /etc/network/interfaces.


Functional Workaround
=====================
Using the following interface config:

auto eth0
iface eth0 inet dhcp
iface eth0 inet6 manual
  pre-up ip token set ::192.168.1.35 dev eth0
  post-up IF_ADDRESS=:: IF_NETMASK=0 /lib/ifupdown/settle-dad.sh

yields a functional setup.

This takes care of two things:
- Setting the "ip token" before the interface is first taken up. This is required to disable other addressing, such as EUI-64.
- Ensuring DAD is settled for all dynamic addresses on the interface, e.g. global addresses and ULAs, so IPv6 is fully up before other services start.


Proposed solution
=================
I initially considered something like:

auto eth0
iface eth0 inet dhcp
iface eth0 inet6 manual
  token ::192.168.1.35

to be a good solution, see also this report for bridge-utils
(since my actual case is with a bridge, which has the additional problem that the bridge's pre-up is not accessible):
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059332

However, since settling DAD is also required, potentially this would be easier / more straightforward, i.e. using "token" instead of "manual" as scheme?

auto eth0
iface eth0 inet dhcp
iface eth0 inet6 token
  token ::192.168.1.35