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
- Main Static IPv6 address: 2607:f0d0:2001:000a:0000:0000:0000:0002/64
- Ipv6 gateway address: 2607:f0d0:2001:000a:0000:0000:0000:0001
- Additional Ipv6 address #1: 2607:f0d0:2001:000a::3/64
- Additional Ipv6 address #2: add 2607:f0d0:2001:000a::4/64
- Interface: eth0
- 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


