Está en la página 1de 87

MC LC

MC LC.....................................................................................................................i M U......................................................................................................................iv THUT NG VIT TT..........................................................................................vi CHNG 1. GII THIU CHUNG.........................................................................9 1.1. Tng quan v NGN............................................................................................9 1.1.1. Cu trc chc nng ca mng NGN.........................................................9 1.1.2. Cu trc vt l ca mng NGN................................................................10 1.2. Cc cng ngh then cht cho mng th h mi.............................................12 1.2.1. IP...............................................................................................................12 1.2.2. ATM...........................................................................................................14 1.2.3. IP over ATM............................................................................................15 1.2.4. MPLS........................................................................................................17 CHNG 2. CHUYN MCH NHN...................................................................10 2.1. Khi nim chuyn mch nhn .......................................................................10 2.2. L do dng chuyn mch nhn .....................................................................10 2.2.1. Tc v tr........................................................................................10 2.2.2. Kh nng p ng....................................................................................11 2.2.3. Tnh n gin............................................................................................12 2.2.4. S dng ti nguyn...................................................................................12 2.2.5. iu khin tuyn.......................................................................................12 2.3. Nhn - a ch...................................................................................................13 2.4. nh tuyn - qung b ...................................................................................15 2.5. S cn thit cho QoS ca mng......................................................................16 2.5.1. Chuyn mch nhn v QoS......................................................................16 2.5.2. S ng gp ca chuyn mch nhn ......................................................17 2.6. S tha k ca X.25 v VC.............................................................................17 2.6.1. Knh o trong chuyn mch nhn...........................................................18 2.6.2. Frame Relay v ATM...............................................................................19 2.7. Hin trng v cc khi nim MPLS...............................................................19 2.8. ng chuyn mch nhn .............................................................................20 CHNG 3. C S CHUYN MCH NHN .....................................................21 3.1. Lp tng ng chc nng (FEC)...............................................................21 3.1.1. p ng v bn cht hot ng..........................................................21

H Trng Nht Linh - Lp D2001VT

3.1.2. Thng tin dng trong quyt nh chuyn tip........................................22 3.2. Cc phng php ch nh nhn ...................................................................23 3.2.1. S lin kt cc b v t xa........................................................................23 3.2.2. Lin kt dng ln v dng xung.............................................................24 3.2.3. Lin kt iu khin v lin kt d liu chuyn ng..............................24 3.3. Khng gian nhn v s phn nhn ................................................................25 3.4. Router bin v min chuyn mch nhn .......................................................26 3.5. ng chuyn mch nhn ..................................................................................27 3.6. S trao i nhn .............................................................................................28 CHNG 4. CHUYN MCH V CHUYN TIP NHN ..............................30 4.1. S phn chia mng chuyn mch v chuyn tip..........................................30 4.1.1. Chuyn mch lp 2...................................................................................31 4.1.2. nh tuyn lp 3........................................................................................33 4.1.3. Chuyn mch lp 3...................................................................................33 4.1.4. Chuyn mch lp 4...................................................................................35 4.2. nh x t lp 3 ti lp 2.................................................................................36 4.2.1. LSR li vo................................................................................................36 4.2.2. LSR trung gian..........................................................................................37 4.2.3. LSR li ra..................................................................................................38 4.3. Chuyn mch th.............................................................................................38 4.3.1. Thnh phn chuyn tip ..........................................................................38 4.3.2. Thnh phn iu khin.............................................................................39 CHNG 5. HOT NG PHN B NHN .....................................................44 5.1. Giao thc phn b nhn .................................................................................44 5.1.1. Bn tin LDP...............................................................................................45 5.1.2. Cc FEC, khng gian nhn v nh danh..............................................46 5.1.3. Phin LDP.................................................................................................47 5.1.4. Qun l v phn b nhn ........................................................................48 5.1.5. Bn tin LDP...............................................................................................49 5.1.5.1. Mo u LDP.....................................................................................49 5.1.5.2. M ho m ho di kiu (TLV)....................................................50 5.1.5.3. Khun dng bn tin LDP...................................................................50 5.1.5.4. Khun dng v chc nng TLV........................................................51 5.1.5.5. Khun dng v chc nng cc bn tin LDP.....................................53 5.2 Giao thc dnh trc ti nguyn (RSVP) v phn b nhn ........................61

H Trng Nht Linh - Lp D2001VT

ii

5.3. Giao thc nh tuyn cng min (BGP) v phn b nhn ...........................62 CHNG 6. K THUT LU LNG................................................................63 6.1. nh ngha k thut lu lng (TE)..............................................................63 6.1.1. Hot ng nh hng lu lng v nh hng ti nguyn ...............63 6.1.2 Tc nghn nh nht...................................................................................64 6.2. Dch v lin kt da trn QoS v phn lp dch v......................................65 6.3. K thut lu lng v s sp t lu lng .................................................67 6.3.1. Hng i lu lng ..................................................................................67 6.3.2. Hot ng nh tuyn hin nay................................................................68 6.4. Trung k lu lng, lung lu lng v tuyn chuyn mch nhn ............69 6.4.1. S thu ht ca MPLS i vi k thut lu lng .................................70 6.4.2. Dung lng lin kt...................................................................................70 6.4.3. Phn b ti trng......................................................................................70 6.4.4. Cc thuc tnh trung k lu lng .........................................................71 KT LUN.................................................................................................................77 TI LIU THAM KHO......................................................................................78

H Trng Nht Linh - Lp D2001VT

iii

M U
Trong nhng nm qua, ngnh cng nghip vin thng v ang tm mt phng thc chuyn mch c th phi hp u im ca IP v ATM p ng nhu cu pht trin ca mng li trong giai on tip theo. c nhiu nghin cu c a ra trong c vic nghin cu cng ngh chuyn mch nhn MPLS. Cng ngh MPLS l kt qu pht trin ca cng ngh chuyn mch IP s dng c ch hon i nhn nh ca ATM tng tc truyn gi tin m khng cn thay i cc giao thc nh tuyn ca IP. MPLS tch chc nng ca IP thnh hai phn ring bit: chc nng chuyn gi tin v chc nng iu khin. Bn cnh , MPLS cng h tr vic qun l d dng hn. Trong nhng nm gn y, MPLS c la chn n gin ho v tch hp mng trong mng li. N cho php cc nh khai thc gim chi ph, n gin ho vic qun l lu lng v h tr cc dch v Internet. Quan trng hn c, n l mt bc tin mi trong vic t mc tiu mng a dch v vi cc giao thc gm di ng, thoi, d liu V vy, em nhn ti nghin cu cng ngh chuyn mch MPLS hiu r su hn cc bn cht, c ch hot ng ca MPLS. Lun vn tt nghip Chuyn mch MPLS bao gm cc ni dung chnh nh sau: Chng 1: Gii thiu chung v NGN v cc cng ngh trong mng th h sau. Chng 2: Gii thiu chung v chuyn mch nhn. Chng 3: Gii thiu v cc c s hot ng ca chuyn mch nhn. Chng 4: Gii thiu v hot ng chuyn mch v chuyn tip nhn. Chng 5: Gii thiu v hot ng phn b nhn. Chng 6: Gii thiu v k thut lu lng c s dng trong MPLS. Do thi gian v trnh c hn, nn chc chn nhng vn c cp trong n s khng trnh khi nhng thiu st. Em rt mong nhn c s lng th v kin ng gp ca cc thy, c cng nh nhng ai quan tm. Trong qu trnh hc tp ti Hc vin cng ngh Bu Chnh Vin Thng v thc hin n tt nghip, em xin chn thnh cm n cc thy c trc tip v gin tip

H Trng Nht Linh - Lp D2001VT

iv

gip em hon thnh tt chng trnh hc tp. c bit, em xin chn thnh cm n c gio Thc s Nguyn Th Thanh K trc tip hng dn em hon thnh tt n tt nghip ny. H Ni, ngy 21 thng 10 nm 2005 Sinh vin H Trng Nht Linh

H Trng Nht Linh - Lp D2001VT

THUT NG VIT TT
Vit tt AAL ARP ASP ATM BGP BTT CR CR-LDP Ch gii ting Anh ATM Adaptation Layer Addresss Resolution Protocol Automatic Protection Switching Asynchronous Transfer Mode Border Gateway Protocol Bidirectional Traffic Trunk Cell Router Constraint Routing LDP Ch gii ting Vit Lp thch ng ATM Giao thc phn gii a ch Chuyn mch bo v t ng Phng thc truyn ti khng ng b Giao thc nh tuyn cng min Trung k lu lng hai chiu B nh tuyn t bo

Giao thc phn phi nhn nh tuyn cng bc CS Convergence Sublayer Phn lp hi t CSR Cell Switching Router Thit b nh tuyn chuyn mch t bo DLCI Data Link Connection Identifier Nhn dng kt ni lp lin kt d liu DVMRP Distance Vector Multicast Giao thc nh tuyn multicast Routing Protocol theo vec t khong cch EGP Edge Gateway Protocol Giao thc nh tuyn cng bin FDDI Fiber Distributed Data Interface Giao tip d liu cp quang phn tn FEC Forwarding Equivalence Class Nhm chuyn tip tng ng FR Frame Relay Chuyn mch khung IGMP Internet Group Massage Giao thc bn tin nhm internet Protocol IGP Interior Gateway Protocol Giao thc nh tuyn trong min LAN Local Area Network Mng cc b LANE Local Area Network Emulation M phng mng cc b LCA Least Common Ancestor Node gc t chung nht LC-ATM Label Control ATM Giao din ATM iu khin chuyn mch nhn LDP Label Distribution Protocol Giao thc phn phi nhn LER Label Edge Router Router chuyn mch nhn bin LFIB Label Forwarding Information C s d liu chuyn tip nhn Base
H Trng Nht Linh - Lp D2001VT vi

LIB LSFT LSP LSR MAC MG MPLS MSC MSF MTBF NGN NLPID OSPF PID PML PP PSL QoS RPR RSVP TAT TCP TDP TE TIB TDP TLV TSR UDP UPC VCI VPI

Label Information Base

Bng thng tin nhn trong b nh tuyn Label Switch Forwording Table Bng chuyn tip chuyn mch nhn Label Switched Path Tuyn chuyn mch nhn Label Switching Router B nh tuyn chuyn mch nhn Media Access Controller Thit b iu khin truy nhp mc phng tin truyn thng Media Gateway Cng chuyn i phng tin MultiProtocol Label Switching Chuyn mch nhn a giao thc Multicast Server Model M hnh my ch multicast MultiService Switch Forum Din n chuyn mch a dch v Mean Time Between Failure Thi gian trung bnh gia hai li lin tip Next Generation Network Mng th h sau Network Layer Protocol Nhn dng giao thc lp mng Identifier Open Shortest Path First Giao thc nh tuyn ng ngn nht Protocol Identifier Giao thc multicast c lp Path Merging LSR LSR hp nht Protected Path Tuyn c bo v Path Switching LSR LSR chuyn mch ng Quality of Service Cht lng dch v Resilient Packet Ring Vng gi khi phc nhanh Resource Reservation Protocol Giao thc ginh trc ti nguyn Theoretical Arrival Time Thi gian n l thuyt Transmission Control Protocol Giao thc iu khin truyn dn Tag Distribution Protocol Giao thc phn phi th Traffic Engineering K thut lu lng Tag Information Base C s thng tin th Tag Distribution Protocol Giao thc phn b th Type-Length-Value Gi tr-chiu-di kiu Tag Switching Router Router chuyn mch th User Data Protocol Giao thc d liu ngi dng Usage Parameter Control iu khin tham s s dng Vitual Chennel Identifier Nhn dng knh o Vitual Path Identifier Nhn dng ng o
vii

H Trng Nht Linh - Lp D2001VT

WAN Wide Area Network TTL Time To Live MPLSCP MPLS Conrol Protocol

Mng din rng Thi gian sng Giao thc iu khin MPLS

H Trng Nht Linh - Lp D2001VT

viii

n tt nghip i hc chung

Chng 1. Gii thiu

CHNG 1. GII THIU CHUNG


1.1. Tng quan v NGN
Trong nhiu nm gn y, nn cng ngh vin thng vn ang trn tr v vn pht trin cng ngh no v dng mng g h tr cc nh khai thc trong bi cnh lut vin thng ang thay i nhanh chng, cnh tranh ngy cng khc lit. Khi nim mng th h mi (hay cn gi l mng th h sau - NGN) ra i cng vi vic ti kin trc mng, tn dng tt c cc u th v cng ngh tin tin nhm a ra nhiu dch v mi, mang li ngun thu mi, gp phn gim chi ph khai thc v u t ban u cho cc nh kinh doanh. Mt chin lc pht trin nhp nhng t mng hin ti sang kin trc mng mi l rt quan trng nhm gim thiu yu cu u t trong giai on chuyn tip, trong khi sm tn dng nhng phm cht ca mng NGN. Tuy nhin, bt k bc i no trong tin trnh chuyn tip ny cng cn to iu kin d dng hn cho mng rt cuc vn pht trin sang kin trc NGN da trn chuyn mch gi. Bt c gii php no c chn la th cc h thng chuyn mch truyn thng cng s phi tn ti bn cnh cc phn t mng cng ngh mi trong nhiu nm ti. Mng th h sau c t chc da trn cc nguyn tc c bn sau: - p ng nhu cu cung cp cc loi hnh dch v vin thng phong ph a dng, a dch v, a phng tin. - Mng c cu trc n gin. - Nng cao hiu qu s dng, cht lng mng li v gim thiu chi ph khai thc bo dng. - D dng m rng dung lng, pht trin cc dch v mi. - linh hot v tnh sn sng cao, nng lc tn ti mnh.

1.1.1. Cu trc chc nng ca mng NGN


Cho n nay, mng th h sau vn l xu hng pht trin mi m, cha c mt khuyn ngh chnh thc no ca Lin minh Vin thng th gii ITU v cu trc ca n. Nhiu hng vin thng ln a ra m hnh cu trc mng th h mi nh Alcatel, Ericssion, Nortel, Siemens, Lucent, NEC,.. Bn cnh vic a ra nhiu m

H Trng Nht Linh - Lp D2001VT

n tt nghip i hc chung

Chng 1. Gii thiu

hnh cu trc mng NGN khc nhau v km theo l cc gii php mng cng nh nhng sn phm thit b mi khc nhau. Cc hng a ra cc m hnh cu trc tng i r rng v cc gii php mng kh c th l Alcatel, Siemens, Eicssion. Nhn chung t cc m hnh ny, cu trc mng mi c c im chung l bao gm cc lp chc nng sau : Lp ng dng. Lp iu khin. Lp truyn thng. Lp truy nhp v truyn dn.

Hnh 1.1 Cu trc chc nng ca mng NGN

1.1.2. Cu trc vt l ca mng NGN


NGN cn c hiu l mng th h sau hay mng th h k tip m khng phi l mng th h mi, nn khi xy dng v pht trin mng theo xu hng NGN, ngi ta ch n vn kt ni mng th h sau vi mng hin hnh v tn dng cc thit b vin thng hin c trn mng nhm t c hiu qu khai thc ti a. Trong mng vin thng th h mi c rt nhiu thnh phn cn quan tm, nhng y ta ch cn nghin cu nhng thnh phn chnh th hin r nt s tin tin ca NGN so vi mng vin thng truyn thng.

H Trng Nht Linh - Lp D2001VT

10

n tt nghip i hc chung

Chng 1. Gii thiu

Hnh 1.2. Cu trc vt l ca mng NGN

Hnh 1.3. Cc thnh phn chnh ca mng NGN Cc thnh phn gm : 1. Media Gateway (MG) 2. Media Gateway Controller (MGC Call Agent - Softswitch) 3. Signaling Gateway (SG) 4. Media Server (MS)
H Trng Nht Linh - Lp D2001VT 11

n tt nghip i hc chung

Chng 1. Gii thiu

5. Application Server (Feature Server)

1.2. Cc cng ngh then cht cho mng th h mi


Ngy nay, do yu cu ngy cng tng v s lng v cht lng dch v thc y s pht trin nhanh chng ca th trng cng ngh in t - tin hc - vin thng. Nhng xu hng pht trin cng ngh v ang tip cn nhau, an xen ln nhau nhm cho php mng li tha mn tt hn cc nhu cu ca khch hng trong tng lai. Theo ITU, c hai xu hng t chc mng chnh: - Hot ng kt ni nh hng (CO Connection Oriented Operation) - Hot ng khng kt ni (CL Connectionless Operation ) Trong hot ng kt ni nh hng, cc cuc c thc hin vi trnh t: gi s - xc lp kt ni - gi v nhn thng tin - kt thc. Trong kiu kt ni ny, cng ngh ATM pht trin cho php y mnh cc dch v bng rng v nng cao cht lng dch v. Hot ng khng kt ni da trn giao thc IP nh vic truy cp Internet khng yu cu vic xc lp trc cc kt ni, v vy cht lng dch v c th khng hon ton m bo nh trng hp trn. Tuy nhin, do tnh n gin, tin li vi chi ph thp, cc dch v thng tin theo phng thc CL pht trin rt mnh m theo xu hng nng cao cht lng dch v v tin ti cnh tranh vi cc dch v thng tin theo phng thc CO. Tuy vy, hai phng thc pht trin ny dn tim cn v hi t dn n s ra i cng ngh ATM/IP. S pht trin mnh m ca cc dich v v cc cng ngh mi tc ng trc tip n s pht trin cu trc mng.

1.2.1. IP
S pht trin t bin ca IP, s tng trng theo cp s nhn ca thu bao Internet l mt thc th khng ai c th ph nhn. Hin nay, lng dch v ln nht trn cc mng ng trc trn thc t u l t IP. Trong cng tc tiu chun ho cc loi k thut, vic bo m tt hn cho IP tr thnh trng im ca cng tc nghin cu. IP l giao thc chuyn tip gi tin. Vic chuyn tip gi tin thc hin theo c ch phi kt ni. IP nh ngha c cu nh s, c cu chuyn tin, c cu nh tuyn v
H Trng Nht Linh - Lp D2001VT 12

n tt nghip i hc chung

Chng 1. Gii thiu

cc chc nng iu khin mc thp (ICMP). Gi tin IP gm a ch ca bn nhn, a ch l s duy nht trong ton mng v mang y thng tin cn cho vic chuyn gi ti ch.

Hnh 1.4. Cc xu hng pht trin trong cng ngh mng C cu nh tuyn c nhim v tnh ton ng i ti cc nt trong mng. Do vy, c cu nh tuyn phi c cp nht cc thng tin v topo mng, thng tin v nguyn tc chuyn tin v n phi c kh nng hot ng trong mi trng mng gm nhiu nt. Kt qu tnh ton ca c cu nh tuyn c lu trong cc bng chuyn tin (Forwarding table) cha thng tin v chng tip theo c th gi gi tin ti hng ch. Da trn cc bn chuyn tin, c cu chuyn tin chuyn mch cc gi IP ti hng ch. Phng thc chuyn tin truyn thng l theo tng chng mt. cch ny, mi nt mng tnh ton mng chuyn tin mt cch c lp. Phng thc ny, do vy yu cu kt qu tnh ton ca phn nh tuyn ti tt c cc nt phi nht qun vi

H Trng Nht Linh - Lp D2001VT

13

n tt nghip i hc chung

Chng 1. Gii thiu

