You are on page 1of 63

Introduction to Networking

What is a Network?
A network is a group of computers or computer like devices connected together to share the resources
like file, printer, services etc. A typical network contains users working at workstations (also known as
client), running client operating systems like Windows XP and store their files on a central server. The
server computer has more resources like memory, disk space and more processing power compared
with client computers. The server machine also run an Operating System, which has more processing
capabilities compared with the client machine. The server may be installed with special software, which
is helps it to function as a server. The special software allows file and print services, serve web pages,
transfer emails etc.
LAN, MAN and WAN
Local Area Network (LAN) is a network, which is limited to a single building, college campus etc. A Wide
Area Network (WAN) spans over multiple geographic locations, which is composed of multiple LANs. A
Metropolitan Area Network (MAN) refers to a network, which is located in a city or metropolitan area. If
an organization has multiple offices in a city, the term that refers the network is called MAN.
Internet, Intranet, Extranet
Internet. The Internet is a worldwide, publicly accessible network of interconnected computer
networks that transmit data using the standard Internet Protocol (IP). The terms World Wide Web
(WWW) and Internet are not the same. The Internet is a collection of interconnected computer
networks, linked by copper wires, fiber-optic cables, wireless connections, etc. Web is a collection of
interconnected documents and other resources, linked by hyperlinks and URLs. The World Wide Web is
one of the services accessible via the Internet, along with various others including e-mail, file sharing,
online gaming etc.

Intranet. An intranet is a private network that is contained within an enterprise. It may consist of many
interlinked local area networks and also use leased lines in the wide area network. The main purpose of
an intranet is to share company information and computing resources among employees.
Extranet. An extranet can be viewed as part of a company's intranet that is extended to users outside
the company like suppliers, vendors, partners, customers, or other businesses.
Logical Classification of Network
A network can be divided into two categories. 1) Peer-to-Peer 2) Client-Server
1) Peer-to-Peer. A Peer-to-Peer network has no dedicated servers. Here a number of workstations are
connected together for the purpose of sharing information or devices. All the workstations are
considered as equal. Any one computer can act as client or server at any instance. This network is ideal
for small networks where there is no need for dedicated servers, like home network or small business
establishments or shops. The Microsoft term for peer-to-peer network is Workgroup. Typically a
workgroup contain less than 10 workstations. Normal workstation operating systems are Windows
95/98, ME, XP, NT Workstation, 2000 professional, Vista, RHEL Workstation etc.
2) Client-Server. The client/server model consists of high-end servers serving clients continuously on a
network, by providing them with specific services upon request. The classifications for servers are
a) File server, can be used to store the client documents and files centrally. An ideal file server should
have large amount of memory, fast hard-disks, multiple processors, fast network adapters, redundant
power supplies etc.

b) Print server, which redirects print jobs from clients to specific printers.

c) Application server, which allows clients to run certain programs on the server, and enables multiple
users to common applications across the network. Typically Application Servers run business logic.
Which means, every business is different and the Application Server is the Server Software which
controls the business process. Examples for Application Servers are SAP BASIS, WebLogic, WebSphere
etc.

d) Database server, which allows authorized clients to view, modify and/or delete data in a common
database. Examples of Database Management Systems are Oracle 8i/9i/10g, MS SQL Server
2000/2005/2008, DB2, MySQL etc.

e) Directory Servers, which allows the central administration of users and resources. Examples of
Directory Servers are Active Directory, NDS (Novell Directory Services), Fedora Directory Server,
openLDAP etc.
Server needs a Network Operating System to function. The most popular NOSs are Windows NT,
Windows 2000, Windows 2003, Unix, GNU/Linux, Novell Netware etc. These Server Operating Systems
will provide the services, which are requested by the client computers.
Why we need computer networks?
Computer networks help users on the network to share the resources and in communication. Can you
imagine a world now without emails, online news papers, blogs, chat and the other services offered by
the internet?
The following are the important benefits of a computer network.
File sharing: Networking of computers helps the users to share data files.
Hardware sharing: Users can share devices such as printers, scanners, CD-ROM drives, hard
drives etc.
Application sharing: Applications can be shared over the network, and this allows to implement
client/server applications
User communication: Networks allow users to communicate using e-mail, newsgroups, and
video conferencing etc.
Network gaming: Lot of games are available, which are supports multi-users.
Network Topologies - Bus Topology

A network topology is the physical layout of computers, cables, and other components on a network.
There are a number of different network topologies, and a network may be built using multiple
topologies. The different types of network layouts are Bus topology, Star topology, Mesh topology, Ring
topology, Hybrid topology and Wireless topology. This lesson explains bus topology.
Bus Topology
A bus topology consists of a main run of cable with a terminator at each end. All nodes like workstations,
printers, laptops servers etc., are connected to the linear cable. The terminator is used to absorb the
signal when the signal reaches the end, preventing signal bounce. When using bus topology, when a
computer sends out a signal, the signal travels the cable length in both directions from the sending
computer. When the signal reaches the end of the cable length, it bounces back and returns in the
direction it came from. This is known as signal bounce. Signal bounce will create problem in network,
because if another signal is sent on the cable length at the same time, the two signals will collide.


Advantages of Bus Topology
o Easy to connect a computer or peripheral to a linear bus.
o Requires less cable length than a star topology.
Disadvantages of Bus Topology
o Entire network shuts down if there is a break in the main cable.
o Terminators are required at both ends of the backbone cable.
o Difficult to identify the problem if the entire network shuts down.
o Not meant to be used as a stand-alone solution.


Star Topology
A star topology is designed with each node (like workstations, printers, laptops servers etc.,) connected
directly to a central network hub/switch. Each workstation has a cable that goes from the network card
to network hub or switch.


Advantages of Star Topology
o Easy to install and wire.
o No disruptions to the network then connecting or removing devices.
o Easy to detect faults and to remove parts.
Disadvantages of Star Topology
o Requires more cable length than a linear topology.
o If the hub fails, nodes attached are disabled.
o More expensive than linear bus topologies because of the cost of the devices.

Mesh Topology
Mesh Topology is not commonly used these days. In Mesh topology, every network device is connected to
other network devices. Mesh topology is costly because of the extra cables needed and it is very complex
and difficult to manage.
Ring Topology
In a ring topology, all computers are connected via a cable that loops in a ring or circle. A ring topology is a
circle that has no start and no end and terminators are not necessary in a ring topology. Signals travel in
one direction on a ring while they are passed from one computer to the next, with each computer
regenerating the signal so that it may travel the distance required. Main advantage of Ring topology is that
the signal degeneration is low since each workstation participating in the network is responsible for
regenerating the weak signal. Disadvantage is if one workstation fails, entire network will fail.
Hybrid Topology
Hybrid topology is a mixture of different topologies. Example is star-bus topology.

NETWORK INFRASTRUCTURE DEVICES - WHAT IS A HUB?

What is a Hub?
Hubs were the common network infrastructure devices used for LAN connectivity but switches are
rapidly replacing hubs. Hubs function as the central connection point for LANs. Hubs are designed to
work with Twisted pair cabling and normally use RJ45 jack to connect the devices. Network devices
(Servers, Workstations, Printers, Scanners etc) are attached to the hub by individual network cables.
Hubs usually come in different shapes and different numbers of ports.
When a hub receives a packet of data (an Ethernet frame) at one of its ports from a network device, it
transmits (repeats) the packet to all of its ports to all of the other network devices. If two network
devices on the same network try to send packets at the same time a collision is said to occur.
Hubs are considered to operate at Physical Layer (Layer 1) of OSI model. An 8 port hub is shown below.

Network Infrastructure Devices - What are Bridges and Switchs?

A bridge is a network device that operates at the Data Link layer (Layer 2) of OSI model. There are
many different types of bridges and include Transparent bridges, Encapsulation bridges, Source-route
bridges. Source-route bridges are for Token Ring network. Bridges allow segmenting a Local Network
into multiple segments, thus reducing the network traffic. A bridge performs the segmenting function
by examining the Data Link Layer (Layer 2) data packet (Ethernet Frame) and forwarding the packet to
other physical segments only if necessary. Both swiches and bridges function using Data Link Layer
(Layer 2) addressing system, also known as MAC addresses.
Bridge can connect only two Networks, LANs or Hosts, which means that bridge has only two ports.
While Switch can connect more than two networks or LANs or Hosts because normally switch has
more than two ports (usually 24 ports or 48 ports). Simply you can say that a Bridge with more than
two ports is known as a Switch. Brides and Switches are considered to operate at Data Link Layer
(Layer 2) of OSI model.
The following picture shows a 24 port, 10/100, Cisco 2500 Catalist Switch.




What is a Router?

A router is another network infrastructure device that directs packets through the network based on
information from Network Layer (Layer 3) of OSI model. A router uses a combination of hardware and
software to "route" data from its source to its destination. A router can be configured to route data
packets from different network protocols, like TCP/IP, IPX/SPX, and AppleTalk.
Routers segment large networks into logical segments called subnets. The division of the network is
based on the Layer 3 addressing system, like IP addresses. If the Network Layer (Layer 3) Data packet
(IP Datagram) is addressed to another device on the local subnet, the packet does not cross the router
and create a traffic congestion problem in another network. If data is addressed to a computer outside
the subnet, the router forwards the data to the addressed network. Thus routing of network data
helps conserve network bandwidth. The following picture shows a Cisco 2800 Series Router.



Common Network Cable types

Cables are commonly used to carry communication signals within LAN. There are three common types of
cable media that can be used to connect devices to a network and they are coaxial cable, twisted-pair cable,
and fiber-optic cable.
Coaxial cable
Coaxial cable looks similar to the cable used to carry TV signal. A solid-core copper wire runs down the
middle of the cable. Around that solid-core copper wire is a layer of insulation, and covering that insulation
is braided wire and metal foil, which shields against electromagnetic interference. A final layer of insulation
covers the braided wire.
There are two types of coaxial cabling: thinnet and thicknet. Thinnet is a flexible coaxial cable about inch
thick. Thinnet is used for short-distance. Thinnet connects directly to a workstations network adapter card
using a British Naval Connector (BNC). The maximum length of thinnet is 185 meters. Thicknet coaxial is
thicker cable than thinnet. Thicknet cable is about inch thick and can support data transfer over longer
distances than thinnet. Thicknet has a maximum cable length of 500 meters and usually is used as a
backbone to connect several smaller thinnet-based networks.
The bandwidth for coaxial cable is 10 mbps (mega bits per second).
Twisted Pair Cable
Twisted-pair cable is the most common type of cabling you can see in todays LAN networks. A pair of wires
forms a circuit that can transmit data. The pairs are twisted to provide protection against crosstalk, the
noise generated by adjacent pairs. When a wire is carrying a current, the current creates a magnetic field
around the wire. This field can interfere with signals on nearby wires. To eliminate this, pairs of wires carry
signals in opposite directions, so that the two magnetic fields also occur in opposite directions and cancel
each other out. This process is known as cancellation. Two Types of Twisted Pairs are Shielded Twisted Pair
(STP) and Unshielded Twisted Pair (UTP).
Unshielded twisted-pair (UTP) cable is the most common networking media. Unshielded twisted-pair (UTP)
consists of four pairs of thin, copper wires covered in color-coded plastic insulation that are twisted together.
The wire pairs are then covered with a plastic outer jacket. The connector used on a UTP cable is called a
Registered Jack 45 (RJ-45) connector. UTP cables are of small diameter and it doesnt need
grounding. Since there is no shielding for UTP cabling, it relies only on the cancellation to avoid noise.
UTP cabling has different categories. Each category of UTP cabling was designed for a specific type of
communication or transfer rate. The most popular categories in use today is 5, 5e and 6, which can reach
transfer rates of over 1000 Mbps (1 Gbps).
The following table shows different UTP categories and corresponding transfer rate.
UTP Category Purpose Transfer Rate
Category 1 Voice Only
Category 2 Data 4 Mbps
Category 3 Data 10 Mbps
Category 4 Data 16 Mbps
Category 5 Data 100 Mbps
Category 5e Data 1 Gbps
Category 6 Data 1/10 Gbps
Optical Fiber Cabling
Optical Fiber cables use optical fibers that carry digital data signals in the form of modulated pulses of light.
An optical fiber consists of an extremely thin cylinder of glass, called the core, surrounded by a concentric
layer of glass, known as the cladding. There are two fibers per cableone to transmit and one to receive.
The core also can be an optical-quality clear plastic, and the cladding can be made up of gel that reflects
signals back into the fiber to reduce signal loss.
There are two types of fiber optic cable: Single Mode Fibre (SMF) and Multi Mode Fibre (MMF).
1. Single Mode Fibre (SMF) uses a single ray of light to carry transmission over long distances.
2. Multi Mode Fibre (MMF) uses multiple rays of light simultaneously with each ray of light running at a
different reflection angle to carry the transmission over short distances


Straight-Through and Cross-Over cables

Straight-Through Cabling
CAT 5 UTP cabling usually uses only four wires when sending and receiving information on the network. The
four wires, which are used, are wires 1, 2, 3, and 6. When you configure the wire for the same pin at either
end of the cable, this is known as a straight-through cable.

From the figure we can see that the wires 1 and 2 are used to transmit the data from the computer and 3
and 6 are used to receive data on the computer. The transmit wire on the computer matches with the
receive wire on the hub. For the transmission of data to take place, the transmit pins on the computer
should match with the receive pins on the hub and the transmit pins on the hub should match with receive
pins on the computer. Here we can see that the pins 1, 2, 3 and 6 on the computer matches with pins 1, 2,
3 and 6 on the hub. Hence we use the term Straight-through.
Cross-Over Cabling
If we use want to connect two computers together with a straight-through cable, we can see that, the
transmit pins will be connected to transmit pins and receive pins will be connected to receive pins. We will
not be able to connect two computers or two hubs together using straight through cables.

