You are on page 1of 63

I HC QUC GIA THNH PH H CH MINH TRNG I HC KHOA HC T NHIN

BO CO TI MN HC: MNG VIN THNG

ti : CORE NETWORK GV hng dn : ThS Ng c Thun

TP H Ch Minh ngy 12 thng 05 nm 2011 MC LC Chng I : Router I. Router bin: 2. Chc nng II. Cc giao thc nh tuyn cho Router bin 1. Giao thc nh tuyn OSPF 2. Giao thc nh tuyn BGP III. Cc dch v i km vi Router bin 1. DNS a. nh ngha 11 7 9 5 1. nh ngha ....................................................................................... 6 6

b. Hot ng c. Cu trc gi tin DNS 2. DHCP a. nh ngha b. Hot ng c. Cu trc ca DHCP Message 3. NAT a. nh ngha b. Chc nng c. Hot ng 4. VPN a. nh ngha b. Phn loi 5. Firewall a. Firewall trn Router b. ACL c. Phn loi d. Nhng ch khi p dng ACLs e. Hn ch ca ACLs. 6. Chuyn i gia IPv4 v IPv6 20 a. u im ca IPv6 ...................................................................... 24 b. C ch chuyn i ..................................................................... 24 Chng II: SWITCH I. II. Gii thiu tng quan v SW................................................................ 27 Vai tr ca SW ..................................................................................... 29 1. lp Access 2. lp Distribuiton 17 16 14 13

3. lp Core III. IV. c tnh ca SW c bn ...................................................................... 32 Hot ng ca SW ............................................................................... 35 1. Chc nng ca SW 2. Cch hc a ch ca SW 3. Qu trnh chuyn mch ca SW 4. tr mng V. Cc giao thc v c ch h tr SW .................................................... 36 1. STP 2. Chia VLAN 3. VTP 4. Inter VLAN 5. Layer 3 Forwading. Chng 3 : MPLS I. Khi qut MPLS .................................................................................. 35 1. MPLS l g 2. Chc nng ca MPLS 3. Li ch ca MPLS II. Cc thnh phn trong MPLS ............................................................. 36 1. Cc thnh phn trong MPLS 2. Cc khi nim trong MPLS 3. Phn chc nng chuyn gi tin 4. Phn chc nng iu khin ca MPLS III. ng dng c bn ca MPLS .............................................................. 42 1. nh tuyn phn cp 2. ng dng MPLS trn nn ATM

3. K thut lu lng trong MPLS 4. Mng ring o VPN IV. MPLS ti Vit Nam ............................................................................. 45

I. Router bin: 1. nh ngha: Router bin (Edge Router) l cc router nm bin mng ca nh cung cp dch v ISP (Internet Service Provider). l cc router nm vng bin gii, kt ni gia mng ni b (LAN) vi mng din rng (WAN), nhm la chn ng lu thng tt nht cho vic gi v nhn cc gi tin. V d: nhng con router kt ni vi mng khch hng. Cn router li (Core router) l cc router nm bn trong ca mng ISP, vic chia subnet cho cc router khng ph thuc vo cc router u m ph thuc vo cch quy hoch mng. 2. Chc nng: - Router c chc nng tm ng i tt nht trong mng v forward gi tin. Tuy nhin ty loi router m chc nng ny s khc nhau. i vi core router th vic tm ng i v forward gi tin ny c din ra ni b bn trong ca mng LAN. Cn edge router th c mt s tng phn vi Core router, vic lin lc ny c din ra gia cc mng vi nhau.

- C nhiu loi router bin vi nhiu chc nng khc nhau. V d: mt LER(Lable Edge Router) s dng mng MPLS lm nhim v kim tra vic ng nhn ca cc gi tin khi i ti. Nu n pht hin khng c nhn th n s lm nhim v ng nhn cho gi tin . Cn nu c nhn th n s tra cu trong bng cha thng tin nhn dng forward cc gi tin(LFIB) v thc hin thay th nhn hay gn thm nhn ri chuyn ti next hop tip theo. Khi gi tin ra khi mng MPLS th router bin s tho ht nhn ra v

thc hin routing bnh thng. Cn cc router li th ch c nhim v thay th nhn v chuyn mch. II. Cc giao thc nh tuyn cho router bin: C nhiu giao thc c dng nh tuyn cho router bin. Tuy nhin y ta ch xt 2 giao thc tiu biu nht, l OSPF v BGP. 1. Giao thc nh tuyn OSPF: a. nh ngha: Giao thc OSPF l mt giao thc c trng cho kiu Interior Gateway Protocol (IGP), hot ng theo kiu trng thi lin kt (link state protocol). Bt u c xy dng vo nm 1988 v hon thnh vo nm 1991. N s dng thut ton tm ra tuyn ng i ngn nht m t c th cc tuyn

ng nn chn n c ch.OSPF c nhiu tnh nng m cc giao thc distance vector khng c. Vic h tr cc tnh nng ny khin cho OSPF tr thnh mt giao thc nh tuyn kh phc tp nhng c s dng rng ri trong cc mi trng mng ln. Trong thc t, RFC 1812 (a ra cc yu cu cho b nh tuyn IPv4) - xc nh OSPF l giao thc nh tuyn ng duy nht cn thit phc v cho cc mng ln hin nay. b. Tnh cht: y chnh l mt s tnh nng tiu biu to nn thnh cng ca giao thc ny: - Cn bng ti gia cc tuyn cng cost (load balancing): Vic s dng cng lc nhiu tuyn cho php tn dng c hiu qu ti nguyn bng thng trn mng. - Phn chia mng mt cch logic: iu ny lm gim bt cc thng tin pht ra trong nhng iu kin bt li. N cng gip kt hp cc thng bo v nh tuyn, hn ch vic pht i nhng thng tin khng cn thit v mng. - H tr chng thc (authentication): OSPF h tr chng thc cho tt c cc node pht thng tin qung co nh tuyn. iu ny hn ch c nguy c thay i bng nh tuyn vi mc ch xu. - Thi gian hi t (convergence) nhanh hn cc giao thc khc: OSPF cho php truyn cc thng tin v thay i cc ng paths mt cch tc th. iu gip rt ngn thi gian hi t cn thit cp nht thng tin cu hnh mng. - H tr CIDR v VLSM: iu ny cho php nh qun tr mng c th phn phi ngun a ch IP mt cch c hiu qu hn. c. Cch thc hot ng ca OSPF:

- Trc khi router tin hnh truyn thng tin cho cc devides khc trong mng, n s xc nh cc neighbors ang c kt ni trc tip vi n bng cch gi gi tin Hello packets ra tt c cc interfaces ca n. Trong gi Hello packet c cha thng tin OSPF Router ID ca router gi. - Router ID: n gin l IP address. Router ID c s dng da theo th t sau: + S dng IP address t cu lnh router-id. + Nu router khng c cu hnh cu lnh router-id th n s ly a ch IP cao nht ca cc loopback interfaces(dng loopback interface c thun li l n khng bao gi ri vo trng thi down c). + Nu khng c loopback interfaces no c cu hnh, router s ly a ch IP cao nht ca cc interfaces vt l. - Sau khi nhn c thng tin phn hi t cc gi Hello packets m cc router neighbors gi v, router s tin hnh phn chia cc neighbors. Qu trnh ny c xc nh da vo thng s cost trong mng. Cch tnh cost ca OSPF: cost = 108/bps. - Da vo cost m router s tnh ton c ng i tt nht trong mng. - La chn Designated Router (DR) v Backup Designated Router (BDR) + DR s update cho tt c cc router khc trong mng khi c s thay i xut hin trong mng multi access. + BDR cng hot ng ging nh DR nhng khi DR b ngng hot ng. - Qu trnh la chn DR v BDR: Router c s interface priority cao nht c chn lm DR. Router c s interface priority cao th hai c chn lm BDR. Trong trng hp s