nhau. S khng thng nht ca kt qu s dn n vic chuyn gi tin sai hng, iu ny ng ngha vi vic mt gi tin. Kiu chuyn tin theo tng chng hn ch kh nng ca mng. V d, vi phng thc ny, nu cc gi tin chuyn ti cng mt a ch i qua cng mt nt th chng s c truyn qua cng mt im ti ch. iu ny khin cho mng khng th thc hin mt s chc nng khc nh nh tuyn theo ch, theo dch v. Tuy nhin, bn cnh , phng thc nh tuyn v chuyn tin ny nng cao tin cy cng nh kh nng m rng ca mng. Giao thc nh tuyn ng cho php mng phn ng li vi s c bng vic thay i tuyn khi router bit c s thay i v topo mng qua vic cp nht thng tin v trng thi kt ni. Vi cc phng thc nh CDIR (Classless Inter Domain Routing), kch thc ca bn tin c duy tr mc chp nhn c, v do vic tnh ton nh tuyn u c cc nt t thc hin nn mng c th m rng m khng cn bt c thay i no. Tm li, IP l mt giao thc chuyn mch gi c tin cy v kh nng m rng cao. Tuy nhin, vic iu khin lu lng rt kh thc hin do phng thc nh tuyn theo tng chng. Mt khc, IP cng khng h tr cht lng dch v.

1.2.2. ATM
Cng ngh ATM da trn c s ca phng php chuyn mch gi, thng tin c nhm vo cc gi tin c chiu di c nh, trong v tr ca gi khng ph thuc vo ng h ng b v da trn nhu cu bt k ca knh trc. Cc chuyn mch ATM cho php hot ng vi nhiu tc v dch v khc nhau. ATM c hai c im quan trng : Th nht ATM s dng cc gi c kch thc nh v c nh gi l cc t bo ATM, cc t bo nh vi tc truyn ln s lm cho tr truyn lan v bin ng tr gim nh i vi cc dch v thi gian thc, cng s to iu kin cho vic hp knh tc cao c d dng hn. Th hai, ATM c kh nng nhm mt vi knh o thnh mt ng o nhm gip cho vic nh tuyn c d dng. ATM khc vi nh tuyn IP mt s im. N l cng ngh chuyn mch hng kt ni. Kt ni t im u n im cui phi c thit lp trc khi thng

H Trng Nht Linh - Lp D2001VT

14

n tt nghip i hc chung

Chng 1. Gii thiu

tin c gi i. ATM yu cu kt ni phi c thit lp bng nhn cng hoc thit lp mt cch t ng thng qua bo hiu. Mt khc, ATM khng thc hin nh tuyn ti cc nt trung gian. Tuyn kt ni xuyn sut c xc nh trc khi trao i d liu v c gi c nh trong sut thi gian kt ni. Trong qu trnh thit lp kt ni, cc tng i ATM trung gian cung cp cho kt ni mt nhn. Vic ny thc hin hai iu: dnh cho kt ni mt s ti nguyn v xy dng bng chuyn t bo ti mi tng i. Bng chuyn t bo ny c tnh cc b v ch cha thng tin v cc kt ni ang hot ng i qua tng i. iu ny khc vi thng tin v ton mng cha trong bng chuyn tin ca router dng IP. Qu trnh chuyn t bo qua tng i ATM cng tng t nh vic chuyn gi tin qua router. Tuy nhin, ATM c th chuyn mch nhanh hn v nhn gn trn cell c kch thc c nh (nh hn ca IP), kch thc bng chuyn tin nh hn nhiu so vi ca IP router, v vic ny c thc hin trn cc thit b phn cng chuyn dng. Do vy, thng lng ca tng i ATM thng ln hn thng lng ca IP router truyn thng.

1.2.3. IP over ATM


Hin nay, trong xy dng mng IP, c n my loi k thut, nh IP over SDH/SONET, IP over Fiber, IP over WDM. Cn k thut ATM, do c cc tnh nng nh tc cao, cht lng dch v tt, iu khin lu lng, m cc mng li dng b nh tuyn truyn thng cha c, nn c s dng rng ri trn mng ng trc IP. Mt khc, do yu cu tnh thi gian thc cn tng i cao i vi mng li, IP over ATM vn l k thut c chn trc tin hin nay. M MPLS chnh l s ci tin ca IP over ATM kinh in, cho nn y chng ta cn nhn li mt cht v hin trng ca k thut IP over ATM. IP over ATM truyn thng l mt k thut kiu xp chng, n xp IP (k thut lp 3) ln ATM (k thut lp 2); giao thc ca hai tng hon ton c lp vi nhau; gia chng phi nh mt lot giao thc ( nh NHRP, ARP,.) na mi m bo ni thng. iu hin nay trn thc t c ng dng rng ri. Nhng trong tnh trng mng li c m rng nhanh chng, cch xp chng cng gy ra nhiu vn cn xem xt li.

H Trng Nht Linh - Lp D2001VT

15

n tt nghip i hc chung

Chng 1. Gii thiu

Trc ht, vn ni bt l phng thc chng xp phi thit lp cc lin kt PVC ti N nt, tc l cn thit lp mng lin kt. Nh th c th s gy nn vn bnh phng N, rt phin phc, tc l khi thit lp, bo dng, g b s lin kt gia cc im nt, s vic phi lm (nh s VC, lng tin iu khin) u c cp s nhn bnh phng ca N im nt. Khi m mng li ngy cng rng ln, chi phi kiu s lm cho mng li qu ti. Th hai, phng thc xp chng s ct c mng li IP over ATM ra lm nhiu mng logc nh (LIS), cc LIS trn thc t u l trong mt mng vt l. Gia cc LIS dng b nh tuyn trung gian lin kt, iu ny s nh hng n vic truyn nhm gi tin gia cc LIS khc nhau. Mt khc, khi lu lng rt ln, nhng b nh tuyn ny s gy hin tng nghn c chai i vi bng rng. Hai im nu trn u lm cho IP over ATM ch c th dng thch hp cho mng tng i nh, nh mng x nghip, nhng khng th p ng c nhu cu ca mng ng trc Internet trong tng lai. Trn thc t, hai k thut ny ang tn ti vn yu km v kh nng m rng thm. Th ba l, trong phng thc chng xp, IP over ATM vn khng c cch no m bo QoS thc s. Th t, vn khi thit k hai loi k thut IP v ATM u lm ring l, khng xt g n k thut kia, iu ny lm cho s ni thng gia hai bn phi da vo mt lot giao thc phc tp, cng vi cc b phc v x l cc giao thc ny. Cch lm nh th c th gy nh hng khng tt i vi tin cy ca mng ng trc. Cc k thut MPOA (Multiprotocol over ATM a giao thc trn ATM), LANE (LAN Emulation M phng LAN), cng chnh l kt qu nghin cu gii quyt cc vn , nhng cc gii php ny u ch gii quyt c mt phn cc tn ti, nh vn QoS chng hn. Phng thc m cc k thut ny dng vn l phng thc chng xp, kh nng m rng vn khng . Hin nay, xut hin mt loi k thut IP over ATM khng dng phng thc xp chng, m dng phng thc chuyn mch nhn, p dng phng thc tch hp. K thut ny chnh l c s ca MPLS.

H Trng Nht Linh - Lp D2001VT

16

n tt nghip i hc chung

Chng 1. Gii thiu

1.2.4. MPLS
i vi cc nh thit k mng m ni, s pht trin nhanh chng, s m rng khng ngng ca mng Internet, s tng vt ca lng dch v cng nh s phc tp ca cc loi hnh dch v, dn dn lm cho mng vin thng hin ti khng cn kham ni. Mt mt, cc nh khai thc than phin kh kim c li nhun, nhng mt khc th thu bao li ku ca l gi c qu cao, tc th qu chm. Th trng bc bch i hi c mt mng tc cao hn, gi c thp hn. y chnh l nguyn nhn cn bn ra i mt lot cc k thut mi, trong c MPLS. Bt k k thut ATM tng c coi l nn tng ca mng s a dch v bng rng (B-ISDN), hay l IP t thnh cng ln trn th trng hin nay, u tn ti nhc im kh khc phc c. S xut hin ca MPLS - k thut chuyn mch nhn a giao thc gip chng ta c c s chn la tt p cho cu trc mng thng tin tng lai. Phng php ny dung hp mt cch hu hiu nng lc iu khin lu lng ca thit b chuyn mch vi tnh linh hot ca b nh tuyn. Hin nay, cng c nhiu ngi tin tng mt cch chc chn rng MPLS s l phng n l tng cho mng ng trc trong tng lai. MPLS tch chc nng ca IP router lm hai phn ring bit : chc nng chuyn gi tin v chc nng iu khin. Phn chc nng chuyn gi tin, vi nhim v gi gi tin gia cc router, s dng c ch hon i nhn tng t nh ATM. Trong MPLS, nhn l mt s c di c nh v khng ph thuc vo lp mng. K thut hon i nhn v bn cht l vic tm nhn ca mt gi tin trong mt bng cc nhn xc nh tuyn ca gi v tm nhn mi ca n. Vic ny n gin hn nhiu so vi vic x l gi tin theo kiu thng thng, do vy ci thin c kh nng ca thit b. Cc router s dng k thut ny c gi l LSR (Label Switch Router). Phn chc nng iu khin ca MPLS bao gm cc giao thc nh tuyn lp mng vi nhim v phn phi thng tin gia cc LSR, v th tc gn nhn chuyn thng tin nh tuyn thnh cc bng nh tuyn cho vic chuyn mch. MPLS c th hot ng c vi cc giao thc nh tuyn Internet khc nh OSPF (Open Shortest Path First) v BGP (Border Bateway Protocol). Do MPLS h tr vic iu khin lu lng v cho php thit lp tuyn c nh, vic m bo cht lng dch v ca cc tuyn l hon ton kh thi. y l mt im vt tri ca MPLS so vi cc nh tuyn c in.
H Trng Nht Linh - Lp D2001VT 17

n tt nghip i hc chung

Chng 1. Gii thiu

Ngoi ra MPLS cn c c ch chuyn tuyn (Fast rerouting). Do MPLS l cng ngh chuyn mch hng kt ni, kh nng b nh hng bi li ng truyn thng cao hn cc cng ngh khc. Trong khi , cc dch v tch hp m MPLS phi h tr li yu cu dung lng cao. Do vy, kh nng phc hi ca MPLS m bo kh nng cung cp dch v ca mng khng ph thuc vo c cu khi phc li ca lp vt l bn di. Bn cnh tin cy, cng ngh MPLS cng khin cho vic qun l mng c d dng hn. Do MPLS qun l vic chuyn tin theo cc lung thng tin, cc gi tin thuc mt FEC c th c xc nh bi mt gi tr ca nhn. Do vy, trong min MPLS, cc thit b o lng mng c th da trn nhn phn loi cc gi tin. Lu lng i qua cc tuyn chuyn mch nhn (LSP) c gim st mt cch d dng dng RTFM (Real Time Flow Measurement). Bng cch gim st lu lng ti cc LSR, nghn lu lng s c pht hin v v tr xy ra nghn lu lng c th c xc nh nhanh chng. Tuy nhin, gim st lu lng theo phng php ny khng a ra c ton b thng tin v cht lng dch v (v d nh tr t im u n im cui ca min MPLS). Tm li, MPLS l mt cng ngh chuyn mch IP c nhiu trin vng. Vi tnh cht c cu nh tuyn ca mnh, MPLS c kh nng nng cao cht lng dch v ca mng IP truyn thng. Bn cnh , thng lng ca mng s c ci thin mt cch r rt. Tuy nhin, tin cy l mt vn thc tin c th khin vic trin khai MPLS trn mng Internet b chm li.

H Trng Nht Linh - Lp D2001VT

18

n tt nghip i hc

Chng 2 . Chuyn mch nhn

CHNG 2. CHUYN MCH NHN


Chng ny gii thch ti sao mng chuyn mch nhn v chuyn mch nhn a giao thc tr thnh cha kho cho mng Internet a dch v hin nay. N gii thch cc vn kt hp cc th tc nh tuyn IP quy c v gii thiu cc khi nim ca s la chn mt trong hai chuyn mch nhn. Chng ny cng gii thiu kin v cht lng dch v v gii thch s quan trng ca n cng nh s quan trng ca chuyn mch nhn i vi QoS. Chng ny gm mt v d v chuyn mch nhn v QoS hot ng mng ti b nh tuyn chuyn mch nhn (LSR).

2.1. Khi nim chuyn mch nhn


Khi nim c bn ca chuyn mch nhn rt n gin. ch ra l do, chng ta gi s mt lu lng ngi s dng (li ni, tin nhn) c chuyn t my tnh ngi s dng n my tnh ngi nhn. Nhng mng Internet truyn thng (khng s dng chuyn mch nhn) th phng php chuyn th in t tng t nh chuyn th bu chnh: mt a ch ch c kim tra bi mt thc th chuyn tip (trong lnh vc ca chng ta l router, vi dch v bu chnh l ngi a th). a ch ny quyt nh xem router hay ngi a th s chuyn gi d liu hay phong b th ti ngi nhn cui cng. Chuyn mch nhn th khc. Thay cho vic dng a ch ch nh tuyn th mt s (hay nhn) c gn vo mt gi d liu. Tng t trong dch v bu chnh, gi tr nhn l a ch trn phong b da vo chuyn th ti ngi nhn. Trong mng my tnh, nhn c t u gi c dng nh mt a ch (thng l a ch IP) v nhn c dng chuyn thng lu lng ti ch ca n.

2.2. L do dng chuyn mch nhn


2.2.1. Tc v tr
Vic chuyn tip trn phn mm truyn thng l qu chm ti mt lu lng ln t Internet. Thm ch vi k thut tin tin, nh l s dng bng tm kim nhanh d liu th router vn phi hot ng nhiu hn kh nng lm vic ca n. Kt qu l mt lu lng, mt kt ni v vt qu kh nng ngho nn ca mng IP c bn.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

Chuyn mch nhn tri ngc vi chuyn tip trong IP n cung cp mt gii php hiu qu cho vn ny. L do chuyn mch nhn nhanh hn l bi gi tr nhn c t trong mo u gi v c dng truy cp bng chuyn tip trong router. Nhn l danh sch trong bng. S tm kim ny ch yu cu mt truy cp ti bng, ngc li bng nh tuyn truyn thng c th i hi hng ngn tm kim. Kt qu ca s vn hnh hiu qu ny l lu lng ca ngi s dng trong gi c gi qua mng nhanh hn nhiu so vi chuyn tip IP truyn thng, tr v p ng thi gian gim i do s tho thun gia cc ngi s dng. Rung sai i vi mng my tnh, tc v tr c cu thnh khc nhau. N l s thay i tr ca lu lng ngi s dng do vic chuyn gi tin qua nhiu nt trong mng ti ch ca n. N cng tch lu s thay i tr ny khi gi tin thc hin hnh trnh t ngi gi n ngi nhn. Ti tng nt, a ch ch trong gi phi c kim tra v so snh vi danh sch a ch ch kh dng trong bng nh tuyn ca nt (thng l router). Khi mt gi i qua cc nt ny, n gp c tr v bin thin tr ph thuc vo s lng gi v khong thi gian m bng tm kim phi x l trong mt khong thi gian quy nh. Kt qu cui cng ti nt nhn l Jitter (rung sai) l tng cng tt c cc bin thin tr ti mi nt gia bn gi v bn thu. Tnh trng ny gy phin h vi gi thoi v lm cho cuc ni chuyn tht thng, cuc thoi b mt i tnh lin tc. Do , vn hnh chuyn mch nhn hiu qu hn do bi lu lng ngi s dng c gi qua mng nhanh hn v t Jitter so vi nh tuyn IP truyn thng.

2.2.2. Kh nng p ng
Tt nhin, tc l mt kha cnh quan trng ca chuyn mch nhn v vic x l lu lng nhanh trong mng l rt quan trng. Nhng khng phi l tt c nhng g chuyn mch nhn c th cung cp. N c th cung cp kh nng p ng cho mng. Kh nng p ng ch ra nng lc v s bt lc ca h thng, vi mng Internet l s iu tit s pht trin ln v s lng ngi s dng Internet. Hng nghn ngi dng (v cc nt tr gip cng nh router hay server) ang ng k ho mng

n tt nghip i hc

Chng 2 . Chuyn mch nhn

mi ngy. Hy tng tng nhim v ca mt router khi n phi lu gi du hiu ca tt c cc ngi dng. Chuyn mch nhn a ra gii php i vi s pht trin nhanh chng v rng ln ca mng bng cch cho php mt lng ln a ch IP c lin kt vi mt hoc mt vi nhn. Cch ny lm tng rng bng a ch (thc t l nhn) v cho php router phc v nhiu ngi dng hn.

2.2.3. Tnh n gin


Mt kha cnh hp dn khc ca chuyn mch nhn l n l c s ca giao thc chuyn tip, chuyn tip mt gi da trn nhn ca n. Cch xc nh chnh xc nhn l vn hon ton khc l cch c ch iu khin c thc thi tng quan gia nhn vi lu lng ngi s dng ring v khng lin quan ti chuyn tip thc s ca lu lng. C ch iu khin th phc tp nhng khng lm nh hng ti hiu qu ca lung d liu ngi s dng. Nhiu phng php c dng thit lp mt lin kt nhn vi lu lng ngi s dng. Nhng sau khi lin kt nhn hon thnh th vic vn hnh chuyn mch nhn chuyn tip lu lng l rt n gin. Vn hnh chuyn mch nhn c th thc hin trong phn mm, trong ASIC hoc trong b x l chuyn mn ho.

2.2.4. S dng ti nguyn


C ch iu khin thit lp nhn phi khng l gnh nng i vi mng. Chng khng tiu tn ti nguyn. Nu chng s dng nhiu ti nguyn th hiu qu ca chng s b ph nhn.Tuy nhin, mng chuyn mch nhn khng cn nhiu ti nguyn mng thc hin c ch iu khin l thit lp ng chuyn mch nhn cho lu lng ngi dng.

2.2.5. iu khin tuyn


nh tuyn trong Internet c thc hin bi vic s dng a ch IP ch (hoc trong LAN vi a ch MAC ch). Tt nhin, nhiu sn phm cng rt kh dng khi dng cc thng tin khc v d nh kiu IP ca dch v v cc ch s cng (nh mt phn ca quyt nh chuyn tip). Nhng nh tuyn ch (a ch IP) l phng php chuyn tip thnh hnh.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

nh tuyn ch khng phi lun lun l hot ng hiu qu. Nh hnh 2.1, Router 1 nhn lu lng t router 2 v 3. Nu a ch IP ch trong d liu IP n c tm thy ti router 6, bng nh tuyn ti router 1 s ch th cho router chuyn tip lu lng n router 4 hoc 5.
R2 R1 R3 R5 R4 R6

Hnh 2.1. nh tuyn c s ch Chuyn mch nhn cho php cc tuyn xuyn qua mng iu khin tt hn. V d mt gi c nhn bt ngun t router 2 n a ch ch l router 6, gi c nhn cng c th bt ngun t router 3. Tuy nhin, gi tr nhn khc nhau ca cc gi s ch th cho router 1 gi mt gi c nhn ti router 4 v gi c gi tr nhn khc ti router 5 Khi nim ny cung cp mt cng c b tr cc nt v lin kt lu lng ph hp, thun li hn, cng nh a ra phn lp chnh xc cc phn lp lu lng (da trn QoS cn) khc nhau ca dch v. C th lin kt gia router 1 v router 4 hay gia router 1 v router 5 l DS3 hoc SONET tng ng. Vic dng chuyn mch nhn v s cn thit ca phn lp lu lng l k thut lu lng.

2.3. Nhn - a ch
Nhn khng c ngha hnh th c hu no. Cho n trc khi tng quan vi a ch th nhn khng ngha nh tuyn no. Do , mt yu cu vn ang tn ti i vi vic quy c qung b a ch IP c ch ra trong hnh 2.2. Mt phn cng vic ca mng chuyn mch nhn l tng quan gia a ch v nh tuyn vi cc nhn. Cc tuyn c pht hin thng qua cc giao thc nh tuyn IP da trn a ch IP. Trong v d ny, cc router chuyn mch nhn ang qung bo a ch 192.168.1.1. Trong hu ht trng hp, tin t a ch c qung bo nhng n khng lin quan ti v d chung ny. S qung bo ny chuyn ti router bn pha tri

