Forum Home
PC World Chat
 
Thread ID: 146073 2018-04-17 12:45:00 not sure if anyone can explain about subnetting? Ninjabear (2948) PC World Chat
Post ID Timestamp Content User
1448521 2018-04-17 12:45:00 Trying to understand subnetting but finding it really difficult even with youtube and cbt nugget

If i am given 172.67.83.0/24 and I need to create :

A: 50 hosts
B: 50 hosts
C: 10 hosts
D: 6 hosts
E-H: 4 hosts

I was given the answer of for A: the new subnet mask becomes /26 but how do you get /26?
Ninjabear (2948)
1448522 2018-04-17 21:21:00 Pictures may help:

www.dummies.com
piroska (17583)
1448523 2018-04-17 22:03:00 It's /26 because the number of addresses in a subnet a.b.c.d/N is 2^(32-N), or in this case 2^6=64. Strictly speaking, both the first & last addresses of a subnet are not used (they are the subnet address at offset 0 & the broadcast address at offset 2^(32-N)-1). So in your case, your "A" subnet will become 172.67.83.0/26 and span from 172.67.83.0 to 172.67.83.63. Your "B" subnet is then 172.67.83.64/26 and spans 172.67.83.64 to 172.67.83.127. "C" will be 172.67.83.128/28, giving 16 (well, 14 usable) addresses. For D through H, they will all need to be /29, because there's 6 usable addresses in a /29 subnet, and only 2 in a /30.

I hope that all makes sense (and that I've understood the question), plus I'd like to note that I am NOT an expert on this! - this is just stuff I've picked up over my time as an embedded device programmer.
MushHead (10626)
1448524 2018-04-17 22:17:00 this is similar to how I was taught it . It gives an idea of whats happening .
www.pluralsight.com

then I pretty much forgot all of it , as Ive yet to use it .
1101 (13337)
1448525 2018-04-17 22:32:00 It's /26 because the number of addresses in a subnet a.b.c.d/N is 2^(32-N), or in this case 2^6=64. Strictly speaking, both the first & last addresses of a subnet are not used (they are the subnet address at offset 0 & the broadcast address at offset 2^(32-N)-1). So in your case, your "A" subnet will become 172.67.83.0/26 and span from 172.67.83.0 to 172.67.83.63. Your "B" subnet is then 172.67.83.64/26 and spans 172.67.83.64 to 172.67.83.127. "C" will be 172.67.83.128/28, giving 16 (well, 14 usable) addresses. For D through H, they will all need to be /29, because there's 6 usable addresses in a /29 subnet, and only 2 in a /30.

I hope that all makes sense (and that I've understood the question), plus I'd like to note that I am NOT an expert on this! - this is just stuff I've picked up over my time as an embedded device programmer.


Thanks
How do you know that A ends in 63 and B ends in 127?
Ninjabear (2948)
1448526 2018-04-18 23:02:00 Thanks
How do you know that A ends in 63 and B ends in 127?

You could define the subnet as "all addresses that, when AND'ed with the subnet mask, result in the subnet address". So for the 172.67.84.64/26 subnet (or any /26 subnet) , the subnet mask is 255.255.255.192. I find this easier to visualise in hexadecimal (or binary), so the subnet mask is represented as 0xFFFFFFC0. The span of the subnet can be given by the inverse of the subnet mask: 0x0000003F (63 in decimal). The subnet's last (broadcast) address is the binary OR of the subnet address and the inverse of the subnet mask.

In this case, (0xAC435440 OR 0x0000003F) gives 0xAC43547F, or 172.67.84.127. Similarly for the 172.67.83.0/26, (0xAC435400 OR 0x0000003F) gives 0xAC43543F or 172.67.83.63.

Apologies if I've added a bit more confusion, but after visualising numbers in hex for over 25 years, it gets to become second nature. Note 0xAC=172, 0x43=67, 0x54=84, 0x40=64 and 0x7F=127
MushHead (10626)
1