interface priority bng nhau, th vic la chn s da vo Router ID (RID). - Cc thng s v thi gian: - Hello interval: xc nh chu k gi cc gi hello packets. i vi multiaccess segments hay point- to point segments th l 10s. i vi nonbroadcast multi-access segments(NBMA) nh l Frame Relay, X.25 hay ATM th l 30s. - Dead interval: l khong thi gian m router ch gi hello packet phn hi t cc neighbors trc khi a n v trng thi down. Mc nh thi gian ny s gp 4ln thi gian hello interval : i vi multi-access segments hay point to point segmets l 40s, i vi non-broadcast multi-access segments l 120s. - Ch : Nu dead interval kt thc m router cha nhn c gi hello packet phn hi th giao thc OSPF s loi b router neighbor ra khi link-state database v s gi thng bo v trng thi down ca router ny cho cc neighbors khc trong mng. - Vn chng thc (authentication): cng ging nh cc giao thc khc, OSPF cng c h tr chng thc. Authentication m bo rng router s nhn c cc routing information t cc router khc c cu hnh cng password hoc authentication information. 2. Giao thc nh tuyn BGP: a. nh ngha:

- BGP l giao thc c trng cho kiu Exterior Gateway Protocol (EGP), l giao thc kt ni cc mng rt ln hoc cc Autonomuos System (AS). y l mt giao thc kh phc tp c dng nhiu trn Internet v cc cng ty a quc gia. Mc ch ca giao thc ngoi BGP khng ch l tm ra ng i trong mng m cn cho php ngi qun tr tm ra cc AS ca cc mng. - Autonomous-System (AS) l mt nhm cc router cng chia s mt chnh sch hay hot ng trong cng mt min nht nh. Mi AS c nh danh bi mt s( loi Public t 1-64511, loi Privite t 6451265535)v c cung cp bi mt nh cung cp AS hoc bi ISP. b. Mt s thuc tnh c bn ca BGP: - AS- Path:l thuc tnh quan trng trong vic xc nh ng i ti u(AS-Path cng ngn th cng c router u tin) v ngn nga loop. - Thuc tnh Origin-attribute: l thuc tnh xc nh ngun gc cc routing thng tin cp nht nh tuyn (i: IGP, e: EGP). - Thuc tnh Next hop attribute:l a ch ca router bn ngoi vng t tr AS qung b vo bn trong AS. - Thuc tnh Local Preference: c din t bng mt con s v c so snh tm ng i n ch khi ra khi mt AS (Local Preference cao s c chn). - Thuc tnh Weight: Router s u tin dng cu route c gi tr Weight cao hn. - Thuc tnh Multi-Exit-Disc(MED): l mt thuc tnh c AS dng tham chiu trong vic chn router no n cng mt ch trong mt AS.

- Thuc tnh Community attribute: cung cp cc chnh sch cho mt nhm cc router i qua mt AS. L thuc tnh khng bt buc. c. Hot ng ca BGP: - BGP l giao thc nh tuyn dng Path-vector nn vic la chn ng i tt nht thng thng da trn mt tp hp cc thuc tnh c gi l Attribute. Do s dng metric kh phc tp, BGP c xem l mt trong nhng giao thc phc tp. - Nhim v ca BGP l m bo thng tin lin lc gia cc AS, trao i thng tin nh tuyn v cung cp thng tin v trm cui cho mi ch n. - Trong giai on u ca phin thit lp quan h BGP, ton b cc thng tin routing-update s c gi. Sau , BGP s chuyn sang c ch dng trigger-update. Bt k mt thay i no trong h thng mng cng s l nguyn nhn gi trigger-update. - So snh gia OSPF v BGP: OSPF - L giao thc kiu IGP, dng link state. - Qung b thng tin hin c n cc lng ging. - Chng loop km. BGP - L giao thc kiu EGP, dng path vector. - Qung b thng tin n danh sch ton b ng dn dn ch. - C kh nng pht hin loop v loi b ngay lp tc. - Cn bng ti. - Gi tin i t ngun n ch m khng quan tm n policy III. Cc dch v i km vi router bin: - Khng cn bng ti. - H tr chnh sch nh tuyn (policy). - Khng bit c topology mng - Bit c topology ca mng.

1. DNS (Domain Name System): a. nh ngha: - DNS l h thng tn min c pht minh vo nm 1984 cho Internet, l h thng cho php thit lp tng ng gia a ch IP vi tn min. - Ta c th hiu n gin l DNS ging nh mt Danh b in thoi, mi mt tn tng ng vi mt s in thoi v ngc li. V d: tn min www.cisco.com c a ch IP tng ng l 198.133.219.25 b. Cch thc hot ng: - DNS phn gii cc tn min thnh cc a ch IP tng ng gip to s d dng, thun li cho ngi truy cp mng. - DNS s dng mt h thng phn tng gm cc DNS Server to c s d liu cho vic phn gii cc tn min thnh cc a ch IP. - DNS c kh nng yu cu cc DNS Server khc h tr trong vic phn gii tn min thnh a ch IP. DNS Server c kh nng ghi nh li nhng tn min va phn gii dng cho nhng yu cu phn gii ln sau. S lng nhng tn min phn gii c lu li ty thuc vo quy m ca tng DNS.

V d: mi mt website c mt tn v mt a ch IP ring. Khi m mt trnh duyt web ln v truy nhp tn website, trnh duyt web s gi yu cu ln DNS Server xin a ch IP tng ng vi tn min . Khi DNS Server s dch tn min ra a ch IP tng ng v gi v cho trnh duyt web. Trnh duyt web s dng a ch IP mi nhn c ny truy cp n website cn vo. Cc DNS Server h tr ln nhau dch a ch Ip thnh tn min v ngc li. c. Cu trc ca gi tin DNS: Mt gi tin DNS c dng: ID QR Opcode AA TC RD RA Z Rcode

QDcount ANcount NScount ARcount - ID (16 bits): cha m nhn dng. M ny c to ra bi mt chng trnh thay cho truy vn. Gi tin hi p s da vo m nhn dng ny hi p li. Chnh v vy m truy vn v hi p c th ph hp vi nhau. - QR(1 bit): c gi tr l 0 truy vn; 1 hi p. - Opcode(4 bits): c thit lp l 0 c hiu truy vn; 1 truy vn ngc; 2 tnh trng truy vn. - AA(1bit):nu gi tin l hi p, n s i n mt server c thm quyn gii quyt truy vn. - TC(1bit):cho bit gi tin c b ct khc do kch thc vt qu bng thng cho php hay khng.

- RD(1bit): cho bit truy vn mun server tip tc truy vn mt cch quy. - RA(1bit):cho bit truy vn quy c c thc thi trn router hay khng. - Z(1bit):l trng d tr, v c thit lp l 0. - Rcode(4bits): gi tin hi p c th nhn cc gi tr sau: + 0: khng c li trong qu trnh truy vn. + 1: nh dng gi tin b li, server khng hiu c truy vn. + 2: Server b trc trc, khng thc hin hi p c. + 3: Tn b li. Ch c Server c thm quyn mi c th thit lp gi tr ny. + 4: khng thi hnh, Server khng th thc hin chc nng ny. + 5: Server t chi thc thi truy vn. - QDcount:s ln truy vn ca gi tin trong mt vn . - ANcount: s lng ti nguyn tham gia trong phn tr li. - NScount: s lng ti nguyn c ghi li trong cc phn c thm quyn ca gi tin. - ARcount: s lng ti nguyn ghi li trong phn thm vo ca gi tin. 2. HCP(Dynamic Host Configuration Protocol): a. nh ngha: Giao thc cu hnh ng my ch - DHCP l mt giao thc cu hnh t ng a ch IP. My tnh c cu hnh mt cch t ng v th s gim vic can thip vo h thng mng. N cung cp mt database trung tm theo di tt c cc my tnh trong h thng mng. Mc ch l trnh trng hp hai my tnh khc nhau li c cng a ch IP. Nu khng c DHCP, cc my c th cu hnh IP bng tay, nhng s mt nhiu thi D

gian. Ngoi vic cung cp a ch IP, DHCP cn cung cp thng tin cu hnh khc, nh DNS.

b. Hot ng: - u tin, DHCP Client s gi broadcast gi tin DHCP Discover cha Mac Address v tn my tnh cho n khi nhn c tr li t DHCP Server. - Mt DHCP Server s tr li bng cch gi unicast gi tin DHCP Offer cha cc thng tin v a ch IP, subnet mask, default getway, DNS Server,DHCP Client c th nhn c nhiu DHCP Offer nu nh c nhiu DHCP Server cng tr li. - DHCP Client gi broadcast gi tin DHCP Request xc nh n chn a ch IP v DHCP Server no. - Cui cng, DHCP Server s gi unicast gi tin DHCP Acknowledge cho DHCP Client xc nhn ton b qu trnh.

