Ubuntu Linux Add Static IPv6 Address Network Configuration

Ubuntu Linux Add Static IPv6 Address Network Configuration

To add a static IPv6 address to the network configuration on an Ubuntu Linux system, you can use the following steps:

  1. Open the network configuration file for the interface that you want to configure with the static IPv6 address in a text editor (e.g. nano):
sudo nano /etc/network/interfaces
Source:ww‮w‬.lautturi.com
  1. Add the following lines to the configuration file, replacing 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
  1. Save the configuration file and close the text editor.

  2. 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.

Created Time:2017-10-30 14:27:25  Author:lautturi