Está en la página 1de 20

NI DUNG LI M U ........................................................................................................... 2 CHNG 1:GII THIU CHUNG V K THUT CHUYN MCH ............... 3 1.1 Gii thiu chung........................................................................................... 3 1.

2 Mt s khi nim c s................................................................................. 3 1.2.1 nh ngha chuyn mch ................................................................ 3 1.2.2 Nguyn l chuyn mch ................................................................. 4 1.2.3 Phn loi chuyn mch ................................................................... 4 CHNG 2:NGUYN L CHUYN MCH GI ................................................ 6 2.1 C s ............................................................................................................ 6 2.2 M hnh kt ni h thng m OSI ............................................................... 7 2.3 Nguyn l chuyn mch gi ........................................................................ 9 2.3.1 Chuyn mch datagram .............................................................. 10 2.3.2 Chuyn mch knh o ................................................................. 11 CHNG 3:NH TUYN TRONG CHUYN MCH GI .............................. 12 3.1 Tng quan v nh tuyn............................................................................ 12 3.2 Cc thut ton nh tuyn .......................................................................... 15 3.2.1 Thut ton Bellman-Ford v nh tuyn vector khong cch...... 15 3.2.2 Thut ton Dijkstra ...................................................................... 17 KT LUN .......................................................................................................................................... 19
1

LI M U
K thut chuyn mch l mt trong nhng k thut mu cht nht trong cc mng truyn thng. S pht trin mnh m ca h tng truyn thng trong mt s nm gn y to ra cc cuc cch mng v khoa hc cng ngh v k thut chuyn mch l mt phn ca s pht trin . Do vy chng em tm hiu v k thut ny tm hiu v nhng kin thc nn tng ca lnh vc chuyn mch,tip cn cc gii php k thut v cng ngh chuyn mch mi mt cch tt nht. T lm nn tng cho cc mn hc tip theo. Ni dung chnh gm: Chng th nht a ra cc khi nim v l thuyt nn tng ca vin thng cng nh lnh vc chuyn mch. Chng th hai tip cn k thut chuyn mch gi t cc vn c bn nh nguyn tc, phng php x l gi tin trong mng v trong trng chuyn mch. Chng ba bn v k thut nh tuyn trong chuyn mch gi.Cc thut ton nh tuyn cn bn nh:Bellman-Ford v Dijkstra

CHNG 1:GII THIU CHUNG V K THUT CHUYN MCH


1.1 Gii thiu chung Vin thng l mt phn ca khi nim thng tin - mt dng thc chuyn giao thng tin. vin thng c coi l h tng c s ca x hi s dng k thut in, in t v cc cng ngh khc chuyn giao thng tin. Mng vin thng di gc n gin nht c nhn nhn gm tp hp cc nt mng, cc ng truyn dn kt ni gia hai hay nhiu im xc nh v cc thit b u cui thc hin trao i thng tin gia ngi s dng. Mt cch khi qut chng ta c th coi tt c cc trang thit b,phng tin c s dng cung cp dch v vin thng to thnh mng vin thng.Thit b u cui l cc trang thit b ca ngi s dng giao tip vi mng cung cp dch v. Thit b chuyn mch l cc nt ca mng vin thng c chc nng thit lp v gii phng ng truyn thng gia cc cc thit b u cui. Thit b truyn dn c s dng ni cc thit b u cui hay gia cc nt vi nhau thc hin truyn cc tn hiu mt cch nhanh chng v chnh xc. Cc phn t v phng tin ca mng truyn thng cu trc thnh h tng truyn thng nhm cung cp cc dch v cho ngi s dng.Ty thuc vo cc dch v ch cht m cc gii php cng ngh c xy dng,phng php tip cn ny v ang tn ti trong h tng mng truyn thng hin nay. 1.2 Mt s khi nim c s 1.2.1 nh ngha chuyn mch Chuyn mch l s thit lp kt ni theo yu cu truyn thng tin t ng vo yu cu n ng ra c yu cu trong mt tp ng vo ng ra. l mt qu trnh thc hin u ni v chuyn thng tin cho ngi s dng thng qua h tng mng
3