c. Cu trc ca DHCP Message:

3. NAT(Network Address Translation): a. nh ngha: NAT l mt k thut chuyn i gia private address v public address gii quyt vn IP shortage cng nh gip cc my tnh trong mt mng

LAN c th truy cp Internet bng a ch IP ca ISP. b. Chc nng: - NAT cho php chia s kt ni internet cho nhiu my bn trong mng LAN vi mt a ch IP ca mng WAN.

- NAT c th lm vic nh mt Firewall. - NAT rt linh hot v s dng d dng trong vic qun l. Nh cc u im trn m NAT gip cho cc home user v cc doanh nghip nh c th to kt ni vi Internet mt cch d dng v hiu qu cng nh tit kim vn u t. c. Hot ng: - Static NAT: Static NAT c thit k nh x mt a ch IP ny sang mt a ch khc, thng thng l t mt a ch ni b sang mt a ch cng cng v qu trnh ny c ci t th cng, ngha l a ch nh x v a ch c nh x c ch nh r rng tng ng duy nht. Cc a ch ny c cha trong bng NAT Table. + Static NAT rt hu ch trong trng hp nhng host cn phi c a ch c nh truy cp t Internet. Nhng host ny c th l nhng public server: mail server, web server, - Dynamic NAT: khc vi Static NAT, i vi Dynamic NAT, cc a ch IP c thay i lin tc mi ln host to kt ni ra ngoi. Khi , NAT s lu li thng tin IP ca host ny trong NAT Table v khi host ny khng kt ni na th a ch IP ny s c s dng cp pht cho mt host khc c nhu cu kt ni ra ngoi. V vy, u im ca Dynamic NAT l tt c cc host u c kh nng kt ni ra ngoi, cn Static NAT th ch c nhng host c mapping mi c th kt ni ra ngoi. PAT (Port Address Translation): - PAT cung cp chc nng ging nh NAT nhng PAT cho php nhiu host c th kt ni Internet cng mt lc bng cch ch dng mt a ch IP public address (cho php gn ti 65536 hosts cho mt public address). V vy, PAT c xem l NAT overload.

- PAT s track v chuyn i: Source IP address, Destination IP address v TCP/UDP Source port Number. Nh vy c th phn bit c gia cc gi tin ca cc host v nhiu host c th kt ni ra ngoi cng mt thi

im. 4. VPN dch v mng ring o(Virtual Private Network): a. nh ngha: - VPN l mt cng ngh xy dng mt mng ring s dng h thng mng cng cng (Internet) kt ni cc a im hoc ngi s dng t xa vi mt mng LAN tr s trung tm. VPN cho php cc my tnh truyn thng vi nhau thng qua mt mi trng chia s nh mng Internet nhng vn m bo c tnh ring t v bo mt d liu. V d nh nhu cu truy cp t xa mng ni b trao i d liu hay s dng cc ng dng ngy cng ph bin. Thay v dng kt ni vt l tht kh phc tp(ng dy thu bao s), da vo router, VPN to ra cc lin kt o c truyn qua Internet gia mng ring ca mt t chc vi a im hoc ngi s dng xa. - Trc y, truy cp t xa vo h thng mng, ngi ta thng s dng phng thc Remote Access quay s da trn mng in thoi, gy

mt thi gian v khng an ton. cung cp kt ni gia cc my tnh, cc gi thng tin c bao bc bng mt header c cha nhng thng tin nh tuyn, cho php d liu c th gi t my truyn qua mi trng mng chia s v n c my nhn, v d nh truyn trn cc ng truyn ng ring c gi l tunnel. m bo tnh ring t v bo mt, cc gi tin c m ha v ch c th gii m vi nhng kha thch hp, ngn nga trng hp b mt gi tin trn ng truyn. b. Phn loi: C 2 loi c s dng ph bin: VPN truy cp t xa (Remote- Access) - Cn c gi l mng Dial-up ring o (VPDN),l mt kt ni gia ngi dng n mng LAN, p ng nhu cu lin lc mng ring t rt nhiu a im xa. u im ca loi VPN ny l cho php cc kt ni an ton, c mt m. - V d: Mt cng ty mun thit lp mt VPN ln th cn phi lin h vi nh cung cp dch v doanh nghip (ESP). ESP ny to ra mt my ch truy cp mng NAS v cung cp cho nhng ngi s dng t xa (vn phng ti gia hay nhn vin di ng)mt phn mm client cho my tnh ca h. Sau , ngi s dng c th gi mt s min ph lin lc vi NAS v dng phn mm VPN client truy cp vo mng ring ca cng ty . VPN im ni im (Site to -Site): - L vic s dng mt m dnh ring cho nhiu ngi kt ni nhiu im c nh vi nhau thng qua mt mng cng cng nh Internet. Loi ny c th da trn Intranet(VPN ni b) hay Extranet (VPN m rng).

+ Intranet: v d nh cng ty c mt vi a im t xa mun tham gia vo mt mng ring duy nht, h c th to ra mt VPN ni b (Intranet) ni LAN vi LAN. + Extranet: v d cng ty trn c mi quan h mt thit vi mt cng ty khc (i tc cung cp, khch hng,) h c th xy dng mt VPN m rng (Extranet) kt ni LAN vi LAN nhiu t chc khc nhau c th lm vic trn mt mi trng chung. - Router l thit b cung cp tnh nng truyn dn, bo mt c s dng trong VPN. Da vo h iu hnh Internet IOS ca mnh, Cisco pht trin loi router thch hp cho mi trng hp, t truy cp nh-vn phng cho n cc doanh nghip c quy m ln. 5. Bo mt : a. Firewall trn router: Firewall cho VPN: - Tng la l ro chn vng chc gia mng ring o VPN v Internet. Bn c th thit lp cc tng la hn ch s lng cng m, loi gi tin v giao thc c chuyn qua. Do cn ci t Firewall tht tt trc khi thit lp VPN. (Cisco c sn phm tng la PIX: trao i Internet ring Private Internet Exchange bao gm mt c ch dch a ch mng rt mnh, my ch proxy, b lc gi tin, cc tnh nng VPN v chn truy cp bt hp php).

- Mi my tnh s c mt mt m truy cp. Khi m ha d liu v gi n ti mt my tnh khc th ch c my mi gii m c. Mt m truy cp ny c chia lm 2 loi: Mt m ring (Symmetric-Key Encryption): mi my tnh u c mt m b mt m ha gi tin trc khi gi ti my tnh khc trong mng. Yu cu ca m ring l bn cn phi bit mnh ang lin h vi nhng my tnh no c th ci m ln , my tnh ca ngi nhn c th gii m c gi tin. Mt m chung (Public-Key Encryption): kt hp m ring vi m cng cng. M ring ny ch c my gi nhn bit, cn m chung th do my gi cp cho bt k my no mun lin h vi n(mt cch an ton). gii m mt message, my tnh phi dng m chung c my tnh ngun cung cp, ng thi cng cn n m ring ca n. Mt ng dng rt ph bin ca m chung ny l Pretty Good Privacy (PGP), cho php m ha hu nh bt c th g. Router lm firewall: - Cc router ca Cisco vi h iu hnh Cisco IOS c h tr chc nng lm Firewall (gi l IOS Firewall Feature Set). IOS firewall s h tr nhiu chc nng nh lc gi tin(IP Filter), Application Filter, stateful inspection, v chc nng proxy. Mt stateful Firewall khng ch kim tra cc thng tin TCP header, UDP, port, m n cn c kh nng nh cc chi tit, cc trng thi ca cc yu cu . Chc nng Stateful Firewall khng ch kim tra header m cn kim tra ni dung ca gi tin, ln n tn lp application. - V d, mi khi c mt kt ni TCP/UDP c thit lp, thng tin v trng thi kt ni c a vo bng stateful trong router. Khi h thng bn ngoi tr li li cc yu cu, Firewall s kim tra gi tin nhn c vi

