Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
79 views46 pages

Module V

The transport layer is responsible for process-to-process delivery and contains three main protocols: UDP, TCP, and SCTP. It uses port addressing to deliver data between processes on different hosts, assigning each a port number between 0-65535. Port numbers are classified into well-known ports (0-1023), registered ports (1024-49151), and dynamic/private ports (49152-65535). The transport layer uses socket addresses, which combine an IP address and port number, to identify the endpoints of communications between processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views46 pages

Module V

The transport layer is responsible for process-to-process delivery and contains three main protocols: UDP, TCP, and SCTP. It uses port addressing to deliver data between processes on different hosts, assigning each a port number between 0-65535. Port numbers are classified into well-known ports (0-1023), registered ports (1024-49151), and dynamic/private ports (49152-65535). The transport layer uses socket addresses, which combine an IP address and port number, to identify the endpoints of communications between processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

MODULEV

TRANSPORTLAYER
 Thet
ranspor
tlay
eri
sresponsi
blef
orpr
ocess-
to-
processdel
i
ver
y

 I
tcont
ainst
hreepr
otocol
s—UDP,
TCP,
SCTP

 Thenet
wor
klay
eri
sresponsi
blef
ordel
i
ver
yofdat
agr
amsbet
weent
wohost
s.Thi
siscal
l
ed
host
-t
o-hostdel
i
ver
y.
 Thedat
ali
nkl
ayeri
sresponsi
blef
ordel
i
ver
yoff
ramesbet
weent
wonei
ghbor
ingnodesov
era
l
i
nk.

Funct
ionsofTr
anspor
tLay
er

 Por
tAddr
essi
ng

Whenev
erweneedt
odel
i
versomet
hingt
oonespeci
fi
cdest
inat
ionamongmany
,weneedan
addr
ess.
Att
het
ranspor
tlay
er,weneedat
ranspor
tlay
eraddr
ess,cal
l
edapor
tnumber
,tochooseamong
mul
ti
plepr
ocessesr
unni
ngont
hedest
inat
ionhost
.Thedest
inat
ionpor
tnumberi
sneededf
or
del
i
ver
y;t
hesour
cepor
tnumberi
sneededf
ort
her
epl
y.
I
ntheI
nter
netmodel
,thepor
tnumber
sar
e16-
biti
nteger
sbet
ween0and65,
535.
.TheI
nter
nethasdeci
dedt
ouseuni
ver
salpor
tnumber
sforser
ver
s;t
hesear
ecal
l
edwel
l
-knownpor
t
number
s.Cl
i
entcanchooseanyr
andoml
ychoosenpor
tnumber
.
Cl
assi
fi
cat
ionofpor
tnumber
s
Thel
ANA(
Int
ernetAssi
gnedNumberAut
hor
it
y)hasdi
vi
dedt
hepor
tnumber
sint
othr
eer
anges:wel
l
known,
regi
ster
ed,
anddy
nami
c(orpr
ivat
e)
 Wel
l
-knownpor
ts-
--
Thepor
tsr
angi
ngf
rom 0t
o1023ar
eassi
gnedandcont
rol
l
edbyl
ANA.
Thesear
ethewel
l
-knownpor
ts.
 Regi
ster
edpor
ts-
--
-Thepor
tsr
angi
ngf
rom 1024t
o49,
151ar
enotassi
gnedorcont
rol
l
edby
l
ANA.Theycanonl
yber
egi
ster
edwi
thl
ANAt
opr
eventdupl
i
cat
ion.
 Dy
nami
cpor
ts-
--
Thepor
tsr
angi
ngf
rom 49,
152t
o65,
535ar
enei
thercont
rol
l
ednorr
egi
ster
ed.
Theycanbeusedbyanypr
ocess.Thesear
etheephemer
alpor
ts.

 SocketAddr
esses
Pr
ocess-
to-
processdel
i
ver
yneedst
woi
dent
if
ier
s,I
Paddr
essandt
hepor
tnumber
,ateachendt
o
makeaconnect
ion.Thecombi
nat
ionofanI
Paddr
essandapor
tnumberi
scal
l
edasocketaddr
ess.
Thecl
i
entsocketaddr
essdef
inest
hecl
i
entpr
ocessuni
quel
yjustast
heser
versocketaddr
ess
def
inest
heser
verpr
ocessuni
quel
y.
At
ranspor
tlay
erpr
otocolneedsapai
rofsocketaddr
esses:t
hecl
i
entsocketaddr
essandt
heser
ver
socketaddr
ess.Thesef
ourpi
ecesofi
nfor
mat
ionar
epar
toft
heI
Pheaderandt
het
ranspor
tlay
er
pr
otocolheader
.TheI
Pheadercont
ainst
heI
Paddr
esses;t
heUDPorTCPheadercont
ainst
hepor
t
number
s.

 Mul
ti
plexi
ngandDemul
ti
plexi
ng
Theaddr
essi
ngmechani
sm al
l
owsmul
ti
plexi
nganddemul
ti
plexi
ngbyt
het
ranspor
tlay
er,asshown
i
nFi
gur
e

Mul
ti
plexi
ng
Att
hesendersi
te,
ther
emaybesev
eralpr
ocessest
hatneedt
osendpacket
s.Howev
er,
ther
eisonl
y
onet
ranspor
tlay
erpr
otocolatanyt
ime.Thi
sisamany
-to-
oner
elat
ionshi
pandr
equi
resmul
ti
plexi
ng.
Thepr
otocolaccept
smessagesf
rom di
ff
erentpr
ocesses,di
ff
erent
iat
edbyt
hei
rassi
gnedpor
t
number
s.Af
teraddi
ngt
heheader
,thet
ranspor
tlay
erpassest
hepackett
othenet
wor
klay
er.
Demul
ti
plexi
ng
Att
her
ecei
versi
te,t
her
elat
ionshi
pisone-
to-
manyandr
equi
resdemul
ti
plexi
ng.Thet
ranspor
tlay
er
r
ecei
vesdat
agr
amsf
rom t
henet
wor
klay
er.Af
terer
rorchecki
nganddr
oppi
ngoft
heheader
,the
t
ranspor
tlay
erdel
i
ver
seachmessaget
otheappr
opr
iat
epr
ocessbasedont
hepor
tnumber
.
 Segment
ati
onandReassembl
i
ng:
 
Amessagei
sdi
vi
dedi
ntosegment
s;eachsegmentcont
ainssequencenumber
,whi
chenabl
est
his
l
ayeri
nreassembl
i
ngt
hemessage.Messagei
sreassembl
edcor
rect
lyuponar
ri
valatt
hedest
inat
ion
andr
epl
acespacket
swhi
chwer
elosti
ntr
ansmi
ssi
on

 Connect
ionl
essVer
susConnect
ion-
Ori
ent
edSer
vice
At
ranspor
tlay
erpr
otocol
canei
therbeconnect
ionl
essorconnect
ion-
ori
ent
ed.
Connect
ionl
essSer
vice
I
naconnect
ionl
essser
vice,t
hepacket
sar
esentf
rom onepar
tyt
oanot
herwi
thnoneedf
or
connect
ionest
abl
i
shmentorconnect
ionr
elease.Thepacket
sar
enotnumber
ed;
theymaybedel
ayed
orl
ostormayar
ri
veoutofsequence.Ther
eisnoacknowl
edgmentei
ther
.Wewi
ls
l eeshor
tl
ythat
oneoft
het
ranspor
tlay
erpr
otocol
sint
heI
nter
netmodel
,UDP,
isconnect
ionl
ess.
Connect
ionOr
ient
edSer
vice
I
naconnect
ion-
ori
ent
edser
vice,aconnect
ioni
sfi
rstest
abl
i
shedbet
weent
hesenderandt
he
r
ecei
ver
.Dat
aar
etr
ansf
err
ed.Att
heend,
theconnect
ioni
srel
eased.TCPandSCTPar
econnect
ion-
or
ient
edpr
otocol
s.

 Rel
i
abl
eVer
susUnr
eli
abl
e
Thet
ranspor
tlay
erser
vicecanber
eli
abl
eorunr
eli
abl
e.I
ftheappl
i
cat
ionl
ayerpr
ogr
am needsr
eli
abi
l
ity
,
weusear
eli
abl
etr
anspor
tlay
erpr
otocolbyi
mpl
ement
ingf
low ander
rorcont
rolatt
het
ranspor
tlay
er.
Thi
smeansasl
owerandmor
ecompl
exser
vice.Ont
heot
herhand,i
ftheappl
i
cat
ionpr
ogr
am doesnot
needr
eli
abi
l
itybecausei
tusesi
tsownf
lowander
rorcont
rolmechani
sm ori
tneedsf
astser
viceort
he
nat
ureoft
heser
vicedoesnotdemandf
lowander
rorcont
rol(
real
-t
imeappl
i
cat
ions)
,thenanunr
eli
abl
e
pr
otocol
canbeused.

UDP-(
USERDATAGRAM PROTOCOL)
-CONNECTI
ONLESSTRANSPORT
 UDP t
akesmessagesf
rom t
heappl
i
cat
ionpr
ocess,at
tachessour
ceanddest
inat
ionpor
t
numberf
iel
dsf
ort
hemul
ti
plexi
ng/
demul
ti
plexi
ngser
vice,addst
woot
hersmal
lfi
elds,and
passest
her
esul
ti
ngsegmentt
othenet
wor
klay
er
 I
nUDPt
her
eisnohandshaki
ngbet
weensendi
ngandr
ecei
vi
ngt
ranspor
t-
lay
erent
it
iesbef
ore
sendi
ngasegment
.Fort
hisr
eason,
UDPi
ssai
dtobeconnect
ionl
ess.

 UDPi
susedwhenacknowl
edgementofdat
adoesnothol
danysi
gni
fi
cance.
 addr
eli
abi
l
ityatappl
i
cat
ionl
ayer
 UDPdoesnotpr
ovi
decongest
ioncont
rol
mechani
sm.

 UDPdoesnotguar
ant
eeor
der
eddel
i
ver
yofdat
a.

 UDPa
ppl
i
cat
i
ons
 Domai
nNameSer
vices(
DNS)

 Si
mpl
eNet
wor
kManagementPr
otocol
(SNMP)

 Rout
ingI
nfor
mat
ionPr
otocol
(RI
P)

UDPHe
ade
r
UDPheaderi
sassi
mpl
easi
tsf
unct
ion.

UDPheadercont
ainsf
ourmai
npar
amet
ers:

 Sour
cePor
t -Thi
s16bi
tsi
nfor
mat
ioni
susedt
oident
if
ythesour
cepor
toft
hepacket
.

 Dest
inat
ionPor
t -Thi
s16bi
tsi
nfor
mat
ion,i
susedi
dent
if
yappl
i
cat
ionl
evelser
viceon
dest
inat
ionmachi
ne.

 Lengt
h -Lengt
hfi
eldspeci
fi
est
heent
ir
elengt
hofUDPpacket(
incl
udi
ngheader
).I
tis16-
bit
s
f
iel
dandmi
nimum v
aluei
s8-
byt
e,i
.e.t
hesi
zeofUDPheaderi
tsel
f.

 Checksum -usedbyt
her
ecei
vi
nghostt
ocheckwhet
herer
ror
shav
ebeeni
ntr
oducedi
ntot
he
segment
.

TCP-(
TRANSMI
SSI
ONCONTROLPROTOCOL)-
-CONNECTI
ONORI
ENTEDTRANSPORT)

The t
ransmi
ssi
on Cont
rolPr
otocol(
TCP)i
sone oft
he mosti
mpor
tantpr
otocol
sofI
nter
net
Pr
otocol
ssui
te.I
tismostwi
del
yusedpr
otocolf
ordat
atr
ansmi
ssi
oni
ncommuni
cat
ionnet
wor
k
suchasi
nter
net
.
F
eat
ure
s
 TCPensur
est
hatt
hedat
areachesi
ntendeddest
inat
ioni
nthesameor
deri
twassent
.Soi
t
addapr
ovi
si
onf
orsequencenumberi
nheaderf
iel
d.
 TCPhandl
edat
aint
hef
orm ofsegment
.Asegmenti
sacol
l
ect
ionofby
tes.Thebyt
es
ofdat
abei
ngt
ransf
err
edi
neachconnect
ionar
enumber
edbyTCP.Thenumber
ingst
art
s
wi
thar
andoml
ygener
atednumber
.
 SequenceNumber
--Af
tert
heby
teshav
ebeennumber
ed,
TCPassi
gnsasequence
numbert
oeachsegmentt
hati
sbei
ngsent
.Thesequencenumberf
oreachsegment
i
sthenumberoft
hef
ir
stby
tecar
ri
edi
nthatsegment
 TCP i
srel
i
abl
e pr
otocol
.Thati
s,t
he r
ecei
veral
way
s sends ei
therposi
ti
ve ornegat
ive
acknowl
edgementaboutt
hedat
apackett
othesender
,sot
hatt
hesenderal
way
shasbr
ight
cl
ueaboutwhet
hert
hedat
apacketi
sreachedt
hedest
inat
ionori
tneedst
oresendi
t.Soi
t
useaacknowl
edgmentnumberf
iel
dint
heTCPpacketheader
.

 Thev
alueoft
heacknowl
edgmentf
iel
dinasegmentdef
inest
henumberoft
henext
by
teapar
tyex
pect
stor
ecei
ve.Theacknowl
edgmentnumberi
scumul
ati
ve
 TCPof