To connect two computers together without the use of a hub, we need a crossover cable by switching wires
1 and 2 with wires 3 and 6 at one end of the cable. If we shift the pins, we can make sure that the transmit
pins on Computer A will match with the receive pins on Computer B and the transmit pins on Computer B
will match with the receive pins on Computer A.

Hub Switch Router Workstation
Hub Cross-over Cross-over Straight Straight
Switch Cross-over Cross-over Straight Straight
Router Straight Straight Cross-over Cross-over
Workstation Straight Straight Cross-over Cross-over

Difference between Baseband and Broadband

In Baseband, data is sent as digital signals through the media as a single channel that uses the entire
bandwidth of the media. Baseband communication is bi-directional, which means that the same channel can
be used to send and receive signals. In Baseband no frequency-division multiplexing is not possible.
(Multiplexing (short muxing) is a process where multiple analog message signals or digital data streams are
combined into one signal over a shared medium.)
Broadband sends information in the form of an analog signal. Each transmission is assigned to a portion of
the bandwidth, hence multiple transmissions are possible at the same time. Broadband communication is
unidirectional, so in order to send and receive, two pathways are needed. This can be accomplished either
by assigning a frequency for sending and assigning a frequency for receiving along the same cable or by
using two cables, one for sending and one for receiving. In broadband frequency-division multiplexing is
possible.

Network Access Methods - CSMA/CD,
CSMA/CA and Token Passing

CSMA/CD (Carrier Sense Multiple Access/Collision Detection)
In CSMA/CD (Carrier Sense Multiple Access/Collision Detection) Access Method, every host has equal access
to the wire and can place data on the wire when the wire is free from traffic. When a host want to place data
on the wire, it will sense the wire to find whether there is a signal already on the wire. If there is traffic
already in the medium, the host will wait and if there is no traffic, it will place the data in the medium. But,
if two systems place data on the medium at the same instance, they will collide with each other, destroying
the data. If the data is destroyed during transmission, the data will need to be retransmitted. After collision,
each host will wait for a small interval of time and again the data will be retransmitted, to avoid collision
again.
CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance)
In CSMA/CA, before a host sends real data on the wire it will sense the wire to check if the wire is free. If
the wire is free, it will send a piece of dummy data on the wire to see whether it collides with any other
data. If it does not collide, the host will assume that the real data also will not collide.
Token Passing
In CSMA/CD and CSMA/CA the chances of collisions are there. As the number of hosts in the network
increases, the chances of collisions also will become more. In token passing, when a host want to transmit
data, it should hold the token, which is an empty packet. The token is circling the network in a very high
speed. If any workstation wants to send data, it should wait for the token. When the token has reached the
workstation, the workstation can take the token from the network, fill it with data, mark the token as being
used and place the token back to the network.

LAN Technologies - Ethernet

Ethernet, Fast Ethernet and Gigabit Ethernet are the LAN technologies most commonly used today. Ethernet
Version 1 was developed by Xerox Corporation during the early 1970s. Later in 1982 Xerox, Intel and DEC
(Digital Equipment Corporation) together released Ethernet Version 2. Since then, Ethernet is the most
popular LAN technology used in networking.
Advantages of Ethernet are
Low cost components
Easy to install
Easy to troubleshoot
All the devices (Servers, Workstations, Printers, Scanners etc) connected in an Ethernet network share a
common transmission medium. Ethernet uses Carrier Sense Multiple Access/Collision Detection (CSMA/CD)
for determining when a computer is free to transmit data on to the access medium. Using Carrier Sense
Multiple Access/Collision Detection (CSMA/CD), all computers monitor the transmission medium and wait
until the medium is free before transmitting. If two computers try to transmit at the same time, a collision
occurs. The computers then stop, wait for a random time interval, and attempt to transmit again.
Collisions are common in Ethernet network and network infrastructure devices like hubs usually have a small
light on their front panel, that blink when collisions happen in your network.
Original Ethernet operate at a speed of 10 Mbps (Mega bits per second). Ethernet is capable of using a
variety of media. Ethernet networks typically operate at baseband speeds of either 100Mbps (Fast Ethernet),
1000Mbps (Gigabit Ethernet).
Fast Ethernet cannot operate on network infrastructure devices like hubs, switches and network cards
designed for a 10Mbps Ethernet network. Many network infrastructure devices like hubs, switches, and
Ethernet network cards are capable to operate at speed of 10Mbps or 100Mbps (10/100).
Another faster version of Ethernet, which is even faster than Fast Ethernet, is Gigabit Ethernet. Gigabit
Ethernet provides a data transmission speed of 1,000Mbps. Gigabit Ethernet was first designed and
developed as a high-speed backbone medium for large LANs. But almost all latest LANs are Gigabit Ethernet
capable and Category 5e and Category 6 UTP cable can be used as the Gigabit Ethernet medium.
Even a faster version of Gigabit Ethernet, 10Gigabit Ethernet is now available. It works well with both fiber
optic and copper media.


Ethernet Media Standards

Ethernet, Fast Ethernet and Gigabit Ethernet, are identified by three-part names, which is also known as
Media Standard. An example of Media Standard is 10BASE-T. The first part of the Media Standard specifies
the transmission speed (10, in this case specifies 10 Mbps)
The second part of the name "BASE" specifies that the Ethernet signal is a Baseband signal.
The final part of the Ethernet Media Standard specifies the kind of cable used. Here T specifies twisted-pair
cable. The following table shows the common Ethernet Media Standards.

Media Standard Cable Type Bandwidth Capacity Maximum Length
10Base2 Coax 10 Mbps 185m
10Base5 Coax 10 Mbps 500m
10BaseT UTP (CAT 3 or higher) 10 Mbps 100m
100BaseTX UTP (CAT 5 or higher) 100 Mbps 100m
10BaseFL Fibre Optic 10 Mbps 2Km
100BaseFX Fibre Optic 100 Mbps HD 400m/FD 2km
1000BaseT UTP (CAT 5e or higher) 1 Gbps (1000 Mbps) 100m
1000BaseSX Fibre Optic 1 Gbps (1000 Mbps) MMF 550m
1000BaseLX Fibre Optic 1 Gbps (1000 Mbps) MMF 500m/SMF 10km
1000BaseCX Fibre Optic 1 Gbps (1000 Mbps 100m
10GbaseSR Fibre Optic 10 Gbps 300m
10GbaseLR Fibre Optic 10 Gbps SMF 10km

Note: X represents a higher grade of connection, and 100BaseTX is twisted-pair cabling that can use either
UTP or STP at 100 Mbps. With fibre-optic cable such as 100BaseFX, the speed is quicker than standard
10BaseF. The L stands for Long in long wave length lasers and "S" stands for Short Wave Length.

Lan Technologies - Token Ring

Token-Ring Lan Technology was developed by IBM in the middle 1980s as a fast and reliable alternative to
Ethernet. Token ring technology uses a different concept, known as token passing, for allowing network
adapters to transmit data on the media. Token Ring uses a star ring topology, a hybrid topology, looking
physically like a star but logically wired as a ring.
Token-Ring operates in a logical ring, where the central device which is used to connect the network devices
(Servers, Workstations, Printers, Scanners etc.) hosts an internal ring, where access to the network media
for a network device is given only by the possession of a token that is passed from device to device on the
ring. The central device which is used to connect the network devices is called as a Multistation Access Unit,
or MAU. Please click the link to view an image of IBM token ring MAU.
Token-Ring is more sophisticated than Ethernet, and it includes a number of built-in diagnosis and correction
mechanisms that can help troubleshoot network problems and Token-Ring networks does not produce the
collisions that can take place in the Ethernet Network.
When a Token-Ring network starts up, the devices take part in a negotiation to decide who will become the
"Active Monitor". In Token-Ring network, "Active Monitor" is a machine with the highest MAC address and all
other machines are 'Standby Monitors'. The job of the Active Monitor is to make sure that none of the
machines are causing problems on the network, and to re-establish the ring after a break or an error has
occurred.
A computer that passes the token to the next computer on the logical ring would be called the nearest active
upstream neighbor (NAUN). The computer receiving the token is the nearest active downstream neighbor
(NADN). Once a computer takes possession of the token and transmits data, it then creates a new token
and passes it to its NADN.
Early Token-Ring networks had 4Mbps speed and later 16Mbps and 100Mbps speed Token-Ring networks
were also available. Token Ring networks are fast replaced by Ethernet family technologies due to the
advantages of Ethernet technologies.

Lan Technologies - Fibre Distributed Data
Interface (FDDI)

Fiber Distributed Data Interface (FDDI) is an expensive LAN technology that employs a pair of fibre-optic
rings. One is primary ring and the second ring is used to replace the primary ring in the case of a network
failure. Fiber Distributed Data Interface (FDDI) uses fiber-optic cable and is wired in a ring topology and
Fiber Distributed Data Interface (FDDI) uses token passing as its media-access method and can operate at
high speeds.
The Fiber Distributed Data Interface (FDDI) provides high-speed network backbones that can be used to
connect and extend LANs.
Like token ring, FDDI also has error-detection and correction capabilities. In a normally operating Fiber
Distributed Data Interface (FDDI) ring, the token passes by each network device fast. If the token is not
seen within the maximum amount of time that it takes to circulate the largest ring, it indicates a network
problem.
Fiber-optic cable such as the cable used with Fiber Distributed Data Interface (FDDI) can support very large
volumes of data over large distances.
Fiber Distributed Data Interface (FDDI) is an expensive technology to set up because the network devices
require a special network card and also fiber-optic cabling is required, which is expensive than twisted-pair
cable. Because most Fiber Distributed Data Interface (FDDI) installations use a redundant second ring, more
cabling is required.


IEEE 802 Standards
The IEEE 802 Standards comprises a family of networking standards that cover the physical layer
specifications of technologies. The following tables show the most popular IEEE 802 Standards.

Standard Description
802.1 Internetworking
802.2 Logical link control
802.3 Ethernet
802.4 Token bus
802.5 Token ring
802.6 Metropolitan area network (MAN)
802.7 Broadband technology
802.8 Fiber-optic technology
802.9 Voice and data integration
802.10 Network security
802.11 Wireless networking
802.12 Demand priority networking





Ethernet Standards
Standard Description
802.3 Ethernet CSMA /CD (10 Mbps)
802.3u Fast Ethernet (100 Mbps)
802.3z Gigabit Ethernet over fiber-optic cabling or coaxial cabling
802.3ab Gigabit Ethernet over twisted-pair cabling
802.3ae 10-Gigabit Ethernet



TCP/IP Introduction
What Is TCP/IP?
TCP/IP is a set of protocols (Protocol Suit) that enable communication between computers. Protocols are
rules or standards that govern communications. If two devices in a network need to communicate, they
need to use a common protocol. This can be compared with how humans speak. A French person cannot
communicate with a Vietnamese person since they speak different languages.
You can select from different network protocols to use in your network, but TCP/IP is the industry standard.
Almost all Operating Systems now support TCP/IP. Internet is working on TCP/IP. TCP/IP is known as "the
language of the Internet." If you want a computer to work on the Internet, you have to use TCP/IP.
Features of TCP/IP
The industry was using TCP/IP around 25 years. It is a tested and proved protocol suit.
1) Multi-Vendor Support. TCP/IP is implemented by many hardware and software vendors. It is an industry
standard and not limited to any specific vendor.
2) Interoperability. Today we can work in a heterogeneous network because of TCP/IP. A user who is sitting
on a Windows box can download files from a Linux machine, because both Operating Systems support
TCP/IP. TCP/IP eliminates the cross-platform boundaries.
3) Logical Addressing. Every network adapter has a globally unique and permanent physical address, which
is known as MAC address (or hardware address). The physical address is burnt into the card while
manufacturing. Low-lying hardware-conscious protocols on a LAN deliver data packets using the adapter's
physical address. The network adapter of each computer listens to every transmission on the local network
to determine whether a message is addressed to its own physical address.
For a small LAN, this will work well. But when your computer is connected to a big network like internet, it
may need to listen to millions of transmissions per second. This may cause your network connection to stop
functioning.
To avoid this, network administrators often segment (divide) big networks into smaller networks using
devices such as routers to reduce network traffic, so that the unwanted data traffic from one network may
not create problem in another network. A network can be again subdivided into smaller subnets so that a
message can travel efficiently from its source to the destination. TCP/IP has a robust subnetting capability
achieved using logical addressing. A logical address is an address configured through the network software.
The logical addressing system used in TCP/IP protocol suit is known as IP address.
4) Routability. A router is a network infrastructure device which can read logical addressing information and
direct data across the network to its destination.TCP/IP is a routable protocol, which means the TCP/IP data
packets can be moved from one network segment to another.
5) Name Resolution. IP addresses are designed for the computers and it is difficult for humans to remember
many IP addresses. TCP/IP allows us to use human-friendly names, which are very easy to remember (Ex.
www.omnisecu.com). Name Resolutions servers (DNS Servers) are used to resolve a human readable name
(also known as Fully Qualified Domain Names (FQDN)) to an IP address and vice versa.
6) Error Control and Flow Control.The TCP/IP protocol has features that ensure the reliable delivery of data
from source computer to the destination computer. TCP (Transmisssion Control Protocol) defines many of
these error-checking, flow-control, and acknowledgement functions.
7) Multiplexing/De-multiplexing. Multiplexing means accepting data from different applications and directing
that data to different applications listening on different receiving computers. On the receiving side the data
need to be directed to the correct application, for that data was meant for. This is called De-multiplexing.
We can run many network applications on the same computer. By using logical channels called ports, TCP/IP
provides means for delivering packets to the correct application. In TCP/IP, ports are identified by using port
numbers.
TCP/IP History
The predecessor of todays Internet was ARPAnet, created by the Advanced Research Projects Agency
(ARPA) and launched in 1969 during "Cold War". The extreme distrust that existed between USA and USSR
(Soviet Union) was almost on the verge of a nuclear war during that time. "Cold War" was the term used to
describe the relationship between USA and USSR during period 1945 to 1990. ARPAnet was created in
response to the potential threat of nuclear attack from the Soviet Union. One of ARPAs primary goals was to
design a fault-tolerant network that would enable U.S. military leaders to stay in contact in case of nuclear
war.
The protocol used on the ARPAnet was called Network Control Protocol (NCP). As the ARPAnet grew,
however, a new protocol was needed because NCP was not able to fulfil all the needs of a larger network.
In 1974 Vint Cerf and Bob Kahn, published a paper A Protocol for Packet Network Interconnection. This
paper describes the Transmission Control Protocol (TCP), which eventually replaced NCP.
By 1978, testing and further development of this language led to a new suite of protocols called
Transmission Control Protocol/Internet Protocol (TCP/IP). In 1982, it was decided that TCP/IP would replace
NCP as the standard language of the ARPAnet. RFC 801 describes how and why the transition from NCP to
TCP was to take place. On January 1, 1983, ARPAnet switched over to TCP/IP, and the network continued to
grow very fast.
ARPAnet ceased to exist in 1990. The Internet has since grown from ARPAnets roots, and TCP/IP has
evolved to meet the changing requirements of the Internet.
Requests For Comments (RFC)
Request For Comments (RFC) is a paper describing a protocol or technology. RFC's are used as a platform to
encourage and facilitate correspondence among the engineers who are involved in developing a new
technology or a protocol. RFCs help in providing feedback and collaboration among engineers. An RFC is a
paper that has been written by an engineer, a team of engineers, or just someone who has an innovative
idea, to define a new technology or enhance an existing technology. After an RFC is written and posted, it
can be evaluated, and used by other engineers and developers. If another engineer or developer can
improve on the theory or standard, the RFC provides an open forum to do so.
An RFC can be submitted for review to the IETF (Internet Engineering Task Force). Engineers from the IETF
review the papers that are submitted and assign a number to each. From that point on, the RFC number
becomes the effective name of the paper. There are currently around 5,000 RFCs. RFC's can be searched
in RFC search Engine, http://www.rfc-editor.org/rfcsearch.html, by using the RFC number or by the
technology name.
In this lesson, you have learned the basic terms related with TCP/IP. The terms you have learned in this
lesson are "What is a Network?", "LAN, MAN and WAN", "Internet, Intranet, Extranet", "Peer-tp-Peer
network", "Client-Server network", different roles of servers like File server, Print server,Application server,
Database server, Directory Servers, "What is TCP/IP", Features of TCP/IP, History of TCP/IP and Request for
Comments (RFC). Click "Next" to continue.
Seven Layers of Open Systems
Interconnection (OSI) Model
In Seven Layers of Open Systems Interconnection (OSI) Model lesson, you will learn about the seven layers
of OSI model and their functions
If network communications need to happen with out any trouble, many problems must be solved.
Coordinating all these problems are so complex and not easy to manage. To make these tasks smooth, in
1977 the International Standards Organization (ISO) proposed the Open Systems Interconnection (OSI)
network model. The Open Systems Interconnection (OSI) model breaks down the problems involved in
moving data from one computer to another computer. Open Systems Interconnection (OSI) model
categorizes these hundreds of problems to Seven Layers. A layer in Open Systems Interconnection (OSI)
model is a portion that is used to categorize specific problems.
Open Systems Interconnection (OSI) Seven Layered reference model is only just a model. All the problems
which are related to the communications are answered by specific protocols operating at different layers.
The following image shows the seven layers described in Open Systems Interconnection (OSI) model.


