Home > Article > Operation and Maintenance > What is the difference between IPv4 and IPv6
Differences: 1. IPv4 is a binary number expressed in decimals, with 32 bits; IPv6 is a binary number expressed in hexadecimal, with 128 bits. 2. IPv4 data packets require 576 bytes and the header length is 20 bytes; IPv6 data packets require 1280 bytes and the header length is 40 bytes. 3. IPv4 address (A) record, IPv6 address (AAAA) record. 4. IPv4 has built-in IPSec support, while IPv4 is optional. 5. Pv6 provides authentication and encryption, but IPv4 does not.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
IPv4 and IPv6 are the two Internet protocol versions currently in use. There are various differences between the IPv4 and IPv6 protocols, including their functions, but the key point is the address (address space) it generates. Quantity difference. Below we will introduce to you the differences between IPv4 and IPv6 protocols in detail.
1. The difference between protocol addresses
1), address length
IPv4 protocol has a 32-bit (4 bytes) address length; IPv6 protocol With a 128-bit (16-byte) address length
#2), the address representation method
IPv4 address is a binary number expressed as a decimal. IPv6 addresses are binary numbers represented in hexadecimal notation.
3) Address configuration
The IPv4 protocol address can be configured manually or through DHCP. [Recommended related video tutorials: HTTP video tutorial]
The IPv4 protocol requires the use of Internet Control Message Protocol version 6 (ICMPv6) or DHCPv6 Stateless Address Autoconfiguration (SLAAC).
2. Differences in data packets
1) Packet size
IPv4 protocol data packets require 576 bytes, fragmentation is optional . The data packet of the IPv6 protocol requires 1280 bytes and will not be fragmented
2), the header
The length of the IPv4 protocol header is 20 bytes and does not identify data used for QoS processing Packet stream, including checksum, containing options field of up to 40 bytes.
The IPv6 protocol header is 40 bytes in length and contains the Flow Label field of the packet flow specified by QoS processing, excluding checksum; the IPv6 protocol has no field, but the IPv6 extension header is available.
3) Packet fragmentation
IPv4 protocol packet fragmentation will be completed by the forwarding router and the sending host. Packet fragmentation of the IPv6 protocol is only done by the sending host.
Data packet
3. DNS record
IPv4 protocol address (A) record, mapping host name; pointer (PTR) record, IN-ADDR.ARPA DNS domain.
IPv6 protocol address (AAAA) record, mapped host name; pointer (PTR) record, IP6.ARPA DNS domain
4, IPSec support
IPSec support for the IPv4 protocol is only optional. The IPv4 protocol has built-in IPSec support.
5. Authentication and encryption
Pv6 provides authentication and encryption, but IPv4 does not.
【Related recommendations:】
PHP HTTP protocol video tutorial
The above is the detailed content of What is the difference between IPv4 and IPv6. For more information, please follow other related articles on the PHP Chinese website!