This makes no sesne, how did they get this answer for hosts?

JockVSJockJockVSJock Member Posts: 1,118
From subnettingquestions.com
Q: Question: How many subnets and hosts per subnet can you get from the network 172.29.0.0/25?

A: Answer: 512 subnets and 126 hosts

If you convert the following to binary:
255.255.0.0              11111111.11111111.00000000.00000000
255.255.255.128        11111111.11111111.11111111.10000000

It is my understanding that you take the bits where they don't match up from the default subnet mask and the prefix notation and use that to get the subnets and then to get the hosts, you subtract 2 (because of the network and broadcast address).

2^9 = 512 for subnets
512 - 2 for the hosts = 510

I have no clue how they are getting 126 for host.
***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

Comments

  • BlackoutBlackout Member Posts: 512 ■■■■□□□□□□
    /25 in binary is 11111111.11111111.11111111.10000000

    256x2= 512 Networks
    64x2-2=126 Hosts
    Current Certification Path: CCNA, CCNP Security, CCDA, CCIE Security

    "Practice doesn't make perfect. Perfect practice makes perfect"

    Vincent Thomas "Vince" Lombardi
  • earweedearweed Member Posts: 5,192 ■■■■■■■■■□
    2^9 = 512 (class B with /25 has 9 subnet bits)
    7 bits left for hosts 2^7=128.. (2^n - 2)..128-2=126
    No longer work in IT. Play around with stuff sometimes still and fix stuff for friends and relatives.
  • JockVSJockJockVSJock Member Posts: 1,118
    earweed wrote: »
    2^9 = 512 (class B with /25 has 9 subnet bits)
    7 bits left for hosts 2^7=128.. (2^n - 2)..128-2=126

    Help me understand this.

    I used Chris B's method for the following problem and got the answer correct:
    Question: How many subnets and hosts per subnet can you get from the network 192.168.47.0 255.255.255.240?
    
    Answer: 16 subnets and 14 hosts
    
    

    I basically used his method of where bits do not match up, just take them 2^n for the subnet and then subtract 2 to get the hosts.

    For some of the problems, his method won't work. How can I tell when I can use this method and it will work, and when I'll have to figure out what bits are left, use 2^n - 2.

    Does that make sense?
    ***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
  • earweedearweed Member Posts: 5,192 ■■■■■■■■■□
    You need to remember that the subnet and host bits are different. For that question 192.168.47.0 255.255.255.240 it's a class c address which means all the bits occupied by the subnet (4th octet) are used for the 2^n for the subnets for this question to get the subnets you look at 11111111.11111111.11111111.11110000 so 2^4 is 16 whereas for the hosts you look at whats left over ie the last 4 zeros which you will use for your 2^n-2 or 2^4-2. Remember that when calculating the host you look at the binary of the subnet mask and use the zeros there to calculate the number of hosts.
    No longer work in IT. Play around with stuff sometimes still and fix stuff for friends and relatives.
  • gramacorpgramacorp Member Posts: 39 ■■■□□□□□□□
    There is two different formulas

    For the bits turned on use 2^n to find the number of networks
    /28 11111111.11111111.11111111.11110000
    2^4=16

    For the bits turned off use 2^n-2 to find the number of host
    /28 11111111.11111111.11111111.11110000
    2^4-2=14

    Hope this helps?
  • PristonPriston Member Posts: 999 ■■■■□□□□□□
    You don't use n to find host.
    You use n to find networks and h to find host

    formula for host is: 2^h - 2

    h is your host bits which are the number of zeros. In this case, 7
    11111111.11111111.11111111.10000000

    2^7 - 2 = 126


    formula for networks is: 2^n

    n is your network bits which are the number of zeros that have been converted to ones. In this case, 9
    11111111.11111111.00000000.00000000
    11111111.11111111.11111111.10000000

    2^9 = 512
    A.A.S. in Networking Technologies
    A+, Network+, CCNA
  • j-manj-man Member Posts: 143
    Have you checked out the Subnetting is Easy thread or whatever it's called? Great source of information and banter.


    Question: How many subnets and hosts per subnet can you get from the network 192.168.47.0 255.255.255.240?
    Answer: 16 subnets and 14 hosts


    1) Determine what network class you are working with. In this case it's a class C
    2) The default subnet mask for a class C is what? That's right 255.255.255.0
    3) The question is asking for a 255.255.255.240 so convert into slash which is /28
    11111111.11111111.11111111.11110000
    4) Count the number of bold bits. 2^4 = 16 which is 16 subnets
    5) Now count the bits set to 0
    11111111.11111111.11111111.11110000
    How many are there? 4. For hosts subtract 2 so 2^4 = 16 minus 2 = 14 hosts

    You should be able to use this method to solve most subnetting questions involving number of subnets and hosts.

    Hope this helps
Sign In or Register to comment.