n tt nghip i hc

Chng 2 . Chuyn mch nhn

hnh. Router ny lu tr thng tin nh tuyn trong bng nh tuyn ca n. Sau , khi router nhn c gi ca a ch ch 191.168.1.1 th n bit lm cch no ti a ch ny bng cch tra cu bng nh tuyn ca n.
Nh thng tin ny a ch 919.168.1.1 c th ti y a ch 919.168.1.1 c th ti y

Lu tr qung bo trong bng nh tuyn

Qung bo a ch

Qung bo a ch

Node C

Node B

Node A

Hnh 2.2. Qung bo a ch Trong mng chuyn mch nhn, vic quan trng l chn gi tr nhn t vo mo u gi dng trong mng v thng bo cho cc router chuyn mch nhn khc v s kt hp ca gi tr nhn vi a ch. Qu trnh hon thnh c ch ra trong hnh 2.3, router A thng bo cho router B rng a ch 191.168.1.1 c kt hp vi nhn 88888. S kt hp ny c gi l mt bind.
Lin kt nhn 191.168.1.1 vi 88888 c th thc hin bi pht hin trc Lin kt nhn 88888 vi a ch IP 191.168.1.1 Lin kt nhn 88888 vi a ch IP 191.168.1.1

Node A

Node B

Hnh 2.3. Qung bo nhn/a ch Khi router B nhn nhn hay a ch qung bo ny, n kim tra bng nh tuyn ca n v tm kim nt tip theo nhn lu lng ch ca 191.168.1.1. Trong hnh 2.2 th nt tip theo l router C nn router B to ra mt cng trong mt bng khc (c gi bng cc tn khc nhau nh: bng chuyn mch nhn, bng sp xp nhn) mt nhn n t nt A vi gi tr 88888 c nh tuyn ti nt C. Qu trnh ny tip tc ti khi n c ch cui cng.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

Phi ch rng, qu trnh x l gia router A v router B khng c ch ra trong hnh 2.2. Do c qu nhiu qu trnh x l gia LSR A v LSR B. Hot ng trong hnh 2.3 c nhn c n nh bi LSR A sau khi n pht hin ra ng i ti a ch ch. Mt cch tip cn khc l s lin kt xy ra cng thi im a ch c qung bo. Do vy, trong hnh 2.4, qu trnh lin kt bt u t nt C. Mng chuyn mch nhn c th h tr ng thi c hai hot ng.
ang qung bo a ch 191.168.1.1

Lin kt nhn 88888 vi a ch IP 191.168.1.1

a ch mi 919.16.1.1

Node D

Node C

Hnh 2.4. Qung bo v lin kt ti cng thi im

2.4. nh tuyn - qung b


Hai giao thc c thit lp bi cc router truyn tip thnh cng lu lng ngi dng ti pha thu ca n. Giao thc 1 chuyn gi t ngi dng ngun n ngi dng ch, giao thc 2 tm ra mt tuyn ng cho gi t ngun n ch. Tuy nhin, rt nhiu thut ng c dng miu t hai loi giao thc ny v chng cng khng l khun mu chnh xc v chng ta s tip nhn chng thng qua mng chuyn mch nhn. Cc thut ng c miu t giao thc 1 l nh tuyn v giao thc 2 l qung b nh tuyn v pht hin tuyn. Hin nay, thut ng nh tuyn c dng m t giao thc 2 v cc thut ng chuyn tip v chuyn mch c dng m t giao thc 1. Cc thut ng bng nh tuyn v bng nhn m t bng a ch v bng nhn c dng trong vic chuyn tip gi trong mng. Chuyn tip v chuyn mch c dng trong bng nh tuyn v bng nhn thit lp mt quyt nh chuyn tip. nh tuyn l vic dng cc tuyn c qung b thu c thng tin nhm to ra bng nh tuyn v bng nhn s dng trong giao thc chuyn tip. i vi

n tt nghip i hc

Chng 2 . Chuyn mch nhn

mng chuyn mch nhn s qung b ny i hi mt a ch qung b v nhn lin kt ca n.

2.5. S cn thit cho QoS ca mng


S chun b y ti nguyn cho mt ng dng (nh bng tn chuyn nhanh d liu qua mng) khng phi l vic n gin. Do bi s phc tp ca n, cc mng c x l tt c cc lu lng ng dng ging nhau v phn chia lu lng trn c s n lc ti a, iu ny ging nh dch v bu chnh trong vic chuyn th u n. Lu lng c phn pht nu nh mng c ti nguyn p ng s phn pht. Tuy nhin, nu mng tc nghn th phi hu b lu lng ny. Mt vi mng c gng thit lp cc phng php phn hi (iu khin tc nghn) ti ngi dng gim bt lu lng i vo mng. Nhng k thut ny khng thng xuyn hiu qu, bi c nhiu lung lu lng trong mng d liu rt ngn, nh c th ch c vi gi trong mt phin giao dch user to user. Bi vy khi ngi s dng nhn c thng tin phn hi th kt thc vic gi lu lng. Cc thng tin phn hi l v dng v khng c dng nhng li to thm lu lng tha. Khi nim n lc ti a c ngha lu lng b o thi mt cch ngu nhin, khng n lc no c to ra chuyn lu lng ny. Cch thc ny c n lc loi b nhiu gi hn cho pha ng dng i hi bng tn cao ri cho nhiu gi vo mng cn yu cu bng tn t hn th gi t gi vo mng. V vy, nhng khch hng ln nht tc cn nhiu bng tn l ngi thit hi nht. Cch thc n lc ti a khng phi l m hnh tt.

2.5.1. Chuyn mch nhn v QoS


Trong vi nm gn y, cc loi lu lng tng ln mt cch r rng, mng cn c kh nng phn bit cc loi lu lng v x l chng. Khi nim QoS c dng ln u tin trong m hnh tham chiu OSI, n t ra kh nng ca nh cung cp dch v h tr nhng yu cu ng dng ca ngi dng nh bng tn, tr, dung sai v tn tht lu lng. Ch rng s phn loi ny kh ging nhng nguyn nhn ca vic dng chuyn mch nhn. Th nht, d phng bng tn cho mt ng dng ngha l mt mng c dung lng h tr yu cu qua mng, lng thoi, s gi trn mt giy.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

Loi cht lng dch v th hai l s p ng th hin thi gian chuyn gi t nt gi n nt nhn. Mt thut ng khc l round trip time (RTT) l thi gian gi mt gi ti nt ch v nhn hi m t nt khc. RTT bao gm thi gian truyn c hai hng i v v v thi gian x l nt ch. Cc ng dng nh Voice hay Video yu cu s p ng chnh xc. Nu mt gi n qu tr, n s khng c dng v b loi b gy nn lng ph bng tn v lm gim cht lng dch v. Loi cht lng dch v th ba l rung sai, s bin thin tr gia cc gi v thng xy ra ti mi u ra lin kt ni router hon thnh vic tm ra ng i tip theo cho gi. Bin thin tr l sc p i vi tc . N gy rc ri ti vic chuyn li ni ti ngi nghe. Loi cht lng dch v cui cng l tn tht gi. Vic mt gi kh l quan trng i vi ng dng thoi v hnh nh, n nh hng ti u ra ca qu trnh gii m v s nghe nhn ca ngi s dng.

2.5.2. S ng gp ca chuyn mch nhn


Chuyn mch nhn c u im g v QoS, n khng c v g l thun li i vi cc loi QoS nh l bng tn s dng. Nhng mt iu sm nhn ra l chuyn mch nhn l mt cng c hu ch chng li tr thi gian v dung sai, hai loi QoS quan trng i vi cc loi lu lng nhy cm vi thi gian (nh Voice v Video). T khi chuyn mch nhn c thit k tng tc chuyn tip lu lng trong mng, n cho php gim tr v ci thin rung sai. Tht vy, mt mng khng s dng chuyn mch nhn m hot ng liu lnh da trn kinh nghim s khng tho mn QoS cho cc loi lu lng nhy cm vi thi gian. Tt nhin, chuyn mch nhn khng t n gii quyt c cc vn v tr v bin thin tr ca mng d liu ni chung. Nu chng ta kt ni vi mt mng bng tn nh th chuyn mch nhn cng khng th cho chng ta mt bng tn rng hn nhng n s c ngha vi vic ci thin tr v rung sai.

2.6. S tha k ca X.25 v VC


Chng ta tm dng bc y v nhn li lch s mt cht. Khi nim chuyn mch nhn bt ngun t X.25. Vo cui nhng nm 60 v u nhng nm 70, rt nhiu mng truyn thng d liu c to ra bi cc cng ty, c quan chnh ph v cc

n tt nghip i hc

Chng 2 . Chuyn mch nhn

t chc khc. Thit k v cc chng trnh ca cc mng ny c thc hin bi cc t chc p ng s cn thit ca kinh doanh. Trong khong thi gian ny, mt t chc khng c l do g tham gia vo bt c mt hip nh chung no i vi cc giao thc truyn thng d liu t khi mng ring ca t chc cung cp dch v cho ring n. Kt qu, nhng mng ny dng giao thc c trng c lin kt lm tho mn cc yu cu ca t chc. Trong khi , mt vi cng ty v nh qun l in thoi M, Canada v Chu u cung cp mt lng mng d liu cng cng da trn khi nim chuyn mch gi. Nhng h thng ny c thai nghn cung cp mt dch v cho lu lng d liu song song vi dch v ca h thng thoi cho lu lng thoi. Nhng chng khng gi c nh bng tn ging nh h thng thoi. Thc t, X.25 tiu biu cho s thay i ln trong cch phc v yu cu ngi dng nh vic dng cch thc n lc ti a nhng vn cho php ngi dng yu cu s chc chn ca dch v. Nhng nh cung cp mng cng cng i din vi mt cu hi ln l lm th no mng cung cp mt giao din tt nht cho u cui ngi dng hoc my tnh ti mng. Tm quan trng ca vn ny l rt ln bi mi nh cung cp u cui hoc my tnh pht trin n ln n giao thc truyn thng d liu. Thc vy, mt vi cng ty nh IBM pht trin nhiu giao thc khc bn trong dng sn phm ca h. X.25 pht trin rng khp bi nhng mng mi sinh ra nhn ra rng giao thc giao din mng chung l cn thit c bit t s nhn xa trng rng ca cc nh cung cp dch v mng. Nm 1974, CCITT pht hnh bn phc tho u tin ca X.25 (Gray Book). N c duyt li vo nm 1976, 1978, 1980 v vo nm 1984 c cng b trong Red Book. Cho n nm 1988, X.25 c xem xt li v cng b li trong chu k 4 nm. Nm 1988, ITU-T cng b nh ca h l thay i Red Book (bao gm c X.25) khi h c php.

2.6.1. Knh o trong chuyn mch nhn


X.25 ng nht mi gi vi mt ch s knh o. Ch s knh o c dng phn bit cc lu lng ngi dng khc nhau m ang hot ng trong cng mt lin kt vt l. Vic lm ny che du ngi dng thc t rng lin kt ang b chia x

n tt nghip i hc

Chng 2 . Chuyn mch nhn

bi nhiu ngi dng khc, t c thut ng knh o. Mt knh o v nhn ca n, ch s knh logic l kh ging vi mng chuyn mch nhn hin i. S khc nhau gia chng s c ch ra trong nhng chng sau.

2.6.2. Frame Relay v ATM


Tip theo X.25 l Frame Relay (FR) v ATM cng dng khi nim knh o. Vi Frame Relay, knh o IDs c gi l ng kt ni d liu IDs (DLCIs), vi ATM ng o IDs hay knh o IDs (VPIs/VCIs). B qua tn gi, th chng l knh o IDs v gi tr nhn . Mng MPLS phi lin kt vi cc mng ny, bi chng kh thnh hnh nh l gi ch yu ca cc dch v trong cc mng khu vc ln. Tt nhin, nhn ca MPLS sm c mi tng quan vi nhn ca Frame Relay v ca ATM.

2.7. Hin trng v cc khi nim MPLS


MPLS l k thut chuyn tip v trao i nhn, nhng c kt hp trao i nhn vi nh tuyn lp mng. Vic trao i nhn ngha l thay i gi tr nhn trong mo u gi khi gi di chuyn t mt nt ti nt khc. tng ny ca MPLS ci thin hot ng ca nh tuyn lp mng v p ng ca lp mng. Mt mc ch hn na l cung cp linh hot ln hn trong vic phn phi dch v nh tuyn (bi vic cho php thm vo cc dch v nh tuyn mi m khng thay i m hnh chuyn tip). MPLS khng to ra mt quyt nh chuyn tip vi mi d liu lp 3 nhng dng mt khi nim l lp tng ng chc nng (FEC). Mt FEC c kt hp vi mt lp d liu , lp ny ph thuc vo mt s nhn t nh a ch ch v loi lu lng trong d liu (voice, data, fax). Da vo FEC, mt nhn khi y s thng lng vi cc LSR ln cn nhau t li vo n li ra ca min nh tuyn. Nhn cng c dng chuyn lu lng qua mng. S n lc u tin ca MPLS trong nhm lm vic tp trung vo IPv4 v IPv6. K thut nng ct c th m rng ti a giao thc lp mng nh IPX v SNA. Tuy nhin, c s th v nh trong vic m rng MPLS ti cc giao thc lp mng khc l IP pht trin rng khp. T tng nn tng khng gii hn MPLS vi bt c k thut lp lin kt c bit no, ging nh ATM hoc Frame Relay. Cho n nay, mi n lc c thi

n tt nghip i hc

Chng 2 . Chuyn mch nhn

hnh kt hp MPLS v ATM nhng trong tng lai MPLS c th hot ng trc tip vi IP thng qua lp vt l m khng cn dng ATM cht no. Thm vo , MPLS khng yu cu mt giao thc phn phi nhn ring bit (chp nhn vic dng ca cc gi tr nhn gia cc LSR cnh nhau). Cc giao thc l RSVP, BGP, LDP. Trong LDP c ch nht ngay t khi n c thit k cho mng MPLS, cc giao thc cn li cng l cc phng thc tt cho vic phn b nhn.

2.8. ng chuyn mch nhn


ng i qua mt mng chuyn mch nhn c quyt nh bi mt trong hai cch. Th nht, cc giao thc nh tuyn truyn thng (nh OSPF hay BGP) c s dng pht hin cc a ch IP. Thng tin ny, t nt tip theo n a ch l tng ng vi mt nhn, mt ng chuyn mch nhn mm do. Th hai, LSP c th c thit lp da trn tng ca nh tuyn cng bc. Cch ny c th dng mt giao thc nh tuyn h tr vic thit lp LSP nhng LSP cng b cng bc bi mt s nhn t khc nh s cn thit phi cung cp mt mc QoS tt. Thc vy, lu lng nhy cm vi thi gian thc l th thch u tin ca nh tuyn cng bc.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

CHNG 3. C S CHUYN MCH NHN


Chng ny gii thiu cc khi nim c bn ca chuyn mch nhn. Lp chc nng tng ng c gii thiu chng 1 s c gii thch chi tit hn. Cc thng tin cu thnh mt FEC cng nh cch mt router lin kt FEC vi mt nhn v mt lp dch v cng c miu t. Cc phng php ch nh nhn, cc v d v lin kt cc b v lin kt xa, lin kt dng ln v lin kt dng xung, hot ng lin kt iu khin v lin kt d liu, Khi nim khng gian nhn c gii thiu v cch cc nhn c thit lp gia cc router cnh nhau.

3.1. Lp tng ng chc nng (FEC)


Thut ng FEC c s dng trong hot ng chuyn mch nhn. FEC c dng miu t s kt hp ca cc gi ring bit vi mt a ch ch thng l im nhn lu lng cui cng chng hn nh mt tng i host. FEC cng c th lin kt mt gi tr FEC vi mt a ch ch v mt lp lu lng. Lp lu lng c lin kt vi mt ch s cng ch. Ti sao phi dng FEC ? Th nht, n cho php nhm cc gi vo cc lp. T nhm ny, gi tr FEC trong mt gi c th c dng thit lp u tin cho vic x l cc gi. FEC cng c th c dng h tr hiu qu hot ng QoS. V d, FEC c th lin kt vi u tin cao, lu lng thoi thi gian thc, lu lng nhm mi u tin thp S kt hp mt FEC vi mt gi c thc hin bi vic dng mt nhn nh danh mt FEC c trng. Vi cc lp dch v khc nhau, phi dng cc FEC khc nhau v cc nhn lin kt khc nhau. i vi lu lng Internet, cc nh danh s dng l cc tham s ng c cho vic thit lp mt FEC. Trong mt vi h thng, ch a ch ch IP c s dng.

3.1.1. p ng v bn cht hot ng


Nh qun tr mng iu khin cc bng chuyn tip tr thnh bn cht qu trnh hot ng ca FEC. Gi nh a ch ch c dng cho FEC, th bng ny c gi li qun l kch thc. Tuy nhin bn cht qu trnh ny khng cung cp mt cch

n tt nghip i hc

Chng 2 . Chuyn mch nhn

thc no h tr lp lu lng v hot ng QoS. Mt khc, s h tr tt mng bi vic dng cc ch s cng v cc PID s mang li nhiu phn lp lu lng hn, nhiu FEC hn, nhiu nhn hn v mt bng chuyn tip rng hn. Mng ny c th khng cng t l vi c s ngi dng ln.

3.1.2. Thng tin dng trong quyt nh chuyn tip


im trng tm ca chuyn mch nhn l vic chuyn tip mt gi ti ch cui cng ca n. V nh chng ta bit, s hot ng ny da vo cc trng ca gi ti a ra quyt nh chuyn tip ca n. Cc trng ny l: - a ch IP ngun hoc ch. - Ch s cng ngun hoc ch. - nh danh giao thc IP. - Cc dch v phn bit IPv4. - Nhn dng IPv6. Ch rng mt vi trng c trnh by trong chng ny khng c lit k trn. Bi v chng c th c dng bi mt router, mt switch hay mt bridge to ra mt quyt nh chuyn tip nhng chng khng thng xuyn c dng bi FEC.
IP Datagram Payload TCP/UDP Payload Lu lng user Mo u bn tin Mo u mng Mo u d liu Mo u lp 2

ui lp 2

Ch s cng

a ch IP v PID

a ch MAC

hoc ATM/FR VCID

Hnh 3.1. Thng tin c dng trong quyt nh chuyn tip - Lp 2 : a. a ch mt mng LAN (a ch IEEE MAC). b. nh danh knh o ATM hoc Frame Relay.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

- Lp 3 : a ch IP ngun hoc ch (hoc a ch IPX, Appletalk,) - Lp 4 : Ch s cng ngun hoc ch. - nh danh giao thc IP (PID). L do cc ch s cng v PID c dng trong FEC v qu trnh quyt nh chuyn tip bi cc trng ny l loi lu lng nm trong ti trng d liu IP. V d, mt PID c th c m ho bi b pht ca d liu gc biu th rng ti trng l lu lng OSPF. Mt router c th c lp trnh x l lu lng ny nu PID ch ra ti trng l lu lng UDP hay TCP. Nu qu thc ti trng cha lu lng TCP hoc UDP th ch s cng trong mo u TCP hoc UDP s ch ra loi ti trng no nm trong phn cn li ca gi. V d, ch s cng ch c m ho ch ra lu lng l thoi, th in t, truyn file, Do , cc trng ny tr nn kh quan trng trong cc mng cn h tr cc dch v QoS khc nhau cho cc kiu d liu khc nhau, l bn cht hot ng tt.

3.2. Cc phng php ch nh nhn


S phn chia gi tr ti cc gi ph thuc vo ngi sn xut hoc tiu chun c thit lp. Phn ny ca chng gii thiu cc khi nim ca ch nh nhn.

