subnet me baby

dangtran09dangtran09 Member Posts: 26 ■□□□□□□□□□
i read the thread subnetting made easy and learn the basics and can do most of the subnettingquestions.com questions. however, i'm stuck on 2 main topics:

a. determining # of hosts/subnets per ip address given.

How many subnets and hosts per subnet can you get from the network 10.0.0.0 255.255.240.0?


b. determine mask if given ip , # of hosts/subnets


You are designing a subnet mask for the 172.23.0.0 network. You want 190 subnets with up to 240 hosts on each subnet. What subnet mask should you use?


please explain in details...step by step.

your assistance is much appreciated icon_cheers.gif

Comments

  • IRONMONKUSIRONMONKUS Member Posts: 143 ■■■□□□□□□□
    a. determining # of hosts/subnets per ip address given.
    How many subnets and hosts per subnet can you get from the network 10.0.0.0 255.255.240.0?

    10.0.0.0s default subnet is 255.0.0.0 and that is your base.
    Given 255.255.240.0

    I change them to binary to see it easier visually.
    default: 11111111.00000000.00000000.00000000
    given:... 11111111.11111111.11110000.00000000

    The difference. There are 12 1s more in the new subnet and that gives you your subnets.
    12 bits are borrowed from the hosts (the 0s)

    If IP subnet-zero is enabled, you do 2^12 to find the subnets. 2^12 = 4096 subnets.
    To find the hosts, you count up the remainding hosts (0s) and there are 12 left. You do 2^12-2, because you cannot give the network or broadcast address to a node. 2^12-2 = 4094 hosts per subnet.


    b. determine mask if given ip , # of hosts/subnets
    You are designing a subnet mask for the 172.23.0.0 network. You want 190 subnets with up to 240 hosts on each subnet. What subnet mask should you use?

    For this, I like to use binary again to make me understand it better visually. Once you understand, you can just do 2^x to find the answer.

    Look at what you need. I'll find the answer figuring out the highest number, that bein 240 hosts. Writing this chart below, I find what can be subtracted from 240.

    256 128 64 32 16 8 4 2 1
    0.....1....

    We find that the first 1 we can put down in 128. We don't need to go further, because we just add up the rest of the bits. Counting down from 128 - 1 = 8 bits. These are the host bits we need to keep in order to give us the 240 hosts we need.

    This is a Class B network, so I write down binary to get a visual understanding.

    Default: 11111111.11111111.00000000.00000000
    New:.....11111111.11111111.11111111.00000000
    Default: 255.255.0.0 /16
    New: 255.255.255.0 /24

    We found the new subnet by using the 8 bits and counted right to left. Since we need 8 bits to have around 240 hosts, the rest have to be 1s to give us the subnets.

    The difference between the default and the New is, 8 subnet bits (1s) and 8 host bits(0s).

    We work the 2^8 to find the subnets and it is 2^8 = 256 subnets.
    We work the 2^8-2 to find the hosts per subnet and it is 2^8-2 = 254 hosts per subnet.

    I hope this helps.
  • mella060mella060 Member Posts: 198 ■■■□□□□□□□
    Subnetting takes time and practice. Took me around 3-4 weeks of solid practice and doing exercises to understand what was going on. You need to write it all down so it sticks in your brain.

    Pick up a book like Todd Lammles CCNA study guide and go through the chapter on subnetting. That is how i learnt to subnet. There are a heap of exercises in there. Do them again and again until you get it. For me, i was doing them for a while until it just 'clicked'

    And write them all down. That is the key. Get a piece of paper and get into it. After you get it you enjoy doing it. Well i do anyway.

    Know your powers of 2

    Know your formulas...2^n for subnets and 2^n-2 for hosts.
    dangtran09 wrote: »
    You are designing a subnet mask for the 172.23.0.0 network. You want 190 subnets with up to 240 hosts on each subnet. What subnet mask should you use?

    What class of address is this ? class B

    You need 190 subnets. What power of 2 will give you that ?

    2^4 = 16
    2^5 = 32
    2^6 = 64
    2^7 = 128
    2^8 = 256

    So 2^8 = 256 subnets which is enough. 128 is not enough

    You need up to 240 hosts. So using the hosts formula 2^n-2

    2^8-2 = 256-2 = 254 hosts

    So you have a class b address and the default mask for a class b address is ?

    255.255.0.0

    2^8 for the subnets...the 8 means you need to borrow 8 bits from the host portion of the address and they become subnet bits or basically network bits

    default class b subnet mask was...255.255.0.0

    new subnet mask will be...255.255.255.0

    And there is your answer
  • A5BenA5Ben Registered Users Posts: 2 ■□□□□□□□□□
    Thanks for posting that link, very useful for practicing sub netting. Been going back to it all day, none wrong so far! :)

    Ben
  • se4b4ssse4b4ss Registered Users Posts: 1 ■□□□□□□□□□
    Take a look at this page. It presents a randomized subnetting question and allows you to click to see the answer and the work with an explanation on how to solve the problem step by step.

    Disclaimer, I wrote it. :)
  • veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    IRONMONKUS wrote: »
    a. determining # of hosts/subnets per ip address given.
    How many subnets and hosts per subnet can you get from the network 10.0.0.0 255.255.240.0?

    10.0.0.0s default subnet is 255.0.0.0 and that is your base.
    Given 255.255.240.0

    I change them to binary to see it easier visually.
    default: 11111111.00000000.00000000.00000000
    given:... 11111111.11111111.11110000.00000000

    The difference. There are 12 1s more in the new subnet and that gives you your subnets.
    12 bits are borrowed from the hosts (the 0s)

    If IP subnet-zero is enabled, you do 2^12 to find the subnets. 2^12 = 4096 subnets.
    To find the hosts, you count up the remainding hosts (0s) and there are 12 left. You do 2^12-2, because you cannot give the network or broadcast address to a node. 2^12-2 = 4094 hosts per subnet.


    b. determine mask if given ip , # of hosts/subnets
    You are designing a subnet mask for the 172.23.0.0 network. You want 190 subnets with up to 240 hosts on each subnet. What subnet mask should you use?

    For this, I like to use binary again to make me understand it better visually. Once you understand, you can just do 2^x to find the answer.

    Look at what you need. I'll find the answer figuring out the highest number, that bein 240 hosts. Writing this chart below, I find what can be subtracted from 240.

    256 128 64 32 16 8 4 2 1
    0.....1....

    We find that the first 1 we can put down in 128. We don't need to go further, because we just add up the rest of the bits. Counting down from 128 - 1 = 8 bits. These are the host bits we need to keep in order to give us the 240 hosts we need.

    This is a Class B network, so I write down binary to get a visual understanding.

    Default: 11111111.11111111.00000000.00000000
    New:.....11111111.11111111.11111111.00000000
    Default: 255.255.0.0 /16
    New: 255.255.255.0 /24

    We found the new subnet by using the 8 bits and counted right to left. Since we need 8 bits to have around 240 hosts, the rest have to be 1s to give us the subnets.

    The difference between the default and the New is, 8 subnet bits (1s) and 8 host bits(0s).

    We work the 2^8 to find the subnets and it is 2^8 = 256 subnets.
    We work the 2^8-2 to find the hosts per subnet and it is 2^8-2 = 254 hosts per subnet.

    I hope this helps.

    Thanks IronMonkus! :)
  • IRONMONKUSIRONMONKUS Member Posts: 143 ■■■□□□□□□□
    Thanks IronMonkus! :)

    You're welcome! icon_cheers.gif
Sign In or Register to comment.