How badly will IPv6 break your application? What do you need to consider to make your application “IPv6-ready”? What questions should you ask?
In the ideal world, your application should “just work” on IPv6, just as it does on IPv4. However, in the real world, application issues crop up. These could be as simple as having a user interface field that only allows the input of dotted-decimal IPv4 addresses, or something more fundamental, such as an application binding exclusively to an IPv4 transport interface.
While there have been many books published about IPv6, including O’Reilly’s own IPv6 Essentials and IPv6 Network Administration, almost all existing books focus on understanding the protocol itself and using it at a network layer. They contain much discussion about using network-level tools and even about creating applications that interact directly with the network. However, the concerns related to IPv6 at the upper application layers are mentioned only briefly, if at all. The Internet Engineering Task Force (IETF) has published RFC 4038, which addresses many of these concerns, but the concerns have not found their way out into mainstream books.
This short book is designed to help you understand what you need to think about to be sure that your app will work as well with IPv6 as it does with IPv4. This book is not so much about all the solutions but rather about the questions you need to be asking.
For IPv6 to truly be adopted on a large scale, ultimately the applications running on our desktop systems, laptops, and mobile devices all need to play nice with IPv6. That is the end goal of this book—to help enable individuals, companies, and organizations to migrate their apps to IPv6 so that they can transition their networks into IPv6 networks.
Given that now many companies are just starting to pay attention to IPv6, and given that many apps are just now moving to IPv6, this book will continue to evolve to address issues identified as more applications make the move. I’d love to receive any feedback you have on issues you encounter in migrating your apps to IPv6—and I expect that you’ll see updates to this book come out over time.
As this book is updated in early 2012, there are several critical reasons why developers really need to be paying attention to IPv6 right now:
IPv4 address exhaustion is getting closer. In February 2011, the Internet Assigned Numbers Authority (IANA) allocated the last IPv4 address blocks out to the “Regional Internet Registries” who ultimately distribute IPv4 addresses to Internet service providers (ISPs) and end users. There simply are no more IPv4 addresses to distribute. Now, the RIRs do have existing pools of IPv4 addresses that may in fact last for a few more years, but very soon the options will be increasingly limited and more and more networks will be looking to IPv6 as the solution to bring more devices and users online.
World IPv6 Launch is happening on June 6, 2012. On that date (and potentially before), IPv6 will be permanently enabled for many websites by more ISPs and by many home router vendors. Major websites and services such as Google, Facebook, Yahoo, YouTube, Netflix, and more will be permanently accessible over IPv6. Very large ISPs have committed to providing IPv6 connectivity to a larger percentage of their customer base. There will be more end users out there using IPv6—and more cases where your application may not work if it doesn’t work well with IPv6.
The Internet Engineering Task Force (IETF) has specified that IPv6 is no longer considered optional. RFC 6540, “IPv6 Support Required for All IP-Capable Nodes,” issued in April 2012, states very explicitly that IPv6 can no longer be considered optional and that all nodes connected to IP networks need to support IPv6. While this RFC cannot be directly enforced with today’s networks, it does provide a clear direction for implementors to move and also firmly indicates that future IETF standards will require IPv6. You will need to work with IPv6 for your application to work in future networks.
Your application may not work or may suffer performance degradations with IPv4 extension technologies. There are a number of technologies being considered by service providers and enterprises to extend the life of IPv4 addresses and delay the need to move to IPv6. One of the major techniques being considered is called “Carrier Grade Network Address Translation (NAT)” or CGN. CGN is basically the idea of using a second layer of NAT at the ISP level to hide an entire ISP’s network behind a single public IPv4 network. However, the problem is that some applications, particularly those that use real-time communications or are sensitive to latency, may not work at all or may suffer serious performance degradation when used behind CGN. A recent presentation at the 2012 North American IPv6 Summit documented some research into this issue. In many cases, applications that work over native IPv6 networks worked fine while IPv4-only applications suffered these performance issues.
For all of these reasons, it is now critical to look at your applications and determine whether or not they will work with IPv6—and if they won’t, how you can fix them so that they will.
Are you an application developer? A product manager? A product marketing manager? A documentation author? A training instructor? A system/network architect? This book is designed to help you understand what issues you need to explore with your application.
Developers, you will come away with enough information to go through your application and make the necessary changes. Product managers, you will gain an understanding of what points you need to consider—and what you need to ask of your technical teams. If you are in marketing, documentation, or training, you will get a good sense of what you’ll need to think about changing in your materials. And if you are a system/network architect looking at your overall IPv6 implementation, you should leave with a better sense of what changes may need to be considered across the applications that are deployed in your infrastructure.
This book is not a tutorial in the details of IPv6. The focus is on IPv6 issues as they relate to application developers and the book does not get into topics such as network-layer changes between IPv4 and IPv6. If you would like to gain a deeper understanding of IPv6, I recommend also reading IPv6 Essentials by Silvia Hagen.
To start your dive into IPv6 application migration, Chapter 1, User Interface Changes, explores one of the biggest ways that IPv6 may impact your application: all the many little tweaks you may need to make to your user interfaces. These could be changes to your display or input fields—or something more subtle, like the fact that you may have to think about capitalization in IP addresses.
Chapter 2, DNS Changes, explains the new DNS records for IPv6 addresses and explains how a “happy eyeballs” approach can get users the information they want in the fastest way possible.
Chapter 3, Application Programming Interfaces (APIs), raises questions around APIs, both those your app provides and those your app uses, and how they treat IP addresses.
Chapter 4, Storage of IP Addresses, wraps up this first bit of the book by exploring how you store the IPv6 addresses you receive from user input, DNS, or APIs. If you store them in a memory location, is the location big enough or will there be a buffer overflow? Can a configuration file accommodate both IPv4 and IPv6 address types?
Chapter 5, Transport Layer, drops down briefly into the network layer to discuss issues application developers may need to think about. Does your application work in a dual-stack system? Will it bind to both addresses? Does it need to care about multiple IPv6 addresses or about IPv6 privacy extensions? And is NAT a concern at all?
Chapter 6, Documentation, Training, and Testing, explores three areas that complement your actual application—documentation, training, and testing—and asks how you are handling IPv6 in those areas.
Finally, the book wraps up with Chapter 7, Resources and Next Steps, providing links to more about migrating applications and a checklist summarizing the key questions from the earlier chapters.
Added a new section on recent events and changes that make it critical for application developers to be thinking about IPv6
Added section on connecting to DNS servers over IPv6 and about DNS and DHCPv6
Added sidebar about RFC 5952, “A Recommendation for IPv6 Address Text Representation”
Expanded text about “Happy Eyeballs” algorithm and included mention of RFC 6556 for testing for happy eyeballs
Added info about lessons from World IPv6 Day
Added info about World IPv6 Launch in 2012
Added new section on testing resources
Added new sectino about setting up an IPv6 test network
Updated IPv6 NAT information to point to RFC 6296
Added warning about SMTP’s way of showing IPv6 addresses
Added additional resources, including a new section about some informational RFCs that may be of interest to application developers
The following typographical conventions are used in this book:
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
This icon signifies a tip, suggestion, or general note.
This icon indicates a warning or caution.
This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Migrating Applications to IPv6 by Dan York (O’Reilly). Copyright 2011 Dan York, 978-1-449-30787-5.”
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at email@example.com.
Safari Books Online is an on-demand digital library that lets you easily search over 7,500 technology and creative reference books and videos to find the answers you need quickly.
With a subscription, you can read any page and watch any video from our library online. Read books on your cell phone and mobile devices. Access new titles before they are available for print, and get exclusive access to manuscripts in development and post feedback for the authors. Copy and paste code samples, organize your favorites, download chapters, bookmark key sections, create notes, print out pages, and benefit from tons of other time-saving features.
O’Reilly Media has uploaded this book to the Safari Books Online service. To have full digital access to this book and others on similar topics from O’Reilly and other publishers, sign up for free at http://my.safaribooksonline.com.
Please address comments and questions concerning this book to the publisher:
|O’Reilly Media, Inc.|
|1005 Gravenstein Highway North|
|Sebastopol, CA 95472|
|800-998-9938 (in the United States or Canada)|
|707-829-0515 (international or local)|
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:
To comment or ask technical questions about this book, send email to:
For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
Dan York also maintains his own site with information about this book, including notes about his IPv6-related presentations, links to webinars, and other resources at:
More information about Dan York can be found at:
Dan can be contacted via email at:
You can follow Dan on Twitter at:
He welcomes feedback about this book through any channel, and would even accept that feedback via pen on paper…although no one seems to do that anymore.
First, I’d like to thank Mike Loukides of O’Reilly Media for approaching me about this project. I’d submitted a proposal (which was accepted) to speak on this issue at OSCON 2011 and Mike asked, simply, “Would you like to write a short ebook on the topic?” As the world of publishing is going through such incredible changes, it’s great to work with a publisher like O’Reilly that is open to trying out new approaches. I’m looking forward to seeing how this all works out.
My wife once again read through every page and section, offering me critical feedback, even though the subject area has absolutely zero interest to her. One of these days, dear, I will try my hand at a fiction book or something outside the tech sphere.
I’d like to thank three friends from the IETF and SIP circles — Olle Johansson, Alan Johnston, and Dan Wing — who reviewed my initial outline and provided excellent feedback.
I’d also like to thank my colleagues at my former employer, Voxeo, for developing dual-stack versions of their Prophecy and PRISM communications application platforms. It’s incredibly awesome when your personal passions and interests (such as IPv6) can intersect so nicely with what is going on at work.
Naturally I’d like to thank my colleagues at the Internet Society who are working each day to further the deployment of IPv6. May this book help that effort in some small way.
Thanks, too, to all the participants in the IPv6-related webinars I’ve given recently, who asked me tough questions and deepened my own understanding of the migration challenges with IPv6.
Finally, I’d like to thank all the engineers, administrators, technicians, architects, and everyone else who has been working so long and so hard to bring about the migration to IPv6. Thank you all for continuing to believe and to do all that you do.