Confused on a subnetting question....

no!all!no!all! Posts: 245Member ■■■□□□□□□□
So, I've been using subnettingquestions.com and I came across one that I'm stuck on...

Q: How many subnets and hosts per subnet can you get from the network 172.26.0.0 255.255.255.128?
A: 512 Subnets and 126 Hosts


I got 2 subnets and 126 hosts...where does 512 come from?! icon_silent.gif
A+, N+, S+, CCNA:RS, CCNA:Sec

"In high society TCP is more welcome than UDP. At least it knows a proper handshake" - Ben Franklin

2019 Goals: CCNP:RS & relocate to St. Pete, FL!

Comments

  • XyroXyro Posts: 623Member
    Class B

    9 subnet bits
    7 host bits (-2)
  • no!all!no!all! Posts: 245Member ■■■□□□□□□□
    Yes, but I though you could only use the last octet for the two networks 0 and 128...which is where I got 2 subnets...
    A+, N+, S+, CCNA:RS, CCNA:Sec

    "In high society TCP is more welcome than UDP. At least it knows a proper handshake" - Ben Franklin

    2019 Goals: CCNP:RS & relocate to St. Pete, FL!
  • HAMPHAMP Posts: 163Member
    I'm confused now!
  • XyroXyro Posts: 623Member
    No, the last octet is split 1-7

    172.26.0.0 255.255.255.128

    xxxxxxxx.xxxxxxxx.12345678.9xxxxxxx = 9 subnet bits
    xxxxxxxx.xxxxxxxx.xxxxxxxx.x1234567= 7 host bits (-2)
  • XyroXyro Posts: 623Member
    HAMP wrote: »
    I'm confused now!
    Class B - default subnet mask ... so begin in 3rd octet
  • no!all!no!all! Posts: 245Member ■■■□□□□□□□
    HAMP wrote: »
    I'm confused now!

    Agreed, here was my math...
    172.26.0.0
    255.255.255.128

    256-128 = 128 which would be 0 and 128...or 2 subnets...right?! Unless there's something special about the 3rd and 4th octet being 0's that I just don't realize...Still don't see where 512 subnets is coming from icon_rolleyes.gif

    172.26.0.0 and 172.26.0.128
    A+, N+, S+, CCNA:RS, CCNA:Sec

    "In high society TCP is more welcome than UDP. At least it knows a proper handshake" - Ben Franklin

    2019 Goals: CCNP:RS & relocate to St. Pete, FL!
  • no!all!no!all! Posts: 245Member ■■■□□□□□□□
    Xyro wrote: »
    Class B - default subnet mask ... so begin in 3rd octet

    Wait, I think I see it....hang on..
    A+, N+, S+, CCNA:RS, CCNA:Sec

    "In high society TCP is more welcome than UDP. At least it knows a proper handshake" - Ben Franklin

    2019 Goals: CCNP:RS & relocate to St. Pete, FL!
  • prdemonprdemon Posts: 49Member ■■■□□□□□□□
    the third octet in your network address is 0 and your subnetmask in the third octet is 255.
    that means all 8 bits are for the network and you borrowed one bit from the last octet , thats where your 128 is comibg from
  • HAMPHAMP Posts: 163Member
    no!all! wrote: »
    Agreed, here was my math...
    172.26.0.0
    255.255.255.128

    256-128 = 128 which would be 0 and 128...or 2 subnets...right?! Unless there's something special about the 3rd and 4th octet being 0's that I just don't realize...Still don't see where 512 subnets is coming from icon_rolleyes.gif

    172.26.0.0 and 172.26.0.128

    That is how I have known it to work. It would seem I am missing something also.
  • FloOzFloOz Posts: 1,614Member
    You guys that are confused are looking at the network as class C. Remember the default mask for 172.16.0.0/16 is Class B.
  • xnxxnx Posts: 464Member ■■■□□□□□□□
    no!all! wrote: »
    So, I've been using subnettingquestions.com and I came across one that I'm stuck on...

    Q: How many subnets and hosts per subnet can you get from the network 172.26.0.0 255.255.255.128?
    A: 512 Subnets and 126 Hosts

    I got 2 subnets and 126 hosts...where does 512 come from?! icon_silent.gif

    Class B Address: /16 Default (255.255.0.0)
    3rd octet = 255 = 8 bits
    4th octet = 128 = 1 bit

    9 bits total for number of subnets
    2^9 = 512

    7 bits left from the 16 for hosts
    (2^7) -2 = 126 hosts per subnet
    Getting There ...

    Lab Equipment: Using Cisco CSRs and 4 Switches currently
  • HAMPHAMP Posts: 163Member
    prdemon wrote: »
    the third octet in your network address is 0 and your subnetmask in the third octet is 255.
    that means all 8 bits are for the network and you borrowed one bit from the last octet , thats where your 128 is comibg from

    I believe I need to revisit subnetting. I don’t remember a formula when the network is ‘0’, while the mask is ‘255’. I didn’t know that made a difference. I am so glad I found this site!!!!!

    I was using the same formula that no!all!” is using
  • xnxxnx Posts: 464Member ■■■□□□□□□□
    HAMP wrote: »
    I believe I need to revisit subnetting. I don’t remember a formula when the network is ‘0’, while the mask is ‘255’. I didn’t know that made a difference. I am so glad I found this site!!!!!

    I was using the same formula that no!all!” is using
    No worries, subnetting can be tricky when you start learning, I can only do it easily because I learnt binary and hex many years ago
    Getting There ...

    Lab Equipment: Using Cisco CSRs and 4 Switches currently
  • no!all!no!all! Posts: 245Member ■■■□□□□□□□
    Yea, HAMP, you and I were thinking the same thing....thanks xnx for the info!
    A+, N+, S+, CCNA:RS, CCNA:Sec

    "In high society TCP is more welcome than UDP. At least it knows a proper handshake" - Ben Franklin

    2019 Goals: CCNP:RS & relocate to St. Pete, FL!
  • HAMPHAMP Posts: 163Member
    I went to the subnetting site to do a few questions, and I came across this one:

    What valid host range is the IP address 172.24.89.220 255.255.255.224 a part of?

    I gotten the correct answer, and I know how I did it.
    172.24.89.193 through to 172.24.89.222

    To me, I see having 8 subnets with 30 usable host each subnet (240 host)

    I don't see 2048 subnets with, which I gotten from the formula you guys just gave.
  • omi2123omi2123 Posts: 189Member
    even though they used a class C subnet mask, but by default it's a class B network & the subnet counts from the third octet......512 subnet is correct...
  • XyroXyro Posts: 623Member
    HAMP wrote: »
    What valid host range is the IP address 172.24.89.220 255.255.255.224 a part of?

    To me, I see having 8 subnets with 30 usable host each subnet (240 host)

    I don't see 2048 subnets with, which I gotten from the formula you guys just gave.

    No, there are 11 subnets bits here. Again, it is a Class B you are working with.

    xxxxxxxx.xxxxxxxx.12345678.123xxxxxx = 11 Subnet bits
    xxxxxxxx.xxxxxxxx.xxxxxxxx.xxx12345 = 5 Host bits

    11 Subnet bits = 2048
    5 host bits = 32 (-2)
  • OfWolfAndManOfWolfAndMan Posts: 923Member ■■□□□□□□□□
    Just remember these numbers:
    0-126 (First octet)= Class A. 255.0.0.0 Subnet mask
    127 is a loopbavk address
    128-191=Class B (255.255.0.0 default subnet mask)
    192-223=Class C (255.255.255.0 subnet)
    224 and up is generally multicast
    After assessing class, look at how many bits they added. 172 is class B, therefore having 255 in third octet is 8 added net bits, along with the other one in the fourth octet. That leaves seven host bits. Subnets = 2^9 Hosts total = 2^7-2 (Which excluded network and broadcast)
    :study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation []
  • HAMPHAMP Posts: 163Member
    I see what my problem is, but it’s still confusing. As what FloOz and omi2123 mentioned, it is a class B and not a class C. I’ve been looking at the mask and using a formula based on the mask classes and not the IP addy class. (did I say that right? lol). That seems to be a different formula that I not able to do In my head just yet.
  • OfWolfAndManOfWolfAndMan Posts: 923Member ■■□□□□□□□□
    The ones that aren't already subnetted are pretty simple once you get used to the formula. It's subnetting the IP addresses that are already subnetted that make it a bit more fun :D You'll really want to know your subnetting as well when you start summarizing addresses in OSPF/EIGRP for your ABRs/ASBRs.
    :study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation []
  • XyroXyro Posts: 623Member
    Yes, always look at the IP address to learn class, not the subnet mask.
Sign In or Register to comment.