Seven Layers of Open Systems Interconnection (OSI) Model
Layer 1. Physical Layer
The first layer of the seven layers of Open Systems Interconnection (OSI) network model is called the
Physical layer. Physical circuits are created on the physical layer of Open Systems Interconnection (OSI)
model. Physical layers describe the electrical or optical signals used for communication. Physical layer of the
Open Systems Interconnection (OSI) model is only concerned with the physical characteristics of electrical
or optical signaling techniques which includes the voltage of the electrical current used to transport the
signal, the media type (Twisted Pair, Coaxial Cable, Optical Fiber etc), impedance characteristics, physical
shape of the connector, Synchronization etc. The Physical Layer is limited to the processes needed to place
the communication signals over the media, and to receive signals coming from that media. The lower
boundary of the physical layer of the Open Systems Interconnection (OSI) model is the physical connector
attached to the transmission media. Physical layer of the Open Systems Interconnection (OSI) model does
not include the transmission media. Transmission media stays outside the scope of the Physical Layer and
are also referred to as Layer 0 of the Open Systems Interconnection (OSI) Model.
Layer 2. Datalink Layer
The second layer of the seven layers of Open Systems Interconnection (OSI) network model is called the
Datalink layer. The Data Link layer resides above the Physical layer and below the Network layer. Datalink
layer is responsible for providing end-to-end validity of the data being transmitted. The Data Link Layer is
logically divided into two sublayers, The Media Access Control (MAC) Sublayer and the Logical Link Control
(LLC) Sublayer.
Media Access Control (MAC) Sublayer determines the physical addressing of the hosts. The MAC sub-layer
maintains MAC addresses (physical device addresses) for communicating with other devices on the network.
MAC addresses are burned into the network cards and constitute the low-level address used to determine
the source and destination of network traffic. MAC Addresses are also known as Physical addresses, Layer 2
addresses, or Hardware addresses.
The Logical Link Control sublayer is responsible for synchronizing frames, error checking, and flow control.
Layer 3. Network Layer
The third layer of the seven layers of Open Systems Interconnection (OSI) network model is the Network
layer. The Network layer of the OSI model is responsible for managing logical addressing information in the
packets and the delivery of those packets to the correct destination. Routers, which are special computers
used to build the network, direct the data packet generated by Network Layer using information stored in a
table known as routing table. The routing table is a list of available destinations that are stored in memory
on the routers. The network layer is responsible for working with logical addresses. The logical addresses
are used to uniquely identify a computer on the network, but at the same time identify the network that
system resides on. The logical address is used by network layer protocols to deliver the packets to the
correct network. The Logical addressing system used in Network Layer is known as IP address.
IP addresses are also known as Logical addresses or Layer 3 addresses.
Layer 4. Transport Layer
The fourth layer of the seven layers of Open Systems Interconnection (OSI) network mode is the Transport
layer. The Transport layer handles transport functions such as reliable or unreliable delivery of the data to
the destination. On the sending computer, the transport layer is responsible for breaking the data into
smaller packets, so that if any packet is lost during transmission, the missing packets will be sent again.
Missing packets are determined by acknowledgments (ACKs) from the remote device, when the remote
device receives the packets. At the receiving system, the transport layer will be responsible for opening all
of the packets and reconstructing the original message.
Another function of the transport layer is TCP segment sequencing. Sequencing is a connection-oriented
service that takes TCP segments that are received out of order and place them in the right order.
The transport layer also enables the option of specifying a "service address" for the services or application
on the source and the destination computer to specify what application the request came from and what
application the request is going to.
Many network applications can run on a computer simultaneously and there should be some mechanism to
identify which application should receive the incoming data. To make this work correctly, incoming data from
different applications are multiplexed at the Transport layer and sent to the bottom layers. On the other side
of the communication, the data received from the bottom layers are de-multiplexed at the Transport layer
and delivered to the correct application. This is achieved by using "Port Numbers".
The protocols operating at the Transport Layer, TCP (Transmission Control Protocol) and UDP (User
Datagram Protocol) uses a mechanism known as "Port Number" to enable multiplexing and de-multiplexing.
Port numbers identify the originating network application on the source computer and destination network
application on the receiving computer.
Layer 5. Session Layer
The position of Session Layer of the Seven Layered Open Systems Interconnection (OSI) model is between
Transport Layer and the Presentation Layer. Session layer is the fifth layer of seven layered Open Systems
Interconnection (OSI) Model. The session layer is responsible for establishing, managing, and terminating
connections between applications at each end of the communication.
In the connection establishment phase, the service and the rules (who transmits and when, how much data
can be sent at a time etc.) for communication between the two devices are proposed. The participating
devices must agree on the rules. Once the rules are established, the data transfer phase begins. Connection
termination occurs when the session is complete, and communication ends gracefully.
In practice, Session Layer is often combined with the Transport Layer.
Layer 6. Presentation Layer
The position of Presentation Layer in seven layered Open Systems Interconnection (OSI) model is just below
the Application Layer. When the presentation layer receives data from the application layer, to be sent over
the network, it makes sure that the data is in the proper format. If it is not, the presentation layer converts
the data to the proper format. On the other side of communication, when the presentation layer receives
network data from the session layer, it makes sure that the data is in the proper format and once again
converts it if it is not.
Formatting functions at the presentation layer may include compression, encryption, and ensuring that the
character code set (ASCII, Unicode, EBCDIC (Extended Binary Coded Decimal Interchange Code, which is
used in IBM servers) etc) can be interpreted on the other side.
For example, if we select to compress the data from a network application that we are using, the Application
Layer will pass that request to the Presentation Layer, but it will be the Presentation Layer that does the
compression.
Layer 7. Application Layer
The Application Layer the seventh layer in OSI network model. Application Layer is the top-most layer of the
seven layered Open Systems Interconnection (OSI) network model. Real traffic data will be often generated
from the Application Layer. This may be a web request generated from HTTP protocol, a command from
telnet protocol, a file download request from FTP protocol etc.
In this lesson (Seven Layers of Open Systems Interconnection (OSI) Model), you have learned what are the
Seven Layers of Open Systems Interconnection (OSI) Model and the functions of these seven layers. The
top-most layer of the Seven Layers of Open Systems Interconnection (OSI) Model is the Application Layer
and the bottom-most layer of the Seven Layers of Open Systems Interconnection (OSI) Model is Physical
Layer.

Comparison between TCP/IP and OSI
Like OSI network model, TCP/IP also has a network model. TCP/IP was on the path of development when
the OSI standard was published and there was interaction between the designers of OSI and TCP/IP
standards. The TCP/IP model is not same as OSI model. OSI is a seven-layered standard, but TCP/IP is a
four layered standard. The OSI model has been very influential in the growth and development of TCP/IP
standard, and that is why much OSI terminology is applied to TCP/IP. The following figure compares the
TCP/IP and OSI network models.

Comparison between seven layer OSI and four layer TCP/IP Models
As we can see from the above figure, presentation and session layers are not there in OSI model. Also note
that the Network Access Layer combines the functions of Datalink Layer and Physical Layer.
Layer 4. Application Layer
Application layer is the top most layer of four layer TCP/IP model. Application layer is present on the top of
the Transport layer. Application layer defines TCP/IP application protocols and how host programs interface
with transport layer services to use the network.
Application layer includes all the higher-level protocols like DNS (Domain Naming System), HTTP (Hypertext
Transfer Protocol), Telnet, FTP (File Transfer Protocol), TFTP (Trivial File Transfer Protocol), SNMP (Simple
Network Management Protocol), SMTP (Simple Mail Transfer Protocol) , DHCP (Dynamic Host Configuration
Protocol), X Windows, RDP (Remote Desktop Protocol) etc.
Layer 3. Transport Layer
Transport Layer is the third layer of the four layer TCP/IP model. The position of the Transport layer is
between Application layer and Internet layer. The purpose of Transport layer is to permit devices on the
source and destination hosts to carry on a conversation. Transport layer defines the level of service and
status of the connection used when transporting data.
The main protocols included at Transport layer are TCP (Transmission Control Protocol) and UDP (User
Datagram Protocol).
Layer 2. Internet Layer
Internet Layer is the second layer of the four layer TCP/IP model. The position of Internet layer is between
Network Access Layer and Transport Layer. Internet layer pack data into data packets known as IP
datagrams, which contain source and destination address (logical address or IP address) information that is
used to forward the datagrams between hosts and across networks. The Internet layer is also responsible
for routing of IP datagrams.
Packet switching network depends upon a connectionless internetwork layer. This layer is known as internet
layer, is the linchpin that holds the whole design together. Its job is to allow hosts to insert packets into any
network and have them to deliver independently to the destination. At the destination side data packets
may appear in a different order than they were sent. It is the job of the higher layers to rearrange them in
order to deliver them to proper network applications operating at the Application layer.
The main protocols included at Internet layer are IP (Internet Protocol), ICMP (Internet Control Message
Protocol), ARP (Address Resolution Protocol), RARP (Reverse Address Resolution Protocol) and IGMP
(Internet Group Management Protocol).
Layer 1. Network Access Layer
Network Access Layer is the first layer of the four layer TCP/IP model. Network Access layer defines details
of how data is physically sent through the network, including how bits are electrically or optically signaled by
hardware devices that interface directly with a network medium, such as coaxial cable, optical fiber, or
twisted pair copper wire.
The protocols included in Network Access layer are Ethernet, Token Ring, FDDI, X.25, Frame Relay etc.
The most popular LAN architecture among those listed above is Ethernet. Ethernet uses an Access Method
called CSMA/CD (Carrier Sense Multiple Access/Collision Detection) to access the media. An Access Method
determines how a host will place data on the medium.
IN CSMA/CD Access Method, every host has equal access to the medium and can place data on the wire
when the wire is free from network traffic. When a host wants to place data on the wire, it will check the
wire to find whether another host is already using the medium. If there is traffic already in the medium, the
host will wait and if there is no traffic, it will place the data in the medium. But, if two systems place data on
the medium at the same instance, they will collide with each other, destroying the data. If the data is
destroyed during transmission, the data will need to be retransmitted. After collision, each host will wait for
a small interval of time and again the data will be retransmitted.
In this lesson, you have learned about the four layers of TCP/IP model and the comparison between four
layered TCP/IP model and seven layered OSI model.


