IP address and subnet mask (2)

zhaozj2021-02-17  60

Second, subnet mask

(1) subnet

TCP / IP network technology is generated in a large mainstream environment, it can develop to today's scale is the original

Designers are noted. The rapid expansion of the scale of the network network to the IP address pattern is not it

You cannot guarantee the uniqueness of the host address, but will bring two burden: first, huge network

Site management overhead; second, the gateway finds a sharp expansion. The second point is especially prominent, the expansion of the diameter table

Not only will the gateway finding the diameter efficiency (or even spilled the finding table, resulting in finding diameter failure),

It is important to increase the overhead of the internal and external paths to increase the network burden.

Therefore, there is an urgent need to seek new technologies to deal with problems brought about by gross scale growth. Carefully

It is found that the growth of the network network size is mainly manifested as the increase or decrease of network addresses, so solving problems.

Ideaidity: How to reduce the network address. So the multiple duplicate techniques of the IP network address came into being.

Through multiplexing technology, a number of physical networks share the same IP network address, which will undoubtedly reduce network addresses.

number.

Subnet Addressing Technology, also called subnet finding, English

Text referms of Subnetting, is the most widely used IP network address multiplexing method, which is currently standardized.

And become part of the IP address mode.

General, 32-bit IP addresses are divided into two parts, namely the network number and host number, we call them separately

Make an IP address of "Network Network Section" and "Local Part". Subnet addressing technology will further

It is divided into "physical network" and "host" parts, as shown:

Network network part

Physical network

Host

| ← Network part → | ← ──────────────── → |

Among them, "physical network" is used to identify different physical networks under the same IP network address, both

network".

(2) Subnet mask

IP protocol standard stipulates: Each point of use of subnets selects a 32-bit bit mode, if the mode

A location in the formula 1, the corresponding IP address is a network address (including the network part and physical

One of the network number; if a bit 0 in the mode is 0, the corresponding IP address is the host

One of the locations in the address. For example, bit mode:

11111111 11111111 11111111 00000000

In the top three bytes all 1, representing the highest three bytes in the IP address as the network address; then one

The byte is all 0, which represents the last byte in the corresponding IP address as the host address. This mode is called a child.

Subnet Mask or "Subnet Mask".

For the convenience of use, it is often used to represent an IP address and subnet mask.

Code, such as the B-class address subnet mask (11111111 11111111 11111111 000000) is:

255.255.255.0

IP protocols provide an interesting flexibility about the definition of subnet mask, allowing "0" in the subnet mask.

And "1" is discontinuous. However, such a subnet mask gives allocated host addresses and understanding

It is difficult to have difficulties, and very little router supports the use of low sequence or disorder in the subnet, so

In practical applications, each point is usually used in a continuous method of subnet mask. Like 255.255.255.64 and

255.255.255.160 The subnet mask such as a class is not recommended.

(3) The subnet mask is combined with the IP address subnet mask and the IP address to distinguish between a network number and host number of a network address.

For example: There is a C class address:

192.9.200.13

Its default subnet mask is:

255.255.255.0

Then, its network number and host number can be obtained as follows:

1 Convert IP address 192.9.200.13 to binary

11000000 00001001 11001000 00001101

2 Convert the subnet mask 255.255.255.0 to binary

11111111 11111111 11111111 00000000

3 The result obtained after two binary logic and (and) operations is network part

11000000 00001001 11001000 00001101

AND

11111111 11111111 11111111 00000000

11000000 00001001 11001000 000,00000

The result was 192.9.200.0, ie 192.9.200.0.

4 The result of the subnet mask to retrore and the IP address logic and (AND) are the host part

11000000 00001001 11001000 00001101

AND

00000000 00000000 00000000 000000 000000 0000-00 000000 0000.

00000000 00000000 000000 00 00 00 00 00000000 00001101

The result is 0.0.0.13, that is, the host number is 13.

转载请注明原文地址:https://www.9cbs.com/read-29519.html

New Post(0)