Create a sub net mask for 512 subnets using 172.31.0.0

The default sub net mask for a class b network is 255.255.0.0, working through the borrowing off bits using the formula 2^n, n being the bits borrowed

• 0 bits = 1 Subnet
• 1 bit = 2 subnets
• 2 bits = 4 subnets
• 3 bits = 8 subnets
• 4 bits = 16 subnets
• 5 bits = 32 subnets
• 6 bits = 64 subnets
• 7 bits = 128 subnets
• 8 bits = 256 subnets
• 9 bits = 512 subnets

That gives us a subnet mask off 255.255.255.128 which equates to a subnet prefix off /25

From this how do i find the 256th network?

-
Also, be aware, there is not such thing as a 'class b' network. That terminology was superseded over a decade ago. Please encourage your teacher to stop using outdated terminology. – Zoredache Jun 1 '11 at 22:43

To make 512 subnets out of 172.31.0.0:
It's easy to see that a netmask of 255.255.0.0 gives 256 subnets (256 addresses per subnet). To double the number of subnets, you need to halve the number of addresses (512 subnets, 128 addresses per subnet). This gives each subnet a netmask of `255.255.255.128` or `172.31.0.0/25`.

To find the 256th subnet:
From before we know that each subnet has 128 addresses in it. To get to the 256th subnet, we'd have to account for the addresses of the first 255 subnets (255 * 128 = 32640 addresses). Now we find where the 32641st address is. 32641 / 256 = 127.5. So we know that the third octet is 127. Now to find the fourth octet 32641 - (256 * 127) = 129. Now we have the first address of the 256th subnet: 172.31.127.128. The 256th subnet is `172.31.127.128/25`.

-

Assuming the question is "What is the address of 256th subnetwork in 172.31.0.0 net of 512 subnets"?