TCP/IP Encapsulation and Decapsulation
This lesson will teach you what is TCP/IP encapsulation and decapsulation, and how data is packed at
different layers of TCP/IP protocol suit.
Encapsulation
When data moves from upper layer to lower level of TCP/IP protocol stack (outgoing transmission) each
layer includes a bundle of relevant information called a header along with the actual data. The data package
containing the header and the data from the upper layer then becomes the data that is repackaged at the
next lower level with lower layer's header. Header is the supplemental data placed at the beginning of a
block of data when it is transmitted. This supplemental data is used at the receiving side to extract the data
from the encapsulated data packet. This packing of data at each layer is known as data encapsulation.


TCP/IP Encapsulation
Decapsulation
The reverse process of encapsulation (or decapsulation) occurs when data is received on the destination
computer. As the data moves up from the lower layer to the upper layer of TCP/IP protocol stack (incoming
transmission), each layer unpacks the corresponding header and uses the information contained in the
header to deliver the packet to the exact network application waiting for the data.

TCP/IP Decapsulation
The format of the data packet generated at different layers is different, and known by different names.
The data packet created at the Application layer is known as a "MESSAGE".
As described in the previous lesson, the Transport Layer contains two important protocols: TCP
(Transmission Control Protocol) and UDP (User Datagram Protocol). TCP is more reliable but consumes more
resource. UDP is less reliable but consume fewer resources than TCP and is faster than TCP.
The Application layer message is again encapsulated at the Transport layer. If the protocol used at the
Transport Layer is TCP, the data packet is known as a "SEGMENT". If the protocol used at the Transport
layer is UDP, the data packet is known as a "UDP DATAGRAM".
The data packet created at the Internet layer by Internet Protocol, which again encapsulates the Transport
layer segment/datagram, is known as a "IP DATAGRAM".
The data packet at the Network Access layer, which encapsulates and may subdivide the datagram, is
known as a "FRAME". The frame is converted into a bitstream at the lowest sublayer of the Network Access
layer and then placed on medium.
In this lesson, you have learned what is TCP/IP Encapsulation and Decapsulation. The name of Data at
different layers of TCP/IP protocol stack are Message, TCP Segment, UDP Datagram, IP Datagram and
Frame.

TCP/IP - Network Access Layer
In this TCP/IP - Network Access Layer, you will learn about the bottom most layer of TCP/IP protocol
suit and what are the different functions of TCP/IP Network Access Layer.
The Network Access Layer of the TCP/IP model is associated with the Physical Layer (Layer 1) and the
Data Link layer (Layer 2) of the OSI model. The Network Access Layer's function is to move bits (0s and
1s) over the network medium.
The OSI Physical layer is responsible for converting the frame into a stream of bits suitable for the
transmission medium. The OSI Physical layer manages and synchronizes signals for the actual
transmission. On the destination device, the Physical layer reassembles these signals into a data frame.
The OSI Data Link layer is again subdivided into the following two sub layers according to their function:
Media Access Control (MAC) Sublayer : MAC sublayer provides an interface with the network adapter.
Logical Link Control (LLC) Sublayer : LLC sublayer is responsible for error-checking functions for frames
delivered also responsible for managing links between communicating devices.
Structure of an Ethernet Frame
The data packets from Internet Layer is moved to Network Access Layer as it moves down the TCP/IP
protocol stack. There is a size limitation for Ethernet Frame. The total size of the ethernet frame must be
between 64 bytes and 1,518 bytes (not including the preamble). Network Access Layer Breaks Internet
Layer data (IP Datagram) into smaller chunks, if necessary, which will become the payload of ethernet
frames. A Frame includes data to be transmitted and also a header and a trailer which contain
information that the network adapters on the ethernet need to process the frame.
The total size of the ethernet frame must be between 64 bytes and 1,518 bytes (not including the
preamble). A frame shorter than the minimum 64 bytes but with a valid CRC is called as a runt. In most
cases, such frames arise from a collision. Any frame which is received and which is greater than the
maximum frame size, is called a "giant". A "giant" is longer than 1518 bytes yet have a valid CRC. Both
runts and giants are considered as invalid.

Structure of an Ethernet Frame
The Ethernet Frame fields are explained below.
Preamble: A sequence of 56 bits having alternating 1 and 0 values that are used for synchronization.
They serve to give components in the network time to detect the presence of a signal, and being reading
the signal before the frame data arrives.
SFD (Start Frame Delimiter): A sequence of 8 bits having the bit configuration 10101011 that indicates
the start of the frame.
Source and Destination MAC Addresses: The Source MAC Address is the MAC address of the device this
frame is coming from. The Destination MAC Address is the MAC address of the device which is going to
receive this frame. Both of these fields are 6 bytes long.
MAC address (Layer 2 addresses, physical address or hardware address) is a universally unique identifier,
permanently burned in the network card. For Ethernet and Token Ring, these addresses are 48 bits, or
six octets (bytes). MAC addresses are represented in hexadecimal characters because hexadecimal
format is easier for humans to read when compared with the binary format. One hexadecimal digit
resembles a group of four contiguous binary bits, called a nibble. An example representation of MAC
address is AA.F0.C1.E8.13.40.
Length/Type: A 2-byte (16-bit) field contains the number of bytes in the Data field or the nature of the
MAC client protocol.
Data: This field contains the actual data transferred from the source device to the destination device.
The maximum size of this field is 1500 bytes. If the size of this field is less than 46 bytes, then use of the
subsequent "Pad" field is necessary to bring the frame size up to the minimum length.
Pad: If necessary, extra data bytes are appended in this field to bring the frame length up to its
minimum size. A minimum Ethernet frame size is 64 bytes from the Destination MAC Address field
through the Frame Check Sequence.
Frame Check Sequence: This field contains a 4-byte Cyclic Redundancy Check (CRC) value used for error
checking. When a source device assembles a MAC frame, it performs a Cyclic Redundancy Check (CRC)
calculation on all fields in the frame except the Preamble, SFD (Start Frame Delimiter), and frame check
sequence using a predetermined algorithm. The source device stores the value in this field and transmits
it as part of the frame. When the frame is received by the destination device, it performs an CRC test
again using the same algorithm. If the CRC value calulated at the destination device does not match the
value in the FCS (Frame Check Sequence) field, the destination device will discards the frame,
considering this as a transmission error.
To view the MAC address when you are working with a Windows workstation, run cmd (Start > run >
type cmd and Enter). Type the command "ipconfig /all" in the prompt and Enter. Do remember to
remove doublequotes.
In TCP/IP Network Access Layer lesson, you have learned the sublayers of Datalink Layer. The sublayers
of Datalink layer are Media Access Control (MAC) sublayer and Logical Link Control (LLC) sublayer. You
also learned about the Ethernet Frame Header, the structure of an Ethernet Frame, different fields in
Ethernet Frame header, what is a runt and what is a giant. Click "Next" to continue.

TCP/IP - Internet Layer
The Internet Layer (RFC 791) is the second layer in the TCP/IP protocol stack. The main functions of the
internet layer are transmitting data to and from the Network Access layer, routing data to the correct
destination network and device on the destination network, and handling packet errors and fragmentation.
Routing is the process of selecting best path / paths in a network along which to send the IP Datagrams
(name of the data packet generated by the Internet Protocol) efficiently. IP Datagrams are encapsulated
within an Ethernet Frame.

IP Datagram Encapsulated within an Ethernet Frame
The TCP/IP internet layer's functions are similar to the Layer 3 of the OSI model (Network Layer).
The major protocols included in the Internet layer are Internet Protocol (IP), Internet Control Message
Protocol (ICMP), Address Resolution Protocol (ARP), Reverse Address Resolution Protocol (RARP) and
Internet Group Management Protocol (IGMP).
Internet Protocol (IP)
The Internet Protocol (IP) implements two basic functions of network traffic 1) addressing of packets and 2)
fragmentation of packets.
1) Routing of Internet Protocol (IP) Datagrams. Routing is the process of selecting best path / paths in a
network along which to send the Internet Protocol (IP) Datagrams efficiently. The Internet Protocol (IP)
layer use the Internet Protocol (IP) addresses (32 bit logical addresses represented in 4 octets) carried in
the Internet Protocol (IP) datagram header to transmit the IP Datagrams toward their destination networks.
2) Fragmentation and Reassembly of Datagrams. To understand what is IP Datagram Fragmentation, first
we should know the term MTU (Maximum Transmission Unit). MTU is the size (in bytes) of the largest
packet or frame that can pass through a specific device or NIC card. While travelling through the network to
reach the destination, the Internet Protocol (IP) datagrams may need to traverse different networks with
heterogeneous MTUs. When a datagram is larger than the MTU of the network it need to traverse, it is
divided into smaller fragments and are sent separately. At the destination computer the fragmented
IPDatagram is reconstructed and this process in called reassembly.
Internet Protocol (IPv4) Datagram Header

Figure 7: Internet Protocol (IPv4) Datagram Header
Version: This 4-bit field indicates which version of Internet Protocol (IP) is being used. The current version
of IP is v4. The binary pattern for 4 is 0100. The possible values for Version field are as shown in the table
below.
IP Version Description
0 Reserved
1-3 Unassigned
4 IP Version 4
5 Stream IP Datagram mode (experimental protocol)
6 IP Version 6
7 TP/IX
8 The "P" internet protocol
9 TUBA
10-14 Unassigned
15 Reserved
Note: The TP/IX, "P" Internet protocol, and TUBA were the major protocols considered for the replacement
of IPv4, but the industry embraced "IP Version 6" as the replacement for "IP Version 4" all other protocols
mentioned above only have historical status.
IHL (Internet Header Length): This 4-bit field gives length of the Internet Protocol (IPv4) header in 32-bit
words. The minimum length of an Internet Protocol (IPv4) header is five 32-bit words. The header bit
pattern is 0101.
Type of Service: The "Type of Service" (ToS) field in the Internet Protocol (IPv4) header is an eight bit field,
which provides an indication of the Quality of Service (QoS) desired, such as precedence, delay, throughput,
and reliability.
The first three bits, Bits 0-2 indicates the Precedence value. The following are the possible combinations and
the corresponding values.
Bits Pattern Description
000 Routine
001 Priority
010 Immediate
011 Flash
100 Flash Override
101 CRITIC/ECP
110 Internetwork Control
111 Network Control
The fourth bit indicates "Delay". The bit value 0 indicates normal delay and the bit value "1" indicate low
delay.
The fifth bit indicates "Throughput". The bit value 0 indicates normal throughput and the bit value "1"
indicate high throughput.
The sixth bit indicate "Reliability". The bit value 0 indicates normal reliability and the bit value "1" indicate
high reliability.
The seventh bit indicates "Minimize monetary cost". The bit value 0 indicates normal monetary cost and
the bit value "1" indicate minimize monetary cost.
The eight bit is reserved for future use and is termed as MBZ (Must be Zero)
The four bits which represent the ToS values can be summarized as below.
ToS Code Meaning
1000 Minimum Delay
0100 Maximum throughput
0010 Maximum Reliability
0001 Minimum monetary cost
0000 Normal Service
Total Length: The "Total Length" is a 16-bit field which identifies the length (in bytes), of the Internet
Protocol (IPv4) datagram. Total Length includes the length of Internet Protocol (IP4) header and the Data it
carries. The minimum-length of an IP Datagram is 20 bytes (The minimum size of an IP header is 20 bytes
and this is the case of an IP header carrying no data) and the maximum is 65,535 bytes (maximum possible
value for a 16 bit number is 65,535).
Identification: The Identification field in the Internet Protocol (IPv4) header is a 16 bits field which indicates
an identifying value assigned by the sender to aid in assembling the fragments of an IP Datagram. When a
Datagram is fragmented in to multiple Datagrams, IP give all the fragments the same identification number
and this number is used to identify IP fragments at the receiving side.
Flags: The three bit "Flags" field indicates fragmentation possibilities. The first bit is unused and should
always have a value of zero. The next bit is called the DF (Don't Fragment) flag. DF flag set to "0" indicate
that the IP Datagram can be fragmented and DF set to 1 indicate "Don't Fragment" the IP Datagram. The
next bit is the MF (More Fragments) flag, which indicates that more fragments are on the way. When MF is
set to 0, no more fragments need to be sent or the Datagram never was fragmented.
Fragment Offset: This field indicates where in the actual IP Datagram this fragment belongs. The fragment
offset is measured in units of 8 octets (64 bits). The first fragment has offset zero.

Figure 8: IP Datagram Fragmentation
Consider the above figure. Network 1 and Network 3 has MTUs of 1500 bytes each and the MTU of Network
3 is only 1000 bytes. If Machine 1 sends a 1,500 byte Datagram (20-byte header and 1,480 bytes of data)
to Machine 2, Router 1 must fragment the Datagram into two fragments, since the MTU for the Network 2 is
only 1000 bytes.
1) The first fragment will contain 20 byte IP header and 976 bytes of data. Also note that the Fragment
offset is set to "0" (Since first fragment) and the MF (More Fragments) flag is set to "1".
2) The second fragment will contain a 20 byte IP header and 504 bytes of data. The fragment offset is set to
122 (976/8 = 122) and the MF (More Fragments) flag is set to "0". When the IP Datagram is fragmented to
two, there is an additional 20 bytes of transfer which is the IP Datagram header size of the second
fragment.
Time to Live (TTL): TTL is an 8 bit field and TTL indicates the amount of time in seconds or router hops that
the Internet Protocol (IPv4) Datagram can survive before being discarded. Every router examines and
decrements this field by at least 1, or by the number of seconds the Internet Protocol (IPv4) Datagram is
delayed inside the router. The Internet Protocol (IPv4) Datagram is discarded when this field reaches zero.
Protocol: The 8-bit Protocol field indicates the protocol that will receive the data payload.
Header Checksum: This field holds a 16-bit calculated value to verify the validity of the header only. This
field is recomputed in every router as the TTL field decrements.
Source IP Address: The 32 bit size IP address of the device which send this Internet Protocol (IPv4)
Datagram.
Destination IP Address: The 32 bit size IP address of the device which is going to receive this IP Datagram.
IP Options: This field supports a number of optional header settings primarily used for testing, debugging,
and security.
Padding: The Internet Protocol (IPv4) Options field may vary in length. The Padding field provides additional
zero bits so that the total header length is an exact multiple of 32 bits.
Data: This field in the Internet Protocol (IPv4) Datagram Header contains the real Internet Protocol (IPv4)
data payload and the size may vary. Contains data generated by TCP or UDP (Transport layer protocols),
ICMP, or IGMP.
You have learned Internet Protocol (IPv4), Internet Protocol (IPv4) Datagram Header, different fields in an
Internet Protocol (IPv4) header, and Internet Protocol (IPv4) Datagram fragmentation. The different fields of
an IP header are Version, IHL, Type of Service, Total Length, Flags, Fragment offset, TTL (Time to Live),
Protocol, Header Checksum, Source IP Address, Destination IP Address, IP Options, Padding and the Data
Payload. Click "Next" to continue.


Internet Layer - IP Addresses
IP addresses 32 bit addresses (divided into 4 octets) used by the Internet Protocol (OSI Layer 3) for
delivering packet to a device located in same or remote network. MAC address (Hardware address) is a
globally unique address which represents the network card and cannot be changed. IP address refers to
a logical address, which is a configurable address used to identify which network this host belongs to
and also a network specific host number. In other words, an IP V4 address consists of two parts, a
network part and a host part.
This can be compared to your home address. A letter addressed to your home address will be delivered
to your house because of this logical address. If you move to another house, your address will change,
and letters addressed to you will be sent to your new address. But the person who the letter is being
delivered to, that is you, is still the same.
IP addresses are stored internally as binary numbers but they are represented in decimal numbers
because of simplicity.
An example of IP address is 192.168.10.100, which is actually 11000000.10101000.00001010.01100100.
For Each network, one address is used to represent the network and one address is used for broadcast.
Network address is an IP address with all host bits are "0". Broadcast address is an IP address with all
host bits are "1".
That means, for a network, the first IP address is the network address and the last IP address is the
broadcast address.You cannot configure these addresses for your devices. All the usable IP addresses in
any IP network are between network address and broadcast address.
We can use the following equation for find the number of usable IP addresses in a network (We have to
use two IP addresses in each network to represent the network id and the broadcat id.)
Number of usable IP addresses = (2
n
)-2. Where "n" is the number of bits in host part.
Many IP addresses are reserved and we cannot use those IP address. There are five IP address Classes
and certain special addresses.
Default Network
The IP address of 0.0.0.0 is used for the default network. When a program sends a packet to an address
that is not added in the on the computer's routing table, the packet is forwarded to the gateway for
0.0.0.0, which may able to route it to the correct address.
Class A IP addresses
"Class A" IP addresses are for very large networks. The left most bit of the left most octet of a "Class A"
network is reserved as "0". The first octet of a "Class A" IP address is used to identify the Network and
the three remaining octets are used to identify the host in that particular network
(Network.Host.Host.Host).
The 32 bits of a "Class A" IP address can be represented as 0xxxxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx.
The minimum possible value for the leftmost octet in binaries is 00000000 (decimal equivalent is 0) and
the maximum possible value for the leftmost octet is 01111111 (decimal equivalent is 127). Therefore
for a "Class A" IP address, leftmost octet must have a value between 0-127 (0.X.X.X to 127.X.X.X).
The network 127.0.0.0 is known as loopback network. The IP address 127.0.0.1 is used by the host
computer to send a message back to itself. It is commonly used for troubleshooting and network testing.
Computers not connected directly to the Internet need not have globally-unique IP addresses. They
need an IP addresses unique to that network only. 10.0.0.0 network belongs to "Class A" is reserved for
private use and can be used inside any organization.
Class B IP addresses
"Class B" IP addresses are used for medium-sized networks. Two left most bits of the left most octet of a
"Class B" network is reserved as "10". The first two octets of a "Class B" IP address is used to identify the
Network and the remaining two octets are used to identify the host in that particular network
(Network.Network.Host.Host).
The 32 bits of a "Class B" IP address can be represented as 10xxxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx.
The minimum possible value for the leftmost octet in binaries is 10000000 (decimal equivalent is 128)
and the maximum possible value for the leftmost octet is 10111111 (decimal equivalent is 191).
Therefore for a "Class B" IP address, leftmost octet must have a value between 128-191 (128.X.X.X to
191.X.X.X).
Network 169.254.0.0 is known as APIPA (Automatic Private IP Addresses). APIPA range of IP addresses
are used when a client is configured to automatically obtain an IP address from the DHCP server was
unable to contact the DHCP server for dynamic IP address.

Networks starting from 172.16.0.0 to 172.31.0.0 are reserved for private use.
Class C IP addresses
"Class C" IP addresses are commonly used for small to mid-size businesses. Three left most bits of the
left most octet of a "Class C" network is reserved as "110". The first three octets of a "Class C" IP address
is used to identify the Network and the remaining one octet is used to identify the host in that particular
network (Network.Network.Networkt.Host).
The 32 bits of a "Class C" IP address can be represented as 110xxxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx.
The minimum possible value for the leftmost octet in binaries is 11000000 (decimal equivalent is 192)
and the maximum possible value for the leftmost octet is 11011111 (decimal equivalent is 223).
Therefore for a "Class C" IP address, leftmost octet must have a value between 192-223 (192.X.X.X to
223.X.X.X).
Networks starting from 192.168.0.0 to 192.168.255.0 are reserved for private use.
Class D IP addresses
Class D IP addresses are known as multicast IP addresses. Multicasting is a technique developed to send
packets from one device to many other devices, without any unnecessary packet duplication. In
multicasting, one packet is sent from a source and is replicated as needed in the network to reach as
many end-users as necessary. You cannot assign these IP addresses to your devices.
Four left most bits of the left most octet of a "Class D" network is reserved as "1110". The other 28 bits
are used to identify the group of computers the multicast message is intended for.
The minimum possible value for the left most octet in binaries is 11100000 (decimal equivalent is 224)
and the maximum possible value for the leftmost octet is 11101111 (decimal equivalent is 239).
Therefore for a "Class D" IP address, leftmost octet must have a value between 223-239 (223.X.X.X to
239.X.X.X).
Class E IP addresses
Class E is used for experimental purposes only and you cannot assign these IP addresses to your devices.
Four left most bits of the left most octet of a "Class E" network is reserved as "1111".
The minimum possible value for the left most octet in binaries is 11110000 (decimal equivalent is 240)
and the maximum possible value for the leftmost octet is 11111111 (decimal equivalent is 255).
Therefore for a "Class E" IP address, leftmost octet must have a value between 240-255 (240.X.X.X to
255.X.X.X).
Limited Broadcast
255.255.255.255 is used to send messages to all devices in the LAN and this IP addrress is known as
limited broadcast IP address.
You have learned IP addresses, different classes of IP addresses, Class A IP address, Class B IP address,
Class C IP address, Class D IP address, Class E IP Address, public IP address, private IP address, multicast
IP address, Limited broadcast IP address and Automatic Private IP Addresses (APIPA).

Class C Subnetting Tutorial - Part 1
In this Class C Subnetting Tutorial - Part 1, you will learn how to subnet a Class C network.
Subnetting (RFC 950) is the process of dividing a network of any classful IP network (A, B, or C) into
smaller networks. Before proceeding further deep into subnetting, we should know these terms.
What is Subnet Mask?
If we recollect from the previous lessons, an IP address has two components, the network part and the
host part. Really, IP address is a combination of IP address and Subnet mask and the purpose of subnet
mask is to identify which part of an IP address is the network part and which part is the host part.
Subnet mask is also a 32 bit number where all the bits of the network part are represented as "1" and all
the bits of the host part are represented as "0".
If we take an example for a Class C network, 192.168.10.0, the address part and the subnet mask can be
represented as below.

Component Binary Decimal
Address
Part
11000000.10101000.00001010.00000000 192.168.10.0
SN Mask 11111111.11111111.11111111.00000000 255.255.255.0

For a Class C IP address, the first three octets are used to represent the Network part and the lact octet
is used to represent the host part. From the above table, we can see all "1" in the network part and all
"0" in nthe host part. When this subnet mask is converted to a decimals, it will become 255.2555.255.0.
The default subnet mask for a Class C network is 255.255.255.0, Class B network is 255.255.0.0 and Class
A network is 255.0.0.0
What is a Network Address?
A network address is used to identify the subnet that a host may be on and is used to represent that
network. We can find the network address by assigning all bits in the host part as 0.
What is Directed Broadcast?
The host id value containing all 1's in the bit pattern indicates a directed broadcast address. A directed
broadcast address can occur in the destination IP address of an IP datagram, but never as a source IP
address. A directed broadcast address will be seen by all nodes on that network. For example, the
broadcast id for the network 192.168.10.0 will be 192.168.10.255.
A directed broadcast is sent to a specific network identified in the Network part of the IP address.
Routers on the network configured to forward-directed broadcasts will send the IP datagram to the final
router that connects the destination specidied in the network part, and the router at the destination
network should forward it to the destination host.
What is Limited Broadcast?
Limited broadcast is another type of broadcast, represented by 255.255.255.255. The limited broadcast
can be used in local area networks, where a broadcast never crosses a router to reach another network.
If a broadcast is to be done over the local network, you can use the limited broadcast. A limited
broadcast address can never appear as a source IP address; it can appear only as a destination IP
address
What is CIDR?
Classless Inter-Domain Routing (CIDR, RFC 1517, RFC 1518, RFC 1519, RFC 1520) was published in 1993
to keep the internet from running out of IP addresses. The "classful" system of allocating IP addresses
can waste many IP addresses. Any organization who need just a few IP addresses more than 254 must
get a Class B address block of 65533 IP addresses. Even much more IP addresses are wasted in the case
of Class A, where total usable IP addresses per network is 16777214 ((2^24) - 2).
The original IPv4 "Class A" uses 8 bits to represent the network part, "Class B" uses 16 bits to represent
the network part and "Class C" uses 24 bits to represent the network part. CIDR replaced these
categories with a more generalized network prefix. This network prefix could be of any length, not just
8, 16, or 24 bits.
Classless Inter-Domain Routing (CIDR) includes supernetting (supernetting is the method of using
contiguous blocks of Class C address spaces to simulate a single, larger, address space), VLSM (Variable
Length Subnet Masking, a method of subnetting a subnet) and route aggregation (method representing
multiple networks using a single entry in a router's routing table. This can greatly reduce the size of the
routing tables in routers).

Class C Subnetting Tutorial
Subnetting is done by taking the bit/s from host part and adding it to the network part. Consider the
same Class C example given above. Remember, the first three octets of a Class C network is used to
represent the network and the last octet is used to represent the host. The default format for a Class C
IP address is Network.Network.Network.Host.
To make things easy, you may remember this.
If all the bits in the host part are "0", that represents the network id.
If all the bits in the host part are "0" except the last bit, it is the first usable IP address.
If all the bits in the host part are "1" except the last bit, it is the last usable IP address.
If all the bits in the host part are "1", that represents the direct broadcat address.
All the IP addresses between the first and last IP addresses (including the first and last) can be used to
configure the devices.
Class C - One Bit Subnetting Tutorial
Consider the network shown above. If we include one bit from the host part to the network part, the
subnet mask is changed into 255.255.255.128. The single bit can have two values in last octet, either 0
or 1.
11000000.10101000.00001010.0 | 0000000
11111111.11111111.11111111.1 | 0000000
That means, we can get two subnets if we do a single bit subnetting.
SN No Description

Binaries

Decimal
1
Network Address 11000000.10101000.00001010.00000000 192.168.10.0
First IP Address 11000000.10101000.00001010.00000001 192.168.10.1
Last IP Address 11000000.10101000.00001010.01111110 192.168.10.126
Broadcast Address 11000000.10101000.00001010.01111111 192.168.10.127
2
Network Address 11000000.10101000.00001010.10000000 192.168.10.128
First IP Address 11000000.10101000.00001010.10000001 192.168.10.129
Last IP Address 11000000.10101000.00001010.11111110 192.168.10.224
Broadcast Address 11000000.10101000.00001010.11111111 192.168.10.225
The network 192.168.10.0 is divided into two networks, each network has 128 total IP addresses and
126 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and the
broadcast id). The subnet mask for one bit subnetting is 255.255.255.128.
Class C - Two Bit Subnetting Tutorial
If we include two bits from the host part to the network part, the subnet mask is changed into
255.255.255.192. The two bits added to network part can have four possible values in last octet and that
are 00, 01, 10 and 11. That means, we can get four networks if we do a two bit subnetting.
11000000.10101000.00001010.00 | 000000
11111111.11111111.11111111.11 | 000000

