Tim Hieu ve Switch

Click here to load reader

  • date post

    22-Jul-2015
  • Category

    Technology

  • view

    437
  • download

    2

Embed Size (px)

Transcript of Tim Hieu ve Switch

Tm hiu cng ngh VPN cho h thng mng LAN

TM HIU V SWITCHGVHD:o Anh ThSV Thc hin:Mai Vn HuyHong nh ThipNguyn Vn Dngo Minh NguynNguyn Lnh Tnh

1Ni dung chnhChng I: Khi qut v SwitchChng II: Cu To Ca SwitchChng III: Cc loi SwitchChng IV: C ch chuyn mchChng V: VLAN2Chng I : Khi qut v Switch

I Gii thiu v SwitchSwitch l thit b chuyn mch kt ni cc on mng li vi nhau.Switch li c kh nng kt ni c nhiu segment li vi nhau ty thuc vo s cng (port) trn Switch.3Chng I : Khi qut v Switch

Switch cng hc thng tin ca mng thng qua cc gi tin (packet) m n nhn c t cc my trong mng.Switch s dng cc thng tin ny xy dng ln bng Switch, bng ny cung cp thng tin gip cc gi tin n ng a ch.Switch thng c 2 chc nng chnh l chuyn cc khung d liu t ngun n ch, v xy dng cc bng Switch.

4Chng I : Khi qut v Switch

Nu bn ang tm kim mt gii php hiu qu hn? Bn s cn n switch II Mc ch s dngSwitch hot ng mc cao hn hub, ti tng 2, tng lin kt d liu Data Link layer. Mt switch cng tng t nh mt hub, nhng thng minh hn. Chng thn thin hn mt cht v nhanh hn nhiu.5Chng I : Khi qut v Switch

