Subnetting and Subnet Masking

subnetting

insert image description here
After a unit divides subnets, it still appears as a network to the outside world, that is, the network outside the unit cannot see the division of subnets in the unit.
insert image description here
That is, the datagram whose destination address is 145.13.xx can reach this router.

subnet mask

insert image description here
The number corresponding to the host number is 0, and the number corresponding to the network number and subnet number is 1.
Note: The subnet mask of the two-level IP address in the above figure is converted to binary as 255.255.0.0.

example

1. The known IP address is 141.14.72.24, and the subnet mask is 255.255.192.0. Find the network address.
Solution:
Since 255 is converted to binary as 11111111, the "AND" value with any number remains unchanged, so the network number of the IP address is still 141.14. The same is true for 0. So just AND 72 with 192 to get the final answer.
Some commonly used binary conversion to decimal:
insert image description here
2. The IP address of a certain host is 180.80.77.55, and the subnet mask is 255.255.252.0. If the host sends a broadcast packet to its subnet, the destination address can be (D).
A. 180.80.76.0 B. 180.80.76.255 C. 180.80.77.255 D. 180.80.79.255
Solution:
Convert 252 to binary: 11111100. Therefore, the subnet number is 6 digits. So the network where the subnet resides is 180.80.79.0. Because the host number is 1, the remaining two digits of the subnet number are also 1, so it becomes 79. So the destination address is: 180.80.79.255

Packet forwarding when using subnets

insert image description here

Guess you like

Origin blog.csdn.net/weixin_51711289/article/details/128401755