vin thng. Ni cch khc, chuyn mch trong mng vin thng bao gm chc nng nh tuyn cho thng tin v chc nng chuyn tip thng tin. Nh vy, theo kha cnh thng thng khi nim chuyn mch gn lin vi lp mng v lp lin kt d liu trong m hnh ca T chc tiu chun quc t ISO (International Organization for Standardization).i vi mt s trng hp m rng, khi nim chuyn mch cn c hnh thnh theo m hnh phn lp v tri di t lp 2 ti lp 7 trong m hnh OSI. 1.2.2 H thng chuyn mch Qu trnh chuyn mch c thc hin ti cc nt mng, trong mng chuyn mch knh cc nt mng thng gi l h thng chuyn mch (Tng i), trong mng chuyn mch gi thng c gi l thit b nh tuyn (B nh tuyn). Trong mt s mng c bit, phn t thc hin nhim v chuyn mch c th va ng vai tr thit b u cui va ng vai tr chuyn mch v chuyn tip thng tin. i vi mt s kin trc mng c bit v d nh mng ty bin (Ad-hoc), cc thit b u cui cn c th ng vai tr nh mt ni cp v nhn ngun lu lng trong mng, ng thi m nhim chc nng chuyn tip cc thng tin cho cc phn t khc trong mng. 1.2.3 Phn loi chuyn mch Cc h thng chuyn mch cu thnh mng chuyn mch, ta c hai dng mng chuyn mch c bn: Mng chuyn mch knh v mng chuyn mch gi. Chuyn mch knh: L loi chuyn mch phc v s trao i thng tin bng cch cp knh dn trc tip gia cc i tng s dng.X l cuc gi tin hnh qua 3 giai on: -Thit lp ng dn da vo nh cu trao i thng tin. -Duy tr knh dn trong sut thi gian trao i thng tin. -Gii phng knh dn khi i tng s dng ht nhu cu trao i.

Chuyn mch gi:Bn tin c chia thnh cc gi vi chiu di xc nh, mi gi c phn header mang thng tin a ch v th t gi.Ti u thu tin hnh sp xp cc gi tr li.Trong cc gi lun c trng kim tra m bo gi truyn khng li qua tng chng. Trong phm vi ca tiu lun ny,chng em i su vo nghin tm hiu k thut chuyn mch gi,bao gm:nguyn l chuyn mch gi,nh tuyn trong chuyn mch gi

CHNG 2: NGUYN L CHUYN MCH GI


2.1.C s K thut chuyn mch gi da trn nguyn tc chuyn thng tin qua mng di dng gi tin. Gi tin l thc th truyn thng hon chnh gm hai phn: Tiu mang cc thng tin iu khin ca mng hoc ca ngi s dng v ti tin l d liu thc cn chuyn qua mng. Qu trnh chuyn thng tin qua mng chuyn mch gi c th khng cn xc lp ng dnh ring v cc mng chuyn mch gi c coi l mng chia s ti nguyn, cc gi tin s c chuyn giao t cc nt mng ny ti nt mng khc trong mng chuyn mch gi theo nguyn tc lu m v chuyn tip, nn mng chuyn mch gi cn c coi l mng chuyn giao trong khi mng chuyn mch knh c coi l mng trong sut i vi d liu ngi s dng.Trn hng tip cn tng i n gin t kha cnh dch v cung cp, cc dch v c cung cp trn mng vin thng chia thnh dch v thoi v dch v phi thoi,trong i din cho dch v phi thoi l dch v s liu. Mt cch trc quan, mng chuyn mch in thoi cng cng PSTN c pht trin trn c s k thut chuyn mch knh cung cp cc dch v thoi truyn thng. Cc mng d liu nh cc mng cc b LAN (Local Area Network), mng Internet l mng chuyn mch gi da trn k thut chuyn mch gi thc hin chuyn ti thng tin d liu cho ngi s dng. Dch v thoi trong mng chuyn mch cng cng PSTN thng s dng k thut iu ch PCM v chim dng bng thng c nh 64kb/s, cht lng cuc gi thoi ph thuc ch yu vo k thut iu ch v s dng knh dnh ring cho cc cuc ni. Mt khc, cht lng cc dch v d liu c thc hin qua mng chuyn mch gi ph thuc rt ln vo lng bng thng cung cp.Mt s ng dng i hi bng thng rt ln v nhiu khi khng c nh, s bin ng bng thng ln theo xu hng tng bt thng c gi l hin tng bng n bng
6