- Khng ging nh hub, Switch kim tra k lng tng gi d liu nhn c, xc nh ngun v ch mi gi. Sau ch cc gi d liu chuyn n ch mt cch chnh xc. Switch s dng a ch MAC (Media Access Control) ca cc thit b mng tm ra thit b ch. - a ch MAC l mt m ID 12 k t duy nht, l a ch phn cng c nh trong tng thit b. hot ng hiu qu, mi switch to ra mt link lin kt chuyn dng tm thi gia ni gi v ni nhn, tng t nh mt knh in thoi chuyn mch6Chng II Cu To Ca SwitchPhn cng ty thuc vo tng chng loi thit b, c bn gm:Bo mch chB x l trung tm CPUB nhBus h thngCc giao tip ngoi viB nhFlash (non volatile): DRAN/SPAM (volatileBootROM: H iu hnh IOS:7Chng II Cu To Ca Switch hot ng chuyn mch cc gi tin, switch lun phi thc hin cng vic chc nng sau:Hc a ch MAC ca cc thit b mngChuyn tip gi tinTrnh lp2.1 Hc a ch MAC Switch lun nghi nh a ch MAC ngun trong frame v s hiu cng m n nhn c frame . Qu trnh gi l hc a ch. a ch c lu vo CAM table. Switch quyt nh chuyn frame da trn a ch MAC,do switch c xp vo thit b hot ng lp 2. Chnh nh switch la chn ng dn quyt nh chuyn frame ln mng LAN c th hot ng hiu qu hn. Switch nhn bit my no kt ni vo cng ca n bng cc c a ch MAC ngun trong frame m n nhn c. Khi 2 my thc hin lin lc vi nhau, switch ch thit lp mt mch o gia 2 cng tng ng m khng lm nh hng ti lu thng trn cc cng khc. Do , mng LAN c hiu sut s dng cao thng s dng chuyn mch ton b. Switch tp trung cc kt ni v quyt nh chn ng dn truyn d liu hiu qu. Frame c chuyn mch t cng nhn ti cng pht ra. Mi cng l mt kt ni cung cp kt ni chn bng thng cho my. chuyn frame hiu qu gia cc cng, switch lu gi mt bng a ch. Khi switch nhn c 1 frame, n s lu a ch MAC ca my tng ng vi cng m n nhn frame vo. Switch tch bit giao thng trn tng on mng, chia h thng mng ra lm cc n v cc nh gi l microsegment. Cc segment nh vy cho php ngi dng khc nhau c th gi d liu cng lc m khng lm chm cc hot ng ca mng. Bng cch chia nh h thng mng s lm gim lng ngi dng v v thit b cng chia s mt bng thng. Mi segment l 1 min ng ring bit, switch gii hn lu lng bng thng ch chuyn gi tin ti ng cng cn thit.Bng TCAMTrong qu trnh nh tuyn truyn thng, ACL c th lc hay kim sot traffic. Cc ACL c th c to ra bi mt hoc nhiu i tng hoc cc pht biu match c th c tnh ton theo trnh t. Vic tnh ton mt ACL c th tn thm thi gian, lm tng tr ca gi tin. Trong MLS, tt c cc tin trnh so snh ca ACL u hin thc bng phn cng. TCAM cho php mt gi tin c kim tra vi ton b ACL ch thng qua mt ng tc tm kim n gin. Phn ln cc switch c nhiu bng TCAM cc ACL v bo mt v QoS c th c kim nghim ng thi v x l song song vi cc quyt nh y gi tin L2 v L3.C hai thnh phn trong bng TCAM:Feature Manager: sau khi mt ACL c to ra hoc cu hnh, FM s bin dch v trn cc hng ca ACL vo bng TCAM. Bng TCAM sau s c tham chiu tc chuyn frame. Switching Database Manager SDM: bn c th chia bng TCAM trn vi Catalyst switch ra thnh cc vng c chc nng khc nhau.Cu trc bng TCAM:TCAM l mt m rng ca khi nim bng CAM. Hy nh rng mt bng CAM s dng mt index hoc mt gi tr kha (thng l a ch MAC) Cc hng trong bng TCAM thng bao gm cc gi tr Value, Mask v result. Cc trng t gi frame hoc gi tin s c np vo bng TCAM, trong cc trng ny s so snh vi cc cp value/match.Ct gi tr (value) lun l 134bit, c th cha a ch ngun v a ch ch v cc thng tin lin quan khc. Thng tin kt hp hnh thnh nn ct value ny ph thuc vo kiu ca ACL. Trng mask cng c chiu di 134bit. Mask gip ch ra cc bit ang quan tm. Ct kt qu l cc con s ch ra hnh ng cn phi thc hin sau khi bng TCAM c tm kim. Cn lu l so vi ACL truyn thng, bng TCAM cho php mt s result c th. V d result c th l permit/deny hoc mt gi tr index n mt chnh sch QoS hoc mt pointer n gi tr nexthop khc.2.2 Chuyn tip gi tinKhi Switch nhn c mt Frame, n s c a ch MAC ch trong Frame Tm kim s hiu cng tng ng vi a ch MAC ny trong bng MAC Nu tm thy,n s chuyn Frame ra cng tm c Nu khng, n s chuyn Frame ra tt c cc cng ngoi tr cng Frame n. C 3 ch chuyn tip frame: C ba ch chuyn mch frame: Fast forwad: switch c c a ch ca frame l bt u chuyn frame i lun m khng cn nhn c ht frame. Nh vy, frame c chuyn i trc nhn ht ton b frame. Do thi gian tr gim xung nhng kh nng pht hin li km. Fast - Forwad l mt thut ng c s dng ch switch ang ch chuyn mch cut -through. Store and forwad: nhn vo ton b frame ri mi bt u chuyn frame i. Switch c a ch ngun v thc hin lc b frame nu cn ri mi quyt nh chuyn frame nh. Thi gian switch nhn frame vo s gy ra thi gian tr. Frame cng ln th thi gian tr cng ln, v switch phi nhn xong ht ton b frame ri mi tin hnh chuyn mch cho frame. Nhng vy th switch c thi gian v d liu kim tra li frame, nn kh nng pht hin li cao hn. Fragment free: nhn vo ht 64 byte u tin ca frame ri mi bt u chuyn frame i. Fragment free l mt thut ng c s dng ch switch ang s dng mt dng ci bin ca chuyn mch cut -through. Mt ch chuyn mch khc c kt hp gia cut through v Store and forwad. Kiu C ba ch chuyn mch frame: Fast forwad: switch c c a ch ca frame l bt u chuyn frame i lun m khng cn nhn c ht frame. Nh vy, frame c chuyn i trc nhn ht ton b frame. Do thi gian tr gim xung nhng kh nng pht hin li km. Fast - Forwad l mt thut ng c s dng ch switch ang ch chuyn mch cut -through. Store and forwad: nhn vo ton b frame ri mi bt u chuyn frame i. Switch c a ch ngun v thc hin lc b frame nu cn ri mi quyt nh chuyn frame nh. Thi gian switch nhn frame vo s gy ra thi gian tr. Frame cng ln th thi gian tr cng ln, v switch phi nhn xong ht ton b frame ri mi tin hnh chuyn mch cho frame. Nhng vy th switch c thi gian v d liu kim tra li frame, nn kh nng pht hin li cao hn. Fragment free: nhn vo ht 64 byte u tin ca frame ri mi bt u chuyn frame i. Fragment free l mt thut ng c s dng ch switch ang s dng mt dng ci bin ca chuyn mch cut -through. Mt ch chuyn mch khc c kt hp gia cut through v Store kt hp ny gi l cut through thch nghi (adaptive cut through).Trong ch ny, switch s s dng chuyn mch cut through cho n khi no n pht hin ra mt lng frame b li nht nh. Khi s lng frame b li vt qu mc ngng th khi switch s chuyn sang dng chuyn mch store and forward. 2.3 Trnh lp Trong mi mng u c rt nhiu switch kt ni vi nhau the nhiu ng nhm mc ch d phng dn ti kh nng xy ra lp trong mng. STP( Spanning Tree Protocol) s gii quyt vn ny.

8Chng III Cc loi switch1. Switch c chia thnh 3 loi c bn:Workgroup switch: B chuyn mch lm vic theo nhmSegment switch: B chuyn mch nhnh mng.Backbone switch: b chuyn mch ng trc.

9Chng III Cc loi switch

Workgroup switch

Workgroup switch:L loi switch c thit k nhm ni trc tip cc my tnh li vi nhau hnh thnh mt mng ngang hang. Nh vy, tng t vi mt cng ca switch ch c mt a ch my tnh trong bng a ch.Gi thnh thp hn cc loi khc. V th, loi ny khng cn thit phi c b nh ln cng nh tc x l cao.

10Segment switch:

Chng III Cc loi switch

Segment switch:Segment switch ni cc Hub hay workgroup switch li ni vi nhau, hnh thnh mt lin mng tng hai.Tng ng vi mi cng trong trng hp ny s c nhiu a ch my tnh, v th b nh cn thit phi ln.Tc x l i hi phi cao v lng thng tin cn x l ti switch l ln.

11Backbone switch:

Chng III Cc loi switch

Backbone switch:Backbone switch ni kt cc segment switch li vi nhau.Trong trng hp ny, b nh v tc x l ca switch phi rt ln cha a ch cho tt c cc my tnh trong ton lin mng v hon chuyn kp thi d liu gia cc nhnh mng.

122. Da vo cu hnh phn cng chia lm 2 loi Fixed-Configuration Switch: l Switch gm mt s cng c nh khng th m rng thm. N c mt b x l trung tm bn trong.Chasis-based Switch : l Switch ban u c cung cp 1 khung, sau c th a thm cc thnh phn khc ty theo nhu cu.

Chng III Cc loi switch

Fixed-Configuration Switch Chasis-based Switch Chng III Cc loi switch3. Da vo hot ng chia lm hai loi:Switch lp 2Switch lp 3

- Switch Layer 2 ch lm vic tng Datalink- Switch layer 3 c dng cho mng Campus ca cc cng ty ln, trung tm phn mm (SSP,Softech,Cantho Software Part..) hoc trong cc ISP...Switch layer 3 ng vai tr l chuyn mch trung tm trong mng (backbone), chng s kt ni gia cc VLAN vi nhau (thng th ni n cc Switch layer 2 : 2924, 2950... cho mi VLAN )Mt s Switch layer 3 thng dng VN: 4003, 4006, 6500.14Chng IV C ch chuyn mch1. nh nghaChuyn mch l mt qu trnh qu trnh u ni v chuyn thng tin cho ngi s dng thng qua h tng mng vin thng. Ni cch khc, chuyn mch trong vin thng bao gm cc chc nng nh tuyn cho thng tin v chc nng chuyn tip thng tin.2. c imSwitch hot ng lp 2 trong m hnh OSI vi chc nng kt ni cc thit b trong cng mt mng LAN vi nhau chia s thng tin,thc hin chuyn mch bng phn cng(application-specific integrated circuit (ASIC)), cho php tc ln ti hng Gb/s. Ngoi ra, switch cn gip chia nh cc conllision domain, lm tng bng thng c th s dng.Chng IV C ch chuyn mch3. Hot ng chuyn mch c bn ca switch

Chuyn mch frame .Bo tr hot ng chuyn mch. Kh nng truy cp ring bit trn tng cng. Loi tr c ng v tng thng lng ng truyn. H tr c nhiu phin giao dch cng 1 lc. Chuyn frame da trn bng chuyn mch. Chuyn frame da theo a ch MAC. Hot ng lp 2 ca m hnh OSI. Hc v tr kt ni ca tng my trm bng cch ghi a ch cc ngun ca frame nhn vo.

Chng IV C ch chuyn mch3. Chuyn mch lp 2