Calculate Network and Broadcast Address

If you are going to set up a network, then you have to know how to distribute the devices on that network. Knowing how to calculate network and broadcast addresses if you have the IP address and subnet mask is essential to setting up a network. This wikiHow teaches you how to calculate your Network address and Broadcast address.

## Method 1 of 3:Using Classful Network

##### 1. Determine the total number of bits used for subnetting

Determine the total number of bits used for subnetting. For a classful network total bits is 8. So Total bits = Tb = 8. The total bits used for subnetting (n) is determined by the subnet mask.

Subnet masks can be 0, 128, 192, 224, 240, 248, 252, 254 and 255.

The number of bits used for subnetting (n) to their corresponding subnet mask is as follows: 0=0, 128=1, 192=2, 224=3, 240=4, 248=5, 252=6, 254=7, and 255=8.

Subnet mask 255 is default, so it’ll not be considered for subnet masking.

For example: Let’s assume the IP address is 210.1.1.100 and Subnet mask is 255.255.255.224. The total bits= Tb = 8. The number of bits used for subnetting for subnet mask 224 is 3.

#####
2. Determine the number of bits left to host

Determine the number of bits left to host. The equation to determine the number of bits left to host is (m) = Tb – n. From the previous step, you got the number of bits used for subnetting (n) and you know the total bits used “Tb=8”. then you can get the number of bits left for host by subtracting 8-n.

Using the example above, n=3. The number of bits left for host is (m) = 8 – 3 = 5. 5 is the number of bits you have left to host.

#####
3. Calculate the number of subnets

Calculate the number of subnets. The number of subnets is 2. The number of hosts per subnet = 2 – 2.

In our example, the number of subnets is 2 = 2 = 8. 8 is the total number of subnets.

#####
4. Calculate the value of the last bit used for subnet masking

Calculate the value of the last bit used for subnet masking. The value of last bit used for subnet masking is (Δ) = 2.

In our example, the value of last bit used for subnet masking is Δ = 2 = 32. The value of the last bit used is 32.

##### 5. Calculate the number of hosts per subnet

Calculate the number of hosts per subnet. The number of hosts per subnet is represented by the formula 2 – 2.

#####
6. Separate the subnets by the value of last bit used for subnet masking

Separate the subnets by the value of last bit used for subnet masking. Now you can find previously calculated number of subnets by separating subnets each having value of last bit used for subnet masking or Δ. In our example, Δ=32. So we can separate IP addresses in increments of 32.

The 8 subnets (as calculated in previous step) are shown above.

Each of them has 32 addresses.

#####
7. Determine the network and broadcast addresses for the IP addresses

Determine the network and broadcast addresses for the IP addresses. The lowest address in a subnet is the network address. The highest address in a subnet is the broadcast address.

#####
8. Determine the broadcast address for your IP address

Determine the broadcast address for your IP address. The lowest address of the subnet your IP address falls in is the network address. The highest address in the subnet your IP address falls in is the broadcast address.

Our example IP address 210.1.1.100 falls in the 210.1.1.96 – 210.1.1.127 subnet (see the previous step table). So 210.1.1.96 is network address and 210.1.1.127 is broadcast address.

## Method 2 of 3:Using CIDR

##### 1. Write the bit-length prefix in bit format

Write the bit-length prefix in bit format. In CIDR, you have a IP address followed by bit-length prefix separated by slash(/). Now you can start to convert bit-length prefix to quad-dotted by separating the bit-length prefix in increments of 8 and adding the final bit number.

Example: If the bit-length prefix is 27, then write it as 8 + 8 + 8 + 3 .

Example: If bit-length prefix is 12, then write it as 8 + 4 + 0 + 0 .

Example: Default bit-length prefix is 32, then write it as 8 + 8 + 8 + 8.

#####
2. Convert the bit-length prefix to quad-dotted format

Convert the bit-length prefix to quad-dotted format. Convert the corresponding bit according to the above table and represent in quad-dotted decimal format. For example, bit-length 27 is represented by 8+8+8+3. This converts to 225.225.225.224.

