Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The relationship between the number of subnets, hosts and subnet mask

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

1. Calculate the subnet mask using the number of subnets

What is the subnet mask for dividing the class B address 172.16.0.0 into 30 subnetworks?

① converts the number of subnetworks 30 to a binary representation of 11110

② calculates that the binary number has five digits.

③ Note: when there is only one 1 in the binary number, the number of digits counted needs to be subtracted by 1 (for example, 10000 should be counted as 4 digits).

④ changes the first five bits of the subnet mask 255.255.0.0 host address portion of a Class B address to 1

⑤ then gets the required subnet mask (11111111.11111111111000.00000000) 255.255.248.0.

2. Use the number of hosts to calculate the subnet mask

The class B address 172.16.0.0 is divided into several subnetworks, each of which can hold 500 hosts. What is its subnet mask?

① converts 500 to binary for 111110100

② calculates that the binary number has 9 digits.

③ changed the subnet mask 255.255.255.255 from 9 bits back to forward to 0

This gives ④ the subnet mask (11111111.11111111.11111110.00000000) 255.255.254.0.

3. Calculate the maximum number of valid subnets using subnet mask

What is the maximum number of valid subnets that can be divided by a Class An IP address with a subnet mask of 255.224.0.0?

① converts the subnet mask to binary representation 11111111.11100000.00000000.00000000

According to the statistics of ②, there are 11 bits in its network.

The base number of network bits for ③ Class An addresses is 8, and the difference between them is 3.

The maximum number of effective subnets of ④ is 2 to the third power, that is, it can be divided into up to 8 subnetworks.

4. Calculate the maximum number of available hosts using the subnet mask

A class An IP address with a subnet mask of 255.252.0.0 is divided into several subnetworks. how many hosts are available in each subnetwork?

① converts the subnet mask to binary for 11111111.11111100.00000000.00000000

According to the statistics of ②, there are 18 host bits.

The maximum number of available hosts for ③ is 2 to the 18th power minus 2 (excluding all zero network addresses and all 1 broadcast addresses), that is, a maximum of 262142 hosts are available per subnet.

5. Use the subnet mask to determine the start and end address of the subnet.

The class B IP address is 172.16.0.0 with a subnet mask of 255.255.192.0. What is the starting and ending address of the subnetwork that it can divide?

① calculates with subnet mask and can be divided into up to 4 subnetworks

② calculates with subnet masks that each subnet can hold 16384 hosts (including network and broadcast addresses)

③ divides 16384 by 256 (all hosts in the network segment, including network and broadcast addresses), and the result is 64

The specific method of dividing the network by ④ is as follows:

172.16.0.05172.16.63.255

172.16.64.0,172.16.127.255

172.16.128.0,172.16.191.255

172.16.192.0,172.16.255.255

6. The following is a table of personal experience.

Class An IP address segment: 1.0.0.0" 126.255.255.255 private address segment: 10.0.0.0" 10.255.255.255

Class B IP address segment: 128.0.0.0" 191.255.255.255 private address segment: 172.16.0.0" 172.31.255.255

Class C IP address segment: 192.0.0.0" 223.255.255.255 private address segment: 192.168.0.0" 192.168.255.255

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report