Visualising Class C Subnets

V

I’ve just started learning how to subnet and while there are plenty of resources to help with the calculations and understand the maths I tend to grasp things better if I have some visual representation.

To help, I put together the following table which – I hope – nicely illustrates the patterns of binary 0s and 1s in the 4th octet of a class C IP address and their correlation to the patterns of block sizes, network IDs, host IDs and broadcast addresses of the various subnets. The table is not intended to explain how to calculate subnets nor even to act as a cheat-sheet, but others may find the visual representation helpful.

Some examples of how this table may be useful:

1. Looking in the the 4th Octet of IP Address column and using a CIDR of /27 where only the first 3 bits of the 4th octet of the IP address are used for the network ID the pattern of 0s and 1s starts at 000 for the 1st subnet and then changes 7 times – 001, 010, 011,100, 101, 110 and 111 – each transition marking the beginning of a new subnet.

2. Similarly, the CIDR /27 column shows the 8 subnets each with a block size of 32 and 30 hosts, network IDs of .0, .32, .64, .96, .128, .160, .192 and .224 and broadcast addresses of .31, .63, .95, .127, .159, .191, .223 and .255.

3. Looking in row 125 of the IP # column gives the following for an IP address of 192.168.75.124:

192.168.75.124/25 is the 124th host ID on the 1st subnet that begins with a network ID of 192.168.75.0.

192.168.75.124/26 is the 60th host ID on the 2nd subnet that begins with a network ID of 192.168.75.64.

192.168.75.124/27 is the 28th host ID on the 4th subnet that begins with a network ID of 192.168.75.96.

192.168.75.124/28 is the 12th host ID on the 8th subnet that begins with a network ID of 192.168.75.112.

192.168.75.124/29 is the 4th host ID on the 16th subnet that begins with a network ID of 192.168.75.120.

192.168.75.124/30 is the network ID of the 32nd subnet.

As the table only uses CIDRs /25, /26, /27, /28, /29 and /30 only the first 6 bits of the 4th octet are significant in terms of the network ID. The 7th and 8th bits are used only for the host ID.

 

Class C Subnets Table

