IPv6 introduction
Bytemark offer IPv6 connectivity to any machine on our network. Here is a gentle introduction to IPv6” from O’Reilly. Our deployment is still in its early stages but customers can already reap the benefits of the extra address space and simple configuration mechanisms. To start with, if you do not have an IPv6 allocation already, you can ask support to be allocated a /64 (or /48 if you need it).
Adding addresses and routes
You allocation will look something like 2001:41c8:1:1234:/64 and you will need to allocate addresses to your primary interface. Please note thatthe yourprefix::1 address is allocated to your host machine for routing purposes.
To add IPv6 addresses and routes to your primary ethernet interface run the following commands:
stoneboat:/home/mattbee# ip addr add 2001:41c8:1:1234::2/64 dev eth0 stoneboat:/home/mattbee# ip route add 2000::/3 via 2001:41c8:1:1234::1
Replacing 2001:41c8:1:1234:: with the prefix you have been allocated: your virtual machine’s router address will always be ::1 so don’t claim this as an IP yourself!
Checking things work
To verify that your IPv6 connection is available, type the highlighted text:
stoneboat:/home/mattbee# ip -6 addr show eth0
1: eth0: <BROADCAST,MULTICAST,ALLMULTI,UP> mtu 1500 qlen 1000
inet6 2001:41c8:1:1234::2/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::fcfd:50ff:fe44:5834/64 scope link
valid_lft forever preferred_lft forever
You ought to be able to ping www.ipv6.org using the ping6
command.
How routing is arranged
Every virtual machine or dedicated host will have a /64 allocation at the very least. Within this allocation your default gateway is at ::1, and your host is expected to claim ::2. If you have a further /48 allocation (or extra /64 allocations) they will be routed via ::2 in your first allocation.
Caveats
- Out of your /64 range, you cannot manually configure yourprefix::1 as an address, as it is used for routing puposes. If you try to, the kernel will probably refuse to claim it, since IPv6 can detect duplicate addresses on an interface.
- There is a bug in the Linux IPv6 support with the default route. Always use
2000::/3instead ofdefaultin the routing commands. - Users who have packet filtering in place should make sure that their IPv6 addresses are covered by the appropriate rules, since any programs which are configured to listen on “all interfaces” (e.g. sshd by default) will also accept connections from IPv6 addresses. This may get around your firewall rules if you’re not careful. There is also a potential for your mail transfer agent to relay mail indiscriminately from an IPv6 connection; IPv6 spammers unfortunately already exist so make sure your software is ready. If in doubt, tell your services to listen on an IPv4 connection only!
Reverse DNS
Currently queries for IPv6 addresses are found over the existing IPv4 DNS network. We will have already delegated the reverse DNS domain for your allocated IPv6 block to our own name servers, but you may need to ask support to allow you to upload reverse DNS records for your IPv6 block through our content DNS service this niggly step will be automated in future. You should see the content DNS example file for worked examples of how to specify IPv6 addresses in your DNS configuration files.
Gentoo users
Gentoo users should read this page of notes prepared to address IPv6 issues in their distribution. However as usual please ignore anything kernel-related.
Topics:
