Setting up IPv6
Unfamiliar with IPv6? Try Hurricane Electric's free IPv6 certification.
- 1 Introduction
- 2 Finding your IPv6 address
- 3 Updating your /etc/network/interfaces for Debian/Ubuntu
- 4 Updating /etc/sysconfig/network-scripts/ifcfg-eth0 for Fedora and CentOS
- 5 IPv6 on NetBSD
- 6 Making sure the IPv6 module is loaded
- 7 Bringing the interface up
- 8 Testing your connection
- 9 Setting up your own /64
By default you will only get one IPv6 address. You can receive a /64 subnet upon request to email@example.com. IPv6 subnet prefixes and default gateways are given below.
Prefix: 2605:2700:0:2::/64 Default Gateway: 2605:2700:0:2::1 Prefix: 2605:2700:0:3::/64 Default Gateway: 2605:2700:0:3::1 Prefix 2605:2700:0:5::/64 Default Gateway: 2605:2700:0:5::1 Prefix: 2605:2700:0:17::/64 Default Gateway: 2605:2700:0:17::1
Finding your IPv6 address
The easiest way to find your IP addresses is through the Reverse DNS option on the Management Console. Select option 8.
Name ID Mem VCPUs State Time(s) cnryhilln 42 128 1 -b---- 4503.1 Wiki at http://wiki.prgmr.com Please contact firstname.lastname@example.org with any issues accessing your machine. Options for "cnryhilln" 1. out of band console (press ctrl-] to escape, not resizeable) 2. create/start, opens OOB console (try this if the machine is not running) 3. shutdown (requests operating system to shut down) 4. force power off (destroy/hard shutdown) 5. reboot (requests operating system to reboot) 6. swap i386/amd64 bootloaders currently "i386" 7. view/add/remove ssh authorized_keys 8. set reverse dns 9. swap pvgrub/grub2 bootloaders currently "pv-grub" 0. exit enter selection> 8 0. 18.104.22.168 --- cnryhilln.xen.prgmr.com 1. 2605:2700:0:17::4713:9b0f --- cnryhilln.xen.prgmr.com
You may also check <hostname>.xen.prgmr.com.
$ host -t AAAA cnryhilln.xen.prgmr.com cnryhilln.xen.prgmr.com has IPv6 address 2605:2700:0:17::4713:9b0f
If neither of these methods returns your IPv6 address, then contact email@example.com and ask us to fix it.
Updating your /etc/network/interfaces for Debian/Ubuntu
Once you have your sddress, add the following lines to your /etc/network/interfaces file (remember to substitute your own address for the one in the example):
iface eth0 inet static address 22.214.171.124 netmask 255.255.255.128 gateway 126.96.36.199 iface eth0 inet6 static address 2605:2700:0:3::4444:630e netmask 64 gateway 2605:2700:0:3::1
Updating /etc/sysconfig/network-scripts/ifcfg-eth0 for Fedora and CentOS
DEVICE=eth0 IPADDR=188.8.131.52 NETMASK=255.255.255.128 GATEWAY=184.108.40.206 IPV6INIT=yes IPV6ADDR=2605:2700:0:3::4047:a7a5 IPV6_DEFAULTGW=2605:2700:0:3::1Setting the default route with IPV6_DEFAULTGW is broken in CentOS/RHEL 5.2 and earlier, so in that case a route for 2000::/3 to the same router should work almost as well. A static ipv6 route can be set in /etc/sysconfig/static-routes-ipv6 like
eth0 2000::/3 2605:2700:0:3::1For more information on ipv6 and other settings in /etc/sysconfig, see /usr/share/doc/initscripts-8.45.30/ or whatever version of initscripts is on your system.
Be sure to use the correct gateway for your network. The gateway for the 2605:2700:0:3:: prefix is different from the gateway for the 2605:2700:0:2:: prefix.
On CentOS you may need to add "NETWORKING_IPV6=yes" to /etc/sysconfig/network if the IPv6 address is not assigned on ifup.
IPv6 on NetBSD
Add a line to /etc/ifconfig.xennet0:
inet6 2605:2700:0:3::XXXX:XXXX prefixlen 64 alias
Add a line to (or create) /etc/route.conf
inet6 -net 2000::/3 2605:2700:0:3::1
Remember to use the correct gateway for your prefix. The gatway for the 2605:2700:0:3:: prefix is different from the gatway for the 2605:2700:0:2:: prefix.
Making sure the IPv6 module is loaded
Add the line "ipv6" to /etc/modules to ensure that the IPv6 kernel module is loaded on reboot.
Bringing the interface up
You can either reboot your server, or use the virtual console to bring down the interface from the virtual console and then bring it up again.
Important: If you are connected directly via SSH, you won't be able to send any more commands after bringing down the interface, so make sure you bring the interface back up in the same command:
ifdown eth0 && ifup eth0
Testing your connection
david@kauri:~$ ping6 ipv6.google.com PING ipv6.google.com(pv-in-x93.1e100.net) 56 data bytes 64 bytes from pv-in-x93.1e100.net: icmp_seq=1 ttl=54 time=24.0 ms 64 bytes from pv-in-x93.1e100.net: icmp_seq=2 ttl=54 time=24.0 ms
Congratulations, your native IPv6 connection is now up and running.
Setting up your own /64
To get your own /64, email firstname.lastname@example.org and ask for one. Once you receive it, you can configure it in Debian or Ubuntu by changing the IPv6 section in your /etc/network/interfaces file to look like this (be sure to change the IP addresses):
iface eth0 inet6 static address 2605:2700:0:3::4444:630e netmask 64 gateway 2605:2700:0:3::1 up ip -6 addr add 2605:2700:1:f00d::1/64 dev eth0 up ip -6 addr add 2605:2700:1:f00d::beef/64 dev eth0
For Fedora or CentOS, add the following line to your /etc/sysconfig/network-scripts/ifcfg-eth0 file, changing the addresses as necessary:
You can also add addresses under your prefix to a dummy, VPN, or bridge interface. '
Important: If you have an IPv6 subnet, you MUST keep the IPv6 address that you were originally assigned, because your prefix is routed through that address.