Chapter 15 – Analyzing Subnet Masks

Subnet mask conversion: 

  • Subnet masks can be written as 32-bit binary numbers, but not just any binary number.  
  • The value must not interleave 1s and 0s. 
  • If 1s exist, they are on the left.  
  • If 0s exist, they are on the right 

Converting between binary and prefix masks: 

Table 15-3 Example Conversions: Prefix to Binary 
Prefix Mask Logic 
Binary Mask 
/ 18 
/ 28 
/ 13 
Write 18 Is, then 14 ()s, total 32 
Write 28 Is, then 4 Os, total 32 
Write 13 Is, then 19 ()s, total 32 
11000000 
00000000 
00000000 
00000000
Table 15-4 Nine Possible Values in One Octet of a Subnet Mask 
Binary Mask 
Octet 
00000000 
10000000 
11000000 
11100000 
Decimal 
Equivalent 
o 
128 
192 
224 
240 
248 
Number of 
Binary Is 
o 
1 
2 
3 
4 
5
11111100 
11111110 
11111111 
252 
254 
255
172.16.1.0/24 
Figure 15-3 
172.16.4.0/24 
172.16.5.0/24 
Subnet 172.16.2.0/24 
172.16.2.101 
172.16.2.102 
Subnet 172.16.3.0/24 
172.16.3.101 
172.16.3.102 
Simple Subnet Design, with Mask /24

SUBNETS: 

Key 
Topic 
Defines the size of the prefix (combined network and subnet) part of the addresses in a 
subnet 
Defines the size of the host part of the addresses in the subnet 
Can be used to calculate the number of hosts in the subnet 
Provides a means for the network designer to communicate the design details—the num- 
ber of subnet and host bits—to the devices in the network 
Under certain assumptions, can be used to calculate the number of subnets in the entire 
classful network 
Can be used in binary calculations of both the subnet ID and the subnet broadcast 
address

EXAMPLE: 

consider the case of IP address 8.1.4.5 with mask 255.255.0.0 

1) 255.255.0.0 = /16, so P=16 

2) 8.1.4.5 is class A network so network bits are N=8 

3) S = P – N = 16 – 8 = 8 

4) H = 32 – P = 32 – 16 = 16 

5) 2 to the power of 16 – 2 = 65534 hosts/subnet 

6) 2 to the power of 8 = 256 subnets 

Figure 15-9 shows a visual analysis of the same problem. 
16 1 s 16 Os 
1-1=16 
Figure 15-9 Visual Representation of Problem: 8.1.4.5, 255.255.0.0

EXAMPLE 2: 

consider address 200.1.1.1, mask 255.255.255.252 

1) 255.255.255.252 = 24 + 6 = /30 

2) 200.1.1.1 = class C network, so N = 24 

3) S = P – N = 30 – 24 = 6 

4) H = 32 – 30 = 2 

5) 2 to the power of 2 – 2 = 2 hosts 

6) 2 to the power of 6 = 64 subnets 

This Post Has One Comment

Leave a Reply