SN No Description

Binaries

Decimal
1
Network Address 11000000.10101000.00001010.00000000 192.168.10.0
First IP Address 11000000.10101000.00001010.00000001 192.168.10.1
Last IP Address 11000000.10101000.00001010.00111110 192.168.10.62
Broadcast Address 11000000.10101000.00001010.00111111 192.168.10.63
2
Network Address 11000000.10101000.00001010.01000000 192.168.10.64
First IP Address 11000000.10101000.00001010.01000001 192.168.10.65
Last IP Address 11000000.10101000.00001010.01111110 192.168.10.126
Broadcast Address 11000000.10101000.00001010.01111111 192.168.10.127
3
Network Address 11000000.10101000.00001010.10000000 192.168.10.128
First IP Address 11000000.10101000.00001010.10000001 192.168.10.129
Last IP Address 11000000.10101000.00001010.10111110 192.168.10.190
Broadcast Address 11000000.10101000.00001010.10111111 192.168.10.191
4
Network Address 11000000.10101000.00001010.11000000 192.168.10.192
First IP Address 11000000.10101000.00001010.11000001 192.168.10.193
Last IP Address 11000000.10101000.00001010.11111110 192.168.10.254
Broadcast Address 11000000.10101000.00001010.11111111 192.168.10.255

The network 192.168.10.0 is divided into four networks, each network has 64 total IP addresses and 62
usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and the
broadcast id). The subnet mask for two bit subnetting is 255.255.255.192.
Class C - 3 Bit Subnetting Tutorial
If we include three bits from the host part to the network part, the subnet mask is changed into
255.255.255.224. The three bits added to network part can have eight possible values in last octet and
that are 000, 001, 010, 011, 100, 101, 110 and 111. That means, we can get eight networks if we do a
three bit subnetting.
11000000.10101000.00001010.000 | 00000
11111111.11111111.11111111.111 | 00000

SN No Description

Binaries

Decimal
1
Network Address 11000000.10101000.00001010.00000000 192.168.10.0
First IP Address 11000000.10101000.00001010.00000001 192.168.10.1
Last IP Address 11000000.10101000.00001010.00011110 192.168.10.30
Broadcast Address 11000000.10101000.00001010.00011111 192.168.10.31
2
Network Address 11000000.10101000.00001010.00100000 192.168.10.32
First IP Address 11000000.10101000.00001010.00100001 192.168.10.33
Last IP Address 11000000.10101000.00001010.00111110 192.168.10.62
Broadcast Address 11000000.10101000.00001010.00111111 192.168.10.63
3
Network Address 11000000.10101000.00001010.01000000 192.168.10.64
First IP Address 11000000.10101000.00001010.01000001 192.168.10.65
Last IP Address 11000000.10101000.00001010.01011110 192.168.10.94
Broadcast Address 11000000.10101000.00001010.01011111 192.168.10.95
4
Network Address 11000000.10101000.00001010.01100000 192.168.10.96
First IP Address 11000000.10101000.00001010.01100001 192.168.10.97
Last IP Address 11000000.10101000.00001010.01111110 192.168.10.126
Broadcast Address 11000000.10101000.00001010.01111111 192.168.10.127
5
Network Address 11000000.10101000.00001010.10000000 192.168.10.128
First IP Address 11000000.10101000.00001010.10000001 192.168.10.129
Last IP Address 11000000.10101000.00001010.10011110 192.168.10.158
Broadcast Address 11000000.10101000.00001010.10011111 192.168.10.159
6
Network Address 11000000.10101000.00001010.10100000 192.168.10.160
First IP Address 11000000.10101000.00001010.10100001 192.168.10.161
Last IP Address 11000000.10101000.00001010.10111110 192.168.10.190
Broadcast Address 11000000.10101000.00001010.10111111 192.168.10.191
7
Network Address 11000000.10101000.00001010.11000000 192.168.10.192
First IP Address 11000000.10101000.00001010.11000001 192.168.10.193
Last IP Address 11000000.10101000.00001010.11011110 192.168.10.222
Broadcast Address 11000000.10101000.00001010.11011111 192.168.10.223
8
Network Address 11000000.10101000.00001010.11100000 192.168.10.224
First IP Address 11000000.10101000.00001010.11100001 192.168.10.225
Last IP Address 11000000.10101000.00001010.11111110 192.168.10.254
Broadcast Address 11000000.10101000.00001010.11111111 192.168.10.255

The network 192.168.10.0 is divided into eight networks, each network has 32 total IP addresses and 30
usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and the
broadcast id). The subnet mask for three bit subnetting is 255.255.255.224.
In this Class C Subnetting Tutorial - Part 1, you have learned what is a subnet mask, what is network
address, what is directed broadcast,what is limited broadcast, what is CIDR and how to perform a Class
C subnetting. Click "Next" to view Class C Subnetting Tutorial - Part 2.

Class C Subnetting Tutorial - Part 2

Class C - 4 Bit Subnetting
If we include four bits from the host part to the network part, the subnet mask is changed to
255.255.255.240.
11000000.10101000.00001010.0000 | 0000
11111111.11111111.11111111.1111 | 0000
The four bits added to network part can have sixteen possible values in last (fourth) octet and that are
0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111.

SN No Description

Binaries

Decimal
1
Network Address 11000000.10101000.00001010.00000000 192.168.10.0
First IP Address 11000000.10101000.00001010.00000001 192.168.10.1
Last IP Address 11000000.10101000.00001010.00001110 192.168.10.14
Broadcast Address 11000000.10101000.00001010.00001111 192.168.10.15
2
Network Address 11000000.10101000.00001010.00010000 192.168.10.16
First IP Address 11000000.10101000.00001010.00010001 192.168.10.17
Last IP Address 11000000.10101000.00001010.00011110 192.168.10.30
Broadcast Address 11000000.10101000.00001010.00011111 192.168.10.31
3
Network Address 11000000.10101000.00001010.00100000 192.168.10.32
First IP Address 11000000.10101000.00001010.00100001 192.168.10.33
Last IP Address 11000000.10101000.00001010.00101110 192.168.10.46
Broadcast Address 11000000.10101000.00001010.00101111 192.168.10.47
4
Network Address 11000000.10101000.00001010.00110000 192.168.10.48
First IP Address 11000000.10101000.00001010.00110001 192.168.10.49
Last IP Address 11000000.10101000.00001010.00111110 192.168.10.62
Broadcast Address 11000000.10101000.00001010.00111111 192.168.10.63
5
Network Address 11000000.10101000.00001010.01000000 192.168.10.64
First IP Address 11000000.10101000.00001010.01000001 192.168.10.65
Last IP Address 11000000.10101000.00001010.01001110 192.168.10.78
Broadcast Address 11000000.10101000.00001010.01001111 192.168.10.79
6
Network Address 11000000.10101000.00001010.01010000 192.168.10.80
First IP Address 11000000.10101000.00001010.01010001 192.168.10.81
Last IP Address 11000000.10101000.00001010.01011110 192.168.10.94
Broadcast Address 11000000.10101000.00001010.01011111 192.168.10.95
7
Network Address 11000000.10101000.00001010.01100000 192.168.10.96
First IP Address 11000000.10101000.00001010.01100001 192.168.10.97
Last IP Address 11000000.10101000.00001010.01101110 192.168.10.110
Broadcast Address 11000000.10101000.00001010.01101111 192.168.10.111
8
Network Address 11000000.10101000.00001010.01110000 192.168.10.112
First IP Address 11000000.10101000.00001010.01110001 192.168.10.113
Last IP Address 11000000.10101000.00001010.01111110 192.168.10.126
Broadcast Address 11000000.10101000.00001010.01111111 192.168.10.127
9
Network Address 11000000.10101000.00001010.10000000 192.168.10.128
First IP Address 11000000.10101000.00001010.10000001 192.168.10.129
Last IP Address 11000000.10101000.00001010.10001110 192.168.10.142
Broadcast Address 11000000.10101000.00001010.10001111 192.168.10.143
10
Network Address 11000000.10101000.00001010.10010000 192.168.10.144
First IP Address 11000000.10101000.00001010.10010001 192.168.10.145
Last IP Address 11000000.10101000.00001010.10011110 192.168.10.158
Broadcast Address 11000000.10101000.00001010.10011111 192.168.10.159
11 Network Address 11000000.10101000.00001010.10100000 192.168.10.160
First IP Address 11000000.10101000.00001010.10100001 192.168.10.161
Last IP Address 11000000.10101000.00001010.10101110 192.168.10.174
Broadcast Address 11000000.10101000.00001010.10101111 192.168.10.175
12
Network Address 11000000.10101000.00001010.10110000 192.168.10.176
First IP Address 11000000.10101000.00001010.10110001 192.168.10.177
Last IP Address 11000000.10101000.00001010.10111110 192.168.10.190
Broadcast Address 11000000.10101000.00001010.10111111 192.168.10.191
13
Network Address 11000000.10101000.00001010.11000000 192.168.10.192
First IP Address 11000000.10101000.00001010.11000001 192.168.10.193
Last IP Address 11000000.10101000.00001010.11001110 192.168.10.206
Broadcast Address 11000000.10101000.00001010.11001111 192.168.10.207
14
Network Address 11000000.10101000.00001010.11010000 192.168.10.208
First IP Address 11000000.10101000.00001010.11010001 192.168.10.209
Last IP Address 11000000.10101000.00001010.11011110 192.168.10.222
Broadcast Address 11000000.10101000.00001010.11011111 192.168.10.223
15
Network Address 11000000.10101000.00001010.11100000 192.168.10.224
First IP Address 11000000.10101000.00001010.11100001 192.168.10.225
Last IP Address 11000000.10101000.00001010.11101110 192.168.10.238
Broadcast Address 11000000.10101000.00001010.11101111 192.168.10.239
16
Network Address 11000000.10101000.00001010.11110000 192.168.10.240
First IP Address 11000000.10101000.00001010.11110001 192.168.10.241
Last IP Address 11000000.10101000.00001010.11111110 192.168.10.254
Broadcast Address 11000000.10101000.00001010.11111111 192.168.10.255
The network 192.168.10.0 is divided into sixteen networks, each network has 16 total IP addresses and
14 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and the
broadcast id).
From the above examples, you can can clearly understand how to subnet a Class C subnet.
Class C Subnetting can be summerized as below.
Subnet
Bits
Subnet Mask CIDR
Total
Subnets
Usable
IPs/Subnet
0 255.255.255.0 /24 1 254
1 255.255.255.128 /25 2 126
2 255.255.255.192 /26 4 62
3 255.255.255.224 /27 8 30
4 255.255.255.240 /28 16 14
5 255.255.255.248 /29 32 6
6 255.255.255.252 /30 64 2
In this Class C Subnetting Tutorial - Part 2, you have learned how to perform a Class C 4 bit subnetting.
To View Class B Subnetting Tutorial - Part 1, Click "Next".

Class B Subnetting Tutorial - Part 1
In this Class B Subnetting Tutorial - Part 1, you will learn how to subnet a Class B network.
Class B Subnetting
Remember, the first two octets of a Class B network is used to represent the network and the last two
octets are used to represent the host. The default format for a Class B IP address is
Network.Network.Host.Host.
Let us consider an example of Class B network 172.16.0.0 - 255.255.0.0. The binary representation of the
above network and subnet mask is

Component Binary Decimal
Address Part 10101100.00010000.00000000.00000000 172.16.0.0
SN Mask 11111111.11111111.00000000.00000000 255.255.0.0
Once again,
If all the bits in the host part are "0", that represents the network id.
If all the bits in the host part are "0" except the last bit, it is the first usable IP address.
If all the bits in the host part are "1" except the last bit, it is the last usable IP address.
If all the bits in the host part are "1", that represents the direct broadcat address.
All the IP addresses between the first and last IP addresses (including the first and last) can be used to
configure the devices.

Class B - One Bit Subnetting
If we include one bit from the host part to the network part, the subnet mask is changed into
255.255.128.0 The single bit can have two values in third octet, either 0 or 1.
10101100.00010000.0 | 0000000.00000000
11111111.11111111.1 | 0000000.00000000
That means, we can get two subnets if we do a single bit subnetting.
SN No Description

Binaries

Decimal
1
Network Address 10101100.00010000.00000000.00000000 172.16.0.0
First IP Address 10101100.00010000.00000000.00000001 172.16.0.1
Last IP Address 10101100.00010000.01111111.11111110 172.16.127.254
Broadcast Address 10101100.00010000.01111111.11111111 172.16.127.255
2
Network Address 10101100.00010000.10000000.00000000 172.16.128.0
First IP Address 10101100.00010000.10000000.00000001 172.16.128.1
Last IP Address 10101100.00010000.11111111.11111110 172.16.255.254
Broadcast Address 10101100.00010000.11111111.11111111 172.16.255.255
The network 172.16.0.0 is divided into two networks, each network has 32768 total IP addresses and
32766 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and the
broadcast id). The subnet mask for one bit subnetting is 255.255.128.0.
Class B - Two Bit Subnetting
If we include two bits from the host part to the network part, the subnet mask is changed into
255.255.192.0. The two bits added to network part can have four possible values in third octet, 00, 01,
10, and 11.
10101100.00010000.00 | 000000.00000000
11111111.11111111.11 | 000000.00000000
That means, we can get four networks if we do a two bit subnetting.