fer
sful
l
-dupl
exser
vice,i
nwhi
chdat
acanf
low i
nbot
hdi
rect
ionsatt
hesamet
ime.Each
TCPt
henhasasendi
ngandr
ecei
vi
ngbuf
fer
,andsegment
smov
einbot
hdi
rect
ions.

 TCPi
sconnect
ionor
ient
ed.TCPr
equi
rest
hatconnect
ionbet
weent
wor
emot
epoi
ntsbe
est
abl
i
shedbef
oresendi
ngact
ual
dat
a.

 TCPpr
ovi
deser
ror
-checki
ngandr
ecov
erymechani
sm.

 TCPpr
ovi
desend-
to-
endcommuni
cat
ion.

 TCPpr
ovi
desf
lowcont
rol
,congest
ioncont
rol
andqual
i
tyofser
vice.

 TCPoper
atesi
nCl
i
ent
/Ser
verpoi
nt-
to-
poi
ntmode.

TCPSEGMENTSTRUCTURE
32bi
ts

Sour
cePor
tAddr
ess(
16bi
t) Dest
inat
ion Por
t
Addr
ess(
16bi
t)

SequenceNumber
(32bi
ts)

Acknowl
edgementNumber
(32bi
ts)
Header Unused
Lengt
h (
6bi
ts) Wi
ndowSi
ze(
16bi
ts)

ACK
URG

PSH
RST
SYN
(
4bi
ts)

N
FI
Checksum (
16bi
ts) Ur
gentdat
aPoi
nter
(16bi
ts)

Opt
ions

Dat
a

 Sour
cePor
t(16-
bit
s) 
-Iti
dent
if
iessour
cepor
toft
heappl
i
cat
ionpr
ocessont
hesendi
ngdev
ice.

 Dest
inat
ionPor
t(16-
bit
s) 
-Iti
dent
if
iesdest
inat
ionpor
toft
heappl
i
cat
ionpr
ocessont
he
r
ecei
vi
ngdev
ice.

 SequenceNumber(
32-
bit
s) 
-Sequencenumberofdat
aby
tesofasegmenti
nasessi
on.

 Acknowl
edgementNumber(
32-
bit
s) 
-WhenACKf
lagi
sset
,thi
snumbercont
ainst
henext
sequencenumberoft
hedat
aby
teexpect
edandwor
ksasacknowl
edgementoft
hepr
evi
ous
dat
arecei
ved.

 Headerl
engt
h-Thi
s4-
bitf
iel
dindi
cat
est
henumberof4-
byt
ewor
dsi
ntheTCPheader
.
 Reser
ved-
Thi
sisa6-
bitf
iel
dreser
vedf
orf
utur
euse.

 Fl
ags(
1-bi
teach)

 URG 
-Iti
ndi
cat
es t
hatUr
gentPoi
nterf
iel
d has si
gni
fi
cantdat
a and shoul
d be
pr
ocessed.

 ACK 
-Iti
ndi
cat
est
hatAcknowl
edgementf
iel
dhassi
gni
fi
cance.I
fACKi
scl
ear
edt
o0,
it
i
ndi
cat
est
hatpacketdoesnotcont
ainanyacknowl
edgement
.

 PSH 
-Whenset
,iti
sar
equestt
other
ecei
vi
ngst
ati
ont
oPUSH dat
a(assoonasi
t
comes)t
other
ecei
vi
ngappl
i
cat
ionwi
thoutbuf
fer
ingi
t.

 RST 
-Resetf
laghast
hef
oll
owi
ngf
eat
ures:

 I
tisusedt
oref
useani
ncomi
ngconnect
ion.

 I
tisusedt
orej
ectasegment
.

 I
tisusedt
orest
artaconnect
ion.

 SYN 
-Thi
sfl
agi
susedt
osetupaconnect
ionbet
weenhost
s.

 FI
N -Thi
sfl
ag i
sused t
orel
easea connect
ion and no mor
edat
aisexchanged
t
her
eaf
ter
.Becausepacket
swi
thSYNandFI
Nfl
agshav
esequencenumber
s,t
heyar
e
pr
ocessedi
ncor
rector
der
.

 Wi ndowsSi ze 
-Thisf
ieldisusedforflow cont
rolbet
weentwostati
onsandindi
cat
esthe
amountofbuf f
er(i
nbytes)t
herecei
verhasall
ocatedf
orasegment
,i.
e.howmuchdataist
he
receiverexpect
ing.

 Checksum 
-Thi
sfi
eldcont
ainst
hechecksum ofHeader
,Dat
aandPseudoHeader
s.

 Ur
gentPoi
nter
 -I
tpoi
ntst
otheur
gentdat
aby
tei
fURGf
lagi
ssett
o1.

 Options 
-Itfacil
i
tatesaddi
ti
onalopt
ionswhicharenotcoveredbyther
egul
arheader.Opti
on
fi
eldisalwaysdescr i
bedin32-
bitwords.I
fthi
sfi
eldcontai
nsdatal
esst
han32-bi
t,paddi
ngis
usedt ocovertheremaini
ngbit
storeach32-bi
tboundar
y.

TCPCONNECTI
ONESTABLI
SHMENTANDTERMI
NATI
ON(
TCPCONNECTI
ONMANAGEMENT)

Thr
eephases

 Connect
ionest
abl
i
shment

 Dat
atr
ansf
er
 Connect
iont
ermi
nat
ion.

 Apr
ocessr
unni
ngi
nonehost(
cli
ent
)want
stoi
nit
iat
eaconnect
ionwi
thanot
herpr
ocessi
n
anot
herhost(
ser
ver
),t
hecl
i
entappl
i
cat
ionpr
ocessf
ir
sti
nfor
mst
hecl
i
entTCPt
hati
t
want
stoest
abl
i
shaconnect
iont
oapr
ocessi
ntheser
ver
.
 TheTCPi
nthecl
i
entt
henpr
oceedst
oest
abl
i
shaTCPconnect
ionwi
tht
heTCPi
nthe
ser
veri
nthef
oll
owi
ngmanner
:
St
ep1.
 Thecl
i
ent
-si
deTCPf
ir
stsendsaspeci
alTCPsegmentt
otheser
ver
-si
deTCP.Thi
s
speci
alsegmentcont
ainsnoappl
i
cat
ion-
lay
erdat
a.
 Butoneoft
hef
lagbi
tsi
nthesegment
’sheader
,theSYNbi
t,i
ssett
o1.
 Fort
hisr
eason,
thi
sspeci
alsegmenti
sref
err
edt
oasaSYNsegment
.
 I
naddi
ti
on,t
hecl
i
entr
andoml
ychoosesani
nit
ialsequencenumber(
cli
ent
_isn)and
put
s
t
hisnumberi
nthesequencenumberf
iel
doft
hei
nit
ial
TCPSYNsegment
.
 Thi
ssegmenti
sencapsul
atedwi
thi
nanI
Pdat
agr
am andsentt
otheser
ver
.
St
ep2
 Oncet
heI
Pdat
agr
am cont
aini
ngt
heTCPSYNsegmentar
ri
vesatt
heser
verhost
,the
ser
verext
ract
stheTCPSYN segmentf
rom t
hedat
agr
am,al
l
ocat
est
heTCPbuf
fer
s
andv
ari
abl
est
otheconnect
ion,andsendsaconnect
ion-
grant
edsegmentt
othecl
i
ent
TCP.
 Thi
sconnect
ion-
grant
edsegmental
socont
ainsnoappl
i
cat
ionl
ayerdat
a.
 Howev
er,
itdoescont
aint
hreei
mpor
tantpi
ecesofi
nfor
mat
ioni
nthesegmentheader
.

 Fi
rst
,theSYNbi
tissett
o1.
 Second,
theacknowl
edgmentf
iel
doft
heTCPsegmentheaderi
ssett
ocl
i
ent
_isn+1.
 Fi
nal
l
y,t
heser
verchoosesi
tsowni
nit
ialsequencenumber(
ser
ver
_isn)andput
s
t
hisv
aluei
nthesequencenumberf
iel
doft
heTCPsegmentheader
.

 Theconnect
iongr
ant
edsegmenti
sref
err
edt
oasaSYNACKsegment
.

Not
e:
 Thi
sconnect
ion-
grant
edsegmenti
ssay
ing,i
nef
fect
,“Ir
ecei
vedy
ourSYN packett
o
st
artaconnect
ionwi
thy
ouri
nit
ialsequencenumber
,cl
i
ent
_isn.Iagr
eet
oest
abl
i
sht
his
connect
ion.
 Myowni
nit
ial
sequencenumberi
sser
ver
_isn.

St
ep3
 Uponr
ecei
vi
ngt
heSYNACKsegment
,thecl
i
ental
soal
l
ocat
esbuf
fer
sandv
ari
abl
est
o
t
heconnect
ion.
 The cl
i
enthostt
hen sends t
he ser
very
etanot
hersegment
;thi
slastsegment
acknowl
edgest
heser
ver
’sconnect
ion-
grant
edsegment(
thecl
i
entdoessobyput
ti
ng
t
hev
alueser
ver
_isn+1i
ntheacknowl
edgmentf
iel
doft
heTCPsegmentheader
).
 TheSYNbi
tissett
ozer
o,si
ncet
heconnect
ioni
sest
abl
i
shed.
 Thi
sthi
rdst
ageoft
het
hree-
wayhandshakemaycar
rycl
i
ent
-t
o-ser
verdat
aint
he
segmentpay
load
 Thi
sconnect
ionest
abl
i
shmentpr
ocedur
eisof
tenr
efer
redt
oasat
hree-
wayhandshake.

Ti
me Ti
me
TCPt
hree-
wayhandshake:segmentexchange

Dat
aTr
ansf
er

 Af
terconnect
ioni
sest
abl
i
shed,bi
dir
ect
ionaldat
atr
ansf
ercant
akepl
ace.Thecl
i
entand
ser
vercanbot
hsenddat
aandacknowl
edgment
s.Thi
sdat
atr
ansf
erpr
ocessi
ncl
udest
wo
pr
ocessl
i
kepushi
ngdat
aandUr
gentdat
a.

Connect
ionTer
minat
ion
Anyoft
het
wopar
ti
esi
nvol
vedi
nexchangi
ngdat
a(cl
i
entorser
ver
)cancl
oset
heconnect
ion,
al
thoughi
tisusual
l
yini
ti
atedbyt
hecl
i
ent
.Mosti
mpl
ement
ati
onst
odayal
l
owt
woopt
ionsf
or
connect
iont
ermi
nat
ion:
t
hree-
wayhandshaki
ngandf
our
-wayhandshaki
ngW i
thahal
f-
closeopt
ion.
Thr
ee-
WayHandshaki
ng-Mosti
mpl
ement
ati
onst ow t
odayal
l hree-
wayhandshaki
ngf
orconnect
ion
t
ermi
nat
ionasshowni
nFi
gur
e
1.I
nanor
malsi
tuat
ion,
thecl
i
entTCP,
aft
err
ecei
vi
ngacl
osecommandf
rom t
hecl
i
entpr
ocess,
sendst
hef
ir
stsegment
,aFI
Nsegmenti
nwhi
cht
heFI
Nfl
agi
sset
.Not
ethataFI
Nsegment
cani
ncl
udet
hel
astchunkofdat
asentbyt
hecl
i
ent
,ori
tcanbej
ustacont
rolsegmentas
showni
nFi
gur
e
2.Theser
verTCP,af
terr
ecei
vi
ngt
heFI
N segment
,inf
ormsi
tspr
ocessoft
hesi
tuat
ionand
sendst
hesecondsegment N+
,aFI ACKsegment
,toconf
ir
mther
ecei
ptoft
heFI
Nsegment
f
rom t
hecl
i
entandatt
hesamet
imet
oannouncet
hecl
osi
ngoft
heconnect
ioni
ntheot
her
di
rect
ion.Thi
ssegmentcanal
socont
aint
hel
astchunkofdat
afr
om t
heser
ver
.
3.Thecl
i
entTCPsendst
hel
astsegment
,anACKsegment
,toconf
ir
mther
ecei
ptoft
heFI
N
segmentf
rom t
heTCPser
ver
.Thi
ssegmentcont
ainst
heacknowl
edgmentnumber
,whi
chi
s1
pl
ust
hesequencenumberr
ecei
vedi
ntheFI
Nsegmentf
rom t
heser
ver
.

f
our
-wayhandshaki
ngW i
thahal
f-
closeopt
ion-
InTCP,
oneendcanst
opsendi
ngdat
awhi
l
est
il
l
r
ecei
vi
ngdat
a.Thi
siscal
l
edahal
f-
close
 Supposet
hatt
hecl
i
entappl
i
cat
iondeci
desi
twant
stocl
oset
heconnect
ion.(
Not
ethatt
he
ser
vercoul
dal
sochooset
ocl
oset
heconnect
ion.
)
 Thi
scausest
hecl
i
entTCPt
osendaTCPsegmentwi
tht
heFI
Nbi
tsett
o1andt
oent
ert
he
FI
N_WAI
T_1st
ate.
 Whi
l
eint
heFI
N_WAI
T_1st
ate,
thecl
i
entTCPwai
tsf
oraTCPsegmentf
rom t
heser
verwi
than
acknowl
edgment
.
 Wheni
trecei
vest
hissegment
,thecl
i
entTCPent
erst
heFI
N_WAI
T_2st
ate.
 Whi
