/24 subnetting questions always get me :(

SurferdudeHBSurferdudeHB Member Posts: 199 ■■■□□□□□□□
Can someone explain to me what happens when you get a /24. Below is a question I can't figure out.
I thought /24 = 255.255.255.0 So that means there are no bits in the 4th octect. Where do you get the 1 subnet?


Enter the maximum number of valid subnets and hosts per subnet that you can get from the network 192.168.180.0/24:
Subnets:
Hosts per subnet:


Answer: Subnets: 1, Hosts per subnet: 254

Comments

  • networker050184networker050184 Mod Posts: 11,962 Mod
    This seems to be assuming no VLSM, so the one subnet is the actual network displayed, a /24. Which really isn't a "sub" net I suppose.
    An expert is a man who has made all the mistakes which can be made.
  • White WizardWhite Wizard Member Posts: 179
    Can someone explain to me what happens when you get a /24. Below is a question I can't figure out.
    I thought /24 = 255.255.255.0 So that means there are no bits in the 4th octect. Where do you get the 1 subnet?


    Enter the maximum number of valid subnets and hosts per subnet that you can get from the network 192.168.180.0/24:
    Subnets:
    Hosts per subnet:


    Answer: Subnets: 1, Hosts per subnet: 254

    In this scenario there are room for 256 hosts minus the subnet ID and broadcast which leaves you with 254 usable host IP addresses. If this was a /16 it would be different but since its /24 that means its only the last octet and each octet is 8 bits. All 8 bits equal 256-2=254.
    "The secret to happiness is doing what you love. The secret to success is loving what you do."
  • rjon17469rjon17469 Member Posts: 52 ■■■□□□□□□□
    This seems to be assuming no VLSM, so the one subnet is the actual network displayed, a /24. Which really isn't a "sub" net I suppose.

    This. 192.168 falls into the class C range, meaning /24 if no VLSM. Since you were given a /24, that means you can only have one network or "subnet".
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Sure, but you could certainly subnet that /24 out into 64 /30s using VLSM for example.
    An expert is a man who has made all the mistakes which can be made.
  • volfkhatvolfkhat Member Posts: 1,072 ■■■■■■■■□□
    Can someone explain to me what happens when you get a /24. Below is a question I can't figure out.
    I thought /24 = 255.255.255.0 So that means there are no bits in the 4th octect. Where do you get the 1 subnet?


    Enter the maximum number of valid subnets and hosts per subnet that you can get from the network 192.168.180.0/24:
    Subnets:
    Hosts per subnet:


    Answer: Subnets: 1, Hosts per subnet: 254

    The subnet consists of all addresses from:
    192.168.180.0
    192.168.180.1
    192.168.180.2
    ...
    192.168.180.254
    192.168.180.255
    

    the /24 is probably the Easiest concept to Grasp. I think you are OVER-thinking it...
  • CiscoWayneCiscoWayne Member Posts: 57 ■■□□□□□□□□
    I know on a Class C it's very simple, but the /24 always gets me too.

    Take class B address: 172.16.0.0 /24 for example

    How many subnets and hosts would you get from that?

    254 hosts sure, but you just write out the binary like so

    IIIIIIII.IIIIIIII.IIIIIIII.00000000

    This is where knowing you classes of addresses comes in.

    Then take it from a class B:

    IIIIIIII.IIIIIIII.IIIIIIII.00000000

    and so, to get the subnets, you'd do 2^8? = 256 networks.

    - It always confused me, but you've just gotta know your classes of address, so you know where you're counting the subnet bits from.
    CCENT [X] CCNA [X] CCNP Switch [ ] CCNP Route [ ] CCNP Troubleshoot [ ]
    Now working on CCNP Switch
  • nanochillbotnanochillbot Member Posts: 11 ■□□□□□□□□□
    I think you may have to think about your IPV4 networking & Subnetting a little differently.
    The address scheme is Numbers, 32 in total ? Right ?
    If you had an Excel spreadsheet starting from left to right, 1 - 32, broken into 8 bit borders, you would have 4 groups, Right?
    So what you get, Moving around in those 4 Groups are Network addresses, subnets, hosts. Right ? And you say, HUH ????

    Stick with me, the RULES are simple.
    They get imposed on that Group of 4 yielding what?
    #1 NETWORK Rule, will yield
    1- A Network,
    2 - A Single Subnet or a Bunch of Subnets,
    3 - A Single Host or a Bunch of hosts.
    The RULE boundary is the MASK, the 255.255.255.something right? Well it is Not always 255.255.255.something but, you'll see why.

    First, do a little math, Binary, yes but Math.
    Take our 32 bit address scheme and the 4 Groups of 8 bits we call an Octet. 8 bits, so it is an octet ? right?
    In binary math their range is from 0 (no bits set) to 255. So in each of the 4 groups,the total of all the bits is 255? right ?
    (128-64-32-16-8-4-2-1)|(128-64-32-16-8-4-2-1)|(128-64-32-16-8-4-2-1)|(128-64-32-16-8-4-2-1)
    Got that ? Good.

    Back to the rules:
    With IPV4 we got Classes of Networks, and the same 32 bits for defining the Classes of Networks of which fortunately the ones we are most concerned with are just 6. This is where the "/" in the 32 bit address comes in.
    Recall #1 Network Rule. 32 bits yield A Network, Subnet(s), Host(s)

    Class A Network address of 1 - 126 thus a 126.x.x.x /8 mask would 255.x.x.x. On the 8 bit Network boundary I have 24 bits for 1 subnet and a gazillion hosts, or a bunch of subnets (networks) with each up to 254 hosts

    Class B Network address of 128-191 thus a 190.x.x.x /16 mask would 255.255.x.x. On the 16 bit Network boundary you have 16 bits for 1 subnet and a 1/2 gazillion hosts, or a bunch of subnets (networks) with lots of hosts

    Class C Network address of 192 - 223 thus a 223.x.x.x /24 mask would 255.255.255.x On the 24 bit Network boundary you have 8 bits for 1 subnet and way less than a gazillion hosts, or a handful of subnets (networks) with very few hosts

    Here's a teaser
    192.168.180.0/25 (255.255.255.128 ) 2 Subnets 126 hosts per
    192.168.180.0/26 (255.255.255.192) 4 Subnets 62 hosts per
    192.168.180.0/27 (255.255.255.224) 8 Subnets 30 hosts per

    HTH
  • digitheadsdigitheads Member Posts: 39 ■■□□□□□□□□
    I memorized everything I need to construct a **** sheet - all I need is a pencil and a piece of paper, and it is amazing how easy it makes subnetting. I have decimal & binary equilivents, the actual subnet represented, and the block size, also the powers of 2 from 0 to 7.
  • littlehoopslittlehoops Member Posts: 46 ■■■□□□□□□□
    Fancy sharing your **** sheet? and explaining it?
  • jamthatjamthat Member Posts: 304 ■■■□□□□□□□
    This is how I've always done it and this guy summed it up perfectly in this thread
    HAMP wrote: »
    Lol, you guys are hilarious with this memorizing chart. To the OP here is a formula I made for myself. I took part of it from somewhere and continued with my own.

    The only part that I memorize is: 8.16.24.32
    219.141.101.108 /29

    Whatever the /## you subtract that from the next block higher than the “ .block “.
    (If /23, you would subtract from .24) (if /13, you would subtract from .16)

    In your example, its /29, so we subtract from .32

    32 – 29 = 3
    2 ^ 3 = 8
    Whichever block you used to subtract from, you use that number from the IP address. In our example, you subtracted from the last block, which was 108.

    Take the IP number and divide it by the answer from ( 2 ^ 3 = 8 )
    108 / 8 = 13.5

    BUT, you don’t have to do the complete division, just stop before the .5, and only use the full number before the “.” And multiply it by what you divide it by, which was the “8”
    13 * 8 = 104

    Sounds long because I was explaining but it is something you can do in your head without paper and pen, and it only take seconds to do.

    8.16.24.32

    192.168.56.25 /20
    (24 - 20=4)
    (2 ^ 4=16 ) <-- Block size is 16
    (56 / 16=3.5 ) <-- we don’t need the .5
    (16 * 3=48 ) Our network is 192.168.48.0 /20

    Forget memorizing(pun intended), do the math!!!

    All I ever wrote down for a test or reference was the power of 2's from 2^0-2^9 or so..just takes a few seconds to do.

    I know one method doesn't fit all, but try using this one on a number of subnetting problems...hopefully it'll eventually click.
Sign In or Register to comment.