bng trng thi lu gi xc nh gi tin c c php i vo mng hay khng. u im ca Firewall trn router so vi ACLs: - Hot ng trn c gi tin v trn kt ni. - C hiu sut cao hn cc chc nng thng thng nh ACL hay Authen proxy. - Lu tr thng tin cho mi phin giao dch trong mt bng. bng ny s gip xc nh mt gi tin c thuc v mt kt ni hp l hay l t mt ngun bt hp l. b. ACL (Access Control List): - ACL l mt danh sch cc cu lnh c p t vo cc cng ca router. Danh sch ny ch ra cho router bit loi packet no s c chp nhn(permit) v loi packet no s b hy b(deny). - Khi mt gi tin i vo mt interface ca router, n s ly thng tin trong phn header ca gi tin ra kim tra xem interface ny c c cu hnh ACL (inbound interface) hay khng. Nu c th gi tin s c kim tra i chiu vi nhng iu kin trong danh sch ca n. Nu gi tin b ngn chn(deny), n s b drop ngay lp tc. Cn nu gi tin c cho php, n s c kim tra trong bng routing table quyt nh chn interface no n ch. Tip , router s kim tra xem outbound interface c c cu hnh ACL hay khng. Nu khng th packet s c gi ti mng ch. Cn nu c ACL c cu hnh th n s kim tra i chiu vi nhng iu kin c trong danh sch ACL . Qu trnh lc cc packet ny c thc hin da vo cc a ch ngun, a ch ch ca gi tin hoc da vo ch s port tng ng vi cc giao thc ca cc lp trn. u im ca ACL:

- Tit kim bng thng v lm tng performance ca mng. - iu khin lu thng. - m bo tnh bo mt cho lp access network. - Cho php admin c th iu khin c s truy cp ca cc users. c. Phn loi: c 2 loi chnh: Standard ACLs: (access- list number t 1-99 v 1300-1999) - Da vo a ch IP ngun (source IP address) quyt nh permit hay deny gi tin, khng quan tm n a ch ch n cng nh cc ports. Extended ACLs : (access-list-number t 100-199 v 2000-2699) - Permit hay deny mt gi tin trong mt giao thc c th no . Lc cc gi tin da vo mt vi thuc tnh: - a ch ngun v ch, source or destination of TCP, UDP ports, port number hoc service. Ngoi ra cn c Dynamic ACLs (Lock and Key), Reflexive ACLs, Timebased ACLs. d. Nhng ch khi p dng ACLs: - V nhng cu lnh trong ACL c trnh by theo th t t trn xung di nn phi chc chn rng th t ny l ng. - Phi m bo permit/deny ng giao thc. - Phi kim tra vic p dng ACL c ng interface v ng hng vo-ra hay khng. e. Hn ch ca ACLs: - Khng chng c kiu tn cng IP Spoofing. Mt gi tin no c th i qua router m khng b ACL chn li. - Khng lc c cc gi tin b phn mnh (fragmented packet). - Mt vi dch v s dng port ng nn khng th b lc. 6. Chuyn i gia Ipv4 v Ipv6:

V sao li phi c s chuyn i ny? - Ipv4 vi 32bits a ch, c th h tr cho 4,3 t kt ni Internet sp cn kit, trong khi s a ch Ipv6 gp 296 ln con s 4,3 t ch ang pht trin. a. u im ca Ipv6: - Tng khng gian a ch ln 128 bits thay v 32bits nh Ipv4. - nh tuyn hiu qu hn: Ipv6 c thit k to ra c s nh tuyn phn cp hiu qu v c kh nng tp hp li. Do , cc bng nh tuyn trn cc router trn mng backbone s gn hn. - T ng cu hnh a ch: Ipv6 cn h tr thm kh nng cp a ch Ip t ng khi khng c DHCP Server bng cch s dng Ipv6 Prefix nhn c t router, hay nu trong mng khng c router th host cng s t ng cu hnh a ch link local lin lc vi cc host khc. - M rng d dng: IPv6 c phn header m rng nm ngay sau phn Ipv6 header cho php thm vo cc chc nng mi khi yu cu. - H tr di ng tt hn: Ipv6 c 4 tnh nng(home address, care-of address, binding, home agent) hon ton mi h tr cho thit b di ng( Ipv4 khng c). - Bo mt: Ipv6 h tr kh nng bo mt IPSec (tch hp bo mt vo trong kin trc vi 2 header: Authentication header (AH) v Encrypted Security Payload(ESP) c th s dng mt trong 2 hoc c 2 tng cng chc nng bo mt). b. C ch chuyn i:

- Dual IP layer: c ch ny m bo mt Host/router c ci t c hai giao thc Ipv4 v Ipv6 Internet layer trong m hnh phn lp

TCP/IP(Dual Stack).

- Ipv6 Tunneling over Ipv4 (cng ngh ng hm): c ch ny thc hin ng gi tin Ipv6 vo mt gi theo chun giao thc Ipv4 c th chuyn gi tin qua mng Ipv4 thun ty. Trong trng hp ny, mng xem nh l mt gi tin Ipv4 bnh thng. - Cng ngh ng hm l mt phng php s dng c s h tng sn c ca mng Ipv4 thc hin cc kt ni Ipv6 bng cch s dng cc thit b mng c kh nng hot ng dual-stack ti hai im u v cui nht

nh. Cc thit b ny bc gi tin Ipv6 trong gi tin Ipv4 v truyn ti i trong mng Ipv4 ti im u v g b gi tin Ipv4, nhn li gi tin Ipv6 ban u ti im ch cui ng truyn Ipv4.

I. GII THIU TNG QUAN V SWITCH

1.Gii thiu Switch layer 2 Switch l mt thit b Lp 2 c s dng tng bng thng v gim nghn mch. Switch c th phn on mng LAN thnh cc on mng siu nh. L mt

thit b lp 2 nn LAN switch c th phn nhiu min ng nhng tt c cc Host kt ni vo Switch vn nm trong cng mt min qung b. Switch layer 3 Switch layer 3 l 1 loi Switch layer 2 nhng c thm tnh nng route v routing (nh 1 Router) hay chng ta c mng tng n l 1 con router bnh thng nhng c tch hp thm nhiu port LAN. Switch layer 3 hot ng nhanh hn 1 router khi cng thc hin 1 cng vic ging nhau nh chuyn gi tin t ngun n ch. V routers phi chuyn gi tin ln lp 3 (network) xem a ch ch m gi tin n sau s xut ra ng port cho nn s mt nhiu thi gian v qu trnh x l gi tin hn so vi switch layer 3. Switch layer 3 ch chuyn gi tin u tin ln lp 3(network) xem a ch ch v cc gi tin cn li s c truyn i lp 2,c ch ny c thong qua giao thc cut-through. So vi router, switch layer 3 hot ng nhanh hn v vy thi gian tr thp. Switch layer 3 chuyn gi tin da vo a ch IP,v l hot ng lp 3 nn s ngn chn cc gi tin qung b, chn ng i tt nht cho gi d liu v xut ra cng tng ng, gip phn lung lu lng mng

II. Vai tr ca Switch :

Trong m hnh phn lp, switch c th hot ng c 3 lp Access, Distribution v Core. mi lp, switch thc hin cc chc nng khc nhau ty theo h thng mng:

1.

lp Access : Mng LAN Cung cp kt ni vo mng cho cc thit b cui nh Laptops, IP phones, PCs, Printers, Mng ca nh ISP Cung cp kt ni vo mng ca nh ISP cho cc thu bao, doanh nghip, cho php cc thit b trong mng ni b ca h kt ni vo mng WAN hay Internet. lp Distribution : Thc hin tp trung lu lng lp Access (link aggregation), gip trnh hin tng nt c chai. Kim sot lu lng vi cc chnh sch bo mt v nh tuyn.

2.

Forward cc gi tin nhn c da trn cc virtual circurt (Frame Relay, ATM,), cc ng chuyn mch knh v chuyn mch gi. nh ngha cc vng broadcast domains. nh tuyn gia cc VLAN. Cung cp cc ng kt ni d phng (s dng STP chng loop) 3. lp Core : Thc hin chuyn tip vi tc cao, n nh. III.c tnh ca Switch c bn CSMA/CD (Carrier Sense Multiple Access / Collision Detection)

Carrier Sense ( pht hin sng mang) Trong h thng truy cp CSMA/CD, tt c cc thit b lng nghe trn ng truyn Ethernet trc khi c php truyn tn hiu. Nu thit b Ethernet pht hin c thit b khc ang truyn d liu th n s i truyn. Khi khng pht hin giao thng trn ng truyn, thit b s truyn thng tin. Trong khi truyn tin, thit b tip tc lng nghe xem c xy ra va chm hoc ng trn mng LAN hay khng. Sau khi thng tin d liu c gi i, thit b gi tr li ch lng nghe cho ln truyn tin sau.