thng. V vy, c ch xc nh knh dnh ring trc trong mng chuyn mch knh kh c th p ng c tiu ch bng n bng thng ca cc dch v d liu. Mt kha cnh khc ca cht lng dch v cng lun c tnh n trong qu trnh chuyn thng tin cho ngi s dng l tr ca qu trnh truyn tin. Cc dch v thoi i hi thi gian tr thp v n nh, yu cu ny hon ton c tha mn trong mng chuyn mch knh v mng chuyn mch knh s dng knh dnh ring v kt ni c hng cho cc kt ni. Trong khi , cc mng chuyn mch gi ch yu nhm mc ch cung cp dch v truyn d liu c th c xy dng theo hng kt ni v s dng knh o cung cp cc dch v yu cu tr thp v n nh. Tuy nhin,mt khi yu cu tr ca dch v d liu khng qu ngt ngho th mng d liu thng c xy dng theo m hnh phi kt ni nhm gim thiu cc quy trnh iu khin v lu lng iu khin trn mng. 2.2 M hnh kt ni h thng m OSI Trong khong gia nhng nm 70, khi cng nghip my tnh bt u pht trin rt mnh ko theo nhu cu kt ni thng tin ca cc my tnh tng t bin trn cc h tng mng khc nhau. iu ny thc y mt qu trnh chun ha cc kt ni gia cc h tng mng khc nhau v kin trc. H thng m ra i nhm to ra cc tiu chun ho cho tt c cc u ni gia cc kin trc mng, c gi l m hnh kt ni h thng m OSI (Open System Interconnection) do t chc tiu chun quc t ISO a ra.

M hnh OSI 7 lp Mc tiu ca m hnh kt ni h thng m OSI l m bo rng bt k mt x l ng dng no u khng nh hng ti trng thi nguyn thu ca dch v, hoc cc x l ng dng c th giao tip trc tip vi cc h thng khc trn cng lp nu cc h thng cng c h tr theo tiu chun ca m hnh OSI. M hnh OSI cung cp mt khung lm vic tiu chun cho cc h thng kt ni vi nhau da trn m hnh phn lp. M hnh gm c 7 lp chc nng chnh c th phn loi thnh 2 vng chnh. - Lp thp cung cp cc dch v u cui - ti - u cui p ng phng tin truyn s liu, cc chc nng hng v pha mng t lp 3 ti lp 1. - Lp cao cung cp cc dch v ng dng p ng truyn thng tin, cc chc nng hng v ngi s dng t lp 4 ti lp 7. M hnh OSI c th chia thnh ba mi trng iu hnh: -Mi trng mng: lin quan ti cc giao thc, trao i cc bn tin v cc tiu chun lin quan ti cc kiu mng truyn thng s liu khc nhau.

-Mi trng OSI: Cho php thm vo cc giao thc hng ng dng v cc tiu chun cho php cc h thng kt cui trao i thng tin ti h thng khc theo hng m. -Mi trng h thng thc: Xy dng trn m hnh OSI v lin quan ti c tnh dch v v phn mm ca ngi sn xut, n c pht trin thc hin nhim v x l thng tin phn tn trong thc t. Nhng mi trng ny cung cp nhng c tnh sau: - Giao tip gia cc lp. - Chc nng ca cc lp, giao thc nh ngha tp hp ca nhng quy tc v nhng quy c s dng bi lp giao tip vi mt lp tng ng tng t trong h thng t xa khc. -Mi lp cung cp mt tp nh ngha ca nhng dch v ti lp k cn. -Mt thc th chuyn thng tin phi i qua tng lp. Cc chc nng chi tit ca cc lp c nh ngha trong tiu chun ISO 7498 v chun X.200 ca ITU-T. 2.3 Nguyn l chuyn mch gi c c cc gi tin chuyn mch, mt qu trnh phn mnh vo to gi t d liu ngi s dng c thc hin ti cc lp cao pha ngi s dng. Qu trnh phn mnh v to gi theo cc lp ca m hnh OSI ch ra trn hnh v gm m hnh ng gi d liu v khun dng d liu ng dng. bn gi:Mi tng thm vo cc thng tin iu khin vo phn u gi tin(header) v truyn xung tng di. bn nhn:Mi tng x l thng tin da trn thng tin phn u,ly phn d liu chuyn ln tng trn.

