Subnet mask]

From the header of an IP datagram, it is impossible to determine whether the network to which the source or destination host is connected is subnetted.

Use the subnet mask to find out the subnet portion of an IP address.  

rule:

Subnet Mask Length = 32 bits

A series of 1s in the left part of the subnet mask, corresponding to the network number and subnet number

A series of zeros in the right part of the subnet mask, corresponding to the host number

 

 

 The subnet mask is an important attribute of a network or a subnet.

When a router exchanges routing information with neighboring routers, it must tell neighboring routers the subnet mask of its own network (or subnet).

For each item in the router's routing table, in addition to the destination network address, the subnet mask of the network must also be given.

If a router is connected to two subnets, it has two network addresses and two subnet masks.


Subnetting method

There are two subnetting methods: fixed-length subnetting and variable-length subnetting.

When a fixed-length subnet is used, the subnet mask of all the divided subnets is the same .

Although according to the RFC 950 document, which has become a standard protocol for the Internet, subnet numbers cannot be all 1s or all 0s, with the widespread use of CIDR for classless inter-domain routing, all 1s and all 0s can now be used for subnet numbers Yes, but use it with caution and make sure your router's routing software supports the newer usage of all-zeros or all-ones subnet numbers.

Subnetting increases flexibility but reduces the total number of hosts that can be connected to the network

example

 

 

Guess you like

Origin blog.csdn.net/u012632105/article/details/123663073