My ISP has been doing a lot of work in the IPv6 department recently and amongst all their IPv6 offerings they have just started a trial for ADSL customers to run a dual IPv4/IPv6 PPP connection. They also run a broker to provide an IPv6 tunnel over IPv4, but this native solution is much neater.
Here's how I've set it up on my home Debian server so that it will provide IPv6 addresses to my home network:
- Add
+ipv6to /etc/ppp/peers/dsl-provider - I had to change the username in dsl-provider and in /etc/ppp/chap-secrets to use a different hostname, as this is how Internode knows you want to connect to the IPv6 trial server.
- Start the DSL connection with "pon dsl-provider", resulting in a connection ppp0 which has both an IPv4 internet address, and a local fe80:: IPv6 address
- Ensure eth0 has a local IPv6 address too, using ifconfig. I was messing about and lost it, and got it back by resetting with
ifdown eth0; ifup eth0 - Now to get a real IPv6 prefix you need an IPv6 DHCP client. At Internode's suggestion I installed the WIDE client (package wide-dhcpv6-client in Debian). The given working configuration for a PPP connection ppp0 and local ethernet connection eth0 is placed in /etc/wide-dhcpv6/dhcp6c.conf as follows:
interface ppp0 {
send ia-pd 0;
script "/etc/wide-dhcpv6/dhcp6c-script";
};
id-assoc pd {
prefix-interface eth0 {
sla-id 0;
sla-len 4;
};
}; - When you install the WIDE DHCPv6 client it starts automatically, with an non-useful config. Restart it with
invoke-rc.d wide-dhcpv6-client restart. Hopefully now an "ifconfig" will show that you have successfully attached a 2001:: prefix address to your eth0 interface. - Add a default route -- this doesn't happen automatically. Run the command:
route --inet6 add default dev ppp0
This will add a default route through the gateway on your PPP connection. - At this point there is working IPv6 connectivity on the local machine. It can be tested with "ping6 ipv6.google.com":
# ping6 ipv6.google.com
PING ipv6.google.com(tx-in-x68.1e100.net) 56 data bytes
64 bytes from tx-in-x68.1e100.net: icmp_seq=1 ttl=56 time=171 ms
64 bytes from tx-in-x68.1e100.net: icmp_seq=2 ttl=56 time=172 ms - To set up advertising of addresses and routing I referred to Martin Krafft's excellent IPv6 with Debian documentation. In summary, the configuration I had to do was to set /proc/sys/net/ipv6/conf/all/forwarding to 1, which can be made permanent by setting it in /etc/sysctl.conf, and to set up radvd.
- radvd (which is also the name of the package) will provide IPv6 addresses from the allocated /64 prefix to hosts on the local network. Install the package. I set my /etc/radvd.conf to the following, which uses the prefix I was allocated, as found from ifconfig:
interface eth0
{
AdvSendAdvert on;
AdvLinkMTU 1280;
prefix 2001:44b8:7c90:be0::/64
{
AdvOnLink on;
AdvAutonomous on;
};
}; - Now other machines with IPv6 support which are connected via the eth0 interface should be allocated an address and will be able to access the IPv6 Internet too.
I have a fun ISP who gives me toys to play with. :)