IP
Subnetting
IP
subnetting
is the breaking down of IP address into smaller chunks. It is the act of creating multiple networks out of a particular IP address.
Classful and
Classless Subnetting
Classful
subnetting is
the normal class A, B, C, D addresses. In
every network when a broadcast is sent, it makes sure it goes through
all the available IP addresses in the network. Lets take for example,
you want to set up a network that can contains only 100 host, which
class of ip address are you going to use? The answer will be class C
address. Mind you class C can contain more than two hundred amounts
of hosts! So you are wasting more than 100 IP addresses.
Classless
subnetting
solve the problems of wasting ip
addressing and creating not-worthy network traffic. In classless
subnetting the Class A, B & C addresses are broken down into
smaller parts, thus making broadcast smaller. If the broadcast are
smaller the network traffic will definitely be stable only needed
traffic will be generated. IP
subnetting deals with calculations.
Question
You
are given a contract to design a university computer center that will
consist of 100 computers! How are you going to
plan your subnetting, since
you have to use classless subnetting.
Firstly
you have to choose the closest IP address class which is class C.
Class C address is /24, meaning 24bit are turned on. Confused?
Remember IPv4 is 32bits address which is devided into
4bytes, in class A only the first byte is turned on, meaning
11111111.00000000.00000000.00000000 making the /8, class B the first
and second bytes are turned on ie,
11111111.11111111.00000000.00000000, making it /16, class C the first
three bytes are turned on, ie. 11111111.11111111.11111111.00000000
making class C /24. we have to
make some calculations! I hate calculations because I am
lazy laughing, but there is no shortcut!
128 64 32 16 8 4 2 1
when
looking for the closest IP address in classless subnetting we have to
use the above numbers. Now we are looking for 100 hosts, lets start
is 1 greater than or equal to
100? no! Lets turn its bit off! What of 2? no! We will continue
turning off the bit until we reach where the number is greater than
or equals to 100, that will be 128! that means we turned off 1 to 64.
128 is the only number that is greater than or equals to 100. now we
will add the turned on bit the normal /24,
which will be /24+1=/25.
when the subnet was /24 that 2^8=256.
meaning 8bits is the same which 255hosts in base 10. now that one bit
has been removed from the 8bits its only left with 7bits for the host
and 25bits for the network what will be the new number of host? The
answer is simple, 2^7=127
hosts. We didnt get exactly 100 hosts but at least we have something
closer. The usable number of
addresses here will be 125. Why 125! 7bits is 127, let me
check whether someone stole it! Laughing. You forgot that when
calculating host address there is always -2 for the network address
which is the first address and broadcast address which is the last
address? The hosts can only
share 1 to 126. since the first address which is 0 and the last which
is 127 are taken away
Subnetmask
Subnet
mask is a mask which the network gurus laughs like
you uses to know which class and / slash notation did the network
belong to. Example: Class A subnet mask is 255.0.0.0 Class B
255.255.0.0 Class C 255.255.255.0, those
are the default subnet mask. When
the word default affairs means we are talking about Classful
subnetting. The subnet mask of the above example will be
255.255.225.128, the reason is simple, we have turned on
the firdt bit which
is 128! and
turned off all the rest. Lets for example we turned on the first two
bits ie. 11111111.11111111.11111111.11000000 /26, our subnet mask
will 255.255.255.192
Comments
Post a Comment