2010/10/21

IPv6 right now.

Reading slashdot I saw an article about the coming IPv4 Apocalypse. So I figured I should spend some time getting up to speed. And when I say "getting up to speed" I think I really mean "hack at it a little."

First I need some routable addresses. My ISP at home is Bell, which is probably going to be the last ISP in the universe to hand out IPv6 addresses. So I need a 6to4 tunnel. I found handy guide for Linode which basically said "get a free tunnel from HE." Which I did.

The following was added to /etc/sysconfig/network on the VM I wanted to be my IPv6 router
IPV6_DEFAULTDEV=sit1

IPV6FORWARDING=yes
IPV6_ROUTER=yes

Next I added he following to /etc/sysconfig/network-scripts/ifcfg-sit1
DEVICE=sit1

BOOTPROTO=none
ONBOOT=yes
IPV6INIT=yes
IPV6TUNNELIPV4=IPv4
IPV6ADDR=A1:B1:C1::2
Where IPv4 is the IP Bell gave me and A1:B1:C1::2 the client IPv6 address from HE.
ifup sit1

ping6 -n ipv6.chat.freenode.net
yay! It works.

Next, I want other computers to be able to access this tunnel. This took some messing around, but by blindly stabbing at it I got it going.

Then I asked for a /48, and added this to /etc/sysconfig/network-scripts/ifcfg-eth0
IPV6INIT="yes"

IPV6ADDR=A2:B2:C2::2
Where A2:B2:C2::2 is part of my Routed /48 from HE.

Then service network restart.

Next, on my desktop computer, I added the following to /etc/sysconfig/network
NETWORKING_IPV6=yes

Then to /etc/sysconfig/network-scripts/ifcfg-eth0
IPV6INIT=yes

IPV6ADDR=A2:B2:C2::6
Then:
ifdown eth0 ; ifup eth0

ping6 A2:B2:C2::2
YAY! That works.

But... what about routing and forwarding and so on? This is where I stabbed around blindly. The solution was to use radvd.

/etc/radvd.conf:
interface eth0

{
AdvSendAdvert on;
MinRtrAdvInterval 30;
MaxRtrAdvInterval 100;
prefix A2:B2:C2::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};

Start the service, then restart eth0 on corey, and bingo! I can surf to ipv6.google.com.

Todo : Setup reverse DNS for my /48. Setup ipv6 for all my computers. Figure out how to tell HE when Bell changes my IP. They have a tool to do this but my first attempt didn't work.

And of course understand what it is I'm doing. For instance, if IPv6 uses 128bit IPs, surely the /64 would be enough

No comments: