De Cuong on Tap Mon Mang Truyen Thong

  • Published on
    11-Jun-2015

  • View
    714

  • Download
    0

Embed Size (px)

Transcript

p n mt s cu hi v MN MNG TRUYN THNG (Created by Dungdtk4) Cu 1: V d m t hot ng giao thc CSMA/CD. So snh vi cc giao thc CSMA khc. Tr li: - M t hot ng ca giao thc CSMA/CD: c t Ethernet ban u c cp n vn xung t c th xy ra trn LAN. Khi h tng mng l dng chung, bt k mt tn hiu in ny cng c truyn dn trn ng dy cng c th xung t vi mt tn hiu ca mt thit b khc. Khi hai hoc nhiu Ethernet frame chng lp ln ng truyn mt thi im no , xung t xy ra. Xung t s dn n cc li bit v mt frame (bit error). c t ca Ethernet nh ngha thut ton CSMA/CD (Carrier Sense Multiple Access with Collision Detection) gii quyt xung t. CSMA/CD s gip gim thiu s xung t nhng khi n xy ra, CSMA/CD s ch ra vic cc my gi d liu s nhn ra xung t v truyn li frame nh th no. Cc bc c lit k nh di y: 1. Mt thit b c frame cn truyn s lng nghe ng truyn cho n khi no ng truyn Ethernet khng cn b chim. 2. Khi ng truyn Ethernet khng cn b chim, my gi bt u gi frame. 3. My gi cng bt u lng nghe m bo rng khng c xung t xy ra. 4. Nu c xung t, tt c cc my trm tng gi ra frame s gi ra mt tn hiu nghn m bo tt c cc my trm u nhn ra xung t. 5. Sau khi tn hiu nghn l hon tt, mi my gi ca ca nhng frame b xung t s khi ng mt b nh thi timer v ch ht khong thi gian ny s c gng truyn li. Nhng my khng to ra xung t s khng phi ch. 6. Sau khi cc thi gian nh thi l ht, my gi c th bt u mt ln na vi bc 1. - So snh vi cc giao thc CSMA khc: C 6 loi giao thc CSMA l: + CSMA lin tc 1 + CSMA khng lin tc + CSMA lin tc p + CSMA/CD + CSMA/CA + CSMA/TDMA tch hp S dng giao thc CSMA/CD, trm hon ton c quyn truyn d liu trn mng vi s lng nhiu hay t v mt cch ngu nhin hoc bt k khi no c nhu cu truyn d liu mi trm. Mi trm s kim tra tuyn v ch khi no tuyn khng bn mi bt u truyn cc gi d liu.

1

u im ca CSMA/CD l n gin, mm do, hiu qu truyn thng tin cao khi lu lng thng tin ca mng thp v c tnh t bin. Vic thm vo hay dch chuyn cc trm trn tuyn khng nh hng n cc th tc ca giao thc. im bt li ca CSMA/CD l hiu sut ca tuyn gim xung nhanh chng khi phi ti qu nhiu thng tin.

Cu 2: Trnh by v nh dng khung d liu chun ca IEEE 802.3. M t chi tit ngha ca tng trng trong nh dng khung tin ny. Tr li:

Cu trc khung d liu Ethernet Preamble: Mu cha cc bit 0 v 1 xen k nhau c dng ng b trong hot ng truyn bt ng b t 10Mbps tr xung. SFD (start frame delimiter): Trng ny di mt octet nh du kt thc phn thng tin nh thi v cha tun t bit 10101011. Cc trng Destination v Source: mang a ch vt l ca cc trm nhn v gi khung, xc nh khung c gi t u v s c gi ti u. LEN: Gi tr ca trng ni ln ln ca phn d liu m khung mang theo. Trng Lengthe s dng nh l field ch chiu di nhng ni c lp LLC cung cp s nhn d liu sau khi x l khung Ethernet hon tt. Chiu di ch s d liu k t sau field ny tr i. Data v Pad: C chiu di tu , nhng kch thc khung khng vt qu gi tr ti a cho php. n v truyn ti a ca Ethernet l 1500 byte. Mt Pad c chn vo ngay sau s liu ngi dng khi khng s liu cho khung t c kch thc ti thiu theo quy nh. (Ethernet yu cu mt khung khng c nh hn 64byte v ln hn 1518byte). FCS mang 4 byte CRC (cyclic redundancy checksum): pha gi s tnh ton trng ny trc khi truyn khung. Pha nhn tnh ton li CRC ny theo cch tng t. Nu hai kt qu trng nhau, khung c xem l nhn ng, ngc li khung coi nh l li v b loi b. Cu 3: Cc thng s ca cc mng Fast Ethernet v cc thit b mng dng trong mng ny. Tr li: H thng Ethernet 100Mb/s Ethernet cao tc (Fast Ethernet) 100 Base T: Chun Ethernet hot ng vi tc 100Mbps trn c cp xon cp ln cp si quang.

2

100 BaseX: Ch X ni ln c tnh m ha ng truyn ca h thng ny (s dng phng php m ho 4B/5B ca chun FDDI). Bao gm 2 chun: 100 BaseFX v 100 BaseTX - 100 BaseFX: Tc 100Mb/s, s dng cp si quang a mode. - 100 BaseTX. Tc 100Mb/s, s dng cp xon cp. 100 BaseT2 v 100 BaseT4. Cc chun ny s dng 2 cp v 4 cp cp xon cp Cat 3 tr ln tuy nhin hin nay hai chun ny t c s dng. * 100Base TX: - Topology: Hnh sao - Bng thng ti a: 100Mbps - Hub: Hub Class 1 cho php hai nhnh mng khc kiu tn hiu c th giao tip c vi nhau nhng khng cho php ni cc Hub li vi nhau. Hub Class 2 cho php 2 nhnh mng c cng kiu tn hiu giao tip vi nhau. Ta c th ni 2 Hub lp 2 li vi nhau vi khong cch ti a gia chng l 5m. - Cp UTP: T CAT 5 tr nn. - S ni dy ca 100Base TX v 10Base T ging nhau. * 100Base T4: - Topology: Hnh sao - Bng thng ti a: 100Mbps - S dng cp UTP t CAT 3 tr ln.

S ni dy * 100Base FX: - Topology: Hnh sao - S dng cp quang - Dng Hub hoc Switch ni kt cc my tnh - Chiu di ti a t Hub n my tnh: 412m - Connector: Mic connector: u tin dng FDDI ST connector: Dng ph bin nht SC connector: R nht

3

Cu 4: V d minh ho hot ng ca mng Token Ring v nh dng khung tin trong mng Token Ring. Tr li: (Gio trnh mng my tnh trang 234) - V d minh ho: Phng php truy cp dng trong mng Token Ring gi l Token passing. Token passing l phng php truy nhp xc nh, trong cc xung t c ngn nga bng cch mi thi im ch mt trm c th c truyn tn hiu. iu ny c thc hin bng vic truyn mt b tn hiu c bit gi l Token (m thng bo) xoay vng t trm ny qua trm khc. Mt trm ch c th gi i b d liu khi n nhn c m khng bn. Hot ng ca token ring: Token ring bao gm mt s lng cc repeater, mi repeater c kt ni vi 2 repeater khc theo mt chiu truyn d liu duy nht to thnh mt vng khp kn. mt ring c th hot ng c th cn phi c 3 chc nng l: Chc nng a d liu vo ring, ly d liu t ring v g b gi tin, cc chc nng ny c thc hin bi cc repeater. Trong ring cc d liu c ng gi thnh cc frame. Trong c mt trng a ch ch. Khi gi tin i qua cc repeatert th trng a ch s c copy xung v so snh vi i ch ca trm, nu ging nhau th phn cn li ca frame s c copy v gi tin tip tc c gi i. Vic g b mt gi tin trong ring th phc tp hn so vi dng bus. g b cc gi tin ta c hai cch la chn. Cch th nht l s dng mt repeater chuyn lm nhim v g b cc gi tin n c xc nh r a ch, cch hai cc gi tin c g b bng chnh trm gi gi tin . Thng thng vn thng dng cch th hai v c hai u im l to ra mt c ch tr li t ng hai l c th truyn mt gi tin n nhiu trm ch. - nh dng khung tin:

4

Cu 5: V d minh ho hot ng ca mng hnh Bus v Tree, cc c im ca topo mng ny: Tr li: - Mng hnh Bus: Thc hin theo cch b tr hnh lang, cc my tnh v cc thit b khc cc nt, u c ni v vi nhau trn mt trc ng dy cp chnh chuyn ti tn hiu. Tt c cc nt u s dng chung ng dy cp chnh ny. Pha hai u dy cp c bt bi mt thit b gi l terminator. Cc tn hiu v d liu khi truyn i dy cp u mang theo i ch ca ni n.

Cu trc mng hnh Bus u im: Loi hnh mng ny dng dy cp t nht, d dng lp t, gi thnh r. Nhc im: - S n tc giao thng khi di chuyn d liu vi lu lng ln. - Khi c s hng hc on no th rt kh pht hin, mt s ngng trn ng dy sa cha s ngng ton b h thng. Cu trc ny ngy nay t c s dng. - Mng hnh Tree: (L s kt hp ca mng hnh Tree + Sao): Mng dng hnh sao bao gm mt b kt ni trung tm v cc nt. Cc nt ny l cc trm u cui, cc my tnh v cc thit b khc ca mng. B kt ni trung tm ca mng iu phi mi hot ng trong mng. Mng dng hnh sao cho php ni cc my tnh vo mt b tp trung (Hub) bng cp, gii php ny cho php ni trc tip my tnh vi Hub khng cn thng qua trc bus, trnh c cc yu t gy ngng tr mng.

Cu trc mng hnh Tree

5

M hnh kt ni hnh Tree ngy nay tr ln ht sc ph bin. Vi vic s dng cc b tp trung hoc chuyn mch, cu trc hnh Tree c th c m rng bng cch t chc nhiu mc phn cp, do vy d dng trong vic qun l v vn hnh. Cc u im ca mng hnh Tree: - Hot ng theo nguyn l ni song song nn nu c mt thit b no mt nt thng tin b hng th mng vn hot ng bnh thng. - Cu trc mng n gin v cc thut ton iu khin n nh. - Mng c th d dng m rng hoc thu hp. Nhng nhc im mng dng hnh sao: - Khi trung tm c s c th ton mng ngng hot ng. - Mng yu cu ni c lp ring r tng thit b cc nt thng tin n trung tm. Khong cch t my n trung tm rt hn ch (100m). Cu 6: Hot ng ca cu ni Bridge. Nu cc l do s dng cu ni trong mng truyn thng. Tr li: - Hot ng: Bridge l mt thit b c x l dng ni hai mng ging nhau hoc khc nhau, n c th c dng vi cc mng c cc giao thc khc nhau. Cu ni hot ng trn tng lin kt d liu nn khng nh b tip sc phi pht li tt c nhng g n nhn c th cu ni c c cc gi tin ca tng lin kt d liu trong m hnh OSI v x l chng trc khi quyt nh c chuyn i hay khng. Khi nhn c cc gi tin Bridge chn lc v ch chuyn nhng gi tin m n thy cn thit. iu ny lm cho Bridge tr nn c ch khi ni mt vi mng vi nhau v cho php n hot ng mt cch mm do.

Hot ng ca cu ni thc hin c iu ny trong Bridge mi u kt ni c mt bng cc a ch cc trm c kt ni vo pha , khi hot ng cu ni xem xt mi gi tin n nhn c bng cch c a ch ca ni gi v nhn v da trn

6

bng a ch pha nhn c gi tin n quyt nh gi gi tin hay khng v b xung bng a ch. Khi c a ch ni gi Bridge kim tra xem trong bng a ch ca phn mng nhn c gi tin c a ch hay khng, nu khng c th Bridge t ng b xung bng a ch (c ch c gi l t hc ca cu ni). Khi c a ch ni nhn Bridge kim tra xem trong bng a ch ca phn mng nhn c gi tin c a ch hay khng, nu c th Bridge s cho rng l gi tin ni b thuc phn mng m gi tin n nn khng chuyn gi tin i, nu ngc li th Bridge mi chuyn sang pha bn kia. y chng ta thy mt trm khng cn thit chuyn thng tin trn ton mng m ch trn phn mng c trm nhn m thi. Hin nay c hai loi Bridge ang c s dng l Bridge vn chuyn v Bridge bin dch. Bridge vn chuyn dng ni hai mng cc b cng s dng mt giao thc truyn thng ca tng lin kt d liu, tuy nhin mi mng c th s dng loi dy ni khc nhau. Bridge vn chuyn khng c kh nng thay i cu trc cc gi tin m n nhn c m ch quan tm ti vic xem xt v chuyn vn gi tin i. Ngi ta s dng Bridge trong cc trng hp sau : - M rng mng hin ti khi t ti khong cch ti a do Bridge sau khi s l gi tin pht li gi tin trn phn mng cn li nn tn hiu tt hn b tip sc. - Gim bt tc nghn mng khi c qu nhiu trm bng cch s dng Bridge, khi chng ta chia mng ra thnh nhiu phn bng cc Bridge, cc gi tin trong ni b tng phn mng s khng c php qua phn mng khc. - ni cc mng c giao thc khc nhau. - Mt vi Bridge cn c kh nng la chn i tng vn chuyn. N c th ch chuyn vn nhng gi tin ca nhng a ch xc nh. - Mt s Bridge c ch to thnh mt b ring bit, ch cn ni dy v bt. Cc Bridge khc ch to nh card chuyn dng cm vo my tnh, khi trn my tnh s s dng phn mm Bridge. Vic kt hp phn mm vi phn cng cho php uyn chuyn hn trong hot ng ca Bridge.

Cu 7: Trnh by v giao thc spanning tree, Nu cc l do s dng giao thc ny trong mng truyn thng. Tr li: - Giao thc STP (Spanning tree Protocol): Mt mng mnh m c thit k khng ch em li tnh hiu qu cho vic truyn cc gi hoc frame, m cn phi xem xt lm th no khi phc hot ng ca mng mt cch nhanh chng khi mng xy ra li. Trong mi trng lp 3, cc giao thc nh tuyn s dng con ng d phng n mng ch khi con ng chnh b li th s nhanh chng tn dng con ng th 2.

7

nh tuyn lp 3 cho php nhiu con ng n ch gi nguyn tnh trng hot ng ca mng v cng cho php cn bng ti qua nhiu con ng. Trong mi trng lp 2 (switching hoc bridging), khng s dng giao thc nh tuyn v cng khng cho php cc con ng d phng, thay v bridge cung cp vic truyn d liu gia cc mng hoc cc port ca switch. Giao thc Spanning Tree cung cp lin kt d phng mng chuyn mch lp 2 c th khi phc t li m khng cn c s can thip kp thi. STP c nh ngha trong chun IEEE 802.1D. * Cc bc ra quyt nh ca STP Khi to ra topology lun l cha loop-free th Spanning Tree lun dng trnh t 4 bc sau: Root BID thp nht. Chi ph ng i n Root Bridge thp nht. BID ca ngi gi thp nht. Port ID thp nht. Bridge chuyn thng tin Spanning Tree vi nhau, s dng frame xc nh l n v d liu giao thc bridge (Bridge Protocol Data Unit BPDU). Mt bridge s dng trnh t 4 bc ny lu mt bn sao ca BPDU tt nht trn mi port. Khi nh gi, n xem tt c BPDU nhn c trn port cng nh BPDU gi i trn port . Mi BPDU n u c kim tra trnh t 4 bc ny, nu tt hn BPDU hin ti th n c lu trn port v thay th gi tr c. Ch : cc bridge s gi BPDU cu hnh cho n khi nhn nhiu hn mt BPDU tt. Thm vo , qu trnh lu li BPDU tt nht cng iu khin vic gi cc BPDU. Khi mt bridge hot ng ln u, th tt c cc port ca n c gi BPDU 2s mt ln (s dng gi tr b nh thi mc nh). Tuy nhin, nu mt port lng nghe mt BPDU t mt bridge khc tt hn BPDU m n gi, th port cc b s ngng gi BPDU. Nu BPDU ny t mt ln cn ngng n trong mt chu k thi gian (20 s l mc nh) th port cc b tip tc gi BPDU li ln na. Ch : C 2 loi BPDU l BPDU cu hnh v BPDU thng bo thay i topology (TCN). * Cc kiu STP Trong phn 3.1 ta tm hiu hot ng ca STP lm th no ngn chn v khi phc t s thay i topolofy mng mt cch kp thi. u tin STP c pht trin hot ng trong mi trng bridge, v c bn h tr mt LAN (hoc mt VLAN). Vic thc thi STP trong mi trng switch i hi thm s thay i v cn nhc h tr cho nhiu VLAN. V vy, IEEE v Cisco tip cn STP khc nhau. Trong phn ny ta s xem li ba kiu STP truyn thng bt gp trong mng switch v n lin quan vi nhau nh th no. Ch : IEEE b sung vo chun STP ci tin tnh leo thang v hi t.

8

- Common Spanning Tree (CSP) Chun IEEE 802.1Q ni r v lin kt trunk gia cc switch cho VLAN, v n cng ni r trng hp cho tt c VLAN. Trng hp ny c gi l Common Spanning Tree CSP. Tt c cc CST BPDU c truyn trn VLAN nh l frame khng gn th. C mt STP cho nhiu VLAN lm n gin ha cu hnh switch v gim bt ti cho CPU ca switch trong khi tnh ton STP. Tuy nhin ch c mt STP th cng c nhiu gii hn. Cc lin kt d phng gia cc switch s b kha v khng c kh nng cn bng ti, lm cho vic chuyn tip trn mt lin kt khng h tr cho tt c VLAN, trong khi cc lin kt khc th b kha. - Per-VLAN Spanning Tree (PVSP) Cisco c mt phin bn ring ca STP cung cp tnh mm do hn CST. Per-VLAN Spanning Tree PVST hot ng tch ri i vi mi VLAN ring. iu ny cho php STP trn mi VLAN c cu hnh c lp, cung cp kh nng hot ng tt hn v iu chnh cc iu kin r rng. Nhiu Spanning Tree cng c kh nng cn bng ti trn cc lin kt d phng khi cc lin kt ny c gn cho c VLAN khc nhau. - Per-VLAN Spanning Tree Plus (PVSP+) Cisco a ra phin bn th 2 ca STP l Per-VLAN Spanning Tree Plus (PVSP+) cho php cc thit b hot ng bn trong vi c PVST v CST. PVST+ h tr hiu qu ba nhm hot ng STP trong cng mng Campus: Catalyst switch chy PCST. Catalyst switch chy PCST+. Switch chy CST trn 802.1Q. lm c iu ny, PVST+ hot ng nh l b chuyn i gia cc nhm CST switch. PVST+ cng truyn thng trc tip vi PVST bng cch s dng ISL trunk. Tuy nhin truyn thng vi CST, PVST+ phi thay i cc BPDU v khng cn gn th cho frame qua VLAN. Cc BPDU t STP khc (VLAN khc) c truyn qua phn CST ca mng bng tunnel. PVST+ gi cc BPDU ny bng cch s dng a ch multicast duy nht cc CST switch chuyn tip n n cc ln cn downstream m cn phin dch n. Nh vy PVST+ v CST c th lm vic vi nhau. - L d phi s dng STP (Spanning tree Protocol): Spanning Tree Protocol (STP) l mt giao thc ngn chn s lp vng, cho php cc bridge truyn thng vi nhau pht hin vng lp vt l trong mng. Sau giao thc ny s nh r mt thut ton m bridge c th to ra mt topology lun l cha loop-free. Ni cch khc STP s to mt cu trc cy ca free-loop gm cc l v cc nhnh ni ton b mng lp 2. Vng lp xy ra trong mng vi nhiu nguyn nhn. Hu ht cc nguyn nhn thng thng l kt qu ca vic c gng tnh ton cung cp

9

kh nng d phng, trong trng hp ny, mt link hoc switch b hng, cc link hoc switch khc vn tip tc hot ng, tuy nhin cc vng lp cng c th xy ra do li. Hai nguyn nhn chnh gy ra s lp vng tai hi trong mng chuyn mch l do broadcast v s sai lch ca bng bridge. Broadcast Loop Broadcast Loop v vng lp lp 2 l mt s kt hp nguy him. Broadcast to ra vng lp phn hi (feedback loop). Gi s rng, khng c switch no chy STP: Bc 1: host A gi mt frame bng a ch broadcast MAC (FF-FF-FFFF-FF-FF). Bc 2: frame n c hai Cat-1 v Cat-2 qua port 1/1 Bc 3: Cat-1 s a frame qua port 1/2. Bc 4: frame c truyn n tt c cc node trn on mng Ethernet k c port 1/2 ca Cat-2. Bc 5: Cat-2 a frame ny n port 1/1 ca n....