Search the Knowledgebase |
Browse by Category |
|
|
|
|
|
| Adding IPv6 to Ubuntu systems |
|
Thank you for rating this answer.
|
Adding an IPv6 IP
To bind IPv6 IPs to your Ubuntu server, edit your /etc/network/interfaces file and add the following lines to the bottom.
#IPV6 configuration
iface eth1 inet6 static
pre-up modprobe ipv6
address 2607:f0d0:2001:0000:0000:0000:0000:0010
netmask 64
gateway 2607:f0d0:2001:0000:0000:0000:0000:0001
The first line tells the system which interface to use IPv6 on.
The second line tells the system to load the module for IPv6.
The third line gives the IPv6 address.
The fourth line defines the netmask for the IPv6 subnet.
The fifth line defines the default gateway for the IPv6 subnet.
After this has been performed you will need to restart networking:
/etc/init.d/networking restart
Verifying IPv6 connectivity
Verify IPv6 IP is bound
root@server:~# ip -6 address show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
inet6 2607:f0d0:2001::/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::230:48ff:fe7e:330a/64 scope link
valid_lft forever preferred_lft forever
root@server:~#
IPv6 Neighbor Cache
root@server:~# ip -6 neighbor show dev eth1
2607:f0d0:2001::1 lladdr 00:1b:0d:e6:57:c0 router REACHABLE
root@server:~#
If the neighbor cache shows a fe80 entry only then your gateway is either not set, the IP is not bound to the correct interface, the IP is not bound correctly to the public interface, or your software firewall is blocking IPv6 ICMP.
IPv6 Default Gateway
root@server:~# ip -6 route show dev eth1
2607:f0d0:2001::/64 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295
fe80::/64 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295
default via 2607:f0d0:2001::1 metric 1024 mtu 1500 advmss 1440 hoplimit 4294967295
root@server:~#
If you do not have the default gateway listed, yet you can ping6 your default gateway then you may add it manually:
root@server:~# ip -6 route add default via 2607:f0d0:2001::1
root@server:~#
|
| Attachments |
|
No attachments were found.
|