How to determine what subnet a host belongs to

BurkeJaxBurkeJax Registered Users Posts: 4 ■□□□□□□□□□
How do you determine what subnet a host belongs go? I have an example from subnettingquestions.com - Free Subnetting Questions and Answers Randomly Generated Online, but I am not sure even how to start:

Which subnet does host 172.30.189.147/20 belong to?
The site tells me the answer is : 172.30.176.0.

How is this calculated?

Comments

  • binaryhatbinaryhat Member Posts: 129
    Have you read up on subnetting?

    Perhaps if you give us how you went about solving the ? and where you got stuck we help you out.
    Currently working on:
    ICND1 - TBD
    Book: CCENT/CCNA ICND1 100-101 Official Cert Guide
    Equipment: Packet Tracer, GNS3
    Supplement Material: Youtube, Google, Boson ExamSim-Max, CBTNuggets
  • CertGrabberCertGrabber Member Posts: 32 ■■□□□□□□□□
    Well, basically, all you need is the IP address and the subnet mask that will be used. The mask will delineate which part of the IP address will be used for the network and what part will be used for hosts. You can see masks in this form: 255.255.255.240... Or in this form: /28... these two masks are equal. You just look at the first octet of the address to determine classful mask and then any additional "masking" will be for the subnet.

    The process I use is to determine the block size for each network that the mask calls for. To find the "block" size (which is the size of each subnet) you can subtract the mask number from 256... So if you have an IP of 192.168.10.55 with a mask of 255.255.255.240, you would have a block size of 256-240=16. The 4th octet is the only one of importance here because the first 3 octets are automatically network because "192" is a Class C address by definition..

    This means there will be a new, separate, network every 16 addresses in the 4th octet. So possible networks are (with ip subnet zero enabled): 192.168.10.0, 192.168.10.16, 192.168.10.32, " " .48, " " . 64, etc.. Note that each network will have 16 addresses, but 2 of these can't be used for hosts, so only 14 are usable per subnet (the first and last address of each subnet isn't allowed because the first is the network and the last is the broadcast). Once you have down the basics you can answer any subnetting question possible. Hope this clarifies a little.. ask me a more specific question and I'll get back to you.
    Studying CCNP Route

    Currently compiling my own home lab. I never knew scouring ebay for routers, switches, and modules could be so much fun!
  • BurkeJaxBurkeJax Registered Users Posts: 4 ■□□□□□□□□□
    Which subnet does host 172.30.189.147/20 belong to?
    The site tells me the answer is : 172.30.176.0.


    Based on the steps by CertGrabber....
    I know this is a class B IP address. Based off the /20 CIDR notatation (255.255.240.0), I am subtracting 240 from 256, coming up with 16. How do I translate from the original 172.30.189.147 to 172.30.176.0?
  • pham0329pham0329 Member Posts: 556
    BurkeJax wrote: »
    Which subnet does host 172.30.189.147/20 belong to?
    The site tells me the answer is : 172.30.176.0.


    Based on the steps by CertGrabber....
    I know this is a class B IP address. Based off the /20 CIDR notatation (255.255.240.0), I am subtracting 240 from 256, coming up with 16. How do I translate from the original 172.30.189.147 to 172.30.176.0?

    Once you have your increment/block size (16), you can figure out the network range.

    Since its a /20 (11111111.11111111.11110000.00000000), you start off in the third octet. Your network ranges are

    172.16.0.0 - 172.16.15.255
    172.16.16.0 - 172.16.31.255
    172.16.32.0 - 172.16.47.255
    ...
    172.16.160.0 - 172.16.175.255
    172.16.176.0 - 172.16.191.255
    172.16.192.0 - 172.16.207.255

    172.30.189.147 fits between the 172.16.176.0 network range so it belongs on the 172.16.176.0 network.
  • instant000instant000 Member Posts: 1,745
    BurkeJax wrote: »
    Which subnet does host 172.30.189.147/20 belong to?
    The site tells me the answer is : 172.30.176.0.


    Based on the steps by CertGrabber....
    I know this is a class B IP address. Based off the /20 CIDR notatation (255.255.240.0), I am subtracting 240 from 256, coming up with 16. How do I translate from the original 172.30.189.147 to 172.30.176.0?

    Your original problem:

    172.30.189.147/20

    1. what is the subnet address?
    2. what is the broadcast address?
    3. what is the valid host range?

    1. subnet mask is 255.255.240.0
    2. What is the interesting octet? the third octet
    3. 256-240 = 16
    4. block size is 16.0 (note, we are comparing the third octet)
    5. Count up networks by 16
    0, 16, 32, 48, 64 ...160, 176, 192 ...240 (note: 256 would be invalid)
    6. 189.147 falls between 176.0 and 192.0 (note: we are comparing the third octet)
    7. subnet address is 172.30.176.0
    8. broadcast is just one back from the next subnet ..
    that is, 172.30.192.0 , subtracting one, gives me 172.30.191.255
    (note: 256 is the same as 1.0, so 256 -1 = 255)
    9. valid host range is all the addresses between the subnet and the broadcast address, so this gives us this:
    172.30.176.1 - 172.30.191.254

    Some things to note:
    valid host range is always from odd (beginning) to even (end)
    broadcast address is always an odd number
    subnet address is always an even number
    networks count up in powers of 2

    So, given the above explanation, try to work out these next two problems:

    Given this CIDR notation:
    192.168.32.2/29

    Tell me the following:

    1. What is the subnet address?
    2. What is the broadcast address?
    3. What is the valid host range?


    That one should be simple.

    Here is another one.

    Given this CIDR notation:
    10.0.99.3/22

    1. What is the subnet address?
    2. What is the broadcast address?
    3. What is the valid host range?

    ===============================
    Currently Working: CCIE R&S
    LinkedIn: http://www.linkedin.com/in/lewislampkin (Please connect: Just say you're from TechExams.Net!)
Sign In or Register to comment.