How to find out the Network Address and Broadcast Address of a subnetted IPv4 address

How to find out the Network Address and Broadcast Address of a subnetted IPv4 address

If you are following the lessons in http://www.omnisecu.com in order, now you are in a stage where you can find out the network address and directed broadcast address of an unsubnetted IPv4 address.

Refer below examples:

The network address of IPv4 address 192.168.10.117 with the default Class C subnet mask 255.255.255.0 is, 192.168.10.0.

The directed broadcast address of IPv4 address 192.168.10.117 with the default Class C subnet mask 255.255.255.0 is, 192.168.10.255.

The network address of IPv4 address 172.22.18.201 with the default Class B subnet mask 255.255.0.0 is, 172.22.0.0

The directed broadcast address of IPv4 address 172.22.18.201 with the default Class B subnet mask 255.255.0.0 is, 172.22.255.255

The network address of IPv4 address 10.2.122.17 with the default Class A subnet mask 255.0.0.0 is, 10.0.0.0

The directed broadcast address of IPv4 address 10.2.122.17 with the default Class A subnet mask 255.0.0.0 is, 10.255.255.255

But the IPv4 addresses mentioned above are unsubnetted classful IPv4 addresses.

What is the network address of 172.25.191.182 with a subnet mask of 255.255.224.0 ? Now it is started getting difficult.

As a beginner in networking and network security, take some time to learn the below facts.

• If all the bits in the host part are “0”, that represents the network address.

• If all the bits in the host part are “0” except the last bit, it is the first usable IPv4 address.

• If all the bits in the host part are “1” except the last bit, it is the last usable IPv4 address.

• If all the bits in the host part are “1”, that represents the directed broadcast address.

Question 1 – Find the network address and the directed broadcast address of subnetted Class B IPv4 address 172.25.171.182 with a subnet mask of 255.255.224.0.

Answer: The subnet mask mentioned in above question (255.255.224.0) is not the default Class B subnet mask. The subnet mask 255.255.224.0 can also be represented in CIDR format “/19” ( 8+8+3 binary bits in network part). Means that, first 19 bits of the IPv4 address belongs to the Network part and remaining 13 bits belongs to the host part.

IPv4 Address (in decimals)
172
25
171
182

IPv4 Address (in binaries)
10101100
00011001
10101011
10110110

Subnet Mask (in decimals)
255
255
224
0

Subnet Mask (in binaries)
11111111
11111111
11100000
00000000

Network Address (in binaries)
(all bits in host part are “0”)

10101100
00011001
10100000
00000000

Network Address (in decimals)
172
25
160
0

Directed Broadcast Address (in binaries)
(all bits in host part are “1”)

10101100
00011001
10111111
11111111

Directed Broadcast Address (in decimals)
172
25
191
255

 

As you can see from the above table, first 19 bits in the subnet mask are “1”, and the corresponding bits in the IPv4 Address belongs to network part. Last 13 bits of the subnet mask are “0”, and the corresponding bits in the IPv4 Address belongs to host part.

Now we can identify that the last 13 bits of the subnetted IPv4 address belongs to the host part. If we keep all the last 13 bits as “0”, we will get the network address of the subnetted IPv4 Address. If we keep all the last 13 bits “1”, we will get the directed broadcast address of the subnetted IPv4 Address.

Network Address in binaries – 10101100.00011001.10100000.00000000 (equal to 172.25.160.0 in decimals)

Broadcast Address in binaries – 10101100.00011001.10111111.11111111 (equal to 172.25.191.255 in decimals)

Therefore the network address and directed broadcast address of IPv4 address 172.25.171.182 with a subnet mask of 255.255.224.0 are as below.

Network Address : 172.25.160.0

Directed Broadcast Address : 172.25.191.255

Question 2: Find the network address and the directed broadcast address of subnetted Class A IPv4 address 10.220.122.80 with a subnet mask of 255.128.0.0.

