Sunday, 27 September 2009

HOWTO: Native IPV6 dialup on the Mac

The world is running out of IPV4 addresses, so the transition from IPV4 to IPV6 is getting closer. Here's how to kick the tyres, if you want to try web surfing with IPV6.  Dialup is just for testing of course, ADSL is next ...

1. Take an Apple MacBook running Snow Leopard (Mac OSX 10.6).

2. Disconnect Ethernet and Wifi.

3. Plug in the Apple USB Modem.

4. In the Mac's "System Preferences: Network" control panel (which will probably pop up automatically when the modem is plugged in), create a dial-up connection for an IPV6-compatible ISP, for example http://aaisp.net .

As far as I'm aware, AAISP (Andrews & Arnold) is the only ISP here in the UK that offers IPV6 natively over both ADSL and dial-up. You need to ask them to enable IPV6 for you - it's free - and you may also want to ask for a second login account - again, it's free - so that you can mess about testing stuff without clashing with the static addresses assigned your main ADSL line.

5. Enter the ISP's IPV6 name servers manually under the dial-up connection settings (as it doesn't get them automatically)

If you dial up now, you'll notice IPV4 and IPV6 addresses get assigned to network interface ppp0. These can be checked in a Terminal window using the command ifconfig ppp0. You can check routes with netstat -anr

But you'll find IPV6 web access still doesn't work, because the IPV6 address that gets set up on the ppp0 interface is a link-local one. I've yet to read up about IPV6 in detail, but for test purposes I got IPV6 working by deleting the default IPV6 address, replacing it with one of the millions of IPV6 addresses assigned to me by my ISP. To do this, I had to execute these commands (sanitised where 'x:x' appears) being careful not to confuse 6 (six) and b (letter B)...

sudo -s [to become root]
ifconfig ppp0 inet6 delete fe80::216:x:x:x%ppp0
route delete -inet6 default
ifconfig ppp0 inet6 2001:8b0:x:x::42
route add -inet6 default 2001:8b0:x:x::42%ppp0
echo 'nameserver 2001:8b0::2020' >>/etc/resolv.conf
echo 'nameserver 2001:8b0::2021' >>/etc/resolv.conf

Worth noting at this point that a fully-formed IPV6 address is of the form dead:beef:cafe:f00d:dead:beef:cafe:f00d but most often many of those bits are set to zero. The abbreviation "::" means just stick a load of zeroes in there to make it up to the correct length. So 2001:8b0::2020 is really 2001:08b0:000:0000:0000:0000:2020.

OK, so you should now have IPV6 connectivity, but how to test it?
  • Use 'dig -t aaaa www.example.com' to discover the IPV6 address of your favourite website.
  • Use ping6 and traceroute6 to test connectivity to known IPV6 addresses.
  • Browse directly to an IPV6 website by putting the IPV6 address in square brackets, i.e. http://[dead:beef:cafe:f00d:dead:beef:cafe:f00d]:port/index.html (assuming that the site supports browsing by address rather than virtual hostname).
You may also have access to http://ipv6.google.com (the IPV6-only version of Google) although due to bizarre practices at Google, that only works if your ISP has satisfied Google that it supports IPV6 properly. But there are some handy links to other IPV6-only sites at http://www.sixxs.net/misc/coolstuff/#ipv6gate .

Thus far you're running with a dual IPV4 and IPV6 stack. You can force IPV6 only by removing the IPV4 address and default route, but you'll then quickly realise how few websites support IPV6. There is a chicken and egg problem here... Even those sites that do support IPV6 are generally dual-stack, and often your DNS lookup will return IPV4 addresses by default, so you'll end up using IPV4 even when you have IPV6 enabled. I believe you can run IPV6 only on your machine by setting up a magic route for IPV4 addresses, as the IPV4 space appears as a subset of the IPV6 address range. But looking at the devices on my network with regard to IPV6 compatibility... There's a VOIP ATA, two laser printers, an iPhone, and an old Airport Express. None of these support IPV6, so I'll have to run dual-stack once I get my ADSL firewall to support IPV6.

UPDATE: As described elsewhere on this blog, I can confirm that native IPV6 over ADSL is working for me with Monowall 1.32.  Modem is a Traverse Viking ADSL PCI card in Bridge mode.

No comments:

Post a comment

Spammers: please stop wasting my time. All comments are moderated before publication.