ng gi d liu theo m hnh OSI Qu trnh phn mnh v to gi theo cc lp ca m hnh OSI ch ra trn hnh v gm m hnh ng gi d liu v khun dng d liu ng dng. bn gi:Mi tng thm vo cc thng tin iu khin vo phn u gi tin(header) v truyn xung tng di. bn nhn:Mi tng x l thng tin da trn thng tin phn u,ly phn d liu chuyn ln tng trn. K thut chuyn mch gi cho php kt ni thng tin t u cui ti u cui qua qu trnh chia s ti nguyn, s dng cc tp th tc v cc lin kt c tc khc nhau truyn cc gi tin v c th chuyn gi trn nhiu ng dn khc nhau. C hai kiu chuyn mch gi c bn: chuyn mch datagram v chuyn mch knh oVC (Virtual Circuit). 2.3.1 Chuyn mch Datagram Chuyn mch datagram cung cp cho cc dch v khng yu cu thi gian thc,vic chuyn cc gi tin ph thuc vo cc giao thc lp cao hoc ng lin kt d liu. Chuyn mch kiu datagram khng cn giai on thit lp kt ni v rt thch hp i vi dng d liu c lu lng thp v thi gian tn ti ngn. Chuyn mch datagram l chuyn mch kiu n lc ti a (best effort), cc thng
10

tin v tr s khng c m bo cng nh cc hin tng lp gi, mt gi cng d dng xy ra i vi kiu chuyn mch ny. Cc datagram phi cha ton b cc thng tin v a ch ch v cc yu cu ca lp dch v pha trn c th hin trong tiu , v vy tiu ca datagram l kh ln. V u im, chuyn mch datagram cho php la chn cc con ng ti ch nhanh nht p ng cc thay i nhanh ca mng. Mi gi c x l c lp,cc gi c th i theo bt k ng thch hp no v cc gi n ch khng theo th t gi.Trong cch thit lp knh logic ny,cc gi c th tht lc trn ng i.Bn nhn phi sp xp li cc gi mt trt t v khi phc cc gi tht lc. 2.3.2 Chuyn mch knh o Chuyn mch knh o VC yu cu giai on thit lp tuyn gia thit b gi v thit b nhn thng tin, mt knh o c hnh thnh gia cc thit b trong ng dn chuyn mch; knh o l knh ch c xc nh khi c d liu truyn qua v khng ph thuc vo logic thi gian. Chuyn mch knh o yu cu mt tuyn hin ngay trong qu trnh nh tuyn v knh o c nhn dng thng qua trng nhn dng knh o VCI (Virtual Channel Identifier) nm ti tiu gi tin. Trong qu trnh thit lp knh o, nhn dng knh o VCI c to ra bi cc node chuyn mch ch nh cc ngun ti nguyn ca gi tin s chuyn qua (v d: b m, dung lng lin kt). Trong chuyn mch ny, cc gi yu cu cuc gi v chp nhn cuc gi c dng to kt ni(handshake).Mi ng i thit lp c gn mt s ID,mi gi cha ID ca ng i thay v a ch my ch.

11

CHNG 3:NH TUYN TRONG CHUYN MCH GI


