【IP Technology】What is an IP address?

1. The concept of IP address

The IP address is a 32-bit binary number, which consists of two parts, the network ID and the host ID, and is used to uniquely identify a computer in the network. The network ID is used to identify the network segment where the computer is located; the host ID is used to identify the location of the computer in the network segment. The IP address is usually represented by 4 groups of 3-digit decimal numbers separated by ".".

2. IP address classification

1. Network address

An IP address is composed of a network number (including a subnet number) and a host number. The host number of a network address is all 0, and the network address represents the entire network.

2. Broadcast address

The host number of the broadcast address is exactly the opposite of that of the network address. In the broadcast address, the host number is all 1s. When a message is sent to the broadcast address of a network, all hosts in the network can receive the broadcast message.

3. Various addresses

Class A addresses start with 0, the first byte is used as the network number, and the address range is: 0.0.0.0~127.255.255.255;

Class B addresses start with 10, the first two bytes are used as the network number, and the address range is: 128.0.0.0~191.255.255.255;

Class C addresses start with 110, the first three bytes are used as the network number, and the address range is: 192.0.0.0~223.255.255.255.

Class D addresses start with 1110, and the address range is 224.0.0.0~239.255.255.255. Class D addresses are used as multicast addresses (one-to-many communication);

Class E addresses start with 1111, and the address range is 240.0.0.0~255.255.255.255. Class E addresses are reserved for future use.

4. Restricted broadcast address: 255.255.255.255

This IP address refers to a restricted broadcast address. The difference between a restricted broadcast address and a general broadcast address (direct broadcast address) is that the restricted broadcast address can only be used in the local network, and the router will not forward the packet with the restricted broadcast address as the destination address; the general broadcast address can be broadcast locally or across network segments.

5、0.0.0.0

It is often used to find its own IP address. If a diskless machine with an unknown IP address wants to know its own IP address, it uses 255.255.255.255 as the destination address to send an IP request packet to a server within the local range.

6. Loopback address

127.0.0.0/8 is used as the loopback address. The loopback address indicates the address of the local machine. It is often used for testing the local machine. The most used one is 127.0.0.1.

7. Class A, B, and C private addresses

Private addresses are also called private addresses, they are not used globally and only have local significance.

Class A private address: 10.0.0.0/8, range: 10.0.0.0~10.255.255.255

Class B private address: 172.16.0.0/12, the range is: 172.16.0.0~172.31.255.255

Class C private address: 192.168.0.0/16, range: 192.168.0.0~192.168.255.255

IP66 online check IP location location: IP66_ip attribution online query_free ip query_ip precise positioning platform

3. Network ID, host ID and subnet mask

The network ID is used to indicate which network the computer belongs to. Computers with the same network ID can communicate directly without being connected through a router. We call computers with the same network ID a network called a local network; computers with different network IDs must be connected through a router. We call computers with different network IDs remote computers.

When an IP address is assigned to a computer, which part of the computer's IP address represents the network ID and which part represents the host ID is not determined by the class to which the IP address belongs, but by the subnet mask. The subnet mask determines which subnet an IP address belongs to. The format of the subnet mask is represented by consecutive 255 followed by consecutive 0s, where the continuous 255 part represents the network ID; the continuous 0 part represents the host ID. The number of hosts in each network with subnet masks in this format differs by at least 256 times, which is not conducive to the flexible allocation of IP addresses according to the needs of enterprises.

Guess you like

Origin blog.csdn.net/TTmanghe/article/details/131086669