Collision Detection(pht hin ng ) Khi mt thit b ch lng nghe,n c th pht hin khi xy ra va chm ng trn ng truyn chia s. Khi xy ra ng , nhng thit b khc ch lng nghe, cn nhng thit b ang truyn d liu nhn bit c s gia tng tn hiu. Khi ng c pht hin, nhng thit b ang truyn thng tin s gi ra mt tn hiu tr hon. Tn hiu tr hon ny thng bo cho cc thit b khc bit rng ang c ng xy ra, v vy mi thit b s ch mt thi hn ngu nhin c ci t trn tng thit b. sau thi hn ny, cc thit b li tr v trng thi lng nghe. Khi kt ni mt thit b vo mt port ca Switch, Switch s to mt kt ni ring bit vi trn bng thng cho my . Kt ni ny l mt min ng ring. Switch xy dng bng chuyn mch bng cch hc a ch MAC ca cc host kt ni trn mi port ca Switch. Khi 2 host kt ni vo Switch mun lin lc vi nhau, Switch s tm trong bng chuyn mch ca n v thit lp kt ni o gia 2 port ca 2 host . Kt ni ny c duy tr cho n khi phin giao dch kt thc. Switch v min qung b. Minng : Min qung b:

Mc d Switch lc hu ht cc frames d liu thng qua a ch MAC nhng chng khng lc cc frame qung b. mt tp hp cc Switch nh vy c gi l mt broadcast

domain ( min qung b). Ch nhng thit b lp 3 nh mt router hoc 1 mng LAN o (VLAN) mi c th ngn chn min qung b v c min ng Switch l thit b lp 2. Khi Switch nhn 1 frame broadcast, n s chuyn tip gi frame ra mi port tr port n nhn vo. Mi thit b nhn c gi tin qung b nyu phi x l thng tin nm trong . iu ny lm gim hiu sut hot dng ca mng v tn bng thng, cc thit b phi nhn v x l chng. IV. Hot ng ca Switch 1. Chc nng ca Switch Switch tp trung cc kt ni v quytnh chn ng dn chuyn d liu hiu qu. Frame c chuyn mch t port nhn vo v n port pht ra. mi port l mt kt ni cung cp ton b bng thng cho host. chuyn frame hiu qu gia cc port, Switch xy dng mt bnga ch. Khi Switch nhn vo mt frame, n s ghi lia ch MAC ca my gi tngng vi port m n frame vo. cim chnh ca Ethernet Switch: - Tch bit giao thng trn tng segment. - Tng nhiu hn lng bng thng dnh ring cho miuser bng cch to minng nh hn. 2. Cch hc a ch ca Switch Switch l mt thit b thng minh v n quytnh chuyn frame theo a ch MAC. thc hiniu ny, Switch xy dng mt bnga ch. Khi Switch bt u c bt ln, Switch s gi mt gi tin qung b cho mi my trm trong segment kt ni vo n yu cu cc my nhn tr li. Khi cc my trm tr li thng ip qung b, Switch s ghi lia ch ca cc my vo bnga ch ca mnh. Qu trnh ny c gi l qu trnh hca ch. Switch hc a ch theo cch sau:

- ca ch MAC ngun trong mi frame nhn c. - Ghi li s port m Switch hc ca ch ca thit b kt ni vo port no ca Switch. - a ch hc c v s port tngng s c trong bnga ch. Switch s kim tra a chch nm trong frame nhn c ri d tma chch ny trong bnga ch tm port tngng. 3.Qu trnh chuyn mch ca Switch C 3 ch chuyn mch ca Switch: Fast-forward: Switch cc a ch ca Frame l btu chuyn frame i lun m khng cn ch nhn ton b ht frame. Nh vy, frame c chuyni trc khi nhn ht ton b frame. V vy, thi gian tr thp xung nhng kh nng pht hin li km. Store and forward: switch nhn ton b frame ri mi btu chuyn frame i. Switch ca ch ngun, a chch v thc hin lc b frame nu cn ri mi quytnh chuyn frame i. thi gian Switch nhn frame s gy ra thi gian tr ln nhng nh vy th Switch mi thi gian kim tra li ca frame nn kh nng pht hin li cao hn. Fragment-free: nhn ht 64 byte u tin ri mi chuyn frame i.

Fragment-free l 1 dng ci bin ca chuyn mch cut-through. Switch c th a ra cc quyt nh chuyn mch da vo : MAC Address, s DLCI (Frame Relay), VPI/VCI (ATM), nhn (MPLS), 4. tr mng : tr l khong thi gian m mt frame hoc mt gi tin di chuyn t my ngun n my ch. Nhng user truy cp mng s dng ccng dng h s cm nhn c tr ca mng khi h phi ch nhiu thi gian truy cp vo c s d liu c lu gi

ti mt trung tm d liu hoc khi mt trang web cn nhiu thi gian load chng trnh v. C 3 dng tr: u tin: tr l do thi gian cn thit mt NIC nguna nhng xung in vo ng dy v thi gian NIC ch chuyn i nhng xung . Khong thi gian ny gi l tr NIC. Thng thng khong 1 micro giy cho 1 NIC 10BASE-T. Th hai: tr do s lan truyn thc t ca tn hiu. Mt tn hiu cn c mt khong thi gian lan truyn trong cp. Thng thng, mt khong 0.556 micro giy/100 mt cho loi cp CAT 5 UTP. . Cp cng di th theo tc thc t dn truyn s c tr nhiu hn na. Th ba: tr l do mc thm nhiu thit b trn ng dn gia hai thit b. Ty theo tng thit b s c tr khc nhau. V. Cc giao thc v c ch h tr Switch : 1. Spanning Tree Protocol(STP): Cc switch lp Distribution v Core c vai tr quan trng trong h thng mng, yu cu phi lun available 24/24. Do , gia cc switch ny lun c cc ng d phng (Redundant) phng khi 1 ng kt ni b h th s c ng khc thay th. Khi c nhiu ng d phng d dn n hin tng loop v 1 s li khc km theo nh : Broadcast Storms, Duplicate Unicast Frames. Bng cch ch cho 1 ng kt ni trong trng thi forwarding cn cc ng d phng khc trng thi blocking (khng forward frames) v khi ng chnh b h th 1 trong s cc ng d phng s chuyn sang trng thi forwarding, STP ngn loop v cc li c lin quan khi s dng cc ng d phng. 2. Chia VLAN :

VLAN(hay virtual LAN) l mt k thut cho php to lp cc mng LAN c lp mt cch logic trn cng mt kin trc h tng vt l. Vic to lp nhiu mng LAN o trong cng mt mng cc b (gia cc khoa trong mt trng hc, gia cc cc trong mt cng ty,...) gip gim thiu vng qung b (broadcast domain) cng nh to thun li cho vic qun l mt mng cc b rng ln. 3. Vlan Trunking Protocol (VTP) : VTP cho php nh qun l mng cu hnh mt switch c th cu hnh cho cc switch khc trong mng. Switch c th c cu hnh trong vai tr ca mt VTP server hay mt VTP client. VTP ch hc v normal-range VLAN (VLAN IDs 1 to 1005). Extended-range VLANs (IDs ln hn 1005) th khng h tr VTP. 4. Inter VLAN : Gip cho vic giao tip gia cc VLAN khc nhau s dng cc ng trunk, cc chun ng gi nh 802.1q v ISL. 5. Layer 3 Forwarding Mt switch layer3 c kh nng rout transmissions gia VLANs. th tc ging nh giao tip inter-VLAN s dng mt router ring, ngoi tr SVIs hot ng nh router interfaces cho vic routing d liu gia cc VLAN

Cc c ch chuyn mch

Packet-switching and circuit-switching Packet-switching and circuit-switching s dng hai k thut khc nhau trong vic vn chuyn thng tin t ni ny n ni khc trong h thng mng. Circuit Switching

c im: Kt ni c dnh ring. Khng chia s bng thng. m bo cht lng kt ni. S dng hai k thut ghp knh : TDM v FDM

Hn ch: Khng ti u ha bng thng. Packet Switching

Thng tin c chia thnh t gi nh (packet) Chia s bng thng. C s tranh chp ti nguyn Tc nghn Store & Forward

Hn ch: Thi gian thc.

ATM & Frame Relay I. Gii thiu khi qut v ATM