l
eint
heFI
N_WAI
T_2st
ate,t
hecl
i
entwai
tsf
oranot
hersegmentf
rom t
heser
verwi
tht
he
FI
N bi
tsett
o1;af
terr
ecei
vi
ngt
hissegment
,thecl
i
entTCP acknowl
edgest
heser
ver
’s
segmentandent
erst
heTI
ME_
WAI
Tst
ate.
 TheTI
ME_
WAI
Tst
atel
etst
heTCPcl
i
entr
esendt
hef
inalacknowl
edgmenti
ncaset
heACKi
s
l
ost
.
 Thet
imespenti
ntheTI
ME_
WAI
Tst
atei
simpl
ement
ati
on-
dependent
,butt
ypi
calv
aluesar
e30
seconds,
1mi
nut
e,and2mi
nut
es.
 Af
tert
hewai
t,t
heconnect
ionf
ormal
l
ycl
osesandal
lresour
cesont
hecl
i
entsi
de(
incl
udi
ng
por
tnumber
s)ar
erel
eased.

FLOW CONTROL

TCPusesasl
i
dingwi
ndowt
ohandl
efl
owcont
rol
.Thesl
i
dingwi
ndowpr
otocol
usedbyTCP,
howev
er,
i
ssomet
hing bet
weent
he Go- N and Sel
Back- ect
iveRepeatsl
i
ding wi
ndow.Thesl
i
ding wi
ndow
pr
otocoli
nTCP l
ooksl
i
ket
heGo-
Back-
N pr
otocolbecause i
tdoesnotuseNAKs;i
tlooksl
i
ke
Sel
ect
iveRepeatbecauset
her
ecei
verhol
dst
heout
-of
-or
dersegment
sunt
ilt
hemi
ssi
ngonesar
ri
ve.
Ther
ear
etwobi
gdi
ff
erencesbet
weent
hissl
i
dingwi
ndowandt
heoneweusedatt
hedat
ali
nkl
ayer
.
 Fi
rst
,thesl
i
dingwi
ndowofTCPi
sby
te-
ori
ent
ed;
theonewedi
scussedi
nthedat
ali
nkl
ayeri
s
f
rame-
ori
ent
ed.
 Second,t
heTCP'
ssl
i
dingwi
ndow i
sofv
ari
abl
esi
ze;t
heonewedi
scussedi
nthedat
ali
nk
l
ayerwasoff
ixedsi
ze
Fi
gur
eshowst
hesl
i
dingwi
ndowi
nTCP.Thewi
ndowspansapor
ti
onoft
hebuf
fercont
aini
ngby
tes
r
ecei
vedf
rom t
hepr
ocess.Theby
tesi
nsi
det
hewi
ndowar
etheby
test
hatcanbei
ntr
ansi
t;t
heycan
besentwi
thoutwor
ryi
ngaboutacknowl
edgment
.
 Thei
magi
nar
ywi
ndowhast
wowal
l
s:onel
eftandoner
ight
.
 Thewi sopened,
ndowi closed,
orshr
unk.
 Thesendermustobeyt
hecommandsoft
her
ecei
veri
nthi
smat
ter
.
 Openi
ngawi
ndowmeansmov
ingt
her
ightwal
ltot
her
ight
.Thi
sal
l
owsmor
enewby
tesi
nthe
buf
fert
hatar
eel
i
gibl
eforsendi
ng.
 Cl
osi
ngt
hewi
ndowmeansmov
ingt
hel
eftwal
ltot
her
ight
.Thi
smeanst
hatsomeby
teshav
e
beenacknowl
edgedandt
hesenderneednotwor
ryaboutt
hem any
mor
e.
 Shr
inki
ngt
hewi
ndowmeansmov
ingt
her
ightwal
ltot
hel
eft
.Thi
sisst
rongl
ydi
scour
agedand
notal
l
owedi
nsomei
mpl
ement
ati
onsbecausei
tmeansr
evoki
ngt
heel
i
gibi
l
ityofsomeby
tes
f
orsendi
ng.
ERRORCONTROL
 Er
rorcont
roli
ncl
udesmechani
smsf
ordet
ect
ingcor
rupt
edsegment
s,l
ostsegment
s,out
-of
-
or
dersegment
s,anddupl
i
cat
edsegment
s.
 Er
rorcont
rol
alsoi
ncl
udesamechani
sm f
orcor
rect
inger
ror
saf
tert
heyar
edet
ect
ed.
 Er
rordet
ect
ionandcor
rect
ioni
nTCP i
sachi
evedt
hrought
heuseoft
hreesi
mpl
etool
s:
checksum,
acknowl
edgment
,andt
ime-
out
.
Checksum—al
readydi
scussedi
nMODULEI
I
 ACKsegment
sdonotconsumesequencenumber
sandar
enotacknowl
edged.
 I
nmoder
nimpl
ement
ati
ons,ar
etr
ansmi
ssi
onoccur
sift
her
etr
ansmi
ssi
ont
imerexpi
resort
hree
dupl
i
cat
eACKsegment
shav
ear
ri
ved.
 Nor
etr
ansmi
ssi
ont
imeri
ssetf
oranACKsegment
 Dat
amayar
ri
veoutofor
derandbet
empor
ari
l
yst
oredbyt
her
ecei
vi
ngTCP,
butTCP
guar
ant
eest
hatnoout
-of
-or
dersegmenti
sdel
i
ver
edt
othepr
ocess

Compar
isonbet
weenTCPandUDP
Congest
ionCont
rol
andQual
i
tyofSer
vice

Congest
ionCont
rol
-tr
ytoav
oidt
raf
fi
ccongest
ion.
Qual
i
tyOfSer
vice-t
ryt
ocr
eat
eanappr
opr
iat
eenv
ironmentf
ort
het
raf
fi
c
Dat
aTr
aff
ic
Tr
aff
icDescr
ipt
or
Tr
aff
icdescr
ipt
orsar
equal
i
tat
ivev
aluest
hatr
epr
esentadat
afl
ow.Fi
gur
eshowsat
raf
fi
cfl
owwi
th
someoft
hesev
alues.

Aver
ageDat
aRat
e
Av
eragedat
ar e=amountofdat
at a/t
ime

Theav
eragedat
arat
eisav
eryusef
ulchar
act
eri
sti
coft
raf
fi
cbecausei
tindi
cat
est
heav
erage
bandwi
dthneededbyt
het
raf
fi
c
PeakDat
aRat
e
Thepeakdat
arat
edef
inest
hemaxi
mum dat
arat
eoft
het
raf
fi
c.Thepeakdat
arat
eisav
ery
i
mpor
tantmeasur
ementbecausei
tindi
cat
est
hepeakbandwi
dtht
hatt
henet
wor
kneedsf
ort
raf
fi
cto
passt
hroughwi
thoutchangi
ngi
tsdat
afl
ow.
Maxi
mum Bur
stSi
ze
Themaxi
mum bur
stsi
zenor
mal
l
yref
erst
othemaxi
mum l
engt
hoft
imet
het
raf
fi
cisgener
atedat
t
hepeakr
ate.
Ef
fect
iveBandwi
dth
Theef
fect
ivebandwi
dthi
sthebandwi
dtht
hatt
henet
wor
kneedst
oal
l
ocat
efort
hef
lowoft
raf
fi
c.
Theef
fect
ivebandwi
dthi
saf
unct
ion oft
hreev
alues:av
eragedat
arat
e,peakdat
arat
e,and
maxi
mum bur
stsi
ze.
Tr
aff
icPr
ofi
l
es
Adat
afl
owcanhav
eoneoft
hef
oll
owi
ngt
raf
fi
cpr
ofi
l
es:const
antbi
trat
e,v
ari
abl
ebi
trat
e,orbur
sty
asshowni
nFi
gur
e

Const
antBi
tRat
e
Aconst
ant
-bi
t-
rat
e(CBR)
,oraf
ixed-
rat
e,t
raf
fi
cmodelhasadat
arat
ethatdoesnotchange.I
nthi
s
t
ypeoff
low,t
heav
eragedat
arat
eandt
hepeakdat
arat
ear
ethesame.Thi
sty
peoft
raf
fi
cisv
ery
easyf
oranet
wor
ktohandl
esi
ncei
tispr
edi
ctabl
e.Thenet
wor
kknowsi
nadv
ancehow much
bandwi
dtht
oal
l
ocat
efort
hist
ypeoff
low.
Var
iabl
eBi
tRat
e
I
nthev
ari
abl
e-bi
t-
rat
e(VBR)cat
egor
y,t
her
ateoft
hedat
afl
owchangesi
nti
me,wi
tht
hechanges
smoot
hinst
eadofsuddenandshar
p.I
nthi
sty
peoff
low,t
heav
eragedat
arat
eandt
hepeakdat
a
r
atear
edi
ff
erent
.Themaxi
mum bur
stsi
zei
susual
l
yasmal
lval
ue.Thi
sty
peoft
raf
fi
cismor
e
di
ff
icul
ttohandl
ethanconst
ant
-bi
t-
rat
etr
aff
ic.
Bur
sty
I
nthebur
stydat
acat
egor
y,t
hedat
arat
echangessuddenl
yinav
eryshor
tti
me.I
tmayj
umpf
rom
zer
o.I
tmayal
sor
emai
natt
hisv
aluef
orawhi
l
e.Theav
eragebi
trat
eandt
hepeakbi
trat
ear
ever
y
di
ff
erentv
aluesi
nthi
sty
peoff
low.Themaxi
mum bur
stsi
zei
ssi
gni
fi
cant
.Thi
sist
hemostdi
ff
icul
t
t
ypeoft
raf
fi
cforanet
wor
ktohandl
ebecauset
hepr
ofi
l
eisv
eryunpr
edi
ctabl
e.Tohandl
ethi
sty
peof
t
raf
fi
c,t
henet
wor
knor
mal
l
yneedst
oreshapei
tusi
ngr
eshapi
ngt
echni
ques.Bur
styt
raf
fi
cisoneof
t
hemai
ncausesofcongest
ioni
nanet
wor
k.

Congest
ion

1.Congest
ioni
sani
mpor
tanti
ssuet
hatcanar
isei
npacketswi
tchednet
wor
k.
2.Congest
ioni
sasi
tuat
ioni
nCommuni
cat
ionNet
wor
ksi
nwhi
cht
oomanypacket
sar
epr
esent
i
napar
toft
hesubnet
.
3.Congest
ioni
nanet
wor
kmayoccurwhent
hel
oadont
henet
wor
kisgr
eat
ert
hant
hecapaci
ty
oft
henet
wor
k.
4.Duet
oCongest
iont
heper
for
mancedegr
ades.

Fact
orst
hatCausest
heCongest
ion:

 Packetar
ri
val
rat
eexceedst
heout
goi
ngl
i
nkcapaci
ty.

 I
nsuf
fi
ci
entmemor
ytost
orear
ri
vi
ngpacket
s.

 Bur
styt
raf
fi
c.

 Sl
owpr
ocessor

Net
wor
kPer
for
mance

Congest
ioncont
rol
inv
olv
est
wof
act
orst
hatmeasur
etheper
for
manceofanet
wor
k:del
ayand
t
hroughput
.Fi
gur
eshowst
heset
woper
for
mancemeasur
esasf
unct
ionofl
oad.

Del
ayVer
susLoad
 Not
ethatwhent
hel
oadi
smuchl
esst
hant
hecapaci
tyoft
henet
wor
k,t
hedel
ayi
sata
mi
nimum.Thi
smi
nimum del
ayi
scomposedofpr
opagat
iondel
ayandpr
ocessi
ngdel
ay,bot
h
ofwhi
char
enegl
i
gibl
e.Howev
er,whent
hel
oadr
eachest
henet
wor
kcapaci
ty,t
hedel
ay
i
ncr
easesshar
plybecausewenowneedt
oaddt
hewai
ti
ngt
imei
nthequeues(
foral
lrout
ers
i
nthepat
h)t
othet
otaldel
ay.Not
ethatt
hedel
aybecomesi
nfi
nit
ewhent
hel
oadi
sgr
eat
er
t
hant
hecapaci
ty.
 Del
ayhasanegat
iveef
fectont
hel
oadandconsequent
lyt
hecongest
ion.Whenapacketi
s
del
ayed,t
hesour
ce,notr
ecei
vi
ngt
heacknowl
edgment
,ret
ransmi
tst
hepacket
,whi
chmakes
t
hedel
ay,
andt
hecongest
ion,
wor
se.
Thr
oughputVer
susLoad
Thr
oughputi
nanet
wor
kast
henumberofpacket
spassi
ngt
hrought
henet
wor
kinauni
toft
ime.
Not
ice t
hatwhen t
he l
oad i
s bel
ow t
he capaci
ty oft
he net
wor
k,t
he t
hroughputi
ncr
eases
pr
opor
ti
onal
l
ywi
t hel
ht oad.Whent
hel
oadexceedst
hecapaci
ty,t
hequeuesbecomef
ullandt
he
r
out
ershav
etodi
scar
dsomepacket
s.Di
scar
dingpacket
;'
doesnotr
educet
henumberofpacket
sin
t
henet
wor
kbecauset
hesour
cesr
etr
ansmi
tthepacket
s,usi
ngt
ime-
outmechani
sms,whent
he
packet
sdonotr
eacht
hedest
inat
ions.Duet
othi
sthet
hroughputwi
l
ldecr
eases
Congest
ionCont
rol
:

1.Congest
ionCont
rol
ist
het
echni
quesandmechani
smswhi
chcanei
therpr
eventcongest
ion
f
rom happeni
ngorr
emov
econgest
ionaf
teri
thast
akenpl
ace.
2.Congest
ioncont
rol
mechani
smsar
edi
vi
dedi
ntot
wocat
egor
ies,
onecat
egor
ypr
event
sthe
congest
ionf
rom happeni
ngandt
heot
hercat
egor
yremov
escongest
ionaf
teri
thast
aken
pl
ace.

I
)OpenLoopCongest
ionCont
rol
:

I
nOpenLoopCongest
ionCont
rol
,pol
i
ciesar
eusedt
opr
eventt
hecongest
ionbef
orei
thappens.
Congest
ioncont
rol
ishandl
edei
therbyt
hesour
ceorbyt
hedest
inat
ion

I
I)Cl
osedLoopCongest
ionCont
rol
:

Cl
osedl
oopcongest
ioncont
rol
mechani
smst
ryt
oremov
ethecongest
ionaf
teri
thappens.

I
tusessomeki
ndoff
eedback.

I
)OpenLoopCongest
ionCont
rol
:

1)Ret
ransmi
ssi
onPol
i
cy:

 Thesenderr
etr
ansmi
tsapacket
,ifi
tfeel
sthatt
hepacketi
thassenti
slostorcor
rupt
ed.

 Howev
err
etr
ansmi
ssi
oni
ncr
easest
hecongest
ioni
nthenet
wor
k.

 Butweneedt
oimpl
ementgoodr
etr
ansmi
ssi
onpol
i
cyt
opr
eventcongest
ion.

 Ther
etr
ansmi
ssi
onpol
i
cyandt
her
etr
ansmi
ssi
ont
imer
sneedt
obedesi
gnedt
oopt
imi
ze
ef
fi
ciencyandatt
hesamet
imepr
eventt
hecongest
ion.

2)Wi
ndowPol
i
cy:

 Thet
ypeofwi
ndowatt
hesendermayal
soaf
fectcongest
ion.
 TheSel
ect
iveRepeatwi
ndowi
sbet
tert
hant
heGo-
Back-
Nwi
ndowf
orcongest
ioncont
rol
.
 I
ntheGo-
Back-
Nwi
ndow,
whent
het
imerf
orapackett
imesout
,sev
eral
packet
smayber
esent
,
al
though
 somemayhav
ear
ri
vedsaf
e
 Thi
sdupl
i
cat
ionmaymaket
hecongest
ionwor
se.
 TheSel
ect
iveRepeatwi
ndow,
ont
heot
herhand,
tri
est
osendt
hespeci
fi
cpacket
sthathav
e
beenl
ostorcor
rupt
ed.
3)Acknowl
edgementPol
i
cy:

 Theacknowl
edgementpol
i
cyi
mposedbyt
her
ecei
vermayal
soaf
fectcongest
ion.

 I
fther
ecei
verdoesnotacknowl
edgeev
erypacketi
trecei
vesi
tmaysl
owdownt
hesenderand
hel
ppr
eventcongest
ion.

 Acknowl
edgment
sal
so add t
othet
raf
fi
cload on t
henet
wor
k.Thus,bysendi
ng f
ewer
acknowl
edgement
swecanr
educel
oadont
henet
wor
k.

 Toi
mpl
ementi
t,sev
eral
appr
oachescanbeused:

 Ar
ecei
vermaysendanacknowl
edgementonl
yifi
thasapackett
obesent
.
 Ar
ecei
vermaysendanacknowl
edgementwhenat
imerexpi
res.

 Ar
ecei
vermayal
sodeci
det
oacknowl
edgeonl
yNpacket
satat
ime

4)Di
scar
dingPol
i
cy:

 Ar
out
ermaydi
scar
dlesssensi
ti
vepacket
swhencongest
ioni
sli
kel
ytohappen.

 Suchadi
scar
dingpol
i
cymaypr
eventcongest
ionandatt
hesamet
imemaynothar
mthe
i
ntegr
it
yoft
het
ransmi
ssi
on.

5)Admi
ssi
onPol
i
cy:

 Anadmi
ssi
onpol
i
cy,
whi
chi
saqual
i
ty-
of-
ser
vicemechani
sm,
canal
sopr
eventcongest
ioni
n
v
irt
ual
cir
cui
tnet
wor
ks.

 Swi
tchesi
naf
low,
fir
stcheckt
her
esour
cer
equi
rementofaf
lowbef
oreadmi
tt
ingi
ttot
he
net
wor
k.

 Ar
out
ercandenyest
abl
i
shi
ngav
irt
ual
cir
cui
tconnect
ioni
fther
eiscongest
ioni
nthenet
wor
k
ori
fther
eisapossi
bil
i
tyoff
utur
econgest
ion.

I
ICl
  osedLoopCongest
ionCont
rol

Cl
osedl
oopcongest
ioncont
rolmechani
smst
ryt
oremov
ethecongest
ionaf
teri
thappens.The
v
ari
ousmet
hodsusedf
orcl
osedl
oopcongest
ioncont
rol
are:

i
.Backpr
essur
e

a.Backpr
essur
eisanode-
to-
nodecongest
ioncont
rolt
hatst
art
swi
thanodeandpr
opagat
es,i
nthe
opposi
tedi
rect
ionofdat
afl
ow.

b.Thebackpr
essur
etechni
quecanbeappl
i
edonl
ytov
irt
ualci
rcui
tnet
wor
ks.I
nsuchv
irt
ualci
rcui
t
eachnodeknowst
heupst
ream nodef
rom whi
chadat
afl
owi
scomi
ng.

c.I
nthi
smet
hodofcongest
ioncont
rol
,thecongest
ednodest
opsr
ecei
vi
ngdat
afr
om t
hei
mmedi
ate
upst
ream nodeornodes.

d.Thi
smaycauset
heupst
ream nodeonnodest
obecomecongest
ed,andt
hey
,int
urn,r
ejectdat
a
f
rom t
hei
rupst
ream nodeornodes.

e.Asshowni
nfi
gnode3i
scongest
edandi
tst
opsr
ecei
vi
ngpacket
sandi
nfor
msi
tsupst
ream node
2t
osl
owdown.Node2i
ntur
nsmaybecongest
edandi
nfor
msnode1t
osl
owdown.Nownode1
maycr
eat
econgest
ionandi
nfor
mst
hesour
cenodet
osl
ow down.I
nthi
swayt
hecongest
ioni
s
al
l
evi
ated.Thus,
thepr
essur
eonnode3i
smov
edbackwar
dtot
hesour
cet
oremov
ethecongest
ion.

i
i
.ChokePacket

 
a.I
nthi
smet
hodofcongest
ioncont
rol
,congest
edr
out
erornodesendsaspeci
alt
ypeofpacket
cal
l
edchokepackett
othesour
cet
oinf
ormi
taboutt
hecongest
ion.

b.Her
e,congest
ednodedoesnoti
nfor
mit
supst
ream nodeaboutt
hecongest
ionasi
nbackpr
essur
e
met
hod.

c.I
nchokepacketmet
hod,congest
ednodesendsawar
ningdi
rect
lyt
othesour
cest
ati
oni
.e.t
he
i
nter
medi
atenodest
hroughwhi
cht
hepackethast
rav
eledar
enotwar
ned.

i
i
i.I
mpl
i
citSi
gnal
i
ng

a.I
nimpl
i
citsi
gnal
i
ng,t
her
eisnocommuni
cat
ionbet
weent
hecongest
ednodeornodesandt
he
sour
ce.

b.Thesour
ceguessest
hatt
her
eiscongest
ionsomewher
eint
henet
wor
kwheni
tdoesnotr
ecei
ve
any acknowl
edgment
.Ther
efor
ethe del
ay i
nrecei
vi
ng an acknowl
edgmenti
sint
erpr
eted as
congest
ioni
nthenet
wor
k.

c.Onsensi
ngt
hiscongest
ion,
thesour
cesl
owsdown.
d.Thi
sty
peofcongest
ioncont
rol
pol
i
cyi
susedbyTCP.

i
v.Expl
i
citSi
gnal
i
ng

a.I
nthi
smet
hod,
thecongest
ednodesexpl
i
cit
lysendasi
gnalt
othesour
ceordest
inat
iont
oinf
orm
aboutt
hecongest
ion.

b.Expl
i
citsi
gnal
i
ngi
sdi
ff
erentf
rom t
hechokepacketmet
hod.I
nchokepackedmet
hod,asepar
ate
packeti
susedf
ort
hispur
posewher
easi
nexpl
i
citsi
gnal
i
ngmet
hod,t
hesi
gnali
sincl
udedi
nthe
packet
sthatcar
rydat
a.

c.Expl
i
citsi
gnal
i
ngcanoccuri
nei
thert
hef
orwar
ddi
rect
ionort
hebackwar
ddi
rect
ion.

d.I
nbackwar
dsi
gnal
i
ng,abi
tisseti
napacketmov
ingi
nthedi
rect
ionopposi
tet
othecongest
ion.
Thi
sbi
twar
nst
hesour
ceaboutt
hecongest
ionandi
nfor
mst
hesour
cet
osl
owdown.

e.I
nfor
war
dsi
gnal
i
ng,abi
tisseti
napacketmov
ingi
nthedi
rect
ionofcongest
ion.Thi
sbi
twar
ns
t
hedest
inat
ionaboutt
hecongest
ion.Ther
ecei
veri
nthi
scaseusespol
i
ciessuchassl
owi
ngdown
t
heacknowl
edgement
stor
emov
ethecongest
ion

Qual
i
tyofSer
vice(
QoS)i
nComput
erNet
wor
k
Fl
owChar
act
eri
sti
cs 
Tradi
ti
onal
ly
,fourt
ypes ofchar
act
eri
sti
cs ar
e at
tr
ibut
ed t
oaf
low:r
eli
abi
l
ity
,del
ay,j
i
tterand
bandwidt
h.

Rel
i
abi
l
ity


  Rel
i
abi
l
ityi
sani
mpor
tantchar
act
eri
sti
coff
low.

•Lackofr
eli
abi
l
itymeansl
osi
ngapacketoracknowl
edgementwhi
cht
henr
equi
resr
etr
ansmi
ssi
on.


  Howev
er,
thesensi
ti
vi
tyofappl
i
cat
ionpr
ogr
amst
orel
i
abi
l
ityi
snott
hesame.Forexampl
e,i
tis
mor
eimpor
tantt
hatel
ect
roni
cmai
l
,fi
l
etr
ansf
er,
and 
i
nter
net
 accesshav
erel
i
abl
etr
ansmi
ssi
ons
t
hanaudi
oconf
erenci
ngort
elephony
.

Del
ay

•Sour
cet
odest
inat
iondel
ayi
sanot
herf
lowchar
act
eri
sti
c.
•Appl
i
cat
ionscant
oler
atedel
ayi
ndi
ff
erentdegr
ees.

•I
nthi
scase,
tel
ephony
,audi
oconf
erenci
ng,
videoconf
erenci
ngandr
emot
elogi
nneedmi
nimum
del
aywhi
l
edel
ayi
nfi
l
etr
ansf
erore-
mai
li
slessi
mpor
tant
.

Ji
tt
er

•Ji
tt
eri
sdef
inedast
hev
ari
ati
oni
ndel
ayf
orpacket
sbel
ongi
ngt
othesamef
low.

•Hi
ghJi
tt
ermeanst
hedi
ff
erencebet
weendel
aysi
slar
geandl
owj
i
ttermeanst
hev
ari
ati
oni
ssmal
l
.

•Forexampl
e,i
ffourpacket
sdepar
tatt
imes0,
1,2,
3andar
ri
veat20,
21,
22,
23,
all
hav
esamedel
ay,
20uni
tsoft
ime.Ont
heot
herhand,
ift
heabov
efourpacket
sar
ri
veat21,
23,
21,
and28t
heywi
l
lhav
e
di
ff
erentdel
aysof
21,
22,
19and24.

Bandwi
dth

•Di
ff
erentappl
i
cat
ionsneeddi
ff
erentbandwi
dths.

•I
nvi
deoconf
erenci
ngweneedt
osendmi
l
li
onofbi
tspersecondt
oref
reshacol
ourscr
eenwhi
l
e
t
het
otal
numberofbi
tsi
nanemai
lmaynotr
eachev
enami
l
li
on.

Techni
quest
oImpr
oveQoS:

Techni
quest
hatcanbeusedt
oimpr
ovet
hequal
i
tyofser
viceasf
oll
owsschedul
i
ng,
traf
fi
cshapi
ng,
admi
ssi
oncont
rol
andr
esour
cer
eser
vat
ion.

a)
Schedul
i
ng:

Packet
sfr
om di
ff
erentf
lowsar
ri
veataswi
tchorr
out
erf
orpr
ocessi
ng.Agoodschedul
i
ngt
echni
que
t
reat
sthedi
ff
erentf
lowsi
naf
airand appr
opr
iat
emanner
.Sev
eralschedul
i
ng t
echni
quesar
e
desi
gnedt
oimpr
ovet
hequal
i
tyofser
vice.Thr
eeoft
hem her
e:FI
FOqueui
ng,pr
ior
it
yqueui
ng,and
wei
ght
edf
airqueui
ng.

1)FI
FOQueui
ng:I
nfi
rst
-i
n,f
ir
st-
out(
FIFO)
 queui
