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 IPv6 on Arch Linux with systemd-networkd
- 7 Making sure the IPv6 module is loaded
- 8 Bringing the interface up
- 9 Testing your connection
- 10 Setting up your own /64
By default you will only get one IPv6 address. You can receive a /64 subnet upon request to firstname.lastname@example.org. 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 email@example.com 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. 184.108.40.206 --- 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 firstname.lastname@example.org 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 220.127.116.11 netmask 255.255.255.128 gateway 18.104.22.168 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=22.214.171.124 NETMASK=255.255.255.128 GATEWAY=126.96.36.199 IPV6INIT=yes IPV6ADDR=2605:2700:0:3::4047:a7a5 IPV6_DEFAULTGW=2605:2700:0:3::1
Setting 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::1
For 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.
IPv6 on Arch Linux with systemd-networkd
If you're using
systemd-networkd (for example, if you used the prgmr Arch installation script) then
/etc/systemd/network/prgmrDhcp.network should look something like this. You'll have to append the last two lines.
[Match] Name=e* [Network] DHCP=v4 Address=2605:2700:0:17::4713:9b0f/64 Gateway=2605:2700:0:17::1
Unlike with other network managers, your netmask is indicated by the /64 appended to your ipv6 address rather than on a separate line.
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 email@example.com 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. '
If you would like to have reverse DNS for your /64 delegated to nameservers of your choosing, just email firstname.lastname@example.org and ask. Please include the list of your chosen nameservers in the message.
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.