Home > Common Problem > body text

What identification code does the IP address include?

青灯夜游
Release: 2022-12-05 14:16:19
Original
16585 people have browsed it

Each IP address includes two identification codes (ID), namely network ID and host ID. All hosts on the same physical network use the same network ID. A host on the network (including workstations, servers, routers, etc.) on the network has a host ID corresponding to it.

What identification code does the IP address include?

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

IP address (Internet Protocol Address) refers to the Internet Protocol address, also translated as Internet Protocol address.

The IP address is a unified address format provided by the IP protocol. It assigns a logical address to each network and each host on the Internet to shield the differences in physical addresses.

IP address addressing method

When the Internet was originally designed, in order to facilitate addressing and hierarchically construct the network, each IP address includes Two identification codes (ID), namely network ID and host ID. All hosts on the same physical network use the same network ID. A host on the network (including workstations, servers, routers, etc.) on the network has a host ID corresponding to it. The Internet Committee has defined 5 IP address types to suit networks of different capacities, namely Class A ~ Class E.

Among them, categories A, B, and C3 (table below) are uniformly allocated globally by InternetNIC, and categories D and E are special addresses.

##B16384(2^14)128.0.0.0-191.255.255.25565534172.16.0.0-172.31.255.255C2097152(2^21)192.0.0.0-223.255.255.255254

Class A IP address

A Class A IP address means that among the four numbers in the IP address, the first number is the network number, and the remaining three numbers are is the number of the local computer. If the IP address is represented in binary, the Class A IP address consists of a 1-byte network address and a 3-byte host address. The highest bit of the network address must be "0". The length of the network identifier in a Class A IP address is 8 bits, and the length of the host identifier is 24 bits. The number of Class A network addresses is relatively small, with 126 networks, and each network can accommodate more than 16 million hosts.

Class A IP address address range 1.0.0.1 to 127.255.255.254 [2] (binary representation is: 00000001 00000000 00000000 00000001 - 01111111 11111111 11111111 11111110). The last one is the broadcast address.

Class B IP address

A Class B IP address means that among the four numbers in the IP address, the first two numbers are network numbers. If the IP address is represented in binary, the Class B IP address consists of a 2-byte network address and a 2-byte host address. The highest bit of the network address must be "10". The length of the network identifier in the Class B IP address is 16 bits, and the length of the host identifier is 16 bits. Class B network addresses are suitable for medium-sized networks. There are 16,384 networks, and each network can accommodate more than 60,000 computers. tower.

Class B IP address range 128.0.0.1-191.255.255.254 [1] (Binary representation is: 10000000 00000000 00000000 00000001----10111111 11111111 11111111 11111110). The last one is the broadcast address.

The subnet mask of Class B IP address is 255.255.0.0, and the maximum number of hosts supported by each network is 256 to the power of 2-2=65534.

Class C IP address

A Class C IP address means that among the four numbers in the IP address, the first three numbers are network numbers, and the remaining A number is the number of the local computer. If the IP address is represented in binary, the Class C IP address consists of a 3-byte network address and a 1-byte host address. The highest bit of the network address must be "110". The length of the network identifier in a Class C IP address is 24 bits, and the length of the host identifier is 8 bits. There are more Class C network addresses, with more than 2.09 million networks. Suitable for small-scale local area networks, each network can only contain up to 254 computers.

Class C IP address range 192.0.0.1-223.255.255.254 (binary representation is: 11000000 00000000 00000000 00000001 - 11011111 11111111 11111111 11111110).

The subnet mask of Class C IP address is 255.255.255.0, and the maximum number of hosts supported by each network is 256-2=254

Class D IP address

Class D IP addresses were historically called multicast addresses, that is, multicast addresses. In Ethernet, a multicast address names a set of stations on the network that should receive a packet. The highest bit of the multicast address must be "1110", ranging from 224.0.0.0 to 239.255.255.255.

Special URL

  • The address where each byte is 0 ("0.0.0.0") corresponds to the current host;

  • An IP address in which each byte in the IP address is 1 ("255.255.255.255") is the broadcast address of the current subnet;

  • All IP addresses starting with "11110" in Class E are reserved for future and experimental use.

  • The IP address cannot start with the decimal "127". The numbers 127.0.0.1 to 127.255.255.255 in this type of address are used for loop testing, such as : 127.0.0.1 can represent the IP address of this machine. Use "http://127.0.0.1" to test the Web server configured in this machine.

  • The first 6-digit group of the network ID cannot be set to all "0". All "0" indicates the local network.

For more related knowledge, please visit: PHP Chinese website!

Category
Maximum number of networks
IP address range
Maximum number of hosts in a single network segment
Private IP address range
A
126 (2^7-2)
1.0.0.1-127.255.255.254
16777214
##10.0.0.0-10.255.255.255
##192.168.0.0-192.168.255.255

The above is the detailed content of What identification code does the IP address include?. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!