3.2.1. S lin kt cc b v t xa
Remote
Router Router

Hnh 3.2. Lin kt ni ht v t xa Thut ng lin kt m ch s hot ng ti mt router chuyn mch nhn m mt nhn c lin kt vi mt FEC. Nh hnh 3.2, ch nh nhn cc b l mt qu trnh m router cc b thit lp mi quan h gia mt nhn v mt FEC. Router c th thit lp mi lin h ny ngay khi n nhn lu lng hoc khi n nhn c thng tin iu khin t dng d liu ln hoc dng xung ca router bn cnh. Lin kt t xa l qu trnh m mt nt bn cnh phn cho mt lin kt ti nt cc b. c bit, iu ny c thc hin vi cc bn tin iu khin nh bn tin phn phi nhn.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

3.2.2. Lin kt dng ln v dng xung


Ru
Router

Rd Lung ca lu lng Dng xung Dng ln


Router

Hnh 3.3. Lin kt dng xung v dng ln Nh ch ra trong hnh, ch nh nhn dng xung m ch mt phng php m vic ch nh nhn c thc hin bi LSR dng xung. Thut ng dng xung m ch phng hng m mt gi tin ngi dng c gi. Khi router dng ln gi mt gi ti router dng xung, th gi c xc nh nh mt phn ca FEC v nhn c lin kt vi FEC ny. Do , nhn l nhn u ra dng ln ca router v l nhn u vo dng xung ca router.

3.2.3. Lin kt iu khin v lin kt d liu chuyn ng


Phm tr ln ca lin kt iu khin chng li d liu chuyn ng hoc lung chuyn ng c phn bit nh sau. Lin kt iu khin c thit lp trc vi bn tin iu khin hoc dng nhng lnh th cng ti nt. Lin kt d liu (hoc iu khin lung) xy ra rt linh hot da trn s phn tch dng gi. Nhng tng ny c minh ho trong hnh 3.4.
iu khin: Chun b trc hoc tm kim bn tin iu khin. D liu: to ra bi khi d liu

Router

Lung ca lu lng

Router

Hnh 3.4. iu khin vi lin kt lung Trong hu ht h thng, c hai khi nim c s dng cng nhau. u tin, mt lin kt c thit lp gia hai nt thng qua vic dng giao thc phn b nhn lin kt mt nhn vi mt FEC. Sau , khi cc gi n mt nt LSR (thng l nt u vo vi mng chuyn mch nhn) ni dung ca gi thch hp vi FEC ny s

n tt nghip i hc

Chng 2 . Chuyn mch nhn

c kim tra. Gi tr nhn thch hp c em v t bng v c t vo mo u nhn ca gi.

3.3. Khng gian nhn v s phn nhn


Nhn c th c phn gia cc LSR bi mt hoc hai phng php. gii thch iu ny, thut ng khng gian nhn ch ra cch thc m mt nhn c kt hp vi mt LSR. Khng gian nhn giao din Khng gian nhn 1-5000 Khng gian nhn 1-5000 Khng gian nhn nn Khng gian nhn 1-5000
Tt c giao din Giao din A Giao din B

Hnh 3.5. Khng gian nhn v phn nhn. Phng php u tin l giao din khng gian nhn. Nhn c kt hp vi mt giao din c trng mt LSR nh DS3 hoc giao din SONET. Hot ng chung ca phng php ny thc hin trn mng ATM v Frame Relay, ni cc nhn nh danh knh o c lin kt vi mt knh o. iu ny ch c dng khi hai nt ngang cp kt ni trc tip thng qua mt giao din. Nu mt LSR dng mt gi tr giao din gi du vt ca cc nhn mi giao din th gi tr mt nhn c th c dng li ti mi giao din. Khi nh danh giao din ny tr thnh mt nhn ni b trong LSR i vi nhn bn ngoi c gi i gia cc LSR. Phng php th hai l nn khng gian nhn. y, cc nhn u vo c chia x dc theo tt c cc giao din tham gia ti mt nt. iu ny ngha l nt ny phi ch nh khng gian nhn dc theo tt c cc giao din. S la chn cc phng php ny l c trng hot ng mc d phng php giao din khng gian nhn l ph thng hn.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

3.4. Router bin v min chuyn mch nhn


Hnh 3.6 ch ra ba LSR (A, B, C) v hai host vi a ch 191.168.1.1 v 191.168.1.2. LSR A v C c gi l LSR bin bi chng nm bin ca mng chuyn mch nhn.
User 191.168.1.2 a a 2. Phn nhn 21 1.Gi gi b--d Router bin A Switch B 4. Phn nhn 21 Min chuyn mch nhn d--a Router bin C 5.Phn nhn 55 c User 191.168.1.1

3.Phn nhn 30 a - - c

Hnh 3.6. S phn nhn. Min chuyn mch nhn c th cha mt hoc nhiu hn cc mng vt l. Ranh gii ca min ny c thit lp bi nh qun l mng. Trong v d ny, hai host khng nm trong min chuyn mch nhn. iu ny ngha l cc host khng thc hin bt c mt hot ng chuyn mch nhn no nu chng khng c khi xng bi cc LSR bin. Chng lin lc vi cc a ch IP thng thng (nh 191.168.1.1 v 191.168.1.2) nhng trong v d ny cc lung lu lng c phn nhn bi cc router bin. Cc host ny c th nm trn mt mng cc b ni kinh doanh sn xut hoc chng kt ni ti cc router thng qua cc lin kt dial up bnh thng. Bc 1, nt pha trn gi mt gi ti LSR A. Gi ny b kim tra cc trng thch hp thit lp mt FEC. Da trn s kim tra ny, LRS A a ra quyt nh cch thc x l gi ny. Nu n ph thuc vo cc hot ng ca nhn, LSR s thng bo cho host 191.168.1.2 trong bc 2 bi vic phn mt nhn (ch s 21) vo lung

n tt nghip i hc

Chng 2 . Chuyn mch nhn

FEC. Bc 3, 4 v 5 ch ra cc lin kt dng ln. Cc lin kt ny din ra thng qua giao thc phn b nhn. Trong hnh 3.6 th a, b, c v d l cc giao din u vo v ra mi trm host nh SONET hay lin kt DS1. Trong v d ny, nhn c lin kt vi mt giao din c trng mi nt. Vai tr ca cc host v LSR Cc trm host y c th khng phi cc thit b u cui ngi dng nh PC hay im lm vic. Chng l cc router ni ht hoc cc server t gia mng cng ty v cc LSR bin. Vi cch nhn ny chng l cc thit b th ng trong hot ng chuyn mch nhn mc d phn mm chuyn mch nhn phi th hin tt c cc thit b ny. iu ny bt ngun t mng ATM v Frame Relay m cc nhn c phn bi switch ca nh cung cp mng ti cc cc router hoc switch ni ht ca thu bao.

3.5. ng chuyn mch nhn


Mng Internet
8000
IP ngun =191.168.1.2 IP ch = 191.168.1.1 PID = UDP:17 Cng ngun=3500 Cng ch=8000 IP ngun =191.168.1.2 IP ch = 191.168.1.1 PID = UDP:17 Cng ngun=3500 Cng ch=8000 IP ngun =191.168.1.2 IP ch = 191.168.1.1 PID = UDP:17 Cng ngun=3500 Cng ch=8000

Hnh 3.7. ng chuyn mch nhn Hnh v miu t vic gi mt gi ti router bin. Router ny kim tra cc trng lin quan trong header ca FEC. N quyt nh phn mt nhn vo gi ny cng nh x l gi theo cc no nh chuyn tip gi ti hng i li ra. Gi ny c ng gi vo gi u ra v ch s nhn 88888 c t vo mo u ca gi u ra. tng ny gi l ng chuyn mch nhn m gi ni b khng c kim tra bi cc LSR ni b trong mng. Chng ch lin quan ti qu trnh x l nhn ca

n tt nghip i hc

Chng 2 . Chuyn mch nhn

mo u gi u ra. Ti nt u ra gi c m v a ch IP ch cng vi cc nh danh khc c s dng quyt nh cch gi c x l nt nhn.

3.6. S trao i nhn


Nhn b thay i gi tr khi gi truyn qua min chuyn mch nhn. Mi LSR chp nhn mt gi i vo v thay i gi tr ca nhn trc khi n gi gi ti nt tip theo trong tuyn ng nh tuyn. Hot ng ny gi l thay i nhn.
User 191.168.1.2 a a
191.168.1.2 =21.a

Switch A Nhn 21
b--d

Nhn 30
a--c

21.b-30.d 30.a-21.c

Switch B Nhn 21
d--a

Switch C Nhn 55

21.d-55a

191.168.1.1 =55.c

User 191.168.1.1

Hnh 3.8. Trao i nhn Hnh v miu t ng i trong bng chuyn mch nhn cho mt LSP gia cc ngi dng 191.168.1.2 v 191.168.1.1. Trong : Nhn 21 : nh danh LSP gia ngi dng 191.168.1.2 vi switch A 21.a : giao din u ra ti 191.168.1.2 21.b : giao din u vo ti switch A Nhn 30 : nh danh LSP gia switch A vi switch B 30.d : giao din u ra ti switch A

n tt nghip i hc

Chng 2 . Chuyn mch nhn

30.a : giao din u vo ti switch B Nhn 21 : nh danh LSP gia switch B vi switch C 21.c : giao din u ra ti switch B 21.d : giao din u vo ti switch C Nhn 55 : nh danh LSP gia switch C vi ngi dng 191.168.1.1 55.a : giao din u ra ti switch C 55.c : giao din u vo ti 191.168.1.1 Mt s ch i vi v d trn: - Th nht, vic lin kt cc nhn vi FEC phi thc hin ti mi trm tham gia trong LSP. - Th hai, mt nhn c tng ng vi giao din u ra bn gi v giao din u vo bn nhn. Khi cc nhn c lin kt, chng c th s dng li ti giao din ca cc switch hoc trm ngi dng. Trong mt ngha th cc ch s giao din ti mt switch din t cc nhn ni b i vi kt ni ny. - Th ba, s la chn cc nhn l vn gia ngi dng v switch lin k n hoc gia cc switch lin k. Do vy, khng c yu cu no i gi cc nhn r rng trong cc giao din v khi i qua mng (v d nhn 21 c dng hai ln). - Th t, v d ch ra vic lin kt nhn (gia cc nt) l theo mt chiu duy nht. Khi c s lin kt theo hai hng th phi dng bng chuyn mch nhn. V d, khi lu lng c truyn t switch C sang switch B th bng chuyn mch nhn s hin ra nh sau: Nhn 21 : nh danh LSP gia switch C vi switch B 21.d : giao din u ra ti switch C 21.c : giao din u vo ti switch B Tuy nhin, mt vi hot ng chuyn mch nhn khng cho php hot ng nhn theo hai hng. iu ny ngha l mt kt ni hai hng phi c cc lin kt cho mi hng ca kt ni.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

CHNG 4. CHUYN MCH V CHUYN TIP NHN


Mt trong nhng iu kh hiu nht ca cc k thut chuyn mch, nh tuyn v chuyn tip ang c tm hiu l ngha ca cc thut ng ny. Cc nh kinh doanh, cc nhm tiu chun v cc nh cung cp dch v thng gn cc ngha khc nhau cho cc thut ng ny. Ta cng phi gii quyt s khc nhau gia nh tuyn v chuyn tip. Trong chng ny ta phi lm sang t khi nim chuyn mch v chuyn tip bng cch a ra phn loi vn ny. Chng ny cung cp cc ti liu v giao thc chuyn mch th ca Cisco bi hai l do. Th nht, n cung cp mt v d tt cho hot ng chuyn mch nhn thc t v th hai n thit lp nn tng cho cc nguyn l hot ng ca MPLS.

4.1. S phn chia mng chuyn mch v chuyn tip


u tin, thut ng nh tuyn m ch vic to ra cc quyt nh chuyn mch m c thc hin ti trm da trn cc chng trnh phn mm v cc bng nh tuyn c lu tr trong RAM. Ngc li, thut ng chuyn mch ni n cc quyt nh chuyn mch vi cc chc nng h tr ch yu trong phn cng. Hn na, nh tuyn truyn thng dng a ch lp ch 3 (v d a ch IP) a ra quyt nh chuyn mch, trong khi chuyn mch dng a ch lp 2 thc hin hot ng chuyn mch. Trong nhiu trng hp, a ch lp 2 l a ch MAC dng trong cc mng LAN. Vi hot ng lp 3, a ch s dng a ch IP. Tuy nhin, cch y vi nm mt s cng ngh xut hin s dng cc k thut ny hoc kt hp cc k thut ny v t cho chng nhng tn khc nhau. Cc tn ph bin nht trong cng nghip hin nay c m t trong chng ny. Nhng k thut ny l tng i ging nhau, mt s cc k thut ny chng cho v mt chc nng. Nh chng ta ni, nhng s chng cho ny gy cho chng ta nhm ln gia cc k thut. Hnh 4.1 gip chng ta trong qu trnh ni v cc k thut ny. Chng ta s ln lt xem xt tng k thut, bt u t gc bn tri v t trn xung di.

n tt nghip i hc
Major Schemes

Chng 2 . Chuyn mch nhn

Layer 2 Switch

Layer 3 Routing

Layer 3 Switching g IP Switch

Layer 4 Switching

Label Switching Mapping/Swapping

Layer 3 to Layer 2 Mapping

ing

Router Server -based Relaying

MPOA & NHRP

Tag Switching

Flow Clasification

MPLS & LDP

IPv6 Label

MPOA

IPv6 Flow

IPv4 Codepoint

Hnh 4.1. S phn chia cc giao thc chuyn mch v chuyn tip. Tuy nhin, trong phm vi n ti ch trnh by nhng iu c cho l thit yu nht i vi MPLS. Thng tin c s dng trong quyt nh chuyn tip Cn nh rng bt c thut ng no c s dng th cng vic chnh ca n l phi gi mt gi ti ch cui cng. Ngoi ra cc hot ng c m t trong chng ny lm c s cho quyt nh chuyn tip da trn mt hoc mt s trng trong gi tin ti. Nhng trng ny c m t trong chng 3 (hnh 3.1).

4.1.1. Chuyn mch lp 2


Hnh 4.2 s c nghin cu trong sut qu trnh tho lun v chuyn mch lp 2 v nh tuyn lp 3, l cc ch ca 2 phn tip theo trong chng ny. Mt bridge LAN hot ng ti lp 2, lp lin kt d liu (gm 2 phn lp MAC v LLC). Thng thng n s dng 48 bt a ch MAC thc hin chc nng

n tt nghip i hc

Chng 2 . Chuyn mch nhn

chuyn tip ca n. Thut ng chuyn mch lp 2 thng c dng m t bridge LAN.


Convergence Functon / Protocol Conversion Network Data Link

Gateways Routers Bridges, ATM/FR

Physical

a. Lp giao thc

L_3 Routing L_2 Switching

b. nh tuyn v chuyn mch truyn thng Hnh 4.2. Cc Bridge, router, gateway Tuy nhin thut ng ny cng c dng m t mt chuyn mch ATM hoc FR . V ATM v FR hot ng ti lp 2, do chng cng c lit vo cc giao thc chuyn mch lp 2. Ni mt cch cht ch ATM v FR nn c xem xt nh t hp ca cc cng ngh chuyn mch lp 2 v 3 bi v c 2 u bt ngun t X.25 ni s dng tiu lp 3 cho cc hot ng chnh ca n. Nhng a s mi ngi trong cng nghip vin thng s dng thut ng chuyn mch lp 2 cho ATM v FR, v vy ti cng theo thc t ny. Nu ATM hay FR c s dng, cc nhn dng knh o (VCID) ca chng c s dng thc hin quyt nh chuyn tip. Cc VCID l cc nhn thc s, mc

n tt nghip i hc

Chng 2 . Chuyn mch nhn

d chng c qun l theo cch khc so vi cc nhn MPLS, mt ch c tho lun trong phn sau n.

4.1.2. nh tuyn lp 3
Hot ng ny dng mt router quy c v chuyn tip lu lng da trn 32 bit a ch IP ch nm trong mo u IP. IP c phn loi nh mt giao thc lp 3. Tuy nhin, rt l quan trng lm sng t li thut ng nh tuyn. Trong chng 2, ta nhn mnh nh tuyn l kt hp ca qung bo tuyn v khm ph tuyn. Do , khi nghin cu cc RFC gn y th cc giao thc nh tuyn c tham lun l OSPF v BGP ch khng phi IP. Vn ca hot ng chuyn tip IP Hot ng chuyn tip IP truyn thng tn chi ph. Khi a ch ch trong mo u d liu IP c kim tra bi mt router, n phi i chi vi bng nh tuyn nt tip theo trn ng ti ch. Hot ng ny yu cu vic tm trong bng nh tuyn rt ln mt lng ln cc nt ngang cp trong mng Internet, mt bng nh tuyn c khong 50000 li vo. Mi gi vo phi c x l ngc li bng ny. Thm vo vic dng cc mt n mng con yu cu a ch IP ch trong gi li vo chng li mt n trong bng nh tuyn. Nguyn tc chng li di nht yu cu chn ra router da trn c s mt n m nhiu bt chng li nht, mt vn vt qua phm vi n. Kt qu l chuyn tip IP quy c n gin khng c dng trong cc mng ln v n mt qu lu x l mt gi.

4.1.3. Chuyn mch lp 3


Cng ngh ny l phng php mi hn ca chuyn tip gi. Thuc tnh phn bit ca chuyn mch lp 3 l chc nng chuyn mch c thc hin trong phn cng thng qua vic dng cc mng tch hp ng dng c trng hoc phn cng thit k c trng. a ch IP c s dng khng cn quan tm ti bt c th hay nhn no. Chuyn mch h tr b nh Vi h thng chuyn mch lp 3 dng chuyn mch h tr b nh. B nh c xy dng cho vic cha d liu a ch i vi cc mng c trng nhn c rt nhiu lu lng. Vi cch ny, mi d liu khng phi l vn i vi s quy

n tt nghip i hc

Chng 2 . Chuyn mch nhn

c tin cy trn bng trung tm cho vic tm kim tuyn. Tuyn truy nhp tn s cao nht c lu tr trong b nh tc cao nht. Phn b nhn Vi nhn c phn b, b x l phn chia c t trn mi modun giao din. Bng nh tuyn c tnh ton bi b x l trung tm, nhng b x l ny khng bao hm quyt nh chuyn tip cho mi d liu . ng l ra, cc bng chuyn tip phi c ti xung cc b x l giao din. Cc b x l ny ln lt a ra cc quyt nh chuyn tip. V d chuyn mch lp 3 V d ca lp 3 l router tc cao hng gigabit (MGR) c xy dng bi cc cng ngh BNN. Line Card Input Output
Gi Mo u X l gi gi Mo u X l

Switch

Line Card
Gi

Input Output

B phn chuyn tip


Reply Route memory Route memory B x l FIFO Request FIFO

Gi

Mo u

Hnh 4.3. Chuyn mch lp 3. Hnh 4.3 ch ra ton b kin trc ca MGR. Ta gi s cc gi vo t pha tri v ra pha phi. Router cha cc card a ng h tr mt hoc nhiu giao din, cc card chuyn tip v tt c cc kt ni ti mt switch. Mo u ca cc gi n c chuyn qua switch ti cc card chuyn tip trong khi phn cn li ca gi c lu trong card ng dy vo. Card chuyn tip kim tra mo u, quyt nh nh tuyn cho gi, cp nht mo u v chuyn n li card ng vo kt hp vi thng

n tt nghip i hc

Chng 2 . Chuyn mch nhn

