Friday, August 20, 2010

IPv6 PPPoE on OpenWRT

Teksavvy, a canadian provider, is offering IPv6 service through DSL PPPoE. As an IPv6 oldtimer, I subscribe to their service to give it a try. They gave me an IPv4-only PPPoE service userid/password and an IPv4 and IPv6 PPPoE service userid/password. The IPv6 service includes a /64 for the PPP link and a /56 for the home network. This blog describes how to have OpenWRT (BackFire 10.03.1-RC1) running as the PPPoE end host and advertising and routing the prefix in the home network. Using 2001:db8:1:1::/64 as prefix for PPP link and 2001:db8:2::/56 for home prefix. Choosing 2001:db8:2:1::1/64 out of the /56 for the interface on the LAN side. Only relevant changes in configuration files are shown.
Here are the steps:

OpenWRT Backfire does not have IPv6 enabled by default:
# opkg update; opkg install kmod-ipv6
Configure IPv6 on the WAN and LAN side:
# cat /etc/config/network
config 'interface' 'lan'
option 'ip6addr' '2001:db8:2:1::1/64'
config 'interface' 'wan'
option 'proto' 'pppoe'
option 'username' 'userid@provider'
option 'password' 'mypassword'
option 'ipv6' '1'
Install and Configure the Router Advertisement daemon to advertise the prefix on the home LAN.
# opkg install radvd
#cat /etc/config/radvd
config interface
option interface 'lan'
option ignore 0
config prefix
option interface 'lan'
option prefix '2001:db8:2:1::/64'
option ignore 0
# ln -s /etc/init.d/radvd /etc/rc.d/S50radvd
Reboot

The /etc/ppp/ipv6-up and ipv6-down scripts are already configured to create the default IPv6 route to the PPP interface.

It works!

# ping6 www.viagenie.ca
ping6 www.viagenie.ca
PING6(56=40+8+8 bytes) 2001:db8:2:1:5123:35ff:fef4:1234 --> 2620:0:230:8000::2
16 bytes from 2620:0:230:8000::2, icmp_seq=0 hlim=50 time=55.993 ms
16 bytes from 2620:0:230:8000::2, icmp_seq=1 hlim=50 time=56.896 ms
16 bytes from 2620:0:230:8000::2, icmp_seq=2 hlim=50 time=56.585 ms
^C
--- jazz.viagenie.ca ping6 statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 55.993/56.491/56.896/0.375 ms

Note that there is no IPv6 firewall configured by default.

3 comments:

Pooh said...

Now remove any hard-coded IPv6 address or prefix and even my dad could have a go at it.

Ole

Liviu said...

hi,

do you know how to set in "/etc/config/network" "Service Name" for PPPoE interface ? apparently, my provider here in Romania did the same as Teksavvy but in order to get an ipv4/ipv6 address i need to use "servicename" (beyond username/pass).

thanks.

markjacktechnicalsupport said...

I'm hoping that they completely remove storage limits. Do it for April Fools Day. Then buy Dropbox and do the same thing.
operating system support
Setup, Configure and Troubleshoot Wireless Network (Wi-Fi)
computer repair