3.1 Tng quan v nh tuyn nh tuyn l mt tin trnh la chn con ng cho thc th thng tin chuyn qua mng, n cn c coi l kh nng ca mt node trong vn la chn ng dn cho thng tin qua mng. nh tuyn l mt khi nim ct li ca mng chuyn mch gi v nhiu loi mng khc nhau. nh tuyn cung cp phng tin tm kim cc tuyn ng theo cc thng tin m thc th thng tin c chuyn giao trn mng. Mi nt trong mng nhn gi d liu t mt ng vo ri chuyn tip n ti mt ng ra hng n ch ca d liu. Nh vy mi nt trung gian phi thc hin cc chc nng chn ng hay cn gi l nh tuyn v chc nng chuyn tip cho n v d liu. Cc chc nng tng ng vi chc nng lp mng (lp 3) ca m hnh OSI. Cc giao thc nh tuyn thng hot ng pha trn lp lin kt d liu (lp 2) v cung cp dch v trong sut cho tng truyn ti, v vy chng phi di tng giao vn (lp 4). Mc tiu c bn ca cc phng php nh tuyn nhm s dng ti a ti nguyn mng, v ti thiu ho gi thnh mng. t c iu ny k thut nh tuyn phi ti u c cc tham s mng v ngi s dng nh: Xc sut tc ngn, bng thng, tr, tin cy, gi thnh, v..v. V vy, mt k thut nh tuyn phi thc hin tt 2 chc nng chnh sau y: (i) Quyt nh chn ng theo nhng tiu chun ti u no . (ii) Cp nht thng tin nh tuyn, tc l thng tin dng cho chc nng. Tu thuc vo kin trc, h tng c s mng m cc k thut nh tuyn khc nhau c p dng. Cc tiu chun ti u khi chn ng dn t nt ngun ti nt ch c th ph thuc vo chnh yu cu ca thng tin cn chuyn. Trong min mng phc hp, a loi hnh dch v s tn ti a dng cc yu cu chn ng khc nhau.iu c th dn ti kh nng chn ng ca mng ch l cn ti u
12

i vi mt loi hnh dch v c th, hoc vi mt s nhm ngi s dng dch v c th. tng thch c vi s bin ng ca mng, chc nng cp nht thng tin nh tuyn l chc nng quan trng nht m cc giao thc nh tuyn phi thc hin xy dng nn c s d liu tnh ton. Vic cp nht lun hng ti gii quyt bi ton cn i lu lng bo hiu, lu lng thng tin nh tuyn nhm m bo tnh y v ti u v mt thi gian cho cc thng tin nh tuyn. nh gi c nng lc v phm vi ng dng ca cc giao thc nh tuyn, ngi ta s dng mt s tiu ch so snh gia cc giao thc nh tuyn. Mt s v d v cc tham s c th s c trnh by trong phn tip theo. Trong cc mng my tnh c rt nhiu cc k thut nh tuyn khc nhau c a ra. S phn bit gia cc k thut nh tuyn ch yu cn c vo cc yu t lin quan n 2 chc nng chnh ch ra trn y. Cc yu t thng l: (a) S phn tn ca cc chc nng chn ng trn cc nt ca mng. (b) S thch nghi vi trng thi hin hnh ca mng. (c) Cc tiu chun ti u nh tuyn. Da trn yu t (a) ta c th phn bit k thut nh tuyn thnh: k thut nh tuyn tp trung v phn tn. Da trn yu t (b) ta c k thut nh tuyn tnh hoc ng (tng thch). Cui cng cc k thut nh tuyn cng loi theo (a) v (b) li c th phn bit bi yu t (c). Mt s tiu ch c bn nhm xc nh k thut nh tuyn trong thc t c th l: - tr trung bnh ca thi gian truyn gi tin. - S lng nt trung gian gia ngun v ch ca gi tin. - an ton ca vic truyn tin. - Ngun ti nguyn mng s dng cho truyn tin . v.v.

13

Vic chn tiu ch ti u nh vy ph thuc vo tng dng mng c th nh: cu hnh mng, c tnh lu lng mng, yu cu thng lng, mc ch s dng.v.v..).Cc tiu ch la chn cho bi ton nh tuyn c th thay i mc d cu trc mng khng thay i. Kin trc mng cng c th thay i theo thi gian hoc cc trin khai ng dng trn mng, chnh v th m vn ti u ho nh tuyn lun c t ra ngay c trong qu trnh thit k v trong thi gian trin khai mng. Mt khc, trong mi trng mng thc t lun tn ti s i lp v quan im ngi s dng dch v v nh khai thc dch v mng. Ngi s dng lun mun c nhng dch v tt nht vi cht lng cao nht cho h, trong khi nh khai thc li mun ti u dch v ngi dng trn nn mng c sn hoc u t ti thiu em li li nhun cao nht.V vy, cc gii php nh tuyn thc t thng l gii php dung ho hay cn gi l gii php cn ti u i vi hai hng yu cu mang tnh i lp. V mt nguyn tc, cc gii php qun tr mng bao gm c chc nng nh tuyn trong mng thng c chia thnh hai loi, qun l kiu tp trung v kiu phn tn.Gii php qun l nh tuyn cho cc mng nh (v kch c mng v phc tp ca mng) thng ng dng kiu nh tuyn tp trung gim gi thnh v thun tin trong cng tc qun l. Tuy nhin kiu nh tuyn tp trung thng bc l cc yu im v phi cng khai thng tin nh tuyn cho ton mng v d b tn cng. Hn na, nh tuyn tp trung phn ng vi s thay i trng thi mng km nhanh nhy do phi thu thp thng tin ton mng v x l tp trung. Gii php nh tuyn phn tn ph hp vi cc mng ln v phc tp cao, n da trn s phn cp v kt hp gia cc nt c coi l ngang hng phn vng, v vy nu c li xy ra th n ch mang tnh cc b gia cc nt lin quan. Cc thng tin nh tuyn phn tn c x l v chuyn rt nhanh trong mng qua cc nt mng c chc nng phn b thng tin nh tuyn trn din rng ca mng.

