Subnet Range help
aBlackPerson
Member Posts: 24 ■□□□□□□□□□
in CCNA & CCENT
I've been following the subnet guide found at Subnetting Made Easy And Other Cisco Tidbits: Subnetting Made Easy - Critically Acclaimed! and I'm finding it very hard to understand solving the network ranges. What I mean is for this example, I don't get how the solution for the valid range is 172.16.0.1 to 172.16.127.254. I'm just confused as to how the octet increments when an octet will exceed 255 if that makes since. I can't find anything that explains the range increment. I have it all down except properly understanding how to find the range on Class A, and Class B.
What is the valid host range of the 1st subnet of 172.16.0.0/17?
/17 tells us that the block size is 224-17 = 27 = 128. We are borrowing in the 3rd octet as bit 17 is in the 3rd octet. Our subnets are:-
172.16.0.0
172.16.128.0
The first subnet is 172.16.0.0 and the valid host range is 172.16.0.1 to 172.16.127.254. You must remember not to include the subnet address (172.16.0.0) and the broadcast address (172.16.127.255).
What is the valid host range of the 1st subnet of 172.16.0.0/17?
/17 tells us that the block size is 224-17 = 27 = 128. We are borrowing in the 3rd octet as bit 17 is in the 3rd octet. Our subnets are:-
172.16.0.0
172.16.128.0
The first subnet is 172.16.0.0 and the valid host range is 172.16.0.1 to 172.16.127.254. You must remember not to include the subnet address (172.16.0.0) and the broadcast address (172.16.127.255).
Comments
-
Deathmage Banned Posts: 2,496Even though there is 265 bit in a octet you can only go to 255 as a rule and standard.
Typically also 255 is the broadcast range unless your using 255.255.255.255 for say a loopback, but you'll learn that later on down the path of networking.
A /17 is correct as the above, but the kicker is this if this makes sense. Since it's a /17 you need to think of it this way. Always minus two address for the network ID and Broadcast, so since it's a /17, it's a block size of 128.0, as shown in the graph below. The 1st address is obviously the network ID 172.16.0.0 and the broadcast Id is the last IP before the next network ID of 172.16.128.0 so that would be 172.16.127.255. With that being said since you know the Network ID and the Broadcast ID, can you guess what is left over for the range? ......do you see now? ... the range would be 172.16.0.1 to 172.16.127.254.
Look at the graph and information below for more explanation. - once you understand this you'll be why, did I think subnetting was hard?
Subnets are from left to right
Hosts are right to left like so.
Finding hosts: 2^H-2 | H = turn off bit's or "0's"
Finding subnets: 2^S + S = turned on bits or "1's"
Finding Block Size: 256-[subnet mask in interesting octet] IE: 255.255.255.224, 256-224=32.
Class B Table:
CIDR:
/16
/17
/18
/19
/20
/21
/22
/23
/24
/25
/26
/27
/28
/29
/30
/31
/32
Subnet Mask:
255.255.0.0
x.x.128.0
x.x.192.0
x.x.224.0
x.x.240.0
x.x.248.0
x.x.252.0
x.x.254.0
255.255.255.255.0
x.x.x.128
x.x.x.192
x.x.x.224
x.x.x.240
x.x.x.248
x.x.x.252
x.x.x.254
x.x.x.255
Subnets:
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768
65356
Hosts:
65356
32768
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
Binary
128
64
32
16
8
4
2
1
.
128
64
32
16
8
4
2
1
(for subnets just ignore /31, /32, you won't use them since you always need to bits for network ID and Broadcast ID)
So as you know a single octet only has 256 bits or 8 characters, so since it's a class B, since it's a 172.16.0.0 you are only interested in the last two octets which has 16 bits total. When you want to know the amount of each bit in an octet you increment in a quantity of the power of 2, as the number above show.
With that being said, since you now have a /17 well the easier way of think about it, since, as the graph shows above a CIDR /17 equals 32,768 total hosts you do simple math. Since your using 7 bits to get to 32768 total hosts (32764 usable, since you always need to save two for the network/broadcast ID) and you only have 1 bit left over, looking at the graph above your mask is x.x.128.0 so your block size is simple because ironically you just do 256-128=128 and that's your block size. I know it's a tad confusing, took me a while to figure it out.
Class C Table:
CIDR:
/24
/25
/26
/27
/28
/29
/30
/31
/32
Subnet Mask:
255.255.255.0
x.x.x.128
x.x.x.192
x.x.x.224
x.x.x.240
x.x.x.248
x.x.x.252
x.x.x.254
x.x.x.255
Hosts:
256
128
64
32
16
8
4
2
1
Subnets:
1
2
4
8
16
32
64
128
256
Binary
.
128
64
32
16
8
4
2
1
Another example, 192.168.104.5 /27 has a subnet mask of 255.255.255.224. 256 - 224 = 32. Your block size is 32. so it would be 192.168.104.0, 192.168.104.32, 192.168.104.64, 192.168.104.96, 192.168.104.128, 192.168.104.160, 192.168.104.192, 192.168.104.224, 192.168.104.255. This is also assuming 'ip subnet-zero' is applied.
Breaking this down is simple: Since you used 3 bits for the subnets you can do 2^3 = 8 which is how many subnets you have total. Since you used 3 bits for your block size you are left with 5 bits for hosts, 2^5= 32 hosts total, 30 of which can be used. There is only 8 bits per octet so as-long as you remember that, using the power of 2's makes it simple.
Once you grasp it's principals it's simple. One word of advice, remember the graph above and write out a bazzillion times, it makes subnet so much easier. -
Simrid Member Posts: 327Your table has just broken your post. Magic.Network Engineer | London, UK | Currently working on: CCIE Routing & Switching
sriddle.co.uk
uk.linkedin.com/in/simonriddle -
Deathmage Banned Posts: 2,496ya the tables can't stretch too far. You can still view it, you just need to pan right.