Some help with subnetting please.

jkuochjkuoch Member Posts: 5 ■□□□□□□□□□
Question: What valid host range is the IP address 172.26.149.18/21 a part of?
Answer: 172.26.144.1 through to 172.26.151.254

how did they get this? I get some of the questions from subnettingquestions.com however questions like this, I dont know how to carry the numbers into the next octet.

Comments

  • SharkDiverSharkDiver Member Posts: 844
    A Class B address like 172.26.149.18 has 16 bits in the host portion. A /21 means that you are stealing 5 bits to create subnets.
    21-16=5

    When you steal 5 bits, you are creating subnets in increments of 8.

    So, your subnets would be:
    172.26.0.0
    172.26.8.0
    172.26.16.0
    172.26.24.0
    172.26.32.0
    172.26.40.0
    172.26.48.0
    172.26.56.0
    172.26.64.0
    172.26.72.0
    172.26.80.0
    172.26.88.0
    172.26.96.0
    172.26.104.0
    172.26.112.0
    172.26.120.0
    172.26.128.0
    172.26.136.0
    172.26.144.0
    172.26.152.0
    And so on.

    The subnetwork that your IP falls in would be all the addresses between the last two in that list.
    The 172.26.144.0 subnet contains all the addresses from 172.26.144.0 to 172.26.151.255
    The addresses that can be used for hosts are 172.26.144.1 to 172.26.151.254
  • Ltat42aLtat42a Member Posts: 587 ■■■□□□□□□□
    I work it this way -

    Step 1 - What address class is the network in?
    Step 2 - What is the default subnet mask for the given network
    ....then work from there

    In the question you posted... 172. 26 - CLASS B ADDRESS, DEFAULT MASK IS 255.255.0.0 or /16

    The mask in question is /21, so, 5 bits were taken from the host bits to create the subnets, which leaves 11 bits to assign to hosts.

    Using the binary math 2(5) = 32. 32 subnets were created.
    11 bits for hosts - 2(11) = 2048. subtract 2 = 2046 total hosts

    hth
  • kriscamaro68kriscamaro68 Member Posts: 1,186 ■■■■■■■□□□
    /21=255.255.248.0. Since the third octet is not 255 you know that you will be dealing within that octet. Now you take 256-248=8. Now you know you will be using 8 to determine what subnet 172.26.149.18 is in. You can leave the .18 out at the end as its not really important right now as we are dealing with the third octet only.

    start with 172.26.0-172.26.7
    172.26.8-172.26.15 and so on till you get to 172.26.144.0.

    Now we know thats where the range starts but we want the valid range or usable ip's. Because the first address is always taken by the network you know it starts with 172.26.144.1. Now the next subnet will start with 172.26.152.0 so you go one less ip than that to find your end of the subnet which is 172.26.151.255. Now the boradcast ip always takes the last ip in the range so you know that your valid usable ip will end at 172.26.151.254.
  • JockVSJockJockVSJock Member Posts: 1,118
    jkuoch wrote: »
    Question: What valid host range is the IP address 172.26.149.18/21 a part of?
    Answer: 172.26.144.1 through to 172.26.151.254

    how did they get this? I get some of the questions from subnettingquestions.com however questions like this, I dont know how to carry the numbers into the next octet.

    Let me see if I can make this clear using binary method, this is how I'm solving my subnetting problems.

    We've got the following IP addresses and need to figure out the host range.
    IP Address     172.26.149.18
    Subnet Mask  255.255.248.0 
    

    Convert both IP addresses to binary:
    10101100.00011010.10010101.00010010 
    11111111.11111111.11111000.00000000
    

    Now do the conversion to get your Network Address, Host Range and Broadcast Address
    N:  172.26.144.0 
    FH  172.26.144.1 
    LH  172.26.151.254
    B    172.26.151.255 
    


    Also this website has a Subnet Calculator that you can download and check your answers with.

    Don't give up, it took me some time and effort to get it!
    ***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
  • CodeBloxCodeBlox Member Posts: 1,363 ■■■■□□□□□□
    place value of the least significant subnet bit in the special octet is 8. This is bit number 5 from left to right. Keep going in increments of that multiplier which is 8 until you get just in front of that IP address, but not over. That is your subnet. Next, add 8 again and that is the next subnet. Anything in between the two is your subnets host range.
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
  • jkuochjkuoch Member Posts: 5 ■□□□□□□□□□
    Thank you everyone for your input and trying to help me. A big thank you to Sharkdiver as your response gave me a lightbulb moment and everything started to make sense, thank you!! :D
Sign In or Register to comment.