Professional Documents
Culture Documents
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
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
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
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.
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
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
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
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
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.
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
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
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
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
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
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
Tarh Knomledoe
ACN (Comp. /Sem. 5/MSBTE) 3-18 Unicast& Multicast Houting Proto (Comp. /Sem. 5/MSBTE)
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
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
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 :
6. If we solve one problem and other appears. has many limitations. Some of them are as follows:
Authentication
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
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
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
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
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
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.
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
g on
er 2
com
and
: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
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.
V
V
TedlKnowlffl'
Publlciltlons
-
,a"i:r ACN (Co
'Y' ...,;..;,_,;;;;;;,m
....
~
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
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
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.
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) :
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)
----
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 )
w
V
Teclllna■ 1u1i
Pub ll c;it lon s
" Tedl
pub IIlnwl
lat lllte
l o ns
~
-
f
I
~
: 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
.
m'
C
.
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).
• • 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
1·
~ ~ = ~ : : : - ; ; : : : " . " - - - ~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
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)
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
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)
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.
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
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.
\
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•••-••