SN No Description

Binaries

Decimal
1
Network Address 10101100.00010000.00000000.00000000 172.16.0.0
First IP Address 10101100.00010000.00000000.00000001 172.16.0.1
Last IP Address 10101100.00010000.00111111.11111110 172.16.63.254
Broadcast Address 10101100.00010000.00111111.11111111 172.16.63.255
2
Network Address 10101100.00010000.01000000.00000000 172.16.64.0
First IP Address 10101100.00010000.01000000.00000001 172.16.64.1
Last IP Address 10101100.00010000.01111111.11111110 172.16.127.254
Broadcast Address 10101100.00010000.01111111.11111111 172.16.127.255
3
Network Address 10101100.00010000.10000000.00000000 172.16.128.0
First IP Address 10101100.00010000.10000000.00000001 172.16.128.1
Last IP Address 10101100.00010000.10111111.11111110 172.16.191.254
Broadcast Address 10101100.00010000.10111111.11111111 172.16.191.255
4
Network Address 10101100.00010000.11000000.00000000 172.16.192.0
First IP Address 10101100.00010000.11000000.00000001 172.16.192.1
Last IP Address 10101100.00010000.11111111.11111110 172.16.255.254
Broadcast Address 10101100.00010000.11111111.11111111 172.16.255.255
The network 172.16.0.0 is divided into four networks, each network has 16384 total IP addresses and
16382 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and the
broadcast id). The subnet mask for one bit subnetting is 255.255.192.0.
Class B - 3 Bit Subnetting
If we include three bits from the host part to the network part, the subnet mask is changed into
255.255.224.0 The three bits added to network part can have eight possible values in the third octet and
that are 000, 001, 010, and 011, 100, 101, 110 and 111.
10101100.00010000.000 | 00000.00000000
11111111.11111111.111 | 00000.00000000
That means, we can get eight networks if we do a three bit subnetting.

SN No Description

Binaries

Decimal
1
Network Address 10101100.00010000.00000000.00000000 172.16.0.0
First IP Address 10101100.00010000.00000000.00000001 172.16.0.1
Last IP Address 10101100.00010000.00011111.11111110 172.16.31.254
Broadcast Address 10101100.00010000.00011111.11111111 172.16.31.255
2
Network Address 10101100.00010000.00100000.00000000 172.16.32.0
First IP Address 10101100.00010000.00100000.00000001 172.16.32.1
Last IP Address 10101100.00010000.00111111.11111110 172.16.63.254
Broadcast Address 10101100.00010000.00111111.11111111 172.16.63.255
3
Network Address 10101100.00010000.01000000.00000000 172.16.64.0
First IP Address 10101100.00010000.01000000.00000001 172.16.64.1
Last IP Address 10101100.00010000.01011111.11111110 172.16.95.254
Broadcast Address 10101100.00010000.01011111.11111111 172.16.95.255
4
Network Address 10101100.00010000.01100000.00000000 172.16.96.0
First IP Address 10101100.00010000.01100000.00000001 172.16.96.1
Last IP Address 10101100.00010000.01111111.11111110 172.16.127.254
Broadcast Address 10101100.00010000.01111111.11111111 172.16.127.255
5
Network Address 10101100.00010000.10000000.00000000 172.16.128.0
First IP Address 10101100.00010000.10000000.00000001 172.16.128.1
Last IP Address 10101100.00010000.10011111.11111110 172.16.159.254
Broadcast Address 10101100.00010000.10011111.11111111 172.16.159.255
6
Network Address 10101100.00010000.10100000.00000000 172.16.160.0
First IP Address 10101100.00010000.10100000.00000001 172.16.160.1
Last IP Address 10101100.00010000.10111111.11111110 172.16.191.254
Broadcast Address 10101100.00010000.10111111.11111111 172.16.191.255
7
Network Address 10101100.00010000.11000000.00000000 172.16.192.0
First IP Address 10101100.00010000.11000000.00000001 172.16.192.1
Last IP Address 10101100.00010000.11011111.11111110 172.16.223.254
Broadcast Address 10101100.00010000.11011111.11111111 172.16.223.255
8
Network Address 10101100.00010000.11100000.00000000 172.16.224.0
First IP Address 10101100.00010000.11100000.00000001 172.16.224.1
Last IP Address 10101100.00010000.11111111.11111110 172.16.255.254
Broadcast Address 10101100.00010000.11111111.11111111 172.16.255.255
The network 172.16.0.0 is divided into eight networks, each network has 8192 total IP addresses and
8190 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and the
broadcast id).
In this Class B Subnetting Tutorial - Part 1, you have learned how to subnet a Class B network. Click
"Next" to view Class B Subnetting Tutorial - Part 2.

Class B Subnetting Tutorial - Part 2

Class B - 4 Bit Subnetting
If we include four bits from the host part to the network part, the subnet mask is changed to
255.255.240.0.
10101100.00010000.0000 | 0000.00000000
11111111.11111111.1111 | 0000.00000000
The four bits added to network part can have sixteen possible values in third octet and that are 0000,
0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111.

SN No Description

Binaries

Decimal
1
Network Address 10101100.00010000.00000000.00000000 172.16.0.0
First IP Address 10101100.00010000.00000000.00000001 172.16.0.1
Last IP Address 10101100.00010000.00001111.11111110 172.16.15.254
Broadcast Address 10101100.00010000.00001111.11111111 172.16.15.255
2
Network Address 10101100.00010000.00010000.00000000 172.16.16.0
First IP Address 10101100.00010000.00010000.00000001 172.16.16.1
Last IP Address 10101100.00010000.00011111.11111110 172.16.31.254
Broadcast Address 10101100.00010000.00011111.11111111 172.16.31.255
3
Network Address 10101100.00010000.00100000.00000000 172.16.32.0
First IP Address 10101100.00010000.00100000.00000001 172.16.32.01
Last IP Address 10101100.00010000.00101111.11111110 172.16.47.254
Broadcast Address 10101100.00010000.00101111.11111111 172.16.47.255
4
Network Address 10101100.00010000.00110000.00000000 172.16.48.0
First IP Address 10101100.00010000.00110000.00000001 172.16.48.1
Last IP Address 10101100.00010000.00111111.11111110 172.16.63.254
Broadcast Address 10101100.00010000.00111111.11111111 172.16.63.255
5
Network Address 10101100.00010000.01000000.00000000 172.16.64.0
First IP Address 10101100.00010000.01000000.00000001 172.16.64.1
Last IP Address 10101100.00010000.01001111.11111110 172.16.79.254
Broadcast Address 10101100.00010000.01001111.11111110 172.16.79.255
6
Network Address 10101100.00010000.01010000.00000000 172.16.80.0
First IP Address 10101100.00010000.01010000.00000001 172.16.80.1
Last IP Address 10101100.00010000.01011111.11111110 172.16.95.254
Broadcast Address 10101100.00010000.01011111.11111111 172.16.95.255
7
Network Address 10101100.00010000.01100000.00000000 172.16.96.0
First IP Address 10101100.00010000.01100000.00000001 172.16.96.1
Last IP Address 10101100.00010000.01101111.11111110 172.16.111.254
Broadcast Address 10101100.00010000.01101111.11111110 172.16.111.255
8 Network Address 10101100.00010000.01110000.00000000 172.16.112.0
First IP Address 10101100.00010000.01110000.00000001 172.16.112.1
Last IP Address 10101100.00010000.01111111.11111110 172.16.127.254
Broadcast Address 10101100.00010000.01111111.11111111 172.16.127.255
9
Network Address 10101100.00010000.10000000.00000000 172.16.128.0
First IP Address 10101100.00010000.10000000.00000001 172.16.128.1
Last IP Address 10101100.00010000.10001111.11111110 172.16.143.254
Broadcast Address 10101100.00010000.10001111.11111111 172.16.143.255
10
Network Address 10101100.00010000.10010000.00000000 172.16.144.0
First IP Address 10101100.00010000.10010000.00000001 172.16.144.1
Last IP Address 10101100.00010000.10011111.11111110 172.16.159.254
Broadcast Address 10101100.00010000.10011111.11111111 172.16.159.255
11
Network Address 10101100.00010000.10100000.00000000 172.16.160.0
First IP Address 10101100.00010000.10100000.00000001 172.16.160.1
Last IP Address 10101100.00010000.10101111.11111110 172.16.175.254
Broadcast Address 10101100.00010000.10101111.11111111 172.16.175.255
12
Network Address 10101100.00010000.10110000.00000000 172.16.176.0
First IP Address 10101100.00010000.10110000.00000001 172.16.176.1
Last IP Address 10101100.00010000.10111111.11111110 172.16.191.254
Broadcast Address 10101100.00010000.10111111.11111111 172.16.191.255
13
Network Address 10101100.00010000.11000000.00000000 172.16.192.0
First IP Address 10101100.00010000.11000000.00000001 172.16.192.1
Last IP Address 10101100.00010000.11001111.11111110 172.16.207.254
Broadcast Address 10101100.00010000.11001111.11111111 172.16.207.255
14
Network Address 10101100.00010000.11010000.00000000 172.16.208.0
First IP Address 10101100.00010000.11010000.00000001 172.16.208.1
Last IP Address 10101100.00010000.11011111.11111110 172.16.223.254
Broadcast Address 10101100.00010000.11011111.11111111 172.16.223.255
15
Network Address 10101100.00010000.11100000.00000000 172.16.224.0
First IP Address 10101100.00010000.11100000.00000001 172.16.224.1
Last IP Address 10101100.00010000.11101111.11111110 172.16.239.254
Broadcast Address 10101100.00010000.11101111.11111111 172.16.239.255
16
Network Address 10101100.00010000.11110000.00000000 172.16.240.0
First IP Address 10101100.00010000.11110000.00000001 172.16.240.1
Last IP Address 10101100.00010000.11111111.11111110 172.16.255.254
Broadcast Address 10101100.00010000.11111111.11111111 172.16.255.255
The network 172.16.0.0 is divided into sixteen networks, each network has 4096 total IP addresses and
4094 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and the
broadcast id). The subnet mask is 255.255.240.0.
Class B Subnetting can be summerized as below.
Subnet
Bits
Subnet Mask CIDR
Total
Subnets
Usable IP
Address/Subnet
0 255.255.0.0 /16 1 65534
1 255.255.128.0 /17 2 32766
2 255.255.192.0 /18 4 16382
3 255.255.224.0 /18 8 8190
4 255.255.240.0 /20 16 4094
5 255.255.248.0 /21 32 2046
6 255.255.252.0 /22 64 1022
7 255.255.254.0 /23 128 510
8 255.255.255.0 /24 256 254
9 255.255.255.128 /25 512 126
10 255.255.255.192 /26 1024 62
11 255.255.255.224 /27 2048 30
12 255.255.255.240 /28 4096 14
13 255.255.255.248 /29 8192 6
14 255.255.255.252 /30 16384 2
In this Class B Subnetting tutorial Part - 2, you have learned how perform a Class B 4 bit Subnetting. To
view Class A Subnetting Tutorials - Part 1, Click "Next".

Class A Subnetting Tutorial - Part 1

In this Class A Subnetting Tutorial - Part 1, you will learn how to subnet a Class A network.
Class A Subnetting
Remember, the first octet of a Class A network is used to represent the network and the remaining
three octets are used to represent the host. The default format for a Class A IP address is
Network.Host.Host.Host.
Let us consider an example of Class A network 10.0.0.0 - 255.0.0.0. The binary representation of the
above network and subnet mask is

Component Binary Decimal
Address Part 00001010.00000000.00000000.00000000 10.0.0.0
Subnet Mask 11111111.00000000.00000000.00000000 255.0.0.0
Once again,
If all the bits in the host part are "0", that represents the network id.
If all the bits in the host part are "0" except the last bit, it is the first usable IP address.
If all the bits in the host part are "1" except the last bit, it is the last usable IP address.
If all the bits in the host part are "1", that represents the direct broadcat address.
All the IP addresses between the first and last IP addresses (including the first and last) can be used to
configure the devices.

Class A - One Bit Subnetting
If we include one bit from the host part to the network part, the subnet mask is changed into
255.255.128.0 The single bit can have two values in second octet, either 0 or 1.
00001010.0 | 0000000.00000000.00000000
11111111.1 | 0000000.00000000.00000000
That means, we can get two subnets if we do a single bit subnetting. The subnet mask for one bit
subnetting is 255.128.0.0.
SN
No
Description

Binaries

Decimal
1
Network Address 00001010.00000000.00000000.00000000 10.0.0.0
First IP Address 00001010.00000000.00000000.00000001 10.0.0.1
Last IP Address 00001010.01111111.11111111.11111110 10.127.255.254
Broadcast Address 100001010.01111111.11111111.11111110 10.127.255.255
2
Network Address 00001010.10000000.00000000.00000000 10.128.0.0
First IP Address 00001010.10000000.00000000.00000001 10.128.0.1
Last IP Address 00001010.11111111.11111111.11111110 10.255.255.254
Broadcast Address 00001010.11111111.11111111.11111111 10.255.255.255
The network 10.0.0.0 is divided into two networks, each network has 8388608 total IP addresses and
8388606 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and
the broadcast id).
Class A - Two Bit Subnetting
If we include two bits from the host part to the network part, the subnet mask is changed into
255.192.0.0. The two bits added to network part can have four possible values in second octet, 00, 01,
10, and 11.
00001010.00 | 000000.00000000.00000000
11111111.11 | 000000.00000000.00000000
That means, we can get four networks if we do a two bit subnetting. The subnet mask for two bit
subnetting is 255.192.0.0.

SN No Description

Binaries