14

3.2 Cc thut ton nh tuyn Cc thut ton tnh ton nh tuyn c s dng tnh ton v quyt nh chn ng trn c s thng tin nh tuyn nhn c qua cc giao thc nh tuyn. Cc thut ton tt v ph hp vi mi trng mng s m bo c tc v hiu nng ca quy trnh nh tuyn. Trong mc ny s trnh by v cc c s l thuyt v thut ton ca hai thut ton thng c s dng trong mng truyn thng: thut ton BellmanFord v thut ton Dijkstra. Hai thut ton ny c gi l cc thut ton tm ng ngn nht, vi mc tiu tm ra con ng ngn nht t node ngun ti node ch trong cc m hnh mng tng qut (tp trung, phn tn). 3.2.1 Thut ton Bellman-Ford v nh tuyn vector khong cch 3.2.1.1 M hnh tp trung xem xt thut ton Bellman-ford trong tip cn m hnh tp trung, ta xem xt v d mt m hnh ha mng trn hnh v. M hnh mng v d c th hin qua mt th c trng s th hin trn cc lin kt, kt qu tnh ton ng dn ngn nht da trn cc trng s trn th. Gi dij l trng s (gi) lin kt gia node i v node j, Dij l gi ti thiu gia node i v node j. Nu hai node khng c kt ni trc tip gi lin kt c t bng . Gi nt trung gian c kt ni trc tip ti mt trong hai node l k v biu thc Bellman-Ford c biu din nh sau.

V d v m hnh kt ni mng
15

Wo ii = 0 vi mi i, Wij = min{Wik + wkj } vi ij. Nh vy, gi ti thiu ph thuc vo gi ti thiu t i ti k v gi ca lin kt kj.C th c nhiu node k kt ni trc tip ti node j(k1, k2,..) ngoi tr node k=i . Mt vn quan trng trong thut ton ny l: nu node k khng kt ni trc tip ti node j nn dkj=. Vi gi thit bit gi ti thiu Dik t node i ti node k, trong tnh ton thc t, mt bin chy c s dng tnh gi ti thiu sau mt s bc, ta c gi ti thiu sau bc th h l ij h Dij . 3.2.1.2 M hnh phn tn Trong tip cn m hnh phn tn, cc node mng t tnh ton trn c s thng tin thu nhn c t mng xc nh con ng ngn nht t ti ch bt k. V vy,node ngun cn bit gi ng dn ngn nht ti tt c cc node trung gian ti ch Dik. Theo m hnh phn tn, ta tm kim cc lin kt ra khi node i trc tip ti node k vi gi lin kt dik v coi gi lin kt ti thiu gia k v j l Djk m khng cn bit cch thc xc nh gi tr ny ca k. Danh sch cc kt ni trc tip ti i c k hiu l Ni.Nu node i tm c mt node ln cn ca n c ng i ngn nht ti ch, n c th s dng thng tin ny xc nh gi ti ch bng cch cng vi gi lin kt dik.Trong phng php tnh theo vector khong cch, mt node nh vo cc node ln cn bit gi ca ng i ti ch xc nh tuyn tt nht. thc hin nhim v , phng php ny thng xuyn tnh ton li theo nh k hoc khi c thng tin t cc node ln cn. tng then cht ca thut ton trong m hnh phn tn l node k cn phn tn gi ca n ti node j (Dkj) ti tt c cc kt ni trc tip ti i, ph thuc vo i v thi gian. S khc bit vi thut ton Bellman-Ford tp trung l th t tnh ton cng vi cc lin kt a ra mt gc khc tnh ton ng dn ngn nht.