1.1 Thc trng cc mng vin thng hin ti Tn ti mt cch ring l ( mng Telex, mng in thoi cng cng (POTS), mng truyn s liu) Ch truyn c cc dch v c lp tng ng tng mng. Thiu hiu qu trong vic bo dng, vn hnh cng nh s dng. Khng th chia s ti nguyn c trong cng mt mng khng th chia s cho cc mng khc cng s dng. 1.2 S ra i ca h thng vin thng mi B-ISDN

- ISDN l g ? ISDN (integrated Services Digital Network) l tp hp cc giao thc nhm kt hp mng in thoi s v dch v truyn d liu. ISDN cho php tt c cc thng tin thoi, data v video c th truyn qua mt ng dy thu bao (subscriber line) vi tc cao v cht lng tt.

- Mng B-ISDN (Broadband Integrated Services Digital Network) Xu hng ca cc dch v ngy nay v trong tng lai l cc yu cu dch v bng thng rng ang tng ln (HDTV, video conference). S cn thit phi t hp cc dch v ph thuc ln nhau chuyn mch knh v chuyn mch gi vo mt mng bng thng rng duy nht. Cn thit phi m bo tc truyn, cht lng dch v, kinh t Mng B-ISDN ra i nhm p ng cc iu kin trn m mng bng thng hp N.ISDN khng p ng c.

Qu trnh tin ti mng B-ISDN hin ti c th xem nh c 2 hng: T cc mng in thoati5 tin ti xay dng mng s a dch v tch hp ISDN ri tin ti B-ISDN. T cc mng Frame-Relay ri mng truyn dn khng ng b ATM lm nn tn cho B-ISDN. Hin nay, Vit Nam mi c mng truyn s liu chuyn mch gi theo tiu chun X.25 ang c khai thc. Mng truyn liu ny ch c th phc v cho cc nhu cu truyn s liu tc thp nhng n c tnh an ton cao, khc ph c nhng im yu ca mt mng truyn dn cht lng thp. Vi cng ngh truyn dn nh hin nay, vn nng cp cht lng cc ng truyn dn khng cn qu phc tp nh trc. V vy, chng ta c th chn hng pht trin l xy dng mng truyn s liu theo FrameRelay v tin ti xy dng mng ATM

II. Frame-Relay

1.1 Frame Relay l g ? Frame Relay l mt dch v truyn s liu mng din rng da trn cng ngh chuyn mch gi. y l mt tiu chun ca CCITT (consultative committee for international Telegraph and telephone) v ANSI (american national standard institude) nh ra qu trnh truyn d liu qua mng d liu cng cng. Frame Relay ph v cho khch hng c nhu cu kt ni cc mng din rng v s dng cc dch v vi tc kt ni cao m cc cng ngh c hn nh chuyn mch knh v chuyn mch gi khng th to ra.

1.2 c im Frame-Relay thc hin cc k thut chuyn mch lp 2 v n chia d liu thnh tng n v c kch thc khng c nh gi l Frame. Mt s chc nng tng ny cng c loi b nh cc tham s v ACK, NAK nhm lm gim tr mng.

Dng gi d liu Frame-Relay

Trong bi vit ny, chng ti khng trnh by li ton b cc tham s v cc thng tinn v cu trc chi tit ca gi tin kiu Frame-Relay m ch tp trung v cc tham s to ra s khc bit ca cng ngh ny gii quyt cc vn quan trng nht trong vic xy dng mng truyn s liu. l cc tham s lin quan n vic x l tc nghn v vic thit lp cc knh logic truyn s liu. Tham s lin quan n vic x l tc nghn chnh l: FECN v BECN (gii thch)

Vic thit lp cc knh logic Knh o c nh PVC (Permanent Virtual Circuit) Knh o chuyn mch (Switched Virtual Circuit) Knh o ni a im MVC (Multicast Virtual Circuit)

S dng khe Cng ngh thi gian c nh X.25 TDM Frame-Relay Kt lut Khng C Khng Ln Rt nh Nh Thp Cao Cao tr Thng lng

III.

ATM

1. ATM l g ? ATM ( Asynchronous Time Division) l phc thc truyn tin trong thng tin c chia thnh nhiu gi nh (t bo) c chiu di khng thay i gi l cc t bo tin. V sao ATM li chn phng thc truyn tin khng ng b ? V sao ATM s dng cc t bo c nh c di c nh ? u im: Mm do v ph hp vi cc dch v ca tng lai.

C hiu qu trong vic s dng ti nguyn. S dng mt mng duy nht cho tt c cc dch v

2. Cu trc phn lp trong mng ATM a. Cu trc t bo ATM

Header (5 bytes): thng tin cha trong Header gip cho vic tm ng ca cc ATM cell qua mng. Payload (48 bytes): cha data ca ngi s dng v cc tn hiu iu khin tng ng.

Phn Header ca ATM c 2 dng:

T bo truyn trn giao din UNI

Cc t bo truyn gia cc nt mng NNI c im cc trng trong cu trc t bo S hiu nhn dng knh o VCI( Virtual Channel Identifier) S hiu nhn dng ng o VPI (Virtual Path Identifier)

Gii thch

I.

Khi qut MPLS:

1. MPLS l g : MPLS l mt framework do IETF a ra , cung cp thit k hiu qu cho vic nh tuyn, chuyn tip, chuyn mch cho lung lu lng qua mch.

2. Chc nng ca MPLS : nh qu trnh qun l lu lng lung ca cc mng khc nhau, nh lung gia cc my, phn cng khc nhau hoc thm ch lung gia cc ng dng khc nhau. Duy tr s c lp ca giao thc lp 2 v lp 3. Cung cp cch thc nh x cc a ch IP thnh cc nhn n gin c di khng i c s dng bi cc cng ngh chuyn tip gi v chuyn mch gi khc nhau. Giao din chung i vi cc giao thc nh tuyn nh RSVP v OSFP. H tr IP, ATM, Frame Relay.

3. Li ch ca MPLS : MPLS mang li nhiu li ch nh : K thut lu lng : Cung cp cc kh nng thit lp ng truyn m lu lng s truyn qua mng v kh nng thit lp cht lng cho cc cp dch v (CoS) v cht lng dch v (QoS) khc nhau. MPLS l s pht trin ch yu trong cc cng ngh Internet m h tr vic b sung cc kh nng cn thit cho mng IP ngy nay. Cung cp IP da trn cc mng ring o : Bng vic s dng MPLS, cc nh cung cp dch v c th cung cp ng hm IP i qua mng ca h m khng cn thit m ho hay cc ng dng u cui-ngi s dng. Loi b cu hnh a lp : Thng thng, phn ln cc nh iu hnh mng cung cp m hnh chng ln m ATM c s dng ti lp 2 v IP c s dng ti lp 3. Bng vic s dng MPLS, cc nh iu hnh mng c th mang chc nng ca mt iu khin ATM vo lp 3, do s lm n gin ha mng v vic qun l mng.

Tuyn hin : Mt c im chnh ca MPLS l s h tr ca n i vi cc Cc ng chuyn mch nhn c nh tuyn sn hiu qu hn so vi tu chn tuyn ngun trong IP. Chng cng c th cung cp mt vi chc nng cn thit cho k thut lu lng. H tr a lin kt v a giao thc : Thnh phn chuyn tip chuyn mch nhn l khng xc nh vi mt lp mng c th. V d cng mt thnh phn chuyn tip cng c th c s dng khi ang thc hin chuyn mnh nhn vi IP cng nh IPX. Chuyn mch nhn cng c th hot ng o trn mi giao thc lin kt d liu thng qua ATM

I.

Cc thnh phn trong MPLS :

1. Cc thnh phn ca MPLS: hi qut phng thc hot ng ca MPLS router bin ca mng, khi gi tin i vo n c n nh vo mt FEC mt ln duy nht. FEC m gi tin c n nh m ho thnh nhn c di c nh. Nhn c gi theo gi tin khi gi tin i ti Hop tip theo, nh vy cc gi tin dn nhn trc khi chng c gi chuyn tip. Ti cc Hop pha sau, nhn c dng n xc nh Hop tip theo v nhn mi. Nhn c c thay th bng mt nhn mi v gi tin c gi ti Hop tip theo. Hop tip theo li dng nhn nhn c xc nh Hop tip theo v nhn mi cho gi tin n nhn c. C nh vy, gi tin ln lt c gi qua cc router trong mng. Tt c cng vic gi chuyn tip c iu khin bng cc nhn.

