DCCN Unit 5
DCCN Unit 5
VAPPLI
CATI
ON
LAYER
DOMAI
NNAMESYSTEM
Thecl
ient/
ser
verprogramscanbedi vi
dedint
otwocat
egor
ies:
1.Programsthatcanbedi r
ectlyusedbyuser.
2.Programsthatsupportotherappli
cati
onprogr
ams.
DomainNameSy st
em (
DNS)i
sasuppor
ti
ngpr
ogr
am t
hati
susedbyot
her
pr
ogramssuchasE-mai
l.
Basi
cconceptofDNS
22
22
Acentralauthori
tycanassignt hepartoft henamethatdefi
nesthenatureofthe
organi
zati
onandt henameoft heor ganizati
ononly
.
Theresponsibil
i
tyoftherestoft henamecanbegi ventotheorgani
zati
onitself
.
Theorganizati
oncanaddsuf f
ixesorpr efi
xestothenamet odefi
neitshostorresour
ces.
Themanagementoft heorganizati
onneednotwor ryt
hattheprefi
xchosenf ora
hostistakenbyanot herorgani zati
onbecause,evenifpartofanaddr essisthe
same,thewhol eaddressisdifferent.
Exampl e:
Assumet hreeEducat i
oninstit
utionsnamedoneofthei
rcomputersChall
enger.
Thet hreecoll
egeshav egi vennamesbyt hecent
ralaut
hori
tysuchasii
tm.ac.
in,
berkeley.eduandsmar t
.edu.
Whent heseorganizati
onsaddt henameChall
engerthenameswi l
lbe:
chal lenger.
ii
tm.ac.i
n
chal lenger.
berkeley.
edu
chal lenger.
smar t
.edu
DOMAINNAMESPACE
Adomainnamespacewasdesi
gnedt
ohav
eaHi
erar
chi
cal
NameSpace.
I
nthi
sdesignthenamesaredef
inedi
natreestr
uct
urewit
hther
ootatt
het
op.The
t
reecanhaveonly128l
evel
s:l
evel0(
root
)tolev
el127.
Label
Eachnodei nthetr
eehasalabel
,whichisastri
ngwi t
hamaximum of63
character
s.Therootl
abeli
sanullst
ring(emptyst
ri
ng) .
DNSr equir
esthatchi
l
drenofanodehav edif
fer
entlabels,
whi
chguar
ant
eest
he
uniquenessofthedomainnames.
DomainName
Eachnodei nt hetreehasadomai nname.Af ulldomai nnamei sasequenceof
label
ssepar atedbydot s(.
).
Domai nnamesar eal waysreadfrom thebot tom tot op.
Thel astlabelisthel abeloftheroot(null)
.(i
.e.)af ul
l domainnamealwaysends
inanul llabel,whichmeanst helastcharacterisadotbecauset henull
stri
ngis
nothing.
Ful
lyQualifi
edDomai nName( FQDN)
Ifalabel isterminatedbyanul lstri
ng, i
tiscalledaf ullyqual
if
ieddomainname(FQDN)
.
AnFQDNi sadomai nnamet hatcontainsthef ullnameofahost .
Itcontainsal l
labelst hatuni
quelydefinethenameoft hehost.
22
22
ADNSservercanonlymatchanFQDNtoan
addr
ess.
Exampl
e:chal
lenger
.at
c.f
hda.
edu.
Part
ial
lyQual i
fi
edDomai nName( PQDN)
Ifalabel i
snott erminatedbyanul lstri
ng,i
ti scall
edaPQDN.
APQDNst art
sf rom anode, buti tdoesnotr eacht heroot.
Itisusedwhent henamet ober esolvedbelongst ot hesamesiteasthecli
ent
.
Her etheresolvercansuppl ythemi ssingpart,call
edt hesuff
ix,
tocreat
ean
FQDN.Ex ample:chal l
enger
Ifauseratthe“ f
hda. edu.
”sitewant st ogettheI Paddr essofthechall
enger
computer,heorshecandef i
nethepar ti
alname“ chall
enger”.
TheDNScl ientaddst hesuf f
ix“atc.fhda.edu.
”bef or
epassingtheaddresstothe
DNSser v
er.
Note:TheDNSclientnor
mall
yhol
dsal
istofsuff
ixessuchas:
atc.f
hda.edu
fhda.edu
null
Thesesuffi
xeswereaddedwhent
heuserdefi
nesanFQDN.
Domain
Adomainisasub-t
reeoft
hedomainnamespace.Thenameoft
hedomaini
sthe
domainnameofthenodeatt
hetopofthesubt
ree.Adomai
nmayit
sel
fbedi
vided
i
ntosub-
domains.
22
22
DI
STRIBUTIONOFNAMESPACE
Theinf
ormationcontainedinthedomainnamespacemustbest or
ed.
Thisi
nformati
oni sdi
stri
butedamongdiff
erentcomputer
sandindif
ferentpl
aces.
Iti
sveryinef
fi
cientandalsounrel
iabl
etohavejustonecomput
erstoresucha
hugeamountofi nfor
mat i
onatonecomput eri
noneplace.
Hi
erarchyofNameSer vers
Distri
but
ionoft heinfor
mat i
onamongmanycomput erscalledDNSservers.
Thewhol espacei sdivi
dedintomanydomai nsbasedont hef i
rstl
evel
.Theroot
standaloneandcr eateasmanydomai ns( subtrees)
.
Adomai ncr eat
edint hi
swaycoul dbev erylarge;DNSallowsdomai nstobe
divi
dedfur t
herint
osmal lerdomains(subdomai ns).
Eachser vercanber esponsibl
e(aut
horitat
ive)foreit
heral argeorasmalldomain.
Zone
Thecompl et
edomai nnamehi erarchycannotbestor
edonasingleser
ver
,iti
s
divi
dedamongmanyser v
ers.
Azonei sacontiguouspartoftheent i
ret
reeanditdef
ineswhataserv
eri
s
responsi
blefororserverhasauthorit
yover.
Case1:WhenDomai nissameasZone.
Ifaserveracceptsresponsi
bil
it
yforadomai nanddoesnotdi v
idethedomaini
nto
small
erdomai ns,t
hedomai nandthezonerefertothesamethi
ng.Theser
vermakes
adatabasecalledazonef i
leandkeepsallt
hei nf
ormati
onforever
ynodeundert
hat
domain.
Case2: WhenDomai nandZonear edif
fer
ent.
Ifaserv erdivi
desi
tsdomainintosubdomai nsanddel egatespartofit
sauthori
tyto
otherser ver
s,domai
nandzoner efertodif
ferentt
hings.Thei nformat
ionaboutthe
nodesi nthesubdomainsisstoredintheserversatthelowerlevels,wi
ththeor
igi
nal
serverkeepingsomesortofreferencetot
hesel ower
-levelser
vers.
22
22
RootSer ver
Ar ootser veri saser verwhosezoneconsi stsoft hewhol et r
ee.
Ar ootser verusual l
ydoesnotst or eanyi nformat i
onaboutdomai nsbut
delegat esitsaut horit
yt oot herser vers,keepi ngr eferencest othoseser vers.
Theser versar edi stri
butedal l aroundt hewor ld.
DNSdef inest wot y pesofser vers: Primar yandSecondar yser vers.
Pri
mar ySer ver
Apr imar yser v eri saser vert hatst oresaf ileaboutt hezonef orwhichitisanaut hor
it
y.
I tisresponsi blef orcr eating,mai ntaining, andupdat ingt hezonef i
le.
I tstorest hezonef i
leonal ocal disk.
Secondar ySer ver
Asecondar yser verisaser vert hatt r
ansf er sthecompl etei nformationabouta
zonef r
om anot herser ver( primar yorsecondar y)andst orest hefil
eoni t
sl ocal
disk.
Thesecondar yser v
ernei thercr eat esnorupdat est hezonef i
les.
I fupdat ingi sr equi r
ed, i
tmustbedonebyt hepr imar yser ver,whichsendst he
updat edv ersi ont othesecondar y.
Note:
i
. Thesesecondar yser versar eused f orcr ash r ecov ery.Thesear eredundant
server swhi char ecr eatedwhenoneser v erf ailst heot herser vercancont i
nue
servingt hecl ient sfort heirdat ar equest s.
i
i. Aser vercanbeapr i
mar yser verf oraspeci ficzoneandasecondar yser verfor
anot herzone.
Zonet ransf er
Apr imar yser verl oadsal li
nf ormat ionf r
om t hedi skf il
e.Thesecondar yserverl oads
al
li nformat ionf rom t hepr i
mar yser ver.Whent hesecondar yser verdownl oads
i
nformat i
onf rom t hepr imar yser veri tiscal ledzonet r
ansf er .
DNSI NTHEI NTERNET
I
ntheI nt
ernetthedomai nnamespacetreeisdivi
dedintothr
eedif
fer
entsect
ions:
Gener i
cDomai ns,
Count ryDomai ns
TheI nverseDomai n
GenericDomai ns
Thegener i
cdomai nsdefi
neRegist
eredhostsaccordi
ngtothei
rgeneri
cbehavi
or.
Eachnodei nthetreedefi
nesadomai n,
whichisanindextothedomainname
spacedatabase.
Genericdomai nl
abelsareli
stedas:
Label Descri
pti
on
com Commer ci
alor gani
zations
org Nonprofi
torganizati
ons
net Networksuppor tcenters
edu Educati
onalinsti
tuti
ons
22
22
gov Gov
ernmenti
nst
it
uti
ons
22
22
Count
ryDomai ns
Thecountrydomainssectionusest wo-charactercount
ry
abbrev
iati
ons.Ex:i
nforIndia,usforUSA.
Secondlabelscanbeorganizati
onal,ortheycanbemor especi
fic,
nat
ional
desi
gnati
ons.Ex:.ac.
inf
ornpt el
.ac.
in,.
gov .
infortspsc.
gov.
inetc.
Inv
erseDomain
Theinver
sedomai
nisusedt
omapanAddr
esst
oaName.I
tusesi
nver
sequer
yor
point
erquer
y.
InverseQuery
Whenaser verhasreceivedar equestfr
om acli
entt
odoat ask,t
heserverhasaf i
le
thatcontainsalistofaut hor
izedclient
sandtheirr
ecei
v edIPaddressesareli
sted.
Theser verasksitsr
esolv ert
osendaquer ytotheDNSser vertomapanaddr essto
anamet odetermineifthecli
entisont heaut
hori
zedli
st.Thisty
peofqueryiscall
ed
anI nver
seQueryorPoi nterQuery.
Example:AnIPaddr esssuchas132. 34.
45.121isreadas121. 45.34.132.
in-
addr.ar
pa.
Theser versthathandl et
heinversedomai nar
eal sohier
archical
.
Tohandl eapoi nterquery,t
heinversedomainisaddedt othedomai nname
spacewiththef i
rst-
level
nodecal l
edarpa.
Thesecondl evelisalsoonesinglenodenamedi n-addrforinverseaddress.
Ther estofthedomai ndefi
nesIPaddresses.
RESOLUTI ON
Mappi nganamet oanaddr essoranaddr esst oanamei scal ledName- AddressResol ut
ion.
Resolv er
DNSi sdesi gnedasacl ient/ser verappl ication.Ahostt hatneedst omapan
addr esst oanameoranamet oanaddr esscal lsaDNScl i
entcal ledaResol v
er .
Ther esolveraccessest heclosestDNSser v erwi thamappi ngr equest .
I ftheser verhast hei nformat ion, itsendst hei nformat iontor esolv er.
I fser verdoesnothav etheinf ormat ioni tei therr ef erst heresol vert oother
serv ersorasksot herser verst opr ovidet hei nfor mat ion.
Af tert her esol verr eceivesthemappi ng, i
tint er pretst her esponset oseei fiti
sa
real resolutionoraner r
orandf inal lydel i
v erst her esul ttother equest edhost
process.
Recursi veResol ution
Thecl i
ent( resol ver)canaskf orar ecur siv eanswerf rom anameser v
er.This
meanst hatt her esol verexpect st heser vert osuppl ythef inal answer .
I ftheser verist heaut hori
tyf ort hedomai nname, itchecksi tsdat abaseandr esponds.
I ftheser verisnott heauthor it
y, itsendst her equestt oanot herser ver(thepar ent
)
andwai t
sf ort her esponse.
I fthepar enti stheaut hori
t y
,itr esponds; ot her wise, itsendst hequer ytoyet
anot herser v er.
Whent hequer yisf inall
yresol ved, ther esponset ravelsbackunt ili
tf i
nall
y
reachest her equest ingcli
ent .
22
22
Thi
spr
ocessi
scal
l
edRecur
siv
eResol
uti
on.
22
22
I
ter
at i
veResol uti
on
Thecl ientrepeatsthesamequer yt omul tipleservers.
Ifthecl i
entdoesnotaskf orar ecur si
v eanswer ,t
hemappi ngcanbedonei t
erati
vely
.
Iftheser verisanaut horityf orthename, i
tsendst heanswer .
Iftheser verisnotanaut hor it
yitr eturnst heI Paddr essoft heservert
otheclient,
thattheser verthinkscanr esolv et hequer y .
Thecl ientisresponsiblef orr epeat ingthequer ytot hissecondser ver
.
Ifthenewl yaddr essedser v ercanr esolv ethepr oblem, itanswersthequerywi t
h
theI Paddr ess;otherwise, i
tr et
ur nst heI Paddr essofanewser vertothecli
ent.
Nowt hecl i
entmustsendt hequer ytot het hi
rdserv er.Thisprocessiscal
led
Iterat
iveResol uti
on.
Recur
siv
eResol
uti
on I
ter
ati
veResol
uti
on
Cachi ng
Whenaser v erasksf oramappi ngfrom anot herserverandreceivestheresponse,
i
tst orest hi
si nformat i
onini tscachememor ybef oresendingittothecli
ent.
Ift hecl i
entasksf orthesamemappi ng, i
tcanchecki t
scachememor yand
returnsther esul t.
Toi nformt hecl ientthatther esponseiscomi ngfrom thecachememor yandnot
from anaut hor i
tat
ivesour ce,theservermar kst heresponseasUnaut hori
tati
ve.
DNSMESSAGES
DNShast wot ypesofmessages: QueryandResponse.Bot htypeshav ethesamef or
mat
.
TheQuer yMessageconsi st sofaHeaderandQuest i
onRecor ds;
Ther esponsemessageconsi stsofaHeader ,Quest i
onRecords,Answerr ecords,
Aut horit
at i
veRecor ds,andAddi ti
onal Records.
Header( 12by tes)
Bothquer yandr esponsemessageshav et hesameheaderf ormatwi thsomef i
elds
settozer of orthequer ymessages.Headerf or
matandf iel
dsaregivenbelow:
Identif
icat i
on Fl ags
Numberofanswerr ecords
Numberofquest i
onr ecords
(al l
0’sinquerymessage)
23
23
23
23
Numberofaut hor i
tati
v erecords Numberofaddi ti
onal recor ds
(all0’sinquer ymessage) (all0’
si nquerymessage)
Ident
ifi
cat i
onsubf ieldisusedbyt heclienttomat cht heresponsewi t
ht hequer y.
Theclientusesadi fferentident i
fi
cationnumbereacht i
mei tsendsaquer y.
Flagssubf iel
disacol l
ectionofsubf i
eldsthatdef i
net hetypeoft hemessage, the
typeofanswerr equest ed,thet ypeofdesi redr esolution(recursiveori terativ
e),
andsoon.
NumberofQuest ionRecor dssubf i
eldcont ainsthenumberofquer iesi nthe
questi
onsect i
onoft hemessage.
NumberofAnswerRecor dssubf i
eldcont ainst henumberofanswerr ecor dsin
theanswersect i
onoft her esponsemessage.I t
sv alueiszeroi nthequer y
message.
NumberofAut horitati
veRecor dssubf iel
dcont ai
nst henumberofaut hor i
tati
ve
recor
dsi nt heauthor it
ativ
esect i
onofar esponsemessage.I tsv aluei szer oin
thequerymessage.
NumberofAddi ti
onalRecor dssubf i
eldcont ainsthenumberaddi tional recordsin
theadditionalsectionofar esponsemessage.I tsv al
ueiszer oint hequer y
message.
Quer
yandResponseMessages
QuestionSect i
onconsi st
ingofoneormor equestionrecords.I
tispresenton
bothqueryandr esponsemessages.
AnswerSect i
oni ncludestheanswerfrom theserv
ert othecli
ent(r
esolver)
.Iti
s
presentonlyonr esponsemessages.
Authorit
ati
veSect i
ongivesinf
ormati
on(domai nname)aboutoneormor e
authori
tati
veserv er
sf ort
hequery.I
tispresentonl
yonr esponsemessages.
Additi
onalInformat i
onSectionprovi
desadditi
onal i
nfor
mat i
onthathelpstheresol
ver
.
Example:A ser
vermaygi vethedomai nnameofanaut hori
tati
veserv
ert othe
resol
verinthe aut
hori
tat
ive sect
ion,and i
ncl
ude the I
P address ofthe same
author
it
ati
veser
veri
ntheadditi
onalinf
ormat
ionsect
ion.
TYPESOFRECORDS
Twotypesofrecor
dsar eusedinDNS.
Questi
onRecor d
Iti
susedbyt hecli
enttogetinf
ormat
ionfr
om aser
ver
.Thi
scont
ainst
hedomai
nname.
ResourceRecord
23
23
Eachdomai nname( eachnodeonthetree)i
sassoci
atedwit
har
ecor
dcall
edthe
resour
cer ecord.Theserverdatabaseconsist
sofr esour
cer
ecor
ds.Serv
ers
sendsresourcerecor
dstocli
ent
.
23
23
REGISTRARS
Regist
raraddsnew domai nstoDNS.A r egistr
arf i
rstveri
fi
est hatt
herequest
ed
domainnamei suni
queandthenent er
sitint
ot heDNSdat abase.Ther
egi
str
arsand
thei
rnames, addr
essesf
oundat:http:/
/www. i
ntenic.
net
Example:Domai nname:WS. wonder f
ul.
com ( wsi saser ver
name)IPaddress:
200.200.200.5(newI Paddress).
DYNAMICDOMAI NNAMESYSTEM ( DDNS)
NeedforDDNS?
InDNS,whent herei
sachange,suchasaddinganewhost ,r
emovi
ngahost ,
or
changi
nganI Paddress,t
hechangemustbemadet otheDNSmast erfi
le.
Thesetypesofchangesinvol
vealotofmanualupdat
ing.Today
’si
nter
netisnot
sui
tabl
ef ormanualupdati
ons.
Hencewehav et oupdat
ethemast erf
il
edy
namicall
y.
DDNSpr ocess
InDDNS, whenabi ndingbet weenanameandanaddr essisdet
erminedt he
inf
ormat i
onissentusual l
ybyDHCPt oapr i
maryDNSser v
er.
Thepr i
mar yserverupdat esthezone.
Thesecondar yser versarenot i
fi
edeitheracti
vel
yorpassivel
y.
Inact i
venot i
ficati
on,t hepr imaryserversendsamessaget ot hesecondar y
servers aboutt he change i nt he zone,wher eas i
n passi
ve notif
icati
on the
secondaryserver speriodical
lycheckforanychanges.
Ineithercase,af t
erbei ngnot i
fi
edaboutt hechange,thesecondar yrequests
inf
ormat i
onaboutt heent i
rezone(zonet r
ansfer
).
Topr ovi
desecur ityandpr ev
entunauthorizedchangesintheDNSr ecords,DDNS
canuseanaut henticati
onmechani sm.
REMOTELOGGI NG
IntheInternet
,user
smaywanttorunappli
cat
ionprogramsatar
emot
esi
teand
creat
er esult
sthatcanbet
ransf
err
edtothei
rlocal
sit
e.
Exampl
e:Student
smaywantt
oconnecttotheiruni
ver
sit
ycomput
erl
abfr
om t
heir
hometoaccessappl
i
cat
ionpr
ogr
amsf ordoinghomeworkassi
gnment
sorpr
oject
s.
AGener
alpurposecl
ient
/ser
verprogr
am thatal
l
owsausertolog-
ontoar
emot
e
comput
ertoaccessanyappl
icat
ionprogr
am onthatr
emotecomputer
.
Afterl
oggi
ngon,ausercanusetheavai
labl
eserv
icesont
her
emot
ecomput
erand
tr
ansfert
heresul
tsbacktot
helocalcomputer
.
TELNET( TErminaLNETwor k)
TELNETi sacli
ent/serv
erappli
cati
onpr
ogram.Itisthestandar
dTCP/I
Pprotocolf
or
vi
rtualter
minal
serv i
ceasproposedbytheInt
ernati
onalOrgani
zat
ionf
orSt
andards
(I
SO) .
TELNETenablest
heest
abli
shmentofaconnect
iontoaremot
esyst
em insucha
waythatt
helocal
ter
minal
appearstobeatermi
nalatt
heremotesy
stem.
23
23
Timeshari
ngEnvir
onment
TELNETwor ksi
nTimeShari
ngEnvi
ronment
.Thei
nter
act
ionbet
weenauserandt
he
computeroccur
sthroughat
ermi
nal
.
Loggi ng
I nat i
meshar i
ngenv ir
onment,usersar
epar tofthesystem wit
hsomer ightt
o
accessr esources.Eachauthori
zeduserhasIdentif
icati
on(UserI
D)anda
passwor d.
Toaccesst hesystem theuserl
ogsintothesystem withauseridorlog-i
nname.
Thesy stem alsoincl
udespasswordcheckingt opreventanunauthor
izeduser
from accessingtheresources.
Locallog-i
n
Whenauserl ogsint
oal ocaltimeshari
ngsyst
em iti
scalledlocallog-i
n.
Asausert ypesatat erminalthekeystr
okesareaccept
edbyt heterminaldri
ver
.
Thetermi naldriv
erpassest hecharacter
stotheoperat
ingsy stem.
Theoper ati
ngsy stem int
erpretsthecombinat
ionofcharactersandi nvokesthe
desir
edappl icati
onpr ogr
am orut i
li
ty.
RemoteLog- i
n
Whenauserwant st oaccessanappl i
cationpr ogram orutil
i
tylocatedona
remot emachine,theuserper for
msr emotelog- i
n.TELNETusescl i
entandserver
programs.
Theusersendst hekey st
rokest otheterminaldr i
ver,wherethelocaloperat
ing
system acceptsthechar acter
sbutdoesnoti nterpr
etthem.
Thechar acter
sar esentt otheTELNETcl ient,whichtransf
ormsthechar act
ersto
auni ver
salcharactersetcal l
edNet workVi rtualTerminal(NVT)character
sand
deli
versthem tothel ocalTCP/IPprotocolstack.
Thecommandsort extinNVTf ormt r
avelthrought heInter
netandarriveatthe
TCP/ I
Pst ackattheremot emachi ne.
23
23
23
23
Thechar acter
sar edeli
ver
edt otheoper ati
ngsystem andpassedt otheTELNET
serv
er,whi ch changes t he charact ers to the cor responding char act
ers
underst
andabl ebytheremot ecomput er.
Thechar acter
scannotbepasseddi rect lytotheoper at
ingsy st
em becauset he
remoteoper ati
ngsy st
em isnotdesi gnedt orecei
vechar actersfrom aTELNET
serv
er.Itisdesignedtoreceivechar
act ersfrom aterminaldriver.
Hencethechar act
erscanbepassedt oPseudo- terminaldriverwhichpassest he
charact
er stooperati
ngsystem.
Theoper ati
ngsy st
em thenpassesthechar act
erstotheappr opr i
ateappl
icati
onprogr
am.
Net
wor kVirtualTermi
nal(NVT)
TELNET def i
nes a univer
salinterface call
ed the Network Vi
rtualTer minal
characterset.Viat
hisinter
facethecl i
entTELNETt r
anslateschar
act er
s( dat
aor
commands)t hatcomef rom thelocalter
mi nali
ntoNVTf orm anddel i
versthem
tothenet work.
Theser verTELNETt r
anslat
esdat aandcommandsf r
om NVTf ormi ntotheform
acceptablebyt her
emot ecomputer.
NVTChar acterSet
NVTusest woset sofchar acter
s, onefordataandtheotherf orcontrol.Bothar
e8-bi
t.
Fordat a,
NVTi san8- bitcharactersetinwhichthehighest-orderbitis0andthe7
l
owest-or
derbi t
sar ethesameasASCI I
.
Tosendcont rolcharact er
sbet weencomput ers(i
.e.
)from cli
entt oserveror
serv
ertocl i
entNVTusesan8- bitchar
acterseti
nwhicht hehi ghest-or
derbi
tis
settol
.
ExamplesofNVTcont rol characterssuchasEOF–EndofFi le,EOR-EndofRecor d,
NOP-Nooper ati
onetc.
Embeddi ng
TELNETusesonl yoneTCPconnect i
on.Thesameconnect i
onisusedf orsending
bothdat aandcont rolcharacters.TELNETaccompl i
shesthisbyembeddi ngt he
controlchar
acter
si nthedat astream.
Todi st
ingui
shdataf rom controlcharacter
s,eachsequenceofcont r
olchar
acters
i
spr ecededbyaspeci al
controlcharactercall
edInter
pretAsCont rol(I
AC).
ForTELNET,ser veruses t he wel l
-known port23 and t he cli
entuses an
ephemer alport
.Exampl e:auserwant saser vert
odi spl
ayafil
e( f
il
el)onar emote
server
.Usercant ype
Catfil
e1
23
23
Supposethenameoft hefi
lehasbeenmi styped(fi
l
eai
nst
eadoff
il
e1)
.Theuser
usesthebackspacekeytocor
rectt
hissi
tuati
on.
Catfi
lea<backspace>1
23
23
Inthedefaul
timplement at
ionofTELNETt heusercannoteditl
ocall
y.Theedit
ingis
doneattheremot eserver.
Thebackspacechar act
eristransl
atedint
ot woremotecharact
ers(lACEC),which
areembeddedi nthedataandsentt otheremoteserver
.
C A t f i l e a I AC EC 1
Options
Optionsareext
rafeaturesavail
abletoauserwithamor esophist
icatedter
minal.
TELNETal l
owst hecli
entandser v
ernegotiat
eopti
onsbeforeordur i
ngtheuseof
theservi
ce.
Opt
ionNegot iat
ion
Opt
ionnegotiati
onisdonebetweent
hecli
entandtheser
vert
ouseanyofthe
opt
ions.Fourcontr
olchar
acter
sareusedfort
hispur
pose:WI
LL,
WONT, DO,DON’
T.
Apartycanof f
ertoenabl eordi sabl
eanopt ionifi
thastheri
ghtt
odoso.The
of
fer
ingcanbeappr ovedordi sapprovedbyt heotherpart
y.
Toof ferenabl
ing,theofferingpar t
ysendst heWILLcommand, whi
chmeans" Wi
ll
Ienabletheopt i
on? "
Theot herpart
ysendsei thert heDOcommand, whi
chmeans"Pleasedo,
"ortheDONT
command, whichmeans" Pleasedon' t
."
Toof ferdi
sabli
ng,theof f
er i
ngpar tysendstheWONTcommand, whichmeans"I
won'tuset hi
sopt i
onanymor e."
Theanswermustbet heDONTcommand, whichmeans"Don'
tuseitany
more."
Subopti
onNegot i
ati
on
Someopt i
onsrequir
eadditi
onalinf
ormati
onsuchasdef
ini
ngtypeofter
minalor
speedoftheter
minal et
c.
Therear
et wosuboptioncharact
ersaredef
ined:
SB-
Subopt
ionbegi
n,SE-Subopt
ionEnd
ModeofOperat
ion
MostTELNETimpl
ement
ati
onsoper
atei
noneoft
hreemodes:
Def
aul
tmode,
Char
actermodeorLi
nemode.
DefaultMode
Thedef aultmodeisusedi fnoot hermodesar einvokedt hroughopti
onnegot i
ati
on.
Int hi
smodet heechoi ngisdonebyt hecl ient.
Theusert ypesachar acterandt hecl i
entechoest hechar acteronthescreen(or
pri
nter)butdoesnotsendi tuntilawhol el inei
scompl eted.
CharacterMode
Int hechar act
ermodeeachchar acterty pedissentbyt heclientt
otheser ver
.
Theser vernormall
yechoest hechar acterbackt obedi splayedonthecli
entscreen.
Int hi
smodet heechoi ngoft hecharact ercanbedel ayedi fthetr
ansmissionti
me
i
slongsuchasi nasat el
l
iteconnect i
on.
Italsocr eatesoverhead( t
raffi
c)forthenet workbecauset hreeTCPsegment s
mustbesentf oreachchar acterofdat a.
Li
neMode
23
23
Linemodehasbeenpr oposedt ocompensat
ef orthedefi
cienci
esofthedef
aul
t
modeandt hecharact
ermode.
Inli
nemode,li
neediti
ng(echoing,char
act
ererasing,l
ineer
asing,andsoon)i
s
donebythecli
ent.Thecli
entthensendsthewhol eli
netotheserver.
ELECTRONI CMAI L
El
ect r
onicmai l(E-mai l)i
soneoft hemostpopul arInt
ernetser
vices.E-mailal
lowsa
messaget oincl
udet ext,audio,andv i
deo.Ther eareFourScenar i
osofE- mail
:
Fi
rstScenar io
Int hef i
rstscenar i
o, t
hesenderandt her eceiveroftheE-mai
l areuserapplicat
ion
programsont hesamesy st
em.Theyar edi rectl
yconnectedtoashar edsy stem.
Theadmi ni
stratorhascr eat
edonemai lboxf oreachuserwher ethereceiv
ed
messagesar est ored.
Amai lboxispar tofal ocalharddriveandi taspecialfi
lewit
hper mission
restr
icti
ons.Onl yt heowneroft hemailboxhasaccesst oit
.
Example:Consi
dertheabovefigur
e,Ali
ceandBobar etwousersofmailser
ver.
WhenauserAl i
ceneedstosendamessaget oBob,Al
icerunsaUserAgent(UA)
pr
ogram toprepar
ethemessageandst oreiti
nBob'smai l
box.
Themessagehast hesenderandrecipi
entmail
boxaddresses(namesoffi
les)
.
Bobcanr etr
ieveandreadthecontentsofhi
smai l
boxusingaUserAgent.
SecondScenar i
o
I nthesecondscenar
io,t
hesenderandthereceiv
eroft heE-
mai
lar
euser
appli
cati
onprogramsontwodiff
erentsyst
ems.Themessageneedst obesent
overtheInt
ernet
.
WeneedUserAgent s(UAs)andMessageTr ansferAgents(
MTA’
s).
Ali
ceneedstouseauseragentpr
ogr
am tosendhermessaget
othemai
lser
ver
atherownsit
e.
Themailser
veratAl
i
cesiteusesaqueuetostor
emessageswai
ti
ngt
obesent.
24
24
Bobalsoneedsauseragentpr ogram tor etr
ievemessagesst oredinthemailbox
ofthesystem athissi
te.
Themessageneedst obesentthroughtheI nternetfrom Alice'ssit
et oBob'
ssite.
HeretwoMessageTr ansf
erAgentsar eneeded: onef orcl
i
entandonef orserver.
Mostcli
ent /
serverpr
ogramsont heInternet,theserv erneedst orunalltheti
me
becauseitdoesnotknowwhenacl ientwi l
laskf oraconnect ion.
Thecli
entcanbeal ert
edbythesy st
em whent hereisamessagei nt hequeuetobesent
.
Thi
rdScenar
io
I nt het hi
rdscenar i
o,Bobi sdi rectl
yconnect edt ohissy stem (i.
e.MailServer)
.
Alicei ssepar atedf r
om hersy stem.
Al icei sconnect edt ot hemai lserverviaWANorLAN.
I nanor ganizati
ont hatusesonemai lserverf orhandlingE- mail
s,al
lusersneed
tosendt hei
rmessagest othismai lser v
er.
UseragentofAl i
cepr eparesmessageandsendst hemessaget hroughtheLANorWAN.
Whenev erAlicehasamessaget osend, Ali
cecal l
st heuseragentanduseragent
callst heMTAcl i
ent.
TheMTAcl i
entest ablishesaconnect ionwitht heMTAser veront hesystem.
Thesy stem atAl ice'
ssi tequeuesal lmessagesr ecei
v ed.I tt
henusesanMTA
cli
entt osendt hemessagest ot hesy stem atBob' ssite.Thesy stem r
eceivesthe
messageandst or
esi tinBob'smai l
box.
Bobuseshi suseragentt or et
r i
evet hemessageandr eadsi t.
I tneedst woMTAcl ientandt woMTAser v
erpr ograms.
FourthScenar i
o
I tist hemostcommonscenar i
o,AliceandBobbot har econnect edtotheirmail
ser verbyaWANoraLAN.
Af tert hemessagehasar r
ivedatBob' smai lserver,Bobneedst oret
ri
eveit.Now
Bobneedsanot hersetofcl i
ent /serveragent scal l
edMessageAccessAgent s
(MAA) .BobusesanMAAcl ienttor etr
ievehi smessages.
Thecl ientsendsar equesttot heMAAser verandr equest sthet ransf
erofthemessages.
24
24
Archi
tectur
eofE- mail
Therearethreemajorcomponentsinthearchi
tect
ureofE-mai
l:
1.UserAgent
2.MessageTr ansf
erAgent
3.MessageAccessAgent
UserAgent
UserAgentpr ovi
desserv
icestotheusert
omaket heprocessofsendi
ngand
recei
vi
ngamessageeasi er
.Serv
icesprov
idedbyUseragentare:
ComposingMessages
Auseragenthel
pstheusertocomposet
heE-
mai
lmessagetobesentout
.Most
useragent
sprov
ideatemplateont
hescr
eent
obefi
l
ledinbytheuser
.
ReadingMessages
Theuseragentr eadst hei
ncomi ngmessages.Whenauseri nvokesauseragent,i
t
fi
rstchecksthemai lintheincomingmailbox.EachE-mai
lcontai
nsthefoll
owing
fi
elds:
1.Anumberf i
eld.
2.Af l
agfi
eldthatshowst hestat
usofthemai lsuchasnew,alr
eadyreadbutnot
repl
iedto,orr eadandr epli
edto.
3.Thesi zeoft hemessage.
4.Thesender .
5.Theopt ional subjectfi
eld.
Replyi
ngtoMessages
Aft
erreadi
ngamessage,ausercanuset
heuseragenttorepl
ytoamessage.A
useragental
l
owstheusert
oreplytot
heori
ginal
senderortorepl
ytoal
lreci
pient
s
ofthemessage.
24
24
For
wardi
ngMessages
I
tmeanssendi
ngamessaget
oat
hir
dpar
ty.Auseragental
l
owsr
ecei
vert
ofor
war
dmessage.
24
24
Handli
ngMailboxes
Auseragentnor mallycreatest
womai l
boxes:InboxandOutbox.
InboxandOut boxisaf i
l
ewi thaspeci
alformatthatcanbehandl
edbyuseragent
.
InboxkeepsallthereceivedE-mail
sunti
ltheyaredelet
edbytheuser
.
Outboxkeepsal lt
hesentE- mail
sunti
ltheuserdelet
esthem.
UserAgentTy pes
Therear etwot y
pesofuseragent s:Command- dri
venandGUI -
based.Command- Dri
venUserAgent
CommandDr i
v enuseragentspr esentastheunder ly
inguseragentsinser v
ers.
I tnormall
yaccept saone- charactercommandf rom thekeyboardto
performitstask.Exampl es:mail,
pine,andelm.
GUI-BasedUserAgent s
Moder nuseragent sar eGUI -
based.Theycont ainGr aphi
cal
-UserI
nterface(GUI)
component st hatall
ow theusert oint
eractwi ththesof t
warebyusingbot hthe
keyboardandt hemouse.
Theyhav egr aphicalcomponent ssuchasi cons,menubar s,andwi ndowst hat
maket heser vi
ceseasyt oaccess.
Exampl e:Eudora,Microsoft
'sOutlook,andNet scape.
Sendi
ngMail
AuserE-
mailhasanEnv el
opeandaMessage.
Envel
opeusual
lycont
ainsthesenderandt
her
ecei
veraddr
esses.
Message
Messagecontai
nstheHeaderandBody .
Headerofthemessagedefinesthesender,
therecei
ver
,thesubjectoft
he
message,andsomeotherinformati
onsuchasencodingt y
pe.
Bodyofthemessagecontainstheactuali
nfor
mat i
ontober eadbyther
eci
pient
.
Receiv
ingMail
Theuseragenti
str
igger
edbytheuserorat
imer
.Ifauserhasmai
l
,theUserAgent
i
nformstheuserwi
thanoti
ce.
Ift
heuseri
sreadytoreadthemai
l,
ali
stisdispl
ayedi
nwhicheachli
necont
ainsa
summaryoftheinf
ormati
onaboutapar
ti
cularmessagei
nthemailbox.
24
24
Addr
esses
I
ntheInt
ernet
,theaddr
essconsi
stsoft
wopar
ts:
alocal
par
tandadomai
nnamesepar
atedby
@ sy
mbol.
Localpartdefi
nestheaddressofthemai l
boxonthemail ser
ver.Allt
hemail
recei
vedforauserisstor
edf orret
ri
evalbythemessageaccessagent .
Domai nNameThedomai nnameassi gnedtoeachmailservereit
hercomesfrom
theDNSdat abaseorisalogical
name( i.
e.)t
henameoft heorganizati
on.
Mai
li
ngList
El
ectr
onicmailal
lowsonename( anali
as)t
orepresentsev
eraldif
fer
entE-
mai
l
addr
essesiscall
edamai li
ngl
i
st.
Ever
ytimeamessagei stobesent,t
hesyst
em checksthereci
pient'
sname
agai
nsttheal
iasdatabase.
MI
ME( Mult
ipur
poseInternetMailExtensions)
MIMEi sasupplement ar
yprot
ocol thatallowsnon-ASCI Idatatobesentt hr
oughE- mai
l
.
French,German,Hebrew,Russian,Chinese, andJapanesear enon-ASCIIcharact
ers.
MIMEt ransf
ormsnon- ASCI
Idat aatthesendersi t
et oNVTASCI Idataand
deli
versthem t
otheclientMTAt obesentt hroughtheInternet
.
Themessageatt hereceivi
ngsidei stransformedbackt ot heori
ginaldat
a.
MIMEdefi
nesf i
veheaderst
hatcanbeaddedt
otheor
igi
nal
E-mai
lheadersect
iont
o
def
inet
hetransfor
mationpar
ameter
s:
24
24
MIME- Versionheaderdef i
nest hev er
sionofMI MEused.Thecur r
entversi
oni s1.
1.
Content-Typeheaderdef i
nest het ypeofdat ausedinthebodyofthemessage.
Dependingont hesubtypetheheadermaycont ai
notherparameters.
MIMEal lowssev endiffer
enttypesofdat a: Text
,Multi
part
,Message,Image,
Video,AudioandAppl icati
on.
Content-Transfer-
Encodingheaderdef i
nest hemethodusedtoencodet he
messagesi nto0sand1sf ortranspor t
.
Content-Idheaderuniquelyidentif
iesthewhol emessageinamul ti
ple-message
envir
onment .
Content-Descripti
onheaderdef ineswhet herthebodyisimage,audioorvideo.
SI
MPLEMAI LTRANSFERPROTOCOL( SMTP)
MessageTransferAgent:SMTP
Theactualmailtransf
erisdonethroughmessaget ransf
eragent
s(MTA).
SimpleMailTransferProt
ocoldefi
nest heMTAClientandMTAser v
eri
nthei
nter
net
.
MTACl i
entisusedt osendmai l
andMTASer veri
susedt orecei
vea
mail
.SMTPisusedt wot i
mes:
1.Betweensenderandsendermai lserver.
2.Betweensendermai lserv
erandreceivermail
server.
SMTPusescommandsandresponsest
otransfermessagesbetweenanMTA
cl
ientandanMTAser
ver.Eachcommandorreplyi
sterminat
edbyatwo-
char
act
er
end-of
-l
inet
oken.
Commands
Commandsar esentf
rom thecli
entt
otheserver
.Itconsi
stsofakeywor
dfol
lowed
byzeroormorearguments.
Therearef
ivemandatorycommandsareused.Everyimpl
ementati
onmustsuppor
t
thesefi
vecommands: HELO(Sender
’sHostname),MAILFROM, RCPTTO,DATA,
QUIT.
Responses
24
24
Responsesar
esentfr
om theservertothecl
ient.Aresponsei
sat
hreedi
gitcode
thatmaybefol
lowedbyaddit
ionaltext
uali
nformati
on.
24
24
Responsesarediv
idedi ntofourcategor
ies:Thel
eft
mostdi
gitoft
hecode2,
3,4,
and5def i
nesthecategor y
.
2-Posit
iveCompletionRepl y
3-Posit
iveI
ntermediateRepl y
4-Transi
entNegativeCompl etionReply
5-PermanentNegat i
v eCompl eti
onReply
MailTransferPhases
Theprocessoft ransf
erri
ngamai
lmessageoccur
sint
hreephases:
Connect ionEstabl
ishment
Mai lTransfer
Connect ionTerminati
on
Exampl eorSMTP
Considerthebelowexampl ethatdir
ect l
yusesSMTPt osendanE-mailandsimulate
thecommandsandr esponses.WellknownportnumberforSMTPi s25.
ItusesTELNETt ologintoport25.
Wet henuset hecommandsdi rectlytosendanE-mail
.
Int hisexample,f
orouzanb@adelphi a.
neti
ssendinganE-mai
ltohimself.
Thef i
rstfewli
nesshowTELNETt r
y i
ngtoconnecttot
heAdelphiamailser
ver.
Af terconnecti
on,wecant ypetheSMTPcommandsandt henrecei
vetheresponses.
$tel
netmail
.adel
phia.net
25Tryi
ng68.168.
78.100..
.
Connect
edtomail.adelphi
a.net(
68.
168.
78.
100)
.
24
24
24
24
MessageAccessAgent :POPandI MAP
Thef i
rstandthesecondst agesofmai ldel
i
v er
yuseSMTP.
SMTPi snoti nvol
vedi nthet hir
dst agebecauseSMTPi sapushpr otocol.It
pushest hemessagef rom thecli
entt otheserver.
Thet hir
dstageneedsapul lprotocol.Theclientmustpul
lmessagesfr
om t he
server.Thedirecti
onoft hebul kdatai sfrom theser
vertothecl
ient
.Thet hir
d
stageusesaMessageAccessAgent .
Therearet woMessageAccessPr otocol
sar eav ai
lable:
POP3andI MAP4
POP3( Postof fi
cePr otocol)
PostOfficePr ot
ocolv ersion3(POP3)i ssimpl eandl imi
tedinfunctional
i
ty.
Thecl i
entPOP3sof twareisi nstall
edont her ecipi
entcomput er.
Theser verPOP3sof twareisi nstal
ledont hemai l
server.
Mai laccessst art
swi ththecl ientwhent heuserneedst odownl oadE-mail
from
themai l
boxont hemai lserver.
Thecl i
entopensaconnect iont ot heserveronTCPpor t110.Itt
hensendsits
usernameandpasswor dtoaccesst hemai lbox.
Theusercanl istandr etri
evet hemai lmessagesonebyone.
POP3hastwomodes:
Delet
eModeThemaili
sdelet
edfr
om t
hemail
boxaft
ereachr
etr
iev
al.
KeepModeThemailr
emainsint
hemail
boxaf
terr
etr
iev
al.
Defi
cienci
esofPOP3
POP3doesnotallowtheusertoorgani
zetheirmail
ontheser
ver
.
Theusercannothavedi
ff
erentfol
dersontheserver
.
POP3doesnotallowusertoparti
all
ycheckthecontent
soft
hemail
bef
oredownl
oadi
ng.
I
MAP4( Int
er netMai lAccessPr otocol-
versi
on4)
I
MAP4i smor epower fulandmor ecompl exthanPOP3.Itisi
mpl
ement
edt
o
over
comet hedef i
cienciesofPOP3.
I
MAP4pr ovidesthef ollowingextr
af uncti
ons:
Ausercancheckt heE- mai
lheaderpr i
ortodownloading.
25
25
Ausercansearcht hecont entsoft
heE-mai lf
oraspecif
icstri
ngofchar act
ers
pr
iortodownloadi
ng.
Ausercanparti
all
ydownl oadE-mail
.Thisisespeci
all
yusefulifbandwi dthi
s
l
imit
edandtheE- mail contai
nsmulti
medi awithhi
ghbandwi dt
hr equir
ements.
Ausercancreate,delete,orrenamemailboxesonthemai lser
v er.
Ausercancreateahi erarchyofmailbox
esi nafol
derforE-mail storage.
FILETRANSFERPROTOCOL( FTP)
Fi
leTr ansf erPr otocol(FTP)i st hestandardmechani sm pr ovi
dedbyTCP/ I
Pf or
copying a f i
lef rom one hostt o another.FTP usest he servi
ces ofTCP.FTP
i
mpl ement edt osol vebel
owpr oblems.
Problemswi thFiletransfer
Twosy stemsmayusedi f
fer entfil
enameconv ent i
ons.
Twosy stemsmayhav edifferentway storepr
esentt extanddat a.
Twosy stemsmayhav edifferentdirect
orystr
uctures.
FTPdi f
fersf rom othercli
ent/ser verappli
cati
onsinthatitestabli
shestwo
connectionsbet weent hehost s.FTPusest wowel l
-knownpor tstheseconnect
ions.
1.Dat at r
ansf erconnection(Por t20i sused)
2.Cont rol connect i
on(Port21i sused)
BasicModelofFTP
Considertheabov ef i
gurethatshowsbasi cmodel ofFTPt hatcont ai
nsclientand
ser
v ercomponent s.
Cl i
enthast hreecomponent s:UserInterf
ace,Cli
entCont r
olProcess, andCl i
ent
DataTransferPr ocess.
Ser verhastwocomponent s:ServerControlProcessandSer verDat aTr ansf
erProcess.
Thecont r
ol connecti
onismadebet weent hecontrolprocesses.
Thedat aconnect i
onismadebet weent hedat atr
ansf erprocesses.
Thecont r
ol connecti
onr emainsconnect eddur i
ngt heent i
reinteract
iveFTPsessi on.
Thedat aconnect i
onisopenedandt henclosedforeachf i
letransfer
red.
Whenauserst art
sanFTP sessi on,thecont r
olconnect i
onopens.Whi lethe
controlconnect i
oni sopen,t hedat aconnect ion canbeopened and cl osed
multipl
eti
mesi fseveralfi
l
esar etransferr
ed.
25
25
CommunicationoverControlConnecti
on
FTPusest hesameappr oachasSMTPt ocommuni cateacrossthecontr
ol
connecti
on.FTPusest he7-bitASCIIcharacterset.
Communi cati
onisachievedthroughcommandsandr esponses.FTPsendsone
commandorr esponseatatime.
Eachcommandorr esponseisonlyoneshor tline.Eachlineister
minatedwitha
two-charact
erend-of-
li
netoken.(Onechar acterforcarri
agereturnandotherfor
l
i
nef
eed)
.
Fi
leType
FTPcantransferoneoft
hefol
lowi
ngfi
let
ypesacr
ossthedat
aconnect
ion:
anASCI
I
fi
l
e,i
magef il
eorEBCDICfil
e(t
hefi
lef
ormatusedbyI
BM) .
Dat
aStructure
FTPcantransferafil
eacrossthedataconnecti
onbyusi ngthr
eetypesofdat
ast
ruct
ure.
Fil
eStructure:Thefil
eisaconti
nuousstream ofbytes.
RecordStructure:Thefi
lei
sdividedi
ntorecords.Thiscanbeusedonlywi
tht
extfi
les.
PageSt r
ucture:Thefil
eisdiv
idedint
opagesandeachpagehav i
ngapage
number andapageheader .
25
25
Transmi ssionMode
FTPusest hreetransmi ssi
onmodes: St
ream Mode, BlockModeandCompr essedMode.
St ream modei st hedef aul tmode.Dat aaredel i
ver edf rom FTPt oTCPasa
cont i
nuousst ream ofby tes.
Bl ockMode:Dat acanbedel i
ver
edfrom FTPt oTCPi nbl ocks.Eachblocki s
precededbya3- byteheader .Theyareoneby teBl ockDescr iptor
,Sizeoft he
blocki n2by tes.
Compr essedModeI nt
hi smodeconsecut iveappear ancesofadat auni tare
replacedbyoneoccur r
enceandt henumberofr epet i
tions.
Exampl eof
FTPf tp>l s
reports
Thecl i
entsendst helistcommand( lsreports)tofindt helistoff i
l
esont hedi rector
y
namedr eport.
Anony mousFTP
TouseFTP, auserneedsanaccount( username)andapasswor dont heremot e
serverbutsomesi teshav easetoff i
lesav ai
lablef orpubl i
caccess, t
oenabl e
Anony mousFTP.
Toaccesst hesef il
es, auserdoesnotneedt ohav eanaccountorpasswor d.
Instead,theusercanuseanony mousast heusernameandguestast he
passwor d.
Useraccesst othesy stem i sver
ylimited.Somesi tesal lowanony moususer s
onlyasubsetofcommands.
Exampl e: Mostsitesal l
owt heusert ocopysomef i
les, butdonotal l
ownav i
gat i
on
throught hedirectori
es.
WORLDWI DEWEB( WWW)
Wor l
d Wi de Web ( WWW)i sar eposit
or y ofi nf
ormati
on l i
nked toget herf r
om
l
ocationsallov ert hewor l
d.WWW hasauni quecombi nati
onoff lexibi
l
ity
, portabi
li
ty,
anduser -f
riendlyf eaturesthatdi sti
nguishi tfrom otherser vi
cespr ovidedbyt he
Int
ernet.
Archit
ecture
TheWWW i sadi stri
butedcli
ent/ser v
erser v
ice,i
nwhi chaclientusingabr owsercan
accessaser vi
ceusi ngaser ver.
Theser vicepr ovi
dedi sdist
ri
but edovermanyl ocati
onscalledsite.
Eachsi tehol dsoneormor edocument s,ref
erredtoasWebpages.
EachWebpagecancont ainalinkt ootherpagesi nthesamesi teoratot hersi
tes
i
scalledHy perli
nk.
25
25
Thepagescanber
etr
iev
edandv
iewedbyusi
ngbr
owser
s.
25
25
Archit
ect ureofWWW cont ainsfourparts:1.Cl i
ent2.Ser ver3.URL 4.
CookiesCl i
ent(Browser )
ACl i
entisabr owsert hatinter
pretsanddispl aysaWebdocument .
Eachbr owserconsi st
soft hreepar t
s:Controller,Cli
entprotocol
,andInt
erpr
eters.
Thecont roll
erreceivesinputfrom t
hekey boardort hemouseandusest heclient
programst oaccesst hedocument .
Af terthedocumenthasbeenaccessed, thecont rol
lerusesoneofthe
i
nterpr eterstodisplaythedocumentont hescr een.
Thei nterpretercanbeHTML, Java,orJav aScriptdependingonthetypeofdocument
.
Thecl ientprotocol canbeFTPorHTTP.
Ser
ver
TheWebpagei sstoredatt heserver
.Eacht i
meacl i
entr
equestar
ri
ves,t
he
correspondi
ngdocumenti ssentt otheclient.
Toimpr oveeff
ici
ency,serversnormallystorerequestedf
il
esinacacheinmemory.
Aser verusesmul t
i-
threadingormul ti-
processingforansweri
ngmor ethanone
requestatatimetoincreaset heeffi
ciency.
Uni
for
m Resour
ceLocat
or(
URL)
The Uni
for
m Resour ce Locat
or(URL)isa standar
df orspecif
ying anyki
nd of
i
nfor
mationont heInternet
.Acli
entthatwant
st oaccessaWebpageneedst he
addr
ess.Tof aci
li
tat
et heaccessofdocumentsdist
ribut
edthroughoutthewor
ld,
HTTPuseslocator
s.
URLdef
inesf
ourt
hings:
Prot
ocol
,Hostcomput
er,
Por
t,andPat
h.
Protocol
:Iti
stheclient/
serverprogram usedt or etr
iev
et hedocument .Ex:
FTPorHTTP.
Host:Thehostist hecomput eronwhi cht hei nformationisl ocated.Webpages
areusuallystor
ed i ncomput ersand comput ersar egi v
enal i
asnamest hat
usuall
ybeginwit
ht hecharacters"www" .Thisisnotmandat or y.
Port:TheURLcanopt i
onal
lycontainthepor tnumberoft heser ver.
Path:Iti
sthepathnameoft hef i
lewheret heinfor mati
oni slocated.
Note:
Thepathcani
tsel
fcont
ainsl
ashest
hatsepar
atet
hedi
rect
ori
esf
rom t
he
subdi
rect
ori
esandf
il
es.
Cookies
Cookiesareusedtodevisethefoll
owi ngfuncti
onali
ti
es:
Somewebsi t
esneedt oall
owaccesst oregist
eredcli
entsonly.
Websi t
esar ebei
ngusedasel ectronicstores(suchasFlipkartorAmazon)that
all
ow userst obrowset hrought hest or
e,selectwanteditems,putthem inan
electr
oniccart
,andpayatt heendwi thacr edi
tcard.
Somewebsi t
esareusedaspor t
als:theuserselectst
heWebpageshewant stosee.
Somewebsi t
esarejustadverti
sing.
25
25
Creati
onandSt orageofCooki es
Thecr eati
onandst orageofcooki esdependont hei mplement ation:
1.Whenaser verr eceivesar equestfr
om acl ient,i
tst oresinfor mat
ionaboutthe
cl
ientinaf i
leorast ri
ng.
Thei nformat ionmayi ncl
udet hedomai nnameoft hecl ient,at i
mestamp,the
contentsoft hecooki esuchascl i
entname,cl ientregistr
ationnumberandot her
i
nformat i
ondependi ngont hei mpl
ement at
ion.
2.Theser verincl udesthecooki eintheresponset hatitsendst ot hecl
ient
.
3.Whent hecl i
entr eceiv
est heresponse,thebrowserst oresthecooki einthe
cookiedirector y,whichi ssortedbythedomai nser v
ername.
Usi
ngCooki es
Acookieisusedf orfollowingpurposes:
1.Thesi t
et hatr estri
ctsaccesst oregister
edcl ient
sonlysendsacooki et ot he
cli
entwhent hecl i
entr egi
stersforthef ir
sttime.Foranyr epeatedaccess,onl y
thosecl i
entst hatsendt heappr opri
atecookiear eall
owed.
2.Anel ectronicst oresuchasFl i
pkartorAmazoncanuseacooki ef orit
scl i
ent
shopper s.Whenacl i
entselectsani tem andi nser
tsitint
oacar t,acooki ethat
containsi nformationaboutt hei t
em, suchasi tsnumberanduni tprice,i
ssentt o
thebr owser .
Ifthecl i
entsel ectsasecondi tem thecooki eisupdatedwi ththenewsel ection
inf
or mation.
Whent hecl i
entf i
nishesshoppi ngandwant st ocheckout ,t
hel astcooki eis
retr
ievedandt het otalchargeiscalculat
ed.
3.AWebpor t
alusest hecooki e,whenausersel ectsherfavori
tepages, acookieis
madeandsent .Ifthesi t
ei saccessedagai n,thecookieissentt ot heserverto
showwhatt heclientislookingfor.
WEBDOCUMENTS
Document sint heWWW canbegr oupedintothreecat egori
es:Stat
ic,Dynamicand
Activ
e.StaticDocument s
St ati
cdocument sarefixed- contentdocument sthatar ecreat
edandst oredinaser
ver
.
Thecl ientcangetonlyacopyoft hedocument(i.e.)thecontent
soft hefil
eare
deter
mi nedwhent hefil
ei scr eated,notwhenitisused.
Thecont entsint
heser vercanbechangedbutt heusercannotchanget hem.
Whenacl i
entaccessest hedocument ,acopyoft hedocumenti ssentandt he
usercant henuseabr owsi ngpr ogram todispl
ayt hedocument .
Hy
per
textMarkupLanguage(HTML)
Hy
pertextMar
kupLanguage(HTML)i
sal
anguagef
orcr
eat
ingWebpages.
25
25
Dat
aforaWebpagear
efor
mat
tedf
ori
nter
pret
ati
onbyabr
owser
.
25
25
HTML all
ows us to embed f
ormatti
ng i
nst
ruct
ions i
nthe f
il
eit
sel
f.The
i
nst
ruct
ionsar
eincl
udedwit
hthetext
.
AWebpageismadeupoft wopar ts:
HeadandBody.
Head:Theheadisthefi
rstpartofaWebpage.Theheadcont
ainst
het
it
leoft
he
pageandot
herparamet
ersthatthebrowserwi
l
luse.
Body:Theact ualcont
ent
sofapagear ei
nthebody,
whichi
ncl
udest
hetextandt
he
tags.Thet extistheact
ualinf
ormat
ioncontai
nedinapage.Thet
agsdefinet
he
appearanceofthedocument.
HTMLTags
EveryHTMLt agisanamef oll
owedbyanopt i
onal l
istofatt
ri
butesenclosed
betweenl ess-t
hanandgreater
-thansymbol
s( <and>) .
Anat t
ributeisfol
l
owedbyanequal ssi
gnandt hevalueoftheattr
ibut
e.
Thebr owsermakesadeci si
onaboutt hest
ructureofthetextbasedont hetags,
whichar eembeddedintothetex t
.
ThecommontagsusedinHTMLare:Bol
d,I
tali
c,Under
li
nethetext.
ThetwoBoldfacet
ags<B>and</
B>areinstr
ucti
onsfort
hebr owser
.
ThetwoI
tali
ctags<I
>and</I
>makethetextit
ali
c
ThetwoUnderli
net
ags<U>and</U>putunderl
i
nebelowthetext.
25
25
Theanchori sdefinedby<A. .
.>and</ A>tagsandt heanchoredit
em usesthe
URLtor efertoanotherdocument .
Whenthedocumenti sdisplayed,t
heanchoreditem isunderl
i
ned,bli
nki
ng,orbol
dfaced.
Theusercancl ickontheanchor edit
em togot oanotherdocument.
Thereferencephraseisembeddedbet weenthebeginningandendingtags.
Thebegi nni
ngtagcanhav eanat tr
ibutescal
ledHREF( Hyperl
inkRefer
ence)
def
inest headdress(URL)ofthel i
nkeddocument .
<AHREF=ht
tp:
//www/
deanza.
edu/
for
ouzan>Aut
hor
</A>Dy nami cDocument s
Ady nami cdocumenti screat
edbyaWebser verwhenev erabr
owserr equests
thedocument .
Whenar equestar ri
ves,t
heWebser verrunsanappl i
cati
onprogram thatcr
eates
thedynami cdocument .
Theser v
err eturnstheoutputofthepr ogram asar esponsetothebrowser.
Becauseaf reshdocumenti screatedf oreachr equest,t
hecontent
sofady namic
documentcanv aryfr
om oner equesttoanot her.
Example: t
her etri
evalofthetimeanddat efrom aser verisadynamicdocument .
ActiveDocument s
Appl icat
ionsneedapr ogram orascriptt
ober unatt hecli
entsite.Theseare
call
edact i
vedocuments.
Whenabr owserr
equestsanact i
vedocument,theserversendsacopyoft he
documentorascr i
pt.Thedocumentisthenrunatthecli
entsi
te(br
owser ).
Exampl e:Supposewewantt or unaprogr
am thatcr
eatesanimatedgraphicsonthe
screen.Thepr ogr
am defi
nit
elyneedstoberunatthecli
entsit
ewheret heanimat
ion
takesplace.
Jav
aAppl ets
Byusingj avaappl
etswecancr eateanact iv
edocument .
Javai s a combi nation ofa hi gh-l
evelpr ogr
ammi ng l
anguage,a r un-
ti
me
envi
ronment ,andacl asslibr
aryt hatallowsapr ogrammert owrit
eanact i
ve
document( anapplet)andabr owsert orunit.
Javacanal sobeast and-al
onepr ogram thatdoesn'tuseabrowser.
Anappl etisaprogram writ
teninJav aont heser v
er.I
tiscompil
edandr eadytoberun.
Thedocumenti si
nby te-
code( bi
nary)format .
Theclientprocess(browser)createsaninst anceofthi
sappletandrunsit.
Jav
aScri
pt
Javascr i
ptindynamicdocument scanalsobeusedf oracti
vedocument s.
26
26
I
ftheacti
vepar
toft
hedocumentissmal
l,
itcanbewrit
teni
nascri
pti
ng
l
anguage;t
heni
tcanbei
nter
pret
edandrunbythecl
ientatt
hesametime.
26
26
Thescri
ptisinsour
cecode(t
ext
)andnoti
nbinaryf
orm.
JavaScr
ipti
sav er
yhighl
evel
scr
ipt
ingl
anguagedevel
opedf
ort
hispur
pose.
HYPERTEXTTRANSFERPROTOCOL( HTTP)
TheHypert
extTr
ansferPr
otocol
(HTTP)i
sapr ot
ocol
usedmainl
ytoaccessdat
aon
theWorl
dWi deWeb.HTTPusestheser
vicesofTCPonwel
l-
knownport80.
HTTPfuncti
onsasacombinat
ionofFTPandSMTP.
Si
mil
ari
tybetweenHTTPandFTP
HTTPi ssi
mil
artoFTPbecausei
ttransfer
sfi
lesandusestheser
vicesofTCP.
HTTPusesonlyTCPdataconnecti
ont otr
ansfert
hedatabet
weencl i
entand
ser
verandther
eisnocontr
olconnecti
on.
Si
milar
it
ybetweenHTTPandSMTP
InHTTP,thedatat r
ansferr
edbet weent hecli
entandtheserv
erlookli
keSMTPmessages.
Theformatofthemessagesi scontroll
edbyMI ME-
li
keheaders.
HTTPmessagesar ereadandi nter
pretedbyt heHTTPserverandHTTPcl i
ent(
browser)
.
SMTPmessagesar est or
ed&f orwarded,butHTTPmessagesar edel
iver
edimmediat
ely.
Thecommandsf rom thecli
enttotheser verareembeddedinarequestmessage.
Thecontent
soft herequestedf i
l
eori nformationar
eembeddedi naresponsemessage.
HTTPTr ansacti
on
HTTPisast atel
esspr
otocol
eventhoughitusesTCPservi
ces.Thecli
enti
nit
ial
i
zes
t
hetransacti
onbysendingarequestmessage.Theser
verr
epliesbysendi
nga
r
esponse.
HTTPusestwotypesofmessages:Request
,Response
Arequestmessageconsi
stsofarequestl
ine,
aheader,andopt
ional
body.
Aresponsemessageconsi
stsofastatusli
ne,aheader
,andopti
onalbody
.
RequestandStat
usLines
Thef i
rstl
i
neinarequestmessageiscall
edarequestli
ne.
Thef i
rstl
i
neintheresponsemessageiscal
l
edt hestat
usli
ne.
26
26
Requestt ype
Thisf iel
disusedi nther equestmessage.I nv ersion1.
1ofHTTPdef inessev er
al
requestt ypes.Therequestt ypei scat egor
izedi ntomethods.
Methods Act ion
GET Request sadocumentf rom t heserv
er
POST Sendssomei nf or
mat i
onf r
om t hecli
entt otheser v er
PUT Sendsadocumentf r
om theser v
ertot hecl
ient
URL:Byusi ngURL, clientscanaccesst hewebpage.
Ver sionThemostcur rentv ersionofHTTPi s1. 1.
Stat uscodei susedi nt her esponsemessage.I tconsi
st sof3-digit
s.100, 200,300,400,
500.
Stat usphrase:Itexplai nsthest atuscodei nt extform,itisusedi nther esponsemessage.
StatusCode St atusphr ase Descr i
pti
on
100 Cont i
nue, switch Informat i
onal
200 OK, CREATED, ACCEPTED Successf ulrequest
300 Mov edPer manent lyortempor aril
y,Not Redir ect Cl i
ent t o
modi fied. anot herURL
400 400-Badr equest , 404-Notf ound, Erroratcl ientside
500 500-I nternal serv ererror503-Ser vi
ce Erroratser verside
unav ailable
Header
Theheaderexchangesaddi
ti
onal
inf
ormati
onbetweent
hecl
i
entandt
heser
ver
.The
headercanconsi
stofoneormoreheaderl
ines.
AHeaderl inecanbedi v i
dedinto4cat egories:1.General2. Request3. Response4. Enti
ty.
1.Ar equestmessagecancont ai
nRequestheader ,Gener alheader ,Enti
tyheader.
2.Ar esponsemessagecancont ainResponseheader ,Gener al header,Enti
tyheader.
Generalheader
General headergi vesgener alinfor
mat i
onaboutt hemessagesuchasDat e,MIMEv ersi
on.
Requestheader
Requestheaderspeci f
iest hecli
ent'sconfi
gur ati
onandt hecl ient '
spreferr
ed
documentf or mat.Exampl e: Accept :Showst hemedi um f ormatt heclientcan
accept
From: Showst heE- mailaddressoft heuser
Host:Showst hehostandpor tnumberoft he
serverReferrer:Specif
iestheURLoft heli
nked
documentUseragent :Identifi
es the client
program.
Responseheader
Thisheaderspeci fiestheser ver
'sconfigurati
onandspeci al i
nformat i
onaboutt he
request.Exampl e:Age: showst heageoft hedocument ,publ ic:showst hesuppor t
ed
l
istofmet hods, server
: showst heservernameandaddr ess.
Entit
yheader
26
26
Theenti
tyheadergi
vesi
nfor
mat
ionaboutt
hebodyofthedocument.somerequest
messagessuchasPOSTorPUTmet hodsmaycont
ainabodyalsousethi
stypeof
header
.
26
26
Examples:Etag-Giv esanent i
tyt ag,Cont ent-t
ype-Speci f
iesthemedi um t
ype,Last-
modif
ied-Givest hedat eandt imeoft helastchangeet c.
Body
Thebodycanbepr esentinar equestorr esponsemessage.Bodycont ai
nsthe
documenttobesentorr eceived.
ExampleofHTTPt ransacti
on
Consi
derthebel owf i
gurethatshowshowt oretr
iev
eadocument .
Weuset heGETmet hodt or etri
eveani magewi ththepat h/usr /
bin/i
magel.
Ther equestlineshowst hemet hod( GET) ,theURL, andtheHTTPv er
sion(1.1)
.
Headerhast wol inesthatshowt hecl ientcanaccepti magesi ntheGIForJPEGf or
mat
.
Ther equestdoesnothav eabody .
Ther esponsemessagecont ainst hest at
usl i
neandf ourlinesofheader .
Theheaderl inesdef inethedat e,serv
er ,MIMEv ersion,andl engthofthedocument.
Thebodyoft hedocumentf ollowst heheader .
HTTPConnect i
ons
Non- per sistentconnect i
on
Versionsbef or e1.1useNon- persist
entmet hodast hedef aultconnecti
on.I
nthis
connect ion, oneTCPconnect ionismadef oreachrequest/ r
esponse.
Thest epsi nv olvedi nthisstr
at egy:
1.Thecl ientopensaTCPconnect i
onandsendsar equest .
2.Theser versendst heresponseandcl osestheconnect i
on.
3.Thecl ientr eadst hedat aunt il
itencountersanend- of
-fil
emar keraft
erthatt
he
clientcl osest heconnect ion.
Inthisst rategy ,forNdi ff
erentpicturesindiff
erentfi
les,t
heconnect i
onmustbe
openedandcl osedNt imes.
TheNon- persi stentst r
ategyimposeshi ghoverheadont heser verbecausethe
serverneedsNdi f
ferentbuffersandr equir
esasl owst ar
tprocedur eeachti
mea
connect ioni sopened.
Per
sistentConnect i
on
Persistentconnecti
oni
sthedefaul
tinHTTPv er
sion1.
1.
Inthisconnection,t
heser
verl
eavestheconnecti
onopenformor
erequest
saf
ter
sendingar esponse.
26
26
Ser
vercancl
oset
heconnect
ionatt
her
equestofacl
i
entori
fat
ime-
outhasbeenr
eached.
26
26
Thesendersendst helengt hofthedatawi theachr esponse.I ft
hesenderdoes
notknowt hel engt hoft hedat athendocumenti screat eddy nami call
yoractivel
y.
Theser verinfor mst hecl ientthatthelengthisnotknownandcl osest he
connect i
onaf tersendi ngt hedatasot heclientknowst hatt heendoft hedat a
hasbeenr eached.
ProxySer ver
HTTPsuppor tsPr oxySer v ers.APr oxyser v
erisacomput ert hatkeepscopi esof
responsest orecentr equest s.
TheHTTPcl i
entsendsar equestt otheproxyser ver.Thepr oxyser v
erchecksi t
scache.
I ftheresponsei snotst oredinthecache, thepr oxyser versendst herequestto
thecorrespondi ngserv er.
I ncomingr esponsesar esentt ot heproxyser v
erandst oredf orfuturerequests
from otherclient s.
Pr oxyser verreducest hel oadont heori
ginalserver,decr easest raf f
icand
impr ov
esl atency .
Touset hepr oxyser ver, t
hecl i
entmustbeconf iguredt oaccesst hepr oxy
insteadoft het argetser ver .
NETWORKMANAGEMENT:SNMP
NetworkManagementcanbedefi
nedasmonit
oring,t
esting,conf
iguri
ngand
tr
oubleshoot
ingnet
wor
kcomponentstomeetasetofr equir
ement sdefi
nedbyan
organi
zati
on.
Functi
onsofNetworkManagementSyst
em
NetworkManagementSyst
em canbediv
idedi
ntofiv
ebr oadcategori
es:
Configur at
ionManagement
Al argenetwor kisusual
lymadeupofhundr edsofent
iti
est
hatarephysi
call
yor
l
ogi call
yconnect edtooneanother
.
Theseent i
ti
eshav eaninit
ial
confi
gurat
ionwhenthenetwor
kissetup,butcan
changewi t
ht i
me.
Theconf i
gurati
onmanagementsy stem mustknowthestat
usofeachentit
yand
i
tsr elat
iont ootherent
it
ies.
Configur at
ionmanagementcanbedi vi
dedintotwosubsyst
ems:Reconf
igur
ati
on
andDocument ati
on.
Reconf
igur
ati
on
Reconf
igur
ati
onmeansi
nal
argenet
wor
k,thenet
wor
kcomponent
sandf
eat
uresar
e
26
26
adj
ust
eddai
l
y.Ther
ear
ethr
eet
ypesofr
econf
igur
ati
on:
26
26
i
. Hardwar er econfiguration:I tcoversallchangest ot hehardwar e.Thesear e
handledmanual ly.Exampl e: Asubnetwor k( Router)maybeaddedorr emov ed
fr
om t henet work.
i
i. Soft
war ereconfiguration:I tcoversallchangest ot hesoftwar e.Mostoft he
soft
war er econfigurati
oncanbeaut omat ed.Exampl e:UpdatingOper ati
ngsy stem.
i
i
i
. User -
accountr econf i
gur ation:Itcoversaddi nganddel eti
ngt heuser sona
syst
em andi talsoconsi dersuser ’
sindividual pr
ivil
egesandGr oupprivi
l
eges.
Exampl e:Ausermayhav ereadandwr iteper missionwi t
hr egar dtosomef iles,
butonl yreadper missionwi thregardtoot herfil
es.
Document ation
Thenet workconf igurat ionandeachsubsequentchangei nhar dware,softwareand
useraccount smustbedocument ed.
Har dwar edocument ation
I tinvolvest woset sofdocument s:MapsandSpeci fi
cat i
ons.
Mapst rackeachpi eceofhar dwareandi t
sconnect i
ont othenetwor k.
Gener almapst hatshowst helogical r
elat
ionshipaswel lasphysicalrelat
ionship
bet weeneachsubnet work.
Foreachsub- networ k,thereareoneormor emapst hatshowal lpiecesofequi pment
.
Speci fi
cationi nformat i
onsuchashar dwar et
ype,serialnumber ,vendoraddr ess
andphonenumber ,timeofpur chaseandwar rantyinformati
onmustbei ncl
uded
foreachpi eceofhar dwar econnect edt othenetwork.
Softwar eDocument at i
onI tincludesinf ormationsuchast hesoftwar etype,t
he
version,thetimei nstalledet c.
Userdocument ati
onOper ati
ngsy stem ut i
li
ti
esall
owst hedocument ati
onofuser
account sandt heirprivileges.Thei nformat i
oni nt
hesef i
lesareupdat edand
secur ed.
FaultManagement
Faultmanagementi st heareaofnet wor kmanagementt hathandlest heissuesin
networ kcomponent s.Exampl e:Af aultmaybeadamagedcommuni cati
onmedi um.
Faultmanagementsy stem hastwosubsy stems: React i
veandPr oact i
ve.
React i
v eFaul tManagement
Ther esponsi bil
it
iesofr eacti
vefaultmanagementcanbedi vi
dedinto4st eps:
i
. Det ectthef ault:Faul tmanagementsy stem musthav et odetecttheexact
l
ocat ionoft hef ault.
i
i.I solatet hef ault:Ifaf aulti
sisolatedt hataffectsonl yaf ewuser s.Afterisol
ati
on,
theaf fect eduser sar eimmediatelynot if
iedandgi venanest i
mat edt imeof
correction.
i
ii
.Cor rectt hef ault:Thi smayinv ol
ver eplacingorr epairingthefaultycomponent s.
i
v.Recor dt he f ault:Af terthe f aulti s cor rected,i tmustbe r ecorded (i.e.
document ed) .The r ecord should show t he exactl ocati
on oft he fault
,t he
possi blecause, theact i
onoract i
onst akent ocor r
ectt hefault
,thecostandt ime
i
tt ookf oreachst ep.
Pr
oact
iveFaul
tManagement
26
26
Proact
ivefaul
tmanagementtr
iest
opr
eventf
aul
tsf
rom occur
ri
ng.Somef
ail
ures
canbepredict
edandprev
ent
ed.
26
27
PerformanceManagement
Performancemanagementt ri
est omoni torandcont rolt henet worktoensur ethatit
i
sr unni ngasef fi
ciently.Itcanbemeasur edbyt hef ollowi ngconcepts:Capaci t
y,
Traffi
c, Throughput ,Responset i
me.
Capaci ty oft he Net work Ev ery net work has a l i
mi ted capacit
y ,and the
per formancemanagementsy stem mustensur et hati tisnotusedabov et hi
s
capaci t
y.
Exampl e:IfaLANi sdesi gnedf or100st at
ionsatanav eragedatar at
eof 2Mbps,
i
twi l
lnotoper atepr operlyif200st ati
onsar econnect edt othenetwork.
Tr af fi
cTr aff
iccanbemeasur edint woway s:I
nter
nal l
yandExt ernal
ly.
Internalt r
affi
ci smeasur edbyt henumberofpacket s( orbytes)travel
inginsi
de
thenet work.
Exter naltraf
fi
ci smeasur edbyt heexchangeofpacket s(orby t
es)outsidethenetwor
k.
Thr oughputI tcanbemeasur edbyani ndivi
dualdevicesuchasar outerorapar t
oft henet work.Thr oughputmakessur et hat,t
hedev icei snotreducedt o
unaccept abl
elev el
s.
ResponseTi meI ti
smeasur edfrom thet imeauserr equest saser v
icetothe
timet heservi
cei sgr anted.
Secur
it
yManagement
Secur
it
ymanagementi
sresponsi
blef
orcont
rol
l
ingaccesst
othenet
wor
kbasedon
thepr
edef
inedpol
i
cy.
Account ingManagement
Account i
ngmanagementist
hecontrolofusers'accesstonetworkresources
throughcharges.
Underaccount i
ngmanagement
,indi
vidual
users,departments,di
visi
ons,oreven
projectsarechargedf
ort
heser
vicestheyrecei
vef r
om thenetwork.
SIMPLENETWORKMANAGEMENTPROTOCOL( SNMP)
TheSi mpleNet wor kManagementPr ot
ocol( SNMP)i saf r
amewor kformanaging
devices in an internetusi ng the TCP/IP protocolsui te.Itprovides a setof
fundament aloperati
onsf ormoni t
ori
ngandmai nt
ainingani nter
net.
ConceptofSNMP
SNMPi sanappl i
cati
onl evelprot
ocolthatusest heconceptofManagerandAgent .
Amanagercont rolsandmoni t
orsasetofagent s.
AmanagermaybeahostandanAgentmaybear outer
.
SNMPcanmoni t
ordev i
cesmadebydi ff
erentmanuf act
urersandinstal
l
edon
diff
erentphysicalnetworks.
27
27
SNMPcanbeusedi
nLANsandWANsconnect
edbyr
out
ers.
27
27
Manager
sandAgent
s
AManageroramanagementst
ati
onisahostt
hatrunstheSNMPcli
entpr
ogram.
AnAgentoraManagedst
ati
onisarout
erorahostthatr
unstheSNMPserverpr
ogr
am.
Managementisachi
evedthr
oughsimpl
einter
actionbetweenamanagerandanagent
.
Agentkeepsperf
ormanceinf
ormati
oninadat abase.
Managerhasaccesstotheval
uesinthedatabase.
Example:Aroutercanstor
einvari
abl
essuchast
henumberofpacket
srecei
vedand
for
warded.Themanagercanf et
chandcomparet
heval
uesofthesetwovari
abl
esto
seeift
herouteriscongest
edornot.
Managementwit
hSNMPi sbasedont hreebasicideas:
1.A managerchecksanagent by r equesti
ng i nf
ormati
on that refl
ect
s t he
behavi
oroftheagent
.
2.Amanagerforcesanagenttoperfor
m at askbyresett
ingval
uesintheagentdatabase.
3.Anagentcontri
but
estothemanagementpr ocessbysendingwarningmessage
tothemanagerofanunusualsi
tuati
on.Thewar ningmessageiscal
ledthetr
ap.
ManagementComponents
SNMPusest wootherprot
ocol
stodomanagementtasks:
Struct
ureof
ManagementInf
ormation(SMI
)andManagementI
nformati
onBase(MIB)
.
Str
uct
ureofManagementInformati
on(SMI)
TheSt
ruct
ureofManagementI nf
ormat
ionver
sion2(
SMI
v2)i
sacomponentf
or
net
workmanagement.Funct
ionsofSMIare:
Name
SMIr equi
resthateachmanagedobject(
suchasarouter,
av ar
iabl
einarouter
,a
value)haveauniquename.
Tonameobj ect
sgloball
ySMIusesanobjecti
dent
if
ier
,whichisahier
archi
cal
identi
fi
erbasedonat reest
ruct
ure.Thet
reest
ruct
urestart
swithanunnamed
root.
27
27
27
27
Eachobj ectcanbedef inedbyusi ngasequenceofi ntegerssepar atedbydots.
Treestructurecanal sodef i
neanobj ectbyusingasequenceoft extualnames
separatedbydot s.
Theinteger -
dotrepresent at
ionisusedi nSNMP.Thename- dotnot ati
onisused
bypeopl e.
Exampl e:Thefoll
owi ngshowst hesameobj ecti
nt wodi ff
erent
notati
ons:
i
so.or g.dod.i
nternet.
mgmt .
mi b-
2 1. 3.
6.1.2.1
Ty
pe
Todef i
net hedataty pe, SMIusesf undament alAbstractSyntaxNot at
ion1(ASN.l
).
SMIhast wobroadcat egori
esofdat at ype:
Si mpleandSt ructur
ed.
Si
mpleTy
pe
Thesi
mpl
edat
aty
pesar
eat
omi
cdat
aty
pessuchaasI
nteger
32,
Oct
etSt
ri
ng,
IPaddr
esset
c.
Str
ucturedTy pe
Bycombi ningsimpleandst ructur
eddatatypes,wecanmakenewst ructur
ed
dat
at ypes.SMIdefinest wost r
uctur
eddatatypes:SequenceandSequenceof .
ASequencedat at ypeisacombi nat
ionofsimpledataty pes, notnecessar
il
yof
t
hesamet ype.I
tissi mil
artotheconceptofast r
uctusedi nCpr ogramming.
ASequenceofdat at y
pei sacombinati
onofsimpl edataty pesallofthesame
t
ype.Itissimil
artot heconceptofanarrayusedinC- pr
ogr ammi ng.
EncodingMethod
SMIusesanot herstandar
dBasicEncodi
ngRules(
BER)t
oencodedat
atobe
tr
ansmi t
tedoverthenetwork.BERspeci
fi
esdatat
obeencodedi
nfol
l
owingf
ormat
:
Tag,LengthandValue.
Tag
Thetagi sa1-bytef i
eldthatdef inesthet y
peofdat a.Itiscomposedoft hreesubfiel
ds:
Cl ass(2bits):Itdefi
nest hescopeoft hedata.
Fourclassesar edefined:00-uni versal
,01-Appli
cationwi de,10-contextspeci f
ic,
11-priv
ate.
For matsubf i
eldindicateswhet herthedataar esimpl e(
0)orst ructured( 1).
Numbersubf i
eldfurtherdividessimpl eorstructur
eddat ai nt
osubgr oups.
Exampl e:
Intheuni versalclasswi thsimpleformat ,INTEGERhasav alueof2,
OCTETSTRI NGhasav al
ueof4.
Length
Thel engthf i
eldis1ormor eby t
es.
Ifitis1by te,t
hemostsi gnificantbitmustbe0.Ot her7bi t
sdef inethel engthofthedat
a.
Ifitismor ethan1by te,t
hemostsi gni
fi
cantbitoft hefir
stby t
emustbe1.The
other7bitsoft hefir
stby tedef i
net henumberofby tesneededt odef inet he
27
27
length.
Val
uef i
eldcodest
hev
alueoft
hedat
aaccor
dingt
other
ulesdef
inedi
nBER.
27
27
Exampl
e:Showthef
oll
owi
ngi
nencodi
ngr
epr
esent
ati
on:
1.Defi
neINTEGER14.
2.Def
ineOCTETSTRI
NG“
HI”
AccessingMIBVar i
abl
es
LetustakeUDPgr ouptoshowhowtoaccessdi
ffer
entvari
abl
es.Toaccessanyof
thesimplevari
abl
es,weusethei
dofthegroup(
1.3.
6.1.
2.1.
7)f
ollowedbythei
dof
thevari
able.
Thef
oll
owi
ngshowshowtoaccesseachv
ari
abl
e:
udpI
nDatagr
ams 1. 3.
6.1.
2.1.
7.1
udpNoPort
s 1. 3.
6.1.
2.1.
7.2
udpI
nErr
ors 1. 3.
6.1.
2.1.
7.3
27
27
udpOut
Dat
agr
ams 1.
3.6.
1.2.
1.7.
4
27
27
Theobjecti
denti
fi
ersdefi
net hev ari
ablenoti
nstances( contents).Ani
nst
ancesuf
fi
x
“0”shoul
dbeaddedt oshowt heinstanceofeachvariable.
udpInDatagr ams.0 1. 3.6.1.
2.1.7.1.
0
udpNoPor t
s. 0 1. 3.6.1.
2.1.7.2.
0
udpInEr
rors. 0 1. 3.6.1.
2.1.7.3.
0
udpOutDatagr ams. 0 1. 3.6.1.
2.1.7.4.
0
Tables
Toidenti
fyatabl
e,wefir
stuset hetablei
d.Toaccesst hetabl
e, wehavet
odefi
ne
thetabl
eentr
ies.
udpTabl e 1.3.6.
1.2.1.7.5
udpEnt ry 1.3.6.
1.2.1.7.5.
1
Toaccesst
heent
ryweneedt odef
ineeachenti
ty(f
iel
d)i nt
he
ent
ry.
udpLocal
Address 1.3.6.
1.2.
1.7.5.
1.1
udpLocal
Port 1.
3.6.
1.2.
1.7.5.
1.2
Toaccessaspeci f
icinst ance( r
ow)oft hetable,weaddt hei ndext ot
heabove
i
ds.Toaccesst hei nstanceoft hel ocaladdressf ort hefirstrow,weuset he
i
dent if
ieraugment edwi tht heinstancei ndex:
udpLocal Addr ess.181.23.45.14.23 1.3.6.1.
2.7.5.1.
1.181.23.45.
14.
23
Lexicographi cOr dering
Theobj ecti denti
fiersfollowi nlexicographicorder.
Tabl esar eor deredcol umnbycol umnf rom thetoptot hebottom.
Thel exicographicor deringenabl esamanagert oaccessasetofv ar
iabl
esone
afteranot herbydef iningt hefir
stv ari
able.
SNMPv er
sion3(SNMPv 3)
SNMPdef i
nesthef or
matofpacket sex changedbet weenamanagerandanagent.
SNMPi nterpr
etstheresul
tandcr eatesst at
isti
cs.
Thepacketsexchangedcont aint
heobj ect(v ar
iable)namesandt
hei
rstat
us(val
ues).
SNMPi sresponsibleforr
eadingandchangi ngthesev al
ues.
SNMPusesbot hSMIandMI BinInternetnet work
management.SNMPv 3defi
neseighttypesofpacket sor
27
27
PDUs.
27
28
1.GetRequestPDUi ssentf r
om themanager( cli
ent)totheagent( ser ver)to
ret
ri
ev ethev al
ueofav ariabl
eorasetofv ariabl
es.
2.GetNextRequestPDUi ssentf r
om themanagert ot heagentt oretri
ev ethev al
ue
ofav ari
able.Itismost lyusedt oretri
evethev al
uesoft heent r
iesinat abl
e.
3.GetBulkRequestPDUi ssentf rom themanagert otheagentt or etri
ev ealarge
amountofdat a.
4.SetRequestPDUi ssentf rom themanagert otheagentt oset( store)av alueinav ar
iabl
e.
5.ResponsePDUi ssentf rom anagentt oamanageri nr esponset oGet Requestor
GetNex t
Request .
6.TrapPDUi ssentf r
om t heagentt othemanagert orepor tanev ent .Forexampl e,
ift
heagenti sr ebooted, itinf
ormst hemanagerandr epor t
st hetimeofr ebooti
ng.
7.Inf
ormRequestPDUi ssentf rom onemanagert oanot herr emot emanagert oget
thevalueofsomev ari
abl esfrom agentsunderthecont rolofther emot emanager .
Theremot emanagerr espondswi thaResponsePDU.
8.ReportPDUi sdesi gnedt oreportsomet ypesofer r
orsbet weenmanager s.Iti
s
notyetinuse.
For
matofPDU
28
28