Académique Documents
Professionnel Documents
Culture Documents
OF
“WIRELESS NETWORKING”
TERM 1ST
“FACULTY OF BUSINESS AND ARTS”
LOVELY SCHOOL OF MANAGEMENT
INDEX
(i) INTRODUCTION
(ii) MASKING
(iii) SUPERNETING
(x) REFERENCESS
SUBNETTING
INTODUCTION
Subnetting creates additional network IDs at the expense of host IDs and can be
used with either A, B or C class addresses. If you look at Table 1, you will notice
that a class B address uses 14 bits for network addressing and 16 bits for host
addressing. By simply reassigning one of the host bits to a network bit, you
would double the number of available network addresses but halve the number
of host addresses. Carrying the argument further move eight of the host bits
(actually the complete third byte) to the network side. The result is 22 bits for
network addressing and eight bits for host addressing which is quite similar to a
class C address. These additional network addresses are called subnets and not
networks because to the Internet, the original address is still a class B network
address but locally the class B network address can be broken down to
manageable subnets that function as actual network addresses. Why use
subnets? Subnets are interconnected using routers, and routers improve network
performance by reducing traffic and minimizing disruption due to broadcast
messages. Large networks become more manageable when subnets are
deployed.
130.5.5.25
Each of the decimal numbers represents a string of eight binary digits. Thus, the
above IP address really is this string of 0s and 1s:
10000010.00000101.00000101.00011001
As you can see, we inserted periods between each eight-digit sequence just as
we did for the decimal version of the IP address. Obviously, the decimal version
of the IP address is easier to read and that's the form most commonly used.
Some portion of the IP address represents the network number or address and
some portion represents the local machine address (also known as the host
number or address). IP addresses can be one of several classes, each
determining how many bits represent the network number and how many
represent the host number. The most common class used by large organizations
(Class B) allows 16 bits for the network number and 16 for the host number.
Using the above example, here's how the IP address is divided:
If you wanted to add sub netting to this address, then some portion (in this
example, eight bits) of the host address could be used for a subnet address.
Thus:
To simplify this explanation, we've divided the subnet into a neat eight bits but an
organization could choose some other scheme using only part of the third quad
or even part of the fourth quad.
To create subnets you need a subnet mask that defines which bits will be used
to create the new network address out of the 32-bit IP addresses. By “ANDing”
the 32-bit IP address with a 32-bit mask, we create a 32-IP address that
represents <netid, subnetid> becoming our new network address. What do these
masks look like? If we start with a basic class A address and do not define any
subnets, the mask would look like 255.0.0.0 which is called a natural or default
mask. Only those bits that are set as a 1 will be considered when defining a
network address. In this case, all the bits in the first byte of the IP address will be
considered. The natural mask for a class B address is 255.255.0.0 and for a
class C address it is 255.255.255.0. In order to create more network addresses
(subnets) we need to move the mask bits to the right (changing 0 bits into 1s) in
order to convert host bits into network bits. The best way to understand the
concept is to use an example.
Assume we begin with IP address 165.10.0.0. From Figure 1 we know that this is
a class B address with a network address of 165.10 with the capability of
assigning up to 65,534 hosts. We do not want 65,534 hosts on one network but
would like to have up to 500 hosts on each subnet. In order to have 500 hosts on
one subnet, we need to have 9 bits of host addressing. Currently, we have 16
bits of host addressing since we possess a class B address. That means that we
can reassign 7 of those bits to signify subnet bits. Therefore, the subnet mask
would be 255.255.254.0. In binary it would be:
11111111.11111111.11111110.00000000
Subnets have a beginning and an ending, and the beginning number is always
even and the ending number is always odd. The beginning number is the
"Network ID" and the ending number is the "Broadcast ID." You're not allowed to
use these numbers because they both have special meaning with special
purposes. The Network ID is the official designation for a particular subnet, and
the ending number is the broadcast address that every device on a subnet
listens to. Anytime you want to refer to a subnet, you point to its Network ID and
its subnet mask, which defines its size. Anytime you want to send data to
everyone on the subnet (such as a multicast), you send it to the Broadcast ID.
Later in this article, I'll show you an easy mathematical and graphical way to
determine the Network and Broadcast IDs.
SUPERNETTING
The inverse of subnetting is supernetting. Instead of moving mask bits to the
right of the natural mask for subnetting, we move mask bits to the left for
supernetting. With subnetting we create more network addresses at the expense
of host addresses. With supernetting we create more host addresses at the
expense of network addresses. Supernetting is not for users since it would be
difficult for users to be granted a range of contiguous network addresses.
Supernetting is for Internet Service Providers (ISPs) who are attempting to obtain
the most efficient allocation of IP addresses using the A, B, C class scheme.
Subnetting a Class C Address
#
Subnet Mask CIDR # Host
Subnets
11111111.11111111.11111111.00000000 /24 0 254
11111111.11111111.11111111.11000000 /26 2 62
11111111.11111111.11111111.11100000 /27 6 30
11111111.11111111.11111111.11110000 /28 14 14
11111111.11111111.11111111.11111000 /29 30 6
11111111.11111111.11111111.11111100 /30 62 2
The natural mask for a Class C address is 255.255.255.000 which provides for
up to 254 host addresses. By moving the mask bits to the right (replacing 0s for
1s), subnets are created at the expense of host bits. Not shown are masks /25
and /31 since they are not allowed. Similar charts can be made for Class A and
Class B addressing. Class A subnetting begins at /10 and class B at /18. Both
end at /30.
The format of the 32-bit address is <netid, hostid> and it is usually shown as four
bytes of data. Although each byte could be represented as a binary, decimal or
hexadecimal number, the decimal-dot-decimal notation is the most popular.
Therefore, the range of IP addresses can span 0.0.0.0 to 255.255.255.255. For
example, 193.5.8.254 is a valid IP address but it is difficult to determine which
part of the address is the network ID and which part is the host ID. To
understand the two you need to know about class addressing.
Class Addressing
IPv4 is called a classful system under RFC 761 with IP addresses being defined
as belonging to one of five Classes A, B, C, D or E. Classes A, B and C define
different possible combinations of network and host addresses. Class D is
reserved for multicasting. Multicasting is the ability of one host to communicate
with many other hosts with one transmission and is beyond the scope of this
lesson. Class E is reserved for future use. The classes of interest to subnetting
are A, B and C.
With Class A addresses, the first byte of the address identifies the network
address while the three remaining bytes identify the host. With Class B
addresses, the first two bytes identify the network address while the remaining
two identify the host address. With Class C addresses, the first three bytes
identify the network address while the last byte identifies the host. That seems
simple enough but how do you know you are looking at either an A, B, C, D or E
address?
The four-byte IP address is viewed from left to right with the first byte on the left.
This is the most significant byte. The first few bits (most significant) of that byte
identify the class of address. For a Class A address, the left most bit must be a
zero. For a Class B address, the first two bits must be a 10. For a Class C
address, the first three bits must be a 110. For a Class D address, the first four
bits must be a 1110. For a Class E address, the first four bits must be a 1111.
Therefore, it is only necessary to observe the first byte of the IP address to
determine its class. Figure 1 shows the decimal value of the first byte for each
class.
Class A: 001–126
Class B: 128–191
Class C: 192–223
Class D: 224–239
Class E: 240–254
Subnet Masking
Applying a subnet mask to an IP address allows you to identify the network and
node parts of the address. The network bits are represented by the 1s in the
mask, and the node bits are represented by the 0s. Performing a bitwise logical
AND operation between the IP address and the subnet mask results in the
Network Address or Number.
For example, using our test IP address and the default Class B subnet mask, we
get:
Additional bits can be added to the default subnet mask for a given Class to
further subnet, or break down, a network. When a bitwise logical AND operation
is performed between the subnet mask and IP address, the result defines the
Subnet Address (also called the Network Address or Network Number). There
are some restrictions on the subnet address. Node addresses of all "0"s and all
"1"s are reserved for specifying the local network (when a host does not know its
network address) and all hosts on the network (broadcast address), respectively.
This also applies to subnets. A subnet address cannot be all "0"s or all "1"s. This
also implies that a 1 bit subnet mask is not allowed. This restriction is required
because older standards enforced this restriction. Recent standards that allow
use of these subnets have superseded these standards, but many "legacy"
devices do not support the newer standards. If you are operating in a controlled
environment, such as a lab, you can safely use these restricted subnets.
To calculate the number of subnets or nodes, use the formula (2n-2) where n =
number of bits in either field, and 2n represents 2 raised to the nth power.
Multiplying the number of subnets by the number of nodes available per subnet
gives you the total number of nodes available for your class and subnet mask.
Also, note that although subnet masks with non-contiguous mask bits are
allowed, they are not recommended.
Example:
You can calculate the Subnet Address by performing a bitwise logical AND
operation between the IP address and the subnet mask, then setting all the host
bits to 0s. Similarly, you can calculate the Broadcast Address for a subnet by
performing the same logical AND between the IP address and the subnet mask,
then setting all the host bits to 1s. That is how these numbers are derived in the
example above.
Subnetting always reduces the number of possible nodes for a given network.
There are complete subnet tables available here for Class A, Class B and Class
C. These tables list all the possible subnet masks for each class, along with
calculations of the number of networks, nodes and total hosts for each subnet.
Here is another, more detailed, example. Say you are assigned a Class C
network number of 200.133.175.0 (apologies to anyone who may actually own
this domain address). You want to utilize this network across multiple small
groups within an organization. You can do this by subnetting that network with a
subnet address.
We will break this network into 14 subnets of 14 nodes each. This will limit us to
196 nodes on the network instead of the 254 we would have without subnetting,
but gives us the advantages of traffic isolation and security. To accomplish this,
we need to use a subnet mask 4 bits long.
Now that you understand "classful" IP Subnetting principals, you can forget them.
The reason is CIDR -- Classless InterDomain Routing. CIDR was invented
several years ago to keep the internet from running out of IP addresses. The
"classful" system of allocating IP addresses can be very wasteful; anyone who
could reasonably show a need for more that 254 host addresses was given a
Class B address block of 65533 host addresses.
People realized that addresses could be conserved if the class system was
eliminated. By accurately allocating only the amount of address space that was
actually needed, the address space crisis could be avoided for many years. This
was first proposed in 1992 as a scheme called Supernetting. Under
supernetting, the classful subnet masks are extended so that a network address
and subnet mask could, for example, specify multiple Class C subnets with one
address. For example, If I needed about 1000 addresses, I could supernet 4
Class C networks together:
In this example, the subnet 192.60.128.0 includes all the addresses from
192.60.128.0 to 192.60.131.255. As you can see in the binary representation of
the subnet mask, the Network portion of the address is 22 bits long, and the host
portion is 10 bits long.
192.60.128.0/22
which indicates starting address of the network, and number of 1s bits (22) in the
network portion of the address. If you look at the subnet mask in binary
(11111111.11111111.11111100.00000000), you can easily see how this notation
works.
The use of a CIDR notated address is the same as for a Classful address.
Classful addresses can easily be written in CIDR notation (Class A = /8, Class B
= /16, and Class C = /24)
It is expected that CIDR will keep the Internet happily in IP addresses for the
next few years at least. After that, IPv6, with 128 bit addresses, will be needed.
Under IPv6, even sloppy address allocation would comfortably allow a billion
unique IP addresses for every person on earth! The complete and gory details of
CIDR are documented in RFC1519, which was released in September of 1993.
Subnetting Advantages
There are many advantages of Subnetting in a network. The routing process
becomes much simplified by using subnets. Because the routers do not have to
fully identify each individual address from a network and route them. It can
simply identify a given network using the Subnet address and route. Also the
Subnet hides the internal; networks numbers by just giving out the main number
to the routers. The routing tables become much shorter by using the Subnet
addresses and this means that the data flow also becomes faster.
Subnet also divides the bigger network into smaller individual networks and it
becomes easy to handle the smaller networks than handle one huge network.
Also it removes physical barriers and since the networks now are individually
identified all the networks can be connected through routers.
Disadvantages of Subnetting
The only disadvantage of the subnetting with the rule of the 2n-2 is that there is
nevertheless wasting of IP addresses but much less than by using IP addresses
of normal classes.
Calculates masks and IP addresses can also be a hard task, but currently
there are software to form this part of the subnetting. With that the administration
of under networks is added, because for the configuration of the material for
under precise network, one should not be mistaken during the seizure of
information (if there are several under networks) if not you are likely to affect the
configurations bad to under network.
International Standard ISO/IEC 8802-3 ANSI/IEEE Std 802.3, 1996, The Institute
of Electrical and Electronic Engineers, Inc.