n router bin u ra, nhn c g b v gi tin s c nh tuyn i ra ngoi mng MPLS da vo cc thng tin v a ch IP ch c trong gi tin. MPLS l chuyn mch nhn a giao thc, a giao thc y c ngha l cc cng ngh ca n c th p dng trong bt c giao thc lp mng no nh IP, IPX 2. Cc khi nim c bn ca mng MPLS hn (Lable): Nhn l mt thc th c di ngn v c nh khng c cu trc bn trong. Nhn khng trc tip m ho thng tin ca mo u lp mng nh a ch mng. Nhn c gn vo mt gi tin c th s i din cho mt FEC (Forwarding Equivalence Classes) m gi tin c n nh. Thng th mt gi tin c n nh mt FEC (hon ton hoc mt phn) da trn a ch ch lp mng ca n. Tuy nhin nhn khng phi l m ho ca a ch . Nhn trong dng n gin nht xc nh ng i m gi tin c th truyn qua. Nhn c mang hay c ng gi trong tiu lp 2 cng vi gi tin. B nh tuyn kim tra cc gi tin qua ni dung nhn xc nh cc bc chuyn k tip. Khi gi tin c gn nhn, cc chng ng cn li ca gi tin thng qua mng ng trc da trn chuyn mch nhn. Gi tr nhn ch c ngha cc b ngha l chng ch lin quan n cc bc chuyn tip gia cc LSR. Dng ca nhn ph thuc vo phng thc truyn tin m gi tin c ng gi. Kiu khung (Frame mode): Kiu khung l thut ng khi chuyn tip mt gi nhn gn trc tiu lp ba. Mt nhn c m ho vi 20 bt, ngha l c th c 2 m 20 gi tr khc nhau. Mt gi c nhiu nhn gi l chng nhn (Lable stack). mi chng trong mng ch c mt nhn bn ngoi c xem xt. N

LABLE LABLE=20 bits

EXP

TTL

STACK

EXP (EXPERIMENTAL)=3 bits S (BOTTOM OF STACK)=1 bit Trong : EXP: dnh cho thc nghim. Khi cc gi tin xp hng c th dng cc bt S: l bt cui chng . Nhn cui chng bit ny c thit lp ln 1,cc nhn TTL: thi gian sng l bn sao ca IP TTL. Gi tr ca n c gim ti mi ny tng t nh cc bit IP u tin (IP Precedence) TTL (TIME TO LIVE)=8 bits

khc c gi tr bt ny l 0. chng trnh lp nh IP. Thng dng khi ngi iu hnh mng mun che du cu hnh mng bn di khi tm ng t mng bn ngoi. Kiu t bo (Cell mode): Thut ng ny dng khi c mt mng gm cc ATM LSR dng trong mt phng iu khin trao i thng tin VPI/VCI thay v dng bo hiu ATM. Trong kiu t bo, nhn l trng VPI/VCI ca t bo. Cc ATM LSR pha trong hot ng nh chuyn mch ATM-chng chuyn tip mt t bo da trn VPI/VCI vo v thng tin cng ra tng ng. Cui cng, router cng ra sp xp cc t bo thnh mt gi. Kiu khung PPP hoc Ethernet: gi tr nhn dng giao thc P-ID (hoc Ethernet type) c chn vo mo u khung tng ng thng bo khung l MPLS n hng hay a hng.

Gi tin IP

Tiu IP

D liu

Tiu Shim

Tiu IP

VPI/VCI

D liu

Hnh 1.1: Lp lin kt d liu l ATM

Gi tin IP

Tiu IP

D liu

Tiu Shim

Tiu IP

D liu

DLCI

D liu

Hnh 1.2: Lp lin kt d liu Frame-relay


Tiu PPP Tiu Shim Tiu lp 3

Tiu gi PPP trn SDH

Nhn

Tiu MAC LAN Tiu MAC Tiu Shim Tiu lp 3

Nhn trong Shim-gia lp 2 v lp 3

gn xp nhn (Lable stack):

L mt tp hp th t cc nhn gn theo gi chuyn ti thng tin v nhiu FEC v v cc LSP tng ng m gi i qua. Ngn xp nhn cho php MPLS h tr nh tuyn phn cp (mt nhn cho EGP v mt nhn cho IGP) v t chc a LSP trong mt trung k LSP. iu ny to iu kin thun li cho ch hot ng ng hm nh tuyn chuyn mch nhn ( LSR-Lable Switching Router ): L thit b chuyn mch hay thit b nh tuyn s dng trong mng MPLS chuyn cc gi tin bng th tc phn phi nhn. C mt s loi LSR nh LSR, LSR-ATM. p chuyn tip tng ng ( FEC-Forward Equivalence Class ): FEC l mt nhm cc gi, nhm cc gi ny chia s cng yu cu trong s chuyn tip chng qua mng. Tt c cc gi trong mt nhm nh vy c cung cp cng cch chn ng ti ch. Khc vi chuyn tip IP truyn thng, trong MPLS vic gn mt gi c th vo mt FEC c th ch c thc hin mt ln khi cc gi vo trong mng. MPLS khng ra quyt nh chuyn tip vi mi datagram lp 3 m s dng khi nim FEC. FEC ph thuc vo mt s cc yu t, t nht l ph thuc vo a ch IP v c th l ph thuc c vo kiu lu lng trong datagram (thoi, d liu, fax). Sau da trn FEC, nhn c tho thun gia cc LSR ln cn t li vo ti li ra trong mt vng nh tuyn. C s thng tin nhn ( LIB-Lable Information Base ): L B

L bng kt ni trong LSR c cha gi tr nhn/ FEC c gn vo cng ra cng nh thng tin v ng gi d liu truyn tin xc nh phng thc mt gi tin c chuyn tip. uyn chuyn mch nhn ( LSP-Lable Switching Path ): L tuyn to ra t u vo n u ra ca mng MPLS dng chuyn tip gi ca mt FEC no s dng c ch hon i nhn. Cc tuyn chuyn mch nhn cha mt chui cc nhn ti tt c cc nt dc theo tuyn t ngun ti ch. LSP c thit lp trc khi truyn d liu hoc trong khi xc nh lung d liu no . Cc nhn c phn phi bng cc giao thc nh LDP, RSVP. Mi gi d liu c ng gi li v mang cc nhn trong sut thi gian di chuyn t ngun ti ch. i tin dn nhn: Gi tin dn nhn l gi tin m nhn c m ha trong . Trong mt s trng hp, nhn nm trong mo u ca gi tin dnh ring cho mc ch dn nhn. Trong cc trng hp khc, nhn c th c t chung vo trong mo u lp mng v lp lin kt d liu min l y c th dng c cho mc ch dn nhn. n nh v phn phi nhn: Trong mng MPLS, quyt nh kt hp mt nhn L c th vi mt FEC F c th l do LSR pha trc thc hin. LSR pha trc sau khi kt hp s thng bo vi LSR pha sau v s kt hp . Do vy, cc nhn c LSR pha trc n nh v cc kt hp nhn c phn phi theo hng t LSR pha trc ti LSR pha sau. cu bo hiu C G T

Yu cu nhn: Mt LSR yu cu mt nhn t dng xung ln cn nn n c

th lin kt n FEC xc nh. C cu ny c th dng truyn n cc LSR tip theo cho n LER li ra. p ng nhn: p ng mt yu cu nhn, LSR lung xung s gi mt nhn n cc b khi ng lung ln s dng c cu nh x nhn.
p ng nhn V d nhn 5

Li vo LER

p ng nhn V d nhn 2

LSR

Yu cu nhn Cho ch C

B nh tuyn B

Yu cu nhn Cho ch C

B nh tuyn C

C cu bo hiu Phn chc nng chuyn gi tin: Vi nhim v gi gi tin gia cc b nh tuyn, 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. Hay ni cch khc k thut hon i nhn l victm chng k tip ca gi tin trong mt bng chuyn tip nhn, sau thay th gi tr nhn ca gi ri chuyn ra cng ra ca b nh tuyn. Vic ny n gin hn nhiu so vi vic x l gi tin thng thng v do vy ci tin kh nng ca thit b. Cc b nh tuyn s dng thit b ny gi l b nh tuyn chuyn mch nhn LSR. Phn chc nng iu khin ca MPLS: Bao gm cc giao thc nh tuyn lp mng vi nhim v phn phi thng tin nh tuyn gia cc LSR, v th tc gn