tin chuyn tip. Card ny gn li mo u vi phn cn li ca gi v gi gi ny ti card ng dy ra thch hp. MGR c tng dung lng l 50 Gb/switch v tc gi trn giy l 32 triu gi mt giy. MGR dng mt vi phng php kh khc vi router quy c. Th nht, router dng bng nh tuyn phn b. Mi card chuyn tip thit lp hon thnh mt bng nh tuyn thay cho s hn ch v a ch. iu ny trnh c thi gian tr v s tranh chp c dng trong bng trung tm. Hn na, cc bng ny khng cha cc li vo bng quy c, chng ch cha thng tin v hop tip theo. Th hai, switch khng chia s bus nhng mt chuyn mch im - im cha hn 15 cng. Switch l mt c cu hng i u vo. Mi u vo gi mt hng i FIFO v dng mt giao thc t ti u ra. iu ny trnh c nghn u dng v nh thit k tuyn b h m bo c 100 phn trm u ra. Th ba, cc card chuyn tip l cc card ng dy ring r. iu ny mang li s linh ng hn cho c hai chc nng v cho php cc nh thit k linh hot hn trong vic ch nh cch nhiu giao din chia x card chuyn tip. N c th dnh mt card chuyn tip n cho mt mng o n. Th t, cc card ng dy c th chp nhn cc khi d liu giao thc lp 2 khc nhau nhng chng phi chuyn d liu ny thnh nh dng ni b chung ca lp 2 cho vic x l bn trong MGR. Th nm, router h tr hot ng QoS, do cc card chuyn tip phn loi gi v chia cc gi vo cc lung. Thng tin c chuyn ti card ng dy u ra km theo vic truyn gi vi mt b x l QoS c trng.

4.1.4. Chuyn mch lp 4


Chuyn mch lp 4 l thut ng mi. N ni n hot ng kim tra cc ch s cng Internet nh mt phn ca quyt nh chuyn tip. Ch s cng ch lun c dng cn ch s cng ngun c th c dng hoc khng. Cc ch s cng c dng lin kt vi cc a ch IP ngun v ch ra mt quyt nh chuyn tip. Hn na, trng PID trong mo u IP cng c s dng. Do , chuyn mch lp 4 khng thc s l chuyn mch lp 4.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

4.2. nh x t lp 3 ti lp 2
Phn ny tng t vi phn loi lung v chuyn mch IP, vi a ch lp 3 c nh x sang nhn hoc VCID. Hnh 4.4 ch ra s nh x ca a ch lp 3, hot ng ny c th dng cc ch s cng Internet v PID ly mt FEC cho th tc nh x. nh x a ch (hoc FEC) c th l VCID ca ATM hoc VCID ca FR hoc cho cng ni dung l nhn MPLS hoc th Cisco. Vic nh x xy ra bi mt router hoc switch nm bin ca mng. Vic thc hin phng php ny c lan rng bao gm c chuyn mch th ca Cisco, ARIS ca IBM, Router chuyn mch nhn hoc chuyn mch th
TCP, UDP, OSPF, BGP,

Yes a ch cc b ? No

1. Trao i a ch L_3 ti nhn L_2 2. ng gi d liu

Ok Queue Error ? Yes Loi b Queue

D liu vo

T bo ATM/Khung FR

Hnh 4.4. Trao i t L_3 ti L_2 ti LSR li vo

4.2.1. LSR li vo
Hnh 4.4 ch ra cch mt router chuyn mch th li vo hoc router chuyn mch nhn x l mt d liu IP u vo. Gi vo c lu tr trong hng i ch x l. Khi bt u x l, trng la chn trong mo u IP c x l quyt nh nu cc s la chn nm trong mo u. Mo u d liu c kim tra i vi bt c s thay i no trong qu trnh ca n ti nt IP ny. a ch IP ch c kim tra. Nu a ch IP ch l cc b, trng IP PID trong mo u c dng chuyn

n tt nghip i hc

Chng 2 . Chuyn mch nhn

trng d liu ti modun tip theo nh TCP, UDP v ICMP. Nu d liu c quyt nh chuyn tip truyn qua mng ATM hoc FR th a ch IP lp 3 trong trng ch ca d liu IP s tng ng vi mt th hoc mt nhn c lu tr trong bng LSR. Sau , d liu c ng gi thnh t bo ATM hoc khung FR vi mo u ng gi gn vi d liu.

4.2.2. LSR trung gian


Lu lng c gi ti giao din u ra truyn ti nt tip theo, m mt VCID ca ATM hoc FR hoc mt nhn c kim tra quyt nh vic m nhim khi d liu ny. Vic ny c ch ra trong hnh 4.5. Router chuyn mch nhn hoc chuyn mch th

1.M gi d liu, x l mo u IP 2.Chuyn d liu ti modun chun 1. Ghi vo bng nhn 2. Tm nt tip theo 3. Trao i nhn

Yes a ch cc b ? No

Ok Queue Error ? Yes Loi b Queue

u vo: T bo ATM/ Khung FR

u ra: T bo ATM/ Khung FR Hnh 4.5. X l ti LSR trung gian hoc LSR li ra.

Nhn c kim tra quyt nh n l cc b hay l lin kt ti nt tip theo. Nu n l cc b th n c m gi th mo u IP c dng x l lu lng thm vo. Nu nhn ch nh gi phi chuyn ti nt khc, nhn s dng ch s trong bng nhn tm gi x l bao gm u tin ca n, nt tip theo v nhn mi c thay th cho nhn c.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

4.2.3. LSR li ra
Cui cng mt gi cng c chuyn ti LSR cui cng. LSR quyt nh giao thc d liu ti nt cui ny nhng phi c phng php quyt nh nhn mt ni b thuc v LSR ni b. X l lin kt nhn ni b thc hin trc khi vic truyn d liu ngi dng xy ra, LSR ni b truy cp bng nh danh nhn ca n mi giao din u vo. Do , khi t bo hoc khung ti, nhn nhanh chng quyt nh c nhn c phi l cc b hay khng, l nu lu lng dng li ti nt m khng chuyn tip ti nt tip theo. iu ny c ch ra trong hnh 4.5. Qu trnh x l khng phc tp lm. Mo u t bo ATM hoc FR c x l ri chuyn i. Mo u ng gi c x l quyt nh tng lai ca gi ngi dng. Da vo gi tr ca mo u ng gi, gi c chuyn ti ng modun trong LSR hoc chuyn ti cc thit b ni b (nh router, server hoc host) x l tip.

4.3. Chuyn mch th


Nh cp, chuyn mch th l mt dng ca chuyn mch nhn. Chuyn mch th da trn c s vic dng mt nhn (th) t vo mt a ch cho quyt nh chuyn mch v c cng b trong RFC 2105. a giao thc trn ATM l mt v d in hnh ca chuyn mch th. N lc ca Cisco c kt qu trong nhm lm vic MPLS ni ang cho cng b giao thc chuyn mch nhn vendor-neutral. Nhiu khi nim c gii thch trong phn ny kh ging vi MPLS v cc hot ng c gii thiu chng 3. Chuyn mch th gm c hai phn: chuyn tip v iu khin. Thnh phn chuyn tip dng thng tin th c mang bi gi v thng tin chuyn tip th c lu tr bi chuyn mch th thc hin gi chuyn tip. Thnh phn iu khin chu trch nhim lu gi hiu chnh thng tin chuyn tip th gia mt nhm kt ni chuyn mch th.

4.3.1. Thnh phn chuyn tip


Hot ng chuyn tip thit lp bi chuyn mch th da trn s thay i nhn. Khi mt gi c nhn mt th t chuyn mch th th switch s dng th nh ch s

n tt nghip i hc

Chng 2 . Chuyn mch nhn

c s thng tin th ca n (TIB). Mi li vo TIB bao gm mt th li vo v mt hoc nhiu hn cc li vo con (nh th u ra, giao din u ra, thng tin lin kt u ra). Nu switch tm c mt li vo vi th u vo ngang bng vi th mang th n s t th vo gi vi th u ra v t thng tin lin kt vo trong gi vi thng tin lp lin kt u ra v chuyn tip gi qua giao din u ra. Quyt nh chuyn tip da trn thut ton ph hp dng di ngn ca th nh mt ch s. iu ny cho php th tc chuyn tip n gin c so snh vi chuyn tip truyn thng c dng ti lp mng. Th tc chuyn tip l n gin cho php thc hin trn phn cng. Quyt nh chuyn tip ph thuc vo bn cht chuyn tip ca th. V d, thut ton ging nhau p dng cho c unicast v multicast. Li vo mt unicast s l mt li vo con n (nh th u ra, giao din u ra, thng tin lin kt u ra), trong khi mt li vo multicast mt hoc nhiu hn cc li vo con (nh th u ra, giao din u ra, thng tin lin kt u ra). Th tc chuyn tip c tch ra t thnh phn iu khin ca chuyn mch th. Chc nng nh tuyn mi c th trin khai m khng lm xo trn hot ng chuyn tip. ng gi th Thng tin v th c mang trong mt gi vi nhiu cch khc nhau: - Nh mt phn nh mo u th c chn gia mo u lp 2 v lp 3. - Nh mt phn ca mo u lp 2, nu mo u lp 2 cung cp ngha. - Nh mt phn ca mo u (trong trng lung nhn IPv6) Thnh phn chuyn mch th l c lp vi lp 3. Vic s dng thnh phn iu khin tiu biu ti giao thc ring bit cho php dng chuyn mch th vi cc giao thc lp 3 khc nhau.

4.3.2. Thnh phn iu khin


Thnh phn iu khin chu trch nhim vic to ra cc lin kt th v phn phi thng tin lin kt th gia cc chuyn mch th. Thnh phn iu khin c t chc b su tp ca cc modun, mi thit k h tr mt chc nng nh tuyn ring bit. h tr cc chc nng nh tuyn mi th cc modun mi c th c thm vo. Phn tip theo s m t mt vi modun trong s .

n tt nghip i hc

Chng 2 . Chuyn mch nhn

C s nh tuyn ch h tr nh tuyn ch vi vic chuyn mch th th mt th chuyn mch (ging nh mt router) s tham gia vo hot ng ca giao thc nh tuyn (nh OSPF, BGP) v xy dng thng tin chuyn tip th (TFIB) bng thng tin nhn c t cc giao thc ny. C 3 phng php ch nh th v qun l TFIB : Ch nh th dng xung, ch nh th dng xung da trn yu cu, ch nh th dng ln. Trong c 3 phng php, switch ch nh cc th v lin kt chng ti tin t a ch trong TFIB ca n. Trong vic ch nh dng xung, th c mang trong mt gi c to ra v lin kt ti mt tin t bi mt switch ti im cui dng xung ca lin kt. Trong ch nh dng ln, th c ch nh v lin kt ti im cui dng ln ca lin kt. Ch nh da trn yu cu ngha l cc th cc th s ch c ch nh v phn b bi chuyn mch dng xung khi n c yu cu bi chuyn mch dng ln. a. K thut ch nh th dng xung hot ng nh sau: vi mi router trong TFIB ca n, switch ch nh mt th, to ra mt li vo trong TFIB ca n vi th vo c a ti th ch nh. Sau , qung bo lin kt gia th vo v router ti chuyn mch th lin k. Khi chuyn mch th nhn c thng tin lin kt th cho mt router v thng tin bt ngun t hop bn cnh router , chuyn mch t th (nh mt phn ca thng tin lin kt) vo th li ra ca u vo TFIB lin kt vi router . Vic ny to ra lin kt th li ra v router. b. K thut ch nh th dng xung da trn yu cu, vi mi router trong TFIB ca n, switch s nh danh hop tip theo cho router. Sau , n pht ra mt yu cu thng qua mt giao thc phn b th (TDP) ti hop tip theo. Khi hop tip theo nhn c yu cu, n ch nh th, to ra mt li vo trong TFIB ca n vi th vo c a ti th ch nh v sau truyn tr li lin kt gia th v router ti switch gi yu cu. Khi switch nhn c thng tin lin kt, switch s to ra mt li vo trong TFIB v t th u ra vo trong li vo . c. K thut ch nh th dng ln c s dng nh sau. Nu chuyn mch th c mt hoc nhiu hn cc giao din point to point th vi mi router trong TFIB s n c hop tip theo thng qua mt trong cc giao din ny. Switch ch nh mt th, to ra mt li vo trong TFIB ca n vi th u ra c a ti th ch nh. Sau

n tt nghip i hc

Chng 2 . Chuyn mch nhn

, qung bo lin kt gia th u ra v router ti hop tip theo (thng qua TDP). Khi chuyn mch th tc l hop tip theo nhn c thng tin lin kt th, chuyn mch t th (nh mt phn ca thng tin lin kt) vo th li ra ca u vo TFIB lin kt vi router . Khi mt cng TFIB c t cho c th li vo v li ra, chuyn mch th c th chuyn tip gi cho router bng thut ton chuyn tip chuyn mch th. Khi mt chuyn mch th to ra mt lin kt gia th u ra v mt router, switch s cp nht thng tin lin kt vo TFIB ca n. Mt chuyn mch th s c gng t TFIB ca n vi cc th u vo v u ra cho tt c cc router c kh nng ti tt c cc gi c th c chuyn tip bi vic trao i nhn n gin. Vic dng cc th lin kt vi cc router c ngha khng cn thit thc hin cc th tc phn lp lung cho tt c cc lung quyt nh xem liu l c cn phn th ti lung khng. Chuyn mch th v a hng Bn cht ca chuyn mch a hng l khi nim cy bao trm. Th tc nh tuyn a hng chu trch nhim thit lp cc cy nh vy, trong khi chuyn tip a hng chu trch nhim chuyn tip a hng cc gi dc theo cy. h tr chc nng chuyn tip a hng vi chuyn mch th, mi chuyn mch th lin kt vi cy a hng khi c php. Khi mt chuyn mch th to ra ng chuyn tip a hng v danh sch giao din u ra cho ng ny, chuyn mch ny cng to ra cc th ni b. Chuyn mch ny to ra mt cng trong TFIB v t thng tin cho mi giao din u ra v t th pht sinh cc b trong trng th u ra. iu ny to ra mt lin kt gia cy a hng v cc th. Khi , chuyn mch qung bo lin kt gia th v cy cho mi giao din u ra. Khi mt chuyn mch th nhn mt lin kt gia mt cy a hng v th t mt chuyn mch th bn cnh, chuyn mch ni b t th vo lin kt c mang ti thnh phn th u vo ca cng TFIB lin kt vi cy. Khi cc chuyn mch th c ni lin qua mng con a truy nhp, th tc ch nh th phi phi hp cc chuyn mch. Trong cc trng hp khc, th tc ch nh

n tt nghip i hc

Chng 2 . Chuyn mch nhn

th cho a hng c th ging cc th tc cho cc th c dng trong nh tuyn c s ch. nh tuyn linh hot Mt trong cc c tnh ca nh tuyn c s ch l thng tin t mt gi c dng chuyn tip gi l a ch ch. c tnh ny cho php nh tuyn cn bng, n cng hn ch kh nng nh hng cc tuyn i ca cc gi. iu ny cng hn ch kh nng phn b cn bng lu lng gia cc a lin kt, hn ch vic ly cc lin kt c kh nng s dng tt v chuyn i cc lin kt ti. i vi ISP, ngi cung cp cc lp dch v h tr khc nhau nh tuyn c s ch cng hn ch kh nng ca h trong vic tch ring cc dch v khc nhau vi cc lin kt c dng bi cc lp ny. Mt vi ISP hin nay dng ATM hoc FR vt qua s hn ch bi nh tuyn c s nhn. Bi v bn cht linh hot ca th, chuyn mch th c kh nng vt qua s hn ch ny m khng dng c ATM ln FR. cung cp chuyn tip dc theo cc tuyn khc nhau c quyt nh bi nh tuyn c s ch, thnh phn iu khin ca chuyn mch th cho php ci t lin kt th trong chuyn mch th khng tng ng vi cc tuyn nh tuyn c s ch. Tt nhin, tng ny cng l mt nguyn tc ca MPLS. Chuyn mch th vi ATM T khi chuyn mch th da trn c s trao i nhn v chuyn tip ATM cng da trn trao i nhn, cng ngh chuyn mch nhn c th sn sng p dng cho chuyn mch ATM bi vic s dng thnh phn iu khin ca chuyn mch th. Thng tin th cn thit cho chuyn mch th c mang trong trng VCI. Nu hai lp th l cn thit th trng VPI cng c dng cho d kch thc ca trng VPI hn ch kch thc ca cc mng m iu ny c thc hin.Tuy nhin, i vi cc ng dng ca mt lp th, th trng VCI l y . thu c thng tin iu khin cn thit, switch c th tham gia nh cc giao thc nh tuyn lp 3 (OSPF, BGP). Nu switch thc hin s kt hp thng tin nh tuyn ri h tr nh tuyn n hng c s ch, th switch cng thc hin chuyn tip lp 3 i vi mt vi phn nh lu lng. Vic h tr chc nng nh tuyn c s ch vi chuyn mch th trn mt chuyn mch ATM yu cu switch gi khng ch mt m mt vi th lin kt vi mt router (hoc mt nhm router c cng hop). iu

n tt nghip i hc

Chng 2 . Chuyn mch nhn

ny cn thit trnh vic mt cc gi i t cc switch th dng ln khc nhau nhng c gi ti cng mt hop tip theo. C k thut ch nh th dng xung da trn yu cu hoc k thut ch nh th dng ln c s dng cho ch nh th v cc th tc lu tr TFIB vi cc switch ATM. Do , mt switch ATM c th h tr chuyn mch th nhng l nh nht, n cn thc hin cc giao thc nh tuyn lp 3 v thnh phn iu khin chuyn mch trn mt switch. N cn thit h tr chuyn tip lp mng. Hot ng chuyn mch th trn mt switch ATM n gin vic tch hp cc switch ATM v cc router. Kh nng mt switch ATM ca chuyn mch th xut hin nh mt router ti router bn cnh. Cht lng dch v Hai k thut c s dng cung cp QoS cho vic chuyn gi qua mt router hoc chuyn mch th. Th nht, cc gi c nh danh nh cc lp khc nhau. Th hai, QoS thch hp c cung cp ti mi lp. Chuyn mch th cung cp mt cch thc d dng nh du cc gi thuc v mt lp c bit sau khi chng c phn lp ln u tin. S phn lp u tin c thc hin bi vic dng thng tin c mang lp 3 hoc cc mo u lp cao hn (khi nim c gii thch nh mt FEC). Tng ng mt th vi mt lp kt qu c p dng i vi gi. Cc gi nhn c th c x l bi cc router chuyn mch nhn trong cc tuyn ca n m khng cn phn lp li.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

CHNG 5. HOT NG PHN B NHN


Mt vi phng php c th c thit lp qung bo v phn b nhn. Chng ny a ra 3 phng php : LDP, RSVP, BGP. Phn ln chng dnh cho LDP nhng khng c ngha hai phng php kia khng c nhn ti. Bi v, tuy BGP v RSVP l kh hiu qu nhng LDP bao hm nhiu hn, c nhiu th tc v bn tin hn hai loi kia. Cc phng php phn b nhn Nh cp trn, MPLS khng quy nh giao thc phn b nhn c trng. Rt nhiu giao thc h tr phn b nhn c s dng v n cho thy hiu qu ca mnh. Tuy nhin, IETF pht trin mt giao thc c trng thc hin MPLS c gi l giao thc giao thc phn b nhn (LDP). Mt giao thc khc l LDP cng bc (CR-LDP). N dng LDP cho php nh qun l mng thit lp tuyn chuyn mch nhn nh tuyn hin. CR-LDP l s m rng ca LDP. N hot ng ph thuc vo IGP. N c dng cho lu lng nhy cm vi thi gian v cnh tranh vi mng chuyn mch knh. RSVP cng c th c dng phn b nhn. Bng vic dng tuyn RSVP v cc bn tin RSVP n h tr lin kt nhn v cc hot ng phn b. BGP l mt ng c tt cho giao thc phn b nhn. BGP c th c dng khi cn lin kt cc nhn vi tin t a ch.

