For the solution, focus in on the interesting octet, the octet in the mask that is not all one’s or all zero’s. Convert the interesting octet into binary for both the address and mask and do a logical AND ( 1 + 1 = 1; 0 + anything = 0 ), this is the subnet or wire address. To help keep the host bits verses the network/subnet bits straight, draw a line after the last one in the mask. For the broadcast of the subnet, change all the host bits (bits to the right of the line) to ones. To come up with the range of valid addresses (first and last host addresses), set all bits, except the least significant bit to zero. The least significant bit should be set to a one, this is the first address in the subnet. Reverse those bits, in other words, change all the host bits to ones, except the least significant…that one should be set to a zero. That is the last address in the subnet. For the number of host addresses in a subnet, use the formula 2n – 2 (where n = number of host bits).
Example:
Address |
172 |
16 |
37 |
186 |
|
Mask |
255 |
255 |
255 |
192 |
|
Address in Binary |
|
|
|
10 |
11 1010 |
Mask in Binary |
|
|
|
11 |
00 0000 |
Subnet in Binary |
|
|
|
10 |
00 0000 |
Broadcast in Binary |
|
|
|
10 |
11 1111 |
First Address in Binary |
|
|
|
10 |
00 0001 |
Last Address in Binary |
|
|
|
10 |
11 1110 |
Subnet |
172 |
16 |
37 |
128 |
|
Broadcast |
172 |
16 |
37 |
191 |
|
First Address |
172 |
16 |
37 |
129 |
|
Last Address |
172 |
16 |
37 |
190 |
Number of hosts = 26 – 2 = 64 – 2 = 62
172.16.37.186/26 |
|
|
|
Subnet |
172.16.37.128 |
|
Broadcast |
172.16.37.191 |
|
Number of Hosts |
62 |
|
First Host Address |
172.16.37.129 |
|
Last Host Address |
172.16.37.190 |
Address |
10 |
0 |
199 |
237 |
|
Mask |
255 |
255 |
252 |
0 |
|
Address in Binary |
|
|
1100 01 |
11 |
|
Mask in Binary |
|
|
1111 11 |
00 |
|
Subnet in Binary |
|
|
1100 01 |
00 |
|
Broadcast in Binary |
|
|
1100 01 |
11 |
255 |
First Address in Binary |
|
|
1100 01 |
00 |
|
Last Address in Binary |
|
|
1100 01 |
11 |
|
Subnet |
10 |
0 |
196 |
0 |
|
Broadcast |
10 |
0 |
199 |
255 |
|
First Address |
10 |
0 |
196 |
1 |
|
Last Address |
10 |
0 |
199 |
254 |
10.0.199.237/22 |
|
|
|
Subnet |
10.0.196.0 |
|
Broadcast |
10.0.199.255 |
|
Number of Hosts |
1022 |
|
First Host Address |
10.0.196.1 |
|
Last Host Address |
10.0.199.254 |
Address |
172 |
16 |
37 |
186 |
|
Mask |
255 |
255 |
255 |
224 |
|
Address in Binary |
|
|
|
101 |
1 1010 |
Mask in Binary |
|
|
|
111 |
0 0000 |
Subnet in Binary |
|
|
|
101 |
0 0000 |
Broadcast in Binary |
|
|
|
101 |
1 1111 |
First Address in Binary |
|
|
|
101 |
0 0001 |
Last Address in Binary |
|
|
|
101 |
1 1110 |
Subnet |
172 |
16 |
37 |
160 |
|
Broadcast |
172 |
16 |
37 |
191 |
|
First Address |
172 |
16 |
37 |
161 |
|
Last Address |
172 |
16 |
37 |
190 |
172.16.37.186/27 |
|
|
|
Subnet |
172.16.37.160 |
|
Broadcast |
172.16.37.191 |
|
Number of Hosts |
30 |
|
First Host Address |
172.16.37.161 |
|
Last Host Address |
172.16.37.190 |
Address |
192 |
168 |
14 |
87 |
|
Mask |
255 |
255 |
255 |
192 |
|
Address in Binary |
|
|
|
01 |
01 0111 |
Mask in Binary |
|
|
|
11 |
00 0000 |
Subnet in Binary |
|
|
|
01 |
00 0000 |
Broadcast in Binary |
|
|
|
01 |
11 1111 |
First Address in Binary |
|
|
|
01 |
00 0001 |
Last Address in Binary |
|
|
|
01 |
11 1110 |
Subnet |
192 |
168 |
14 |
64 |
|
Broadcast |
192 |
168 |
14 |
127 |
|
First Address |
192 |
168 |
14 |
65 |
|
Last Address |
192 |
168 |
14 |
126 |
192.168.14.87/26 |
|
|
|
Subnet |
192.168.14.64 |
|
Broadcast |
192.168.14.127 |
|
Number of Hosts |
62 |
|
First Host Address |
192.168.14.65 |
|
Last Host Address |
192.168.14.126 |
Address |
10 |
212 |
0 |
1 |
|
Mask |
255 |
252 |
0 |
0 |
|
Address in Binary |
|
1101 01 |
00 |
|
|
Mask in Binary |
|
1111 11 |
00 |
|
|
Subnet in Binary |
|
1101 01 |
00 |
|
|
Broadcast in Binary |
|
1101 01 |
11 |
255 |
|
First Address in Binary |
|
1101 01 |
00 |
|
1 |
Last Address in Binary |
|
1101 01 |
11 |
|
254 |
Subnet |
10 |
212 |
0 |
0 |
|
Broadcast |
10 |
215 |
255 |
255 |
|
First Address |
10 |
212 |
0 |
1 |
|
Last Address |
10 |
215 |
255 |
254 |
10.212.0.1/14 |
|
|
|
Subnet |
10.212.0.0 |
|
Broadcast |
10.215.255.255 |
|
Number of Hosts |
262,142 |
|
First Host Address |
10.212.0.1 |
|
Last Host Address |
10.215.255.254 |
Address |
172 |
30 |
32 |
117 |
|
Mask |
255 |
255 |
255 |
128 |
|
Address in Binary |
|
|
|
0 |
111 0101 |
Mask in Binary |
|
|
|
1 |
000 0000 |
Subnet in Binary |
|
|
|
0 |
000 0000 |
Broadcast in Binary |
|
|
|
0 |
111 1111 |
First Address in Binary |
|
|
|
0 |
000 0001 |
Last Address in Binary |
|
|
|
0 |
111 1110 |
Subnet |
172 |
30 |
32 |
0 |
|
Broadcast |
172 |
30 |
32 |
127 |
|
First Address |
172 |
30 |
32 |
1 |
|
Last Address |
172 |
30 |
32 |
126 |
172.30.32.117/25 |
|
|
|
Subnet |
172.30.32.0 |
|
Broadcast |
172.30.32.127 |
|
Number of Hosts |
126 |
|
First Host Address |
172.30.32.1 |
|
Last Host Address |
172.30.32.126 |
Address |
172 |
16 |
197 |
45 |
|
Mask |
255 |
255 |
254 |
0 |
|
Address in Binary |
|
|
1100 010 |
1 |
|
Mask in Binary |
|
|
1111 111 |
0 |
|
Subnet in Binary |
|
|
1100 010 |
0 |
|
Broadcast in Binary |
|
|
1100 010 |
1 |
|
First Address in Binary |
|
|
1100 010 |
0 |
1 |
Last Address in Binary |
|
|
1100 010 |
1 |
|
Subnet |
172 |
16 |
196 |
0 |
|
Broadcast |
172 |
16 |
197 |
255 |
|
First Address |
172 |
16 |
196 |
1 |
|
Last Address |
172 |
16 |
197 |
254 |
Number of hosts = 29 – 2 = 512 – 2 = 510
172.16.197.45/23 |
|
|
|
Subnet |
172.16.196.0 |
|
Broadcast |
172.16.197.255 |
|
Number of Hosts |
510 |
|
First Host Address |
172.16.196.1 |
|
Last Host Address |
172.16.197.254 |
Address |
192 |
168 |
33 |
33 |
|
Mask |
255 |
255 |
255 |
252 |
|
Address in Binary |
|
|
|
0010 00 |
01 |
Mask in Binary |
|
|
|
1111 11 |
00 |
Subnet in Binary |
|
|
|
0010 00 |
00 |
Broadcast in Binary |
|
|
|
0010 00 |
11 |
First Address in Binary |
|
|
|
0010 00 |
01 |
Last Address in Binary |
|
|
|
0010 00 |
10 |
Subnet |
192 |
168 |
33 |
32 |
|
Broadcast |
192 |
168 |
33 |
35 |
|
First Address |
192 |
168 |
33 |
33 |
|
Last Address |
192 |
168 |
33 |
34 |
Number of hosts = 22 – 2 = 4 – 2 = 2
192.168.33.33/30 |
|
|
|
Subnet |
192.168.33.32 |
|
Broadcast |
192.168.33.35 |
|
Number of Hosts |
2 |
|
First Host Address |
192.168.33.33 |
|
Last Host Address |
192.168.33.34 |
Address |
10 |
191 |
43 |
101 |
|
Mask |
255 |
255 |
240 |
0 |
|
Address in Binary |
|
|
0010 |
1011 |
|
Mask in Binary |
|
|
1111 |
0000 |
|
Subnet in Binary |
|
|
0010 |
0000 |
|
Broadcast in Binary |
|
|
0010 |
1111 |
|
First Address in Binary |
|
|
0010 |
0000 |
1 |
Last Address in Binary |
|
|
0010 |
1111 |
|
Subnet |
10 |
191 |
32 |
0 |
|
Broadcast |
10 |
191 |
47 |
255 |
|
First Address |
10 |
191 |
32 |
1 |
|
Last Address |
10 |
191 |
47 |
254 |
10.191.43.101/20 |
|
|
|
Subnet |
10.191.32.0 |
|
Broadcast |
10.191.47.255 |
|
Number of Hosts |
4094 |
|
First Host Address |
10.191.32.1 |
|
Last Host Address |
10.191.47.254 |
Address |
192 |
168 |
136 |
14 |
|
Mask |
255 |
255 |
255 |
248 |
|
Address in Binary |
|
|
|
0000 1 |
110 |
Mask in Binary |
|
|
|
1111 1 |
000 |
Subnet in Binary |
|
|
|
0000 1 |
000 |
Broadcast in Binary |
|
|
|
0000 1 |
111 |
First Address in Binary |
|
|
|
0000 1 |
001 |
Last Address in Binary |
|
|
|
0000 1 |
110 |
Subnet |
192 |
168 |
136 |
8 |
|
Broadcast |
192 |
168 |
136 |
15 |
|
First Address |
192 |
168 |
136 |
9 |
|
Last Address |
192 |
168 |
136 |
14 |
Number of hosts = 23 – 2 = 8 – 2 = 6
192.168.136.14/29 |
|
|
|
Subnet |
192.168.136.8 |
|
Broadcast |
192.168.136.15 |
|
Number of Hosts |
6 |
|
First Host Address |
192.168.136.9 |
|
Last Host Address |
192.168.136.14 |
Address |
192 |
168 |
136 |
14 |
|
Mask |
255 |
255 |
255 |
240 |
|
Address in Binary |
|
|
|
0000 |
1110 |
Mask in Binary |
|
|
|
1111 |
0000 |
Subnet in Binary |
|
|
|
0000 |
0000 |
Broadcast in Binary |
|
|
|
0000 |
1111 |
First Address in Binary |
|
|
|
0000 |
0001 |
Last Address in Binary |
|
|
|
0000 |
1110 |
Subnet |
192 |
168 |
136 |
0 |
|
Broadcast |
192 |
168 |
136 |
15 |
|
First Address |
192 |
168 |
136 |
1 |
|
Last Address |
192 |
168 |
136 |
14 |
Number of hosts = 24 – 2 = 16 – 2 = 14
192.168.136.14/28 |
|
|
|
Subnet |
192.168.136.0 |
|
Broadcast |
192.168.136.15 |
|
Number of Hosts |
14 |
|
First Host Address |
192.168.136.1 |
|
Last Host Address |
192.168.136.14 |
Address |
172 |
16 |
186 |
37 |
|
Mask |
255 |
255 |
255 |
192 |
|
Address in Binary |
|
|
|
00 |
10 0101 |
Mask in Binary |
|
|
|
11 |
00 0000 |
Subnet in Binary |
|
|
|
00 |
00 0000 |
Broadcast in Binary |
|
|
|
00 |
11 1111 |
First Address in Binary |
|
|
|
00 |
00 0001 |
Last Address in Binary |
|
|
|
00 |
11 1110 |
Subnet |
172 |
16 |
186 |
0 |
|
Broadcast |
172 |
16 |
186 |
63 |
|
First Address |
172 |
16 |
186 |
1 |
|
Last Address |
172 |
16 |
186 |
62 |
Number of hosts = 26 – 2 = 64 – 2 = 62
172.16.186.37/26 |
|
|
|
Subnet |
172.16.186.0 |
|
Broadcast |
172.16.186.63 |
|
Number of Hosts |
62 |
|
First Host Address |
172.16.186.1 |
|
Last Host Address |
172.16.186.62 |
Address |
172 |
16 |
233 |
233 |
|
Mask |
255 |
255 |
254 |
0 |
|
Address in Binary |
|
|
1110 101 |
1 |
|
Mask in Binary |
|
|
1111 111 |
0 |
|
Subnet in Binary |
|
|
1110 101 |
0 |
|
Broadcast in Binary |
|
|
1110 101 |
1 |
|
First Address in Binary |
|
|
1110 101 |
0 |
|
Last Address in Binary |
|
|
1110 101 |
1 |
|
Subnet |
172 |
16 |
232 |
0 |
|
Broadcast |
172 |
16 |
233 |
255 |
|
First Address |
172 |
16 |
232 |
1 |
|
Last Address |
172 |
16 |
233 |
254 |
Number of hosts = 29 – 2 = 512 – 2 = 510
172.26.233.233/23 |
|
|
|
Subnet |
172.26.232.0 |
|
Broadcast |
172.26.233.255 |
|
Number of Hosts |
510 |
|
First Host Address |
172.26.232.1 |
|
Last Host Address |
172.26.233.254 |
Address |
10 |
10 |
10 |
10 |
|
Mask |
255 |
255 |
248 |
0 |
|
Address in Binary |
|
|
0000 1 |
010 |
|
Mask in Binary |
|
|
1111 1 |
000 |
|
Subnet in Binary |
|
|
0000 1 |
000 |
|
Broadcast in Binary |
|
|
0000 1 |
111 |
|
First Address in Binary |
|
|
0000 1 |
000 |
|
Last Address in Binary |
|
|
0000 1 |
111 |
254 |
Subnet |
10 |
10 |
8 |
0 |
|
Broadcast |
10 |
10 |
15 |
255 |
|
First Address |
10 |
10 |
8 |
1 |
|
Last Address |
10 |
10 |
15 |
254 |
Number of hosts = 211 – 2 = 2048 – 2 = 2046
10.10.10.10/21 |
|
|
|
Subnet |
10.10.8.0 |
|
Broadcast |
10.10.15.255 |
|
Number of Hosts |
2046 |
|
First Host Address |
10.10.8.1 |
|
Last Host Address |
10.10.15.254 |
Address |
172 |
27 |
198 |
4 |
|
Mask |
255 |
255 |
224 |
0 |
|
Address in Binary |
|
|
110 |
0 0110 |
|
Mask in Binary |
|
|
111 |
0 0000 |
|
Subnet in Binary |
|
|
110 |
0 0000 |
|
Broadcast in Binary |
|
|
110 |
1 1111 |
|
First Address in Binary |
|
|
110 |
0 0000 |
|
Last Address in Binary |
|
|
110 |
1 1111 |
|
Subnet |
172 |
27 |
192 |
0 |
|
Broadcast |
172 |
27 |
223 |
255 |
|
First Address |
172 |
27 |
192 |
1 |
|
Last Address |
172 |
27 |
223 |
254 |
Number of hosts = 213 – 2 = 8192 – 2 = 8190
172.27.198.4/19 |
|
|
|
Subnet |
172.27.192.0 |
|
Broadcast |
172.27.223.255 |
|
Number of Hosts |
8190 |
|
First Host Address |
172.27.192.1 |
|
Last Host Address |
172.27.223.254 |
Address |
192 |
168 |
4 |
198 |
|
Mask |
255 |
255 |
255 |
240 |
|
Address in Binary |
|
|
|
1011 |
1010 |
Mask in Binary |
|
|
|
1100 |
0000 |
Subnet in Binary |
|
|
|
1000 |
0000 |
Broadcast in Binary |
|
|
|
1011 |
1111 |
First Address in Binary |
|
|
|
1000 |
0001 |
Last Address in Binary |
|
|
|
1011 |
1110 |
Subnet |
192 |
168 |
4 |
192 |
|
Broadcast |
172 |
16 |
37 |
207 |
|
First Address |
172 |
16 |
37 |
193 |
|
Last Address |
172 |
16 |
37 |
206 |
Number of hosts = 24 – 2 = 16 – 2 = 14
192.168.4.198/28 |
|
|
|
Subnet |
192.168.4.192 |
|
Broadcast |
192.168.4.207 |
|
Number of Hosts |
14 |
|
First Host Address |
192.168.4.193 |
|
Last Host Address |
192.168.4.206 |
Address |
172 |
16 |
16 |
186 |
|
Mask |
255 |
255 |
240 |
0 |
|
Address in Binary |
|
|
0001 |
0000 |
|
Mask in Binary |
|
|
1111 |
0000 |
|
Subnet in Binary |
|
|
0001 |
0000 |
|
Broadcast in Binary |
|
|
0001 |
1111 |
255 |
First Address in Binary |
|
|
0001 |
0000 |
|
Last Address in Binary |
|
|
0001 |
1111 |
|
Subnet |
172 |
16 |
16 |
0 |
|
Broadcast |
172 |
16 |
31 |
255 |
|
First Address |
172 |
16 |
16 |
1 |
|
Last Address |
172 |
16 |
31 |
254 |
Number of hosts = 212 – 2 = 4096 – 2 = 4094
172.16.16.186/20 |
|
|
|
Subnet |
172.16.16.0 |
|
Broadcast |
172.16.31.255 |
|
Number of Hosts |
4094 |
|
First Host Address |
172.16.16.1 |
|
Last Host Address |
172.16.31.254 |
Address |
10 |
35 |
67 |
119 |
|
Mask |
255 |
255 |
128 |
0 |
|
Address in Binary |
|
|
0 |
100 0011 |
|
Mask in Binary |
|
|
1 |
000 0000 |
|
Subnet in Binary |
|
|
0 |
000 0000 |
|
Broadcast in Binary |
|
|
0 |
111 1111 |
|
First Address in Binary |
|
|
0 |
000 0000 |
|
Last Address in Binary |
|
|
0 |
111 1111 |
|
Subnet |
10 |
35 |
0 |
0 |
|
Broadcast |
10 |
35 |
127 |
255 |
|
First Address |
10 |
35 |
0 |
1 |
|
Last Address |
10 |
35 |
127 |
254 |
Number of hosts = 215 – 2 = 32768 – 2 =
32766
10.35.67.119/17 |
|
|
|
Subnet |
10.35.0.0 |
|
Broadcast |
10.35.127.255 |
|
Number of Hosts |
32,766 |
|
First Host Address |
10.35.0.1 |
|
Last Host Address |
10.35.127.254 |
Address |
10 |
7 |
13 |
141 |
|
Mask |
255 |
255 |
240 |
0 |
|
Address in Binary |
|
|
0000 |
1101 |
|
Mask in Binary |
|
|
1111 |
0000 |
|
Subnet in Binary |
|
|
0000 |
0000 |
|
Broadcast in Binary |
|
|
0000 |
1111 |
|
First Address in Binary |
|
|
0000 |
0000 |
|
Last Address in Binary |
|
|
0000 |
1111 |
|
Subnet |
10 |
7 |
0 |
0 |
|
Broadcast |
10 |
7 |
15 |
255 |
|
First Address |
10 |
7 |
0 |
1 |
|
Last Address |
10 |
7 |
15 |
254 |
Number of hosts = 212 – 2 = 4096 – 2 = 4094
10.7.13.141/20 |
|
|
|
Subnet |
10.7.0.0 |
|
Broadcast |
10.7.15.255 |
|
Number of Hosts |
4094 |
|
First Host Address |
10.7.0.1 |
|
Last Host Address |
10.7.15.254 |
Address |
172 |
16 |
37 |
186 |
|
Mask |
255 |
255 |
255 |
192 |
|
Address in Binary |
|
|
|
10 |
11 1010 |
Mask in Binary |
|
|
|
11 |
00 0000 |
Subnet in Binary |
|
|
|
10 |
00 0000 |
Broadcast in Binary |
|
|
|
10 |
11 1111 |
First Address in Binary |
|
|
|
10 |
00 0001 |
Last Address in Binary |
|
|
|
10 |
11 1110 |
Subnet |
172 |
16 |
37 |
128 |
|
Broadcast |
172 |
16 |
37 |
191 |
|
First Address |
172 |
16 |
37 |
129 |
|
Last Address |
172 |
16 |
37 |
190 |
Number of hosts = 210 – 2 = 1024 – 2 = 1022
172.16.37.186/26 |
|
|
|
Subnet |
172.16.37.128 |
|
Broadcast |
172.16.37.191 |
|
Number of Hosts |
62 |
|
First Host Address |
172.16.37.129 |
|
Last Host Address |
172.16.37.190 |
Address |
192 |
168 |
119 |
85 |
|
Mask |
255 |
255 |
254 |
0 |
|
Address in Binary |
|
|
0111 011 |
1 |
|
Mask in Binary |
|
|
1111 111 |
0 |
|
Subnet in Binary |
|
|
0111 011 |
0 |
|
Broadcast in Binary |
|
|
0111 011 |
1 |
255 |
First Address in Binary |
|
|
0111 011 |
0 |
|
Last Address in Binary |
|
|
0111 011 |
1 |
|
Subnet |
192 |
168 |
118 |
0 |
|
Broadcast |
192 |
168 |
119 |
255 |
|
First Address |
192 |
168 |
118 |
1 |
|
Last Address |
192 |
168 |
119 |
254 |
Number of hosts = 29 – 2 = 512 – 2 = 510
192.168.119.85/23 |
|
|
|
Subnet |
192.168.118.0 |
|
Broadcast |
192.168.119.255 |
|
Number of Hosts |
510 |
|
First Host Address |
192.168.118.1 |
|
Last Host Address |
192.168.119.254 |