Subnetting

Discussion in 'Network+' started by Mark-K, Mar 17, 2008.

  1. Mark-K

    Mark-K Bit Poster

    36
    3
    15
    I'm just about to start the N+ studying (waiting for books to arrive) and wanted to get subnetting out the way first as I see lots of people having problems with it. I understand binary and hex etc quite well so I don't think it will take me that long. Anyway this is what I've leant so far, I've split the subnet up with a dash so its easier to read:

    Subnet Mask
    11111111.11111111.11111111.11-000000 255.255.255.192

    Subnet 1
    11000000.10101000.00000000.00-000000 168.192.0.0 -
    11000000.10101000.00000000.00-111111 168.192.0.63
    Subnet 2
    11000000.10101000.00000000.01-000000 168.192.0.64 -
    11000000.10101000.00000000.01-111111 168.192.0.127
    Subnet 3
    11000000.10101000.00000000.10-000000 168.192.0.128 -
    11000000.10101000.00000000.10-111111 168.192.0.191
    Subnet 4
    11000000.10101000.00000000.11-000000 168.192.0.192 -
    11000000.10101000.00000000.11-111111 168.192.0.255

    So basically with a subnet mask of 192 your making 4 subnets with 64 hosts each (ignoring broadcast etc for now), if the subnet mask was 224 you would have 8 subnets with 32 hosts each, if it was 240 there would be 16 subnets with 16 hosts each etc..?

    That all seems pretty simple but what about when a subnet is 255.255.128.0, does it work in exactly the same way just ignoring the decimal place?

    So a subnet mask would always end with; 128,192,224,240,248,252,254? So you cant have a subnet of say 255.255.255.100 or 255.255.6.0? If it can, would that be out of the N+ scope? :p
     
    Certifications: CCNA, JNCIA, JNCIS, JNCIP
    WIP: JNCIE
  2. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259
    Well I'm pretty bad at networks but I am good with binary an hex and have my N+ :biggrin

    As far as I understand it a subnet mask can be anything with all leading ones. You are not allowed gaps because the mask is used to detemine the network and host portions of the IP address, having 'holes' where you had zeros then ones would make little sense as you'd randomly be masking out bits like a blitter. The mask is really an either / or thing that splits the address in half. Thats why you get the '/' notation, you could just as well of had a number for the number of network bits.

    So assuming a mask that does not span an octet and is only in the last one octet, you can only have

    00000000 = 0
    10000000 = 128
    11000000 = 192
    11100000 = 224
    11110000 = 240
    11111000 = 248
    11111100 = 252
    11111110 = 254

    Of course you can have masks that span octets and begin in ealier octets.

    In this example you can't really have a 255 mask because thats a broadcast address for the network, so it can't be assigned to the network portion. Its like a host address that means 'all hosts'.

    In this example the 254 mask is pretty useless because by time you take away the network address and the broadcast address you've no addresses left for hosts.

    Of course when these numbers appear in higher octets as part of a mask there are lower down bits for hosts so they are useful.
     
  3. Tinus1959

    Tinus1959 Gigabyte Poster

    1,539
    42
    106
    Not quite. First error: it should read 192.168, not 168.192.

    Second, since this is in fact a B-net you have 10 bits to play with, not just your 2. 10 bits means 1024 subnets.
     
    Certifications: See my signature
    WIP: MCSD, MCAD, CCNA, CCNP
  4. dmarsh
    Honorary Member 500 Likes Award

    dmarsh Petabyte Poster

    4,305
    503
    259
    Tinus has a good point, Class C private addresses are 192.168.0.x where X is the host and the rest is the address all the way up to the top of the address range.

    Using your mask of 255.255.255.192 means you've got a custom subnet of an extra 2 bits extending the network portion and dinimishing the number of hosts per each network. This would be like a slightly extended Class C network.

    The number of networks is (2 pow N) I believe, so 1024 subnets if N is 10 ? But this depends on your hardware, so it might be (2 pow N)-2

    The number of hosts is (2 pow H) - 2 I think, so if N is 10 then H is 22, so 4194302 hosts.

    8 bits is Class A, so with 10 bits this would be similar in size (slightly bigger) to a Class A network.

    The subnet mask will indeed end as you say but that does not mean that the IP address will.

    255.255.128.00 would be /17 in other words 17 bits for the network portion and would in effect be like a slightly extended Class B network.

    http://en.wikipedia.org/wiki/Subnetwork
     
  5. Mark-K

    Mark-K Bit Poster

    36
    3
    15
    The 168.192 was a typo :oops: as you see the binary address is 11000000.10101000 (192.168 ) and i copy pasted the mistake throughout ^^ the IP address wasn't the point anyway.
     
    Certifications: CCNA, JNCIA, JNCIS, JNCIP
    WIP: JNCIE
  6. Tinus1959

    Tinus1959 Gigabyte Poster

    1,539
    42
    106
    I screwed up a bit to. 192 is in fact a C-class, so your subnets were correct. As a standard, find out what class it would be in class-full addressing and then find howmany bit you have to play with. That gives you the number of subnets and the number of hosts.

    One small extra tip: A common source off misunderstanding is the broadcast address. In many books they just say that if an address ends on 255 is is the broadcast address. Bulls**t! Follow this simple rule: If ALL host bits are 0, you have your network addres; if ALL host bits are 1, you have your broadcast address.
     
    Certifications: See my signature
    WIP: MCSD, MCAD, CCNA, CCNP

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.