Sunday, 23 January 2011

DD-WRT IPv6 to Your Local Network

Last time I showed you how to get a dynamic tunnel from SixXs to a DD-WRT router. This time, we're going to get Router Advertisment going, the simplest way to distribute a routed subnet to your network. Router Advertisment only works with /64 prefixes, so if you have a larger one just pad out the extra with anything, just make sure you use the same prefix throughout.

The first thing you'll need to do is enable IPv6 forwarding and set up an address for your prefix on the local network. Although the latter is technically not required, it makes more sense than setting it as a route when you come to try fix any problems later. Run these two commands and add to startup, replacing with addresses that apply to you:

ip -6 addr add 2001:0DB8::1/64 dev br0
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding

I should have mentioned in the last post that I am using the Big DD-WRT pack, which includes some basic IPv6 support, including the Router Advertisement Daemon, RADVD. This can be enabled from the web interface, and the configuration specified there too. Your configuration will look like the one below. I'm not sure what the comment character is, so you may need to remove them.

interface br0 {
AdvSendAdvert on; // Send adverts
AdvLinkMTU 1280; // Default tunnel MTU, stop fragmentation
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
prefix 2001:0DB8::/64 { // replace with your prefix
AdvOnLink on; // this prefix is on the local link
AdvAutonomous on; // generate
AdvRouterAddr on;
};
};

Even though the options are in the browser user interface, radvd does not start automatically. To start it, run

radvd -C /tmp/radvd.conf

As with aiccu, it's probably a good idea to add this line to your startup script. Any IPv6 enabled machines should pick up and IPv6 address or two, and you should also see the router's link-local address in your default gateway list. That's it, you should be able to ping6 from any of your ipv6 enabled machines, and begin browsing via IPv6. Some sites (such as Google) will not server AAAA records over IPv4 DNS queries. We'll detail how to get that working later on.

Seeing as this is a short post, I'll let you in to some options you can add to DNSmasq to make your network run a bit more smoothly, especially if you don't want to remember IPv6 addresses.

Firstly, set up a local domain name, something like 'home.local' and set that up as the domain name in the web interface. Enable the 'Local DNS' setting. Local machines acquiring an IPv4 address via DHCP will be automatically added to DNS. Of course, this doesn't help for IPv6.

As generated IPv6 addresses when using RA don't change (unless they are Temporary Addresses), you can maunually add records to be served using the 'Additional DNSMasq Options'. Here's an example:

address=/pc1/pc1.home.local/2001:0DB8::5555

Well that should keep you going for a little longer. Next time, setting up a cross compile environment. There are some shortcomings in DD-WRT that we'll need to sort out ourselves. Namely DHCPv6 to distribute nameserver addresses, ip6tables for stateful firewalling, and ping6 as it's one of the search terms the gets referred here, so I assume there's a need for it. I may also post my binaries for each at a later date.

9 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. You can add AAAA records to your blog here:
    http://www.google.com/support/a/bin/answer.py?hl=en&answer=177065

    ReplyDelete
  3. Thanks Paul, I'll try those changes tomorrow by changing my www CNAME to ghs46 and try setting up the root of the domain as the same. At the moment its set up using the values from the Blogger instructions.

    ReplyDelete
  4. Andee, maybe we could provide some help as well, your work looks quite interesting - so in case you're interested contact me via peter@dd-wrt.com.

    ReplyDelete
  5. Thanks for sharing, Paul. It seems I still have a lot to learn about IPv6. And by a lot I mean I learn something new everyday.

    telephone recording device

    ReplyDelete
  6. Look for compatible functions as well. This will be useful in configuring the local network.

    white label seo

    ReplyDelete
  7. I agree. Configuration of the setting is very important to make use of the Internet protocol functions. These are the common mistakes when configuring VOIP.

    polycom ip 550

    ReplyDelete
  8. Great post! It really helped me get going with IPv6 on my DD-WRT Linksys E2000 router. Thanks!

    ReplyDelete
  9. I Will Provide Seo Blog Comment Service. & niche relevant blog comment service we provide a quality service with 100% Buyer satisfaction and My team Believed in Quality work not Quantity Contact me Now 24/7.

    ReplyDelete