5.1. Giao thc phn b nhn


MPLS cung cp mt phng thc tiu chun cho vic phn b ca cc nhn nh tuyn gia cc LSR cnh nhau. Tiu chun ny c nh ngha trong ANDE00. Ta s lm r bn tho ny bng vic m t LDP. Chng ta bit rng MPLS khng a ra quyt nh chuyn tip vi mi d liu lp 3. Mt chuyn tip tng ng quyt nh i vi cc lp ca d liu lp 3 v di nhn c thng lng gia cc LSR ln cn dc theo cc LSP t li vo n li ra. Cc router vi kh nng chuyn mch nhn c th a ra quyt nh khi cc router bn cnh c kh nng hot ng MPLS. Chng theo cc gi tr nhn dng cho vic truyn lu lng ngi dng. LDP c dng h tr yu cu ny.

n tt nghip i hc Trao i logic Trao i logic LSR A Bn tin LDP LSR B

Chng 2 . Chuyn mch nhn

Trao i logic Bn tin LDP LSR C

Hnh 5.1. Trao i bn tin LDP Hnh 5.1 ch ra cc khi nim chung ca LDP. N hot ng gia cc LSR l cc kt ni trc tip thng qua mt lin kt (LSR A v LSR B cng nh LSR B v LSR C). N cng c th hot ng gia cc LSR khng k nhau (c ch ra trong hnh vi cc nt t). Hin nhin, cc bn tin LDP cho lin kt nhn gia lung LSR A v LSR C phi qua LSR B nhng LSR B khng x l chng. Cc LSR dng LDP thay i nhn v thng tin FEC c gi l LDP peer. Chng thay i thng tin ny bng cch to ra mt phin LDP.

5.1.1. Bn tin LDP


C 4 loi bn tin LDP: - Bn tin Discovery c dng thng bo v lu gi s c mt ca mt LSR trong mng. LSR gi nh k mt bn tin Hello qua cng UDP vi a ch a hng ca cc router trn mng con ny. - Bn tin Session c dng thit lp, duy tr, hu b cc phin gia cc LDP ngang cp (LSR). Hot ng ny i hi vic gi mt bn tin khi to qua TCP. Sau khi hot ng ny kt thc, hai LSR s l LDP ngang cp. - Bn tin Advertisement c dng thit lp, thay i v hu b cc trao i nhn cho FEC. Cc bn tin ny cng c truyn qua TCP. Mt LSR c th yu cu mt trao i nhn vi mt LSR bn cnh khi n mun. N cng c th qung bo cc trao i nhn khi n mun mt LDP ngang cp dng mt trao i nhn. - Bn tin Notification cng c gi qua TCP v c dng cung cp cc thng tin v tnh trng, biu hin v thng tin v li.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

5.1.2. Cc FEC, khng gian nhn v nh danh


Nh bit, FEC c th c thit lp bi cc a ch, ch s cng hoc PID. LDP c mt ci nhn hn ch v cc yu t ca FEC v hai nh ngha: tin t a ch IP v a ch host. Cc quy tc c thit lp cho vic trao i ca gi c trng ti LSP c trng. Mi quy tc c p dng cho ti khi gi c trao i ti LSP. - Nu c chnh xc mt LSP c mt a ch host mi trng FEC c nh danh ti a ch ch ca gi th gi c trao i ti LSP . - Nu c nhiu LSP, mi LSP cha mt a ch host mi trng FEC c nh danh ti a ch ch ca gi th gi s c trao i ti mt LSP trong s . Th tc la chn mt LSP trong s khng c nh ngha bi LDP. - Nu mt gi ph hp vi mt LSP, gi c trao i ti LSP ny. - Nu mt gi ph hp vi nhiu LSP th n s trao i ti LSP ging prefix di nht. Nu khng c LSP no nh vy, gi s trao i ti mt LSP ging prefix di hn cc LSP khc. Th tc la chn mt trong cc LSP ny khng c nh ngha bi LDP. - Nh bit, mt gi phi i qua mt router li ra c bit v c mt LSP c tin t a ch mi trng FEC (l a ch router ) th gi c trao i ti router . Th tc ny khng c nh ngha bi LDP. Khng gian nhn v nh danh
LSR B1, 1-500

LSR A

LSR B2, 1-500

LSR B

Hnh 5.2. Khng gian a nhn Khng gian nhn trong LDP tng t cc nh ngha trong MPLS, c tn l khng gian nhn giao din v khng gian nhn nn. Mt khng gian nhn c ch nh vi b nhn dng LDP 6 octet, 4 bt u tin nhn dng mt LSR v phi l gi tr ton cu duy nht ging nh a ch IP. Hai octet cui nhn dng khng gian nhn trong LSR. Cc octet ny c t t 0 cho khng gian nhn m rng nn. Nu LSR dng nhiu khng gian nhn, n lin kt mi khng gian nhn vi mt LDP khc nhau. Khng gian a nhn c th c thit lp trong cc mng ATM

n tt nghip i hc

Chng 2 . Chuyn mch nhn

m trong hai chuyn mch ATM c nhiu lin kt kt ni chng v c th dng li cc nhn trn mi giao din. Vi iu ny, mt khng gian nhn v LSR ca n lun c nhn bit nu b nhn dng LDP km thm mt bn tin LDP. Trong v d ny, cc nhn t 1 n 500 c s dng 2 ln v cc b nhn dng LDP gi nhn dng duy nht khng gian nhn.

5.1.3. Phin LDP


Cc LSR thit lp cc phin gia chng qung bo v thay i nhn. Mi qung bo v thay i khng gian nhn yu cu mt phin LDP ring. Phin LDP chy trn TCP. Cc phin gia cc LSR kt ni khng trc tip Hnh 5.3 ch ra cch cc LSR kt ni khng trc tip qung bo cc nhn. Gi s LSR A v LSR D mun thit lp mt LSP gia chng, LSR B v LSR C l cc LSR trung gian. LSR A t 2 nhn trn LSP v pha LSR D, nhn 33 v 21. Bc
A
21 Stack l 21 T D

1
33 T B

2 3 4 5

Stack l 33, 21

IP

21

33

Hnh 5.3. Phn b nhn gia cc LSR ln cn v khng ln cn Bc 1, LSR A nghin cu nhn 21 t LSR D. Bc 2, LSR A y nhn 21 vo ngn xp nhn. Bc 3, LSR A nghin cu nhn 33 t LSR B. Bc 4, LSR A y nhn 33 vo ngn xp nhn. Bc 5, khi LSR A gi lu lng ti LSR D, n gp nhn 33 v 21 vo mo u gi. Nhn 33 c dng gia LSR A v LSR B, nhn 21 c dng gia LSR A v LSR D.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

Cc nhn c dng gia B, C, D khng c ch ra trong hnh v. Cch cc LSR nhn bit cc LSR khc Cc LSR nhn bit LSR khc theo 2 cch. K thut pht hin c s c s dng khi cc LSR ln cn c kt ni trc tip bi mt lin kt. Mt LSR nh k gi bn tin Hello LDP ra ngoi giao din ca n. Cc bn tin Hello ny c gi qua UDP, vi mt a ch a hng ca tt c cc router trn mng con ny. Bn tin Hello cha b nhn dng LDP. Phng php th hai l k thut pht hin m rng. LSR phi gi mt bn tin Hello gi l targeted Hello ti cc LSR vi mt a ch IP ring, bn tin cha b nhn dng LDP. Cc a ch targeted c bit bi cc giao thc nh tuyn quy c.

5.1.4. Qun l v phn b nhn


Phn ny gii thch cc quy c LDP cho qun l v phn b nhn. Mt LSR c th phn b mt lin kt nhn FEC chu trch nhim mt yu cu dt khot t LSR khc. iu ny c bit nh l phn b nhn dng xung da trn yu cu. N cng cho php mt LSR phn b lin kt nhn ti cc LSR khng c yu cu r rng. Hnh 5.4 trnh by hot ng dng xung yu cu v dng xung khng yu cu.
Yu cu

LSR Ru

FEC F

L1

LSR Rd

a. Dng xung da trn yu cu


LSR Ru
L1

FEC F

LSR Ru

b. Dng xung khng yu cu Hnh 5.4. Dng xung da trn yu cu v khng yu cu iu khin phn b nhn Vic thit lp cc LSP c quyt nh bi iu khin LSR hot ng c lp hoc c ch dn. Khi dng iu khin LSP c lp, mi LSR c th qung bo cc trao i nhn ti cc LSR ln cn bt c thi im no n mun. V d, khi hot ng c lp trong dng xung da trn yu cu, mt LSR c th tr li cc yu cu

n tt nghip i hc

Chng 2 . Chuyn mch nhn

vic trao i nhn ngay lp tc m khng phi i mt trao i nhn t hop bn cnh nh hnh 5.5a.
Yu cu Khng gi

LSR Ru
Qung bo

LSR Rd

LSR Rd2

a. iu khin c lp
Bc 2 Bc 1 FEC FEC

LSR Ru

LSR Rd

LSR Rd2

b. iu khin c ch dn Hnh 5.5. V d Modun iu khin Khi hot ng trong ch dng xung c lp khng yu cu, mt LSR c th qung b mt trao i nhn cho FEC ti cc LSR ln cn khi n sn sng chuyn mch nhn FEC . Kt qu ca vic dng ch c lp l mt nhn dng ln c th c qung b trc khi mt nhn dng xung c nhn Khi dng iu khin ch dn LSR, mt LSR c th khi to truyn dn mt trao i nhn ch cho mt FEC m n c mt trao i nhn vi FEC ca hop ln cn, hoc cho LSR l li ra, hnh 5.5b. Vi mi FEC m LSR khng phi li ra hoc khng tn ti trao i, LSR phi i cho n khi mt nhn t mt LSR dng xung c nhn trc khi trao i FEC ny v chuyn cc nhn tng ng ti cc LSR dng ln.

5.1.5. Bn tin LDP


Bn tin LDP c nh ngha trong khun dng phng tin c lp. Mc ch ny cc bn tin c th kt hp trong mt d liu, 11 bn tin c s dng trong LDP.

5.1.5.1. Mo u LDP
0 1-14 Version LDP Identifier 15 16-30 PDU Length 31

Hnh 5.6. Mo u LDP

n tt nghip i hc

Chng 2 . Chuyn mch nhn

Mi bn tin LDP bt u vi mt mo u LDP, theo sau bi mt hoc nhiu bn tin LDP. Cc trng trong mo u LDP thc hin cc chc nng sau: - Version : Ch s phin bn ca giao thc. - di PDU : tng di ca PDU trong cc octet bao gm phin bn v trng di. - LDP ID : B nhn dng khng gian nhn ca LSR gi bn tin. Bn octet u cha a ch IP phn cho LSR v n l ID ca router. Hai octet cui nhn dng mt khng gian nhn trong LSR. Vi khng gian nhn m rng nn th cc trng ny c th l 0.

5.1.5.2. M ho m ho di kiu (TLV)


LDP dng k thut m ho gi tr di kiu (TLV) m ho nhiu thng tin c mang trong bn tin LDP. Nh hnh 5.7, TLV ca LDP c m ho bi 2 octet trong 14 bit ch r kiu v 2 bt ch r cch hot ng khi mt LSR khng nhn ra kiu ny. Tip theo l 2 octet trng di v trng gi tr di bin thin.
0 1 UF 2-14 Type Value 15 16 17-30 Length 31

Hnh 5.7. M ho TLV Da trn cng thc ca TLV cha xc nh, nu bit U c lp l 0, mt thng bo phi c gi li b khi to bn tin v ton b bn tin phi b hu b. Nu bit U lp l 1, TLV cha xc nh s pht l v phn cn li ca bn tin c x l nh khng c s tn ti ca TLV. Bit chuyn tip TLV khng xc nh c dng khi bit U c lp v bn tin LDP bao hm TLV khng xc nh c chuyn tip. Nu F b xo (=0), TLV khng xc nh s khng chuyn tip bn tin bao hm. Nu F c lp (=1), TLV khng xc nh s chuyn tip bn tin bao hm.

5.1.5.3. Khun dng bn tin LDP


Tt c cc bn tin LDP u c cng khun dng (hnh 5.8). Cc trng trong bn tin thc hin cc chc nng sau:

n tt nghip i hc

Chng 2 . Chuyn mch nhn

1-14 Message Type

0ll;ljk

15

16-30 Message Length

31

Message ID Mandatory Parameters Option Parameters

Hnh 5.8. Khun dng bn tin LDP - Bit U : bit bn tin khng xc nh. Nu bit ny l 1 v khng xc nh (bn tin khng th gii ngha) th bn tin b b i. - Message Type : trng ny nhn dng cc kiu bn tin. - Message length : di ca bn tin ID, tham s bt buc v tham s la chn. - Message ID : nhn dng n ca bn tin. N c th dng lin kt cc bn tin thng bo vi cc bn tin khc. - Mandatory parameter : thit lp cc tham s bt buc. - Optional parameter : thit lp cc tham s la chn. Theo nguyn l, mi th trong mt bn tin LDP c th c m ho nh mt TLV nhng khng phi lc no LDP cng dng k thut TLV. N s dng khi cn thit trnh lng ph ti nguyn.

5.1.5.4. Khun dng v chc nng TLV


- FEC : TLV mang FEC c thay i gia cc LSR. MPLS v LDP ch dng a ch cho mt FEC m khng c ch s cng hoc PID. FEC c th l tin t a ch hoc a ch host y . N c th cha a ch gn vi mng khc (nh IPX) nhng nh hn bt c a ch no trong IP. - Address list : Danh sch a ch TLV xut hin trong bn tin thu hi a ch. - Hop count : TLV ny xut hin trong bn tin thit lp LSP. N m s hop LSR dc theo mt LSP t khi LSP bt u c thit lp. N c th c dng cho pht hin vng.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

- PATH vector : TLV ny cng c dng cho pht hin vng vi TLV Hop count trong bn tin yu cu nhn v bn tin trao i nhn. N dng trong bn tin yu cu nhn ghi li cc tuyn ca LSR m yu cu i qua. - Generic label : TLV ny cha cc nhn dng cho cc lin kt m cc gi tr l c lp ca k thut lin kt c bn nh PPP v cc lin kt Ethernet. - ATM label : Nu ATM c dng nh mt dch v mang th TLV ny cha cc gi tr ATM VPI/VCI. - FR label : Nu FR c dng nh mt dch v mang th TLV ny cha cc gi tr FR DLCI. - Status : TLV ny c dng cho mc ch phn on ging nh thnh cng hoc tht bi ca hot ng. - Extended Status : TLV ny m rng trng thi TLV bng vic cung cp cc byte truyn thng cho thng tin trng thi. - Returned PDU : TLV ny c th hot ng vi TLV trng thi. Mt LSR dng tham s ny gi li LDP PDU cho LSR gi n. Gi tr ca TLV ny l mo u PDU v cng nhiu mo u theo sau d liu PDU cng thch hp cho iu kin bt u tn hiu bi bn tin Notification. - Returned massega : TLV ny c th c dng vi TLV trng thi. Mt LSR dng tham s ny gi li phn bn tin LDP ti LSR gi n. - Common Hello parameters : Nhc nh cc LSR ln cn c th nh k gi bn tin Hello ti mi LSR khc chc chn chng ang chy. TLV ny cha cc tham s chung qun l hot ng ny nh cc bn tin Hello c thng xuyn c gi v nhn khng v c bao nhiu bn tin c gi v nhn trong thi gian ny. - IPv6/IPv4 transport address : Nu a ch IPv6 c s dng, TLV ny cho php mt IPv6 c dng khi TCP m cho mt phin LSP. Nu n khng c dng th a ch ngun trong mo u IP c s dng. Vi IPv4 cng tng t. - Common session parameters : TLV ny cha cc gi tr c a ra bi vic gi cho LSR cc tham s c dng cho mi phin LDP. Cc tham s l: a. Label advertisement discipline : dng xung khng yu cu v dng xung da trn yu cu.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

b. Keep alive time : ch nh lng thi gian ln nht tri qua khi nhn thnh cng cc PDU t LDP ngang cp trn phin kt ni TCP. Keep alive time c ci t li mi khi PDU n ch. c. Loop detection : ch th nu pht hin vng l c php hoc khng c php. d. PATH vector limit : ch th di vector ng dn di nht. e. Maximum PDU length : ch th di ti a ca LDP PDU. - ATM session parameters : TLV ny ch r dung lng ATM merge ca ATMLSR. Cc la chn l: a. merge khng c h tr b. VP merge c h tr c. VC merge c h tr d. VC v VP c h tr TLV ny cung cp thng tin v VC trc tip, ngha l dng mt VCI trong mt hng hoc c 2 hng trn lin kt. N cng cha mt trng ch r phm vi cc nhn ATM c h tr bi vic gi LSR. - FR session parameters : TLV cha kiu thng tin ging nh ATM session parameters, ngoi tr FR gn vi cc DLCI. - Label Request message ID : gi tr ca tham s ny l ID ca bn tin Label Request tng ng. - Private : Cc TLV c nhn v cc bn tin c dng truyn thng tin c nhn gia cc LSR.

5.1.5.5. Khun dng v chc nng cc bn tin LDP


LDP c 11 bn tin : - Notification - Hello - Initialization - KeepAlive - Address

n tt nghip i hc

Chng 2 . Chuyn mch nhn

- Address Withdraw - Label Mapping - Label Request - Label Abort Request - Label Withdraw - Label Release - Bn tin Notification : c dng bi mt LSR thng bo cho cc LSR ngang cp ca n cc quy nh v li v cc iu bt thng. Cc quy nh l: khng nhn bit qu trnh gi, cc sai lm, bn tin d tt, s kt thc ca thi gian tn ti, gii phng bi mt nt, li ca khi to phin LSP. Trong mt vi trng hp, LSR c th kt thc phin LDP (ng kt ni TCP). Khun dng bn tin c ch ra trong hnh 5.9.
0 0 1-14 Notification (00001) Message ID Status(TLV) Option Parameters 15 16-30 Message Length 31

Hnh 5.9. Bn tin Notification Mt ID bn tin ch nhn dng mt bn tin. N c m ho trong tt c cc bn tin. Trng thi TLV ch ra trng thi ca kt qu. Cc tham s la chn l : trng thi m rng, trng thi tr li, bn tin tr li. Khi mt LSR nhn mt bn tin Notification mang m trng thi ch ra mt li khng th trnh c, n hu b phin LDP ny ngay lp tc bi vic ng phin kt ni TCP v loi b tt c cc lin kt vi phin bao gm c cc lin kt nhn - FEC va c lp thng qua phin - Bn tin Hello : bn tin ny c thay i gia 2 LDP ngang cp trong mt phin pht hin LDP. Khun dng bn tin nh hnh v.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

0 0

1-14 Hello (00001)

15

16-30 Message Length

31

Message ID Common Hello parameter(TLV) Option Parameters

Hnh 5.10. Bn tin Hello


0 1 0 0 2-14 15 16 17-30 Length T R Reserved 31

Common Hello Parm(00400) Hold Time

