V6 expression of IPV4

Source: Internet
Author: User

The IPV6 V6 representation ensures the compatibility between IPV4 and IPv6 nodes in a hybrid network environment. The IPV6 address provides a combination of colons and dot notation, you can embed an IPv4 address into an IPv6 address. Specify the hexadecimal value for 96 digits on the leftmost side and the decimal value for 32 digits on the rightmost side to indicate the embedded IPv4 address. The two types of IPv6 addresses use this optional format: IPv6 addresses mapped through IPv4 are used to express IPv4 nodes as IPv6 addresses. It allows IPv6 applications to communicate directly with IPv4 applications. For example, 0: 0: 0: 0: 0: ffff: 192.1.56.10 and: ffff: 192.1.56.10/96 (short format ). IPv4-compatible IPv6 addresses. This type of address is used for tunneling. It allows IPv6 nodes to communicate with each other through the IPv4 infrastructure. For example, 0: 0: 0: 0: 0: 0: 192.1.56.10 and: 192.1.56.10/96 (short format ). In addition, the int accept (int sockfd, struct sockaddr * addr, socklen_t * addrlen) function fills in the client address "should" have the same address family as the initial socket (sockfd. Based on the above two points: In a hybrid network node (both IPV4 and IPV6 are supported), the server accepts the client connection request and uses the address conversion function const char * inet_ntop (int af, const void * src, char * dst, socklen_t size); the IPV4 address of the converted client should be in the format of: ffff: 192.1.56.10.

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.