16

3.2.2 Thut ton Dijkstra Thut ton Dijkstra l mt kiu tip cn khc trong k thut tm ng dn ngn nht gia hai node trong mng. Thut ton Dijkstra hot ng trn mt tp node ng c ln cn ca node ngun tnh ton v cc nh ng dn ngn nht ti mt node ch. Mt c tnh ni tri ca thut ton Dijkstra l c th tnh ton cc ng dn ngn nht ti tt c cc node ch t mt node ngun, thay v tnh ton theo tng cp ngun ch. Thut ton Dijkstra cng c phn loi hot ng theo m hnh tp trung v phn tn. 3.2.2.1 M hnh tp trung Gi thit mt node i bt k trong mt mng gm N node m t ta mun tnh ton cc ng dn ngn nht ti tt c cc node cn li. Danh sch N node c nh ngha bi N={1, 2, 3,N}. Mt node ch c k hiu l j (ji). Ta s dng hai k hiu sau: dij =gi lin kt gia node i v j; Dij= gi ng dn ti thiu gia node i v j. Thut ton Dijkstra chia danh sch N node thnh hai danh sch: N c bt u vi danh sch c nh S th hin cc node c xem xt, danh sch ngh S cho cc node s c xem xt tnh ton. Trong qu trnh tnh ton, danh sch S s m rng vi cc node mi trong khi danh sch S s rt ngn li khi node trong gia nhp vo S. Thut ton dng khi tt c cc node trong danh sch ca S nm trong danh sch S.Mu cht ca thut ton nm ti hai phn: (1) cch thc m rng tp S v (2) cch tnh ton ng dn ngn nht ti cc node ln cn ca cc node trong S (cc node cha nm trong danh sch S). Danh sch S c m rng sau mi vng lp tnh ton mt node k ca node i c gi ti thiu ti node i. Ti mi vng lp, thut ton tnh ton cc node ln cn ca node k ( k #S) tm gi ti thiu c th thay i sau mi vng lp.

17

3.2.2.2 M hnh phn tn Bin phn tn ca thut ton Dijkstra tng t nh trong tip cn tp trung. S khc bit ln nht l gi ca lin kt nhn c bi mt node c th khc vi cc node khc khi cc thng tin chuyn ti cc node khng ng b. V vy ta nh ngha gi ca lin kt (k-m) nhn c ti node i l dij(t) , tng t nh vy i vi gi ti thiu t i ti j ph thuc vo thi gian Dij(t). Nh vy, thut ton Dijkstra cho mi trng phn tn trao i thng tin gi lin kt theo cch phn tn c a vo trong thut ton, cc bc tng theo thi gian hc thng tin t cc lin kt v gi lin kt trong mng.

18

KT LUN
Ton b phn tm hiu trnh by v nguyn tc hot ng ca mng chuyn mch gi, cc phng php chuyn gi.Trn c s phn tch cu trc chc nng ca h thng chuyn mch gi, vn phn loi trng chuyn mch gi, cng nh phn tch v nh gi cc kiu trng chuyn mch gi in hnh nhm nm bt c cc u nhc im ca cu trc trng chuyn mch gi trong cc thit b chuyn mch gi. Song song vi l nhng khi nim c bn v nh tuyn trong chuyn mch gi-k thut c bn nhng c ng dng cao trong cc mng vin thng cng nh nhiu mng khc hin nay. Thng qua qu trnh nghin cu v nhng phn trnh by trn,nhm chng em hc hi v tm hiu m mang c rt nhiu kin thc.Cng vi nhng bi ging trn lp v qu trnh tm hiu ny chng em nm vng hn v kin thc mng thng tin hin nay,cng c kin thc vin thng chun b tt cho nhng mn hc sau.

19

TI LIU THAM KHO

1.Tailieu.vn 2.Bi ging c s k thut chuyn mch Hong Trng Minh,Nguyn Thanh H 3.Gio trnh chuyn mch thng tin Nguyn Trung Ha 4.Slide bi ging mng thng tin i hc bch khoa H Ni

20