Storage Informer
Storage Informer

Getting IPv6 at home & writing code

by on Jul.07, 2009, under Storage

Getting IPv6 at home & writing code

IPv6 has always been a foreign topic to me, there weird addresses and more complex tunneling systems made it an uncharted world I never step foot in. On the other hand, I do know that all quality software these days should support IPv6. In this blog, I want to talk about my last 2 week・s adventure in IPv6 learning・s and software development.

Some people would say that I am writing pretty important code right now, and I wanted to make sure it was fully IPv6 enabled. This first step for me was to get real IPv6 network connectivity at home, this is not required, but it makes it a lot more real. I use a Linksys WRTSL54GS router at home with the DD-WRT firmware, which is an open source firmware with many more capabilities than the normal factory one. There is a customized version that makes it easier to setup IPv6 and I started by re-flashing the router. I then signed up for a free account at Hurricane Electric, they have IPv6 routers on the Internet and my home router can be setup to tunnel IPv6 packets over IPv4 a router in Seattle. After a few minutes of setup, I was up and running. First, all my computers in my home get both IPv4 (local NAT) and IPv6 (globally routable) addresses. Wow, I type IPCONFIG and see a real IPv6 address. I can now access :ipv6.google.com;, in fact, I made it my home page. I also tried to ping :ipv6.google.com; and indeed, got a response on an IPv6 address. I also read up on IPv6 from Wikipedia and other sources, it・s important to know all the little things, syntax, etc.

Now, I was ready to port some code over. I based my latest project on the :Microstack; code that was used for the Intel UPnP stack a long time ago. Sadly, it・s not been maintained and the code was never updated, still, it・s very tight C code, ideal for my latest project. I spent countless hours replacing :int; with :sockaddr_in6; and debugging the result. One weird thing about Windows is that it・s IPv6 sockets do not automatically support IPv4, you have to do a setsockopt() to enable that feature, in Linux, you just use IPv6 sockets and IPv4 is just supported by default, you have to do a setsockopt() to turn IPv4 support off. I also built a small C# test app to start working on IPv6 UDP packets. I have to say, it・s pretty easy to crash a C# application with IPv6, it seems.NET 3.0 does not perform as many checks as it should.

Lastly, the last 3 days all went to performing UDP multicast using both IPv4 and IPv6 and this, on multi-home systems. That was a real pain, making it work both on Linux and Windows, handling the differences and performing correct multicast. Still, I got it all abstracted out and it works great. It・s all possible, even for a blond guy. Last night at 2am, I got it all workingK I even performed an HTTPS connection over IPv6 using my own code. I also store IPv4 and IPv6 addresses in my database, etc. Just to be cool, I even prioritize IPv6 over IPv4, and for local network communication, this has many benefits, your computer gets an IP address without any DHCP servers, perfect for on the fly connectivity.

Ylian

URL: http://feedproxy.google.com/~r/IntelBlogs/~3/hAcAfEx0rbU/

:, , , , , , , , , , , , , ,

Leave a Reply

Powered by WP Hashcash

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...