Static IPv6 address

Good morning all,

How can I set a static IPv6 address in Leap 42.1? Addresses are currently issued by a DHCP server running on my Windows 2008R2 server where I set reservations for certain servers. In order to do this I need to specify the DUID and IAID. Working out the former is easy by doing:

cat /sys/devices/virtual/dmi/id/product_uuid

The IAID, however, has me stumped.

The other alternative is to manually specify the address in a config file or yast2, but neither is very clear.

Thanks,

Steve

Setting static addresses is no big problem:

It depends on the tool you use:

wicked:

/etc/sysconfig/network/ifcfg-eth0


BOOTPROTO='static'
STARTMODE='auto'
NAME='Intel Ethernet controller'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='10.10.148.242/25'
IPADDR_0='2001:db8:4f01:1:219:99ff:fef3:42/64'
MTU=''
NETWORK=''
REMOTE_IPADDR=''
USERCONTROL='no'

Using NetworkManager it is similar:

/etc/NetworkManager/system-connections

use nmcli or similar to create the connection.

Setting static addresses is no big problem:

It depends on the tool you use:

wicked:

/etc/sysconfig/network/ifcfg-eth0


BOOTPROTO='static'
STARTMODE='auto'
NAME='Intel Ethernet controller'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='10.10.148.242/25'
IPADDR_0='2001:db8:4f01:1:219:99ff:fef3:42/64'
MTU=''
NETWORK=''
REMOTE_IPADDR=''
USERCONTROL='no'

/etc/sysconfig/network/routes


default 10.10.148.254 - - 
default 2001:db8:4f01:1::1 - - 

Using NetworkManager it is similar:

/etc/NetworkManager/system-connections

use nmcli, nmtui-edit or similar to create the connection.

For the decision (wicked/NM) I would just use yast.

thomasschaefer,

I think he wants to use his Windows DHCP server, which, for the reservation, needs the IAID.

To slcroucher:
I have zero IPV6 experience, but I assume you should see the IAID either in the DHCP request on your Windows server or, on the client side, somewhere in journalctl -b (grep for IAID, iaid, dhcp, something along those lines)

Uwe

Have a look into
/var/lib/NetworkManager/

The leases contain the default-duid.

Or look the logfiles/leases on your server.
Then take the duid and try a fix IP-assignment.
In worst case use Wireshark, to see what happens.

Have a look at the following that describes both pretty well
http://ipv6friday.org/blog/2011/12/dhcpv6/

From that,
It looks to me that the IAID can be anything you want to make it, as long as that number corresponds to the specific interface. Since your scenario is for IP address assignment, you can use the MAC address but maybe without the delimiters because they aren’t needed. Using the default MAC address ensures uniqueness across the network and Internet.

So, it seems to me that you should first set/declare the IAID number in your interface file manually, then use that number with your DUID (unless there is a good reason to change, always use the assigned).

Once you use a DUID and registered it with your DHCP, it should not be changed.
There can be multiple IAID registered with the DHCP server for your device, each for a different interface or use, but the DHCP server will know they all belong to the same DUID device.

HTH,
TSU

as far as I can tell wicked currently is always using last four bytes of interface MAC as IAID.

Do you have suggestion how to do it?

I haven’t looked that closely because currently I’m not working with a DHCP6 server.

But,
In the past,
You can specify IPv6 values in IPv4 fields in YAST without an issue in many cases.
You can edit the interface files directly.

Both Wicked and Network Manager <should> provide a way to use a UI to enter a value, and IPv6 is so common now(although DHCP6 still isn’t that common) that I’d now consider any missing UI support a bug rather than a missing feature.

TSU

It is the same with NetworkManager.

The files under

/var/lib/NetworkManager

contain a line/block starting with:

ia-na 

and the last four bytes of the MAC-address(with colons) followed by some further lease data.

on server site(dhcpd6.service isc-dhcp-4.3.3) I see parts of the duid as:
ia-na

So I am confused too…

I wonder if there’s anything to do on the client at all.
It’s my understanding that it’s just a requirement on the Windows DHCP server that you enter the IAID for a reservation. I’d just use the last 4 bytes of the client MAC on the DHCP server and see what happens if the client requests an IP.

Uwe

Agreed, the IPv6 client might generate values automatically if not defined.
If anyone is running a DhCP6 server, it would be interesting to inspect the leases table and see what a Linux client looks like.

Am kinda occupied nowadays so can’t spend time on a currently unnecessary look at something like this, but I assume anyone who is running an DHCP4 server on Linux should be able to also run a DHCP6 server with minimal impact (but YMMV, evaluate carefully… I assume any client with a valid IPv4 address should continue to work whether IPv6 is working or not. Of course requires a verified working IPv6 gateway, likely your ISP).

TSU

Quoting RFC 3315:

The IAID uniquely identifies the IA and must be chosen to be unique among the IAIDs on the client. The IAID is chosen by the client.

arvidjaar wrote on 17.09.2016 20:46:
> Quoting RFC 3315:> The IAID uniquely identifies the IA and must be chosen to be unique
>> > among the IAIDs on the client. The IAID is chosen by the client.

Yeah, but not necessarily manually, right? :slight_smile:
My guess is, Linux just defaults to the last 4 bytes of the MAC, otherwise it would be easier to set and especially view the IAID.

Uwe