Using another example, the IP address is 170.1.0.0/26 . Using above table, you can write the bit-length prefix 26 as 8+8+8+2. Using the chart above, this converts to 225.225.225.192. Now the IP address is 170.1.0.0 and subnet mask in quad-dotted decimal format is 255.255.255.192 .

##### 3. Determine the total number of bits

Determine the total number of bits. The total number of bits is represented using the following equation: Tb = 8.

#####
4. Determine the number of bits used for subnetting

Determine the number of bits used for subnetting. Subnet masks can be 0, 128, 192, 224, 240, 248, 252, 254 and 255. The table above gives you the Number of bits used for subnetting (n) to their corresponding subnet mask.

For subnet mask 255 is default, so it’ll not consider for subnet masking.

From the previous step, you got IP address = 170.1.0.0 and Sub-net mask = 255.255.255.192

Total bits = Tb = 8

Number of bits used for subnetting = n. As the subnet mask = 192, its corresponding number of bits used for Subnetting is 2 from above table.

#####
5. Calculate the number of bits left to host

Calculate the number of bits left to host. From the previous step, you got the number of bits used for subnetting (n) and you know the total bits (Tb) = 8. Then you can get number of bits left for host is (m) = Tb – n or Tb = m+n.

In our example, the number of bits used for subnetting (n) is 2. So the number of bits left for host is m = 8 – 2 = 6. The total bits left for the host is 6.

##### 6. Calculate the number of subnets

Calculate the number of subnets. The Number of subnets is 2.

In our example, the number of subnets = 2 = 4. The total number of subnets is 4.

#####
7. Calculate the value of last bit used for subnet masking

Calculate the value of last bit used for subnet masking. This is represented with the formula (Δ) = 2.

In our example, the value of last bit used for subnet masking = Δ = 2 = 64. The value of the last bit used for subnet masking is 64.

#####
8. Calculate the number of hosts per subnet

Calculate the number of hosts per subnet. The number of hosts per subnet is 2 – 2.

#####
9. Separate the subnets by the value of the last bit used for subnet masking

Separate the subnets by the value of the last bit used for subnet masking. Now you can find previously calculated number of subnets by separating subnets each having the value of last bit used for subnet masking or Δ.

In our example, the last value used for subnet masking is 64. This produces 4 subnets with 64 addresses.

#####
10. Find which subnet your IP address is in

Find which subnet your IP address is in. Our example IP is 170.1.0.0. This falls in the 170.1.0.0 – 170.1.0.63 subnet.

#####
11. Determine your broadcast address

Determine your broadcast address. The first address in a subnet is the network address and the last number is the broadcast address.

Our example IP address is 170.1.0.0. So 170.1.0.0 is network address and 170.1.0.63 is broadcast address.

## Method 3 of 3:Using A Network Calculator

##### 1. Find your IP address and subnet address

Find your IP address and subnet address. On PC, you can Find your IP address by typing “ipconfig” into the command prompt. Your IP address is next to IPv4 address, and you can find the subnet address right below it in the command prompt. On Mac, you can find your IP address and subnet address in the Network app in System Preferences.

##### 2. Go to http://jodies.de/ipcalc in a web browser

Go to http://jodies.de/ipcalc in a web browser. You can use any web browser on PC or Mac.

##### 3. Enter the IP address in the field that says Address (Host or network)

Enter the IP address in the field that says Address (Host or network). The website will try to detect your IP address automatically. Double-check it to make sure it is detecting the correct address. If it is not correct, enter the correct address.

##### 4. Enter the subnet mask in “Netmask” field

Enter the subnet mask in “Netmask” field. Again, the website will try to automatically detect your subnet address. Double-check to make sure that it is correct. You can enter the field in CDIR format (I.E /24) or dotted-decimal format (i.E 255.255.255.0).

##### 5. Click Calculate

Click Calculate. It is the button below the IP address field. Your network address will be listed next to “Network” in the results below the text fields. Your broadcast address will be listed next to “Broadcast” in the results below your text fields.