Quantcast
Viewing latest article 5
Browse Latest Browse All 7

Introducing IPv6 in SocketTools 7

One of the new features in SocketTools 7 will be support for IPv6 networks, in addition to IPv4 that most developers are already familiar with. Although IPv6 has been getting a lot of attention recently, it’s actually been around for quite a while now. Work on the protocol began in the early 1990’s and there have been public IPv6 networks that have existed for over a decade now. However, up to this point it has never gained much traction and IPv4 remains the dominant protocol used over the Internet. This is in the process of changing however, because we’re rapidly approaching the exhaustion of new IPv4 addresses. If you develop software that accesses the Internet, this affects you.

It’s predicted that the last of the large blocks of available IPv4 addresses will be allocated by the Internet Assigned Numbers Authority (IANA) early in 2011 and the regional registries will exhaust their pool of new addresses within a few years. The widespread adoption of classless routing (CIDR) and network address translation (NAT) delayed the inevitable exhaustion of IPv4 addresses, but we’re rapidly approaching the point where the transition to IPv6 will be required to accommodate the ever increasing number of devices connected to the Internet.

Fortunately, the transition for developers using SocketTools will be fairly simple. Most of the real complexity in dealing with both IPv4 and IPv6 is handled internally, although there are some important considerations when updating your software.

1. If your application stores IP addresses in a database, configuration file, etc. then you need to make sure that your program will recognize both IPv4 and IPv6 formatted addresses. If your program is written to only recognize IPv4 addresses in dotted notation, this will create problems for you with IPv6 because it uses a completely different format. Instead of a sequence of four numbers separated by periods, IPv6 consists of hexadecimal values separated by colons. So while an IPv4 address looks like 192.168.0.20, an IPv6 address will looks something like fd7c:2f6a:4f4f:ba34::a32 and can be much longer than an IPv4 address. You’ll want to allocate at least 46 characters to store a full IPv6 address.

2. If your application allows the user to input an IPv4 address, then you’ll need to change that code to accept both address formats. If you’re using some kind of masked input that expects four individual numbers that are in the range of 0-255, then that code will need to be rewritten because.

3. Your application uses the SocketTools Library Edition and stores addresses as 32-bit integer values, that code will need to be changed. There are several API functions in SocketTools 6.0 and earlier versions that expect an IP address to be stored in a DWORD (unsigned 32-bit integer) variable. In SocketTools 7, those functions have been changed to use a new type named INTERNET_ADDRESS that is capable of representing both IPv4 and IPv6 addresses.

If your software is designed to work with both host names and IP addresses, and you don’t make any assumptions about the format of the address, then there are few changes that you’d need to make. The SocketTools functions and methods that accept either host names or addresses will automatically recognize the difference in formats and act accordingly. Because a host name can resolve to either an IPv4 or IPv6 address, SocketTools will normally choose the IPv4 address whenever possible. For example, if host name www.company.com has both an IPv4 and IPv6 address assigned to it (which will be common, particularly during the transition period to IPv6) then SocketTools will prefer the IPv4 address for backwards compatibility. However, if that domain only has an IPv6 address, then SocketTools will use IPv6 to establish the connection. There’s also an option that you can specify which will force SocketTools to always use IPv6 if necessary.

Because it’s likely you’ll need to continue to support older Windows platforms, SocketTools will also automatically handle situations where an IPv6 stack is not installed, and it compensates for some internal differences between the various versions of Windows. The most complete support for IPv6 is available on Windows 7 and Windows Server 2008. You can install an IPv6 stack on Windows XP and Windows Server 2003, however it does not come pre-installed. There is also a preliminary version of an IPv6 stack that was made available for Windows 2000, however Microsoft never released it as an official update for the operating system.

We recommend that all developers begin looking into making the change to support IPv6, and you’re welcome to join the SocketTools 7 Beta Test that will be starting in January. If you have any questions about IPv6 support (or any of the other features in version 7) join us on our technical support forums.


Viewing latest article 5
Browse Latest Browse All 7

Trending Articles