fixed ipv6 address with DHCPv6

For some time I have been having a problem attempting to have a dnsmasq server provide a system with a fixed IPv6 address. Setting an IPv4 address and identifying the system with its NIC's MAC address. But, with DHCPv6 there is no relationship defined in the standard for DHCPv6 to use the MAC.

I tried using the system's name but that has not proven reliable. When the system and the dnsmasq server get "out of sync", it takes manual intervention to correct things. When things do work, it works fine.

I looked into using the Client-ID but that "number" is based on the MAC plus time and will vary unpredictably.

Suddenly (like yesterday) I found what appears to be the solution and it is likely to have been there for some time. By default, dhclient will use LLT (Link-Layer plus Time) to define its DUID (Client-ID). But, there is an command-line override which can change this to LL (Link-Layer) which uses the MAC prepended with 0:3:0:1.

The important info is here:

Also examine the dhclient man age and scroll down to "*-D*/ LL or LLT/"

I then did a quick (two line) patch to NetworkManage [src/dhcp-manager/nm-dhcp-dhclient.c] to hardcode the addition of "-D", "LL" to the command-line if it is "-6". It works as advertised.

While this works for me, I do not propose that this be the solution in NetworkManager. Instead, I propose that the default remain the same and a new configuration file parameter be added: DUID= which will have only two valid values: LL or LLT. If DUID= is not specified then the default is LLT.

Once this is accepted and part of NetworkManager, I will update network-manager-applet so the the DUID value can be specified when defining an IPv6 interface. Initially, editing the configuration file should be adequate.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]