Not the normal subnetting question

jnb1985jnb1985 Member Posts: 3 ■□□□□□□□□□
I'm planning on taking the test in a week or two. The Subnetting Made Easy thread helped me out tremendously! I've been practicing for a while, but I'm having trouble with the way they word one type of question. Here is an example:
You are designing a subnet mask for the 172.30.0.0 network. You want 190 subnets with up to 150 hosts on each subnet. What subnet mask should you use?

I've got the answer now, but can someone please explain how you work this out? I get the networks are the "1"'s and the "0"'s are the hosts.

Thanks,

John B.icon_study.gif

Comments

  • MonkerzMonkerz Member Posts: 842
    172.30.0.0 is a Class B subnet. A class B mask is 255.255.0.0. Convert that to binary.

    You get 11111111.11111111.00000000.00000000
    Or NNNNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH, where N=Network bits and H=Host bits.

    You need 190 subnets, what is 190 in binary?
    10111110

    It takes 8 bits to make 190, so you need to reserve 8 bits in the mask for these 190 subnets.
    11111111.11111111.11111111.00000000, or
    NNNNNNNN.NNNNNNNN.SSSSSSSS.HHHHHHHH, where N=Network, S=Subnet, H=Host bits.

    Convert that back to decmial, you get 255.255.255.0. or 172.30.0.0/24

    Hope this helps.
  • earweedearweed Member Posts: 5,192 ■■■■■■■■■□
    You make it seem so easy Monkerz.
    No longer work in IT. Play around with stuff sometimes still and fix stuff for friends and relatives.
  • MonkerzMonkerz Member Posts: 842
    earweed wrote: »
    You make it seem so easy Monkerz.

    Is that bad? I was thinking about fully explaining it, in detail, but if someone did that to me it would only confuse me further.
  • burner27burner27 Member Posts: 75 ■■□□□□□□□□
    Monkerz wrote: »
    Is that bad? I was thinking about fully explaining it, in detail, but if someone did that to me it would only confuse me further.

    Let's forget about our past and let by-gones be by-gones.


    I would like a more detailed explanation only because i am not sure i get this. If you have the need for 190 subnets with a Class B address, you would need to borrow 8 bits-which i agree with but the bits you are borrowing aren't used for getting an exact amount of subnets sometimes, right? Borrowing 8 bits give you 255 subnets, right? And you have 8 bits for the HOSTS which would be 254 right?
  • jnb1985jnb1985 Member Posts: 3 ■□□□□□□□□□
    Thanks for the easy explanation. I'll get into the details when I start to study for the CCNA in a few weeks.
  • MonkerzMonkerz Member Posts: 842
    burner27 wrote: »
    I would like a more detailed explanation only because i am not sure i get this. If you have the need for 190 subnets with a Class B address, you would need to borrow 8 bits-which i agree with but the bits you are borrowing aren't used for getting an exact amount of subnets sometimes, right? Borrowing 8 bits give you 255 subnets, right? And you have 8 bits for the HOSTS which would be 254 right?

    It would actually give you 256 subnets, because 2^8=256, but you are correct with the number of hosts, hosts=(2^H)-2

    It's kind of getting more for your money. You want 190, but no less so you have to go with 8. By borrowing 7 bit for subnetting, you would only see a max of 128 subnets which doesn't meet your demand.
    Another example would be, you have the network 10.0.0.0 and need to create a mask allowing for 2040 subnets and atleast 8100 hosts per subnet.

    10.0.0.0 is a Class A network. The mask for this would be 255.0.0.0, converted to binary would be:
    11111111.00000000.00000000.00000000
    or, NNNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH

    You need 2040 subnets, what is 2040 in binary?
    11111111000

    It will take 11 bits to make atleast 2040 subnets. Make those changes to your mask and you get:
    11111111.11111111.11100000.00000000
    or, NNNNNNNN.SSSSSSSS.SSSHHHHH.HHHHHHHH

    Converted to decmal you get a mask of 255.255.224.0 allowing 2048 subnets and 8190 hosts.

    Which meets your demand of 2040 subnets and 8100 hosts and leaves room for scalability.
Sign In or Register to comment.