Computer Network (4)-Detailed Explanation of IP Address

The previous section detailed the structure of the IP datagram and the meaning of each field in the IP header. This section will discuss how IP addresses that support powerful IP protocols are designed and used.

1. The history of IP address development

A major function of the IP protocol is to build the Internet, enabling large-scale, heterogeneous networks to interconnect. This is like a logistics company to pick up and deliver goods. It is essential to know the home address of each user. In the Internet, the same is true. Each computer must have a unique IP address in order to determine its position in the vast Internet. Because of the unique address, users can efficiently and conveniently select the objects they need from thousands of computers when operating on a networked computer.

The original version of the IP address is IPv4, which is a 4-byte 32-digit number, expressed in dotted decimal notation as abcd (abcd is a number between 0 and 255). IPv4 is already a very mature and successful design that has been widely used. The existing Internet is built on the basis of IPv4. But IPv4 has a problem of insufficient addresses. A total of about 4.2 billion IP addresses can be allocated with 32 digits, which have been allocated on November 25, 2019.

Faced with this problem, IPv6 came into being. The IPv6 address is a 16-byte 128-bit number, which solves the problem of insufficient addresses once and for all. It is estimated that IPv6 can assign an IP address to every grain of sand on the earth. In addition, IPv6 also considers some problems that are not well solved in IPv4, such as: end-to-end IP connectivity, quality of service (QoS), security, multicast, mobility, plug and play, etc. In the future, IPv6 is bound to shine, let us wait and see.

Two, IPv4 classification address

The IP address can be divided into two parts: network number and host number. This is like a school being split into multiple classes, and the students in each class have a student ID. The class number corresponds to the network number, and the student number corresponds to the host number. All hosts in the same network have different host numbers but the same network numbers.

IPv4 divides addresses into the following five types:
Insert picture description here

Class A address: The first eight digits are the network number and the network number starts with 0. Class A IP address range: 1.0.0.1 ~ 127.255.255.254. There are few available networks, only 126, but each network can accommodate more than 16 million hosts. Suitable for large networks

Class B address: IP address with the previous sixteen digits as the network number and the network number starting with 10. Class B IP address range: 128.0.0.1~191.255.255.254. The number of available networks is 16,384, and each network can accommodate more than 60,000 computers. Suitable for medium-sized networks

Class C address: The first twenty-four digits are the network number and the network number starts with 110. Class C IP address range: 192.0.0.1~223.255.255.254. There are more than 2.09 million available networks, and each network can only accommodate 254 computers. Suitable for small networks.

Class D address: multicast address, the network number starts with 1110. Class D address range: 224.0.0.0~239.255.255.255

Class E address: the address whose network number starts with 11110, reserved for future and experimental use

In addition to the above-mentioned five types of ABCDE addresses, there are also some IP addresses with special values, which are called special addresses. There are the following types of special addresses:

​ 1) All 0s (0.0.0.0) correspond to the current host, which can be used as the source address of the network, but cannot be used as the destination address

​ 2) The network number is all 0, and the host number is a specific value, which means that the special host of this network can be used as the destination address, not the source address

​ 3) All 1s (255.255.255.255) indicate the broadcast address of the current network, which can be used as the destination address but not the source address

​ 4) The network number is a specific value, and the host number is all 0s to indicate a network, which can neither be used as a destination address nor as a source address

​ 5) The network number is a specific value, and the host number is all 1s to indicate the broadcast address of the specific network, which can be used as the destination address, but not the source address

​ 6) The address with a=127 (abcd represents the IP address) represents the local loopback address. 127.0.0.1 can be used to represent the local address

Three, public address and private address

Public address: assigned to the organization that registered and applied to Inter NIC, through which it can directly access the Internet

Private address: non-registered address, specifically for internal use of the organization

Class A private address: 10.0.0.0~10.255.255.255, the number of networks is 1

Class B private address: 172.16.0.0~172.31.255.255, the number of networks is 16

0.0~10.255.255.255, the number of networks is 1

Class B private address: 172.16.0.0~172.31.255.255, the number of networks is 16

Class C private address: 192.168.0.0~192.168.255.255, the number of networks is 256

Guess you like

Origin blog.csdn.net/weixin_44580146/article/details/106876346