Subnetting

WempererWemperer Registered Users Posts: 3 ■□□□□□□□□□
I am having a heck of a time wrapping my head around this...
I found this video to be most helpful: YouTube - ‪Subnetting Made Easy Part 1‬‏

However, I still don't "understand" what im doing. i was given this IP:

212.46.165.199/25

and told to figure out the First Host which is

212.46.165.129

I can't figure out the relationship between the 199, 129 and /25. I think the 25 means that one bit is taken from host to network but how does one determine the first usable host from that?

Comments

  • CodeBloxCodeBlox Member Posts: 1,363 ■■■■□□□□□□
    212.46.165.199 is just a random IP address in this address space.


    212.46.165.199/25

    In your subnet mask, there is 1 bit used for subnetting. It's the least significant subnet bit and its place value is 128. That gives you a multiplier(block size) of 128. This number gives you the boundaries of your subnets. In the case of 128 you will only have two possible combinations, 0 and 128

    212.46.165.199 resides in the 212.46.165.128 subnet. The first host wold be 212.46.165.129 and the last would be 212.46.165.254
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
  • BlueEyedSamuraiBlueEyedSamurai Member Posts: 28 ■□□□□□□□□□
    Wemperer - Here is a good document to learn from: https://learningnetwork.cisco.com/servlet/JiveServlet/previewBody/6014-102-1-19236/Subnetting%20Examples.pdf. But to work through your problem.... If you convert the subnet mask (/25) to binary it would look like this: 11111111.11111111.11111111.10000000 The interesting octet is the fourth one (10000000). This is where you would find your range. Since 10000000 converted would be a 128 in decimal, 128 would be your range. So it would look something like this: 212.46.165.0 212.46.165.128 Since you only have one bit to play with, you can only create 2 subnets from it. Meaning the bit can be either on or off. As you were given 212.46.165.199/25, .199 would be found in the .128 network. As the first address (128 is reserved for the network address the first available address for hosts would be 129. Hope this helps. -Samurai
    Always studying for something!
  • switchratswitchrat Member Posts: 13 ■□□□□□□□□□
    I here you on the subnetting thing. I had it down with a few loose ends and I started watching youtube vid's and bang I was all confused. My fix was the DANCOURSES.com on youtube all 10 of them on subnetting. The use if the magic number was it for me. So my 2cents dont read a lot of different material as too many people do not know who to teach and I got totally confused. stick with one media, and good luck.

    PS I would not read post on threads like this to start subnetting, I use the thread to ask specific questions. You need structure or I did anyway

    IMO
  • miller811miller811 Member Posts: 897
    I don't claim to be an expert, but I sure would like to become one someday.

    Quest for 11K pages read in 2011
    Page Count total to date - 1283
  • EssendonEssendon Member Posts: 4,546 ■■■■■■■■■■
    I agree with miller811. Him and LordFlashHeart (I think) have some great input into that thread.

    @ miller811, that thread is referenced in a sticky. But I agree the thread should be a sticky.
    NSX, NSX, more NSX..

    Blog >> http://virtual10.com
  • WempererWemperer Registered Users Posts: 3 ■□□□□□□□□□
    I'm still struggling....


    When subnetting what goals should one have? I'd assume:

    Network address
    First usable host address
    Last usable host address
    Broadcast address
    Next usable subnet address.
  • Varez ITVarez IT Member Posts: 32 ■■□□□□□□□□
    Wemperer,

    Yes, you may use the model of:

    Network Address
    First Usable IP Address
    Last Usable IP Address
    Broadcast Address

    I believe what will help you most is remembering the block sizes of the various subnet masks.

    10000000 or /25 = 128 (This is two networks with 128 hosts each)
    11000000 or /26 = 192 (This is four networks with 64 hosts each)
    Etc.

    Does this make sense?

    Try to complete the table I created above until you get to a /30 (255.255.255.252) and we can help you out along the way.

    I hope this was helpful!
  • WempererWemperer Registered Users Posts: 3 ■□□□□□□□□□
    I was going to ask someone to make that for me lol

    I don't know how to complete the table.
  • Varez ITVarez IT Member Posts: 32 ■■□□□□□□□□
    Wemperer,

    Do you understand binary math very well? If so, it will assist you tremendously during your studies.

    For example...

    10000000 = 128 (because the bit all the way to the left represents the number 12icon_cool.gif.

    11000000 = 192 (because 128+64 = 192).

    As you continue making the chart the numbers are divided in half.

    Also, each bit that is a 1 represents the subnet portion of the IP address and each bit that is a 0 represents the host ID.

    For example...

    10000000 = 2 networks with 128 hosts in each network (2 X 128 = 256)
    11000000 = 4 networks with 64 hosts in each network (4 X 64 = 256)

    Does this fill in the gaps and help you complete the chart? I believe the best way to learn it is to complete the chart. That will help you not only learn how to subnet but also understand why it works the way it does.

    I would recommend using Todd Lammle's CCENT study guide because he has a GREAT section on subnetting class A, B & C IP addresses.

    I hope this helps!
  • HypntickHypntick Member Posts: 1,451 ■■■■■■□□□□
    The thing that made my AH-HA! moment was realizing that each octet of a mask can only be 1 of 8 possible values.

    128, 192, 224, 240, 248, 252, 254, 255

    Also remember that the greatest possible mask size is a /30, which allows for 2 usable hosts, 1 network address and 1 broadcast address.

    I generally do draw a little chart out to help with the 8 possible subnet numbers, their CIDR notation, amount of networks and then the amount of hosts possible.
    WGU BS:IT Completed June 30th 2012.
    WGU MS:ISA Completed October 30th 2013.
  • johnnyBoyjohnnyBoy Registered Users Posts: 8 ■□□□□□□□□□
    Wemperer wrote: »
    I'm still struggling....


    When subnetting what goals should one have? I'd assume:

    Network address
    First usable host address
    Last usable host address
    Broadcast address
    Next usable subnet address.


    For me it is easier to go this way:

    Network address = 212.46.165.128
    Broadcast address = 212.46.165.255
    First usable host address = 212.46.165.129
    Last usable host address = 212.46.165.254
    Next usable subnet address = no more subnets left in this question, assuming subnet zero is already used

    /25 = 255.255.255.128 = two subnets/networks with 126 usable hosts addresses

    So, given "212.46.165.199" you can figure out the "range" of addresses you are able to use on the subnet/network that "212.46.165.199" is on

    /25 = 128

    Do this:

    0 - 127
    128 - 255
    256

    First subnet/network
    212.46.165.0 - 212.46.165.127

    0 = Network address for the first subnet
    127 = Broadcast address for the first subnet
    1 - 126 are usable hosts addresses



    Second subnet/network
    212.46.165.128 - 212.46.165.255

    128 = Network address for the second subnet
    255 = Broadcast address for the second subnet
    129 - 254 are usable hosts addresses


    Try some examples on the internet with ones with a /28 or /29. It may take a while to wrap your head around subnetting.
  • THA_DOCTHA_DOC Member Posts: 99 ■■■□□□□□□□
    johnnyBoy wrote: »
    For me it is easier to go this way:

    Network address = 212.46.165.128
    Broadcast address = 212.46.165.255
    First usable host address = 212.46.165.129
    Last usable host address = 212.46.165.254
    Next usable subnet address = no more subnets left in this question, assuming subnet zero is already used

    /25 = 255.255.255.128 = two subnets/networks with 126 usable hosts addresses

    So, given "212.46.165.199" you can figure out the "range" of addresses you are able to use on the subnet/network that "212.46.165.199" is on

    /25 = 128

    Do this:

    0 - 127
    128 - 255
    256

    First subnet/network
    212.46.165.0 - 212.46.165.127

    0 = Network address for the first subnet
    127 = Broadcast address for the first subnet
    1 - 126 are usable hosts addresses



    Second subnet/network
    212.46.165.128 - 212.46.165.255

    128 = Network address for the second subnet
    255 = Broadcast address for the second subnet
    129 - 254 are usable hosts addresses


    Try some examples on the internet with ones with a /28 or /29. It may take a while to wrap your head around subnetting.
    This good example, simpler than Lammle.
    An Open Mind, Working to Get IT!:cheers:

    DOC
  • onesaintonesaint Member Posts: 801
    Youve got two way to look at it 0., Binary and 1., Magic. <-- see that binary humor?!?

    Ok, your questiion is
    what is the first usable host of the IP address 212.46.165.199/25

    binary
    we'll look at 3 different kinds of bits,
    N=network bits
    S = subnet bits
    H= host bits

    212.46.165.199 is a class C address which means the first 3 of the 4 sets of 8 bit blocks called octets, are N blocks (Class A = first octet, class B = first two octets, class C = first three octets - are network). like:
    nnnnnnnn.nnnnnnnn.nnnnnnnn.xxxxxxxx

    thats says the 212.46.165 is the network portion of the address. So the rest is devided up into S bits and H bits. Lets look at that CIDR number again, /25. So the first 3 blocks, our network blocks are /24 (count the Ns in the above class C example). That means we have 1 extra bit to be placed in our network bits, but its beyond the class C first 3 blocks so it ends up being a subnet bit like so
    nnnnnnnn.nnnnnnnn.nnnnnnnn.s <--/25 where /24 is the n bits and /1 is the subnet bit

    The rest of our bits are then host bits. So IPv4 is a total of 32 bits. We have 24 N bits, 1 S bit, and that leaves us with 7 bits. Those last bits are then H bits which makes the IP 212.46.165.199/25 effectively look like this:
    nnnnnnnn.nnnnnnnn.nnnnnnnn.sHHHHHHH

    We can then take those H bits and drop them into the equation
    2^H= number of hosts per subnet (we can also do 2^s but well save that for later)

    We have 7 H bits which gives us, 2^7 = 128

    So for each subnet in the address 212.46.165.0 there is 128 hosts. So lets count by 128s
    212.46.165.0 <-- first subnet
    212.46.165.128 <-- second (and last) subnet

    For usable hosts, we need to take out the broadcast and network address' (first and last address)

    212.46.165.128 <--network address
    212.46.165.129 <-- first usable host
    212.46.165.254 <-- last usable host
    212.46.165.255 <-- broadcast



    Whew! On to magic!

    212.46.165.199/25
    Again, we look at the CIDR notation /25. If we count up the first 3 octects are 24 bits which means /25 lands us at the first bit in the 4th octet.
    nnnnnnnn.nnnnnnnn.nnnnnnnn.nxxxxxxx
    ^
    first bit last octet

    So that 1st bit in the last octet, that points to our magic number. If we look at an octet, its powers of 2,

    128 64 32 16 8 4 2 1

    if we take that 1 bit left over (25-24=1) then we can drop that bit in the first place on the left side, the 128th place.

    128 64 32 16 8 4 2 1
    ^
    1

    So that left over 1 is telling us that the magic number is 128. So, to figure the subnets we count by 128.
    0 128
    In our questioned address 212.46.165.199, it would look like so,

    212.46.165.0 <--subnet 1
    212.46.165.128 <-- subnet 2 -- it stops here (because 2^8=256 thus an octet can only handle 256).

    So the address 212.46.165.199/25 falls into the host range
    212.46.165.128 - 212.46.165.255

    But as you know, we need to take out the broadcast and subnet addresses in order to get our usable hosts, thus the usable host range is
    212.46.165.129 - 212.46.165.254

    Great subnetting by binary (and IPv6) lecture here. Also, great practice here.
    Work in progress: picking up Postgres, elastisearch, redis, Cloudera, & AWS.
    Next up: eventually the RHCE and to start blogging again.

    Control Protocol; my blog of exam notes and IT randomness
Sign In or Register to comment.