Answer: The subnet mask mentioned in above question (255.128.0.0) is not the default Class A subnet mask. The subnet mask 255.128.0.0 can also be represented in CIDR format “/9” ( 8+1 binary bits in network part). Means that, first 9 bits of the IPv4 address belongs to the network part and remaining 23 bits belongs to the host part.

IPv4 Address (in decimals)
10
220
122
80

IPv4 Address (in binaries)
00001010
11011100
01111010
01010000

Subnet Mask (in decimals)
255
128
0
0

Subnet Mask (in binaries)
11111111
10000000
00000000
00000000

Network Address (in binaries)
(all bits in host part are “0”)

00001010
10000000
00000000
00000000

Network Address (in decimals)
10
128
0
0

Directed Broadcast Address (in binaries)
(all bits in host part are “1”)

00001010
11111111
11111111
11111111

Directed Broadcast Address (in decimals)
10
255
255
255

 

As you can see from the above table, first 9 bits in the Subnet Mask are “1”, and the corresponding bits in the IPv4 Address belongs to network part. Last 23 bits of the subnet mask are “0”, and the corresponding bits in the IPv4 Address belongs to host part.

Now we can identify that the last 23 bits of the subnetted IPv4 address belongs to the host part. If we keep all the last 23 bits as “0”, we will get the network address of the subnetted IPv4 Address. If we keep all the last 23 bits “1”, we will get the directed broadcast address of the subnetted IPv4 Address.

Network Address in binaries – 00001010.10000000.00000000.00000000 (equal to 10.128.0.0 in decimals)

Broadcast Address in binaries – 00001010.11111111.11111111.11111111 (equal to 10.255.255.255 in decimals)

Therefore the network address and directed broadcast address of IPv4 address 10.220.122.80 with a subnet mask of 255.128.0.0 are as below.

Network Address : 10.128.0.0

Directed Broadcast Address : 10.255.255.255

Question 3: Find the network address and the directed broadcast address of subnetted Class C IPv4 address 192.168.10.41 with a subnet mask of 255.255.255.240.

Answer: The subnet mask mentioned in above question (255.255.255.240) is not the default Class C subnet mask. The subnet mask 255.255.255.240 can also be represented in CIDR format “/28” ( 8+8+8+4 binary bits in network part). Means that, first 28 bits of the IPv4 address belongs to the Network part and remaining 4 bits belongs to the host part.

IPv4 Address (in decimals)
192
168
10
41

IPv4 Address (in binaries)
11000000
10101000
00001010
00101001

Subnet Mask (in decimals)
255
255
255
240

Subnet Mask (in binaries)
11111111
11111111
11111111
11110000

Network Address (in binaries)
(all bits in host part are “0”)

11000000
10101000
00001010
00100000

Network Address (in decimals)
192
168
10
32

Directed Broadcast Address (in binaries)
(all bits in host part are “1”)

11000000
10101000
00001010
00101111

Directed Broadcast Address (in decimals)
192
168
10
47

 

As you can see from the above table, first 28 bits in the subnet mask are “1”, and the corresponding bits in the IPv4 Address belongs to network part. Last 4 bits of the subnet mask are “0”, and the corresponding bits in the IPv4 Address belongs to host part.

Now we can identify that the last 4 bits of the subnetted IPv4 address belongs to the host part. If we keep all the last 4 bits as “0”, we will get the network address of the subnetted IPv4 Address. If we keep all the last 4 bits “1”, we will get the directed broadcast address of the subnetted IPv4 subnet.

Network Address in binaries – 11000000.10101000.00001010.00100000 (equal to 192.168.10.32 in decimals)

Broadcast Address in binaries – 11000000.10101000.00001010.00101111 (equal to 192.168.10.47 in decimals)

Therefore the network address and directed broadcast address of IPv4 address 192.168.10.41 with a subnet mask of 255.255.255.240 are as below.

Network Address : 192.168.10.32

Directed Broadcast Address : 192.168.10.47

Dont worry, it is not so complex as you feel now. As you learn more and gain more experience, you can even identify the network address and directed broadcast address just by viewing the numbers.