Thank you for your feedback



How to Calculate the Subnet ID and Broadcast IP Address

Document ID:HO1048
 
06/05/14 Properties  

Problem

How to; Calculate; Subnet ID; valid IP addresses range; broadcast IP address from host IP address and subnet mask; Subnet mask; IP address range; Broadcast IP address; Subnet ID

Environment

How to calculate the subnet ID, the valid IP addresses range, and the broadcast IP address from a host IP address and subnet mask.; Subnet mask; IP address range; Broadcast IP address; Subnet ID

Solution

Overview

This article concerns methods necessary to calculate the Subnet ID and Broadcast IP Address. 

This information can be very useful when troubleshooting network issues. See the Example section below for details.

NOTE: For CIDR notation information, click CIDR information.

 

Examples

An example: the host 172.16.155.59/18; the /18 is the CIDR notation, which reveals that the host's subnet mask is 11111111.11111111.11000000.00000000. The 0's and 1's in each octet (grouping of 8) make up binary values which equate to 255.255.192.0
According to the subnet mask, the different possible subnets are (note that the relevant byte of the subnet mask is the third one):

10101100.00010000.01000000.00000000 = 172.16.64.0
10101100.00010000.10000000.00000000 = 172.16.128.0
10101100.00010000.11000000.00000000 = 172.16.192.0


Accordingly, as 128 < 155 (3rd octet of the IP address) < 192, the host is part of the subnet 172.16.128.0.
The valid IP addresses range is from 172.16.128.1 to 172.16.191.254.
The broadcast IP address for the subnet 172.16.128.0 is 172.16.191.255.
 

Now consider another method for solution, a simpler one than detailed above. This method starts with the decimal value of the relevant subnet mask byte - 192 in this case.
The pad, which will define the pad in between the subnet IDs, is equal to 256 - relevant subnet mask byte = 256 - 192 = 64 in our example.
Accordingly, the subnet IDs are (starting from 172.16.pad.0 and adding the pad to obtain the next subnet) :


172.16.64.0
172.16.128.0
172.16.192.0


As a result, as 128 < 155 < 192, the host is part of the subnet 172.16.128.0.
The valid IP addresses range is from 172.16.128.1 to 172.16.191.254.
The broadcast IP address for the subnet 172.16.128.0 is 172.16.191.255.
 

Importance

In the example above, it may be thought that 172.16.155.59 IP address is a class B network, thus coming with a 255.255.0.0 subnet mask. Accordingly, one may think that the subnet ID is 172.16.0.0 and that 172.16.191.255 is just a host address, while 172.16.191.255 is the broadcast IP address of the 172.16.128.0/18 subnet. This obviously constitutes a considerable difference.
 

Still need help?

If you require additional assistance, please close this window, go to your product's support page and locate  Get In Touch with Lexmark! for contact information. NOTE: When calling for support, you will need your printer model/machine type and serial number (SN).

Please be near the products described in this article to expedite the support process and reduce callbacks.

Note

This kind of information can be very useful when you are troubleshooting a network problem. In our example, you may think that 172.16.155.59 IP address is a class B network, thus coming with a 255.255.0.0 subnet mask. Accordingly, you may think that the subnet ID is 172.16.0.0 and that 172.16.191.255 is just a host address, while 172.16.191.255 is the broadcast IP address of the 172.16.128.0/18 subnet. This is a considerable difference!

For CIDR notation information, click here: CIDR information



Link:
Please enter the email address you would like to send a copy of this page to.