Decimal
1
Network Address 00001010.00000000.00000000.00000000 10.0.0.0
First IP Address 00001010.00000000.00000000.00000001 10.0.0.1
Last IP Address 00001010.00111111.11111111.11111110 10.63.255.254
Broadcast Address 00001010.00111111.11111111.11111111 10.63.255.255
2
Network Address 00001010.01000000.00000000.00000000 10.64.0.0
First IP Address 00001010.01000000.00000000.00000001 10.64.0.1
Last IP Address 00001010.01111111.11111111.11111110 10.127.255.254
Broadcast Address 00001010.01111111.11111111.11111110 10.127.255.255
3
Network Address 00001010.10000000.00000000.00000000 10.128.0.0
First IP Address 00001010.10000000.00000000.00000001 10.128.0.1
Last IP Address 00001010.10111111.11111111.11111110 10.191.255.254
Broadcast Address 00001010.10111111.11111111.11111111 10.191.255.255
4
Network Address 00001010.11000000.00000000.00000000 10.192.0.0
First IP Address 00001010.11000000.00000000.00000001 10.192.0.1
Last IP Address 00001010.11111111.11111111.11111110 10.255.255.254
Broadcast Address 00001010.11111111.11111111.11111111 10.255.255.255
The network 10.0.0.0 is divided into four networks, each network has 4194304 total IP addresses and
4194302 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and
the broadcast id).
Class A - 3 Bit Subnetting
If we include three bits from the host part to the network part, the subnet mask is changed into
255.224.0.0 The three bits added to network part can have eight possible values in the second octet and
that are 000, 001, 010, and 011, 100, 101, 110 and 111.
00001010.000 | 00000.00000000.00000000
11111111.111 | 00000.00000000.00000000
That means, we can get eight networks if we do a three bit subnetting and the subnet mask will be
255.224.0.0.

SN No Description

Binaries

Decimal
1
Network Address 00001010.00000000.00000000.00000000 10.0.0.0
First IP Address 00001010.00000000.00000000.00000001 10.0.0.1
Last IP Address 00001010.00011111.11111111.11111110 10.31.255.254
Broadcast Address 00001010.00011111.11111111.11111111 10.31.255.255
2
Network Address 00001010.00100000.00000000.00000000 10.32.0.0
First IP Address 00001010.00100000.00000000.00000001 10.32.0.1
Last IP Address 00001010.00111111.11111111.11111110 10.63.255.254
Broadcast Address 00001010.00111111.11111111.11111111 10.63.255.255
3 Network Address 00001010.01000000.00000000.00000000 10.64.0.0
First IP Address 00001010.01000000.00000000.00000001 10.64.0.1
Last IP Address 00001010.01011111.11111111.11111110 10.95.255.254
Broadcast Address 00001010.01011111.11111111.11111111 10.95.255.255
4
Network Address 00001010.01100000.00000000.00000000 10.96.0.0
First IP Address 00001010.01100000.00000000.00000001 10.96.0.1
Last IP Address 00001010.01111111.11111111.11111110 10.127.255.254
Broadcast Address 00001010.01111111.11111111.11111111 10.127.255.255
5
Network Address 00001010.10000000.00000000.00000000 10.128.0.0
First IP Address 00001010.10000000.00000000.00000001 10.128.0.1
Last IP Address 00001010.10011111.11111111.11111110 10.159.255.254
Broadcast Address 00001010.10011111.11111111.11111111 10.159.255.255
6
Network Address 00001010.10100000.00000000.00000000 10.160.0.0
First IP Address 00001010.10100000.00000000.00000001 10.160.0.1
Last IP Address 00001010.10111111.11111111.11111110 10.191.255.254
Broadcast Address 00001010.10111111.11111111.11111111 10.191.255.255
7
Network Address 00001010.11000000.00000000.00000000 10.192.0.0
First IP Address 00001010.11000000.00000000.00000001 10.192.0.1
Last IP Address 00001010.11011111.11111111.11111110 10.223.255.254
Broadcast Address 00001010.11011111.11111111.11111111 10.223.255.255
8
Network Address 00001010.11100000.00000000.00000000 10.224.0.0
First IP Address 00001010.11100000.00000000.00000001 10.224.0.1
Last IP Address 00001010.11111111.11111111.11111110 10.255.255.254
Broadcast Address 00001010.11111111.11111111.11111111 10.255.255.255
The network 10.0.0.0 is divided into eight networks, each network has 2097152 total IP addresses and
2097150 usable IP addresses (two IP addresses are used in each subnet to represent the netwok id and
the broadcast id).
In this Class A Subnetting Tutorial - Part 1, you have learned how to subnet a Class A network. Click
"Next" to view Class A Subnetting Tutorial - Part 2.

Variable Length Subnet Masking (VLSM)
Variable Length Subnet Masking (VLSM) is a way of further subnetting a subnet. Using Variable Length
Subnet Masking (VLSM) we can allocate IP addresses to the subnets by the exact need. Variable Length
Subnet Masking (VLSM) allows us to use more than one subnet mask within the same network address
space. If we recollect from the previous lessons, we can divide a network only into subnets with equal
number of IP addresses. Variable Length Subnet Masking (VLSM) allows to create subnets from a single
network with unequal number of IP addresses.
Example: We want to divide 192.168.10.0, which is a Class C network, into four networks, each with
unequal number of IP address requirements as shown below.
Subnet A : 126 IP Addresses.
Subnet B : 62 IP Addresses.
Subnet C : 30 IP Addresses.
Subnet D : 30 IP Addresses.
This type of division is not possible as described in previous lessons, since it divide the network equally,
but is possible with Variable Length Subnet Masking (VLSM).
Original Network (Network to be sub-netted) 192.168.10.0/24
Variable Length Subnet Masking (VLSM) - First Division
Divide the two networks equally with 128 IP Addresses (126 usable IP addresses) in each network using
255.255.255.128 subnet mask (192.168.10.0/25).
We will get two subnets each with 128 IP Addresses (126 usable IP addresses).
1) 192.168.10.0/25, which can be represented in binaries as below.
11000000.10101000.00001010.0 | 0000000
11111111.11111111.11111111.1 | 0000000

2) 192.168.10.128/25, which can be represented in binaries as below.
11000000.10101000.00001010.1 | 0000000
11111111.11111111.11111111.1 | 0000000
Variable Length Subnet Masking (VLSM)- Second Division
Divide second subnet (192.168.10.128/25) we got from the first division again into two Networks, each
with 64 IP Addresses (62 usable IP Addresses) using 255.255.255.192 subnet mask.
We will get two subnets each with 64 IP Addresses (62 usable IP Addresses).
1) 192.168.10.128/26, which can be represented in binaries as below.
11000000.10101000.00001010.1 | 0 | 000000
11111111.11111111.11111111.1 | 1 | 000000

2) 192.168.10.192/26
11000000.10101000.00001010.1 | 1 | 000000
11111111.11111111.11111111.1 | 1 | 000000
Variable Length Subnet Masking (VLSM) - Third Division
Divide 192.168.10.192/26 Network again into two Networks, each with 32 IP Addresses (30 usable IP
addresses) using 255.255.255.224 subnet mask
We will get two subnets each with 32 IP Addresse (30 usable IP addresses).
1) 192.168.10.192/27, which can be represented in binaries as below.
11000000.10101000.00001010.11 | 0 | 00000
11111111.11111111.11111111.11 | 1 | 00000


2) 192.168.10.224/27, which can be represented in binaries as below.
11000000.10101000.00001010.11 | 1 | 00000
11111111.11111111.11111111.11 | 1 | 00000
Now we have split the 192.168.10.0/24 network into four subnets using Variable Length Subnet Masking
(VLSM), with unequal number of IP addresses as shown below. Also note that when you divide a
network using Variable Length Subnet Masking (VLSM), the subnet masks are also different.
1) 192.168.10.0 - 255.255.255.128 (126 (128-2) usable IP Addresses)
2) 192.168.10.128 - 255.255.255.192 (62 (64-2) usable IP Addresses)
3) 192.168.10.192 - 255.255.255.224 (30 (32-2) usable IP Addresses)
4) 192.168.10.224 - 255.255.255.224 (30 (32-2) usable IP Addresses)
You have learned the term Variable Length Subnet Masking (VLSM) and how can we use Variable Length
Subnet Masking (VLSM) for subnetting a subnet. Click "Next" to continue.

IP Supernetting
In this lesson you will learn what is Supernetting and how to supernet two different networks.
Supernetting is the method for combing two or more contiguous network address spaces to simulate a
single, larger, address space. You may remember, in Subnetting we are adding the bits from the host
part to the network part. But in Supernetting we do the reverse. Here in supernetting we add bits from
the network part to the host part. To supernet two contiguous networks is simple. Just convert the
networks in to bineries, compare the bits of the two networks. Till where you have the similiar bit
pattern, use a subnet mask bit of "1", and after that "0". Use the altered subnet mask for two networks.
Thats it!
For example, you may want to supernet the networks 192.168.10.0 and 192.168.11.0 to make a single,
large network. Following two lines are the conversions of the above network addresses to binaries and
the last line is the new subnet mask.

11000000.10101000.0000101 | 0.00000000
11000000.10101000.0000101 | 1.00000000
11111111.11111111.1111111 | 0.00000000
The changed subnet mask is 255.255.254.0 can be used to supernet 192.168.10.0 and 192.168.11.0. The
concept of supernetting is used in routing protocols for "route summarization".
In this Supernetting lesson, you have learned what is supernetting and how to supernet two different
networks. Click "Next" to continue.
Address Resolution Protocol (ARP)

Address Resolution Protocol (ARP) is one of the major protocol in the TCP/IP suit and the purpose of
Address Resolution Protocol (ARP) is to resolve an IP address (32 bit Logical Address) to the physical
address (48 bit MAC Address). Network Applications at the Application Layer use IP address to
communicate with another device. But at the Datalink layer, the addressing is MAC address (48 bit
Physical Address), and this address is burned into the network card permanently. You can view your
network cards hardware address by typing the command "ipconfig /all" at the command prompt
(Without double quotes using Windows Operating Systems).
The purpose of Address Resolution Protocol (ARP) is to find out the MAC address of a device in your
Local Area Network (LAN), for the corresponding IP address, which network application is trying to
communicate.
Address Resolution Protocol (ARP) Message Format

Address Resolution Protocol (ARP) Message Format
Following are the fields in the Address Resolution Protocol (ARP) Message Format.
Hardware Type: Hardware Type field in the Address Resolution Protocol (ARP) Message specifies the
type of hardware used for the local network transmitting the Address Resolution Protocol (ARP)
message. The value for Ethernet is 1. The size of this field is 2 bytes.
Protocol Type: Each protocol is assigned a number used in this field. IPv4 is 2048 (0x0800 in Hexa).
Hardware Address Length: Hardware Address Length in the Address Resolution Protocol (ARP) Message
is length in bytes of a hardware (MAC) address. Ethernet addresses are 6 bytes long.
Protocol Address Length: Length in bytes of a logical address. IPv4 addresses are 4 bytes long.
Opcode: Opcode field in the Address Resolution Protocol (ARP) Message specifies the nature of the ARP
message. 1 for ARP request and 2 for ARP reply.
Sender Hardware Address: Layer 2 (MAC Address) address of the device sending the message.
Sender Protocol Address: The protocol address (IP address) of the device sending the message
Target Hardware Address: Hardware address of the intended receiver. This field is ignored in requests.
Target Protocol Address: Protocol address (IP Address) of the intended receiver.
Working of Address Resolution Protocol (ARP)
Step 1: When a source device want to communicate with another device, source device checks its
Address Resolution Protocol (ARP) cache to find it already has a resolved MAC address of the destination
device. If it is there, it will use that address for communication. To view your Local Address Resolution
Protocol (ARP) cache, Open Command Prompt and type command "arp -a" (Without double quotes
using Windows Operating Systems).
Step 2: If ARP resolution is not there in local cache, the source machine will generate an Address
Resolution Protocol (ARP) request message, it puts its own data link layer address as the Sender
Hardware Address and its own IP address as the Sender Protocol Address. It fills the destination IP
address as the Target Protocol Address. The Target Hardware Address will be left blank, since the
machine is trying to find that.
Step 3: The source broadcast the Address Resolution Protocol (ARP) request message to the local
network.
Step 4: The message is received by each device on the LAN since it is a broadcast. Each device compare
the Target Protocol Address (IP Address of the machine to which the source is trying to communicate)
with its own Protocol Address (IP Address). Those who do not match will drop the packet without any
action.
Step 5: When the targeted device checks the Target Protocol Address, it will find a match and will
generate an Address Resolution Protocol (ARP) reply message. It takes the Sender Hardware Address
and the Sender Protocol Address fields from the Address Resolution Protocol (ARP) request message
and uses these values for the Targeted Hardware Address and Targeted Protocol Address of the reply
message.
Step 6: The destination device will update its Address Resolution Protocol (ARP) cache, since it need to
contact the sender machine soon.
Step 7: Destination device send the Address Resolution Protocol (ARP) reply message and it will not be a
broadcast, but a unicast.
Step 8: The source machine will process the Address Resolution Protocol (ARP) reply from destination, it
store the Sender Hardware Address as the layer 2 address of the destination.
Step 9: The source machine will update its Address Resolution Protocol (ARP) cache with the Sender
Hardware Address and Sender Protocol Address it received from the Address Resolution Protocol (ARP)
reply message.
You have learned Address Resolution Protocol (ARP), Address Resolution Protocol (ARP) Message
Format and how Address Resolution Protocol (ARP) operate in a LAN. Click "Next" to continue.

You might also like