Hnh 5.11. Tham s TLV Hello chung Mt LSR lu gi bn ghi ca cc bn tin Hello c gi t cc LSR ngang cp tim nng. Bn tin Hello gi thi gian ch r thi gian m LSR bn gi lu trong bn ghi ca n t LSR bn nhn m khng cn bin nhn ca bn tin Hello khc. Mt cp LSR thng lng thi gian lu tr, chng dng cho cc bn tin Hello t cc LSR khc. Mi cp ngh mt thi gian lu tr. Thi gian lu tr c dng l nh nht c ngh trong cc bn tin Hello. Bit T c gi l Targeted Hello. T=1 ch ra rng bn tin Hello l Targeted Hello. T=0 ch ra rng bn tin Hello l mt lin kt. Bit R c gi l yu cu gi Targeted Hello. R=1 th yu cu bn nhn nh k gi Targeted Hello ti ngun ca bn tin Hello ny. R=0 th khng c yu cu no c. Tham s la chn l cc TLV a ch truyn giao IPv4, IPv6 v mt dy s cc hnh m c dng bi LSR bn gi pht hin hnh thay i bn gi. - Bn tin Initialization : bn tin ny c thay i khi cc LDP ngang cp mun thit lp mt phin LDP. Trong th tc ny, cc LSR thng lng cc tham s nh Keep alive timer, cc kiu qung bo s c h tr (dng xung khng yu cu v dng xung da trn yu cu). Nu cc nhn FR hoc ATM c s dng trong

n tt nghip i hc

Chng 2 . Chuyn mch nhn

phin, cc quy nh dng cho cc nhn ny cng c thng lng. Khun dng bn tin c ch ra trong hnh 5.12.
0 0 1-14 15 16-30 Message Length 31

Initialization (00200)
Message ID

Common Session parameter(TLV) Option Parameters

Hnh 5.12. Bn tin Initialization Cc tham s phin chung TLV c gii thch trong phn trc. Cc tham s la chn l cc tham s phin ATM v FR. - Bn tin KeepAlive : c thay i gia cc LDP ngang cp yu cu gim st tnh nguyn vn ca kt ni TCP h tr phin LDP. Khng c tham s la chn trong bn tin ny.
0 0 1-14 15 16-30 Message Length 31

KeepAlive (00201)
Message ID

Option Parameters

Hnh 5.13. Bn tin KeepAlive


0 0 1-14 15 16-30 Message Length 31

Address (00300)
Message ID

Address List(TLV)
Option Parameters

Hnh 5.14 Bn tin Address

n tt nghip i hc

Chng 2 . Chuyn mch nhn

- Bn tin Address : c gi bi mt LSR ti LDP ngang cp ca n qung bo cc a ch giao din ca n. Mt LSR nhn mt bn tin a ch dng a ch n bit lu tr c s d liu cho trao i gia cc b nhn din LDP ngang cp v cc a ch hop tip theo.
0 0 1-14 15 16-30 Message Length 31

Address (00300)
Message ID

Address List(TLV)
Option Parameters

Hnh 5.14 Bn tin Address Danh sch a ch TLV l danh sch ca cc a ch giao din IP c qung bo bi LSR bn gi. Khng c tham s la chn cho bn tin ny. - Bn tin Address Withdraw : tho b bn tin a ch v rt ra mt a ch giao din qung bo trc hoc cc a ch.
0 1-14 15 16-30 Message Length 31

0 Address Withdraw (00301) Message ID

Address List(TLV)
Option Parameters

Hnh 5.15. Bn tin Address Withdraw Danh sch a ch TLV cha danh sch cc a ch c rt ra bi LSR bn gi bn tin ny. - Bn tin Label Mapping : c dng qung bo mt LDP ngang cp cc lin kt nhn FEC. Nu mt LSR phn b mt trao i cho mt FEC ti nhiu LDP ngang cp, y l vn ni b hoc n trao i mt nhn n ti FEC v phn b s trao i ny ti tt c cc peer ca n hoc dng cc trao i khc nhau cho mi peer ca n

n tt nghip i hc

Chng 2 . Chuyn mch nhn

Cng vy, mt LSR nhn mt bn tin trao i nhn t LSR dng xung vi mt tin t hoc a ch host FEC, v khng nn dng nhn cho chuyn tip nu bng nh tuyn ca n khng cha mt cng ph hp vi gi tr FEC.
0 1-14 15 16-30 Message Length 31

0 Label Mapping (00400) Message ID

FEC TLV
Label TLV Option Parameters

Hnh 5.16. Bn tin Label Mapping D nhin, bn tin ny phi cha cc a ch IP v cc lin kt nhn ca n. FEC TLV ch r phn FEC ca trao i nhn-FEC c qung bo. Nhn TLV ch r phn nhn ca trao i nhn-FEC. Cc TLV la chn l ID bn tin yu cu nhn, s lng hop v vector tuyn.
0 1-14 15 16-30 Message Length 31

0 Label Request (00401) Message ID

FEC TLV
Option Parameters

Hnh 5.17. Bn tin Label Request - Bn tin Label Request : c dng bi mt LSR yu cu LDP peer cung cp mt lin kt nhn cho mt FEC. Mt LSR c th truyn mt bn tin Request di bt c iu kin no sau y: + LSR nhn ra mt FEC mi thng qua bn chuyn tip v hop bn cnh l mt LDP peer, v LSR khng c trao i t hop bn cnh i vi FEC c nhn ra.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

+ Hop tip theo thay i FEC, v LSR khng c trao i t hop bn cnh i vi FEC c nhn ra. + LSR nhn mt yu cu nhn cho mt FEC t peer LDP dng ln, FEC ca hop tip theo l mt peer LDP, v LSR khng c trao i t hop bn cnh. FEC TLV nhn dng gi tr nhn c yu cu. Cc TLV la chn l s lng hop v vector tuyn. - Bn tin Label Withdraw : hy b mt trao i gia FEC v nhn. N gi mt LDP peer thng bo cho nt khng tip tc dng lin kt nhn-FEC c trng m LSR qung bo trc . LSR truyn bn tin Label Withdraw di cc iu kin sau:
LSR khng nhn ra mt FEC c nhn bit trc m n qung bo

mt nhn.
LSR quyt nh khng nhn no chuyn FEC vi trao i nhn ang b

hu b.
0 1-14 15 16-30 Message Length 31

0 Label Withdraw (00402) Message ID

FEC TLV (optional)


Label TLV Option Parameters

Hnh 5.18. Bn tin Label Withdraw FEC TLV ch r FEC cho cc nhn b hu b. Nu khng c nhn TLV theo sau FEC, tt c cc nhn lin kt vi FEC b hu b. Mt khc, ch c nhn c ch r trong nhn TLV la chn b hu b. LSR nhn mt bn tin Label Request phi tr li li vi bn tin Label Release. - Bn tin Label Release : thng bo cho peer LDP bn gi v LSR khng di hn cn cc lin kt nhn-FEC c trng. Mt LSR phi truyn mt bn tin Label Release di cc iu kin sau:

n tt nghip i hc

Chng 2 . Chuyn mch nhn

1-14

15

16-30 Message Length

31

0 Label Release (00403) Message ID

FEC TLV
Label TLV (optional) Option Parameters

Hnh 5.19. Bn tin Label Release


LSR gi trao i nhn khng di hn hop tip theo cho vic trao i

nhn v LSR l hnh th cho s duy tr hot ng.


LSR nhn mt trao nhn t mt LSR khng phi l hop tip theo i vi

FEC v LSR l hnh th cho s duy tr hot ng.


LSR nhn mt bn tin Label Withdraw .

- Bn tin Label Abort Request : kt thc bn tin Label Request ni bt. C rt nhiu l do khc nhau cho vic a ra bn tin Abort nh qung bo tin t OSPF v BGP thay i hot ng yu cu nhn.
0 1-14 15 16-30 Message Length 31

0 Label Request (00401) Message ID

FEC TLV
LSPID TLV (CR-LDP, mandatory) ER-TLV (CR-LDP, optional) Traffic TLV (CR-LDP, optional) Pinning TLV (CR-LDP, optional)

Hnh 5.20 Bn tin Label Abort Request

n tt nghip i hc

Chng 2 . Chuyn mch nhn

5.2 Giao thc dnh trc ti nguyn (RSVP) v phn b nhn


Nh tn ca mnh, RSVP c dng dnh trc ti nguyn cho mt phin trong mng Internet. Kha cnh ny ca Internet l kh khc so vi mc ch thit k ca h thng c thit lp h tr dch v best-effort v khng quan tm ti xc nh trc thit b c s dng cho ng dng ngi dng. RSVP mc ch cung cp cch thc hin c li bi vic dnh trc ti nguyn khi cn thit ti mi nt tham gia vo vic h tr lung ca lu lng. Cn nh IP l giao thc phi kt ni tc khng thit lp kt ni, trong khi RSVP c thit k thit lp cc tuyn ny cng nh m bo bng tn cho cc tuyn. RSVP khng cung cp hot ng nh tuyn nhng dng IPv4 v IPv6 nh k thut truyn dn trong kiu ging nhau nh ICMP v IGMP. RSVP yu cu nhn lu lng yu cu QoS cho lung. Cc ng dng host bn nhn phi quyt nh s lc QoS, m sau chuyn ti RSVP. Sau khi phn tch yu cu ny, RSVP c dng gi bn tin yu cu ti tt c cc nt tham gia vo lung d liu. RSVP hot ng vi cc th tc n hng v a hng v lin kt vi cc giao thc a hng hin ti. Bn tin c dng bi server thit lp tuyn cho mt phin. Bn tin tuyn khi to v c gi ti cc i tng tim nng ca phin. Bn tin dnh trc (RESV) c gi p li bn tin tuyn (PATH). Bn tin PATH v RESV cha thng tin c thm quyn nhn dng mt lung v cc thit b QoS cho lung. Cc thit b ny biu th mt dch v m bo nh tc nh ca lung lu lng, kch thc burst, cc tham s c gii thch trong chng. m bo dch v, hot ng iu khin ti c th c dng. Vi cch ny, mng n lc iu chnh lung lu lng ging nh mt lung khng c lm gim QoS ca lung khc. RSVP c th dng thit lp mt tuyn v dnh trc cc nhn MPLS ti cc nt gia cc nhm truyn thng. S m rng RSVP cho dch v ny l cc i tng RSVP c bit, l cc trng nm trong bn tin RSVP Bn tin RSVP c truyn li theo cng tuyn m bn tin PATH quan h ca n a ra. Chc nng ca lung bn tin ny hon thnh mt nh tuyn MPLS gia cc ngi dng. Cc nhn c phn v bng nhn c to ra mi nt

n tt nghip i hc

Chng 2 . Chuyn mch nhn

5.3. Giao thc nh tuyn cng min (BGP) v phn b nhn


BGP cng nng cao vic h tr phn b nhn. Khi BGP c dng phn b mt tuyn c bit, n cng c th dng phn b nhn MPLS m c trao i vi tuyn . Thng tin trao i nhn cho tuyn c bit gip bn tin cp nht BGP tng t m c dng phn b tuyn ca chnh n. Hot ng ca BGP kh n gin tng ng vi hot ng ngn xp nhn MPLS. V d, mt router A bn ngoi cn gi mt gi ti ch D v hop tip theo BGP ca A i vi D l router ngoi B. B trao i nhn L ti D th u tin A y L vo ngn xp nhn ca gi. Sau , A tra cu IGP ca mnh tm hop tip theo ti B, gi n l C. Nu C phn b ti A mt nhn MPLS cho tuyn ti B, th A c th y nhn ny vo ngn xp nhn ca gi v gi gi ti C. Nu vic lp cc b thuyt minh BGP ang thay i cc tuyn thng qua b phn x tuyn, th bi vic gip s phn b nhn trn cc phn b tuyn, b phn x tuyn cng c th phn b nhn. iu ny ci thin tnh cht v hng. Phn b nhn c th h tr bn tin cp nht BGP bi vic dng thuc tnh m rng a giao thc BGP-4. Nhn ny c m ho trong trng NLRI ca thuc tnh v trng SAFI dng ch ra vic NLRI cha mt nhn. B thuyt minh BGP c th khng dng gi nhn ti peer BGP c bit tr khi peer ch th, thng qua s thng lng v hng BGP n c th x l cc bn tin cp nht vi trng SAFI c bit.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

CHNG 6. K THUT LU LNG


Chng ny tho lun 2 kha cnh ca MPLS. Kha cnh, u tin cp n k thut cung cp dch v hiu qu ti khch hng ca n. Th hai l cch MPLS a ra mt quy tc h tr cc dch v ny. Trong , gii thch cc lp lu lng v cc cng c k thut lu lng qun l cc lp ny, bao gm vic kim sot token v go r (leaky bucket), iu chnh lu lng vi cc thut ton phc v hng i khc nhau.

6.1. nh ngha k thut lu lng (TE)


TE gii quyt vn hot ng ca mng trong vic h tr ngi dng mng v QoS n cn. Hot ng ch yu ca TE i vi cc mng MPLS l o lng lu lng v iu khin lu lng. Hot ng sau cng gii quyt vn m bo cho mng c mt ngun ti nguyn h tr yu cu QoS ca ngi dng. Nhm lm vic Internet [AWGU99] thit lp RFC 2702. Thng tin RFC ny nh ngha mt cch ni chung yu cu ca k thut lu lng qua MPLS.

6.1.1. Hot ng nh hng lu lng v nh hng ti nguyn


K thut lu lng trong mi trng MPLS thit lp mc tiu hng ti 2 chc nng hot ng : (a) nh hng lu lng v (b) nh hng ti nguyn. Hot ng nh hng lu lng h tr hot ng QoS ca lu lng ngi dng. Trong mt phn lp n, m hnh dch v Internet n lc ti a, hot ng nh hng lu lng then cht vi mc ch cung cp tn tht lu lng nh nht, tr nh nht, thng qua ln nht, n lc ca cc hip tho thun lp dch v (SLA). Hot ng nh hng ti nguyn mc ch gii quyt ti nguyn mng nh cc lin kt truyn thng, cc router v cc server l cc thc th gp phn vo s thc hin mc ch nh hng lu lng. Qun l nng lc ca nhng ti nguyn ny vn sng cn i vi thnh cng ca cc mc ch hot ng nh hng ti nguyn. Bng tn s dng l vn u tin, khng c bng tn th bt c hot ng no ca TE u l v ngha. Vic qun l nng lc ca bng tn s dng l c trng ca TE.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

6.1.2 Tc nghn nh nht


Bt c mng qun l lu lng v ngi dng trn c s yu cu phi gii quyt vn tc nghn. Vic qun l tt c lu lng ca ngi dng ngn chn tc nghn l kha cnh quan trng ca bc tranh QoS. Tc nghn lm gim thng lng v lm tng tr. Tc nghn l hi chung bo t ca hiu qu QoS. Hu ht cc mng cung cp cc quy tc truyn dn cho ngi dng ca n. Bao gm s tho thun lng lu lng c th gi ti mng trc khi lung lu lng b iu chnh (iu khin lung). iu khin lung l mt thnh phn c trng ngn chn tc nghn trong mng. Tht d dng hiu s lo lng ca cc nh qun l mng khi gp phi tc nghn, bi v n c th dn n s suy gim gay gt ca cc hot ng mng c thng qua v p ng thi gian. Khi lu lng trong mng n mt im no , s tc nghn nh bt u xy ra, vi s gim st trong thng lng. Hnh 6.1 ch ra vn ny. Nu iu ny tip din nh ng tuyn tnh, th n s khng phi l vn qu phc tp. Tuy nhin, ti mt thi im khi hot ng ca mng t n mt cp no th thng lng s tt xung theo ng thng bi v s tc nghn nghim trng v s tch t li cc gi ti hng i. Do , cc mng phi cung cp mt vi k thut thng bo cc node mc phi trong mng khi tc nghn xy ra v cung cp k thut iu khin lung trn thit b ngi dng bn ngoi mng. Hai kch bn ca tc nghn Tc nghn ti thiu l mt trong cc mc ch hot ng nh hng ti nguyn v lu lng quan trng nht. Hnh 6.1 ch ra vic tc nghn din ra trong mt thi gian di. Vi s gi s ny, tc nghn c th c miu t bi 2 cch. Cch th nht, n gin l khng c ti nguyn cung cp cho lu lng ngi dng. Cch th 2, phc tp hn, c ti nguyn mng h tr QoS ca ngi dng nhng cc dng lu lng khng c sp xp hp l khi vo mng. Do , mt vi phn ca mng khng c dng n trong khi cc phn khc th b cht y bi lu lng ngi dng.

n tt nghip i hc
Thng lng t tc nghn

Chng 2 . Chuyn mch nhn

Tc nghn nghim trng

Yu cu sa cha

Lu lng

Hnh 6.1 Cc vn tc nghn tim tng Vn u tin c gii quyt bi vic xy dng cc mng vi bng tn rng hn. Vn ny c th c gip bi vic ng dng cc k thut iu khin tc nghn nh hot ng iu khin ca s lu lng vi thng bo tc nghn v receive not ready. Vn ch yu i vi bng tn rng hn l s s dng ngho nn ti nguyn mng trong khong thi gian c t lu lng. N hi ging cch xy dng mt h thng giao thng t do m chp nhn lu lng dn dp tt c cc gi trong khi ti 2 gi sng th tt c cc ng u trng rng. Vn th hai, ch nh ti nguyn khng hiu qa, thng xuyn c gi thng qua k thut lu lng. Vi tt c iu ny, ti nguyn l sn c trong mng. Vn ch l tm chng v hng lu lng ngi dng ti n. Ni chung, kt qu vic tc nghn t ch nh ti nguyn khng hiu qu c th gim i bi vic lm theo cc hot ng x l cn bng ti trng, l hng lu lng ti cc lin kt v cc node hiu dng. tng ny l tc nghn ln nht l nh nht bi vic trnh ng cong khng mong mun (nh hnh 6.1). Hin nhin, kt qu l thng lng tng ln, gim vic mt v tr lu lng.

6.2. Dch v lin kt da trn QoS v phn lp dch v


Lu lng c th c nhn ra xung quanh khi nim gi l phn lp dch v c ch ra trong bng 6.1. Nhng phn lp lu lng ny tng t nh nhng phn lp c dng trong cc mng ATM. Cc phn lp ny c nh ngha vi ch ti cc hot ng sau:

n tt nghip i hc

Chng 2 . Chuyn mch nhn

- iu chnh thi gian gia pha gi v pha nhn. - Tc bit (bin i hoc hng s) - Cc phin kt ni c hng v phi kt ni gia bn gi v bn nhn - S lin tc ca ti trng ngi dng. - Hot ng iu khin lung. - Tnh ton lu lng ngi dng. - S phn chia v ti hp ca cc PDU.

Lp Lp A

c im Tc bt c nh (CBR), c s TDM, hng kt ni, yu cu nh thi, iu khin lung l ti thiu, tn tht nh c php.

Lp B

Tc bt thay i (VBR), c s STDM, hng kt ni, yu cu nh thi, iu khin lung l ti thiu, tn tht nh c php.

Lp C

VBR, c s STDM, khng yu cu nh thi, hng kt ni, iu khin lung cho php, khng cho php tn tht

Lp D

VBR, c s STDM, khng kt ni, khng yu cu nh thi, iu khin lung cho php, khng cho php tn tht.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

Bng 6.1. Cc lp lu lng

6.3. K thut lu lng v s sp t lu lng


Trong dng n gin nht ca n, k thut lu lng n lc chim ly nhu cu QoS ca ngi dng bi vic to ra ti nguyn mng tt nht h tr nhng nhu cu ny. D nhin, ti nguyn mng l hn ch. Do , vi mt mng m khng c bng tn (tc lin kt v cng sut x l LSR) h tr cc yu cu QoS ca ngi dng mi thi im trong ngy, hot ng k thut lu lng phi sp xp lu lng ngi dng. iu ny ngha l cc k thut phi a ra quyt nh cch thc h tr cc phn lp khc nhau ca lu lng ngi dng. Nh miu t trong hnh 6.2, vic sp xp s xy ra ti li vo LSR v phi thit lp hng i v hot ng trn phn cng u tin lp lu lng. Trong v d ny, mi lp lu lng c phn vo mt hng i khc nhau v lu lng bo hiu c a vo trc cc lp lu lng khc, l nguyn l hot ng chung. Lu lng Bo hiu 1 Lp/FEC A 2 Lp/FEC B 3 Lp/FEC C 4 Lp/FEC D 5 n Quyn c i trc Hnh 6.2. Sp xp lu lng ti LSR li vo
LSR li vo Lin kt vo mng

