Ok people, there’s only a few
simple things you have to remember to get subnetting down COLD. They are:
2 raised to the power of the number of bits minus two equals the number of hosts or networks you may have. 2^n-2
YOU
MUST KNOW FROM MEMORY WHAT THE DEFAULT ADDRESSES ARE FOR THE DIFFERENT CLASSES
OF NETWORKS!!! IF YOU DON'T KNOW THAT, CLICK HERE
ALL THE MASK IS FOR IS TO SET THE AMOUNT OF BITS
FOR NETWORK AND THE AMOUNT OF BITS FOR HOST---ONCE YOU HAVE FIGURED THAT OUT,
FORGET THE DAMN SUBNET MASK.
I am going to insert a table I made for class here now, when you get into
the testing center, DRAW IT OUT ON PAPER AND USE IT. You are
allowed to do this at ANY Sylvan test center BEFORE you push the “start”
button on the test.
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
decimal |
Bits |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
255 |
8 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
254 |
7 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
0 |
252 |
6 |
1 |
1 |
1 |
1 |
1 |
0 |
0 |
0 |
248 |
5 |
1 |
1 |
1 |
1 |
0 |
0 |
0 |
0 |
240 |
4 |
1 |
1 |
1 |
0 |
0 |
0 |
0 |
0 |
224 |
3 |
1 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
192 |
2 |
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
128 |
1 |
All you have to remember is that 128 is in the upper
left hand corner and the rest you can figure out.
Lets try some examples and lets start easy:
Standard class C address and subnet:
192.168.1.1
255.255.255.0
Now since we already set the network bits with the
subnet, we know that this is NETWORK number 192.168.1 and the host is .1 on this
network. If we look at the mask in Binary it is: 11111111.11111111.11111111.00000000--------------NOTICE,
a “1” in the mask denotes a bit for the NETWORK and a “0” in the mask
denotes a HOST. Ok, lets subnet. Lets
say this is our actual IP address but we have grown so much that we need more 10
more networks. Think for a minute about how many bits we must use to get these,
time’s up. We are going to need a FOUR bit mask which will allow us 14
sub-networks: 2x2x2x2-2=14. From looking at our bit chart we can see that our
subnet mask is going to be:
255.255.255.240--------------REMEMBER!!! We are
borrowing bits from the HOST portion of the network to do this and we have now
“Set the fence” where the network ends and the hosts begin, the down side to
this is that we may now only have 14 HOSTS on each NETWORK as we only have four
bits to work with. OK, so now we need an address to diagnose
192.168.1.248 IP address (host node address)
255.255.255.240 mask (sets
the bits between network and host)
Which Network is this on and what host is it? If we calculate “248” out in binary it is:
11111000
SO
WHAT THE HELL DOES THIS MEAN? FORGET THE MASK, WE HAVE ALREADY SET BITS FOR HOST
AND NETWORK, RIGHT?
If
you go back and look at the table you’ll see a four bit mask (240) is: 11110000 right? Every one in the mask is a network bit and every zero is a host
bit so the fence falls between the last 1 on the right and the first zero on the
left. This means EVERYTHING ON THE LEFT SIDE OF THE FENCE IS NETWORK, AND
EVERYTHING ON THE RIGHT IS HOST. So if we use what we already know and apply it
to the above address we KNOW
4
bits for NETWORK: 1111 Four bits
for HOST: 1000--------------------STARTING TO GET THE IDEA? If there’s a one
in the host and it is four bits over, look at the table or calculate it out:
8,4,2,1 so the HOST HAS TO BE HOST 8 ON NETWORK 240. Now this is NOT a good
example of subnetting but it is a good example of WHY IMHO you should never
subnet class C addresses, simply doesn’t leave enough hosts.
SOOOOO,
how do we calculate quickly the numbers of the other networks that are available
on this subnet? That’s the easiest part of all. We have set a four bit subnet,
right? So Technically our FIRST available subnet would be subnet #16
which is the bit closest to the fence, right? In this case if we had host number
8 on this subnet the address would be: 192.168.1.24, if you’re confused, break
it down into binary and look at it and the chart above.
NOW,
if 16 is the lowest network we can go to with a four bit mask, but we have four
bits to use, how in the shittin’ world do we figure out what the NEXT network
number is going to be? It’s as simple as getting into ole’ Mary Janes purty
pink panties. All you need to do is take the bit that is closest to the
fence, which, in this scenario is 16 and keep adding it to the network
number until you get as high as you can go without hitting the subnet number,
this number (16 in this case or 0001) is technically referred to as “Delta”:
Networks
Does that make sense? You can’t go to 240 which
would be next because that is the subnet we used to mask off our bits.
Now lets do the SAME DAMN THING, only with a class “B” network this time
132.132.45.56 IP address
255.255.224.0 Subnet mask
NOW LOOK AT YOUR TABLE AND SEE WHERE THE FREAKING FENCE IS!------- 224 denotes a
three-bit mask so we know the fence falls after the third bit!!!!
How many networks can we have? 2x2x2-2=6 so we can have six networks. So, what
is the host number of this address and which subnet is it on?
Convert to binary: 10000100.10000100.00101101.00111000
we set out fence in the third octet so we know where the fence is, RIGHT? IT’S
DIRECTLY AFTER THE THIRD BIT IN THE BOLDED OCTET. So know we take the three bits
of the NETWORK we have subnetted, we find that our network number is 32 right?
(128,64,32)--------now keep in mind, EVERYTHING AFTER the third octet is part of
the HOST address now (and this is the part that confused the shit out of
me)------but we are still in the THIRD OCTET of our 32-bit IP address, so
let’s add up those bits: 8+4+1=13 the other octet we know is going to be 56
(look at our address above) and we know we have used none of the bits from this
octet for anything. Therefore, our host node is going to be: 13.56 on network
32.
Now what are our network numbers going to be?
Remember DELTA which in this case is 32. So if our lowest network number is
network number 32 we just need to adding this number up until we come up with
our six because we already KNOW this is the limit of our networks:
NOW
COMES THE BIGGIE ON THIS ONE. How many HOSTS can you have with this subnet? This
is easy and it always screws me up. How many BITS do we now have to work? 8?
WRONG! Remember, we split some of the bits off for the subnet. We have 8 bits in
the last octet AND 5 in the second to last because we used a three-bit subnet
mask. Let remember our formula: 2 raised to the power of the number of bits
minus 2 equals number of hosts/networks depending on which one we are working
with. We now have 13 host bits to work with!!!!!
So
we start with 256 (?????????????) WHAT? NOT 255? Yes, that’s right:
8-bits: 2x2x2x2x2x2x2x2=256 (this is the last octet) WE HAVEN’T DONE ALL THE BITS YET SO WE STILL NEED TO KEEP GOING BUT THIS IS WHERE IS GETS EASY. We have five bits to work with in the second to the last octet but watch this:
256x2=512
x2=1024
x2=2048
x2=4096
x2=8192
NUMBERS
SOUND FAMILIAR? HUUUUUUUUUUUUUMMMMMMMMMMMM? YES, it’s that
easy-------------------------don’t forget to take away two (-2) to figure out
the number of hosts available. So our number of networks would be 6 NETWORKS and
our number of HOSTS would be 8090
PLEASE
EMAIL ME IF YOU ARE CONFUSED THIS IS
NOT THAT TOUGH AND I AM WILLING TO HELP.