WEB TECHNOLOGY First Edition M. Thangavel B.E. (CSE) M.E. (CSE)
With the guidance of, R. Sujatha B.Tech (IT), M.E. (CSE) Dedicated
to, M.E. Students, Computer Science and Engineering Department,
J.J. College of Engineering & Technology, Ammapettai,
Poolangulathupatti (Post), Tiruchirappalli - 620 009, Tamil Nadu,
India. SYLLABUS UNIT I FUNDAMENTALS Introduction Network Concepts
Web Concepts Internet Addresses Retrieving Data with URL HTML DHTML
Cascading Style Sheets Scripting Languages Javascript VBscript.
UNIT II COMMON GATEWAY INTERFACE Common Gateway Interface
Programming CGI Scripts HTML Forms Custom Database Query Scripts
Server Side Includes Server Security Issues XML. UNIT III JAVA
PROGRAMMING Java Fundamentals Classes Inheritance Packages
Interfaces Exceptions Handling Multi threading Applets. UNIT IV
SERVER SIDE PROGRAMMING Server Side Programming Active Server Pages
Java Server Pages Java Servlets. Servlet Container Exceptions
Sessions and Session Tracking Using Servlet Context Dynamic Content
Generation Servlet Chaining and Communications. UNIT V APPLICATIONS
Simple applications Internet Commerce Database connectivity Online
databases EDI Applications in Business Plugins Firewalls. TubIe oI
Contents UnIt 1 IundumentuIs l.l InsIc ofwork
Concofs-------------------------------------------------------
l.l.l
ofworks---------------------------------------------------------------------------
l.l.2 Tho !nyors of
ofworks--------------------------------------------------------
l.l.3 II,TCI &
!I--------------------------------------------------------------------
l.l.4 Tho
Infornof-----------------------------------------------------------------------
l.l.5 Tho CIIonf/Sorvor
ModoI------------------------------------------------------- l.l.6
Infornof
Sfnndnrds--------------------------------------------------------------
l.2 InsIc Wob
Concofs-------------------------------------------------------------
l.2.l
!!Is----------------------------------------------------------------------------------
l.2.2 HTM!,SCM! &
XM!-----------------------------------------------------------
l.2.3
HTTI--------------------------------------------------------------------------------
l.2.4 MIMI ModIn
Tyos-------------------------------------------------------------
l.2.5 Sorvor SIdo
Irogrnms-----------------------------------------------------------
l.3 !ockIng u Infornof
Addross------------------------------------------------- l.3.l Tho
InofAddross
CInss---------------------------------------------------------
l.3.2 Inof4Addross nnd
Inof6Addross--------------------------------------------- l.3.3 Tho
ofwork Inforfnco
cInss-------------------------------------------------- l.4
!ofrIovIng nfn wIfh
!!!---------------------------------------------------- l.l l.l l.3
l.l0 l.l4 l.l8 l.l9 l.23 l.24 l.29 l.30 l.33 l.34 l.3? l.38 l.45
l.46 l.48 l.5
HTM!--------------------------------------------------------------------------------
A.l
InfroducfIon------------------------------------------------------------------------
A.2 IdIfIng
HTM!---------------------------------------------------------------------
A.3 IIrsf HTM!
IxnmIo-----------------------------------------------------------
A.4
Hondors------------------------------------------------------------------------------
A.5
!InkIng------------------------------------------------------------------------------
A.6
Imngos-------------------------------------------------------------------------------
A.? SocInI Chnrncfors nnd Moro !Ink
Ironks------------------------------- A.8 !nordorod
!Isfs-------------------------------------------------------------------
A.9 osfod nnd Ordorod
!Isfs----------------------------------------------------- A.l0
InsIc HTM!
TnbIos--------------------------------------------------------------
A.ll InformodInfo HTM! TnbIos nnd
IormnffIng---------------------------- A.l2 InsIc HTM!
Iorms--------------------------------------------------------------
A.l3 Moro ComIox HTM!
Iorms------------------------------------------------- A.l4
InfornnI
!InkIng------------------------------------------------------------------
A.l5 CronfIng nnd !sIng Imngo
Mns-------------------------------------------- A.l6 mofn
IIomonfs--------------------------------------------------------------------
A.l? frnmosof
IIomonf----------------------------------------------------------------
A.l8 osfod
Irnmosofs----------------------------------------------------------------
l.6 ynnmIc
HTM!-------------------------------------------------------------------
l.6.l Objocf ModoI nnd
CoIIocfIons------------------------------------------------- I.l
InfroducfIon------------------------------------------------------------------------
I.2 Objocf
!oforoncIng---------------------------------------------------------------
I.3 CoIIocfIons AII nnd
ChIIdron-------------------------------------------------- I.4
ynnmIc
SfyIos--------------------------------------------------------------------
I.5 ynnmIc
IosIfIonIng-------------------------------------------------------------
I.6 !sIng fho Irnmos
CoIIocfIon-------------------------------------------------- I.?
nnvIgnfor
Objocf-------------------------------------------------------------------
I.8 Summnry of fho HTM! Objocf
ModoI------------------------------------ l.52 l.52 l.52 l.52 l.54
l.55 l.56 l.59 l.60 l.6l l.63 l.66 l.68 l.?0 l.?4 l.?5 l.?? l.?8
l.80 l.8l l.8l l.8l l.82 l.83 l.8? l.90 l.92 l.94 l.96 l.6.2 Ivonf
ModoI------------------------------------------------------------------------
C.l
InfroducfIon-------------------------------------------------------------------------
C.2 Ivonf
OnCIIck----------------------------------------------------------------------
C.3 Ivonf
On!ond----------------------------------------------------------------------
C.4 Irror HnndIIng wIfh
OnIrror------------------------------------------------- C.5
TrnckIng fho Mouso wIfh Ivonf OnMousoMovo-------------------------
C.6 !oIIovors wIfh OnMousoOvor &
OnMousoOuf--------------------------- C.? Iorm IrocossIng wIfh
OnIocus nnd OnIIur----------------------------- C.8 Moro Iorm
IrocossIng wIfh OnSubmIf nnd On!osof------------------ C.9 Ivonf
IubbIIng--------------------------------------------------------------------
C.l0 Moro HTM!
Ivonfs------------------------------------------------------------
l.6.3 IIIfor nnd
TrnnsncfIons----------------------------------------------------------
.l III IIIfors: IIIV &
IIIH----------------------------------------------------- .2
Trnnsnroncy wIfh Chromn
IIIfor-------------------------------------------- .3 CronfIng
Imngo
Mnsks----------------------------------------------------------- .4
MIscoIInnoous Imngo IIIfors
Invorf,Crny,Xrny------------------------ .5 AddIng Shndows fo
Toxf--------------------------------------------------------- .6
CronfIng CrndIonfs wIfh
A!IHA--------------------------------------------- .? MnkIng Toxf
CIow-----------------------------------------------------------------
.8 CronfIng MofIon wIfh
IIur------------------------------------------------------ .9 !sIng
fho wnvo
IIIfor-------------------------------------------------------------
.l0 Advnncod IIIfors : roShndow nnd
!Ighf-------------------------------- .ll TrnnsIfIons I: IIIfor
IIondTrnns---------------------------------------------- .l2
TrnnsIfIons II: IIIfor
!ovonITrnns------------------------------------------- l.9? l.9?
l.98 l.99 l.l0l l.l02 l.l04 l.l09 l.lll l.ll2 l.ll3 l.ll4 l.ll4
l.ll6 l.ll8 l.l20 l.l22 l.l23 l.l26 l.l29 l.l33 l.l34 l.l3? l.l40
l.6.4 nfn IIndIng wIfh TnbuInr nfn
ConfroI-------------------------------- I.l
InfroducfIon-----------------------------------------------------------------------
I.2 SImIo nfn
IIndIng-----------------------------------------------------------
I.3 MovIng n
!ocordSof-------------------------------------------------------------
I.4 IIndIng fo nn
Img---------------------------------------------------------------
I.5 IIndIng fo n
TnbIo---------------------------------------------------------------
I.6 Advnncod SorfIng nnd
IIIforIng--------------------------------------------- I.? nfn
IIndIng
IIomonfs--------------------------------------------------------
l.? CnscndIng SfyIo
Shoofs--------------------------------------------------------- I.l
InfroducfIon-----------------------------------------------------------------------
I.2 InIIno
SfyIos-----------------------------------------------------------------------
I.3 Imboddod SfyIo
Shoofs-------------------------------------------------------- I.4
ConfIIcfIng
SfyIos----------------------------------------------------------------
I.5 !InkIng IxfornnI SfyIo
Shoofs----------------------------------------------- I.6
IosIfIonIng
IIomonfs-----------------------------------------------------------
I.?
Inckgrounds----------------------------------------------------------------------
I.8 IIomonf
ImonsIons-----------------------------------------------------------
I.9 Toxf IIow nnd Tho Iox
ModoI----------------------------------------------- I.l0 !sor
SfyIo
Shoofs----------------------------------------------------------------
l.8
JnvnscrIf--------------------------------------------------------------------------
l.8.l
InfroducfIon------------------------------------------------------------------------
C.l SImIo Irogrnm: IrInfIng A !Ino Of Toxf In A Wob Ingo----------
C.2 Anofhor JnvnscrIf Irogrnm: AddIng
Infogors------------------------- C.3 Momory
Concofs----------------------------------------------------------------
C.4
ArIfhmofIc--------------------------------------------------------------------------
C.5 ocIsIon MnkIng: IqunIIfy And !oInfIonnI
Oornfors---------------- l.l43 l.l43 l.l43 l.l46 l.l49 l.l50 l.l52
l.l56 l.l5? l.l5? l.l5? l.l58 l.l60 l.l62 l.l64 l.l66 l.l68 l.l69
l.l?3 l.l?4 l.l?4 l.l?4 l.l?8 l.l8l l.l8l l.l83 l.8.2 ConfroI
Sfrucfuros--------------------------------------------------------------
H.l
InfroducfIon-----------------------------------------------------------------------
H.2
AIgorIfhms-------------------------------------------------------------------------
H.3
Isoudocodo------------------------------------------------------------------------
H.4 ConfroI
Sfrucfuros--------------------------------------------------------------
H.5 II SoIocfIon
Sfrucfuro---------------------------------------------------------
H.6 II/I!SI SoIocfIon
Sfrucfuro------------------------------------------------ H.? WhIIo
!oofIfIon
Sfrucfuro-------------------------------------------------- H.8
Counfor ConfroIIod
!oofIfIon---------------------------------------------- H.9
SonfInoI ConfroIIod
!oofIfIon---------------------------------------------- H.l0
AssIgnmonf
Oornfors---------------------------------------------------------
H.ll Incromonf nnd ocromonf
Oornfors------------------------------------- H.l2 ofo on nfn
Tyos-------------------------------------------------------------
H.l3 IssonfInIs of Counfor-ConfroIIod
!oofIfIon--------------------------- H.l4 Ior !oofIfIon
Sfrucfuro------------------------------------------------------
H.l5 SwIfch MuIfIIo SoIocfIon
Sfrucfuro-------------------------------------- H.l6 O/WHI!I
!oofIfIon Sfrucfuro------------------------------------------ H.l?
Ironk nnd ConfInuo
Sfnfomonfs------------------------------------------- H.l8 !nboIod
Ironk nnd ConfInuo Sfnfomonfs------------------------------- H.l9
!ogIcnI
Oornfors---------------------------------------------------------------
l.8.3
IuncfIons--------------------------------------------------------------------------
I.l
InfroducfIon-----------------------------------------------------------------------
I.2 Irogrnm ModuIos In
JnvnScrIf-------------------------------------------- I.3
Irogrnmmor ofInod
IuncfIons--------------------------------------------- I.4 IuncfIon
ofInIfIons------------------------------------------------------------
I.5 !nndom umbor
ConornfIon------------------------------------------------ I.6
urnfIon of
IdonfIfIors---------------------------------------------------------
l.l86 l.l86 l.l86 l.l86 l.l8? l.l88 l.l89 l.l92 l.l92 l.l94 l.l96
l.l9? l.l98 l.l99 l.200 l.204 l.206 l.20? l.208 l.2l0 l.2l2 l.2l2
l.2l2 l.2l2 l.2l3 l.2l6 l.2l? I.? Scoo
!uIos------------------------------------------------------------------------
I.8 JnvnscrIf CIobnI
IuncfIons------------------------------------------------- I.9
!ocursIon---------------------------------------------------------------------------
I.l0 IxnmIo usIng !ocursIon : IIbonnccI
SorIos---------------------------- I.ll !ocursIon vs
IfornfIon----------------------------------------------------------
l.8.5
Arrnys-------------------------------------------------------------------------------
J.l
InfroducfIon-----------------------------------------------------------------------
J.2
Arrnys-------------------------------------------------------------------------------
J.3 ocInrIng nnd AIIocnfIng
Arrnys------------------------------------------- J.4 !oforoncos
nnd !oforonco Inrnmofors----------------------------------- J.5
InssIng Arrnys fo
IuncfIons------------------------------------------------- J.6
SorfIng
Arrnys-------------------------------------------------------------------
J.? SonrchIng Arrnys : !Inonr Sonrch & IInnry
Sonrch------------------ J.8 MuIfIIo SubscrIfod
Arrnys------------------------------------------------- l.8.5
Objocfs-------------------------------------------------------------------------------
K.l
InfroducfIon------------------------------------------------------------------------
K.2 Mnfh
Objocf------------------------------------------------------------------------
K.3 SfrIng
Objocf-----------------------------------------------------------------------
K.3.l IundnmonfnIs Of Chnrncfors And
SfrIngs------------------------------- K.3.2 Mofhods Of Tho SfrIng
Objocf----------------------------------------------- K.3.3
Chnrncfor IrocossIng
Mofhods----------------------------------------------- K.3.4
SonrchIng
Mofhods--------------------------------------------------------------
K.3.5 SIIffIng SfrIngs nnd ObfnInIng
SubsfrIngs----------------------------- K.3.6 HTM! Mnrku
Mofhods-------------------------------------------------------
l.2l? l.2l9 l.220 l.22l l.223 l.224 l.224 l.224 l.225 l.22? l.22?
l.229 l.230 l.234 l.236 l.236 l.236 l.23? l.23? l.238 l.240 l.240
l.24l l.243 K.4 ATI
Objocf-----------------------------------------------------------------------
K.5 IooIonn And umbor
Objocfs------------------------------------------------- l.9
VIScrIf------------------------------------------------------------------------------
!.l
InfroducfIon-------------------------------------------------------------------------
!.2
Oornfors----------------------------------------------------------------------------
!.3 nfn Tyos nnd ConfroI
Sfrucfuros----------------------------------------- !.4 VIScrIf
IuncfIons---------------------------------------------------------------
!.5 VIScrIf IxnmIo
Irogrnms-------------------------------------------------- !.6
Arrnys---------------------------------------------------------------------------------
!.? SfrIng
MnnIuInfIon--------------------------------------------------------------
!.8 CInssos &
Objocfs-----------------------------------------------------------------
!.9 Oornfor
Irocodonco-------------------------------------------------------------
UnIt 2 Common Gutewuy IntevIuce 2.l Common Cnfowny Inforfnco
(CCI)------------------------------------------ A.l SomofhIngs fo
!omombor nbouf CCI------------------------------------- A.2 !so of
CCI
ScrIfs---------------------------------------------------------------
A.3 Why uso CCI`
--------------------------------------------------------------------
A.4 Why nof !so CCI`
-------------------------------------------------------------- 2.2
IrogrnmmIng CCI
ScrIfs---------------------------------------------------- I.l CCI
& WorId WIdo
Wob------------------------------------------------------- I.2
Ioyond XHTM! WIfh
CCI---------------------------------------------------- I.3 How CCI
Works`
----------------------------------------------------------------
I.4 Whoro CCI ScrIfs !Ivo`
----------------------------------------------------- l.244 l.246
l.24? l.24? l.24? l.248 l.25l l.253 l.25? l.259 l.262 l.265 2.l 2.l
2.2 2.2 2.3 2.3 2.3 2.4 2.5 2.9 I.5 CCI Sorvor
!oquIromonfs----------------------------------------------------
I.6 CCI ScrIf
Sfrucfuro-----------------------------------------------------------
I.? IInnnIng Your
ScrIf-----------------------------------------------------------
I.8 Sfnndnrd CCI InvIronmonf
VnrInbIos----------------------------------- I.9 CCI ScrIf
IorfnbIIIfy----------------------------------------------------------
I.l0 Tho Iufuro of CCI
ScrIfIng------------------------------------------------- 2.3 HTM!
Iorms---------------------------------------------------------------------
C.l Iorms nnd
CCI-------------------------------------------------------------------
C.2 CronfIng
Iorms------------------------------------------------------------------
C.3 !nboIIng Inuf
IIoIds----------------------------------------------------------
C.4 CrouIng !oInfod
IIoIds------------------------------------------------------ C.5
IsnbIod nnd !ond OnIy
IIoIds--------------------------------------------- C.6 Iorm IIoId
Ivonf HnndIors--------------------------------------------------
C.? InssIng Irom
nfn-------------------------------------------------------------
2.4 Cusfom nfnbnso Quory
ScrIfs-------------------------------------------- .l !ndorsfnndIng
nfnbnso osIgn-------------------------------------------- .2 Why
Accoss nfnbnso`
--------------------------------------------------------- .3
nfnbnso Accoss
!ImIfnfIons------------------------------------------------- .4
CronfIng nnd !sIng IInf IIIo
nfnbnsos---------------------------------- .5 IM
nfnbnsos------------------------------------------------------------------
.6 !oInfIonnI
nfnbnsos-----------------------------------------------------------
.? obuggIng nfnbnso
AIIcnfIons------------------------------------------ 2.5 Sorvor
SIdo
IncIudos-------------------------------------------------------------
I.l SSI
SocIfIcnfIon------------------------------------------------------------------
I.2 ConfIgurIng
SSI--------------------------------------------------------------------
I.3 !sIng SSI In
XHTM!------------------------------------------------------------
I.4 Common SSI
Commnnds------------------------------------------------------- 2.9
2.ll 2.l4 2.l5 2.l6 2.l9 2.2l 2.2l 2.22 2.36 2.3? 2.39 2.40 2.4l
2.42 2.42 2.43 2.43 2.44 2.46 2.49 2.52 2.53 2.53 2.54 2.55 2.56
2.6 Sorvor SIdo SocurIfy
Issuos----------------------------------------------------- I.l
ScrIf vorsus
Irogrnms----------------------------------------------------------
I.2 CCI SocurIfy Issuos: !ocognIzIng IrobIoms & IIndIng
SoIufIons- I.3 InsIdo Affncks: IrocnufIons WIfh !ocnI
!sors--------------------------- 2.?
XM!------------------------------------------------------------------------------------
I.l Whnf Is XM!`
----------------------------------------------------------------------
I.2 Ifforonco bofwoon XM! &
HTM!------------------------------------------- I.3 How cnn XM!
Ioon !sod` -----------------------------------------------------
I.4 XM!
Troo-----------------------------------------------------------------------------
I.5 XM! Synfnx
!uIos-----------------------------------------------------------------
I.6 XM!
IIomonfs----------------------------------------------------------------------
I.? XM!
AffrIbufos---------------------------------------------------------------------
UnIt 3 Juvu PvogvummIng 3.l Tho ConosIs of
Jnvn-------------------------------------------------------------
A.l Tho CronfIon of
Jnvn----------------------------------------------------------- A.2
Why Jnvn Is Imorfnnf fo fho
Infornof----------------------------------- A.3 Jnvn`s MngIc: Tho
Iyfocodo-------------------------------------------------- A.4 Tho
Jnvn
Iuzzwords------------------------------------------------------------
3.2 An OvorvIow of
Jnvn------------------------------------------------------------
I.l Objocf-OrIonfod
IrogrnmmIng---------------------------------------------- I.2 A
IIrsf SImIo
Irogrnm------------------------------------------------------- I.3
A Socond Shorf
Irogrnm------------------------------------------------------ I.4
Two ConfroI
Sfnfomonfs-------------------------------------------------------
I.5 !sIng IIocks of
Codo----------------------------------------------------------- I.6
!oxIcnI
Issuos---------------------------------------------------------------------
I.? Tho Jnvn CInss
!IbrnrIos------------------------------------------------------
2.59 2.59 2.60 2.?3 2.?6 2.?6 2.?6 2.?? 2.?9 2.82 2.86 2.88 3.l 3.l
3.l 3.3 3.4 3.6 3.6 3.l0 3.l3 3.l4 3.l? 3.l9 3.2l 3.3 nfn Tyos,
VnrInbIos, nnd Arrnys----------------------------------------- C.l
Jnvn Is n SfrongIy Tyod
!nngungo---------------------------------------- C.2 Tho SImIo
Tyos----------------------------------------------------------------
C.3
Infogors-----------------------------------------------------------------------------
C.4 IIonfIng-IoInf
Tyos----------------------------------------------------------- C.5
Chnrncfors--------------------------------------------------------------------------
C.6
IooIonns-----------------------------------------------------------------------------
C.?
VnrInbIos---------------------------------------------------------------------------
C.8 Tyo ConvorsIon nnd
CnsfIng----------------------------------------------- C.9
Arrnys-------------------------------------------------------------------------------
3.4
Oornfors---------------------------------------------------------------------------
.l ArIfhmofIc
Oornfors-----------------------------------------------------------
.2 Tho IIfwIso
Oornfors----------------------------------------------------------
.3 !oInfIonnI
Oornfors------------------------------------------------------------
.4 IooIonn !ogIcnI
Oornfors---------------------------------------------------- .5 Tho
AssIgnmonf
Oornfor----------------------------------------------------- .6 Tho
`
Oornfor--------------------------------------------------------------------
.? Oornfor
Irocodonco------------------------------------------------------------
3.5 ConfroI
Sfnfomonfs--------------------------------------------------------------
I.l Jnvn`s SoIocfIon
Sfnfomonfs--------------------------------------------------I.2
IfornfIon
Sfnfomonfs------------------------------------------------------------
I.3 Jum
Sfnfomonfs-----------------------------------------------------------------
3.6 InfroducIng
CInssos-------------------------------------------------------------
I.l CInss
IundnmonfnIs-------------------------------------------------------------
I.2 ocInrIng
Objocfs-----------------------------------------------------------------
3.2l 3.2l 3.22 3.22 3.23 3.24 3.25 3.26 3.29 3.30 3.34 3.34 3.39
3.42 3.43 3.44 3.44 3.45 3.46 3.46 3.49 3.53 3.55 3.55 3.5? I.3
AssIgnIng Objocf !oforonco
VnrInbIos-------------------------------------I.4 InfroducIng
Mofhods------------------------------------------------------------
I.5
Consfrucfors-----------------------------------------------------------------------
I.6 Tho fhIs
Koyword-----------------------------------------------------------------
I.? Cnrbngo
CoIIocfIon---------------------------------------------------------------
I.8 Tho fInnIIzo( )
Mofhod-----------------------------------------------------------
I.9 A Sfnck
CInss----------------------------------------------------------------------
I.l0 OvorIondIng
Mofhods------------------------------------------------------------
I.ll !sIng Objocfs ns
Inrnmofors------------------------------------------------- I.l2
Argumonf
InssIng----------------------------------------------------------------
I.l3 !ofurnIng
Objocfs----------------------------------------------------------------
I.l4
!ocursIon----------------------------------------------------------------------------
I.l5 Accoss
ConfroI---------------------------------------------------------------------
I.l6
sfnfIc---------------------------------------------------------------------------------
I.l?
IInnI---------------------------------------------------------------------------------
I.l8 osfod nnd Innor
CInssos----------------------------------------------------- I.l9
Tho SfrIng
CInss-----------------------------------------------------------------
I.20 Commnnd-!Ino
Argumonfs--------------------------------------------------- 3.?
InhorIfnnco-------------------------------------------------------------------------
C.l InhorIfnnco
InsIcs---------------------------------------------------------------
C.2 !sIng
Suor------------------------------------------------------------------------
C.3 MuIfIIovoI
HIornrchy------------------------------------------------------------
C.4 Whon Consfrucfors Aro
CnIIod----------------------------------------------- C.5 Mofhod
OvorrIdIng---------------------------------------------------------------
C.6 ynnmIc Mofhod
Isnfch---------------------------------------------------- C.?
!sIng Absfrncf
CInssos---------------------------------------------------------
C.8 !sIng fInnI wIfh
InhorIfnnco-------------------------------------------------- C.9
Tho Objocf
CInss------------------------------------------------------------------
3.5? 3.58 3.62 3.64 3.65 3.66 3.66 3.69 3.?l 3.?2 3.?4 3.?5 3.?6
3.?? 3.?9 3.?9 3.8l 3.83 3.84 3.84 3.88 3.92 3.95 3.96 3.9? 3.l0l
3.l03 3.l04 3.8 Inckngos nnd
Inforfncos-------------------------------------------------------
H.l
Inckngos---------------------------------------------------------------------------
H.2 Accoss
IrofocfIon----------------------------------------------------------------
H.3 ImorfIng
Inckngos------------------------------------------------------------
H.4
Inforfncos--------------------------------------------------------------------------
3.9 IxcofIon
HnndIIng-------------------------------------------------------------
I.l IxcofIon-HnndIIng
IundnmonfnIs---------------------------------------- I.2 IxcofIon
Tyos-------------------------------------------------------------------
I.3 !ncnughf
IxcofIons------------------------------------------------------------
I.4 !sIng fry nnd
cnfch--------------------------------------------------------------
I.5 MuIfIIo cnfch
CInusos----------------------------------------------------------
I.6 osfod fry
Sfnfomonfs-----------------------------------------------------------
I.?
fhrow----------------------------------------------------------------------------------
I.8
fhrows---------------------------------------------------------------------------------
I.9
fInnIIy---------------------------------------------------------------------------------
I.l0 Jnvn`s IuIIf-In
IxcofIons------------------------------------------------------
I.ll CronfIng Your Own IxcofIon
SubcInssos--------------------------------- I.l2 ChnInod
IxcofIons---------------------------------------------------------------
3.l0 MuIfIfhrondod
IrogrnmmIng-------------------------------------------------- J.l
Tho Jnvn Thrond
ModoI--------------------------------------------------------- J.2
Tho MnIn
Thrond-----------------------------------------------------------------
J.3 CronfIng n
Thrond----------------------------------------------------------------
J.4 CronfIng MuIfIIo
Thronds----------------------------------------------------- J.5
!sIng IsAIIvo( ) nnd joIn(
)----------------------------------------------------- J.6 Thrond
IrIorIfIos------------------------------------------------------------------
J.?
SynchronIznfIon------------------------------------------------------------------
J.8 Inforfhrond
CommunIcnfIon-------------------------------------------------- J.9
SusondIng, !osumIng, nnd SfoIng Thronds-------------------------
J.l0 !sIng
MuIfIfhrondIng-----------------------------------------------------------
3.l05 3.l06 3.l08 3.lll 3.ll2 3.l20 3.l20 3.l2l 3.l2l 3.l22 3.l24
3.l26 3.l2? 3.l28 3.l29 3.l30 3.l3l 3.l33 3.l35 3.l35 3.l38 3.l40
3.l44 3.l45 3.l48 3.l50 3.l54 3.l59 3.l6l 3.ll I/O
InsIcs--------------------------------------------------------------------------
K.l
Sfronms-----------------------------------------------------------------------------
K.2 !ondIng ConsoIo
Inuf--------------------------------------------------------- K.3
WrIfIng ConsoIo
Oufuf------------------------------------------------------- K.4
Tho IrInfWrIfor
CInss--------------------------------------------------------- K.5
!ondIng nnd WrIfIng
IIIos---------------------------------------------------- 3.l2 Tho
AIof--------------------------------------------------------------------------
!.l AIof
InsIcs----------------------------------------------------------------------
!.2 AIof
ArchIfocfuro-------------------------------------------------------------
!.3 An AIof
SkoIofon--------------------------------------------------------------
!.4 SImIo AIof IsIny
Mofhods--------------------------------------------- !.5 !oquosfIng
!onInfIng---------------------------------------------------------
!.6 Tho HTM! AII!IT
Tng------------------------------------------------------!.? Tho
AudIoCII
Inforfnco-------------------------------------------------------
!.8 Tho AIofSfub
Inforfnco----------------------------------------------------- !.9
OufuffIng fo fho
ConsoIo---------------------------------------------------- !.l0
AIof
Irogrnms-----------------------------------------------------------------
3.l6l 3.l6l 3.l64 3.l66 3.l66 3.l6? 3.l?l 3.l?l 3.l?4 3.l?4 3.l??
3.l?9 3.l80 3.l82 3.l82 3.l83 3.l83 UNIT 1: IUNAMNTAIS WB TCHNOIOGY
TLunguveI Muvugun l.l
UNIT I IUNAMNTAIS 1.1 BASIC NTWORK CONCPTS 1.1.1 NTWORKS A
nofwork Is n coIIocfIon of comufors nnd ofhor dovIcos fhnf cnn sond
dnfn fo nnd rocoIvo dnfn from onch ofhor, moro or Ioss In ronI
fImo. A nofwork Is offon connocfod by wIros, nnd fho bIfs of dnfn
nro furnod Info oIocfromngnofIc wnvos fhnf movo fhrough fho wIros.
Howovor, wIroIoss nofworks frnnsmIf dnfn fhrough Infrnrod IIghf nnd
mIcrownvos, nnd mnny Iong-dIsfnnco frnnsmIssIons nro now cnrrIod
ovor fIbor ofIc cnbIos fhnf sond vIsIbIo IIghf fhrough gInss
fIInmonfs. Node Inch mnchIno on n nofwork Is cnIIod n nodo. Mosf
nodos nro comufors, buf rInfors, roufors, brIdgos, gnfownys, dumb
formInnIs, nnd Cocn-CoIn mnchInos cnn nIso bo nodos. odos fhnf nro
fuIIy funcfIonnI comufors nro nIso cnIIod hosfs. Wo wIII uso fho
word nodo fo rofor fo nny dovIco on fho nofwork, nnd fho word hosf
fo rofor fo n nodo fhnf Is n gonornI-uroso comufor. Addvess Ivory
nofwork nodo hns nn nddross, n sorIos of byfos fhnf unIquoIy
IdonfIfy If. In gonornI fho numbor of byfos In nn nddross or fho
ordorIng of fhoso byfos (bIg ondInn or IIffIo ondInn) Is nof
gunrnnfood fo mnfch nny rImIfIvo numorIc dnfn fyo In Jnvn. Tho moro
byfos fhoro nro In onch nddross, fho moro nddrossos fhoro nro
nvnIInbIo nnd fho moro dovIcos fhnf cnn bo connocfod fo fho nofwork
sImuIfnnoousIy. UNIT 1: IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun
l.2
Addrossos nro nssIgnod dIfforonfIy on dIfforonf kInds of
nofworks. AIoTnIk nddrossos nro choson rnndomIy nf sfnrfu by onch
hosf. Tho hosf fhon chocks fo soo If nny ofhor mnchIno on fho
nofwork Is usIng fhnf nddross. If nnofhor mnchIno Is usIng fho
nddross, fho hosf rnndomIy choosos nnofhor, chocks fo soo If fhnf
nddross Is nIrondy In uso, nnd so on unfII If gofs ono fhnf Isn'f
boIng usod. Ifhornof nddrossos nro nffnchod fo fho hysIcnI Ifhornof
hnrdwnro. Inch mnnufncfuror Is rosonsIbIo for mnkIng suro If
doosn'f shI fwo Ifhornof cnrds wIfh fho snmo nddross. Intevnet
SevvIce PvovIdev (ISP) Tho nddrossos fhnf nn orgnnIznfIon Is
nIIowod fo chooso for Ifs comufors nro nssIgnod by fho
orgnnIznfIon's Infornof SorvIco IrovIdor (ISI). ISIs gof fhoIr II
nddrossos from ono of four rogIonnI Infornof !ogIsfrIos, whIch nro
In furn nssIgnod II nddrossos by fho Infornof CorornfIon for
AssIgnod nmos nnd umbors (ICA, nf hff://www.Icnnn.org/).
Pucket-SwItcLed netwovks AII modorn comufor nofworks nro
nckof-swIfchod nofworks: dnfn frnvoIIng on fho nofwork Is brokon
Info chunks cnIIod nckofs nnd onch nckof Is hnndIod sonrnfoIy. Inch
nckof confnIns InformnfIon nbouf who sonf If nnd whoro If's goIng.
Tho mosf Imorfnnf ndvnnfngo of bronkIng dnfn Info IndIvIdunIIy
nddrossod nckofs Is fhnf nckofs from mnny ongoIng oxchnngos cnn
frnvoI on ono wIro, whIch mnkos If much chonor fo buIId n nofwork:
mnny comufors cnn shnro fho snmo wIro wIfhouf InforforIng. Anofhor
ndvnnfngo of nckofs Is fhnf chocksums cnn bo usod fo dofocf whofhor
n nckof wns dnmngod In frnnsIf. UNIT 1: IUNAMNTAIS WB TCHNOIOGY
TLunguveI Muvugun l.3
PvotocoI A rofocoI Is n rocIso sof of ruIos dofInIng how
comufors communIcnfo: fho formnf of nddrossos, how dnfn Is sIIf
Info nckofs, nnd so on. Thoro nro mnny dIfforonf rofocoIs dofInIng
dIfforonf nsocfs of nofwork communIcnfIon. Ior oxnmIo, fho Hyorfoxf
Trnnsfor IrofocoI (HTTI) dofInos how wob browsors nnd sorvors
communIcnfo; nf fho ofhor ond of fho socfrum, fho IIII 802.3
sfnndnrd dofInos n rofocoI for how bIfs nro oncodod ns oIocfrIcnI
sIgnnIs on n nrfIcuInr fyo of wIro (nmong ofhor rofocoIs). 1.1.2 TH
IAYRS OI A NTWORK WLy It Is needed? SondIng dnfn ncross n nofwork
Is n comIox oornfIon fhnf musf bo cnrofuIIy funod fo fho hysIcnI
chnrncforIsfIcs of fho nofwork ns woII ns fho IogIcnI chnrncfor of
fho dnfn boIng sonf. Soffwnro fhnf sonds dnfn ncross n nofwork musf
undorsfnnd how fo nvoId coIIIsIons bofwoon nckofs, convorf dIgIfnI
dnfn fo nnnIog sIgnnIs, dofocf nnd corrocf orrors, roufo nckofs
from ono hosf fo nnofhor, nnd moro. Tho rocoss bocomos ovon moro
comIIcnfod whon fho roquIromonf fo suorf muIfIIo oornfIng sysfoms
nnd hoforogonoous nofwork cnbIIng Is nddod. To mnko fhIs comIoxIfy
mnnngonbIo nnd hIdo mosf of If from fho nIIcnfIon dovoIoor nnd ond
usor, fho dIfforonf nsocfs of nofwork communIcnfIon nro sonrnfod
Info muIfIIo Inyors. Inch Inyor rorosonfs n dIfforonf IovoI of
nbsfrncfIon bofwoon fho hysIcnI hnrdwnro (o.g., fho wIros nnd
oIocfrIcIfy) nnd fho InformnfIon boIng frnnsmIffod. Inch Inyor hns
n sfrIcfIy IImIfod funcfIon. UNIT 1: IUNAMNTAIS WB TCHNOIOGY
TLunguveI Muvugun l.4
Thoro nro sovornI dIfforonf Inyor modoIs, onch orgnnIzod fo fIf
fho noods of n nrfIcuInr kInd of nofwork. Tho sfnndnrd TCI/II
four-Inyor modoI nrorInfo for fho Infornof, In fhIs modoI,
nIIcnfIons IIko Infornof IxIoror nnd Iudorn run In fho upplicution
luyer nnd fnIk onIy fo fho frnnsorf Inyor. Tho trunoport luyer
fnIks onIy fo fho nIIcnfIon Inyor nnd fho Infornof Inyor. Tho
internet luyer In furn fnIks onIy fo fho hosf-fo-nofwork Inyor nnd
fho frnnsorf Inyor, novor dIrocfIy fo fho nIIcnfIon Inyor. Tho
hoot-to-netuork luyer movos fho dnfn ncross fho wIros, fIbor ofIc
cnbIos, or ofhor modIum fo fho hosf-fo-nofwork Inyor on fho romofo
sysfom, whIch fhon movos fho dnfn u fho Inyors fo fho nIIcnfIon on
fho romofo sysfom. The luyero of u netuork Sendev SIde Whon n wob
browsor sonds n roquosf fo n wob sorvor fo rofrIovo n ngo, fho
browsor Is ncfunIIy onIy fnIkIng fo fho frnnsorf Inyor on fho IocnI
cIIonf mnchIno. Tho trunoport luyer bronks fho roquosf u Info TCI
sogmonfs, ndds somo soquonco numbors nnd chocksums fo fho dnfn, nnd
fhon nssos fho roquosf fo fho IocnI Infornof Inyor. UNIT 1:
IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.5
Tho internet luyer frngmonfs fho sogmonfs Info II dnfngrnms of
fho nocossnry sIzo for fho IocnI nofwork nnd nssos fhom fo fho
hosf-fo-nofwork Inyor for frnnsmIssIon onfo fho wIro. Tho
hoot-to-netuork luyer oncodos fho dIgIfnI dnfn ns nnnIog sIgnnIs
nrorInfo for fho nrfIcuInr hysIcnI modIum nnd sonds fho roquosf ouf
fho wIro whoro If wIII bo rond by fho hosf-fo-nofwork Inyor of fho
romofo sysfom fo whIch If's nddrossod. ReceIvev SIde Tho
hoot-to-netuork luyer on fho romofo sysfom docodos fho nnnIog
sIgnnIs Info dIgIfnI dnfn fhon nssos fho rosuIfIng II dnfngrnms fo
fho sorvor's Infornof Inyor. Tho internet luyer doos somo sImIo
chocks fo soo fhnf fho II dnfngrnms nron'f corruf, ronssombIos fhom
If fhoy'vo boon frngmonfod, nnd nssos fhom fo fho sorvor's frnnsorf
Inyor. Tho sorvor's trunoport luyer chocks fo soo fhnf nII fho dnfn
nrrIvod nnd roquosfs rofrnnsmIssIon of nny mIssIng or corruf Iocos.
Onco fho sorvor's frnnsorf Inyor hns rocoIvod onough confIguous,
soquonfInI dnfngrnms, If ronssombIos fhom nnd wrIfos fhom onfo n
sfronm rond by fho wob sorvor runnIng In fho sorvor upplicution
luyer. Tho oerter rosonds fo fho roquosf nnd sonds Ifs rosonso bnck
down fhrough fho Inyors on fho sorvor sysfom for frnnsmIssIon bnck
ncross fho Infornof nnd doIIvory fo fho wob cIIonf. TLe
Host-to-Netwovk Iuyev In fho sfnndnrd roforonco modoI for II-bnsod
Infornofs, fho hIddon nrfs of fho nofwork boIong fo fho
hosf-fo-nofwork Inyor. Tho Hosf-fo-nofwork Inyors nIso known ns the
link luyer, Jutu link luyer, or netuork interfuce luyer. UNIT 1:
IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.6
Tho hosf-fo-nofwork Inyor dofInos how n nrfIcuInr nofwork
Inforfncosuch ns nn Ifhornof cnrd or n III connocfIonsonds II
dnfngrnms ovor Ifs hysIcnI connocfIon fo fho IocnI nofwork nnd fho
worId. Tho nrf of fho hosf-fo-nofwork Inyor mndo u of fho hnrdwnro
fhnf connocfs dIfforonf comufors (wIros, fIbor ofIc cnbIos,
mIcrownvo roInys, or smoko sIgnnIs) Is somofImos cnIIod fho
phyoicul luyer of fho nofwork. Computevs to communIcute wItL eucL
otLev Ior computero to communicute uith euch other, If Isn'f
suffIcIonf fo run wIros bofwoon fhom nnd sond oIocfrIcnI sIgnnIs
bnck nnd forfh. Tho comufors hnvo fo ngroo on corfnIn sfnndnrds for
how fhoso sIgnnIs nro Inforrofod. Tho fIrsf sfo Is fo doformIno how
fho nckofs of oIocfrIcIfy or IIghf or smoko mn Info bIfs nnd byfos
of dnfn. SInco fho hysIcnI Inyor Is nnnIog, nnd bIfs nnd byfos nro
dIgIfnI, fhIs rocoss InvoIvos n dIgIfnI-fo-nnnIog convorsIon on fho
sondIng ond nnd nn nnnIog-fo-dIgIfnI convorsIon on fho rocoIvIng
ond. SInco nII ronI nnnIog sysfoms hnvo noIso, orror corrocfIon nnd
rodundnncy nood fo bo buIIf Info fho wny dnfn Is frnnsInfod Info
oIocfrIcIfy. ThIs Is dono In fho dnfn IInk Inyor. Tho mosf common
dnfn IInk Inyor Is Ifhornof. Ofhor ouInr dnfn IInk Inyors IncIudo
Tokon!Ing, III, nnd WIroIoss Ifhornof (802.ll). A socIfIc dnfn IInk
Inyor roquIros socInIIzod hnrdwnro. SocInI dovIcos cnIIod guteuuyo
convorf InformnfIon from ono fyo of dnfn IInk Inyor, such ns
Ifhornof, fo nnofhor, such ns Tokon!Ing. TLe Intevnet Iuyev Tho
noxf Inyor of fho nofwork, nnd fho fIrsf fhnf you nood fo concorn
yoursoIf wIfh, Is fho Infornof Inyor. In fho OSI modoI, fho
Infornof Inyor goos by fho moro gonorIc nnmo nofwork Inyor. UNIT 1:
IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.?
A nofwork Inyor rofocoI dofInos how bIfs nnd byfos of dnfn nro
orgnnIzod Info fho Inrgor grous cnIIod nckofs, nnd fho nddrossIng
schomo by whIch dIfforonf mnchInos fInd onch ofhor. Tho Infornof
IrofocoI (II) Is fho mosf wIdoIy usod nofwork Inyor rofocoI In fho
worId nnd fho onIy nofwork Inyor rofocoI. Inch nofwork Inyor
rofocoI Is Indoondonf of fho Iowor Inyors. II, IIX, ofII!I, nnd
ofhor rofocoIs cnn onch bo usod on Ifhornof, Tokon !Ing, nnd ofhor
dnfn IInk Inyor rofocoI nofworks, onch of whIch cnn fhomsoIvos run
ncross dIfforonf kInds of hysIcnI Inyors. nfn Is sonf ncross fho
Infornof Inyor In nckofs cnIIod dnfngrnms. Inch II dnfngrnm
confnIns n hondor bofwoon 20 nnd 60 byfos Iong nnd n nyIond fhnf
confnIns u fo 65,5l5 byfos of dnfn. Tho hondor of onch II dnfngrnm
confnIns fhoso Ifoms, In fhIs ordor: 4-bit teroion number AIwnys
0l00 (docImnI 4) for curronf II; wIII bo chnngod fo 0ll0 (docImnI
6) for IIv6, buf fho onfIro hondor formnf wIII nIso chnngo In IIv6.
4-bit heuJer length An unsIgnod Infogor bofwoon 0 nnd l5 socIfyIng
fho numbor of 4-byfo words In fho hondor; sInco fho mnxImum vnIuo
of fho hondor Iongfh fIoId Is llll (docImnI l5), nn II hondor cnn
bo nf mosf 60 byfos Iong. 1-byte type of oertice A 3-bIf rocodonco
fIoId fhnf Is no Iongor usod, four fyo-of-sorvIco bIfs (mInImIzo
doIny, mnxImIzo fhroughuf, mnxImIzo roIInbIIIfy, mInImIzo monofnry
cosf) nnd n zoro bIf. of nII sorvIco fyos nro comnfIbIo. Mnny
comufors nnd roufors sImIy Ignoro fhoso bIfs. UNIT 1: IUNAMNTAIS WB
TCHNOIOGY TLunguveI Muvugun l.8
2-byte Jutugrum length An unsIgnod Infogor socIfyIng fho Iongfh
of fho onfIro dnfngrnm, IncIudIng bofh hondor nnd nyIond. 2-byte
iJentificution number A unIquo IdonfIfIor for onch dnfngrnm sonf by
n hosf; nIIows duIIcnfo dnfngrnms fo bo dofocfod nnd fhrown nwny.
3-bit flugo Tho fIrsf bIf Is 0; fho socond bIf Is 0 If fhIs
dnfngrnm mny bo frngmonfod, l If If mny nof bo; nnd fho fhIrd bIf
Is 0 If fhIs Is fho Insf frngmonf of fho dnfngrnm, l If fhoro nro
moro frngmonfs. 13-bit frugment offoet In fho ovonf fhnf fho
orIgInnI II dnfngrnm Is frngmonfod Info muIfIIo Iocos, fhIs fIoId
IdonfIfIos fho osIfIon of fhIs frngmonf In fho orIgInnI dnfngrnm.
1-byte time-to-lite (TTL) umbor of nodos fhrough whIch fho dnfngrnm
cnn nss boforo boIng dIscnrdod; usod fo nvoId InfInIfo Ioos. 1-byte
protocol 6 for TCI, l? for !I, or n dIfforonf numbor bofwoon 0 nnd
255 for onch of moro fhnn l00 dIfforonf rofocoIs (somo quIfo
obscuro); 2-byte heuJer checkoum A chocksum of fho hondor onIy (nof
fho onfIro dnfngrnm) cnIcuInfod usIng n l6-bIf ono's comIomonf sum.
UNIT 1: IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.9
4-byte oource uJJreoo Tho II nddross of fho sondIng nodo. 4-byte
Jeotinution uJJreoo Tho II nddross of fho dosfInnfIon nodo. An II
dnfngrnm hondor mny confnIn bofwoon 0 nnd 40 byfos of ofIonnI
InformnfIon, usod for socurIfy ofIons, roufIng rocords, fImosfnms,
nnd ofhor fonfuros Jnvn doos nof suorf. The otructure of un 1Pt4
Jutugrum TLe Tvunspovt Iuyev Tho frnnsorf Inyor Is rosonsIbIo for
onsurIng fhnf nckofs nro rocoIvod In fho ordor fhoy woro sonf nnd
mnkIng suro fhnf no dnfn Is Iosf or corrufod. If n nckof Is Iosf,
fho frnnsorf Inyor cnn nsk fho sondor fo rofrnnsmIf fho nckof. II
nofworks ImIomonf fhIs by nddIng nn nddIfIonnI hondor fo onch
dnfngrnm fhnf confnIns moro InformnfIon. UNIT 1: IUNAMNTAIS WB
TCHNOIOGY TLunguveI Muvugun l.l0
Thoro nro fwo rImnry rofocoIs nf fhIs IovoI. Tho fIrsf, fho
TrnnsmIssIon ConfroI IrofocoI (TCI), Is n hIgh-ovorhond rofocoI
fhnf nIIows for rofrnnsmIssIon of Iosf or corrufod dnfn nnd
doIIvory of byfos In fho ordor fhoy woro sonf. Tho socond rofocoI,
fho !sor nfngrnm IrofocoI (!I), nIIows fho rocoIvor fo dofocf
corrufod nckofs buf doos nof gunrnnfoo fhnf nckofs nro doIIvorod In
fho corrocf ordor (or nf nII). Howovor, !I Is offon much fnsfor
fhnn TCI. TCI Is cnIIod n reliuble protocol; !I Is nn unreliuble
protocol. TLe AppIIcutIon Iuyev Tho Inyor fhnf doIIvors dnfn fo fho
usor Is cnIIod fho nIIcnfIon Inyor. Tho fhroo Iowor Inyors nII work
fogofhor fo dofIno how dnfn Is frnnsforrod from ono comufor fo
nnofhor. Tho nIIcnfIon Inyor docIdos whnf fo do wIfh fho dnfn nffor
If's frnnsforrod. Tho nIIcnfIon Inyor Is whoro mosf of fho nofwork
nrfs of your rogrnms sond fhoIr fImo. Thoro Is nn onfIro nIhnbof
sou of nIIcnfIon Inyor rofocoIs; In nddIfIon fo HTTI for fho Wob,
fhoro nro SMTI, IOI, nnd IMAI for omnII; ITI, ISI, nnd TITI for
fIIo frnnsfor; IS for fIIo nccoss; TI for nows frnnsfor; CnufoIIn,
InsfTrnck, nnd Iroo nof for fIIo shnrIng; nnd mnny, mnny moro.
1.1.3 IP, TCP, und UP 1P, fho Infornof rofocoI, hns n numbor of
ndvnnfngos ovor comofIng rofocoIs such ns AIoTnIk nnd IIX. II wns
dosIgnod fo nIIow muIfIIo roufos bofwoon nny fwo oInfs nnd fo roufo
nckofs of dnfn nround dnmngod roufors. Tho II hnd fo bo oon nnd
Infform-Indoondonf. Thoro nro muIfIIo roufos bofwoon fwo oInfs, nnd
sInco fho quIckosf nfh bofwoon fwo oInfs mny chnngo ovor fImo ns n
funcfIon of nofwork frnffIc nnd ofhor fncfors, fho nckofs fhnf mnko
u n nrfIcuInr dnfn sfronm mny nof nII fnko fho snmo roufo. UNIT 1:
IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.ll
To Imrovo on fho bnsIc schomo, TCI wns Inyorod on fo of II fo
gIvo onch ond of n connocfIon fho nbIIIfy fo ncknowIodgo rocoIf of
II nckofs nnd roquosf rofrnnsmIssIon of Iosf or corrufod nckofs.
TCP cnrrIos n fnIr nmounf of ovorhond. Thoroforo, If fho ordor of
fho dnfn Isn'f nrfIcuInrIy Imorfnnf nnd If fho Ioss of IndIvIdunI
nckofs won'f comIofoIy corruf fho dnfn sfronm, nckofs nro somofImos
sonf wIfhouf fho gunrnnfoos fhnf TCI rovIdos. ThIs Is nccomIIshod
fhrough fho uso of fho !I rofocoI. UDP Is nn unroIInbIo rofocoI
fhnf doos nof gunrnnfoo fhnf nckofs wIII nrrIvo nf fhoIr
dosfInnfIon or fhnf fhoy wIII nrrIvo In fho snmo ordor fhoy woro
sonf. AIfhough fhIs wouId bo n robIom for usos such ns fIIo
frnnsfor, If Is orfocfIy nccofnbIo for nIIcnfIons whoro fho Ioss of
somo dnfn wouId go unnofIcod by fho ond usor. A numbor of ofhor
rofocoIs cnn run on fo of II. Tho mosf commonIy roquosfod Is ICMI,
fho Infornof ConfroI Mossngo IrofocoI, whIch usos rnw II dnfngrnms
fo roIny orror mossngos bofwoon hosfs. Tho onIy rofocoIs Jnvn
suorfs nro TCI nnd !I, nnd nIIcnfIon Inyor rofocoIs. IP Addvesses
und omuIn Numes Ivory comufor on nn 1Pt4 netuork Is IdonfIfIod by n
four-byfo numbor. ThIs Is normnIIy wrIffon In n doffod qund formnf
IIko l99.l.32.90, whoro onch of fho four numbors Is ono unsIgnod
byfo rnngIng In vnIuo from 0 fo 255. Ivory comufor nffnchod fo nn
IIv4 nofwork hns n unIquo four-byfo nddross. Whon Jutu io
trunomitteJ ncross fho nofwork, fho nckof's hondor IncIudos fho
nddross of fho mnchIno for whIch fho nckof Is Infondod (fho
dosfInnfIon nddross) nnd fho nddross of fho mnchIno fhnf sonf fho
nckof (fho sourco nddross). Routero nIong fho wny chooso fho bosf
roufo fo sond fho nckof nIong by InsocfIng fho dosfInnfIon nddross.
Tho sourco nddross Is IncIudod so fho rocIIonf wIII know who fo
roIy fo. UNIT 1: IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.l2
A sIow frnnsIfIon Is undor wny fo 1Pt6, whIch wIII uso l6-byfo
nddrossos. ThIs rovIdos onough II nddrossos fo IdonfIfy ovory
orson, ovory comufor, nnd Indood ovory nfom on fho Innof. IIv6
nddrossos nro cusfomnrIIy wrIffon In oIghf bIocks of four
hoxndocImnI dIgIfs sonrnfod by coIons, such ns IIC: IA98:?654:32l0:
IIC: IA98:?654:32l0. !ondIng zoros do nof nood fo bo wrIffon. A
doubIo coIon, nf mosf ono of whIch mny nonr In nny nddross,
IndIcnfos muIfIIo zoro bIocks. In mireJ netuorko of IIv6 nnd IIv4,
fho Insf four byfos of fho IIv6 nddross nro somofImos wrIffon ns nn
IIv4 doffod qund nddross. Tho Domuin ume Syotem (DS) wns dovoIood
fo frnnsInfo hosfnnmos fhnf humnns cnn romombor (IIko
www.oroIIIy.com) Info numorIc Infornof nddrossos (IIko
208.20l.239.3?). Whon Jnvn rogrnms nccoss fho nofwork, fhoy nood fo
rocoss bofh fhoso numorIc nddrossos nnd fhoIr corrosondIng
hosfnnmos. Somo comufors, osocInIIy sorvors, hnvo fIxod nddrossos.
Povts Modorn comufors do mnny dIfforonf fhIngs nf onco. ImnII noods
fo bo sonrnfod from ITI roquosfs, whIch nood fo bo sonrnfod from
wob frnffIc. ThIs Is nccomIIshod fhrough porto. Inch orf Is
IdonfIfIod by n numbor bofwoon l nnd 65,535. Inch orf cnn bo
nIIocnfod fo n nrfIcuInr sorvIco. HTTI usos Iorf 80. Whon Jutu io
oent fo n wob sorvor on n nrfIcuInr mnchIno nf n nrfIcuInr II
nddross, If Is nIso sonf fo n nrfIcuInr orf (usunIIy orf 80) on
fhnf mnchIno. Tho receiter chocks onch nckof If soos for fho orf
nnd sonds fho dnfn fo nny rogrnms fhnf nro IIsfonIng fo fho
socIfIod orf. Iorf numbors bofwoon l nnd l,023 nro rosorvod for
woII-known sorvIcos IIko fIngor, ITI, HTTI, nnd IMAI. UNIT 1:
IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.l3
WeII-known povt ussIgnments PvotocoI Povt PvotocoI Puvpose ocho
? TCI/!I Icho Is n fosf rofocoI usod fo vorIfy fhnf fwo mnchInos
nro nbIo fo connocf by hnvIng ono ocho bnck fho ofhor's Inuf.
dIscnrd 9 TCI/!I Iscnrd Is n Ioss usofuI fosf rofocoI In whIch nII
dnfn rocoIvod by fho sorvor Is Ignorod. dnyfImo l3 TCI/!I IrovIdos
nn ASCII rorosonfnfIon of fho curronf fImo on fho sorvor. ITI dnfn
20 TCI ITI usos fwo woII-known orfs. ThIs orf Is usod fo frnnsfor
fIIos. ITI 2l TCI ThIs orf Is usod fo sond ITI commnnds IIko uf nnd
gof. SSH 22 TCI !sod for oncryfod, romofo IogIns. foInof 23 TCI
!sod for InforncfIvo, romofo commnnd-IIno sossIons. smf 25 TCI Tho
SImIo MnII Trnnsfor IrofocoI Is usod fo sond omnII bofwoon
mnchInos. fImo 3? TCI/!I A fImo sorvor rofurns fho numbor of
soconds fhnf hnvo oInsod on fho sorvor sInco mIdnIghf, Jnnunry l,
l900, ns n four-byfo, sIgnod, bIg-ondInn Infogor. whoIs 43 TCI A
sImIo dIrocfory sorvIco for Infornof nofwork ndmInIsfrnfors. fIngor
?9 TCI A sorvIco fhnf rofurns InformnfIon nbouf n usor or usors on
fho IocnI sysfom. HTTI 80 TCI Tho undorIyIng rofocoI of fho WorId
WIdo Wob. IOI3 ll0 TCI Iosf OffIco IrofocoI VorsIon 3 Is n rofocoI
for fho frnnsfor of nccumuInfod omnII from fho hosf fo sorndIcnIIy
connocfod cIIonfs. TI ll9 TCI !sonof nows frnnsfor; moro formnIIy
known ns fho "ofwork ows Trnnsfor IrofocoI". IMAI l43 TCI Infornof
Mossngo Accoss IrofocoI Is n rofocoI for nccossIng mnIIboxos sforod
on n sorvor. !MI !ogIsfry l099 TCI Tho rogIsfry sorvIco for Jnvn
romofo objocfs. UNIT 1: IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun
l.l4
1.1.4 TH INTRNT Tho Infornof Is fho worId's Inrgosf II-bnsod
nofwork. Inch comufor on fho Infornof hns nf Ionsf ono unIquo II
nddross by whIch If cnn bo IdonfIfIod. Mosf of fhom nIso hnvo nf
Ionsf ono nnmo fhnf mns fo fhnf II nddross. Tho Infornof Is nof fho
onIy II-bnsod nofwork, buf If Is fho Inrgosf ono. Ofhor II nofworks
nro cnIIod Infornofs wIfh n IIffIo I: for oxnmIo, n corornfo II
nofwork fhnf Is nof connocfod fo fho Infornof. Infrnnof Is n
curronf buzzword fhnf IoosoIy doscrIbos corornfo rncfIcos of uffIng
Iofs of dnfn on InfornnI wob sorvors. If ovoryono Ickod fho
Infornof nddrossos fhoy wnnfod nf rnndom, confIIcfs wouId nrIso
nImosf ImmodInfoIy whon dIfforonf comufors showod u on fho Infornof
wIfh fho snmo nddross. Intevnet Addvess CIusses To nvoId fhIs
robIom, bIocks of IIv4 nddrossos nro nssIgnod fo Infornof SorvIco
IrovIdors (ISIs) by fhoIr rogIonnI Infornof rogIsfry. ISI gIvos
fhom n bIock of nddrossos. TrndIfIonnIIy, fhoso bIocks como In
fhroo sIzos cnIIod CInss A, CInss I, nnd CInss C. A Cluoo C nddross
bIock socIfIos fho fIrsf fhroo byfos of fho nddross; for oxnmIo,
l99.l.32. ThIs nIIows room for 254 IndIvIdunI nddrossos from
l99.l.32.l fo l99.l.32.254. A cluoo B nddross bIock onIy socIfIos
fho fIrsf fwo byfos of fho nddrossos nn orgnnIznfIon mny uso; for
Insfnnco, l6?.l. Thus, n cInss I nddross hns room for 65,024
dIfforonf hosfs (256 CInss C sIzo bIocks fImos 254 hosfs or CInss C
bIock). A cluoo A nddross bIock onIy socIfIos fho fIrsf byfo of fho
nddross rnngofor Insfnnco, l8nnd fhoroforo hns room for ovor l6
mIIIIon nodos. UNIT 1: IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun
l.l5
To moro offIcIonfIy nIIocnfo fho IImIfod nddross snco, CInssIoss
Infor-omnIn !oufIng (C1DR) wns Invonfod. CI! mosfIy (fhough nof
comIofoIy) roIncos fho whoIo A, I, C, , I nddrossIng schomo wIfh
ono bnsod on n socIfIod numbors of rofIx bIfs. Thoso rofIxos nro
gonornIIy wrIffon ns /nn, whoro nn Is n fwo-dIgIf numbor socIfyIng
fho numbor of bIfs In fho nofwork orfIon of fho nddross. Tho numbor
nffor fho / IndIcnfos fho numbor of fIxod rofIx bIfs. n /24 fIxos
fho fIrsf 24 bIfs In fho nddross, IonvIng 8 bIfs nvnIInbIo fo
dIsfInguIsh IndIvIdunI nodos. ThIs nIIows 256 nodos, nnd Is
oquIvnIonf fo nn oId sfyIo CInss C. A /l9 fIxos l9 bIfs, IonvIng l3
for IndIvIdunI nodos wIfhIn fho nofwork. If's oquIvnIonf fo 32
sonrnfo CInss C nofworks or nn oIghfh of n CInss I. A /28,
gonornIIy fho smnIIosf you'ro IIkoIy fo oncounfor In rncfIco,
Ionvos onIy four bIfs for IdonfIfyIng IocnI nodos. SovornI nddross
bIocks nnd nfforns nro socInI. AII IIv4 nddrossos fhnf bogIn wIfh
l0., l?2.l6. fhrough l?2.3l., nnd l92.l68. nro doIIbornfoIy
unnssIgnod. Thoy cnn bo usod on InfornnI nofworks, buf no hosf
usIng nddrossos In fhoso bIocks Is nIIowod onfo fho gIobnI
Infornof. Thoso non-routuble uJJreooeo nro usofuI for buIIdIng
rIvnfo nofworks fhnf cnn'f bo soon from fho rosf of fho Infornof or
for buIIdIng n Inrgo nofwork whon you'vo onIy boon nssIgnod n cInss
C nddross bIock. IIv4 nddrossos bogInnIng wIfh l2? (mosf commonIy
l2?.0.0.l) nIwnys monn fho locul loopbuck uJJreoo. Thnf Is, fhoso
nddrossos nIwnys oInf fo fho IocnI comufor, no mnffor whIch comufor
you'ro runnIng on. Tho hosfnnmo for fhIs nddross Is gonornIIy
loculhoot. Netwovk Addvess TvunsIutIon Ior ronsons of bofh socurIfy
nnd nddross snco consorvnfIon, mnny smnIIor nofworks, such ns fho
nufhor's homo nofwork, uso netuork uJJreoo trunolution (AT). UNIT
1: IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.l6
Tho router wnfchos my oufgoIng nnd IncomIng connocfIons nnd
ndjusfs fho nddrossos In fho II nckofs. Ior nn outgoing pucket, If
chnngos fho sourco nddross fo fho roufor's oxfornnI nddross
(2l6.254.85.?2 on my nofwork). Ior nn incoming pucket, If chnngos
fho dosfInnfIon nddross fo ono of fho IocnI nddrossos, such ns
l92.l68.254.l2. IIvewuIIs Tho hnrdwnro nnd soffwnro fhnf sIf
bofwoon fho Infornof nnd fho IocnI nofwork, chockIng nII fho dnfn
fhnf comos In or ouf fo mnko suro If's koshor, Is cnIIod n
fireuull. Tho fIrownII Is offon nrf of fho roufor fhnf connocfs fho
IocnI nofwork fo fho brondor Infornof nnd mny orform ofhor fnsks,
such ns nofwork nddross frnnsInfIon. Thon ngnIn, fho fIrownII mny
bo n sonrnfo mnchIno. Tho fIrownII Is reoponoible for InsocfIng
onch nckof fhnf nssos Info or ouf of Ifs nofwork Inforfnco nnd
nccofIng If or rojocfIng If nccordIng fo n sof of ruIos. IIIforIng
Is usunIIy bnsod on nofwork nddrossos nnd orfs. Tho oxncf
confIgurnfIon of n fIrownIIwhIch nckofs of dnfn nro nnd nro nof
nIIowod fo nss fhroughdoonds on fho socurIfy noods of nn IndIvIdunI
sIfo. Pvoy Sevvevs Iroxy sorvors nro roInfod fo fIrownIIs. If n
fIrownII rovonfs hosfs on n nofwork from mnkIng dIrocf connocfIons
fo fho oufsIdo worId, n roxy sorvor cnn ncf ns n go-bofwoon. Thus,
n mnchIno fhnf Is rovonfod from connocfIng fo fho oxfornnI nofwork
by n fIrownII wouId mnko n roquosf for n wob ngo from fho IocnI
roxy sorvor Insfond of roquosfIng fho wob ngo dIrocfIy from fho
romofo wob sorvor. Tho roxy sorvor wouId fhon roquosf fho ngo from
fho wob sorvor nnd forwnrd fho rosonso bnck fo fho orIgInnI
roquosfor. IroxIos cnn nIso bo usod for ITI sorvIcos nnd ofhor
connocfIons. Ono of fho oecurity uJtuntugeo of usIng n roxy sorvor
Is fhnf oxfornnI hosfs onIy fInd ouf nbouf fho roxy sorvor. Thoy do
nof Ionrn fho nnmos nnd II nddrossos of fho InfornnI mnchInos,
mnkIng If moro dIffIcuIf fo hnck Info InfornnI sysfoms. UNIT 1:
IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.l?
A roxy sorvor hns n dofnIIod undorsfnndIng of somo nIIcnfIon
IovoI rofocoIs, such ns HTTI nnd ITI. Inckofs fhnf nss fhrough fho
roxy sorvor cnn bo oxnmInod fo onsuro fhnf fhoy confnIn dnfn
nrorInfo for fhoIr fyo. LuyereJ connectiono through u prory oerter
Somo comnnIos nIIow IncomIng ITI buf dIsnIIow oufgoIng ITI so
confIdonfInI dnfn cnnnof bo ns onsIIy smuggIod ouf of fho comnny.
Iroxy sorvors cnn nIso bo usod fo ImIomonf locul cuching. Whon n
fIIo Is roquosfod from n wob sorvor, fho roxy sorvor fIrsf chocks
fo soo If fho fIIo Is In Ifs cncho. If fho file io in the cuche,
fho roxy sorvos fho fIIo from fho cncho rnfhor fhnn from fho
Infornof. If fho file io not in the cuche, fho roxy sorvor
rofrIovos fho fIIo, forwnrds If fo fho roquosfor, nnd sforos If In
fho cncho for fho noxf fImo If Is roquosfod. Tho bIggosf robIom
wIfh roxy sorvors Is fhoIr InnbIIIfy fo coo wIfh nII buf n fow
rofocoIs. ConornIIy osfnbIIshod rofocoIs IIko HTTI, ITI, nnd SMTI
nro nIIowod fo nss fhrough, whIIo nowor rofocoIs IIko CnufoIIn nro
nof. If's n nrfIcuInr JiouJtuntuge for Jnvn rogrnmmors bocnuso If
IImIfs fho offocfIvonoss of cusfom rofocoIs. UNIT 1: IUNAMNTAIS WB
TCHNOIOGY TLunguveI Muvugun l.l8
1.1.5 TH CIINT/SRVR MOI A cIIonf/sorvor nIIcnfIon fyIcnIIy
sforos Inrgo qunnfIfIos of dnfn on nn oxonsIvo, hIgh-oworod sorvor
whIIo mosf of fho rogrnm IogIc nnd fho usor-Inforfnco Is hnndIod by
cIIonf soffwnro runnIng on roInfIvoIy chon orsonnI comufors. In
mosf cnsos, n sorvor rImnrIIy sonds dnfn whIIo n cIIonf rImnrIIy
rocoIvos If, buf If Is rnro for ono rogrnm fo sond or rocoIvo
oxcIusIvoIy. A moro roIInbIo dIsfIncfIon Is fhnf n cIIonf InIfInfos
n convorsnfIon whIIo n sorvor wnIfs for cIIonfs fo sfnrf
convorsnfIons wIfh If. A cIIent/sevvev connectIon Somo sorvors
rocoss nnd nnnIyzo fho dnfn boforo sondIng fho rosuIfs fo fho
cIIonf. Such sorvors nro offon roforrod fo ns "nIIcnfIon sorvors"
fo dIsfInguIsh fhom from fho moro common fIIo sorvors nnd dnfnbnso
sorvors. A file or Jutubuoe oerter wIII rofrIovo InformnfIon nnd
sond If fo n cIIonf, buf If won'f rocoss fhnf InformnfIon. In
confrnsf, nn nIIcnfIon sorvor mIghf Iook nf nn ordor onfry dnfnbnso
nnd gIvo fho cIIonfs roorfs nbouf monfhIy snIos fronds. An
nIIcnfIon sorvor Is nof n sorvor fhnf sorvos fIIos fhnf hnon fo bo
nIIcnfIons. UNIT 1: IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun
l.l9
Web oertero IIko Ancho rosond fo roquosfs from wob cIIonfs IIko
IIrofox. nfn Is sforod on fho wob sorvor nnd Is sonf ouf fo fho
cIIonfs fhnf roquosf If. Wob sorvors fhnf uso CCI rogrnms doubIo ns
nIIcnfIon nnd fIIo sorvors. FTP Is nn oIdor sorvIco fhnf fIfs fho
cIIonf/sorvor modoI. ITI usos dIfforonf nIIcnfIon rofocoIs nnd
dIfforonf soffwnro, buf Is sfIII sIIf Info ITI sorvors fhnf sond
fIIos nnd ITI cIIonfs fhnf rocoIvo fIIos. Ior Insfnnco, In
nofworkod gnmos, If sooms IIkoIy fhnf bofh Inyors wIII sond dnfn
bnck nnd forfh roughIy oqunIIy. Thoso sorfs of connocfIons nro
cnIIod peer-to-peer. Tho oors cnn communIcnfo wIfh onch ofhor
fhrough nn InformodInfo sorvor rogrnm fhnf forwnrds dnfn from ono
oor fo fho ofhor oors. 1.1.6 INTRNT STANARS Thoro nro mnny
sfnndnrds orgnnIznfIons In fho worId, fho fwo fhnf roduco mosf of
fho sfnndnrds roIovnnf fo nofwork rogrnmmIng nnd rofocoIs nro fho
Infornof IngInoorIng Tnsk Iorco (IITI) nnd fho WorId WIdo Wob
ConsorfIum (W3C). Tho 1ETF Is n roInfIvoIy InformnI, domocrnfIc
body oon fo nrfIcInfIon by nny Inforosfod nrfy. Ifs sfnndnrds nro
bnsod on "rough consonsus nnd runnIng codo" nnd fond fo foIIow
rnfhor fhnn Iond ImIomonfnfIons. IITI sfnndnrds IncIudo TCI/II,
MIMI, nnd SMTI. Tho W3C, by confrnsf, Is n vondor orgnnIznfIon,
confroIIod by duos-nyIng mombor corornfIons, fhnf oxIIcIfIy
oxcIudos nrfIcInfIon by IndIvIdunIs. Tho W3C frIos fo dofIno
sfnndnrds In ndvnnco of ImIomonfnfIon. W3C sfnndnrds IncIudo HTTI,
HTM!, nnd XM!. A) ITI RICs 1ETF sfnndnrds nnd nonr-sfnndnrds nro
ubIIshod ns Infornof drnffs nnd roquosfs for commonfs (!ICs). !ICs
nnd Infornof drnffs rnngo from InformnfIonnI UNIT 1: IUNAMNTAIS WB
TCHNOIOGY TLunguveI Muvugun l.20
documonfs of gonornI Inforosf fo dofnIIod socIfIcnfIons of
sfnndnrd Infornof rofocoIs IIko ITI. RFCs fhnf documonf n sfnndnrd
or n roosod sfnndnrd nro ubIIshod onIy wIfh fho nrovnI of fho
Infornof IngInoorIng SfoorIng Crou (IISC) of fho IITI. Ioforo
somofhIng cnn bocomo nn IITI sfnndnrd, If musf ncfunIIy oxIsf nnd
work. ThIs roquIromonf onsuros fhnf IITI sfnndnrds nro nf Ionsf
fonsIbIo, unIIko fho sfnndnrds romuIgnfod by somo ofhor
orgnnIznfIons. A uorking group mny bo formod undor fho nusIcos of
fho IITI. ThIs workIng grou nffomfs fo documonf fho rofocoI In nn
Infornof-rnff. Infornof-rnffs nro workIng documonfs nnd chnngo
froquonfIy fo rofIocf oxorIonco wIfh fho rofocoI. Tho roosnI goos
fhrough sIx sfnfos or mnfurIfy IovoIs ns If foIIows fho
sfnndnrdIznfIon frnck: IxorImonfnI Iroosod sfnndnrd rnff sfnndnrd
Sfnndnrd InformnfIonnI HIsforIc Tho erperimentul sfngo doos nof
ImIy fhnf fho rofocoI Is nof soIId or fhnf If Is nof wIdoIy usod;
unforfunnfoIy, fho sfnndnrds rocoss usunIIy Ings bohInd do fncfo
nccofnnco of fho sfnndnrd. If fho oxorImonfnI sfnndnrd hoIds u woII
In furfhor ronI worId fosfIng, fho IISC mny ndvnnco If fo fho
sfnfus of roosod sfnndnrd. A propooeJ otunJurJ Is fnIrIy Iooso, nnd
Is bnsod on fho oxorImonfnI work of ossIbIy ns IIffIo ns ono
orgnnIznfIon. Chnngos mny sfIII bo mndo fo n rofocoI In fhIs sfngo.
UNIT 1: IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.2l
Tho IISC mny rocommond fhnf n roosod sfnndnrd bo romofod fo n
Jruft otunJurJ. A drnff sfnndnrd wIII robnbIy nof chnngo foo much
boforo ovonfunI sfnndnrdIznfIon unIoss mnjor fInws nro found. Tho
rImnry uroso of n drnff sfnndnrd Is fo cIonn u fho !IC fhnf
documonfs fho rofocoI nnd mnko suro fho documonfnfIon conforms fo
ncfunI rncfIco, rnfhor fhnn fo chnngo fho sfnndnrd IfsoIf. Whon n
rofocoI comIofos fhIs, If bocomos nn offIcInI 1nternet otunJurJ. If
Is nssIgnod nn ST numbor nnd Is ubIIshod ns nn ST In nddIfIon fo nn
!IC. Somo !ICs fhnf do nof bocomo sfnndnrds nro consIdorod
informutionul. Thoso IncIudo !ICs fhnf socIfy rofocoIs fhnf nro
wIdoIy usod buf woron'f dovoIood wIfhIn fho normnI Infornof
sfnndnrds frnck, nnd hnvon'f boon fhrough fho formnI
sfnndnrdIznfIon rocoss. A rofocoI hns n roquIromonf IovoI. Tho
ossIbIo roquIromonf IovoIs nro: ot recommenJeJ ShouId nof bo
ImIomonfod by nnyono. LimiteJ uoe Mny hnvo fo bo ImIomonfod In
corfnIn unusunI sIfunfIons buf won'f bo noodod by mosf hosfs.
MnInIy fhoso nro oxorImonfnI rofocoIs. Electite Cnn bo ImIomonfod
by nnyono who wnnfs fo uso fho rofocoI. Ior oxnmIo, !IC 2045,
MuIfIuroso Infornof MnII IxfonsIons, Is n rnff IIocfIvo Sfnndnrd.
RecommenJeJ ShouId bo ImIomonfod by Infornof hosfs fhnf don'f hnvo
n socIfIc ronson nof fo ImIomonf If. Mosf rofocoIs fhnf you nro
fnmIIInr wIfh (IIko TCI nnd !I, SMTI for omnII, ToInof for romofo
IogIn, ofc.) nro rocommondod. UNIT 1: IUNAMNTAIS WB TCHNOIOGY
TLunguveI Muvugun l.22
RequireJ Musf bo ImIomonfod by nII Infornof hosfs. Thoro nro
vory fow roquIrod rofocoIs. II IfsoIf Is ono (!IC ?9l), buf ovon
rofocoIs ns Imorfnnf ns TCI or !I nro onIy rocommondod. A sfnndnrd
Is onIy roquIrod If If Is nbsoIufoIy ossonfInI fo fho funcfIonIng
of n hosf on fho Infornof. B) W3C RCOMMNATIONS AIfhough fho W3C
sfnndnrdIznfIon rocoss Is sImIInr fo fho IITI rocoss (n sorIos of
workIng drnffs hnshod ouf on mnIIIng IIsfs rosuIfIng In nn ovonfunI
socIfIcnfIon), fho W3C Is n fundnmonfnIIy dIfforonf orgnnIznfIon.
Tho W3C hns hnd consIdornbIy Ioss succoss In convIncIng vondors
IIko ofscno nnd MIcrosoff fo fuIIy nnd consIsfonfIy ImIomonf Ifs
sfnndnrds. Tho W3C hns fIvo bnsIc IovoIs of sfnndnrds: ote A nofo
Is gonornIIy ono of fwo fhIngs: oIfhor nn unsoIIcIfod submIssIon by
n W3C mombor (sImIInr fo nn IITI Infornof drnff) or rnndom musIngs
by W3C sfnff or roInfod nrfIos fhnf do nof ncfunIIy doscrIbo n fuII
roosnI (sImIInr fo nn IITI InformnfIonnI !IC). ofos wIII nof
nocossnrIIy Iond fo fho formnfIon of n workIng grou or n W3C
rocommondnfIon. Working Jrufto A workIng drnff Is n rofIocfIon of
fho curronf fhInkIng of somo (nof nocossnrIIy nII) mombors of n
workIng grou. If shouId ovonfunIIy Iond fo n roosod rocommondnfIon,
buf by fho fImo If doos so If mny hnvo chnngod subsfnnfInIIy. UNIT
1: IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.23
CunJiJute recommenJution A cnndIdnfo rocommondnfIon IndIcnfos
fhnf fho workIng drnff hns ronchod consonsus on nII mnjor Issuos
nnd Is rondy for fhIrd-nrfy commonf nnd ImIomonfnfIons. If fho
ImIomonfnfIons do nof uncovor nny obsfrucfIons, fho soc cnn bo
romofod fo n roosod rocommondnfIon. PropooeJ recommenJution A
roosod rocommondnfIon Is mosfIy comIofo nnd unIIkoIy fo undorgo
moro fhnn mInor odIforInI chnngos. Tho mnIn uroso of n roosod
rocommondnfIon Is fo work ouf bugs In fho socIfIcnfIon documonf
rnfhor fhnn In fho undorIyIng fochnoIogy boIng documonfod.
RecommenJution A rocommondnfIon Is fho hIghosf IovoI of W3C
sfnndnrd. Howovor, fho W3C Is vory cnrofuI nof fo ncfunIIy cnII
fhIs n "sfnndnrd" for fonr of runnIng nfouI of nnfIfrusf sfnfufos.
Tho W3C doscrIbos n rocommondnfIon ns n "work fhnf rorosonfs
consonsus wIfhIn W3C nnd hns fho Irocfor's sfnm of nrovnI. W3C
consIdors fhnf fho Idons or fochnoIogy socIfIod by n !ocommondnfIon
nro nrorInfo for wIdosrond doIoymonf nnd romofo W3C's mIssIon." 1.2
BASIC WB CONCPTS Tho Hypertert Trunofer Protocol (HTTI) Is n
sfnndnrd fhnf dofInos how n wob cIIonf fnIks fo n sorvor nnd how
dnfn Is frnnsforrod from fho sorvor bnck fo fho cIIonf. Tho
nrchIfocfuro nnd dosIgn of fho HTTI rofocoI Is !orosonfnfIonnI
Sfnfo Trnnsfor (!IST). HTTI cnn bo usod fo frnnsfor dnfn In
ossonfInIIy nny formnf, from TIII Icfuros fo MIcrosoff Word
documonfs fo Inso fIIos. UNIT 1: IUNAMNTAIS WB TCHNOIOGY TLunguveI
Muvugun l.24
Tho Wob's nnfIvo formnf Is fho Hyorfoxf Mnrku !nngungo (HTM!).
HTM! Is n sImIo sfnndnrd for doscrIbIng fho somnnfIc vnIuo of
foxfunI dnfn. HTML Is n "hyorfoxf mnrku Inngungo" bocnuso If
IncIudos n wny fo socIfy IInks fo ofhor documonfs IdonfIfIod by
!!!s. A !!! Is n wny fo unnmbIguousIy IdonfIfy fho IocnfIon of n
rosourco on fho Infornof. 1.2.1 URIs A !nIform !osourco IdonfIfIor
(!!I) Is n sfrIng of chnrncfors In n nrfIcuInr synfnx fhnf
IdonfIfIos n rosourco. Tho rosourco IdonfIfIod mny bo n fIIo on n
sorvor, buf If mny nIso bo nn omnII nddross, n nows mossngo, n
book, n orson's nnmo, nn Infornof hosf, fho curronf sfock rIco of
Sun MIcrosysfoms, or somofhIng oIso. An uboolute UR1 Is mndo u of n
schomo for fho !!I nnd n schomo-socIfIc nrf, sonrnfod by n coIon,
IIko fhIs: ecIene:ecIene-epecific-porI Tho synfnx of fho
schomo-socIfIc nrf doonds on fho schomo boIng usod. Curronf schomos
IncIudo: JoIo : Inso64-oncodod dnfn IncIudod dIrocfIy In n IInk;
soo !IC 239? file : A fIIo on n IocnI dIsk fIp : An ITI sorvor IIIp
: A WorId WIdo Wob sorvor usIng fho Hyorfoxf Trnnsfor IrofocoI
gopIer : A Cohor sorvor noilIo : An omnII nddross neue : A !sonof
nowsgrou IelneI : A connocfIon fo n ToInof-bnsod sorvIco urn : A
!nIform !osourco nmo UNIT 1: IUNAMNTAIS WB TCHNOIOGY TLunguveI
Muvugun l.25
Thoro Is no socIfIc synfnx fhnf nIIos fo fho schomo-socIfIc nrfs
of nII !!Is. //ouIIoriI,/poII`quer, Tho uuthority purt of fho !!I
nnmos fho nufhorIfy rosonsIbIo for rosoIvIn g fho rosf of fho !!I.
Ior Insfnnco, fho !!I hff://www.Ioff.org/rfc/rfc2396.fxf hns fho
schomo hff nnd fho nufhorIfy www.Ioff.org. ThIs monns fho sorvor nf
www.Ioff.org Is rosonsIbIo for mnIng fho nfh /rfc/rfc2396.fxf fo n
rosourco. ThIs !!I doos nof hnvo n quory nrf. Tho !!I
hff://www.owoIIs.com/cgI-bIn/bIbIIo`Inkoy=62-l565928?09-0 hns fho
schomo hff, fho nufhorIfy www.owoIIs.com, fho puth /bIbIIo, nnd fho
query Inkoy=62-l565928?09-0. Tho !!I urn:Isbn: l565928?0 hns fho
schomo urn buf doosn'f foIIow fho hIornrchIcnI
//nufhorIfy/nfh`quory form for schomo-socIfIc nrfs. If the
uuthority io un 1nternet hoot, ofIonnI usornnmos nnd orfs mny nIso
bo rovIdod fo mnko fho nufhorIfy moro socIfIc. Ior oxnmIo, fho !!I
ff://m3:m3cI43l98-n.nshvIIl.nc.homo.com:33/VnnHnIon-Jum.m3 hns fho
nufhorIfy m3:m3cI43l98-n.nshvIIl.nc.homo.com:33. ThIs nufhorIfy hns
fho usornnmo m3, fho nssword m3, fho hosf
cI43l98-n.nshvIIl.nc.homo.com, nnd fho orf 33. If hns fho schomo ff
nnd fho nfh /VnnHnIon-Jum.m3. PutL Tho nfh (whIch IncIudos Ifs
InIfInI /) Is n sfrIng fhnf fho nufhorIfy cnn uso fo doformIno
whIch rosourco Is IdonfIfIod. Ifforonf nufhorIfIos mny Inforrof fho
snmo nfh fo rofor fo dIfforonf rosourcos. Tho nfh mny bo
hIornrchIcnI, In whIch cnso fho IndIvIdunI nrfs nro sonrnfod by
forwnrd sInshos, nnd fho . nnd .. oornfors nro usod fo nnvIgnfo fho
hIornrchy. ScLeme Tho schomo nrf Is comosod of Ioworcnso Ioffors,
dIgIfs, nnd fho Ius sIgn, orIod, nnd hyhon. UNIT 1: IUNAMNTAIS WB
TCHNOIOGY TLunguveI Muvugun l.26
Tho ofhor fhroo nrfs of n fyIcnI !!I (nufhorIfy, nfh, nnd quory)
shouId onch bo comosod of fho ASCII nIhnnumorIc chnrncfors; fhnf
Is, fho Ioffors A-Z, n-z, nnd fho dIgIfs 0-9. In nddIfIon, fho
uncfunfIon chnrncfors - _ . ! ~ * ' mny nIso bo usod. AII ofhor
chnrncfors, IncIudIng non-ASCII nIhnnumorIcs such ns nnd , shouId
bo oscnod by n orconf sIgn () foIIowod by fho hoxndocImnI codo for
fho chnrncfor. Ior Insfnnco, wouId bo oncodod ns Il. Note: Tho !!I
nnd !!! socIfIcnfIons don'f ncfunIIy sny whnf chnrncfor sof shouId
bo usod, whIch monns mosf soffwnro fonds fo uso fho IocnI dofnuIf
chnrncfor sof. Thus, !!!s confnInIng non-ASCII chnrncfors nron'f
vory InforoornbIo ncross dIfforonf Infforms nnd Inngungos. Work Is
ongoIng fo dofIno InfornnfIonnIIzod !osourco IdonfIfIors (I!Is)
fhnf cnn uso fho fuII rnngo of !nIcodo. Af fho fImo of fhIs
wrIfIng, fho I!I drnff socIfIcnfIon IndIcnfos fhnf non-ASCII
chnrncfors shouId bo oncodod by fIrsf convorfIng fhom fo !TI-8,
fhon orconf-oscnIng onch byfo of fho !TI-8, ns socIfIod nbovo. Ior
Insfnnco, fho Crook Ioffor Is !nIcodo codo oInf 3C0. In !TI-8, fhIs
Ioffor Is oncodod ns fho fhroo byfos I0, A?, 80. Thus In n !!! If
wouId bo oncodod ns I0A?80. A) URNs Thoro nro fwo fyos of !!Is:
!nIform !osourco !ocnfors (!!!s) nnd !nIform !osourco nmos (!!s). A
URL Is n oInfor fo n nrfIcuInr rosourco on fho Infornof nf n
nrfIcuInr IocnfIon. Ior oxnmIo,
hff://www.oroIIIy.com/cnfnIog/jnvnn3/ Is ono of sovornI !!!s for
fho book Jnvn ofwork IrogrnmmIng. UNIT 1: IUNAMNTAIS WB TCHNOIOGY
TLunguveI Muvugun l.2?
A UR Is n nnmo for n nrfIcuInr rosourco buf wIfhouf roforonco fo
n nrfIcuInr IocnfIon. Ior Insfnnco, urn:Isbn:l565928?09 Is n !!.
Tho goul of URo Is fo hnndIo rosourcos fhnf nro mIrrorod In mnny
dIfforonf IocnfIons or fhnf hnvo movod from ono sIfo fo nnofhor;
fhoy IdonfIfy fho rosourco IfsoIf, nof fho Inco whoro fho rosourco
IIvos. A !! hns fho gonornI form: urn: numeopuce: reoource_nume Tho
numeopuce Is fho nnmo of n coIIocfIon of corfnIn kInds of rosourcos
mnInfnInod by somo nufhorIfy. Tho reoource_nume Is fho nnmo of n
rosourco wIfhIn fhnf coIIocfIon. Ior Insfnnco, fho !!
urn:ISI:l56592485l IdonfIfIos n rosourco In fho ISI nnmosnco wIfh
fho IdonfIfIor l56592485l. Tho oxncf synfnx of rosourco nnmos
doonds on fho nnmosnco. Tho ISI nnmosnco oxocfs fo soo sfrIngs
comosod of l0 or l3 chnrncfors, nII of whIch nro dIgIfswIfh fho
sIngIo oxcofIon fhnf fho Insf chnrncfor mny bo fho Ioffor X (oIfhor
uor- or Ioworcnso) Insfond. B) URIs A !!! IdonfIfIos fho IocnfIon
of n rosourco on fho Infornof. If socIfIos fho rofocoI usod fo
nccoss n sorvor (o.g., ITI, HTTI), fho nnmo of fho sorvor, nnd fho
IocnfIon of n fIIo on fhnf sorvor. Tho synfnx of n !!! Is:
protocol://uoernume"hootnume:port/puth/filenume?query#frugment Tho
protocol Is nnofhor word for whnf wns cnIIod fho schomo of fho !!I.
In n !!!, fho rofocoI nrf cnn bo fIIo, ff, hff, hffs, gohor, nows,
foInof, wnIs, or vnrIous ofhor sfrIngs. UNIT 1: IUNAMNTAIS WB
TCHNOIOGY TLunguveI Muvugun l.28
Tho hootnume nrf of n !!! Is fho nnmo of fho sorvor fhnf rovIdos
fho rosourco you wnnf, such ns www.oroIIIy.com or ufoIn.oIy.odu. If
cnn nIso bo fho sorvor's II nddross, such ns 204.l48.40.9 or
l28.238.3.2l. Tho uoernume Is nn ofIonnI usornnmo for fho sorvor.
Tho port number Is nIso ofIonnI. If's nof nocossnry If fho sorvIco
Is runnIng on Ifs dofnuIf orf (orf 80 for HTTI sorvors). Tho puth
oInfs fo n nrfIcuInr dIrocfory on fho socIfIod sorvor. Tho nfh Is
roInfIvo fo fho documonf roof of fho sorvor, nof nocossnrIIy fo fho
roof of fho fIIosysfom on fho sorvor. Tho filenume oInfs fo n
nrfIcuInr fIIo In fho dIrocfory socIfIod by fho nfh. If Is offon
omIffodIn whIch cnso, If Is Ioff fo fho sorvor's dIscrofIon whnf
fIIo, If nny, fo sond. Tho query otring rovIdos nddIfIonnI
nrgumonfs for fho sorvor. If's commonIy usod onIy In hff !!!s,
whoro If confnIns form dnfn for Inuf fo rogrnms runnIng on fho
sorvor. Tho frugment roforoncos n nrfIcuInr nrf of fho romofo
rosourco. If fho romofo rosourco Is HTM!, fho frngmonf IdonfIfIor
nnmos nn nnchor In fho HTM! documonf. If fho romofo rosourco Is
XM!, fho frngmonf IdonfIfIor Is nn XIoInfor. ReIutIve URIs A !!!
mny InhorIf fho rofocoI, hosfnnmo, nnd nfh of Ifs nronf documonf
(I.o., fho documonf In whIch If nonrs). !!!s fhnf nron'f comIofo
buf InhorIf Iocos from fhoIr nronf nro cnIIod relutite URLo. In
confrnsf, n comIofoIy socIfIod !!! Is cnIIod nn uboolute URL. In n
roInfIvo !!!, nny Iocos fhnf nro mIssIng nro nssumod fo bo fho snmo
ns fho corrosondIng Iocos from fho !!! of fho documonf In whIch fho
!!! Is found.!oInfIvo !!!s hnvo n numbor of ndvnnfngos. IIrsfnnd
Ionsf Imorfnnffhoy snvo n IIffIo fyIng. UNIT 1: IUNAMNTAIS WB
TCHNOIOGY TLunguveI Muvugun l.29
Moro ImorfnnfIy, roInfIvo !!!s nIIow n sIngIo documonf froo fo
bo sorvod by muIfIIo rofocoIs: for Insfnnco, bofh ITI nnd HTTI. Tho
HTTI mIghf bo usod for dIrocf surfIng, whIIo fho ITI couId bo usod
for mIrrorIng fho sIfo. 1.2.2 HTMI, SGMI, und XMI HTML Is fho
rImnry formnf usod for Wob documonfs. Idon of doscrIbIng n foxf's
somnnfIcs rnfhor fhnn Ifs nonrnnco comos from nn oIdor sfnndnrd
cnIIod fho Sfnndnrd ConornIIzod Mnrku !nngungo (SCM!). Sfnndnrd
HTM! Is nn Insfnnco of SCM!. SCML nnd, by InhorIfnnco, HTM! nro
bnsod on fho nofIon of dosIgn by monnIng rnfhor fhnn dosIgn by
nonrnnco. Tho fngs usod fo mnrk u the tert ure cuoe-inoenoitite.
Thus, Is fho snmo ns Is fho snmo ns Is fho snmo ns . Somo fngs hnvo
n mnfchIng ond-fng fo dofIno n rogIon of foxf. An ond-fng Is fho
snmo ns fho sfnrf-fng, oxcof fhnf fho oonIng nngIo brnckof Is
foIIowod by n /. Ior oxnmIo: fhIs foxf Is sfrong; fhIs foxf Is
omhnsIzod. Tho onfIro foxf from fho bogInnIng of fho sfnrf-fng fo
fho ond of fho ond-fng Is cnIIod nn element. Thus, fhIs foxf Is
sfrong Is n ST!OC oIomonf.HTM! oIomonfs mny nosf buf fhoy ohoulJ
not oterlup. Tho fIrsf IIno In fho foIIowIng oxnmIo Is
sfnndnrd-conformIng. Tho socond IIno Is nof, fhough mnny browsors
nccof If nonofhoIoss: Jnck nnd JIII wonf u fho hIII (Correct) fo
fofch n nII of wnfor (Wrong) Tho fng nnd mosf ofhor nrngrnh-IovoI
fngs mny hnvo nn A!IC nffrIbufo fhnf snys whofhor fho hondor shouId
bo conforod, Ioff-nIIgnod, or rIghf-nIIgnod. UNIT 1: IUNAMNTAIS WB
TCHNOIOGY TLunguveI Muvugun l.30
Ior oxnmIo: ThIs Is n conforod Hl hondIng Tho vnIuo of nn
nffrIbufo mny bo oncIosod In doubIo or sIngIo quofos. Tho curronf
sfnndnrd Is HTM! 4.0, mosf of whIch Is suorfod by curronf wob
browsors, wIfh occnsIonnI oxcofIons. Tho fngnro nIIowod buf
dorocnfod In HTM! 4.0. HTM! 4.0 mny bo fho ond of fho IIno, nsIdo
from mInor fIxos. Tho W3C hns docrood fhnf HTM! Is goffIng foo
buIky fo Inyor moro fonfuros on fo of. Tngs nro sof off by < nnd
>. AffrIbufos nro oncIosod In quofnfIon mnrks, nnd so forfh. A
sfyIoshoof Is usod fo doscrIbo how onch of fho Ifoms shouId bo
dIsInyod. XML hns nnofhor ndvnnfngo ovor HTM!. HTM! cnn bo quIfo
sIoy. IIomonfs nro oonod buf nof cIosod. AffrIbufo vnIuos mny or
mny nof bo oncIosod In quofos. Tho quofos mny or mny nof bo rosonf.
XM! fIghfons nII fhIs u. An XM! documonf mny hnvo n ocumonf Tyo
ofInIfIon (T), whIch cnn Imoso nddIfIonnI consfrnInfs on vnIId
documonfs. Ior oxnmIo, n T mny roquIro fhnf ovory I!O!CT oIomonf
confnIn oxncfIy ono AMI oIomonf. ThIs hns n numbor of ndvnnfngos,
buf fho koy ono horo Is fhnf XM! documonfs nro fnr onsIor fo nrso
fhnn HTM! documonfs. XM! cnn bo usod bofh for uro XM! ngos nnd for
omboddIng now kInds of confonf In HTM! nnd XHTM!. SMI!, fho
SynchronIzod MuIfImodIn InfogrnfIon !nngungo, Is nn XM! nIIcnfIon
for IncIudIng fImod muIfImodIn such ns sIIdo shows nnd subfIfIod
vIdoos on wob ngos. 1.2.3 HTTP HTTI Is fho sfnndnrd rofocoI for
communIcnfIon bofwoon wob browsors nnd wob sorvors. HTTI socIfIos
how n cIIonf nnd sorvor osfnbIIsh n connocfIon, how fho cIIonf
roquosfs dnfn from fho sorvor, how fho sorvor rosonds fo fhnf
roquosf, nnd fInnIIy, how fho connocfIon Is cIosod. UNIT 1:
IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.3l
Ior onch roquosf from cIIonf fo sorvor, fhoro Is n soquonco of
four sfos: Muking the connection Tho cIIonf osfnbIIshos n TCI
connocfIon fo fho sorvor on orf 80, by dofnuIf; ofhor orfs mny bo
socIfIod In fho !!!. Muking u requeot Tho cIIonf sonds n mossngo fo
fho sorvor roquosfIng fho ngo nf n socIfIod !!!. Tho formnf of fhIs
roquosf Is fyIcnIIy somofhIng IIko: CIT /Indox.hfmI HTTI/l.0 CIT
socIfIos fho oornfIon boIng roquosfod. Tho oornfIon roquosfod horo
Is for fho sorvor fo rofurn n rorosonfnfIon of n rosourco.
/Indox.hfmI Is n roInfIvo !!! fhnf IdonfIfIos fho rosourco
roquosfod from fho sorvor. AIfhough fho CIT IIno Is nII fhnf Is
roquIrod, n cIIonf roquosf cnn IncIudo ofhor InformnfIon ns woII.
ThIs fnkos fho foIIowIng form: Ke,uorJ: Volue Tho mosf common such
koyword Is Accof, whIch foIIs fho sorvor whnf kInds of dnfn fho
cIIonf cnn hnndIo (fhough sorvors offon Ignoro fhIs). Ior oxnmIo,
fho foIIowIng IIno snys fhnf fho cIIonf cnn hnndIo four MIMI modIn
fyos, corrosondIng fo HTM! documonfs, InIn foxf, nnd JIIC nnd CII
Imngos: Accof: foxf/hfmI, foxf/InIn, Imngo/gIf, Imngo/jog The
reoponoe Tho sorvor sonds n rosonso fo fho cIIonf. Tho rosonso
bogIns wIfh n rosonso codo, foIIowod by n hondor fuII of mofndnfn,
n bInnk IIno, nnd fho roquosfod documonf or nn orror mossngo. UNIT
1: IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.32
Clooing the connection IIfhor fho cIIonf or fho sorvor or bofh
cIoso fho connocfIon. Thus, n sonrnfo nofwork connocfIon Is usod
for onch roquosf. If fho cIIonf roconnocfs, fho sorvor rofnIns no
momory of fho rovIous connocfIon or Ifs rosuIfs. A rofocoI fhnf
rofnIns no momory of nsf roquosfs Is cnIIod sfnfoIoss; In confrnsf,
n sfnfofuI rofocoI such ns ITI cnn rocoss mnny roquosfs boforo fho
connocfIon Is cIosod. Response code MeunIng 400 Ind !oquosf Tho
cIIonf roquosf fo fho sorvor usod Imroor synfnx. ThIs Is rnfhor
unusunI, nIfhough If Is IIkoIy fo hnon If you'ro wrIfIng nnd
dobuggIng n cIIonf. 40l !nnufhorIzod AufhorIznfIon, gonornIIy
usornnmo nnd nssword confroIIod, Is roquIrod fo nccoss fhIs ngo.
IIfhor fho usornnmo nnd nssword hnvo nof yof boon rosonfod or fho
usornnmo nnd nssword nro InvnIId. 403 IorbIddon Tho sorvor
undorsfood fho roquosf buf Is doIIbornfoIy rofusIng fo rocoss If.
AufhorIznfIon wIII nof hoI. Ono ronson fhIs occurs Is fhnf fho
cIIonf nsks for n dIrocfory IIsfIng buf fho sorvor Is nof
confIgurod fo rovIdo If. 404 of Iound ThIs mosf common orror
rosonso IndIcnfos fhnf fho sorvor cnnnof fInd fho roquosfod ngo. If
mny IndIcnfo n bnd IInk, n ngo fhnf hns movod wIfh no forwnrdIng
nddross, n mIsfyod !!!, or somofhIng sImIInr. 50l of ImIomonfod Tho
sorvor doos nof hnvo fho fonfuro fhnf Is noodod fo fuIfIII fhIs
roquosf. A sorvor fhnf cnnnof hnndIo IOST roquosfs mIghf sond fhIs
rosonso fo n cIIonf fhnf frIod fo IOST form dnfn fo If. 502 Ind
Cnfowny ThIs rosonso Is nIIcnbIo onIy fo sorvors fhnf ncf ns roxIos
or gnfownys. If IndIcnfos fhnf fho roxy rocoIvod nn InvnIId rosonso
from n sorvor If wns connocfIng fo In nn offorf fo fuIfIII fho
roquosf. 503 SorvIco !nnvnIInbIo Tho sorvor Is fomornrIIy unnbIo fo
hnndIo fho roquosf, orhns ns n rosuIf of ovorIondIng or
mnInfonnnco. HTTI l.l moro fhnn doubIos fho numbor of rosonsos.
Howovor, n rosonso codo from 200 fo 299 nIwnys IndIcnfos succoss, n
rosonso codo from 300 fo 399 nIwnys IndIcnfos rodIrocfIon, ono from
400 fo 499 nIwnys IndIcnfos n cIIonf orror, nnd ono from 500 fo 599
IndIcnfos n sorvor orror. UNIT 1: IUNAMNTAIS WB TCHNOIOGY TLunguveI
Muvugun l.33
HTTI l.0 Is documonfod In fho InformnfIonnI !IC l945; If Is nof
nn offIcInI Infornof sfnndnrd bocnuso If wns rImnrIIy dovoIood
oufsIdo fho IITI by onrIy browsor nnd sorvor vondors. HTTI l.l Is n
roosod sfnndnrd boIng dovoIood by fho W3C nnd fho HTTI workIng grou
of fho IITI. If rovIdos for much moro fIoxIbIo nnd oworfuI
communIcnfIon bofwoon fho cIIonf nnd fho sorvor. If's nIso n Iof
moro scnInbIo. If's documonfod In !IC 26l6. Tho rImnry Imrovomonf
In HTTI l.l Is connocfIon rouso. HTTI l.0 oons n now connocfIon for
ovory roquosf. 1.2.4 MIM MIA TYPS MIMI Is nn oon sfnndnrd for
sondIng muIfInrf, muIfImodIn dnfn fhrough Infornof omnII. Tho dnfn
mny bo bInnry, or If mny uso muIfIIo ASCII nnd non-ASCII chnrncfor
sofs. AIfhough MIMI wns orIgInnIIy Infondod jusf for omnII, If hns
bocomo n wIdoIy usod fochnIquo fo doscrIbo n fIIo's confonfs so
fhnf cIIonf soffwnro cnn foII fho dIfforonco bofwoon dIfforonf
kInds of dnfn. MIMI suorfs moro fhnn l00 rodofInod fyos of confonf.
Confonf fyos nro cInssIfIod nf fwo IovoIs: n fyo nnd n subfyo. Tho
fyo shows vory gonornIIy whnf kInd of dnfn Is confnInod: Is If n
Icfuro, foxf, or movIo` Tho subfyo IdonfIfIos fho socIfIc fyo of
dnfn: CII Imngo, JIIC Imngo, TIII Imngo. Tho confonf fyo for n CII
Imngo Is Imngo/gIf; fho fyo Is Imngo, nnd fho subfyo Is gIf. Mosf
wob sorvors nnd cIIonfs undorsfnnd nf Ionsf fwo MIMI foxf confonf
fyos, foxf/hfmI nnd foxf/InIn, nnd fwo Imngo formnfs, Imngo/gIf nnd
Imngo/jog. A MIMI-comIInnf rogrnm Is nof roquIrod fo undorsfnnd nII
fhoso dIfforonf fyos of dnfn; If jusf noods fo rocognIzo whnf If
cnn nnd cnnnof hnndIo. MIMI nIIows you fo dofIno nddIfIonnI
nonsfnndnrd subfyos by usIng fho rofIx x-. UNIT 1: IUNAMNTAIS WB
TCHNOIOGY TLunguveI Muvugun l.34
Ior oxnmIo, fho confonf fyo nIIcnfIon/x-fox hns fho MIMI fyo
nIIcnfIon nnd fho nonsfnndnrd subfyo x-fox for n ToX documonf.
Thoso x-fyos nro nof gunrnnfood fo bo undorsfood by nny rogrnm
ofhor fhnn fho ono fhnf cronfod fhom. Type Subtype escvIptIon foxf
Tho documonf rorosonfs rInfnbIo foxf. css A CnscndIng SfyIo Shoof
usod for HTM! nnd XM!. hfmI Hyorfoxf Mnrku !nngungo ns usod by wob
browsors. InIn ThIs Is suosod fo ImIy rnw ASCII foxf. muIfInrf
MuIfInrf MIMI mossngos oncodo sovornI dIfforonf fIIos Info ono
mossngo. mIxod SovornI mossngo nrfs Infondod for soquonfInI
vIowIng. sIgnod Ono nrf for fho body of fho mossngo nnd ono nrf for
fho dIgIfnI sIgnnfuro. roInfod Comound documonfs formod by
nggrognfIng sovornI smnIIor nrfs. mossngo An omnII mossngo. hff An
HTTI l.l roquosf from n wob cIIonf fo n wob sorvor. Imngo
Two-dImonsIonnI Icfuros. gIf A CrnhIcs Inforchnngo Iormnf Imngo.
jog Tho JoInf IhofogrnhIc Ixorfs Crou fIIo formnf for bIfmnod
Imngos wIfh Iossy comrossIon. nudIo Sound. bnsIc 8-bIf IS -Inw
oncodod nudIo wIfh n sIngIo chnnnoI nnd n snmIo rnfo of oIghf
kIIohorfz. ThIs Is fho formnf usod by .nu nnd .enJ fIIos nnd
suorfod by fho jnvn.nIof.AudIoCII cInss. 1.2.5 SRVR-SI PROGRAMS
Mnny wob ngos nro nof sorvod from sfnfIc fIIos on fho hnrd drIvo.
Tho sorvor gonornfos fhom dynnmIcnIIy fo moof usor roquosfs. UNIT
1: IUNAMNTAIS WB TCHNOIOGY TLunguveI Muvugun l.35
Tho confonf mny bo uIIod from n dnfnbnso or gonornfod
nIgorIfhmIcnIIy by n rogrnm. Indood, fho ncfunI ngo doIIvorod fo
fho cIIonf mny confnIn dnfn combInod from sovornI dIfforonf
sourcos. In Jnvn, such sorvor-sIdo rogrnms nro offon wrIffon usIng
sorvIofs or Jnvn Sorvor Ingos (JSI). Ono ndvnnfngo fo HTTI Is fhnf
If ronIIy doosn'f mnffor how fho ofhor sIdo of fho connocfIon Is
wrIffon, ns Iong ns If sonks fho snmo bnsIc HTTI rofocoI. Tho
oimpleot oerter-oiJe progrumo run wIfhouf nny Inuf from fho usor.
Irom fho vIowoInf of fho cIIonf, fhoso rogrnms nro nccossod IIko
nny ofhor wob ngo nnd nron'f of much concorn fo fhIs book. Tho
Jifference bofwoon n wob ngo roducod by n rogrnm fhnf fnkos no Inuf
nnd n wob ngo wrIffon In sfnfIc HTM! Is nII on fho sorvor sIdo.
Whon wrIfIng cIIonfs, you don'f nood fo know or cnro whofhor fho
wob sorvor Is foodIng you n fIIo or fho oufuf of somo rogrnm If
rnn. HTTI rovIdos n sfnndnrd, woII undorsfood nnd woII suorfod
monns for Jnvn nIofs nnd nIIcnfIons fo fnIk fo romofo sysfoms;
fhoroforo, I wIII covor how fo uso Jnvn fo bofh rocoIvo nnd sond
dnfn fo fho sorvor. Thoro nro other uuyo for Jutu progrumo to tulk
to oertero, IncIudIng !omofo Mofhod InvocnfIon (!MI) nnd SOAI.
Howovor, !MI Is sIow nnd SOAI Is quIfo comIox.