# How to find the first and last address in the FIRST AND LAST SUBNET [duplicate]

So there's a problem that literally stress me out every time I look at it. It's like I almost understand it until I get to knowing how to find the first and last host in the LAST address (last subnet).

My given address is 130.56.0.0/16. But I need 1024 subnetworks and create subnetworks with equal amount of hosts. I need to find:

• Number of addresses for each subnet
• First and last address in the FIRST SUBNET
• First and last address in the LAST SUBNET

Finding the first and last address in the LAST SUBNET is what terribly confused me

So you have a /16 network and you need to divide it into 1024 subnets.

1024 = 2^10. That means on top of the /16, you use 10 bits to identify the subnet.

The consequence is that those subnets are /(16+10) = /26 networks

This leave you with 32-26 = 6 bits for the hosts.

So the last byte of your network address, expressed in decimal, will always be a multiple of 64 (including multiplying by zero) so for examples :

130.56.0.0/26.
130.56.0.64/26.
...
130.56.17.128/26.
...
130.56.24.192/26.
...

And the broadcast address will always have the last byte equal to 63, 127,191,255

If we speak about usable host address, the first are always 1 / 65 / 129 / 193 (network address +1) and the last one 62, 126, 190, 254 (broadcast address -1).

The first subnet is quite straightforward: 130.56.0.0/26 with