Vous êtes sur la page 1sur 36

1

Briefly explain the OSI architecture.?


Open System Interconnection (OSI) protocol architecture, defined by the International
Standards Organiation (ISO), includes a set of protocols to define and standardie the
data communication process. It defines ho! data communications ta"e place in the real
!orld and !hat protocols should be used at each layer. #he follo!ing are the salient
features of OSI protocol architecture$ Layered architecture$ #he OSI model is composed
of se%en ordered layers$ &hysical (layer 1), 'ata lin" (layer (), )et!or" (layer *),
#ransport (layer +), Session (layer ,), &resentation (layer -), and .pplication (layer /).
0ithin a single computer system, each layer calls upon the ser%ices of the layer 1ust belo!
it. 2or example, )et!or" layer (layer *) uses the ser%ices pro%ided by the 'ata lin" layer
(layer () and it pro%ides ser%ices to #ransport layer (3ayer +). Peer-to-peer process$ #he
processes on each system that communicate at a gi%en layer are called peer4to4peer
processes. 5ommunication bet!een machines is therefore a peer4to4peer processes
communicating to each other using protocols appropriate to the gi%en layer. .t the
physical layer, communication is direct. 6o!e%er, at the higher layers, communication
must mo%e do!n through the layers on 'e%ice ., o%er to the de%ice B, and then bac" up
through the layers. 7ach layer in the sending de%ice adds its o!n information to the
message it recei%es from the layer 1ust abo%e it and passes the !hole pac"age to the layer
1ust belo! it. 6eaders are added to the data at layers -,,,+,* and (. #railers are usually
added only at layers (. Layer organization$ #he se%en layers can be thought of as
belonging to three subgroups. #he layers 1, (, and *, called the &hysical, 'ata 3in", and
)et!or" layers respecti%ely, are the net!or" support layers. #hey deal !ith the physical
aspects of mo%ing data from one de%ice to another de%ice. #he layers ,, -, and /, called
Session, &resentation, .pplication respecti%ely, are the user support layers. #hey allo!
interoperability among unrelated soft!are systems. #he layer + called the #ransport layer
lin"s the t!o subgroups and ensures that the upper layers can use the data that the lo!er
layers ha%e transmitted. #he upper OSI layers are implemented in soft!are. #he lo!er
OSI layers are a combination of hard!are and soft!are, except for the physical layer,
!hich is mostly hard!are.
Write in detail about the different addressing mechanisms used in the TCP/IP
model.
8#5&9I& model has the follo!ing three different le%els of addressing$ Physical address$
#his is the address of a node at the data lin" layer, as defined by the 3.) or 0.). It is
included in the frame sent by the data lin" layer. #his address determines the host system
on a particular net!or". #he #5&9I& does not define the sie and format of the physical
address and it depends on the "ind of the net!or". 2or example, 7thernet 3.) uses - byte
(+: bit) physical address that is imprinted into the )et!or" Interface 5ard. &hysical
addresses can be either unicast, multicast or broadcast. Internet address$ Internet
addresses are necessary for uni%ersal communication ser%ices that are independent of
underlying physical net!or". &hysical net!or"s ha%e different addressing format
depending upon the net!or" technology used. In addition, the addressing does not ha%e
any component using !hich one can identify the net!or" to !hich it is connected; !hich
is essential for the routing purpose. #he Internet addresses are designed for this purpose.
.n Internet address is currently a *( bit (+ byte) address, !hich can uni<uely identify a
host, connected to the Internet. )o t!o hosts on the Internet can ha%e the same I& address.
++
1
.lso, Internet addresses are defined such a !ay that gi%en an I& address one can easily
identify the net!or" to !hich it is connected so that routing becomes easy. Port address:
#he I& address and the physical address identify the source and the destination systems.
#hey do not identify the process (a running program on the computer) on these systems to
!hich the data actually corresponds. #he final ob1ecti%e of the Internet communication is
pro%iding a communication lin" bet!een t!o processes running on t!o different systems.
2or example, data sent by the 2#& (2ile #ransfer &rotocol) client process from system .
should reach the 2#& ser%er process at the system B. It should not reach the =.I3 ser%er
process running on the system B. So it is not only crucial to identify the end systems to
!hich the data meant, but also the end processes are also to be identified. #o achie%e this,
different processes are labeled uni<uely. In #5&9I&, this labeling is called as port address.
. port address is 1- bits long (( byte).
Explain the functionalities and the services offered by the transport layer of the OI
model.
!#he #ransport layer is responsible for end 4 to > end data transmission, flo! control,
error chec"ing, and reco%ery. #he transport layer is designed to pro%ide the transparent
transfer of data from a source end open system to a destination end open system to a
destination end open system. #he transport layer establishes, maintains, and terminates
communications lin"s bet!een t!o machines. #he transport layer ensures data is
successfully sent and recei%ed bet!een t!o end systems. If data is sent incorrectly, this
layer has the responsibility to as" for retransmission of the data. .lso it ensures data are
passed onto the upper layers in the same order in !hich they !ere sent. Specifically , it
pro%ides a reliable , net!or" >independent message >interchange ser%ice to the top >three
application >oriented layers. #his layer acts as an interface bet!een the bottom and top
three layers. By pro%iding the session layer !ith a reliable message transfer ser%ice, it
hides detailed operation of the underlying net!or" from the session layer .Some of the
important tas" that are performed by the transport layer in order to meet the abo%e
re<uirement are (i) ser%ice >point addressing ,?(ii) segmentation and @eassembly. .part
from the other abo%e tas", some other tas"s that are performed by the transport layer are
connection control, flo! control, error control. Explain the different classes of IP
addresses. Write briefly about" given an IP address ho# to find its class.
#he Inter)I5 (#he InternetAs )et!or" Information 5enter) allocates the I& addresses. #he
bits that correspond to the net!or" I' are set to 1. #he bits that correspond to the host I'
are set to B. #hese I& addresses are di%ided into 5lass ., 5lass B, 5lass 5, 5lass ', and
5lass 7. 7nd users do not use the 5lass ' and 5lass 7 I& addresses. Class A IP address:
Cou can ha%e 5lass . I& addresses in your net!or" if you ha%e large number of hosts.
#he default subnet mas" used in the 5lass . I& address is (,,.B.B.B. In addition, they ha%e
the first octet from B41(/. 2or example, 11.,(.*-.: is a 5lass . I& address. Class B IP
address: Cou can ha%e 5lass B I& addresses if your organiation has medium4sied
+,
1
net!or"s. #he default subnet mas" used in the 5lass B I& address is (,,.(,,.B.B. In
addition, they ha%e the first octet from 1(:41D1. 2or example, 1/(.,(.*-.: is a 5lass B I&
address. Class C IP address$ 5lass 5 I& addresses are used in small local area net!or"s.
#he default subnet mas" used in the 5lass 5 I& address is (,,.(,,.(,,.B. In addition, they
ha%e the first octet from 1D(4((*. 2or example, 1D(.,(.,-.: is a 5lass 5 I& address. Class
D IP address$ 5lass ' I& addresses are reser%ed for I& multicast addresses. =icrosoft
supports class ' I& addresses for multicast applications to multicast data to hosts on an
internet!or". #hese hosts are designed to recei%e multicast data. Class E IP address: #he
class 7 I& addresses are for experimental purposes. #hey are not in use. #he four high4
order bits are al!ays set to binary 1 1 1 1. #here are t!o !ays of determining the class of
an address depending on the format it is represented. If the address is gi%en in the form of
binary then depending upon the first fe! bits one can identify the class. If the first bit is B
then it is 5lass ., If the first ( bits are 1B > 5lass B, If the first * bits are 11B > 5lass 5, If
the first + bits are 111B > 5lass ', If the first + bits are 1111 > 5lass 7. 6o!e%er mostly
the addresses are gi%en in the decimal notation, !hich re<uires follo!ing method for
determining the class. 5lass .$ first number is bet!een B and 1(/, 5lass B$ first number is
bet!een 1(: and 1D1, 5lass 5$ first number is bet!een 1D( and ((*, 5lass '$ first
number is bet!een ((+ and (*D, 5lass 7$ first number is bet!een (+B and (,,.
Write briefly about unicast" multicast and broadcast addresses. . data pac"et can be
sent to one system, more than one system, or to all the systems in the net!or". #he
Internet addressing mechanism has pro%ision for all of these. Enicast .ddresses$ Enicast
communication is one4to4one. 0hen a data pac"et is sent from a source system to an
indi%idual destination system, a unicast communication ta"es place. .ll system on the
Internet should ha%e one uni<ue unicast address. Enicast addresses belong to class ., B or
5. Multicast Addresses$ =ulticast communication is one4to4many. 0hen a data pac"et is
sent from an indi%idual source to group of destinations, a multicast communication ta"es
place. . multicast address is a 5lass ' address. #he !hole address defines a multicast
group id. . system on the Internet can ha%e one or more multicast addresses. If a system
intends to participate in a particular multicast group then it should enable corresponding
multicast address in its soft!are. Some of the multicast addresses are listed belo!$4
((+.B.B.1$ .ll systems on this SEB)7#, ((+.B.B./$ S# routers, ((+.B.1./$ .udio ne!s,
((+.B.1.11$ I7#2414.udio, ((+.B.1.1($ I7#241 Fideo. Broadcast Addresses$ Broadcast
communication is one4to4all. #he Internet allo!s broadcasting only at the local net!or"
le%el. #here are t!o types of broadcasting allo!ed. Limited roadcast$ all 1s in the I&
address. Both netid and hostid in this case are all 1(in decimal notation (,,.(,,.(,,.(,,).
#his identifies all the hosts connected to the local net!or". .n I& datagram pac"et !ith
destination address as (,,.(,,.(,,.(,, should be recei%ed by all the systems connected to
the local net!or". Direct roadcast: #his identifies all the hosts connected to a particular
net!or" (need not be local net!or" as in the case of 3imited broadcast). 6ere the netid
part !ill identify the destination net!or" (any %alid netid) and hostid part !ill ha%e all 1s.
7xample address is -*.(,,.(,,.(,,.
+-
1
Explain how connection is established in TCP using three-way hand
shaking.
The connection establishment in TCP 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 TCP as the transport layer protocol. The
three-way handshaking procedure starts with the server. The server program tells its
TCP that it is ready to accept a connection. This is called a request for a passive
open. The client program makes a request for an active open. client that wishes to
connect to a server tells its TCP that it needs to be connected to a particular server.
The clients TCP can now start the three-way handshaking process. The steps of the
process are as follows! The client sends the first segment, with the "#$ bit set,
which is known as "#$ segment. The segment includes the source and destination
port numbers. The segment also contains the client Initiali%ation "equence $umber
&I"$' used for numbering the bytes of data 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 "#$ and C(
segment. The client sends the third segment. This is )ust an C( segment. It
acknowledges the receipt of the second segment using the C( flag and
acknowledgement number field. The acknowledgement number is the server
initiali%ation sequence number plus one. The client must also define the server
window si%e. $ote that data can be sent with the third packet.
$escribe ho# chec%sum is calculated for the &$P datagram. ?
Chec%sum Calculation at the ource$ .t the source host system, the sender
follo!s these steps to calculate the chec"sum$
1) .dd the pseudoheader to the E'& user datagram,
() If the total number of bytes is not e%en, add one byte of padding (all Bs). #he padding
is only for the purpose of calculating the chec"sum and !ill be discarded after!ards,
*) 2ill the chec"sum field !ith eros,
+) 'i%ide the total bits into 1-4bit (t!o4byte) !ords sections,
,) .dd all 1-4bit sections using oneGs complement arithmetic,
-) #a"e ones complement of the result (change Bs to 1s and all original 1s to Bs), !hich
is a 1-4bit chec"sum number. Once 1- bits chec"sum field is computed using the
abo%e method, it is filled into the original E'& header and the resulting E'&
datagram is sent. It should be noted that the pseudoheader and the padding bits are not
sent but only used during the computation of chec"sum.
Chec%sum Calculation at $estination 'ost$ #he recei%er follo!s these steps to
calculate the chec"sum$4
1) Obtain the I& header, deri%e the pseudoheader from it, and add it to the E'& user
datagram,
() .dd padding if needed,
*) 'i%ide the total bits into 1-4bit sections,
+) .dd all 1-4bit sections using oneGs complement arithmetic,
+/
1
,) #a"e onesG complement the result to get the chec"sum. E'& datagram is accepted if
the resulting chec"sum is all Bs. Other!ise it is discarded, as it indicates an error in it.
0hat are the functions of net!or" layer? 7xplain?
8#he net!or" layer is responsible for the source4to4destination deli%ery of a pac"et
possibly across multiple net!or"s (lin"s). 0hereas data lin" layer %erses the deli%ery of
the pac"et bet!een t!o systems on the same net!or" (lin"), the net!or" layer ensures
that each pac"et gets from point of origin to its final destination. If the t!o systems are
connected to the same lin" then there !ould be no re<uirement for the net!or" layer.
6o!e%er if the t!o systems are attached to different net!or"s !ith connecting de%ices
("no!n as routers) bet!een the net!or"s, then this layer plays a crucial role in getting the
pac"et from source to destination. #he )et!or" layer pro%ides for the transfer of data in
the form of pac"ets across the communication net!or"s. It establishes, maintains, and
terminates logical and physical connections across multiple interconnected net!or"s. .
"ey aspect of this transfer is the routing of pac"ets from the source to the destination
machine typically tra%ersing a number of transmission lin"s and net!or" nodes !here
routing is carried out. @outing is the process by !hich a path is selected out of many
a%ailable paths to the destination so that data pac"et reaches the destination fast,
efficiently, reliably as re<uired. #his function ma"es the net!or" most complex layer in
the reference model.
0hy fragmentation is re<uired? 7xplain ho! the I& header fields are used for the same
purpose?
8 0hen an I& datagram tra%els from one host to another, it may pass through different
physical net!or"s. 7ach physical net!or" has a maximum frame sie. #his is called the
maximum transmission unit (=#E). It limits the length of a datagram that can be placed
in one physical frame. #he format and sie of the recei%ed frame depends on the protocol
used by the underlying physical net!or" through !hich the frame passes through. Since
each protocol used at the physical layer has its o!n =#E, there is e%ery possibility that
the incoming frame exceeds the =#E of the outgoing physical net!or". #o enable
for!arding the datagram in such cases, I& implements a process to fragment datagrams
exceeding the =#E. #he process creates a set of datagrams !ithin the maximum sie. #he
recei%ing host reassembles the original datagram. 0hen a datagram is fragmented,
re<uired parts of the header must be copied by all the fragments. #he host or the router
that fragments the datagram must change the %alues of three fields$ flags, fragmentation
offset, total length. #he chec"sum field for each of the fragments has to be recomputed
and duly filled. #he follo!ing steps are performed to fragment the datagram$ 1)#he '2
flag bit in the flag field is chec"ed to see if fragmentation is allo!ed. () Based on the
=#E %alue, the data field of the datagram is split into t!o or more parts. *) 7ach data
portion is placed in an I& datagram. #he headers of these datagrams are minor
modifications of the original$ 4 I4 #he more fragments flag bit is set in all fragments
except the last. II4 #he header length field of the ne! datagram is set. III4 #he total length
field of the ne! datagram is set. IF4 #he header chec"sum field is re4calculated.
+:
1
0hat are the functionalities of session layer of OSI model?
8#he session layer establishes and maintains the communication lin" bet!een the sending
and recei%ing nodes. #he session layer organies and synchronies the exchange of data
bet!een application processes. It !or" !ith the application layer to pro%ide simple data
sets called Hsynchroniation pointsG that let an application "no! ho! the transmission and
reception of data are progressing. In simplified terms, the session layer can be thought of
as a timing and flo! control layer. #he session layer is the net!or" Hdialog controllerG. It
establishes, maintains, and the interaction bet!een communicating systems . Specifically
its responsibility includes 1) 'ialog control ? () Synchroniation.
Write a diagram of TCP header. Explain the fields" e(uence number"
)c%no#ledgement number" Windo# si*e and &rgent pointer+
! In #5&, a unit of data transfer is "no!n as #5& segment. Since #5& pro%ides the
stream4oriented data ser%ice, it uses the concept of segment for a unit of transfer. #he
segment consists of a (B4to -B4byte header, follo!ed by data from the application
program. #he header is (B bytes if there are no options and up to -B bytes if it contains
some options. Some of the header fields are as follo!s$ !e"uence numer$ #his *(4bit (+
bytes) field defines the number assigned to the first byte of data contained in this segment.
#5& is a stream transport protocol. #o ensure connecti%ity, each byte to be transmitted is
numbered. #he 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#ngement numer$ #his *(4bit
(+ bytes) field defines the byte number that the source of the segment is expecting to
recei%e from the other end process. If host has recei%ed successfully till byte number n
from the other host, then it defines n I 1 as the ac"no!ledgement number, !hich indicates
it is expecting data starting from location nI1 at the other hostsG stream. $indo% size:
#his field defines the sie of the !indo!, in bytes, that the other end must maintain. #he
length of this field is 1- bits, !hich means that the maximum sie of the !indo! is -,,,*,
bytes. Ergent pointer$ #his 1-4bit field, !hich is %alid only if the urgent flag is set, is used
!hen the segment contains urgent data. It defines the number that must be added to
se<uence number to obtain the number of last urgent byte in the data section of the
segment.
7xplain !hy one needs the ser%ice of Ergent 'ata operation of #5&?
8#5& is a stream4oriented protocol. #his means that the data is presented from the
application program to the #5& as a stream of characters. 7ach byte of data has a
position in the stream. 6o!e%er, there are occasions in !hich an application program
needs to send urgent bytes. #his means that the sending application program !ants a
piece of data to be read out of order by the recei%ing application program. Suppose
that the sending application program is sending data to be processed by the recei%ing
application program. 0hen the result of processing comes bac", the sending
application program finds that e%erything is !rong. It !ants to abort the process, but
it has already sent a huge amount of data. If it issues an abort command (5ontrol I
5), these t!o characters !ill be stored at the end of the recei%ing #5& buffer. It !ill
be deli%ered to the recei%ing application program after all the data has been
+D
1
processed. #he solution is to send a segment !ith the E@J bit set. #he sending
application program tells the sending #5& that the piece of data is urgent. #he
sending #5& creates a segment and inserts the urgent data at the beginning of the
segment. #he rest of the segment can contain normal data from the buffer. #he
urgent pointer field in the header defines the end of the urgent data and the start of
normal data. 0hen the recei%ing #5& recei%es a segment !ith the E@J bit set, it
extracts the urgent data from the segment, using the %alue of the urgent pointer, and
deli%ers it, out of order, to the recei%ing application program.
7xplain ho! port number concept is used to offer process4process data
communication in E'&?
8In #5&9I& model, each process re<uiring the #5&9I& communication ser%ice is
assigned a 1-4bit (( byte) number called port number. #he #5&9I& standard has
defined uni<ue port numbers for some of the !ell4"no!n net!or" application
process. #his helps to uni<uely identify a net!or" application process running on a
host machine. 5omputer systems today support both multi4user and
multiprogramming en%ironments. 3ocal and remote computers can run se%eral ser%er
programs at the same time. 2or communication, the follo!ing hosts and processes
must be defined$ 1) 3ocal host, () local process, *) @emote host, +) @emote process.
#he local host and the remote host are identified using I& addresses. #he client
program is assigned a port number, chosen randomly by the E'& soft!are running on
the client host. #he ser%er process must also be assigned a port number. #his port
number, ho!e%er, cannot be chosen randomly. If the computer at the ser%er site runs
a ser%er process and assigns a random number as the port number, the process at the
client site that !ants to access that ser%er and use its ser%ices !ill not "no! the port
number. #herefore, #5&9I& has decided to use uni%ersal port numbers for ser%ers;
these are called !ell4"no!n port numbers. 7%ery client process "no!s the !ell4
"no!n port number of the corresponding ser%er process. #he destination I& 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.
0hat are the error reporting messages present in the I5=&? 7xplain any t!o of
them?
!I& pro%ides an unreliable and connectionless datagram deli%ery. I& protocol does
not ha%e any error4reporting or error4correcting mechanism. #herefore, if something
goes !rong, the router does not find route for the I& pac"et and so discards it. #he
sender !ill be ne%er a!are of it, and he !ould "eep resending the same. #he I5=&
!as designed to compensate these deficiencies of I&. It is a companion to the I&
protocol and is part of the net!or" layer along !ith the I&. I5=& messages are
di%ided into t!o broad categories, error4reporting messages and <uery messages.
Ender error4reporting type, the follo!ing messages are present$4 'estination
unreachable, Source <uench, #ime exceeded, &arameter problem, @edirection. #he
<uery messages type has follo!ing messages$4 7cho re<uest and reply, #imestamp
re<uest and reply, .ddress mas" re<uest and reply ? @outer solicitation and
ad%ertisement.
,B
1
0rite a short note on, ser%ices offered by the E'& and !hat "ind of applications E'&
ser%ice is used.?
8E'& is a connectionless, unreliable transport protocol. E'& pro%ides process4to4
process communication. In addition, it performs %ery limited error chec"ing. #he ser%ices
offered by E'& are as follo!s$ &' Connectionless !er(ices- E'& pro%ides a
connectionless ser%ice. #his means that each user datagram sent by the E'& is an
independent datagram. #here is no relationship bet!een the different user datagrams e%en
if they are coming from the same source process and going to the same destination
program. #he user datagrams are not numbered. )' *lo% and Error Control4 E'& is a
%ery simple, unreliable transport protocol. #here is no flo! control, and hence no
!indo!ing mechanism. #he recei%er may o%erflo! !ith incoming messages. .gain it is
left for the end application to ta"e of it. #he end applications !hich uses E'& either
generates less data or they ha%e inbuilt mechanism to ta"e care of flo! control. +'
Encapsulation ad Decapsulation: #o send a message from one process to another, the
E'& protocol encapsulates and decapsulates the messages. ,'Multiple-ing and
Demultiple-ing$ In a host running a #5&9I& protocol, there is only one E'& but possibly
se%eral processes that may !ant to use the ser%ices of E'&. #o handle this situation,
E'& uses the concept called =ultiplexing and 'emultiplexing. #he applications at the
#ransport layer use the ser%ices of E'&. #here are se%eral multimedia applications !ith
po!erful des"top computer and high band!idth communication net!or" that uses E'&.
#odayGs multimedia applications, such as FoI& (Foice o%er I&) and Fideo conferencing
applications use a protocol "no!n as @#& (@eal #ime &rotocol) for data transfer at the
application layer. #his @#& protocol uses the ser%ices of E'&
'escribe briefly ho! error4control mechanism is achie%ed in #5& !hen data is
corrupted, and !hen ac"no!ledgement is lost. ?
8#5& is a reliable transport layer protocol. #5& pro%ides reliability using error
control. 7rror control includes mechanisms for detecting corrupted segments, lost
segments, out4of4order segments, and duplicated segments. 7rror control also
includes a mechanism for correcting errors after they are detected. Error Detection
and correction$ 7rror detection in #5& is achie%ed through the use of three simple
tools$ chec"sum, ac"no!ledgement, and time4out. #ime4out is the duration for !hich
the sending #5&. !aits for the ac"no!ledgement, after !hich it considers !hether the
data sent is either corrupted or lost and retransmits the same. 7ach segment includes
the chec"sum field, !hich is used to chec" for a corrupted segment. By computing
chec"sum, one can find !hether the segment is corrupted or not. If it is corrupted, it
,1
1
is discarded by the destination #5&. #5& uses the ac"no!ledgement method to
confirm the receipt of those segments that ha%e reached the destination #5&
uncorrupted. If a segment is not ac"no!ledged before the time4out, it is considered to
be either corrupted or lost. #he error4correction mechanism used by #5& is also %ery
simple. #he source #5& starts one time4out counter for each segment sent. 7ach
counter is chec"ed periodically. 0hen a counter expires, the corresponding segment
is considered to be either corrupted or lost, and the segment !ill be retransmitted.
7xplain the 7ncapsulation and 'ecapsulation mechanism used in
E'&. Encapsulation?
. 0hen a process has a message to send through E'&, it passes the message to E'&
along !ith a pair of soc"et addresses and the length of data. E'& recei%es the data
and adds the E'& header. E'& then passes the user datagram to the I& !ith the
soc"et addresses. I& adds its o!n header, using the %alue 1/ in the protocol field,
indicating that the data has come from the E'& protocol. #he I& datagram is then
passed to the data lin" layer. #he data lin" layer recei%es the I& datagram, adds its
o!n header (and possibly a trailer), and passes it to the physical layer. #he physical
layer encodes the bits into electrical or optical signals and sends it to the remote
machine. Decapsulation: 0hen the message arri%es at the destination host, the
physical layer decodes the signals into bits and passes it to the lin" layer. #he data
lin" uses the header (and the trailer) to chec" the data. If there is no error, the header
and trailer are dropped and the datagram is passed to the I&. #he I& soft!are does its
o!n chec"ing. If there is no error, the header is dropped and the user datagram is
passed to the E'& !ith the sender and recei%er I& addresses. E'& uses the
chec"sum to chec" the entire user datagram. If there is no error, the header is
dropped and the application data along !ith the sender soc"et address is passed t the
process. #he sender soc"et address is passed to the process in case it needs to
respond to the message recei%ed.
7xplain the stream4oriented data transfer offered by the #5&?
8#5& pro%ides stream data transfer ser%ice, !hich means the destination process
recei%es the stream of data in exactly the same manner it is sent by the source
process. Source #5& accepts a stream of characters from the sending application
program as and !hen they arri%e, creates pac"ets, called segments, of appropriate sie
extracted from the stream, and sends them across the net!or". #he recei%ing #5&
recei%es segments, extracts data from them, orders them if they ha%e arri%ed out of
order, and deli%ers them as a stream of characters to the recei%ing application
program. 2or stream deli%ery, the sending and recei%ing #5&s use buffers. #he
sending #5& uses a sending buffer to store the data coming from the sending
application program. #he sending application program deli%ers data at the rate it is
created. #he recei%ing #5& recei%es the segments and stores them in a recei%ing
buffer. #he recei%ing application program uses the read operation to read the data
from the recei%ing buffer, but it does not ha%e to read all of the data contained in one
segment in one operation. Since the rate of reading can be slo!er than the rate of
,(
1
recei%ing, the data is "ept in the buffer until the recei%ing application reads if
completely.
0rite a short note on importance of #5&.
8#he protocol, !hich is responsible for !idespread usage of #5&9I& model for
computer4to4computer communication net!or" is the #5&. It is the combination of
#5& at the #ransport layer and I& at the )et!or" layer, !hich is largely responsible
for success of this model. #5& ensures easy to use communication channel, !hich
pro%ides the reliable, stream oriented communication ser%ice, !hich ta"es are of such
error and flo! control mechanisms. #5& pro%ides process4to4process communication
channel, !hich is reliable and stream oriented in nature. In addition, it ta"es care of
the error4control and flo! control. #he process4to4process mechanism is %ery similar
to the one used by E'&. &ort numbers are used to identify an indi%idual process.
.ssociation of I& address and port number is "no!n as the soc"et. . soc"et identifies
each communicating process and a pair of soc"et determines the communication
channel. . port number can be shared by both E'& as !ell as #5&. I.e. there can be a
port number, !hich is assigned to t!o processes at the same host, but !hich uses
different protocols, one process uses E'& and another #5&. &ort number does not
identify the protocol. #he protocol field in the I& header ma"es that distinction.
,ive an overvie# of )-P mechanism using diagrams+
8#he .@& (.ddress @esolution &rotocol) protocol is a net!or"4specific standard
protocol. #he address resolution protocol is responsible for con%erting the higher4
le%el I& addresses to physical net!or" addresses. I& layer pro%ides a %irtual or logical
net!or" %ie! to the higher layer protocols !here in each host is identified by the
uni<ue address "no!n as I& address. 6o!e%er, !hen the datagram are sent on the
physical net!or", this I& address cannot identify the destination system. .t the
physical or data lin" layer, it is the physical address, !hich identifies the host system.
#herefore, there is a need to do address translation from I& address to physical
address. #he .@& mechanism, !hich resides at the net!or" layer in the #5&9I&
protocol, performs this address translation. 2or this purpose, the .@& module !ill
ha%e a loo"up table called .@& cache. #his table !ill ha%e entries for all the "no!n
I& addresses. 2or each I& address present in the cache, corresponding physical
address is stored against it. #herefore, !hen .@& module is re<uested to perform an
address translation, it first loo"s into this cache. If it finds an entry for the I& address,
it gets the corresponding physical address and returns it.
What are the layers present in TCP/IP model+ Explain the layer #hich provides
the transport functionalities along #ith the protocols defined for that layer+
8#he #5&9I& model is made up of fi%e layers$ 1) &hysical () 'ata lin" *) )et!or" +)
#ransport ,) .pplication #he layer that pro%ides the transport functionalities along
,*
1
!ith the protocols defined for that layer is )et!or" layer. #he net!or" layer is
concerned !ith access to and routing data across a net!or" for t!o end systems
attached to multiple interconnected net!or"s. #he Internet &rotocol (I&) is used at
this layer to pro%ide the routing function across multiple net!or"s. #his protocol is
implemented not only in the end systems but also in routers. . router is a processor
that connects t!o or more net!or"s and !hose primary function is to relay data from
one net!or" to the other on its route from the source to the destination end system.
#he Internet &rotocol (I&) is the transmission mechanism used by the #5&9I&
protocols. It is an unreliable and
connectionless datagram protocol > i.e. it pro%ides a best4effort deli%ery ser%ice. #he
term best4effort means that I& pro%ides no error chec"ing or trac"ing. .t this net!or"
layer #5&9I& supports the Internet!or"ing &rotocol (I&). I&, in turn, contains four
supporting protocols$ .@&, @.@&, I5=& and IJ=&
0hat are the types of routing tables? 7xplain briefly.
8#he determination of routes is deri%ed from the table "no!n as routing table. #he
types of routing tables are as follo!s$4 !tatic /outing 0ale: @outing tables can be a
static one in !hich case the entries remain same unless someone changes it manually.
If there is any change in the Internet topology, li"e some of the lin"s going do!n
temporarily, the entries !ill not be updated automatically resulting in the routing
table !hich does not reflect the changed topology. Dynamic /outing 0ale: .
dynamic routing table is updated periodically automatically. It does not need the
manual inter%ention from the administrator for the updating process. 6o!e%er for this
the routers must ha%e implemented one of the dynamic routing protocols such as @I&,
OS&2 or BJ&. Basically the routers participating in dynamic routing communicate
!ith each other using one of the abo%e4mentioned protocols informing about the
status of the Internet by exchanging respecti%e protocol pac"ets. . 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. #he routers in the Internet need to be updated dynamically
for efficient deli%ery of the I& pac"ets.
7xplain the concept of =ultiplexing and 'emultiplexing in #5&?
8#he concept of multiplexing and demultiplexing operation is as follo!s$ &'
Multiple-ing$ .t the source host, there may be se%eral processes that need to send
user datagrams. 6o!e%er, there is only one #5&. #his is a many4to4one relationship
and re<uires multiplexing. #5& accepts messages from different processes; each
message !ill ha%e a port number assigned to it, !hich identifies the process, !hich
generated the message. .fter adding the header, #5& passes the user datagram to I&.
Demultiple-ing$ .t the recei%er site, there is only one #5&. 6o!e%er, !e may ha%e
many processes that can recei%e user datagrams. #his is a one4to4many relationship
and re<uires demultiplexing. #5& recei%es user datagrams from I&. .fter error
chec"ing and dropping of the header, #5& deli%ers each message to the appropriate
process based on the port numbers.
Write the IP header datagram. Explain the fields ervice Type" Protocol"
Chec%sum" ource IP address and $estination IP address. #he determination of
routes is deri%ed from the table "no!n as routing table. #he types of routing tables
,+
1
are as follo!s$4 !tatic routing tale$ @outing tables can be a static one in !hich case
the entries remain same unless someone changes it manually. If there is any change in
the Internet topology, li"e some of the lin"s going do!n temporarily, the entries !ill
not be updated automatically resulting in the routing table !hich does not reflect the
changed topology. Dynamic /outing 0ale$ . dynamic routing table is updated
periodically automatically. It does not need the manual inter%ention from the
administrator for the updating process. 6o!e%er for this the routers must ha%e
implemented one of the dynamic routing protocols such as @I&, OS&2 or BJ&.
Basically the routers participating in dynamic routing communicate !ith each other
using one of the abo%e4mentioned protocols informing about the status of the Internet
by exchanging respecti%e protocol pac"ets. . 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.
#he routers in the Internet need to be updated dynamically for efficient deli%ery of the
I& pac"ets.
0rite the E'& datagram header. 7xplain each field? !E'& pac"ets,
"no!n as user datagrams, ha%e a fixed4sie header of eight bytes. #he fields of E'&
pac"ets are explained belo!$ !ource port numer$ #his is the port number of the
source process sending the E'& datagram. It is 1- bits long (( byte). If the source
process is a client (a client sending a re<uest), the port number, in most cases, is an
ephemeral port number. If the source process is a ser%er, the port number, in most
cases, is a !ell4"no!n port number. Destination port numer: #his is the port
number of the destination process to !hich this E'& datagram is meant. It is also 1-
bits long. Its characteristics are similar to the Source &ort )umber. Length: #his is a
1-4bit field that defines the total length of the E'& datagram, header plus data. #he
1- bits can define a total length of B to -,,,*, bytes. #he E'& length can be
computed using data length in the I& header. Chec#sum$ #his field is used to detect
errors o%er the entire user datagram (header plus data). Enli"e lo!er layer protocols
li"e I&, !hich pro%ide chec"sum only for their header, this pro%ides the chec"sum for
entire datagram, !hich includes the data sent by the user process.
'escribe briefly ho! 2lo!4control is achie%ed in #5& using sliding
!indo!mechanism? 8#o
accomplish flo! control, #5& uses a sliding !indo! protocol. 0ith this method, both
hosts use a !indo! for each connection. #he !indo! co%ers a portion of the buffer
that a host can send before !orrying about an ac"no!ledgement from the other host.
#he !indo! is called a sliding !indo! because it slides o%er the buffer as the
recei%er sends ac"no!ledgement of the bytes recei%ed !ithout any error. flo!4control
needs the sie of the !indo! to %ary to achie%e the flo! control. 6ence in #5&
!indo! sie is %ariable. #he destination, in each ac"no!ledgement segment, can
define the sie of the !indo!. #he ad%ertised sie is relati%e to the ac"no!ledgement
number. 2or example, if the recei%er ac"no!ledges the receipt of byte *,BBB and
defines the sie of the !indo! to be (BB, it means that the !indo! no! expands from
,,
1
byte *BB1 to byte *,(BB. #he destination can also increase or decrease the sie of the
!indo! in an ac"no!ledgement segment.
0rite the I& header datagram. 7xplain the fields Ser%ice #ype, &rotocol, 5hec"sum,
Source I& address and 'estination I& address?
8#he unit of transfer in an I& net!or" is called an I& datagram header. . datagram is
a %ariable length pac"et consisting of t!o parts, header and data. #he maximum
length of an I& datagram is -,,,*, bytes (octets). #he header can be from (B to -B
bytes long and contains information essential for routing and deli%ery. #he length of
the data part %aries from pac"et to pac"et but the total length of the I& datagram
should be !ithin -,,,*, bytes. he follo!ing are some of the fields of the header$4
!er(ice 0ype: #he ser%ice type is an indication of the <uality of ser%ice re<uested for
this I& datagram. Protocol Chec#sum: #his field is a chec"sum for the information
contained in the header. If the header chec"sum does not match the contents, it
implies that the datagram is corrupted and is discarded. !ource IP Address: #his is
the *(4bit I& address of the host, sending this datagram. Destination IP Address$ #his
is the *(4bit I& address of the destination host, for this datagram.
0hat are the different classes of I& addresses a%ailable in I&F+?
8#here are fi%e different I& classes$ ., B, 5, ', and 7. these are designed to co%er the
needs of different types of organiation. 5lass .$ If the first bit is B, then the gi%en
address is a class . address. @emaining portion of the first byte define the netid. Byte
( to + determines the hostid. 5lass . addresses are designed for organiations that are
ha%ing huge number of hosts connected to their net!or". 5lass B$ If the first t!o bits
of the I& address are 1B, then the gi%en address is a 5lass B address. 6ere hostid is 1-
bits long and the rest 1+ bits are for the netid. #hese addresses are designed for
midsie organiations. 5lass 5$ If the first three bits of the I& address are 11B,then the
gi%en address is a 5lass 5 address. #he next (1 bits define the netid and the
remaining : bits determine the hostid. #hese are addresses are designed for small
organiations. 5lass '$ #his address is meant for multicasting. #his does not ha%e
netid or hosted. #he first four bits (111B) define the class here.
7xplain the need of &ushing 'ata operation in #5&?
8 consider an application program that communicates interacti%ely !ith another
application program on the other end. #he application program on one site !ants to
send a "eystro"e to the application at the other site and recei%e an immediate
response. 'elayed transmission and delayed deli%ery of data may not be acceptable
by the application program. #5& can handle such a situation. #he application
program on the sending site can re<uest a push operation. #his means that the
sending #5& should not !ait for the !indo! to be filled. It should create a segment
and send it immediately. #he sending #5& should also set the push bit (&S6) to tell
the recei%ing #5& that the segment includes data that must be deli%ered to the
recei%ing application program as soon as possible and not to !ait for more data to
come. .lthough the push operation can be dictated by the application program, today
most implementations ignore such re<uests. #5& has the choice to use this operation
or not.
,-
1
Explain the Evolution of computer net#or%s+
8 #he computer net!or" has re%olutionied many aspects of our daily li%es. It has
affected the !ay !e communicate, the !ay !e gather the information, the !ay !e do
business, and e%en the !ay !e spend our leisure time. #he computer net!or" is a
communication system that has brought a !ealth of information to our fingertips and
organied it for our use. Once, computer systems used to be stand4alone units. #hey !ere
supposed to ha%e all the hard!are peripherals and soft!are pac"ages re<uired to do a
particular 1ob. .s the use of computer gre!, a ne! re<uirement arose. )eed to share9
exchange the information and resources amongst the computers and their users. Initially,
the information exchange !as in the form of exchange of magnetic tapes. If computers
!ithin a campus can be interconnected through the cables, !hy not use the existing
telephone net!or" to interconnect the computers situated in distant locations. #he same
principle (i.e. 7lectromagnetic Signal) is applied e%en telephone net!or" to transfer the
audio signal from one end to another. One follo!ed the other and simultaneous
ad%ancement in the data communication field and ad%ancement in the field of
microelectronics !hich is responsible for the faster, smaller, cheaper, po!erful computer
processor and other de%ices !hich are basic building bloc"s of computer led to a
situation !herein today !e ha%e a !orld !ide net!or" of computers !idely "no!n as
internet !hich connects se%eral crores of computer of all capacities across the globe;
probably the astronauts in =I@ Space station can also access Internet, if they !ish are
permitted. . net!or" can be as simple as t!o personal computers connected together
using a modem of 1(BB baud, or a complex as the #5&9I& Internet !hich !as designed to
handle heterogeneous systems running on unreliable communication lin".
7xplain the research acti%ities in the early days of computernet!or"?
8In the early days !hen the computer net!or"ing !as ta"ing shape in the Eni%ersities
and other @esearch laboratories the things !hich !ere commonly done on net!or" !ere
7xchanging of mails !ith others, 7xchange of files and other documents, and @emote
login. In fact it !as the E.S go%ernment (for the military purpose) !hich too" the
initiati%e and funded the pro1ect for the de%elopment of net!or"s "no!n as .@&.)7#
(.d%anced @esearch &ro1ects .gency )et!or") in the /BGs and early :BGs of t!entieth
century. Original idea of the go%ernment !as to ha%e all the computers of the military
establishment to be connected, and the net!or" should be so robust and reliable e%en in
the e%ent of !ar brea"ing out !ith the enemy state and some of the net!or"
infrastructure is damaged, the remaining computers should be able to !or" as a net!or"
!ithout any problem. it !as supposed to support heterogonous computer system ?
communication channel both of !hich are unreliable. #he researchers came out !ith a
protocol "no!n as #5&9I&. #his protocol ga%e the guidelines that should be follo!ed by
,/
1
the participating computer systems in order to communicate as intended. 3ater funding
!as pro%ided to the Eni%ersity of 5alifornia, Ber"eley, to implement the protocol in their
popular %ersion of E)IK operating system !hich !as "no!n as Ber"eley Enix. It !as
the implementation of the #5&9I& in the Ber"eley E)IK !hich led to the !idespread
implementation of net!or"s based on #5&9I& as the graduates coming out of the
Eni%ersities and getting employed in the industry !ere at ease !ith it. Since many
net!or"s !ere implemented using #5&9I& protocol, it became %ery easy to interconnect
those net!or"s !hich !ere tal"ing the same language of net!or"ing (#5&9I&). #hus born
the net!or" of computer net!or"s, !hich is today "no!n is Internet. )o! it is probably
easy to list !hat one cannot do !ith the Internet instead of !hat one can do. In fact one
can read tomorro!s ne!spaper today (night) itselfL #his is possible as many ne!spaper
companies ha%e presence on the Internet and most of them update the content on pre%ious
night itself as soon as it is ready for the print.
=a"e a brief comparison bet!een OSI and #5&9I& models?
!#he OSI architecture is a de41ure (according to la!) standard. #he focus in the OSI
!orld has al!ays been more on the standard than the implementation of the standard.
#he OSI model is used as a reference model to ma"e comparisons. #he OSI reference
model !as de%ised before the protocols !ere implemented. #he ordering means that
the model !as not biased to!ard one particular set of protocols, !hich made it <uite
general. #he #5&9I& architecture is a de4facto (in reality) standard. 0ith the #5&9I&
model, the protocols came first, and the model !as 1ust a description of the existing
protocols. #he #5&9I& model is not used to describe other models.
1. 0hat is a &eer4to4&eer process?
.ns$#he processes on each system that communicate at a gi%en layer are called peer4to4
peer processes. 5ommunication bet!een machines is therefore a peer4to4peer processes
communicating to each other using protocol appropriate to the gi%en layer.
1. 'efine I& multicasting.
.ns$0hen a data pac"et is sent from an indi%idual source to a group of destinations, a
multicast communication ta"es place. . multicast address is a 5lass ' address. #he
!hole address defines a multicast group id. #he multicast address can ne%er be a source
I& address. It can only be a destination addresses in an I& datagram pac"et.
Some of the multicast addresses are$
((+.B.B.1$ .ll systems on this SEB)7#
((+.B.B./$ S# routers
((+.B.1./$ .udio ne!s
1. 0hat are computer net!or"s?
.ns$ #he computer net!or"s or internet , !hich is the most popular, !idely used, global
computer net!or" is a structured, organied system. 0e can share or exchange the
information and resources amonst the computers using a computer net!or".
,:
1
(. 0hat is protocol?
.ns$ &rotocol is a set of rules that must be follo!ed in order to ma"e sure that there !ill
be no misunderstanding bet!een the nations because of lac" of proper communication. It
is a set of rules that coordinates the exchange of information.
. net!or" protocol is a set of rules for communication bet!een computers. &rotocols
go%ern format, timing, se<uencing, and error control. 0ithout these rules, the computers
cannot ma"e a sense of the stream of incoming data bits.
1. 0hat is OSI model?
.ns$ #he Open System Interconnection (OSI) model includes a set of protocols that
attempt to define and standardie the data communications process. #he OSI protocols
!ere defined by the International Standards Organisation(ISO) 0hich is a multtinational
body dedicated to !orld!ide agreement on international standards.
,. 0hat is #5& 9 I& model ?
.ns$ #ransmission control protocol9 Internet protocol is a result of protocol research and
de%elopment !or" conducted on the experimental net!or", .@&.)7#, funded by the
'efence .d%anced @esearch &ro1ects .gency('.@&.) in the E.S. and id generally
referred to as the #5&9I& protocol suite. #he protoco suite consists of a large collection of
protocols that ha%e been issued as Internet standards by the Internet .cti%ities
Board(I.B).
(. 0hat is an I& address?
.ns$ #he I& address is a *(4bit number that uni<uely identifies a host such as computer,
printer, and router. #he I& address is expressed in a dotted4decimal format and the I&
address consists of four octets. 7ach octet is separated by a dot. 1D1.1-:.*.(+ is an
example of I& address.
*. 0hat is a subnet?
.ns$ . subnet is one of the net!or"s that is created !hen a large physical net!or" is
di%ided into smaller net!or"s.
(. 0hat is a subnet mas"? 0hy is it necessary?
.ns$ . subnet mas" is a *(4bit mas" used to distinguish the net!or" I' from the host I'.
In the process of routing, !hen a #5&9I& host sends data to another #5&9I& host, the I& at
the source host determines !hether the destination host is local or remote. #o determine
this, I& uses the .)' operation. I& .)'s the source I& address !ith the source subnet
mas" and the destination I& address !ith the source subnet mas". If the .)'ing results
of the source and destination addresses match, the destination host is local. If they do not
match, then the destination host is remote.
*. 0hat are pri%ate net!or"s?
.ns$ Internet authorities ha%e reser%ed three bloc"s of address from !hich an
organiation can choose the netid of their choice. #hese addresses are
5lass .$ (netid)1B.B.B
,D
1
5lass B$ (netid)1/(.1- to 1/(.*1
5lass 5$ (netid)1D(.1-:.B to 1D(.1-:.(,,
.ddresses !ith these netid are pri%ate addresses.
+ 0hat are pri%ate net!or"s?
.ns$ Internet authorities ha%e reser%ed three bloc"s of address from !hich an
organiation can choose the netid of their choice. #hese addresses are
5lass .$ (netid)1B.B.B
5lass B$ (netid)1/(.1- to 1/(.*1
5lass 5$ (netid)1D(.1-:.B to 1D(.1-:.(,,
.ddresses !ith these netid are pri%ate addresses.
/. Identify the protocols used in the net!or" layer.
.ns$
#he follo!ing protocols are used in the net!or" layer$
I&$ Internet &rotocol
.@&$ .ddress @esolution &rotocol
@.@&$ @e%erse .ddress @esolution &rotocol
I5=&$ Internet 5ontrol =essage &rotocol
,. 0hat is .@& mechanism?
.ns$ #he .@& protocol is a net!or"4specific standard protocol. #he address resolution
protocol is responsible for con%erting the higher4le%el I& addresses to physical net!or"
addresses.
-. 'efine @.@&
.ns$ @.@& means @e%erse .ddress @esolution &rotocol. In some local area net!or"s,
there !ould be a po!erful computer, !hich acts as a ser%er. #here !ould be se%eral
hosts, !hich !ill not ha%e any dis"s (hard dis" 9 floppy dis") that !ill be connected to the
host.
-. 'efine broadcast addressing.
.ns$ Broadcast communication is one4to4all. #he Internet allo!s broadcasting only at the
local net!or" le%el. #here are t!o types of broadcasting allo!ed.
3imited broadcast$ all 1s in the I& address. Both netid and hostid in this case are all 1(in
decimal notation (,,.(,,.(,,.(,,). #his identifies all the hosts connected to the local
net!or". .n I& datagram pac"et !ith destination address as (,,.(,,.(,,.(,, should be
recei%ed by all the systems connected to the local net!or".
'irect broadcast$ #his identifies all the hosts connected to a particular net!or" (need not
be local net!or" as in the case of 3imited broadcast). 6ere the netid part !ill identify the
destination net!or" (any %alid netid) and hostid part !ill ha%e all 1s. 7xample address is
-*.(,,.(,,.(,,. (-* identifies the 5lass . net!or" and rest implies all hosts on that
net!or").
/. 0hat is I5=&?bytes
-B
1
.ns$ #he I5=& or Internet 5ontrol =essage &rotocol !as designed to compensate the
deficiencies of I&. It is a companion to the I& protocol and li"e .@& and @.@& is part of
the net!or" layer along !ith the I&.
/. 0hy fragmentation is re<uired in I& datagram?
.ns$ 0hen an I& datagram tra%els from one host to another, it may pass through different
physical net!or"s. 7ach physical net!or" has a maximum frame sie. #his is called the
maximum transmission unit (=#E).
#o enable for!arding the datagram in such cases, I& implements a process to fragment
datagrams exceeding the =#E. #he process creates a set of datagrams !ithin the
maximum sie. #he recei%ing host reassembles the original datagram.
:.0hat is process4to4process communication?
.ns$ #he I& is responsible for communication bet!een t!o hosts. .s a net!or" layer
protocol, I& can deli%er the message only to the destination host system. 6o!e%er, this is
an incomplete deli%ery. #he message still nedds to be handed to the correct process or a
running instance of a programme. #his is !here a transport layer protocol such as E'&
ta"es o%er.
D. 0hat is Ser%er45lient model?
.ns$. ser%er is a program on the remote host computer pro%iding ser%ice to the clients.
. client is a program running on the local host computer re<uesting the ser%ice from a
ser%er.
1B. 'efine a &rocess.
.ns$ . process is an instance of a program. 0hen the operating system executes a
program, an instance of the program, a process, is created.
11.0hat is connectionless Iterati%e Ser%er?
.ns$ #he ser%ers that use E'& are normally iterati%e, !hich means that the ser%er
processes one re<uest at a time. . ser%er gets the re<uest recei%ed in a datagram from
E'&, processes the re<uest, and gi%es the response to E'& to send to the client. #hese
datagrams are stored in a <ueue, !aiting for ser%ice. #hey could all be from one client or
from many clients.
*. 7xplain the e%aluation of computer net!or"s?
.ns$ Once, computer systems used to be stand alone units. #hey !ere supposed to ha%e
all the hard!are peripherals and soft!are pac"ages re<uired to do a particular 1ob. .s the
usage of computer gre!, a ne! re<uirement arose . )eed to share9 exchange the
information and resources amongst the computers and their users. Information exchange
can be eletronic mail or file transfer. @esource sharing can be usage of pheripheral
de%ice, such as printer connected to other computer. Initially the information exchange
!as in the form of exchange of magnetic tapes.#his !as %ery time consuming. )ext step
!as %ery ob%ious4!hen t!o computers can be connected !hy not the rest of the
-1
1
computers in the Eni%ersity.#his led to the implementation of a local campus !ide
net!or" in !hich the computers in the campus !ere connected, enabling the exchange of
information and sharing of resources !ithin the campus to happen in an efficient manner.
If computers !ithin a campus can be interconnected through the cables, !hy not use the
existing telephone net!or" to interconnect the computers situated in distant locations.
One follo!ed the other and simultaneously ad%ancement in the data communication field
and ad%ancement in the field of microelectronics !hich is responsible for the faster,
smaller, cheaper, po!erful computer processors and other de%ices !hich are basic
building bloc"s of computer led to a situation !herein today !e ha%e !orld !ide net!or"
of computers !idely "no!n as Internet !hich connects se%eral crores of computer of all
capacities accross the globe.

.riefly explain the OI architecture.
8Open System Interconnection (OSI) protocol architecture, defined by the International
Standards Organiation (ISO), includes a set of protocols to define and standardie the
data communication process. It defines ho! data communications ta"e place in the real
!orld and !hat protocols should be used at each layer.
#he follo!ing are the salient features of OSI protocol architecture$
3ayered architecture$ #he OSI model is composed of se%en ordered layers$ &hysical
(layer 1), 'ata lin" (layer (), )et!or" (layer *), #ransport (layer +), Session (layer ,),
&resentation (layer -), and .pplication (layer /). 0ithin a single computer system, each
layer calls upon the ser%ices of the layer 1ust belo! it. 2or example, )et!or" layer (layer
*) uses the ser%ices pro%ided by the 'ata lin" layer (layer () and it pro%ides ser%ices to
#ransport layer (3ayer +).
&eer4to4peer process$ #he processes on each system that communicate at a gi%en layer are
called peer4to4peer processes. 5ommunication bet!een machines is therefore a peer4to4
peer processes communicating to each other using protocols appropriate to the gi%en
layer. .t the physical layer, communication is direct. 6o!e%er, at the higher layers,
communication must mo%e do!n through the layers on 'e%ice ., o%er to the de%ice B,
and then bac" up through the layers. 7ach layer in the sending de%ice adds its o!n
information to the message it recei%es from the layer 1ust abo%e it and passes the !hole
pac"age to the layer 1ust belo! it. 6eaders are added to the data at layers -,,,+,* and (.
#railers are usually added only at layers (.
3ayer organiation$ #he se%en layers can be thought of as belonging to three subgroups.
#he layers 1, (, and *, called the &hysical, 'ata 3in", and )et!or" layers respecti%ely,
are the net!or" support layers. #hey deal !ith the physical aspects of mo%ing data from
one de%ice to another de%ice. #he layers ,, -, and /, called Session, &resentation,
.pplication respecti%ely, are the user support layers. #hey allo! interoperability among
unrelated soft!are systems. #he layer + called the #ransport layer lin"s the t!o
subgroups and ensures that the upper layers can use the data that the lo!er layers ha%e
transmitted. #he upper OSI layers are implemented in soft!are. #he lo!er OSI layers are
-(
1
a combination of hard!are and soft!are, except for the physical layer, !hich is mostly
hard!are.
(. 0hat are the functions of the net!or" layer? 7xplain. ,
.ns.
#he net!or" layer is responsible for the source4to4destination deli%ery of a pac"et
possibly across multiple net!or"s (lin"s). 0hereas data lin" layer o%ersees the deli%ery
of the pac"et bet!een t!o systems on the same net!or" (lin"), the net!or" layer ensures
that each pac"et gets from point of origin to its final destination. If the t!o systems are
connected to the same lin" then there !ould be no re<uirement for the net!or" layer.
6o!e%er if the t!o systems are attached to different net!or"s !ith connecting de%ices
("no!n as routers) bet!een the net!or"s, then this layer plays a crucial role in getting the
pac"et from source to destination.
#he )et!or" layer pro%ides for the transfer of data in the form of pac"ets across the
communication net!or"s. It establishes, maintains, and terminates logical and physical
connections across multiple interconnected net!or"s. . "ey aspect of this transfer is the
routing of pac"ets from the source to the destination machine typically tra%ersing a
number of transmission lin"s and net!or" nodes !here routing is carried out. @outing is
the process by !hich a path is selected out of many a%ailable paths to the destination so
that data pac"et reaches the destination fast, efficiently, reliably as re<uired. #his
function ma"es the net!or" most complex layer in the reference model.
*.7xplain the functionalities and the ser%ices offered by the transport layer of the OSI
model. ,
.ns$ #he transport layer is designed to pro%ide the Mtransparent transfer of data from a
source end open system to a destination end open system,N according to the OSI
@eference =odel. #he transport layer establishes, maintains, and terminates
communications lin"s bet!een t!o machines.
#he #ransport layer ensures data is successfully sent and recei%ed bet!een t!o end
systems. If data is sent incorrectly, this layer has the responsibility to as" for
retransmission of the data. .lso it ensures data are passed onto the upper layers in the
same order in !hich they !ere sent. Specifically, it pro%ides a reliable, net!or"4
independent message4interchange ser%ice to the top three application4oriented layers.
#his layer acts as an interface bet!een the bottom and top three layers. By pro%iding the
session layer !ith a reliable message transfer ser%ice, it hides the detailed operation of
the underlying net!or" from the session layer.
Some of the important ser%ices that are performed by the transport layer in order to meet
the abo%e re<uirements are$
Ser%ice4point addressing$ 5omputers often run se%eral programs at the same time. 2or
this reason, source4to4destination deli%ery means deli%ery not only from one computer to
-*
1
the next but also from a specific process (a running program) to a specific process at the
recei%ing end. #he transport layer header must therefore include a type of address called
ser%ice4point address (or port address). #he net!or" layer gets each pac"et to the correct
computer; the transport layer gets the entire message to the correct process on that
computer.
Segmentation and reassembly$ If the message sent by the application program at the
transmitting end is huge, there !ould be problem in mo%ing that from the transmitting
system to the recei%ing system as many of the physical net!or" underneath !ould
impose restriction on the maximum sie of the data that can be transferred at one time. In
order to o%er4come this restriction, transport layer splits the incoming message into
segments (each of transferable sie) at the transmitting system and reassembles them at
the recei%ing end.
.part from the abo%e, other tas"s performed by the transport layer are 5onnection
control, 2lo! control, and 7rror control.
+.'ifferentiate bet!een the Session layer and presentation layer. ,
.ns$ Session layer$ #he session layer organies and synchronies the exchange of data
bet!een application processes. It !or"s !ith the application layer to pro%ide simple data
sets called synchroniation points that let an application "no! ho! the transmission and
reception of data are progressing. In simplified terms, the session layer can be thought of
as a timing and flo! control layer.
#he session layer is the net!or" dialog controller. It establishes, maintains, and
synchronies the interaction bet!een communicating systems. Specifically its
responsibilities include$
'ialog control$ #his allo!s t!o systems to enter into a dialog. It allo!s the
communication bet!een t!o processes to ta"e place either in half4duplex (one !ay at a
time) or full duplex (both !ays simultaneously).
-+
1
Synchroniation$ #he session layer allo!s a process to add chec"points (synchroniation
points) into a stream of data. 2or example, if a system is sending a file of (,BBB pages, it
is ad%isable to insert chec"points after e%ery 1BB pages to ensure that each 1BB page is
recei%ed and ac"no!ledged independently.
&resentation layer$ #he prasentation layerAs tas" is to isolate the lo!er layers from the
applicationAs data format. .t the transmitting end, it con%erts the data from the
application into a common format, often called the canonical representation. #he
presentation layer processes machine4dependent data from the application layer into a
machine4independent format for the lo!er layers.
#he presentation layer is !here file formats and e%en character formats are lost. #he
con%ersion from the application data format ta"es place through a common net!or"
programming language as it is called in the OSI @eference =odel documents that has a
structured format.
/. Explain the TCP / IP architecture. ,ive diagram.
.ns$ #5&9I& is a result of protocol research and de%elopment !or" conducted on the
experimental net!or", .@&.)7#, funded by the 'efence .d%anced @esearch &ro1ects
.gency ('.@&.) in the E.S. and is generally referred to as the #5&9I& protocol suite.
#his protocol suite consists of a large collection of protocols that ha%e been issued as
Internet standards by the Internet .cti%ities Board (I.B).
#5&9I& !as de%eloped prior to the OSI model. #herefore layers in the #5&9I& protocol
stac" do not match exactly !ith those in the OSI model. #he #5&9I& model is made up of
fi%e layers.
O&hysical layer
O'ata lin" layer
O)et!or" layer (I&)
O#ransport layer (#5&)
O.pplication layer
#he first four layers pro%ides physical standards, net!or" interface, internet!or"ing and
transport functions that correspond to the first four layers of the OSI model.
-. 0hat are the error reporting messages present in the I5=&. 7xplain any t!o of them.
.ns$ I& pro%ides an unreliable and connectionless datagram deli%ery. I& protocol does
not ha%e any error4reporting or error4correcting mechanism. #herefore, if something goes
!rong, the router does not find route for the I& pac"et and so discards it. #he sender !ill
be ne%er a!are of it, and he !ould "eep resending the same. #he I5=& !as designed to
compensate these deficiencies of I&. It is a companion to the I& protocol and is part of the
net!or" layer along !ith the I&.
I5=& messages are di%ided into t!o broad categories, error4reporting messages and
<uery messages.
#he error reporting messages report the problems that a router or a host may encounter
!hen it processes an I& pac"et. #hey !ould report the problem bac" to the I& module at
the sending system.
#he <uery messages, !hich occur in pairs, help a host or a net!or" manager get specific
information from a router or another host. 2or example, this can be used by the hosts to
-,
1
disco%er the routers present in their net!or". #he host !ould send an I5=& <uery as"ing
for routers to respond. #he routers present in the net!or" !ill respond !ith an I5=&
reply message. #he host !ould get enough information about the router from this reply.
Ender error4reporting type, the follo!ing messages are present$
'estination unreachable
Source <uench
#ime exceeded
&arameter problem
@edirection
#he <uery messages type has follo!ing messages$
7cho re<uest and reply
#imestamp re<uest and reply
.ddress mas" re<uest and reply
@outer solicitation and ad%ertisement
:.0rite a brief note on @.@&.
.ns$ @.@& means @e%erse .ddress @esolution &rotocol. In some local area net!or"s,
there !ould be a po!erful computer, !hich acts as a ser%er. #here !ould be se%eral
hosts, !hich !ill not ha%e any dis"s (hard dis" 9 floppy dis") that !ill be connected to the
host. &eople !ould use these hosts as the front4end system and !ould be connected to the
ser%er o%er the net!or". 2inally, they !ould be !or"ing on the ser%er but using these
hosts as the front4end systems. 6a%ing dis"4less hosts has an ad%antage in some setups,
!here there !ould be a central po!erful ser%er computer on !hich many people can
!or" simultaneously by connecting through such hosts. .s these hosts are dis"4less
system, they !ould not need any configuration by the administrator. =aintenance !ould
be minimal. #hese dis"4less systems !ould be booted from the @O= (@ead Only
=emory chip), !hich is programmed by the manufacturer. It cannot include the I&
address as the net!or" administrator assigns them.
7ach time these dis"4less hosts are s!itched on, they !ill not be a!are of their I&
address, as they do not ha%e any dis" or storage de%ice. 6o!e%er, they !ill be a!are of
their hard!are address as encoded into the )et!or" Interface 5ard, from !hich they can
get it.
D. 0hat are the types of routing tables? 7xplain briefly. -
.ns$ #he determination of routes is deri%ed from the table "no!n as routing table. #he
types of routing tables are as follo!s$
Static routing table
'ynamic routing table
Static @outing #able$ @outing tables can be a static one in !hich case the entries remain
same unless someone changes it manually. If there is any change in the Internet topology,
li"e some of the lin"s going do!n temporarily, the entries !ill not be updated
automatically resulting in the routing table !hich does not reflect the changed topology.
6o!e%er this simple mechanism is sufficient for many of the routers !hich interconnect
small net!or"s !here changes in the topology is %ery unli"ely or e%en if that happens the
incon%enience caused is not much before the administrator updates the routing table
manually.
--
1
'ynamic @outing #able$ . dynamic routing table is updated periodically automatically.
It does not need the manual inter%ention from the administrator for the updating process.
6o!e%er for this the routers must ha%e implemented one of the dynamic routing
protocols such as @I&, OS&2 or BJ&. Basically the routers participating in dynamic
routing communicate !ith each other using one of the abo%e4mentioned protocols
informing about the status of the Internet by exchanging respecti%e protocol pac"ets.
#hrough these communication !hene%er there is a change in the Internet topology, such
as shutdo!n of a router or a lin" becoming inacti%e or e%en a lin" becoming acti%e, the
router !hich comes to "no! 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. #he routers in the Internet need to be
updated dynamically for efficient deli%ery of the I& pac"ets.
1B. 0rite the I& header diagram. 7xplain the fields Ser%ice #ype, protocol, 5hec"sum,
Source I& address and 'estination I& address. D
.ns$ #he unit of transfer in an I& net!or" is called an I& datagram header. . datagram is
a %ariable length pac"et consisting of t!o parts, header and data. #he maximum length of
an I& datagram is -,,,*, bytes (octets). #he header can be from (B to -B bytes long and
contains information essential for routing and deli%ery. #he length of the data part %aries
from pac"et to pac"et but the total length of the I& datagram should be !ithin -,,,*,
bytes.
#he follo!ing are some of the fields of the header$
Ser%ice #ype$ #he ser%ice type is an indication of the <uality of ser%ice re<uested for this
I& datagram.
&rotocol 5hec"sum$ #his field is a chec"sum for the information contained in the header.
If the header chec"sum does not match the contents, it implies that the datagram is
corrupted and is discarded.
Source I& .ddress$ #his is the *(4bit I& address of the host, sending this datagram.
'estination I& .ddress$ #his is the *(4bit I& address of the destination host, for this
datagram.
11.'escribe ho! chec"sum is calculated for the E'& datagram. 1B
.ns$
Chec%sum Calculation at the ource$ .t the source host system, the sender follo!s
these steps to calculate the chec"sum$
.dd the pseudoheader to the E'& user datagram.
If the total number of bytes is not e%en, add one byte of padding (all Bs). #he padding is
only for the purpose of calculating the chec"sum and !ill be discarded after!ards.
2ill the chec"sum field !ith eros.
'i%ide the total bits into 1-4bit (t!o4byte) !ords sections.
-/
1
.dd all 1-4bit sections using oneGs complement arithmetic.
#a"e ones complement of the result (change Bs to 1s and all original 1s to Bs), !hich is a
1-4bit chec"sum number.
Once 1- bits chec"sum field is computed using the abo%e method, it is filled into the
original E'& header and the resulting E'& datagram is sent. It should be noted that the
pseudoheader and the padding bits are not sent but only used during the computation of
chec"sum.
Chec%sum Calculation at $estination 'ost0 #he recei%er follo!s these steps to
calculate the chec"sum$
Obtain the I& header, deri%e the pseudoheader from it, and add it to the E'& user
datagram.
.dd padding if needed.
'i%ide the total bits into 1-4bit sections.
.dd all 1-4bit sections using oneGs complement arithmetic.
#a"e onesG complement the result to get the chec"sum.
E'& datagram is accepted if the resulting chec"sum is all Bs. Other!ise it is discarded,
as it indicates an error in it.
1(. 0rite a short note on importance of #5&.
.ns. #he protocol, !hich is responsible for !idespread usage of #5&9I& model for
computer4to4computer communication net!or" is the #5&. It is the combination of #5&
at the #ransport layer and I& at the )et!or" layer, !hich is largely responsible for
success of this model.
#he net!or" application program, !hich needs to communicate o%er the net!or",
expects a %ery simple, easy to implement communication channel. If a user !ants to !rite
an application program, !hich communicates !ith another o%er the net!or", he should
not be expected to build logic into his program to ta"e care of so many issues that are
in%ol%ed in the communication. 6e should not !orry about things such as, some part of
the message getting corrupted or lost. #here are other issues !hich should not be handled
by him, li"e rearranging the datagrams !hich arri%er out of order, issues of congestion
and resulting delay, issues of flo! control by !hich the rate at !hich the source sends the
data can be controlled.
1+. 7xplain the concept of =ultiplexing and 'emultiplexing in #5&.
.ns$ #he concept of multiplexing and demultiplexing operation is as follo!s$
=ultiplexing$ .t the source host, there may be se%eral processes that need to send user
datagrams. 6o!e%er, there is only one #5&. #his is a many4to4one relationship and
re<uires multiplexing. #5& accepts messages from different processes; each message
!ill ha%e a port number assigned to it, !hich identifies the process, !hich generated the
message. .fter adding the header, #5& passes the user datagram to I&.
'emultiplexing$ .t the recei%er site, there is only one #5&. 6o!e%er, !e may ha%e
many processes that can recei%e user datagrams. #his is a one4to4many relationship and
re<uires demultiplexing. #5& recei%es user datagrams from I&. .fter error chec"ing and
dropping of the header, #5& deli%ers each message to the appropriate process based on
the port numbers.
-:
1
1*. 0rite a diagram of #5& header. 7xplain the fields, Se<uence number,
.c"no!ledgement number, 0indo! sie and Ergent pointer.1B
.ns$ In #5&, a unit of data transfer is "no!n as #5& segment. Since #5& pro%ides the
stream4oriented data ser%ice, it uses the concept of segment for a unit of transfer.
#he segment consists of a (B4to -B4byte header, follo!ed by data from the application
program. #he header is (B bytes if there are no options and up to -B bytes if it contains
some options. Some of the header fields are as follo!s$
Se<uence number$ #his *(4bit (+ bytes) field defines the number assigned to the first byte
of data contained in this segment. #5& is a stream transport protocol. #o ensure
connecti%ity, each byte to be transmitted is numbered. #he se<uence number informs the
destination the position of the first byte of this segment in the original stream of data at
the source.
.c"no!ledgement number$ #his *(4bit (+ bytes) field defines the byte number that the
source of the segment is expecting to sssssfrom the other end process. If host has
recei%ed successfully till byte number n from the other host, then it defines n I 1 as the
ac"no!ledgement number, !hich indicates it is expecting data starting from location nI1
at the other hostsG stream.
0indo! sie$ #his field defines the sie of the !indo!, in bytes, that the other end must
maintain. #he length of this field is 1- bits, !hich means that the maximum sie of the
!indo! is -,,,*, bytes.
Ergent pointer$ #his 1-4bit field, !hich is %alid only if the urgent flag is set, is used !hen
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.
1,. 0hat is connectionless4iterati%e ser%er? Esing a diagram explain the same. ,
-D
1
.ns$ #he ser%ers that use E'& are normally iterati%e, !hich means that the ser%er
processes one re<uest at a time. . ser%er gets the re<uest recei%ed in a datagram from
E'&, processes the re<uest, and gi%es the response to E'& to send to the client. #he
ser%er pays no attention to the other datagrams. #hese datagrams are stored in a <ueue,
!aiting for ser%ice. #hey could all be from one client or from many clients. In either
case they are processed one by one in order of arri%al.
#he follo!ing figure illustrates the same$
1-. 0rite a brief description about the data connection used in 2#&.
.ns. #he data connection uses the !ell4"no!n port (B at the ser%er site. 6o!e%er, the
creation of a data connection is different from !hat !e ha%e seen so far. #he follo!ing
sho!s ho! 2#& creates a data connection$
#he client, not the ser%er, issues a passi%e open using an ephemeral port. #he client must
do this because it is the client that issues the commands for transferring files.
#he client sends this port number to the ser%er using the &O@# command.
#he ser%er recei%es the port number and issues an acti%e open using the !ell4"no!n port
(B and the recei%ed ephemeral port number.
.fter the initial connection, the ser%er process creates a child process and assigns the
duty of ser%ing the client to the child process using an ephemeral port.
1/. Briefly explain the steps in%ol%ed in storing an image file into the ser%er from client
side.
8#he steps in%ol%ed in storing an image file into the ser%er from client side are as
follo!s$
#he control connection to port (1 is created.
.fter the control connection to port (1 is created, the 2#& ser%er sends the ((B (ser%ice
ready) response on the control connection.
#he client sends the ES7 command (this ES7@ command passes the user information to
ser%er).
#he ser%er responds !ith **1 (user name is OP, a pass!ord is re<uired).
#he client sends the &.SS command (sends the pass!ord for the user).
/B
1
#he ser%er responds !ith (*B (user login OP, if user id and pass!ord match).
#he client issues a passi%e open on an ephemeral port for data connection and sends the
&O@# command (o%er the control connection) to gi%e this port number to the ser%er.
#he ser%er does not open the connection at this time, but prepares itself for issuing an
acti%e open on the data connection bet!een port (B (ser%er side) and the ephemeral port
recei%ed from the client. It sends the response 1,B (data connection !ill be open shortly).
#he client sends the #C&7 command (to indicate the type of data as binary Q)
#he ser%er responds !ith response (BB (command OP)
#he client sends the S#@E command (defines the data follo!ing as of file type.)
#he ser%er responds !ith response (BB (command OP)
#he client sends the S#O@ command (to re<uest the ser%er to store the data)
#he ser%er opens the data connection and sends the message (,B.
#he client sends the file on the data connection. .fter the entire file is sent the data
connection is closed. 5losing the data connection means end4of4file.
#he ser%er sends the response ((- on the control connection.
#he client sends the REI# command (or it can send the other commands to open another
data connection for transferring another file).
#he ser%er responds !ith ((1 (ser%ice closing) and it closes the control connection.
1. 0hat are the research acti%ities that !ere commonly done in the early days of
computer net!or"s ? 7xplain.
.ns$ In the early days !hen the computer net!or"ing !as ta"ing shape in the
Eni%ersities and other @esearch laboratories the things !hich !ere commonly done on
net!or" !ere
O 7xchanging of mails !ith other
O7xchaange of files aand other documents
O7xecution of computer programme on other remote computer. It !as possible to sit at
the ones department computer and from there connect to mainframe computer(!hich !as
faster apart from other things) of the Eni%ersity(or if permission !as granted on some
other research laboratory in far off place) and run the computer programme.
@emote login, i.e. login to remote computer system(re<uirement of the permission goes
!ithout saying), and once one is logged on to the system, he becomes a regular user of
the computer 1ust li"e others !ho ha%e logged in directly and not through net!or".
O use the printer and other peripheral de%ices connected to the remote computer.
(. 0ith neat diagram explain a simplified architecture for 000 ser%ice.
/1
1
.ns$ #he 000 application module contains all of the logic that is uni<ue to the 000
application, such as transmitting !ebsite address, relati%e path to the document page and
any other necessary information re<uired to uni<uely identify a !eb page !hich user
!ants to see. .lso 000 application module should ha%e logic to transfer bac" to the
user the re<uested !eb page. #her is a need to transmitthese <ueries and !eb pages
reliably. 6o!e%er, the same sorts of reliability re<uirements are rele%ent to a %ariety of
applications(e.g., electronic mail, document transfer). #herefore these re<uirements are
met by a seperate #ransport ser%ice module that can used by a %ariety of applications.
#his module is concerned !ith assuring that the t!o computer systems are acti%e and
ready for data transfer and for "eeping trac" of the data that are being exchanged to
assure deli%ery. 6o!e%er, these tas"s are independent of the type of net!or" is being
used. #herefore, the logic for actually dealing !ith the net!or" is seperated out into a
seperate )et!or" ser%ice module. #hat !ay, if the net!or" to be used is changed, only
the net!or" ser%ice module is affected.
#he diagram is as follo!s.
*. 0hat are the important functionalities performed and ser%ice offered by the transport
layer and session layer?
.ns$ #ransport layer$ #he transport layer is designed to pro%ide the N transparent transfer
of data from a source end open system to a destination end open system,Naccording to the
OSI @eference =odel.#he transport layer establishes, maintains, and terminates
communications lin"s bet!een t!o machines.
#he transport layer ensures data is succesfully sent and recei%ed bet!een t!o end
systems. If data is sent incorrectly, this layer has the responsibilty to as" for
retransmission of the data. .lso it ensures data are passed onto the upper layers in the
same order in !hich they !ere sent. Specifically, it pro%ides a reliable, net!or"4
independent message4interchange ser%ice to the top three application4oriented layers.
#his layer acts as an interface bet!een the bottom and top three layers. By pro%iding the
session layer !ith a reliable message transfer ser%ice, it hides the detailed operation of
the underlying net!or" from the session layer.
Session layer$ #he session layer organies and synchronies the exchange of data
bet!een application processes. It !or"s !ith the application layer to pro%ide simple
datasets called synchroniation points that let an application "no! ho! the transmission
and reception of data are progressing. In simplified terms, the session layer can be
thought as a timing and flo! control layer.
#he session layer is the is the net!or" dialog controller. It establishes, maintains, and
synchronises the interaction bet!een communicating systems. Specifically it
responsibilities include
O'ialog control$ It allo!s the communication bet!een t!o processes to ta"e place either
in half4duplex(one !ay at a time) or full duplex (both !ays simultaneously).
OSynchronisation$ #he session layer allo!s a process to add chec"points(synchronisation
points) into a stream of data.
.n example !here session layer plays a crucial role is the file transfer application !hen
used to transfer huge files(do!nloading of huge files).
/(
1
+. 0hich are the three differnt le%els of addresing in #5&9I&? 7xplain
.ns$ #5&9I& model has three different le%els of addresing$
O&hysical(3in") address$ #his is the address of a node at the datalin" layer, as defined by
the 3.) or 0.). It is included in the frame sent by the datalin" layer. #his address
determines the host system on a particular net!or". #he sie and format of the physical
address is not defined by the #5&9I& and it depends on the "ind of the net!or". example$
7thernet 3.) uses - byte(+: bit) physical address !hich is imprinted into the )et!or"
Interface 5ard.
OInternet address$ Internet addresses are necessary for uni%ersal communication ser%ices
that are independent of underlying physical net!or". &hysical net!or"s ha%e different
addresing format depending upon the net!or" technology used. .lso the addressing does
not ha%e any component using !hich one can identify the net!or" to !hich it is
connected; !hich is essential for the routing purpose.
#he Internet address are designed fpr this purpose. .n Internet address is currently a *(
bit(+ byte) address !hich can uni<uely identify a host connected to the Internet.
O&ort address$ #he I& address and the physical address identify the source and destination
systems. #hey donAt identify the process identify the process on these systems to !hich
the data actually corresponds to. #he final ob1ecti%e of the Intenet communication is
pro%iding a communication lin" bet!een t!o processes running on t!o different systems.
2or example, data sent by the 2#&(2ile #ransfer &rotocol) client process from system .
should reach the 2#& ser%er process at the system B. It should not reach the =.I3 ser%er
processes are also to be identified. #o achie%e this, different processes are labeled
/*
1
uni<uely. In #5&9I& this labeling is called port address. . port address is 1- bits long((
byte).
,. Bring out the differnces bet!een unicast addresses and multicast addresses.
.ns$ Enicast .ddresses$ Enicast communiacation is one4to4one. 0hen .a data pac"et is
sent from a source system to an indi%idual destination system, a unicast communication
ta"es place. .ll system on the Internet should ha%e one uni<ue unicast address. Enicast
addresses belong to class .,B or 5.
=ulticast .ddresses$ =ulticast communication is one4to many. 0hen a data pac"et is
sent from an indi%idual source to group of destinations, a multicast communication ta"es
place. . multicast address is a class ' address. #he !hole address defines a multicast
group id. . system on the Internet can ha%e one or more multicast addresses. If a system
intends to participate in a particular multicast group then it should enable corresonding
multicast address in its soft!are. )ote that the multicast addresses or class ' can ne%er
be a source I& address, it can only be a destination address in an I& datagram pac"et.
Some of the multicast addresses are listed belo!.
O((+.B.B.14 .ll systems on this SEB)7#
O((+.B.B./4S# routers
O((+.B.1./4.udio ne!s
O((+.B.1.114I7#2414.udio
O((+.B.1.1(4I7#2414Fideo
/+
1
/. Bring out the differences bet!een direct routing !ith indirect routing and static routing
table !ith dynamic routing table. /
.ns$ 'irect routing$ If the destination host is attached to the same physical net!or" as the
source host, I& datagrams can be directlty exchanged. #his is called direct deli%ery and is
refferd to as direct routing. 'irect routing accurs !hen both source and destination hosts
are connected to the same physical net!or".
Indirect routing$ Indirect routing occurs !hen the destination host is not connected to a
net!or" directly attached to the source host. #he only !ay to reach the destination is %ia
one or more I& router. #he address of the first router is called an indirect route in the I&
routing algorithm. #he address of the first router is only information needed by the source
host to send a pac"et to the destination host.
Static routing table$ @outing tables can be a static one in !hich case the entries remain
same unless someone changes it manually. If there is any change in the Internet topology,
li"e some of the lin"s going do!n temporarily, the entries !ill not be updated
automatically resulting in the routing table !hich does not reflect the changed topology.
6o!e%er this simple mechanism is sufficient for many of the routers !hich intterconnect
small net!or"s !here changes in the topology is %ery unli"ely or e%en if that happens the
incon%enience caused is not much before the administrator updates the routing table
manually.
'ynamic routing table$ . dynamic routing table is updated periodically automatically. It
does not need the manual inter%ention from the administrator for the updating process.
6o!e%er for this the routers must ha%e implemented one of the dynamic routing
protocols such as @I2,OS&2 or BJ&. Basically the routers participating in dynamic
routing communicate !ith each other using one of the abo%e mentioned protocols
informing about the status of the internet by exchanging respecti%e protocol pac"ets.
:.0ith neat diagram explain .@& pac"et format. /
.ns$ 6ard!are #ype$ #his is a 1- bit field defining the type of the net!or" on !hich the
.@& is running. 7ach 3.) has been assigned an integer based on its type. 2or example,
7thernet has type1.
&rotocol #ype$ #his is a 1-4bit field defining the protocol, !hich is re<uesting the .@&
ser%ice. #he %alue of this for I&%+ is B:BBS1-..@& can be used !ith any higher layer
protocol.
6ard!are length$ #his is an :4bit field defining the length of the physical address in
bytes. 2or 7thernet this %alue is - as it has +: bits (-bytes) physical address
&rotocol length$ #his is an :4bit field defining the length of the logical address in bytes.
#he I&%+ protocol has a %alue of +(as I& address are + bytes long).
Operation$ #his is a 1-4bit field defining the type of the pac"et. #!o types are defined.
.@& re<uest(#ype1)and .@& reply9response(#ype().
Sender
6ard!are .ddress$ #his represents the physical hard!are address of the sender machine.
Sender &rotocol .ddress$ #his represent the logical address of the sender.
D.0ith neat diagram explain I5=& messsage format and also explain I5=& messages. /
/,
1
.ns$ .n I5=& message has an : byte header and a %ariable sie data section. #he first +
bytes of the header is common to all the messages. #he rest + bytes !ould depend on the
message type. #he first field, I5=& type, defines the type of the message. #he code field
specifies the reason for the particular message type.#he rest of the header is specific to
each message type.
#he data section in the I5=& pac"et has information for finding the original pac"et
!hich caused the error. #he I& layer !hich recei%es error4report I5=& messaage !ould
use the information stored in this data section to find out about the pac"et !hich !as sent
by it, resulted in this error4reporting message. It is important for the I& module at the
recei%ing host to identify the original I& pac"et !hich caused the error4report I5=&
message generattion, so that it can ta"e appropriate action and also inform the appropriate
upper layers about the same.
1B. 0hy fragmentation is re<uired? 7xplain ho! the I& header fields are used for the
same purpose.
.ns. 0hen an I& datagram tra%els from one host to another, it may pass through different
physical net!or"s. 7ach physical net!or" has a maximum frame sie. #his is called the
maximum transmission unit (=#E). It limits the length of a datagram that can be placed
in one physical frame.
#he format and sie of the recei%ed frame depends on the protocol used by the underlying
physical net!or" through !hich the frame passes through. Since each protocol used at
the physical layer has its o!n =#E, there is e%ery possibility that the incoming frame
exceeds the =#E of the outgoing physical net!or". #o enable for!arding the datagram
in such cases, I& implements a process to fragment datagrams exceeding the =#E. #he
process creates a set of datagrams !ithin the maximum sie. #he recei%ing host
reassembles the original datagram.
#he source or any router in the path can fragment a datagram. 6o!e%er, only the
destination host does the reassembly of the datagram, as each fragment becomes an
independent datagram. 0hen a datagram is fragmented, re<uired parts of the header must
be copied by all the fragments. #he host or the router that fragments the datagram must
change the %alues of three fields$ flags, fragmentation offset, total length. #he chec"sum
field for each of the fragments has to be recomputed and duly filled.
#he follo!ing steps are performed to fragment the datagram$
#he '2 flag bit in the flag field is chec"ed to see if fragmentation is allo!ed. If the bit is
set !hich indicates not to fragment, the datagram !ill be discarded as it cannot be
for!arded and an I5=& error returned to the originator.
Based on the =#E %alue, the data field of the datagram is split into t!o or more parts.
.ll ne!ly created data portions must ha%e a length that is a multiple of : octets, !ith the
exception of the last data portion.
/-
1
7ach data portion is placed in an I& datagram. #he headers of these datagrams are minor
modifications of the original$
T #he more fragments flag bit is set in all fragments except the last.
T #he fragment offset field in each is set to the location this data portion occupied
in the original datagram, relati%e to the beginning of the original unfragmented datagram.
#he offset is measured in :4octet units.
T #he header length field of the ne! datagram is set.
T #he total length field of the ne! datagram is set.
T #he header chec"sum field is re4calculated.
T 7ach of these fragmented datagrams is no! for!arded as a normal I& datagram.
I& handles each fragment independently. #he fragments can tra%erse different routers to
the intended destination. #hey can be sub1ect to further fragmentation if they pass
through net!or"s specifying a smaller =#E.
11. 0rite the E'& datagram header. 7xplain each field.
.ns.
E'& pac"ets, "no!n as user datagrams, ha%e a fixed4sie header of eight bytes.
#he fields of E'& pac"ets are explained belo!$
Source port number$ #his is the port number of the source process sending the E'&
datagram. It is 1- bits long (( byte). If the source process is a client (a client sending a
re<uest), the port number, in most cases, is an ephemeral port number. If the source
process is a ser%er (a ser%er sending a response), the port number, in most cases, is a
!ell4"no!n port number.
'estination port number$ #his is the port number of the destination process to !hich this
E'& datagram is meant. It is also 1- bits long. Its characteristics are similar to the
Source &ort )umber.
3ength$ #his is a 1-4bit field that defines the total length of the E'& datagram, header
plus data. #he 1- bits can define a total length of B to -,,,*, bytes. 6o!e%er, the
minimum length is eight bytes, !hich indicates a user datagram !ith only header and no
data. 6o!e%er it should be noted that I& has a limitation of -,,,*, bytes for its
datagram. #herefore, the length of the data can be bet!een B and -,,,B/ (-,,,*, > (B >
:) bytes (t!enty bytes for I& header and : bytes for E'& header).
5hec"sum$ #his field is used to detect errors o%er the entire user datagram (header plus
data). Enli"e lo!er layer protocols li"e I&, !hich pro%ide chec"sum only for their
header, this pro%ides the chec"sum for entire datagram, !hich includes the data sent by
the user process.
1(. 0hat are the ser%ices offered by #5&? 7xplain.
.ns$ #5& can be characteried by the follo!ing facilities it pro%ides for the applications
using it$
Stream 'ata #ransfer$ #5& pro%ides stream data transfer ser%ice,!hich means the
destination process recei%es the streamof data in exactly the same manner it is sent by the
source process. Enli"e in datagram ser%ice, there is no concept of unit of data tranfer. In
//
1
datagram ser%ice, all the data ha%e to be sent as a single unit. #his imposes t!o
restrictions. One is all the data should be a%ailable at the time of sending other!ise they
!ill be sent in other datagram. .lso each datagram unit is a seperate entity and there is no
relation bet!een them. .nother restriction is on the sie of the data transfer.
2ull4'uplex Ser%ice$ #5& offers full4duplex ser%ise, !here data can flo! in both
directions at the same time. .fter t!o application programs are connected to each other,
they can both send n recei%e data. One #5& can carry data from application . to B and,
at the same time , data from B to .. 0hen a pac"et is going on from . to B, it can also
carry an ac"no!ledgement of the pac"ets recei%ed from B. 3i"e!ise, !hen a pac"et is
going from B to ., it can also carry an ac"no!ledgement of the pac"ets recei%ed from ..
#his is called piggybac"ing because ac"no!ledgements can be sent !ith data.
@eliable Ser%ice$ #5& is reliable transport protocol. It uses the ac"no!ledgement
mechanism to ensure that no part of the data is lost or corrupted or duplicated.
1*. 0ith neat diagram explain control connection and data connection used in 2#&
.ns$ 5ontrol 5onnection$ #he control connection is created in the same !ay as other
application programs described so far.
#here are t!o steps$
#he ser%er issues a passi%e open on the !ell4"no!n port (1 and !aits for a client.
#he client uses an ephemeral port and issues an acti%e open connection to the port (1 of
ser%er process.
#he connection remains open during the entire process. #he ser%ice type, used by the I&
protocol, is to minimie delay because this is an interacti%e connection bet!een a user
(human) and a ser%er. #he user types commands and expects to recei%e responses
!ithout significant delay. .fter the initial connection, the ser%er process creates a child
process and assigns the duty of ser%ing the client to the child process using an ephemeral
port.
'ata 5onnetion$ #he data connection uses the !ell4"no!n port (B at the ser%er site.
6o!e%er, the creation of a data connection is different from !hat !e ha%e seen so far.
#he follo!ing sho!s ho! 2#& creates a data connection$
#he client, not the ser%er, issues a passi%e open using an ephemeral port. #he client must
do this because it is the client that issues the commands for transferring files.
#he client sends this port number to the ser%er using the &O@# command.
#he ser%er recei%es the port number and issues an acti%e open using the !ell4"no!n port
(B and the recei%ed ephemeral port number.
.fter the initial connection, the ser%er process creates a child process and assigns the
duty of ser%ing the client to the child process using an ephemeral port.
-. 0rite a brief note on multihomed de%ices.
.ns$ .n Internet address identifies a system !ithin a physical net!or". 6ence if the
system is connected to more than one physical net!or" it must ha%e more than one
Internet I& address. In fact a system has a different I& address for each net!or" connected
to it. .ny system !hich is connected to more than one physical net!or" is called
/:
1
multihomed system. . router !hich routes the I& datagram pac"et o%er the Internet
should be connected to more than one net!or" and hence it !ill ha%e more than one I&
address, one for each interface. #he figure illustrates this
#he computer is connected to t!o net!or"s and hence has t!o Internet
address(1(*.,B.1-.DB and 1+1.1+.((.D) and router de%ice is connected to three different
net!or"s and has * I& adresses (1(*./B.D.111, 1+1.1+.-/.:B and (B,.-/./1.(*).
/D

Vous aimerez peut-être aussi