To add a static IPv6 address to the network configuration on an Ubuntu Linux system, you can use the following steps:
nano
):sudo nano /etc/network/interfacesSource:www.lautturi.com
interface
with the name of the interface (e.g. eth0
) and ipv6_address
with the desired static IPv6 address:iface interface inet6 static address ipv6_address netmask 64
For example, to configure the eth0
interface with the static IPv6 address 2001:db8:0:f101::1
, you would add the following lines to the configuration file:
iface eth0 inet6 static address 2001:db8:0:f101::1 netmask 64
Save the configuration file and close the text editor.
Restart the networking service to apply the changes:
sudo systemctl restart networking
The static IPv6 address should now be configured on the interface. You can verify the configuration by running the ip -6 addr
command and looking for the static IPv6 address in the output.
Keep in mind that the above steps assume that you are using the /etc/network/interfaces
file to configure the network interfaces. If you are using a different method to configure the network, the steps may be different.