Você está na página 1de 52

1

9. TCP/IP
9. TCP/IP
Reference: Charles L. Hedrick, Introduction to the Internet Protocols, Rutgers
Universit, htt!:""oac#.hsc.uth.t$c.edu"staff"sne%ton"tc!&tutorial"
FTP, SMTP, Telnet,
HTTP,
TCP, UDP
IP, ARP, ICMP
Network Interface
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

'
A. Wat !" TCP/IP#
(
TCP/IP is a set of protocols e!elope to allo"
cooperati#$ co%p&ters to s'are reso&rces across a
#et"or(
(
TCP sta#s for )Tra#s%issio# Co#trol Protocol*
(
IP sta#s for )I#ter#et Protocol*
(
T'e+ are Tra#sport la+er a# Net"or( la+er
protocols respecti!el+ of t'e protocol s&ite
(
T'e %ost "ell (#o"# #et"or( t'at aopte
TCP/IP is I#ter#et t'e ,i$$est -AN i# t'e "orl
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

#
(
A protocol is a collectio# of r&les a# proce&res
for t"o co%p&ters to e.c'a#$e i#for%atio#
(
Protocol also efi#es t'e for%at of ata t'at is
,ei#$ e.c'a#$e
Wat !" a $rotocol#
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

)
W% TCP/IP !" "o $o$&lar#
(
TCP/IP "as e!elope !er+ earl+
(
Tec'#olo$ies "ere "iel+ isc&sse a# circ&late
i# oc&%e#ts calle )Re/&est for Co%%e#ts*
0RFC1 free of c'ar$e
(
2&pporte ,+ 3NI4 operati#$ s+ste%
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

*
TCP/IP Mo'el
(
5eca&se TCP/IP "as e!elope earlier t'a# t'e
O2I 67la+er %oe8 it oes #ot 'a!e 6 la+ers ,&t
o#l+ 4 la+ers
O2I 67la+er TCP/IP Protocol 2&ite
FTP, SMTP, Telnet,
HTTP,
TCP, UDP
IP, ARP, ICMP
Network Interface
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

+
(
Applicatio# la+er protocols efi#e t'e r&les "'e#
i%ple%e#ti#$ specific #et"or( applicatio#s
(
Rel+ o# t'e &#erl+i#$ la+ers to pro!ie acc&rate
a# efficie#t ata eli!er+
(
T+pical protocols9
(
FTP File Tra#sfer Protocol
(
For file tra#sfer
(
Tel#et Re%ote ter%i#al protocol
(
For re%ote lo$i# o# a#+ ot'er co%p&ter o# t'e
#et"or(
(
2MTP 2i%ple Mail Tra#sfer Protocol
(
For %ail tra#sfer
(
HTTP H+perte.t Tra#sfer Protocol
(
For -e, ,ro"si#$
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

,
(
TCP/IP is ,&ilt o# )co##ectio#less* tec'#olo$+8
eac' ata$ra% fi#s its o"# "a+ to its esti#atio#
(
Tra#sport La+er protocols efi#e t'e r&les of
(
:i!ii#$ a c'&#( of ata i#to se$%e#ts
(
Reasse%,le se$%e#ts i#to t'e ori$i#al c'&#(
(
T+pical protocols9
(
TCP Tra#s%issio# Co#trol Protocol
(
Pro!ie f&rt'er t'e f&#ctio#s s&c' as reoreri#$
a# ata rese#
(
3:P 3ser :ata$ra% 2er!ice
(
3se "'e# t'e %essa$e to ,e se#t fit e.actl+ i#to a
ata$ra%
(
3se also "'e# a %ore si%plifie ata for%at is
re/&ire
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

-
(
Net"or( la+er protocols efi#e t'e r&les of 'o" to
fi# t'e ro&tes for a pac(et to t'e esti#atio#
(
It o#l+ $i!es ,est effort eli!er+; Pac(ets ca# ,e
ela+e8 corr&pte8 lost8 &plicate8 o&t7of7orer
(
T+pical protocols9
(
IP I#ter#et Protocol
(
Pro!ie pac(et eli!er+
(
ARP Aress Resol&tio# Protocol
(
:efi#e t'e proce&res of #et"or( aress / MAC
aress tra#slatio#
(
ICMP I#ter#et Co#trol Messa$e Protocol
(
:efi#e t'e proce&res of error %essa$e tra#sfer
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

.
A$$l!cat!on (a%er
A$$l!cat!on
Tran"$ort
Network
Network Interface
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

1/
SMTP
TCP
IP, ARP, ICMP
Network Interface
SMTP
TCP
IP, ARP, ICMP
Network Interface
012P 0erver
Client
3ctual
4irtual
). *+a,$le- SMTP
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

11
(
T'e &#erl+i#$ la+ers 'a!e $&ara#tee acc&rate
ata eli!er+
(
-e #ee to %a(e a lot a$ree%e#ts "it' t'e ser!er
i# applicatio# la+er ,efore se#i#$ %ail
<; A$ree o# 'o" ata is represe#te
(
5i#ar+ or A2CII
2; E#s&re t'e ri$'t recipie#t
(
T'ere %a+ ,e <=== &sers ser!e ,+ t'e ser!er
>; E#s&re t'e clie#t 'as t'e ri$'t to se# %ail
(
2o%e clie#ts are #ot "elco%e
4; Ho" to tell t'e ser!er it is t'e e# of t'e %essa$e
(
All %ail loo(s t'e sa%e
9
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

1'
(
E.a%ple9 2MTP
T'e follo"i#$ %ail is to ,e se#t9
Date: Fri, 18 Jan 02 13:26:31 EDT
From: enpklun@polyu.edu.hk
To: th!un@eee.hku.hk
"u#$et: meetin%
&et'! %et to%ether (onday at 1pm.
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

1#
012P 0erver
Client
access !ort '* of server
)E&* polyu.edu.hk
(+,& From:
-enpklun@polyu.edu.hk.
220 eee.hku.hk "(T/ "er0ie
at 20 Jan 02 01:12:18 EDT
210 eee.hku.hk 3 )ello,
polyu.edu.hk
210 (+,& aepted
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

1)
Client
012P 0erver
Date: Fri, 18 Jan 02 13:26:31 EDT
From: enpklun@polyu.edu.hk
To: th!un@eee.hku.hk
"u#$et: meetin%
&et'! %et to%ether (onday at 1pm.
.
45/T To:-th!un@eee.hku.hk.
D+T+
210 4eipient aepted
316 "tart mail input7
end 8ith .
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

1*
(
T'e a$ree%e#t %ae i# t'e 2MTP protocol
(
All %essa$es &se #or%al te.t
(
All A2CII c'aracters
(
T'e respo#ses all ,e$i# "it' #&%,ers
(
To i#icate t'e stat&s "'e# recei!i#$ t'e co%%a#
(
2o%e "ors are reser!e "ors
(
HELO8 MAIL8 RCPT?
(
Mail e#s "it' a li#e t'at co#tai#s o#l+ a perio
(
T'e i#for%atio# passe "it' t'e 2MTP %essa$es
(
T'e recipie#t #a%e
(
T'e se#er #a%e
(
T'e %ail
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

1+
C. Do,a!n Na,e .,ent!one' /efore0
(
E!er+ co%p&ter 'as a #et"or( aress
(
e;$; <@A;<>2;<B<;CC
(
To access a co%p&ter8 "e #ee to specif+ its
#et"or( aress
(
H&%a# ,ei#$s are "ea( i# %e%oriDi#$ #&%,ers
(
-e prefer co%p&ter #a%e or o%ai# #a%e
(
e;$; '(p&<=;pol+&;e&;'(
(
Nee a %ac'i#e o# t'e I#ter#et to co#!ert #a%e to
#&%,er
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

1,
Do,a!n na,e !erarc%
E.a%ple9
'(p&<=;pol+&;e&;'(
Root o%ai# #a%e
other e5a$!les:
co$ 6 co$$ercial co$!an
org 6 general organi7ation
net 6 $a8or net%ork centre
gov 6 govern$ent org.
$il 6 $ilitrar grou!
edu 6 education org.
(
2he do$ain
%ithin hk
(
9ote: edu.hk
is not the
sa$e as edu
(
2he do$ain
%ithin edu.hk
(
:ne of the
educational
institutions in
H.;.
Co$!uter na$e
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

1-
(
A# or$a#iDatio# #ees to re$ister its o%ai# #a%e
(
e;$; Pol+3 'as re$istere its #a%e to t'e o%ai#
of e&;'(
(
O#ce a o%ai# #a%e is assi$#e8 t'e or$a#iDatio#
is free to assi$# ot'er #a%es ,elo#$ to its o%ai#
(
e;$; "e ca# 'a!e
'(p&<=;pol+&;e&;'(
s%tp;pol+&;e&;'(
%ail;pol+&;e&;'(
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

1.
Client
<o$ain 9a$e 0erver
=<90> of !olu.edu.hk
3ddress of
%%%.ahoo.co$
?here is
%%%.ahoo.co$@
usuall U<P
<90 of co$
<90 of Aahoo.co$
?here is
%%%.ahoo.co$@
3ddress of
%%%.Aahoo.co$
?here is
ahoo.co$@
3ddress of the
<90 of
Aahoo.co$
5eco%e
clie#t
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

'/
(
Ne!ert'eless8 s&c' a co%plicate proce&re #ees
#ot perfor% i# %ost cases
(
Clie#t co%p&ters &s&all+ re%e%,er t'e a#s"ers
t'at it $ot ,efore
(
It re&ces t'e loai#$ to t'e root :N2
(
To f&rt'er re&ce loai#$8 t'ere ca# ,e %a#+ root
:N2 o# t'e I#ter#et
(
e;$; t'ere are a fe" )co%* root :N2
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

'1
Tran"$ort (a%er
A$$l!cat!on
Tran"$ort
Network
Network Interface
1essage
0eg$ents
' M ' M ' M
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

''
D. TCP an' UDP
(
TCP is a co##ectio#7orie#te protocol
(
:oes #ot %ea# it 'as a p'+sical co##ectio# ,et"ee#
se#er a# recei!er
(
TCP pro!ies t'e f&#ctio# to allo" a co##ectio#
!irt&all+ e.ists also calle !irt&al circ&it
(
TCP pro!ies t'e f&#ctio#s9
(
:i!ii#$ a c'&#( of ata i#to se$%e#ts
(
Reasse%,l+ se$%e#ts i#to t'e ori$i#al c'&#(
(
Pro!ie f&rt'er t'e f&#ctio#s s&c' as reoreri#$ a#
ata rese#
(
Offeri#$ a relia,le ,+te7strea% eli!er+ ser!ice
TCP 1 Tran",!""!on Control Protocol
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

'#
So&rce Port De"t!nat!on
Port
Se2&ence N&,/er
Acknowle'3e,ent
N&,/er
Ceck"&,
Me""a3e Data
TCP
D!4!'!n3 an' Rea""e,/l%
1essage
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

')
5 6 7
Sen'er
2i$eout
retrans$it
A5 A7
5 7
Rec!$!ent
6
A6
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

'*
(
A T+pical Proce&re
(
2e#er
(
TCP i!ies a %essa$e i#to se$%e#ts
(
A se/&e#ce #o;
(
2e# t'e se$%e#ts i# se/&e#ce a# "ait for
ac(#o"le$e%e#t
(
If a# ac(#o"le$e%e#t for a se$%e#t is #ot recei!e
for a certai# perio of ti%e8 rese# it &#til a#
ac(#o"le$e%e#t is recei!e
(
Recipie#t
(
-'e# recei!i#$ se$%e#ts8 se# t'e
ac(#o"le$e%e#t "it' correct #&%,er
(
Reasse%,l+ t'e se$%e#ts ,ac( to t'e %essa$e
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

'+
(
A co%p&ter %a+ perfor% a #&%,er of #et"or(
applicatio#s at t'e sa%e ti%e
(
FTP E 2MTP E HTTP8 etc;
(
Eac' co%p&ter 'as o#l+ o#e #et"or( aress8 'o"
ca# it ser!e so %a#+ applicatio#s at t'e sa%e ti%eF
Port M&lt!$le+!n3
/% $ort ,&lt!$le+!n3
9et%ork add:
1*-.1#'.1+1...
Port '1
Port '*
Port -/
B2P
012P
H22P
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

',
Well8known Port N&,/er"
(
2o%e port #&%,ers are reser!e for so%e
p&rposes
(
Port 2<9 FTP file tra#sfer
(
Port 2@9 2MTP %ail tra#sfer
(
Port 2>9 TELNET re%ote lo$i#
(
Port A=9 HTTP -e, access
(
T'ese port #&%,ers are "ell (#o"# to all
co%p&ters i# t'e #et"or(
(
E;$; "'e#e!er a clie#t access port 2@ of t'e ser!er8
it %ea#s t'e clie#t #ees 2MTP ser!ice
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

'-
Client 012P 0erver
Located C: net%ork
address D 2CP !ort
no.
So&rce Port
9 57:;
De"t!nat!on
Port 9 6:
Se2&ence N&,/er
Acknowle'3e,ent
N&,/er
Ceck"&,
Me""a3e Data
012P !ort
E 1#*,
012P !ort
E '*
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

'.
Client 3 012P D B2P 0erver
Client F
012P !ort
E 1#*,
B2P !ort
E 1#+1
9et%ork address:
1*-.1#'.1+1...
012P !ort
E '*
B2P !ort
E '1
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

#/
Network (a%er
A$$l!cat!on
Tran"$ort
Network
Network Interface
1essage
0eg$ents
' M ' M ' M
' M ' ' M ' ' M '
<atagra$s " Packets
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

#1
*. Network A''re""e" an'
S&/net"
(
A 'eaer is ae to eac' se$%e#t i# t'e
Net"or( la+er
IP
7
Total
(en3t
T!,e to
(!4e
Protocol Hea'er
CeckS&,
So&rce A''re""
De"t!nat!on A''re""
Se3,ent
0eg$ent
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

#'
(
Total Le#$t' Total le#$t' of a pac(et 0&p to
B@@>@ ,+tes1
(
Ti%e to Li!e Ho" %a#+ ti%es t'is pac(et ca#
,e ro&te o# t'e #et"or( 0&p to 2@@1
(
Protocol T'e tra#sport la+er protocol t'at t'e
pac(et ,elo#$s to
(
TCP9 B
(
3:P9 <6
(
ICMP9 <
(
2o&rce aress t'e #et"or( aress of t'e
co%p&ter t'at se#s t'e ata
(
:esti#atio# aress t'e #et"or( aress of
t'e co%p&ter t'at t'e ata is se#i#$ to
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

##
(
0Alrea+ %e#tio#e1
(
Eac' co%p&ter 0'ost1 %&st 'a!e a &#i/&e
#et"or( aress 0or IP aress for TCP/IP s&ite1
(
Eac' IP aress is >27,it lo#$ 0fo&r ,+tes1
(
T'e fo&r7,+te aress is "ritte# o&t as a;,;c;
(
e;$;
Fte 1 Fte ' Fte # Fte )
1*- 1#' 1+1 ..
(
IP aresses are 'ierarc'ical
(
#et"or( I;:; a# 'ost I;:;
(
Eac' Net"or( I;:; o# t'e I#ter#et #ees to ,e
re$istere to t'e I#ter#et Assi$#e N&%,er
A&t'orit+
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

#)
9et I.<.
Cla"" A 1 for 4er% lar3e network
Host I.<. /
1 Cit , Cits ') Cits
(
O#l+ 2
6
0B>1 #et"or(s ca# ,elo#$ to t'is class
(
Eac' #et"or(8 t'ere are 2
24
'osts or co%p&ters
(
Ger+ fe" class A #et"or(s i# t'e "orl
(
e;$; Arpa#et t'e earliest pac(et s"itc'e
-AN 0starte 4= +ears a$o1
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

#*
9et I.<.
Cla"" ) 1 for ,e'!&, "!<e network
Host I.<. /
' Cits 1) Cits 1+ Cits
(
2
<4
0<B>A41 #et"or(s ca# ,elo#$ to t'is class
(
Eac' #et"or(8 t'ere are 2
<B
0B@@>B1 'osts or
co%p&ters
(
Pol+&Hs aress ,elo#$s to t'is $ro&p
(
e;$; <@A;<>2;<4;<
1
<=/1 111/
1/// /1// //// 111/ //// ///1
9et%ork I.<. Host I.<.
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

#+
Cla"" C 1 for ",all network
9et I.<. Host I.<. /
# Cits '1 Cits - Cits
(
2
2<
#et"or(s ca# ,elo#$ to t'is class
(
Eac' #et"or(8 t'ere are o#l+ 2
A
02@B1 'osts or
co%p&ters
1 1
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

#,
Cla"" D 1 for ,&lt!ca"t network
Grou! no. /
) Cits '- Cits
(
Pac(ets are aresse to a %&lticast $ro&p
(
Not ofte# s&pporte o# I#ter#et
1 1 1
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

#-
S$ec!al A''re""e"
(
Host I;:; I all J<Hs :irecte ,roacast
)5roacast to all 'osts i# t'e #et"or( or
s&,#et"or(*8 #ot assi$#e
(
Host I;:; I all J=Hs )T'is #et"or(*8 #ot
assi$#e
(
Net"or( I;:; I <26 is reser!e for loop,ac( a#
ia$#ostic p&rposes8 #ot assi$#e
(
Net"or( I;:; E Host I;:; I all J<Hs Li%ite
,roacast
)5roacast to all 'osts i# t'e c&rre#t #et"or(*8
#ot assi$#e
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

#.
S&/net"
(
A class 5 aress ca# 'a!e B@@>B 'osts
(
:iffic&lt to %a#a$e
(
3s&all+ s&,i!ie i#to a fe" s%all s&,#ets
(
2&,#etti#$ ca# also 'elp to re&ce ,roacasti#$
traffic
3ll traffic to
1*-.1#'././
1*-.1#'././
2otal +**#+ hosts
Router
Router
3ll traffic to
1*-.1#'././
1*-.1#'.1./
1*-.1#'.'./
1*-.1#'.#./
Hach suCnet '*+ hosts
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

)/
S&/net Ma"k
(
Ho" oes t'e ro&ter (#o" "'ic' s&,#et a pac(et
s'o&l $oF
(
For eac' i#terface of t'e ro&ter8 a s&,#et %as( is
pro!ie to reefi#e "'ic' part of t'e aress is
Net I: a# "'ic' part is Host I:
(
5eco%e classless aressi#$
A s&,#et %as(: '**.'**.'**./
<<<< <<<<;<<<< <<<<; <<<< <<<<. //// ////
I1Js 9et I< I/Js Host I<
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

)1
Router
3 !acket %ith
destination address
1*-.1#'.1.1/
S=
*=
S5
S6
S= S5 S6
S&/net <@A;<>2;<;= <@A;<>2;2;= <@A;<>2;>;=
Ma"k 2@@;2@@;2@@;= 2@@;2@@;2@@;= 2@@;2@@;2@@;=
Ro&t!n3 Ta/le
<@A;<>2; <; <=
AN: 2@@;2@@;2@@; =
<@A;<>2; <; =
5:>.576.5.5=
<==< <<<=;<=== =<==;==== ===<;==== <=<=
AN: <<<< <<<<;<<<< <<<<;<<<< <<<<;==== ====
<==< <<<=;<=== =<==;==== ===<;==== ====
A!a#ta$e9 eas+ to co%p&te
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

)'
F. Ro&t!n3
(
Ho" a pac(et fi#s its "a+ to a co%p&ter i# a
#et"or(F
(
5+ &si#$ Ro&ters
(
Ro&ti#$ is t'e selectio# of a pat' to $&ie a
pac(et fro% t'e so&rce to t'e esti#atio#
(
Criteria i# selecti#$ a pat' %a+ ,e9
(
2'ortest pat'
(
K&ic(est pat'
(
C'eapest pat'
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

)#
Hong ;ong
1*-.1#'.1+1...
U.0.
'1'.+).1'#..-
router
Internet
2he red !ath is the
shortest !ath
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

))
(
Eac' ro&ter 'as a ta,le t'at recors t'e
esti%ate ista#ce to all ot'er ro&ters
(
If a ro&ter (#o"s t'e e#tire #et"or( topolo$+8
t'e s'ortest pat' ca# ,e calc&late
(
To ac'ie!e t'is8 ro&ters ,roacast Li#( 2tate
A!ertise%e#t to all ot'er ro&ters perioicall+
(
5+ %ea#s of ro&ti#$ protocol
(
Eac' ro&ter (#o"s t'e e.act topolo$+8 a# t'e#
calc&lates t'e s'ortest pat'
(
I# practice8 it is #ot possi,le for a ro&ter to all
pat's; O#l+ t'e #earer o#es are (ept
(
He#ce ca# $i!e "ro#$ esti%atio#
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

)*
Ho"t A
5:>.576.5?>.@@
Defa&lt 3atewa%- Ro&ter C
Ho"t )
5@=.@?.567.9>
Ro&ter C
S=
T5
T5
S5
T=
S5
S5
T=
S=
T=
T=
Ro&ter A
S&/net
5@=.@?.567.=
Ro&ter )
Ro&t!n3 Ta/le
S&/net
5:>.576.5@@.=
01 1*-.1#'.1++./
'**.'**.'**./
<irect
21 1+/. +). /. /
'**.'**. /. /
Bor%ard
S&/net
5@=.@?.56?.=
Ro&t!n3 Ta/le
S=
0/
01
1+/. +).1')./
'**.'**.'**./
1+/. +).1'#./
'**.'**.'**./
<irect
<irect
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

)+
<; Host A "a#ts to se# a pac(et to Host 5 "it' aress
<B=;B4;<2>;CA
2; Host A c'ec(s t'at <B=;B4;<2>;CA is #ot i# t'e sa%e
#et"or(
>; 2e# pac(et to efa&lt $ate"a+ 0Ro&ter C1
4; :efa&lt $ate"a+ fi#s t'at it ca##ot pro!ie t'e ,est
ro&te for t'e pac(et8 i#for% Host A to se# t'e
pac(et to Ro&ter A #e.t ti%e
@; Ro&ter C se#s t'e pac(et to Ro&ter A
B; Ro&ter A c'ec(s fro% t'e ta,le t'e pac(et s'o&l
for"ar to Ro&ter 5
6; Ro&ter 5 recei!es t'e pac(et a# c'ec(s i# its ta,le
t'e pac(et s'o&l irectl+ eli!er to s&,#et
<B=;B4;<2>;=
A; Host 5 0<B=;B4;<2>;CA1 recei!es t'e pac(et
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

),
Data (!nk an'
P%"!cal (a%er"
A$$l!cat!on
Tran"$ort
Network
Network Interface
1essage
0eg$ents
' M ' M ' M
' M ' ' M ' ' M '
Packets
' M ' ' M ' ' '
Bra$es
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

)-
A. *ternet *nca$"&lat!on an'
ARP
(
A# IP pac(et s'o&l ,e e#caps&late i#to a
fra%e for tra#s%issio# ,+ ata li#( la+er
(
e;$; if Et'er#et 0or IEEE A=2;>1 is &se9
Preamble Des. Add Sour. Add Length IP Packet FCS
;
)%te"
6/@
)%te"
6/@
)%te"
6
)%te"
?@ 8 5:== )%te" ?
)%te"
5
)%te
I*** >=6.7 Fra,e
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

).
(
O#l+ t'e 'ar"are aress 0MAC aress1 is
&#i/&e to a 'ost
(
Nee to co#!ert a #et"or( aress to MAC
aress
Hthernet
Et'er#et
Fra%e
Hthernet address E @
Pac(et
<estination IP E 1*-.1#'.1)-.1#' 0ource IP E
1*-.1#'.1)-.++
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP
Pac(et

*/
ARP 1 A''re"" Re"ol&t!on Protocol
1. Froadcast: ?ho has got IP address
1*-.1#'.1)-.1#'@ ?hatJs our
Hthernet address@
'. Re!l: I do. 1 Hthernet address is
//&+/&-C&)1&#,&*'
Case 1
Et'er#et Fra%e
#.
Hthernet address E //&+/&-C&)1&#,&*'
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

*1
ARP 1 A''re"" Re"ol&t!on Protocol
Case '
1. Froadcast: ?ho has got IP address
1*-.1#'.1)-.1#'@ ?hatJs our
Hthernet address@
'. Re!l: 2he IP ou indicated is not in our net%ork.
Aou can give the !acket to $e first. 1 13C address
is //&+/&-C&1'&#)&*+
Ro&ter
#.
Et'er#et Fra%e
Hthernet address E //&+/&-C&1'&#)&*+
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

*'
ARP Cace
(
-ill 'a!e a 'ea!+ traffic if so %a#+ ARP
,roacast %essa$es are $e#erate
(
Eac' 'ost "ill 'a!e a cac'e to store t'e
%appi#$s 0fro% IP to MAC aress1 t'at "ere
o,tai#e ,efore
(
A# e#tr+ "ill o#l+ ,e (ept i# t'e cac'e for a
li%ite a%o&#t of ti%e 0sa+8 2 %i#&tes1
IP A''re"" MAC A''re""
5:>.576.5?>.>= ==8@=8>C86;87:89A
5:>.576.5?>.6> =68@=8>C85A87;8?9
ENG224
INFORMATION TECHNOLOGY Part I
9. TCP/IP

Você também pode gostar