ng,packet
swai
tinabuf
fer(
queue)unt
ilt
he
node(
rout
erorswi
tch)i
sreadyt
opr
ocesst
hem.I
ftheav
eragear
ri
valr
atei
shi
ghert
hant
he
av
eragepr
ocessi
ngr
ate,
thequeuewi
l
lfi
l
lupandnewpacket
swi
l
lbedi
scar
ded.Fi
gur
eshows
aconcept
ual
viewofaFI
FOqueue.

Fi
g:FI
FOqueue
2)Pr
ior
it
yQueui
ng:
 
Inpr
ior
it
yqueui
ng,packet
sar
efi
rstassi
gnedt
oapr
ior
it
ycl
ass.Each
pr
ior
it
ycl
asshasi
tsownqueue.Thepacket
sint
hehi
ghest
-pr
ior
it
yqueuear
epr
ocessedf
ir
st.
Packet
sint
hel
owest
-pr
ior
it
yqueuear
epr
ocessedl
ast
.Not
ethatt
hesy
stem doesnotst
op
ser
vingaqueueunt
ili
tisempt
y.

Fi
gur
eshowspr
ior
it
yqueui
ngwi
tht
wopr
ior
it
ylev
els(
forsi
mpl
i
cit
y).

Apr
ior
it
yqueuecanpr
ovi
debet
terQoSt
hant
heFI
FOqueuebecausehi
gherpr
ior
it
ytr
aff
ic,
suchasmul
ti
medi
a,canr
eacht
hedest
inat
ionwi
thl
essdel
ay.

3)Wei
ght
edFai
rQueui
ng:
 
A bet
terschedul
i
ngmet
hodi
swei
ght
edf
airqueui
ng.I
nthi
s
t
echni
que,t
hepacket
sar
est
il
lassi
gned t
o di
ff
erentcl
assesand admi
tt
edt
o di
ff
erent
queues.Thequeues,howev
er,ar
ewei
ght
edbasedont
hepr
ior
it
yoft
hequeues;hi
gher
pr
ior
it
ymeansahi
gherwei
ght
.Thesy
stem pr
ocessespacket
sineachqueuei
nar
ound-
robi
n
f
ashi
onwi
tht
henumberofpacket
ssel
ect
edf
rom eachqueuebasedont
hecor
respondi
ng
wei
ght
.

b)
Traf
fi
cShapi
ng:

Tr
aff
icshapi
ng(
alsor
efer
redt
oaspacketshapi
ng)i
sthet
echni
queofdel
ayi
ngandr
est
ri
cti
ng
cer
tai
npacket
str
avel
i
ngt
hroughanet
wor
ktoi
ncr
easet
heper
for
manceofpacket
sthathav
ebeen
gi
venpr
ior
it
y.

•Cl
assesar
edef
inedt
osepar
atet
hepacket
sint
ogr
oupi
ngssot
hatt
heycaneachbeshaped
separ
atel
yal
l
owi
ngsomecl
assest
opasst
hroughanet
wor
kmor
efr
eel
ythanot
her
s.Tr
aff
icshaper
s
ar
eusual
l
ypl
acedatt
heboundar
iesofanet
wor
ktoei
thershapet
het
raf
fi
cgoi
ngent
eri
ngorl
eav
ing
anet
wor
k.

•Tr
aff
icshapi
ngi
samechani
sm t
ocont
rolt
heamountandr
ateoft
het
raf
fi
csentt
othenet
wor
k.
Thet
wot
raf
fi
cshapi
ngt
echni
quesar
e:

i
.LeakyBucketAl
gor
it
hm

•Leakybucketi
sabucketwi
thahol
eatbot
tom.Fl
owoft
hewat
erf
rom bucketi
sataconst
antr
ate
whi
chi
sindependentofwat
erent
eri
ngt
hebucket
.Ifbucketi
sful
l
,anyaddi
ti
onalwat
erent
eri
ngi
n
t
hebucketi
sthr
ownout
.

•Samet
echni
quei
sappl
i
edt
ocont
rolcongest
ioni
nnet
wor
ktr
aff
ic.Ev
eryhosti
nthenet
wor
kis
hav
ingabuf
ferwi
thf
ini
tequeuel
engt
h

•Packet
swhi
char
eputi
nthebuf
feri
sful
lar
ethr
ownaway
.Thebuf
fermaydr
ainont
othesubnet
ei
therbysomenumberofpacket
speruni
tti
me,
orbysomet
otal
numberofby
tesperuni
tti
me.

•AFI
FOqueuei
susedf
orhol
dingt
hepacket
s.

•I
fthear
ri
vi
ngpacket
sar
eoff
ixedsi
ze,t
hent
hepr
ocessr
emov
esaf
ixednumberofpacket
sfr
om
t
hequeueateacht
ickoft
hecl
ock.

•I
fthear
ri
vi
ngpacket
sar
eofdi
ff
erentsi
ze,t
hent
hef
ixedout
putr
atewi
l
lnotbebasedont
he
numberofdepar
ti
ngpacket
s.

•I
nst
eadi
twi
l
lbebasedont
henumberofdepar
ti
ngby
tesorbi
ts.

TokenBucketAl
gor
it
hm:

 Hosti
sconnect
edt
othenet
wor
kbyani
nter
face.Thi
sint
erf
acei
sact
ual
l
yabucket
.At
okeni
s
gener
atedi
nthebucketev
ery∆Tseconds.
 Thehostsendsanunr
egul
atedf
low t
othebucket
.Forapackett
obet
ransmi
tt
edt
othe
net
wor
k,i
tmustcapt
ureanddest
royat
okenpr
esenti
nthebucket
.

 I
fthel
osti
snotsendi
ngpacket
stot
hebuckett
het
okenskeepget
ti
ngaccumul
atedi
nthe
bucket
.Gener
all
yther
eisamaxi
mum amountoft
okenst
hatcanbeaccumul
atedi
nthe
bucket
.

 Duet
othi
sfeat
ureoft
okensget
ti
ngaccumul
ated,bur
stscanbehandl
edbet
ter
.Ther
efor
ein
t
hiscaset
her
atei
ncr
easesi
ftokensar
esav
edi
nthebucket
,wher
easi
nleakybuckett
her
ate
wi
l
lal
way
sbeconst
ant(
1packetpercl
ockt
ic)
.

c)Resour
ceReser
vat
ion:

Af
low ofdat
aneedsr
esour
cessuchasabuf
fer
,bandwi
dth,CPUt
ime,andsoon.Thequal
i
tyof
ser
vicei
simpr
ovedi
ftheser
esour
cesar
ereser
vedbef
orehand.

d)Admi
ssi
onCont
rol
:

Admi
ssi
oncont
rolr
efer
stot
hemechani
sm usedbyar
out
er,oraswi
tch,t
oacceptorr
ejectaf
low
basedonpr
edef
inedpar
amet
erscal
l
edf
low speci
fi
cat
ions.Bef
orear
out
eraccept
saf
low f
or
pr
ocessi
ng,
itcheckst
hef
lowspeci
fi
cat
ionst
oseei
fit
scapaci
ty(
int
ermsofbandwi
dth,
buf
fersi
ze,
CPUspeed,
etc.
)andi
tspr
evi
ouscommi
tment
stoot
herf
lowscanhandl
ethenewf
low.

APPLI
CATI
ONLAYER
Topi
cs:DNS,
Remot
eLoggi
ng(
Tel
net
),SMTP,
FTP,
WWW,
HTTP,
POP3,
MIME,
SNMP

DNS-Domai
nNameSy
stems

Domai
nNameSy
stem

 Domai
nNameSy
stem i
sanI
nter
netser
vicet
hatt
ransl
atesdomai
nnamesi
ntoI
Paddr
esses.
 TheDNShasadi
str
ibut
eddat
abaset
hatr
esi
desonmul
ti
plemachi
nesont
heI
nter
net
.
 DNShassomepr
otocol
sthatal
l
owt
hecl
i
entandser
ver
stocommuni
cat
ewi
theachot
her
.
 Whent
heI
nter
netwassmal
l
,mappi
ngwasdonebyusi
nghost
s.t
xtf
il
e.
 Thehostf
il
ewasl
ocat
edathost
'
sdi
skandupdat
edper
iodi
cal
l
yfr
om amast
erhostf
il
e.
 Whenanypr
ogr
am oranyuserwant
edt
omap 
domai
nnamet
oanaddr
ess,
thehostconsul
tedt
he
hostf
il
eandf
oundt
hemappi
ng.
 NowI
nter
neti
snotsmal
l
,iti
simpossi
blet
ohav
eonl
yonehostf
il
etor
elat
eev
eryaddr
esswi
tha
nameandv
icev
ersa.
 Thesol
uti
onusedt
odayi
stodi
vi
det
hehostf
il
eint
osmal
l
erpar
tsandst
oreeachpar
tonadi
ff
erent
comput
er.
 I
nthi
smet
hod,
thehostt
hatneedsmappi
ngcancal
lthecl
osestcomput
erhol
dingt
heneeded
i
nfor
mat
ion.
 Thi
smet
hodi
susedi
nDomai
nNameSy
stem (
DNS)
.

Namespace

 Thenamesassi
gnedt
othemachi
nesmustbecar
eful
l
ysel
ect
edf
rom anamespacewi
thcompl
ete
cont
rol
overt
hebi
ndi
ngbet
weent
henamesandI
Paddr
esses.
 Ther
ear
etwot
ypesofnamespaces:
FlatnamespacesandHi
erar
chi
cal
names.
Fl
atnamespaces

 I
naf
latnamespace,
anamei
sasequenceofchar
act
erswi
thoutst
ruct
ure.
 Anamei
nthi
sspacei
sassi
gnedt
oanaddr
ess.
 Thenameswer
econv
eni
entandshor
t.
 Af
latnamespacecannotbeusedi
nal
argesy
stem suchast
hei
nter
netbecausei
tmustbe
cent
ral
l
ycont
rol
l
edt
oav
oidambi
gui
tyanddupl
i
cat
ion.

Hi
erar
chi
cal
NameSpace

 I
nhi
erar
chi
cal
namespace,
eachnameconsi
stsofsev
eral
par
ts.
 Fi
rstpar
tdef
inest
henat
ureoft
heor
gani
zat
ion,
secondpar
tdef
inest
henameofanor
gani
zat
ion,
t
hir
dpar
tdef
inesdepar
tmentoft
heor
gani
zat
ion,
andsoon.
 I
nhi
erar
chi
cal
namespace,
theaut
hor
it
ytoassi
gnandcont
rol
thenamespacescanbe
decent
ral
i
zed.
 Aut
hor
it
yfornamesi
neachpar
ti
ti
oni
spassedt
oeachdesi
gnat
edagent
.

DOMAI
NNAMESPACE
Tohav
eahi
erar
chi
cal
namespace,
adomai
nnamespacewasdesi
gned.I
nthi
sdesi
gnt
henames
ar
edef
inedi
nani
nver
ted-
tr
eest
ruct
urewi
tht
her
ootatt
het
op.
Label
Eachnodei
nthet
reehasal
abel
,whi
chi
sast
ri
ngwi
thamaxi
mum of63char
act
ers.Ther
ootl
abel
is
anul
lst
ri
ng(
empt
yst
ri
ng)
.Af
terr
ootnexti
scal
l
edTLD(
TopLev
elDomai
n).DNSr
equi
rest
hat
chi
l
drenofanode(
nodest
hatbr
anchf
rom t
hesamenode)hav
edi
ff
erentl
abel
s,whi
chguar
ant
ees
t
heuni
quenessoft
hedomai
nnames.
Domai
nName
Eachnodei
nthet
reehasadomai
nname.Af
ulldomai
nnamei
sasequenceofl
abel
ssepar
atedby
dot
s(.
).Thedomai
nnamesar
eal
way
sreadf
rom t
henodeupt
other
oot
.Thel
astl
abel
ist
hel
abel
of
t
her
oot(
nul
l
).Thi
smeanst
hataf
ulldomai
nnameal
way
sendsi
nanul
llabel
,whi
chmeanst
hel
ast
char
act
eri
sadotbecauset
henul
lst
ri
ngi
snot
hing.

Ful
l
yQual
i
fiedDomai
nName

