Using Java to develop compatible IPV6 network applications

Source: Internet
Author: User

Introduction: According to the deployment speed of the existing IPV4 address, the remaining addresses will be used in 10-20 years. Therefore, the network gradually from IPV4 to IPv6 conversion is inevitable, the corresponding various network applications will support IPV6. For Java, starting from its version 1.4 to provide better support for IPV6, the programmer basic shielding IPv4 and IPv6 differences, but there are still some IPv6 caused by the changes we need to handle carefully. In this context, this article describes how to use existing Java technologies to address these changes.

IPV6 Background Introduction

At present we are using second-generation Internet IPV4 technology, its biggest problem is network Address resource is limited, theoretically, can address 16 million network, 4 billion host. However, the use of A, B, C three-type address, the number of available network addresses and host address is greatly reduced, so that the current IP address near exhaustion. The network address is insufficient, has restricted the global Internet application and the development seriously.

On the one hand is the limit of the number of address resources, on the other hand, with the development of electronic technology and network technology, the computer network will enter People's daily life, every thing around may need to connect to the global Internet. In this environment of lack of network space, IPv6 emerged. It has not only solved the problem of the number of network address resources, but also for the computer equipment in addition to the Internet in the number of restrictions on the removal of obstacles.

If the IPv4 realizes only the man-machine conversation, then IPv6 expands to the dialogue between any thing, it not only can serve for the human, but also will serve many hardware devices, such as household appliances, sensors, remote cameras, automobiles, etc., it will be all the time, everywhere in the deep society every corner of the real broadband network, The economic benefits it brings will also be huge.

Of course, IPV6 is not perfect, once and for all, it is impossible to solve all problems. IPV6 only in the development of continuous improvement, and can not happen overnight, the transition takes time and cost, but in the long run, IPv6 is conducive to the sustainable development of the Internet and long-term. At present, the Internet organization has decided to set up two specialized working groups to develop corresponding international standards.

Java Support for IPV6

As IPV6 has become more and more valued by the industry, Java has started to support IPV6 on Linux and Solaris platforms from version 1.4. Version 1.5 is added to the support on the Windows platform. Rather than C++,java, which encapsulates the IPv4 and IPV6 changes, legacy code can natively support IPv6 without changing the actual implementation at the bottom.

So how does Java support IPV6? The Java network stack gives priority to checking whether the underlying system supports IPV6, and what IP stack system is used. If it is a dual-stack system, it creates a IPv6 socket directly (Figure 1).

Figure 1. Double stack Structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.