Hi, How many subnets and hosts per subnet can you get from the network 172.20.0.0/28?

SurferdudeHBSurferdudeHB Member Posts: 199 ■■■□□□□□□□
I tried using the 2^n and (2^n)-2 formula but I'm not getting
4096 subnet and 14 hosts answer.

Please help.

Comments

  • luke_bibbyluke_bibby Member Posts: 162
    172.20.0.0/28 or rather 172.20.0.0/255.255.255.240

    Class B address.
    Class B default mask = 255.255.0.0

    172.20.0.0 is subnetted by borrowing 12 bits from the host portion of the address (28 - 16 = 12).

    Number of subnets = 2^12 = 4096
    Number of usable hosts = (2^4) - 2 = 16 - 2 = 14
  • closetgeekclosetgeek Member Posts: 15 ■□□□□□□□□□
    16 subnets and 14 host -I'm pretty good at this so.... ask away....lol
    Life is an enigma so lets figure it out....
  • closetgeekclosetgeek Member Posts: 15 ■□□□□□□□□□
    I tried using the 2^n and (2^n)-2 formula but I'm not getting
    4096 subnet and 14 hosts answer.

    Please help.
    The secret is in your subnet mask....once you find your mask the rest is easy... I did it in my head.Google subnetting secrets this is a very good way to learn subnetting.
    Life is an enigma so lets figure it out....
  • SurferdudeHBSurferdudeHB Member Posts: 199 ■■■□□□□□□□
    luke_bibby wrote: »
    172.20.0.0/28 or rather 172.20.0.0/255.255.255.240

    Class B address.
    Class B default mask = 255.255.0.0

    172.20.0.0 is subnetted by borrowing 12 bits from the host portion of the address (28 - 16 = 12).

    Number of subnets = 2^12 = 4096
    Number of usable hosts = (2^4) - 2 = 16 - 2 = 14

    Got it thanks!
  • Morty3Morty3 Member Posts: 139
    closetgeek wrote: »
    16 subnets and 14 host -I'm pretty good at this so.... ask away....lol

    It is not classless and neither a class C address icon_sad.gif
    CCNA, CCNA:Sec, Net+, Sonicwall Admin (fwiw). Constantly getting into new stuff.
  • blackninjablackninja Member Posts: 385
    closetgeek wrote: »
    16 subnets and 14 host -I'm pretty good at this so.... ask away....lol

    Must try harder ;)
    Currently studying:
    CCIE R&S - using INE workbooks & videos

    Currently reading:
    Everything. Twice ;)
  • sina2011sina2011 Member Posts: 239 ■□□□□□□□□□
    Firstly I know this an old thread but Ive been looking for a good explanation on this part of subnetting and you guys have made me 1 step closer to understanding subnetting completley.
    I Just have one Question for:

    @Luke Bibby

    where did you get (Number of usable hosts = (2^4) from in the second part of your explanation I cant seem to figure it out.


    Cheers.
  • KrisAKrisA Member Posts: 142
    sina2011 wrote: »
    Firstly I know this an old thread but Ive been looking for a good explanation on this part of subnetting and you guys have made me 1 step closer to understanding subnetting completley.
    I Just have one Question for:

    @Luke Bibby

    where did you get (Number of usable hosts = (2^4) from in the second part of your explanation I cant seem to figure it out.


    Cheers.

    I am not Luke - However... that is the number of "Off bits" aka the 0's ...

    /28 = 11111111.11111111.11111111.11110000 <- 4 Off bits..... Just count ( you will starting thinking of it binary after awhile) the 0's
    WGU Progress BSIT:NA | Current Term:1 | Transfered To-Do In Progress Completed
    EWB2 BAC1 BBC1 TSV1 WFV1 CLC1 LAE1 LUT1 LAT1 AXV1 TTV1 INC1 INT1 TPV1 SST1 SSC1 GAC1 HHT1 TNV1 QLT1 BOV1 LET1 ORC1 IWC1 IWT1 MGC1 ABV1 AHV1 AJV1 TWA1 CPW2 BRV1
    Currently Reading
    Darril Book
  • pham0329pham0329 Member Posts: 556
    ^ What he said. But rather than doing it in binary...if you have 32 bits, and 28 are used for the network address, than means 32 - 28 = 4 bits for hosts.
  • JockVSJockJockVSJock Member Posts: 1,118
    I'm confused on how the answer for this was gotten too. I'm using Chris Bryant's method of subnetting and not getting the same answer:

    IP Address: 172.20.0.0
    Default Mask: 255.255.0.0
    Subnet Mask: 255.255.255.224

    I convert the default mask and the subnet mask to binary:

    Default Mask = 11111111.11111111.00000000.00000000
    Subnet Mask = 11111111.11111111.11111111.11100000

    Using his method I take the bits turned on under the subnet mask (2^11) to find the subnets which gives me = 2048
    And again, using his method to find the host, I use the following (2^11-2), which gives me = 2046

    Not saying I'm correct, I'm just using the method that works for me the best and trying to generate discussion and understand what is going on.

    thanks
    ***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)

    "Its easier to deceive the masses then to convince the masses that they have been deceived."
    -unknown
  • SlowhandSlowhand Mod Posts: 5,161 Mod
    JockVSJock wrote: »
    I'm confused on how the answer for this was gotten too. I'm using Chris Bryant's method of subnetting and not getting the same answer:

    IP Address: 172.20.0.0
    Default Mask: 255.255.0.0
    Subnet Mask: 255.255.255.224

    I convert the default mask and the subnet mask to binary:

    Default Mask = 11111111.11111111.00000000.00000000
    Subnet Mask = 11111111.11111111.11111111.11100000

    Using his method I take the bits turned on under the subnet mask (2^11) to find the subnets which gives me = 2048
    And again, using his method to find the host, I use the following (2^11-2), which gives me = 2046

    A /28 mask would give 12 network bits, not 11:
    Subnet Mask = 11111111.11111111.11111111.11110000

    That means the subnet mask is 255.255.255.240.

    With 12 bits, you'd have 2^12 which equals 4096. For the hosts, you'd have (2^4)-2, which makes 14 hosts on each subnet.

    Free Microsoft Training: Microsoft Learn
    Free PowerShell Resources: Top PowerShell Blogs
    Free DevOps/Azure Resources: Visual Studio Dev Essentials

    Let it never be said that I didn't do the very least I could do.
  • JockVSJockJockVSJock Member Posts: 1,118
    Slowhand wrote: »
    A /28 mask would give 12 network bits, not 11:
    Subnet Mask = 11111111.11111111.11111111.11110000

    That means the subnet mask is 255.255.255.240.

    With 12 bits, you'd have 2^12 which equals 4096. For the hosts, you'd have (2^4)-2, which makes 14 hosts on each subnet.

    I don't get it.

    The original subnet mask is 255.255.255.224, isn't that /27?

    I don't understand where you are getting /28.
    ***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)

    "Its easier to deceive the masses then to convince the masses that they have been deceived."
    -unknown
  • SlowhandSlowhand Mod Posts: 5,161 Mod
    JockVSJock wrote: »
    I don't get it.

    The original subnet mask is 255.255.255.224, isn't that /27?

    I don't understand where you are getting /28.
    The OP asked for /28 in the title of the thread: Hi, How many subnets and hosts per subnet can you get from the network 172.20.0.0/28?

    Free Microsoft Training: Microsoft Learn
    Free PowerShell Resources: Top PowerShell Blogs
    Free DevOps/Azure Resources: Visual Studio Dev Essentials

    Let it never be said that I didn't do the very least I could do.
  • gramacorpgramacorp Member Posts: 39 ■■■□□□□□□□
    To find the number of subnets use 2^n for the on bits
    172.20.0.0
    255.255.255.224
    11111111.11111111.11111111.11100000 (11 bits on) so 2^11=2048 subnets

    To find the number of host per subnet use 2^n-2 for the off bits
    172.20.0.0
    255.255.255.224
    11111111.11111111.11111111.11100000 (5 bits off) so 2^5-2=30 host per subnet
  • JockVSJockJockVSJock Member Posts: 1,118
    Slowhand wrote: »
    The OP asked for /28 in the title of the thread: Hi, How many subnets and hosts per subnet can you get from the network 172.20.0.0/28?

    Ya, I really f****d that one up.

    Sorry.
    ***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)

    "Its easier to deceive the masses then to convince the masses that they have been deceived."
    -unknown
  • SlowhandSlowhand Mod Posts: 5,161 Mod
    Heh, no worries. At least it was here on TE and not at work you got the wrong number. . . unlike me, who worked an entire graveyard shift, called Cisco SmartNet support twice, and probably tore out half my hair in frustration before realizing that it wasn't my VPN tunnel or my firewall settings that were wrong, it was the address and mask on a subinterface. icon_lol.gif

    Free Microsoft Training: Microsoft Learn
    Free PowerShell Resources: Top PowerShell Blogs
    Free DevOps/Azure Resources: Visual Studio Dev Essentials

    Let it never be said that I didn't do the very least I could do.
  • pham0329pham0329 Member Posts: 556
    Slowhand wrote: »
    Heh, no worries. At least it was here on TE and not at work you got the wrong number. . . unlike me, who worked an entire graveyard shift, called Cisco SmartNet support twice, and probably tore out half my hair in frustration before realizing that it wasn't my VPN tunnel or my firewall settings that were wrong, it was the address and mask on a subinterface. icon_lol.gif

    Eh, at least you weren't like closetgeek (3rd post) who claims he's really good at subnetting and then proceed to give the totally wrong answer :)
  • Steadfast GirlSteadfast Girl Registered Users Posts: 4 ■□□□□□□□□□
    i have a question. Answer me please. Question:How many subnet and hosts per subnet can you get from the network 174.20.0.0/23 Remember for host part at least 2 bits are required?
  • oli356oli356 Member Posts: 364
    i have a question. Answer me please. Question:How many subnet and hosts per subnet can you get from the network 174.20.0.0/23 Remember for host part at least 2 bits are required?
    Download this to check. IP Subnet Calculator

    Subnet mask in binary:
    11111111.11111111.11111110.00000000 (255.255.254.0)

    Its /23 so there are 23 network bits.

    This leaves us with 9 host bits (0s).. So 2^9=512 and minus the 2 so 510.
    This leaves us with 7 host bits (1s) in the octet we're working with ..So 2^7=128.

    128 subnets
    510 hosts.
    Lab:
    Combination of GNS3 and Cisco equipment if required.
  • rphannrphann Member Posts: 76 ■■□□□□□□□□
    i have a question. Answer me please. Question:How many subnet and hosts per subnet can you get from the network 174.20.0.0/23 Remember for host part at least 2 bits are required?

    The answer is:

    (2^9)-2=510
    510 hosts per subnet

    (2^7)=128
    128 subnet
  • Steadfast GirlSteadfast Girl Registered Users Posts: 4 ■□□□□□□□□□
    thanks for answering my question. GOD bless u allz.
  • fadhilfadhil Member Posts: 200
    thanks for answering my question. GOD bless u allz.

    most welcome
  • sizeonsizeon Member Posts: 321
    luke_bibby wrote: »
    172.20.0.0/28 or rather 172.20.0.0/255.255.255.240

    Class B address.
    Class B default mask = 255.255.0.0

    172.20.0.0 is subnetted by borrowing 12 bits from the host portion of the address (28 - 16 = 12).

    Number of subnets = 2^12 = 4096
    Number of usable hosts = (2^4) - 2 = 16 - 2 = 14

    This is correct
  • hardstylewonhardstylewon Member Posts: 15 ■□□□□□□□□□
    rphann wrote: »
    The answer is:

    (2^9)-2=510
    510 hosts per subnet

    (2^7)=128
    128 subnet

    I couldn't have said it better.
  • gadav478gadav478 Member Posts: 374 ■■■□□□□□□□
    I couldn't have said it better.

    How do you go about this method? Just curious.
    Goals for 2015: CCNP
  • gbdavidxgbdavidx Member Posts: 840
    luke_bibby wrote: »
    172.20.0.0/28 or rather 172.20.0.0/255.255.255.240

    Class B address.
    Class B default mask = 255.255.0.0

    172.20.0.0 is subnetted by borrowing 12 bits from the host portion of the address (28 - 16 = 12).

    Number of subnets = 2^12 = 4096
    Number of usable hosts = (2^4) - 2 = 16 - 2 = 14

    I understand that 2 can't be used because the first and last ip, but why it -2 a 2nd time?
  • ChickenNuggetzChickenNuggetz Member Posts: 284
    gbdavidx wrote: »
    I understand that 2 can't be used because the first and last ip, but why it -2 a 2nd time?

    I think you've misunderstood what he was doing. He's basically writing out his thought process. The 16 he gets is from calculating 2^4 and then he is subtracting 2 which gives him the final answer of 14. It wasnt exactly clear, but I understand what he was trying to show.
    :study: Currently Reading: Red Hat Certified Systems Administrator and Engineer by Ashgar Ghori

    Certifications: CCENT; CCNA: R&S; Security+

    Next up: RHCSA
Sign In or Register to comment.