I
fal
abel
ist
ermi
nat
edbyanul
lst
ri
ng,
iti
scal
l
edaf
ull
yqual
i
fieddomai
nname(
FQDN)
.AnFQDNi
sa
domai
nnamet
hatcont
ainst
hef
ull
nameofahost
.Itcont
ainsal
ll
abel
s,f
rom t
hemostspeci
fi
cto
t
hemostgener
al,
thatuni
quel
ydef
inet
henameoft
hehost
.Forexampl
e,t
hedomai
nname-
--
-
chal
l
enger
.at
e.t
bda.
edu.
Par
ti
all
yQual
i
fiedDomai
nName
I
fal
abeli
snott
ermi
nat
edbyanul
lst
ri
ng,i
tiscal
l
edapar
ti
all
yqual
i
fieddomai
nname(
PQDN)
.A
PQDNst
art
sfr
om anode,
buti
tdoesnotr
eacht
her
oot
.eg.
--
-at
c.f
hda.
edu,
fhda.
edu
DI
STRI
BUTI
ONOFNAMESPACE
Thei
nfor
mat
ioncont
ainedi
nthedomai
nnamespacemustbest
ored.Howev
er,i
tisv
eryi
nef
fi
cientand
al
sounr
eli
abl
etohav
ejustonecomput
erst
oresuchahugeamountofi
nfor
mat
ion.I
tisi
nef
fi
ci
ent
becauser
espondi
ngt
orequest
sfr
om al
lov
ert
hewor
ldpl
acesaheav
yloadont
hesy
stem.I
tisnot
unr
eli
abl
ebecauseanyf
ail
uremakest
hedat
ainaccessi
ble.
Hi
erar
chyofNameSer
ver
s
Thesol
uti
ont
othesepr
obl
emsi
stodi
str
ibut
ethei
nfor
mat
ionamongmanycomput
erscal
l
edDNS
ser
ver
s.Onewayt
odot
hisi
stodi
vi
det
hewhol
espacei
ntomanydomai
nsbasedont
hef
ir
stl
evel
.In
ot
herwor
ds,wel
ett
her
ootst
andal
oneandcr
eat
easmanydomai
ns(
subt
rees)ast
her
ear
efi
rst
-
l
evelnodes.Becauseadomai
ncr
eat
edi
nthi
swaycoul
dbev
eryl
arge,DNSal
l
owsdomai
nst
obe
di
vi
dedf
urt
heri
ntosmal
l
erdomai
ns(
subdomai
ns)
.Eachser
vercanber
esponsi
ble(
aut
hor
it
ati
ve)
f
orei
theral
argeorasmal
ldomai
n.I
not
herwor
ds,wehav
eahi
erar
chyofser
ver
sint
hesameway
t
hatwehav
eahi
erar
chyofnames
Zone
Si
ncet
hecompl
etedomai
nnamehi
erar
chycannotbest
oredonasi
ngl
eser
ver
,iti
sdi
vi
dedamong
manyser
ver
s.Whataser
veri
sresponsi
blef
ororhasaut
hor
it
yov
eri
scal
l
edazone.Wecandef
inea
zoneasacont
iguouspar
toft
heent
ir
etr
ee.I
faser
veraccept
sresponsi
bil
i
tyf
oradomai
nanddoes
notdi
vi
det
hedomai
nint
osmal
l
er
domai hedomai
ns,t nandt
hezoner
efert
othesamet
hing.Theser
vermakesadat
abasecal
l
eda
zonef
il
eandkeepsal
lthei
nfor
mat
ionf
orev
erynodeundert
hatdomai
n.Howev
er,
ifaser
verdi
vi
des
i
tsdomai
nint
osubdomai
nsanddel
egat
espar
tofi
tsaut
hor
it
ytoot
herser
v s,domai
er nandzone
r
efert
odi
ff
erentt
hings.Thei
nfor
mat
ionaboutt
henodesi
nthesubdomai
nsi
sst
oredi
ntheser
ver
s
att
hel
owerl
evel
s,wi
tht
heor
igi
nalser
verkeepi
ngsomesor
tofr
efer
encet
othesel
ower
-l
evel
ser
ver
s.Ofcour
set
heor
igi
nalser
verdoesnotf
reei
tsel
ffr
om r
esponsi
bil
i
tyt
otal
l
y:I
tst
il
lhasaz
one,
butt
hedet
ail
edi
nfor
mat
ioni
skeptbyt
hel
ower
-l
evel
ser
ver
s

DNSI
NTHEI
NTERNET

 DNSi
sapr
otocol
thatcanbeusedi
ndi
ff
erentpl
atf
orm.
 Domai
nNameSpacei
sdi
vi
dedi
ntodi
ff
erentsect
ionsi
ntheI
nter
net
:Gener
icdomai
n,count
ry
domai
nandi
nver
sedomai
n.
Gener
icDomai
ns

Thegener
icdomai
nsdef
iner
egi
ster
edhost
saccor
dingt
othei
rgener
icbehav
ior
.
Count
ryDomai
ns
 Count
rydomai
nusest
wochar
act
ercount
ryabbr
evi
ati
ons.
 Secondl
abel
scanbemor
especi
fi
c,nat
ional
desi
gnat
ion.
 Forexampl
e,
 f
orAust
ral
i
athecount
rydomai
nis“
au”
,Ini
dai
s.i
n,UKi
s.uket
c.

I
nver
seDomai
ns
 I
nver
sedomai
nisusedt
omapanaddr
esst
oaname.
 Forexampl
e,
 acl
i
entsendar
equestt
otheser
verf
orper
for
mingapar
ti
cul
art
ask,
ser
verf
indsal
i
st
ofaut
hor
izedcl
i
ent

 Thel
i
stcont
ainsonl
yIPaddr
essesoft
hecl
i
ent
.
 Theser
versendsaquer
ytot
heDNSser
vert
omapanaddr
esst
oanamet
odet
ermi
nei
fthecl
i
enti
s
ont
heaut
hor
izedl
i
st.
 Thi
squer
yiscal
l
edani
nver
sequer
y.
 Thi
squer
yishandl
edbyf
ir
stl
evel
nodecal
l
edar
pa.
RESOLUTI
ON

Mappi
nganamet
oanaddr
essoranaddr
esst
oanamei edname-
scal
l addr
essr
esol
uti
on

Resol
ver
DNSi
sdesi
gnedasacl
i
ent
/ser
verappl
i
cat
ion.Ahostt
hatneedst
omapanaddr
esst
oanameoraname
t
oanaddr
esscal
l
saDNScl
i
entcal
l
edar
esol
ver
.Ther
esol
veraccessest
hecl
osestDNSser
verwi
tha
mappi
ngr
equest
.Ift
heser
verhast
hei
nfor
mat
ion,i
tsat
isf
iest
her
esol
ver
;ot
her
wise,i
tei
therr
efer
sthe
r
esol
vert
oot
herser
ver
sorasksot
her
ser
ver
stopr
ovi
det
hei
nfor
mat
ion.Af
tert
her
esol
verr
ecei
vest
hemappi
ng,i
tint
erpr
etst
her
esponset
o
seei
fiti
sa
r
eal
resol
uti
onoraner
ror
,andf
inal
l
ydel
i
ver
sther
esul
ttot
hepr
ocesst
hatr
equest
edi
t.
r
esol
uti
ont
wot
ypes
Recur
siveResol
uti
on
Thecl
ient(r
esol
ver)canaskf
orar
ecur
siv
eanswerf
rom anameser
ver
.Thi
smeanst
hatt
her
esol
ver
expect
stheser
vert
osuppl
ythef
inalanswer
.Ift
heser
veri
stheaut
hor
it
yfort
hedomai
nname,i
t
checksi
tsdat
abaseandr
esponds.I
ftheser
veri
snott
heaut
hor
it
y,i
tsendst
her
equestt
oanot
her
ser
ver(
thepar
entusual
l
y)andwai
tsf
ort
her
esponse.I
fthepar
enti
stheaut
hor
it
y,i
tresponds;
ot
her
wise,i
tsendst
hequer
ytoy
etanot
herser
ver
.Whent
hequer
yisf
inal
l
yresol
ved,t
her
esponse
t
rav
elsbackunt
ili
tfi
nal
l
yreachest
her
equest
ingcl
i
ent
.Thi
siscal
l
edr
ecur
siv
eresol
uti
on
I
ter
ati
veResol
uti
on
I
fthecl
i
entdoesnotaskf
orar
ecur
siv
eanswer
,themappi
ngcanbedonei
ter
ati
vel
y.I
ftheser
veri
s
anaut
hor
it
yfort
hename,i
tsendst
heanswer
.Ifi
tisnot
,itr
etur
ns(
tot
hecl
i
ent
)theI
Paddr
essof
t
heser
vert
hati
tthi
nkscanr
esol
vet
hequer
y.Thecl
i
enti
sresponsi
blef
orr
epeat
ingt
hequer
ytot
his
secondser
ver
.Ift
henewl
yaddr
essedser
vercanr
esol
vet
hepr
obl
em,i
tanswer
sthequer
ywi
tht
he
I
Paddr
ess;ot
her
wise,i
tret
urnst
heI
Paddr
essofanew ser
vert
othecl
i
ent
.Now t
hecl
i
entmust
r
epeatt
hequer
ytot
het
hir
dser
ver
.Thi
spr
ocessi
scal
l
edi
ter
ati
ver
esol
uti
onbecauset
hecl
i
ent
r
epeat
sthesamequer
ytomul
ti
pleser
ver
s.

Cachi
ng
Eachti
measer
verr
ecei
vesaquer
yforanamet
hati
snoti
nit
sdomai
n,i
tneedst
osear
chi
ts
dat
abasef
oraser
verI
Paddr
ess.Reduct
ionoft
hissear
cht
imewoul
dincr
easeef
fi
ciency
.DNS
handl
est
hiswi
thamechani
sm cal
l
edcachi
ng.Whenaser
verasksf
oramappi
ngf
rom anot
her
ser
verandr
ecei
vest
her
esponse,i
tst
orest
hisi
nfor
mat
ioni
nit
scachememor
ybef
oresendi
ngi
tto
t
hecl
i
ent
.Ift
hesameoranot
hercl
i
entasksf
ort
hesamemappi
ng,i
tcanchecki
tscachememor
y
andsol
vet
hepr
obl
em.

DNSMESSAGES
 DNShast
wot
ypesofmessages:
quer
yandr
esponse.Bot
hty
peshav
ethesamef
ormat
.
 Thequer
ymessageconsi
stsofaheaderandquest
ionr
ecor
ds;
 Ther
esponsemessageconsi
stsofaheader
,header
,quest
ionr
ecor
ds,
answerr
ecor
ds,
aut
hor
it
ati
ver
ecor
ds,
andaddi
ti
onal
recor
ds.
TYPESOFRECORDS
Twot
ypesofr
ecor
dsar
eusedi
nDNS.Thequest
ionr
ecor
dsar
eusedi
nthequest
ionsect
ionoft
hequer
y
andr
esponsemessages.Ther
esour
cer
ecor
dsar
eusedi
ntheanswer
,aut
hor
it
ati
ve,andaddi
ti
onal
i
nfor
mat
ionsect
ionsoft
her
esponsemessage.
Quest
ionRecor
d
Aquest
ionr
ecor
disusedbyt
hecl
i
entt
ogeti
nfor
mat
ionf
rom aser
ver
.Thi
scont
ainst
hedomai
nname.
Resour
ceRecor
d
Eachdomai
nname(
eachnodeont
het
ree)i
sassoci
atedwi
thar
ecor
dcal
l her
edt esour
cer
ecor
d.The
ser
verdat
abaseconsi
stsofr
esour
cer
ecor
ds.Resour
cer
ecor
dsar
eal
sowhati
sret
urnedbyt
heser
vert
o
t
hecl
i
ent
.

TELNET
 TELNETi
sanabbr
evi
ati
onf
orTer
minal
Net
wor
k.

 I
tist
hest
andar
dTCP/
IPpr
otocol
forv
irt
ual
ter
minal
ser
vice

 TELNETenabl
est
heest
abl
i
shmentofaconnect
iont
oar
emot
esy
stem i
nsuchawayt
hatt
he
l
ocal
ter
minal
appear
stobeat
ermi
nal
att
her
emot
esy
stem.

 TELNETi
sagener
al-
pur
posecl
i
ent
-ser
verappl
i
cat
ionpr
ogr
am.

Remot
eLogi
n:
Whenauserwant
stoaccessanappl
i
cat
ionpr
ogr
am orut
il
it
ylocat
edonar
emot
emachi
ne,
heor
sheper
for
msr
emot
elogi
n.

1.Her
etheTELNETcl
i
entandser
verpr
ogr
amscomei
ntouse,
theusersendst
hekey
str
okest
o
t
het
ermi
nal
dri
ver
.Wher
ethel
ocal
oper
ati
ngsy
stem accept
sthechar
act
ersbutdoesnot
i
nter
prett
hem.

2.Thechar
act
ersar
esentt
otheTELNETcl
i
ent
,whi
cht
ransf
ormst
hechar
act
erst
oauni
ver
sal

3.Char
act
ersetcal
l
edNet
wor
kVi
rt
ual
Ter
minal
(NVT)char
act
ersanddel
i
ver
sthem t
othel
ocal
TCP/
IP

4..Thecommandsort
ext
,inNVTf
orm,
trav
elt
hrought
heI
nter
netandar
ri
veatt
heTCP/
IPst
ack
att
her
emot
emachi
ne.

5..Her
ethechar
act
ersar
edel
i
ver
edt
otheoper
ati
ngsy
stem andpassedt
otheTELNETser
ver
,
whi
chchangest
hechar
act
erst
othecor
respondi
ngchar
act
ersunder
standabl
ebyt
her
emot
e
comput
er.

6.Howev
er,
thechar
act
erscannotbepasseddi
rect
lyt
otheoper
ati
ngsy
stem becauset
her
emot
e
oper
ati
ngsy
stem i
snotdesi
gnedt
orecei
vechar
act
ersf
rom aTELNETser
ver
:

7.I
tisdesi
gnedt
orecei
vechar
act
ersf
rom at
ermi
nal
dri
ver
.

8.Thesol
uti
oni
stoaddapi
eceofsof
twar
ecal
l
edapseudot
ermi
nal
dri
ver
,whi
chpr
etendst
hat
t
hechar
act
ersar
ecomi
ngf
rom at
ermi
nal
.

9.Theoper
ati
ngsy
stem t
henpassest
hechar
act
erst
otheappr
opr
iat
eappl
i
cat
ionpr
ogr
am.

El
ect
roni
cMai
l
(Emai
l
)
SMTP(
Simpl
eMai
lTr
anspor
tPr
otocol
)
 I
tisani
nter
netst
andar
dfor
 e-
mai
lTr
ansmi
ssi
on.
 I
nSMTP,
themessagesar
est
oredandt
henf
orwar
dedt
othedest
inat
ion.
 SMTPusesapor
tnumber25ofTCP.
 Theact
ual
mai
ltr
ansf
eri
sdonet
hroughmessaget
ransf
eragent
s.Tosendmai
l
,asy
stem must
hav
ethecl
i
entMTA,
andt
orecei
vemai
l
,asy
stem musthav
easer
verMTA.Thef
ormal
prot
ocol
that
def
inest
heMTAcl
i
entandser
veri
ntheI
nter
neti
scal
l
edt
heSi
mpl
eMai
lTr
ansf
erPr
otocol
(SMTP)
.

SMTPi
susedt
wot
imes,
bet
weent
hesenderandt
hesender
'smai
lser
verandbet
weent
het
womai
l
ser
ver
s.Aswewi
l
lseeshor
tl
y,anot
herpr
otocol
isneededbet
weent
hemai
lser
verandt
her
ecei
ver
.
CommandsandResponses
SMTPusescommandsandr
esponsest
otr
ansf
ermessagesbet
weenanMTAcl
i
entandanMTA
ser
ver
Commandsar
esentf
rom t
hecl
i
entt
otheser
ver

Responsesar
esentf
rom t
heser
vert
othecl
i
ent

Responsest
ypesar
e--Posi
ti
veCompl
eti
onRepl
y,Posi
ti
veI
nter
medi
ateRepl
y,Tr
ansi
entNegat
ive
Compl
eti
onRepl
y,Per
manentNegat
iveCompl
eti
onRepl
y,

Mai
lTr
ansf
erPhases
Thepr
ocessoft
ransf
err
ingamai
lmessageoccur
sint
hreephases:
• connect
ionest
abl
i
shment
• mai
ltr
ansf
er,
• connect
iont
ermi
nat
ion.

MI
ME(Mul
ti
pur
poseI
nter
netMai
lExt
ensi
ons)
• El
ect
roni
cmai
lhasasi
mpl
est
ruct
ure.I
tcansendmessagesonl
yinNVT7-
bitASCI
Ifor
mat
• Mul
ti
pur
poseI
nter
netMai
lExt
ensi
ons(
MIME)i
sasuppl
ement
arypr
otocol
thatal
l
owsnon-
ASCI
Idat
atobesentt
hroughe-
mai
l
.
• MI
MEt
ransf
ormsnon-
ASCI
Idat
aatt
hesendersi
tet
oNVTASCI
Idat
aanddel
i
ver
sthem t
o
t
hecl
i
entMTAt
obesentt
hrought
heI
nter
net
.Themessageatt
her
ecei
vi
ngsi
dei
s
t
ransf
ormedbackt
otheor
igi
nal
dat
a

MI
MEdef
inesf
iveheader
sthatcanbeaddedt
otheor
igi
nal
e-mai
lheadersect
iont
odef
inet
he
t
ransf
ormat
ionpar
amet
ers:
1.MI
ME-
Ver
sion
2.Cont
ent
-Ty
pe-
--
typeoft
hedat
a—t
ext
,image,
audi
o.v
ideoet
c
3.Cont
ent
-Tr
ansf
er-
Encodi
ng-
--
def
inesencodi
ngt
ype
4.Cont
ent
-I
d--
--
messagei
d
5.Cont
ent
-Descr
ipt
ion-
--
def
ineswhet
hert
hebodyi
simage,
audi
o,orv
ideo

POP3(
PostOf
fi
cePr
otocol
,Ver
sion3)
Thi
spr
otocol
isusedatt
her
ecei
vi
ngsi
deoft
heemai
l

• PostOf
fi
cePr
otocol
,ver
sion3(
POP3)i
ssi
mpl
eandl
i
mit
edi
nfunct
ional
i
ty.Thecl
i
entPOP3
sof
twar
eisi
nst
all
edont
her
eci
pientcomput
er;t
heser
verPOP3sof
twar
eisi
nst
all
edont
he
mai
lser
ver
• Mai
laccessst
art
swi
tht
hecl
i
entwhent
heuserneedst
odownl
oade-
mai
lfr
om t
hemai
l
boxon
t
hemai
lser
ver
.
• Thecl
i
entopensaconnect
iont
otheser
veronTCPpor
t110.
• I
tthensendsi
tsusernameandpasswor
dtoaccesst
hemai
l
box
.Theusercant
henl
i
stand
r
etr
iev
ethemai
lmessages,
onebyone.

POP3hast
womodes:
 del
etemode
 keepmode.
 I
nthedel
etemode,
themai
li
sdel
etedf
rom t
hemai
l
boxaf
tereachr
etr
iev
al.
 I
nthekeepmode,
themai
lremai
nsi
nthemai
l
boxaf
terr
etr
iev
al.

FTP(
Fil
eTr
ansf
erPr
otocol
)
 Fi
l
eTr
ansf
erPr
otocol
(FTP)i
sthest
andar
dmechani
sm pr
ovi
dedbyTCP/
IPf
orcopy
ingor
t
ransf
err
ingaf
il
efr
om onehostt
oanot
her
.
 Twosy
stemsmayusedi
ff
erentf
il
enameconv
ent
ions.Twosy
stemsmayhav
edi
ff
erentway
s
t
orepr
esentt
extanddat
a.Twosy
stemsmayhav
edi
ff
erentdi
rect
oryst
ruct
ures.Al
lthese
pr
obl
emshav
ebeensol
vedbyFTPi
nav
erysi
mpl
eandel
egantappr
oach.
 cl
ient
/ser
vermodel

 cl
i
ent
:si
det
hati
nit
iat
est
ransf
er(
eit
hert
o/f
rom r
emot
e)

 ser
ver
:remot
ehost

 FTPdi
ff
ersf
rom ot
hercl
i
ent
/ser
verappl
i
cat
ionsi
nthati
test
abl
i
shest
woconnect
ions
bet
weent
hehost
s.
 Oneconnect
ioni
susedf
ordat
atr
ansf
er,
thepor
tusedi
s20
 Anot
heronei
susedf
orcont
rol
inf
ormat
ion(
commandsandr
esponses)
,thepor
t
usedi
s21

 Thecl
i
enthast
hreecomponent
s:useri
nter
face,cl
i
entcont
rolpr
ocess,andt
hecl
i
entdat
a
t
ransf
erpr
ocess.
 Theser
verhast
wocomponent
s:t
heser
vercont
rolpr
ocessandt
heser
verdat
atr
ansf
er
pr
ocess.
 Thecont
rol
connect
ioni
smadebet
weent
hecont
rol
processes.
 Thedat
aconnect
ioni
smadebet
weent
hedat
atr
ansf
erpr
ocesses.
 Thecont
rol
connect
ionr
emai
nsconnect
eddur
ingt
heent
ir
eint
eract
iveFTPsessi
on.
 Thedat
aconnect
ioni
sopenedandt
hencl
osedf
oreachf
il
etr
ansf
err
ed.
 I
topenseacht
imecommandst
hati
nvol
vet
ransf
err
ingf
il
esar
eused,
andi
tcl
oseswhent
he
f
il
eist
ransf
err
ed
Communi
cat
ionov
erdat
aconnect
ion
Fi
l
etr
ansf
eroccur
sov
ert
hedat
aconnect
ionundert
hecont
rol
oft
hecommandssentov
ert
hecont
rol
connect
ion
 Af
il
eist
obecopi
edf
rom t
heser
vert
othecl
i
ent
.Thi
si edr
scal
l etr
ievi
ngaf
il
e.I
tisdoneunder
t
hesuper
visi
onoft
heRETRcommand,
 Af
il
eist
obecopi
edf
rom t
hecl
i
entt
otheser
ver
.Thi
si eds
scal
l t
ori
ngaf
il
e.I
tisdoneundert
he
super
visi
onoft
heSTORcommand.
 Al
i
stofdi
rect
oryorf
il
enamesi
stobesentf
rom t
heser
vert
othecl
i
ent
.Thi
sisdoneundert
he
super
visi
onoft
heLI
STcommand.
Thecl
i
entmustdef
inet
het
ypeoff
il
etobet
ransf
err
ed,
thest
ruct
ureoft
hedat
a,andt
het
ransmi
ssi
on
mode.

 f
il
ety
pesacr
osst
hedat
aconnect
ion:
anASCI
Ifi
l
e,EBCDI
Cfi
l
e,ori
magef
il
e.
 st
ruct
ureoft
hedat
awi
l
lbef
il
est
ruct
ure,
recor
dst
ruct
ure,
andpagest
ruct
ure.
 t
hreet
ransmi
ssi
onmodes:
str
eam mode,
blockmode,
andcompr
essedmode.
St
epsofdat
acommuni
cat
ion
• UsesSer
ver
’swel
l
-knownpor
t20

1.Cl
i
enti
ssuesapassi
veopenonanephemer
alpor
t,sayx.
2.Cl
i
entusesPORTcommandt
otel
ltheser
veraboutt tnumberx.
hepor
3.Ser
veri
ssuesanact
iveopenf
rom por
t20t tx.
opor
4.Ser
vercr
eat
esachi
l
dser
ver
/ephemer
alpor
tnumbert
oser
vet
hecl
i
ent

WWW—WORLDWI
DEWEB

 TheWor
ldWi
deWeb(
WWW)i
sacol
l
ect
ionofdocument
sandot
herwebr
esour
ceswhi
char
e
i
dent
if
iedbyURLs,
int
erl
i
nkedbyhy
per
textl
i
nks,
andcanbeaccessedandsear
chedbybr
owser
svi
a
t
heI
nter
net
.
 Wor
ldWi
deWebi
sal
socal
l
edt
heWebandi
twasi
nvent
edbyTi
m Ber
ner
s-Leei
n1989.
 Websi
tei
sacol
l
ect
ionofwebpagesbel
ongi
ngt
oapar
ti
cul
aror
gani
zat
ion.
 Thepagescanber
etr
iev
edandv
iewedbyusi
ngbr
owser
.
Letusgot
hrought
hescenar
ioshowni
nabov
efi
g.
 Thecl
i
entwant
stoseesomei
nfor
mat
iont
hatbel
ongst
osi
te1.
 I
tsendsar
equestt
hroughi
tsbr
owsert
otheser
veratsi
te2.
 Theser
veratsi
te1f
indst
hedocumentandsendsi
ttot
hecl
i
ent
.

Cl
i
ent(
Browser
):

 Webbr
owseri
sapr
ogr
am,
whi
chi
susedt
ocommuni
cat
ewi
thwebser
veront
heI
nter
net
.
 Eachbr
owserconsi
stsoft
hreepar
ts:
acont
rol
l
er,
cli
entpr
otocol
andi
nter
pret
er.
 Thecont
rol
l
err
ecei
vesi
nputf
rom i
nputdev
iceanduset
hepr
ogr
amst
oaccesst
hedocument
s.
 Af
teraccessi
ngt
hedocument
,thecont
rol
l
erusesoneoft
hei
nter
pret
erst
odi
spl
ayt
hedocumenton
t
hescr
een.

Ser
ver
:

 Acomput
erwhi
chi
sav
ail
abl
efort
henet
wor
kresour
cesandpr
ovi
desser
vicet
otheot
hercomput
er
onr
equesti
sknownasser
ver
.
 Thewebpagesar
est
oredatt
heser
ver
.
 Ser
veraccept
saTCPconnect
ionf
rom acl
i
entbr
owser
.
 I
tget
sthenameoft
hef
il
erequi
red.
 Ser
verget
sthest
oredf
il
e.Ret
urnst
hef
il
etot
hecl
i
entandr
eleasest
het
opconnect
ion.

Uni
for
m Resour
ceLocat
er(
URL)

 TheURLi
sast
andar
dforspeci
fyi
nganyki
ndofi
nfor
mat
ionont
heI
nter
net
.
 TheURLconsi
stsoff
ourpar
ts:
prot
ocol
,hostcomput
er,
por
tandpat
h.
 Thepr
otocol
ist
hecl
i
entorser
verpr
ogr
am whi
chi
susedt
oret
ri
evet
hedocumentorf
il
e.The
pr
otocol
canbeFTPorHTTP.
 Thehosti
sthenameofcomput
eronwhi
cht
hei
nfor
mat
ioni
slocat
ed.
 TheURLcanopt
ional
l
ycont
aint
hepor
tnumber
 andi
tissepar
atedf
rom t
hehostnamebyacol
on.
 Pat
hist
hepat
hnameoft
hef
il
ewher
ethef
il
eisst
ored.

WEBcacheandcooki
es

Whatar
eCooki
es?

Acooki
eissmal
lpi
eceofi
nfor
mat
ionst
oredony
ourcomput
erbyawebsi
tey
ouv
isi
t.Ev
eryt
imet
he
userl
oadst
hewebsi
te,t
hebr
owsersendst
hecooki
ebackt
otheser
vert
onot
if
ythewebsi
teoft
he
user
’spr
evi
ousact
ivi
ty.Cooki
eshav
eacer
tai
nli
fespandef
inedbyt
hei
rcr
eat
ors.Att
heendoft
his,
a
cooki
ebecomesexpi
red.Cooki
esof
tent
racki
nfor
mat
ionl
i
kehowf
requent
lyt
heuserv
isi
ts,
whatar
e
t
het
imesofv
isi
ts,whatbanner
shav
ebeencl
i
ckedon,whatbut
toncl
i
cked,userpr
efer
ences,i
tems
i
nshoppi
ngcar
t,et
c.

Whatar
eCaches?

Awebcache(
orHTTPcache)i
sani
nfor
mat
iont
echnol
ogyf
ort
het
empor
aryst
orage(
cachi
ng)of
webdocument
s,suchasHTMLpagesandi
mages,t
oreducebandwi
dthusage,ser
verl
oad,and
per
cei
vedl
ag.A webcachesy
stem st
orescopi
esofdocument
spassi
ngt
hroughi
t;subsequent
r
equest
smaybesat
isf
iedf
rom t
hecachei
fcer
tai
ncondi
ti
onsar
emet
.Awebcachesy
stem can
r
eferei
thert
oanappl
i
ance,
ort
oasof
twar
e.Forexampl
e,wheny
ouopensomewebsi
teswi
thl
arge
pi
ctur
esandv
ideo’
s,i
tmi
ghtt
akeaconsi
der
abl
eamountoft
imef
ort
hewebsi
tet
oload.Theweb
br
owserst
orest
hesi
tecont
ent
sli
ket
hei
mages,v
ideos,audi
oet
c.ony
ourcomput
ersot
henext
t
imey
oul
oadt
hesamewebsi
tey
ouwi
l
lfi
ndi
tloadi
ngf
ast
er.

Nowl
et’
sseet
hedi
ff
erencebet
weenCacheandCooki
es

Al
thoughcooki
esandcachear
etwoway
stost
oredat
aoncl
i
ent
’smachi
ne,
butt
her
ear
edi
ff
erence
bet
weencacheandcooki
esandt
heyser
vedi
ff
erentpur
poses.
•Cooki
eisusedt
ost
orei
nfor
mat
iont
otr
ackdi
ff
erentchar
act
eri
sti
csr
elat
edt
ouser
,whi
l
ecachei
s
usedt
omaket
hel
oadi
ngofwebpagesf
ast
er.
•Cooki
esst
oresi
nfor
mat
ionsuchasuserpr
efer
ences,
whi
l
ecachewi
l
lkeepr
esour
cef
il
essuchas
audi
o,v
ideoorf
lashf
il
es.
•Ty
pical
l
y,cooki
esexpi
reaf
tersomet
ime,
butcachei
skepti
nthecl
i
ent
’smachi
neunt
ilt
heyar
e
r
emov
edmanual
l
ybyt
heuser
.

WEBDOCUMENTS

Thedocument
sint
heWWW canbegr
oupedi
ntot
hreebr
oadcat
egor
ies:
stat
ic,
dynami
c,andact
ive.
Thecat
egor
yisbasedont
het
imeatwhi
cht
hecont
ent
soft
hedocumentar
edet
ermi
ned.
St
ati
cDocument
s
St
ati
cdocument
sar
efi
xed-
cont
entdocument
sthatar
ecr
eat
edandst
oredi
naser
ver
.Thecl
i
entcan
getonl
yacopyoft
hedocument
.

HTML

Hy
per
textMar
kupLanguage(
HTML)i
sal
anguagef
orcr
eat
ingWebpages

Dy
nami
cDocument
s

Ady
nami
cdocumenti
scr
eat
edbyaWebser
verwhenev
erabr
owserr
equest
sthedocument
.Whena
r
equestar
ri
ves,t
heWebser
verr
unsanappl
i
cat
ionpr
ogr
am orascr
iptt
hatcr
eat
est
hedy
nami
c
document
.
CommonGat
ewayI
nter
face(
CGI
)
TheCommonGat
ewayI
nter
face(
CGI
)isat
echnol
ogyt
hatcr
eat
esandhandl
esdy
nami
cdocument
s.
CGIi
sasetofst
andar
dst
hatdef
ineshowady
nami
cdocumenti
swr
it
ten,
howdat
aar
einputt
othe
pr
ogr
am,
andhowt
heout
putr
esul
tisused.

Acti
veDocuments
Formanyappli
cati
ons,weneedapr
ogr
am orascr
iptt
ober
unatt
hecl
i
entsi
te.Thesear
ecal
l
ed
act
ivedocument
s.Forexampl
e,supposewewantt
orunapr
ogr
am t
hatcr
eat
esani
mat
edgr
aphi
cs
ont
hescr
eenorapr
ogr
am t
hati
nter
act
swi
tht
heuser
.Thepr
ogr
am def
ini
tel
yneedst
ober
unatt
he
cl
i
entsi
tewher
etheani
mat
ionori
nter
act
iont
akespl
ace.Whenabr
owserr
equest
sanact
ive
document
,theser
versendsacopyoft
hedocumentorascr
ipt
.Thedocumenti
sthenr
unatt
he
cl
i
ent(
browser
)si
te.
JavaAppl
ets
Onewayt
ocr
eat
eanact
ivedocumenti
stouseJav
aappl
ets.Jav
aisacombi
nat
ionofahi
gh-
lev
el
pr
ogr
ammi
ngl
anguage,
arun-
ti
meenv
ironment
,andacl
assl
i
brar
ythatal
l
owsapr
ogr
ammert
owr
it
e
anact
ivedocument(
anappl
et)andabr
owsert
oruni
t.

HTTP(
Hyper
textTr
ansf
erPr
otocol
)
 TheHy
per
textTr
ansf
erPr
otocol
(HTTP)i
susedt
oaccesst
hedat
aonWWW (
Wor
ldWi
deWeb)
.
 Thef
unct
ionsofHTTPar
ethe 
combi
nat
ionofFTP(
Fil
eTr
ansf
erPr
otocol
)andSMTP(
Simpl
e
Mai
lTr
ansf
erPr
otocol
).
 HTTPi
ssi
mil
art
oFTP,
becausei
tusesonl
yoneTCPconnect
ion(
dat
aist
ransf
err
edbet
ween
Cl
i
entandSev
er)
.
 I
nSMTP,
themessagesar
est
oredandt
henf
orwar
dedt
othedest
inat
ion,
butt
heHTTPmessages
ar
edel
i
ver
edi
mmedi
atel
y.
 HTTPusest
heser
vicesofTCPonwel
l
-knownpor
t80.

HTTPTr
ansact
ion
 HTTPt
ransact
ionbet
weent
hecl
i
entandser
ver
.
 Thecl
i
enti
nit
ial
i
zest
het
ransact
ionbysendi
ngar
equestmessage.Theser
verr
epl
i
esby
sendi
ngar
esponse.

Messages
 Thef
ormat
soft
her
equestandr
esponsemessagesar
esi
mil
ar;
 Ar
equestmessageconsi
stsofar
equestl
i
ne,
aheader
,andsomet
imesabody
.
 Ar
esponsemessageconsi
stsofast
atusl
i
ne,
aheader
,andsomet
imesabody
.
RequestandSt
atusLi
nes-
 Thef
ir
stl
i
nei
nar
equestmessagei
scal
l
edar
equestl
i
ne;
 Thef
ir
stl
i
nei
nther
esponsemessagei
scal
l
edt
hest
atusl
i
ne.

Requestt
ype-
-Thi
sfi
eldi
susedi
nther
equestmessage.Ther
equestt
ypei
scat
egor
izedi
ntomet
hodsas
def
inedi
nTabl
e

St
atuscode-
-Thi
sfi
eldi
susedi
nther
esponsemessage.Thest
atuscodef
iel
dissi
mil
art
othosei
n
t
heFTPandt
heSMTPpr
otocol
s.I
tconsi
stsoft
hreedi
git
s.Wher
east
hecodesi
nthe100r
angear
e
onl
yinf
ormat
ional
,thecodesi
nthe200r
angei
ndi
cat
easuccessf
ulr
equest
.Thecodesi
nthe300
r
anger
edi
rectt
hecl
i
entt
oanot
herURL,
andt
hecodesi
nthe400r
angei
ndi
cat
eaner
roratt
hecl
i
ent
si
te.Fi
nal
l
y,t
hecodesi
nthe500r
angei
ndi
cat
eaner
roratt
heser
versi
te.
St
atusphr
ase-
-Thi
sfi
eldi
susedi
nther
esponsemessage.I
texpl
ainst
hest
atuscodei
ntextf
orm.Foran
ex
ampl
esomef
ormati
sgi
veni
nthebel
owt
abl
e

Twot
ypesofHTTP
 Non-
Per
sist
entHTTP
 Per
sist
entHTTP
1.Non-
per
sist
entHTTP
 Atmostoneobj
ectsentov
erTCPconnect
ion
 connect
iont
hencl
osed
 Downl
oadi
ngmul
ti
pleobj
ect
srequi
redmul
ti
pleconnect
ions
non-
per
sist
entHTTPi
ssues:
 Requi
res2RTTsperobj
ect(
RoundTr
ipTi
me(
RTT)
:ti
mef
orasmal
lpackett
otr
avelf
rom cl
i
entt
o
ser
verandback)
 Oper
ati
ngsy
stem ov
er oreachTCPconnect
headf ion
 Br
owser
sof
tenopenpar
all
elTCPconnect
ionst
ofet
chr
efer
encedobj
ect
s
2.Per
sist
entHTTP

 Mul
ti
pleobj
ect
scanbesentov
ersi
ngl
eTCPconnect
ionbet
weencl
i
ent
,ser
ver

 Ser
verl
eav
esconnect
ionopenaf
tersendi
ngr
esponse

 SubsequentHTTPmessagesbet
weensamecl
i
ent
/ser
versentov
eropenconnect
ion

 Cl
i
entsendsr
equest
sassoonasi
tencount
ersar
efer
encedobj
ect

 Asl
i
ttl
easoneRTTf
oral
lther
efer
encedobj
ect
s

SNMP(
Simpl
eNet
wor
kManagementPr
otocol
)
1.SNMPSt
andsf
orSi
mpl
eNet
wor
kManagementPr
otocol
.
2.I
tisaf
ramewor
kformanagi
ngdev
icesi
nani
nter
netusi
ngt
heTCP/
IPpr
otocol
sui
te.
3.I
tisanAppl
i
cat
ionLev
elPr
otocol
.
4.I
tpr
ovi
desasetoff
undament
aloper
ati
onsf
ormoni
tor
ingandmai
ntai
ningani
nter
net
.
5.SNMPusest
heconceptofmanagerandagent
.
6.Thati
s,amanager
,usual
l
yahost
,cont
rol
sandmoni
tor
sasetofagent
s,usual
l
yrout
ers.
SNMPAr
chi
tect
ure:
I
)SNMPManager
:
1.Amanagerormanagementsy
stem i
sasepar
ateent
it
ythati
sresponsi
blet
ocommuni
cat
e
wi
tht
heSNMPagenti mpl
ementednetwor
kdevi
ces.
2.Thi
sist
ypi
cal
l
yacomput
ert
hati
susedt
orunoneormor
enet
wor
kmanagementsy
stems.
3.SNMPManager
’skeyf
unct
ions:
a.Quer
iesagent
s.
b.Get
sresponsesf
rom agent
s.
c.Set
svar
iabl
esi
nagent
s.
d.Acknowl
edgesasy
nchr
onousev
ent
sfr
om agent
s.
I
I)ManagedDev
ices:
1.Amanageddevi
ceorthenet
wor
kel
ementi
sapar
toft
henet
wor
kthatr
equi
ressomef
orm of
moni
tor
ingandmanagement
2.Exampl
e:Rout
ers,
Swi
tches,
Ser
ver
s,Wor
kst
ati
ons,
Pri
nter
s,UPSs,
etc.
I
II
)SNMPAgent
:
1.Theagenti
sapr
ogr
am t
hati
spackagedwi
thi
nthenet
wor
kel
ement
.
2.I
tmakesi
nfor
mat
ionav
ail
abl
etot
heSNMPmanager
,wheni
tisquer
iedf
or.
3.Theseagent
scoul
dbest
andar
d(e.
g.Net
-SNMP)orspeci
fi
ctoav
endor(
e.g.HPi
nsi
ghtagent
)
4.SNMPagent
’skeyf
unct
ions:
a.Col
l
ect
smanagementi
nfor
mat
ionabouti
tsl
ocal
env
ironment
.
b.St
oresandr
etr
iev
esmanagementi
nfor
mat
ionasdef
inedi
ntheMI
B.
c.Si
gnal
sanev
entt
othemanager
.
d.Act
sasapr
oxyf
orsomenon–SNMPmanageabl
enet
wor
knode.
I
V)ManagementI
nfor
mat
ionBase(
MIB)
:
1.EverySNMPagentmai
ntai
nsani
nfor
mat
iondat
abasedescr
ibi
ngt
hemanageddev
ice
parameter
s.
2.TheSNMPmanagerusest hi
sdatabaset
orequestt
heagentf
orspeci
fi
cinf
ormati
onand
fur
thert
ransl
atest
hei
nfor
mationasneededfort
heNetworkManagementSyst
em (
NMS).
3.Thi
scommonlyshar
eddat
abasebet
weent
heAgentandt
heManageri
scal
l
edManagement
I
nfor
mati
onBase(MIB)
.
4.MIBcont
ainsst
andar
dsetofst
ati
sti
cal
andcont
rol
val
uesdef
inedf
orhar
dwar
enodesona
net
work.
5.MI
Bfi
l
esar
ethesetofquest
ionst
hataSNMPManagercanaskt
heagent
.
6.Agentcol
l
ect
sthesedat
alocal
l
yandst
oresi
t,asdef
inedi
ntheMI
B.

You might also like