nhn chuyn thng tin nh tuyn thnh cc bng nh tuyn cho vic chuyn mch nhn. MPLS c th hot ng c vi cc giao thc nh tuyn Internet khc nh OSPF v BGP. 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. ng dng c bn ca MPLS

II.

1. NH TUYN PHN CP Kin trc nh tuyn c s dng trn Internet ngy nay l s tp trung cc min nh tuyn, khi nh tuyn trong tng khu vc th c cung cp bi cc giao thc nh tuyn trong min (EIGRP, RIP, OSPF ), khi nh tuyn qua nhiu min th dung giao thc nh tuyn a min(BGP).

Trong hnh trn, cc router bin s chy giao thc BGP vi cc router bin ca cc min khc, cn cc router bn trong s chy cc giao thc IGP nh tuyn tring

min. IBGP c tt c cc router s dng truyn cc thng tin nh tuyn bn ngoi vo bn trong min. Trong mt mng m c IGP v IBGP chy song song th vn khng nh hng g c. mt router c th bit c cch n c IBGP peer ca cc IBGP , n phi da vo IGP. nh tuyn phn cp l chia nh tuyn thnh 2 thnh phn trong min v a min. Vic ny c thun li l: Tch bit nh tuyn Inter-domain v Intra-domain: Ci tin s n nh do do gim s lng thng tin nh tuyn cho cc router. Gim kch thc bng ca Interior Router: Ch nhng nh tuyn IGP c lu tr ti cc nt Interior Ci tin m rng BGP: Ch cc Router bin cn chy BGP

Do gim khi lng bng nh tuyn nn lm tng kh nng m rng ca cc mng 2. NG DNG MPLS TRN NN ATM Chuyn mch nhna giao thc (MPLS) m rng kh nng ca cc b nh tuyn IP v cc chuyn mch ATM trong mt vi phng php chnh: MPLS tch hp hon toniu khinnh tuyn IP vi cc chuyn mch

ATM,iu ny cung cp nhng h tr t nhin cc dch v IP nh loi dch v IP v IPa hng (multicast) trn chuyn mch cng nh cc b nh tuyn ATM. MPLS cung cp cc h tr cho kh nng m rng quy m v s dng linh hot cc dch v mng ringo IP trn b nh tuyn v chuyn mch. MPLS cung cp cc h tr cho k thut lu lng IP, liu khin mm do cc lung lu lng IP theo cc ngun ti nguyn trn mng 3. K THUT LU LNG TRONG MPLS Mng IP truyn thng xy ra tnh trng mt phn mng b nghn trong khi cc phn cn li khng c tn dng. MPLS c kh nng ch ra con ng ti u tha mn rng buc v d phng ti nguyn c th gii quyt c vn ny, gi l k thut lu lng, gip s dng ti u ti nguyn. K thut lu lng ng dng cc nguyn l khoa hc cng ngh o lng, m hnh ho, c trng ho v iu khin lu lng nhm t c cc mc tiu ti u nht. Mt u im na l kh nng hi phc nhanh, gip gim thiu t l mt gi khi xy ra li trn cc lin kt hoc cc nt chuyn mch nhn. 4. MNG RING O VPN C th ni VPN l mt trong nhng ng dng quan trng nht ca MPLS. K thut MPLS VPN n gin ha qu trnh to ng hm trong mng ring o bng c ch gn nhn gi tin(labels) trn thit b do nh mng cung cp. Thay v t thit lp v qun tr v u t nhng thit b t tin, MPLS VPN s gip cc doanh nghip giao nhim v ny cho cc nh cung cp - n v c y nng lc, thit b v cng ngh bo mt tt hn nhiu cho mng ca doanh nghip. Li ch ca MPLS VPN so vi cc dch v VPN truyn thng: R ing bit v bo mt: MPLS VPN gi cc thng tin nh tuyn ring bit cho

mi VPN, m bo ngi dng ch c th lin lc c vi cc a ch c lp sn cho VPN ca mnh. Hn na, tr trong mng c gi mc thp nht do cc gi tin khng phi tri qua qu trnh ng gi v m ha. c lp vi khch hng:MPLS VPN c cch nh a ch (gn nhn trong mng MPLS) ht sc linh hot, ngi dng c th s dng bt c di a ch no (k c cc a ch kim tra hoc cc a ch khng c ng k) hoc c th s sng NAT (Network Address Translation). Mt khc, ngi dng cn c th s dng cc di a ch trng hoc ging nhau. Mt im ni bt khc l mng ca ngi dng khng yu cu cc thit b h tr MPLS, cc thit b t tin nh VPN Router vi IP Sec hoc bt c yu cu c bit no khc ngoi IP. L inh hot v kh nng pht trin:Vi cc dch v VPN da trn IP, s lng router trn mng tng nhanh chng theo s lng cc VPN. VPN s phi cha cc bng nh tuyn ngy mt ln. MPLS VPN s dng mt tp cc BGP (Border Gateway Protocol) ngang hng gia cc LSR cnh (Edge LSR), cho php s lng VPN khng hn ch v h tr nhiu dng VPN, d dng to thm cc VPN hoc site mi (ch cn thc hin ti router ca site mi).

III.

MPLS ti Vit Nam : Ti Vit nam, MPLS hin ang c xc tin xy dng trong mng truyn ti ca Tng cng ty BCVT Vit nam (VNPT). Vi d n VoIP hin ang trin khai, VNPT thit lp mng trc MPLS vi 3 LSR li. Cc LSR bin s c tip tc u t v m rng ti cc a im c nhu cu ln nh Hi Phng, Qung Ninh pha Bc, Nng, Khnh Ho... min Trung, Bnh Dng, ng Nai, B Ra -

Vng Tu... min Nam. Hin nay VNPT cung cp dch v MEGA-WAN vi cc loi hnh dch v VPN MPLS nh sau. - VNPT MPLS VPN lp 2 vi c trng l kt ni point point vi lp truyn gia l ATM, Ethernet, FR. Trin khai l cc dch v ADSL, G.SHDSL ko t mng ca VNPT ti cc CE v khch hng t qun l vic nh tuyn. u im ca VPN lp 2 l: khng yu cu bt c mt s thay i no t pha mng hin c ca khch hng; Mc ring t ph thuc vo policy ca khch hng; Khch hng t qun l vic nh tuyn t PCE PCE; Cc giao thc h tr cho c Unicast v Multicast. Loi ny ph hp vi cc doanh nghip va v nh, c m hnh mng khng phc tp. t kh nng m rng v ch l cng ngh lp 2 (ATM, FR, Ethernet trong sut trn MPLS).

- VNPT MPLS VPN lp 3: Cng ngh truyn dn vn l ADSL v G.SHDSL qua cc DSLAM. Topo mng l Full-Mesh. Trong dch v ny VNPT s qun l vic nh tuyn, cn ngi dng ch vic ph mc vic cho VNPT. VPN lp 3 ca VNPT s dng giao thc nh tuyn tnh, RIPv2, OSPF, BGP. Dch v ny c chi ph kh thp v ch cn mt thit b nh tuyn v khng cn trnh qun l cao, do nh cung cp dch v qun l h ngi dng. Tuy nhin dch v ny cng c mt s gii hn l ngi dng khng c kh nng t qun l nh tuyn c nh dch v Wan lp 2. Cc chnh sch bo mt nh firewall hoc m ho c t CPE ch khng phi PE, do ngi dng phi c kin thc v bo mt.

- Cc dch v an ninh, bo m cho VPN: S dng IPsec cho vic m bo an ninh trn MPLS. Bo mt c lp 2 v lp 3 trong m hnh OSI. Cam kt v cht lng cc ng dng v kt ni ton cu. Ngi dng tu bin cu hnh bo mt.

TI LIU THAM KHO 1. BruceDavie and Yakov Rekhter "MPLS Technology and Applications" Morgan Kaufmann Pulishers, Inc. 2000.

2. Ivan Pepelnjak, Jim Guichard "MPLS and VPN Architectures" Cissco Press, 2001. 3. Mng ring o - Nh xut Bu in

4. Initial MPLS VPN Setup - Cisco Press 5. Chuyn mach nhn a giao thc MPLS NXB Thng tin truyn thng.