Home  >  Article  >  What are the ipv6 address formats?

What are the ipv6 address formats?

不言
不言Original
2019-04-02 15:36:2378847browse

What are the ipv6 address formats?

According to the definition of RFC4291, IPv6 addresses have three formats: preferred format, compressed representation, and IPv6 address representation with embedded IPv4 address.

1. Preferred format

The IPv6 address length is 128 bits (bit). Divide the 128-bit address into a segment every 16 bits, and divide each Convert the segments to hexadecimal numbers and separate them with colons.

For example: 2000:0000:0000:0000:0001:2345:6789:abcd

2. Compressed representation

If a colon starts with ten In an IPv6 address expressed in hexadecimal notation, if several consecutive segment values ​​are 0, then these 0s can be abbreviated as::. There can only be one :: in each address.

2001:DB8:0:0:8:800:200C:417A

can be compressed to:

2001:DB8::8:800:200C:417A

3. IPv6 address representation with embedded IPv4 address

In this representation method, the first part of the IPv6 address is expressed in hexadecimal, and the IPv4 address part It is in decimal format:

There are two IPv6 address representations with embedded IPv4 addresses:

IPv4 compatible IPv6 address: 0:0:0:0:0:0192.168.1.2

IPv4 mapping IPv6 address: 0:0:0:0:0FFFF:192.168.1.2 or ::FFFF:192.168.1.2

The above is the detailed content of What are the ipv6 address formats?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn