Other posts related to adsl

A Vigor 120, Linux box and IPv6

 | April 1, 2010 13:56

Introduction

I wanted to have a bit more of a play with IPv6, and with the opportunity of needing to migrate an ADSL line to a new provider, picked Andrews & Arnold due to previous good experience, service and support from them, and, of course, they offer “native” IPv6.

Audience

This article is mainly aimed at noting down what I did to get it working, rather than being a low level newbie guide. It assumes a few basics of knowledge, and points out where I tripped up along the way.

Basics

Connect the Vigor 120′s ADSL port to the splitter with the cable supplied. Once you’ve done this, you can just connect to the ethernet side, and the Vigor will give you an IP via DHCP. By default, it’s on 192.168.2.1, and gives you .10. You can browse to it, leaving the username and password blank when prompted, to get to the status and information screens.

No changes are actually needed for “normal” ADSL on a BT phone line. If you’re using BE, or some others (O2 spring to mind, I think), you’ll need some changes, although I know not what they are. I seem to remember seeing something on Draytek’s FAQ section about this though, so check there if you’re affected.

What you can see here, is the sync rate, SNR, etc. You can’t see this information once the PPP session is established (which is a shame, but understandable to a degree), so if you want to look, look now!

Moving on…

Now that the basics are established, connect the linux box that’s going to act as your router and terminate the PPP session.

Personally, I’ve used Ubuntu Server 9.10. If you don’t like Ubuntu, don’t start a holy war, it “Just Works” as far as I can see, so if you’re using something else, you’ll need to adapt the instructions a bit, maybe.

In my case, eth0 is the interface connected to the Vigor 120, whilst eth1 is on the “inside”. What I did to make the router box route, firewall, and other useful stuff will be covered in future articles.

You’ll need to install a couple of packages:

  • ppp
  • pppoe

There are no doubt others, but they’re the main ones.

Configuration

First, get IPv4 working. In my case, my WAN IP is allocated automagically by A&A on connection, so I don’t need to specify it. I ran pppoeconf which probed for PPPoE, and asked a bunch of questions before writing the config file, and making sure it connects at reboot.

In /etc/network/interfaces, I have:

auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up
provider dsl-provider

It’s important that you do not have an IP on eth0, and bring it up as above (or equivalent).

The /etc/ppp/peers/dsl-provider file looks like this:

noipdefault
defaultroute
hide-password
lcp-echo-interval 20
lcp-echo-failure 3
connect /bin/true
noauth
persist
mtu 1492
noaccomp
default-asyncmap
plugin rp-pppoe.so eth0
user "some_user_account"
maxfail 0

One thing that tripped me up, was missing out the “maxfail 0″ option. By default, it’ll retry the “dial” sequence 10 times, then it gives up. Setting maxfail to zero basically makes it try forever.

You don’t want to forget to set this on a remote box, like I did. If BT flap about a lot like they did a week ago, and your box uses up its 10 retries without getting a connection, you’ll have to go there to fix it.

You can manually bring the connection up and down with pon and poff, and you should get a default route when you do. You might want to reboot to check it all works after a power outage!

IPv6

Now that we have IPv4 working, we can make a couple of tweaky changes to make IPv6 work.

In /etc/ppp/options, or /etc/ppp/peers/dsl-provider (I picked the latter) add a single line:

ipv6 ,

I also added a file /etc/ppp/ipv6-up.d/defaultroute that contains:

ip -6 route add default dev ${PPP_IFACE}

Then, I applied the first IP from my IPv6 allocation to eth1 as follows:

iface eth1 inet6 static
address 2001:xxx:xxxx::1
netmask 64
pre-up echo 0 > /proc/sys/net/ipv6/conf/eth1/autoconf

Initially, I found that IPv6 didn’t appear to be working. On the linux box, I started a ping6 to a host outside my network, and then set about some tcpdumping. Helpfully, A&A facilitate performing a tcpdump on your line on their LNS. Comparing the two showed the ICMPv6 echo request packets leaving the local box, passing through the LNS, and then the echo-reply packets coming back through the LNS. However, the tcpdump on the linux box showed malformed IP6 packets.

All the PPP options seemed to be OK, and so to make sure I wasn’t banging my head against a brick wall trying to do something that would never work, I wrote to Draytek support. They wrote back explaining that it wasn’t supported, but kindly including a beta firmware for the Vigor 120 that they had reports of customers having success with IPv6 with. I applied the update, and IPv6 popped into life.

Switch to our mobile site