6.3.1. Hng i lu lng


Nhiu h thng ngy nay, c bit l router h tr nhiu loi hng i. Cc loi thng thy l:

n tt nghip i hc

Chng 2 . Chuyn mch nhn

- Hng i FIFO: Truyn dn cc gi c da trn yu cu n ca chng. MPLS dng phng php ny cho vic a ra mt FEC. - Hng i ngang bng khi lng (WFQ): bng tn kh dng dc theo hng i ca lu lng c chia ra da trn khi lng. a ra lu lng ca n, mi lp lu lng c x l ngang bng nhau. iu ny thng c dng khi ton b lu lng l s ho hp ca nhiu lp lu lng. Lu lng lp A c ho hp vi khi lng ln hn tc l lu lng lp D. WFQ ph hp vi vic qun l lung MPLS. - Hng i theo yu cu (CQ): Bng tn c phn cn xng cho mi lp lu lng. N m bo mc dch v ti tt c cc lp dch v. - Hng i u tin (PQ): Tt c cc gi thuc lp u tin cao c truyn trc bt c lp c u tin no thp hn. Do , mt vi lu lng c truyn do lu lng khc chu ph tn.

6.3.2. Hot ng nh tuyn hin nay


Trong cc mng Internet hin ti, cc tuyn gia bn gi v bn nhn c thit lp bi cc phn b nh tuyn nh OSPF v BGP. Nhng giao thc ny khng phi thit k cho tuyn v ti nguyn, khi chng da trn c s ng ngn nht (s lng hop nh nht). Chng xy dng mt tuyn da trn cu hnh ca mng m khng da trn bng tn ca mng. Thm vo , chng khng quan tm n lp lu lng trong cc tuyn thit lp ny. Do , nhiu mng phi p l 3 ti thut ti cc lin kt Ti ng k cn bng v cc node m
Ti l 5 ti G qua B khng c chn

bi cc giao thc nh tuyn.


A

G qua B

Ti l 4 ti G

B
Ti l 3 ti G Ti l 2 ti G

D
Ti l 2 ti G

C
Ti l 1 ti G

E Host G F
Ti bn cnh G

n tt nghip i hc

Chng 2 . Chuyn mch nhn

Hnh 6.3. Phng thc tip cn hin ti V d trong hnh 6.3, router A c thng bo bi giao thc nh tuyn n c th n c host G thng qua 2 ng dn kh thi, mt l ti C u tin v mt l ti B u tin. Vi giao thc nh tuyn in hnh, tuyn ng s c i qua C bi tuyn ng ny c s lng hop t nht ti ch. Tuyn ng ny c th tt hn tuyn khc. Nhng nu lin kt gia router A v C b tc nghn hoc nu lin kt ny khng phi l lin kt dung lng cao th lu lng s c tp trung vo tuyn A B cn tuyn A C khng dng. Tt nhin, ta c th o lng sc mnh lu lng ti cc phn ca mng m khng s dng. Nhng hu ht cc lin kt truyn thng ca cc mng lm thay i dung lng ca chng v l nhim v ln dng cc k thut nh tuyn IP quy c khc phc vn s dng hay khng s dng cc phn ca mng. Trong mng phc tp Internet, IP v giao thc nh tuyn Internet chng minh y nhim v ny.

6.4. Trung k lu lng, lung lu lng v tuyn chuyn mch nhn


Mt kha cnh quan trng ca k thut lu lng MPLS (MPLS TE) l s phn bit cc trung k lu lng, lung lu lng v cc LSP. Mt trung k lu lng l s tp hp cc lung lu lng ca cng mt phn lp c t trong mt LSP. Mt trung k lu lng c th c lin kt ring vi n (cc a ch, ch s cng). Mt trung k lu lng c th c nh tuyn bi n l mt b phn ca LSP. Do , tuyn ng m cc lung trung k lu lng c th b thay i. MPLS TE lin quan n vic trao i trung k lu lng ti cc lin kt vt l ca mng thng qua cc tuyn chuyn mch nhn

n tt nghip i hc

Chng 2 . Chuyn mch nhn

6.4.1. S thu ht ca MPLS i vi k thut lu lng


Mt s khi nim c bn c gii thch, n c th c nhn ra khi mng c s MPLS gi n ti hot ng TE bi v: - Chuyn mch nhn khng b cng p bi s ra lnh ca chuyn tip IP quy c do c cc giao thc nh tuyn IP c s. - Trung k lu lng c th trao i cc tuyn chuyn mch nhn. - Cc thuc tnh c th c lin kt vi cc trung k lu lng. - Chuyn tip IP cho php tp hp cc a ch trong khi MPLS c th cho php tp hp hoc khng. - nh tuyn c s cng p lin quan d dng ti s hot ng ny - MPLS c th hot ng vi gi thp hn ATM.

6.4.2. Dung lng lin kt


MPLS TE nhn ra thc t rng bng tn dung lng ca cc lin kt trong mt mng l ngi phn x cui cng cho vic quyt nh k thut lu lng. gii thch iu ny, xem xt mt SONET OC-3 lin kt vi mt dung lng 155,52 Mbit/s c th chp nhn ln nht 353207 t bo ATM trn mt giy. Khng nhiu hn 353 nghn t bo trn mt giy c th c t vo lin kt vt l ny. Kt qu, n l nhim v ca k thut lu lng to ra hiu qu cho vic dng lin kt ny vi cc hot ng sau: loi b lu lng i t giao din lin kt nu tc lu lng l vt qu tc bng tn lin kt hoc t thm lu lng vo lu lng lin kt nu tc lu lng nh hn tc bng tn lin kt.

6.4.3. Phn b ti trng


Trong nhiu trng hp, n to ra hot ng phn b lu lng dc theo cc trung k lu lng song song hoc trong mt vi trng hp dc theo cc tuyn khc nhau v cc LSR trong mng vt l. i vi hot ng u tin, nhiu trung k lu lng c thit lp gia cc node ln cn (lin kt gia cc LSR A - F), cho php mi trung k lu lng mang mt phn ca tng ti lu lng. Phng php ny l kh ph bin v ngy nay c thc hin trong nhiu mng nh l SS7.
A C E F B D

n tt nghip i hc

Chng 2 . Chuyn mch nhn

Trung k lu lng

Hnh 6.4 Phn b ti trng Hot ng th hai, vic phn b cc ti lu lng vo vo cc trung k khc nhau v cc node khc nhau trong mng. y l vn kh phc tp.

6.4.4. Cc thuc tnh trung k lu lng


MPLS TE thit lp cc thuc tnh sau cho cc trung k lu lng : - S ph hp vi tng v lp tng ng chc nng (FEC), mt trung k lu lng l mt s ho hp ca cc lung lu lng thuc v cng mt lp. V d n c th mun t cc lp lu lng khc nhau vo mt FEC nu bn cht lu lng l khng cn thit. - Mt trung k lu lng c kh nng ng gi mt FEC gia bt c LSR li vo v LSR li ra no. - Cc trung k lu lng thng qua nhn FEC l kh nng nh tuyn. - Mt trung k lu lng c th c di chuyn t mt ng ti ng khc iu ny c ngha n khc bit LSP m n i qua. - Mt trung k lu lng l khng nh hng nhng trong thc t 2 trong cc trung k ny c th lin kt vi nhau min l chng c to ra v hu b ng thi. S kt hp ny c gi l mt trung k lu lng hai chiu (BTT). Hai BTT khng phi i qua cc tuyn vt l ging nhau mc d n mun lm iu nu hai lung l cp cht ch i vi vn nh hng thi gian thc. V d, nu mt trung k lu lng i qua nhiu LSR hn i tc ca n, n c th nh hng ti cht lng ca s tc ng qua li. Trong bt c, trng hp no, mt BTT c gi l cu hnh i xng nu cc trung k lu lng nm trn cng tuyn vt l, v gi l cu hnh bt i xng nu chng c nh tuyn qua cc tuyn vt l khc nhau. Thuc tnh ca trung k lu lng i vi k thut lu lng

n tt nghip i hc

Chng 2 . Chuyn mch nhn

Mt trung k lu lng c cc tham s nhn din cc thuc tnh ca n. Ln lt, cc thuc tnh ny nh hng ti c trng hot ng ca n, l cch lu lng c x l bi mng. Gi tr thuc tnh c phn bi qun l mng hoc bi phn mm c kh nng t ng kim tra FEC tiu chun (cc a ch, ch s cng v PID) v thit lp cc tham s. Cc thuc tnh quan trng ca trung k lu lng i vi k thut lu lng c lit k y. - Thuc tnh tham s lu lng. - Thuc tnh hp ng. - Thuc tnh la chn v duy tr tuyn. - Thuc tnh u tin. - Thuc tnh dnh ring trc. - Thuc tnh n hi. Tham s lu lng v thuc tnh hot ng Hai thuc tnh ny c nhm cng nhau bi v mi quan h ng ca chng. Chng tng t nh iu khin tham s s dng (UPC) ca ATM. C MPLS TE v ATM UPC u chim ly FEC ca lu lng, lu lng iu khin v gim st, v kim tra gi tr ca lu lng i vo mng ti node li vo. ATM UPC lu gi ton b mng v to nn s chc chn ch cc gi tr VPI v VCI c i vo mng. i vi MPLS, hot ng tng ng ny i hi vic gim st cc FEC v lin kt cc nhn. Mt vi c im khc cn thit i vi cc thuc tnh ny: - Kh nng pht hin t chi lu lng. - Kh nng vi cc tham s thay i c kim tra. - Mt p ng nhanh chng ti cc ngi dng ang vi phm tho thun ca h. - Gi cc hot ng ca ngi dng t chi trong sut ti ngi dng t chi. Thut ton tc gi v gi chung (GC/PRA) Nhiu hot ng dng thut ton tc gi chung ATM cho hot ng hp ng thc hin. Hnh 6.5 ch ra 2 thut ton kh thi i vi GC/PRA c thc hin nh mt thut ton thi gian o hoc thut ton leaky bucket trng thi tip din. Hai thut ton phc v cng mc ch : to ra s chc chn cc t bo lm theo (n

n tt nghip i hc

Chng 2 . Chuyn mch nhn

trong gii hn thi gian n mong i) hoc khng lm theo (n sm hn gii hn thi gian n mong i). Thut ton ng dng cho cc t bo, cc gi, cc khung cc khi d liu giao thc ring bit. Hai nh ngha cn gii thch l: u tin, thi gian ti l thuyt (TAT) l thi gian ti danh ngha ca t bo t ngun, gi s ngun gi cc t bo vi khong cch ngang nhau. Th hai, tham s k l t bo th k trong mt dng t bo trn cng kt ni knh o. Thut ton thi gian o
TA ) (k Ta T< ?

T bo n ti thi im Ta(k)

yes

no TAT=Ta(k) yes
L T k)+ TA Ta( > ?

no

T bo khng hp l

TAT=TAT+I T bo hp l

Thut ton go r trng thi tip din

T bo n ti thi im Ta(k)

X=X-Ta(k)-LCT

no yes

no X=X+I ; LCT=Ta(k) T bo hp l

T bo khnng hp l

> X

< X

yes

X=0

n tt nghip i hc

Chng 2 . Chuyn mch nhn

Hnh 6.5 Thut ton tc t bo chung (GCRA) a ra hai nh ngha ny, thut ton thi gian o hot ng nh sau: - Sau khi, t bo u tin Ta(1) n, TAT khi to thi gian hin thi. - Sau , nu thi gian n ca t bo th k (Ta(k)) l tr hn gi tr hin ti ca TAT, (trong lu thut ton l TAT < Ta(k)) th t bo l ph hp v TAT c cp nht Ta(k), cng thm s gia I. - Nu thi gian n ca t bo th k (Ta(k)) l nh hn TAT v ln hn hoc bng TAT L (trong lu thut ton l TAT > Ta(k) + L) th t bo cng ph hp v TAT c cng thm s gia I. - T bo khng ph hp nu thi gian n ca t bo th k l nh hn TAT L, trong trng hp ny TAT khng thay i. Thut ton tip theo l thut ton go r (leaky bucket) c xem nh mt ci go c dung tch hn ch m b chy ra ngoi lin tc vi tc l mt n v dung tch trn mt n v thi gian. Dung tch ca n c tng ln bi vic cng thm s gia I i vi mi t bo hp l. trng thi bnh thng, nu t bo n, dung lng ca go l nh hn hoc bng gii hn L th t bo l hp l. Cn vi cc trng hp cn li n khng hp l. Dung tch gi l L + I (vt qua gii hn b m). Thut ton go r hot ng nh sau: - Khi t bo u tin Ta(1) n, dung tch ca go X c lp l 0 v thi gian hp l cui cng l Ta(1). - Ti thi im t bo th k (Ta(k)) n, dung tch go c cp nht l X. Vi s cp nht ny, sau khi t bo hp l cui cng n, X bng dung tch go X tr i dung tch go b chy ra t khi t bo hp l cui cng n. Trong lu thut ton l: X=X-Ta(k)-LCT. - Dung tch ca go khng c php t chi khi X=0. Trong lu thut ton l X<0.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

- Nu X nh hn hoc bng gi tr gii hn L th t bo l hp l v dung tch go X c thit lp l X+I cho t bo hin thi v LCT c thit lp ti thi gian hin ti l Ta(k). - Nu X ln hn L th t bo l khng hp l v gi tr ca X v LCT khng thay i. Thuc tnh qun l v la chn tuyn chung Thuc tnh ny lin quan ti s la chn tuyn c mang bi trung k lu lng v quy tc lu tr cc tuyn c thit lp. Cc tuyn ny c ly t giao thc nh tuyn quy c, nh OSPF v BGP. i vi mng MPLS, mt quy tc u tin tuyn c lin kt vi mt tuyn ch r qun l v c thit lp nh s bt buc hoc khng bt buc. Thuc tnh quan h lp ti nguyn lin kt vi mt trung k lu lng c th c dng ch r lp ca ti nguyn m hin bao gm hoc khng cha tuyn ca trung k lu lng. Cc thuc tnh hot ng ny c th c dng bt buc thm cc tuyn i ngang c a ra bi trung k lu lng. Tham s lp ti nguyn nhn dng lp ti nguyn m mt mi quan h c nh ngha vi s ch ti trung k lu lng. Tham s quan h ch nh mi quan h, l liu cc thnh vin ca lp ti nguyn c cha hay khng cha tuyn trung k lu lng. Tham s quan h c th l mt bin nh phn mang mt trong hai gi tr sau: bao hm hin v loi tr hin. Thuc tnh p ng l mt phn ca tham s lu tr tuyn lin kt vi cc trung k lu lng. Thuc tnh p ng lin kt vi mt trung k lu lng ch ra xem liu trung k c l mc tiu tin tng li. Thuc tnh p ng l mt bin nh phn mang mt trong hai gi tr : cho php tin tng v khng th tin tng. Thuc tnh u tin Thuc tnh ny c dng nh ngha mi quan h quan trng ca trung k lu lng v kh quan trng nu nh tuyn c s cng p c dng trong mng. Thuc tnh u tin trc Thuc tnh u tin trc quyt nh liu mt trung k lu lng c th c u tin trc mt trung k lu lng khc t mt tuyn c a ra v liu mt trung k khc c th dnh trc mt trung k lu lng hay khng. S dnh trc c dng

n tt nghip i hc

Chng 2 . Chuyn mch nhn

cho c hai mc ch hot ng hng lu lng v hng ti nguyn. S u tin trc m bo rng trung k lu lng u tin cao c th c nh tuyn thng qua cc tuyn c li trong mi trng cc dch v khc nhau. S u tin trc cng c th c dng thc hin cc chnh sch phc hi u tin khc nhau sau cc li. Cc khi nim MPLS kh ging SS7 v kha cnh cc quy tc la chn lin bo hiu. Vi MPLS, thuc tnh u tin trc c th c dng ch r 4 kiu u tin i vi mt trung k lu lng : (1) u tin trc cho php, (2) khng u tin trc, (3) c kh nng u tin trc, (4) khng c kh nng u tin trc. Mt trung k lu lng cho php u tin trc c th u tin trc cc trung k lu lng u tin thp c ch nh nh c kh nng u tin. Mt lu lng ch ra khi khng c kh nng u tin trc th khng th c u tin bi bt c trung k khc bt cht cc u tin quan h. Mt trung k lu lng ch nh khi c kh nng u tin c th c u tin bi cc trung k u tin cao hn m c kh nng u tin. Mt vi kiu u tin l loi tr nhau. Dng k thut nh s miu t iu trn, s kt hp phng thc u tin kh thi vi mt trung k lu lng c a ra nh sau: (1,3), (1,4), (2,3), (2,4). S kt hp (2,4) tr thnh mc nh. Mt trung k lu lng, gi l A c th u tin mt trung k u tin khc gi l B, ch khi c 5 iu kin sau c tho mn:
1. A c u tin cao hn B 2. A tranh ginh mt ti nguyn c dng bi B 3. Ti nguyn ny khng th ho hp A v B da trn tiu chun quyt nh

chc chn.
4. A l u tin cho php. 5. B c kh nng u tin

Thuc tnh n hi Thuc tnh n hi quyt nh hot ng ca mt trung k lu lng di cc tnh trng li. l, khi xy ra mt li dc theo tuyn m trung k lu lng i qua. C s ca cc vn ny l cn ch nh cc tnh hung ging nh l: (1) pht hin li, (2) khai bo li, (3) khi phc v sa cha dch v.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

KT LUN
Qua cc chng trnh by ca n, em thu c mt s kin thc v lnh vc nghin cu ca mnh nh sau: 1. Cng ngh IP truyn thng khng th p ng c cc yu cu ngy cng cao v cht lng, dch v ca mng th h sau NGN. C rt nhiu cng ngh c s dng cho mng NGN nhng ch c MPLS l cng ngh ph hp nht hin nay. 2. Khi nim ca chuyn mch nhn, qu trnh pht trin ca MPLS v cc u im ca chuyn mch nhn so vi cc cng ngh khc. 3. Cc khi nim c bn v cc thnh phn trong chuyn mch nhn v hot ng ca chng. S phn chia cc hot ng chuyn mch v chuyn tip trong mng chuyn mch nhn cng nh hot ng ca tng lp trong m hnh phn chia. 4. Hot ng phn b nhn ca chuyn mch nhn, khun dng ca cc bn tin v c ch hot ng ca chng. 5. c bit l cc k thut lu lng c s dng trong chuyn mch nhn vi cc thnh phn s dng trong nh phn cng (l cc trung k lu lng) v phn mm (l thut ton nh thi hay go r). Hin nay, MPLS c trin khai trong thit b chuyn mch li hiQ 9200 ca chuyn mch mm Siemen do VTN qun l. Vic nghin cu ti ny gip em hiu su hn v MPLS, to in cho cng vic ca em trong tng lai sau khi ra trng.

n tt nghip i hc

Chng 2 . Chuyn mch nhn

TI LIU THAM KHO


Ting Vit
1. Nguyn Qu Minh Hin (2002), Mng th h sau NGN, Nh xut bn Bu

in H Ni.
2. TS Phng Vn Vn, KS. Mnh Quyt (2003), Cng ngh chuyn mch

nhn a giao thc MPLS, Nh xut bn Bu in H Ni.

Ting Anh
1. Uyless (2002), MPLS and Label Switching Networks, Prentice Hall PTR,

Upper Saddle River, New Jersey


2. Antti Kankkunen (2000), MPLS and Next Generation Access Networks,

Integral Access Inc.