Home > Common Problem > body text

An ipv4 address consists of several binary digits

青灯夜游
Release: 2022-11-24 16:31:09
Original
67981 people have browsed it

IPv4 addresses consist of 32-bit binary numbers. IPv4 is the 4th version of the Internet communication protocol. IPv4 uses 4 bytes. Each section contains 8 address bits. A total of 32 binary digits represent the network address. According to the number of binary digits of ipv4, it can be seen that ipv4 can represent a total of networks. The address is 2 raised to the 32nd power, which is equal to 4294967296, which is approximately 4.3 billion.

An ipv4 address consists of several binary digits

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

An IPv4 address is composed of 32-bit binary numbers, or represented by four groups of 8-bit binary numbers.

What is ipv4?

Internet Protocol version 4 (English: Internet Protocol version 4, IPv4), also known as the fourth version of the Internet Communication Protocol, is the fourth revised version in the development process of the Internet Protocol, and is also The first widely deployed version of this protocol. IPv4 is the core of the Internet and the most widely used version of the Internet Protocol. Its successor version is IPv6. Until 2011, when the IANA IPv4 addresses were completely exhausted, IPv6 was still in the early stages of deployment.

IPv4 is a connectionless protocol that operates on the link layer (such as Ethernet) using packet switching. This protocol delivers packets on a best-effort basis, meaning that it does not guarantee that any packet will reach its destination or that all packets will arrive in the correct order without duplication. These aspects are handled by upper-layer transport protocols (such as Transmission Control Protocol).

ipv4 works in the network layer of the OSI seven-layer network model. The IP address is a logical address provided by each network or each host on the Internet to shield the difference in physical addresses.

How many bits does ipv4 have?

ipv4 uses 4 bytes, a total of 32 binary numbers to represent the network address. According to the binary digits of ipv4, it can be seen that the total network address that ipv4 can represent is 2 to the 32nd power, which is equal to 4,294,967,296, which is approximately 4.3 billion.

However, there are not so many routing addresses available on the Internet because some addresses are reserved for special purposes.

An ipv4 address consists of several binary digits

ipv4 format

ipv4 format is divided into 32 bits, divided into 4 segments, each segment 8 binary digits separated by decimal points.

Classification of ipv4

In the 32-bit binary number of ipv4, the high bit is defined as the network class, and the remaining bits represent the host identification code . According to this definition, IPv4 is divided into five types of addresses, namely A, B, C, D and E.

An ipv4 address consists of several binary digits

Class A:

In a Class A network, the first bit is fixed to binary "0", and 7 bits are used to represent the network Category, the remaining 24 bits represent the host, and the range is 1.0.0.1~126.255.255.254 (0 and 127 are not available).

There are a total of 126 Class A addresses, and since the host number cannot be all 0s and all 1s, each Class A address can be connected to 2 raised to the 24th power minus 2, for a total of 16,777,216-2=16,777,214 units host.

Class B:

In a Class B network, the first two digits are fixed to binary "10", the 14 digits represent the network number, and the last 16 digits represent the host identification number. The representation range is 128.0.0.1~191.255.255.254 (the Class B network address 128.0.0.0 is not assigned).

Then there are a total of 2 to the power of 14 minus 1 for Class B networks, a total of 16383. Each Class B address can accommodate 2 to the 16th power minus 2, for a total of 65536-2=65534.

Class C:

In a Class C network, the first two digits are fixed to binary "110", the 21 digits represent the network number, and the last 8 digits represent the host identification number. The representation range is 192.0.0.1~223.255.255.254.

Then there are a total of 2 to the 21st power of Class C networks, a total of 2,097,152. Each Class C address can accommodate 2 to the 8th power minus 2, for a total of 256-2=254.

Class D: 224~239, multicast address

Class E: 240~254, reserved for research and testing use

For more related knowledge, please visit the FAQ column!

The above is the detailed content of An ipv4 address consists of several binary digits. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template