Documente Academic
Documente Profesional
Documente Cultură
1/23/2014
2-1
1/23/2014
2-2
TCP, UDP
Device Drivers
source
message segment
Ht M M M M
Enca"%u#ati(n
datagram Hn Ht frame Hl Hn Ht
destination
M Ht Hn Ht Hl Hn Ht M M M
Hn Ht Hl Hn Ht
M M
Hn Ht
router
1/23/2014
1.4 2-4
Each #ayer: &i%tri)ute& 2entitie%3 i!"#e!ent #ayer 'uncti(n% at each n(&e entitie% "er'(r! acti(n%1 e change !e%%age% +ith "eer%
1/23/2014
application transport network link physical application transport network link physical network link physical
2-5
E0g0: tran%"(rt take &ata 'r(! a"" a&& a&&re%%ing1 re#ia)i#ity check in'( t( '(r! 2%eg!ent%3 %en& %eg!ent% t( "eer +ait '(r "eer 1/23/2014 t( ack recei"t
2-6
data application transport network link physical application transport network link physical network link physical data application transport network link physical
1/23/2014
2-7
1/23/2014
2-8
1/23/2014
2-9
B A 1 PS1 3 2 PS2
1 2 3 1
-
12 63 7 97
-
3 1 2 3
-
22 18 17
PS3
87
-
PS4
1/23/2014
2-10
O*er*ie+:
#ink #ayer %er*ice% 6ra!ing err(r &etecti(n : c(rrecti(n !u#ti"#e acce%% "r(t(c(#% ,!e&iu! %haringL.N techn(#(gy #ink #ayer a&&re%%ing : .RP hu)%1 )ri&ge%1 %+itche% %"eci'ic #ink #ayer techn(#(gie%: Ethernet $EEE ;020<< L.N
1/23/2014
2-11
1/23/2014
2-12
M Ht M Hn Ht M Hl Hn Ht M
Hl Hn Ht M frame
2: Data Link Layer 2-13
1/23/2014
1/23/2014
2-14
Link Layer Ser*ice% ,c(nt001 ow Contro # pacing /etween sen!er an! recei"er 9 earne! in 7ransport ayer: +rror -etection# errors cause! /y signa attenuation$ noise' recei"er !etects presence of errors# 4 signa s sen!er for retransmission or !rops frame +rror Correction# recei"er i!entifies an! corrects /it error9s: without resorting to retransmission
1/23/2014 2: Data Link Layer 2-15
N(&e%
N(&e% are ('ten genera# "ur"(%e c(!"uter% (r +(rk %tati(n% Can )e en& h(%t% (r can )e c(n'igure& t( )e r(uter% Each n(&e c(nnect% t( the net+(rk *ia a net+(rk a&a"t(r0The a&a"t(r %it% (n the %y%te! $/O )u% an& &e#i*er% &ata )et+een +(rk%tati(n=% !e!(ry an& net+(rk #ink0 . %('t+are !(&u#e running (n the +(rk %tati(n ,&e*ice &ri*er- !anage% the a&a"t(r
1/23/2014
2-16
M Ht Hn Ht Hl Hn Ht
Hl Hn Ht M frame
2-17
Adaptors Communicating
datagram sending node frame adapter link layer protocol frame adapter rcving node
receiving side
looks for errors, rdt, flow control, etc extracts datagram, passes to rcving node
sending side:
encapsulates datagram in adapter is semiautonomous a frame adds error checking bits, link & physical layers rdt, flow control, etc.
2: Data Link Layer 2-18
1/23/2014
1/23/2014
2-19
Si!"#e%t net+(rk "(%%i)#e1 c(n%i%ting (' t+( h(%t% an& (ne #ink L((k int( &i''erent 'uncti(n% at the #ink #e*e#
Enc(&ing 6ra!ing Err(r &etecti(n/c(rrecti(n Re#ia)#e &e#i*ery Me&ia acce%% c(ntr(#
Host A
physical Link
Host B
1/23/2014
2-20
Enc(&ing
Ma" )inary )it% int( %igna#% E a!"#e: L(+ %igna# re"re%ent% a 01 high %igna# re"re%ent% a < N(nReturn5t(5>er( ,NR>-
Pr()#e!: L(ng "eri(&% (' %i#ence ,?er(- (r high %igna#% are "(%%i)#e
C#(ck rec(*ery ,recei*er #(%e% c#(ck %ynchr(ni?ati(n-
1/23/2014
1/23/2014
2-22
2-23
1/23/2014
2-24
6ra!ing
The "r(ce%% (' gr(u"ing )it% int( 'ra!e% ,!e%%age% (r "acket%Ty"ica##y i!"#e!ente& )y the net+(rk a&a"t(r Why 'ra!e%C
1/23/2014
SDN: Synchr(ni?ati(n character SOE: Start (' hea&er ST71 ET7: Start (' te t1 En& (' te t CRC: Cyc#ic re&un&ancy check AEF$N Marker )it %trea! can a""ear in the 'ra!e
1/23/2014 2: Data Link Layer 2-26
C(unt: S"eci'ie% G (' )yte% in the )(&y CRC en%ure% that c(unt 'ie#& i% n(t c(rru"te&
1/23/2014 2: Data Link Layer 2-27
Aeginning/en& (' 'ra!e1 '#ag: 0<<<<<<0 $n%tea& (' in%erting )yte% &( )it %tu''ing Sen&er a&&% a 0 a'ter 'i*e c(n%ecuti*e <% Recei*er re!(*e% ?er( a'ter 'i*e <%
1/23/2014
2-28
0 0 0 Recei*er 0 <<<<<0<0<<<<<0<<<<<0<0<<<<<00
Length (' 'ra!e 9aria)#e1 &e"en&% (n the &ata We can ca#cu#ate an& ("ti!i?e the (*erhea& (' )it %tu''ing
1/23/2014
2-29
<0M
<05<@ I 8
<05M
2: Data Link Layer 31
1/23/2014
Err(r Detecti(n
EDC= Error Detection and Correction bits (redundancy) D = Data protected by error checking may include header fields Error detection not !""# reliable$ protocol may miss some errors but rarely larger EDC field yields better detection and correction
1/23/2014
2-33
Err(r Detecti(n
Sing#e "arity check%
.""en& a %ing#e "arity )it at en& (' 'ra!e0 Parity i% < i' G (' (ne% i% (&&1 an& ?er( (ther+i%e E a!"#e: 0 < < 0 < 0 < 0 < < 0 0 "arity Sing#e "arity check can &etect any (&& G (' err(r% Cann(t te## +here the err(r t((k "#ace (r h(+ !any (ccurre& N(t u%e'u# '(r )ur%t err(r%
1/23/2014 2: Data Link Layer 2-34
$nternet check%u!
%oal& detect 'errors( (e)g) flipped bits) in transmitted segment Sen&er:
treat %eg!ent c(ntent% a% %e4uence (' <O5)it integer% check%u!: a&&iti(n ,<=% c(!"#e!ent %u!- (' %eg!ent c(ntent% %en&er "ut% check%u! *a#ue int( UDP check%u! 'ie#&
1/23/2014
Recei*er:
c(!"ute check%u! (' recei*e& %eg!ent check i' c(!"ute& check%u! e4ua#% check%u! 'ie#& *a#ue: NO 5 err(r &etecte& DES 5 n( err(r &etecte&0 P0
2-35
,epresent 9nA1:-/it messages as n !egree po ynomia s +>amp e# 1<<11<1< maps to >7 A >B A >3 A >1 7he /its of the message to /e transmitte! /ecome the coefficients of the po ynomia
1/23/2014 2: Data Link Layer 36
P(#yn(!ia# .rith!etic
.ny "(#yn(!ia# A, - i% &i*i%i)#e )y a "(#yn(!ia# C, - i' &eg,A- Q &eg,C- C, - i% ca##e& the &i*i%(r $' C, - an& A, - are (' the %a!e &egree1 the re!ain&er i% ()taine& )y %u)tracting C, - 'r(! A, M(&u#( 2 arith!etic1 %u)tracti(n i% an 7OR ("erati(n )et+een c(e''icient% E a!"#e A, - I 3 J <1 C, - I 3 J 2 J < Re!ain&er: R, - I 2 A, - I <00<1 C, - I<<0<1 R, - I 0<00 ,7OR (' A, -1 C, -2: Data Link Layer 2-37
1/23/2014
CRC Ca#cu#ati(n
F(a#: 6(r !e%%age M, -1 an& &i*i%(r C, -1 c(n%truct "(#yn(!ia# P, - that i% &i*i%i)#e )y C, C, - kn(+n t( )(th %en&er an& recei*er Pr(ce%%:
Ste" <: !u#ti"#y M, - )y k ,a&& k ?er(% at the en& (' !e%%agean& ()tain T, - 0 k i% the &egree (' C, -0 Ste" 2: Di*i&e T, - )y C, Ste" 3: Su)tract the re!ain&er R, - 'r(! T, -0 Ste" @: O)tain P, - I M, -RR, - &i*i%i)#e )y C, -
1/23/2014
2-38
J<
1/23/2014
2-39
c(e''icient% are
n(n?er(1 a## %ing#e5)it err(r% &etecte& D(u)#e5)it err(r%: C, - ha% a 'act(r +ith at #ea%t 3 ter!% O&& nu!)er err(r%: C, - c(ntain% the 'act(r , J<-
1/23/2014
2-40
C, >8 A >2 A > A 1 >1< A >9 A >@ A >B A > A 1 >12 A >11 A >3 A >2 A 1 >16 A >1@ A >2 A 1 >16 A >12 A >@ A 1 >32 A >26 A >23 A >22 A >16 A >12 A >11 A >1< A >8 A >7 A >@ A >B A >2 A > A1
1/23/2014
2-41
M.C Pr(t(c(#%: a ta (n(!y Three )r(a& c#a%%e%: Channe# Partiti(ning &i*i&e channe# int( %!a##er 2"iece%3 ,ti!e %#(t%1 're4uencya##(cate "iece t( n(&e '(r e c#u%i*e u%e Ran&(! .cce%% a##(+ c(##i%i(n% 2rec(*er3 'r(! c(##i%i(n% 2Taking turn%3 tight#y c((r&inate %hare& acce%% t( a*(i& c(##i%i(n%
1/23/2014
2-44
1/23/2014
2-45
t+( (r !(re tran%!itting n(&e% 2c(##i%i(n31 ran&(! acce%% M.C "r(t(c(# %"eci'ie%:
h(+ t( &etect c(##i%i(n% h(+ t( rec(*er 'r(! c(##i%i(n% ,e0g01 *ia &e#aye& retran%!i%%i(n%-
S#(tte& .LOE.
.%%u!"ti(n% a## 'ra!e% %a!e %i?e ti!e i% &i*i&e& int( e4ua# %i?e %#(t%1 ti!e t( tran%!it < 'ra!e n(&e% %tart t( tran%!it 'ra!e% (n#y at )eginning (' %#(t% n(&e% are %ynchr(ni?e& i' 2 (r !(re n(&e% tran%!it in %#(t1 a## n(&e% &etect c(##i%i(n
1/23/2014
O"erati(n +hen n(&e ()tain% 're%h 'ra!e1 it tran%!it% in ne t %#(t n( c(##i%i(n1 n(&e can %en& ne+ 'ra!e in ne t %#(t i' c(##i%i(n1 n(&e retran%!it% 'ra!e in each %u)%e4uent %#(t +ith "r()0 " unti# %ucce%%
2: Data Link Layer 2-47
1/23/2014
2-48
1/23/2014
5: DataLink Layer
2-49
S I Pr() ,e act#y (ne tran%!it%- I N " ,<5"- ,N5<T( ()tain !a i!u! e''iciency1 O"ti!a# *a#ue (' " : " I </N 6(r e a!"#e1 i' NI21 S!a I 08 6(r N *ery #arge (ne 'in&% SI </e ,a""r( i!ate#y1 03M2: Data Link Layer
1/23/2014
2-50
Pure .LOE.
S#(tte& .LOE. re4uire% %#(t %ynchr(ni?ati(n . %i!"#er *er%i(n1 "ure .LOE.1 &(e% n(t re4uire %#(t% . n(&e tran%!it% a 're%h 'ra!e i!!e&iate#yT retran%!it% a c(##i&e& 'ra!e i!!e&iate#y +ith "r() " (r a'ter a 'ra!e &urati(n +ith "r() ,<5"C(##i%i(n "r()a)i#ity increa%e% ,'ra!e can c(##i&e +ith (ther 'ra!e% +hich are tran%!itte& +ithin a +in&(+ t+ice a% #arge a% in S5.#(haframe sent at t" collides with other frames sent in +t"* ! t",!Thr(ugh"ut i% re&uce& )y (ne ha#'1 i0e01 SI </2e
1/23/2014
2-51
C(##i%i(n% Occurence
Packet% arri*a#: P(i%%(n +ith rate F V W "acket%/t0
t t1 t2 t3 t4
retransmission 9u#nera)#e "eri(&: 2t
t5
collision
1/23/2014
2-53
.#(ha Thr(ugh"ut
Pr()a)i#ity that k 'ra!e% are generate& +ithin the unit (' ti!e t k e Gt (Gt ) G k e G , P [N (t ) = k ] = P [N (1 ) = k ] = k! k! Pr()a)i#ity that n( tra''ic i% generate& +ithin 2t
P [N (2 ) = 0 ] = e 2 G
1/23/2014
2-55
CSM. ,Carrier Sen%e Mu#ti"#e .cce%%CSM.: #i%ten )e'(re tran%!it: $' channe# %en%e& i&#e: tran%!it entire 'ra!e $' channe# %en%e& )u%y1 &e'er tran%!i%%i(n
1/23/2014
5: DataLink Layer
2-56
Carrier %en%e !u#ti"#e acce%% ,CSM.CSM.: #i%ten )e'(re tran%!it0 $' channe# i% %en%e& )u%y1 &e'er tran%!i%%i(n Per%i%tent CSM.: retry i!!e&iate#y +ith "r()a)i#ity " +hen channe# )ec(!e% i&#e ,thi% !ay cau%e in%ta)i#ityN(n "er%i%tent CSM.: retry a'ter ran&(! inter*a# N(te: c(##i%i(n% !ay %ti## e i%t1 %ince t+( %tati(n% !ay %en%e the channe# i&#e at the %a!e ti!e $n ca%e (' c(##i%i(n1 the entire 'ra!e tran%!i%%i(n ti!e i% +a%te&
1/23/2014 2: Data Link Layer 2-57
CSM. c(##i%i(n%
spatial layout of nodes
collision& note&
entire packet transmission time wasted role of distance / propagation delay in determining collision probability
1/23/2014
2-58
CSM./CD ,C(##i%i(n Detecti(nCSM./CD: carrier %en%ing an& &e'erra# #ike in CSM.0 Aut1 c(##i%i(n% are &etecte& +ithin a 'e+ )it ti!e%0 Tran%!i%%i(n i% then a)(rte&1 re&ucing the channe# +a%tage c(n%i&era)#y0 Ty"ica##y1 "er%i%tent retran%!i%%i(n i% i!"#e!ente& C(##i%i(n &etecti(n i% ea%y in +ire& L.N% ,e0g01 Ethernet-: !ea%ure %igna# %trength%1 c(!"are tran%!itte&1 recei*e& %igna#% C(##i%i(n &etecti(n &i''icu#t in +ire#e%% L.N% ,recei*er %hut ('' +hi#e tran%!itting1 t( a*(i& &a!aging it +ith e ce%% "(+erCSM./CD can a""r(ach channe# uti#i?ati(n I< in L.N% ,#(+ rati( (' "r("agati(n (*er "acket tran%!i%%i(n ti!e1/23/2014 2: Data Link Layer 2-59
1/23/2014
2-60
1/23/2014
2-61
1/23/2014
2-62
0oken passing& control token passed from one node to ne1t se2uentially) token message concerns&
token overhead latency single point of failure (token)
1/23/2014
2-63
Ethernet
2&(!inant3 +ire& L.N techn(#(gy: 'ir%t +i&e#y u%e& L.N techn(#(gy Si!"#er1 chea"er than t(ken L.N% an& .TM Ke"t u" +ith %"ee& race: <0 M)"% K <0 F)"%
1/23/2014
2-64
Ae'(re atte!"ting a retran%!i%%i(n1 a&a"ter +ait% a ran&(! ti!e1 that i%1 ran&(! acce%%
2-65
C(##i%i(n Detecti(n
+>amp e Co!e *3s message reaches no!e E at time 7 Co!e E3s message reaches no!e * at time 27 1or no!e * to !etect a co ision$ no!e * must sti /e transmitting at time 27
$EEE ;0203
4 27 is /oun!e! to @1'2ms 4 *t 1<)/ps @1'2ms F @12/ or 6B F @12/ or 6BE 4 (ac0et ength shou ! /e greater than 6BE Gam after co ision +nsures that a hosts notice the co ision
1/23/2014 2: Data Link Layer 2-68
C(##i%i(n Detecti(n
1/23/2014
2-69
Retran%!i%%i(n
How ong shou ! a host wait to retry after a co ision; Ihat happens if the host waits too ong; J Iaste! /an!wi!th Ihat happens if the host !oesn3t wait ong enough; J )ore co isions +thernet .o ution Einary e>ponentia /ac0off 4 )a>imum /ac0off !ou/ es with each fai ure
1/23/2014
2-70
Ethernet=% CSM./CD ,!(re[a! Signa#: !ake %ure a## (ther tran%!itter% are a+are (' c(##i%i(nT @; )it% Ait ti!e: 0< !icr(%ec '(r <0 M)"% Ethernet T '(r KI<0231 +ait ti!e i% a)(ut 80 !%ec E "(nentia# Aack('': F(a#: a&a"t retran%!i%%i(n atte!"t% t( e%ti!ate& current #(a&
hea*y #(a&: ran&(! +ait +i## )e #(nger
'ir%t c(##i%i(n: ch((%e K 'r(! X01<YT &e#ay i% KZ 8<2 )it tran%!i%%i(n ti!e% a'ter %ec(n& c(##i%i(n: ch((%e K 'r(! X01<1213YP a'ter ten c(##i%i(n%1 ch((%e K 'r(! X01<12131@1P1<023Y
2: Data Link Layer 2-71
1/23/2014
C(##i%i(n%
W(r%t ca%e %cenari( ,a- . %en&% a 'ra!e at ti!e t ,)- .=% 'ra!e arri*e% at A at ti!e tJ& ,c- A )egin% tran%!itting at ti!e tJ& an& c(##i&e% +ith .=% 'ra!e ,&- A=% runt 'ra!e arri*e% . at ti!e tJ 2&
1/23/2014
(a)
(b)
(c)
(d)
2-72
CSM./CD e''iciency
T"r(" I !a "r(" )et+een 2 n(&e% in L.N ttran% I ti!e t( tran%!it !a 5%i?e 'ra!e
efficiency =
1 1 + 5t prop / ttrans
E''iciency g(e% t( < a% t"r(" g(e% t( 0 F(e% t( < a% ttran% g(e% t( in'inity Much )etter than .LOE.1 )ut %ti## &ecentra#i?e&1 %i!"#e1 an& chea" M(re &etai#% a)(ut \Ethernet= #ater
1/23/2014
2-73
7ermino ogy
*c0now e!gement 9*CK: ,ecei"er te s the sen!er when a frame is recei"e! 4 .e ecti"e ac0now e!gement 9.*CK: Specifies set of frames received 4 Cumu ati"e ac0now e!gement 9*CK: Have received specified frame and all previous 4 Cegati"e ac0now e!gement 9C*K: Receiver refuses to accept frame now, e.g., when out of buffer space 7imeout 97O: 4 .en!er !eci!es the frame 9or *CK: was ost 4 .en!er can try again
1/23/2014 2: Data Link Layer 2-75
1/23/2014
2-77
1/23/2014
2-78
1/23/2014
2-79
1/23/2014
2-80
1/23/2014
2-81
1/23/2014
2-82
1/23/2014
2-83
St(" an& Wait Pr(t(c(# .#g(rith! at %en&er ,n(&e .,+ith initia# c(n&iti(n SNI01: *ccept pac0et from higher ayer when a"ai a/ eM assign num/er .C to it 2: 7ransmit pac0et .C in frame with se?uence # .C 3: Iait for an error free frame from E if recei"e! an! it contains ,CN.C in the re?uest # fie !$ set .C to ,C an! go to 1 if not recei"e! within gi"en time$ go to 2
1/23/2014
2-84
St(" an& Wait .#g(rith! at recei*er ,n(&e A,+ith initia# c(n&iti(n RNI01: Ihene"er an error-free frame is recei"e! from *
with a se?uence # e?ua to ,C$ re ease recei"e! pac0et to higher ayer an! increment ,C'
2:
*t ar/itrary times$ /ut within /oun!e! !e ay after recei"ing any error free frame from *$ transmit a frame to * containing ,C in the re?uest # fie !'
1/23/2014
2-85
transmit
"
# microsec fraction of time " " &.&&&%. ;tili:ation " * " sender b,sy sendin+&.&&# msec
1KE p0t e"ery 3< msec -N 330ELsec throughput o"er 1 O/ps in0 networ0 protoco imits use of physica resources5
1/23/2014
2-86
tframe 2tprop+tframe 1 2 + 1
tprop tframe
1/23/2014
1/23/2014
1/23/2014
2-90
Stop-and-Wait Protocol Efficiency: with packet error P=Probability of biterror = Tprop/Tframe U=Tframe/[Nr(Tframe+2Tprop)] = 1/[Nr(1+2)] Nr= i Pi-1(1-P) =1/(1-P) U=(1-P)/(1+2) Ack
2: Data Link Layer
Tf Tp Nak
Nak
1/23/2014
2-91
Pi"e#ine& "r(t(c(#%
(ipe ining# sen!er a ows mu tip e$ %in-f ight&$ yetto-/e-ac0now e!ge! p0ts I!ea# * ow sen!er to transmit mu tip e p0ts /efore recei"ing an *CK$ there/y kee"ing the "i"e 'u##' 7here is an upper imit on the num/er of outstan!ing 9un-*CKe!: p0ts a owe!'
Sender Receiver
Time
1/23/2014
2-93
1/23/2014
2-95
1/23/2014
2-96
1/23/2014
2-97
1/23/2014
(ipe ine! proce!ure# processing of frame #1 happens e"en /efore the successfu reception of frame #< 9Cew tas0 /egin /efore the comp etion of o ! tas0: Ihen frame #3 un!ergoes transmission error$ recei"er ignores frame #3 an! a su/se?uent frames Ihen the transmission of current win!ow is o"er$ the transmitter %go /ac0 n& frames an! retransmit a the frames starting from frame #3
1/23/2014 2: Data Link Layer 2-99
1/23/2014
2-100
1/23/2014
2-101
1/23/2014
2-102
1/23/2014
2-104
1/23/2014
2-106
1/23/2014
2-107
N(te% (n FAN
,e?uires no /uffering of pac0ets at the recei"er .en!er must /uffer up to C pac0ets whi e waiting for their *CK .en!er must re-sen! entire win!ow in the e"ent of an error (ac0ets can /e num/ere! mo!u o ) where ) N C
Eecause at most C pac0ets can /e sent simu taneous y
N(te% (n FAN
7he maRor pro/ em with Oo Eac0 C is the nee! to resen! the entire win!ow when an error occurs' 7his is !ue to the fact that the recei"er can on y accept pac0ets in or!er Oo-Eac0-C can reco"er from missing frames Eut '''' It is wastefu 5 If there are errors$ the sen!er wi spen! time retransmitting frames the recei"er has a rea!y seen5
1/23/2014
2-109
Se#ecti*e Re"eat
recei"er in!i"i!ua y ac0now e!ges a correct y recei"e! p0ts /uffers p0ts$ as nee!e!$ for e"entua in-or!er !e i"ery to upper ayer sen!er on y resen!s p0ts for which *CK not recei"e! sen!er timer for each un*CKe! p0t sen!er win!ow C consecuti"e se? #3s again imits se? #s of sent$ un*CKe! p0ts
1/23/2014
2-110
1/23/2014
2-111
1/23/2014
2-112
1/23/2014
2-113
1/23/2014
2-114
1/23/2014
2-115
1/23/2014
2-117
/e0t consider the orderin- of arri1in- re2,est n,mbers (,sin- ordinary inte-ers) relati1e to the window at node 3.
1/23/2014
2-119
Co!e E has to !istinguish "a ues of .C in the entire range of a/o"e +?n'' 7his means that the mo!u us m must satisfy m N 2n$ for se ecti"e repeat'
1/23/2014 2: Data Link Layer 2-121 2-121
* computer nLw that is concentrate! in a geographica area 9e'g'$ in a /ui !ing or in a uni" campus:
+thernets# emp oy the C.)*LC- protoco M 1<)/ps 9I+++ 8<2'3:$ 1ast +-net 91<<)/ps:$ Oiga/it +-net 91$<<< )/ps:M /y far the most popu ar 6*C techno ogy 7o0en ,ings# I+++ 8<2'@ 9IE) to0en ring:$ up to 16)/psM 1--I 91i/er -istri/ute! -ata Interface:$ for Campus an! )etro connecti"ity$ up to 2<< stations$ at 1<<)/ps'
1/23/2014 2: Data Link Layer 2-122
L.N .&&re%%e%
32-/it I( a!!ress#
networ0- ayer a!!ress
use! to get !atagram to !estination networ0 9reca I( networ0 !efinition:
C(nt00
)*C a!!ress a ocation a!ministere! /y I+++ manufacturer /uys portion of )*C a!!ress space 9to assure uni?ueness: *na ogy# 9a: )*C a!!ress# i0e .ocia .ecurity Cum/er 9/: I( a!!ress# i0e posta a!!ress )*C f at a!!ress FN porta/i ity can mo"e 6*C car! from one 6*C to another I( hierarchica a!!ress CO7 porta/ e !epen!s on networ0 to which one attaches
1/23/2014 2: Data Link Layer 2-124
4
223.1.1.3 223.1.3.1 223.1.3.27
223.1.2.2 223.1.3.2
8P payload
frame
1/23/2014 2: Data Link Layer 2-125
776 97ime 7o 6i"e:# time after which a!!ress mapping wi /e forgotten 9typica y 2< min:
1/23/2014 2: Data Link Layer 2-126
.RP "r(t(c(#
* 0nows EVs I( a!!ress$ wants to earn physica a!!ress of E * /roa!casts *,( ?uery p0t$ containing EVs I( a!!ress a machines on 6*C recei"e *,( ?uery E recei"es *,( pac0et$ rep ies to * with its 9EVs: physica ayer a!!ress * caches 9sa"es: I(-to-physica a!!ress pairs unti information /ecomes o ! 9times out: soft state# information that times out 9goes away: un ess refreshe!
1/23/2014 2: Data Link Layer 2-127
Ethernet
History !e"e ope! /y Wero> (*,C in mi!-197<s roots in * oha pac0et-ra!io networ0 stan!ar!iTe! /y Wero>$ -+C$ an! Inte in 1978 simi ar to I+++ 8<2'3 stan!ar! .imp er$ cheaper than to0en 6*Cs an! *7) Kept up with spee! race# 1<$ 1<<$ 1<<< )/ps 6ength# 2@<<m 9@<<m segments with B repeaters:
1/23/2014
2-128
(ream/ e# 7 /ytes with pattern 1<1<1<1< fo owe! /y one /yte with pattern 1<1<1<11 use! to synchroniTe recei"er$ sen!er c oc0 rates
1/23/2014
2-129
Ethernet 6ra!e Structure ,!(re*!!resses# uni?ue$ B8-/it 96 /ytes: unicast a!!ress assigne! to each a!aptor frame is recei"e! /y a a!apters on a 6*C an! !roppe! if a!!ress !oes not match e>amp e# 8#<#2/#eB#/1#2 /roa!cast# a 1s mu ticast# first /it is 1 7ype# in!icates the higher ayer protoco $ most y I( /ut others may /e supporte! such as Co"e I(W an! *pp e7a 0: Eo!y 9pay oa!:# B6 to 1@<< Eytes 9 ower /oun! frame siTe 6B /ytes 9B6A18: J @1'2 s roun! trip !e ay of 2@<< m of ca/ e: C,C# chec0e! at recei"er$ if error is !etecte!$ the frame is simp y !roppe!
1/23/2014
2-130
repeaters use! to connect up to mu tip e segments repeater repeats /its it hears on one interface to its other interfaces# physica ayer !e"ice on y5
1/23/2014 2: Data Link Layer 2-131
1/23/2014
2-132
1/23/2014
2-133
Eu)% 5 <
Phy%ica# Layer &e*ice%: e%%entia##y re"eater% ("erating at )it #e*e#%: re"eat recei*e& )it% (n (ne inter'ace t( a## (ther inter'ace% Eu)% can )e arrange& in a hierarchy ,(r !u#ti5 tier &e%ign-1 +ith )ack)(ne hu) at it% t("
1/23/2014
2-134
Eu)% 5 2
Each c(nnecte& L.N re'erre& t( a% L.N %eg!ent Eu)% &( n(t i%(#ate c(##i%i(n &(!ain%: n(&e !ay c(##i&e +ith any n(&e re%i&ing at any %eg!ent in L.N Eu) .&*antage%:
%i!"#e1 ine "en%i*e &e*ice Mu#ti5tier "r(*i&e% grace'u# &egra&ati(n: "(rti(n% (' the L.N c(ntinue t( ("erate i' (ne hu) !a#'uncti(n% e ten&% !a i!u! &i%tance )et+een n(&e "air% ,<00! "er Eu)1/23/2014 2: Data Link Layer 2-135
Eu) #i!itati(n%
Sing#e c(##i%i(n &(!ain re%u#t% in n( increa%e in !a thr(ugh"ut
1/23/2014
2-136
S+itch
Link Layer &e*ice%: ("erate (n Ethernet 'ra!e%1 e a!ining 'ra!e hea&er an& %e#ecti*e#y '(r+ar&ing 'ra!e )a%e& (n it% &e%tinati(n Ari&ge i%(#ate% c(##i%i(n &(!ain% %ince it )u''er% 'ra!e% When 'ra!e i% t( )e '(r+ar&e& (n %eg!ent1 )ri&ge u%e% CSM./CD t( acce%% %eg!ent an& tran%!it
1/23/2014
2-137
Forwarding
! < = switch
hub
hub
hub
How do determine onto which >8? segment to forward frame@ >ooks like a routing problem)))
1/23/2014 2: Data Link Layer 2-138
Self learning
A switch has a switch table entry in switch table: (MAC Address, Interface, Time Stamp) stale entries in table dropped (TTL can be 60 min) switch learns which hosts can be reached through which interfaces when frame received, switch learns location of sender: incoming LAN segment records sender/location pair in switch table
1/23/2014
2-139
Filtering/Forwarding
When switch receives a frame: index switch table using MAC dest address if entry found for destination then{ if dest on segment from which frame arrived then drop the frame else forward the frame on interface indicated } else flood
Switch example
Suppose C sends frame to D
switch < 8 A C hub D E = hub B hub 3 % H address interface 8 A E % ! ! < =
frame received by D
1/23/2014 2: Data Link Layer 2-141
1/23/2014
collision domain
collision domain
2-142
S+itch
a&*antage%:
$%(#ate% c(##i%i(n &(!ain% re%u#ting in higher t(ta# !a thr(ugh"ut1 an& &(e% n(t #i!it the nu!)er (' n(&e% n(r ge(gra"hica# c(*erage Can c(nnect &i''erent ty"e Ethernet %ince it i% a %t(re an& '(r+ar& &e*ice Tran%"arent: n( nee& '(r any change t( h(%t% L.N a&a"ter%
1/23/2014 2: Data Link Layer 2-143
Institutional network
to e1ternal network router switch mail server web server
3C subnet
hub
hub
hub
1/23/2014
2-144
routers maintain routing tables, implement routing algorithms switches maintain switch tables, implement filtering, learning algorithms
1/23/2014
2-146
$EEE ;020<< ,c(nt00un icense! fre?uency spectrum# 9<<)hT$ 2'BOhT Aa%ic Ser*ice Set ,ASS- 9a'0'a' %ce &: contains# wire ess hosts access point 9*(:# /ase station E..3s com/ine! to form !istri/ution system 9-.: .& h(c net+(rk# I+++ 8<2'11 stations can !ynamica y form networ0 without *(
.& h(c net+(rk
1/23/2014
2-147
N.9# Cetwor0 * ocation Vector D$6S# Distributed Inter Frame Space S$6S# Short Inter Frame Space
2: Data Link Layer 2-148
hi!!en termina s# *$ C cannot hear each other !ue to o/stac es$ signa attenuation resu ts in co isions at E +>pose! no!e# E *$ C hears it an! wi not sen! to - e"en if it is OK to !o so
1/23/2014 2: Data Link Layer 2-149
C(nt00
Impro"e! performance un!er /oth hi!!en termina an! e>pose! no!e cases ,7. an! C7. short# co isions ess i0e y$ of shorter !uration en! resu t simi ar to co ision !etection I+++ 8<2'11 a ows# C.)* C.)*LC*# reser"ations po ing from *(
2: Data Link Layer
1/23/2014
2-151