Anda di halaman 1dari 65

NIIT Coordinator Guide Computer Networks 1

CHAPTER-SPECI FI C INPUTS
Chapter One
Objectives
In this chapter, the students have learned to:
Define computer networks
Discuss the evolution of computer networks
Focus Areas
This chapter explains the evolution of computer networks. You can start the session by asking
the students that what do they understand of the Internet. Then tell them that the Internet is a
network of computers. ow tell them that earlier computers were stand!alone units. "ut
gradually it was re#uired to share resources and exchange information amongst the computers.
This led to the evolution of computer networks.
$fter discussing the evolution of network, explain the topics given in the $dditional Inputs
section
Additiona Inputs
The following section provides some extra inputs on the important topics covered in the %&:
T!pes o" Net#or$
The most common types of network are as follows:
%oca Area Net#or$ &%AN': '$ consists of a group of computers and associated devices,
such as printers, modem, fax machine, and scanners. It provides networking capability to a
group of computers that are located within a single physical location such as a building. You
can connect '$ to ($ and )$ using routers. The data transmission speeds normally
ranges from * to *++ megabits per second.
(etropoitan Area Net#or$ &(AN': ($ connects computers over a large geographical
area, such as a city or a state. The si,e of ($ is intermediate between '$ and )$. In
addition, the data transmission speeds ranges between the speeds of '$ and )$.
)ide Area Net#or$ &)AN': )$ can spread over a large physical distance, such as the
Internet that spans across countries. You can use routers to connect a '$ to )$.
ormally, the transmission rates are - (bps, ./ (bps, /0 (bps, *00 (bps, 1-0 (bps.
2rgani,ations that support )$ and use the Internet 3rotocol are called %3 4etwork
%ervice 3roviders5. %3 forms the core of the Internet.
Net#or$ Con"i*urations
The network configurations can be categori,ed as follows:
Peer-to-peer net#or$: You can design a peer!to!peer network if you have a small network,
which does not re#uire security. $ peer!to! peer network is also called as a workgroup. In a
peer!to!peer network, the computers communicate with each other directly. This network
type does not have a server, which manages the resources on the network. $ single device
such as a hub can centrally connect and control all the nodes on the network. 6ach
computer on the network can share files and peripherals that are connected to the network.
3eer!to!peer network is a low!cost solution. 7owever, if you have to share large and
complex files, such as databases or graphics, then the peer!to!peer network is not an
efficient solution. In this situation, client!server network will be efficient.
Cient-server net#or$: If your network re#uirements include more than ten nodes, and
work with large files such as databases, then you need to design a client!server network.
The computers in a client!server network are connected to a server. The server enables
NIIT Coordinator Guide Computer Networks 2
you to manage data, share information, and secure the network. You can set up a client!
server network to support more than thousand user accounts, which are managed by
administrators. To set up a client!server network, you need more resources than a peer!to!
peer network.
Co+ponents o" Net#or$ In"rastructure
The components of a network infrastructure are as follows:
Intranet: Intranet can be a corporate '$ or ($. $ private network enables distribution of
information within an organi,ation. '$ offers services such as access to databases and
software distribution. In addition to file and printing services, the intranet uses applications
that are associated with the Internet such as, )eb "rowsers, )eb pages, 8T3 48ile
Transfer 3rotocols5 sites, and mailing lists that can be accessed only by the users in the
organi,ation. Intranets are set up to provide #uick access to employees within an
organi,ation.
The basic protocol that is used for connectivity in intranet is T93:I3. It is a set of networking
protocols that are based on industry standards. The scalability of the protocol includes all
si,es of networks.
E,tranet: 6xtranet refers to an intranet that is partially accessible to authori,ed users out
side an organi,ation. $ collaborative network uses Internet 3rotocol and the public
telecommunication systems to securely access resources from the organi,ation. It uses
Internet technology to connect the business of an organi,ation to suppliers, customers, or
other business organi,ations.
$n extranet can be accessed only if you have a username and a password. 3ermissions
are used to set various levels of accessibility for the outsiders. "y doing so, you can provide
limited access to information on your intranet.
Internet: Internet is a public and global communication network that can be used to access
a )eb site, upload files in the 8T3, or use an e!mail message. You can connect to Internet
using the following two methods:
Dial!up connection can be used to connect to an I%3. %mall organi,ations or Internet
users at home normally use this method.
$ dedicated line such as T* can be used to connect to '$. '$ can be configured to
connect to Internet. This method is used in large organi,ations that have their own node
on the Internet or connect to an I%3.
FA-
./ )hat is the use of sharing computers over the network;
Ans0
%haring computers over the network enable you to exchange information and resources among
computers and their users. Information exchange can be electronic mail or file transfer.
<esource sharing can be usage of peripheral device, such as printer, connected to other
computers.
1/ )hat is a workgroup;
Ans0
$ group of users who share information in a multi!user environment is known as a workgroup.
2/ )hat is the ))); )ho invented it;
Ans0
)orld )ide )eb or the ))) is a bank of information that is available over the network. Tim
"erners!'ee invented it in *=>=.
NIIT Coordinator Guide Computer Networks 3
3/ )hat is a )eb browser;
Ans0
)eb browser is a software for viewing websites. Internet 6xplorer and etscape avigator are
some popular )eb browsers.
4/ )hat is a modem;
Ans0
$ modem 4(2dulate D6modulate5 is a device used to connect to the Internet through
telephone lines.
NIIT Coordinator Guide Computer Networks 4
Chapter T#o
Objectives
In this chapter, the students have learned to:
Identify the layers of the 2%I protocol architecture
Identify the layers of the T93:I3 protocol architecture
9ompare 2%I and T93:I3
Discuss about the organi,ations that standardi,ed network protocols
Focus Areas
This chapter explains protocol architecture. You can start the session by telling the students
that rules are defined for many activities. 8or example, there are rules to conduct business,
which should be followed to get effective results. %imilarly, there is a set of rules that
coordinates the exchange of information over the network. Then tell the students that these
rules are called protocols.
%tress upon the 2%I protocol architecture. 6xplain in detail the function of each layer.
%tress upon the fact that T93:I3 is a suite of protocols. 6xplain the functionality of each layer in
T93:I3. <efer to the $dditional Inputs section while explaining T93:I3.
$fter explaining the two protocol architectures, ask the students to compare the two.
Additiona Inputs
The following section provides some extra inputs on the important topics covered in the %&:
TCP5IP
T93:I3 is a connection!based protocol that provides a reliable flow of data between two
computers. It is a suite of protocols and is based on industry standards. T93:I3 is a routable
protocol capable of switching packets of data between subnets by using the address of the
destination that is contained in the packet.
Features o" TCP5IP
The features of T93:I3 are as follows:
T93:I3 supports large window support. If large number of data packets is broadcasted and
the session is lengthy, then the si,e of the window is dynamically changed. This increases
the bandwidth and enables more data packets to be broadcasted in the network at one
time.
$ T93:I3 host can notify and re#uest the sender if any data packets are missing or
corrupted during the broadcast. This enables the sender to send only the corrupted or
missing data packets to the receiver again.
The time taken for a round!trip communication between the sender and receiver is called
<TT 4<ound Trip Time5. 6stimating <TT enables you to estimate the packet transit times
and ad?ust for optimum retransmission time for packets.
Advanta*es o" TCP5IP
The advantages offered by T93:I3 are as follows:
It connects disparate hosts. In addition, T93:I3 is a routable protocol, which can be
connected to different networks by using gateways.
It provides a reliable, robust, and scalable cross!platform client!server framework.
It can establish a virtual private network 4@35 or extranet with Internet for providing remote
access.
NIIT Coordinator Guide Computer Networks 5
Utiities o" TCP5IP
The utilities of T93:I3 are as follows:
6ata trans"er utiities: T93:I3 provides support for data transfer protocols such as, 8T3
48ile Transfer 3rotocol5, 7TT3 47ypertext Transfer 3rotocol5, and 9I8% 49ommon Internet
8ile %ystem5.
Printin* utiities: 3rinting can be done directly to I3!based printers.
6ia*nostic utiities: T93:I3 utilities such as, ipconfig, ping, and slookup can be used for
diagnosing T39:I3 related problems.
TCP5IP Protoco Architecture
The four layers of the T93:I3 protocol architecture are as follows:
Net#or$ Inter"ace %a!er: This layer encompasses the data link layer and physical layer of
the 2%I model. This layer is responsible for placing T93:I3 packets in the network and for
sending T93:I3 packets. This layer includes '$ technologies such as 6thernet, and
Token <ing and )$ technologies such as 8rame <elay.
Net#or$ %a!er: This layer encompasses the network layer of the 2%I model. The Internet
layer performs addressing, packaging, and routing. The five protocols that are implemented
in this layer are:
Internet Protoco &IP': The I3 protocol routes the data packets from the source to the
destination.
Address Resoution Protoco &ARP': The $<3 protocol determines the hardware
address of the hosts.
Reverse Address Resoution Protoco &RARP': The <$<3 protocol determines the
I3 address of disk!less host systems.
Internet Contro (essa*e Protoco Resoution &IC(P': The I9(3 protocol sends
error messages if there is any T93:I3 related problems.
Internet 7roup (ana*e+ent Protoco &I7(P': The I&(3 protocol sends information
to the routers regarding the availability of the multicast groups.
Transport %a!er: This layer encompasses the transport layer of the 2%I model. T93
provides connection!oriented reliable communications for applications that typically transfer
large amounts of data at one time. This is very useful if an acknowledgement for data
received is re#uired. The protocols of the transport layer are T93 and AD3 4Aser
Datagram 3rotocol5. T93 provides a connection!oriented service whereas AD3 provides a
connectionless service.
Appication %a!er: This layer encompasses the application layer, presentation layer, and
session layer of the 2%I model. This layer is the top most layer in the T93:I3 model. (ost
of the T93:I3 utilities such as 7TT3, 8T3 and Telnet run at the $pplication level.
Chapter T#o -uestions
Part .
./ 2%I is a protocol model standardi,ed by the BBBBBBBBBBB
Ans/
I%2
1/ 2%I has BBBBBBBB layers.
Ans/
%even
NIIT Coordinator Guide Computer Networks 6
2/ The BBBBBBBB layer is responsible for delivering data frames from one station to next without
error.
Ans/
Data 'ink
3/ The BBBBBBBBBB layer uses the services provided by the network layer.
Ans/
Transport
4/ $t the receiving end, the data is passed to transport layer from BBBBBBBB.
Ans/
etwork
8/ 6ach layer adds BBBBBBBB to the data it received from the upper layer.
Ans/
Its own information
9/ T93:I3 has BBBBBBBBBBB layers.
Ans/
8ive
:/ The layers not present in T93:I3 model are BBBBBBBBBB and BBBBBBBBBBB.
Ans/
%ession and 3resentation
;/ $t transport layer the protocols defined by T93:I3 model are BBBBBBBBB and BBBBBBBBB.
Ans/
AD3 and T93
.</ <89 stands for BBBBBBBBBBBBBB.
Ans/
<e#uest for 9omments
Part 1
./ "riefly explain what is meant by protocol and protocol architecture.
Ans/
$ protocol is software that resides either in a computerCs memory or in the memory of a
transmission device, such as a network interface card. 3rotocols govern format, timing,
se#uencing, and error control. $ protocol is used for communication between entities in
different systems. 8or two entities to communicate successfully, they must speak the same
language. )hat is communicated, how it is communicated, and when it is communicated must
conform to some mutually acceptable convention or protocol between the entities involved. The
following are the key elements of a protocol:
NIIT Coordinator Guide Computer Networks 7
S!nta,: Includes such things as data format and signal levels
Se+antics: Includes control information for coordination and error handling
Ti+in*: Includes speed matching and se#uencing
3rotocol architecture is a structured set of modules that implements the communication function
between computers.
1/ "riefly explain the 2%I architecture.
Ans/
2pen %ystem Interconnection 42%I5 protocol architecture, defined by the International
Standards Organization (ISO), includes a set of protocols to define and standardi,e the data
communication process. It defines how data communications take place in the real world and
what protocols should be used at each layer.
The following are the salient features of 2%I protocol architecture:
%a!ered architecture: The 2%I model is composed of seven ordered layers: 3hysical
4layer *5, Data link 4layer -5, etwork 4layer .5, Transport 4layer /5, %ession 4layer 05,
3resentation 4layer 15, and $pplication 4layer D5. )ithin a single computer system, each
layer calls upon the services of the layer ?ust below it. 8or example, etwork layer 4layer .5
uses the services provided by the Data link layer 4layer -5 and it provides services to
Transport layer 4'ayer /5.
Peer-to-peer process: The processes on each system that communicate at a given layer
are called peer!to!peer processes. 9ommunication between machines is therefore a peer!
to!peer processes communicating to each other using protocols appropriate to the given
layer. $t the physical layer, communication is direct. 7owever, at the higher layers,
communication must move down through the layers on Device $, over to the device ", and
then back up through the layers. 6ach layer in the sending device adds its own information
to the message it receives from the layer ?ust above it and passes the whole package to the
layer ?ust below it. 7eaders are added to the data at layers 1,0,/,. and -. Trailers are
usually added only at layers -.
%a!er or*ani=ation: The seven layers can be thought of as belonging to three subgroups.
The layers *, -, and ., called the 3hysical, Data 'ink, and etwork layers respectively, are
the network support layers. They deal with the physical aspects of moving data from one
device to another device. The layers 0, 1, and D, called %ession, 3resentation, $pplication
respectively, are the user support layers. They allow interoperability among unrelated
software systems. The layer / called the Transport layer links the two subgroups and
ensures that the upper layers can use the data that the lower layers have transmitted. The
upper 2%I layers are implemented in software. The lower 2%I layers are a combination of
hardware and software, except for the physical layer, which is mostly hardware.
2/ )hat are the functions of the network layer; 6xplain.
Ans/
The network layer is responsible for the source!to!destination delivery of a packet possibly
across multiple networks 4links5. )hereas data link layer oversees the delivery of the packet
between two systems on the same network 4link5, the network layer ensures that each packet
gets from point of origin to its final destination. If the two systems are connected to the same
link then there would be no re#uirement for the network layer. 7owever if the two systems are
attached to different networks with connecting devices 4known as routers5 between the
networks, then this layer plays a crucial role in getting the packet from source to destination.
The etwork layer provides for the transfer of data in the form of packets across the
communication networks. It establishes, maintains, and terminates logical and physical
connections across multiple interconnected networks. $ key aspect of this transfer is the routing
of packets from the source to the destination machine typically traversing a number of
transmission links and network nodes where routing is carried out. <outing is the process by
which a path is selected out of many available paths to the destination so that data packet
NIIT Coordinator Guide Computer Networks 8
reaches the destination fast, efficiently, reliably as re#uired. This function makes the network
most complex layer in the reference model.
NIIT Coordinator Guide Computer Networks 9
3/ 6xplain the functionalities and the services offered by the transport layer of the 2%I model.
Ans/
The transport layer is designed to provide the Etransparent transfer of data from a source end
open system to a destination end open system,F according to the 2%I <eference (odel. The
transport layer establishes, maintains, and terminates communications links between two
machines.
The Transport layer ensures data is successfully sent and received between two end systems.
If data is sent incorrectly, this layer has the responsibility to ask for retransmission of the data.
$lso it ensures data are passed onto the upper layers in the same order in which they were
sent. %pecifically, it provides a reliable, network!independent message!interchange service to
the top three application!oriented layers. This layer acts as an interface between the bottom
and top three layers. "y providing the session layer with a reliable message transfer service, it
hides the detailed operation of the underlying network from the session layer.
%ome of the important services that are performed by the transport layer in order to meet the
above re#uirements are:
Service-point addressin*: 9omputers often run several programs at the same time. 8or
this reason, source!to!destination delivery means delivery not only from one computer to
the next but also from a specific process 4a running program5 to a specific process at the
receiving end. The transport layer header must therefore include a type of address called
service!point address 4or port address5. The network layer gets each packet to the correct
computerG the transport layer gets the entire message to the correct process on that
computer.
Se*+entation and reasse+b!: If the message sent by the application program at the
transmitting end is huge, there would be problem in moving that from the transmitting
system to the receiving system as many of the physical network underneath would impose
restriction on the maximum si,e of the data that can be transferred at one time. In order to
over!come this restriction, transport layer splits the incoming message into segments 4each
of transferable si,e5 at the transmitting system and reassembles them at the receiving end.
$part from the above, other tasks performed by the transport layer are 9onnection control, 8low
control, and 6rror control.
4/ )hat are the functionalities of the session layer of 2%I model;
Ans/
The session layer organi,es and synchroni,es the exchange of data between application
processes. It works with the application layer to provide simple data sets called synchroni,ation
points that let an application know how the transmission and reception of data are progressing.
In simplified terms, the session layer can be thought of as a timing and flow control layer.
The session layer is the network dialog controller. It establishes, maintains, and synchroni,es
the interaction between communicating systems. %pecifically its responsibilities include:
6iao* contro: This allows two systems to enter into a dialog. It allows the communication
between two processes to take place either in half!duplex 4one way at a time5 or full duplex
4both ways simultaneously5.
S!nchroni=ation: The session layer allows a process to add checkpoints 4synchroni,ation
points5 into a stream of data. 8or example, if a system is sending a file of -,+++ pages, it is
advisable to insert checkpoints after every *++ pages to ensure that each *++ page is
received and acknowledged independently. The reception of acknowledgement for these
checkpoints ensures to the sending system that data up to the corresponding checkpoint is
received properly by the receiving end system.
$n example where session layer plays a crucial role is the file transfer application when used to
transfer huge files 4downloading of huge files5. )hen huge files are transferred across the
network, if the network connection speed is not high, it would take very long time for transfer.
There is every chance that network connection would break during this transfer and the user is
re#uired to start a fresh to do the file transfer, and there is no guarantee that the same would
NIIT Coordinator Guide Computer Networks 1
not repeat, making it sometime practically impossible to download very huge files. If the
checkpoints are used by the file transfer application then, this problem can be sorted out easily.
%uppose the connection fails during the *+./th page, then after reconnecting we can proceed
from the last checkpoint, i.e. from page *++*. During retransmission time the only pages that
are resent for the second time are *++* to *+./ as pages till *+++ are received and
acknowledged. If checkpoints were not there, we have to start from page * every time we try to
reconnect.
8/ )hat are the layers present in T93:I3 model; 6xplain the layer, which provides the transport
functionalities along with the protocols defined for that layer.
Ans/
The T93:I3 model is made up of five layers:
3hysical layer
Data 'ink layer
etwork layer 4I35
Transport layer 4AD3 and T935
$pplication layer
The layer that provides the transport functionalities along with the protocols defined for that
layer is etwork layer. The network layer is concerned with access to and routing data across a
network for two end systems attached to multiple interconnected networks. The Internet
3rotocol 4I35 is used at this layer to provide the routing function across multiple networks. This
protocol is implemented not only in the end systems but also in routers. $ router is a processor
that connects two or more networks and whose primary function is to relay data from one
network to the other on its route from the source to the destination end system.
The Internet 3rotocol 4I35 is the transmission mechanism used by the T93:I3 protocols. It is an
unreliable and connectionless datagram protocol H i.e. it provides a best!effort delivery service.
The term best!effort means that I3 provides no error checking or tracking. I3 assumes the
unreliability of the underlying layers and does its best to get the get a transmission through to its
destination, but with no guarantees. I3 transports data in packets called datagrams each of
which is transported separately. Datagram can travel through different routes and can arrive out
of se#uence or be duplicated. I3 does not keep track of routes and has no facility to reorgani,e
datagrams once they arrive at their destination. These limitations should not be considered as
the weakness of the protocol stack. It is intentional, to get the maximum efficiency. The purpose
at this layer is to provide the bare!bone transmission functions that free the user to add only
those facilities necessary for a given application.
$t this network layer T93:I3 supports the Internetworking Protocol (IP). I3, in turn, contains four
supporting protocols: $<3, <$<3, I9(3 and I&(3.
9/ (ake a brief comparison between 2%I and T93:I3 models.
Ans/
The 2%I architecture is a de!?ure 4according to law5 standard. The focus in the 2%I world has
always been more on the standard than the implementation of the standard. The 2%I model is
used as a reference model to make comparisons. The 2%I reference model was devised before
the protocols were implemented. The ordering means that the model was not biased toward
one particular set of protocols, which made it #uite general.
The T93:I3 architecture is a de!facto 4in reality5 standard. )ith the T93:I3 model, the protocols
came first, and the model was ?ust a description of the existing protocols. The T93:I3 model is
not used to describe other models.
NIIT Coordinator Guide Computer Networks 11
FA-
./ )hat is the difference between network protocol and protocol architecture;
Ans0
$ network protocol is a set of rules for communication between computers. 3rotocol
architecture is a structured set of modules that implements the communication function
between computers.
1/ )hat does 2%I stands for;
Ans0
2%I stands for 2pen %ystem Interconnection.
2/ )hat is 2%I protocol architecture;
Ans0
2%I protocol architecture, defined by the International %tandards 2rgani,ation 4I%25, includes a
set of rules that are used to define and standardi,e the data communication process. 2%I
protocol architecture defines how data communications take place in the real world and what
protocols should be used at each layer.
3/ 7ow many layers are present in the 2%I protocol architecture;
Ans0
The 2%I model is composed of seven ordered layers: 3hysical 4layer *5, Data link 4layer -5,
etwork 4layer .5, Transport 4layer /5, %ession 4layer 05, 3resentation 4layer 15, and $pplication
4layer D5.
4/ )hat is T93:I3 protocol architecture; 7ow many layers are present in the T93:I3 protocol
architecture;
Ans0
T93:I3 is the most widely used architecture and is a result of protocol research and
development work conducted on the experimental network, $<3$6T. The T93:I3 model is
made up of five layers: 3hysical layer, Data link layer, etwork layer, Transport layer, and
$pplication layer. The first four layers provide physical standards, network interface,
internetworking and transport functions that correspond to the first four layers of the 2%I model.
7owever, the three top layers of the 2%I model are represented in the T93:I3 by a single layer
called $pplication layer.
8/ 6xplain the data flow from device $ to device " through different 2%I layers.
Ans0
The se#uence of data transfer from device $ to device " through different 2%I layers is:
$pplication layer of device $ 3resentation layer of device $ %ession layer of device
$ Transport layer of device $etwork layer of device $ Data link layer of device $
3hysical layer of device $ 3hysical layer of device " Data link layer of device "
etwork layer of device " Transport layer of device " %ession layer of device "
3resentation layer of device " $pplication layer of device ".
NIIT Coordinator Guide Computer Networks 12
The preceding concept is displayed in the following figure:
Data Flow from Device A to Device B throgh Different OSI !a"ers
9/ )hat is the difference between physical layer and data link layer;
Ans0
The physical layer is the lowest layer of the 2%I model and deals with the Fmechanical,
electrical, functional, and procedural meansF re#uired for transmission of data. The physical
layer is responsible for data transmission from one host to another. The data link layer provides
for the control of the physical layer, and detects and corrects errors that can occur during
transmission. The data link layer adds header and trailer at the transmitting end and removes
the same at the receiving end.
:/ )hich layer is responsible for encoding, encrypting, and compressing data;
Ans0
The presentation layer is responsible for encoding, encrypting, and compressing data.
NIIT Coordinator Guide Computer Networks 13
;/ )hat is the difference between 2%I model and T93:I3 model;
Ans0
The 2%I model is a de!?ure 4according to law5 standard. The focus in the 2%I world has always
been more on the standard than the implementation of the standard. The 2%I model is used as
a reference model to make comparisons. The 2%I reference model was devised before the
protocols were implemented. The ordering means that the model was not biased toward one
particular set of protocols, which made it #uite general. The T93:I3 model is a de!facto 4in
reality5 standard. )ith the T93:I3 model, the protocols came first, and the model was ?ust a
description of the existing protocols. The T93:I3 model is not used to describe other models.
.</ )hat is the use of the session layer;
Ans0
The session layer organi,es and synchroni,es the exchange of data between application
processes. It works with the application layer to provide simple data sets called s"nchronization
#oints that let an application know how the transmission and reception of data are progressing.
In simplified terms, the session layer can be thought of as a timing and flow control layer.
NIIT Coordinator Guide Computer Networks 14
Chapter Three
Objectives
In this chapter, the students have learned to:
Define addressing techni#ues in T93:I3
Define Internet 3rotocol
Define Internet addressing
Define private networks
Focus Areas
This chapter explains I3 addressing. You can start the session by telling the students that while
re#uesting for some website, they must have seen some numbers separated with dots in the
status bar of the browser. This address is known as the I3 address. Tell the students that each
system on the Internet has a uni#ue I3 address.
You should stress upon the various I3 address classes. 6xplain the three levels of addressing
used in T93:I3, namely 3hysical address, Internetwork 4I35 address, and Transport or 3ort
address. Discuss the ways of determining the class of an address. <efer to I3 addressing in the
$dditional Inputs section.
6xplain the concepts of unicast, multicast, and broadcast addresses. 6xplain the reserved
blocks of address for private networks. Discuss the need for private networks. If time permits,
explain the other topics given in the $dditional Inputs section.
Additiona Inputs
The following section provides some extra inputs on the important topics covered in the %&:
IP Addressin*
$ T93:I3 host is identified by a logical and uni#ue I3 address. It identifies the physical location
of the host in the network and is similar to a street address that identifies a house on a city
block.
The I3 address consists of two parts, netid and hostid:
Netid: The netid is also called network address. The netid identifies all hosts that are
located on the same physical network. $ll the hosts of one physical network are assigned
the same netid to facilitate communication among them. The netid must be uni#ue in the
internetwork.
Hostid: The hostid is also called host address. The hostid identifies a host in the network. $
hostid is uni#ue for every computer in the netid.
Note
$o cannot assign %&' as a netid in the network( )his ID is
reserved for loo#*ack and diagnostic fnctions( In addition, "o
cannot have netid and hostid as &++( )his ID is reserved for IP
*roadcast fnctions(
The I3 address is a .-!bit number that uni#uely identifies a host such as computer, printer, and
router. The I3 address is expressed in a dotted!decimal format and the I3 address consists of
four octets. 6ach octet is separated by a dot. *=*.*1>...-/ is an example of I3 address.
NIIT Coordinator Guide Computer Networks 15
6ach octet can be converted to decimal system using a base *+ numbering system. The
following table lists the I3 address in binary and dotted decimal format:
Binary Format Dotted Decimal Format
%,%,%,%% %,%,%,,, ,,,,,,%%
,,,%%,,,
%-%(%./(0(&1
$ bit that is set to one can be converted to a decimal value. The following graphic illustrates the
conversion of the number *=* to binary digits:
Binar" Octet of %-%2%,%%%%%
The conversion of binary digits to a decimal number is illustrated in the following figure:
3onversion of Binar" Digit to a Decimal 4m*er
Note
$o cannot have all *its within the netid set to ,( All ,5s in the
netid are sed to denote a s#ecific host on the local network(
)he data from these hosts will not *e roted(
Subnets
In a physical network, all the hosts that are bounded by I3 routers share the same I3 traffic.
This is because all the hosts are a part of a single domain. It is not possible to have millions of
hosts in a single broadcast domain. You can divide the network to smaller domains called
subnets. This process is called subnetting. 6ach subnet has a uni#ue subnetted netid. Asing
bits from the hostid portion of the original class!based netid create the subnetted ID.
7owever, if you use more bits than needed, then you can have more subnets and few hosts. If
you use fewer bits than needed, then you can have less subnets and more hosts.
NIIT Coordinator Guide Computer Networks 16
9onsider an example. You are using 9lass " I3 addresses in your network. <outers connect
the different parts of the network. 9lass " can have up to 10,0.1 hosts. The network becomes
saturated with I3 traffic if you have numerous hosts on the network. The following figure
displays the 9lass " network connected to the internetwork through a router:
6oter 3onnecting the 3lass B 4etwork to the Internetwork
The class " network of *-/.*+0.+.+ can be subnetted by utili,ing the first eight host bits for the
new subnetted netid. )hen you subnet the *-/.*+0.+.+, you create separate network segments
called subnets. You specify uni#ue subnet IDs for these subnets. The router present on the
network identifies the subnet ID. Therefore, it can route I3 traffic to the appropriate subnet
instead of forwarding the I3 traffic to the whole network. The following figure displays subnets of
9lass " network connected to the internetwork through a router:
6oter 3onnecting the S*nets of 3lass B 4etwork to the Internetwork
Subnet (as$
$ subnet mask is a .-!bit address that is used for distinguishing the netid from a hostid in the I3
address. In addition, it is used for specifying if the I3 address of a host is located in a local
network or in a remote network.
Note
A defalt s*net mask is s#ecified for )3P7IP networks that do
not have s*nets( Althogh there is a single network, all )3P7IP
hosts re8ire a s*net mask( )he defalt s*net mask de#ends
on the t"#e of class IP addresses sed on the network(
The following table lists the bits used for subnet mask and the dotted decimal notation for each
class I3 address:
Class Binary Format
Dotted
Decimal
Format
3lass A IP
address
%%%%%%%% ,,,,,,,, ,,,,,,,,
,,,,,,,,
&++(,(,(,
3lass B IP
address
%%%%%%%% %%%%%%%% ,,,,,,,,
,,,,,,,,
&++(&++(,(,
3lass 3 IP
address
%%%%%%%% %%%%%%%% %%%%%%%%
,,,,,,,,
&++(&++(&++(
,
NIIT Coordinator Guide Computer Networks 17
AN6in* Process
$Ding is a process that is used by T93:I3 to determine if the destination of the data packet is
to a local network or a remote network. "efore a data packet is sent to the destination, the I3
address of the destination is $Ded with the subnet mask. If the results match, then I3 routes
the packets to the appropriate host. If the results do not match, then the packet is routed to the
I3 router.
To perform the $Ding process, T93:I3 compares each bit in the I3 address of the destination
host to the corresponding bit in the subnet mask. If both the bits are set to one, then the
resulting bit is one. In other cases, the resulting bit is ,ero. The following table lists the resulting
bit after combining two binary bits:
Combining the bits Resulting Bit
% A4D % %
% A4D , ,
, A4D % ,
, A4D , ,
9onsider an example. The network of your organi,ation consists of two subnets, %ubnet $ and
%ubnet ". The T93:I3 host in %ubnet $ needs to send a packet to another T93:I3 host in
%ubnet $. )hen T93:I3 is initiali,ed, the I3 address of the destination is $Ded with the
subnet mask. %ince the subnet mask of the destination is same as that of the source, the
resulting bit is one. Therefore, T93:I3 determines that the packet is destined for the local
network, %ubnet $.
6e"inin* a Subnet (as$
9onsider an example. You have 9lass " I3 addresses in your network. The netid that you have
to use is *D-.*+.+.+. You are re#uired to divide the network into subnets for reducing the
network congestion. You decide to divide the network into five subnets.
To define the subnet mask for each subnet, you need to perform the following steps:
*. 9ount the number of bits that are re#uired for representing the number of physical
segments in binary format. You have five subnets on the network. To represent five in
binary, you re#uire three bits. Therefore, the binary value is +**.
-. In this scenario, you re#uire three bits. Therefore, you configure the first three bits of the
hostid as subnet ID. This would mean that the values for first three bits of the third octet
would be one, as shown in the figure above. The decimal value for ***+++++ is --/.
Therefore, the subnet mask for the above!specified bits is -00.-00.--/.+.
6e"inin* Subnet I6s
9onsider the subnet mask -00.-00.--/.+. The binary value for this subnet mask is ********
******** ***+++++ ++++++++. The bits that were used for defining the subnet mask are the
first three bits of the third octet. "y varying the values of these three bits, you can have the
following list of combinations:
++++++++I+
NIIT Coordinator Guide Computer Networks 18
++*+++++I.-
+*++++++I1/
+**+++++I=1
*+++++++I*->
*+*+++++I*1+
**++++++I*=-
***+++++I--/
The bits that use all +s or all *s cannot be used. This is because all +s are invalid I3 addresses
and with all *s are subnet IDs. $ll +s indicate Jthis network onlyK and all *s match the subnet
mask. ow, convert the bits to decimal for each subnet. You can use this value to define the
range of hostids for a subnet. The following list displays some of the ranges of I3 addressees
that you can have using the -00.-00.--/.+ as the subnet mask:
*D-.*+..-.* to *D-.*+.1..-0/
*D-.*+.1/.* to *D-.*+.=0.-0/
6e"inin* Hostids
The first three bits in the third octet of the hostid are used for defining the subnet. Therefore,
you can calculate the range of hostids by changing the rest five bits to *****. The decimal
value of ++****** is .-.
The third octet in the subnet mask indicates the starting value in the range of the values in the
third octet of the I3 address. The ending value in range of I3 address is one less than the
starting value.
The following table displays the range of hostids possible in a 9lass " network:
Bit values of the
third octet in the
Subnet Mask
Decimal
value
Starting
range value
Ending range
value
,,%,,,,, 0& 9("(0&(% 9("(.0(&+1
,%,,,,,, .1 9("(.1(% 9("(-+(&+1
,%%,,,,, -. 9("(-.(% 9("(%&'(&+1
%,,,,,,, %&/ 9("(%&/(% 9("(%+-(&+1
%,%,,,,, %., 9("(%.,(% 9("(%-%(&+1
%%,,,,,, %-& 9("(%-&(% 9("(&&0(&+1
8or a 9lass " etwork, that uses */ bits for the hostid, you can have *1,.>/ hosts on the
network. The decimal value of ************** 4*/ bits that are used for host ID5 is *1,.>/.
Supernettin*
%upernetting enables you to have multiple I3 networks on the same network interface. This is in
contrast with subnetting in which you have a single I3 network on multiple network interfaces. If
the I3 addresses are contiguous, then you can use a supernet.
NIIT Coordinator Guide Computer Networks 19
In subnetting, you borrow bits from the hostid and give it to the netid. The following figure
illustrates the netid borrowing a bit from the hostid:
4etid Borrowing A Bit from :ostid
In supernetting, you borrow bits from the netid and give it to the hostid. The following figure
illustrates the hostid borrowing a bit from the netid:
:ostid Borrowing A Bit from 4etid
To create a supernet by combining two 9lass 9 networks, you need to have the third octet in
the first I3 address divisible by two. 8or example, the networks *=>./*.*D.+ and *=>./*.*>.+
cannot be combined into a supernet. 7owever, the networks *=>..*.*1.+ and *=>..*.*D.+ can
be combined into a supernet.
Chapter Three -uestions
./ )hat is an I3 address;
Ans/
6ach system on the Internet is recogni,ed by a uni#ue I3 address. It is a .- bit 4/ bytes5 long
number. It uni#uely identifies the host that is connected to the Internet. The Internet $uthority
grants these addresses. If the local network is not connected to the Internet then it is possible to
have I3 address of ones choice. 7owever, there is a subset of addresses available for that
purpose and it is recommended to use those addresses only. It is possible for a host to have
multiple I3 addresses.
$n I3 address has two parts. The one that identifies the network is known as netid. The other
one that identifies the host is known as hostid.
1/ )hat are the different classes of I3 addresses available in I3@/;
Ans/
There are five different I3 classes: $, ", 9, D, and 6. these are designed to cover the needs of
different types of organi,ation.
9lass $
If the first bit is +, then the given address is a class $ address. <emaining portion of the first
byte define the netid. "yte - to / determines the hostid. 9lass $ addresses are designed for
organi,ations that are having huge number of hosts connected to their network.
9lass "
If the first two bits of the I3 address are *+, then the given address is a 9lass " address.
7ere hostid is *1 bits long and the rest */ bits are for the netid. These addresses are
designed for midsi,e organi,ations.
9lass 9
If the first three bits of the I3 address are **+,then the given address is a 9lass 9 address.
The next -* bits define the netid and the remaining > bits determine the hostid. These are
addresses are designed for small organi,ations.
NIIT Coordinator Guide Computer Networks 2
9lass D
This address is meant for multicasting. This does not have netid or hosted. The first four
bits 4***+5 define the class here.
9lass 6
This is a class reserved for special purposes by the Internet authority. The first four bits of
this class are ****. There is no netid or hostid in this class.
2/ )hat is a subnet;
Ans/
$ subnet is one of the networks that is created when a large physical network is divided into
smaller networks.
3/ )hat is a subnet mask; )hy is it necessary;
Ans/
$ subnet mask is a .-!bit mask used to distinguish the network ID from the host ID.
In the process of routing, when a T93:I3 host sends data to another T93:I3 host, the I3 at the
source host determines whether the destination host is local or remote. To determine this, I3
uses the $D operation. I3 $Ds the source I3 address with the source subnet mask and the
destination I3 address with the source subnet mask. If the $Ding results of the source and
destination addresses match, the destination host is local. If they do not match, then the
destination host is remote.
4/ )hat are private networks;
Ans/
Internet authorities have reserved three blocks of address from which an organi,ation can
choose the netid of their choice. These addresses are
9lass $: 4netid5*+.+.+
9lass ": 4netid5*D-.*1 to *D-..*
9lass 9: 4netid5*=-.*1>.+ to *=-.*1>.-00
$ddresses with these netid are private addresses.
8/ )hat is I3 multicasting;
Ans/
)hen a data packet is sent from an individual source to a group of destinations, a multicast
communication takes place. $ multicast address is a 9lass D address. The whole address
defines a multicast group id. The multicast address can never be a source I3 address. It can
only be a destination addresses in an I3 datagram packet.
%ome of the multicast addresses are:
--/.+.+.*: $ll systems on this %A"6T
--/.+.+.D: %T routers
--/.+.*.D: $udio news
FA-
./ )hat are I3 addresses; "riefly explain them.
Ans0
NIIT Coordinator Guide Computer Networks 21
I3 addresses are necessary for universal communication services that are independent of
underlying physical network. $n I3 address is currently a .-!bit 4/ byte5 address, which can
uni#uely identify a host connected to the Internet. o two hosts on the Internet can have the
same I3 address. In addition, I3 addresses are defined such a way so that one can easily
identify the network to which it is connected so that routing becomes easy. 8or example,
*->.**....* is an I3 address.
NIIT Coordinator Guide Computer Networks 22
1/ )hat is a port address;
Ans0
$ port address identifies the correct process 4a running program on the computer5 on the
source and destination host systems to which the data actually corresponds. 8or example, data
sent by the 8T3 client process from system $ should reach the 8T3 server process at the
system ". It should not reach the ($I' server process running on the system ". %o it is not
only crucial to identify the end systems to which the data meant but the end processes has to
be identified also. To achieve this, different processes are labeled uni#uely. In T93:I3, this
labeling is called as port address. $ port address is *1 bits long 4- byte5.
2/ 6xplain the I3 datagram format.
Ans0
The unit of transfer in an I3 network is called an I3 datagram. I3 datagram has a predefined
format in which a datagram has to be filled so that all the systems that receive it, understand its
content without any ambiguity. It consists of an I3 header and data relevant to higher!level
protocols. $ datagram is a variable length packet consisting of two parts, header and data. The
header can be from -+ to 1+ bytes long and contains information essential for routing and
delivery. The length of the data part varies from packet to packet but the total length of the I3
datagram should be within 10,0.0 bytes.
3/ )hat are I3 address classes; 9lassify the I3 address classes and briefly explain them.
Ans0
The InterI9 4The InternetCs etwork Information 9enter5 allocates the I3 addresses. The bits
that correspond to the network ID are set to one. The bits that correspond to the host ID are set
to ,ero. These I3 addresses are divided into 9lass $, 9lass ", 9lass 9, 9lass D, and 9lass 6.
6nd users do not use the 9lass D and 9lass 6 I3 addresses.
Cass A IP address: You can have 9lass $ I3 addresses in your network if you have large
number of hosts. The high!order bit is always set to binary +. The next seven bits complete
the network ID. The last three octets represent the host ID. The default subnet mask used
in the 9lass $ I3 address is -00.+.+.+. In addition, they have the first octet from +!*-1. The
number of networks possible in class $ I3 addresses is *->. The number of hosts possible
per network is *1,DDD,-*1. 8or example, **.0-..1.> is a 9lass $ I3 address.
Cass > IP address: You can have 9lass " I3 addresses if your organi,ation has medium!
si,ed networks. The two high!order bits are always set to binary * +. The next */ bits
complete the network ID. The last two octets represent the host ID. The default subnet
mask used in the 9lass " I3 address is -00.-00.+.+. In addition, they have the first octet
from *->!*=*. The number of networks possible in class " I3 addresses is *1,.>/. The
number of hosts possible per network is 10,0.1. 8or example, *D-.0-..1.> is a 9lass " I3
address.
Cass C IP address: 9lass 9 I3 addresses are used in small local area networks. The
three high!order bits are always set to binary * * +. The next -* bits complete the network
ID. The last octet represents the host ID. The default subnet mask used in the 9lass 9 I3
address is -00.-00.-00.+. In addition, they have the first octet from *=-!--.. The number of
networks possible in class $ I3 addresses is -,+=D,*0-. The number of hosts possible per
network is -01. 8or example, *=-.0-.01.> is a 9lass 9 I3 address.
Cass 6 IP address: 9lass D I3 addresses are reserved for I3 multicast addresses. The
four high!order bits are always set to binary * * * +. The remaining bits represent the
specific group in which the client participates. (icrosoft supports class D I3 addresses for
multicast applications to multicast data to hosts on an internetwork. These hosts are
designed to receive multicast data.
Cass E IP address: The class 6 I3 addresses are for experimental purposes. They are not
in use. The four high!order bits are always set to binary * * * *.
NIIT Coordinator Guide Computer Networks 23
Chapter Four
Objectives
In this chapter, the students have learned to:
Define routing
Identify the types of routing
Define $<3
Define <$<3
Define I9(3
Focus Areas
This chapter explains protocols and routing. You can start the session by telling the students
that information over a network travels in the form of packets. %ending information through
packets re#uires the knowledge of various protocols.
6xplain the difference between direct and indirect routing. <efer to routing protocols given in the
$dditional Inputs section.
Describe the fields of an I3 header. 6xplain checksum calculation.
$sk the students to differentiate between $<3 and <$<3. Discuss the format of an $<3
packet.
6xplain the two categories of I9(3 messages. 6xplain the types of messages present in each
category.
Additiona Inputs
The following section provides some extra inputs on the important topics covered in the %&:
Routin* Protocos
<outing is the process of transmitting information from one computer in a network to another
computer in the same or a different network. The 2%I model provides a conceptual framework
about how communication takes place between computers. Internet protocols and routing
protocols govern the actual process, which takes place at the etwork layer of the 2pen
%ystem Interconnection 42%I5 reference model.
(ost networks are I3!based and use routing protocols for transmitting data. The routing of data
packets, both within a network and between networks, is made possible by a device called the
<outer. $ <outer receives the data packet from a host device, looks at the I3 address, and
forwards the packet to another router or destination device.
)hat are Routin* Protocos?
<outing protocols are network layer protocols that help routers identify the appropriate path for
transmitting data packets between routers. <outers use routing tables to determine the network
path in which a data packet can travel from a host computer to a destination computer. <outing
tables are built using routing protocols.
<outing protocols can be classified based on the type of networks or systems in which they
operate. <outing protocols can be used to connect devices within an autonomous system or
between two or more autonomous systems.
Asing this criterion, you can classify the routing protocols into the following two categories:
Interior &ateway 3rotocol 4I&35
6xterior &ateway 3rotocol 46&35
NIIT Coordinator Guide Computer Networks 24
Static Routin* Protoco
In static routing, you manually build the routing tables of all the routers in a network by
configuring the routers to forward data packets in predetermined routes. <outers do not
exchange any information regarding the network topology.
%tatic routing is used in small T93:I3 networks with two or more routers and a few subnets.
%tatic routing can also be used if there is a predefined route over which data packets can travel.
8or example, if your I%3 has provided a leased line, you can use static routing between the
customer and I%3 routers.
%tatic routing has the following advantages:
6asy to administer
6asy to troubleshoot
3rovides a secure environment
3rovides efficient utili,ation of resources
7owever, static routing also has some disadvantages:
<e#uires substantial maintenance and coordination effort
9annot adapt to changing network topology
6!na+ic Routin* Protoco
In dynamic routing, routing protocols are deployed to automatically build and maintain the
routing tables of all the routers in a network. It is used in large networks with multiple routers
that can exchange information with each other to build routing tables. The information is
exchanged using a routing protocol.
Chapter Four -uestions
Part .
./ Indicate the length of following addresses in terms of bytes:
a. 3hysical address 4for 6thernet5
b. I3 address
c. 3ort address
Ans/
a. Ph!sica address &"or Ethernet': 1 bytes
b. IP address: / bytes
c. Port address: - bytes
1/ Identify the class of the following I3 addresses.
a. --=.*0.D1.**+
b. *=*. .-.D>.-D
c. /.0.1.D
Ans/
a. 11;/.4/98/..<: 9lass D
b. .;./ 21/9:/19: 9lass "
c. 3/4/8/9: 9lass $
NIIT Coordinator Guide Computer Networks 25
2/ $ device having more than one I3 address is known as BBBBBBBBB device.
Ans/
(ultihomed
3/ 9hange the following I3 address from binary to decimal point notation:
+***+*++* +*+***+* ++*+**+* *+++*+*+
Ans/
-...=../0.*.>
4/ $ device whose primary function is routing the I3 datagrams over the physical network is
called
as BBBBBBBBBBB.
Ans/
<outer
8/ The two types of routing are BBBBBBBBB routing and BBBBBBBBB routing.
Ans/
Direct and indirect
9/ The minimum length of I3 datagram is BBBBBBBBBB bytes.
Ans/
0D1
:/ The I3 datagram header has the I3 addresses of BBBBBBB and BBBBBBBBB systems.
Ans.
%ource, destination
;/ In the I3 datagram BBBBBBBBBB field is used for the error detection purpose.
Ans/
9hecksum
.</ 3rotocol used to find out the physical address of a destination host from its I3 address is
known as BBBBBBB.
Ans.
$<3
../ 3rotocol used for reporting the errors occurred during the datagram transfer is BBBBBBBB.
Ans.
I9(3
NIIT Coordinator Guide Computer Networks 26
Part 1
./ )rite in detail about the different addressing mechanisms used in the T93:I3 model.
Ans/
T93:I3 model has the following three different levels of addressing:
Ph!sica address: This is the address of a node at the data link layer, as defined by the
'$ or )$. It is included in the frame sent by the data link layer. This address determines
the host system on a particular network. The T93:I3 does not define the si,e and format of
the physical address and it depends on the kind of the network. 8or example, 6thernet '$
uses 1 byte 4/> bit5 physical address that is imprinted into the etwork Interface 9ard.
3hysical addresses can be either unicast 4%ingle recipient5, multicast 4a group of recipients5
or broadcast 4received by all in the network5. 7owever not all networks supports these.
6thernet H one of the popular '$ H supports all of these.
Internet address: Internet addresses are necessary for universal communication services
that are independent of underlying physical network. 3hysical networks have different
addressing format depending upon the network technology used. In addition, the
addressing does not have any component using which one can identify the network to
which it is connectedG which is essential for the routing purpose.
The Internet addresses are designed for this purpose. $n Internet address is currently a .-
bit 4/ byte5 address, which can uni#uely identify a host, connected to the Internet. o two
hosts on the Internet can have the same I3 address. In addition, Internet addresses are
defined such a way that given an I3 address one can easily identify the network to which it
is connected so that routing becomes easy.
Port address: The I3 address and the physical address identify the source and the
destination systems. They do not identify the process 4a running program on the computer5
on these systems to which the data actually corresponds. The final ob?ective of the Internet
communication is providing a communication link between two processes running on two
different systems. 8or example, data sent by the 8T3 48ile Transfer 3rotocol5 client process
from system $ should reach the 8T3 server process at the system ". It should not reach
the ($I' server process running on the system ". %o it is not only crucial to identify the end
systems to which the data meant, but also the end processes are also to be identified. To
achieve this, different processes are labeled uni#uely. In T93:I3, this labeling is called as
port address. $ port address is *1 bits long 4- byte5.
1/ 6xplain the different classes of I3 addresses. )rite briefly about, given an I3 address how to
find its class.
Ans/
The InterI9 4The InternetCs etwork Information 9enter5 allocates the I3 addresses. The bits
that correspond to the network ID are set to *. The bits that correspond to the host ID are set to
+. These I3 addresses are divided into 9lass $, 9lass ", 9lass 9, 9lass D, and 9lass 6. 6nd
users do not use the 9lass D and 9lass 6 I3 addresses.
Cass A IP address: You can have 9lass $ I3 addresses in your network if you have large
number of hosts. The high!order bit is always set to binary +. The next seven bits complete
the network ID. The last three octets represent the host ID. The default subnet mask used
in the 9lass $ I3 address is -00.+.+.+. In addition, they have the first octet from +!*-D. The
number of networks possible in class $ I3 addresses is *->. The number of hosts possible
per network is *1,DDD,-*1. 8or example, **.0-..1.> is a 9lass $ I3 address.
Cass > IP address: You can have 9lass " I3 addresses if your organi,ation has medium!
si,ed networks. The two high!order bits are always set to binary * +. The next */ bits
complete the network ID. The last two octets represent the host ID. The default subnet
mask used in the 9lass " I3 address is -00.-00.+.+. In addition, they have the first octet
from *->!*=*. The number of networks possible in class " I3 addresses is *1,.>/. The
number of hosts possible per network is 10,0.1. 8or example, *D-.0-..1.> is a 9lass " I3
address.
NIIT Coordinator Guide Computer Networks 27
Cass C IP address: 9lass 9 I3 addresses are used in small local area networks. The
three high!order bits are always set to binary * * +. The next -* bits complete the network
ID. The last octet represents the host ID. The default subnet mask used in the 9lass 9 I3
address is -00.-00.-00.+. In addition, they have the first octet from *=-!--.. The number of
networks possible in class $ I3 addresses is -,+=D,*0-. The number of hosts possible per
network is -01. 8or example, *=-.0-.01.> is a 9lass 9 I3 address.
Cass 6 IP address: 9lass D I3 addresses are reserved for I3 multicast addresses. The
four high!order bits are always set to binary * * * +. The remaining bits represent the
specific group in which the client participates. (icrosoft supports class D I3 addresses for
multicast applications to multicast data to hosts on an internetwork. These hosts are
designed to receive multicast data.
Cass E IP address: The class 6 I3 addresses are for experimental purposes. They are not
in use. The four high!order bits are always set to binary * * * *.
There are two ways of determining the class of an address depending on the format it is
represented.
If the address is given in the form of binary then depending upon the first few bits one can
identify the class.
If the first bit is + then it is 9lass $
If the first - bits are *+ H 9lass "
If the first . bits are **+ H 9lass 9
If the first / bits are ***+ H 9lass D
If the first / bits are **** H 9lass 6
7owever mostly the addresses are given in the decimal notation, which re#uires following
method for determining the class.
Cass A: first number is between + and *-D
Cass >: first number is between *-> and *=*
Cass C: first number is between *=- and --.
Cass 6: first number is between --/ and -.=
Cass E: first number is between -/+ and -00
2/ )rite briefly about nicast, mlticast and *roadcast addresses
Ans/
$ data packet can be sent to one system, more than one system, or to all the systems in the
network. The Internet addressing mechanism has provision for all of these.
Unicast Addresses: Anicast communication is one!to!one. )hen a data packet is sent from a
source system to an individual destination system, a unicast communication takes place. $ll
system on the Internet should have one uni#ue unicast address. Anicast addresses belong to
class $, " or 9.
(uticast Addresses: (ulticast communication is one!to!many. )hen a data packet is sent
from an individual source to group of destinations, a multicast communication takes place. $
multicast address is a 9lass D address. The whole address defines a multicast group id. $
system on the Internet can have one or more multicast addresses 4in addition to its unicast
address or addresses5. If a system intends to participate in a particular multicast group then it
should enable corresponding multicast address in its software. ote that the multicast
addresses 4or 9lass D5 can never be a source I3 addressG it can only be a destination address
in an I3 datagram packet. %ome of the multicast addresses are listed below:
113/</</.: $ll systems on this %A"6T
113/</</9: %T routers.
113/</./9: $udio news
113/</./..: I6T8!*!$udio
113/</./.1: I6T8!* @ideo
NIIT Coordinator Guide Computer Networks 28
>roadcast Addresses: "roadcast communication is one!to!all. The Internet allows
broadcasting only at the local network level. There are two types of broadcasting allowed.
%i+ited broadcast: all *s in the I3 address. "oth netid and hostid in this case are all *4in
decimal notation -00.-00.-00.-005. This identifies all the hosts connected to the local
network. $n I3 datagram packet with destination address as -00.-00.-00.-00 should be
received by all the systems connected to the local network.
6irect broadcast: This identifies all the hosts connected to a particular network 4need not
be local network as in the case of 'imited broadcast5. 7ere the netid part will identify the
destination network 4any valid netid5 and hostid part will have all *s. 6xample address is
1..-00.-00.-00. 41. identifies the 9lass $ network and rest implies all hosts on that
network5.
NIIT Coordinator Guide Computer Networks 29
3/ )rite a brief note about direct and indirect roting(
Ans/
6irect Routin*: If the destination host is attached to the same physical network as the source
host, I3 datagrams can be directly exchanged. This is called direct delivery and is referred to as
direct routing. Direct routing occurs when both source and destination hosts are connected to
the same physical network.
Indirect Routin*: Indirect routing occurs when the destination host is not connected to a
network directly attached to the source host. The only way to reach the destination is via one or
more I3 router. The address of the first router 4the first hop5 is called an indirect route in the I3
routing algorithm. The address of the first router is the only information needed by the source
host to send a packet to the destination host.
4/ )hat are the types of routing tables; 6xplain briefly.
Ans/
The determination of routes is derived from the table known as routing table. The types of
routing tables are as follows:
%tatic routing table
Dynamic routing table
Static Routin* Tabe: <outing tables can be a static one in which case the entries remain
same unless someone changes it manually. If there is any change in the Internet topology, like
some of the links going down temporarily, the entries will not be updated automatically resulting
in the routing table which does not reflect the changed topology. 7owever this simple
mechanism is sufficient for many of the routers which interconnect small networks where
changes in the topology is very unlikely or even if that happens the inconvenience caused is not
much before the administrator updates the routing table manually.
6!na+ic Routin* Tabe: $ dynamic routing table is updated periodically automatically. It does
not need the manual intervention from the administrator for the updating process. 7owever for
this the routers must have implemented one of the dynamic routing protocols such as <I3,
2%38 or "&3. "asically the routers participating in dynamic routing communicate with each
other using one of the above!mentioned protocols informing about the status of the Internet by
exchanging respective protocol packets. Through these communication whenever there is a
change in the Internet topology, such as shutdown of a router or a link becoming inactive or
even a link becoming active, the router which comes to know about such a change informs the
rest of the router about the change using routing protocol, so that the remaining routers updates
their routing tables appropriately. $ change in the Internet may not result in the change in
routing table at all the routers. It may affect only some of the routers. The routers in the Internet
need to be updated dynamically for efficient delivery of the I3 packets.
8/)rite the I3 header datagram. 6xplain the fields %ervice Type, 3rotocol, 9hecksum, %ource
I3 address and Destination I3 address.
Ans/
The unit of transfer in an I3 network is called an I3 datagram header. $ datagram is a variable
length packet consisting of two parts, header and data. The maximum length of an I3 datagram
is 10,0.0 bytes 4octets5. The header can be from -+ to 1+ bytes long and contains information
essential for routing and delivery. The length of the data part varies from packet to packet but
the total length of the I3 datagram should be within 10,0.0 bytes.
The following are some of the fields of the header:
Service T!pe: The service type is an indication of the #uality of service re#uested for this
I3 datagram.
NIIT Coordinator Guide Computer Networks 3
Protoco Chec$su+: This field is a checksum for the information contained in the header.
If the header checksum does not match the contents, it implies that the datagram is
corrupted and is discarded.
Source IP Address: This is the .-!bit I3 address of the host, sending this datagram.
6estination IP Address: This is the .-!bit I3 address of the destination host, for this
datagram.
NIIT Coordinator Guide Computer Networks 31
9/ )hy fragmentation is re#uired; 6xplain how the I3 header fields are used for the same
purpose.
Ans/
)hen an I3 datagram travels from one host to another, it may pass through different physical
networks. 6ach physical network has a maximum frame si,e. This is called the ma9imm
transmission nit 4(TA5. It limits the length of a datagram that can be placed in one physical
frame.
The format and si,e of the received frame depends on the protocol used by the underlying
physical network through which the frame passes through. %ince each protocol used at the
physical layer has its own (TA, there is every possibility that the incoming frame exceeds the
(TA of the outgoing physical network. To enable forwarding the datagram in such cases, I3
implements a process to fragment datagrams exceeding the (TA. The process creates a set of
datagrams within the maximum si,e. The receiving host reassembles the original datagram.
The source or any router in the path can fragment a datagram. 7owever, only the destination
host does the reassembly of the datagram, as each fragment becomes an independent
datagram. )hen a datagram is fragmented, re#uired parts of the header must be copied by all
the fragments. The host or the router that fragments the datagram must change the values of
three fields: flags, fragmentation offset, total length( The checksm field for each of the
fragments has to be recomputed and duly filled.
The following steps are performed to fragment the datagram:
The D8 flag bit in the flag field is checked to see if fragmentation is allowed. If the bit is set
which indicates not to fragment, the datagram will be discarded as it cannot be forwarded
and an I9(3 error returned to the originator.
"ased on the (TA value, the data field of the datagram is split into two or more parts. $ll
newly created data portions must have a length that is a multiple of > octets, with the
exception of the last data portion.
6ach data portion is placed in an I3 datagram. The headers of these datagrams are minor
modifications of the original:
The more fragments flag bit is set in all fragments except the last.
The fragment offset field in each is set to the location this data portion occupied in the
original datagram, relative to the beginning of the original unfragmented datagram. The
offset is measured in >!octet units.
The header length field of the new datagram is set.
The total length field of the new datagram is set.
The header checksum field is re!calculated.
6ach of these fragmented datagrams is now forwarded as a normal I3 datagram. I3
handles each fragment independently. The fragments can traverse different routers to
the intended destination. They can be sub?ect to further fragmentation if they pass
through networks specifying a smaller (TA.
:/ &ive an overview of $<3 mechanism using diagrams.
Ans/
The $<3 protocol is a network!specific standard protocol. The address resolution protocol is
responsible for converting the higher!level I3 addresses to physical network addresses.
I3 layer provides a virtal or logical network view to the higher layer protocols where in each
host is identified by the uni#ue address known as I3 address. 7owever, when the datagram are
sent on the physical network, this I3 address cannot identify the destination system. $t the
physical or data link layer, it is the #h"sical address, which identifies the host system.
Therefore, there is a need to do address translation from I3 address to physical address. The
$<3 mechanism, which resides at the network la"er in the T93:I3 protocol, performs this
address translation.
NIIT Coordinator Guide Computer Networks 32
8or this purpose, the $<3 module will have a lookup table called A6P cache. This table will
have entries for all the known I3 addresses. 8or each I3 address present in the cache,
corresponding #h"sical address is stored against it. Therefore, when $<3 module is re#uested
to perform an address translation, it first looks into this cache. If it finds an entry for the I3
address, it gets the corresponding #h"sical address and returns it.
7owever, many times there will be no entry in the cache for re#uested I3 address. In such
cases $<3 module broadcasts a message over the network re#uesting for the address
translation and after getting the proper reply stores the physical address of the I3 address
re#uested in the cache table and passes the same to the upper layers that re#uested it.
6very host or the router on the network receives and processes the $<3 #uery packet, but only
the intended recipient recogni,es the I3 address and sends back the an A6P res#onse packet.
The response packet contains the recipientKs I3 and physical addresses. The packet is unicast
directly to the in#uirer using the physical address received in the #uery packet.
;/ )rite a brief note about <$<3.
Ans/
In some local area networks, there would be a powerful computer, which acts as a server.
There would be several hosts, which will not have any disks 4hard disk : floppy disk5 that will be
connected to the host. 3eople would use these hosts as the front!end system and would be
connected to the server over the network. 8inally, they would be working on the server but
using these hosts as the front!end systems. 7aving disk!less hosts has an advantage in some
setups, where there would be a central powerful server computer on which many people can
work simultaneously by connecting through such hosts. $s these hosts are disk!less system,
they would not need any configuration by the administrator. (aintenance would be minimal.
These disk!less systems would be booted from the <2( 4<ead 2nly (emory chip5, which is
programmed by the manufacturer. It cannot include the I3 address as the network administrator
assigns them.
6ach time these disk!less hosts are switched on, they will not be aware of their I3 address, as
they do not have any disk or storage device. 7owever, they will be aware of their hardware
address as encoded into the etwork Interface 9ard, from which they can get it.
%ince in a network each system is recogni,ed by the logical or more commonly, I3 address, it is
vital for the system to be aware of its I3 address. $ny I3 datagram to be sent should have the
senders I3 address duly filled in. 2therwise, the recipient of that packet would not know from
whom the packet arriver and it would ?ust discard.
To find out ones I3 address these disk!less host systems, uses a protocol known as <everse
$ddress <esolution 3rotocol. This is a protocol, which does the function opposite of that of $<3
i.e. given the physical address gets the I3 address.
$t boot up time, these disk!less hosts would broadcast a <$<3 re#uest packet over the
network after filling its physical address in it. The server which will have a reference table of
physical address and their corresponding I3 address would respond with the <$<3 response
packet. This reference table has entries for each of the physical address 4present in the local
network5 and their I3 address would be created and maintained by the administrator.
.</ )hat are the error reporting messages present in the I9(3; 6xplain any two of them.
Ans/
I3 provides an unreliable and connectionless datagram delivery. I3 protocol does not have any
error!reporting or error!correcting mechanism. Therefore, if something goes wrong, the router
does not find route for the I3 packet and so discards it. The sender will be never aware of it,
and he would keep resending the same. The I9(3 was designed to compensate these
deficiencies of I3. It is a companion to the I3 protocol and is part of the network layer along with
the I3.
NIIT Coordinator Guide Computer Networks 33
I9(3 messages are divided into two broad categories, error;re#orting messages and 8er"
messages(
The error reporting messages report the problems that a router or a host may encounter when it
processes an I3 packet. They would report the problem back to the I3 module at the sending
system.
The #uery messages, which occur in pairs, help a host or a network manager get specific
information from a router or another host. 8or example, this can be used by the hosts to
discover the routers present in their network. The host would send an I9(3 #uery asking for
routers to respond. The routers present in the network will respond with an I9(3 reply
message. The host would get enough information about the router from this reply.
NIIT Coordinator Guide Computer Networks 34
Ander error!reporting type, the following messages are present:
Destination unreachable
%ource #uench
Time exceeded
3arameter problem
<edirection
The #uery messages type has following messages:
6cho re#uest and reply
Timestamp re#uest and reply
$ddress mask re#uest and reply
<outer solicitation and advertisement
FA-
./ )hat is the functionality of a network layer;
Ans0
The network layer is responsible for transferring the data from the source to the destination host
across several physical networks. $ key aspect of this transfer is the roting of #ackets fast,
efficiently, and reliably from the source to the destination machine typically traversing a number
of transmission links and network nodes where routing is carried out.
The network layer also provides the virtual network concept to the upper layers. $s far as the
upper layers are concerned, there is only one network, and each host is recogni,ed by a uni#ue
I3 address.
1/ Identify the protocols used in the network layer.
Ans0
The following protocols are used in the network layer:
IP: Internet 3rotocol
ARP: $ddress <esolution 3rotocol
RARP: <everse $ddress <esolution 3rotocol
IC(P: Internet 9ontrol (essage 3rotocol
2/ Define routing.
Ans0
<outing is the process by which a path is selected out of many available paths to the
destination host so that data packet reaches the destination fast, efficiently, reliably as re#uired.
It uses the destination I3 address that is stored in the I3 datagram packet to reach the correct
destination.
3/ Define $<3.
Ans0
$<3 4$ddress <esolution 3rotocol5 is a network!specific standard protocol. $<3 is responsible
for converting the higher!level protocol addresses 4I3 addresses5 to physical network
addresses.
NIIT Coordinator Guide Computer Networks 35
4/ Define <$<3.
Ans0
<$<3 4<everse $ddress <esolution 3rotocol5 is responsible for converting the physical
network addresses of disk!less host systems to I3 addresses.
8/ 6xplain the working of I9(3.
Ans0
I9(3 4Internet 9ontrol (essage 3rotocol5 is a network layer protocol and it provides error!
reporting or error!correcting mechanism. In addition, I9(3 provides #uery messages, which
occur in pairs and it helps a host or a network manager get specific information from a router or
another host. Therefore, I9(3 is designed to compensate the unreliable and connectionless
deficiencies of I3.
NIIT Coordinator Guide Computer Networks 36
Chapter Five
Objectives
In this chapter, the students have learned to:
Identify the features of AD3
Define process!to!process communication
Define AD3 datagram
'ist the steps for AD3 checksum computation
Define AD3 operations
Identify the uses of AD3
Identify the services offered by T93:I3
Identify the connections in T93
Describe flow control mechanism in T93
Define the various T93 operations
Focus Areas
This chapter explains the transport layer. 6xplain the features of AD3 and T93. 6xplain the
basic function of the transport layer. <efer to the topics given in the $dditional Inputs
section. 'ist and explain the protocols used in the transport layer, namely, AD3 4Aser
Datagram 3rotocol5 and T93 4Transmission 9ontrol 3rotocol5.
)hen discussing AD3, explain the following features of AD3:
a. %imple protocol
b. 9onnectionless service
c. o flow control
d. 3rocess to process communication
e. 'imited error checking
f. 3rovides unreliable service
%ensiti,e the students to the fact that AD3 is used in applications that re#uire high data transfer
rate and can have low reliability. 6xplain the AD3 datagram format. $lso explain the operation
of AD3.
)hen discussing T93, explain the following features of T93:
a. %imple network communication from the application programmerCs point of view.
b. <eliable service
c. 9onnection!oriented protocol
d. "uilt!in flow!control
e. %tream data transfer
f. 8ull!duplex service
6xplain the T93 segment. 6xplain how connection is established and terminated in T93 using
three!way handshake and four!way handshake respectively. 6xplain the flow control and error
control mechanisms in T93. $lso explain the operation of T93.
Additiona Inputs
The following section provides some extra inputs on the important topics covered in the %&:
Transport %a!er
There may be several processes running on a computer. Thus, source to destination delivery
involves not only the delivery of a message from one computer system to another but also from
one process to another across the two systems. The Transport layer does this by including a
service!point address on its header, which ensures the delivery of the message to the right
process.
NIIT Coordinator Guide Computer Networks 37
The Transport layer also determines the type of service to provide to the %ession layer and,
ultimately, to the users of the network. The most popular type of transport connection is an
error!free end!to!end channel. This type of connection delivers messages in the order in which
they were sent. The other type of transport messages is service! and transport!isolated
messages, which do not have a guarantee about the order of delivery and broadcasting to
multiple destinations.
Reiabe 6eiver!
There are a number of aspects that the Transport layer needs to manage for reliable delivery of
data between the computers on a network. These are error control, se#uence control, loss
control, and duplication control.
Error contro: The Transport layer implements error control by ensuring that the data sent
by the sending machine is delivered at the destination machine exactly as it originated from
the source machine. The Data 'ink layer takes care of error control, but only for computer!
to!computer delivery. 7owever, the Transport layer ensures source!to!destination reliability
while implementing error control. 2ne method of implementing reliability is through
acknowledgements. )hen a packet is delivered to a destination computer, an
acknowledgement of receipt is returned to the source computer. In this way, the Transport
layer tracks and validates the transmission of each packet.
Se@uence contro: The Transport layer is responsible for ensuring the correct se#uence of
data both at the senderKs end and at the receiverKs end. $t the senderKs end, the Transport
layer receives data from the upper layers and ensures that the data is usable by the lower
layers. $t the receiverKs end, the Transport layer ensures that the data is assembled
correctly. The Transport layer makes use of the se#uence numbers. It assigns a se#uence
number to each segment that it transfers. These se#uence numbers enable the message to
be reassembled in an ordered manner at the destination. The se#uence numbers also help
to identify and replace the packets that are lost during transmission.
%oss contro: The Transport layer also ensures that all the segments of data are delivered
to the destination machine. %ome segments of data may be lost during transmission due to
the segmentation of data. The Transport layer uses the se#uence numbers to identify the
segments that are missing and re#uests for the redelivery of those segments.
6upication contro: The Transport layer guarantees that none of the segments of data
arrives duplicated at the destination machine. In addition to identifying the missing
segments of data, the se#uence numbers also help to identify and discard the segments
that are duplicated.
(utipe,in*
&enerally, the Transport layer creates different network connections for each transport
connection that the %ession layer re#uires. 7owever, if a particular transport connection
re#uires a high throughput, the Transport layer might create multiple network connections and
divide the data among the network connections. Though this improves throughput, it also
increases the cost of creating and maintaining a network connection. Therefore, the Transport
layer might transfer and merge several transport connections into the same network connection
to reduce the cost. This process is called multiplexing. In all cases, the Transport layer is
responsible for notifying the %ession layer about the multiplexing process. (ultiplexing can be
of two types H upward and downward:
Up#ard: In upward multiplexing, the Transport layer uses virtual circuits depending on the
services of the layers below it. &enerally, the underlying networks charge all the virtual
circuits for their established connections. "y using upward multiplexing, the Transport layer
sends multiple transmissions that are bound for the same destination along the same path
or circuit. "y doing this, the Transport layer makes use of the established circuit in a cost!
effective manner.
6o#n#ard: In downward multiplexing, the Transport layer splits up a single connection into
several paths to improve the speed of delivery. Downward multiplexing is helpful when the
capacity of the underlying networks is low or slow.
NIIT Coordinator Guide Computer Networks 38
In addition to multiplexing several transport connections to one network connection, the
Transport layer is also responsible for establishing and deleting connections across a network.
The Transport layer also implements a mechanism to regulate the flow of information, so that a
fast host cannot overrun a slow one.
NIIT Coordinator Guide Computer Networks 39
Fo# Contro
The Transport layer ensures end!to!end flow control by using the techni#ue of a sliding window.
This window stores a set of packets that must be transmitted without waiting to receive
acknowledgements for the previously transmitted packets. In most cases, the receiver decides
the si,e of the window based on the number of bytes that it can accommodate. The sender
does not need to send data to completely fill the sliding window. Instead, the receiver, while
sending the acknowledgement for a previously transmitted packet, can specify that the si,e of
the window be increased or decreased.
The sliding window consists of three virtual areas. The top of the window stores packets that
are waiting to be acknowledged. In the bottom of the window, the packets that are waiting to be
transmitted are stored. )hen an acknowledgement is received for a packet, the window slides
down to exclude the acknowledged packet and to include a new packet in the window.
Protocos used in the Transport %a!er
Two core protocols that are used in the Transport layer are Transmission 9ontrol 3rotocol
4T935 and Aser Datagram 3rotocol 4AD35. These protocols are with respect to the T93:I3
suite. T93 is a connection!oriented protocol that assures reliable packet delivery. In other
words, T93 tracks packets and verifies that a packet has reached its destination. AD3 can be
described as a connectionless protocol that supports only packet transmission.
Connection in the Transport %a!er
The Transport layer can be of two types H connectionless or connection!oriented. )hen it is
connectionless, it delivers each packet of data to the destination machine individually and
independent of other packets. )hen the Transport layer is connection!oriented, it first
establishes a connection with the Transport layer of the destination machine and then delivers
the packets. The connection is terminated only after all the packets are delivered. 9onnection!
oriented transmission is considered more reliable. There are three stages in a connection!
oriented transmission ! connection establishment, data transfer, and connection termination.
6stablishing connections follows a techni#ue called a Three )ay 7andshake. "efore moving
ahead, it is important to know that computers communicate with each other through a software
ob?ect called an endpoint. 6ach endpoint is a channel consisting of the I3 address and the port
number through which the data must flow in or out of the computer. To move on, consider the
following procedure to understand how the Three )ay 7andshake works:
)hen an application needs to establish connection with another computer, the networking
software on the sending computer notifies the 2% that an endpoint must be created. The
2% creates an endpoint through which the Transport layer sends an initial synchroni,ation
packet, also known as %Y. This step can be described as the first handshake.
2n receiving the %Y packet, the destination computer initiates the creation of an endpoint
through its 2%. ext, the destination computer sends a %Y to the sending computer. The
acknowledgement for the received %Y is added within the %Y packet sent from the
destination computer. In addition, the se#uence number of the %Y packet is also
incremented. This synchroni,es the se#uence numbering between the sending and
receiving computers. 9ompleting this step indicates the end of the second handshake.
2n receiving the %Y packet and the acknowledgement from the destination computer, the
sending computer returns and acknowledgement of the destination computerKs %Y. This
step is the third handshake completing the connection process. The computers can now
start communicating with each other.
NIIT Coordinator Guide Computer Networks 4
Chapter Five -uestions
Part .
./ AD3 is an acronym for BBBBBBBBBBBBBBBBBBBBB
Ans.
Aser Datagram 3rotocol
1/ In the sending system, AD3 receives data unit from the BBBBBBBBBBBBBB layer.
Ans.
etwork
2/ AD3 needs the BBBBBBBBB address to deliver the data to the correct process.
Ans/
3ort
3/ AD3 offers BBBBBB to BBBBBB data communication.
Ans.
3rocess!to!process
4/ AD3 has the fixed header si,e of BBB bytes.
Ans.
6ight
8/ In T93 a unit of data is referred to as BBBBBBBB.
Ans.
Datagram
9/ 8low control is achieved through the use of BBBBBBBBBBBBB window mechanism.
Ans.
%liding
:/ BBBBBBBBB field in the T93 header is used to detect errors in the T93 segment.
Ans.
9hecksum
;/ In T93, before sending data, a BBBBBBBBBB is established between the sending and
receiving processes.
Ans.
@irtual path
NIIT Coordinator Guide Computer Networks 41
.</ T93 offers BBBBBBBB duplex data transfer service.
Ans/
8ull
Part 1
./ )rite a short note on, services offered by the AD3 and what kind of applications AD3 service
is used.
Ans/
AD3 is a connectionless, unreliable transport protocol. AD3 provides process!to!process
communication. In addition, it performs very limited error checking. AD3 is very efficient
because of its simplicity. 6stablishing a connection with the destination process is fast, and if
reliability is not an important criterion then the transfer of data is faster for bulk transfer.
The services offered by AD3 are as follows:
Connectioness Services: AD3 provides a connectionless service. This means that each
user datagram sent by the AD3 is an independent datagram. There is no relationship
between the different user datagrams even if they are coming from the same source
process and going to the same destination program. The user datagrams are not
numbered. $lso, there is no connection establishment and no connection termination at the
beginning and end of a transaction. This means that each user datagram can travel a
different path.
2ne of the ramifications of being connectionless is that the process that uses AD3 cannot
send a stream of data to AD3 and expect to receive the same stream of data at the
destination. Instead each re#uest must be small enough to fit into one user datagram. 2nly
those processes sending short messages should use AD3. 2therwise if needed, the end
application should take care of section of data arriving out of order and reordering them to
get the original stream.
Fo# and Error Contro: AD3 is a very simple, unreliable transport protocol. There is no
flow control, and hence no windowing mechanism. The receiver may overflow with
incoming messages. $gain it is left for the end application to take of it. The end applications
which uses AD3 either generates less data or they have inbuilt mechanism to take care of
flow control.
There is no error control mechanism in AD3 except for the checksum. This means that the
sender does not know if a message has been lost or duplicated. )hen the receiver detects
an error using the checksum, the user datagram is silently discarded.
Encapsuation ad 6ecapsuation: To send a message from one process to another, the
AD3 protocol encapsulates and decapsulates the messages.
(utipe,in* and 6e+utipe,in*: In a host running a T93:I3 protocol, there is only one
AD3 but possibly several processes that may want to use the services of AD3. To handle
this situation, AD3 uses the concept called (ultiplexing and Demultiplexing.
The applications at the Transport layer use the services of AD3. There are several multimedia
applications with powerful desktop computer and high bandwidth communication network that
uses AD3. The multimedia applications, which re#uire bulk transfer of data, needs no fool!proof
reliability. The reliability provided by the underlying networks is sufficient. 'oss of data to some
extent is tolerable, and in fact in some cases there are techni#ues available to recover the lost
data with the source re#uiring sending it again.
TodayKs multimedia applications, such as @oI3 4@oice over I35 and @ideo conferencing
applications use a protocol known as <T3 4<eal Time 3rotocol5 for data transfer at the
application layer. This <T3 protocol uses the services of AD3.
1/ 6xplain how port number concept is used to offer process!process data communication in
AD3.
Ans/
NIIT Coordinator Guide Computer Networks 42
In T93:I3 model, each process re#uiring the T93:I3 communication service is assigned a *1!
bit 4- byte5 number called port number. The T93:I3 standard has defined uni#ue port numbers
for some of the well!known network application process. This helps to uni#uely identify a
network application process running on a host machine.
9omputer systems today support both multi!user and multiprogramming environments. 'ocal
and remote computers can run several server programs at the same time. 8or communication,
the following hosts and processes must be defined:
'ocal host
'ocal process
<emote host
<emote process
The local host and the remote host are identified using I3 addresses. To define the processes,
we need second identifiers, which are called port numbers. In the T93:I3 protocol suite, the
port numbers are integers between + and 10,0.0.
The client program is assigned a port number, chosen randomly by the AD3 software running
on the client host. This is the ephemeral port number.
The server process must also be assigned a port number. This port number, however, cannot
be chosen randomly. If the computer at the server site runs a server process and assigns a
random number as the port number, the process at the client site that wants to access that
server and use its services will not know the port number. Therefore, T93:I3 has decided to
use universal port numbers for serversG these are called well!known port numbers. 6very client
process knows the well!known port number of the corresponding server process.
The destination I3 address defines the host among the different hosts in the Internet. $fter the
host has been selected, the port number selects one of the intended processes on this
particular host.
2/ )rite the AD3 datagram header. 6xplain each field.
Ans/
AD3 packets, known as user datagrams, have a fixed!si,e header of eight bytes.
The fields of AD3 packets are explained below:
Source port nu+ber: This is the port number of the source process sending the AD3
datagram. It is *1 bits long 4- byte5. If the source process is a client 4a client sending a
re#uest5, the port number, in most cases, is an ephemeral port number. If the source
process is a server 4a server sending a response5, the port number, in most cases, is a
well!known port number.
6estination port nu+ber: This is the port number of the destination process to which this
AD3 datagram is meant. It is also *1 bits long. Its characteristics are similar to the %ource
3ort umber.
%en*th: This is a *1!bit field that defines the total length of the AD3 datagram, header plus
data. The *1 bits can define a total length of + to 10,0.0 bytes. 7owever, the minimum
length is eight bytes, which indicates a user datagram with only header and no data.
7owever it should be noted that I3 has a limitation of 10,0.0 bytes for its datagram.
Therefore, the length of the data can be between + and 10,0+D 410,0.0 H -+ H >5 bytes
4twenty bytes for I3 header and > bytes for AD3 header5.
The AD3 length can be computed using data length in the I3 header. 7owever, the
designers of AD3 protocol felt that it was more efficient for the destination AD3 to calculate
the length of the data from the information provided in the AD3 datagram rather than asking
to supply this information. )e should remember that when the I3 module delivers the AD3
user datagram to the AD3 layer, it has already dropped the I3 header.
Chec$su+: This field is used to detect errors over the entire user datagram 4header plus
data5. Anlike lower layer protocols like I3, which provide checksum only for their header,
this provides the checksum for entire datagram, which includes the data sent by the user
process.
NIIT Coordinator Guide Computer Networks 43
3/ Describe how checksum is calculated for the AD3 datagram.
Ans/
AD3 checksum calculation includes three sections:
3seudo header: The pseudo header is part of the header of the I3 packet in which the user
datagram is to be encapsulated for transmission with some fields with +s.
AD3 header: 7eader for this AD3 datagram.
Aser Data: Data sent by the upper layer.
The pseudoheader is added to ensure that the user datagram reaches the intended process,
which uses the intended transport protocol on the intended host. %ince in no other layer, it is
possible to check all these three, a pseudoheader derived from the I3 header that has
destination and source I3 address and protocol numbers is used. The pseudoheader along with
the AD3 header uni#uely identifies the destination process.
Chec$su+ Cacuation at the Source: $t the source host system, the sender follows these
steps to calculate the checksum:
*. $dd the pseudoheader to the AD3 user datagram.
-. If the total number of bytes is not even, add one byte of padding 4all +s5. The padding is
only for the purpose of calculating the checksum and will be discarded afterwards.
.. 8ill the checksum field with ,eros.
/. Divide the total bits into *1!bit 4two!byte5 words sections.
0. $dd all *1!bit sections using oneKs complement arithmetic.
1. Take ones complement of the result 4change +s to *s and all original *s to +s5, which is a
*1!bit checksum number.
2nce *1 bits checksum field is computed using the above method, it is filled into the original
AD3 header and the resulting AD3 datagram is sent. It should be noted that the pseudoheader
and the padding bits are not sent but only used during the computation of checksum.
Chec$su+ Cacuation at 6estination Host: The receiver follows these steps to calculate the
checksum:
D. 2btain the I3 header, derive the pseudoheader from it, and add it to the AD3 user
datagram.
>. $dd padding if needed.
=. Divide the total bits into *1!bit sections.
*+. $dd all *1!bit sections using oneKs complement arithmetic.
**. Take onesK complement the result to get the checksum.
AD3 datagram is accepted if the resulting checksum is all +s. 2therwise it is discarded, as it
indicates an error in it.
4/ 6xplain the 6ncapsulation and Decapsulation mechanism used in AD3.
Ans/
Encapsuation: )hen a process has a message to send through AD3, it passes the message
to AD3 along with a pair of socket addresses and the length of data. AD3 receives the data
and adds the AD3 header. AD3 then passes the user datagram to the I3 with the socket
addresses. I3 adds its own header, using the value *D in the protocol field, indicating that the
data has come from the AD3 protocol. The I3 datagram is then passed to the data link layer.
The data link layer receives the I3 datagram, adds its own header 4and possibly a trailer5, and
passes it to the physical layer. The physical layer encodes the bits into electrical or optical
signals and sends it to the remote machine.
6ecapsuation: )hen the message arrives at the destination host, the physical layer decodes
the signals into bits and passes it to the link layer. The data link uses the header 4and the
trailer5 to check the data. If there is no error, the header and trailer are dropped and the
datagram is passed to the I3. The I3 software does its own checking. If there is no error, the
header is dropped and the user datagram is passed to the AD3 with the sender and receiver I3
NIIT Coordinator Guide Computer Networks 44
addresses. AD3 uses the checksum to check the entire user datagram. If there is no error, the
header is dropped and the application data along with the sender socket address is passed t
the process. The sender socket address is passed to the process in case it needs to respond
to the message received.
8/ )rite a short note on importance of T93.
Ans/
The protocol, which is responsible for widespread usage of T93:I3 model for computer!to!
computer communication network is the T93. It is the combination of T93 at the Transport
layer and I3 at the etwork layer, which is largely responsible for success of this model.
The network application program, which needs to communicate over the network, expects a
very simple, easy to implement communication channel. If a user wants to write an application
program, which communicates with another over the network, he should not be expected to
build logic into his program to take care of so many issues that are involved in the
communication. 7e should not worry about things such as, some part of the message getting
corrupted or lost. There are other issues which should not be handled by him, like rearranging
the datagrams which arriver out of order, issues of congestion and resulting delay, issues of
flow control by which the rate at which the source sends the data can be controlled.
T93 ensures easy to use communication channel, which provides the reliable, stream oriented
communication service, which takes are of such error and flow control mechanisms.
I3 provides an unreliable, best!effort, datagram service and AD3 adds ?ust the process!to!
process communication facility apart from error checking mechanism to some extent.
Therefore, there is a need for another protocol, which sits on top of the I3 and provides the
services as mentioned above to the end application. %o the designer of T93:I3 model came out
with T93 at the Transport layer.
T93 provides process!to!process communication channel, which is reliable and stream
oriented in nature. In addition, it takes care of the error!control and flow control.
The process!to!process mechanism is very similar to the one used by AD3. 3ort numbers are
used to identify an individual process. $ssociation of I3 address and port number is known as
the socket. $ socket identifies each communicating process and a pair of socket determines the
communication channel. $ port number can be shared by both AD3 as well as T93. I.e. there
can be a port number, which is assigned to two processes at the same host, but which uses
different protocols, one process uses AD3 and another T93. 3ort number does not identify the
protocol. The protocol field in the I3 header makes that distinction.
9/ 6xplain the stream!oriented data transfer offered by the T93.
Ans/
T93 provides stream data transfer service, which means the destination process receives the
stream of data in exactly the same manner it is sent by the source process. Anlike in datagram
service, there is no concept of unit of data transfer. In datagram service, all the data have to be
sent as a single unit. This imposes two restrictions. 2ne restriction is that all the data should be
available at the time of sending. 2therwise, they will be sent in another datagram. 6ach
datagram unit is a separate entity and there is no relation between them. $nother restriction is
on the si,e of the data transfer.
%ource T93 accepts a stream of characters from the sending application program as and when
they arrive, creates packets, called segments, of appropriate si,e extracted from the stream,
and sends them across the network. The receiving T93 receives segments, extracts data from
them, orders them if they have arrived out of order, and delivers them as a stream of characters
to the receiving application program.
8or stream delivery, the sending and receiving T93s use buffers. The sending T93 uses a
sending buffer to store the data coming from the sending application program. The sending
application program delivers data at the rate it is created. 8or example, if the user is typing the
NIIT Coordinator Guide Computer Networks 45
data on a keyboard, the data is delivered to the sending T93 character by character. If the data
is coming from a file, data may be delivered to the sending T93 line!by!line, or block!by!block.
The sending application program writes data to the buffer of the sending T93. 7owever, the
sending T93 does not create a segment of data for each write operation issued from the
sending application program. T93 may choose to combine the result of several write operations
into one segment to make transmission more efficient.
The receiving T93 receives the segments and stores them in a receiving buffer. The receiving
application program uses the read operation to read the data from the receiving buffer, but it
does not have to read all of the data contained in one segment in one operation. %ince the rate
of reading can be slower than the rate of receiving, the data is kept in the buffer until the
receiving application reads if completely.
NIIT Coordinator Guide Computer Networks 46
:/ )rite a diagram of T93 header. 6xplain the fields, %e#uence number, $cknowledgement
number, )indow si,e and Argent pointer.
Ans/
In T93, a unit of data transfer is known as T93 segment. %ince T93 provides the stream!
oriented data service, it uses the concept of segment for a unit of transfer.
The segment consists of a -+!to 1+!byte header, followed by data from the application program.
The header is -+ bytes if there are no options and up to 1+ bytes if it contains some options.
%ome of the header fields are as follows:
Source port address: This is a *1!bit 4- bytes5 field that defines the port number of the
application program in the host that is sending the segment.
6estination port address: This is a *1!bit 4- bytes5 field that defines the port number of
the application program in the host that is receiving the segment.
Se@uence nu+ber: This .-!bit 4/ bytes5 field defines the number assigned to the first byte
of data contained in this segment. T93 is a stream transport protocol. To ensure
connectivity, each byte to be transmitted is numbered. The se#uence number informs the
destination the position of the first byte of this segment in the original stream of data at the
source.
Ac$no#ed*e+ent nu+ber: This .-!bit 4/ bytes5 field defines the byte number that the
source of the segment is expecting to receive from the other end process. If host has
received successfully till byte number n from the other host, then it defines n L * as the
acknowledgement number, which indicates it is expecting data starting from location nL* at
the other hostsK stream.
Header en*th: This four!bit field indicates the length of the T93 header. It is e#ual to
number of four!byte words in the T93 header. The length of the header can be between -+
and 1+ bytes. Therefore, the value of this field can be between 0 40 x / I -+5 and *0 4*0 x
/ I 1+5.
Reserved: This is a six!bit field reserved for future use.
Contro: This field defines six different control bits or flags as shown in figure. 2ne or more
of these bits can be set at a time. These bits enable flow control, connection establishment
and termination, and the mode of data transfer in T93. $ brief description of each bit is
given below:
UR7: The value of urgent pointer is valid.
ACA: The value of acknowledgement field is valid.
PSH: <e#uest to push the data
RST: <e#uest to reset the connection.
SBN: <e#uest to synchroni,e the se#uence number during connection
FIN: <e#uest to terminate the connection.
)indo# si=e: This field defines the si,e of the window, in bytes, that the other end must
maintain. The length of this field is *1 bits, which means that the maximum si,e of the
window is 10,0.0 bytes.
Chec$su+: This *1!bit 4- bytes5 field contains the checksum, used for error checking
purpose.
Ur*ent pointer: This *1!bit field, which is valid only if the urgent flag is set, is used when
the segment contains urgent data. It defines the number that must be added to the
se#uence number to obtain the number of the last urgent byte in the data section of the
segment.
Options: There can be up to /+ bytes of optional information in the T93 header.
;/ Describe briefly how error!control mechanism is achieved in T93 when data is corrupted,
and when acknowledgement is lost.
Ans/
T93 is a reliable transport layer protocol. This means that an application program that delivers
a stream of data to T93 relies on T93 to deliver the entire stream to the application program on
NIIT Coordinator Guide Computer Networks 47
the other end in order, without error, and without any part lost or duplicated. T93 provides
reliability using error control. 6rror control includes mechanisms for detecting corrupted
segments, lost segments, out!of!order segments, and duplicated segments. 6rror control also
includes a mechanism for correcting errors after they are detected.
Error 6etection and correction: 6rror detection in T93 is achieved through the use of three
simple tools: checksum, acknowledgement, and time!out. Time!out is the duration for which the
sending T93 waits for the acknowledgement, after which it considers whether the data sent is
either corrupted or lost and retransmits the same.
6ach segment includes the checksum field, which is used to check for a corrupted segment. "y
computing checksum, one can find whether the segment is corrupted or not. If it is corrupted, it
is discarded by the destination T93. T93 uses the acknowledgement method to confirm the
receipt of those segments that have reached the destination T93 uncorrupted. If a segment is
not acknowledged before the time!out, it is considered to be either corrupted or lost.
The error!correction mechanism used by T93 is also very simple. The source T93 starts one
time!out counter for each segment sent. 6ach counter is checked periodically. )hen a counter
expires, the corresponding segment is considered to be either corrupted or lost, and the
segment will be retransmitted.
9onsider an example where data becomes corrupted while it is sent from one host to another.
In this example the source host sends segments * through ., each -++ bytes. The se#uence
number begins at *,-+* on segment *. The receiving T93 receives segments * and -, using
the checksum, finds them error free. It acknowledges the receipt of segments * and - using
acknowledgement number *,1+*, which means that it has received bytes *,-+* to *,1++ safe
and sound, and is expecting to receive byte *,1+*. 7owever, it finds that segment . to be
corrupted and discards segment .. ote that although it has received bytes *,1+* to *,>++ in
segment ., the destination does not consider this as a receipt because this segment was
corrupted. $fter the time!out for segment . expires, the source T93 will resend segment ..
$fter receiving segment ., the destination sends the acknowledgement for byte *,>+*, which
indicates that it has received bytes *,-+* to *,>++ error free.
9onsider an example where acknowledgement is lost while data is sent from one host to
another. In the T93 acknowledgement mechanism, a lost acknowledgement may not even be
noticed by the source T93. T93 uses an accumulative acknowledgement system. 6ach
acknowledgement is a confirmation that everything up to the byte specified by the
acknowledgement number has been received. 8or example, if the destination sends an $9M
segment with an acknowledgement number for byte *,>+*, it is confirming that bytes *,-+* to
*,>++ have been received. If the destination had previously sent an acknowledgement for byte
*,1+*, meaning it has received bytes *,-+- to *,1++, loss of the acknowledgement is totally
irrelevant.
.</ 6xplain why one needs the service of Argent Data operation of T93.
Ans/
T93 is a stream!oriented protocol. This means that the data is presented from the application
program to the T93 as a stream of characters. 6ach byte of data has a position in the stream.
7owever, there are occasions in which an application program needs to send urgent bytes.
This means that the sending application program wants a piece of data to be read out of order
by the receiving application program. %uppose that the sending application program is sending
data to be processed by the receiving application program. )hen the result of processing
comes back, the sending application program finds that everything is wrong. It wants to abort
the process, but it has already sent a huge amount of data. If it issues an abort command
49ontrol L 95, these two characters will be stored at the end of the receiving T93 buffer. It will
be delivered to the receiving application program after all the data has been processed.
The solution is to send a segment with the A<& bit set. The sending application program tells
the sending T93 that the piece of data is urgent. The sending T93 creates a segment and
inserts the urgent data at the beginning of the segment. The rest of the segment can contain
normal data from the buffer. The urgent pointer field in the header defines the end of the urgent
data and the start of normal data.
NIIT Coordinator Guide Computer Networks 48
)hen the receiving T93 receives a segment with the A<& bit set, it extracts the urgent data
from the segment, using the value of the urgent pointer, and delivers it, out of order, to the
receiving application program.
NIIT Coordinator Guide Computer Networks 49
../ 6xplain the concept of (ultiplexing and Demultiplexing in T93.
Ans/
The concept of multiplexing and demultiplexing operation is as follows:
(utipe,in*: $t the source host, there may be several processes that need to send user
datagrams. 7owever, there is only one T93. This is a many!to!one relationship and
re#uires multiplexing. T93 accepts messages from different processesG each message will
have a port number assigned to it, which identifies the process, which generated the
message. $fter adding the header, T93 passes the user datagram to I3.
6e+utipe,in*: $t the receiver site, there is only one T93. 7owever, we may have many
processes that can receive user datagrams. This is a one!to!many relationship and
re#uires demultiplexing. T93 receives user datagrams from I3. $fter error checking and
dropping of the header, T93 delivers each message to the appropriate process based on
the port numbers.
.1/ 6xplain the need of 3ushing Data operation in T93.
Ans/
In certain situations, the sending T93 uses a buffer to store the stream of data coming from the
sending application program. The sending T93 has the choice to create segments of any si,e
from the stream. The receiving T93 also buffers the data when they arrive and delivers them to
the application program when the application program is ready or when the receiving T93 feels
that it is convenient. This type of flexibility increases the efficiency of T93.
7owever, there are occasions in which the application program is not comfortable with this
flexibility. 8or example, consider an application program that communicates interactively with
another application program on the other end. The application program on one site wants to
send a keystroke to the application at the other site and receive an immediate response.
Delayed transmission and delayed delivery of data may not be acceptable by the application
program.
T93 can handle such a situation. The application program on the sending site can re#uest a
push operation. This means that the sending T93 should not wait for the window to be filled. It
should create a segment and send it immediately. The sending T93 should also set the push
bit 43%75 to tell the receiving T93 that the segment includes data that must be delivered to the
receiving application program as soon as possible and not to wait for more data to come.
$lthough the push operation can be dictated by the application program, today most
implementations ignore such re#uests. T93 has the choice to use this operation or not.
.2/ 6xplain how connection is established in T93 using three!way hand shaking.
Ans/
The connection establishment in T93 is called three!way handshaking. In this procedure, an
application program, called the client, wants to make a connection with another application
program, called the server, using T93 as the transport layer protocol.
The three!way handshaking procedure starts with the server. The server program tells its T93
that it is ready to accept a connection. This is called a re#uest for a passive open.
The client program makes a re#uest for an active open. $ client that wishes to connect to a
server tells its T93 that it needs to be connected to a particular server. The clients T93 can
now start the three!way handshaking process.
The steps of the process are as follows:
The client sends the first segment, with the %Y bit set, which is known as %Y segment. The
segment includes the source and destination port numbers. The destination port number
clearly defines the server to which the client wants to be connected. The segment also
contains the client Initiali,ation %e#uence umber 4I%5 used for numbering the bytes of data
NIIT Coordinator Guide Computer Networks 5
sent from the client to the server. If the client needs a large window, it defines the window scale
factor here using the appropriate option. This segment defines the wish of the client to make a
connection with certain parameters.
The server sends the second segment, a %Y and $9M segment. This segment has a dual
purpose. 8irst, it acknowledges the receipt of the first segment using the $9M flag and
acknowledgement number field. The acknowledgement is the client initiali,ation se#uence
number plus one. The server must also define the client window si,e. %econd, the segment is
used as the initiali,ation segment for the server. It contains the initiali,ation segment for the
server and initiali,ation se#uence number used to number the bytes sent from the server. $s
mentioned before, this is two segments combined into one.
The client sends the third segment. This is ?ust an $9M segment. It acknowledges the receipt
of the second segment using the $9M flag and acknowledgement number field. The
acknowledgement number is the server initiali,ation se#uence number plus one. The client
must also define the server window si,e. ote that data can be sent with the third packet.
.3/ Describe briefly how 8low!control is achieved in T93 using sliding window mechanism.
Ans/
To accomplish flow control, T93 uses a sliding window protocol. )ith this method, both hosts
use a window for each connection. The window covers a portion of the buffer that a host can
send before worrying about an acknowledgement from the other host. The window is called a
sliding window because it slides over the buffer as the receiver sends acknowledgement of the
bytes received without any error. 9onsider a sliding window of si,e *+. "efore receiving any
acknowledgement from the destination, the source can send up to *+ bytes. 7owever, if it
receives acknowledgement of the first three bytes, it can slide the window three bytes to the
right. This means that now it can send *+ more bytes before worrying about an
acknowledgement.
The previous example shown is a fixed si,e window. 7owever flow;control needs the si,e of the
window to vary to achieve the flow control. 7ence in T93 window si,e is variable. The
destination, in each acknowledgement segment, can define the si,e of the window. The
advertised si,e is relative to the acknowledgement number. 8or example, if the receiver
acknowledges the receipt of byte .,+++ and defines the si,e of the window to be -++, it means
that the window now expands from byte .++* to byte .,-++.
The destination can also increase or decrease the si,e of the window in an acknowledgement
segment.
FA-
./ )hat does process!to!process communication mean;
Ans0
There may be several processes running on a computer. Thus, source to destination delivery
involves not only the delivery of a message from one computer system to another but also from
one process to another across the two systems. The Transport layer does this by including a
service!point address on its header, which ensures the delivery of the message to the right
process.
1/ )hat is a socket address;
Ans0
%ocket address is a combination of an I3 address and a port number.
2/ )hat is checksum;
Ans0
NIIT Coordinator Guide Computer Networks 51
The error detection method used by most of the T93:I3 protocols is called checksum. The
checksum protects against the corruption that may occur during the transmission of a packet.
NIIT Coordinator Guide Computer Networks 52
3/ 7ow does T93 ensure reliable data delivery;
Ans0
There are a number of aspects that T93 needs to manage for reliable delivery of data between
the computers on a network. These are error control, se#uence control, loss control, and
duplication control:
Error contro: T93 implements error control by ensuring that the data sent by the sending
machine is delivered at the destination machine exactly as it originated from the source
machine. The Data 'ink layer takes care of error control, but only for computer!to!computer
delivery. 7owever, T93 ensures source!to!destination reliability while implementing error
control. 2ne method of implementing reliability is through acknowledgements. )hen a
packet is delivered to a destination computer, an acknowledgement of receipt is returned to
the source computer. In this way, the Transport layer tracks and validates the transmission
of each packet.
Se@uence contro: T93 is responsible for ensuring the correct se#uence of data both at
the senderKs end and at the receiverKs end. $t the senderKs end, the Transport layer
receives data from the upper layers and ensures that the data is usable by the lower layers.
$t the receiverKs end, the Transport layer ensures that the data is assembled correctly. T93
also makes use of the se#uence numbers. It assigns a se#uence number to each segment
that it transfers. These se#uence numbers enable the message to be reassembled in an
ordered manner at the destination. The se#uence numbers also help to identify and replace
the packets that are lost during transmission.
%oss contro: T93 also ensures that all the segments of data are delivered to the
destination machine. %ome segments of data may be lost during transmission due to the
segmentation of data. T93 uses the se#uence numbers to identify the segments that are
missing and re#uests for the redelivery of those segments.
6upication contro: T93 guarantees that none of the segments of data arrive duplicated
at the destination machine. In addition to identifying the missing segments of data, the
se#uence numbers also help to identify and discard the segments that are duplicated.
4/ )hat is buffer;
Ans0
$ buffer is a data area shared by hardware devices or program processes that operate at
different speeds or with different sets of priorities. The buffer allows each device or process to
operate without being held up by the other. In order for a buffer to be effective, the si,e of the
buffer and the algorithms for moving data into and out of the buffer need to be considered by
the buffer designer. 8or stream delivery, the sending and receiving T93s use buffers. The
sending T93 uses a buffer to store the data coming from the sending application program. The
receiving T93 receives the segments and stores them in a receiving buffer. The receiving
application program uses the read operation to read the data from the receiving buffer, but it
does not have to read all of the data contained in one segment in one operation. %ince the rate
of reading can be slower than the rate of receiving, the data is kept in the buffer until the
receiving application reads if completely.
8/ )hat is full duplex service;
Ans0
T93 offers fll;d#le9 service, where data can flow in both directions at the same time. $fter
two application programs are connected to each other, they can both send and receive data.
2ne T93 connection can carry data from application $ to " and at the same time, from " to $.
)hen a packet is going from $ to ", it can also carry an acknowledgement of the packets
received from ". 'ikewise, when a packet is going from " to $, it can also carry an
acknowledgement of the packets received from $. This is called piggybacking because
acknowledgements can be sent with data.
NIIT Coordinator Guide Computer Networks 53
9/ )hat is an out!of!order segment;
Ans0
T93 uses the services of I3, an unreliable, connectionless network layer protocol. The T93
segment is encapsulated in an I3 datagram. 6ach datagram is an independent entity. The
routers are free to send each datagram through any route they find suitable. 2ne datagram
may follow a route with a short delayG another may follow another route with a longer delay.
Therefore, datagrams may arrive out of order. If datagrams arrive out of order, the T93
segments that are encapsulated in the datagrams will be out of order as well. This is called an
out!of!order segment.
:/ )hat is the difference between pushing data and urgent data;
Ans0
The difference between pushing data and urgent data is:
Pushin* data: The application program on the sending site can re#uest a push operation.
This means that the sending T93 should not wait for the sliding window to be filled. It
should create a segment and send it immediately. The sending T93 should also set the
push bit 43%75 to inform the receiving T93 that the segment includes data that must be
delivered to the receiving application program as soon as possible and not to wait for more
data to come.
Ur*ent data: 9onsider a situation where an application program needs to send urgent
bytes. This means that the sending application program wants a piece of data to be read
out of order by the receiving application program. %uppose that the sending application
program is sending data to be processed by the receiving application program. )hen the
result of processing comes back, the sending application program finds that everything is
wrong. It wants to abort the process, but it has already sent a huge amount of data. If it
issues an abort command 49ontrol L 95, these two characters will be stored at the end of
the receiving T93 buffer. It will be delivered to the receiving application program after all
the data has been processed.
The solution is to send a segment with the A<& bit set. The sending application program tells
the sending T93 that the piece of data is urgent. The sending T93 creates a segment and
inserts the urgent data at the beginning of the segment. The rest of the segment can contain
normal data from the buffer. The urgent pointer field in the header defines the end of the urgent
data and the start of normal data.
)hen the receiving T93 receives a segment with the A<& bit set, it extracts the urgent data
from the segment, using the value of the urgent pointer, and delivers it, out of order, to the
receiving application program.
;/ Identify the two protocols present in the Transport layer.
Ans0
The two protocols present in the Transport layer are AD3 and T93.
.</ )hat is the length of following addresses in terms of bytes;
a. 3hysical address
b. I3 address
c. 3ort address
Ans0
a. Ph!sica address: 1 bytes
b. IP address: / bytes
c. Port address: - bytes
NIIT Coordinator Guide Computer Networks 54
Chapter Si,
Objectives
In this chapter, the students have learned to:
Anderstand the client server model
Define process
Anderstand 8T3
Focus Areas
This chapter explains the application layer. You can explain the client server model with the
help of an example. You can say that in a market when you re#uesting for an item from the
shopkeeper, you are the client. %imilarly, there is the concept of client in a network. The )eb
browser is the client, which re#uests for websites from the server. The server is like the
shopkeeper.
You should refer to application layer given in the $dditional Inputs section.
6xplain the issues involved in the application layer using a client server model. 6xplain how a
client program operates. 6xplain the concepts of active open, passive open, and concurrency.
$lso explain the two ways in which a server program can operate, concurrently or iteratively.
6xplain the difference between a program and a process. 8inally, explain how the 8T3 48ile
Transfer 3rotocol5 network application operates. Discuss the various commands of 8T3.
If time permits, you can list the various protocols in the application layer given in the $dditional
Inputs section.
Additiona Inputs
The following section provides some extra inputs on the important topics covered in the %&:
The Appication %a!er
The $pplication layer is the layer closest to the end!user. This layer provides protocols that are
commonly needed and provides an interface that applications use to access network resources.
8or example, a full!screen editor that is supposed to work over a network generally has to work
with many different terminal types. 6ach terminal may have different screen layoutsG escape
se#uences for inserting and deleting text, moving the cursor, etc. In this situation, it is very
difficult for the screen editor to work with the incompatible terminal types.
2ne way to solve this problem is to define an abstract network virtual terminal. This virtual
terminal is managed by using editors and other programs. To handle each terminal type, a code
must be written to map the functions of the network virtual terminal with the real terminal. 8or
example, when the editor moves the virtual terminalCs cursor to the upper left!hand corner of the
screen, the proper command se#uence must be issued to the real terminal to get its cursor
there too. The entire virtual terminal software is in the $pplication layer.
Thus, the main function of the $pplication layer is to provide network services to the end!user or
the computer application. 9omputer applications can be divided into three groups:
Net#or$ appications: These applications are specifically designed for working on a
network. 8or example, using the Telnet program, you can connect to a remote machine and
operate it.
Standaone appications: These application programs are for individual access and are
not designed for a network. %olitaire is an example of a standalone application.
E+bedded appications: These applications have other network applications imbedded in
them. (icrosoft )ord is an example of an imbedded application as it allows you to imbed
and activate e!mail or )eb site references within a document.
NIIT Coordinator Guide Computer Networks 55
$nother important function of the $pplication layer is file transfer. The $pplication layer handles
the different file systems because they have different file naming conventions, different ways of
representing text lines, and so on. The $pplication layer also handles e!mail, remote ?ob entries,
directory lookups, and various other general!purpose and special!purpose facilities.
Protocos in the Appication %a!er
The $pplication 'ayer implements a host of protocols that provide network connectivity and
data transfer services for users. %ome $pplication layer protocols include 8ile Transfer 3rotocol
48T35, Telnet, %imple (ail Transfer 3rotocol 4%(T35, 7ypertext Transfer 3rotocol 47TT35,
%imple etwork (anagement 3rotocol 4%(35, Domain aming %ervice 4D%5, and Dynamic
7ost 9onfiguration 3rotocol 4D7935. The following table provides a brief description of these
protocols:
Protocol Description
F)P F)P is sed to transfer files from one s"stem to another
on a network(
)elnet )elnet is sed to access a remote s"stem on a network
and #erform o#erations on it(
S<)P S<)P is sed to transfer e;mail messages *etween the
mail servers on a network, or *etween mail clients and
a mail server(
:))P :))P is sed to e9change te9t, gra#hics, image, adio,
and video files over the ===(
S4<P S4<P is sed to monitor and manage network devices
and their fnctions(
D4S D4S is sed #rimaril" to ma# or resolve a hostname to
an IP address(
D:3P D:3P is sed to d"namicall" allocate IP addresses on
a network(
Chapter Si, -uestions
Part .
./ In T93:I3 model, the session and presentation layers are integrated with BBBBBBBBB layer.
Ans.
$pplication
1/ In T93:I3 the two communicating process can be best described using the
BBBBBBBBBBBBBBBBBB model.
Ans.
9lient!server
2/ In client!server, the BBBBBBBBB program is always running.
Ans.
%erver
NIIT Coordinator Guide Computer Networks 56
3/ 9onnection!oriented concurrent server uses the service of BBBBBBBB transport protocol.
Ans.
T93
4/ In client!server model, a user wanting a particular service runs the BBBBBBBB program.
Ans.
$pplication
8/ 8T3 is used to transfer BBBBBBBB from one host to another.
Ans.
8iles
9/ 8T3 uses BBBBBBBBB protocol, for transmission purpose.
Ans.
8ile transfer
:/ The number of connections re#uired for 8T3 operation is BBBBBB.
Ans.
Two
;/ 9ommands are sent over BBBBBBBB connection.
Ans.
9ontrol
.</ Information regarding the file, such as file type, structure, and transmission mode are sent
to the server BBBBBBB the data transfer takes place.
Ans.
"efore
Part 1
./ )rite a brief description about 9lient!server model.
Ans/
The purpose of a T93:I3 or Internet is to provide data communication services to users. The
hurdles created because of the geographical distance while accessing information from another
host should be minimi,ed. If a user at a local host computer wishes to receive a service from a
computer at a remote site. 9omputer executes specific programs to perform the specific ?ob.
There would be a program to do the )ord processing, a program to browse the web site and so
on. In other words for data communication to take place, a computer runs a program to re#uest
a service from another program residing on the destination computer. This means that two
computers connected by an Internet should each run a program, one to provide a service and
one to re#uest a service.
It is important to determine beforehand, who makes the re#uest for service and who offers it.
Issue of whether both the application programs are able to re#uest services and provide
NIIT Coordinator Guide Computer Networks 57
services or should the application programs ?ust do one or the other, must be resolved. 2ne
solution is to have an application program, called the client, running on the local host computer,
re#uest a service from another application program, called the server, running on the remote
computer. In other words, the task of re#uesting program is either a re#uester 4a client5, or a
provider 4a server5. If a machine needs to re#uest a service and provide a service, two
application programs must be installed. In other words, application programs come in pairs.
$n application program in a client server model provides services to any application program
installed anywhere in an Internet that re#uests this service. Therefore, a server provides service
to any client. In other words, the client!server relationship is many!to!one. (any clients can use
the services of one server.
In a client server model, a client program, which re#uests a service, should run only when it is
needed. The server program, which provides a service, should run all the time because it does
not know when its service is needed.
1/ )hat is a connectionless!iterative server; Asing a diagram explain the same.
Ans/
The servers that use AD3 are normally iterative, which means that the server processes one
re#uest at a time. $ server gets the re#uest received in a datagram from AD3, processes the
re#uest, and gives the response to AD3 to send to the client. The server pays no attention to
the other datagrams. These datagrams are stored in a #ueue, waiting for service. They could
all be from one client or from many clients. In either case they are processed one by one in
order of arrival.
The following figure illustrates the same:

Connectionless!terative Server
2/ )rite a brie" description about the connection-oriented concurrent server/
Ans/
The servers that use TCP are nor+a! concurrent/ This +eans that the server can serve
+an! cients at the sa+e ti+e/ Co++unication is connection-orientedC #hich +eans
that a re@uest is a strea+ o" b!tes that can arrive in several segments and the response can
occupy several segments. $ connection is established between the server and each client, and
NIIT Coordinator Guide Computer Networks 58
the connection remains open until the entire stream is processed and the connection is
terminated.
This type of server cannot use only one well!known port because each connection needs a port
and many connections may be open at the same time. (any ports are needed, but a server can
use only one
well!known port. The solution is to have one well!known port and many ephemeral ports. The
server makes a passive open at the well!known port. $ client can make its initial approach to
this port to make the connection. $fter the connection is made, the server assigns a temporary
port to this connection to free the well!known port. Data transfer can now take place between
these two temporary ports, one at the client site and the other at the server site. The well!
known port is now free for another client to make the connection. The idea is to push
demultiplexing to T93 instead of the server.
The server must also have one buffer for each connection. The segments coming from the
client are stored in the appropriate buffer, and will be served concurrently by the server.
To provide this service, most implementations use the concept of parent and child servers. $
server running infinitely and accepting connections from the clients is called a parent server.
The parent uses the well!known port. $fter it makes a connection, the parent server creates a
child server and an ephemeral port and lets the child server handle he service. It thereby frees
itself so that it can wait for another connection.
3/ 6xplain the concept of process.
Ans/
$ process is an instance of a program. )hen the operating system executes a program, an
instance of the program, a process, is created. The operating system can create several
processes from one program, which means several instances of the same program are running
at the same time 4concurrently5. $lthough all processes have the same data types, memory is
allocated for each process separately. In addition, the values stored in variables may be totally
different from one process to another. The functions executed by each process of the same
program may differ, as each may take different inputs.
4/ )rite a short note on 8T3.
Ans/
8ile transfer protocol 48T35 is the standard mechanism provided by T93:I3 for copying a file
from one host to another. Transferring files from one computer to another is one of the most
common tasks expected from the networking environment.
$lthough transferring files from one system to another seems simple and straightforward, some
problems must be dealt with first. 8or example, two systems may use different file name
conventions. Two systems may have different ways to represent text and data. Two systems
may have different directory structures. $ll of these problems have been solved by 8T3 in a
very simple and elegant approach.
8T3 differs from other client!server applications in that it establishes two connections between
the hosts. 2ne connection is used for data transfer, the other for control information
4commands and responses5. %eparation of commands and data transfer makes 8T3 more
efficient. The control connection uses very simple rules of communication. )e need to transfer
only a line of command or a line of response at a time. The data connection, on the other hand,
needs more complex rules due to the variety of data type transferred.
8T3 uses two well!known T93 ports, 3ort -* is used for the control connection, and port -+ is
used for the data connection.
The client has three components: user interface, client control process, and the client data
transfer process. The server has two components: the server control process and the server
data transfer process. The control connection is made between the control processes. The
data connection is made between the data processes. The control connection remains
NIIT Coordinator Guide Computer Networks 59
connected during the entire interactive 8T3 session. The data connection is opened and then
closed for each file transferred. It opens each time commands that involve transferring files are
used, and it closes when the file is transferred. %imilarly, when a user starts an 8T3 session,
the control connection is opened. )hile the control connection is open, the data connection
can be opened and closed multiple times if several files are transferred.
The two 8T3 connections control and data use different strategies and different port numbers.
NIIT Coordinator Guide Computer Networks 6
8/ )rite a brief description about the control connection used in 8T3.
Ans/
The control connection is created in the same way as other application programs described so
far.
There are two steps:
*-. The server issues a passive open on the well!known port -* and waits for a client.
*.. The client uses an ephemeral port and issues an active open connection to the port -* of
server process.
The connection remains open during the entire process. The service type, used by the I3
protocol, is to minimi,e delay because this is an interactive connection between a user 4human5
and a server. The user types commands and expects to receive responses without significant
delay. $fter the initial connection, the server process creates a child process and assigns the
duty of serving the client to the child process using an ephemeral port.
9/ )rite a brief description about the data connection used in 8T3.
Ans/
The data connection uses the well!known port -+ at the server site. 7owever, the creation of a
data connection is different from what we have seen so far. The following shows how 8T3
creates a data connection:
*/. The client, not the server, issues a passive open using an ephemeral port. The client must
do this because it is the client that issues the commands for transferring files.
*0. The client sends this port number to the server using the 32<T command.
*1. The server receives the port number and issues an active open using the well!known port
-+ and the received ephemeral port number.
*D. $fter the initial connection, the server process creates a child process and assigns the duty
of serving the client to the child process using an ephemeral port.
:/ )rite a brief note on the 9ommands processing. Describe the groups into which 9ommands
4that are sent from client to server5 can be divided.
Ans/
8T3 uses the control connection to establish a communication between the client control
process and the server control process. During this communication, the commands are sent
from the client to the server and the responses are sent back from the server to the client.
Co++ands: )e can roughly divide the commands into six groups: access commands, file
management commands, data formatting commands, port defining commands, file transferring
commands, and miscellaneous commands.
Access co++ands: These commands let the user access the remote system.
9ommands are ! A%6<, 3$%%, $99T, <6I, NAIT, $"2<
Fie +ana*e+ent co++ands: These commands let the user access the file system on the
remote computer. They allow the user to navigate through the directory structure, create new
directories, delete files, and so on.
9ommands are H 9)D, 9DA3, D6'6, 'I%T, O.
6ata "or+attin* co++ands: These commands let the user define the data structure, file type
and transmission mode. The defined format is then used by the file transfer commands.
9ommands are H TY36, %T<A, and (2D6.
Port de"inin* co++ands: These commands define the port number for the data connection
on the client site.
9ommands are H 32<T, 3$%@
NIIT Coordinator Guide Computer Networks 61
Fie trans"er co++ands: These commands actually let the user transfer files.
<6T<, %T2<, $336, %T2A, O.
(isceaneous co++ands: These commands deliver information to the 8T3 user at the client
site.
9ommands are ! 76'3, 223, O
;/ "riefly explain the steps involved in storing an image file into the server from client side.
Ans/
The steps involved in storing an image file into the server from client side are as follows:
*>. The control connection to port -* is created.
*=. $fter the control connection to port -* is created, the 8T3 server sends the --+ 4service
ready5 response on the control connection.
-+. The client sends the A%6 command 4this A%6< command passes the user information to
server5.
-*. The server responds with ..* 4user name is 2M, a password is re#uired5.
--. The client sends the 3$%% command 4sends the password for the user5.
-.. The server responds with -.+ 4user login 2M, if user id and password match5.
-/. The client issues a passive open on an ephemeral port for data connection and sends the
32<T command 4over the control connection5 to give this port number to the server.
-0. The server does not open the connection at this time, but prepares itself for issuing an
active open on the data connection between port -+ 4server side5 and the ephemeral port
received from the client. It sends the response *0+ 4data connection will be open shortly5.
-1. The client sends the TY36 command 4to indicate the type of data as binary O5
-D. The server responds with response -++ 4command 2M5
->. The client sends the %T<A command 4defines the data following as of file type.5
-=. The server responds with response -++ 4command 2M5
.+. The client sends the %T2< command 4to re#uest the server to store the data5
.*. The server opens the data connection and sends the message -0+.
.-. The client sends the file on the data connection. $fter the entire file is sent the data
connection is closed. 9losing the data connection means end!of!file.
... The server sends the response --1 on the control connection.
./. The client sends the NAIT command 4or it can send the other commands to open another
data connection for transferring another file5.
.0. The server responds with --* 4service closing5 and it closes the control connection.
FA-
./ )hat is concurrency;
Ans0
9oncurrency means the ability to run simultaneously. "oth clients and serves can run in
concurrent mode. 7owever, the concurrency in clients and server differ from each other.
Concurrenc! in Cients0
9lients can be run on a computer either iteratively or concurrently. <unning clients iteratively
means running them one by oneG one client must start, run, and terminate before the computer
can start another client. 7owever today, most computers allow concurrent clients, that is, two
or more clients running at the same time.
Concurrenc! in Servers
"ecause an iterative server can process only one re#uest at a time, it receives a re#uest,
processes it, and sends the response to the re#uestor before it handles another re#uest. If
there is a re#uest from another client, then it has to either re?ect the re#uest or keep the re#uest
in waiting until the server finishes the first one. 2n the other hand, a concurrent server can
process many re#uests at the same time and thus can share its time between many re#uests.
NIIT Coordinator Guide Computer Networks 62
1/ )hat are a connectionless iterative server and a connectionless concurrent server;
Ans0
Connectioness iterative server: The servers that use AD3, a connectionless transport layer
protocol, are normally iterative. This means that the server processes one client re#uest at a
time in order of their arrival. $ server receives the re#uest in a datagram from AD3, processes
the re#uest, and gives the response to AD3 to send to the client.
Connectioness concurrent server: The servers that use AD3, a connectionless transport
layer protocol can also be iterative. This means that the server processes multiple client
re#uests at the same time. This type of server will be found occasionally.
2/ )hat are a connection!oriented iterative server and a connection!oriented concurrent server;
Ans0
Connection-oriented iterative server: The servers that use T93, a connection!oriented
transport layer protocol can be concurrent. This means that the server can serve one client
re#uest at a time. This type of server will be found occasionally.
Connection-oriented concurrent server: The servers that use T93, a connection!oriented
transport layer protocol, are normally concurrent. This means that the server can serve many
clients at the same time. 9ommunication is connection!oriented, which means that a re#uest is
a stream of bytes that can arrive in several segments and the response can occupy several
segments. $ connection is established between the server and each client, and the connection
remains open until the entire stream is processed and the connection is terminated.
3/ )hat is an active open connection;
Ans0
$ client opens the communication channel using the I3 address of the remote host and the
well!known port address of the specific server program running on that machine. This is called
an active o#en connection.
4/ )hat is a passive open connection;
Ans0
$ server opens the channel for incoming re#uests from clients, but it never initiates a service
until it is re#uested to do so. This is called a #assive o#en connection.
8/ )hat is a control connection;
Ans0
8T3 uses $%9II character set to communicate across the control channel. 9ommunication is
achieved through commands and responses. This simple method is ade#uate for the control
connection because we send one command 4response5 at a time. 6ach command or response
is only one short line so we need not worry about file format or file structure. 6ach line is
terminated with a two!character 4carriage return and line feed5 end!of!line token.
9/ )hat is data connection;
Ans0
Data connection allows you to transfer files after defining the types of file to be transferred, the
structure of the data, and the transmission mode. "efore sending the file through the data
connection, you need to prepare for transmission through the control connection. The
heterogeneity problem is resolved by defining three attributes of communications: file type, data
NIIT Coordinator Guide Computer Networks 63
structure, and transmission mode. $ common format for the above three attributes is agreed
upon before actually transferring the data.
NIIT Coordinator Guide Computer Networks 64
:/ )rite a brief description about client!server model.
Ans0
The purpose of a client!server model is to provide data communication services to users. In the
client!server model, an application program, called the client, re#uests for a service from
another application program, called the server. In other words, when a machine needs to
re#uest for a service, it is called a re#uester or a client. )hen a machine provides a service, it
is called a provider or a server.
;/ )rite a short note on 8T3.
Ans0
8ile transfer protocol 48T35 is the standard mechanism provided by T93:I3 to copy a file from
one host to another. )hen two systems use different file name conventions, different ways to
represent text and data, and different directory structures, you can use 8T3 in such a situation
to transfer files. 8T3 establishes two connections between the hosts. 2ne connection is used
for data transfer and the other for control information 4commands and responses5. 8T3 uses
two well!known T93 ports, port -+ is used for the data connection and port -* is used for the
control connection.
.</ )hat are the common 8T3 commands for processing;
Ans0
8T3 uses the control connection to establish a communication between the client control
process and the server control process. During this communication, the 8T3 commands are
sent from the client to the server and the responses are sent back from the server to the client.
You can divide the 8T3 commands into six groups: access commands, file management
commands, data formatting commands, port defining commands, file transferring commands,
and miscellaneous commands.
Access Co++ands: These commands let the user access the remote system.
9ommands are ! A%6<, 3$%%, $99T, <6I, NAIT, $"2<
Fie (ana*e+ent Co++ands0 These commands let the user access the file system on the
remote computer. They allow the user to navigate through the directory structure, create new
directories, delete files, and so on.
9ommands are H 9)D, 9DA3, D6'6, 'I%T, O
6ata For+attin* Co++ands0 These commands let the user define the data structure, file type
and transmission mode. The defined format is then used by the file transfer commands.
9ommands are H TY36, %T<A, and (2D6.
Port 6e"inin* Co++ands0 These commands define the port number for the data connection
on the client site.
9ommands are H 32<T, 3$%@
Fie Trans"er Co++ands0 These commands actually let the user transfer files.
<6T<, %T2<, $336, %T2A, O
(isceaneous Co++ands0 These commands deliver information to the 8T3 user at the client
site.
9ommands are ! 76'3, 223, O
NIIT Coordinator Guide Computer Networks 65

Anda mungkin juga menyukai