Vous êtes sur la page 1sur 20

TERM PAPER

OF
“WIRELESS NETWORKING”

COURSE CODE: CSE-518

SUBMITTED BY: SUBMITTEDTO:

IMRAN ANSARI ABHISEKH SIR


SECTION: RS1906
ROLL NO.: RS1906B50
REG. NO.: 10906851

PROGRAM ID: 433::MBA (IT)

TERM 1ST
“FACULTY OF BUSINESS AND ARTS”
LOVELY SCHOOL OF MANAGEMENT
INDEX

(i) INTRODUCTION

(ii) MASKING

(iii) SUPERNETING

(iv) NETWORKS AND HOSTS

(v) CLASS ADDRESSING

(vi) RESERVED ADDRESSING

(vii) SUBNET MASKING

(viii) ADVANTAGES OF SUBNETTING

(ix) DISADVANTAGES OF SUBNETTING

(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.

A subnet (short for "subnetwork") is an identifiably separate part of an


organization's network. Typically, a subnet may represent all the machines at
one geographic location, in one building, or on the same local area network
(LAN). Having an organization's network divided into subnets allows it to be
connected to the Internet with a single shared network address. Without subnets,
an organization could get multiple connections to the Internet, one for each of its
physically separate subnetworks, but this would require an unnecessary use of
the limited number of network numbers the Internet has to assign. It would also
require that Internet routing tables on gateways outside the organization would
need to know about and have to manage routing that could and should be
handled within an organization.

The Internet is a collection of networks whose users communicate with each


other. Each communication carries the address of the source and destination
networks and the particular machine within the network associated with the user
or host computer at each end. This address is called the IP address (Internet
Protocol address). This 32-bit IP address has two parts: one part identifies the
network (with the network number) and the other part identifies the specific
machine or host within the network (with the host number). An organization can
use some of the bits in the machine or host part of the address to identify a
specific subnet. Effectively, the IP address then contains three parts: the network
number, the subnet number, and the machine number.

The standard procedure for creating and identifying subnets is provided in


Internet Request for Comments 950.
The 32-bit IP address is often depicted as a dot address (also called dotted quad
notation) - that is, four groups (or quads) of decimal numbers separated by
periods. Here's an example:

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:

<--Network address--><--Host address-->


130.5 . 5.25

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:

<--Network address--><--Subnet address--><--Host address-->


130.5 . 5 . 25

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.

Once a packet has arrived at an organization's gateway or connection point with


its unique network number, it can be routed within the organization's internal
gateways using the subnet number. The router knows which bits to look at (and
which not to look at) by looking at a subnet mask, which is a screen of numbers
that tells you which
MASKING

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

The natural mask for a class B address is 255.255.0.0 so in order to create


subnets we moved mask bits to the right in order to convert more host bits to
network bits. It must be remembered that these mask bits must be contiguous
from the left. For example, the above mask allows up to 510 host assignments.
Remember that we cannot use either an all 0s or all 1s host address. The next
jump would be to allow up to 1022 host addresses. What would be the subnet
mask? It would be 255.255.252.0. The 1s are still contiguous from the left. This
approach creates many subnets, but it is recommended that neither an all 0s nor
all 1s subnet be used. This could cause a problem on some networks. How
many mask bits can you have? You need to have some hosts on a network and
two host addresses are unusable so the maximum number of mask bits is 30,
leaving two valid host addresses.
The word subnet is short for sub network--a smaller network within a larger one.
The smallest subnet that has no more subdivisions within it is considered a
single "broadcast domain," which directly correlates to a single LAN (local area
network) segment on an Ethernet switch. The broadcast domain serves an
important function because this is where devices on a network communicate
directly with each other's MAC addresses, which don't route across multiple
subnets, let alone the entire Internet. MAC address communications are limited
to a smaller network because they rely on ARP broadcasting to find their way
around, and broadcasting can be scaled only so much before the amount of
broadcast traffic brings down the entire network with sheer broadcast noise. For
this reason, the most common smallest subnet is 8 bits, or precisely a single
octet, although it can be smaller or slightly larger.

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.

Networks and Hosts


When we talk about a network we usually envision a cluster of workstations with
one or more servers connected to a local area network. Each server and
workstation would have a unique address to distinguish it from the other
computers. With IP addressing, servers and workstations are all termed hosts
but each address not only identifies a host but the address of the network on
which the host resides. This is because IP is an internetworking protocol that not
only allows communication between hosts on the same network, but
communication between hosts on different networks as well. The 32-bit IP
address identifies a particular host along with the network on which the host
resides. The structure of IP addressing is defined so that any host on the public
Internet can be found by any other host.

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

Figure 1 — The class of an IP address can be


quickly identified by observing only the first byte.
Reserved Addresses
There are some reserved IP address besides those identified as Classes D and
E. For example, the Class A network address 0.X.X.X cannot be used since it is
used to indicate “this” network. Class A address 127.X.X.X is reserved for loop
back testing. With the host portion of the address, you cannot have an all 0s
host, which refers to the network address where the hosts reside. Likewise, you
cannot use the all 1s host address because that indicates a broadcast which is a
message to all hosts on the network. Therefore, with any host addressing on
either a Class A, B or C network, you lose 2 host addresses. Still with 4 billion
possible addresses from a 32-bit address space, you would think there are
plenty of addresses even with reserved addresses. The problem is that there
was much waste when addresses were originally assigned. For example, a
Class A address can handle 16 million hosts per one network ID. That is an
enormous amount of hosts for just one network. Even a Class B address can
handle 65 thousand hosts per network ID. A Class C address can handle only
254 hosts per network ID which may be too little for some networks. A scheme
was needed to obtain a better balance between network and host assignments
and that is called subnetting.

Subnetting an IP Network can be done for a variety of reasons, including


organization, use of different physical media (such as Ethernet, FDDI, WAN,
etc.), preservation of address space, and security. The most common reason is
to control network traffic. In an Ethernet network, all nodes on a segment see all
the packets transmitted by all the other nodes on that segment. Performance can
be adversely affected under heavy traffic loads, due to collisions and the
resulting retransmissions. A router is used to connect IP networks to minimize
the amount of traffic each segment must receive.

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:

10001100.10110011.11110000.11001000 140.179.240.200 Class B IP


Address
11111111.11111111.00000000.00000000 255.255.000.000 Default Class
B Subnet Mask
--------------------------------------------------------
10001100.10110011.00000000.00000000 140.179.000.000 Network
Address

Default subnet masks:

• Class A - 255.0.0.0 - 11111111.00000000.00000000.00000000


• Class B - 255.255.0.0 - 11111111.11111111.00000000.00000000
• Class C - 255.255.255.0 - 11111111.11111111.11111111.00000000

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:

10001100.10110011.11011100.11001000 140.179.220.200 IP Address


11111111.11111111.11100000.00000000 255.255.224.000 Subnet Mask
--------------------------------------------------------
10001100.10110011.11000000.00000000 140.179.192.000 Subnet
Address
10001100.10110011.11011111.11111111 140.179.223.255 Broadcast
Address
In this example a 3 bit subnet mask was used. There are 6 (23-2) subnets
available with this size mask (remember that subnets with all 0's and all 1's are
not allowed). Each subnet has 8190 (213-2) nodes. Each subnet can have nodes
assigned to any address between the Subnet address and the Broadcast
address. This gives a total of 49,140 nodes for the entire class B address
subnetted this way. Notice that this is less than the 65,534 nodes an
unsubnetted class B address would have.

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.

Recall that the default Class C subnet mask is

255.255.255.0 (11111111.11111111.11111111.00000000 binary)


Extending this by 4 bits yields a mask of
255.255.255.240 (11111111.11111111.11111111.11110000 binary)
This gives us 16 possible network numbers, 2 of which
cannot be used:

Subnet Network Node


Broadcast Address
bits Number Addresses
0000 200.133.175.0 Reserved None
0001 200.133.175.16 .17 thru .30 200.133.175.31
0010 200.133.175.32 .33 thru .46 200.133.175.47
0011 200.133.175.48 .49 thru .62 200.133.175.63
0100 200.133.175.64 .65 thru .78 200.133.175.79
0101 200.133.175.80 .81 thru .94 200.133.175.95
0110 200.133.175.96 .97 thru .110 200.133.175.111
.113 thru .
0111 200.133.175.112 200.133.175.127
126
.129 thru .
1000 200.133.175.128 200.133.175.143
142
.145 thru .
1001 200.133.175.144 200.133.175.159
158
.161 thru .
1010 200.133.175.160 200.133.175.175
174
.177 thru .
1011 200.133.175.176 200.133.175.191
190
.193 thru .
1100 200.133.175.192 200.133.175.207
206
.209 thru .
1101 200.133.175.208 200.133.175.223
222
.225 thru .
1110 200.133.175.224 200.133.175.239
238
1111 200.133.175.240 Reserved None

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.

Even more wasteful were companies and organizations that were


allocated Class A address blocks, which contain over 16 Million host addresses!
Only a tiny percentage of the allocated Class A and Class B address space has
ever been actually assigned to a host computer on the Internet.

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:

192.60.128.0 (11000000.00111100.10000000.00000000) Class C subnet


address
192.60.129.0 (11000000.00111100.10000001.00000000) Class C subnet
address
192.60.130.0 (11000000.00111100.10000010.00000000) Class C subnet
address
192.60.131.0 (11000000.00111100.10000011.00000000) Class C subnet
address
--------------------------------------------------------
192.60.128.0 (11000000.00111100.10000000.00000000) Supernetted
Subnet address
255.255.252.0 (11111111.11111111.11111100.00000000) Subnet Mask
192.60.131.255 (11000000.00111100.10000011.11111111) Broadcast
address

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.

Under CIDR, the subnet mask notation is reduced to a simplified shorthand.


Instead of spelling out the bits of the subnet mask, it is simply listed as the
number of 1s bits that start the mask. In the above example, instead of writing
the address and subnet mask as

192.60.128.0, Subnet Mask 255.255.252.0


the network address would be written simply as:

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 currently almost impossible for an individual or company to be allocated their


own IP address blocks. You will simply be told to get them from your ISP. The
reason for this is the ever-growing size of the internet routing table. Just 10 years
ago, there were less than 5000 network routes in the entire Internet. Today,
there are over 100,000. Using CIDR, the biggest ISPs are allocated large chunks
of address space (usually with a subnet mask of /19 or even smaller); the ISP's
customers (often other, smaller ISPs) are then allocated networks from the big
ISP's pool. That way, all the big ISP's customers (and their customers, and so
on) are accessible via 1 network route on the Internet. But I digress.

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.

By using Subnet addresses the entire IP address system becomes centralized.


There are many advantages to this feature from technical point of view. The
network administrators can assign IP numbers to specific departments in an
organization so that when they can easily identify the departments on the
network using the same numbers. Also the specific department can now handle
all the computers in their own network without depending on the network
administrator.

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.

• Added layer of complexity


• Difficult to change once hierarchy is established
• Higher overhead to manage network addresses
• Larger routing tables
• IP addresses might one day be exhausted

Unfortunately, this “invisibility” also represents a key disadvantage of subnetted


“classful” addressing: it cannot correct the fundamental inefficiencies associated
with that type of addressing, because organizations are still assigned address
blocks based on classes.

The Main Problem With "Classful" Addressing

A key weakness of regular subnetting is low “granularity”. A Class B address


block contains a very large number of addresses (65,534) but a Class C block
has only a relatively small number (254). There are many thousands of “medium-
sized” organizations who need more than 254 IP addresses, but a small
percentage of these need 65,534 or anything even close to it. When setting up
their networks, these companies and groups would tend to request Class B
address blocks and not Class C blocks because they need more than 254,
without considering how many of the 65,000-odd addresses they really would
use.
References
Illustrated TCP/IP, Matthew Naugle, 1998, Wiley Computer Publishing

Practical Networking with Ethernet, Charles E. Spurgeon, 1997, International


Thomson Computer Press

International Standard ISO/IEC 8802-3 ANSI/IEEE Std 802.3, 1996, The Institute
of Electrical and Electronic Engineers, Inc.

TCP/IP Clearly Explained, Pete Loshin, 1997, Academic Press

TCP/IP Illustrated Volume I, The Protocols, W. Richard Stevens, 1994, Addison-


Wesley Publishing Company

Vous aimerez peut-être aussi