KEYNnnth Network IDBnnth Broadcast AddressHnnth Host of Subnet
IP #4th Octet Of IP AddressCIDR
decbinary/25/26/27/28/29/30
128
(1)
64
(2)
32
(3)
16
(4)
8
(5)
4
(6)
2
(7)
1
(8)
1.000000000N1N1N1N1N1N1
2.100000001H1H1H1H1H1H1
3.200000010H2H2H2H2H2H2
4.300000011H3H3H3H3H3B1
5.400000100H4H4H4H4H4N2
6.500000101H5H5H5H5H5H1
7.600000110H6H6H6H6H6H2
8.700000111H7H7H7H7B1B2
9.800001000H8H8H8H8N2N3
10.900001001H9H9H9H9H1H1
11.1000001010H10H10H10H10H2H2
12.1100001011H11H11H11H11H3B3
13.1200001100H12H12H12H12H4N4
14.1300001101H13H13H13H13H5H1
15.1400001110H14H14H14H14H6H2
16.1500001111H15H15H15B1B2B4
17.1600010000H16H16H16N2N3N5
18.1700010001H17H17H17H1H1H1
19.1800010010H18H18H18H2H2H2
20.1900010011H19H19H19H3H3B5
21.2000010100H20H20H20H4H4N6
22.2100010101H21H21H21H5H5H1
23.2200010110H22H22H22H6H6H2
24.2300010111H23H23H23H7B3B6
25.2400011000H24H24H24H8N4N7
26.2500011001H25H25H25H9H1H1
27.2600011010H26H26H26H10H2H2
28.2700011011H27H27H27H11H3B7
29.2800011100H28H28H28H12H4N8
30.2900011101H29H29H29H13H5H1
31.3000011110H30H30H30H14H6H2
32.3100011111H31H31B1B2B4B8
33.3200100000H32H32N2N3N5N9
34.3300100001H33H33H1H1H1H1
35.3400100010H34H34H2H2H2H2
36.3500100011H35H35H3H3H3B9
37.3600100100H36H36H4H4H4N10
38.3700100101H37H37H5H5H5H1
39.3800100110H38H38H6H6H6H2
40.3900100111H39H39H7H7B5B10
41.4000101000H40H40H8H8N6N11
42.4100101001H41H41H9H9H1H1
43.4200101010H42H42H10H10H2H2
44.4300101011H43H43H11H11H3B11
45.4400101100H44H44H12H12H4N12
46.4500101101H45H45H13H13H5H1
47.4600101110H46H46H14H14H6H2
48.4700101111H47H47H15B3B6B12
49.4800110000H48H48H16N4N7N13
50.4900110001H49H49H17H1H1H1
51.5000110010H50H50H18H2H2H2
52.5100110011H51H51H19H3H3B13
53.5200110100H52H52H20H4H4N14
54.5300110101H53H53H21H5H5H1
55.5400110110H54H54H22H6H6H2
56.5500110111H55H55H23H7B7B14
57.5600111000H56H56H24H8N8N15
58.5700111001H57H57H25H9H1H1
59.5800111010H58H58H26H10H2H2
60.5900111011H59H59H27H11H3B15
61.6000111100H60H60H28H12H4N16
62.6100111101H61H61H29H13H5H1
63.6200111110H62H62H30H14H6H2
64.6300111111H63B1B2B4B8B16
65.6401000000H64N2N3N5N9N17
66.6501000001H65H1H1H1H1H1
67.6601000010H66H2H2H2H2H2
68.6701000011H67H3H3H3H3B17
69.6801000100H68H4H4H4H4N18
70.6901000101H69H5H5H5H5H1
71.7001000110H70H6H6H6H6H2
72.7101000111H71H7H7H7B9B18
73.7201001000H72H8H8H8N10N19
74.7301001001H73H9H9H9H1H1
75.7401001010H74H10H10H10H2H2
76.7501001011H75H11H11H11H3B19
77.7601001100H76H12H12H12H4N20
78.7701001101H77H13H13H13H5H1
79.7801001110H78H14H14H14H6H2
80.7901001111H79H15H15B5B10B20
81.8001010000H80H16H16N6N11N21
82.8101010001H81H17H17H1H1H1
83.8201010010H82H18H18H2H2H2
84.8301010011H83H19H19H3H3B21
85.8401010100H84H20H20H4H4N22
86.8501010101H85H21H21H5H5H1
87.8601010110H86H22H22H6H6H2
88.8701010111H87H23H23H7B11B22
89.8801011000H88H24H24H8N12N23
90.8901011001H89H25H25H9H1H1
91.9001011010H90H26H26H10H2H2
92.9101011011H91H27H27H11H3B23
93.9201011100H92H28H28H12H4N24
94.9301011101H93H29H29H13H5H1
95.9401011110H94H30H30H14H6H2
96.9501011111H95H31B3B6B12B24
97.9601100000H96H32N4N7N13N25
98.9701100001H97H33H1H1H1H1
99.9801100010H98H34H2H2H2H2
100.9901100011H99H35H3H3H3B25
101.10001100100H100H36H4H4H4N26
102.10101100101H101H37H5H5H5H1
103.10201100110H102H38H6H6H6H2
104.10301100111H103H39H7H7B13B26
105.10401101000H104H40H8H8N14N27
106.10501101001H105H41H9H9H1H1
107.10601101010H106H42H10H10H2H2
108.10701101011H107H43H11H11H3B27
109.10801101100H108H44H12H12H4N28
110.10901101101H109H45H13H13H5H1
111.11001101110H110H46H14H14H6H2
112.11101101111H111H47H15B7B14B28
113.11201110000H112H48H16N8N15N29
114.11301110001H113H49H17H1H1H1
115.11401110010H114H50H18H2H2H2
116.11501110011H115H51H19H3H3B29
117.11601110100H116H52H20H4H4N30
118.11701110101H117H53H21H5H5H1
119.11801110110H118H54H22H6H6H2
120.11901110111H119H55H23H7B15B30
121.12001111000H120H56H24H8N16N31
122.12101111001H121H57H25H9H1H1
123.12201111010H122H58H26H10H2H2
124.12301111011H123H59H27H11H3B31
125.12401111100H124H60H28H12H4N32
126.12501111101H125H61H29H13H5H1
127.12601111110H126H62H30H14H6H2
128.12701111111B1B2B4B8B16B32
129.12810000000N2N3N5N9N17N33
130.12910000001H1H1H1H1H1H1
131.13010000010H2H2H2H2H2H2
132.13110000011H3H3H3H3H3B33
133.13210000100H4H4H4H4H4N34
134.13310000101H5H5H5H5H5H1
135.13410000110H6H6H6H6H6H2
136.13510000111H7H7H7H7B17B34
137.13610001000H8H8H8H8N18N35
138.13710001001H9H9H9H9H1H1
139.13810001010H10H10H10H10H2H2
140.13910001011H11H11H11H11H3B35
141.14010001100H12H12H12H12H4N36
142.14110001101H13H13H13H13H5H1
143.14210001110H14H14H14H14H6H2
144.14310001111H15H15H15B9B18B36
145.14410010000H16H16H16N10N19N37
146.14510010001H17H17H17H1H1H1
147.14610010010H18H18H18H2H2H2
148.14710010011H19H19H19H3H3B37
149.14810010100H20H20H20H4H4N38
150.14910010101H21H21H21H5H5H1
151.15010010110H22H22H22H6H6H2
152.15110010111H23H23H23H7B19B38
153.15210011000H24H24H24H8N20N39
154.15310011001H25H25H25H9H1H1
155.15410011010H26H26H26H10H2H2
156.15510011011H27H27H27H11H3B39
157.15610011100H28H28H28H12H4N40
158.15710011101H29H29H29H13H5H1
159.15810011110H30H30H30H14H6H2
160.15910011111H31H31B5B10B20B40
161.16010100000H32H32N6N11N21N41
162.16110100001H33H33H1H1H1H1
163.16210100010H34H34H2H2H2H2
164.16310100011H35H35H3H3H3B41
165.16410100100H36H36H4H4H4N42
166.16510100101H37H37H5H5H5H1
167.16610100110H38H38H6H6H6H2
168.16710100111H39H39H7H7B21B42
169.16810101000H40H40H8H8N22N43
170.16910101001H41H41H9H9H1H1
171.17010101010H42H42H10H10H2H2
172.17110101011H43H43H11H11H3B43
173.17210101100H44H44H12H12H4N44
174.17310101101H45H45H13H13H5H1
175.17410101110H46H46H14H14H6H2
176.17510101111H47H47H15B11B22B44
177.17610110000H48H48H16N12N23N45
178.17710110001H49H49H17H1H1H1
179.17810110010H50H50H18H2H2H2
180.17910110011H51H51H19H3H3B45
181.18010110100H52H52H20H4H4N46
182.18110110101H53H53H21H5H5H1
183.18210110110H54H54H22H6H6H2
184.18310110111H55H55H23H7B23B46
185.18410111000H56H56H24H8N24N47
186.18510111001H57H57H25H9H1H1
187.18610111010H58H58H26H10H2H2
188.18710111011H59H59H27H11H3B47
189.18810111100H60H60H28H12H4N48
190.18910111101H61H61H29H13H5H1
191.19010111110H62H62H30H14H6H2
192.19110111111H63B3B6B12B24B48
193.19211000000H64N4N7N13N25N49
194.19311000001H65H1H1H1H1H1
195.19411000010H66H2H2H2H2H2
196.19511000011H67H3H3H3H3B49
197.19611000100H68H4H4H4H4N50
198.19711000101H69H5H5H5H5H1
199.19811000110H70H6H6H6H6H2
200.19911000111H71H7H7H7B25B50
201.20011001000H72H8H8H8N26N51
202.20111001001H73H9H9H9H1H1
203.20211001010H74H10H10H10H2H2
204.20311001011H75H11H11H11H3B51
205.20411001100H76H12H12H12H4N52
206.20511001101H77H13H13H13H5H1
207.20611001110H78H14H14H14H6H2
208.20711001111H79H15H15B13B26B52
209.20811010000H80H16H16N14N27N53
210.20911010001H81H17H17H1H1H1
211.21011010010H82H18H18H2H2H2
212.21111010011H83H19H19H3H3B53
213.21211010100H84H20H20H4H4N54
214.21311010101H85H21H21H5H5H1
215.21411010110H86H22H22H6H6H2
216.21511010111H87H23H23H7B27B54
217.21611011000H88H24H24H8N28N55
218.21711011001H89H25H25H9H1H1
219.21811011010H90H26H26H10H2H2
220.21911011011H91H27H27H11H3B55
221.22011011100H92H28H28H12H4N56
222.22111011101H93H29H29H13H5H1
223.22211011110H94H30H30H14H6H2
224.22311011111H95H31B7B14B28B56
225.22411100000H96H32N8N15N29N57
226.22511100001H97H33H1H1H1H1
227.22611100010H98H34H2H2H2H2
228.22711100011H99H35H3H3H3B57
229.22811100100H100H36H4H4H4N58
230.22911100101H101H37H5H5H5H1
231.23011100110H102H38H6H6H6H2
232.23111100111H103H39H7H7B29B58
233.23211101000H104H40H8H8N30N59
234.23311101001H105H41H9H9H1H1
235.23411101010H106H42H10H10H2H2
236.23511101011H107H43H11H11H3B59
237.23611101100H108H44H12H12H4N60
238.23711101101H109H45H13H13H5H1
239.23811101110H110H46H14H14H6H2
240.23911101111H111H47H15B15B30B60
241.24011110000H112H48H16N16N31N61
242.24111110001H113H49H17H1H1H1
243.24211110010H114H50H18H2H2H2
244.24311110011H115H51H19H3H3B61
245.24411110100H116H52H20H4H4N62
246.24511110101H117H53H21H5H5H1
247.24611110110H118H54H22H6H6H2
248.24711110111H119H55H23H7B31B62
249.24811111000H120H56H24H8N32N63
250.24911111001H121H57H25H9H1H1
251.25011111010H122H58H26H10H2H2
252.25111111011H123H59H27H11H3B63
253.25211111100H124H60H28H12H4N64
254.25311111101H125H61H29H13H5H1
255.25411111110H126H62H30H14H6H2
256.25511111111B2B4B8B16B32B64
KEYNnnth Network IDBnnth Broadcast AddressHnnth Host of Subnet

 

Summary of Class C Subnets Table

CIDRMasked Bits [1s] (x)Unmasked Bits [0s] (y)Mask [4th Octet]Block Size1
[256 – Mask]
# Subnets
[2x]
# Hosts Per Subnet2
[2y – 2]
2517.1281282126
2626.19264462
2735.22432830
2844.240161614
2953.2488326
3062.2524642

1 Block Size can also be calculated as 2y
2 # Hosts Per Subnet can also be calculated as Block Size – 2</p.

About the author

A native Brit exiled in Japan, Steve spends too much of his time struggling with the Japanese language, dreaming of fish & chips and writing the occasional blog post he hopes others will find helpful.

Add comment

Steve

Recent Comments

Recent Posts

Archives