Web Design
Mobile Internet
Brand Design
Innovative
News
Encyclopedias

What is a subnet mask

Date:2015-06-27 Source: Shangpin China Type: website encyclopedia
Word Size: small   medium   big

Subnet segmentation technology: It is used to identify the subnet number by identifying "borrowed" bits from the host. That is, from left to right, some bits originally belonging to the Host ID are borrowed as needed to identify the subnet ID, that is, Sub Net ID. Subnet mask: used to indicate that an IP address network ID includes a 32-bit description of the subnet ID. When only the network ID can be specified without the subnet ID, it is called the default mask.

The correspondence between the subnet mask and the IP address: the "bits" of the network ID part of an IP address (including the subnet ID) corresponding to the subnet mask are all I, and the "bits" of the host ID part corresponding to the subnet mask are all 0. The "AND" operation is performed through the IP address and the subnet mask. The subnet mask Website design The host ID is partially masked, and the network ID (including subnet ID) of the IP address is obtained.

[Example 4] An IP address 172 16.12.1, the default mask is 255 255.0.0。 After the subnet is divided, the subnet ID "borrows" 8 bits from the host ID, so the subnet mask is 255 255. 255. 0, see Figure 4-23
 Subnet mask


The network segment number 172 of the IP address can be obtained by the AND operation of the IP address and the subnet mask 16. 12. 0, see Figure 4-24.

The host number of the IP address can be obtained by computing the subnet mask "NOT" and then the IP address "AND"; The direct broadcast address of the network where the IP address is located can be obtained by the "NOT" operation of the subnet mask followed by the "OR" operation with the IP address. Note Another way to express the It subnet mask is to use "/16" to indicate that the subnet mask has 16 bit 1, and "/24" to indicate that the subnet mask has 24 bit 1.

Note 2: The subnet mask cannot exist alone and must be used together with the IP address. [Example 5] It is still Example 3, but the subnet segmentation technology is applied, as shown in Figure 4-25.
 Subnet division and subnet technical support
Network deployment: The upper 8 bits of the host ID are used for the subnet ID. The subnet mask of the two subnet segments separated by router connection is 24 bits. The left subnet is 172.16.1.0, and the right subnet is 172.16.2.0. When the hosts located in the two subnets communicate with each other, such as 172.16 1.2 Send IP packets to 172.16.2.2. At the sending end, the sending host performs an AND operation between the destination IP address and the subnet mask, and judges that the destination host and the host are not in the same subnet. Therefore, the sending host gives the IP packet to the router (i.e. the default gateway 172 16. 1. 1); After receiving the IP packet, the router "AND" its destination IP with the subnet mask, and the destination network segment is 172,16.2.0; Then, according to the routing table, it is judged that the IP packet is forwarded via the port El.

The application of subnet partition technology not only realizes the communication between subnets, but also uses IP resources reasonably and effectively, and at the same time, improves the communication ability of the network.


Please contact our consultant

+86 10-60259772

Please provide your contact number. The project manager of shangpin China will contact you as soon as possible.