I’ve got a task to set-up ipv6 on local network just for testing – means no auto-config. I know that a majority of old-fashioned system engineers would use some type of config file like /etc/sysconfig/… (on RHEL) to set-up IP address but not me.
I know that modern Linux uses not only SystemD for init scripts but also Network Manager for network configuration. I use Network manager by default because I configure all machines default IP address through kickstart file.
So what you need to do to manually configure IPv6 address?
Firstly you need to set-up manual method of IPv6 and address. The last two digits (34) I use for machine identification. I also use wide subnet /64 for the ability to communicate all machines on the same hypervisor without the need for a gateway.
nmcli c modify eth0 ipv6.method manual ipv6.address 2001:db8:0:f101::34/64
Next, I turn up a connection and reload it.
nmcli connection up eth0 nmcli connection reload eth0
That’s it. After a reboot, IPv6 will automatically come up with your IPv4 address. No need to configure anything in any text file.