You are on page 1of 79

Unit-1

Chapter Network Layer


& Protocols

Syllabus
IP Addressing Address Space Notations Classtull addressing Classless addressing
Network Address Translation(NAT) Internet Protocol (P) Datagram Fomat.Fragmentation,
Options.ICMPV4 Messages, Debugging Tools.CMPChecksum. MobileIP Addressing
Agents, Three Phases Inefficiency in Mobile IP VirtualPrivate Network VPNtechnology.

Chapter Contents

1.9 Options
1,1 Network Layer
1.10 Option Types
1.2 IPv4 Addresses
1:11 ICMPv4 (Internet Control Message Protocol)
1.3 Classful Addressing
Classless Addressing in IPv4 1.12 Error Reporting Messages (ICMPv4)
4

Special Addresses
1.13 Query Messages (ICMPv4)
1.5
1.6 NAT Network Address Translation 1.14 Debugging Tools
Internet Protocol Version 4 (1Pv4) 1.15 Mobile IP
1.7
1.16 Virtual Private
1.8 Fragmentation Networking (VPN)
Network Layer &Protocols
ACN (Comp./Sem.5/MSBTE) 12 ACN (Comp. /Sem. 5/MSBTE Network Layer&Protocols
3. Routing: 2. Dotted decimal notation (base 256).
1.1 Network Layer: In a network, there are multiple roots available 1.2 IPv4 Addresses:_ 3. Hexadecimal notation (base 16).
The network layer is responsible for carrying the packet from a source to a destination and one of them is
Each computer connected to the Internet should be Out of these the dotted decimal notation is most
from the source all the way to destination. In short it is to be chosen. identified uniquely. The identifier used for this purpose commonly used.
responsible for host-to-host delivery. The network layer decides which root is to be is called as the Internet address or IP address.
Dotted decimal notation:
The network layer has a higher responsibility than the taken. This is called as routing and it depends on The hosts and routers on the Internet have unique IP
data link layer, because the data link layer is only addresses. This notation has become popular because of the two
various criterions.
to move the frames from one end of the wire The current version of IP (Internet Protocol) is IPv4 advantages it offers. This notation makes the IPv4
Supposed
4. Packetizing: whereas the advanced version is IPv6. address more compact and easy to read.
to the other end.
As discussed earlier, the network layer receives the The IPv4 address is a 32-bit address and it is used for The 32.bit IPv4 address is grouped into groups of 8-bits
Thus network layer is the lowest layer that deals with
defining the connetion of a host or router to the
the end to end transmission. packets from upper layer protocoland each separated by decimal points (dots).
Internet. Thus an 1P address is an address of the
encapsulates them to form new packets.
1.1.1 Posltion of Network Layer interface. Each 8-bit group is then converted into an equivalent
This is called as packetizing. A network layer
decimal number as shown in Fig. 1.2.1.
Fig. 1.1.1 shows the position of network layer in the 5 protocol called IP (Internetworking Protocol), does
1.2.1 Uniqueness of IP Addresses:
Each octet (byte) can take a value between 0 and 255.
layer internet model. It is the third layer. the job of packetizing. The IP address is unique and universal. That means
Therefore the IPv4 address in the dotted decimal
Layer each IP address defines only one connection to the
5. Fragmenting: notation has a range from 0.0.0.0 to 255.255.255.255.
4 Transportlayer Internet.
Network layer provides services to the transport layer The sent datagram can travel through different At any given time, no two devices connected to the
For example the IPv4 address of 1001 0001.00001010
3 Network layer networks. Each router decapsulates the IP datagram Internet can have the same IP address. 00100010 O0000011 is denoted in the dotted decimal
Network layertakes services from the data link layer But if a device is connected to the Internet via two form as 145.10.34.3.
from the received frame. Then the datagram 31
Data linklayer processed and encapsulated in another frame.
connections through two different networks, then it can
IP Address 10010001 O0001010 00100010 00000011
have two different IP addresses.
(G-433) Fig. 1.1.1: Position of network layer
All the IPv4 addresses are 32 bit long and they are used 45
Other issues:
It receives services from the data link layer and provides in the source address and destination address fields of
services to the transport layer. The other issues which are not directly related to the Dotted decimal
the IP header. 145 10 34 3
duties ofnetwork layer but need to be discussed are The IP addresses for hosts are assigned by the network
1.1.2 Network Layer Duties: (G-2001)Fig. 12.1: Dotted decimal notation
1. Address resolution. administrator. For Internet it has to be obtained from
Fig. 1.1.2 shows the set of duties of the network layer. the network information center. 1.2.4 IPv4 Address Format
2. Multicasting.
uties of the network layer
3. Routing protocols. 1.2.2 Address Space: A 32 bit IPv4 address consists of two parts. The first part
is called as net id i.e. network identification which
Intemetworking Addressing Routing Packetizing Fragmenting Other supporting protocols: The IPv4 protocol has an address space. It is defined as
(G-434) Fig. 112: Duties of the network layer identifies a network on the Internet and the second part
The Intemetworking Protocol (IP) needs the support of the total number of addresses used by the protocol.
is called as the host id which identifies a host on that
1. Internetworking another If N number of bits are used for defining an address
protocol ICMP or ARP etc. in the network layer.
then the address space will be 2" addresses. network.
This is the main duty of network layer. It provides the How to achieve the goals?
logical connection between different types of networks. ForIPv4, N is 32 bits. Hence its address space is 2 or4, Fig. 1.2.2 shows the IPv4 address format. Note that the
In order to achieve the 294, 967, 296 (more than 4 bilion). So theoretically
goals, the network layer must net id and host id are of variable lengths depending on
Addressing: know about the topology of the communication subnet more than 4 billion devices could be connected to the the class of address.
Addressing is necessary to identify each device on i.e. the set of all routers. Internet.
Note that class D and E addresses are not divided into
the Internet uniquely. This is similar telephone It also should choose Thus the address space of IPv4 is 2".
to a
appropriate paths for net id and host id for the reasons discussed later on.
system. communication. -32 bits
1.2.3 Notation:
The addresses used in the network layer should be The routes should be chosen in such a
way that netid hostid IPv4 address
able to uniquely define the connection of a overloading of some routers and idle operation of The IPv4 addresses can be shown use three different
(G-2002) Fig. 1.2.2: IPv4 address format
computer to the Internet universaly. others should be avoided. notations as follows :
1. Binary notations (base 2).
TechKnowledge
UDTIC a t i o n s
echKneuledgë
Network iayer &Prorcls
ACN (Comp /Sen 5MSBTE) AGN (Cor MSTE
C l A format
1.3 Classful Addressing The forrmats sted føt "'yA Bodret arE AS
The class foermat aligws ko uto milign retks w i t
address tor tiaA networks pto 24 heoste each and class D fermat ailow th
1.32 The 1Pd
r a a s t in wich a datagram is diected to m ie
trchitexture alied the thown in ig 13 2a)
i e oricept of casses. Tis
The netwrt fieid
it tsit icong hwn in
t 3 2a tosts
cdesstul addressing 5it iength o 1he networi y
and the hot feid i o Cleee E addrees formet
have n u m e r t
betweern 1 to1,6 Cn 22 z
eic an class E
was itded w wa rown a atales
Bt the hogt
hurm|bert will 1ahg from 0000 to ig 320e) ows
the address foprrat tor
address This address begins with i1i10 w*th show
Th ew a r h i t r t e ha: i r e e the
addressing. 17255.255 255
ot retworks and
that it is reserved for the hture yse
srgirial rcttectur Ths iciats A there cari be i76 types
7 rillhoh host:
tthat it 1s Clas A
11110
Reoerved for future use
Thhe 0 the first feid Ideitifies
acicreesir in
Fig. 1.3.2(e) : IPv4 address for cdas E network
retwrk aidreis
1.3.1 IPv4 Addresa Classes
The 32 bit (4 byte) network addrestes are
iasa B format
written in dotted deamal notation in this notation each
The ciass Ë address format is shown in Fig 13.2(b)
of the 4-bytes is written in decimal from 0 to 255
the network, and the
The firaf two fields identify
first fieicd must be in the range 128 -
191 So the iowest iP adóress is 0.000 1 e . sil the 32 tits are
rurmber iri thhe
16 bits
zero and the highest IPv4 address is 255.255 255.255
Host
The number of cita A adsses t the ughest % Notwor
1.3.3 How to Recognize Ciasses ?
(G.532) Fig. 1.3.2(b) : Class B format
Host numbers 0.0 and When an IPy4 address is given to us either in the biñary
Class riefworks are large.
55.235 resenved, so there can be upto 65,534
are or dotted decimal notation, we can find the dass ot the
(216-2) hosts in a class B network. Most of the 16,382
class B addresses have been allocated. The first
block address
CA
address trom 128.0.0.0 to 128.255.255.255 and If the given address is in the binary notation then we
covers
the last biockcovers from 191.255.0.0 to can identify its class by inspecting the first few bits of
191 255 255.255
the address. This is as shown in Fig. 1.3.3(»)
for host 0.26 net 128.89. B 1.3.4 Two Level Addressing:
-Example: 128.89.0.26, on
Byto 1 Byto 2 Byts 3 Byto 4
No. of adiciresnes Class C format :
Ciass A 0
Bytu 1
The class C address format is shown in Fig. 1.3.2(c).
Ciass B 0
1bits
12 Network Host Byte 1
6.23%
(aS33) Fig. 1.3.2(¢) : Ciass Cformat
Class C
110
Byte 1
The first biock in ciass C covers addresses from
6.2%
19200.0 to 192.00.255 and the last block covers Ciass D
1110
-2008) i g 1.3.1: Cäasstui nádresoirng tccupation af addresss from 223.255.255 0 to
223.255.255.255 Byte t
sódress space
Ciass D format Ciass E1111 ailcate a i aes o e organzation These
1.3.2 Formats of Various Classes Tthe cias: D address format shown in
(G-2004) Fig. L3.3(a) : Finding the address ciaxs
is
Fig. 1.3.2(d)
t h e gvern address s n tthe dotted seithal n e a t n
A he adressas ailees o an onganization belong to
oNetwork
1110 Multicast address then we can identity the asdress ciass by isectimg he a singie bioK erefore aach 4 *dress in dasstu
Fig 13.2(d) : Class D format
(G-5.31) Fig. 1.3.2(a): Clasu A IPvé address tormets
Techknowledgi
TechMale
* -xlit4 spa*
Network Layer & Protocols Network Layer &Protocols
1-6 ACN (Comp./Sem. 5/MSBTE) 1-7
ACN (Comp./Sem.5/MSBTE) in the block:
Find the class of the network if the address is
parts namely
net 3. Last address
by
223.21.70.4 223.21.70.58 Note that 223.21.70 is
common in the address of
Ex. 1.3.3:
is made up of two block can be obtained
addressing system in the given all machines in class 221.46.75.84.
The last address it is and
id and host id as shown in Fig. 1.3.5. leftmost "n" bits in the
address as
C network
S 2 DIs keeping the shown
Soln.:
bits to 1 as
is
all the (32 n) rightmost 192 and 255. So this
hostid then setting The first byte is 221 ie. between
P v 4 address netid 223.21.70.126 in
SZ n) bits and host id are as shown
- n bits in Fig. 1.3.6. a class C network. The net id
(32-n) bits Glass A: n=8 223.21.70.0o
(G-2007) Fig. 1.3.5: Two level addressing Class Bn Fig. P. 1.3.3.
- n biTS *hostid
in classful addressing hostid Class Cn=24 t id -
Any address netid
a network and
that of
of the net id is to define Last address Nefwork address 2 2 146.
. 75 64
Thejob host in that network. First address
the host id is to define a particular -n 2-n) (c) Class C network address
(G-539) Fig. P. 1.3.3
n bits define net
id then the -n E-)
As shown in Fig. 1.3.5 if * * * *
netid (G-536) Fig. 1.3.7
host id. netid 000...0
remaining (32-n) bits define it All bits The following examples will enable you to find the What is the difference between net id and network
for all the cilasses. Infact No change
The value of "n" is not same No change Al bíts
set to 1 network address.
shown in Table 1.3.1.
the class as set to 0 address?
is depend on
addresses the type of from a net id. A
Table 1.3.1 Total number of Ex. 1.3.1: For the address 24.46.8.95 identify The netvwork address is different
s2-1
N 2 network and find the network address. and host id, with Os for the
network address has both net id
Class Value of n Information extraction
(G-2008) Fig. 1.3.6: Soln.: host io
n=8 in classful addressing9 Examine the first byte. Its value is 24 i.e. it is between 0
the network address?
Where to use
6 and 127. So it is a class A network.
1.3.6 Network Address: the packets to the
Net id. So find The network address is used to route
n=24 address that defines the
So only the first byte defines the we can
The network address is an with Os.
to a host. Fig. 1.3.7 the network address by replacing the host id desired location.
network itself. It cannot be assigned
Block:
1.3.5 Extracting Information in a
shows the examples of network addresses for different
The process of obtaining the network address is shown
Network Mask or Default Mask
1.3.7
A block is nothing but a range of addresses. For any classes. in Fig. P. 1.3.1.
Net lD Host
to extract the Earlier we have discussed the methods for extracting
given block we would be interested Net id
following three pieces of information: Specific All 0s of information. But all these methods
1. The total number of addresses in the block 24 different pieces
Replace host id by 0's
115.63.7.30 are theoretical methods which are useful in explaining
2. The first address of the block. 115.50.15.90 Note that 115 is common
in the address of all
3. The last address in the block
machines in clasS Network address
24 .0 the concept.
A network
(G-537) Fig. P. 1.3.1 not used. When a
Before extracting all this information, we have to But practically these methods are
115.90.121.4
So the network address is 24.0.0.0. of the router in the Internet,
identify the class of the address as discussed earlier. packet arrives at the input
115.0.0.0 132.7.21.84 find the type of
Once we find the class of the block, we will have the Ex. 1.3.2 : For the address it uses an algorithm to extract the network address
values of "n" (the length of net id in bits) and (32 - n) network and the network address.
from the destination address in the received packet.
ie. the length of the host id in bits. Soln. :
Network address
Examine the first byte. It is 132 i.e. between 128 and This can be achieved by using a network mask.
It is now possible to obtain the
intormation mentioned above as shown in Fig. 1.3.6.
three pieces (a) Class A network address
192. So it is a class B network. Definition of default mask:
151.15.0.0 151.15.67.63 Note that 151.15 is
1. Total number ofaddresses in the block: So the first two bytes define the net id. Replace the host
n the address
A network mask or default mask in classful addressing
i n e s in class id with 0's to get the network address as shown in
The total number of IPv4 addresses in the given block
will be equal to,
S network
Fig. P. 1.3.2.
is defined as a 32-bit number obtained by setting all the
"n
N e t id host id leftmost bits to 1s and all the (32- n) rightmost bits to 0.)
N = 2- ..(1.3.1) 151.15.0.0
2. First address in the block : 151.15.90.91 132 7 21 84 1.3.8 Default Masks for Different Classes
Replace host id by O's
The first address in the given block can be obtained by We know that the value of n is different for different
Network address
keeping the leftmost "n" bits in the address as it is and
(b) Class B network address
Network address
132.7 .0.0 classes. Therefore their default masks also will be
setting all the (32 - n ) rightmost bits to 0 as shown in
(G-538) Fig. P. 1.3.2 different.
Fig. 1.3.6. (G-536) Fig. 1.3.7 (Contd.)
So the network address is 132.7.0.0.
TechKnowledgë Tech Knowledgë
'ubTTC Jtion
suoe

pabueyo si! oSje jeuioJ 1ped aya pue pabueyo OT'E'T B!H u! umoys yseu ynegep aya
aJeMIYOS HIOM]aU Se seu /nejap ayi o2 se
uaaq sey sassaippe dI ayi jO yaQua pue jeuuoj au1 '8 = paieduwoo
asneaq buysn ssappe yioMJeu e bujpujd :6'ET D!d (OTOZ-9)
6ubbngap o pasn osje si aungeaj si4 6upsa s,T exa 8314) BAPy Im yseuw jauqns 6upuodsauoo
peqdoo ssauppe paN1asa es uaya (»)IT ET 64 uoM@N o 00 LLOL
ayi uayi s33ugns 8 oJu! HuOM]au e apnp o1 uem am jH
ay jo ymoJQ uaasaiojun ay bunepowwove Joy u! uMOys sebujuKuy LZt. SI ssauppe a44 I
P! 1SOY pue P! 3u UMO S! Sey jaugns
payipou AjaNjsuexa seM joo10Jd jaueuj ay 9AdI uu
2auaujayi u/ aiauyMAue sNVMJue]sip
ype seuu jaugns e jo jeuioj ay2 SMOYs oT'ET '51
pasodoid sem (6udD uogeiaua5 xau 'jooo)oid 01 S18ped jseopeoJq puas o] saujypeuu mo|je ssaippe
jaugns yoea 1oj yseu 3auqns e aeao o1 peau
1aue]u! se umouy osje s! ypIum (9AdD 9 uojsian SI41 Ply 1soy ay u st ||e pue aqunu quom)u Lo"00 LL LOL
aM uop aq oj S! bugaugns uByM *3|! s]auqns Ja|jeuis
02010d gaueJui aya swajqoud asaya auooiano oi jdoid yM sseppe ue yseu ynejed sseippe uogeusea
s si41(P)ITET 514 Jaj® oju! papNIp aq o) S! HiOM2u uanlb ay2 uayM ing pojq ay2 u ssaippe 1sej ayj pue sassauppe jo
1a funse>njnu '6ujuoy-9inu pue KyIqou (8>nas 6TTET 614 equnu ey pug o1 yseuw ynegep aya 5n 01 a1qssod si
auop aq 01 30u S!
u UMoys se NV P s e pns uoMJau j e o a
o aend) soo unas 6uypnoid u suopeuauajdu 6'ET 64 u
uo sauo
bujaugns uayM a! SyiOMJaugns ia|jeus oju! papINIP uMOYS se ssayppe yuomjau ayi 1pexo 01 ysew yneyep
'sajqe 6ugno buaseopeoiq Joj pasn si je bujney sseippe ay
jeiALuJ-uou a6Je 'saSsappe aq o1 3ou si yuOMjau uan5 ay4 uaym pasn si Jauee
(9)TT'ET 61 u! UMOy4s p 49M Ssppe uoeugsap ay saNV 182n0J au
6uuaqunu-3 u Aynyyip 5ujsseppe eyoueau passnosip am 1eyi ysew inejap 1o Hseuu yJoMjau ay1
se jaqunu s! 6umouy inoyim uOMau UMO 2ped paAj9a
-uou jay
uonenByuo» no pue soy xajduo
01 1aja aqunu ioMjau ayi se 0 yim sassaippe dI ay1
a4) jo ssappe uopeu.sap ayj uioj Ssauppe quOMgau
aJe 1oo10d ndl aya jo suoejui paynuap! Jayio
ySBI jeuqns ay bupexa JoJ uoyejado aNv ayi sosn 8znou as1
pJemuaye pasn jou Jnq pajooq bujaq aje
peonpa Apidei si aeds ssaippedI ssappe3auqns uMo sy sey jaugns yons ye3
Aayg uayM SISOy ay1 Ag pasn S! 0'0'0'0 Ssappe dl 3U1 s3uqns JO 5JOMJaugns a|jeus oju! sEN
aJe e
ajqe|jene ayi osje pue pajseM sassaippe dI jo 10 6'¬L
JOMJau JOmau bq e apnp am Buzauqns jo ssaooJd aya u 4 od Dusn SsappVYIOMJON BuIpu
'suosea OMI BnOqe ayi jo asneag jsneyxa A}pinb IIm
pajeo!pu! ayi uo sISOy ||P o Ssaippe JSepeojq sueau saSsaippe
SyIOMJau ssejp ajge|jene jo Jaqunu aa "q2) Ajuo s o'ssassa'Ssa
St e pue OMJau s44 Jo jsoy sIya sueeu soJaz IIV o syojq a|jeuus ou! sessajppe jo yoojq e buYds
ssappe ssep e 6ujsn paujap aq ue eyi syiOMau jo o'o'99T9sz
sassaippe dI jejpeds IT'E'T "D!4 (ors-9 Jo ajdiouud ayi se bujauqns ayi augap u
aqunu ay2 se "pajeoje aie sassaippe dI ssejp om J
00'099
paIseM aJe yoeq doo Bujyku Bupzeugns jo uojjugea
"uayi ajeys pue syJOMJaUqns
SE inejoa ssejosseppv
abej e S! HOM]au
sassappe dI isoy jo jaqunu "(z-9) syseu 3nejoa: *'¬T eIqPL
uOMJeN (p)
ue Se uo jSBOpeaig Jo y Ssejp paNojje Jj8y1 apIAp
Ee u! paugap aq JP41 s1soy Jo Jaqunu ayi Ja|jeus oju! Ypoj9 8
8 sSejo sassaippe tAdI jo
HOMau SI1 o1 pajeo|je si sseippe a ssep jI 'sassaippe 01 pey suojjezjuebJo ayi ai0jajasi "uogeziuebio
uo 1sBopeoiq sassepp aaJyI aya jo syseui nejap ayi sis!|ua Z'ET ajqel
Ja|jeus 8iaM ssejp u!
dI Ssep OMJ Jo ssaippe di a ssep ajujs e Jaya supeui sL IIV sou jo spaau ayi uey 8'ET 514 (6o0z-)
aM 8 pueV ssep
spaau uOMJau siyi 's]soy 00E Sey }JOMjau e kes asn ja 5yojq pue pajajdap 1s0uje
1804 00 00 ()D a sse4ppe ssep og yseuu unejoa )
aiou si uosea puoass
Jo ssep jey3 u! syojg ayL jueuodu!
ajduexa 10 ssauppe dI jo ssep xau ay4
0 0 juawabeueuw panoJduul 1o 0'SST'SST9sZ |00000000 LELIHELLEELSELLL
suBOI SOiezS4O
'ssep Jejnoiued
1so I[¥ 0 Aunas pue
Jo sassaippe dI OmI Jayija spaau ! uaya
e ueya s s o y jo J a q u n u ajoui Apyb|s sey yiomau e I sassaippe dl jepads auos smoys IIET 61H szauqns jajeus
Aueu oqu! (payo|je t = u : 3 sse1
(SyuOMauqns) 8(u-2E)

O e yp!uM o) uoezjue6io
sassappe S!8 v ssep u! y0jq ssauppe a ssejp iog yseu ynejoa (q)
sesseppV di jejoads LL'E°L seM ! ISJ1H T
ue jo yJoMJaU a5jej e apInp o01 papaau
dI Jo no un
AIesgajoayi pin0 PlJOM ay2 pue o'o'ssT Ssz 00000000LLLLLLLEFLEEELLLLELEL
sySeu jeuqns pue ynejog: OT E'T6!J (TTOoz-B) suosea
aDJeos bujuoaq ae sassaippe dI anbun "Na 'sanap S 9L= (U-TE) * 9L=U
, 91 = u : 8 ssPIO
exo - & jou pjnoM bujssappe
ssajalm saonap payioMjau OM JoJ JuajyJns aq
buimojjoj ayi
(e)
'sauoyd ja 'sDd buipnpu! Aian ing
awesaq }! uoos ssaippe SSBD J0J YSEU Hnajaa
uoneajjoid ay y9M sassauppe ajqIssod uo|!q eBueyo oN OM ayi jeyi Juapina
jo Seu jougns jna
® sasn
Oo0O0 LLLLLLLL LLLLLLLDLLLLLLE yOMjau ayg ypea
yoIuM tAdI ISoy ayj uayi pue jsg
san6 'auayos bujssappe 19-2E + U= q n s u -
L s0 o 18s syq
uo /soy e yea
Ssppe dI anbjun e sey OMJOU SSBIO oAPy aM 2auwaIuf ayi o1 JapJo u
uo
0000000o LLLLLLLLLLLLLLLLLLLLMSBI HNejeg uo paseq ! bujssappe jana| OM] BYL
aoInap p8NiOMJaU ypea pue syIOMJBu sjujod-pua eya ajdipuud aya o'o'0'ss00000000 00000000 00000000ILLLL
uo
P! isoy pue
Ayyguap! 0) sassappe quOMJau saja di 8 (u-ze) -S4 DZ= (U-8) 8=u
afe S13uqns 8 oJu! BJaM Sesseippe 8U:y8Se1
isow a y buissauppe janaj OMi y!M
PIBY Ssappe si! S! tAdI Jo uojjeju!| snojnqo u42IM
papiAp aq oj s! HOMJaU SSejp e uaYM Hseu jaugns Sy '8'ET DH u! UMoys
aluea passnasip
d paubisap Ajeu6uo ay
Pue yseu yneyap ayi umoys aney am orET 64 u
pAdl Jo suoneyun zi'e'L| se aJe sesseppe puea'Vssep 10J sysew unejap au
OL'E'L |
bujmeugns bujsseippy jenaj eeyL
LaSS wes/ duoo) NOV L8SS wes/ "duoo) NOV
sj00010d 1eKE IOMON
Network Layer &Protocols Network Layer & Protocols
1-10 ACN (Comp./Sem. 5/MSBTE 1-11
ACN (Comp./Sem.5/MSBTE estrictions:
inside an organization
receives the
classless address blocks ha
Conceptually IANA is a wholesales and ISP is a retailer Soln. :
3.4 : Arouter address Some of the
restriction on nave of the IP addresses because ISP purchases IP addresses Step 1: To find the subnet address
with destination have to AND the
same packet a
the internet authonties order to
in In order to find the subnet
address we
imposed by from IANA and sells them to the customers.
190.240.34.95. If the subnet mask is /19 (first been
address handling. IP address and the mask as follows
0s). Find simplify the process of 22
19-bits are 1s and following bits are
1.3.16 Registered and Unregistered
120 14
block should be continuous
the onet address. 1. The addresses in a Us,
01111000.00001110.
00010110. 00010000 IPaddres
Addresses:
i.e. serial in manner.
Soin.: 128
addresses in a block has to be Registered IP addresses are required for computers 255 255
AND the destination The total number of
the subnet address, 2. MASK
To find
2, 2,2..etc. which are accessible from the Internet but not every 11111111. 11111111. 10000000.00000000
equal to some power of 2
P. 1.3.4. ie.
address with the subnet mask as shown in Fig. that is connected to the Internet.
19 1s -13 Os 3. The first address should be evenly divisible by the
computer
For security reasons, networks use firewalls or some 120
ANDin14
g
number of addresses. 00001110. 00000000. 00000000Subnet address
O00000. O000000 other technologies for protecting the computers. 01111000
Subnet 11111111. 11111111111
mask
the
The firewalls will enable the workstations to access (G-553) Fig. P. 1.3.5(a)
1.3.14 Supernetting: the
Internet but do not allow the other systems on
120.14.0.0.
-The class A and cdass B addresses are almost depleted So the subnet address is
Internet to access them.
Address 11000010. 11110000 001 00010. 01011111 find the other subnet addresses.
available. Similarly we can
But class C addresses are still These workstations are given the unregistered private
IP
addresses. These addresses are assigned by the network
90
Step 2: Hostid
40 34
- But the size of cdass C address with a maximum number
ANDing address. It is 120
addresses does not satisíy the needs of an administrator obtaining them from an ISP
without -Examine the first byte of the subnet
of 256
between 0 and 127. Hence this is a class A
Subnet Service Provider) or IANA. which is
001 o0000 00000000
More addresses will be required. (Internet
address 11000000. 11110000 organization. network.
These are special network addresses in each
class as
to the net id and the
90 240 2 0 The solution to this problem is supernettin9.
used for So only the first byte corresponds
shown in Table 1.3.3. These addresses are to be to the host id as
(G-544) Fig. P. 1.3.4 combines several class remaining three bytes correspond
In supernetting an organization and called unregistered
private networks are
shown in Fig. P. 1.3.5(6).
several
Thus the subnet address is 190.240.32.0. Cblocks to create a large range of addresses i.e. addresses.
networks are combined to create a supernetwork. 120
14 0 0
choose any of these unregistered address while
1.3.13 Classless Addressing We can
for a set of
By doing this the organization can aPply building our own private network.
Eventhough the number of actual devices connected to dass C blocks instead of just one. Net id Host id
Internet is much less than 4 billion, the address Table 1.3.3 : IP addresses for private networks
(G-554) Fig. P. 1.3.5(b)
depletion has taken place due to flaws in the classful Example of supernetting: Network address
Class So the host id is 14.0.0.
addressing scheme. If an organization needs 1000 addresses, they can be
we can find the other host id.
We have run out of class A and B addresses. To 10.0.0.0 through 10.255.255.255 Similarly
obtained by using four C blocks (one C block
overcome these problems, the classless addressing is The IP address of a host on class C network is
Ex. 1.3.6:
now being tried out.
corresponds to 256 addresses). B 172.16.0.0 through 172.31.255.255 198.123.46.237. Four networks are allowed tor
this network. What is subnet mask ?
The organization can then use these addresses as one
In the classless addressing, there are no classes but the C192.168.0.0 through 192.168.255.255
address generation take place in blocks. Supernetwork as a whole. Soln.
1.3.17 Solved Examples The default mask for a class C network is,
Address blocks Note The classful addressing is almost obsolete now and 255.255.255.0
Find the sub-network address and the host id
Address block is defined as the range of addresses. iistbeing replaced with classless addressing. Ex. 1.3.5
In order to have four networks, we must have two extra
forthe following: 1s. Hence the default mask and subnet mask are shown in
I n the classless addressing, when an entity wants to get| 1.3.15 Who Decides the IP Addresses ?
Fig. P. 1.3.6.
connected to the internet, a block (range) of addresses
No two IP addresses should be same. This is ensured by 255.
255. 255.0
is granted to it. a central authority that isues the prefix or the network
Sr. No. IP address MASK etau 11111111 11111111 11111111 00000000
mask
The size of this block ie. number of addresses depends number portion of the IP address. 120.14.22.16 255.255.128.0
a)
the size of the entity as well its Locally an ISP is to be contacted in order to get a
on as
nature unique IP address prefix. (6) 140.11.36.22 255.255.255.0
255 . 255.255. 192
That means for a small entity such as a household only
- A t the global level the Internet (c) 141.181.14.16 255.255.224.0
Subnet111111
mask
. 11111111. 11111111
11 0000o
one or two addresses will be given whereas for a larger Assigned Number
Authority TANA) allots an IP address prefix to the ISP. - 2 extra1s
entity like an organization, thousands of addresses can Thus it is ensured that the IP (d) 200.34.22.156 255.255.255.240
addresses are not (G-555) Fig. P. 1.3.6
be allotted. duplicated.
Thus the required subnet mask is 255.255.255.192.
TechKnewledg
Tech Knowledge
ACN (Comp. /Sem. 5/MsBIE 1-12 Network Layer &
Protocols
EX. 1.3.7: What is the subnet address if the destination So the various addresses of 6 subnets are as shown in ACN (Comp. /Sem. 5/MSBTE)
address is 200.45.34.56 and subnet mask is Table P. 1.3.8(b). 1-13 Nefwork Layer & Protocols
-1 byte
255.255.240.0? Table P. 1.3.8(6) Net ID Host D Class B:
Soln. bytes There are 2-bytes (16-bits) in the host field. So the
Subnet number Addresses (G-560) Fig. P. 1.3.10(a) : Class A address number of hosts in class address will be 65536
To find the subnet address we have to AND the IP B i.e.
2 per
address and the subnet mask as shown in Fig. P. L.3./. 201.70.64.0 to 201.70.64.31 The MSBin the network.
201.70.64.32 to 201.70.64.63
network field is reserved. So actually
200. 45.34.56 there are only 7-bits in the network fields. Class C
Destination 1001000. o0101101. 00100010.00111C00
address
201.70.64.64 to 201.70.64.95 So the number of networks in class A address will be There is 1-byte (8-bits) in the host field. So number of
Subnet 255.255. 240.0 201.70.64.96 to 201.70.64.127 128. hosts in class C address will be 2 = 256 per network.
mask 11111111. 11111111.1111000 00000000 Class B address
201.70.64.128 to 201.70.64.159 Ex. 1.3.12: Convert the IP address whose hexadecimal
ANDing
The format of class B address is shown in representation is C22F15B2 to dotted decimal
200.45.32.0 201.70.64.160 to 201.70.64.191
Subnet Fig. P. 1.3.10(6). Here 2-bytes are reserved for network notation.
address3 1100100 00101101.00100000:00000000 Ex. 1.3.9:
field and remaining two bytes are for the host field. Soln.
For a given class C network 195.188.65.0
(G-556) Fig. P. 1.3.7
design equal subnets in such a way that each Out of 16-bits in the network field the first two bits Gven hex number
Thus the required subnet address is 200.45.32.0. (MSBs) are reserved. So actualy 14 bits are available in
subnet has atleast 60 nodes.
the network field.
EX. 1.3.8 Soln. : Bnary 110o o0100010 1111 0001 010111011 0010
:
Acompany is granted a site address
201.70.64.0. The company needs six subnets. Dytes 2bytes
-
Fig. P. 1.3.9ta) shows the structure of a dlass C address
Design the subnets. in which 3-bytes are reserved for net ID and 1-byte for 10 14 bfte Host ID Decima
184 721 22
N e t lD
Soln. : hostItID. (G-563) Fig. P. 1.3.12
(G-561) Fig. P. 1.3.10(b) : Class B address
This is a class C network. So the default mask is, 3 byte
10yte The 1P address in the dotted decimal notation is as
Net ID So the number of networks in class B address is
255.255.255.0 follows:
As we need 6 subnets, we need three extra 1s. So the 8 bits
2 16,368. 194.79.21.226
subnet mask is, Class C address:
(G-558) Fig. P. 1.3.9(a)
Ex. 1.3.13: A class B network on intemet has a subnet
255.255.255.200 We are expected to design equal subnets such that The format of class C is shown in Fig. P. 1.3.10(). Here
each subnet has atleast 60 nodes (i.e. 60 users). mask of 255.255.240.0. What is the maximum
In the binary form the subnet mask is 3-bytes are reserved for network field and only one
as shown in
number of hosts per subnet ?
In order to identify at least 60 users we need 6-bits in
ig. P. 1.3.8. byte for the host field.
the host ID. Soln.:
11111111.11111111.11111111.111 00000 The remaining 2-bits are assigned for
shown in Fig. P. 1.3.96).
subnetting as
Out of 24-bits in the network field 3-bits
reserved. So actually only 21-bits are available.
are again
The structure of class B address is as shown in
+3 extra 1s Fig. P. 1.3.13(a).
Subnet
(G-557) Fig. P. 1.3.8 ITS bits -8 bits 14 bits -18 btS
In order to have six subnets, we can have 6 different
110 Network
Network Host 1o Net ID Hogt1D
combinations of the 3-extra 1s as shown in (G-564) Fig. P. 1.3.13(a) : Class B address
2 bits (G-562) Fig. P. 1.3.10(c): Class C address
Table P. 1.3.8(a).
(G-559) Fig. P. 1.3.9(b) So the number of networks in class C addresses is 2, The given subnet mask is 255.255.2400. So it is as
Table P. 1.3.8(a) 097, 152. shown in Fig. P. 1.3.13(b).
This shows that there will be four
equal subnets each 255 255 240
Combination Subnet number one having at least 60 nodes.
How many host per network in each IP 1111111111111111111000o|o000 0o00
000 Subnet 1
Ex. 1.3.11:
Ex. 1.3.10: Show by calculations how address class can exist, show with example ?
many network each 4 bits for 12 bitsfor
IP address class can have with host ID
001 Subnet 2 one example? Soln. : Suonet
Soln.: (G-565) Fig. P. 1.3.13(b) : Subnet mask
010 Subnet 3 Number of hosts in different IP addresses:
Number of networks in different IP address: Thus there are 4 extra 1s as shown in Fig. P. 1.3.13(b). So
011 Subnet 4 Class A address Class A: there will be 16 subnets and each subnet can have
100 Subnet 5 The format of class A address is shown in There are 3-bytes (24-bits) in the host field. Hence
the| 2 =
40996 hosts.
Fig. P. 1.3.10(a). Here one byte defines the network lD number of hosts in class A address will be 2" = 16, 7772, 16.
101 Subnet 6 and three bytes define the host ID.
TechKnouledga Techkneledg
Pubications
Pubiications
ACN (Comp. /Sem. 5MSBTE) 1-14 Network Layer &Protocol
Ex. 1.3.14: Perfom the subnetting of the following P Due to increased number of Internet users, it ACN (Comp. /Sem. 5/MSBTE 1-15
was Network Layer&Protocols
address 160.111. X.X Originai subnet mask evident that a larger address space would be require The net id and host id define the network and
255.255.0.0 Number of subnets 6 (six) as a long term solution to this problem. For this the respectively. It is possible to use the same idea in the
hostEx. 1.4.2 : For the same data of the previous example
find out the values of prefix and sufix lengths if
Soln.: length of the IP address should be increased which classless addressing as well.
all the available IPv4 addresses are divided
The original subnet mask indicates that we are dealing means the IP packet itself must be changed. A block of addresses granted to an
organization is into 4,294,967,296 bocks with each block
with a ciass B address. A long tem solution is to switch to IPv6. But a short divided into two parts called as the _prefix and the
having only one host.
term solution which uses the same address space has Suffix.
In order to have six subnets we need to use 3 extra bits
Soln.:
been deviced for Pv4. It is known as classless
from the bits that are reserved for host ID. So the The role of prefix is same as that of the net id whereas
Here the prefix length for each block is n = 32, and the
subnet mask is as shown in Fig. P. 1.3.14. addressing. as the role of suffix is same as that of the host id. Thus
suffix length would be (32-n) = 0. The address of the
In the classless addressing, there are no classes but the in a block granted to an organization, all the addresses
3 bits for single host in each block will be same as its block
address generation take place in blocks.
subnet 13 bits will have the same prefix but each address will have a
address itself.
The classless addressing was announced by the Internet
different suffix.
11111111 1111111 111 00o0o 0000000 authorities in 1996 in which blocks of variable length
|Note: The two previous examples show that the prefx
number n and the number of addresses in a
* Net ID- -Host ID- which do not belong to any class are used.
Thus the prefix defines the network (organization to
are inversely proportional to each other. With
block
which the address block has been granted) while the
increase in the value of n, the number of addresses
(G-566) Fig. P. 1.3.14
1.4.1 Variable Length Blocks suffix defines individual hosts on the network.
The 3-bits reserved for subnetting will have
in a block will decrease
Address block is defined as the range of addresses. The concept of two level addressing in classless
combinations from 000 to 111 out of which any six 1.4.2 The Slash Notation (CIDA Notation):
addressing using the prefix and sufix is as shown in
combinations be used for 6 In the classless addressing, when an entity wants to get
can
subnets Fig. 14.3. If an address (classful or classless) is given to us and we
the internet, block (range)
Let us decide that the combinations 000 to 001 are not connected to a
of addresses The IPv4 address is 32 bit long out of which the prefix
want to extract information from it, fhen the net id in
to be used. Then the subnet masks for the 6 possible is granted to it.
classful addressing or the prefix in classless addressing
will be of length "n" which can t¡ke any value from 0 to
subnets wrill have the following addresses. The size of this block i.e. number of addresses depends are extremely important and useful to us.
32 and the length of the suffix will be (32- n) bits.
on the size of the entity as well as its nature. H o w e v e r it is not easy to identify the prefix bits in a
Subnet 1 255.255.64.0 Note that the value of "n" i.e. length of the prefix
That means for a small entity such as a household only
Subnet 2 depends on the length of the address block allotted
given classless address. It is easy to identify the net id
255.255.96.0 one ortwo addresses will be given whereas for a larger from the given classful address.
entity like an organization, thousands of addresses can granted) to an organization.
Subnet 3 255.255.128.0 For a given classless address it is not possible to find
be allotted. 32 bits-
the prefix length because the given address can belong
Subnet 4 255.255.160.0 Fig. 14.1 shows how the address space is divided into PREFLX SUFFIX to a block with any prefix length.
Subnet 5 255.255.192.0 n-bits (32-n) bits
non overlapping address blocks.
Therefore, in classless addressing it is essential to
Subnet 6 255.255.224.0 (G-1806) Fig. 1.4.3 : Two level addressing using prefix include the prefixlength to each address if the block of
Block 2 Block-m
the given address is to be found.
and suffix for classless addressing
1.4 Classless AddressinginIPv4: BoCR E ADDRESS SPACE LBlock
Ex. 1.4.1: Find out the values of prefix and suffix lengths
Hence the prefix length "n" is added to the classless
address separated by a slash and the notation is known
Eventhough the number of actual devices connected to (G-1804)Fig. 1.4.1: Variable length blocks in classless
in classless addressing if all the available as the slash notation.
Internet is much less than 4 billion, the address addressing
addresses in IPy4 is to be considered as one Fig. 14.4 demonstrates a classless address with slash
depletion has taken place due to flaws in the classful Two level addressing:
single block. notation.
addressing scheme. We have discussed the two level addressing for classfull
Soln. Classless address
We have run out of class A and B addresses. To addressing which divided an address into two parts The total addresses in IPv4 is 2 = 4,294,967,296.
overcome these problems, the super netting and namely: net id and host id. LPREFIX length
We have to consider this as one block hence the prefix SLASH notation
subnetting has been tried as discussed earlier. netíd hostid
length n 0. Whereas all the hosts will have their
(G-1807) Fig. 1.4.4: Slash notation
But subnetting and supernetting also could not solve individual addresses. So all the 32 bits will be allotted to
Defines the network Defines the host
the suffix length. The slash notation is also called as Classless
the problem of address depletion in IPv4. (G-1805) Fig. 1.4.2: Two layer addressing in classfull
Interdomain Routing or CIDR notation.
addressing
uledge
TechKnouledge
Pubiicatlons
TCtions
Network Layer &
ACN (Comp./Sem.5/MSBTE)_
1-16
Protocols Network Layer& Protocols
ACN (Comp./Sem. 5/MSETE) 1-17
1.4.3 Network Mask:
mask in the
Given
-addrøs9
O230:166 Ex. 1.4.4 I f an address in a block is given in CIDR n (32 n)
We have discussed the concept of network Prefix SUIX classless notation as 64.32.16.8 / 27 then find
classful addressing. The same concept is also applicable All set to All set to- the follwing : Network mask = | 27 ones 5 zeros
in the classless addressing as well. zeros 1. Number of addresses in the block (N)
Network mask 255.255.255.224
A network mask in classless addressing is a
32 bit Network 25 25 O T 2. The first address and
mask mask
number. With its "n" left most bits (corresponding to 3. The last address. For ANDing write the given address and network
(G-1809) Fig. P. 1.4.3(b)
in their binary notations as shown in Fig. P. 1.4.4(a).
the prefix) all set to 1s and the remaining (32-n) bits
Thus the network mask = 255.255.0.0 Soln.:
coresponding to the suffix all set to 0s. in the block
Step 1: Find n:
From Fig. P. 14.4(a) we get the first address
1.4.4 Extracting the Block Information: as:
EM. 1.4.3: For the following addresses identitly the Given address 64.32.16.8/27
number of prefix bits and write down the We can extract all the required information from the Ans.
First address = 64.32.16.0
Hence nz 27 from the slash notation.
network mask: given classless address in the CDR notation. The
information that we can obtain is as follows n 27 bits. Step 4: Find the last address:
11226.25.79/8 have to keep
2. 130.12.230.156/16 1. The first address (network address) Prefix bits = 27, suffix bits = 32- 27 =5 To obtain the last address in the block, we
it is and set the
Soln.: 2. The number of addresses. the left most 27 bits in the given address as
Step 2 Number of addresses in the block (N):
remaining 5 bits to 1s as shown in Fig. P. 14.4(b).
1. Classless CIDR address: 12.26.25.79/8 3. The last address. N 20-0=Z = 32
address in the
As per the slash notation we have n = 8 ie. number We can obtain the number of addresses in a block as From Fig. P. 144(6) we get the last
Find the first address:
of prefix bits is 8. follows
Step3: block as follows:
Refer Fig. P. 1.4.4(a) to obtain the first address in the
Number of addresses in a block N = 2 n)
Therefore the number of suffix bits = 32-8 24. .14.1) Last address = 64.32.16.31
block. For this we have to AND the given address with
In order to obtain the network mask the prefix bits Where n= Number of prefix bits.
the network mask.
all set to 1ls and the sufix bits all set to zero as The first address or network address in block can be
shown in Fig. P. 1.4.3(a). obtained by ANDing the address with the network
32 16 8
64
Ln=2-8= 24 bits mask.
acdrass
adares 0 10 00 0O000 110 001000101O1 0 01010001O O110100
Gven First address = (Any address) AND (Network mask)
addrese 12 26 25 L79 8 D55
AND
1.4.2) 224|
Prefix SufK Network
mask 1 1111 1 1 1 1 1 11 KIA1 1 110 0 01O 0
OR what we can do is keep the "n" leftmost bits of any mask
Set alt prefix Set all sutfix No. of prefix n 27, bits - 5 bits
bits to 0s 8 address as it is and set the remaining (32-n) bits to Os.
bits to
T This is equivalent to the ANDing operation mentioned
Netwonk25 address 0i1101010101010
address 0:011 0101010j0|0 0 0110101010:0:0:0i010 0 0 0
mask 255 0 0 HO above. 64
L I n order to obtain the last address in the block we have
(G-1810) Fig. P. 1.4.4(a) : First address in the block
(G-1808) Fig. P. 1.4.3(a) to add the first address with the number of addresses in
Thus the network mask = 255.0.0.0 the block directly.
2. Classless CIDR Address: 130.12.230.156/16
. Last address =
First address + Number of addresses in the n27 bits 5 bits
block 1 0 0 0.0 0 D00 1 0 0 00 00 0.01 0 00 00 0 0 011 01010
As per the slash notation, 16 i.e.
.(1.4.3) address
n =
number of - I t is also possible to obtain the last address
prefix bits is 16. by ORing Take these bits as it is S e t these bits
the address with
complement of the network mask
Number of suffix bits = 32-16 16
Last address = (Any address) OR [NOT (Network Mask)] dees01OIOIO
address 0 01OOO110 00010OOO10O OI0OOO
In order to obtain the network mask, set all the Li32 L L L16 31
prefix bits to ls and set all the suffix bits to Os as ..1.4.4)
O n e more (G-1811) Fig. P. 1.4.4(b) : Last address
shown in Fig. P. 14.3(b). way of obtaining the last address of tne
block is to keep all the "n" left
most bits (prefix bits) as
it is and set all the
(32-n) bits (suffix bits) to 1s.
eckneuledgo
Pubilcations
TechKneuwledgo
Pubiicatlons
Netwark Layer & Protocois
Network Layer &Protocols 1-19
ACN (Comp. /Sem, 5/MSBTE) -18 ACN (Comp./Sem.5/SBTE) inforrmation about each network in the
sed to fnd the
the last address in the block
From Fi. P. 1.4.S{b)
we get, 1.4.7 Subnetting:
/ 24
Ex. 1.4.5 the olassless address
129.65.33.01 internet
For is as follows of subnettin9 in classiess addressing
IsP is
find the foliowing The concept
A iCk addresSES granted to an
Last address 129.65.33.255 Ans. discuised for the classfu Ex..14.6
to that
in the block (N) similar
I These addresses
by 130.34.13.4 26.
Number of addresses donain is
gven
subnetworks with
The first address. addressing are to be o e d into four
1.4.5 Block Allocation: is used tor creat1ng a three ieve number o the
hosts. Design
The last address. The subnetting enual
how to allocate the blocks in the in the
cla5sless addressing dorriain wbretwts and cbtain a the int mation
Soin. : Now let us understand hierarchy
of addresses
classless addressing. The global
authority for the block or an 1SP have a block a t t 6ach s b r e
An organization
Step 1: Find n ICANA means Internet Corporation for them. It can divide these addresses into
allocation is
granted to
overn address 29 65.33 01/24 hence n
*24 trom the
Assigned Names
and Addresses.
several subgroups and
each subgroup of addresses is*oin. 1: Find totai number of addresses (N):
Step
slash notation. is not subnetwork or subnet.
the Internet users
assigned to a 25 (prefix length).
But the individual addresses of get n=
a d d r e s we
furtherif the
From the given
the ICANA. Instead 1CANA will assign large be subdivided
its allotted by The subnetworks may Hence the number zddres he whoe network
blocks of addresses to various SPs orlarge organization want it that way.
32- 24
efa bits 24, suffix bits =
organization will assign
wiH b
organizations. These iSPs or
-=27-* =2 54
in the block (N) : Subnets : 2
Step 2: Number of addresses
from their 1.4.8 Designing
addresses to the individual Internet users
Ans.
granted to an 1303413.64 / 26
N 2 256 allotted blocks Let N Total number of addresses
The first address in i s biock will be
26.
organization. be 1303413.127
Stepp3: Find the firet address whereas the last address w
Restrictions ottec e procedure
obtain the fist address in the n Prefix length These values have been using
Refer Fig F. 14.5(a) to
each
classless address blocks have number of addresses to
address with Some of the restriction on sub ASSIgned disassed earie
block For tthis we have to AND the gven that we have
in order to subnetwork
the network mask. been imposed by the internet authorities
simplify the process of address handling. Nub Prefix length for each subnetwork Subnet design:
2 - n of hosts per subnetwork:
i.e. Total number of subnetworks. Find number
1. The addresses in a block should be continuous, S Step
p2:
that the with equal number of
Network mask 24 ones 8 Zeros the steps given below to ensure
There are four suonetworis
serial in manner. Now follow
Network mask = 255.255.255.0 2. The total number of addresses in a block has to be subnetworks operate properly. guests
Number ci hosts per subnetwork is gven y .
For ANDing write the grven address and network mask equal to some power of 2 i.e. 2', 2,2 ...etc. Steps to follow:
ither otted deCimal notations &s shown. The first address should be evenly divisible by the subnetwork should -Ans
The number of addresses in each
A4re ND *
number of addresses. always be equal to a power of 2. i.e. 2, 2, 2 ...etc.
Network mask 255 frs: recuirement va: 4 } 16 should be a
Note that he
We can use the following expression to find the prefix
i s A r e s s (AN
1.4.6 Relation to Cilassful Addressing power of 2 has been satisfed here
length of each sunetwork.
he classful addressing may be imagined as the special Find the prefix lengths of the subnets:
G-1812) Fig. P. 1.4.5(a) : First address in the block
Step 3
ase of classless addressing such that the blocks of nub n+ log -(14.5)
The prefx iengths of the four subnets are given by.
From Fig. P. 1.4.5(2) we get the first address in the addresses in class A, B and C type addresses wil have
The starting address in each subnet should be divisible
block as the prefix lengths na = 8, ng 16 and ne = 24.
the number of addresses in that subnework To
by
First address =
129 65.33.0 -.ANs.
Table 1.4.1 lists the prefix lengths for class A to F achieve this we need to first assign address to iarger
Step 4 Find the last eddress : classful addresses and using this information we can
networks.
change a block in classful addressing to a block in 2 8 Ans.
TO obtein the iast eddress in the biock we have to keep Note These restrictions are similar to those applied when
classless addressing. Starting and ending addresses of all the
the left most 24 bits in the given address as it is and set the
Table 1.4.1:Prefix lengths for classful addressing
addressesto networkwere allocated Step
remaining 8 bits to 1s as shown in Fig. P. 1.4.5(b)
1.4.9 Finding Information about Each subnets
Refer Fig. P. 146 which shaws al the starting and
Adtress:2 906 5DE 3PO1 Class Prefix length Class Prefix length Network:
ending addresses oi the 4-subnets.
As it is Set to 1 8
/4 After designing the subnetworks, we can ind the
it shouid be noted from Fig. P. 14.6 that all the starting
Last address: 12 9:6 5-B 3-|255 / 16 /4 information about the subnets such as starting and last
the procedure that was
addresses should be divisible by the number o
(G-1813) Fig. P. 1.4.5(b) : Last address in the block 24 addresses we can use sane
acdresses in the subnet ie. by 16.
ecKneusledg
TechKaewledgo
8inos se oiaz Jaas
paje!ydwo9 Jou sayped
ay ssappe ||P sIy4 bujsn dDHa
0 1 1aped pAdI ue spuas /soy ay4 'suonenys ypns uI 01 1axped ayi puas oj 3eJJaU! aYI pue ssappe jo bujpjemoj seyeuu bujno ssajssep ayJanaMOH
9E9's99L/00'PST69 89Lt0'tZL/009124L "SsOJppe UMO $3! Mouy UOMJau au nos anyQ IM bujaNY au jo unsau a 1 o ua5 si Kvepunoq akq 8t0z ay2 uo sassaupPpe
9ES'$99L/0'0'89-26 9Lz'LLL'9L| 8/000OL 20u seop } ing eped MdI ue puas o) sey isoy e uaym 8t07 Jo poq e uay 'sassauppe 0ooz Kes spsau ays e jI
sassappe dI ayi jo je2
sossappp uopejunuwoo Joj paniasa uaaq sey ssappe su1 0j 159S0|p S! Ssaippe aSoUM a0BJJaIU! BUy2 Jo Hseu 1augns ssep au jo ssejpuebai sypojq
O JequnN 9018 1o 1uinN ayz yaiM ONY uBy pue sj9 o Ssaippe dI 8YIueAuO paz!s-a1qPLJeA U saSs2ppe dI bujujeua BY2 bujzeoje
sessappe agenHd: T'ST ®1qe1 Jo ajdpuud au3 uo paseq S! HOD B4L bujanou
o yaouej xyaid e sey pue ssappe O1ez |e ay3 se pa|je
TTp ' d wejqoid jo uonjoSuewog ajuj sajssep) uaD S! suonjos a jo auo
sypojq ssaippe yons P!dop L S S! 1 sauppe auo Auo sujeuo ZE / 00oo xpojq a1
pasn s Anue vz/ ueya yseu t/e wajqoid sIua oj suoIinjos ayi jo auo ssn>S!p o2 bujob

:ssappv so1ez iIV Tsi pue yseu oz/e 1oj ypuewe si Bau j! ajduuexe 104 Ppasn aJe aM uogpas si4i uj Jano uojssnsip unõaq sey
LVN) uonejsuei ssaippy uOMaN u woy
sI ysew 1sabuoj ayi aseo e yons uI ypjeuw ssj5uaj yseui AJunwwo 1aujaJu! ay4 pue ja]sesip jeiuajod e s/ sIuL
pazeyos ou o1 papauuo jauau ae sassappe aseyiL asodind
33ugns ju8/8yIP yM saugua juaiay!p jey ajqissod S! H
sasseppe ajenud se umouy aue asn aeA;ud 1oJ pau5isse Ppads JOJ paasa uaaq aAPy SYpojq ssppe auoS sassappe
ypew e Joj xooj o1 Aua Kq kaua pauue5 5i 91qe Jo ino buuuni si di jawaju! jo ymoiQ jeuauodxa ayn
S Ajeqob paz!uboa jou aJe jey/ Spojq ssappe ayi
Soj8a jejoeds L'ST upnou ay2 uayi ssauppe di uojeujisap 5! $2Dex o1 anp 'JBnamoH sapeap 1o pasn Aneay bujaq si dI
e uayM
pauasa aJe sassaippe auos 13M Se bujssapppe 5Jy 8]noJ ayi ndu! ayi 1e saAUJE 13yped
: Bupnoy ujewog ajuj ssajsSBIO-HaD
Ssajssep au u AJe|uuys *asodind jepads o pauasa au!|
ue "ujos
aJeMIYOS tAdI ®yi bujsa) 1oj pasn aq ue
aam sassauppe uos 6ussauppe njssep au uI bujobano pue yseui 3auqns 'ssauppe dI jo sISISU0
jeMyos joo20Jd ayn oj suingai ing je je auype L'9S ES 76L *7 OLE9'9'SEL °L
Keie ue jO yojsm (ja '5
BIdju) ypeg sajdiun jo sISISuo
10u saoP 1axped e 'ssappe si41 5ujsn uo , saALLIE
a4 aAPBI :sesseippv jejoeds SL ou) syJOM]au Ije ioj a1qe
'a 'v ssep JoJ sajqei 2uejayip
Sseppe jP4) M J8NOEd P J! Op J0]no e i seop
Ssaippe yPeqdooj ayi JoJ pasn s! 8 Jo yiõuaj xyaid e e Mou ZE P J! buD
abujs s! eJayi os Ysew y9
e uo aeMyos a1
Z Jainoy *3! 4nejaP ayi oi papieMioj bujano Mou
1BYM "sOSseippe dl buimojjoj eyi jo yoeS J0
4M 8/0o'0'LZt ¥pojq ayi aujypeu AIJua ajqe) Ja]no ypea peajsuI
Aq papua]xa si
8uaH "T 0 0 aeLJaU! Jo sassappe
Ssappe S! Ss8ppe ypeqdoOj V IILM 13Ped ay unejea
pasn ay HaID Y3IM uOM JOu 1no
nyoun ungs O s 4P!yM yJOMIaU ayi yM yp]Puu jou saop buiaNV JO HNsaJ S!4L
ay1 Jejnou ST/0'07ES76.
SID : ssappy yoeqdooj vSL saop 13!ea ujejdxa uypuobje buipjemoJ ajduis
(vL6T-9)
o'9seSz6L : Haio 4iIM BujpieMIO
ca/o0999EL
uOMIBU ayj uo sjsoy
za/0 99 94sEL
¥SPN ONY dI
uoIpeujisap 00000000'000LL LO0LOLOLLOOO00000LL
ay2 je q passasOJd pue panjaa aq |!M doHpxeN ySP/SsIppy
00000000'OLLLLLLL'LLLLLLLL'LLLLLLLL = 0vST'SSTSST YSEI ua ea sEM
ojaz yIM Juas weibejep ayi1 uodn SeM 18Ded ayi pue papipap
se ssappe e ay LLLOOO00'000L L LO0" LOLOLLOO'000000LL L'9SES761 = dI
papjeMOj ejqe Bugnou
seM Agua ayi se uoos sy S
wayi yonoiya : SMOj|OJ Se yseu y9 ET e Yi!M SsaJppE di epea a41 bujob|no ayi 'punoj Jeno v LVL *3
Bu S U seugue Haio bujMojjoj Sey
siajnoi asneaq 3jqei J o 8
SSed o auo
|1e ay/ mojje jou op
1axped dSI auo o paubisse pue
e 4pns
uomjau ayy o1 s 6ugsepeoiq VBy1 u payoJeas uayi seM Jqunu yIOMjau a
Auo pauyuo S! dl S!y4 02 Isasojp S! Ssaippe asoyM 3aJau! ayi aue sasseuppe jo sypojq Aueu snyi
auo u pajebai66e
jayped tAdI ay2 yo1g
=
dl ayi oi peubjsse pue sjauqns Ja|jeuus
auo asn u e
L'9S'ES 6L SdSI ay Aq siawojsn
e se ssappe je i1q-+z 1o 9T e
apsu! ssauppe uoneugsap paubije 146u pue Jaqunu yuoMjau ue oj sassauppe jo yojq abiej
ou! papnNP s! yo!yM dSI
o &
uaya Ajsnoauejnuijs sisoy a2 je payseu uayi ssejp ypea joj apo ay1 sabeueApe
isoy 6u!puas ayi JO 8 ay4 Ho M SY aunpayJe HaD Jo
33ped siu4 pieMJog IM JaInoi ayi auaH T 8ejau! subjsse NNVDI 'MOUy
Ssaippe jseopeOJg
abessau puas oj s u e m jsoy PJ! a auo pue uojjebaib e ssaupPV
42IM Sayeuu bujaNV JO nsaJ SIL 3 pue g JoJ ypea ssep Jojsase a2 jo auo aq o) paJapisuos SI
1e siyl Sseppe yiOMau By
auo V SSejD
p a u J O J p a a s a uaaq sey ssaippe j o OMI 'g ssejp JOJ
sase ay2 Jo inoJ
=
EL6T-) uoneßeb6y sseippV OL'VL
ZE u jo yzQuaj xiy3Jd
=
dI Sases yim (pauoddns j) a pue
NGEW INY ayi jo ybija
ue se pajje> s ISs>PPpe o'09'9 SEL V 7
auo le
P =
Sey pue ssaippe HSEN CNVdl 8V Ssep s1ayped suos uaya youejq AeM-9T
ou
ZE / SSZ'SSZSSTSSZ ¥Poj9 a o0000000' 00LLLLOOOLLLOLOO'LLLOOOOL e
auo Ajuo sujejuo =
ujejqo
LLLLL°LLLLLLLLLLLLLLLL= y6Bu }Ng zz aqunu ssejp 119 t
00000000 0OL 0'aSZ 9ST SsT
ssejppV OLOLO000LLLLLLOO'OLLLOLOOLLLOO0OL = OL'¬9'9t°9EL =dI seM Ssappe di ay
8Z Kq y6L paYIys
: SMO||OJ Se Yseu yg Zz e y1!M SSappe dI uanb S3 e se uoos sy T
peyuij-sseppy euo IIV E'SL AGOP e 1e sanLIe 1ayped
Jseopeog JanoJ
e sasn aeja]u! SI41 'T a e a u !
aNV oS YSeUI 319 T7 szayped bu!piemioJ
ssappe uMO y SMOjIOJ Se S
8ejjaju! aui 98u7SSEppE D9NS3
S! dI 03 1sasop s! Ssauppe asoyM pamojI0 Sdajs a4L .
se (ssappe SI4 uasAs pjo ayi u
se os 'ssaippe uoNeuLsap ayi inISsep 92/9'EL e'OEL
s! puy o1
e pue ssappe
auo ssaippe iseopeo1q pau! ejsis injssejo pjo eyi uj yJuobje bujpJBMJO
Ije) (3L8SWS ues/ 'duoo) NO
18SWS u e s /duoo) NOV 03-L
yiOMjON SIo01
sjooojold 3 eAE
1-22 Network Layer &Protocols Network Layer &Protocols
ACN (Comp./Sem. 5MSBTE) ACN (Comp. /Sem. 5/MSBTE) 1-23
A quick solution to this problem is NAT i.e. Network the delivery of the
IP the services of ICMP during
1.5.6 Multicast Addresses: LAN Packet before
uses
situations such as
described in RFC 3022. to handle unusual
Address Translation. It is translaion
datagram packets
4 with prefix length of n = 4 hasS presence of an error.
The block 224.0.0.0/ a The basic idea in NAT is that each company is assigned
Packet after
for unicast delivery. But some
been reserved for the multicast IP communication. translaton IP is basically designed
single IP address or at the most a small number of Ip new Internet applications as well as multimedia need
in Each Block:
1.5.7 Special Addresses addresses so as to access the Internet. multicast delivery.
The usage of some address in each block for special
Within the company, every computer gets a unique IP Company
12.0.0.2 19.60 421 So for multicasting, IP has to use the services of another
addresses has been recommended. But it has not been
the internal traffic of
4 -O protocol called IGMP.
address which is used for routing SP's router of IP whereas IPv6 is the
These addresses are not assigned to oulo IPv4 is the current version
made mandatory. NAT Lsased
anyhost.
the office.
5P box/firewall
ine
atest version of IP.
But when a packet goes out of the company, and goes
One important point to be remembered is that a very 1.7.2 Internet Protocol (IP) :
small block of addresses should not be used as special to ISP, the translation of IP address takes place there. to host delivery
Protocol is the host
The Internet
layer and is
addresses.
In order to make this scheme work, three ranges of IP protocol which belongs to the network
Company premi8S
(G-551) Fig. 16.1: NAT designed for the Internet.
1.5.8 Network Address: addresses have been declared as private. Companies
the
the transmission mechanism by
IP is used as
can use these addresses internaly as per their
The network address is defined as the first address (with
1.7 Internet Protocol Version 4 (IPv4): CP /IP protocols. That means the TCP or UDP packets
0s) in block. is used for defining packet containing these the IP carries it
the suffix set all to a It requirement. However no
We have already discussed the addressing mechanism, are encapsulated in the IP packet and
the network itself. It does not define any host in the addresses is allowed to appear on the Internet. The from source to destination.
for the IP packets.
network. with no
three reserved ranges are as follows . Now we will discusS the format of IP packet in the next IP is a connectionless datagram protocol
With the same principle, the first address in a guarantee of reliability.
few sections.
subnetwork is called as the subnetwork address. Range1 10.0.0.0 to 10.255.255.255/8 16777216 Hosts It is an unreliable protocol because it does not provide
In the discussion we will see that an IP packet consists
1048 576 Hosts any error control or flow control.
Range2 172.16.0.0 to of a base header and options which are sometimes
1.5.9 Direct Broadcast Address: useful in controlling the packet delivery. IP can only detect the error and discards the packet if it
173.31.255.255/12
We can use the last address in a block or subblock (with
is corrupted.
the sufix part set to all 1s), as a direct broadcast Hanges 192.168.0.0to 65 536 Hosts 1.7.1 Position ofIP: If IP is to be made more reliable, then it must be paired
address for that block or subblock. 192.168.255.255/16 The main protocols corresponding to the network l with a reliable protocol such as TCP at the transport
A router generally uses this address for sending a in the TCP/AP suite as well as Internet layer are: ARP,
Generally most companies choose the addresses from layer.
packet to all the hosts connected to a specific network.
e first range.
RARP, IP, ICMP and IGMP. Thisis as shown in Fig. 1.7.1. Each IP datagram is handled independently and each
This address is used as the destination address in the one can follow a different route to the destination.
IPv4 packet and all the hosts will accept and process the Refer Fig. 1.6.1 which explains the operation of NAT, It
IGMPICMP
So there is a possibility of receiving out of order packets
datagram which has this destination address. shows that within the company premises, every at the destination. Some packets may even be lost or
machine has a unique address of the form 12.a.b.c. corupted.
1.6 NAT-Network Address Translation: Neiworkk
layer ARP RARP IP relies on a higher level protocol to tak care of all
But when a packet leaves the company premises, it
The problem that existing number of IP addresses is these problems.
passes through the NAT box. This box converts the (G-524)Fig. 1.7.1: Protocols at network layer
less than the actually required ones Is practically The version of IP that we are going to discuss is called
internal IP addresS 12.0.0.2 in Fig. 1.6.1 to the Out of these protocols IP is the most important
important. as IPv4 i.e. IP version 4.
protocol. It is responsible for host to host delivery of
A long term solution to this problem is that the whole company's true IP address 198.60.42.10. IP is also called as a best effort delivery protocol. The
datagrams from a source to destination. But IP needs to
Internet should be migrated from IPV4 to IPv6. This has T h e NAT box is generally combined with a firewall. it is meaning of the term best effort delivery is that the IP
take services of other protocols.
begun, but will take yearto get complete. (That means also possible to integrate the NAT box into company s packet can get lost or corrupted or delayed. They may
IP takes help from ARP in order to find the MAC
all the computers should have IPv6 addresses instead of router.
arrive out of order at the destination or may create
physical) address of the next hop.
IPv4 addresses). ongestion in the network.
TechKnowledge echkKnowledge
PubIications
suoe!1qnd
u o e 311qnd BDpalnoupol
BpaimouyNYpoL.
"uoISJaA tAdI O
"we6e3ep auyi jo squaubey ayy ayqwassea sbuojaq webejep siu jeyi aujypeuu bujsseoJd ayi
sJakej uaddn woiy ejep Aueo oj paNasa uo bujuunu
03 uoneugsap ayi Aq pesn s aqunu uoneDYNuap! uojejaidiau! avemyos diI ayi ayeoipu! m Pjay IyL
Je sag bujujeuuai Byn pue japeay ayi anigsuo auapasaJd asodind
sIuL squaubey 1e oju! Ppajdoo a6 play 9AdI ! dI JO uoISiaA IsaJej aya fq
saq o9 o1 oz ypym jo ino saía sEss9 = (T -,,2)
uopeyinuap! au jo s]uauod ayi 'pajuubey s SMO||oJ Sse 'sÁeM JUaiayip pavejda Ajp1ajduo aq Aeu ) angng uj anq ndi
®
o papusau s we6eep dI au2 Jo ybuej OMa u! piBygns Juodapo 19-9 ayi asn ues
webeep e ueuM 3so4 3inos aup uoy 5ugeubuo aM b SI di jo uojSJan Juaiins ayi jo9o20Jd dl jo uojsian
e30) ou os s1q 9T S spPy si44 jo buaj Pjay y ayg augap 03 pasn si ypiym pjay 19 + e s! sIuI
weberep au Kynuap! o pasn s Pay SIL PBygns pasnun
19 Z e pue pjaygns Jujodapo 49 9 ayp Ajaweu
PiOy ejep ayi Se |j|aM Se 1apeay 1O yiuaj
spjayqns OM OJu! Ppap!ip s Piay adki auas : (uojsan)43A L
:uoneounuepi ayi sapnjpu! yiõuaI jejoj ayL wejbejep di ay
ayi 'uojej8idiaju! Mau ayi u! "p'LT 61J UI uaas sy
: SMOI10J SE aJe 1Ploj 1apeey ay spjay snoJeA
jo ya6uaj je01 ay auiyap 01 pasn si ppy 19 9T s4
6uipped ayisi ypnu MOy pue PIPy dk onis jo uopejeidiajuj maN: LT 613 (es0z-9)
euog epeoy tAdI: E"LT 51H (z80z-9)
eep ayi S! ypnu moy puejsiapun o) se os pjay yasua|
uonejeidejuj eoes
jeo au qpays o spaau 'weibeep ayi sajeinsdeap (sanq ov - 0)
sesodind jequauiuadxa Joj pasn aq ue pue Aieiodua enueiojiaa
Duipped + SUOJdO
o jsoy) auupeu ayi 'suojenijs ypns uj
eya (anoi s1 auo pjua ay1 asm puooas ay ubj5se sojguoyine jeoj uoneeidieU
BJe Se sjq
8uopeoe1d sseppe dI uoNeugsed
papnpu jeui jaM ayi Aioßajes 1Sly ayi ubisse sauoyine jauajuj a1 Ox
-..
OO0E Sseppe dI oinos
buipped a w o s aje aiayi inq awej aya u! pajejnsdesua AjaAypadsau sadkj adwas 9t
a u o s u! ing
ou sl weJbeep aya Ájuo 'suopenys jejpads ujejuos saUobaje pyi pue puosas jsy ay1 posnun 1ujodepoo 8
pue 9T b7 S 8j0ooj0Id
SIUI Jou op am Syeuo JepeeH
"Ie je pjaY paau PBy adk
LOX*xX
01 JaMSue
81uewuedxg Jo Aiejoduei Sq 9L uoJeonuepPI
suogeniS Aueu u! qeyi s! uojjsanb SIui ay. A a s ay Jo uoyeraidiaju! mau ay sajeysnj|! 5sJo uojeueuBeiH6e
Sq 91 SHg8 edfSU s
Play Syi apnju g01LLXXXX vLT 614 s23JAJs jepuaiayip jo j8s e uyop nBuej je 801ues NETH EEA
e saAjaaJ }! uayM Jaj!e) pue Japea4 jeweu Oxxxxx 01 pasoddns MOu Pey si41 H13I Aq ELT 6:4 U! umoys se s! ainjonuis Japeay dl 34L
01 AyM uayi 'awey s pabuey
uaaq sey pjy Siyn jo uogejaidiaju! ayi Mou ing
Jo ISoy ayi asnedaq panba kuanjap weõeyep ym payeosse uoyeuioju! 1onuo
ayi doiP I!M JaIno Ayuouane Buju6jssyujodapoo Auoßoeo 2a IndybnoJyi pue uopeuuioyu! 6unnoJ sujequoo apeay auwey dI ayi
jo senjeA: TLT 199 y614 epp MO se ypns saIAs a19/ssod
paeu eM op fsM sujodapo Jeuo epeaH tAdl L'L
ySuej jejo) eya
PIe TLT 19e1
quaiayip jo no adiuas jo adk ay auyap o1 pasn
ypImpueq paubjsse
ved 6ujujewai ayi pue wesbejep jo aouapaad suoes (1q ze)
jad se Jo 13uiajuj ayi Aq
sanuoyine jeoj
ayi auiyap 01 pasn pPjay SIyi jo yed e 'aun jeya iv ahq-+ u Japeay ayi mous o3 dl/dl u uwogsns e s! H
uawanoidu! uo 'sadInias (8- +9) 9S jo
aiou MO||e |IM Kbojouypaj u sanuoud siseq ayi
ayi jo pajpuey Jeuuoj webegep tAdI:7'LT 6iH (szs-»)
S. webejep ues 9 asayj ases 1e4) uj
o1 ÁjaN!| e bujuyap Joj pasn aq sjg
ayi asneaq ayung aseaiu! jeo) seM
waas ybju q PinoyS wejbejep ayi MOy augap 0 seq 98999 o 0
azis
aup ainnj u! ing abiej aq o "uojejaiduau!
dI jo 90! s! pue pjay (soD 8Aias o adki se paje
yiõuaj 1e301 aui pasn S! PjByqns Jujodapo Uq seq
saíg ses's9 jo (anjen unuxeu) 8 I a s jeuajayip 10 SeM PjBy SIyi "japea4 dI jo subisap Ja}jjee ayi u
= aie aaJyI uaYM 09-02
japeay- yibuaj jejol eep jo yabuaj 9 'so1az |je jou syg IsOunybi ay
y6ua ay
uoneadeuj eojnies jejuejaya
edá eonAes JepeOH
squaJuo ay1 Buiájdnuu Kq
n o Kq pjay NITH Jo
sy saMg 09 = t x ST *3! unuIxeW S! yibuaj japeay
ueo yiõuaj apeay ayi Ja!iea pajejs aq Im (o) aouapaaid ypbuaj ajqeuen jo
pauego aq ISJy papesip Duipuodsa.uo> ayi pue St S Pjey NITH Jo anjeA
woiy yg6uaj japeay 'uogsabuo jo uana UI S! wejbejep jo Ued Jayjo aui
ygbuaj je401 ayi saMoj yM SueJõejep ayi ay yi wnwIxew si pjay uojdo Jo anjeA BYi uauM SI yp!uM pjay ejep au3 ay
ued aM
íq ejep jo yabuaj ayi puy uonsabuo a!| SuOINenys Japeay ay u pajos uaaq sey weQejep ay
6uijoeyqns seÁq oz = txSS! 436uaj apeay ayy pue s
ay
o paJedaid wejbejep jo janaj AauOud P a y Siya jo anjen ayi 'suondo ou aJe aayi uaym ayi joJ Aiessaau uoFeuuoJu!
webejep abJej idaooe u! ( o1 0 uo14) siy o Kian!japP pue buFno
ueyi
Bu ayi
9Ls jabie s! uoijejaidiaju! auapaaid saKq 09 pue 02 S! Japeey ay1 jo yabuaj aui
S! uogeuysap ayi ! Auo saíg ay bujuyap joy pasn ayi saíq 09 0
aJe s]soy ayL
papuawuosai Pjy Sy jo0 O ueMjaq sauen yp!ym Japeay bAdI ay3 jo yibue saíq 9ESS9 01 saíq oz woy
weibeep puas o1
io ajoyM Sueaw jeyl B4 16 o3 hq pajdyjnw s! pjoy siu o anjeA a se
s]uaubey jo uioJ ayi ui yjIM ajqneduwos s! ! 10u
uopejajdiau! pjo ay2 sauen I pexy Si uweibejep jo ypQuaj ayi UMoys
94S ojdn auapaaid Y
Jayiaym Jo ssajpje6a1 'salíq (uoyezaidieu! pjo) pjay 3 a s ayp ui ssjq spioM aíq- U apeay weõejep ay2 jo sued omj seuy weibejep
aAuIe faya ejep pue Japeay aui Ajauweu
aq isnu sjsoy IV ae souyaj bua a bujuyap JoJ pasn s/ Plj u9-
jdasoe oj pajedaid se awes pajaidiaju! s 18Mped dI ue jo jeuiioj jeDIdKj ayn
Jo webejep ay ay
aje Z
ISOw 1oy Ieogpejdu! aie
5IOMIau pue sisoy (y2Bue epeeH) NJ7H Jafej dI u! sjayped
ojdn SMOys zL'T 514 °swebeep pa|jeo
ypns y6nouje 'saíq sEs's9 : uopejaudouj eouepeoeid uojsjaN
sweberep 6uoj
SMO||e PjPy
Ppuesip aq IIM wes6erep ayi uay4 'dI jo sue6eeda &LL
e o y1õuaj ayi SI
aq oj weibejep 0 uos 6uisn s aujypew 6ujssaooid 4 I
aL8SWS wes/ "duuoo) NOV
sIooo101d 1eÁE uOMjEN G1aSWS wes/'duoo) NOV
SI00010
1-26
Network Layer &Protocols Network Layer &
Protocols
ACN (COmp./Sem.5/MSBTE) Offset= 0/8 =0 ACN (Comp. /Sem. 5/MSBTE) 1-27
1899
for limiting 13. Options:
6. Flags: The TTL field is needed in such situations are
datagram. They
Options are not required for every
the lifetime of a datagram. have
This is three bit field. The 3 bits are as debugging. We
Flags a
Blg onginal packet Offset= 1400/8= 175 used for network testing and
The TTL feld is also used to limit the journey of a
later in this chapter.
shown in Fig. 1.7.5.
1400 279 all the options in detail,
if a packet is to be
discussed
3 blt flag fleld packet intentionally. For example
Byte 0 yts is stored in
3999 confined toa local network only then a 1 1.8 Fragmentation:
This is called as more the TTL field of this packet.
fragmentatton bit B i t 1 is reserved ofset= 2000/8= 360 sent by a host has to
travel
3999 datagram
the first router, then TTL field
2800 a
it reaches In the Internet, the
This is do not fragment bit
L -As soon as
before it is delivered to
-Three iragments networks
value is decremented from 1 to0 and the packet will be through different
(G-527)Fig. 1.7.5 : Flag bits destination host.
(G-528)Fig. 1.7.6: Example of
fragmentation discarded. the
First bit is reserved, and it should be 0. frame is decapsulated,
the received
At every router,
8. Time to Live (TTL): 9. Protocol: extracted and processed and
is
The second bit is known as the "Do Not Fragment" IP datagram
the
bit. If this bit is "1" then machine understarnds that This is an 8-bit field which
controls the maximum
This is an 8-bit field which is used for defining encapsulated in another frame.
number of routers visited by the datagram during which the services of IP received by a router
the datagram is not to be fragmented. higher level protocol uses
The size and
format of the frame
its lifetime. layer. the protocol used by the previous physical
But if the value of this bit is 0 then the machine can be
depends on
should fragment the datagram if and only if
A datagram has a limited lifetime for travelling The data from different high level protocols network to the
router.
IP datagram. protocols
These connects a LAN to
through an Internet. encapsulated into an
imagine that a
router
necessary. As an example, the
UDP, TCP, ICMP, IGMP etc. the router is in
to hold the
could be frame received by
WAN. Then the
The third bit is known as "More Fragment Bit" (M). Originally the TTL field was designed a
WAN
value The protocol field contents would tell the name of
and the one forwarded by it is in the
M = 1 indicates that the datagram is not the last This timestamp as LAN format
timestamp. destination to which this IP
the protocol at the final
fragment and M = 0 indicates that this is the last or decremented by one, everytime the datagram visits format.
be delivered.
datagram is to
the only fragment. a router.
helps in 1.8.1 Maximum Transfer Unit(MTU):
as the timestamp value reduces to zero
At the destination, the value
of this field is
of each data link layer protocol
As soon
7. Fragmentation offset the process of demultiplexing. The frame format
scheme to
the datagram is discarded. But for this of the important field
in
become successful, all the machines must have Table 1.7.2 shows some of the values of this field different in its own way. One
This is a 13 bit field which is used to indicate the
is the maximum size of data field.
must know the time corresponding to different high level protocols. the frame format
relative position of this fragment with respect to synchronized clocks and they in a
taken by a datagram to travel from one router to Table 1.7.2 Therefore when we encapsulate an IP datagram
the complete datagram.
should be less than the
size
e other. frame, the datagram
It is the offset of the data in the original datagram Value Protocol Value | Protocol maximum data size specified
field.
by the maximum size
Today the TTL field is used to control the
measured in units of 8 bytes. 1 ICMP 17 UDP been illustrated in Fig. 1.8.1.
maximum number of hops ie. router by The concept of MTU has
To understand this refer Fig. 1.7.6. OSPF IP datagram
datagram. GMP
The original IP packet (datagram) contains 4000 At the time of sending a datagram, the source host TCP
bytes numbered from 0 to 3999. It is fragmented will store a number in the TTL field. This numberis Frame Header MTU Trailer
into three fragments. ( ) approximately twice the maximum number of 10. Header checksum: LMaximum length of data that
covers on the header only.
A checksum in IP packet
can be encapsulated
routers present between any two hosts. a frame
The first fragment contains 1400 bytes numbered Since some header fields change, this field is
Everytime this datagram visits a router, this value is that the Internet MTU
from 0 to 1399. The offset for this fragment is recomputed and verified at each point (G-2084) Fig. 1.8.1: Concept of
decremented by one. If after decrementing, the header is processed. of MTU changes
O/8)= 0.Similarly the ofsets for the other two Now the problem is that the value
value of TTL field reduces to zero then that router
fragments are 1400/8= 175 and 2800/8 350 11. Source address: fromone protocol to the
other used for the physical
discards the datagram. of the
respectively as shown in Fig. 1.7.6. This field is used for defining the IP address network.
Need of TTL field source. It is a 32 bit field. of the
The offset is measured in units of 8 bytes. Because We have to make the IP protocol independent
Sometimes the routing tables in the Internet get 12. Destination address physical so the maximum length
network. In order to do
the length of the offset field is 13 bits, so the
corrupted, due to which a datagram may travel This field is used for defining the IP address
of the decided to be equal to 65,535
of IP datagram was
fragments should be of size such that first byte between two or more routers ror a destination. It is also a 32 bit field.
very long time but bytes.
number is divisible by 8 never ever gets delivered to the
destination host
TechKnowledge
Teck Knowledge Pubications
Publicatlons
1-28 Network Layer &Protocos Network Layer &
Protocols
ACN (Comp./Sem.5MSBTE) ACN (Comp. /Sem. 5/MSBTE) 1-29
has 1.8.2 Fields Related to Fragmentation: these later in this chapter.
fwe use a physical network protocol which -We will discuss
become (a) Copy:
MTU 65,535 bytes, then the transmission will The following three fields in an 1P datagram header are
This is a 1 bit subfield. So it can have only two 2. Length total length
more efficient. related to the fragmentation and reassembly of an to
possible values, 0 or 1. If copy 0,
= then the option This 8-bit field is used for defining the
For the other protocols having MTU smaller than 65,535 and the length
datagram. of the option with
the type field
be copied only into the first fragment.
bytes, the IP datagram is divided into small parts called
must
1. Identification. field must be field included.
fragments so that they can pass through the physical Whereas if copy 1 , then the option
be present in all the option
will not
networks successfully. Flags and copied into all the fragments. The length field
This processes of dividing the IP datagram in smaller Fragmentation offset field. types.
Copy Meaning
parts is called as fragmentation. 3. Value
The fragmentation generally does not take place at the Options 0 Copy option field only in first fragment. variable length field
which contains
the
This is
source because the transport layer there will adjust the Copy option field in all fragments. which is required by that option.
In the IP header there are two parts: A fixed part and a 1 specificdata
value field also will
segment size in such a way that they will fit in the IP variable part. We have already discussed the fixed part Similar to the length field, the
(6) Class types.
datagrams and data link layer frames.
of 20 byte length. of not be present in all the option
This 2-bit subfield is used to define the purpose
After fragmentation, each fragment will have its own At the most 40 byte long variable part consists of option. It has four possible values, out of which
header. Most of the fields of the original header are
options which we are going to discuss in this section. two (O0 and 10) are defined right now. The 1.10 Option Types:
oniy
copied into the fragment header but some fields are are being used
possible values (01 and 11)
are not yet started earlier, only six options
Options as the name suggests are not required for a other two As we
classification of these
changed. 1.10.1 shows the
datagram. Their main, application is for aetwork testing defined. currently. Fig.
Such a fragmented datagram can be fragmented
and debugging. If class = 00, it indicates that the option is being options.
further if it comes across a network with even smaller P N o operation
10
MTU. Options are not a required part of a datagram but used for datagram control. Whereas if copy
then the option is used for debugging and
Single LEnd of operation
The fragmentation of a datagram can be carried by the option processing is very much a required part of the byte
Record root
source host or any router on the route of the datagram. management.
IP software. Options S t r i c t source route
But the process of reassembly of all the fragments will- This implies that if the options are present in the
be carried out only by the destination host.
COpy Meaning Multiple
header, then all the implementations should be able to byte L o o s e source root
All the fragments of a datagram are free to take any
00 Datagram control.
handle them. Not defined or reseved. Timestamp
route and we do not have any control over them. In 01
short each fragment acts as an independent datagram. 1.9.1 Format: 10 Debugging and management. (G-2086) Fig. 1.10.1: Categories of options
The reassembly of fragments is not done during the two option types i.e. single
The format of an option has been shown in Fig. 1.9.1. As 11 Not defined or reserved. Options are classified into
transmission because of the loss of efficiency associated
with it shown, it consists of three fields namely, a type field (1- byte options and multiple byte options.
(c) Number
not require
At the time of fragmentation, all the required parts of byte), length field (1-byte) and a variable length value
of There are two single byte options which do
This 5-bit subfield is used for defining the type
the header are copied into the fragments. But the field option. This subfield has 32-possible values (types)
the data or length fields.
options feld may or may not be copied as discussed -1 byte>-1 byte -Variable- which
but currently only 6-types are defined as shown in
The remaining four options are multibyte options
later on. Type Length Value
Table 1.9.1. require the data and length fields
The following three fields are altered when the host or
routerfragments a datagram: 1 2 5 bits Table 1.9.1 Let us now discuss these options one by one.
L
1. Flags. Copy-Class-Number
Number Type of option 1.10.1 No Operation Option
2. Fragmentation offset. (G-2085) Fig. 19.1: Option fomat 00000 End of option.
Let us discuss these fields one by one. This is a single byte option which is being used as a
3. Total length.
No option.
The remaining fields in the IP header are copied as it is. ype 00001 filler between options.
As shown in Fig. 1.9.1, the 00011 Loose source route As shown in Fig. 1.10.2, we can use the no operation
The value of checksum should be calculated again type field is an 8-bit
and it contains three subfields as field
follows option to align the next option on a 16 bit or 32 bit
regardless of fragmentation.
1. Copy (1 bit).
00100 Timestamp
And the final point about fragmentation is that only
2. Class (2 bits). 00111 Record root boundary.
data in a datagram is fragmented. 3. Number (5 bits).
01001 Strict source route
TechKaeuledge TechPubilcations
Knewledge
Pubilcations
Network Layer& Protocols Network Layer & Protocols
ACN (Comp. /Sem. 5/MSBTE) 1-31
1-30 Type:7 Length Pointer Type: 137 Length Pointe Code 68Length (Tota) Pointer O
flow 4
bits Flags 4 bits
ACN (Comp./Sem.5/MSBTE) 00000111 (Total) 10001001| (Total)Onter First IP addrosS
Dyie Al these
First IP address fields are Only 9 First 1P address Al
Type1 Second IP address
Only empty addresse9s filled
o00000013 Second IP address Second IP address
can be when
No operation option
addresse when listed
(a) can D started Last IP address
stated

storea LastIP address


A7 byte opuon NO-OP (G-2090) Fig. 1.10.5: Fomat ofstrict source root option
NO-OP (G-2089) Fig. 1.10.4:
Round trip option Last 1P addres8

An 11 byte option An8-byte opton which contains

The pointer field


is a n offset integer field
That m e a n s
it
1.10.5 Loose-Source-Root Option
)NO-OP is being used number of the
first empty entry. (G-2092) Fig. 1.10.7: Format of timestamp option
being used to align
(b) NO-OP is
to align the
next option the byte This option is sirnilar to the strict source root option
a v a i l a b l e entry.
beginning of an option towards the fist
points when discussed earlier. However this option is not as strict as 1.11 ICMPv4 (Internet Control Message
No operation option address are empty
(G-2087) Fig. 1.10.2:
fields for the IP
All the empty
leaves the
source.
The value of pointer
the strict source root option, it is more relaxed. Protocol)
1.10.2 End of Option Option: the datagram
which points to
the first empty
field.
The IP provides unreliable and connectionless datagram
option is the end
of option
field is 4 each router
viSited
Here each router whose IP address is mentioned in the
second one byte starts travelling,
delivery, and makes an efficient use of network
The at the end
of Vhen the datagram address in list must be visited by the datagram as before but the
in padding IP
will insert its outgoing
option. Itfinds its application by this datagram, the value of datagram is allowed to visit the other routers also.
resources.

the.option field. field and i n c r e m e n t s IP is a best-effort delivery (which does not provide any
the next empty
option are as follows Fig. 1.10.6 shows the format of the loose-source-root
important points about this pointer by 4. guarantee) service that takes a datagram from its
Two option.
1. We can use it only as thelast option. Option original source to its final destination. However, IP has
LType: 131 Length
Strict-Source-Route

1.10.4
2. We can use only one end of option. That means

which is used by the hiilha10000011 (Total)ointer two drawbacks :


receiver should expect the This is also a multi byte option First IP address It does not have any error control mechanism.
after this option, the route in advance for the Only 9 A
arrive. source to determine the
address0S Second IP address ied It does not have any assistance mechanism.
payload data to over the Internet. anb e when 2
the option datagram travelling listed starled
than 1 byte to align
There if we need more

than one no-operation Due to this it becomes possible for the sender to
Last IP address -The Internet Control Message Protocol (ICMP) is used
field, then we must use more
a specific type of service (G-2091) Fig. 1.10.6: Format of loose-source root option to overcome these drawbacks. It is used alongwith IP. It
end-of-operation choose root to 9et
one
options and after that only throughput etc.). reports presence of errors and sends the control
(.e. minimum delay, maximum
1.10.6 Time Stamp Option
as shown in Fig. 1.10.3. safer andd messages on behalf of IP.
option sender to choose a
It is also possible for a

Options END-OP The time stamp option is a multiple byte option and it is ICMP does not attempt to make IP a reliable protocol. It
more reliable root.
Type used for recording the time
00000000 DATA specifies a strict source route, then the
of
datagram processing by simply attempts to report errors and provide feedback
If a datagram a router, i.e. the time instant at which the datagram is
routers which are defined in on specific conditions. ICMP messages are carried as IP
(b) Used for padding must visit all the
(a) End-of-option datagram processed by a router. packets and are therefore unreliable. ICMP is a network
(G-2088) Fig. 1.10.3 the option
address is not This time is measured from midnight universal time and layer protocol.
router whose 1P
It should not visit any
IP also lacks
1.10.3 Record-Route Option: listed in the datagram. If it does so then that datagram expressed in milliseconds. a mechanism for host and management
issued. queries. A host sometimes wants to know if a router or
and it and message will be The and managers
mutiple byte option an error
is will be discarded users can use the time of
The record route option a
processing another host is operating or dead. And sometimes a
generally
Internet routers which handle
is not
is used for recording the However the strict source routing a datagram to track the behavior of the router in the network manager needs information from another
the regular users of the Internet, as
thedatagram preterred even by Internet.
Computer on the network (such as host or
router)
not much aware of the physical topology o
Since the maximum size of the header is 60 bytes, they are
With the help of the time stamp option, we can
Fig. 1.11.1 shows the position of ICMP with respect to
he Internet.
including 20 bytes of base header, this option can list estimate the time taken by a the IP and other protocols in the network layer.
routers. Fig. 1.10.5 shows the format of the strict source roue datagram.to travel from
upto 9-IP addresses of the format one router to the other.
will that it is very similar to the Network
So actually only 40 bytes left for the option part.
are
option. You see

have discusseo However this option is not used


IGMP 1CMP layer
shown in of the record-root option that we
by most of the Internet P
The format of the record-root option is as addresses
that to be filled earlier with one exception that all the nine IP as they aree not aware
of the physical topology of the ARP
1.10.4. The source creates fields
Fig.
are
of routers are entered by the sender itselt. Internet. Fig. 1.10.7 shows the format of the time
the datagram.
stamp
by each router visited by option. (G-2102) Fig. 1.11.1: Position
of ICMP

TechKnowledge
Pubicatibns Technouledgë
Network Lzyer&Protocols ACN (Comp. Sem. 5MSETE)
1-32 1-33 Network Layerá Protooois
ACN Como Sem.5MSETE network manager
an use the query CMP always sends the
A host a
versions of MP protocol namely
or
information from a
eor reporting messages back- Then the error padket, fomed byCVP,
Trere are two specfic
to get some to the original source.
messages
VPA ad VP6. In he foliowing
sectiors, ne are
encapsulated in an P datagram as shown in Fig. 1122.
host ICMP has five types of error reporting
router or arcther
messages. Feceived datagam
going to discss KMP4. Fig. 1121 shows diferet types of eTor reporung
1.11.3 Message Format:
1.11.1 iCMP Encapsulation: messages.
format of ICMP messages. 1.Desraton urreacrabe
bst s messages are Fig 1113 shows the general
VP operzs in te networin layer 13 bi
2 Soure quench
ET orurg
to te data nk ayer. Insteed, te 3 . Time eesed
rctpassed directy Checksum
inside P dztagrams Tpe Code 4 . Paanser probeTs
Tsaes are firs ezpeiated Heades Remairing header
5 . Rerscin PCMP F aagan
Hsadelbyreset
rd her e t o e loner aye. Dzta
(G-2104) Fig. 1121: Error reporting messages
Feadar lhesder
Tris is es sron in Fig 1112
G-210) Fig. 1122: Data field contents for the error message
ICMP makes use
of the source iP address for serding
ICMP ofICMP
format messages Now let us disauss the ICMP error messages ore by
6-2105) Fig. 1113:General the eor message back to original source of erroneous
in 1113, te header of an ICMP message one.
As sihown Fig.
data section is cf a variable size. datagram.
is &-byte long end the 1.12.1 Destination Unreachable:
format for each ICMP message
header
Some of the important points about ICMP error
The general
are common to all the messages are as follows:
different. Bst the first four bytes When t is not possible for a router to route e
Frame
heetes message tYpEs. 1 fa datagram containing and ICMP eror message datagramor when a host is unabie to deiver a

n 9 , Fig 1112:CMP encaposation 1. Type : is received, then no ICMP eror message will be datagram, then the dztagrarn s discarded and the
probe to test for defining the types of generated in response to it destination unreachable eror message s set back by
Tre ping command ue KMP as a
This 2-bit field is used

stion is reoatle. Ping pacsages an VP the respective host or roster to the source host wrich
wete a message. An ICMP ero message will ot be genereted for a
e o e e MEALE in a daagren and
serds it to a originated the datagram
2 Code: fragmerted datagram that is not the first
eleces decination. Tre t o s re destinaton
u e
This -bit fieid is used for specifying
the reason for fragment The format of the desination unreachabe eror
is P trees name on the commard
by yekfrg u
the parioular message type. Ary ICMP error message will not be generated for message is as shown in Fig. 1123.
ire in a forrm t a datagram which has a multicast address.
field is the checksum field which
The last cormmon
ping 19050251
it later in this An ICMP error message will not be generated for a
- 8 bits--8bs -16 bts
wili disouss
is 16 bit (2 byte) long. We
Wre re derindin reees e e o reGest
chapter.
datagrarn which has a special address such as Type:Code:01o 15
Unused (Ai 0s)
Checieum
T p , e p r t s by rding en / P eo regy 127.0.0.0 or 0.0.0.0
that
set time, The information to fird the original packet Daasec0nCozins a part of receved P
TEE. H regy í r rered wtin a
a
section of the datagram ncsding IP header +8byte datagramdata
pigreed te eto reqEt eeral mose times. H ro had error is induded in the data I is important to nate that the data section
of every
destination is error messges. errar message, contains the IP address of the original
G-2107) Fig. 1123: Destination unreachable format
Ey aiv%, pg irdcA h t re The code feld for the destination unreachabie eror
Wrereas the data section in the query messag6 datagran in addition to the 3 bytes of data in that
reteie
contains estra information depending on the typ message has 16 different values (0 to 15) and each one
krote tity hat vE TIP s ree rote, wrih datagram.
specifies a reason for discarding a datagram.
to a of query
o al te oAes aorg the pzh The header of the original datagram is induded
a
in the1 Code 0: This code specifies the reason for discarding
eties detinain. error message, to ensure that h e error message ill
1.12 Error Reporting Messages thedatagram as: network is not reachable, possibly due
reach the original source.
1.11.2 ICMP Messages: (1CMPv4): to hardware failure.

ne of the inportant responsibilities of CMP is


to Theadditional 2 byte data isincluded because in TCP 2. Code 1: The host is not reachable, possibly due to
unreliable
and UDP, the first 2 bytes of inforrnation contains hardware faihure.
the presece of an error. 1P is
Era rerig neap repot an

information about the port numbers for TCP and UDP|3. Code 2: it is nct possible to reach the protocol. This
pratorol. s eror hecking and cortrol are nat done by
and sequence number for code is used when a higher level protocol such as TCP,
TCP
UDP, OSPF is not running at the destination host.
ICMP uas designed to assist IP. Bust ICMP does not The source can use this infornation and convey to
Mwerig an o l e r , then t ve te error
4. Code 3: It is not
reporting menagn fr 1ering tre roilen. Arect the errors. It simply reports them and lezves the and UDP protocols that an error has occurred. possible to reach the port. This code is
used when the application progran (process) to which
error corection job to the higher level protocols.
the datagram is to be finally delivered is
not runningat
the moment
Tech Kaeuledgi Teckneiedgë
2iatj93 Dtitatitns
1-34
Network Layer &Protocol Network Layer &Protocols
ACN (Comp./Sem. 5/MSBTE) can create code 2 and code
ACN (Comp./Sem.5/MSBTE) 1-35
destination host de
with code 4 is produced in 2. Only the The congestion can happen due to two types of 1.12.4 Parameter Problem Error Message:
Code 4: The error message
to be messages. communications
the following situation: Fragmentation is required codes 2 and 3 Parameter problem message

done but the do not fragment (DF) field.


of the 3. The messages of other codes except can
1. Due to one to one communication or
in the header part
only by the routers. There should not be any ambiguity
the sender of the datagram be created
datagram has been set by 2. Due to many to one communication. destination host comes
unreachable of the packet. If a router or
should not be done.
But4. The noncreation of
destination message
which
says that fragmentation In the one to one communication, a single source hos across such ambiguty or missing value
in any field of
of the the delivery of datagram.
unless fragmentation is done, the routing does not guarantee will be responsible for congestion because of its high discards that datagram and
the datagram then simply
it
datagram is not possible. 5. It is not possible for the router to detect all the data transmission rate. The source quench message will the parameter problem message back to
the
sends

It is not possible to accomplish


the source the packet delivery.
6. Code 5 : problems that prevent be useful under such operating conditions, for reducing source originating that message
visit
routing, i.e. it is not possible for the datagram to the transmission rate of the source host and clear the router or the
Source Quench Error Message: This message can be created either by a

are specified in the routing


1.12.2
one or more routers that congestion. destination host.
A host or router uses source quench messages in order
options. But this message will not prove to be successful if
parameter problem error
The message format of the
has occurred
Code 6: The destination network is not known, (we are
original source that congestion
to tell the congestion occurs in the many to one type shown in Fig. 1.12.6. Refer to the code
and to request it to reduce its current rate of packet message is as
does not
not saying it is unreachable). Here the router communication. This is because the router or
field which has two possible values, 0 and 1. This field,
have any information about the destination network. destination host does not know which source is fast and value will specify the reason for
transmission.
depending on its
Code 7: The destination host is not known, (again we There is no tloW control or congestion control responsible for the congestion. follows:
discarding the datagram as

are not saying that the destination host is unreachable mechanism in IP. So the source quench message in As a result, it may discard the packets received from the
1. Code 0 I f code 0, then the datagram is
=

is the case for code 1). For code 7, the router does ICMP is designed to add some kind of flow control and slowest source instead of dropping them from a fast
as discarded because of an error or ambiguity
not have any information about the destination host. congestion control to IP. source which is actually responsible for congestion. The erroneous
present in one of the header fields.
9. Code 8: The source host has been isolated. This message serves two purposes the value of the pointer field.
1.12.3 Time Exceeded Error Message: byte pointed by
is at

10. Code 9: The communication with the destination It tells the source that the packet has been For example if pointer field = 0, then the first byte
1.
network has been prohibited by the administration. This message is generated in two cases: is an invalid field.
discarded and,
with destination host is It gives a warning to the source that the source 1. If a router receives a packet with a 0 in the TTL Code If code =1, then the datagram is
11. Code 10: The communication 2. = 1:

prohibited by the administrator. should slow down (quench) because congestion field then it discards that datagram and send a discarded because required part of an option is

12. Code 11: It is not possible to reach the network for a has taken place somewhere. time exceeded message back to the source missing.
particular type of service. Here it is not possible for the Fig. 1.12.4 shows the format of the source quench error originating that packet. The format of the parameter problem is as shown in

router to route the datagram because the source is


message. 2. If all the fragments which are parts of a message Fig. 1.12.6.
asking for an unspecified type service. - 8 bits>-8 bits-{*- -16 bits- do not arrive at the destination host within a - 8 bits - 8 bits + iTS-

13. Code 12 : t is not possible to reach the host for a Type:4 Code:0 Checksum certain time limit then time exceeded message is Type: 12 1Code:0 or 1 Checksum
Unused (All zeros) Pointer Unused (All zeros)
particular type of service. sent back.
Data: Part of the received IP datagram including Part of the received IP datagram indluding
The format of the time exceeded message is as shown
14. Code 13: Itis not possible to reach the host because a IP header+the first 8 bytes of datagramdata P header plus the first 8 bytes of datagram data
in Fig. 1.12.5.
filter has been installed by the administrator. (G-2108) Fig. 1.12.4: Source quench format (G-2110) Fig. 1.12.6: Format of parameter
8 bits - 8 bits>- 16 bits-
15. Code 14 The host is not reachable because the host A source quench message, one per discarded problem error message
Vpe11Code: 0 or 1 Checksum
precedence has been violated. datagram due to congestion is sent back by a router or Unused (All zeros)
16. Code 15:It is not possible to reach the host because its destination host, to the source host. Data Part of the received IP datagram including 1.12.5 Redirection Error Message:
IPheader plus the first 8 bytes ot datagram dat
precedence is cut off. This message is generated when But, the congestion relieved message cannot be sent If a router or host wants to send a packet another
the datagram is sent with a precedence below a level of (G-2109) Fig. 1.12.5: Message format of time
to the source host as no such mechanism exists. network then it should know the IP address of the next
precedence set by the network operator, for the exceeded error message
router.
As such message could be sent back, the
operation of the network.
no
source Refer the code field. Its value can be either 0 or 1. If
host assumes that the congestion has continued to The routers and hosts must have a routing table to find
Notes code= 0, then the router will discard the datagram
exist, and therefore it continues to reduce the rate of the address of the next router and the routing table has
because the value of TTL (time to live) field is zero.
1. The destination host or routers can produce the data transmission, until no more source-quendn to be updated automatically on a continuous basis. The

destination unreachable message. messages are received. If code 1, then destination host discards the redirection message is used for such updating.
fragments of datagram because some fragments could

not arriveatthe destination host within the timelimit.


Technowladge TechKnouledge
¥ Pub!ications
UDITC ation
s uoe 11 suOIeI1nd
2Dpamouy4aL
abpamouyypo1
I aug ayi ujuiM JSOy uoeuisap au4 je an;uIe 1ou
PIno sueuõeiy awos asneaq weißejep jo squauße
paAjaa aJe sabessaw abessaw ajqeypeajun uojjeuisap
bujgepdn ypns ioj pasn s! abessau uooe.pa ay4 spesip jsoy uogeugsap uayi 't = apo
ypuanb-ainos aOu ou un uo!SS{wsuei/ eep ay2 aonpoid ue senoi Jo 1soy uoJeujpsap 84L T
ayisjseq snonujguoe uo Ae>neuione paepdn aq 0 OJ8z si pjy (eAI] 0) aun) 111 jo anjen aup asnedaq
o ae ay4 8onpa o) sanuuo9 8J0J812y4 pue isxa
sey ajqe 5ugnoi au pue ano. xau ayi jo ssappe ay webeep ayp pe>sip IM Jano ayi uayi 'o = apo» sojoN
puy o) a1qe 6ugnoi e aney isnuw sisoy pue siano ay1 o1 panuluoo sey uojjsabuo ay4 jeyi saunsse jsoy
I T JO 0 Jayja aq ue anjea $U PPy apo ayi JajoY uOMau ay1 Jo uoIJejado
8unos ay4 Ypeg uas aq pnoo abessau ypns ou sy
ano abessau JOJ1 papasxa ay4 Jo o2ejado yJOMgau ayi fq jas auapapaid
'S]SIxa Usjueypaw yons ou se 1soy 89Jnos aui o01
xau ayi jO ssaippe dl ayi mOuy pinoys ! uayi HIOMIBU au, jo jeuioj abessaN: SZTT "614 (60tZ-9) Jo jna e MOjaq auapeeid e yM Juas si webejep 3y
jaujoue o1 19ped e puas o SueM ]soy Jo Ja]noJ P }I ues q 10uueo abessau panaja uoysafuo» ayn ang uaym pajeaua6 s! abessew siui 4O In> sI a»uapaaJd
eep ueibeep jo seKg 8 sy eLj Snjd iepeeu dI
1soy aunos ayi oj '1soy uojgeugsap s! sneaq IsOy ayi ypeai oj ajqisod jou s! : St apo 9T
obesseW JOJ uopoepeH sziL DUIpnouLUeDelep dIpeNjeoel eui jo ued:eed 10 8no e Áq ypeq juas s uopse6uo o) anp webezep
(s01ez IV) pasnun pajejojn uaaq sey 3uapADaid
abessau JO113 wajqoid unsyoeyO L JO : epoo L edkL papjesip ad auo abessau ypuanb 3unos V
Jsoy ayi esneaq ajqeypeai jou s! Isoy By1 : I apo ST
1813uered jo jeuuos: 97TT 54 (OTt2-9) -S9 9L -sg 8 5]19 8
3euoj ypuanb einos: ZTT H (80T7-5) 01e5[ujuupe ay1 Kq pajejsu! uaaq sey jay4
eep uwebejep jo seMg 8 1sJ! ei snjd jepeeu dI UMOys se S! abessau papaaxa Buy ayi jo JeuJoj ayi e1ep ue6erep jo sehg 8 1si e41 + Jepeay dI e asneaq soy ayi ype 01 a1q15sod jou si : EI °po I
Bupnou uwebeepdI poAj@0O OL JO Ued e g juasS Dupnjpuj uebejep dI pONj608 eU jo HedEG a0Nues jo adA) JejnoFued
euOd (sOJez IV) pesnun
soez Iv) pasnun SI abessauu papa3DxS awj uayi 4|uI| auwij ujeua e JO 1so ayi ypea o) ajqjssod jou s! : Zt apo ET
unsyoeYO 0:epo edk1
unsyoeu
-S|!q 9 -
1 00:epoO edL e uym 1soy uogeugsap ayi 1e aALJe 1ou op
syg 8 -s1/9 8 Sq 9 aoes adKA payjpadsun ue Jog 6uyse
9'ZTT 614 abessaw e jo sued aje yoium S]uaubej ayi jje I 7 abessauw aunos ayi asneaq weibeep ayy a n o oj Jano
J0JJa ypuanb aunos aya jo jeuoy auj smoys v'ZTT D!H
s
U! UMoys se S! uajqoid Ja]aueed ayi jO /euJoj ay jNped jeyi bujjeuIbLJO ayy 1oj ajqjSsod jou si 1y a1eH *3Nas jo edkj Jejnopued
9inos ayi o1 YDeq abessau papaaoxa aun aJaYMauwos adejd uayej sey4 e Joj uOMau ay4 ypeai 0 ajqjssod jou si 1: II apo ZI
6uiss
SI uondo ue jo ed panba asneaq papiesIp e puas pue weißejep 1e44 spieSIp ! uay Poy uogsabuo asneeq (ypuanb) uMOp MOjs Plnous JOJEJISIUILupe ay/ kq paiq!yoid
: = 7 8DJnos ay4 jeyi ajnos ayi 01 bujujeMe saAD H Z
T apo S! 1soy uogeujjsap yM uopesjunuuos ayi : OT apo 'It
SI webejep ayi uayg 'T= apo I
PIBY P!Jeu! ue s! :Sase o u! pajejaueb si abessaw sIyi pue papiesip uopensjujupe ayj fq pajqjyoid uaaq sey yioMjau
= UBaq sey 1ayped ay4 jeyg aonos s||} H T
8JAg IS1y a i uayi 'o Play jauiod ji ajduexa Joj ay uopeunsap a y1M uojeojunuuo 3y1 6 apo 0OT
: abessew JO1 papesoxa auL ETLL
sasodind OM] sanas abessau sIyL paejos! uesq sey jsoy 8inos a y i : 8 apo 6
PIDy aujod ayi jo anjeA aya Aq je pajujod si aiiq
auo ui Juasajd s! up!yM 8DInos
snoauoia ayi 'spjay apeay yi jo uosabuo5 Joj ajqIsuodsal A||enjoe dI o joJguo uogsabu0 soy uoneupsap ay inoqe uojgJeuoJu! Kue aAey 10u
o 10JJa ue asneaq papiesP e peajsu! ainos /saMojs
Kunbiqwe jo ISe uuo1y wayi bujddoup jo Pue jo.3uo Moy jo pup awos ppe o1 paubisap S dWDI saop 1ano aup 'L apo J0 (T ap05 10J ase yi si se
= 0 apo Nsai e sy
ayi uayi 'o apos iI : aua ayi piesip feuu ! abessau ypuanb aunos ayi os 'dI u usjueuypa
S! webejep woiy panjaa s]3ped ajqeypeaiun s isoy uopeunsap au jeya bufes jou aue
SMOIOJ Se webeep ayi buipie9sip uoysaõu09 ayi ioj ajqisuodsaj Ouo uosebuo Jo 10Juo MOy Ou s alayi
aM ujebe) "umouy 1ou S! 1soy uojgeujjsap ayi:L apos 8
ayi A!1peds ||!M anjen
s! uo Buipuadap pue 15ey s! 8inos y!IYM MOUy 2ou saop isoy uoFeujgsap
JOJ uosea "uojssuusue yuomau uogeunsap aya anoqe uoneuioju! Kue aney
'sanjen ajqissod oM] sey yoiyM PIB 10 ajn0J 41 asneaq S! SIL uoedjunuuo
Play SIu T pue o oj ! o1 pue ou saop aanou aup aaH (eIqeypeaiun s/ õuKes jou
ed jo aje juaund s aonpa iSsanba
se abessau
°61H u Umosys s! adk auo o Auew ay4 uSuno0 uogsabuoo
p o ay oj jaja 9ZTT ainos jeujbuo y4 ||3) o1 ae am) 'uMOuy jou s! JOMJu uojneujzsap YL: 9 apo
no sey uonsabuo Jeyi
abessaui ayi abessau Jn8
Ja]auejed ay1 jo JPuuioj INyssaIons 01 BnOJd /ou j|!M SIu1
Jola wa|qojd aq Jainoi 1o ]S0y V
pio a.inos sasn
ui sabessaw youanb suondo
1soy uoneusap uojjsabuoD
peybeds aje jeyi suaznoJ aiouw 1o auo
bugnoi u!
u e abessauu siyi aunos a2eJ ayi a4
o janoi e kq Jayya pajea1 aq aya Jeajp pue isoy ay Jo uoss!usue. abesse JOM YOuend ainos zZi'L| ySIA O1 weibejep ay J0J ajqissod jou s! ! *a 'Suuno
ayi
aDunos ypns Japun injasn aq
*abessau eya õujgeuj6;uo bupnpai ioJ 'suonipuoo bupejado jesyi suwajqoid 3unos ay ysjdwoe o2 1915sod jou s! : S apo9
Auanjap 18Nped ayi JuanaJd
spuas ainos ayL 31eI S
abesau wajqojd jajauejed ay IM abessau ypuanb uOISsjuusue eep jou s
ayi o xpeq ajqissod jou s! webeyep
aqI|IM e 1 a j a p o1 Janou ayi J0j ajqjssod
wejbejep yDIy s! 0 asneaq uoJsabuo Joj ajq!suodsa
webeep 1eui speosip Ajdujs ! uauj ay saoOP
pue aajueenb jou jo 6unno ay2 auop S! uojeuau6ey ssajun
ssoJpe e auo oj auo Byi UI we6ejep jo Aianjap ayi ay
io ÁjnQjquie ypns Soy 3inos ajbujs 'uonesunwwoo
piay Aue u!
bujssjui skes yjum
o anje ou
bessau uoeuu ang auop aq 1ou plnoys uoneuauubey jeya
jo 18]no e I 18xped ayi jo uo!je)[unwwoo auo oj Kueu o] ang Z ajqeypeaJun uopeuigsap jo
sawo isoy uojeuigsap webejep a41 jo apuas a ng 3as uaeq sey webejep
Aue aq 1ou pinoys aayi 'Sanoi aya Kq Ajuo pajeaid aq
Ainbiquue 10 uojje!unwwos auo oj auo o] and T uauubey ou op
e d apeay ayi u! da ay inq auop
eE p u e sabessau ayi jo pl3y
: abessau wajqoid 8]euwBI®d z sapoo jdaoxa sapo 1ay1o Jo d uogenys
suonejunwwo s! uoneueuube.j:
Bumoj|oJ ay
q o paunbai
sabessau .
sada OM anp uaddey ue» uonsabuoo as Joua au tapo
o 7 paonpoid s! t ap0 yM abessau S
abessaN 1011 wajqold 48]UeIEd vZLLo apo uogeupsap ayi AJuO
po9 ajea ueo Jsoy
SE-L
3LasW/S wes/ "duoo) NOV A 9L8SWS e s / 'duuoo) NOV
1eÁE xLOM®N
sj0oj0d 8 00o10d8 JaÁEAOOMON
SuOle 3 1 q n d
uoe11qnd
abpamouypaL BBponouyYYpOI

sabessau Ádai pue /sanbai uogeuiojui T sabessau Ájda1 duezs8un


pue senba duuesaug jo Jewuo4: ¬ETT 61J (Trz-9) Japuas jeujbuO ay/ 01 Ypeq y spuas
ajajosqo se sabessau pue abessau Ajdai-oypa ue ayean |/M abesseu
Kranb jo sued aauy 5umojjoj au 13 pajejpap sey duejseu YISueil ano ypads
sanba oype ) sejaDa juMJeanou JO 1504 341z
dweseu eAS00 15O e 10j auop 3q 0) S uopsaipad :T = apo
sebessen peyeoexdea seri duejseuiA PUIDuO Ajdey
equnu e0uenbes
edAL aInaj iyipads
JayguepI 9Je5Iunuuod o] S]ueM 1 JaInoJ JO 15Oy Jayjoue oj
OM Aq l d ayp unsyoayo adhi senbey
0:epoo 10 EUNL¢L edAL abesseu senbal-oyoe ayi spuas jn0i 10 1504 T HuOMau e 1oj 3q |IM uopaiIpay 0 pos
buipIip Aq uoneinp aug ÁeM Buo aui ajejnojes ued aM S y q8 - S9 8 SMOIIOJ Se PIBy apo Bp Jo squajuo
sabessau OM asyi jo JPuioj aui SMOyS E'ET"T 64 : SMO||0J se aped ayei | n uoJejunwwoo ayL
pazuoJypuks ayi Ag uMOp paMOeu si uoFoaiipai jo ssadoJd siu1
(S1aanoi jo 5]50u) sauiseui OM) ayi u pasn 20u J0 Jeyo ypea yim aNeD[unww0
1Ou ae sauiypeul uoneunsap pue aunos au je sypop
anoi ajeudoudde
ues (Siano J0 sisoy Jauja) sua]sks uanjb OMI B2
s1Pubis yoop ayi buiZ.UOJuDuÁS JoJ pasn aq osje ue
ayi o1 juas SI 4! peajsUj weJbejep snoauoua ayi pjeSip
eyjaym aujuajap pinoM sabessau Kanb jo Jjed siui
pazuoJupuís wayi uaM]q jAeJ) o) spaau webejepp ou saop anoj ayg ase Siug uI 3uajayip a S| 1eYM
aq pinous sianduo uogeujjsap pue ainos dI ue jey2 aun dui punos ayi ino puy oj sienou
swajqoid yJOMIaU
yp buykynuap! Joj siasn pue siabeuew yuoMJau ay *abessau
ay u sypop OM aup uayi 'ajeine aq o1 aug bunjaoa pue sisoy aya áq pasn aq ueo sabesseu jo Jed siui
hq pazpn s søßessau jo jed siyi *asodund ogsoubejp buyoda 101e ue se paiapisu0 S ! yQnouFuaAa
pue awg 5uypuas au Jo suogejnjes au 1ueM aM I
y Jog paubisap uaaq sey sabessaw Aianb jo Jjed si4 abessau JOa jayio ayi woy Juajay!P S! abessaw
Dug buiAj3D8 + 3u!/ buipuaS = auIg dUI }unoH
: Ájdey pue .senbay duejseuii zELL
ayi jeyi puejsiapun 01 Jueyodw! s
UOpaiipai
duejsauN u s u e - aun paunjal = aug bunjadad Jauuew Áieiique ue ui wayi asn ueo apuaS Adey pue jsenbey oyoa '¬l'L
8Jno jabJe) azeudoudde
dwesaug jeuõiuo - dwejsau aAB8 = aun Buipuas ay auojajay1 spjpy Jequnu auanbas pue Jaypuap! auo íq auo wayj ssnosiP Sn j87 abessau uoFaJipa
ayi jo ssappe dI ayi sujeju0
: SMO||OJ Se "ujebe 8Dinos oj Hpeq awo uau ayp auyep Kjeuuiog 1ou seop jo0j01d ayi TETT D!J UI
Adau pue 1sanbai duegsauuI 7 ayi jo MOJ puoes ay4 LZTT 'bIH u! UMOys sy
pue uoieujjsap oj ainos woy jaAeJ) o] weibejep ay sebessau Kidau oye pue 1sanbau oypa:7'ETT51H (ETTZ-9)
Ajdau pue 1sanba oyp3 T abessau uo>aipai as jo JeuuoJ*L'ZTT "5|H (TTtz-5)
Kq peinbai aug ay **1 L18 Jo KeM auo ayi ayndwo0
o sabessaw duejsaui jo Ied ay asn ue aM
eBesseu Ajdei eui íq aje sIed
pejeede 'edessew isenbei eut Áq Jues aJe Kayi Aepoj pasn bujaq
de oyo3 OMI Ajuo 'sabessau j0 Sijed any aseyi jo ino JaneMoH 6upnou weibeyep dI peNjeoe 84j0 UEd
: (LLH) aug d i punoi Jo ÁBM Buo jo uojgeanduoo edkl JOnai jebJej eyI Jo sseippe dI
Jaqunu eouenbePS
senbei ou03 sabessau kuand:TErT 61 (2T17-5)
abessaw 8 edkL unsxoeuo e o 0:pOO9:edk1
-S9 9t S9 8 sUq 8 sefesseu Adeu pue senbai uogeuuojuI S -S}9 9 s/9 9 S}9 8-
Ajdai ay jo u n anuedap ayi yIM Pjay dueseug abessaw
uewesueApe pue uoejo|jos jenoH 7 -
s|14 uogeujsap pua v U UMoys se S! sabessau jo Jjed Ajdaj oupa Jsanbai oupa
yusuenayg dn a a Joe uo!NDEIpeI ay7 JO Jeuo} ByJ SMOys LZT'T DH
Adeu pue jsenbeu ysPu sseuppy 'e
seM JSanbaj ay/ yoiyM e aup ay2 Aq pjay Aend
paaa ay1 jo jeuJOJ aYL °sabessau jo JIed Ajdai oypa isanbai
dwesan anjaai ayi dn si1Y uayi uoNeuj]sap ay -oypa ayi jo djoy ay/ yim jou JO Ajuadoid Bujuojpuny Adeu pue Isenbei duejs eul z
o] ISOY ayi o0) abessau uonoaipau
'a5essaw Ajdei pue 1senbej oy T bupno a1 ajepdn
"uojjeuigsap ay/ kq S! apou e ayayM pay 01 aj9!Ssod osjp S H
sabessau JaABMOH Jano pauo wueaõejep
se ay
jeujbUO TETT B!H u! UMoys spuas !
duejsaun ay4 u pay duejsaun uoIjeuioJu! Jano bunjadai uweibejep ay2 aaH
Ajdaj e Áuanb ayL -ayi ajnoi |IM
OSaed JuBjay!p aNy Jo dnou6 s/ sabessaw
Se abessau /sanba dwejsau
ayi ouj s! 1! pajdo si |eJSINeJs buipnoid J0 sabessaw Ajdal-oupa pue ano buoIM e 01 JOMJau JaYjoue joy pauFsap
7S0y uopeujisap ebessau Áianb aya yônoJy/ auop Si SISOuõe!p e
ayi uioy anjen duejsaun jeuibuO BY1 jsanbaj-oypa jo bujus e ajeai ue ypjum swajsÁs jsow s! 4!um wejbejep
e puas ue Isos e S|42 o1 ang

abessau Ajda duuejsauj ay1


P e MON ypns 'auneay bupioda1 Joua ayi yim uo!ppe ul s/ Sis1 aznou unejap aug si jey Ja]noi auo Ajuo jo ssauppe
aya Aq paJea s Ag papinoid si puewwos bujd jo uojSJn SAep
awos asoubeyp ue dNDI BY1
"sOJaz
S||4 pue 'au, Swajqoid uOmjau ay JO e Ajejaua9 saLNua o Jaqunu
|IM SPjay duwe]sauiij OM] Jayjo ayl (6ud) dI 341 SMOUy Isoy
*3unos sueawu
Byi s||g sujeguo Isoy e jo /qe bugnou au
aunyedap je pjay duejsauy jeujP;uO puewwo adoa6 auauj jayped ayi buiyonu! g £l°'L|pauy
abessauw 1sanbai duejsauin ayi (AdWO1) sabessaW AJenO bujgnoJ 5Nejs ayi Aj|esauag
ayn Aq pajeaD s! Jo
jeyi sjsoy ayj Aq pasn s/
auop s! S!ui jBAaj siasn ayi 1y 7ou ajqeypeai s/ ]soy
000T X 09 x 09 XtZ yyen paueMun ue saeai ! uaya
aas 01 Jjed abessaw sIya asn osje ue jsoyv OMIBU 00 eueseu uO1SO
ue ase Jayjoue ! aJe
000'001'98 Jo anjeA unuxeu ayi aAey NM Aeweukp pajepdn sisoy jo sajqe buFnoi ayi j
1020]01d dl
O1 Oeq ebesseu uoNe pe. eu Spues eino
duuejsaug e Ing pue 0 uaaMjaq 3Ilas SJanoi jo Jaqunu ayg ueyj Jay6!y
SIy4 u s67'L96'v6Z'7
jo uonejado aya ypaup o) sabessau jo Jyed Ajde oypa Jaqunu ayi asneaq s
Jaqunu e juasajdai ue pjay 19 ZE Byi yônoyjuaA3 sjseq ayi uo anoi oyiads yonu s/ jauwaJuj ayi u! SJSOy Jo
pue sanbaj oypa ayi asn ue Siabeueu JOM]au By1 BdA payIpads e jo = bugnoi jo ssadoid ayi
aun jesiaAIuN u! 1ybjupjuu :E ap0 sIuI a]epdn ajqej u ajedppued
s! uoJpalpa
1eJoj auop aq oj 20u op sisoy 4) AouaDya Jaybiy aunsua oj Japio u
s]uasajdaJ spj®y asayi
ayi woy spuoes!|!u u! aug
ypea pue JO Juasaid s uogejunuuo jenaj dI aya ! aujlajap buepdn Ipojad iNewojne ue ino Áues o
Jaqunu
ayi buoj 49-7E S! P3y
Jo ypea u! e paseq pue 2noi oyiba0s
sy asn ues aM dA y!pads uodn abessau uojbau!pal e spuas dWOI ay1
a e aayi 'E'ETT 514 u! UMOYS o1Jyed Kda-oypa jsanbau-oypa ayp osje = E .soy s. o} ypeq
spjay dwesaug aaiyj OMjau Joj auop aq o s! uooaupaN:7 apoo
18sW/S wes/ 'duuoo) NOV
e
NIOMION LE L8SWS ues/"duioo) NOV
s100010d 8 10ÁE 98
900010d 1eÁej JOMON
Network Layer &Protocols
ACN (Comp. /Sem. 5/MSBTE) 1-38 ACN (Comp./Sem.5/MSBTE) 1-39
Network Layer & Protocols
Obtain the checksum by complementing the Sum
2. Address mask request and reply messages. minimum, maximum and average round trip
calculated in step 2. packets,
Example
3, Router solicitation and advertisement. time, packet loss etc.
the checksum in the checksum field.
4. Store We will use ping to test the serverxYZ edu having IP
1. The Information request and reply messages:
address 192.181.8.4 with 64 bytes of data. 1.14.2 Traceroute or Tracert
Inese messages are not used now a days because
Checksum testing:
the receiver path of a
The following steps are followed by using
using From a source to the destination to trace the
he Address Resolution Protocol (ARP) doing $ Ping xyz. edu
1's complement arithmetic: packet in UNDC, the
traceroute program and in
their duties. Calculate the sum of all words (header and data). Ping xyz edu (192.181.8.4)-56 (84) bytes of data can be used.
Windows, tracert program
2. Address mask request and reply : calculated in step 1.
Complement the sum
Traceroute / tracert can search the IP addresses of all
The IP address of a host contains a network 3. Accept the message if the result obtained in step Bytes from cmp seq
t1 time in that path.
number the routers which are visited
address, subnet address and host identifier. 2 is 16 zeros. Otherwise the message is rejected. xyz.edu (192.181.8.4)
is set for checking of maximum
Usually the program
A host may know its full IP address but may not 54 62 1.92 mS (hops) to be visited.
know it is divided into three parts mentioned 1.14 Debugging Tools 30routers
62 1.93 mS of hops is less than
above.
54 In the intenet normally the number
- In the Internet many tools can be used for debugging.
So it can send an address mask request message to 64 2 62 2.04 mS this.
We can decide the feasibility of a router or host. The
the router. The router then sends back the address
route of a packet can be traced. 54 3 62 1.90 mS Traceroute:
mask reply message.
- The ping and traceroute programs are different. To get
These messages are not being used today because Following are the tools in which ICMP is used for 64 62 1.91 mS
the help the ping program uses two query messages
their duties are done by the Dynamic Host debugging 64 5
62 2.00 mS whereas traceroute program uses two error reporting
Configuration Protocol (DHCP). 1. Ping
54 6 62 2.01 mSs messages namely time-exceeded and destination-
3. Router solicitation and advertisement 2. Trace route or Tracert
unreachable.
A host that wants to send data to a host xyz edu ping statistics is as follows:
another network must know the address of routers
on1.14.1 Ping: L 7 packets are transmitted.
This is application layer program in which only the client
program is required. There is
connected to its own network. no server traceroute
Ping program is used to search whether a host is 2. 7 packets are received.
In such situations the router solicitation and
responding or alive. To the destination, the source host program because in the destination host, client
3. 0% packet loss.
advertisement messages can
helpP program never reaches the application layer.
sends ICMP echo-request message if it is alive Minimum rtt (round trip time) = 1.90 mS
A host can broadcast or multicast a router
destination responds with ICMP echo-reply messages. In a UDP user datagram the traceroute program is
solicitation message. The routers receiving this Average rtt = 1.95 mS
number which is available at
message can broadcast their routing information In the echo-request and echo-reply messages the ping 6. Maximum rtt = 2.04 mS encapsulated. A port not
using the router advetisement message. the destination is intentionally used by traceroute
program sets the identifier fields and it starts with the The ping starts sending messages from sequence
These messages are not being used today because program.
sequence number 0. When a new message is sent, at
their duties are done by the DHCP. number 0 which gives us RTT time for each probe.
every time this number is incremented by 1. The traceroute sends (n + 1) messages if there are n
In the IP datagram which encapsulates an ICMP
1.13.4 Checksum Ping can compute the round trip time. In the data
routers are present in the path.
message has been set to 62 it means that the packet
Each router discards one message that means the first n
Earlier we have discussed the concept of checksum. In sectionofmessage it adds the sending time in it. can travel only upto 62 hops.
ICMP, the entire message (including the header and-After arriving the packet, the round trip time can be messages are discarded and the destination host
Ping defines 56 number of data bytes at the beginning
data) is considered for calculation of checksum. calculated as follows discards the last message.
and 84 total number of bytes (56 +8 bytes of ICMP
Checksum calculation Round trip time = Departure time of packet - Arrival
header+ 20 bytes of IP header 84 bytes).
=
The (n +1) ICMP error reporting messages received are
The checksum calculation is done at the sending end by
time of packet used by the tracceroute client program for searching
following the steps given below The ping program continues message sending with 64
the path between the routers.
To understand the concept of ping, consider the bytes in each probe (56 +8 64 bytes).
1. Set the checksum field to zero.
Fig. 1.14.1 shows the use of ICMPv4 in traceroute
following example, which shows how we send a ping With interrupt key (ctrl
2. Calculate the sum of all the 16 bit words including + C) we can stop ping program.
message to particular site. program in which the value of n is automatically found,
header and data. The statistics of probe is printed after interruption. The
there is no need to the value of n.
statistics includes the number of sent and recelved
TechKrnowledge TechKnowledge
YPub1ications
1-40 Network Layer &Protoco
ACN (Comp./Sem.5/MSBTE) 1-41 Network Layer& Protocols
traceroute unreachable message will
come to know
ow that the
final ACN (Comp. /Sem. 5/MSBTE
From the host A, with TTL value 1 the first DHCP. The mobile
destination is reached. be achieved by using
is
1.15 Mobile IP This can
message is sent, at the first router (RI) this
message DHCP and
host can obtain a new IP address using
To find the name of the final destination and IP idress
error
discarded which sends ICMP time exceeded with the new network
it uses the data in the received message. Hencein Mobile IP is the extension of IP protocol. t has been get associated
ill come Some of
message from which the traceroute program the mobile and personal computers such has many
drawbacks.
developed for But this technique
of n is 4.
to know the IP address of the first router and the name
Fig. 1.14.1 value as notebook. them are as follows
To find the destination and the round trip time for each
of router. Mobile IP allows the mobile computers to
traceroute program sets a timer. location.
geDrawbacks:
is sent router the connected to the Internet at any files.
With TTL value 2, second traceroute message we need to change all the configuration
To find better estimate for round trip time most of the it
which will find the name and the IP address of second
1.15.1 Addressing mobile host would need rebooting, everytime
The
can
traceroute programs sends three messages with the the other.
third and fourth message network to
router (R2). Similarly the Addressing is a very important problem in providing moves from one
TTL value to each device. DNS table everytime
find information about R3 and R4 respectively same
communication usingP protocol. We will3. It would be necessary to revise the
mobile of
the Internet are aware
The fifth message reaches the destination host is also Tracert: discuss its solution in this section. so that all the other hosts on
is used which behaves this address change.
another i.e. the I n Windows, the tracert program
dropped but for some reason.
1.15.1.1 Addressing in Stationary Hosts the other
from network to
differently than ping and traceroute. In IP datagrams If the mobile host moves one
destination host B cannot be able to find the
port of the exchange of
The original IP addressing was designed on the basis
is taking place, then
number which is specified in the UDP datagram. Then the tracèrt program is directly encapsulated. when transmission
two assumptions because during the
data will be interrupted
ICMP sends the destination-unreachable message with Similar to traceroute, the tracert sends echo request
cannot change their
1. The host is stationary. transmission, the client and server
code 3which shows that the port number is not found. messages to routers, when last echo request reaches
2. The host is connected to only one network
IP addresses.
the destination an echo reply message is received. port and
The traceroute program after receiving destination-
the basis of
An IP datagram is routed by the routers on
2. Two addresses
the IP address. first approach, the
Destination B all the drawbacks of the
Source A Due to
addresses for
approach of using two IP
a
in this chapter, an IP address is second
As discussed earlier
R1 R2 R3R4 be
mobile host is tried out and it is found to a
made of two parts: a prefix and a suffix.
more feasible approach.
A host gets associated with a network due to the prefix
assigned to a mobile host
The two IP addresses
L1
part of its IP address. That means a host cannot carry its are
IP address with itself from one place to the other 1. Home address and 2. Temporary address.
That means with change in place, the network changes The home address is the original IP address of the
-TTL2-
mobile host, and the temporary address is called as
and so does the IP address of the host.
the care of address.
*j***f Routers use the fixed association between a host and its
TTL3- The home address associated the host with its
network for routing the packets to the network to which home network (i.e. the network which is permanent
3 home of the host and it is its permanent IP
-*.** the host is attached.
TTL4 address.
1.15.1.2 Mobile Hosts: When the host moves to the other network, its
The IP addressing structure needs to be changed when temporary (care-of) address changes. This care-of
T TTL5 a host moves from one network to the other. To achieve
address associates the host with the foreign
5 this, various solutions have been suggested.
network.
Two of them are as follows: 1.15.2 Agents
Message Types
-Echo request -Time exceeded Destination unreachable
1. Changing the address: A home agent and a foreign aget are required for
One of the solutions is to allow the mobile host to rest of
(G-2530) Fig. 1.14.1: Concept of traceroute making the change of address transparent to the
change its IP address as it changes the network.
Internet.
TechPUbIICations
Knouledge TechKnomledge
Pubiications
Network Layer &Protocols Notwork Layor&Protocols
1-42 AGN (Comp. /Sem. 5/MSBTE) 1-43
ACN (Comp. Sem.5MSBTE) to keep the dual addressin
to the home
It is necessary essing
The position of home agent with respect the application programs.
transparent to Moble h Romoto
network and that of the foreign agent
with respect too called collocated Mo
N host
mOve host
care-of-address is as caresns
.ahone.. diler move
shown in Fig. 1.15.1.
The Home Forelgn
the foreign network are
address if a mobile host itself is acting as
the agent agent
Forelgn
Home nehwork nefvo foreign agent.
Mobile host
collocated care-of address has an
OAgent sollcitatioh Phas0-I
The use of
Original home Agont avertisemant Agent
host can move to anv dlscovey
of mobile hostHome Foreig advantage that the mobile
thinking about the
Agont solloltallon )
agent agent foreign network without
even
Agant adverisement
agent.
availability of the foreign
*****}
***************1**
However its disadvantage
is that an extra software Rogiatratlon roquast
Phase-1I
(G-2257) Fig. 1.15.1 : Home agent and foreign agent
with the mobile host.
needs to be installed HOgialdion requesl Roglstratlon
In Fig. 1.15.1 the home and foreign agents have been
1.15.3 Three Phases: Registratidn tøp
However actually they act as a router
shown as routers.
8L RagIstratian teply
with remote
Phase-ll
as well as a host. communication of a mobile host a ------------------------ -*******************
The Data transfer Data
the following three phases transter
host goes through
-*~-------~---
1. Home Agent: *****
***********************
Time
Time
Time ume
Agent discovery Time
home router is basically a router attached to the remote host
and
2. Registration (G-2258)Fig. 1.15.2: Communication between mobile host
home network of a mobile host.
3. Data transfer. 2. Phase-ll : Registration (Steps 5 to 8): 3. Phase-ll: Data Transfer:
When a remote host sends a packet to the mobile
1.15.2. in mobile communication
All these phases are shown in Fig. This is the second phase of mobile
communication.
This is the third phase
host, the home agent acts on behalf of the mobile
host first moves to the foreign network In this
Phase-I: Agent Discovery (Steps 1 to 4): The mobile after the agent discovery and registration.
host, receives the packet and sends it to the
and discovers the foreign agent (Phase-1). can communicate with the
phase the mobile host
communication. It
foreign agent. This is the first phase in mobile
After this it must undergo the registration phase, remote host as shown in Fig. 1.15.2.
consists of the following two subphases
2. Foreign Agent: which corresponds to steps 5 to 8 in Fig. 1.15.2.
1. From Remote Host to Home Agent:
1. Agent solicitation and
router connected to the The four aspects of registration are as follows: from the remote
A foreign agent is a
2 Agent advertisement. If a packet is to be transferred
Toreign network. 1. Registration of mobile host with the foreign host to mobile host, then the remote host uses its
A mobile host must learn the address of (discover)
by the home agent are received agent (Step-5). address as the source address and home address
Ihe packkets sent its home agent before moving to any foreign
the foreign agent and delivers them to the network (Steps 1 and 2). The mobile host must also Registration of mobile host with its home of mobile host as destination address.
by
mobile host. learn the address of (discover) the foreign agent agent. This is normally done by the foreign the
But practically the home agent is pretending as
Sometimes, a mobile host itself can act as foreign once it moves to a foreign network (Steps 3 and 4). agent on behalf of mobile host (Step 6). mobile. So it will intercept the packet with the helpP
Then there is no need of using a separate This process of address learning includes learning The mobile host must renewits registration if of proxy ARP.
agent.
of both the care-of address and the foreign agents
foreign agent the registration has expired. Thus the communication from remote host to
to
address.
For this, the mobile host should have the ability The mobile host is supposed to cancel its
its own. This can be The agent discovery phase involves the discovery
4. mobile host actually takes place between
the
care-of address back its home remote host and home agent as shown in
receive a on
of home
registration when it returns to
foreign agents. This process requires
and
done using DHCP network. Fig. 1.15.2.
the use of two messages namely:
In addition to this a special software needs to be
1. Advertisement message and The registration request and registration reply The mobile communication between the Remote
at the mobile host to enable it to
installed
2. Solicitation method. messages are used as shown in Fig. 115.2 for Host and Home agent has been marked by a thick
communicate with the home agent and to have the
registration of mobile host with the home agent path marked by "1" in Fig. 1.15.2(a).
two addresses (home and temporary).
and foreign agent.
Tech Knowledge
TechKnomledgë
Publicatlons
PUbfications
ACN (Comp./Sem.5/MSBTE) 1-45 Network Layer 2 PretOCOIS
Home network- Hemote nerworkK
Moblle host
From remote host
Remote Foeign network
original host
to home agent Horne neIwoK Remote
home Horn host
Mobile host Packet Wobie
Internet host origina
host to remote
OFrom mobille home
Fiemote Path
From home agent host
to1oregn&agent Foreign Moble
host Home
agent
Foreign
aget
From foreign agent
to mobile host
Foreign network
(G-2260) Fig.1.15.3:Double crossing Remoe
(G-2259)Fig. 1.15.2(a):Data transfer from remote host to home agernt 1. Double Crossing or 2X:
2. It is very important to note that eventhoughthe Home Remoe
From
Home to Foreign Agent: Now consider a situation in which a remote host newom Home host
packet originates from the foreign network, it has agent
As the packet is received by the home agent it wants to communicate with a mobile host which
sends the packet to the foreign agent using the
the home address of the mobile host.
has moved to the same network as that of the
Intemet
Direct path
concept of tunneling This communication has been shown by the thick remote host as shown in Fig. 1.15.3. Foreign
path 4" in Fig. 1.15.2(a).
agent Moble
The home agent encapsulates this received lP This is called as a double crossing or 2X case ie. host
packet into a new IP packet by using its own
1.15.4 Transparency: the case of severe inefficiency. Foreign efwork
address as the source address and foreign agents As discussed earlier, a mobile host can send a
address as the destination address and sends this In the entire data transfer process, the remote host (G-2261)Fig. 1.15.4: Triangle routing
packet directly to the remote host. Therefore there wants to
absolutely does not know anything about the In this situation as well, if a mobile host
new IP packet to the
foreign agent as shown by the is no loss of efficiency in this communication. send a packet to a remote host it can do so directy
movement of the mobile host.
thickpath marked by "2" in Fig. 1.15.2(a). However if the remote host wants to send a packet without any loss of efficiency.
Because, the remote host uses the home address as the
3. From Foreign Agent to Mobile Host: to the mobile host then it cannot do so directly (via
destination address when sending a packet to the But when a remote host wants to send a packet to
the dotted direct path in Fig. 1.15.3). first travel to the
From the IP packet received the foreign agent will mobile host a mobile host the packet has to
Instead the remote host has to send the packet and then to the mobile host as shown
recover the original packet by decapsulation Similarly thee mobile host uses its home address as the home agent
process. source address while sending a packet to the remote first home agent (path-1 in Fig. 1.15.3) and the in Fig. 1154.
However the recovered original packet has the host home agent will route the packet to the mobile Thus the packet has to travel along two sides of a
home address of mobile host as its destination In otherwords we say that movement of the mobile triangle instead of only one which is the direct path
host (path-2 in Fig. 1.15.3).
host is shown by a dotted line in Fig. 1.15.4.
address. totaly transparent because the rest of the In this the packet has to cross the Internet twice.
Internet has absolutely no idea about the movement of
The foreign agent will refer to a registry table and
1.15.6 Remedy
finds the care-of-address of the mobile host. The
the mobile host Thus the resources are used twice
unnecessarily in
this communication which reduces the efficiency Binding the care-of-address to the home address of
original packet is then sent to the care-of-address 1.15.5 Inefficiencyin Mobile IP
mobile could be one of the solutions to the problem of
as shown by the thick path marked by "3" in severely.
The communication done with the help of mobile IP can Hence the double cross case is called as the case of
inefficiency.
Fig. 1.15.2(a).
the home agent receives
be moderately to severely inefficient.
severe inefficiency.
-That means when
packet from the remote host and sends it to the foreign
the first
4. From Mobile Host to Remote Host:
The case of moderate
inefficiency is also called as the 2. Triangle Routing or Dog Leg Routing: agent it should also send an update binding packet to
If a mobile host wants to send a packet to a the remote host. By doing this it is ensured that all the
remote host, it does it in a normal way.
triangle routing, or dog leg routing whereas the case
A triangle routing or dog leg routing is a case or future packets to this mobile host can be sent to the
of severe inefficiency is also referred to as Double care-of-address rather than home address.
To do this, the mobile host creates a packet with its moderate inefficieny. It occurs when a remote host
Crossing or 2x.
home address (and not the care-of-address) as The remote host can save this information in a cache.
wants to send a packet to the mobile host which is
source address and remote hose's address as the We will discuss both these cases in -However this remedy also has an inherent flaw. The
this section. not attached to its own (remote) network.
destination address. cache entry would become outdated as the mobile
This situation is ilustrated in Fig, 115.4. host moves to a new network
TechKnowledge
TechKnouledge
OICations
Pubitations
1-46 Network Layer &Protocols
ACN (Comp./Sem.5/MSBTE) Write shot notes on : Multicast routing.
send a warning Q. 5
To avoid this the home agent must
packet to the remote host to inform that the mobile Q.6 network layer.
Name different protocols in the
host has moved to a new network. ARP.
Q.7 Explain the purpose of
broadcast but ARP repv
1.16 Virtual Private Networking (VPN): Q.8 Why is ARP request
unicast ?
Internet is
Due to Internet software, it appears that the
Write a note on IP.
which Q.9
a single, seamless system of communication to
number of IP.
lots of networks containing a large Q. 10 Explain fragmentation in
computers are connected. What is the name of a packet in IP?
Q. 11
actual networks get
The internal details of these real or . 12 Explain the IP header.
the Internet. Every Q. 13 What is MTU and how is fragmentation related to it?
hidden when they become a part of
the own unique
computer connected to Internet has it
Q. 14 Compare IPv4 and IPv6.
address assigned to it.
Q. 15 State limitations of IPv4.
The users of the Internet do not have to bother about
the internal structure of the physical networks and the Q. 16 Write a note on ICMP.
details related to them. Thus the user is a part of a addresses.
Q.17 Name and describe three types of IPv6
virtual network. Internet is thus the best example of
Q. 18 What is unicast routing ?
virtual networks.
Q. 19 What is multicast routing?
The concept of virtual networks states that in such types
Q. 20 Write a note on mobile IP.
of networks, different computer networks are not only
connected together but you feel that they are a part of What is fragmentation ? Explain how is it supported
Q.21
a big single network. The concept of virtual networks is in IPv4 and IPv6.
illustrated in Fig. 1.16.1. Q. 22 Explain the addressing scheme in IPv4 and IPv6
Computers When IPv6 protocol is introduced, does the ARP
wwwss
protocol have to be changed ? Explain.
wwww *
ww.sss
Q. 23 What is fragmentation ? Explain how it is supported
in IPv4 and IPv6.
Q. 24 Given an IP address, how will you extract its net
Virtual id
network and host id.
wwwwO
Q. 25 What is PING utility ? How many ways are there to
www. implement PING ? Explain steps.
Q. 26 What is subnetting in IP network, explain with
suitable examples.
(G-1447) Fig. 1.16.1: Concept ofvirtual network Q. 27 Why is an ARP Query sent within a
broadcast
frame ? Why is an ARP response sent within a
Review Questions frame with aspecific destination LAN address ?
Q.1 Q. 28 A network on the internet has a
Explain the connection oriented and connectionless subnet mask o
services. 255.255.240.0. What is the maximum number
hosts it can handle ?
of
Q.2 Why modern computer use dynamic routing ?
Q. 29 An IP datagram
Explain with example how distance vector routing is using the strict source routing option
used to route the packet and has to be fragmented. Do
count-to-infinity
why you think the option is
problem arises and how does it get solved. copied into each fragment, or is it sufficient to just
Q. 3 What is fragmentation ? put it is the first
fragment ? Explain your answer
Q. 4 Write short notes on : Hierarchical routing.
TechKnewledge
Pubiic ation>
Unit-l

Chapter Unicast &


Multicast
3 Routing
Protocols

Syllabus
ntroductionnter-domain Intra-domain Routing Routing AlgorithmsDistance vector
Routing, Bellman-Ford
algorithm, Link State Routing, Path Vector Routing. Unicast Routing
Protocols Internet Structure, Routing Information Protocol (RIP), Open Shartest Path First
(OSPF), Border Gateway Protocol Version 4 (BGPA) Introduction.: Unicast,Multicast and
Broadcast Intradomain MulticastProtocolsMulticastDistanoe Vector (DVMRP, Muticast
LinkState (MOSPF), Protocolindependent Multicast(PIM

Chapter Contents
3.1 Routing 3.13 Request and Response Messages (RIP)
3.2 Routing Algorithms 3.14 OSPF
3.3 Static Algorithms 3.15 Border Gateway Protocol (BGP)
3.4 Dynamic Routing Algorithms 3.16 BGP Sessions
3.5 Distance Vector Routing Algorithm 3.17 Multicast Routing Protocols
3.6 Link State Routing 3.18 Intradomain Routing Protocols
3.7 Least Cost 3.19 MOSPF
Algorithms
3.8 Bellman-Ford Algorithm 3.20 Muticast Distance Vector: DVMRP
3.9 Path Vector Routing 3.21 Core Based Tree (CBT) Protocol
3.10 Unicast Routing Protocols 3.22 PIM (Protocol Independent Multicast)
3.11 Routing Protocols 3.23 MBONE (Multicast Backbone)
3.12 RIP (Routing Information Protocol)
suo1edI10
bpejmouyOl
01 e "wuuobje bupnoi jujod
Juas aq S! 1ayDed

JBAO ndjno ayp buipjpap Joj ajqjsuodsa S! 11 0 uod e sey ! 1eu) SI Duipoog yM Uiajqoid au Ssaippe uogeujgsap 6upnoi Jojan aouezSIa
ypiyM au
aemyos Jakej yomau jo ued e sy wygsosje 5ugnoy 6upse>peo.q 1o pasn poujauu Bujoue s Buipoo eya puy 3ou Ue H ! 1ped Byi piesIp ueo JanoI ay1 8e S10903oid 6uipnou ujewuopiequ! Jo sajduexa ay
pasn ae ypIuM sainpnujs yied wnundo ayg oj spuodsauuo ypium
:Buypool 7 soo301d 6ujpnoa jo uojne»yisse TT'E 6!4 (T627-)
suod s! jo auo Ajuo yonoiyi jayped jeya spjemuo
ejep ayi pue sanoi ay asooyp ypiuM Swywobje d99 dd$o dT
eaje Joleuw ayi Suoeuigsap ayped e saAjaDaI 18]noi e uaym buFino jseD[un uI 6ugnoi 1ooen YIPd Dupnoi ajes HuI7 bugnoi Joj08A 8OUPISIa
ayi sapnipu! ubjsap aAe| yiOMIOu jo
e jo as| a1a1duoo e aney 0) Sey a2inos a 7
*aujyDeW uojeuiisap 6uanoi seun : ET'E DH (8tt-9)
asJnos anoj o pajsem S[ yipimpueq jO 101 V T
ay7 oj auudeui ayi woij sjayped ayi
sj0oo101dd Sj0oo10Jd
Sypeqmep OM] sey poyju sIuL ujeuopeijuuT
S JaÁP JoMJeu aui jo suoouny }ueiodu! auj JO auo ujeuopiajuj
uoFeuysap upee o1 13yped (jejedes e) 1ounsip uORPUg sed
suyaobiY Bupnoy e pues Ajduus m aunos
au pouau Siu u
6ugnoi 1seppeoiq jo ssep jepeds e si bugnoi jseonnN
sjoo010d Dunoy
: BuFseopeo1q ajduis jeno TTE DIH uj umoys se aje AayL
aJe
pasn
-Supnou seogunu si Ñugseoginu spougeuu snojuen: vTE "61 (6tt-) s10301oid ujeuiop/aju! pue Ujeuwopenu!
jejanas
pasn wupuosje 6ugno ay4 pue bugseoyinu
6ugsepeogJO
1O 6uno ujeuopiaju
dnoi6 eyns ayi se
pale o abesaui buipuas Bupnou 6upseopeoig ETE 61J u! payenjsnj|! S. Bugnou jseD[un jo 1daouoo ayi UMOu S! wajsís snowouoine
uaaMjaq
8ZI5 YIOMJau ay/ o1 paJeduo uoeusepPIinN Bupoold auis bupnoi ayi seajasM(wajsAs snowouoJne ue
S]soy a se
apisu!
ews axe up4m sdnosó pauyop aM e 01 sebessauw puas 01
6upnou ay pauijap s Bunoi ujeuopeijui ayl
spoujeu bujjseopE0J8 paubisse sassaippe jsejun BJe
01 aNey aM oS *35Jej s! dnoib ai j! asuadxa si SI4g INg ueibejep dI ay1 u! TTE 5 uj umoys si SV uy
: SMO||OJ Se ae bugsedpeoJq jo spoyiaw snoJeA
papnpu! sassaippe uogeuigsaP pue aoinos jo
adh4 ayi abujs e Jo]ensiujuipe
abessau ujod-o1-1Ujod Áq pa|jonuo si ypIuM siano
pue syJOM]au jo
uoeugsap auo Kjuo 0] s28ped spuas aunos auo dnou6 e s!
e "5uaseopeo1q se pa||e> SI uays Ajsnoauejnus Ajuo uy
(SV) waJsAS snouwouojny
puas o1 ajqissod si ! dnoiQ jjeus e Joj dnoi6 aya u Sueau
(SV) suajsAS
sassapod jayjo je og abessau e puas o sey ssaoid y jeyi 'uojjeunsap ayi pue adinos snououojny o}u! papAp S! ue
Suogeugsep 11e o 13xped e puas Jepues au ay2 uaamjaq 1aUiau!
8UBH
uoneja auo oj auO e s! aayi buFno jsejun u
UOMIaU 'S]sOy Jayao |je Jo fueP SJaynoJ ay2 |P Jo
sajqe
6ugno ay2 bujgepdn jo ysej ayi
apuey jouues
eusuoyeugsap aup lje 0u inq suogeugsap jo dnou6 e O 578yped pues o sey Isoy aya 'suoned|dde ujejo u 6upno auo jep
o1 1ues aq o1 S apuas e woy abessew e buFse>yINI u J - BunnoH ISEOJUN £T'E 6jq os S juejuj ayn jo ezis jooj0Jd
aya -

:Bupnoy1SPopeog i'E
Kepo
suaskssnououony:ZTE °614 (z6zT-5) :6uno ujewopieuj
:Bupnou SeojinN ST'¬ pue eiuj Tv¬
papjone aq osje 1|m pua 6upuas Dugnoi ouapxa se pa||e si sua]shs snouou 6upnoi ueuopjajuUI
eyp woy ybu sjayped kueui oo jo uogeaua6 SnoeA buowe aed saye eya 6ujno "bujznoJ ueuopenuj
osiy quaxa JeaJQ e o) 44pIMpueq anes IlIM SIUL Buigno Jojey

se : SMO|joJ
au eui uo no bujoQ 19xped upea u auy ay) asn sadkj OMJ 0ju!
6upnou oue]u
bugnoi ay2 Issejp osje
o 8e e Suojeuisap asoui Auo jO IS| e sapnjpu
ue aM
**************

o 6upno 1seNInN
pasn aq o1 auj ndino yoea joj jayped paAjaoau SV ue
pee s apisu adejd sa>ye) jey2 6ugno
ay jo Ado Mau e sa]eiauad uayi J8]noi ayi - B u a n o i ioJaJuj 6unoi jsedpeoig
102010Jd J02pan yjed ayi jo "bugnoi jsedun
sessappe uogeuFsap au unezuawajdu! ue s! d98
uy
(SV) sua]5>
sadki aay ou! payissejp
uo paseg pajndal ag IM 2eu4 Sau!l ndino jo jas OM]au jo dnou6 s Sy 41. 0010ud aje]s qu!| Jo Apeoiq aq ue 6uznoy
SOouony JO Jaquunu e oju! papAIp s! 1auo* ue os uogequawajdu! ue s! ddSO
ayg sappap 4 uOyi "suojeunsap u je sypayo 1sy SeBlayM 5uno Jo]pan auejsip jo uonequauwajdu :Buanou jo sedhl
janoi au 13]noi e 1e seNLiJe j3NDed e ypns uayM
sajqe re
Dugno ayi
eS!(dy) joo]0id uoewiojuj buFnoy ayL
õuFepdn Jo ysej ayj ajpuey O pue 6upnoJ ajejs yu!
6ugnoi jejypieais
uogeugsap paijsap S! 0Do201d buanou auo 1oj jeu/ abiej os s! SwajsAs bugnoi
aDuejsip10]93A se
ayi sajeoIpu! ypiyM deui 19 e jo suoJPunsap swyuobje bugno jua/ay!p pue bugnoi ypns
Ououone uaam]aq 6upnou ajpuey IIM 02010Jd jo sadki ayi
jo 35| e ueguo IIM 23ped yoee wyuobje siya u pue 10iO noqe ssnosip o bujob aJe BM
Dupnoi 1oLuaxa no SuoFDas
ujewopiaju! auo Ajuo ing SV ayi EpIsu bujgnoi bumo||0J ayi uj
6unsepeoJg 10 pasn unuobje pliy43 aup si siui 0001d jo ad adINBs pauaLO
puey o Japio u sjoo0301d 6upnoi ujeuopeiu uojpauuo ay2 u! 1n>Jjd jeniuIA e
: PucdBp Omgau ypea o1 paubi5se 3ujau BJOu Jo auo bupeai u! sdjay osje
Supnoi uopBuFsepinw e asooy oj paMo||je S Sv ype 1 saouas ssa|uojjauuo
33 u! weibeiep e
qUOM]au e ybnoiy djay o1 se os 1qe 6uipiemuo
s1aped kueu oo buinoi JO]D8n bugno s!
Dussed joJ 3ujauV ano y
sejeauab pue yip!Mpueq jo 10I e sauunsuo oS pau6jsse 1s0 au se pauyap s! Aian e
aAej yioMjau ayi u! anss! Jueuodu! sa]ea
Se pauyo S o0101d 6unnou uiewopeju! JO ajduexo dy s 6unO
sjooo10d bugnoy iseoinw 1SEOJuN 6upnoj a]e]5 qu!n
NOV bupno
SL8SWIS 'wes/'duoo) sjoooo. Bugnoy seonw 8 1SBOIUN
(ELaSWS wes/ 'duioo) NOV
sMSETE
Se.
AC ACN Cm
Cre Sem. 5MSETE
ecign
n the arc3:
Saiecto crang:
s eperderr on aeer
e suoret
3.2.1 Desired Properties of a Routinng
Aigorithm:
aigortkma
oeres shrtet pan
varios
Cmaity
322 Types ot Routing Aigorithms: ree TerrDktra a g r n re e re :
Belinan-Ford algorithn.
3.3.2 Flooding:
(aj A seret ancre
paic z i g r e
Triss
Te
ire m z333 Fow Based Poting:
evey g ire e
4 ) Fiz 32.1
r g
3.3 Static Aigorithms: Tree ze 2 carpirg e r i n A i
3.3.1 Shortest Path Routing
3.2.3 Optimality Principie :
ree1e rmitie copes ci an ir g E
g ha two irneresting cracera r a
g ere roe *om v r
detnaiorn the pacet wil be efre'y 3eE Z i g 331:Row based roing
h e detinatiorn
e copy f the paciket w reac re cesinaon iorgormaior soid be irom in a 2 e e :
2 te
quce proDe roE
Teca asaiedgi
ACN (Comp. /Sem.
5/MSBTE) Unicast &Multicast Routing Protocols ACN (Comp. /sem. 5/MSBTE)
Traffic matrix. A C
3-7
3. Unicast& Multicast Routing Protocols
Line
capacity
each line.
matrix which
specifies capacity of
3.5 Distance Vector Routing Algorithm: Updation

of router tables:
For
In this algorithm, each router maintains a table example, AC = 3 indicates the cost corresponding
called A route eriodically sends a coPy of its distance
3.4 Dynamic Routing Algorithms:
vector, such a table gives
each destination and the
the best
known distance to
information about which all its
neighbours.
vector TO the shortest path in terms of number of hops from A
to be used to reach there.
line to to C.
The modern computer networks When a router es a distance vector from its
normally use the This algorithm is sometimes called by other Even if
names nodes asynchronously update their distance
dynamic routing algorithms. as
such
it tries to find out whether its cost to reach vectors the
Two dynamic routing algorithms namely distance vector 1. Distributed Bellman-Ford routing algorithm. routing tables eventually converge.
would decrease
routing and link state 2. any destination if it routed
packets to The well known
routing used Ford-Fulkerson algorithm example of distance vector routing
are
popularly. destination through that particular
is
Both these
algorithms are suitable for the packet
In distance vector
routing, each router maintains a that
neighbouring the Bellman-Ford algorithm.
switched networks. routing table. It contains one entry for each router in outer. This
is illustrated in Fig. 3.5.1.
the subnet.
Both these
Routing procedure in distance vector routing:
Fig. 3.5.1 shows how the DV. at A is automatically
algorithms assume that a router knows the This entry
has two parts:
address of each
neighbouring router and the cost of The first part shows the
preferred outgoing line modified when a D.V. iS received from B. Ihe example of a subnet is shown in Fig. 3.5.2(a) and
reaching each neighbour. to be used to reach the specific destination. A Similar calculation takes place at the other routers as
the routing tables are shown in Fig. 3.5.2(6).
In the distance vector
routing, each node tels its
2. Second part gives an estimate of the time D
or
neighbours about its distance to every other node in distance to that destination. well. So the entries at every router can change. In
Router
the network. Distance vector: Fig. 3.5.1(a) the initial distance vector is shown. The
In the In distance vector
link state routing, a node tells every other node in routing, we assume that each
router entries indicate to the costs corresponding to the
thenetwork the distance to its neighbours. knows the identity of every other router in the
but the shortest part to each router is not
network, shortest distance between the routers indicate to that
- S o both these known.
routing algorithms are distributed type A distance vector is defined as the (G-464) Fig. 3.5.2(a) : A subnet
list of <destination,
and sothey are suitable for large internetworks. cost> tuples, one tuple per destination. Each square.
router
maintains a distance vector.
The cost in each tuple is -New estimated delay
equal the sum of costs on the
shortest path to the destination. Trom router I
This showS H Delay Via
* *******
***. that the delay vectors
Initial
A B:G_ D **..
A PD (b) Given network

from A to B is
ns
20 A8A
B18 A
A10B
8+10 18 ms
o 3 10 2 o31
8
This shows
Minimm Calculations at "A" when a
TWO
Entry in each squareo OG distance vector arrives that the delay 12
represent the shortest from "B" from Ato Dis possible
o m a node to 38 ms patns
destination. The entry shows a AB = 1 ..Cost to go to B.
ne minimum cost from D to B 19
(a) Initial distance vectors at the
four routers
16 G18 H
Cost to destination from B.
12+
8+24 31 mS.
32 mS
Compare 2122 Cost to destination from A via B.
12
nd take TA
minimumn Entry corresponds
of the two 01 3 o .Current cost to destination Delay is Delay is
12 to shorter delay of
Tom . 8
the two
New routing
New distance vector for A. table for router I
Vectors received
New D.V. will replace the from I's two neighbours
initial D.V. of A In the next hop
() Caleulation at A when a D.V. (G-465) Fig.3.5.2(b):Routing tables
arrives from B
(G-463) Fig. 3.5.1: Distance vector algorithm at router A
TechKnowledge 7Tech
Pub
ACN (Comp. /Sern.
5/MSBTE) Unicant &Multicast Routing (Gonp.serm.
5243ETE)
The entries in
router tables of
Prottr ACN
so if A reteives a packet tor , t Y . tn & and e r Unicast& Muiticast Routing Prctocols
vectors. For
Fig. 3S2(b) are the delay root. This is a serious problem due to
which A e ther ruter sti thirk that A is down. So inthe
example considet 1uufns back 10
^. >1thuirty itE
the shaded boxes of algorithm rPplated nk recerres a parke
was by the State Ro again
Fig. 3.5.2(b). Routig destined tor , it goes to A arnd returns tack tn e ecrre om f i g 25iai, the entries below CDE are
algorithm,
ne eritry in the
first This bouncing of packets between redes A ard t
shaded box shows that the delay
from A to 8 is 10 3.5.2 Looping in
Distance Vector Routing wn as the two-node loop problem. e serord e r excrange, t cames to ikrow trat
msec whereas the entry in the othe
shaded box indicates that Protocol
the deiay rom A to D is 38 his a G i e arc ndicates a ath of 2 hoo length. 5ut
msec. A problem in distance vector rootin9 is its following strategies:
instabrlity *i r
angerer atie
ertres
onsider how router i computes its new route to network uSing this protocol Can become unstable. Defining infinity
. Fig. route Split horizon r A ia ops
3 52c) shows the two possibie routes beween Twonode loop instability:
and 3.
Split horizon and poi50n reverte
A network with three nodes has been shown in
3.5.3. Thaere is a similar problem Caled tree nce e
Fig Note that the routing tables
poBsibe aute iABG
are
shown problem present in the system uirig darce vec tA*
partially for discussion.
t e r 2 xTarges
routing
pre
2 he 3 eaTArs
Problem:
rom k 3.5.3 Count to Infinity
heoretically the distance vector routing works propey
466) Fig. 3.5.2{c) but practically it has a serious problem. The probiem is
Ater A
KWs that the reach s va A, *he Oeay equied is that we geta correct answer but we get it siowy
v
iraly In other words it reacts quickly to good news b
L-S9T
TA reacts too slowiy to bad newws
1 1o G Desay 8 18 24 maec (G-1499) Fig. 3.5.3: Two node loop instability
A to iay 16rmS Consider a router whose best route to destination X i
-At the beginning both nodes A and B know
Whereas the deley between and G H (route
how to large. If on the next exchange neighbour A suddeny
va IHG) is reach node X. But the link
joining A and X fails
reports a short delay to X, the router will switch ove
(1-92) suddenly. So node A changes its table. If A could send
Ito Ceay 12S s
changed routing table B
and start using the line to A for sending the trafic o
to G I toGDeiay 12 6 18 maec
to immediately, everything destination X.
iey 6mS is okay. No problem will occur.
The best of hese values 5 Thus in one vector exchange, the good news
s msec corresponding to But the system becomes unstable if B sends its routing Atar angs
the path HG Herce t makes an entry in its table to A before receiving processed.
routing A'S routing table.
tabie s *abie, tra: the delay to G is 18 mset and that fhis Let us see how fast does a good news propagate
is because node A receives the
t e route to t updated B's routing
use
H.
s via
table and assumes that B has found
Consider a linear subnet of Fig. 354 whicn has fe
a
path to reach
new
ihe hew nodes. The delay metric used is the number ot hops
routing tabie tor
oster show in node X. So A immediately updates its
routing table
Fig. 3.5.2b which is incorrect). Assume that A is initially down and that al the cthe
Similarty we can caicuiate the delays. fromi to different Based on this routers know this. So al the routers have recoroed n*| Aar 2 ecanges
update now A sends its new update to B.
destinations trom A to i and enter the minimum Now B thinks that the delay to A is infinity.
something has
changed around A
possible delay rnto the Ts roter tabie and so it updates its routing table.
Smiay D ani a Cae e r rong *2s after 3
When A becomes OK, the other routers come to
3.5.1 Disadvanteges Due to this process, the cost of
reaching X increases
about it via the vector exchanges Then Sudey
graduaily and tinally becomes infinite. At this moment vector exchange at all the routers w e *
T h e distance as spreac* e ** one hoo pE ECTange
vector routing takes a iorg tumein both A ard B understand that now it is
impossible to simultaneously.
converging to the comect answer. This is due to a 3.5.4D):
reach X At the time of first vector exchange. 5 c o e s to nowEpianation of Fig
problem caled court-t0-nfinity probiem. This problem that its left neighbour has a rero deay A B Now reer i iS4pl Here intay ai routers are O
Note that during this entire tirme the
can be soved by using the spit horizoi system is unstabie.
algorthm A thinks that the route to X goes
Siown in Fig 354ja) B maies an entn n ts o u n g he ruters &E D andi nave dstances of L 2. 3 and 4
via B whereas B thinks
Another g obiem is tnat this aigorithm does ot take that the route is vis node A table that A is one hop away to the let
espectvey A S he irt row ci Fg 354) s as
tie iine bandwidth consideration when
into choosing a
Tech Knoaledgi tish*
*****t****
5/MSBTE) Routing Frotocols
ACN (Comp.
/sem. Unicast & Multicast
ACN (Comp. /Sem. 5/MSBTE) Unicast & Multicast Houting Protocr F
B
3-10 ocols i s used in Internet backbones and in some digital
Node Cost
s u c h a s CDPD.
468(6)) 3.5.4 Split Horizon Algorlthm: cellular
systems

2 4 Initially- First row of routing table in link state routing: LD


To avoid the count to infinity prodiem, several changes
above figure
These are distances
of B,C,D,E to A in the algorithm have been suggested. But none o Linkstate routing
Node sost
situations.
Now imagine that suddenly A goes down or line them work satisfactorily in all we
will discuss the
development of routing table in
Now
link state is used for
between A and B is cut. One particular method which is widely implemented, i
is
link
state
routing Here
the term
the characteristic or a iink or edge, which represents
Node Cost
At the first called as the split horizon algorithm. ing t
packet exchange B does not hear anything de kin the
the Internet.
Internet. Tthe cost 85sociate
:

associated with each link


In this algorithm, the minimum cost to a given in
from A (because A is down). But C says "I have a path
a
network

The havino i
The links having lower costs are preferred to the
destination is not sent to a neighbour if the neighbour (G-2202) Fig. 3.6.1()
of length 2 to A". But poor B does not understand that is
important.

having higher costs. A nonexisting or broken link s


is the next node along the shortest path.
this path is through B itself.

So B thinks that it can reach A via C with a path length For example if node A thinks that the best route to
ed
indicated
by an
cost. In this method,
the
each node each
That
netWork.
musthave 3.6.1 Comparison of Lint State Routing
and

complete
map
or
node means
Distance Vector Routing:
node B is via node C, then node A should not send the aachould
c have complete information about the state of each
3. (B to C 1 hop andC to A 2 hops) so it accordingly
to node C. Link state routing
updates its routing table. But D and E do not update corresponding minimum cost Distance vector
link.
their entries. So the second row of Fig. 3.5.4(6) lookS as
collection or states or all the links in an Internet i routing
The is the advanced
follows 3.6 Link State Routing:_ as Link-State Database (LSDB). For the entire
. Each router maintainsIt
version of distance

one LsDB and its copy is available with routng tableindexed by


Distance vector routing was used in ARPANET upto hernet, there is only and containingone vector routing
node uses it to create the least cost tree. for each router in
Initially 1979. After that it was replaced by the link state routing.
each node. Each LsuB entry
example of IS as shown in Fig. 3.6.1(b) for the the subnet.
4After1 exchange Variants of this algorithm are now widely used. The
2. Algorithm took too long Algorithm is faster.
3 in Fig. 3.6.1{a). The next step is creation of
*****
The link state routing is simple and each router has to Tnternet shown
Updated No change ISDB (which
contains all the information about the Internet) to converge Wide bandwidth is
entry (G-469) perform the following five operations. at each node.
3. Bandwidth is less.
avalable
On
the second exchange C realizes that both itsRou operations All delays measured
D) claim to have a path of length 3
4.
Router measure delay |
neighbours (B and
Each router should discover its neighbours and -

5| 4
B
directly with special and distributed to every
to A. So it picks one of them at random and makes its obtain their network addresses. 501 | ECHO packets. router
new distance to A as 4. This is shown in row 3 ofF considers the linea

Fig. 3.5.4(b). It is repeated below.


Then it should measure the delay or cost to each D 4 o5 It doesn't take
bandwidth into account
line
t
bandwidth into account
of these neighbours. 3 50 when choosing the when choosing the
It should construct a packet containing the (b) Link state database (LSDB)
.
(a) Internetwork
routes. routes.
(G-47
4 network addresses and the delays of all the (G-2201) Fig. 3.6.1
neighbours. Two Level Hierarchical Routing:
Send this packet to all other routers. This can be achieved by a process called flooding. Each3.5.2 two level hierarchical
to all its immediate For networks of smaller size, a

3 4 After 2 exchanges 5. Compute the shortest path to every other rOuter, node sends a greeting message
routing is sufficient.
neighbours, so as to collect two important pieces of
The complete topology and all the delays are Fig. 3.6.2{a) shows network containing3 regions.
C changes its entry information as follows:
experimentally measured and this information is shows the full routing table of router 1A
Fig. 3.6.2(b)
1. The identity of the neighbouring node. 9 routers.
Similarly the other routers keep updating their tables conveyed to each and every router. which has 9 entries because in all there are

after every exchange. 2. Cost of the link. Region 1 Region 2


Then a shortest path algorithm such as Dijkshtra's 2A 2B
It is expected that finally we should get o in the router algorithm can be used to find the shortest path to every The packet containing this information is called as LS

tables of B, C D and E indicating that A is down. We do other router. Packet (LSP), which is sent out of each interface. After
reach this state at the end in Fig. 3.5.4(6) but after a Protocols: the
receiving all the new LSPs each node will create

very long time.


in Fig. 3.6.1(c). This LSDB is
1A, 18 etc are
Link state routing is popularly used in practice. comprehensive LSDB as shown
routers
The conclusion is bad news propagates slowly. This The OSPF protocol which is used in the Internet uses whole of the
same for each node which shows the map
problem is called as count-to-infinity problem. the link state algorithm. the LSDB to make the
internet. That means a node can use
Region 3
The solution to this problem is to use the split horizon IS-IS i.e. Intermediate system Intermediate system is
whole map of the Internet.
the other (G-471) Fig. 3.6.2(a) :A network
algorithm. protocol which uses the link state algorithm.
TechKnoule
PuD1iCat
Techknowledge
ublications
ACN (Comp. /Sem. 5/MSBTE 3-12
Full routing table for 1A
Unicast &Multicast Routing rotocols ACN (Comp.Sem. 5/MSBTE)
How many levels a hierarchy should have ?
-13 Unicast& Multicast Routing Protocols
3.8 Beliman-Ford Algorithm:
Destination Line Hops Kamoun and Kleinrock have discovered that for an N
1A router subnet, the optimum number of Let us suppose that node 1 is the "destination" node
hierarchy levels
B is log. N and it requires a total or logeN entries the problem of
1 per consider
findinga shortest path from
C
and
1C 1 router table. to node 1.
to node 1. W
We assume that there exists at least
node
every
A 1B 2 node to the
every destination.
Ex. 3.6.1 : For hierarchical routing with 4800 one path from
2B 15
routers, what
To simplify the presentation, let us denote d; = co if 3 D-
region and cluster sizes should be chosen to
2C Shortest palhs using at most 2 arcs
18 minimize the sizeof the routing table for G. is not an arc of the graph. Using the convention we
D B 4 a
three-layer hierarchy ? can assume without loss of generality that there is an
3A
1C Soln. arc between every pair or nodes, since walks and paths
3B |1C The three has consisting of true network arcs are the oly ones with
level hierarchy got the three levels as
(G-2304) Fig. 3.6.2(b): Full routing table for router 1A shown in the following diagram. lessthan
Now with a two level hierarchical routing, the routing -910) shortest walk r o m a given node i to node 1, subject
2 A
table of the same router reduces to a much smaller size Level 3 Clusters
to constraint that tne walk contains at most 'h' arcs and D-2
as shown in Fig. 3.6.2(C). This table has only 5 entries.
goes through node 1 only once, is referred to as Shortest paths using at most 3 arcs
Hierarchical routing table Level 2: Regions
or 1A shortest (sh) walk and its length is denoted by D
Destination Level 1 Routers
Line Hops Note that such a walk may not be a path, that is, it may
If the number of clusters is X, number of
regions per
contain repeated nodes. We will later give conditions
cluster is y, and the number of routers in each
Region 1 1B
region is
z
under which this is not possible.
then the each router needs z entries for the local
convention, we take
routers, (y - 1) entries for routing to other regions 3. By
Region 2 : within its own cluster and 1) entries for distant D 0, for all h 2 D-4
18
clusters. Final tree of shortest paths
Region 3 We will prove that D, can be generated by the iteration.
Total number ofentries in the router table (G-1376) Fig. 3.8.1: Successive iterations of the Bellman-Ford
(C) Hierarchical routing table for router 1A D min for all i*1 .3.8.1) method
=
(x-1) +(y-1) +z =x
(G-2305) Fig. 3.6.2 *y +Z-2
Starting from the initial conditions, 4. Thus Bellman Ford algorithm first finds the one-are
In the hierarchical table of
Fig. 3.6.2(c), there are entries
3.7 Least Cost Algorithms:
shortest walk lengths, then find the two-arc shortest
for all local routers (1A, 1 B and 1 ) belonging to the We have already defined the term cost associated with
D for alli1 ...38.2)
This is the Bellman Ford algorithm illustrated path lengths and so forth.
region of 1 A as before. But there are no detailed a link and the factors affecting / deciding its value.
Fig. 3.8.1.
entries for the other These link costs or hop costs are used as inputs to a In this example, the shortest (s h) walks are paths
regions.
least cost routing algorithm. because all arc lengths are positive and therefore all
Instead all other regions have been
compressed intoo a Shortest path problem
single router per region. For example traffic from 1A to
Principle: Destinati arc lenglh as indicated have positive length. The shortest paths are
node 2 cycles
router
The principle of least cost routing algorithms is as found afterN-1iterations, which is equal to 4 in this
any in region-2 is via 1 B-2 A line as shown by
the shaded entry in Fig. 3.6.2(c). follows:
Similarly all the traffic example.
from 1A to region 3 is routed through the line 1C-38. If there is a network of nodes connected
by 5. Once we show this, we will argue that the shortest walk
bidirectional links, where each link as a cost
Comparison of Figs. 3.6.206) and () shows how with it in each direction, the cost of a path between twWO
associated
lengths are equal to shortest path lengths, under the
hierarchical routing reduces the size of routing tables. nodes is defined as the sum of cost of links traversed. additional assurnption that all cycles not containing
For each pair of nodes find the path with least cost.
oo
Disadvantage: node 1 have non-negative length. We say that the
Examples
The reduced table size has a price tag attached to it It algorithm terminates after h' iterationsif
The well known examples of least cost routing
D4
comes at the expense of increased path length. But it is Shortest paths using at most 1 a r
algorithms are: D foral i
practically acceptable. L. The following proposition provides the main result.
Dijkstra's algorithm and
2. Bellman-Ford algorithm.
TechKnowledgë TechKaemledge
PuD1ICatlons
Eations
ACN (Comp. /Sem. 5/MSBTE) 3-14 Unicast &Multcast Houting Protocola ACN (Comp./ e m .
5/MSBTE)

6. Proposition: -omputation 15 O (mA), where Ais the number of arcs


&-15 Unicast &Multicast Routing Protocols
In view of D D, [Cf. Equation (38.4)] this yields
of would be
Consider the Bellman-Ford algorithm Equation (3.8.1) Shortest (sh + 1) walk length Dh1 and
m I5 tne number
terations required for
wice before reaching node 1, since a cycle
(m is also the max1mum number min
with initial conditions D = » for all i * 1. Then terminatior
on
of arcs formed that (on the basis of equation D, d+D
Completing the induction proof. in a shortest path).
containe

a) The scalars D, generated by the algorithm are equal to Ould have zero length let i iz i) be the cycie
If the Bellman-Ford algorithm terminates after mple in Fig. 3.8.2
shows the effect of
the shortest (s h) walk lengths from node i to node 1.
(b) h negative and add the equations
iterations, we must have length Ycles not involving node 1 and illustrates that
*D
(b) The algorithm terminates after a finite number of 22
D D, for all i and k2 h . (3.8.5) an test for existence of such cycles simply by
iterations if and only if all cycles not containing node 3 one

have non-negative length. Furthermore, if the algorithm -So we reduce the lengths of the shortest walks
cannot paring Di
with
D, for each i.

terminates, it does so after at most h s N iterations and by allowing more arcs in these walks. It follows that
engin 1 Length-3 Obtaining (d.d, +d 0
at termination, D is the shortest path length from there cannot exist a negative-length cycle not
2 Length 1 ance the subgraph connects every node to node 1 anda

i to 1. containing node 1, since such a cycle could be repeated has N-1 arcs, it must be a spanning tree. We call this
3.8.2: Graph with a negative cycle. The shortest
Subgraph the shortest path spanning tree and not that
Proof:
anarbitrarily large number of times in walks from some path length from 2 to 1 is 1
special of havinga (node 1), witn
8) We argue by induction. From Equation (3.8.1) and (3.8.2)
nodes to node 1, thereby making their length
arbitrarly Bellman-Ford algorithm gives D - 1 and t has a structure root

small and contradicting Equation (3.8.5). very arc of the tree directed toward the root
we have, .-1, indicating the exIStence of a negative length cycle. D2 2
Conversely, suppose that all cycles not containing
D= d, for all i *1 node 1 have non-negative length. Then by deleting all
D AS implied by part (D) or the preceding proposition,
So
D, is indeed equal to shortest (s 1) walk length from such cycles from shortest (s h) walks, we obtain paths of
exists such a hegatve ength cycle if and only if
to 1. Suppose that D; is equal shortest (s k) less or equal length.
there
for some i D0 D4
to
walk D,<D
length from i to 1 for all k s h. We will show that D, Therefore for every i and h, there exists a path that is a
isthe shortest shortest ( h) walk from i to 1 and the corresponding Bellman's equation
and
shortest path construction:
(s h 1 ) walk length from i to 1. Indeed, Assume that all cycles not containing node 1 have Shortest atn D3
a shortest (sh + 1) walk from i to 1 either consists of shortest path length is equal to D, . 1. spanning tree
non-negative length and denote by D,the shortest path
ess thanh+1 arcs, in which case its length is equal to (G-1378) Fig. 3.8.3
-Since paths have no cycles, then it can contain at most
D, or else it consists of h 1 ares with the first are length from node i to 1. Then upon termination of
N-1 arcs. It follows that, 5. Using the preceding construction, it can be shown that
Bellman-Ford algorithm, we obtain
being j ) for some j 1, followed by an h arc walk
fromj to 1 in which node 1 is not repeated.
o- D,forall min
if there are no zero (or negative) length cycles, then

Implying that the algorithm terminates after at most N


D ildj+ Dj for alli#1.3.8.6) Bellman's Equation B.8.6) and (3.8.7) (viewed as a
The latter walk must bea shortest ( h) walk fromj to 1 system of N equations with N unknovwns) has a unique
iterations. .3.8.7)
fothenwise by concatenating arc(i j) and a shorter (sh solution. This fact is useful when we consider the
walk from j to 1, we would obtain a shorter (s h + 1) Note that the preceding proposition is valid even if This is called Bellman's equation and expresses that the
Bellman-Ford algorithm starting from initial conditions
walk fromi to 1] we thus conclude that, there is no path from some nodes i to node 1 in the shortest path length from node i to 1 is the sum of the
original network. Upon termination, we will simply have length of the arc to the node following i on the shortest
other than -= {Cf Equation 3.8.2)
Shortest (h + 1) walk length = min
(Dld,+ D)) for those nodes D = o, path plus the shortest path length from that node to
For a proof we suppose that D, i = 1, . N, are another

node 1. solution of Bellman's Equation (3.8.5) and (2) with D = 0 and


.3.8.3)7. To estimate computation required to
find the shortest
Using the induction hypothesis, we have DsDfor path lengths, we note that in the worst case, the 2 From this equation it is easy to find the shortest paths we show that b, are equal to the shortest path lengths D, Lst
all ks h [sirnce the set of (s k) walks from node j to1 algorithm must be iterated N times, each iteration must (as opposed to the shortest path lengths)if all cycies us repeat the path construction of the preceding paragraph
contains the corresponding set of (Sk-1) walks] be done for N 1 nodes and for each node the not including node 1 have a positive length (as opposed
the
with D, replacing D. Then D, is the length of
Therefore, minimization must be taken over no more than N -1 to zero length). To do this, select for each i 1, one arc
showing that
corresponding path from node i to node
alternatives. Thus the amount of computation grows at . j) that attains the minimum in the equation.
D min o 1sd,+D=D
jd+D min inequality, consider the
.(3.8.4) worst like N, which is written as O (N). min 2 D. To show the reverse
D, d +D] and considerthesubgraph consisting Bellman-Ford algorithm with two different initial conditions.
Furthermore, we have D, sD = da = da +D,so from Generally, the notation O (P(N), where P(N) is a
ofthese N-1 arcs as shown in Fig.3.8.3. The first initial condition is D= , for i 1 and
Equation (3.8.3) we obtain, polynomial in N, is used to indicate a number
depending on N that is smaller than Cp (N) for all N, 3. To find the shortest path from any node i, start at i and D = 0, in which case the true shortest path lengths D, are
Shortest (Sh + 1) walk length = min {D,, min [d; + D, 1}
where C is some constant independent of N. Actually,a follow the corresponding arcs of subgraph until node 1 N-1 iterations, shown earlier.
obtained after at most as

min
(D,, D " more careful accounting shows that the amount of IS reached. Note that the same node cannot be reached

echKnowledgo TechKnouledge
Puieotton Pudiitations
5/MSBTE)
ACN (Comp. /Sem. 5/MSBTE) 3-16 Unicast & Multicast Houting Protocol. ACN (Comp,Som.
17 Unicast &Multicast Routing Protocols
itRouter Ri S e n dto
is reachabie
s path a mess t receiving
vector
network N. Router Ra on erise that
this
The second initial condition is D= D, for all i, in which Shortest path from node 1 to all other nodes ne well known attributes are further cdassified into wo
Bellman Ford algorithtm is as shown in Fig. P. 3.8.1.
Ising
usine

case D, is obtained after eveny iteration (since the D, solve ne will update its routing table. It then adds its
categories
mes VWel kronn mandatory attributes
Bellman's equation). Since the second initial condition is, for nomous system (As) to the path, inserts itself
Well erown disretionary attributes.
every less than or equai to the first it seen from the
as the next router and sends this message to router P 2
Tne optionai attritutes aiso are cassified into two types
in kig. 3.9.1.
shown
Bellman-Ford iteration D = min, [d, + D, ) that D, s D, for as

S2 An optionai rarsitive atribute


****

all i. (G-1494) Fig. P. 3.8.1 .. ****"***


2. An optional nontrarsitive ariribute

Therefore D D, and the only solution of Beilman's


equation is the set of the true shortest path lengths D,. It is
3.9
Path Vector Routing: 3.10 Unicast Routing Protocols:
also possible to show that if there are zero length cycles not It is different from both distance vector routing and link **********
communication as the
We can define the unicast
involving node 1 the Bellman's equation has a nonunique state routing N, R, AS1 communication between one serder and one recever
Path vector
solution. Table 3.9.1 shows the example of a path routing table message Irom in short it is a one to one communication
R to k
tturns out that the Bellman-Ford algorithm works Each entry in the routing table wil have the information disoussed about how the Internet has
We have already
corectly even if the initial conditions D, for i - 1 are arbitrany about the destination network, the next router and the Path vectior message been diided in administrative areas called
from H2 o ha
path to reach the destination. the
numbers and the iterations are done in paralilel for different Autonomous Systems which helps in handling
nodes in virtually any order. Table 3.9.l: Path vector routing table N Aa Asa As1 EKchange cf routing iniformation ecenty.

sectons we are goine to d'scuss some

Ex. 3.8.1 Apply Bellman Ford algorithm to given network


ork Next router Path *****************-
in the tolowing
tmportant routing protocos.
NO1 R01 AS 12,AS21, AS 56 (G-1788) Fig. 3.9.1: Path vector messages
es shown in Fig. P. 3.8.1 and find the least

cost path beween source node 1 to other


No2 R08 AS 20, AS 57, AS 06 | 3.9.2 Loop Prevention: 3.10.1 Routing
connected to
nodes. An Intemat corsists of many neraoris
IS received, a router checks it to see if
When a message each cther by routers. A datagram passes through
its autonomous system is in the path list to the
wen it traes rom the sourte to
direrent routers
destination. If it is present it indicates looping is
Gestination
involved which is undesirable and the message is
3.9.1 Path Vector Messages 3.10.2 Cost or Metric
ignorea.
The autonomous boundary routers participate in path In this way the looping problem and the associated it has to
Jter is connected to many networks
vector routing. Their job is to advertise the reachability is
(G-1491) Fig. P. 3.8.1
of networks present in their A.S.
instability which is present in distance vector routing make a cision when t eceves a packet from one of
to the neighbour
Soln. avoided in path vector routing these netwOTkS as to whicn neTwork it shouid pass this
autonomous boundary router.
Let node 1A 2 B, 3 C, 4 D, 5 E, 6 F
Each router that receives a path vector message verifies 3.9.3 Path Attributes: packet to
Node 1 is source node. makes this dedsion on the basis of
The router
whether or not the advertised path is according to its of attributes Each
Distance from node 1 to all other nodes is as shown in
The path is specified in terms Optimization. That means it fnds out which path is an
policy. Such a policy is made up of rules that are Hence
Table P. 3.8.1. attribute gives some information about the path. to send tne packet. BUt how does it
imposed by the router controlling administrator. optimum path
router to make
the list of attributes helps the receiving define the term optimum ?
Table P. 3.8.1 If yes then the router will update its routing table and a better decision about when to apply its policy.
One way is that a cost is assigned for pass.ng through a
arc 3 arcs will modify the message before it is sent to the next
Node distance
2 arcs distance Attributes are of two types network This cest is also caled as the metric.
distance neighbour 1. A well known attribute with tne optimum path, the
in connection tinaing
In the modified message it sends its own AS number and
2. An optional attribute cost is considered to be bad
8 nework having a hi9h
and replaces the next router
entry with its own well known attribute if it is to have a kow cost is considered to be good.
An attribute is called as a
4 (Due to B) 7
(Due to D) identification. This process is demonstrated in Fig. 3.9.1.
the router
recognised by every BGP router.
So in order to maximize the throughput
4 (Due to B) Fig. 3.9.1 shows an internet containing three
one that need
no? be
(paths) having low costs.
An optional attribute is the should choose the networks
2(Due to D) 5 (Due to D) autonomous systems
As through As3 recognised by every BGP router
9 (Due to C) 5(Oue to E)U
TechKnewledga
*STtic*i*"

Tarh Knomledoe
ACN (Comp. /Sem. 5/MSBTE) 3-18 Unicast& Multicast Houting Proto (Comp. /Sem. 5/MSBTE)

We define an interior protocol as the One


ne
otocols ACN
CN

mplements the diStance vector routing with the


3-19
Unicast &Multicast Routing Protocols
order to minimize the delay, the router must
can
y
handles the intradomain routing. that epeat the following steps for each advertised
choose the paths having low costs. following considerations

estination :
Similarly an exterior protocol is defined as the
n an A.S.it has to deal with routers and
3.10.3 Routing Tables: which handles the interdomain routing.
One etworks (links) and not the nodes. Add the
Add the advertised information
advertised information to
tO
the table if the
destination is not present in the routing table.
he routing table for a host or a router consists of an
1ow the destination in a routing table is a if the
3.11.1 Unicast Routing Protocols netv That is why, the
network address in
Replace
Replace entry in the table with the advertised
aave
one

entry foreach destination, or a combination of Various unicast routing protocols are shown
defined in the first column. next hop field is same.
destinations to route the IP packets. used Keplace entry in the routing table if advertising hop
The metric in RIP IS called
Routing tables can be of two types Fig. 3.11.1. as the hop ount is smalier than one in the table.
count and it is very Simple. It is defined
as the
1. Static routing tables 2. Dynamic routing tables The popular interior protocols are RIP (Routina number ot links a pacKet has to travel to reach its4 Return.
Information Protoco) and osPF (Open Shortest pa destination.
1. Static routing table
In RIP, the value of infinity is decided to be
3.12.2 Initializing the Routing Table:
First).
The information in the static routing tables is
equal to 16. That is why the maximum hop When a new router is added to a network it initialises its
Whereas the exterior protocol used popularly is BGP
entered manual. The route of a packet to each count for any route inside an A.S. using RIP can
destination is entered into the table by the (Border Gateway Protocol). routing table.
be 1
administrator. Routing protocols S u c h a table consists of the information only about the
The next node column is used to define the
This routing table cannot update itself directly attached networks and the corresponding hop
address of the router to which the packet is to be
Exterior protocols counts. The next hop field which identifies the next
automatically. It has to be changed manually as Interior protocols
dispatched.
and when required. router is empty.

Hence static routing table is useful only for small RIP oSPF BGP Routing table: 3.12.3 Updating the Routing Table:
networks. A typical routing table is shown in Table 3.12.1. Every
(G-497) Fig. 3.11.1: Unicast routing protocols When RIP messages are received, each routing table is
2. Dynamic routing table: to keep such a table with it.
- R I P and OSPF are used to upgrade the routing tables router is supposed discussed
pdated using the RIP updating algorithm as

The dynamic routing tables inside an A.S. and BGP is used for upgrading the Table 3.12.1:Routing table earlier.
get automatically
can

updated by using a dynamic routing protocol such routing tables for the routers which join multiple A.S. Hop Next Other
3.12.4 RIP Operation
as RIP, OSPF or BGB.
together. pestina count router information
RIP work is a combination of a routing database that
The structure
of a dynamic routing table is
shown3.12
in Table 3.10.1 RIP(Routing Information stores information on the fastest route from computer
to computer, an update process that enables each
Table 3.10.1: Format
Protocol) Destination column consists of the destination network outer to tll other routers which route is the fastest
of dynamic routing table
is used for updating the routing tables. The routing
RIP address. The hop count column consists of the shortest from its point of view, and an update algorithm that
Mask Network Next
MaskNeoT
address address Interface
hop
FlagsontUse updates are exchanged between the neighbouring distance to reach the destination and the next router enables each router to update its database with the

routers after every 30 seconds with the help of the RIP tastest route communicated from neighboring routers.
column consists of the address of the next router to
response message. These messages are also known as which the packet is to be forwarded. Each router on the Internet keeps a database that stores
the RIP advertisements.
The other information in Table 3.121 may include the following information for every computer in the
These sameRIP network:
messages are sent by the routers or hosts. They information such as subnet mask or the time this entry
3.11 Routing Protocols: contain a list of multiple destinations within an was last updated.
- I P address The Internet Protocol address of the

Routing protocols are designed on the basis of the


Autonomous System (AS). computer
demand for dynamic routing tables. RIP is interior routing protocol used inside an
an
3.12.1 RIP Updating Algorithm: Gateway: The best gateway to send a message
addressed to that IP address.
The router in an Internet are supposed to inform each Autonomous System (AS). Its operation is based on The routing table is updated when a RIP response

distance vector routing. Distance : The number of routers between this


other about changes. Routing message is received as stated earlier.
protocols combine the router and the router that can send the message
rules and procedures which allow the routers In the distance vector routing each router follows.
to periodically The updating algorithm used by RIP is as
directly to that IP address.
exchange information about these changes between shares its knowledge about the whole Internet with its RIP updating algorithm: Route change flag :A flag that indicates that this
themselves. neighbours. other routers to
infomation has changed used by
1. RIP response message is received.
We can divide the As stated earlier, RIP is
routing protocols into two a very simple intradomain or
each advertised
update their own databases.
2. Add hop to the hop count for
categories, interior protocols and exterior protocols. interior routing protocol which works inside an
one
Timers: Various timers.
Autonomous System (AS). destination.
ecnKnowladge
Publltatonc

Tech Knowledgë
ACN (Comp. /Sem. 5/MSBTEE (Comp./em. 5/MSBTE)
3-20 Unicast& Multicast Routing Protoco ACN
At regular intervals each router sends an
update Zero
olocols Corm. 1 Version
Family GS6ved
Unicast &Multicast Routing Protocols
A Zer03 This timer counts down from the set value (25 to
message which has full information about its routing
This field is not actually used by RFC 1058 RIP; it w NOwoK addross 35 sec) and sends an update message when its
database to all the other routers that are was All Os
directty added just to provide backward compatibility withthe
Repeated

count reaches a zero. Then the timer is set once


connected to it. Some routers will send this the All Os
message as
older versions of RIP. ts name actualy indicates it ts All Os again to a random value between 25 and 35
often every 30 seconds, so that the network will
as
defaulted value: zero. seconds.
a Format
of request message (RIP) for one
always have up-to-date information. (G-2145) 2. Expiration Timer:
RIP uses the UDP network protocol because of its
4. Family : Fig. 3.13.1
Com. 1 The responsibility of expiration timer is to govern
efficiency and there are no problems if a message gets This field is used to specify the address tamily used. RIp VGrsion Reserved
Family the validity of a route.
ost due to any reason. This is because the next update is designed tocarry routing information for A Zero8
several
When a router gives out the update informmation
will be coming in a short time. different protocols. Each entry has an address-family Repeated3
about a route, the value of this timer is set at 180
identifier to indicate the type of address being specified AI OS
3.12.5 RIP Message Format: sec or 3 minutes.
For example the value of AFI for IP is 2. Similarly All 0S

different values indicate different protocols. This timer is reset, everytime a new update for that
RIP messages can be broadly classiffed into two types G-2146) (b) Format of request message (RP) for all
route is received, wnich under normal working
messages that deliver routing information and Fig. 3.13.1
information.
Network address: conditions happen after every 30 sec
messages that request routing
The network address field is used for defining the
Both use the same format which consists of a fixed 3.13.2 Response Message: But due to some problem on the Intermet, if a new
address of the destination network. In RIP this field is 14 update for that route is not received within 180
header foliowed by an optional list of network and Response message in RIP can be one of the following
bytes long, so that it can be used for any protocol. sec, then that route is considered expired and the
distance pairs. two types :
But the IPv4 address is only 4 byte long. Hence the nop count of that route is set to 16. This is an
RIP version 1 1. Solicited response or 2. Unsolicited response.
remaining space in the address field is filled with zeros indication that the destination is not reachable.
Commandd Version
Rese ed
A solicited response is the one which is sent only as an
There is a separate expiration timer for each route.
Famly zems Distance answer to a request message. It carries with it the
information about the destination specified in the Garbage Collection Timer:
Network address This fieldindicates the number of hops (routers) that
request message. The router does not purge a particular route from
Azeros
l have been traversed in the trip to the destination. This
An unsolicited response, is not sent only once but it is its table even when the information about that
value is between 1 and 15 for a valid route, or 16 for an
Azeros
l sent periodically (every 30 seconds or so) when there is route becomes invalid. Instead the router
unreachable route.
the table. is also
Distance any change in routing This response
mt
continues to advertise that route by increasing its
called as the update packet. Pa
Repeat of last 20 bytes 3.13 Request and Response Messages metric value to 16 (destination is not reachable).

(RIP): 3.13.3 Timers in RIP: At the same time, the router sets another timer

for
(G-1998) Fig. 3.12.1: RTP
message format RIP uses three lnu for supporting
different timers as follows called garbage collection timer to 120 sec.
RIP has two types of messages namely Request and
The summary ofthe RIP packet format fields illustrated s route.
its options
in Fig. 3.12.1, is as follows Response Messages.
The periodic timer to control the process of As soon as this count goes to zero, that route is
1.
1. Command
3.13.1 Request Message: sending messages. purged from the router table, Due this timers the
that a particular root
The request message is created in the following two The expiration timer is used for goveming the neighbours become aware

Indicates whether the type of the packet ie. a request or has become invalid, before its purging.
validity of a route
response. The request asks that a router send all or situations
collection timer is used for Disadvantages of RiPv1
L. It is created by a router which has just come up. The garbage
part of ts routing table. The response can be an
the failuree of a route.
unsolicited regular routing update or a reply to a advertising important disadvantagesof the
2. Or it is created by a router which has some
time Some of the

request. Responses contain routing table entries. Out entriees. 1. Periodic Timer: original RIP version i.e. RIPVI are as follows

shortest route to
only understands the
a
Multiple RIP packets are used to convey information control the RIPvi
In a request message, information about some specific The task of the periodic timer is to
simple count or
from large routing tables. destination, which is based on
entries or all the entries is asked. advertising of the update messages reguiarly. number of router hops.
2. Version: Fig. 3.13.1(a) shows the format of the request message AS per protocol specifications,
this timer should be
other routers for computed routing
but it is set randomly
practically 2. It depend on
for one and Fig. 3.13.1(b) shows the format of request set to 30 sec.
This field specifes the RIP version used. This field can
and 35 sec. Each router has one
updates
message for all. between 25
signal different potentially incompatible versions.
periodic timer.
TechKneuledgë
TechKnowledge
Publicstion
5/MSBTE)
Comg,/oem.
ACN F23
Unicast &Multicast Routng Protocols
ACN (Comp. Sem. 5/MSBTE) Unicast &Multicast Houting Protocols
3-22 OcOls a s s l e s s Addressing :

There is no field in RIP message which can indicate the


3. Routing tables can get large and these are
Soln. : most mportant diference between the two of the message. The length
to be has
ength
Oroadcasted every 30 seconds Routing table at A of RIP is that RIPvi can determined from the UDP packet. The well known port
Table P. 3.13.1: rsions support only the
Distances are based on hops,
not on vE addressing, whereas RiPv2 can also

(such as the speed of link).


real costs
Cost Next Hop classful

support the 520 has been assigned to RIP in UDP.

Destination (hop count) outer) assless addressing.


3.13.5 Problems in RIP:
S t continues to be a router to router configuration Due to the additional field called subnet mask, it is
that means each router is fully depend on its next nssible to define a nerwork prefix length in RIPv2.
RIP is the most used Internet interior routing protocols.
router to implement the same options. Hen classless addressing becomes possible. t is based on the distance vector routing principle. RIP

6. If we solve one problem and other appears. has many limitations. Some of them are as follows:
Authentication

3.13.4 RIP Version 2: Authentication is a satety measure taken by RIPV2


Width restriction: RIP uses a 4-bit metric to count
to router hops to the destination. For RIP infinity is defined
In November 1994, RIP was modified with some ure the protection or message against unauthorized
as 16 which corresponds to 15 hops.
additions (extensions) to overcome some of its advertisement.

into exstene
shorteomings. RIP version 1 is still being used on For authentication, it is not necessary to add any 2. No direct subnet support: RIP came

routers and continues to outnumber OsPF nefworks.


iayMessage format (RIPv2): extra
prior to subnetting and has no direct support for it. We
ield to the packet. nstead the authentication
The message format of RIPv2 is as shown in Fig. 3.13.2.
The modified RIP is called RIP version 2 protocol. can use it in the subnetted environment with some
information is done as the first entry of the message.
Command Version Reserved
Version 2 is backward compatible with version 1 and restrictions.
Rout The value of FFFF1s is entered in the family field which
Fany
contains all of the capabilities of the version 1 protocol 5andwidth
consumptive: An RIP router will broadcast
Network address that the enty is not the routing information
indicates
RIP version 2 implemented the following features Repeated Subnet address but the authentication information, as shown in
lists of networks and subnets it can reach after every 30

Next hop addressS seconds. wilI a large amount of


This consume
Features Fig. 3.13.3.
Distance bandwidth.
Authentication by means of a simple text password. The authentication field in Fig. 3.13.3 is used for
(G-2147) Fig. 3.13.2: Message format of RIPv2
Dificult to diagnos fault: Like any other distance
Subnet masking used. defining the authentication
protocol and the next field
vector routing protocols, RIP also is difficult to debug.
carries the actual authentication data.
Multicasting used to allow for variable-length subnet New Fields :

5. Weak security: RIP does not have any security features


masks to be implemented. There are some new fields in the message format of Command Version Reserved
Route tag-to provide a method of separating RIP routes
Ox FFFF Authentication type of its own.
RIPv2 as compared to that in RIPv1. They are as follows
from externally learned routes. Authentication data 6. Looping problem: Being based on distance vector
L. Route tag (16 bytes) principle the RIP faces the looping (routing loop)
Compatibility switch-to allow for interoperability with
2. Subnet mask
version 1 routers Notice that he same format is used for
problem.
RIPVI and RIPV2. 3. Next hop address. (G-2148) Fig. 3.13.3:Authentication
Remedies
1. Route tag: This new field is useful in containing
Multicasting:
Ex.3.13.1: Complete the final routing table at node
information such as autonomous system number. Using Some of the above mentioned problems are overcome
using RIP protocol for the following network. In RIPV1 broadcasting is used for sending RIP message
this field, we can enable RIP to receive information from with RIP2 while the looping problem can be overcome by
Assume the cost of hop count. to all the neighbours. Due to broadcasting of the
using either a link state routing protocol like OSPF
an interdomain protocol. or a newer

message, all the routers as well as hosts connected to


2. Subnet mask: This field is 4 byte long and it contains distance vector routing protocol like BGP.
the network would receive the RIP message.
Distance Costext the subnet mask or prefix. This shows that the classiess

Hop
addressing and CIDR is supported by the RIPV2.
But in RIPv2 an all round multicast address is used to 3.14 OSPF:
RIP to the RIP routers on the
Next-hop address: This new field contains the address send the messages only The long form of OSPF is Open Shortest Path First
of the network.
next hop. This feature is useful in a situation protocol.
where the same network is shared by
autonomous two
Encapsulation: This is another interior routing protocol. It is an

systems for example a backbone. With the help of this


intradomain protocol and it is based on the link state
The UDP is used to encapsulate the RIP messages. That
field, the message can define a router to which the
in
packet is to be sent next. Note that this router can be a means RIP message is inserted
into the UDP user routing. For handling the routing efficiently and a

(G-500) Fig. P. 3.13.1 the OSPF divides A.S. into areas.


part of the same A.S. or some other A.S. datagram. timely manner, an

Techknouledge
Pubtlcations

TechPublications
Knouledge
5/MSe
(Comp./Sem.
ACN (Comp. /Sem. 5/MSBTE) 3-24 Unicast &Multicast Routing Protocols ACN
25 Uricast Muicast PouingProoo
Area Area 2 goramssosnsaggoaroogn
Area: approach two-hop high-speed network wil be ignored Area 3

and a one-hop low-speed link would be used instead.


Networks, hosts and routers are collectively called as an
We can make a router to take a better path by adjustina
area. An autonomous system be to be made of
can imagined
various areas. All the networks inside an area should be
the hop-count metric on

reduces the available diameter.


the router port, but this
e a böider
connected.
RIP updates its entire table on a periodic basis using the
Backoore router
Area border routers: broadcast address. (RIPV1; RIPV2 uses multicast or Area (Bacoore)
.
bandwidth. .
These are speciel type of routers which are used at the broadcast). But this would consume
Automorous 5}SGrN

borders of an area. These routers summarize the information RIP sends its update with the help of a 576 byte data-
(G-1726) Fig. 3.14.1{a): Autonomous sy5E
about the area and sent it to the other areas. gram. If there are more entries than 512 bytes, then

Backbone:
multiple datagrams must be sent.
3.14.1
Features
of QSPF: the link szte irformation for all infomation in ter
The biggest drawback of RIP is its slow convergence. In routing area.
A special area inside an autonornous system is called as the worse case, a RiP update can take over 15 minutes 1. Type ofservice
to congure different routers to suppon PF 6 an open specification:
backbone. All the areas inside an AS. should be
end to end. This can lead to black holes, loops, etc. It is possible
different types o service requirements. For evample,
The OSPF has been pubiished a an PFC and
connected to the backbone. detined as a defacto stardard such as F1P. Trerefore
RIPV1 does not support VLSM. router can De onigured tor high-throughput
one
So backbone is the primary area and other areas are other one is contigured to support minimal aryone can implement the stardard, withest payirg
while the
Remedies (What 0SPF could do):
known as secondary areas. for some otherapplication. royaites. This has been done to encourage many
delivery delay
verdors to use it so that the users are rnct locked ints a
The first shortest-path-first routing protocol was
Beckbone routers: Load balancing:
single vendors equipmen
developed and used in the ARPAnEt packet switching
ultiple routes are available, traic can
The routers inside the backbone are called as the
network all the way back in 1978. This research work vould obviousBy
De eveniy8. 0sPF area:
distributed over the routes. This result
backbone routers. But a backbone router can also work OSPF divides the network into groups, caed an area.
was developed and used in many other routing in a higher network efficiency.
as an area border rOuter. ne poiogy ot an area is niot kron to tne rest ot the
protocol types and prototypes. One of those is OSPF Subdivision of autonomous systems
If the connectivity between a backbone and an area is 3. AUtononous System. This technique minimizes the
OSPF provides solutions to most of the dravbacks of t is possiblie to further divide the system into logical routing traffic required for the protocol. When mutiple
broken, due to sorne problern, then the adrninistration
RIP. Using OSPF we can scale up the routing areas. This would improve the managernent of large areas are used, each area has its oWr copy ot tre
should create a virtual link between routers so that the
architecture well beyond the maxirnurn 16 hops autonomous systerns. topological database.
backbone can continue to function as primary area.
Several concepts have been incorporated in the
supported by RIP, 4. Security
Area identfication: The data exchanges in OSPF are authenticated.
OSPF algorithrn. The RIP trezted an autonorious
Rather than exchanging node (and network) reachability monolithic coilection of routes and
Each area has an area identification. The area Inadvertent or malicious transmissions from foreign systen as a

information, OSPF routers exchange link state subnets, but OSPF introduces the corcept of arees.
identification of the backbone is zero. An autonomous
routing nodes are disc arded. Only those hosts intended The concept of hiding the routing inforrnation
systern is as shown in Fig. 3.14.1(8). information.
for the routing network are included. The network isn't
within a OSPF routing domain drterret
Through the link state information, each router vuinerable to the threat of having routing tables
Disadvantages of the RiP protocol: autonomous systern) has also been introduced.
Corrupted by faulty route infornation.
maintains its own copy of the network topology. From
After dividing an autoomous systern into a
The maxirnum distance between any two statíons (the
this link-state database, it is possible to find the 5. Host
collection of logical areas, the OSPF an support
metric, measured in router hops) is 15 hops.
shortest routing path. OSPF supports specific, network and subrnetwon. different types of routing nodes (routers) such as
A destination (network 1D) whose hop count is 16 or internal routers, area border routers, backbone
For those of you that are familiar with the OSI routing routing.
more is considered to be nonreachable. routers, and Autonomous Systerm (AS) boundary
6. Special features are provided to support LAN
scheme, many of the features supported by OSPF are
The cost toa destination network is measured in terms
environments:
routers. (See Fig. 3.14.11a).
of number of hops. RIP deternines a route based on a similar to the OSI 1S-15 routing protocol. The protocols used to support OSPF routing
relationships between routers
are
Although the include database broadcast packets and link state
hop count that does not take into consideration any The original versions of OSPF are actually derived from
maintained on a logical link basis, link state A "Hello" is used to
other criteria other than the nurmber of routers between some of the earlier versions of the IS-IS change broadcasts. protocol
protocol ransmissions are minimized by the architecture. detect changes in the availability of adjacert
the source and destination networks. Due to this | Designated gateways are responsible for transmitting
routers.
Tech Knesiedge
uiitstign
Tech Knowledgo
ub!icatiun:
ACN (Comp. /Sem. 5/MSBTE 3-26 Unicast& MulticastRouting Protocoh 5/MSBTE)
ACN (Comp,sem. 3-27 Unicast &Multicast Routing ProocoS
3.14.2 Metric The relationship between the neighbouring routers is 3.14.4 Virtual Link: LSA
shown in Fig. 3.14.4(a). Each router has been connectes
he cost assigned to each route d he administration an create a virtual link between
by an OSPE to every other neighbour. But this arrangement
1.Rooter 2. Heterork 3. Sumery ink 4. Surmmary link 5. Exteme
administrator is called as metric of that route. In the non-realistic. In
two routers, when a link between them gets broken due ick LSA k LSA to network LSA AS boundary link LSA
nonefficient and order
OSPF protocol the metric
extremely router
can be based on a typeof make it more efficient and realistic, the configuration of to some reason.
service. G-s05) Fig. 3.14.7:Types of LSAs
should be used. This is known ast he ch a virtual link could be over a longer path which
Fig. 3.14.4(6) 1. Router Links:
A router can have multiple routing tables which are transient network. The designated router is assigned to
would go through many routers.
based on different types of service. perform two tasks, one as a true router and the other ae
The router produced a router links advertisement for its
a designated router. a 14.5 Graphical Representation
3.14.3 Types of Links : own area. The advertisement deseribes the collected
Due to the realistic arrangement of Fig. 3.14.4(b) every us now discuss about representing an AS. states of the routers links to the area. This
In the OSPF protocol terminology, a connection is called router has only one neighbour 1.e. the designated
aphically. Consider Fig. 3.14.6{a) which is a small A.S.
advertisement also indicates the type of the router 1e.
as a link. OSPF defines four types of links called point to router (network), however the designated router has networks and routers.
with multiple whether it is an area border router or an AS boundan
point, transient link, stub link and virtual links as shown multiple (5 in this case) neighbours.
are some point to point networks, and transient
in Fig. 3.14.1(b). router.
as stub networks.
Types of links as well
2. Network Links :
xDesignated The symbols such as N and Na are used for the
router
transient and stub networks. No identity should be network link advertisemet is produced for every
Stub Virtual
Point to point Transient
uansit muit-access netwoFK Tis avertisement S
(G-501) Fig. 3.14.1(b): Types of links attached to the point to point networks.
Unrealistic representation (b) Realistic representation produced by the designated router for the transit
(a) The graphical representation of the A.S. as seen by
1. Point to point link: (G-1787) Fig. 3.14.4
oSPF has been shown in Fig. 3.14.6(b) network. t describes all the OSPF routers fully adjacent
A point to point link is defined as the link (connection) The realistic arrangement reduces the number of
that directly connects two router without any
other host announcement that each router has to make to a small to the designated router.
3.14.6 Link State Advertisements (LSAs)
or router present in between. An example
of such a link unrealistic arrangement.
is two routers connected by a telephone line.
numberas compared to the 3. Summary Links
Note that there is a metric from each node to Each entity in a network distributes the Link State
other side of Link advertisements describe a single route to
Each router has only one neighbour at the
designatedrouter and there is no metric from the Summary
the link. This is shown in rig. 3.14.2. It is not necessary
Advertisements (LSAs). An LSA announces the states of a destination. The destinations described are extermal to
router to any other node.
designated
to assign any network address to this link. The metric entity tinks. the area but intemal to the Autonomous System. Some
shown at the two ends of the link and they are 3. A stub link:
are
Different types of LSAs depending on the type of entity condensing of routing information occurs when creating
generally the same. A stub link is a network that is connected
to only one
are as shown in Fig. 3.14.7. these summary link state advertüsements.
router as shown in Fig. 3.14.5.
Point to point Router Router A Router A
nework
(G.502(0)) Fig. 3.14.2 : Point to point link XDesignated router Ns
Ethernet N2
2 Transientlink: (a) Stub network (b) Representation Ns
*****
(G-504) Fig. 3.14.5
It is a network having many routers attached to it as
T3 ine
shown in Fig. 3.14.3. All LANs and some WANs are of The stub network of Fig. 3.14.5(a) is a special case of
transient network. The data packets use the same link to
thistype. (a) Autenomous system
enter and leave the network.
A, B, etc. are the routers. Each router has several
C..
neighbours. This situation can be represented by using router A as a
node and by replacing the network by a designated
router as shown in Fig. 3.14.5(b). The link connecting
router A and the designated router is unidirectional
Ethermet
from router to network.
the administration can
When this link gets damaged b) Graphical representation
create a virtual link between the two routers.
(G-503) Fig. 3.14.3: Transient link A.S and its graphical representation
(G-2115) Fig. 3.14.6:
Tech Knenledgo
ecinowlodgo ications
ACN (Comp. /Sem.
5/MSBTE) 3-28 Unicast &Multicast Houting Protoco ACN
(Comp.sem.
5/MSBT
3-28
4.
AS Summary Links: Authentiocation Unicast &Multicast Routing Protocols
Common Header But everytime a router forwards this message, the
These 64-bit field is the actual value of the
like
are
summary link advertisements but
they
- 8 bits - 8 bits - 16 bits This 6
he future, when more
authentication Cumulative value of this field.
describe routes to
Autonomous System boundary Verslon Type Mossage leng9th
data.
n
authentication type 2
routers. would be defined, this field will contain the
result of the
E Flag
Source router IP address authentication calculation.
This is a 1 bit
5. flag. If E =1 then it indicates that the area
AS External Links: Area ldentification For now, if the authentication type is 0, this field is filled a stub area. The
15
area that is connected to the
AS external advertisements describe routes with Os. If the type is 1, this field carries an eight 0aCkbone by only one path is called as the stub area.
external to
the Autonomous System. CheckSum Authentlcatlon type
character password. T Flag:
3.14.7 OSPF
Packet Types: Authentication
32 blts) 3,14.8
Link State Update acket:
This is also al bit flag. If T 1, then it indicates that it is
possible for the router to handle multiple services.
Difterent types of osPF packets are as shown in The heart of OSPF operation is the link state update 4.
Fig. 3.14.8.
LInk state type:
e t . So let us discuss that Tirst. A router
(G-2116) Fig. 3.14.9: OSPF common header uses this his field is used for defining the LSA type. There are
cket, to advertise the states of its links.
OSPF packets five
Various fields in the OSPE packet header are as follows different types of advertisements as follows
314.10 shows the general tormat of the link state . Router link
Fig.
. Hello 2. Database 3. Linkstate . Link state 5. Link state
Version :
update packet. 2 Network link.
descnption request updale ackowledgement
The contents of this 8-bit field tells us about the version
OSPF common header
3 Summary link to network.
ter link of the OSPF protocol. It is currently version 2.
. Network link 24 bytes TYpe:4 Summary link to A.S. boundary router.
Summary link to network
Summary link to AS boundary route Number of link state advertiserments External link.
External link 5. Link state ID:
This 8-bit field defines the type of the packet. There are
Link state advertisement Any combination The contents of this field are dependent on the type or
(G-506) Fig. 3.14.8: OSPF packet types five types of oSPF packets and they can defined by Repeated of five
different knds
adjusting the contents of the type field from 1 to 5. link, as shown in Table 3.14.1.
The OSPF protocol runs directly over IP, and uses the
(G-2117) Fig. 3.14.10: Format of link state update packet Table 3.14.1
assigned number 89. Each OSPF packet consists of an Message length
OSPF header followed by the body of a Each update packet may contain many different LSAs. Ype Link Link state ID
particular This 16-bit field defines the length of the total message
packet type. OSPF packets need to be sent to specific IP
which includes the headeras well as the body. Fig. 3.14.11 shows the general header which is common Router ink IP address ofrouter
addresses in nonbroadcast multi-access networks. to all five types of LSAs.
Source router IP address
Network link IP address of designated
The OSPF operation consist of following stages router.
This 32-bit field definés the IP address of the router that 3.14.9 General LSA Header Summary tink to Address of the network
Neighbours are discovered by means of sending sends the packet.
Link state age Reserved E T|ink state type network.
The Hello messages and designated routers
areArea identification Link state ID 4. Summary link to | IP address of AS boundary
elected in multi-access networks. Adverising router AS
This 32-bit field defines the area within which the
boundaryrouter.
Adjacent routers are identified and link state Link state sequence numDer router
routing takes place.
databases are synchronized. Linkstatee ohecksum Lengun Extemallink Address of extemal Network
Checksum :
Link State Advertisements (LSA) are exchanged (G-2118) Fig. 3.14.11: LSA general header Advertising router
This field is used for error detection on the entire packet
among the adjacent routers so as to maintain the Let us discuss various fields of LSA general header. The field contains the P address of the router which
excluding the authentication type and authentication data
topological databases and also to advertise advertises this message.
field. 1. Link state age:
interarea and interAS routes. The routers use the number
information in the database to generate routing Authentication type : nis field is useful in indicating the time (in seconds) Lnk state sequence
elapsed from the instant of generation of this message. This field contains a sequence number that is assigned
tables. This 16-bit field defines the authentication method used
router to router
to each link state update message.
nis type of message travels from
All OSPF packets have the same common header which i n this area. At this time, two types of authentication are
which is called as flooding. 8. Link state checksum:
is as shown in Fig. 3.14.9. This header is same for all the defined: A O in this field shows that no authentication is
being used and a 1 represents the use of password for At the instant of creation of this message by
a router,
The contents of this field is not the usual checksum. But
five packet types of OSPF,
authentication. the value of this field is O. the value of this field is calculated on a special type
TechKnesledgi
tiicatisns
Tech Knowledge
uDIICtons
em. 5/Ms
Sem. 5/MBTE)
ACN (Comp. /Sem. 5/MSBTE) 3-30 Unicast &Multicast Routing Protocoh ACN
(omp.
3-81 Unicast & Multicast Routing Protocols
called as Fletcher's checksum. This method Designatod router
of Table 3.14.2 advertises the linkxa The important fields in this are as follows :
calculating checksum considers the whole packet Link
except for the age field to calculate the checksum. Linkt
type Link data Network mask
identification
he conterts of this field are used for defining the
9. Length: Address of Interface (G-2121) Fig. 3.14.14: Networklinks
| Type 1: Point to point network mask.
This field is used for defining the length of the whole neighbor router number 14.15 shows
the format of
network link
Address
Fig. TOS:
packet, in bytes.
Type 2: Transient ofRouter advertisement.
designated routeraddress OSPF commmon neader The contents of this field are used to define the type of
3.14.10 Router Link LSA: Type 3: Stub. Network address Network 24 Dytes ype service.
Number of advertisements
mask LSAgeneral header
3.
Metric
The links of a true router are defined by a router ink. of Router
Type 4: Virtual Address 20 pyles Type :2
The contents of this field are used for defining the
This advertisement is used by a true router to announce neighbor router address Network mask
metric for the type of service stated in the TOS field.
information about all its links and at the same time Repeated Attachea toute
2. Link data:
about the neighbours. Fig. Network
3.14.15: link
advertisement format 3.14.14 Summary Link to AS Boundary
The contents of this field give additional information (G-2122)
The important fields of the network link LSA are as Router LSA:
A router link has been shown in Fig. 3.14.12. about the link. Therefore the contents of this field are
given below.
dependent on the type of link as shown in Table 3.14.2. The previous advertisement was designed to let every
1. Networkmask: outer know the cost to reach all the networks that
3. Link type: The contents of this field are used for defining the
To translent networkk belong to an AS.
Advertisine As shown in Table 3.14.2, OSPF defines four types of network mask.
router with
four link
But what if a router inside an AS wants to send a packet
links on the basis of the type of network, the router is router :
To stub network 2.
Attached outside the AS ?
connected to. ntents of this field are used tor defining the IP In order to accomplish this, the router must know tne
The
addresses of all the attached routers. This field is a |
Virtual--
G-2119) Fig. 3.14.12: Router iink
Number of types of service (TOS):
The contents of this field are used for defining the
repeated field.
path (route) to an autonomous boundany router.
This information is provided by the summary link to AS
3.14.13 Summary Linkto Network LSA: boundary router.
The router link LSA is used for advertising all the links of number of types of services that are announced for each
Inside an area, the router link and network link The area boundary routers witl sirnphy fiood their areas
a true router. link. advertisements provide ample information about the
with this information. This packet contains the
5. Metric for TOS 0 router links and network links to a router.
3.14.11 Router Link Packet information about the route to an AS boundary router.
The default type of service is TOS 0. This field is used for But this information is not enough. In addition to this, a
Fig. 3.14.13 shows the format of router link packet. Let router is also supposed to know about the network Fig. 3.14.17 shows the fomat for summary link to AS
us discuss its various
defining the metric for the default service. boundary router LSA Its primary objective this
fields outside its area. This information is provided by the
6. TOS packet is to define the network to which the AS
OSPF commonheader border routers.
24 bytes Ype4 An area border router receives router link and network boundary router has been attached.
The contents of this field are used for defining the type
Number of advertisements those in the
LSA
general header
of service. link advertisements and create a routing table for each The fields in this format are same as
20 bytes Type: 1 area because it is simultaneously active in more than Summary link to the network
advertisement message.
ReservedEBReseved Number of router links
7. Metric
LinkID one areas.
OSPF common header
Link data The contents of this field are used for defining the 3.14.16 shows the format of the summary link to
Repeated Fig. 24 byias :4
Link type#of TOS Metriofor TOS 0 metric for corresponding TOS. network LSA. Number of advertisements
TOS Reserved Metric
LSA general header
Repeated 3.14.12 Network Link LSA:
OSPF common header Type 4
24 bytes ype:4 20bytes
(G-2120) Fig. 3.14.13 : Format of router link LSA Number of advertisements All 0s
The links of a netwok are defined by a network link
1. Link ID: LSA. A designated router distributes this type of LSA LSAgeneral header Repeated TOS Metric
packets on behalf of the transient network. This packet
20bylesType 3
The contents of this field are dependent on the type of Network mask AS
is used for announcement of existence of all the routers (G-2124) Fig. 3.14.17: Summary link to
link. Different link identifications on the basis of link
to the network as shown in Fig. 3.14.14. Repeated TOS Metnc boundary router LSA
type are as shown in Table 3.14.2.
network<LSA
23) Fig. 3.14.16: Format of summary link to TechKaeouledg
Pudicatio
TechKneuwledge
PubiiCatlons
ACN (Comp. /Sem. 5/MSBTE) 3-32 EACN (Comp./Sem. BTE)
Unicast &Multicast Routing Protocoi 3-33
3.14.15 External
Link LSA: They are as follows
ocols Function/Feature RIPV1 PN2 OSPF 3.15.1
Unicast &Multicast Routing Protocols
Update policy Route table |Route table Types of Autonomous Systems:
We have seen how the previous advertisement makes 1. Hello message.
every every
|Link-state We have already discussed about autonomous systems.
each router to know about the route to an AS boundary Database description message. 30 seconds |30 seconds changes, or Now let discuss about their types.
router.
Link state acknowledgement message.
every 30 us
But only this much information
minutes he three categories of autonomous systems are as
a router inside an AS

is not sufficient because


4 Link state request message. Update address
Broadcast Broadcast, |Multicast follows
would also liketo know about the
1. Hello: Used to discover and maintain neighbours. mufticast Stub.AS
networks available outside the AS.
2. Database Description: Used to form
adjacencies
Dead interval
300 300 300
2. Multihomed AS 3. Transit AS.
This information is provided by the external link he |seconds
router summarizes all its link state advertisements
and
seconds seconds 1. Stub AS:
advertisenment. The cost of each network outside the AS
passes this information, via database description total total total, but
is made available (flooded) by the AS boundary router A stub AS is that type of AS which has only one
inside that AS, with the help ofa routing table created
packets to the router with which it is forming an usualy connection to another AS. The hosts in the AS can
adjacency. much less
by an inter domain routing protocol. send and receive data traffic to the hosts
No Yes |Yes
Link State Request: After the database description Supports
belonging to other AS.
This is accomplished by announcing one single network authentication
packets have been exchanged with a neighbour, the
But note that data traffic cannot pass through a
through an advertisement. A separate announcement is time
Variable riable
made for each network.
router may think that link state advertisements it Convergence Media stub AS. In other words the stub traffic can be
requires to update or compiete the topological (based on based on delay+ either a source or sink.
Fig. 3.14.18 shows the format of external link LSA. This number of number of dead
database. Link state request packets are sent to the
format is very similar to the summary link to the AS neighbour in order to request for these link state
routersX routers X interval 2. Multihomed AS
boundary router LSAbutthere are two additional fields. advertisements.
|dead dead An AS which has more than one connection to
interval) Interval) other ASs is known as multihomed AS. But it is
OSPF common header 4. Link State Update : It is used for transmission of link
24
bytes ype state advertisements between routers. This could be in Variable-length
No Yes TES interestingto note that a multihomed AS is still
Number of advertisements only a source or sink for data trafic.
response toa link state request packet or to flood a new subnets
LSA general header No Yes Yes For a host in multihomed AS, it is possible to send
20 bytesTYpe:5 or more recent link state advertisement. Supports and receive data traffic to from more than one AS.
Network mask Link State Acknowledgment: It is used to make the Supernetting
of Senvice No But it does not allow the transient traffic.
TOS Metric flooding of link state advertisements reliable. Each link Type No Yes
That means, the multihomed AS does not ailow the
Repeated3 Forwarding address state advertisement received is explicitly acknowledged. (TOS) data traffic coming from one AS to just pass
External route tag Muitipath uting No No Yes through to the other AS.
3.14.17 Encapsulation: 15 hops
(G-2125) Fig. 3.14.18: External link LSA
Network diameter hops S5535
3. Transit AS:
These two additional fields are as follows: The IP datagram acts as a carrier for the OSPF packet. possible
An AS which is a multihomed AS but also allows
1. Forwarding address:
That means the OSPF packet is encapsulated in the IP Easy to use
Yes Yes No the transient data traffñic is called as transit AS.
datagram.
The contets of this field define the address of a
forwarding router which is defined by the AS boundary
An OSPF packet carrier with it the acknowledgement 3.15 BorderGateway Protocol(BGP): 3.15.2 CIDR:
mechanism for flow and error controls. Thus oSPF does
BGP is an exterior routing protocol. It is a unicast A Classless interdomain addressing is used in BGP. That
router. This forwarding router may prove to be a better
not need a transport layer protocol for provision of means BGP makes use of the prefix (As discussed
interautonomous
forwarding destination. these services. routing protocol. t is used for the
earlier) for defining a destination address.
2. External route tag : system routing i.e. routing among diferent ASs.
3.14.18 Comparison between RIP and OSPF It was introduced in 1989 and has four versions. BGP 3.15.3 Path Attributes:
This field contents used by other
are protocols except
place the basis of the routing The path for a destination address can be presented
as
OSPF. Function/Feature RIPv1 AIPv2 oSPF operation takes on
each
method called path vector routing. alist of attributes. We get some information from
3.14.16 Other Packets Standard number RFC 1058 RFC 1723 RFC 2178 attribute about the path.
distance vector
Link-state protocolNo his principle is used because the
There are four other packet types in OSPF. They are
Yes No to be mucn The receiving router takes the help of this list of
TOuting and link state routing do not prove
essential for the operation of the
|Large ange
of Hop count Hop count Yes, based attributes for making a better decision when applying
protocol even though Suitable for interautonomous system routing.
they are not used as LSAs
metrics (16-Infinity(16-Infinity) on 1-65535 its policie.
TechKneuledgë
uOC tions
Techknowledge
PUDICàtions
ACN (Cormp. /9em, 6/MSBTE) 3-34 (COrnfp,15sn,
5/M3E
Unicast &Multicast Hauting Protoc 7 ACN
3.15.4 Types of Attributes: Markor:
Unicast& Misticaet Routing Prokocols
We can use the E-BaP s6551on 0r
changlrig bit field, It contains an he routers receives either a keepalive or update
There ore two categories of attributes:
Information between two nodes which are present
two different ASs. This is as shown in Flg. 3.16.1.
n This is
a
t the

32
message receiver cani predict, authertication value esage from the other. if a router does not receive any
. A will known
2.
attribute EBGP 0aslon -e***- I-BaP sassdon
o these nessages during the hold time, thern the other
fouter is corvidered to be dead.
An optional attribute. Longth
a 16 hbit field
6 which indicates the total
Every BGP router must recognize the well known
This is
themessage bytes. The välue of the lenigth field lengthrmust of4. BGP ldertifler
4096.
attribute whereas the optlonal attrlbute is the one - be
between
19 and
The content of this 4-byte long field definer the router
which need not be recognlzed by every router. which has sent the open message.
The well known attributes are further classified Into two AS AG-2 TypeType is an 8-bit field which specifies the message type 5. Option length
types namely mandatory and discretionary. (G-2126) Fig. 3.16.1: E-BGP and 1-BGP sesslons one
of the followi This one byte field is used for defining the length of the
as
We define the well known mandatory attribute as the In Fig. 3.16.1, the session (connection) shown between Open Update total option parameters. The value of this fieid is zero if
one whlch must appear in the description of router. AS and AS, is E-BGP session. It is shown by a bold line, there are no option parameters.
Notification
Keep-alive
The two speaker routers Aj and B will exchange all the
On the other hand a well known discretionary attribute
information which is known to them over the E-BGP 3.16.4 Open Message
option parametere:
con be defined as the one which must be recognized by
This is a variable length field which contains the option
6ach router, but it nced not be included in every update session. 25sage is used by a router running BGP to create
This n parameters. The nonzero value of option parameter
But these routers collect information from the other a neighbourhoc relationship. To do so the router
message. length field is an indication that there are some option
routers belonging to their own A.S. using the l-BGP ens a TCP connection with a neighbor router and
We can also subdivide the optional attributes into two parameters. Authentication is the only option
sessions shown by dotted lines in Fig. 3.16.1. an open message to it.
categories as: transitive and nontransitive optional sends parameter defined so far.
the neighbor router is interested then it responds by
attributes. 3.16.2 Types of Messages:
We may define the optional transitive attribute as the BGP uses four different types of messages, as shown in
sending keepalive message which is indication3.16.5 The Update Message
a
that the relationship between these two neighbor
an :
* Ihis Is the most important message in BGP. This
one which should be passed to next router that has not Fig. 3.16.2. routers has
been established.
the routers for the following fwo
implemented this attribute. BGP messages message is used by
Format:
purposes
Similerly an optional nontransitive attribute is defined
1.0pon 2.Updato 3.Keep allvo 4.Notlflcation
Fig. 3.16.4 shows the tormat of the open message. 1. In order to withdraw a previously advertised
as the one which must be discarded if the receiving meseago meseago mes9age messago
Common header destination.
router has not implemented it. (G-508) Fig. 3.16.2: BGP message types
19 bytes Type In order to announce a route to a new
Verslon destination.
3.16 BGP Sessions: 3.16.3 Packet Format: My autonomous system Holdtime
- The BGP can withdraw more than one previously
BGP Identfier
In a BGP session, the two routers using BGP exchange All BGP message types use the basic packet header advertised destinations but in a single update message,
routing information between them. So define a
we can
Open, update, and notification messages have Option length it can advertise only one new destination.
session as connection which has been established additional fields, but keep-alive messages use only the Oplion
(Variablelength) Fig.3.16.5 shows the format for the update message.
between two BGP routers in order to exchange the basic packet header. Common header
routing information. (G-2128) Fig. 3.16.4: Format of open message 19 bytes Type 2
Fig. 3.16.3 illustrates the fields used in the BGP header. Unfeaslble route lengh
are as follows:
In order to ensure a reliable session the BGP uses
Each BGP packet contains a header whose primary The important fields of the open message
services of TCP. Unfeaslble route length
purpose is to identify the function of the packet in 1. Version:
Withdraw routes
The speciality of such a connection that it lasts for a
question. The contents of this 1-byte long field define the version (Vaiablelength)
longer time until something unusual happens. 32 blts-
of BGP. The current version of BGP is 4. | Path aftributeslengin
Therefore the BGP sessions are called as the
Pathattributes
semipermanent connections. Marker 2. My autonomous system (Variable length)
to
he contents of this 2-byte (16 bit) field are used
3.16.1 External and Internal BGP: |Length (16 bits)Type 8 bit Network layer reachabilty Information
define the autonomous system number. Varable lengtn)
There are two types of BGP sessions as follows: (G-2127) Fig. 3.16.3 : BGP packet header format 3. Hold time
. External BGP (E-6GP) session. of update message
Different important fields in the BGP packet header are field specify the maximum
(G-2129) Fig. 3.16.5: Format
ne contents of this 2-byte
2. Internal BGP (1-BGP) session. as follows elapse until
one
of
seconds that can TechKneule
o u n t of time in
Techknouledge
PubTC ation
ACN o P O n ,5/MSBTE)
E)
ACN (Comp. /Sem. 5/MSBTE) 3-36 Unicast &Multicastouting Protocol Table 3.16.1: Information recelved by F
3-3 Unicast &Multicast Routing ProtoeOS
The important fields in the update message are as follows 2. Error s u b c o d e : The contents of this I-byte fielda ne responsibility of router R is to forward the packet
from
neighbours about D
are
used to further define the type of error in each catea oniy through interface 2, the responsibility of router R
L Unfeasible route length: This 2-byte long field is used
Error data: The contents of this field can be used
tegory. Neighbour ntormation S to forward the packet only through interface2.
for defining the length of the next field. for I use path BCD to reach D.
more diagnostic information about the error. Atter arrival of packet at f, the responsibility of the
2. Withdrawn routes : The contents of this variable length giving I use path GGD to reach D.
network is to deliver the packet to destination host. The
field gives the list of all the previously advertised routes 3.16.8 Encapsulation: use patn FGD to reach D. network broadcasts it to all hosts or Ethernet switch wil
which should be deleted.
BGP messages are encapsulated in 1CP segments
E use path EFdCD to reach D. deliver it to the destination host
3. Path attribute length: The contents ofthis 2-byte long9 by
using the well known port 179. The error control a
these routes,
field defines the length of the next field. therefore not needed.
and Looking
at
routerF immediately
rctands that, the routes IFGD and EFGCD are
flow control are
unders Source
ost
Path attributes: The contents of this field are used for through F
After opening a TCP connection, the update, keepalive because they pass itself.
useless
of the path (route) whose
defining the attributes and notification messages are exchanged until decides to choOse FBCD path as a new route. This
Where
reachability is announced in this update message. So it 5vitch
notification message is sent the count-tO-Infinity
problem -Ehemet switch
avoids
Network layer reachability information: The contents
of this variable length field, are used for defining the 3.16.9 How does BGP Solve the Count to 7 Multicast Routing Protocols: -Unicast router
Infinity Problem ? -Pointo-point
network which is actually advertised in this update to this section we are going to discuss multicasting and WAN
message. BGP4 supports classless addressing and CIDR. The BGP is basicallya distance vector protocol. But it is multicasting protocols.
most other protocols such can be unicast, muiticast or broadcast.
3.16.6 Keepalive Message: very much different from the A message
s RIP. Here is
The keepalive messages are regularly exchanged by all Introduction:
desttnatton
Instead of maintaining just the cost of each destination, host
the routers running the BGP protocol, to tell each other we have already discussed in the previous sections that,
that they are alive. each BGP router keeps track of the path used.
in the datagram forwarding
a datagram by a router is
(G-2235) Fig. 3.17.1: Concept of unicasting9
the prefix of the destination
The format of keepalive message is as
shown in Similarly instead of periodically giving each neighbour
describes the network to which destination host is
address which 3.17.2 Multicasting
Fig. 3.16.66 which shows that it consists of only the
its estimated cost to each possible destination, each
the communication takes
common header. BGP router tells its neighbour the exact path that it is connected. In the following section we will define - n multicast communication,
unicasting, multicasting and broadcasting t o place between one source and a group of destinations
Common header is
using Le. the to destination relationship
19bytes Type3 understand the forwarding principle. source
and Table 3.16.1
Fig. 3.16.8 shows a set of BGP routers one-to-many.
3.17.1 Unicasting: address but the
shows the information that router F receives from its The type of source address is unicast
(G-2130) Fig. 3.16.6: Format of keepalive message the takes address that
type of destination address is a group
communication
neighbours about "D" In the unicast communication,
between source and one destination. That deñinesone or more destinations.
The group address
3.16.7 Notification Message: BGP can solve the count to infinity problem easily. This place one
means the relation between source and destination is
actually identifies all the members of a group.
A router sends the notification message whenever it can be explained as follows: Suppose that the router G
one-to-one. router receives a packet, it will forward the
When a
detects an error condition or when a router wants to in Fig. 3.16.8 crashes, or if the line FG becomes faulty, more
IP datagram, both the source and destination
copies of packet to all the destinations through
In the
terminate the connection. then router F receives routes from the remaining three shown in Fig. 3.17.2.
are the unicast addresses assigned to the than one of its interfaces, as
addresses interface
Fig. 3.16.7 shows the format of the keepalive message. neighbours i.e. B, I and E. Router R sends the datagram through
hosts.
Common header router receives a pacKet it and 4.
19 bytes In unicasting when a
Type of its interfaces. sends the datagram via both its interfaces 1
Error code forwards the packet through only one Router Ra
is atleast one member is
his interface is the one corresponding to the optimum and 2. As Ra knows that there
Error subcode in the area
interested which belongs to this group
the
The router may discard the packet i
Error data path.
reached by 1 and 2.
interfaces
(Variablelength) destination can not be found.
interface 2. R1
of the datagram through
the concept of unicasting. Delivery
sends
Fig. 3.17.1 shows
Router
R in receiving
G-2131) Fig. 3.16.7: Notification message a destination that there is no member interested
unicast packet from a source computer to knows
(G-512) Fig. 3.16.8: A set ofBGP router in area reached
to the group
The notification message has the following important fields shown in Fig. 3.17.1. datagram which belongs
computer is as
As shown in Table 3.16.1, these routes are BCD, IFGCD is by interface 1.
Error code : The contents of this 1-byte field are used and destination computer
In Fig. 3.17.1, P is a source
and EFGCD.
for defining the category of error.
attached to Ethernet switch F. Tecknemledge
ations
Techknouledge
PUDTTc3tions
5/MSBTE)
ACN (Comp. /sem. 3-38
ACN (Comp. /Sem. 5/MSBTE) 3-38 Unicast &Multicast Routing Protocol Unicast &Multicast Routing Protocols
Emulation of Multicasting with
3.17.4 Multiple Unicasting Versus 3.17.5 Unicasting: 3.19 MOSPF:
Source.
host Multicasting: The long form of MOSPF is Multicast Open Shortest
eicasting can be emulated with unicasting, then Path First and it is extension of the OSPF protocol.
Fig. 3.17.3 shows the concept of multiple unicasting and
Ethemet Where -Ethernot shere is separate mechanism for
SWitch wn multicasting, his protocol needs a link state update packet to
Muticast
multicasting. wing are tne edsons ror
fo.
separate mechanisnm
new
associate the unicast address of a host with group
router
- - - - - Point-to-point
Multiple unicasting: multicasting
address or addresses that are sponsored by the host.
WAN In this, many packets starts from the source. If there
re
In multiple unicasting. there is relative delay Such a packet is called as group membership LSA.
four destinations, the source sends four packets. Each
betwee
packets which are generated by the
source. If there are 100 destinations there Thus only the hosts which belong to a particular group
packet is having different unicast destination address, between the first and last packet which is are included in the tree. All these hosts are included
delay
It is important to note that, between two routers there unacceptable. In multicasting, as only one packet with their unicast
is generated by the source there is no delay.
addresses
can be several copies travelling. calculates the
In order toimprove efficiency, the router
No Atleast No No At least A l6ast is e-ma If a person Efficiency of multicasting is more than efficiency shortest path trees when it receives a multicast packet.
Example of multiple unicasting .
member
one member member
member
one member
member
Ono
want to send an e-mail to a group of people, the e-mail
of multiple unicasting. From Fig. 3.17.3 it is clear
MOSPF is a data driven protocol. It uses the Dijkstra
that, as compared to multiple unicasting,
(G-2236) Fig. 3.17.2: Concept of multicasting application software generates copies of the messages,
multicasting requires less bandwidth. In mutiple shortest path algorithm to obtain its shortest path tree.
each having a different destination address and one by
unicasting, some of the links should handle many
3.17.3 Broadcasting one message is sent to each person.
3.20 Multicast Distance Vector:
copies.
In broadcast communication the source to destination DVMRP:
3.17.6 Applications of Multicasting
Multicasting
relationship is of one-to-all type. That means there is The unicast distance vector routing is simple
but
starts from the source and
In multicasting, single packet does
only one source host and all other host act routing is complicated. It
as
the applications of multicasting are as follows: multicast distance vector
is duplicated by the routers. For
all replicas, the Some of tables to the
destinations. not allow a router to send its routing
destination address in each packet is same. It is order to gain access to distributed databases.
In
On Internet the broadcasting does not take place due 1. neighbouring routers.
between any t o routers only
important to note that, information dissemination
to construct their
own
the huge of traffic it would create and the For these routers have
to amount 2. . Instead
-
one copy of the packet travels. the information
corresponding bandwidth requirement. Dissemination of news.
routing tables from scratch by using
3.
from the unicast distance vector tabBes.
So as to have teleconferencing
4. data
Multicast distance vector routing makes use of the
5. To help distance learning does not
Source based trees however the router actually
Source
routing table.
Intradomain Routing Protocols:
prepare a
3.18 path tree is
evanescent.
So we can say that the shortest
the table
muticast new routing After its use ie. when the packet is forwarded,
During the recent past many
Some of them have is destroyed.
protocols have been designed. can achieve this
their unicast counter pats The multicast distance vector algorithm
been obtained by extending
four decision making
process based
on
while some are totally new. by using a
are as follows
the classification of intradomain strategies. They
Fig. 3.18.1 shows
1. Flooding
outing protocols.
2. Reverse path forwarding
Intradoman
POLDcOS Reverse path broadcasting
GM4 3.
UD1 UD2 UD3 UD4 GM1 GM2 GM3
4. Reverse path multicasting.
Group-Shared
(b): Multicasting
(a): Multiple unlcasting Source-based
ree
Flooding
Where Unicast router packet, without looking
When a router receives a
sends the=
DVMRP MOSPF the destination group address it
Multicast router PIM-SM
at
interface except
the one
fro
UD Unicast destination PIM-DM packet to every
been received.
GM Group member which the packet has
routing protocoBs Techknefa
(G-518(a)) Fig. 3.18.1: Multicast Pubilcatlor
(G-2237) Fig. 3.17.3: Multiple unicasting versus multicasting
ACN (Comp. /Sem. ousting ProAt
Unicat & ialticatt Routirig Prr (Cornp sen 5SETE)
5MSBTE) 3-40 ACN
41 Vcast Muticast Routing ProtocoiS
Ther duphcatiori taxes paa
DeCAU a tree
tas4.
Ut t s is not
multrasting this ts b0Bd¢asting nt been made, instead of a tree we hare a
Pverve Path Muticastng inr"}
Fn h x e reed a RP rcadcasts t e pa&ets
Afotther poblem is that it gves r1se to iooping Net.
has two parer Osters P, ard
mict e n Tresnct a7 eioent way
protbiems That means the sarne packet may teturn minate uch dupicatir. we rriaut detire cr g The ecierey 2 r te increased y ensuring
o the serme routet fron some other iniertace and parent router to each retwcrk. A r e t a t ha he m i a p r k s reacn enhy tose retwGS
one
st receive a multicast patvet fren anty w e
hay get forwarded agai stive memees
wic hve t e that particular
grup
through the designated parent roter T R e v e r e Pan Miticasting (RPM).
Some iooding protocos avoid ioogs by keep1ng a Deparure
earture needs to be implermen
restiction Path Muiticasting (RPM):
COy * the pecket for sometime and by iscarding
Thus for each
source. the router
y daphvc.ates DepertuFe end re pas r d e r te s n e n ve b r s a t i r g astng the
only out o1 those interace for hich the
ths probiem can be corected by using the next design.
nated parent. Thas poiy s Caled reverse pat
(a) Pranumg anc 2 rng
tategy e reverse path forwarding (RP) adcasting (RPE), Ihe RPE enure that the
Tre
2. Reverne Path Forwarding (RPF) packet reaches every network and that ever czrcect c# rarg re Fatrg r
<rgrstad
network receives oniy one copy of each packet
24
R
modfed fiooxding zvoids iooping by
Pruning
o r d n g on'y o e copy and dropping all others Noit of RPF a n d RPB
Comparison
hoed
in R , a router forwards the copy that has pan >ofer Fig. 3.20.3 which demonstrates the diference
e rrility*cdg e membersh-P
traveied the shortest path from the source to the RPF and RPB.
between
rOuter. Ta ind the pecwet has traveiiea he Tre procs a s n n s r c o m e c t e to a
The question is now to determine the designated
ortest path, R uses the uncast routing tabie ot
parent router ? The answer s that the router witn
R , N c t e that the uhicast rosting ta0e is Dasea shortest path t he soure can be the designated
(6)
m the destineton aðdress and iot the source
(G-519) Fig. 3.20.1: Reverse path forwarding parent router
OEs heretore RP understands the
In RPB, routers send update packets to each Gter on
etination aadress zs the source address 3. Reverse Path Broadcasting (RPB):
basiS. hey can find out whcn
the periodic
Retai that s OVRP tabie RPF guarantees that each network would receive a
grves the router departure copy neighbouring router nas the shortest path to the
srformation seaificaily, the shortest path to thhe of the multicast packet without formation of loops. But.
Otinaton in DVEMP, the router reverses the RPF does not guarantee that each network would
source.
ersezm roterz
m sns
a prre nssage
be the parent route
If more than one routers qualiy to
roies of the dest1nation and the source. The router receive onty one coPy of the intended packet i.e. a then the router with smallest IP address is selected
u s the source adoress of the packet (which is a network may receive two or more copies of the same irafing:
unucast packet. The reason is that forwarding is not based on
adaress) to fnd the corespondin9
the destination address (a group address); instead it is ea router
departng nterface tn the rosting tabie (2s if it
based on the source address.
warits to end a packet to that address).
This problem of RPF has been demonstrated in r e a s tha: one
s a r n g the message t adenly
trhe departing interface found in the table is the
same as the rntertace from which the packet is Fig 3.20.2. In Fi9. 3.20.2 the packet created
by the er 1 Net o e etwcris orretec smeresec r e e v e
o to
Source travels two different paths and hence two e muiticast packe
arning ten d is an aridicetion that the packet has copies RPF Net 3 receives packets
of the same packet reach Net-2. from two routers R and K2
Then he ef router cn sed grat essage t S
traveied he shortest patti. in other words, since the ruter to restart
essage will force e
usam
peth from the router to the sourte is the shortest, Source (a) RPE
sancing the muiticast message
he pat rom the soure to the router will eiso be
i e t i o T E : betaBUe t e e r . i ri aistafice Vec1or
routing (hop tounts) T h e sa et
ere
symmetr
in Fig 3.20 1ta), the packet arrives at irterface 1 of X paths to reach Nel-2
trhe roster from the shortes1 path Hernce this
packet s forwar ded But in Fig 3 20 1b) the packet
RPB R s the parent roiter or N, a d
arriving at interface 2 is not forwarded but it i Pd2reVeD and R, is the parent route fr N
ia RPF
discarded
) RP8
Fig. 3.20.4 {Contd..)
(G-520) Fig. 3.20.2: Problem in RPF 3.20.3 Difference between
RPE and RPS
$21 Fig. eeuied
Terhknewledge
* at*e"*
ACN (Comp. /Sem. 5/MSBTE 3-42 Unicast &Multicast Houting Prot ACN
(Comp. /Sem. 5/MSBTE) 3-43
Unicast &Multicast Routing Protocols
passes through every router located between 1. PIM-DM
en A logical tunnel is established by encapsulating the
ne
sender and rendezVOus router. othA-DM is used
PIM-D
in an
environment where there multicast packet inside a unicast packet. The only
is a
that each will
possibility router be
doing protocol that suppots MBONE and tunnelling s
R, is parent not be multicasting. This is called as dense mode.
router for Net-3
DVMRP.
Member DIM-DM is generally used for applications
Suchas
NotNotNot Member
ANs. This is a source Dased tree routing protocol.
It uses RPF and pruning and grafting strategies for
Review auestions
(b) RPB
a.1 Write short
multicasting.
notes on : Hierarchical routing.
Member Member Member
It works on the basSis of the assumption that the Q.2 Write short notes on : Multicast routing.
-523) Fig. 3.21.1: Group shared tree with rendezvous router
The interfaces autonomous system i5 uSing a unicast protocol and .3 What is unicast routing ?
to Net 2 and 3 All these intermediate routers will extract the necessan
have been sary that each router can find an optimum path to theQ.4 What is multicast routing ?
pruned as these information from the joining message sent by eac
eacn
nets are not
sender.
destination at each router intertace (using the
Q. 5 Explain IGMP.
interested in Pruned router table).
receiving The tree is formed when the rendezvous router receives a.6 What is transparency in mobile IP 7
multicast
route The unicast protocol can be RIP or OSPF.
the join messages from all the senders. ie. members of Q.7 Write short note Network layer congestion.
packets
NotD Nt Net groups.
PIM-DM uses RP and pruning and grafting a.8
on :
State the difference between multiple unicasting ana
(c)RPM after pruning If a router wants to leave the group then it has to send strategies to handle multicasting.
multicasting.
leave message to its upstream router. Fig. 3.211 PIM-SM Q.9 Explain the concept of multicast address.
shows the group shared tree alongwith the rendezvous
This protocol is used when the probability of each . 10 Explain DVMRP.
router router being involved in multicasting is very
less.| Q. 11 Define the following:
R Sending Multicast Packets: his mode of operation is known as sparse mode. 1. Intradomain routing.
Grafted hetoroute
R
from
Net-2 has
Once the tree is formed, any source that is belonging to In this working environment the broadcasting 2. Interdomain routing.
route Deen grafted the group or an outsider can send packets to all the not be used. Instead
protocol can a protocol likKeQ.12 Explain the following terms
Net D Net Net3) members of the groupP. CBT is preferable.
1. Unicast routing
d) RPM after grafting To do so, it sends the packet to the rendezvous router
PIM-SM is a group-shared three routing protocol. 2. Broadcast routing and
using the unicast address of that router
It has rendezvous point (RP) at the source of the
(G-522) Fig. 3.20.4: Concept of pruning and grafting The rendezvous router then distributes the packet to all
3. Multicast routing
tree.
the members of the group. Q. 13 State the optimaity principle.
One of the important characteristics of PIM-SM is
3.21 Core Based Tree (CBT) Protocol: Selection of Rendezvous Router: that it can switch from a group shared tree strategy
Q.14 What is the difference between static and dynamic
routing algorithms ?
The CBT isa group shared protocol. It uses the core as The selection of rendezvous router to optimize the to a source based tree strategy as and when
Q. 15 Explain distance vector routing algorithm.
root of the tree. The autonomous system is divided into process and multicasting is not a simple process. necessary.
DVR?
different regions and a core router or rendezvous router I-SM Is similar to CBT but it uses simpler.16 What is loopingin
3.22 PIM (Protocol Independent
is selected for each region. procedure. a. 17 Write a short note on :
Countto infinity problem.
Multicast): a. 18 Explain the link state routing algorithm.
Formation of the tree:
This is the name given to two independent multicast 3.23 MBONE (Muticast Backbone): Q. 19 Compare DVA and LSR.
The first step is to select the rendezvous point. After routing protocols :
e need of multicasting has increased in internet due.20 Explain the Bellman. Ford algorithm.
that the unicast address of the selected router is L. Protocol Independent Multicast Desne Mode Q. 21 What is PVR ?
to multimedia and real time communication.
informed to all the routers. (PIM-DM) and updating the RIP algorithm.
But a
very small number of internet routers areQ.22 Explain
Every router then sends a unicast join message (which 2. Protocol Independent Multicast, Sparse Mmode format.
muiticast routers. Therefore tunnelling is used toQ. 23 Describe the RIP message
shows that it wants to join the group). This message (PIM-SM).
overcome this problem.
Both of them are unicast protocol dependent.
TechKnmledge
Pub1lcations
Tech Knouledge
ODTC3tions
ACN (Comp. /Sem. 3-44 Unicast &Multicast Routinn
5/MSBTE)
Q. 24 How does BGP solve the count to
What is OSPF ? Is it
intradomain or interaomain Q.29 infinit
nity protlerm
protocol ? State the names of three intradoma.
Q. 30 in rouir
Q.25 State disadvantages of RIP. How are they overcome protocols.
forms of:
using OSPF? Q. 31 State long
a. 26 State and 1. MOSPF
explain important features of OSPF (any
four). 2. DVMRP
Q. 27 Compare RIP and OSPF. 3. CBT and PIM.
3.
Q. 28 What is BGP ? Explain its packet format.
Transport
Layer
P r o to c o ls

Chapter Contents
4.1 Introduction
4.13 Windows in TCP
4.2 Tra nsp ort Layer Duties and Functio
nalities 4.14 Flow Control in TCP
4.3 Use r Datagram Protocol (UDP)
4.15 Network Layer Congestion
4.4 UDP Services
4.16 TCP Congestion Control
4 .5 UDP Applications
4.17 TCP Timer Management
4.6 UD P Features
4.18 Options
4.7 Tra nsm issi on Control Protocol (TC
P) 4.19 Comparison of UDP and TCP
4.8 TCP Ser vice s 4.20 Stream Control Transmission
Protocol (SCTP}
4.9 Fea ture s of TCP 4.21 SCTP Setvices
4.10 The TCP Protocol 4.22 SCTP Features
4:11 A TCP Con nec tion 4.23 Packet Format
4.12 TCP Con nec tion Est ablishment
Modeling
V
. ~ /Sern . 5/MSBTE) Transport layer protocols
ACN (Comp. /Sem. 5/MSBTE) 4-2 Transport layer Pr
I
o~8 1f__ p.CN (CornP• 4.3
ntrol and QoS : . . . ferred choice
4.1 Introduction : maximum size that can be handled by the lo e5t1on co Although UDP isn't reliable, it is st11 1 a pre
layer protocols. Wer co 11 g congestion can ta ke P1ace •in the data link, network for many applications. It is use
d ·
in
real-time
.
The transport layer is the core of the Internet model. The h . ·f
1 d ta 1s
Hence the messages must be divided into sm transport layer. But t e effect of congestion is applications like Net audio and video where, a
The application layer programs interact with each other . . . afler
sections. Each small section 1s then encapsul o~nerallY evident in the transport layer. lost, it's better to do without it than send it again out of
using the services of the transport layer. ated
into a separate packet.
~uality of Service (QoS) can be implemented in other sequence. It is also used by protocols like the Simple
Transport layer provides services ..to the application Then .a header is added to each packet to allow th but its actual effect is felt in the transport layer Network Management Protocol (SNMP).
layer and takes services from the network layer. transport layer to perform its other functions. e 1aye rs ·
d b h
Fig. 4.1.l shows the position of the transport layer in The trans Port layer enhances the QoS provid e Y t e Relatlonehlp with other protocols :
2. Connection control :
the 5-layer internet model. The transport layer is fourth network layer.
The relationship of UDP with the other protocols and
Transport layer protocols are divided into two
layer in this model. It connects the lower three layers to layers of TCP/IP suite is as shown in Fig. 4.3.1. As shown,
categories : user Datagram Protocol (UDP) :
upper three layers of an OSI layer.
1. Connection oriented. 9-- UDP is located between IP and application layer. It
__ __
Layer- 5 AppllcaUon layer
The user Datagram Protocol is a very simple protocol. It therefore works as an intermediary between application
Layer- 4
,..... ...._ +....,
-- serv~:~~~~~a:;;,::;:e,:yer 2. Connectionless.
adds little to the basic functionality of IP. like IP, it is an program and the network" layer.
Transport /aye, Connection oriented delivery : unreliable, connectionless protocol. SMTP, FTP, DNS, .......... DHCP Applloatlon layer
Transport layer takes
- _ . . , services from the network layer
,__ _.,.__ A connection oriented transport layer protocol You do not need to establish a connection with a host ·s, , SCTP, TCP, UDP Transport layer
Layer- 3 Network layer IP, ARP, IGMP, ICMP Network layer
establishes a connection i.e. virtual path between before exchanging data with it using UDP, and there is
(G-592) Fig. 4.1.l : Position of transport layer sender and receiver. Underlying LAN Data fink layer
no mechanism for ensuring that data sent is received. or
4.2 This is a virtual connection. The packet may travel out of WAN technology Physical layer
Transport Layer Duties and A unit of data sent using UDP is called a Datagram. UDP
Functionalities : order. The packets are numbered consecutively and
adds four 16-bit header fields (8 bytes) to whatever (G-2019) Fig. 4.3.l: Relation between UDP and
communication is bi directional.
data is sent. other protocols
Transport layer is meant for the process to process
Connectionless delivery ·:
~
delivery and it is achieved by performing a number of These fields are : a length field, a checksum field, and 4.3.1 Responsibilities of UDP:
functions. A connectionless transport protocol will treat each source and destination port numbers. "Port number", in
packet independently. There is no connection between them. Being a transport layer protocol, the UDP has the
Fig. 4.2.l lists the functions of a transport layer. this context, represents a software port, not a hardware
V Duties of transport layer Each packet can take its own different route. following responsibilities :
port.
l 3. Addressing :
J
1. Packetizing 2. Connection
l r r
3. Addressing 4. Flow 5. Error
The client needs the address of the remote computer it
The concept of port numbers is common to both UDP
and TCP. The po rt numbers identify which protocol

1. To create a process to process communication,


UDP uses port numbers to accomplish this.
control wants to communicate with. Such a remote computer 2. To provide control mechanisms at the transport
control control module sent (or is to receive) the data.
(G-1407) Fig. 4.2.l : Duties of transport layer has· a unique address so that it can be distinguished layer, UDP does not provide flow control or
1. Packetizing : from all the other computers. Most protocols have standard ports that are generally
acknowledgements. It provides error detection.
used for this. For example, the Telnet protocol generally
The transport layer creates packets with the help of 4. Flow and error control : The erroneous packet is discarded.
uses port 23. The Simple Mail Transfer. Protocol (SMTP)
encapsulation on the .messages received from the
For high reliability the flow control and error control 3. UDP does not add anything to the services of IP
application layer. Packetizing is a process of uses port 25. The use of standard port numbers makes
should be incorporated. except for providing process to process
dividing a long message into smaller ones. it possible for clients to communicate with a server
communication.
These packets are then encapsulated into the data Flow control : We know that data link layer can without first having to establish which port to use.
field of the transport /ayer packet. The headers provide the flow control. Similarly transpo rt layer 4.3.2 Advantages of UDP :
The port number and the protocol field in the IP header
containing source and destination address are then also can provide flow control. But this flow control
duplicate each other to some extent, though the
added. is performed end to end and not across a single UDP, despite all its simplicity and powerlessness is still
link. protocol field is not available to the higher-level
used because it offers the following advantages :
The length of the message which is to be divided
protocols. IP uses the protocol field to determine
can vary from several lines (e-mail) to several Error control : The transport layer can provide 1. UDP has minimum overheads.
pages. whether data should be passed to the UDP or TCP
error control as well. But error control at transport
2. UDP can be easily used if the sending process is
layer is performed end to end and not across a module.
But the size of the message can become a not too bothered about reliability.
single link. Error correction is generally achieved by UDP or TCP use the port number to determine which
problem. The message size can be larger than the
retransmission of the packets discarded due to 3. UDP reduces interaction between sender and
application-layer protocol should receive the data.
errors. receiver.
.
y-
.
111·• TechKnt111led9t
PUbl l catlon s
~=-
Y
TecbKnoalad19
Publlc.t\lons;
5/MSBTE) /Sem. 5/MSBTE) tocols
• ACN .!_Comp. /Sem. s (comp.
45 Transport la er pro
4-4 Transport layer Pr ot~ ACN •
fo rm ~ at1·on obtained from the IP a full Int.ernet
ram : ence of any other in · g of ·in form the UDP to pass
4.3.3 User Datag addressed in the abs ~ &
de( co
nsi.stin . .
l as th
would also allow .
. erte d·
o is ins t
ination address) as
wel to send.
not used, a value of zer hea (source and deS
e~ with header to the
IP
-
Protocol (UDP)
provides t numbers datagram complete
User Datagram That means the por , sistency an d
This is a 16 bit field. certain fields for con
connectionless pac
ket service that off
ers unreliable
range from Oto 65,535
. can h der. - The IP would verify
header checksum.
This means that the
arrival of
a client, means if
a client is send·
4 UDP
Pseudo Header : compute the Internet
'best effort ' delivery. t sequencing If the source host is a ephe... 1ng Pro t
packets is not guaran
teed, nor is the correc a request using UD
P, then generally ...,,_I
by the Process
4,3,
i he purpos
.
e of using a pseud
o-h ead er is t 0
.
venfy that OC ol Ap pl/c atio n ·
·
of delivered packets. number is requested
(temporary) port UDP. correct d t· . Th . ernet Name
packet has reached
its es 1nat1on. _ protocol are the Int
ledgement and chosen by the h UDP e maJor uses of. this . . Transfer.
not require an acknow if a serv. , t e a .
tination consists of specific mach·ine Se
rver, and the Trivial File
Applications that do io or video If the source host
is a server that means ihe correct des
a, for example, aud the Well kno~r"'nIS ol port nu b hin that
of receipt of dat P. sending a resispon se message, mostly d a specific protoc m er Wit Pro tocol Number :
broadcasting uses UD port number used. an .
machine. the Internet
ically transmit 8 15 octal) when used in
applications that typ Deetlnatlon Port Nu
mber : 0 31 This is protocol 17 (21
UDP is also used by mple, the Protocol.
a at one time, for exa 16 bit number ' S.our~ Addraa;; J:, '.'~
small amounts of dat MP). t number also is a in hexadecimal
nagement Protocol (SN The destination por cess running on p of a UDP header
Simple Network Ma ber is used by the pro Ex. 4.3.1: The dum
tion programs and this port num t. format is as follows
:
chanism that applica
UDP provides a me grams. UDP the destination hos oo 1D
other application pro ans if a client is ac s2 00 0D oo 2a
use to send data to distinguish t is a server that me
t numbers used to If the destination hos from it :
provides protocol por known · Port Obtain the following
a single to it, then a Well
grams executing on sending a request : UDP Pseudo h111de
r
1. Source port num
ber
between multiple pro st cases. (G-62S) Fig. 4.3.3
device. number is used in mo t number
protocol port 2. Destination por
than means if lf specifies only the
the data sent each UD
P message ation host is a client The UDP header itse Total length
That is, in addition to However if the destin n the chosen ify the destination
, UD P on the 3.
tion port number and
a source its response to i.t, the number. Thus, to ver 4. Length of the dat
a.
contains both a destina a server is sending rt number. putes a checksum tha
t cavers the
the UDP lly an ephemeral po sending machine com
makes it possible for port number is genera pac ket. 5. Packet direction .
port number. This s as well as the UDP
tion to deliver the me
ssage to Length: destination IP addres 6. Name of client pro
eess.
software at the destina the application tination, UDP softwa
re verifies the
the correct applica
tion program, and for defining the At the ultimate des Sol n. :
d which is used for destination IP addres
s obtain ed
program to send a rep
ly. It is also a 16 bit fiel ing header as checksum using the been shown in
UDP datagram includ ried the UDP of UDP header has
s. They have a total length of the the IP packet that car The standard format
led as user datagram define a total from the header of Fig , P. 4.3 .1.
UDP packets are cal mat of user to 16 bit length it can
.of 8-bytes. The for well as data. Due message.
fixed-size header upto 65,535 bytes. I+- 8p yt es -.j
datagram is as shown
in Fig. 4.3 .2. length of the datagram
UDP datagram If the checksum agr
ees, then it must be
true that the
[: 1.,_ ader "t,; I Data J
B bytes :---( the total length of a the intended destina
tion hos t as He
-
- However practically
is because the packet has reached
.3 :H-- ~~<-·.:7•1;
fit Data
J is much smaller than
65,535 bytes. This
be stored in an IP dat
UDP datagram is to 535 bytes.
agram Which
I.
I well as the correct pro
tocol port within tha
t host.
~1 6b it s~ 1e
·.................. .
b1 ts
ation·-:•.;
..::::.__ ··--... itself has a length of
65, Ueer Interface : r- .. ~-.. - ·,. ,.., ' Destin
··· -- ... ·-··· por( .. \;·
Source port is actually not ation of new
should allow the cre
number 16 bits
Destinauon port
num~r 16 bits The length field in
the UDP datagram
this UDP datagram
is actually
A use r interface
e operations on the
receive ports '.ChecksSMv1i
Tota/ length necessary, because receive ports, receiv
ri Checksum IP datagram ication of source
'/, 16 bits IP datagram and the a octets and an ind
16 bits
encapsulated in an d. that return the dat that allows a
#1 e, datagr•m fonn•t has its own length fiel ress, and an operation : UD P header format
port and source add 020) Fig. P. 4.3.1
(G-62•1 Fig. 4.3.2: Us a, source and
(G,2
following four datagram, we t, specifying the dat der in 4 equal
is divided into the length field in UDP datagram to be sen it the given UDP hea
The UDP header So without using the Therefore we can spl
16-bit fields : as follows : addresses to be sent. parts as follows :
of the UDP datagram destinati on ports and
can obtain the length
I l. Source port
3. Total length UDP length = IP len
gth - IP heade r length IP Interface :
j-3-, :r·ooo Loo ~c.___•=.=u. _m
D 2B
Destination port agram to UDP ine the source Source port
2. 4. Checksum. ivering the UDP dat st be able to determ
er : Note that While del The UDP module mu the protocol
number Length
Source Port Numb drops the IP header. ernet addresses and Destination port
/ayer, the IP software and de stination Int number
meaningful, it UDP Checksum : et header.
optional field, when field from the Intern (G,2021)
Source po rt is an cess, and may be the whole
of the sending pro interface would return Source port number
.= (BC82)i 6 ... Ans.
indicates the port a reply should be detect errors) One possible UDP/IP 1.
the port to which the integrity (i.e. to Internet header
assumed to be This is used to verify o including the entire er = (OOOO)i
formed on a "pseud Internet datagram I Destination port numb ...Ans.
The checksum is per an interface 2. 6
of the UDP header. eive operation. Such
in response to a rec
• Tec•Knowl1dgi
V" P uo 11c a11 o n s
------- D T1dll{aqltd91
.P ub 11 c a t1o
n s:
I ~
!
;1
I .ACN(Comp. /Sem. 5/MSBTE)
r
4-6 Transport layer rnP• /Sern. 5/MSBTE)
7 Transport l!l}'_er e_rotocols
3· Total length of UDP packet= (0028),. •Port" ;Protoei91 §i,i~•;~iu~ rfptro'i;·.,;;,• ~ f_ p.CN (Co~an:t:y~e-r-ro_r_u...s~in..gat~he_c_h_e_cl_csu_m_t_h--~4-:!._
",., ':·'.- . detectS • d" d • en that E
= (43) bytes ... Ans. 13 Daytime Return the day and the .,, '· . iar datagram ,s ,scar ed. ncapaulatlon:
10 current I" articu
leng th of data = Total length - Length of the 11118
4· 17 Quote Return the quote of the day. · p ct,ecksUm : - ~efer Fig. 4.4.l(a). The message produced by a process
header. 19 Chargen To return a string of charact 4,4,4 . of checksum f UD . is to be sent with the help of UDP. The process passes
.c..:..--t---"'--t--------=...:..:...::.::::.' .~eers. ,atculat1on or P 1s different h h •
53 Narneserver Domain Name Service (DNs -ri,e IP In UDP the checksum . t an t e message and two socket addresses alongwith the
= 43 - 8 = 35 bytes ... Ans.
=-+==='-'----+---.
67 BOOT PS
----=--=:..:..:::::J~~]).
This ,s the server port t
~ nat for · . is calculated b len th
5. Destination port number is (000D), 6 = (13),o t ·dering the following three sections : Y g of data to UDP.
the boo!strap .information. 0 down, oad conSI A pseudoheader - UDP receives . this data and adds the UDP header to 1t . as
It is a well known port. Hence the direction of UDP
1· The UDP header. shown. This is called as UDP datagram which is passed
packet travel is from client to server. 68 BOOT PC This is the client port lo down,
2. to IP with the socket address.
6. The client process can be obtained from bootstrap information. cad
3- The data corning from the application layer. IP adds its own header to UDP datagram as shown. It
Table 7.7.l which shows that for well known port 69 TFTP Trivial_File _Transport Protocol.
The checksum in UDP i~ _optional. That means the enters value 17 into the protocol field. This is an
number 13, the corresponding client proc.ess is RPC Remote Procedure Call.
111 sender can make a dec1s1on of not calculating the indication that UDP is being used. The IP datagram is
"Daytime·.
123 NTP Network Time Protocol. checksum. If so, then the checksum field is filled with all then passed on to the data link layer.
4.4 UDP Services : SNMP Simple Network zeros before sending the UDP packet.
161 The DLL adds its own header and possibly a trailer to
Management
Protocol. In case if the calculated checksum is all zeros (when the
create a frame and sends it to the physical layer.
In this section we are going to discuss the following sender decides to send checksum) then an all 1
162 SNMP Simple Network
important services provided by the UDP : Management Finally the physical layer converts these bits into
Protocol_(Trap). checksum is sent.
electrical or optical signals and sends them to the
l. Process to process communication. This solution works without any problem because, a
4.4.2 Connectionless Services : destination machine .
2. Connectionless services. checksum will never have an all l value.
Decapaulatlon :
D
3. Flow control. As UDP is a connectionless, unreliable protocol, each Congestion Control :
4.4.5 Refer Fig. 4.4.l(b) for understanding of the
4. Error control. user datagram sent using UDP is an independent
datagram. UDP does not provide any congestion control. It decapsulation process. The encoded message arrives at
5. Checksum. assumes that the UDP packets being small, will not the destination physical layer where it decodes the
Different user datagrams sent by the UDP have
6. Congestion control. create any congestion. electrical/optical signals into bits and passes them to
absolutely no relationship between them. This is true
7. Encapsulation and decapsulation. even for those datagrams which are originating from But this assumption may not always be correct. the DlL
8. Queuing. the same process and being sent to the same The Dll checks the data using header and trailer. The
4.4.6 Encapsulation and Decapsulatlon :
9. Multiplexing and demultiplexing. destination. The user datagrams do not have any header and trailer are discarded if no errors are found,
number. The UDP encapsulates and decapsulates messages in an and the datagram is passed to IP.
4.4.1 Process to Process Communication : Also the connection establishment and release are not IP datagram in order to exchange the message between The IP carries out its checking to find the errors and if
at all required. So each datagram is free to travel any two communicating processes. none are found, the datagram is passed on · to UDP,
We have already discussed the process to process
path. after dropping the IP header.
communication in a general sense, earlier in this This is as shown in Fig. 4.4.1. We will discuss the two
chapter. Only those processes which are sending very short The datagram from IP to UDP also contains the sender
processes separately.
messages can successfully use the UDP.
UDP also does it with the help of sockets which is a Sending process Receiver p!OCOSS and receiver IP addresses. This entire user datagram is
4.4.3 Flow and Error Control : checked by the UDP with the help of checksum.
combination of IP · address and port numbers.
Message + 2
Table 4.4.1 shows different port numbers used by UDP. socket addresses If there is no error detected, then the UDP header is
Being a connectionless protocol, UDP is a simple, + data length
dropped and the application data plus senders socket
Some of these ports can be. used by UDP as well as TCP. unreliable protocol. It does not provide any flow address are handed over to the process.
Table 4.4.l : Well known ports used with UDP control,. hence the receiver can overflow with incoming
The process can use this senders socket address if it
messages.
wants to respond to the message received.
... ....
UDP does not . support any other error control
mechanism, except for the checksum. 4.4.7 Queuing :
There are no acknowledgements sent from destination
Any received datagram is discarded. The queues in UDP are related with ports as shown in
to sender. Hence the sender does not know if the
Fig. 4.4.2.
message has reached, lost or duplicated. If the receiver (a} Encapsulation (b} oecapsulatlon
(G-2022) Fig. 4.4.1
'(rttdllH•....
W Ted1Kn..1et1p
. Publ\til\10tlS
"Y' Pul> ll c a tlons
~ :t
Ji\, '(r ACN (Comp, /Som. SIMS8T£)
. ~
r· i!'
;
· .
Day r . .
. ,me .d,ent Day time server
;'i.'.t""•.j
4-8
-
.. Transport layer Prot
.
ocOlg
',
'
1,
'l.
p.CN
, - · 1s,m. 5/MSllTE)
nthe
h d d
UDP adds ea er an passes the packet
<-,
to1p - I
Transport layer protocols
C]
If the incoming queue overflows, then UDP drops the , '(lie own in Fig. 4.4.3. n an application, if we want to send only short
Outgoing
queue<
.
'-.._Incoming
· •
queue out 1n
qu~~.9._;·'
,.
CJ
,,., -,:
.-.• ··• ··,,,-. Incoming
'-:,._ _queue

user datagram and arranges to send the


unavailable message to the client.
When the server wants to send a message to cl'
Port \
or"~
as s\'I
1t1Pie1'
1119 •

. ·n end, the relationshi is
t\'le rece 1111 g P one as to many

messages
th
to server and receive short messages from
e seiver. Then the above mentioned feature becomes
an ad
vantage.
I
Jent it p.t d demultiplexer. · - Th f •
sends that message to the outgoing queue. Th we nee a e eature of being connectionless is an advantage if
50
: messages are then removed one by one after ese tie UDP layer receives datagrams from the IP requeSt and respond each can fit in one single user
• I
adding first t · datagra
the UDP header. They are delivered to .IP.
(G-626) Fig. 4.4.2 : Queues In UDP UD p then checks for errors and · drops the h d
ea er to - Th m.
, ,tie . he messages and delivers them to a . e overhead (number packets to be exchanged)
A process starts at the client site by requesting a port If the outgoing queue overflows then the operati tain t ppropnate requ· d . and
ob ed on the port number. •re to establish close a connection is zero .in
number from the operating system. In some system will ask the server to wait before it send 5 ng proCess bas case Of uDP. This· can be a very important advantage for
the
implementations both incoming and outgoing queues next message. comparison of UDP and Generic some applications.
are created in association with each process.
Multiplexing and Demultiplexing : 4,4, 9 simple Protocol : - Similarly the delay involved with the connectionless
4.4.8
Every process gets only one port number and hence it delivery is very short as compared to that with the
. section we will compare UDP with a • 1 connection oriented delivery. Hence the connectionless
can create one outgoing and another incoming queue. We have discussed the general principle of multiplexing JO thlS s1mp e
tionless transport layer protocol. service provided by UDP is preferred for the
The queues function only when the process is running. and demultiplexing in the transport layer. connec
1: They are destroyed as soon as the process is Ttie only difference between the two is that the UDP applications in which delay is important.
Now let us see how to apply the same principle to UDP.
terminated. 'des an optional checksum. 4.6.2 Lack of Error Control :
Imagine that a host is running a TCP/IP protocol suite prov1
The client process uses the source port number If the checksum is added to the UDP packet then at the
and that there is only one UDP and a number of - UDP is an unreliable protocol which does not provide
mentioned in the request to send message to its destination, the receiving UDP can check the packet for
processes which would like to use the services of UDP. any error control. Now this is actually a disadvantage
outgoing queue. anY error with the help of the checksum.
but it becomes an advantage for some applications as
UDP removes the queue messages one by one by UDP handles such a situation by using the principle of
If any error is detected, the receiving UDP will discard explained below.
adding the UDP header and delivers them to IP. multiplexing and demultiplexing as shown in that packet, without sending any feedback to the
- If TCP is used for reliable service and if a packet is lost,
If the outgoing queue overflows, then operating system Fig. 4.4.3.
sender. then TCP will resend it. So the receiver transport layer is
tells that client process to wait before sending the next Processes Processes
unable to deliver that part of the message to the
message. 4.5 UDP Ap1>.lications :
application immediately. Due to this an uneven delay is
When the client receives a message, UDP checks if the introduced between different parts of the messages
Despite being connectionless, unreliable, no flow
incoming queue has been created or not. If the qu~ue which is undesirable for some delay sensitive
control, no error control, UDP is still preferred for some
has been created, then the UDP sends the received applications.
applications.
....
datagram to the end of the queue. - This delay is actually a side effect of the reliable
_ This is because UDP has some advantages too. An
If the queue is not present then UDP will simply discard operation of TCP.
application designer has to sometimes compromise
the user datagram. If the incoming queue overflows, - Some applications are not affected by this delay but for
between advantages and drawbacks to get the
then UDP discards the user datagram and arranges to (G-2023) Fig. 4.4.3 : Multlplexlng and demultiplexing some others it is very crucial.
t; optimum.
send the port unavailable message to the server. Multlplexlng :
Here we will discuss some important features of UDP 4.6.3 Lack of Congestion Control :
.I The mechanism to create the server queue is different. At the sending end, there are several processes that are that are useful in designing an application program.
v We know that there is no provision for congestion
f
The server creates the incoming and outgoing queues interested in sending packets. But there is only one control in UDP. But this disadvantage can become an
using its well-known port as soon as it starts running. transport layer protocol (UDP or TCP). Thus it is a many 4.6 UDP Features :
advantage for some applications.
The queues exist as long as the server is running. processes-one transport layer protocol situation.
4.6.1 Connectionless Service: - Agood side effect of lack of congestion control is that
When a message is received at the server, the UDP Such a many-to-one relationship requires multiplexing. UDP does not create any additional traffic that is
checks if the incoming queue has been created or not. The feature of UDP is that it is a connectionless protocol
The UDP first accepts messages from different created by TCP for congestion control.
and that each UDP packet is independent from .the
If the queue is not present, the UDP discards the user processes. These messages are separated from each - Hence the UDP is preferred from some congestion
other packets, can be considered as an advantage or a
datagram. If the queue is present then UDP sends the other by their port numbers. Each process has a unique disadvantage depending on the requirements of an prone networks.
datagram at the end of the queue. port number assigned to it.
application.
-,. Ttdlltanleqi
'I' Publl tal lons
..J• TedlKntwlNP
V Publ lca t lo n s
l •
4.6.4
1.

ACN (Co mp. /Se m. 5/M


UDP is suitable for

SBTE)
Typical Applications
hav e t he follo win g requ
(a) A simple resp ons

of UDP :
the applications (pro
irem ents :
e to requ est is to be mad

cesses) that

4-10
tim e-ou t mec han ism
allo
pac kets and req ues t retra
TCP offers efficient flow
whe n sen ding ack now

ws
Tra nsp ort layer Pr
dev
. . ices to d etect I
nsm1ss1on.
ledg
con trol , which means
men ts bac k to the that,


0s4

sem . 5/M SBT E)


t A.;:19\k:ation programs
to:
\he des1ination
at
4-,,
Application A run nin
IP add ress ot com put
· corr esp ond ing to
Fig. 4.7.2.

g on
er 2
com
and

Tra ns por t la t e r e::


put er
the
app lica tion B as

1 p rovi des the


por t num ber
sho wn in

:ot ~
e. the rece ivin g TCP
{b) Flow and erro
r controls not essential. pro cess indi cate s th Com pute r 1 com mun
seq uen ce num ber
SOur
e h· ee, icat es with com put
(c) Bulle data is not tha t it can 9 er 2 usin g
to be sen t Oike FTP) . rece
~
ive • '_ hf:!\ the IP add ress and
overflowing its internal com
~
2- UDP is use d for RIP (Ro put er 2 use s the
uting Informa buff ers. por t
tion Prot oco l). "¾ 1 IP \ . num ber to dire ct the mes
sag e to app lica tion B.
3. UDP is used for man age TCP sup por ts a full-dup
men t pro cess es such lex ope rati on mea n
as SNM P. s that 1 Soc ket s:
4. UDP is suit2b!e for the pro cess es can bot h sen
proc esse s having inbuilt flow d and rece ive at the sam
and . e., Cl>
error con trol mec han isms Finally, TCP's mul tipl urn. A por t is a 16 bit uniq ue num ber use
. suc h as TFTP. exin g mea ns d for
that
5. UDP is suit able for the mul tica stin sim ulta neo us upp er-l
nurner01:•· identificatio n o f a sing
le applica tion .
g app lications. aye r con vers atio ns
6. UDP is also can -~ But soc ket add ress or
use d in the real time app lica multiplexed ove r a sing sim ply soc ket wou ld iden tif-/
tion s which do le con nec tion . the com bina tion of the
not tole rate the une ven be IP add ress and
delays. num ber con cat enated the por t
4.7.1 Relationship Betwe c;.i4 40l Fig . 4.7. 1 : Mu ltip lexi tog eth er as sho,,•m
en TC P and IP : 1
ng and demultiplexing in
4.7 Transmission Contr
ol Protocol using TC.P Fig. 4 .7.3 .
The rela tion ship betw For example if the IP
een TCP and
(TC P): Each TCP mes sag e gets
IP is very interesti ports an d Sockets : add ress = 193 .25.10.1
2 and
4,7.2 the por t num ber
D
enc aps ulat ed or inse rted in~ is 85 . The n
IP data gra m and then this por t of this
Tc-,e TCP prov ides relia this dat agr am is sen por ts: com pute r will have the
ble tran smi ssio o of t over tile 1. follo win g sod :et add ress
data in an IP Inte rnet to the des tina .
enwonmem. TCP corr esp ond s to the tran spo tion . App lica tio ns ru nnin g
rt layer IP t rans por ts this data on different hos ts Socl<et add ress = [ 193
(l.3yer 4} of the OSI refe com mu nica te with · 25 · ,o · 12 \:
rence mod el.
with out bot her ing
gra m from sen der to destinati011, TCP with the help of ports. I 85 )
A.-nong the serv kes abo ut the con ten ts Every ap p lica tion has
l.P l \
TCP of the 1q, bee n allotted a uniq ue 16
prov ides are stre am data mes sag e. bit Por t
trar.sfe num b er which is kno wn ._ _ _ eo1<>n lor
r, r!!lia bi!ity, effi cient flow con trol, full as a port.
-duplex At the final des tina tion Wh en an app li cati on
ope rati on. and rmrltipl the IP han ds ove on one com pute r wants to (G-l.A3&) Fig. 4 .7 .3 56"'.,are!JC<l
exing. r the me s~ com mu nica te usin g
to the TCP softw~r a TCP con So a pair of soc kets
TCP is tr.e laye r 4 pc-otoco e run ning o n the nec tion to ano ther is requ ired to iden tif-:,' a TCP
l in the TCP destination app lica tion on som e con nec tion betw een
/JP suit e and it is a com put er. oth er com pute rs thes two applicatio ns o n
very imp ,ona nt and com e ports t'IIO
pli<: ated pro toco l. TCP IP acts pro ve to be very help different hos ts. The se
has bee n like a pos tal serv ful. two soc ket add ress es
r!:'l ised rm.iltip!e tim es ice and t rans fers the Let an a p plic the end poin ts of the specify
in last few dec ade s. from one com put er to datagrams atio n A connec tion as shcl',m
the oth er. on hos t 1 wants to in
W:<!h stream data tran com mu nica te with an F,g. 4.7.4.
sfer , TCP delivers Thu s TCP dea ls with applica tion B on hos t
an uns truc ture d the actu a l data to be th e p ro ces s take s pl 2 So
stre am c f b<ft.E!S fd emi transferred ace as sho wn in Fig. 4.7
fied b-t seq uen ce num and IP take s care .2 and
bers . of tra nsfe r of tha t d ata . eY.pl aine d bel ow.
To;s se,, .ice ben efits
a pplicat
ions bec au se th..<>y do Man y app licat,on s suc
no t h as FTP , ;...ppfic.auons
fle;e ro cncp dat a into Rem ote logi n TEUm
TCP. lnst ead, TCP gro
b!od :s bef ore han ding
ups 17/tes into seg men
it off to
etc. kee p sen ding d ata
com put er.
to TCP soft war e o n the
sendir,;i 0 EJ [ ]
pas ses the m to IP fur deli ts and
l -\Sou<ce
TCP offers refa bi!e
very. The TCP softwar e acts
as a mul tiplexe r at the sencf,ng
po<\ no.
Oo,slinalXln po,!.80
no.
~~\
20
y !Yj prO'tiding con nec tion com put er. It rece ives
-ori ent ed, dat a from va rio us appl Oesl!r\a"Jcn
end- to-e nd relia ble mul tipl exe s the dat ications. IP addr&SS !G-14
361 f"ig. 4.7 .4: Source
i,ad :et deli ve,y a and ha nd s lllld des tina tion por t
intemet,,ooc th roug h an it ove r to the IP '\93· 25· lC··, z num ber s
soft war e at the sen din ~ Generally the serv er
g end a s sho w n in Fig. por t num ber $ are \mo
4.7.1. wn as
\. ,
It does this h-; s;.;qu,er IP add s its 0"1m hea der Pert t :c . o5 the well known por
.cir.g bytes with a forw to this TCP pac ts. Som e of the wel l kno
ad co o'l li~ num
ber tha t indicate
a rdin g
s to the
an IP pac ket out of
it The n this pac ket
ket and creates
is sen t to its
~ort~ 0 port num ber . hav e alre ady bee n men tion ed
wn
for
~ t i o n the red t>y-.
e the source exp ect s to
rece r-1e.
des tination .
I H:os, - 1 _l ~ -2 UDP and TCP earl ier in
Multiple TCP con
this cha pter .
eyt e, r,ot aa .rc ,lle
are retro~ .
dged with in a spe ofi~
tim e period
At the des tina tion exa
p lace . The IP soft war
ctly opp osit e pro ces s will talct
-~
ii i\ !: add!... applications or sam e
nec tion s bet: Yle en diffefe nt
app lica tion s on two
e han ds ove r t h e m ulti
plex ed data L >-L ~ tna! Ol
~-25· 10·1 2 hos tS
Th!:: r~i abilitJ n,pr..Jla
.-m h Jost , ~
nism of TCP a!k rns dev ices to deal
to the TCP soft war e.
The TCP soft war e at

? ·-- - . & lPac dres &


193· 25·1G·12
._ - -.· exist in prac tice. Hef e
hos ts are sam e but the
the IP add res ses of the
por t nur nbe <s are diff eren
tw0
t.
ed. du ptic ate, or mis the des tina tio n co mpu
rea d pad...P\.s. A ter then Port No. a5 1he com mun icat ion
dem utti plex es the mu usin g por t nu m ~
tti plexed dat a and g is
ives it to the illus trat ed in Fig . 4.7.4.
cor resp ond ing app lica
tion s as sho wn in Fig.
4.7.1. ,_-,r l nur nbe n
lG-1 A37 ) Fig. 4.7 .2:-
Use of r-· - \
V Te di, _.,, ,,.

-...,,, ~
,. nr ~ H t. :a t t ,:, ,
T e d i ~-i
.,, Pu!l l l ! 'il l !l•f
...._
••:
4
•: -A
41 8

•C~N;(~C:o~m:p~./~S~em~.5~/M~SB~T!; !E~)-------~~-
TCP Services :
4-12 --------_;~~~~ Transport layer ~~
TCP creates a working environment in such a wa
Prot
~la
..:, t-CN
111'..
(C =~::::::::------,!4-~13~----.. . . . . . . . . . . . . .
The
0
mP /Sem. 5/MSBTE)
~~-
locations containing the bytes to b
e sent by 4.8.5 Full Duplex Service :
toeols
~T~ra~n:;.spo~rt~l~ay~e~r£P~ro~~

3. sending TCP.
the sending and receiving processes seem ~ th at the .
Following are some of the services offered by TCP to the
processes at the application layer : connected by an imaginary "tube" as show be ·ce the TCP may be able to send only a
ract1 • - TCP offers full duplex service where t h e dat a can flow in
part of
Fig. 4.8.1. n 1n tn P. . to be sent, due to slowness of the .. both the directions simultaneously.
1. Stream delivery service hich 1s receiving d . •ng
This is called as stream delivery service. data w ngestion in the network. Each TCP will then have a sending buffer an receivi
2. Sending and receiving buffers Sending process Receiving process cess or co . . .. buffer. The TCP segments can travel in both th e
3. Bytes and segments pr0 ffer at the receiver 1s d1v1ded into two parts .
;he bU · directions, therefore TCP provides a full duplex service.
4. Full duplex service The part containing empty locations.
l,

-
S. Connection oriented service The part containing the received bytes which can
4.8.6 Connection Oriented Service :
6. Reliable service. 2.
be consumed by the sending process. - TCP is a connection oriented protocol. When
7. Process to process communication. Stream of bytes process - 1 wants to communicate (send and receive)
eytes and Segments : with another process (process - 2), the sequence of
4.8.1 Process to Process Communication : Imaginary lube carry· 4,s.4
the data slream ing operations is as follows :
suffering is used to handle the difference between the
The TCP uses port numbers a transport layer addresses. (G-62l)Flg. 4.8.1 : Stream delivery service
1. TCP of process - 1 informs TCP of process - 2 and
speed of data transmission and data consumption. i
Table 4.8.l shows some well known port numbers used 4.8.3 Sending and Receiving Buffers : create a connection between them.
sut only buffering is not enough. We need one more I•
by TCP. 2. ! TCP of process - 1 and TCP of process - 2
The sending and receiving processes may not pr d step before sending the data. exchange data in both the directions.
Note that if an application can use both UDP and TCP, o uce
and receive data at the same speed. The IP layer, which provides service to TCP, has to send 3. After completing the data exchange, when buffers
the same port number is·assigned to this application.
Hence TCP needs buffers for storage of data at both the data in the form of packets instead of stream of bytes. on both sides are empty, the two TCPs destroy
Table 4.8.1 : Well known ports used by TCP
their buffers to terminate the connection.
ends. There are two types of buffers used in each At the transport layer, TCP groups a number of bytes to
direction : The type of connection in TCP is not physical, it is
form a packet called a segment.
7 Echo Sends received datagram back virtual. The TCP segment is encapsulated in an IP
l. Sending buffer 2. Receiving buffer. A header is added to each segment for the purpose of
to sender datagram and these packets can be transmitted without
A buffer can be implemented by using a circular array exercising control. following the sequence.
9 Discard Discards any received packet of l byte locations as shown in Fig. 4.8.2. The segments are then inserted in an IP datagram and These segments can get lost or corrupted and may have
11 Sanding
Users Active users process Receiving transmitted. The entire operation is transparent to the to be resent.
Proco ..
13 Daytime Sends the date and the time Nexl byle receiving process. Each segment may take a different path to reach the
17 Quote Sends a quote of the day lo be The segments may be received out of order, lost or destination.
received r--:-::.-~-,.~-,.-1,.....
19 Chargen Sends a string character corrupted when it reaches the receiving end. 4.8.7 Reliable Service :
20 FTP.Data File Transfer protocol for data Fig. 4.8.3 shows the creation of segments from the
TCP is a reliable transport protocol and not unreliable
21 FTP, Control File Transfer protocol for control bytes in the buffers.
like UDP. Different acknowledgements are used by the
Sending Receiving
23 TELNET Terminal network process receiver to convey sender the status of data.

25 SMTP Simple Mail Transfer Protocol Sending TCP Receiving TCP


4.9 Features of TCP :
53 DNS Domain Name server □ Empty locations □ Empty localione
□ Bytes sent but acknowledgement □ Locations conlalnlng ln order to provide the services mentioned in the
67 E!OOTP Bootstrap Protocol is not received lhe received bylea previous section, TCP has a number of features as
79 Finger Finger Cl Bytes to be sent
follows:
(G-622JFig. 4.8.2 : Sending and receiving buffers
80 HTTP Hypertext Transfer Protocol
Fig. 4.8.2 shows the direction of movement of data. The 4.9.1 Numbering System :
111 RPC Remote Procedure Call sending buffer has three types of locations : The TCP software keeps track of the segments being
Sending TCP
4.8.2 Stream Delivery Service : 1. Empty locations. transmitted or received. However in the segment
(G-623)Fig. 4.8.3 header there is no field for a segment number value.
2. Locations containing the bytes which have been
TCP is a stream oriented protocol. The sending process · Each segment
sent but not acknowledged . These bytes are kept The segments are not of the same size. But there are fields called sequence number and the
delivers data in the form of a stream of bytes and the
in the buffer till an acknowledgement is received. can carry hundreds of bytes. acknowledgement number.
receiving process receives it in the same manner.
• Tedlltn.. \Hte
pub 11 cat IO I\S

V
V
TedlKnowlffl'
Publlciltlons
-
,a"i:r ACN (Co
'Y' ...,;..;,_,;;;;;;,m
....

Note that these fields correspond to the byte number


.

The amount of data sent by the sender depends on th


---.

~
r
.;...._ _ _ _ _..,:T~ra~n!;S:fpo~rt~la::iy~e~r.P,eP:rroo~tto,,~~· . . . -JI~,
;.::p~..:.';.;;S:::;em:.:,:.. .;;:5/M:_::;S;::B~T~E;,>!...,_ _ _ _ _ _ __;4~-~14:..,_ _ _ _ _
~
-

.,,er :
co~m~P·;,;',.s•e•m.•..,s.
p,.ctJ L
/M•S•B•T •E•)------ --4-~ts;__ _ _ _ _ _ _ _ _ _ _ _Trr~a~n:;:sepo~rt~la~y:,::e::,r.;P,.ro•t•oeo-

32blts (4 Byles)
l•s

and not the segment number.


following factors : e \ '(I • protocol used by TCP entities is the sl"d•
Byte numbers :
l. The receivers decision (flow control). 1"he
basic 1 1ng
·ndoW protocol. A sender starts a timer as soon as a
Source port
I Destination por1

Sequence number
TCP give numbers to all the data bytes which are 2. The network congestion. wi nsmits a segment. i
sender tra _ .
transmitted. The numbering is independent of the Acknowledgeme nt number
TCP t,eader
e
direction of data travel. ·
Summary of TCP features : ,,Jhen th segment 1s received by the destination , •t1

I back acknowledgement alongwith data ii any. TCP \


l. TCP is a process-to-process protocol. sends
header Reserved .Flags \ W indow
The numbering does not always start from 0, but it can length
2. TCP uses port numbers. knowledgem ent number is equal to the next
start with a randomly generated number between O and The ac Checks.Jm Urgent pointer
232 -1. ce number it expects to receive.
3. It is a connection oriented protocol ( sequen T
creates a Virtual :;= (O or more
Options \ Padding ~ ;::;
timer at the sender goes out before the 32 - bit words} Optional po rtion

I
Sequence number : connection). II t he

I
After numbering the bytes, the TCP assigns a sequence 4. It uses flow and error control mechanisms. ackno
wledgement reaches back, it will retransmit that
segment again.
T
l DAT A (optional)
T - in the TCP
segm ent

1.
I number to each segment that is being transmitted. 5. TCP is a reliable protocol. (G-611) Fig. 4.10.2 : TCP header format
j The sequence number for each segment is same as the ble problems :
poeSI The fixed header may be followed by header options.
I number assigned to the first byte present · in that 4.10 The TCP Protocol : AS the segments can be fragmented, a part of the
'i After the options, if any, upto 65535 - 20 - 20 = 65495
(' segment. transmitted segment only may reach the .destination
Let us take a general overview of the TCP protocol. data bytes may follow. Note that the first 20 bytes
Acknowledgement number : with the remaining part lost.
Every byte on a TCP connection has its own 32-bit correspond to the IP header and the next 20
The TCP communication is duplex. So both the sequence number. These numbers are used for both Segments can arrive out of order. correspond to the TCP header.
communicating processes can send and receive data at acknowledgement a nd for window mechanism. Segments can get delayed so much that timer is out The TCP segment without data are used for sending the
the same time. and unnecessary retransmission will take place.
Segments : acknowledgements and_control messages.
Each process will give numbers to the bytes with a
different starting byte number. The sending and receiving TCP entities excha nge data 11 a retransmitted segment takes a different route than Source port :
the original segment is fragmented then the fragments
Each party also uses an acknowledge ment number to in the form of segments. A segment consists of a fi xed A 16-bit number identifying the application the TCP
20 byte header (plus and optiona l part) followed by of original and retransmitted segments can reach the segment originated from within the sending host. The port
confirm the reception of bytes.
zero or more data bytes. destination in a sporadic way. So a careful numbers are divided into three ranges, well-known ports
The acknowledge ment number is cumulative i.e. the
Segment size : administrati on is required to achieve reliable byte (0 through 1023), registered ports (1024 through 49,lSl) and
receiver takes the number of the last byte received,
adds 1 to it and uses this sum as the acknowledg ement stream: private ports (49,152 through 65,535). Port assignments are
The segment size is decided by the TCP software. Two
number. There is a possibility of congestion or broken network used by TCP as an interface to the application layer.
limits restrict the segment size as follows :
4.9.2 Flow Control : along the path. Destination port :
1. Each segment includi ng the TCP header, must fit
TCP provides flow control (l./DP does not). The receiver TCP should be able to solve these problems in an A 16-bit number identifying the application the TCP
in the 65535 byte IP payl oad.
will control the amount of data to be sent by the segment is destined for on a receiving host. Destination
efficient manner.
sender. 2. Each segment must fit in t he MTU (Maximum
ports use the same port number assignments as those set
This will avoid data overflow at the receiver. The TCP Transfer Unit) . Each network has a maximum 4.10.1 TCP Segment : aside for source ports.
uses byte oriented flow control. transfer unit. Practically an MTU which is a few
The TCP segment as shown in Fig. 4.10.1 consists of two Sequence number :
4.9.3 Error Control : thousand bytes defines the upper limit on the
parts : A 32-bit number identifying the current position of the
The error control mechanism is inbuilt for TCP. This segment size.
1. Header 2. Data first data byte in the segment within the entire byte stream
allows TCP to p rovide a reliable service. Fragmentat ion : for the TCP connection. After reaching 232 - 1, this number
The error control mechanism considers a segment as Data
If a segment is too large, then it should be broken into will wrap around to 0.
the unit of data for error correction however the byte
(G-1423)Fig. 4.10.l : TCP segment Acknowledgement number :
oriented error control is provided. small segments. Using fragmentatio n by a router.
4.10.2 The TCP Segment Header: A 32-bit number identifying the next data byte the
4.9.4 Congesti on Control : Each new segment gets a new IP header. So the
sender expects from the receiver. Therefore, the number will
TCP takes the congestion in network into accou nt. UDP fragmentatio n by router will increase the overhead. Fig. 4.10.2 shows the layout of a TCP segment. Every
be one greater than the most recently received data byte.
does not do this. segment begins with a 20 byte ~,1xed format header. This field is only used when the ACK control bit is turned on.

'fl• Ted1K111■led1i •!~~~\~~


'Y"° Pub 1I C 3 l l0 nS
~
l!f(

p=ro...toc....,o_ls
ACN (Comp. /Sem . 5/MSBTE) 4-16 ................!.T~ra~n;;1spo~rt~la~yr.;;e..,r..

· e:m~-.;5;;,;IM,;;,S;;;;B;;.T;;.;E-',)..__ _ _ _ _ _4-17
~ ~ - -....................
Header lengtti or offset : Window:
if_ ,.cN (C~r n -,/./~S
:o:!:~
_!11 A TCP Connection :
A 4-bit field that specifies the
total TCP header length in
A 16-bit integer used by TCP
for flow Y
~:
- d .
control • rn . hsome circumstances ocol
s of 4 bytes if you prefer). window sii: Th· '" the P, Althoug h not use
TCP is a connection orie . nted protoco I· Such a prot
32-bit words (or in multiple form of a data transmission in the reverse
er ·is always 20 bytes in
e, IS number ement segments wit no .data between the sen der and
Without options, a TCP head the receiv . cknOWledg would establish a virtual path
tells the sender how much data er1sW iJI·1ng to this variable length field carnes the application
length. (e-9· a Th· fi I
accept. ct ion), . coup led with the the receiver.
iver. rs e d
be is 60 bytes. This field dire trorn TCP sender to. rece rng t o the message are
The largest a TCP header may field wo Id . ent Multiple segments correspon d .
The maximum value for this u lrriiit '1e data fields constitutes a TCP segm
size of the options field(s) ever a " . rcPheader i nection.
is required because the .
wrndow size
. to 65,535 bytes, how 1 then sent over this virtual con
nce. Note that this field is W rndows Cale• path '
cannot be determined in adva
option can be used to mak e use of
4.10.3 Checksum : As TCP is using the sam . e single path for th e en t'rre
official TCP standard, but even larger a nd
called "data offset· in the windows.
re extreme reliability. It it can use the same path for
acknowledg ements
header length is more com mon ly used . A checksum is provided to ensu lost pack ets.
Checksum : data and the conceptual retransmission of damaged or
Reaen,ed: chec ks ums the header, the
Fig. 4.10.3. relation between TCP a nd IP we
e based on th do header shown32in bits Whi le discussing the
ed and reserved for future A TCP sender computes a valu pseu _ _ _ ices of IP.
e Conte nts have seen how TCP uses the serv
,._=--".'."""""--:---:-:-~~:-:-:~
A 6-bit field currently unus of the TCP header and data fields.
use.
than IP and the TCP
pared With th TCP operates at a high~r level
This 16-bit value will be com
Control btta or flags : same comput t·
e Value th e connection is virtual and not phys ical.
receiver generates using the
Urgent pointer (URG) : be ve"' afidran.
If th e ividual segments to the
1.
values match, the receiver can h' Though JP delivers the ind
., con ent th at Protocol : 6 "TCP segment lengi on the connection is
iving TCP should interpret the segment arrived intact. destination, the entire control
If this bit fiel_d is set, the rece do header included in exercised by TCP.
the urgent pointer field. Urgent pointer : (G-Gl2)fig. 4.10 .3 : The pseu
a
2. :
the TCP checksum If a segment is lost or
damaged, the TCP makes
Acknowfedg811lent (ACK) be nece ss f
In certa in circumstances, it may g computed, the TCP decision of its retransmissio
n, and IP does not know
th
ary or a Tep
of urgent data th _ When the checksum is bein
acknowledgement field sender to notify the receiver , and the data field is anything about it.
If is bit field is set, the at shoUld chec ksum field is set to zero
described earlier is valid. app licat ion
be processed by the receiving soon as al zero byte if its length is connection oriented TCP
possible.
. as padded out with an add ition The three phases in the
3.
Push function (PSH) : an odd number. transmission are as follows :
iver when the last byte of added in l 's complement
th should deliver this This 16-bit field tells the rece Then all the 16 bit words are 1. Connection establishment
If is bit field is set, the receiver urge nt data in the segm ent end s.
the sum is taken to get the
application as soon as and then l 's complement of 2. Data transfer and
segment to the receiving Options: checksum .
use may be to send a
possible. An example of its calculatio n on the entire 3. Connect ion termination.
an application, which can When a rece iver perform s the
Control-BREAK request to al functionality, several field , the result has to
In order to provide addition segment including the checksum Establishment:
jum p ahea d of que ued data .
be used between a TCP 4.11.1 TCP Connection
optional parameters may be zero.
4.
Reset the connection {RS
T) : ng on the option(s) used, the 32 bit IP address of the To make the transport serv
ices reliable, TCP hosts must
sender and receiver. Dependi The pseu do header contains
in size, but it cannot be hines, the proto col number establish a connectio n-or iented session with one
als the receiver that the the length of this field will vary source and destination mac
If this bit is present, it sign to the size of the header and the TCP segm ent length as shown in ion establish men t is performed by
ection and all queued data larger than 40 bytes due for TCP i.e. 6 another. Connect
sender is aborting the conn length field (4 bits). Fig. 4.10.3. using a three-way handshake
mechanism.
connection can be freely
-.; and allocated buffers for the hronizes both ends of a
relinquished. is the Maximum Segment 4.10 .4 Encapsulation: A three-way handshake sync
The most common opti on sides to agree upon initial
iver tells the TCP sender connection by allowing both
5.
SVnchrontze (SYN) : Size (MSSJ option. A TCP rece the application layer is hanism also guarantees

I
The data coming from sequence numbers. This mec
it is willing to accept
the maximum segm ent size en . TCP segment is tran smit data and know
signifies that sender is the use of this option. enca psulated .rn a TCP segm t This that both sides are ready to
When present, this bit field through . y to tran smit as well .
then encapsulated in an IP data
gram that the other side is read
sequence numbers. This bit for various fl ow control
attempting to •synchronize • Other options are often used .
· a frame at the data ets are not transmitted or
I The IP data gram 1. s encapsu ate d 1n This is necessary so that pack
l stages of connection
1
niqu es. ment or after
I is used during the initia and congestion control tech encapsulation is show rn
n re-transmitted during sess ion esta blish
een a send er and receiver. link layer. The proc ess of
esta blishment betw Padding: session termination.

I 6.
No more data from lender
(FIN) :

receiver that the sender has


Because options may vary in
size, it may be necessary to
ends
Fig. 4.10.4.

· Frame TCP Application layer


data
Each host randoml y chooses
to track byte s within the strea
a sequence number used
m it is sending and
If set, this bit field tells the zero so that the segment ·header

1l~
"pad " the TCP header With
s header thre e-w ay hand shake proceeds in
stream for the current TCP the standard . receiving. Then , the
reached the end of its byte on a 32-bit word bounda ry as defined by
tion the manner shown in Fig. 4.11
.l(a).
connection. (G-2072) Fig. 4;10.4 : Encapsula
1)'Tt< Une ■l~
• INp
TedU{ne■t1on
P u b 11t3 t l '

¥ Pu1> 11ca s

-- - - - ·-------
:,.··
.• .
4-18
~ p /Sam. 5/MSBTE)
Transp ort layer P rotoco ls

'
• p.CN (Com ·
_,!' 4-19
sYN (SEO=x ) F.IN it, coNNE.CT primitive sends a TCP segment with
the 4.11.4 TCP Connection Relea se:
The . O n and the ACK bit off and waits for a respons
Host SYN (SEQ =y; ACK =x + 1) ACK yN bit e duplex connec tion
A · A TCP connection is actually a fu 11
S sequen ce of TCP segmen ts sent in the normal ·11
case but to understand the connec tion release
Time! SEQ =x + 1, ACK=y + 1
l Time
FIN

ACK
•;:t,ow n in Fig. 4 .ll.Z(a).
~t,en the segme nt sent by Host - 1 reaches
assume that it is a pair of simplex connec tions.
we w1

Client
Server
the We can then think that each simplex connec
. • n i.e. host - 2 the receiving server checks tion is
(G-613) Fig. 4.11.l( a) : TCP connection establishment to getting terminated i.n depend ently.
Client Server
(Three-way handshake) -~ . here is a proces s that has done a LISTEN on
(G-614) Fig. 4.11.l(b ) : TCP termination ee if t . • the Releasing a ,CP connection is identical on both
s . en in the dest1nat1on . en d s.
port field . If not, it sends a Each side can send a ,CP segmen t with the AN b' t
The request ing end (HOST A) sends a SYN
segmen t The receipt of a FIN only means there will be
no more Port g1v'th the RS'T bit
. . h
on to reJect t e connection.
it se '
data flowing in that direction. A TCP can still send reply wi meaning it has no more data to sen • d
specifying the port numbe r of the server that data
the client •se it gives the 'TCP segmen t to the listening
after receiving a FIN . After receiving a FIN, the Acknowledge (ACK) · I.
wants to get connec ted to, and the client's Oth erWI sign a is
initial The end that first issues the close (e.g., sends which can accep t or re fu se (e.g. 1'f it does not sent and that direction is shut down, but data
the first Process, may
sequen ce numbe r (x) . h client) the connec tion. On acceptance a SYN continue to flow indefinitely in the other directio
FIN) performs the active close and the other is n.
end (that like t e
The server (HOST BJ responds ' with its own receives this FIN) performs the passive close. otherw ise a RS'T. Note that a SYN segmen If the sender of FIN does not receive the -ACK th
SYN send ' t wi in
Now refer Fig. 4.11.l(b ). When the server receives oecupies 1 byte of sequen ce space so it 2 maximum packet lifetimes, it releases the connec .
segme nt containing .the server's the can be tion.
initial sequen ce 'The receiver will eventually notice that it receive
acknow ledged una~~~~~o~~~;
FIN it sends back an ACK of the received s no
numbe r (y). The server also acknowledges the sequence more data and time-ou t as well.
client's numbe r plus one. A FIN consum es a sequen ce 1
number,
SYN by acknowledging the client's SYN just like a SYN. Normally four 'TCP segmen ts are required to release
plus one a
(x + 1). A SYN consum es one sequen ce connection i.e. one FIN and one ACK in each directio
number. At this point the server's TCP also delivers an end-of-f n.
ile SYN(SE O=x)
However the first ACK and second FIN can be combin
The client must acknow ledge this SYN from the to the application (the discard server). ed
server in the same segment.
by acknow ledging the server's SYN
The server then closes its connec tion and its TCP
plus one. sends
a FIN to the client. The client's TCP informs Connection reset :
=
(SEQ. x + 1, ACK y + 1).= application and sends an ACK to server by increme
the
'The connection reset in 'TCP can take place when
nting TCP at
This is how a TCP connec tion is establis hed. the received sequen ce numbe r by one. SYN (SEQ= X+ 1, ACK =Y + 1) one end done any one of the following :
Connec tions are normally initiated by the client, Time Tlme 'lime
4.11.2 Connection Termination Protocol with 'lime 1. It may deny a connection reques t.
(a) Norma l operat ion (bl Call collision
the first SYN going from the client to the server. 2.
[Connection Relea se]: (G· 61 si fig. 4.11.2 : TCP connec tion management
It may abort the existing connection.
A client or server can actively close the connec 3. It may terminate an idle i.e. non operati
tion (i.e. ng
While it takes three segme nts to establi sh a send the first FIN). But in practic e genera lly call collision :
connec tion, the client connection.
it takes four to termin ate a connec tion. determ ines when the connec tion should be termina If two hosts try t~ establis h a connection simultan KP does all the three with the help of the RS'T
ted, eously (reset
since client proces ses are often driven by an betwee n the same two sockets then the events
interactive take flag) .
Since a TCP connec tion is full-duplex (that is, user, who enters someth ing like quit to termin
data flows ate. place as shown in Fig. 4.ll.2(b ).
in each directi on ir:depe ndently of the other This is how the TCP connec tion is release d. Under such circum stances only one connect
4.12 TCP State Transl\\on Diag ram:
directio n), ion is .'.!,:~ :.,_~ ~~~= ~==. :.::~: .:::.;. :::.=; ....---
the connec tion should be termin ated in establi shed. Both the connections can
both the 4.11.3 TCP Connection Management : not be ,he steps to be followed in TCP connec tion
directi ons indepe ndentl y. establi shed simulta neously because connect
ions are establishment and release can be represe nted
using a
Conne ctions are establi shed in TCP by followi identif ied by their end points.
The termin ation proced ure in each directi on ng the finite state machine.
is shown in three-w ay handsh ake techniq ue. If the first set up results in •
a connection which is 'The total eleven states in such a state machin
Fig. 4.11.l( b). The rule is that either side can · · also set up e are
send a FIN To establi sh a connec tion, one side, say identif ied by (x, y) and second connection is
the server, ' given in ,able 4.12.1.
when it has finishe d sendin g data (FTN passive ly waits. It execut es the LISTEN and then only one ta bl e en t ry w1·11be made i.e. for (x, y).
indicat es ACCEPT . Table 4 _12 _1 : Different states In TCP finite state
machine
finishe d). primiti ves, to specify either a particu lar other For the initial sequen ce num b er a clock based scheme 1s
side or
used, with a clock pulse coming after every 4 µsec.
nobod y in particu lar.
When a TCP progra m on a host receive ..
s a FIN, it · when a host crashes, "-~C~L::O:S~E:D~-tN'.2'.o~co::::n::,:n,:e:c::
The other side (client) execut es a connec t primitiv For ensurin g an add1t1o nal sa1e'rf, k t 11 :ti:on:.:..::is:..a:c:..:t:.:iv~e-o:..:r..:p_e:-:n_d_in..:g~-:-::-i
inform s the applica tion that the other e, with ·
end has the IP and the port specifi ed. The other inform
it may not reboot for 120 sec which .
is maximum pac e
k t from
LISTEN Toe server is waiting for an incoming call
ation is ''
minate d the data flow. lifetim e. :This is to make sure that. no pac es
d travelling - d
the maxim um TCP segme nt size, possib le other SYN RCVD A connection reques t has amve it for
options previo us connec tions are still alive an ; wa
ACK

I
and option ally some user data (e.g . a passwo
rd). around .
.Tedi~
w
V
TecHnt■ledl'
Po b l lc3t l o n s
l'ub \\ta \lon'i
" ACN (Comp. /Sem. 5/MSBTE)
4-20
Transport layer prot2Cols eornP · ~~:'.'.::-:-------.......;~--------=---""""-~:e~~--~
1sern -5/MSBTE)

1' ~c,tJ l "' •"'S \n TCP :


Transport la er protocols

SYN SENT The application has started


When both the sides initiate a
connection release the
....... 1l. ·••\ rw O~
11•
•!_ ;'.: .:-. .:.. ::-. .--- ---- --
The size of send window .1s depe d nt on the receiver
to open a A13 . we will discuss the windows used in n e
connection connection is terminated and ' KP (flow control) as well as on the cong f1on control.
the state returns to ec11on es
1n
tnis s "'pe s of windows used in iCP : ,
ESTABLISHED The normal data CLOSED state. retw o•, - ,here are three operations that t ke
transfer state '(l1ere a
. can a place in the
FIN WAIT 1 Various type s of llnea In wind oW send wind ow, namely: open , close and shrink.
The application has said It is finish
ed the finite state machln~ l. S
end
drawing : ·vewindow - 1he send window in TCP is sim1.1
FIN WAIT 2 The other side has
agreed to release 2, Recei . is for sending data and receive wind ar to that in selective
windoW ow is repea t reque st (SR) with the following differences :
TIMED WAIT Walt for all pack Various types of lines are used send . , data. 1herefore there .
ets to die off in the finite state w,11 be four windows
\• machine drawing of Fig. 4.12 .1. ce1v1n9 . . 1. The SR send window num
bers pockets but TCP
CLOSING Both sides have They have different for re way communication.
tried to close meanings as stated below : . all for a tw O , send window numbers bytes CP the
simultaneously ,n . order to make the d1scuss1on . . In T
simple, we will f
CLOSE WAIT The other side has 1. 11owever int the communication trans mission takes place in the form segm ents
O
initiated a release Heavy solid lines : These
lines show a client me tha takes place only in one
but· the controlling parameters of nd0
LAST ACK Wait for ack of FIN assl.l . (client to server or the other wi WS are
of last close actively connecting to a passive serve way round).
r. direction expressed in bytes .
In each of the 11 state s shown 2. Heavy dott ed lines : These lines 2. Actually KP is capable of
storing data received
in Table 4.12.1, some are used for the send Window :
specific events are considered 4,13,i from the process and· send 'tlt
to be legal events. server. I a er onSu • twe will
Corresponding to every legal even illustrate s ar\ example of send assum e that
t some action may be 1 window. In the send ing TCI' send s the segments
taken , but · if some event othe 3. The light faced lines fig , 4.1 3.
r than the legal one Thes e are for unusual . of data as soon as it is received from
h send window can have a size the process.
happens, then error is reported. event sequences. reality t e of thous ands of
. . . . 3. TCP uses only one timer as compared to
ever for simplifying the d1scu ss1on several
The finite state machine is shown bytes hOW a 100 byte
in Fig. 4.12. 1. Over each line in Fig. 4.12 .1 we timers used by the SR protocol. This

----
have written the even t/ . doW has been considered in Fig. timer in TCP
CONNECT/SYN
action pair. send win 4.13.1 .
. is used for error control
CLOSE/,
The event can either be a user-
... _ SYN/SYN t ACK initiated system call
[CONNECT, LISTEN, SEND or CLOS
E), a segment arrival
AST/·
SEND/SYN (SYN , FIN, ACK or RST), or a time
-out.
SYN/SYN + ACK
(Simuftaneous open)
For the TIMED WAIT state the even
(Oatatra01fef ital&) t can only be a time-
ESTABLISHEO·•i , -SYN
-_ +_>C_Kl_>C_K- out of twice the maximum pack
CLOSE /AN et length. The action is
,_ ---- -- --------- ...
FIN/ACK
the sending of a cont rol segment
(SYN , FIN or RST) or
ftr~~<-·-;_ -~-
(Passt v~lose )

f :,~~ l nothi ng.

The time-out s to guard for lost


packets (e.g. in the SYN
SENT state) are not shown here .

There are 11 states used in


f,t::.}::-:< ':>'>~:.: . the TCP connection
' managem ent fi nite state machine.
Data can be send in
- - -- ---ACK/· ___ .,,,''
the ESTABUSHED and the CL
OSE WAIT states and
(G-696) Fig. 4.12 .1: TCP conn
ection management final state recei ved in the ESTA BUS HED and
FIN WAITl states.
machine
Explanation : ,. . Send window in 'TCP
Each connection is always in the · ·1 •
(G-18001 r19. 413
CLOSED state initially.
It comes out of this state when To understand the finite state
it does either the machine of Fig. 4.12.1,
passive open (USTEN) or an activ first follow the path of a client
e open (CONNECT). i.e. the heavy solid line. After
A conn ectio n is esta blished, that follow the path of the se rver
if the other side does the (the heavy dashed line).
opp osit e and t he state becomes
ESTABUSHED.

w
V
Teclllna■ 1u1i
Pub ll c;it lon s
" Tedl
pub IIlnwl
lat lllte
l o ns
~
-
f
I

.,, ... ACN(C


4.1
:::3.2
:o :m Recei~p ve Wi nd ow 4-22
Pro t~ , ,-crl (Co~~--•=""""""""""'...."""'----~4~-2~3:...,
.~/~Se~m~·:5/M:S:B~T:: !;E:l,)_,_ _ _ _ _______
__
The exam I f _. . , ~ ~ - - -
---------~ T,._,.,,., ~T~ra~n:s~~rt~\:;ay~e~r_ep~r

~
: o~~:.
'

Fig. 4.13.2
Pe receive window h bytes a receiver can rece
~~~
ive without
,,,,. 1som-""SBTEl Most TCP versions how
ever, do not provide
th
e floW
. > -,. .ytes however f " "" contra\ feedback fac\\ity.
O ., u.
fl
. . ". ,h _ lo
"' comrol pro bl= s.Y The cau · 1 o\ \n TCP . inst ead the receiving
pro- ces•s is
tho,sru
usas,o
ndso , oflOOb b rwnd .is exp "~ s1i, =.,~,.- f I •., con r a\\owed to pu\\ dat a from
d
rece ive window can hav
s,m•m
o,
,rae ,oo
f
size of which is denoted b
" "
\L , 41A • 0'II..contra\ ,s a technique · used for contro\\\ng th receiving process becom
receiving TCP wh ene
ver the
fo l"' " lndo-.., . •
·
in Fig. 4.l3. .
'"K'°" wiodow has been shown
"" "
·\ ,•
1"' .,o
rate of the. sender .so
tha t the receiver ,·s
t
1hus the receiving TCP
es ready.
controls the sen din g TCP
The receiv' ~• rwnd = Buf fer size ' flow control leedback) (du e to
2 . d= lo TCP;ssim/S, . .
_ Number of
\\ and the sending TCP
d;ert
ra 1he\med. controls
with the following d.ff acknowledged bytes to '
e gements in SR b
"'"•d ""
the sending process
as far as the dat a rate

=-
repeatThe io 10' "" '" ' _ , of the
·
request (SR) .
"" "'" ' pro ms ; fo fhaf m "'"
wo ,,. ., Th o . I erences ·
· '~
2. Th• cor rupte received packet
def· "
e"or contra\. So w\ h0 b"" kepf "I"""
from fh• sending process is con
cerned .
un .ackoow d l d \h•
en t e flow9 control is being Consider the flow contra\
dat a as per ,·ts o ' '" ' 1ne ·11 tem feedback pat h den ote
l n TCP is allowed to T. • -,o
" s•'••• •' h orarh·\y · h
""" ' ' =
d by @
ca e buffer th
· means in a part of
pull selective acknowledgeme
mechanism of acknow
nt. H
ledge me t .
m T
.· his i1
;,. •• "'" "" f "
h th

• • •'era' mm
i•"' " ;, """°'
"" "' "" "
in fig . 4.14.l. This feed
simply rejecting the
back is pract\ca\\y ach
ieved by
ere ''- 0
""' •lo
alloi~t dgd aod
=• are
p " , o<>wi,dg,d b~wh· h h bytes CP \L. .. er an errortree c annde .t data by sending TCP
wh en \ts
The ' " ,; :•ceiv . ,o """dow
e win fhemis th
~/h
" og~•1o,"" fl•
" ,. ,,,. d byf
0
~m"'""'
""'e "''•
fo dgbe,m •m · n is call
. >,' ..
d ,,o;,;:: ;•ch •
,..
h \
window is lu\\.
fse• fFig. 013 2).
fig. 4.13.2) ;, ao =~ ed
• , fig 4.14.1 ,m; ,h """ '" f/,e
dara "'" "" al<mg
So now \et us concentrat
e on the flow contra\
· Th e new vers fee dba ck
smaller than th II
e a otte d buffer . ere ore always uses both selective and
• ion • 381 f ' P"
••'e"can
lo ,oly
3pp\y
data transfer.
°"" """''"
the same prin
•omciplfh• sem
e to thei•bidi
fo ""
rect""
iona' l
signal from receiving TCP
path © in fig . 4.14 .l.
to sending TCP , den ote
i.e. how doe s the rece
d by
fh, "" '~ wiod cumul t· _ iving
. ""· The ,;,, of a ive mechao .Tep ••TWO d\tterent types of signals trave\ process contra\ the sen
fu• ad< ooW led g=" "· between the ding TCP.
ow will decide the sending process and
number of """ ' the receiving process
in 4.'\4.'\ Open\ng and
f\g . 4.14 .l. They are C\oslng Wi nd ow s:
data and flow control
feedback In TCP the flow con

:=;ttH~~~~~~~~r~1~
trol is achieved by
s\gna\s. sender and receiver to forcing the
The data f\ow takes p\ac adjust their window size
e from the sending pro size of the buffer for bot s. The
the sending TCP \de not cess to h sender and receiver
w\\\ not
ed by © ), then from be changed. lt w\\\ rem
sending ain fixed in size.
TCP to receiving TCP Consider the receive win

~-'"~
·- Bytes that h~ ;- (denoted by @) and fina
I ' , I :
e - ·- : - dow shown in fig . 4.14
-"" "''°'"""'""' --,- as00 ,
' ' ""' , , , . +:-r receiving TCP to receivin
\\y from
window dos es by mov .2. This

-~~I:··'
400 ing its \eft wa\\ to the
' 401 1
·- _E!'_t~e pro ces s
. . , ··- ··
-- . H . r 1- lL --+-,--
--- ~- -~ --~ -!
:
J . •. , .
a~o wle dge d

--·--:.......L_;_ ..
i -- es which can be received
fro m ,_
'
--'-'- -- -- ' •j-
I I
, - -\
l
-, · .j

. -~ J
. I
:-·I
g process \denoted by
-oa 1a l\o W
@).
~ Flem control
leedbacl<
response to arrival of mo
The receive window of
re bytes from the sender
fig . 4.14.2 wi\l ope n by
right in
.

I Receivewi d' l j its right wa\\ towards mov ing


.·- - ·,- -,- f-- :- I
·-J_J__ ' Allocated buffer I ' '. I
.n OWSIZ8 Byteswh1ch,canncit~ , Sender Receiver right when the receiver
process
receivedfr -
-- -Jl -.'
'___ size I ' I
·r· pu\\s more bytes from

-=+-~ -:.J:-L. i -:- t,-F=:r=e1}'":""." r e ·~ ~,-,--\-- +-----~- ~-


-,
i ;----
: ;, _;_ ·-··
(a)-r-
R~v~ew
--' --L
ind ow
' ·iuid"- L.L
, ,' _
_!,__ L
,
' --i --
'
~Im 1se~der
1 I ,
1'
Appl\ceUon
\eyer
Flow
1he send window can
the receiver butter.
ope n, dos e or shrink
in order to

m'
C

exercise the flow control


'

I control . Al\ the thre e functio


. ___ _ ;_ I
, i- -- . l
-l leedback r::==:::==:i ns of the
- •-·- L.
l
i··,·--r·l
-~ .- ,-· - ' - . Leftwall
: -~
l •·-,-···-·L :
i
\ ,l1
\ . , ,ransporl , _,___ __
,. ,i---~ 1,ransporl
send window are contro\
,he send window dos
\ed by the receiver .
'
I ' ' :
I - L;--- -~3 00- l '

.,- ·- ;-' - , - ~---- .1 301 ,j 302 ,I ....


l - --1
; -:-" , _ Right wa il ··-· i ;- -1·· ··\ layer ......-~ ®'---_.. es by moving \ts left

.
1

. . . u .. I ""' ' I
I -
'
,
'
' '
Closing -', ~ ,-- -~ -
_l _ r ·-; --i--r·-+-·"I I
-,- , \ayer right (see fig. 4.14
.2) in response to
wa\\ to the
a new

_ (~b'--
)0 .::..£.
,l. _u : ~· i
pe=n~m':'.!gLa~n~d~c~Ios~in~.,~-i!_L
....
1 , , 1 ·~--
, . "'"' .- .-- .
j .,oo I~,::±
' Ope .
L! J i I .
®
Flem control ieedbacl<
acknowledgement from
1he send window ope
the receiver.
ns by moving its righ
go -re
~~-cei t wal\ to the
L
~ -'~
ve win : ; 'L7·--1--+ --\
~ r--,L\__;·.__ --_j,! .I\'
-' ~ ddow
L,.. i ··- .. ··--· i-.
i ; G) Messages are pushed right when the adverti
sed receive window size
- -·-- --- ---- -·· __L ___
__ J__.,1_ __ ® Segmen\S are pushed the receiver a\\ows it to
\rwnd) by
(G-1801) Fig · 4·13·2 : @ Messages are pulled do so.
Receive w'n
11\e send window may
1 d OW .m TCP ® and @ Flow contro\ leedbacl< shrink on occasion. lt
is ass um ed
tha t this situation doe s
\G-1802) Fig. 4.14.1: Oata t\oW and not arise.
t\ow
control feedback in TCP 4.14.2 Shrinking of
Wi nd ow s:
1hu s f\ow of data tak As we know, the rece
es p\ace from sender to iver window doe s not
receiver. shrink.
But the flow contra\ However the send win
feedback s\gna\s travel dow can shrink in the
from the event of
receiver to sender as the receiver defining
shown. They flow from a va\ue of "rwnd" whi
TCP to sen der TCP (de receiving ch results in
noted by ©) and from the shrinking al window
sending s.
TCP to sending proces
s (denoted by @).

I/lit\. .. Yf'
Tt<klll•leiie

w
pub llta l \Dn S

'"""'"""'
Tedll!ntwledtt
.•.:;•,_A;;;C~N.:.i,;;(Co~m,:1;p:_./~Sem:::;:_•~5/~M~
S:!;B~T~E)1.,._ _ _ _ _
__;:4:;:·2~4;...__ __ __
__ __ __ _T_r,.an_,s,.P. 0 rt_la~ye:r_ep~rot e,o01P·
,sern •5/MSBTE) 4-25 Transport
layer protocols
~
Some versions of TCP do not allow
the send window to Explanation : 1' ~ctJ ( osed to send aclmow\edgements
shrink. That means they do not
allow the right wall of ~ 1l. at suPP as
1. Toe first piece of data recei·ved from the sending
the send window to move to the Let the receiver in Fig. 4.14.2, 1so 3re n eceive 1·t · d. g TCP
left. has a 4 kbyte . a tneY r application program .1s se nd by the sen in
byte n as der to reduce the usage of the
The receiver can prevent the shrin buffer space. l.e 4()9 so 0 e in or system.
king of send window · 6 •sis don even if it is only 1 byte .
by maintaining the following 1h 1 duce the system usage is to use an . TCP
The sender transmits a 2048 to re
relationship between the byte (2 kbyte) se ne 3Y 2. Once the first segment .,s t the sending
last and new acknowledgement with a sequence number SEQ O .wh!Y' d Nagle's algorithm is used. sen ' buffer
and the last and new = 0. These byte 91llent calle will wait and accumulate data '" · the output
·rwnd" values. 1gon t . d
half space of the receiver's buffe s occu 3
•••·ndoW Syn dro me :
(new ackNo + new rwnd) ;>: (last r and the rec . until either the acknowledgem nt is receive
ackNo + last rwnd) send back acknowledgement e1ver ,..,Py 4 SillY .-.• e •
of this segme 111 4,1 A, h r problem that can degrade from the recei.ving . sufficient data ,s .\

L
TCP or
L
Old position of
New position of the right th e right
2048, WIN = 2048).

Here WIN = 2048 is the window


nt (Ac~
·s is anot e
1h' !Ylance.
perfor
the KP
accumulated to fill the maxi.mum ·ze segment.
s,
wall wtth resp ect to sequ
wall which tells th occurs when the sender transmit 3. Step 2 is repeated for the . • transmission.
ence data in remaining
number spac e that an empty buffer space of
2048 is available
e sender 1nis problem but an interactive application on
blocks, the If the sending application prog data rate is higher
recei 1arge .d . ram
(G-18 03)
ver side . on the ·ver s1 er eads data 1 byte at a time . than the speed of data transpo rting network then e
th
The above relationship shows rece• d this problem, refer Fig. 4.14.3. . h
that the right wall should Now the sender sends anot understan
her 2k i.e. 204 b 10 segments are larger (max:,mu m size segments). On t e
not move to the left. segment (SEQ = 2048) which 8 Ytes . er
is acknowledged by the other hand if the sending app rica t 0n program ,s s1ow
' .
4.14.3 An Example of Flo receiver (ACK = 4096, WIN than the data transport networ k. the segments will be
w Control : = 0) which shows that
window = 0 because the recei smaller than the maximum segm
Let us now see how the wind ver buffer space is ent size.
ow policy is used in ACK = 4096 indicates that the 0
transmission policy of TCP receiver has re • · Clarll'a aolutlon to allly window
protocol. Window 4096 bits successfully. ce,vect ayndrome :
management in TCP is norm Clark suggested a solution to silly . • d syndrome as
ally decoupled from the win ow
acknowledgements that means The sender must now be bloc
acknowledgements are ked until the application
process on the receiver remo follows.
not connected to the TCP wind ves some data from the
ow management d that the receiver should not
buffer and some buffer space He suggeste send a
To understand the wind becomes available. f 1 byte Instead the receiver
ow management, refer window update or must
Fig. 4.14.2. As soon as the application on · t of butter space
the recei ver side reads 2k wait until it has a considerable
Appllcallon Sender
amoun
Receiver Reoeiver's bytes, the buffer becomes available and then send the wind
doe sa2 k- partially empty and an ow update. . .
buffer
write acknowledgement with a wind . r
O 4k
ow of 2k (ACK = 4096, 10 be specific, the receive should wait until it can
WIN = 2048) is sent back to . ·t has advertised at
.
~f~ P~il sender. Here WIN =2048 (G-617) fig . 4.14.3: SIiiy handle the maximum window s,ze '
indicates the empty buffer spac
e on the receiver side.
window syndrome the time of establishing a conne ct· n or its butter is half
. ,o
Initia ff · full so
,.r~<~I The sender may send upto 2 kbyt
When the window = 0, the send
es.
l. lly the receiver s bu er ,s
window size Oto block the send
er.
it send a empty, whichever is smaller.

1he sender can also help


to im rove the situation. It
.
er should not normally ads one byte Ip t ad it must wait and
AppllcaUon send any segment. But 2. But the interactive application re should not sen d t.my segments· ns e
does a 2k under two exceptional t or at \east · · g half of
from the butter. So one byte spac e becomes send a full segmen one conta mm
write conditions the sender will co
ntinue to send data even the receivers buffer size.
when it receives WIN = 0. empty. wind ow update to the
1. First, urgent data may be send 3. The receiving TCP sends a. Network. Layer Congestion
:
Sender Is
blocked , e.g. to allow the sender informing that it can send
user to kill the process runn 1 byte .
ing on the other not explicitly deal with the
The sender send 1-new byte. ihe Internet model does
machine . 4. . . 0 . h network layer. However this study of
The . d the wind ow size ,s · congestion at t e . .
buffe r is
2. Second, the sender may send 5. full again an k I er congestion ,s ve ry important because it
Sender a 1-byte segment to This process can contm . e forever. 1his is known as networ ay derstand the cong
ma yse nd- make the receiver reannour u helps us to un estion at the transport
uplo 2k
ice the next byte the silly window syndrome.
expected and the window layer better.
size. This is used to
4.14.5 Nagle's Algorithm dies on congestion. The two
prevent the possible conf lt also helps us to find reme
usion if a window : k into . ues that are related
. .
,mpo rt nt network perfo rman ce ,ss
announcement gets lost. simple. \t ta es a
The Nagle ,s aIgo rtthm ,s very . . d to the congestion at network layer
f the sender an are :
Senders are not supposed to
transmit data as soon as account the spee d of transmiss ion o
. . t ansporting the data.
(G-616) Fig. 4.14 .2 : Windows managem 1. Throughput and 2. Delay.
ent in TCP the data is obtained from an the speed of the netwo rk which ,s r
application. The receivers
The algorithm is as follows : aT td ll- --
'1' Publ
\ca \lDl'I S

• • TecllKne■ l1d9ii
'Y' PU b 1 1 C il t Ions
.
• 1sern, 5/MSBTE) t cols
--~....,._;;,;,:i~~~~~!!!~....------....:~~----------.......
- ACN (Comp, /$em. 5/MSBTE)
Th .
4-26
_ .
~T~r~a~n~sp~o~rt~I~~
a
0

~ ~ = ~ : : : - ; ; : : : " . " - - - ~4~-2~7--------- - -T~r~a!!ns~p;:;o~rt~ta;:iy~o~r,!!Pr~o:o~~
-
congestion Control : The problem
e variation of these performance parameters with discarded packet 1s retransmitted by i 3. Congestion is caused by slow processors.
respect to load has been shown in Fig. 4.15.l(a) and (b) to the time out mechanism. Urce due j,1 · possible to completely avoid the congestion will be solved when processor speed is improved.
respect·,ve Iy. f \t ·1s not ssa['f to avo1·d 1t· ot herwise control ·l · uni·t time · If
•·· --- . No There ore increasing the load bey d . nece 1 Faster processors will transmit more data 1n
:~"--'.'° I [•
. rgesti~n '.:::r T:;~~ ~l _j'oon:a':ruooJ ~o~gestion results in the congestion of netwo:n the Capacity bllt it ,s . n will result in long queues, which results . several nodes begin to transmit to one destination
con9e st ' rf1oW and loss of packets.
0
•f- ''-·area

if t~i 1flI: j-!JJ1


· · __ r,__ CpngElstio,r , ··i' - ..._! ·area' •I •ama _- in simultaneously at their maximum rate, the d es"•·nation

j ' C• . 4.15~,;;o;~::::,• ;, ' ,w;«h;,g "'"°" ;, pack• :;;::::~::,'.:'.:;::;:;.~oo:::,;h•


"
tl, • :.:~::::,~:., ~"' U"'"'" '"""'
have any free buffers it should ignore (discard) new
_;?~~~!).',_) -~°'.'~,]: If an extremely large number of packet
s are presen . 15 3
causes of Congestion : packets arriving at it. But when a packet is discarded,
(a) Variation of delay (b) Variation of throughput
part
. .of .a subnet. the performance degrades t lh '" a 4, · the causes of conges t'10n are as follows : the sender may retransmit it many times because it is
OI
with load s1tuat1on 1s called as congestion. · is 5or11e not receiving the acknowledgement of the packet.
with load nly a flow of packets start coming on three or
Congestion in a network may occur wh ti su dd e . . Th' k ·11 f the
(G-2231) Fig. 4.15.1 : Packet delay and throughput as function en the load 1. ders which all needing the same output line 1s multiple transmission of pac ets w1 orce
the networl< i.e. the number of pack t on four sen · d
• e s sent to th ·11 b come long • If th e memory capacity congestion to take place at the sending en -
of load
network ,s greater than the capacity f e j\,en a queue w1 e
1. Variation of packet delay with load : (i.e. the number of packets a network c oh the network sufficient to hold all these packets, some of them 4.15.4 Difference between Congestion Control
an andle). is not . .
·"_ be \est. This is shown in F,g. 4.15.2(a). This leads to and Flow Control :
Consider Fig. 4.15.l(a) which shows that packet Fig. 4.15.l(c) explains the concept f ~ 111
o cong •
graphically. est1on congestion.
delay is very small when the load is much less than Sources Congestion control makes it sure that the subnet is able
the capacity of the networl<. This small delay is only Upto point A in Fig. 4.15.l(c), the number of to carry the offered traffic i.e. the subnet Is able to carry
· Packets
due to the propagation delay and processing delay sent into the subnet by the host is within th . all the packets sent by all the senders to their
e capacity of
both of which have very small values. the network. So all these packets are del· Main link destinations.
ivered. In she~
the number of packets delivered is pro . Router
However as the load increases and reaches close to port,onal to Congestion control is dependent on the behaviour of all
it number of packets sent and no congestion t k
the network capacity the packet delay increases a es place. the hosts, all the routers and other factors which reduce
I sharply due to the significant increase in the But after point A, the traffic increases too f the carrying capacity of a subnet.
ar . The
queuing delay. routers cannot cope with the increased tr•ffi
. " 1c and they On the contrary, the flow control is related to point to
begin to lose packets. The congestion beg ins here. (G-2232 \ Fig . 4.lS.2(1)
If the load is increased beyond the network point traffic between a sender and its destination. flow
As the traffic increases fu rther the per! Note that increasing the memory to infinity also does control ensures that a fast sender does not send data at
capacity, the delay will become infinite, and · ormance
congestion will result. degrades more and more packets are lost and not solve the problem, in fa ct it worsens. a rate faster than the rate at which the receiver can
congestion worsens.
2. Variation of throughput with toad : 2. Congesti on is caused by slow and low bandwidth links. receive it.
At very high traffi c, the pe.-formance coll apses The problem will be solved when high speed links Flow control involves some kind of feedback from the
Now refer Fig. 4.15.l(b) which shows that the completely and almost all packets are lo~t. Th is is the become available. It is not always the case, sometimes receiver, which can control the sending rate of the
throughput increases with increase in load as long worst possible congestion. increases in link bandwidth can aggravate the
Packets delivered sender.
as the load is less than the networl< capacity. congestion problem because higher speed links may
make the network more unbalanced. For the
4.15.5 Principle of Congestion Control :
It is expected that for any load beyond the
capacity, the throughput should remain constant. . -~A-~~i.'!'.~~ .':~rr_,:l!)_Q..
capacity of
-~---=-- configuration shown in fig . 4.15.2(b), if both the sources The solutions to the congestion problems can be
Instead it decreases sharply as the load exceeds subnet begin to se nd to destination 1 at their maximum rate, divided into two categories or groups as open loop
the capacity of the network. congestion will occur at the switch. Higher speed links solutions and closed loop solutions.
This sharp reduction in throughput results due to can make the congestion condition in the switch worse. Congestion control refers to the techniques and
discarding of packets by the routers.

As the load is higher than the capacity, the queues


t.,0 mechanisms which can either prevent congestion from
happening or remove congestion after it has taken
Destlnatlons place.
at the routers overflow and some packets must be Switch
The open loop congestion . control is based on the
discarded. Packets sent
prevention of congestion whereas the dosed loop
No
But packet discarding does not reduce the number congestion solutions are for removing the congestion after it has

of packets present in the network because every (G-473) Fig. 4.15.l(c) : Concept of congestion (G-2233) Fig. 4.l5.2(b) : Network wltll high speed llnlcs occurred.

.
":ill!' TedlKne■IMlt
~~
.
P u!Jl l till l OnS
.Ttdlht■INte
i ~~~A=C~N~(~~::·':Sem~~-5/M~SBT~iE>!..,._____
Rg. 4.15.3 shows the d 'Ii .
4-28 ...,;~!..,.--------..!:=~~~
ass, cation of congestion control Open loop - . cloNd loop :
Transpor1 la er
rot~

f.. f>.
cN (corn .
p /Sam. 5/MSBTE)

etransmission policy deals with how f


4-29 Transport layer protoeols
schemes and va · , •
The r . an a
1
nous po •oes used in open loop and sen de
r times out If a sender times out eart th .
Y en,t A good discard policy can prevent cong est'1on and a bad
.
dosed l00p groups. Open loop approaches do not need end-to will retransmit all the packets and such one will worsen the situation.
~control feedback, one of the examples of this type are ·end nsrniss1on can lead to congestion 4• Routtng algorithms :
retra ·
I reservation and hop-to-hop flow control. Pnor. designing the retransmission policy we can
Open loop 90IUtiona Closed loop aolutione In closed-loop approaches, the source can adjust its BY
avoid this an d prevent congestion.
. The routing algorithms can spread the traffic over all the
r
=t
I rate on the basis of the feedback information recif tell lines. By doing so it is ensured that none of the lines are
f order caching policy :
Aetran.
rniee1or,
P<>icy
J_
...,.,_,
~,
l
Ac:knowteo- ~ i
Oiecan:ltng
Admisoion
policy policy
from the network.
Some people feel that closed loop congestion
"'ed
2-
outo overloaded. This will certainly avoid congestion.
If the receivers routinely discard all the packets S, Paci!age IHetime management :
schemes are too slow .m today's high-speedcontroi which are out of order, then retransrnission of
Bacl< Choke Implicit Expflcit
range network. Because it takes a long . , large these packets will take place. This will increase the This policy decides the maximum time for which a
1•rne f
pressure point aignalng signaling feedback to go back to source. Hence bet or \oad and result in congestion. So a selective repeat packet may live before being discarded.
(G-476) Fig. 4.15.3 : Classifia,tJon of congestion ore an
corrective action takes place thousands of packets ha/ (retransmission) should be adopted to avoid This time should be of adequate value so that
contro1sct..,._ been already lost. e congestion. congestion can be avoided.
Open loop control : But on other hand, if the congestion has already k owledgement policy : Pollclea related to transport layer :
place and the overload is of long duratio taken 3
_ /t.C n
Open loop solutions try to solve the congestion issue n, the If each received packet is promptly acknowledged - The policies at the transport layer are same as those at
congestion cannot be released unless the
by excellent design to prevent the congestion from causing the congestion is asked to reduce its rate.source then the acknowledgement packets will increase the data link layer.
happening. the traffic.
Furthermore, ABR service is designed to us But at transport layer determining the time out interval
e any
If the acknowledgement is delayed (piggybacking) is more difficult

D
Open loop control is exercised by using the tools such bandwidth that is left over the source must have sorne
knowledge of what is available when it is sending cells. then there is a possibility of time out and If it is too short then extra packets are sent
as deciding when to accept the new packets, when to
retransmission. unnecessarily whereas if it is too long, congestion will
discard the packets, which packets are to be discarded 4.15.6 Congestion Prevention Policies :
so a tight flow control has to be exercised to avoid · reduce at the cost of increased response time (network
and making the scheduling decisions at various points.
In this section we are going to discuss the open loop congestion. will become slow).
It is important to note that none of these decisions are congestion control systems.
4_ Window policy : Traffic shaping :
made on the basis of the current status of a network, as
These systems try to avoid congestion by using the
no feedback is being used. The type of window at the sender may also affect One of the important reason behind congestion is the
appropriate policies at different levels.
congestion. The selective repeat window is better bursty nature of the traffic. U the traffic has a uniform
Clo9ed loop control: Fig. 4.15.4 lists various policies corresponding to than the Go Back N window. · data rate then congestion would not happen every now
different layers for avoiding congestion. and then. But due to bursty traffic it can happen
The closed loop congestion control uses some kind of Layer Policies related to network layer :
regularly.
feedback. It takes into account the current status of the Choice between virtual circuit and datagram, :
1.
network. - Traffic shaping is an open loop control. It prevents the
Data link layer Netwol1< layer
·, policies policies
Transport layer This choice at the network layer will affect the congestion by making the packet transmission rate to
A closed loop control is based on the following three policies
i congestion because many congestion control
steps: 1 . Retransmission
i i be more predictable (bursty traffic is unpredictable).
1. Virtual circuit 1. Retransmission algorithms work only with virtual circuit subnets. 'Thus traffic shaping will regulate the average rate or the
2 . Acknowledgement versus datagram 2. Out of order caching
1. Detect the congestion and locate it by monitoring 3. Flow control 2. Packet queueing 3. Acknowtedgement 2. Packet queuing and service : burstiness of data transmission.
4. Out of order 3. Packet discard 4. Flow control
the system. Monitoring a traffic flow is called as traffic policing.
caching 4. Rou1ing algorithm 5 . Time ou1 This policy is related to whether the routers have
2. Transfer the information about congestion to 5. Packet lifetime determination Check if a packet stream (c~nnection) is as per its
management one queue per input line and one queue per
places where action can be taken. output line or both. descriptor, and if it is not as per its descriptor, then give
(G-477) Fig. 4.15.4 : Policies affecting the congestion
penalty\
3. Adjust the system operations to correct the Pollciea related to data link layer : This policy is also related to the order in which the
_ In order to achieve this the network may want to
congestion. packets are processed e.g. rou nd robin or pnonty
1. Retranamlulon policy : monitor the traffic flow during the connection period.
based etc.
Two examples of closed loop control are : ,he process of monitoring and enforcing the traffic flow
The retransmission policy and the retransmission 3. Discard policy : is called traffic policing.
1. TCP flow control. timers must be designed to optimise efficiency and
. h tells the routers about
2. This policy lays a rule whic
BR rate control for an ATM network. at the same time prevent congestion.
d
which packet is to be discaf ed.

• TecllllntwlNti
. . PU b l IC ;It Io ns
~,s~e:!m::,-;.;s~tM:::,S~B;:,T:,:E;i)_ _ _ _ _ _
•...
•..,A.c.,N;,;.,:(C,;_om;.:.:i;:p~.1;:;S::e::;m,:;.~5/M =S:: ;B!, .,(comP· ~ _,.:4;·3~1~--- ---- --~T ~ra :n~ s~p
o~r t~la •ye. r.., Protoeols
!T,;E l)--- ----~4;;_3~0~----------.:T.:;ra:::, ~G•• _ __
n:;:s~po~rt,:.1;:a~ye:rJp:::ro~t the size oI wm . d
ow as per the AIMD rule
The types of penalties enforced are as
1. Drop packets that violate the descr
follows : Step 2 : Try to prevent congestion : ~ 1C
p adjusts .
estion window 1s mamtamed in additi .
. . 4.16. 1 S\ow Start A\gor\thm :
, I
iptor. ,on9 on to
1. ' . .
I
2. Give low
After establishing a connection, a suitab
le window . °(l'e contrO' window (.Which specifies the number Alter establishing a connection, th e sender initialises the
priority to the packets violating the is to be chosen. The receiv . . d . . the
descriptor.
er wm ow size 1s based s1ie. the ii~ h t the receiver can buffer). .
congestion window to the size which is equal to
buffer capacity. If the sender adius . . on •ts of bytes t a h
. ts its transm· . . . maximum segment in use on t he connection. lt t en
. . .
4.16 TCP Conges rate according to this capacity •ss,on
as shown m Fig. 4,lG.l(a) h these windows are considered simultaneously sends one maximum segment.
tion Control : the congestion due to buffer overflow sot indows indicate the number of bytes •
will never t ' oth the w . the II this segment is acl<.nowle dged by the receiver
We have already discussed the reasons place. ake 6 y transmit and the number can be differ
of congestion in nder ma ent indicating no congestion, . . dd bytes corresponding
networks and the Internet is no excep Now consi der Fig. 4.16.l(b). The sender is slow, se the number ol bytes that may be sent ,t a s
tion. So there are tne by the to one lull segment to the congestion ·
congestions occurring on Internet too. receiver has a large buffer capacity but
1tierefore
. the minimum ol the two wmdows .. . window · So now
the problerri is nder 1s the congestion window size . . I to two maximum
The network layers detects the congestion low internal carrying capacity of the netw • 1s equa
by looking at ork ttective window .1s t he m1mm . . size segments. The sender then sends two
the growing queues at the routers and If the sender is too fast, the water tne e um ol what the segments.
tries to manage will back up and SO d the receiver both think is all right.
it by dropping packets. As each of these segments is ackno
some will be lost (loss of packets) and sender an wledged ind icating
congestion Will
take place. eat1on control : that there is no conge stion, the size of congeSt ion
The network layer has to give feedback c,dtl'fl c:on g
to the transport ~~ Transmission rate window is increased by one maximum

~i
layer about the possible congestion becau ~ I.I congestion control was added to KP segment size.
se only then adjustment t,1odern in 1988 This is shown in Fig. 4.16.2. 'This is
the transport layer can reduce the sende the exponential
In the Internet. TCP plays a major role
r's data rate. Send;;i Sender throug
h the efforts of Van Jacobson. ln 1986
due to growth of the congestion window size.
congestion. A control law called
Increase Multiplicative Decrease)
response to binary congestion signals
in controlling
AIMD (Additive
can be used in
; b) ~
received from the Network 0
0
grow1n
coll•P5
. g number of Internet users the first

Jaco bsO
e took place. As a response to this
n approximated an AMID congestion
congestion
collapse
window
When the congestion window is of n
segments are acknowledged before
place , the congestion window is increa
segments, if all n
time-out takes
sed by the byte
network. According to this law, O ded it to the existing KP .
an d ad count corresponding to n segments.

~
in response to 91
congestion signals the transport ~ While doing so he made following
protocol should Receiver with 'out there is a limit on the expon
entially growing
converge to a fair and efficient bandwidth small butter capacity Receiver With congestion window. The congestion
allocation. considerations : window stops
TCP congestion control is based on this large butter capacity
approach using _ ,he rate at which the acknowledg growing as soon as either the time-out
(a) No congestion (b) Internal 1 emen ts return to occurs or the
a window and with a loss of packet receiver's window size is reached.
used as the binary (G-611) fig. 4.16. 1 : Congestion the sender is approximately equal to
signal to indicate congestion. the rate at
Conc
lualon : which packets can be sent over the slowe \I the congestion window can grow to 1024
st lin\r. in ll Ir.byte)
Prlnclple of congestion control : byte, 204S byte, but a burst of 40% bytes
To prevent congestion TCP has to the path. 'This is the rate a sender wants gives a time-
deal with two to use to
The basic principle is do not inject out then we have to set the congestion
a new packet into avoid congestion. 'This timing is \r.now window at 2048
problems separately - receiver capac n as A.CK
the network until an old one is delivered. ity and networl< in order to avoid congestion.
capacity. dock and it is an essential part of KP.
Using !>.CK
TCP tries to do this by dynamically Once this is done, no data bursts longe
adjusting the Solution: clock 'TCP smoothes out traffic r than 204'o
and avoids bytes 'Hill be sent by the sender even ii
window size. The steps followed receiver grants a
in achieving the congestion.
To deal with the two problems ment wider window.
congestion control in TCP are as follow ioned earlier each
s: sender maintains two windows : 2. 'The second consideration was that !>.MID rule will ,he name of this algorithm is slow algor
the window the ithm and it is
,, Step 1 : Detect the congestion :
receiver has granted (which indic
ates the receiver
take a very long time to reach
the desired required to be supported by
all the TCP
I/ This is the first step in congestion contr
ol. Now-a-days capacity) and the congestion window
(which indicates
operating point on last networks it the
congestion implementations.
packet loss due to transmission the network capacity). The first windo window is started from a small value.
errors is very rare w that indicates ,he start up
4 _16 _2 \nternet Congestion Contro\

t because the optical fiber links are being the receiver capacity is called as time can be reduced by using a
used . So most the flow control large initial Algorithm:
transmission time-outs (loss of packe window. window. But a too large starting windo
ts) are due to w would
,ill now only two parameters have been
congestions. The size of the congestion window cause congestion in slow or short links. used namely
is equal to the
number of bytes the sender may have receiver window and congestion windo
in the network at l-lence Jacobson mixed both I.mear nd multiplicative w•
So all the Internet TCP algorithms a
assume that time- any time. Hence the corresponding 'out in the algorithm we are going to
sending rate is . . . his solution to resolve discuss, a third
outs are caus ed by congestion and
so time outs can be equal to the ratio of congestion wind
increase in the wmdo w size '° parameter called threshold is used.
used to dete ct the congestion. ow size and the congestion. 'This modi.fied algo rithm is \r.nown as the
RTT of the connection. Initially the threshold is set to 64 kbyte
slow start algorithm. .
• teclllluw\Kte
~ub llca\\ O f\'>
WTe dllla t_... ..
'V Pub \ \catl ons
-s•r; ~.cN ...,,. 11 (CornP·
,sern - s/MSBTE)
te I?
4-33
T ran sport 1~ tocols

k before timer goes


.,,... ._A._C__N..(=C.;::o.:,:m:.::;,p·;.;'.;:;S::;:em;.:,.~s~/M:S~B~T~E;.!.)= = = == ==~4-:;,;3~2~==== ==---=-"'...;;T~ra;;_;n~sp~o~rt~la~y:,er~p~roto
--= If the acknowledgement returns b ac
Co~ , 'Cf, r time-out In rva
th8 . k
by the ACK (say
When the time-out occurs, the threshold is set to h~lf of Then the conge st ion wi nd0 w grows expone ~1- ' h0 uld be out, then TCP measures the t,me ta en .
n 1a11y . ts · b h · · • g the followi ng
the current congestion window i.e. 32 k bytes and the the congestion window size reaches the threshold Iii[ l'I~' ost important question a out t e re-transmission R) and adjusts SRTT to a new value usin ·
co • 32 k. Of The rn long should the time-out interval be ?
ngest1on window is reset to one maximum segment. . er is that hoW . __ _ equation,
urn th"is question is difficult ,n the transport ... (4.17.1)
The The threshold occurs at 32 k and the . SRTT = a SRTT + (1 - a) R
I
sow start algorithm is then used to find what the congestio" answer to
window grows linearly after this point. '' The
can handle. But most importantly the , ared to that in the data link protocol. Here a is called as smoothing factor. Typically
network th
The time-out occurs as the 13 transmission Th \ayer as cornP ·
exponential growth of the congestion window is · erefo, h ws the probability density function for the a = 7/ 8.
the new threshold is set to half the current window . e . 4_17.1 s 0
st · · ·1 is not easy to
1
opped as soon as it reaches the threshold. at 16 k) and slow start is initiated again. The pr (1.e_ fig- k by data link and TCP segment Even if a good value of SRTT is given,
ocess \'if time ta en
repeat thereafter. '1 wiedgernents. choose the time-out.
After this point (threshold point), the congestion
• ackno . . . .
In the initial implementations of TC P the value of SRTT
w, nd0w grows linearly (and not exponentially) by one If no more time-outs occur, the size of co . . g the Round Trip Time (RTT) to destination 1s
. . .
. . ngestion 0eterm1n1n TT But practical
maximum segment for each burst instead of one per window continues to grow upto the size of th . . and even if we know ,t, deciding the value of was chosen to be equal to 2 x R ·
1
window. e receive, not s1rnP e observations showed that such a constant value was
segment. This is illustrated in Fig. 4.16.2. time-out is difficult.
not nexible enough in the events of increase d loads.
.1 Table 4.16.1 is used to plot the graph of Fig. 4.16.2. See 4.16.3 Congestion Avoidance (Additive Refer Fig . 4.17 .l(b). If the value of time-out is too small
When the load approaches capacity (maximum value);
how the threshold point acts as the boundary of the Increase) : (T, for example) then unnecessary re-tra nsmission will
I exponential growth and linear growth of the congestion take place. If time-out is too long say T2, then the
the delay becomes large and varies to a large extent.

In the slow start algorithm discussed earlier, the size of performance will degrade because re-transmiss_ion will This can initiate retransmission when the original packet
window.
the congestion window initially increases exponentially be delayed for the long time whenever a packet ,s lost. is still alive.
(G -619(a)J Table 4 .16.1 (upto the threshold).
The solution to this problem is to use a highly dynamic Jacobson fixed this problem by making the time out
~ Th reshold Time-out

Transmission
1 2
l In order to avoid congestion before it happens
, we have algorithm
which adjusts the time-out interval value sensitive to the variance in RTT as well as the
nuni>er 3 4 5 6 7 B 8 10 11 12 13 14 to slow down such an exponentia l growth. constantl y. This adjustment is based on continuous smoothed round trip time SRTT.
I ~ongestfon window
II 2 4 8 16 32 33 34 35 36 37 38 38 40 TCP defines another algorithm called measurement of network performance . In order to implement this change, we need to keep
''i kilobytes congestion
. T T,
I
,I '----v avoidance which is based on the principle of dd"rt~ track of another smoothed variable called RTTVAR
Exponential growth " ' . a
0.3
03
Linear growth increase of the congestion window and (Round Trip Time VARiation) which is updated by the
44 iir· t j InJ:
•J Linear growtl)-.
i!ll
,._ !Time-out ] j
1
I exponential one.
not the
following formula,
40 -1 •,-rpf 1
C0ngGStiO~ ..
" :-J-JI___II _· t 1- ,-

·r+r:~:r1t~-,~-. B(RTTVAR)
I'·. ~ 02 RTTVAR = + (1 - ~) \SRTT - R\
! When the size of the congestion window rea ches the ~ 02
-i-1- ... ' 1 j\
38
rf- 'I' slow start threshold, the slow start phase will stop and 'li

I I ... (4.17.2)

--r.!i::r··'... J"; 1/'reshold


32 additive increase phase begins.
The typical value of fl = 3/4 . The retransmission timeo ut
·i:., -+ H .
0' 0'
~ 28 --·1' · ,-
In this algorithm, correspond ing to every RTO is set by the following expression,
'l I . --: r, ! 1 •
acknowledgement, the size of the co ngestion window ii
Round tn,:,

f
,i
.c 24

120
I
-r' ·:·
I i -.
increased by 1 as shown in Fig . 4.16.2.
,o 20
l ime (ml&C)

50
RTO = SRTT + (4 x RTTVAR)
The choice of multiplying factor 4 in the above
... (4.17.3)

Id
I
i {b) For TCP expression is arbitrary.
4.17 TCP Timers: {a) Data link layer
? 16 -'-1- '.-----
tG -620) fig. 4.17.1: Probability density of acknowledgement The retransmission timer is also held to a minimum of 1
t 12 --LL- ,;c_ Exponential
second regardless of the estimates. This value is chosen
§, ! f j : growlhof arrival times

8: t r. l ~ r r r wl~o,w
The TCP, at least conceptually uses more than one
timers. But the most important of them is the 4.17 .1 Jacobson's Algorithm:
on the basis of measurements to prevent spu rious
retransmissions.
' I
1-
' i
r
I -· ~--/-·-
Re-transmission Timer (RTT). This is the algorithm, generally used by the TCP.
For each connection, TCP maintains a variable Round 4.17.2 Karn's Algorithm :
8 10 12 14 16 18 20 22 24 This timer is started as soon as a segment is sent. The
(Transmission number)
timer is st0 PPed if the acknowledgement Trip Time (RTT) which is also called as SRTT (Smoothed A problem in Jacobson's algorithm is that of measuri ng
J Round Trip Time). Its value will be equal to the best
(G-619) Fig. 4.16.2 : Internet congestion control algorithm corresponding to the sent segment is received, before the value of R (ti me taken by th e ACK), when a segment
Th · the timer expires. current estimate of the round trip time to the desired times out and is sent again.

1 I . e maximum segment size here is 1024 i.e. 1 kbyte.


nit1a/ value of congestion window was 64 k, but time-
out occurs. So threshold is set to 32 k and congestion
But if the timer times out before t he arrival of an ·ack'
signal then that segment is re-transmitted and the
destination.
When a segment is sent, timer is started. This is to
This happens because when the ACK co mes in, it is not
clear whether it correspond s the original t ransmission
measure the time required to receive ACK and to or to the re-tran smission.
window to 1 k at 0. (Odgina/ point in Fig. 4.16.2) timer is started again.
trigger re-transmission if ACK takes too long to come.

V Tec11Kn1■ld9e
VPu b llc at lo ns
':'I'.?;.';;,,::

,. ~,·
~. ;
ACN(Comp. /Sem. SIMSBT
E)
Trans rtl 4-35 Transpcrt la er protoeols
If the guessing goes wro . a er rot
ng it can seriously affect the4.34
~
value of RTO.
It lhe round lrtp lime Is 30 msec a A~ ·
byte 0 puons NOP : 3 - byte opuon
- Phil Kam made a simple r nd

.,,u1t1P e · fi1ve types of
contain O 1•
Ex. 4.17.1: acknowledgemenls come In after 2 fo11n. ..
"""~Q
1
111• el : ,v1axil1'um segmen t
. . p ,ans NOP·. '.tiOl''.
He, suggest ed not to u p opo~I to sotve s,ze, window scale factor,
this problem . 24 . msec respectively' Whal is lh 6, 32 10-byteo pt/on
that have bee 8 "'1(1 ~•fl' Y SACK-permitted and SACK as show .
pdate estimates on any segments eslunale using lhe Jacobson
is doubled on n ~h~transmitted. In addition algon1h new .,,.,._
,' r tifl'estafl'P•
eac successive re· t
the timeout
. . Assum e suitabl e value of a. m7
n in D•"'
segmen ts get throu h f ~ansm1ss1on until the fi9· 4.18.1•
This . Soln.: End ot option list (b) Used to align t,eginning of
g or the first time. (1) NOP option
is known
implementations as Ka .
use it.ms algorith m and most TCP RTT = 30 msec, M = 26. 32, 24 msec No operation an option
Gfvwn:
Choose : Maximum segment size (G-2039) fig 4 .18.3 : No ~ o n option
a= 7/8
4.17.3 Other Timers In TCP : Window slze factor - From Fig. 4.18.3(b) it is evident that we can use
1. For M = 26 moec : the NOP
1. ,,.,._, ._tim er: Tlmeslamp option more than once.
D aD+(l -a)/RT T-M/ SACK - penn~ted
The second timer in TCP - 4,18,3 Maximum Segment Size (MSS) :
limer. It is designed (1-a) D (1-a) I RTT-M I SACK
,s called Pff5ist entt
problem : to solve the following Fig. 4.18.4 shows the format of this multiple
D I RTT - M I = I 30 - 26 I (G· z<>37l Fig. 4.18.l : ~ogori es of options byte
option. MSS option is used for defining the size
l. The receiver sends an A 4 msec Lei us discuss all these options one by one. of the
size = 0. So the sen . biggest unit of data which a destination of
CK with window a TCP
receivers buffer to : . Time out RTT + 4D
der will wait for the _ _ End of Option (EOP) : segment can receive.
2. After the - have some free space.
receiver buffer b
30 ms + (4 x 4) = 46 msec 4 18 1 The name of this option is slightly misleading,
empty it send EOP is a 1-byt.e option. 11 is used when padding because
. ecomes partially 2. is to be
s a window upd t For M = 32 msec : it actually defines the maximum size of data
done at the end of the option section. and not the
3. sender asking it to send a e to the
D /RTT-M / EOP can be used only as the last option. It is maximum size of the segment.
But the packet cont~inin allowed to
. . From Fig. 4.18.4 it is seen that this field is l&-bit
update is lost on its g this window occur only once.
4. So both I 3o- 32 I = 2 msec (2 byte)
way to sender. once EOP is received , the receiver will look long. Hence the value can be O to 65,635 bytes.
for ever. sender and rec e,ver
. _ Time out RTT for the
will be waiting + 4D
payload data, as shown,._in...F..ig;..,._4_.1_8_.2.,,
. _..,.. ..,..-- ' l(lnd : 2
To solve this problem, the .
used. If it goes off. then sen persisten~e
30 + (4x2) = 38 msec t~a~go~ ·
% 3-byteoptlqll • ¾\ eoP
00000010 -
u,ngth: 4
0()()00100 - ·
- ~·
~ m ~ ~-=-
timer is 3. For M = 24 maec : ~1-by te-.+-- 1-byte _,.i --- 2-by\eS
to the receiver. Data ::::...-- .\
der transmits a probe
(G-2040) Fig. 4.18.4: Maximu m segmen t
D IRTT-MI sa.e option
The receive
this probe. r sends the w,n
. d .
ow size in response to I 30-24 / = 6 msec
During the TCP connection establishment, the
MSS is
(a) End of option 11st (b) Used tor padding defined by each party, for the segment it is
going to
- . w,
If the ·ndow size is still
Dmer is set again and th
zero the
.·. Time out 30 + (4 x 6) = 54 msec (G-2038) Fig. 4.18.2 : End of option
receive during the connection.
n the persiste nce The information given by EOP to the destinat
window size is nonz he cycle repeats . But if the Optio ns: ion is as If a party does not define MSS, then its default
value of
IC ero t en sender can send data
follows :
2. eepallve timer : We have already discussed the TCP h d 1. EOP tells the destination that there are no
536 is used.
· . ea er which. more The value of MSS which is fixed duting the connect
contain the optiona l information of upto 40 ion
This is the third timer in TCP I . Th b can options in the header.
connec tion is idle t ytes. established cannot be change d duting the connect
Wh
I . . t is used when a 2. The beginning of the next 32-bit word ion.
or a ong time. e options are there to provide s is the
informa tion to the d . . ..
en a connec tion is idle for ome add1t1onal starting point of the data coming from 4.18.4 Window Scale Facto r:
estinat, on or for aligning other the
Keepalive timer may o off a v~ry long time, the
to check if the oth gd . . This w,/1 cause options . application program. We have seen that there is a field called window
one side size
er s, e ,s still there
field in the header which defines the size of
If the other side does Types or categories of options : 4.18.2 No Operation (NOP) : the sliding
. window . As this field is 16 bit long the window
connec tion is termina ted. not respond, size can
then the The NOP option is also a 1-byte option. 11 is
The options can be of two types : used as a
filler by including it before another option range from O to 65,535 bytes.
3. Timer tor TIMED WAIT state: to help in
1. One byte options or The window size of 65,535 bytes appears
aligning it in a four word slot to be very
. .This timer is used in the TIMED 2. Multipl e byte options . large but it is not actually true in practice
This timer is set to a t'
WAIT state while closing To underst and it, refer Fig. 4.18.3. The NOP . Even this
/if. · is used for window size may not be sufficient especially
et1me to ensure thime equal to twice th The
f one-by
. te options can be of two ty pes namely : if the data
· k e maxim um packet· .
end aligning one 3-byte option (like window scale
factor)
pac ets create d by it die at after closin . is traveling over a long channe l with a large
off. g a connec tion all the o option list and no operati on. bandwidth .
and one 10-byte option like timestamp.

.r.toc kl........ .
Ttd!K11 ■IH1'
• ,utill c;a t \ Ol\'i

• P u 1>1 t ca1 1 ons
V" 4CN iCom; 4-.J6 , ,i.CN tCOniP ,
/Sorn 5/MSBTEJ
4-37 Transport layer protocols

!tied option :
Appllutlon, :
s~CI< .perrn
t\ -__rCP_-::--_
I\ \ I ;("

ftnthr :, f•f ! ·\ •1d t-~ 1<,~f-i\ f f-'\ i l, ,;r, \1.' \.'\' (' t,)11 l
IM"' t h e - l"he two po, ~•bl~ ~pplicM"ions of l im~~tan,
.
...., 11 in f ig . 4.18.7, the SACK · permitted cptc?n IS i ~~'
\--a-.:~=~.,.~lvth. . \'. . _ _u_o_P___
A' ~hu•·
p OJll ,r.,~
w indo,." J.<• lf'I f eet Of : h.~ c11'1 J'<' L;\..,"t:' .ii:i 9 Yi"n ,n tho , byte le ng th. This opt,on is used only durrnn tl 0
r,·•.-. and Unreliable , test-eff o rt Reliable delivery
as tcllowj; Ir!
d~ - ~~ '\ "E:.::...:...,,,
f-o 1k ..\ I:'.() C'l j'. !•f"• ·\ •,
f on e~tabll sh ment. ,_, ,__ . of messages ; a il
n:s de'.i-, ery without
r

l l o n1ca,, ,re the round 1rip lune (ll"J l) connet , ~,..l'~~


I 2 To prev~ 111 wrap Mound ~equen(c nunib~,,. f he host sending the WNsegment include\ the s...o: _ \. ad<JlOWle<igments data
acknowledge d.
is

·t·ted option mto 11 to announc,, its suppo~ •• h


pern11 . ' • .,_, I. e
Kind 8 Lllllj_Jlh : 1O Rstrana,n:s ~ performed. \ Delivery of a ll
i hiF ~,-.rn,"-~\ '-'' • ·iodow.· R'Ja. fac-tot op tion ha ; been ,, permitted option . t-W.
00001 000 0000101o SAC~·
l5 ~ , ~lio<"I must data is managed,
d·tf' i \ . ,'.-:,. 9 ,:
I Tlmeslamp va lu i,
If the destination host also includes this o.-tson in it; \ ' :!i;'.EC: lost data and \ and lost . data IS
,;-ti.. i I TimeSlllmp echo reply
l r ... SYN ,.. ACK segment, then both the hosts c.an use th.t:: r~trans."11! if mledec. retransmitted
Jr'-~ vo , 1
(G, 20U ) Fig . 4.18.6 : Format of timestamp option SACK option at the time of data transfer. , automatically .
. ---i
·1. =~• F,g . <1..11 S : ~ t or window•~ t1ctor 4.18.6 SACK-P ermltted and SACK Options :
...
It is important to note here that TCP cannot u~ the
SACK _ permitted option during the data tra nsfer phase, to
\ Flow
. using
control
sliding
r.'1-r "'· :, f· .·,c"":"",~ •"f ,-.;:,a; p f ,g1{ ~01 shift count ~ · ause Mar.a-::...;; Flr.JH c! windows: window
f (,
- It ha s been di scussed earlier that, the acknowled
9ement T!l8 SACK option : lhta ; size adjustment
~ tt' 1ra!.PO, bv i. r~ c-qu-·,.:11 '?r t ·re ~h ,'tmg the n umber
-,.... fie ld in TCP segment has been designed to w ,.
or" as a used · heuristics;
~ "'Q -:"I "' t·n ,f:',--: :c ic-; ~ t"r ._"tn-e p oS,1t1on accumulative acknowledg ement. n _ lf both ends agree then the SACK • option can be 1
' C0<1Q8Stion
only during the data transfer phase. The SACK option is 1
A.:. ,.~\It..,, '" F g 4 l S S. the 11<c'1te fa~ o, is an 8-b,t - That means it reports the receipt of the last con
1
av oidance
secutive of variable length. a:gomt1ms.
.. ... - ~• :-''-;t:1t'"'tq? ts ,.,.~):' r.i....:l"i \ 0 1ut c.an be 25 b)'le. It does not report the out of order arrived b
S. But Yles o, Omt,s.a-:
the du plicate segments. Alist of blocks arriving out of order at the destination is , Loo,.·, but higher
·-e- -~~9c~ f ,a'. .;e ;:- 4 ~aie ' ar~or ~r ~-ro by TC P1lP is
- included in this option. Each block is 32-bit long and , &er,UDP
This will affec t the TCP performan ce adversely
· 1n case Trans:nission Very t>'--,_;-, i-".;gh, but not as
some packets are lost or dropped, the sender w·ii . define t he beginning and end of the blocks.
ize in
1
wa,t :,cSpe _ ._ _ _ _ _' _ _ _ _ _ _ _ _' _iligh . '-- _U_D_P_--j
as
we can use the first block of SACK option to report t~
...;:
till time • o resend all the unacknowledg ed
eea
....c....
ut and 1
packets. Thus recei ver may receive duplicate packets. duplicates. I D-&! 0.Er.tiy Smc!i t:i m::.1a.,7.E ·. S1na.~ to very
I
This degrades the performance of TCP. !Su--zrm1 1
a=.m:s ci 02"3 (up laige arnoums of
- The selective acknowledg ement (SACK) option Was
4.19 Comparison of UDP and TCP : : tn a iew ~ d clala (up to
':'1-i"S :":"t.a)..·~- ....... w ,n d ow !.:: t c f 2 ~ b 1 ~5- is less tho n the i;.igabytes)
O"'f!SS)
t-1~''7' U-, \ ra lut'" cf SE"qlJftn ::'.E' 'l. . , . ~ f. ft ~ import proposed to i mprove the performance of TCP. ' Characterist ic / l
ant to Types o' •Aj:v::icat,oo,s ~re lkst
protocos
1
~
UDP TCP
,.,..,,f'T.bc,! ~..,t the ..,,,noo..., si: e <-an never ti<> g - In this new p
roposal -a list for duplicate p-ackets is also L,_:Oe.:.s::.:c:...r...:.lpt_l_o_n_+-- - - - - - - ; - - - - - -\ ~ To?!icat.3 soeea and applications
reJter
~~n
included whic h allows the sender t o resend only those General Simple, high-speed, Full-featured rr.a..':ars l"llOfS :hall sending data that
t hE i- .i.ax:;""" ..;m \ Ah.r~ o f sequ~nce nu mber. I USe T!1E Fr:::~co.( I
segments which are reall y lost. Description low-functiona lity protocol that , ·. ~::ress. ..,ne,e
must be received
!! •s z :~ po~i;,!:) r tc obta,n trlt> window scale facto r only "wrapper" that allows I Sl1'ai a;nc;st's oi cia!:a \ reliabl')', inck:lding
- There are
two new options proposed by this. new 1o\
dur·ng t h e- Contat'("!Jon .estabfishrne·,: ~ hase. interfaces applications I ar: ~ -;: o; v.terc \ most file and
proposal. The
y are SACK • permitted and SACK and applications to the send data reliably I1 I rruSc-cSl: broaocast message transfer
If one e·,d se:s :he \·al ue of window sc.;Je factor to O. their formats are as given in Fig. 4.18. 7. network layer and without WO!T)'ing 1 ' ' ere used. ; proi()c04s.
oetv.m \\l - - - - - - - - - - - - ' - - - - -~ I
~tr"" '1 means tha1 the p.m,cular Md supports
this l- Kind : 4 I l ength : 2 j does little else-. about
. I W~..i , ~-&ala IFT?. Telnet.
op: IOfl. but doa l'IO l want to ui.e a SACK · permitted option __
1----- -Jf---- ---,i-! a.:.ye_r_,ssues . _ .'\ ~ m:i ; 4 ¢,cat,~. is. DNS. \ SMTP, ONS.
' Pro~ SCOT?. DHCP. 1-ITTP. POP.
Kind : 5 Protocol Connectitmless; data Cormectior,-
4.18.5· Timestamp : Length .
.I • TFT?. SN.1.',,C. RlP. !\ NNTP . lMAP.
st
Connection Setup is sent without setup. oriented ; 1
Left edge of 1 block
conneclio,'l must NFS (e-=-ify ¥;!~)- BGP, IAC, NF~
4 st
Fig. l.S 6 shows the format o f the 10 byte lo ng Right edge of 1 block
be es~ '-, _____ _ 1- ----- - - - - - '\r(l_a_ ) ._
_._ons_
ve_l"Sl
te_r_
thnestamp op ic, 1
11d wi th .3d i.-e open wcuid announce a timesta
prior . .
transmlSSIOfl. ti) I1..=:::::..:::::.:::.:::..__.:.....:._ _ _ _....,___ _ __
Erro; OOJC"JI
7
On.'y Ci~,~ - \ Provided.

Die " mp
l eft edge of ri th
block \--- ---1--- - - - ~t-- --:-- 4.20 Stream Control Transmission
in its connen ,on request seg m 1::n t 1.e. SYN segment. Protocol (SCTP) :
1 Data Inte rlace To Message-bas ed: data &raam-oased:
If it r eceivesrimemi mp in ner1 segment (SYN • A CK)
;i
Right edge of n h block
SACK • option
Application Is sent In discrel& dala is sent by '
ackages by the lhe appi.ic,at,00 , SCTP i~ a new transport lay~ protocol. The multimed
from the ot her end only tl,en rt can use the timesta mp, P ~r
(G -20• 3) Fig. application. wi th no pa · a.'ld steam tra ffic i; increasing day by day on i '
other.1 ise it c.inn o 1 u se ;1 any m o re. 4,18.7 : Fonnats of SACK-p~rmltted
strucrura.
- --- and SACK options
lntemet
v tedlhtlll.et
• •• hrhKno■114ti
,r.· ✓ ~· ________ ort~la~y;e,r;.:;,Pr;.o;,;;tocoiiiiii1111ls•
_~T,:;ra;:n:s~p,:;:,
If.' (Comp. ISem. 5/MSBTE)
4-38 Transpo rt lay erprot
,e:.;/~se~m~-.;:;5::,:IM;S;;;,B;;;;;T.;.E;;;)_,........_..__ ,.,.,___4,;.·~39;......
N (ComP·
to process Communication: In SCTP, each connect ion is called as an associat ion.

7
i. SCTP is a general purpose tr ~s p.c
./ which is designe d t 0 h ansport layer protocol 4.20.2 TCP Performance for Internet proces5 Thus each association consists of multiple streams.
nd Applications : n1,1
traffic. a le the multimedia and stream 4·" k own ports in the TCP space are used by
e well n :
All th . uses some extra ports as well which have · 4.21.3 Multlhomlng
SCTp · . Some of importan t desirable features 0 f cTP sut i 1
is a new reliable Tep are as
protoco l. Th . '. message onented transpor t layer follows : S . . d in Table 4.21.1. Assume that the sender and receiver hosts are
been 11ste ed to
e position of SCTP is between th e Table 4.21.1 multiho me hosts. That means they are connect
applicat ion la r Desirable featul'ff :
multiple physical address es with multiple IP address es.
interface ye and network fayer. It provides the
between the application program s and the 1. TCP is a byte oriented protocol . : '. Port ntiinber
. l~ . In such a situation, if we use TCP, then the TCP
network operatio ns. 2. TCP is a reliable protoco l. connection involves only one source IP address and one
9990 ISDN on IP
destination address. Thus TCP does not support the
SCTp is desi d
gne mostly for · the newly designed and
3. TCP can detect the duplicat e segmen ts. SS7 Telepho ne
2904 multihoming services.
recently introduc ed Internet applications. These new 4. In TCP the lost segmen ts are resent. 2. signaling
g
However SCTP has been designe d for providin
applications are as follows : 5. Bytes are delivered in order. 2905 SS7 Telepho ne
M3UA multihom e services. In an SCTP associat ion the sending
1. 3. signaling
H. 323 (IP telephony). 6. TCP has flow control. IP
and receiving hosts can define more that one
2. H. 248 . 2945 Media gateway control
SIP (IP telephony). 7. TCP has congesti on control. 4. addresse s at each end for an associat ion.
1718 , 1719, IP Telepho ny
3. H. 248 (Media gateway control). H. 323 the
Undesir able features : 5. Thus multiple interface s are establis hed between
1720, 11720
4. IUA (ISDN over IP). sending and receiving hosts in the same associat ion.
1. TCP does not preserve the message boundar ies SIP 5060 IP Telephony
6. the
It is not possible to use TCP for these applications Multihoming is a fault free approac h which ensures
4.20.3 SCTP Performance for Internet s: data delivery without interrup tion.
bec~use they need more sophistic ated service than that Applications : 4.21.2 Multiple Stream
in
provided by TCP. on The concept of muitiho ming has been illustrat ed
TCP being a stream oriented protocol, each connecti
SCTP is capable of providin g the required ;ervices with The importa nt features of SCTP are as follows : betwee n a TCP cl ient and a TCP server is a stream. Fig. 4.21.2 and it is very useful in the real time
better performance and reliability. SCTP combine s all the desirabl e features of UDP applicat ions such as Interne t Telepho ny.
1. If there is a loss at a ny point in the steam, the data will
~ t iServe,;
TCP
be blocked there and there will be no delivery of the
4.20.1 UDP Performance for Internet 2.
IP3
It is a message oriented protoco l (like UDP). remaining data.
Applications :
3. It is a reliable protoco l (like TCP) . This problem is acceptab le when the data is in the text
.
The followin g features of UDP are desirabl e when 1·t 1sto 4. form . But it is not acceptab le when the data is real time IP4
be df. It preserve s the message bounda ries (like UDP). video o r rea l time audio data. SCTP
use or the Internet applicat ion like IP telephon (G-2047) Fig. 4.21.2 : Concep t of multlho mlng In
5. .
Desirable features :
y. It can detect lost, duplicat e o r out o f ord er d ata (like This problem in TCP is overcome in SCTP by providin
g
ted
TCP). a client As shown in Fig. 4.21.2, the client has been connec
multiple steams in a single connecti on between
network s with two d ifferent IP
1. e to two differen t local
It is a message oriented protoco l. 6. a nd a server. This concept is similar to a multilan
It provides flow control and congest ion control (like address es.
TCP).
2. It conserves the boundaries of the message. hig hway.
and
Due to such multiple stream service in SCTP, the SCTP can allow an associat ion betwee n the client
7. SCTP has new fe t h
3. Afl UDP message s are indepen dent of each other a ures t at are not avail able in UDP and is four differen t pairs of IP address es.
. delivery o f data does not get blocked. If one stream the server using
H TCP. deliverin g the
can continue to
as ~;e;:r ~DP is not suitable for the applicat ions such blocked, the other streams Howeve r the current SCTP version, it is possible
of IP address es for data
transmis sion due its 4.21 data. choose only one pair
f, II . e e ony or real time data
SCTP Services :
o owing undesirable features . The concept of SCTP multiple stream service has been commun ication.
Fol/owing are some of the . illustrate d in Fig. 4.21.1. ive
UndetJll'llble features : The other pairs of IP address es are used as alternat
provide d by th SCT most importa nt services
· 1ayer process es.
P to the apprica t ion only if the main choice fails. That means the currer
l. UDP is unreliable. s e
an . . o the sender does not know 1 version of SCTP does not allow load sharing amon
. Process to process commu nication .
'Ything if the datagra m is lost Stream 1
d . or duplica ted or differen t paths.
2. Multiple streams.
iscarde d or received out of order.

No conges tion control.


3. Multiho ming. Stream N
4.21.4 Full Duple x Comm unica tion :
4. Multiple streams in '
No flow control. Full dup/€x commu nication . one association In SCTP also a full duplex service is offered, similar
ti
5. Connec tion oriented service. (G-Zodl Fig. 4.21.l : SCTP multiple stream is one associa
tion TCP. That means the data can flow in both
6. directio ns simulta neously .
Reliable service.
Ttdlllne■ IN
• Publlca t10
.,...
• • r,,u..
P u b li c a t i ons
-
..•:••:A
. ~C=N~(Co~mp~;_;-/~Sem:!~·,;;5~/M~S2B!T~E~)-
SCTP at eac h end ha
d"
s a sen mg buffer and
..........
..................... ~~
4-4 0 .......,. ..,.. .,... ,........,...,===,!T!;ra:_:
;n~se;po~rt;!la~e;
,: .:r:,i:p~ ~ .,:4 p.Cl'I
(CornP· 1
"
sern
~~~ -~~~
5/M SBT
==- E) """ "'"" '=~ 4~- 4~1 :..,.
"-""
...,= =-= """ '""' """ '..,. _..~
T~r :an ~s~ p~o ::,rt ~l:a P roto eo\s
y~e ;r_, ,_.. .,_
buf fer and the a receiving rot 'II'.. info rma tion is not a part of the 4.2
k . Therefore in SCTP the data 8 con tro I 2.6 Flow Control :
pac ets are sen t in bot h the directions. chu nks are nurnbered "' 5(11' tne . . incl ude d in the con trol chunks. The
4.2 1.5 Connection Ori transmission sequence ..,th \0 bUt 1t 1S
ented Service : number (TSN) in ord t,eader, from overwhelrning
are of different types. In SCTP, the receiver is prev
control the data transfer. er ta I chunks ented
SCTP pro vide s a con nec ,ontro .1s not trea ted as one enti by implementing flow con
tion oriented service sim Each TSN is a unique 32 ty. lnstead it trol.
ilar to bit num ber which is stor the data
TCP. An SCTP con nec tion the header of the data chu ed . 10 sCf P of several data chunks,
is called as an association. nk. TSN has a value betw 1n and 4.22.7 Err or Co ntrol :
Wh en a pro ces s at the
site A wants to commun
(2' 2
-1) . . •n
. tne forrn
is 1n
belon9 to a
different stream.
each chunk

with a pro cess at the


icate ,an SCTP provides re1·ia b"I" 11 '"'1 to data transfer' by
4.22.2 Stream Identifier .
oth er site B, the sequen
ce of (SI) : . no opt ion section is SCTP like TCP . We have to imp lementing the error con t I with the help 0
f TSN
ope rati ons in SCTP take ;ner e is kt pes to handle options ro
place as follows: in SCTP.
As stat ed earlier,
in SCTP ther e are mor
fine new chu n y numbers and acknowle dgem nt numbers.
1. The SCTPs at sites A and e than one de . e
B establish an associat stream in each associat f ene ral hea der in SCT
ion ion, and each such strea leng th o g P 1s 12 bytes as
betw een them. m ;ne
4.2 2.8 Congestion con tro
should be iden tified usin d to 20 byte s in TCP. l:
2. A bidirection data tran g a Stream ldentifier (Sl). 0111 pare
sfer takes place. c . th "The . . herent\y included in
3. The SI is a 16 bit num ber ,he che cks um 1eng in SCT P is 32 bit as compared to con gest ion control is in SCTP in
Terminate the association. which starts from 0, and be
stor ed in header of the corr it is . number of data chunks
esponding data chunk. 6 orde r to determine e th to
4.21.6 Reliable Servi 1 bits in TCP. . g con ges tion
ce : This will help in placing · . injected into the network ·tho ut crea1in
the data chunk in its strea verification tag field '
in SCTP packet is used as
an
w,
after receiving it at the des m The . . in the network.
SCTP also is a reliable .
tran spo rt protocol like
TCP
tination . ·at1on I"d en t"fie , . r Eac h asso ciat ion IS defined by a
ens ures the safe delivery . It assOCI . .
of data with the help Thus SCTP uses SI to
distinguish betw een diffe unique ven fica t,on tag We can have multihoming in 4.23 Packet for
ack now ledg eme nt mechan of
streams. rent . ma t :
ism. . different lP addresses.
scTP by usin g We are now going to disc k
4.22 SC TP Fe atu res : 4.22.3 Stream Sequenc SCTP packet several diff . uss the pac e t format in SCTP
e Number (SSN) : erent data chunks w,11 be .
In an d different types of chunks
b .
let . us und erst and the SCTP uses the stre am pre sen t an d eac h one is defined Y TSN ' IS and SSN an th SCTP packet format. whi
seq uen ce num ber (SSN · fig . 4.23.l shows e ch shows
gen eral feat ures of SCT ) to . t" .
· the n com par e the m with P and distinguish betw een diff ln SCTP, control mfo and data info rmation are ack arts namely :
the feat ures · ofTCP. erent data chunks which rma ,on that an SCT PP et con sists of two P
belong . chunks. ln SCTP the TSN d SSN
to the sam e stream. , lS an
Som e of the gen eral feat
ures of SCTP are as follo
ws : The received data chu nk
carried m sep arat e
num ber s (identifiers) are
ed ly to identify the data 1.
2.
A mandatory hea der and
A set of blocks called chu ks
1. Transmission seq uen ce at the des tina tion is deliv us on these three n _-__
num ber. ered control chunks never
to the app rop riat e stre chunks . The use ' Gene;..:i -Header (12 byte_s)
2. Stre am iden tifie r. am in pro per ord er . .... _ -
des tina tion SCTP.
by the sew· the data is con t a1. ned in data chunks, · .
identifier. ln ' Chun\< -1
3. Stre am seq uen ce num ber . h" between these
. This bec ome s possible stre ams an d Pac\<.ets. The relations 1P (\lat iab\e \englh)
4. Pac kets . as SCTP defi nes eac h data
chunk ·thr ee is as follows:
in each stre am with stre
5. am seq uen ce num ber
Ack now ledg eme nt num (SSN) in
ber . add itio n to an Sl l. An association may sen d many packets. Chu nk - N
(\lat \abl e \englh)
6. Flow control. ket ma y contain man y
4.2 2.4 Pa cke ts : 2. Each pac ctnn,tts.
d"fferent streams. ( G - ~ ) f i g . ~ . SCTP -~• "•1 fonnat
7. Err or control . 3. The se chunks may belo - ,--- .
ng to I
The SCTP pac ket des
.
ln sCTP, ther e are two .._,
,, P
es of chunks ·.
B. Congestion rontrol. ign is com plet ely diff Nuff\bef'
erent than 4,2 2.s Acknowledgem
tha t ·of TCP. In SCTP, ent · 1. Data chunks and
4.22.1 TransmissJon Se the· dat a· is carr ied in the
form ·of d ment numbers are
quence Nu mb er dat a chu nks while con In TCP the acknowl
e ge 2.· •control" chu nks
trol info rmati on is carr uence numbers.
(TS N) : ied as d hey refer to the seq . . .n sew· is ron trol· . .
.
con trol chu nks . Fig. 4.22
.1 sho ws the SCTP packet. orie nted an t - An ·a5S'Oc,a-it"OTT , letl and mai·rtta ined
. scTP -are chunk- dat a. i& cattie.d
Itr TCP the emit of data The · -role ·of an -SCTP But the acknow\edgeme nt numbers in the contra\. chunks. whe
-~ a byte because it pac ket is sam e as tha reas. tbe us.er
orie nte d protocol. is- a byre t of a l'CP- he refe
.
orie nted·, and t Y r to the TSN. the data chu nks .
pac ket.
. the· control
The refo re TCP- con trol
s the · dat a tran sfer by -'- ln SCTP, the· contro I· ·chunks carry 4.23."\ Genera\ Head
byt es with the seq uen num ber ing· k do not need the TSN. er :
.
ce num ber s. info rma tion . The control chun s
The gen eraI hea der or pacl<.et head-er .m sew is use
Ho we ver the - d~t d d by an othe r
a uni t in SCTP is ; Data- The se con trol chunks acknow\e ge
may.or may not hav e a one chunk and it are k 1he seq uen ce defi ning the end poi nts • t
to o~e rela tion ship wit app rop riat e typ e of control chun . of eac h association_ o
,
m~ssages produced by h the · mbe r is not nec
the sen din g pro ces ber or ack now ledg eme essa ry tha t pac ket bel ong s to .
s. (This nt nu .
happens due to the frag men
tati on) . for the con trol chu nks m
num . sc1 P · ----------
(G-2048) Fig. 4.2 2.1 : An ----------
SCTP pac ket - - ' ~ ...:C ~ ted ~ lb•
~Jt P\lb~ llr
'Cl•., TechKna■ledge
.....
V P u 1J l l ca1 1o ns
,sem - 5/MSBTE) Tran s~rt \aye r pi:otoeol 5
.,(co mP·
if. ,.c,· 4-43
how much data is to be sent) th
-~A It •C~
also N~ (~C
g uara 2 . AS SCTP allows e
~ nteeo~m
s thatp:·: th /Se m:: ·~5 ~/M ~S:4-4 B~ T:E :)-: :::: -:-. ---~ ,, 1-e"gth : . e of the 1nfo
. rmat1on
. secti.on depe addition of data chunk in 3n! and th
particular associat· ~-- ---- ,he s1Z nds th 4 packet, in the SACK
ion. It ensures e th packet belo ----
Tran ~~~
spor ~~
t layar chun k the value of rwnd is advertised.
ngs to of chunk. Therefore it is nece on
contents of the .
h
at t e integrity of the
a Th e first three
fields i.e type flag Prot<>cota !)'Pe . ssary to d fi e The serv er shou ld
common to all types of ch~nks. d e ne know the client buffer size. With
' an length are the chunk boun dane s. the first pack et no
preserved. packet including th
Fig · 42 e head er itself is But the chun k information field should b 1-eogth is a 16 bit field which other chunks can be transmitted.
· 3.2 shows the f is used for defining
4 bytes . If it is not then addit the total size of the chunk. in Now the server transmits second
f.-- --1 6 bits ormat of the general header. ional zero ea mulr•Pie of bytes which includes 2. packet containing UltT
to make it a multiple of four bytes ACK chunk (acknowledgement
. s are padded Up the type, flag and length fields for !NIT chunk). ln the
·~ur ce
. lMtT chunk verification Tag (VT)
.. rt '
. po ac;!ct.. , ,. 16b lf a g·iven chun k does not carry is the initial tag field
~."8 ' .J),sl fll!lli/ >n pQI'!lts- -+i
·add ;.,. any information value. The tag to be used in othe
1. Type : then the value of length field r direction is initiated
. ~erification tag ·· ·· This
• is an 8 bit field which is used f will be 4 i.e. 4 bytes . by this chunk. for data flow
or definin 9 from server to client it
·:...~rr..:. t:1 . ._.. .,--: 2 = 256 chunk types. Table 4
·23 ·1 gives
. a I' Upto
Note that the length of padd
ing, if any, is not defines initial TSN and it sets
servers rwnd. The rwnd
i--------32bit
s-------....l chunks and their description. included in the calculations value is defined which allows
ist for of the length field. the client to trans mit a
(G·20SO) Fig. 4-23.2 : General from this the receiver can find DATA chunk with 3n! packet. To
hNd er Note that all only a few types out the number of define the servers state
Following are the fo ur fields m are actua ll
. the general header : till date. The remaining types useful byte s carried by a chun at this moment tNtT ACK also send
for future. h b y defined k. s a cookie.
lf this value is not multiple
1. Sour ce port header .· This . 16 bit . field is used for
ave een reserved
of 4, the receiver will 3. The client transmits third packet containing cOOl<l£
defining the p 0 rt number of the pack unde rstan d that padding (of Os) ECHO chunk. This chunk
et sending Table 4 23 1 • Chunks has been done . is very simple which echo es
process. without any change in the cook
ie sent by the server. ln
An SCT P Association : this packet SC'TP allows the addi
2. Destination port number :
This 16 bit field is 4,23,3 tion of data chunks.
used for defining the port num similar to TCP, SCTP is a conn The server sends fourth packet
ber of the cket ection oriented protocol. 4. including the cOOl<l£
receiving process.
1 INIT An association i ~ ACK chunk which gives the ackn
Association is a connection in owledgment receipt uf
pa SCTP . COOKIE £CH O chunk. ln
2 INITACK Acknowledgement f o ~ The thre e phas es in the conn the packet also addition of
3. Verification tag : The contents ection oriented SCTP
of this 32 bit field chunk
will match a packet to an asso
num ber a packet from a prev
ciation. Due to this
ious association is
3 SACK Selective
acknowledgement
- association are as follows :
1. Association establishment.
chunk is allowed by scTP.

not mistaken as the packet in HEARTBEAT


this association. 4 Che cks the peer for i t s - 2. Data transfer.
In shor. t,. verificafion t ag ,s· used as an identifier liveness 3.
. for the Association termination.
assoc
. 1at1o
. n · In every p ac ket d uring the
association the 1. scT P asso ciat ion esta blish
venficat,on tag is repe ated . 5 HEAR BEAT Acknowledgement to men t :
' ACK Association establishment in
For data transfer in forward HEART BEAT chunk SCTP is performed
and reverse direction, a using tour -way handshake
sepa rate verification is used. 6 ABORT Association is aborted - - mechanism . ln this
meth od using SCTP as the trans
7 SHUTDOWN Association is terminated port layer protocol
4. Checksum . Th · ,s
. ,s · a 32 bit field which cont client of one process wants to Client
ains a 8 SHUTDOWN establish association (G-2535) Fig. 4.23.4(a) : SCTP
;:~- 32 ch:c ksum . In the UDP Acknowledgement to asso ciati on estab llshf flent
, TCP and IP the ACK SHUTDOWN chunk with anot her process. (four - way handshake)
. ksum is 16 bit long . In SCTP Similar to TCP, for receiving
it has b 9 ERROR Error is reported with out- - any association the
incre ased to 32 b. .
. ,ts, ,n orde r to allow the useeen prep arati on of SCTP server is
of shut dow n needed. Establishment 2. Data transter :
CRC-32 checksum. of association is started by the To transfer the data betw een
10 COOKIE ECHO client. Fig. 4.23.4(a) two ends is the main
Third pack et in association purpose of an association.
4.23.2 Chunks : show s SCTP association estab Bidirectional data
esta blish men t lishment
SCTP association establishm transfer take s place after
11 COOKIE ACK ent process is as estab lishm ent of
Ack now ledg eme nt for association. Soth client and
As disc usse d earli er chunks
info server can send &.
rma f . r
carry eithe COOKIE ECHO chun k follo ws:
the cont rol receive data .
h ,on or user data . The 14 SHUTDOWN 1. The client send s the first pack
com mon layo ut of a Thi rd pack et in association et containing an lNtT SCTP maintains and recogniz
c unk is as show n in Rg. 4.23 .3. COMPLETE chun k. As for this direction
there is no verification tag es boun dari es. Every

1-- B bits -.,._ a bit s-+ ---


- 16 bit s-- -l
119 2 I FORWARD TSN
termination
For adju sting cumulative
has been defined the verif
pack et will be 0. for the pack
ication ta9 (VT) of this
ets from server to client
mess age from the process is
and unless it is frag men ted
trea ted as single· uint
it is adde d intQ the
Type . :· _;, . Flag : -r
i',; t'/ ~:. Lengtli\; f ;;:y:w· TSN
the INIT tag contains an initia th
tion tag. for is direction
chunk. A mes sage whic h have
been received fro!T
Chunk lnfonnation 2. Aag : the chun k defines initial trans process will beco mes a DAT A
mission sequence number chunk.
(MUii/pies of 4 bytes) (TSN). (TSN is 32-b it field) and Every data chun k is form ed
This . is an 8-bi t field whic chunk advertises a value by the frag men t c
h is used for defining eiver to understand
spec,~! flags need ed by a for rwnd (it is value used by h mes sage or mes sage which has
(G-2051) Fig. particular chunk. The t e rec one TSN .
4.23 .3 : Common layout of a
chunk mea ning of each b't 1 ·is d 'ff
I eren t for diffe rent
types
of chun ks.

• Tedl l.... ...


• p IJ b 11 C a l ID n s
••..•. .A,.CiiiN~(C;;,;;om;,;;,;,o;p;;.,·:,;;IS:;:em -~5~
:,::;.
. ;:S/M~S:!;B~T;,El!,__ _...., ._. . /501~; /M~S~B~l~E~)=="-'"-'"""'_._~4~-4~5__,,,_....,,_...,,._ nnrt la"er protocols
....,..,:4~-44~""""""'""""""'.,.."""...,"" co(l'IP· ....__ _.~l ~ra: :;n: s~r~ '-"" "':-:
"""""",...~T~ra:n:s~po~rt~l!;ay~e~r
TSN's are used by .DATA chun
ks only and are
e,
Pro1~ Jd ,11Ct< l . ble carries last receive T N d S . --::
acknowledged by SACK chunks. 2. Into each frag ment a DATA chunk is ad 18 ~ e Ii st varia tf size and wins ,.e. CumTSN. bytes. The in Transit i.e. third vana . holds number of
r ize are carried in the ble not

\
holds a different TSN which ~hou bll er
ld be . ded Whit~ 111 ailable bytes in transit. bytes ,.,hic
I. Multlhomlng data transfer
: only. in seq , '(lie a11 . ble,
ihe \ast cumulative acknowle
dgment. " h have sent but
\Je~ce · nd 11ana . d in the third . acknowe\edged yet.
We have already discussed mult 3. All head seco . carne vanab\e.
ihoming feature of er chun ks holds the same Si tJ,C'i- is
SCTP. For communication mult Identifier), same SSN (Stream Io's
d ta chun k. the recei ver site store it at 4.23.5 Error Con \
ihoming allows both Sequenc N(Sireal\1 - · ga a trol :
sender and receiver ends to r receivin (butter) and from the winsize
define multiple IP sam e U flag and same payload proto e urnb ,111te f queue the size
addresses. From multiple IP addr
primary address and
esses only one is 4. Assign the combination of
B & E as
col 1.d
folloWs.
er),
entifie
r.
the
1ast O
tne cl'\U
.
nk ,s SU
btra cted .
. In the cumiSN variable the - Simil ar to
.
r
KP, SCTP is a re ia b\e transport layer
f the receiver buff e r
\
f chun k is proto
rest are alternative First fragment : 0, Middle frag o 1 ber store d. col. For reporting the stat e0
addresses. ment : 00, Last fragm ·
ent : o ,SN nurn o hunk by the process, it removes to sender SCTP uses SACK chunk.
At the destination fragments
At the time of association are reassembled. If 1 d'ng
,111ter rea I the ueue C that
and the size o! removed chunk . different set of timers
primary address is defined. The
establishment the
primary address of
chunks reach its destination
means message is not fragmen
with its B/E bit _ DI\Tt>,
s - ,nun
k from the q is For the receiver and sender sites Ll
one is determined by othe ted. How to re 1/1 1·1 vt1insize. and entities are used !or eNef'/ implementation.

'
r end. i.e. For a all chunks with same SSNs and assernbi added to . takes decision of sending
destination the primary address SIS is known to h receiver S/1.CK, first
is defined by the The TSN number of first and last fragmen recei.vere \f,/hen t e of lastACK. \t transmits S/1.CK Error control at receiver site :
source. ts det . · k the vaIue with
the number of fragments. it chec s N mber which is equal to CumTSN . /1.\\ chunks which have arrived are din the queue of
store

\
II. Multlatream delivery ermines ulative TS nu 1!
: 3. SCTP association terminat cum Cl< is \ess than CumiSN. receiver containing out of or er d chun ks also. The space
ion :
The difference between data 1a5tll- . . I included. i O hold
transfer and data Similar to TCP , in SCTP any of . doW s,ze ,s a sO the CumTSN !or missing chunk is \e!t. I
delivery is an interesting featu the two parties i.e Win
handling a data transfer SCTP
re of SCTP. For sender or receiver involved in
data exchang \ue the vaIu
e of \astack is updated. The duplicate messages are discarded keeping their
uses Transmission terminate the connection. Half e rnay· va . . ·11 strated in Fig. 4.23.5(a)
Sequence Number (TSN). closed association is ThlS IS I u . track !or reporting to the sender.
Movement of data not allowed in SCTP .
chunks between source &
destination is also iypi~a\ design ol the receiver. •t and the state of
dependent on TSN . If one party closes the asso To proces,~s~-----',.._.;_W,:..:::;n;:;.si;:;.z s1 e
ciation the other pa
should stop transmitting new
e;..._,-1_ receiving queue .is as shown i"n fig. 4.2:1 .G(a) .
With the help of Sis (stream data. The data wh : Received
Identifiers) and SSNs is left over in the queue that ...- chunks
(Stream Sequence Numbers) data is sent and To process
data chunks delivery association is terminated. Receiving queue Receiving queue
..
is controlled.
@\fill@ · , ,n rr.irz;;ir-1n~\'§\-c1 Received
SCTP allows multiple streams Three packets are used
in the association c umTSN _2 6 1un\lS
delivery. For each term ination as shown in Fig. w,nSize ,1000 20 21 22 LJL _; l = =
stream a stream identifier (SI) 4.23.4(b). Either server 1
•~._
~ _..,
\!:::l ~ ,.i , j.
is allocated which or client can initiate the terminati
defines that stream. on. Last Ack . 22 ·
··29:1
It supports ordered (default
. 4 23 S(a) : flow control at recei
(G-2537) f19. · ' ver site . ·.
) and unordered type .
t
of data delivery for every strea
m. flow con r01 at sender site : :;< . :.,,,..
r.-,.·,· .... ~
Data chunks in a stream will d has three CurTSN, rwn d and in Transit outo !ord er ouplicelll
use SSN (Stream The sen er
Sequence Number) in case (butter) as shown in
of orde var"1ab\es and one queue ontrol at receiver site
red data . (G-2539\ fig. 4.23.6(a) , Enor c
delivery. that length of chunk is 100 byte
Fig. 4.23.5\b). p..ssume s last acknowledgement was sent.
Data chunk in a stream will For data chunk 18, the
use U flag set by long . 19 to 22 chun\(s have
.
ignoring their SSN value in . From Site of win dow is 1000 bytes.
case of unordered pro~ ~ k
. d · rder Chun s 25 , 26 are first out of
data delivery. Client
Server
outstanding chu n~
j been recew e in ° ·
order chunks an d 29 ' 30 are secon
d out of order
Ordered delivery service
is used in most of the (G-25 36) Fig. 4.23.4(b) : SCTP associati
on termination To send
@®@@fil\ ;15 s@ \!l @ .
applications whereas uno chunks.
rdered delivery is 4.23.4 Flow Control : sending queue
. d d • th~ array of
occationally used in some appl ihe duplicate receive chun\(s are store m
ications where they dupl icate chunks in
need to send data urgently but We need to handle two data Curi SN variables . \t .is not nece ssary to store
should be delivered units , the byte & the rnnd . d
out of order. . te chunks will be d1sc arde ·
chunk in SCTP. TSN and ack the queue. Oup1ica
nowledgment values are inTransit 800
Ill. Fragmentation : site control at sender site :
expressed in chunks whereas •·g 4 23 S(b) .. •1ow
r
control at sende'
Error .
the rwnd & cwnd are (G -2538 \ • 1 • • • . . nd retransmission
d b the process .
ihe site contains sendmg queu ea
At the source SCTP fragmen expressed in bytes. rries the chun\(s generate y a .
tation takes place with The buffer Ca se
nt e Three variables rwnd, in iran ·t nd curiSN are
the help of following steps be sent or have been queu • s1 a
: Flow control at receiver site which have ready to . used. fig. 4.23 .G,b) s\-\01Ns the . d i n at sen der
1. To mee t the requirement
: .h
. curiSN wh1c re !ers to the next typica1 es g
of size a message is The receiver has three vari
ables and one buffer i.e. The first varia
. hble
brok en into the small fragmen . carnes
ts. queue. The data chunks rece
ived which have not read chunk 1Nh1c ,s t O be sent. ihe secon d varia;b:;\e~rw; . n~d~l--s-it_e·- - - - - - - - - -
. the last advertised value b the receiver in ~-~f!~~~i
by the process are available
in the queue . contams y • ledllllflllMP•
'V , u"'" ' " on'
. . . Ttt~ICn1wled9e
VP u bllc: i t lo .n s
~
• ACN
:!_ Transport layer Pfo t~
(Comp. /Sem. 5/MSBTE) 4-46
Outstanding chunks Explain relation between TCP and IP.
1' From process Q.11 '
~1 What are parts and sockets_?
To
j Q.12
State and explain TCP services (any four).
send ~ IIg ...... II1i11 f!J IDl lm Q. 13
Explain the following features of TCP.
Sending queue
\
a. 14 _
Flow control 2. Error control
1
·\ 3 . cong estion control.
Q . 15 Explain the TCP header f~rmat. .
Explain the TCP connection ~stabhshment
,,\ inTransit Q.16 using a
I Retransmission queue three way handshake mechanism.
Add when Q.17 Write a note on : TCP windows.
f• ~m er expires Write a note on: Flow control in TCP.
l\ ~~tjlill Q.18
\
\
Explain the principle of TCP congestion contr
(G-2540) Fig. 4.23.6(b) : Error control at sende
r site Q.19 ol.
Q.20 Expla in the function of RTT in TCP.
The sending queue contains chunks 21 to
30. The
chunks 21 to 27 have already sent but they Q. 21 State various timers in TCP.
are not
Q.22 Explain the following options in TCP.
acknowledged. The chunks 21 to 27 are outst
anding 1. Time stamp 2. End of operation
chunks. Com pare TCP
Q.23 and UDP .
The CurTSN pointed towards next chunk to be
sent i.e. Q.24 What is SCTP ? State its services.
28. Suppose each chunk is of 100 bytes i.e. 700
byte of Q.25 State and explain SCTP features (any four).
data chunks 21 to 27 are in Transit. At this mom Q.26 Explain the packet format of SCTP.
ent the
sender has retransmission queue. A retran
smission Q.27 Write a note on : SCTP association.
timer starts as soon as when the packet is sent. Q.28 Describe the flow control in SCTP.
- When the retransmission timer expires, the chunk Q.29 Write a note on : Addressing in transport layer.
s in
that packet will be moved to retransmission queu 0.30 Write note on : Flow control and buffering.
e to
Q. 31 State any two socket primitives for TCP and
state
be resent.
their function.
- These chunks will be considered as lost chunk.
They are Q.32 Write short notes on two-army problem in releasing
not considered as outstanding chunks.
a transport connection.
From the retransmission queue the next time
sender Q.33 Explain Tom-Winson's three way handshake
will send chunk it will be chunk 19. protocol to establish the transport level conne
ction.
I a. 34 Explain how you will choose between TCP and
4.23.6 Congestion Control :
UDP ? Compare them.
Similar to TCP, SCTP is a transport layer proto Q.35 How does TCP tackle congestion problem using the
col in intern
which congestion occurs due to packets. et congestion control algorithm.
Q.36 Explain how TCP connections are estab
For congestion control, SCTP uses the same meth lished using
ods as the three way handshake. What happens when
those us~d in TCP. two
hosts simultaneously try to establish a conne
ction .
o. 37 What is TCP state machine ? Explain its structure
and use with suitable diagram.
Q. 38 Explain TCP connection manageme
nt with the help
0.1 What is TCP and UDP ? of TCP connection management finite
0.2 state
Explain in detail how TCP provides flow control. machine.
0.3 Define a term silly window syndrome and possi
ble a. 39 Explain how TCP connections are established using
solution to overcome its effect. the three way handshake. What happens when
0.4 two
·' J What are the duties of transport layer ? Expla hosts
in in simultaneously try to establish a connection ?
brief. Q.40 Explain the TCP transmission
policy, congestion
0.5 Draw and explain the relation between netw control.
ork
layer, transport layer and application layer. a. 41 Give the structure of UDP header.
0.6 What is UDP ? State its responsibilities. Q.42 Explain the TCP header and
working of the TCP
o. 7 State important advantages of UDP. protocol.
Q.8 Explain the user datagram format of UDP. Q.43 Explain the various fields of TCP
header with the
Q.9 State the UDP services and explain the following : help of neat diagram.
1. Flow and error control. Q.44 Explain the various steps that
are followed in
2. Encapsulation and decapsulation. releasing a TCP connection.
a. 10 State and explain UDP features (any two).
□□□
PubllC ~tton s
•• Tecllln•••-••

You might also like