Forums


Finding the range o...
 

Finding the range of a subnet  

  RSS

Ben Piper
(@benpiper)
Member Admin
Joined: 5 years ago
Posts: 2
03/08/2019 1:00 pm  
Just a quick walkthrough. Take 10.10.10.0/23 for example.

 

Each octet is 8 bits.

 

The /23 CIDR means the 23 leftmost bits in the subnet mask are 1, so:

 

Binary: 11111111 11111111 11111110 00000000
Decimal: 8 + 8 + 7 + 0 = 23

 

That's the subnet mask. Now you need to convert the subnet itself into binary, like so:
Binary:  00001010 00001010 00001010 00000000
Decimal: 10 10 10 0

 

Next you need to line up the subnet mask and the subnet, like this:
Subnet mask: 11111111 11111111 11111110 00000000
Subnet: 00001010 00001010 00001010 00000000
10 10 10 0
Now here's how you determine the subnet range. To find the low end, for every bit where the subnet mask is 0, make the subnet 0. That's what's already written above, hence, 10.10.10.0 is the lowest address in the subnet.

 

To find the highest address, for every bit where the subnet mask is 0, make the subnet bit 1:

 

Subnet mask:     11111111 11111111 11111110 00000000
Highest address: 00001010 00001010 00001011 11111111
10 10 11 255

 

So the highest address would be 10.10.11.255.

 

Hence the range for 10.10.10.0/23 is 10.10.10.0-10.10.11.255.
This topic was modified 2 weeks ago 3 times by Ben Piper

Quote
Ben Piper
(@benpiper)
Member Admin
Joined: 5 years ago
Posts: 2
03/08/2019 1:28 pm  

Another example: Find the range of 216.16.11.103/27

Start by writing out the subnet mask in binary:

11111111 11111111 11111111 11100000
8 +8 +8 +3 = 27

Now write the IP address out in binary

216      16       11       103
11011000 00010000 00001011 01100111

Line up the IP address and subnet mask

Subnet mask: 11111111 11111111 11111111 11100000
IP address: 11011000 00010000 00001011 01100111

To find the lowest (network) address, wherever the subnet mask bit is 0, set the IP address bit to 0:

Subnet mask: 11111111 11111111 11111111 11100000
IP address: 11011000 00010000 00001011 01100000

The network address is 216.16.11.96.

To find the highest (broadcast) address, wherever the subnet mask bit is 0, set the IP address bit to 1:

Subnet mask: 11111111 11111111 11111111 11100000
IP address: 11011000 00010000 00001011 01111111

The broadcast address is 216.16.11.127.


ReplyQuote
Share:


  
Working

Please Login or Register