Link to home
Start Free TrialLog in
Avatar of AMtek
AMtekFlag for United States of America

asked on

Subnetting and masks quick question

Just trying to see if I'm in the ballpark, doing my math and have a grasp of subnets correctly.
With a subnet range if you have a /21 or 255.255.248.0 mask would these ranges be correct?

10.50.16.1 - 10.50.23.254
10.50.40.1 - 10.50.47.254
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The following is a rather simple subnet calculation method:

With a CIDR mask of /21 we have 8+8+5=21 bits for subnets and 3+8=11 bits for host/net/broadcast addresses.

Given that the first two bytes (10.50 in your example) should remain the same we have 5 bits in the third byte left for 2*2*2*2*2=32 subnets and 11 bits in the third and fourth bytes for 2*2*2*2*2*2*2*2*2*2*2=2048 hosts/net addrs/broadcast addrs.

The remaining 3 bits in byte 3 give a stepping of 2*2*2=8 (or 256-248=8, if you prefer, or 256/32=8), so our subnets are 10.50.0.0, 10.50.8.0, 10.50.16.0 etc.

The lowest useable host address in a subnet is net address + 1, so our host addresses start at 10.50.0.1, 10.50.8.1, 10.50.16.1 etc.

The highest useable host address in a subnet is the last address in the range - 1 (or next network address - 2, if you prefer) ,so our host addresses end at 10.50.7.254, 10.50.15.254, 10.50.23.254 etc.

The broadcast addresses are the last addresses in the range (or next network address - 1, if you prefer), so the broadcast addresses are 10.50.7.255, 10.50.15.255, 10.50.23.255 etc.
Avatar of AMtek

ASKER

thank you! much appreciated, especially with the detailed answer!