Debian IPv6 Virtual ( Additional ) Static Addresses Configuration

I know how to add additional IPv4 IP address using virtual IP address configuration under Debian Linux. How do I add additional IPv6 address (aliased IPv6 addresses) under Debian Linux server?

You cannot use virtual interface style nameing such as eth0:1 with IPv6. You need to use /sbin/ifconfig or /sbin/ip command with UP command in /etc/network/interfaces file to configure additional IPv6 address. The following example shows the addition of a secondary address using the /sbin/ifconfig command.

Our sample IPv6 Address

  1. Main Static IPv6 address: 2607:f0d0:2001:000a:0000:0000:0000:0002/64
  2. Ipv6 gateway address: 2607:f0d0:2001:000a:0000:0000:0000:0001
  3. Additional Ipv6 address #1: 2607:f0d0:2001:000a::3/64
  4. Additional Ipv6 address #2: add 2607:f0d0:2001:000a::4/64
  5. Interface: eth0
  6. Ipv6 Type: Static

Debian IPv6 Virtual Interface (aliased) Configuration

Open /etc/network/interfaces file, enter:
# vi /etc/network/interfaces
Modify / append configuration as follows:

#IPV6 configuration
iface eth0 inet6 static
   pre-up modprobe ipv6
   address 2607:f0d0:2001:000a:0000:0000:0000:0002
   netmask 64
   gateway 2607:f0d0:2001:000a:0000:0000:0000:0001
# Start IPv6 secondary additional IP configuration
   up /sbin/ifconfig eth0 inet6 add 2607:f0d0:2001:000a::3/64
   up /sbin/ifconfig eth0 inet6 add 2607:f0d0:2001:000a::4/64

Save and close the file. Restart networking:
# /etc/init.d/networking restart
Verify new Ipv6 networking settings including secondary address:
# ifconfig eth0
# ip -6 route show
# ping6 www.cyberciti.biz
# ping6 2607:f0d0:2001:000a::3


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 0 comments... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @ webmaster@cyberciti.biz