Está en la página 1de 17

x

Cu hnh mt mng MPLS VPN

Bc 1: Cu hnh a ch IP cho cc Router trong mng Cc cu hi c th t ra: 1) Hy nu cc bc cu hnh a ch IP cho mt cng? Thc hin? Vo mode interface ca cng cn cu hnh: interface tn cng t a ch IP: ip address a_ch_host subnetmask No shut cng: no shutdown Gi s thy ku t li a ch IP cho mt cng c cu hnh, ta lm nh sau: o Vo cng : interface tn cng o Xa cu hnh IP: no ip address o t li a ch: ip address a_ch_host subnetmask 2) ngha cu lnh ip ospf network point-to-point? Gip cc Router qung b chnh xc lp mng ca giao din chy OSPF ( y l cng loopback). 3) Dng cu lnh no kim tra cc cng cu hnh a ch IP? Gii thch ni dung bng? Dng lnh: show ip interface brief

Cho bit phng thc ci t a ch IP: dng tay (manual) hay t ng cp (dng DHCP).

Cho bit trng thi ca cng bt hay cha.

x Bc 2: Cu hnh giao thc nh tuyn OSPF cho lp mng li Cu hi c th t ra: 1) Hy nu cc bc cu hnh giao thc nh tuyn OSPF? Gii thch cu lnh? - Vo mode router ca giao thc ospf: router ospf as_number Cc router thuc cng mt khu vc area, nhng nu khc s as c th dn n nh tuyn khng c (trng hp mt router tn ti nhiu as_number). - Qung b cc lp mng m ta mun chy giao thc nh tuyn OSPF : network a_ch_lp_mng wildcard_mask area area_number 2) Ti sao vng mng li li t l area 0? - Trong OSPF thng chia ra lm nhiu vng Area tin cho vic qun tr v lm gn bng nh tuyn. - Thng thng nhng vng c gn l Area 0 c hiu l vng mng li backbone area, tt c nhng vng khc nonbackbone area u c kt ni vo vng mng li. - Nh vy vng mng li area 0 c nhim v chnh l chuyn tip d liu transit area. 3) Lm cch no kim tra cc lng ging ca Router cng chy giao thc nh tuyn OSPF? Gii thch ni dung bng ? - Dng lnh : show ip ospf neighbor

Danh sch cc hng xm theo th t m Router hc c.

Gi tr u tin OSPF ca giao din.

Cho bit trng thi OSPF ca giao din. Trng thi FULL cho bit Router v hng xm ca n c c s d liu ging nhau

S lng thi gian cn li m cc Router s ch nhn c gi tin Hello t hng xm, trc khi tuyn b quan h lng ging kt thc.

4) Hy show bng nh tuyn v gii thch? - Ci ny mi ngi rnh ri, khi ni nhe. Bc 3: Bt tnh nng MPLS trn cc Router thuc mng li Cu hi c th t ra: 1) Nu cc bc cu hnh MPLS trn cc Router? - Chy tnh nng ip cef trn cc Router ti mode config: ip cef (thc cht trn cc dng Router cisco cho php sn nn c th khng cn bt). - Cho bit giao thc phn phi nhn c s dng l LDP: mpls label protocal ldp - Bt tnh nng MPLS: mpls ip - Vo tng giao din m Router s chy bng giao thc chuyn mch nhn cu hnh: o Router(config)# interface tn_giao_din o Router(interface)# mpls label protocal ldp o Router(interface)# mpls ip Thc cht qu trnh ny c th c cu hnh trn ton cc (ti mode config) hoc c th vo tng giao din m cu hnh (ti mode interface). y mnh b sing nn cu hnh c hai lun. 2) Lm th no kim tra lng ging bt tnh nng MPLS ca Router? - Dng cu lnh: show mpls ldp neighbor

x
Thi gian tnh t lc bt tnh nng MPLS v thit lp lng ging.

i tng ngang cp LDP, m Router s trao i thng tin nhn. tr thnh LSR phi tri qua 2 bn tin l Discovery v Session.

Giao thc phn phi nhn LDP s dng giao thc TCP vi port 646 cho vic thit lp cc phin lm vic gia cc LSR.

3) Lm th no bit ngun trao i LDP? - Dng cu lnh: show mpls ldp discovery

4) Lm th no kim tra cc giao din cu hnh LDP cha? - Dng cu lnh: show mpls interfaces -

Giao din bt tnh nng MPLS

Giao thc phn phi nhn s dng.

5) Hy hin th bng LIB v phn tch?

a ch ch n Ngha l vic chuyn mch s khng da vo nhn m da trn c s a ch IP

Mang thng tin ca LSR k cn vi thng tin l nhn ni m LSR to ra dnh cho prefix ang xt.

- Lnh show ny cng gip ta bit c 2 iu quan trng: o Kim tra LDP ch nh mt nhn cho mi prefix trong bng nh tuyn ca n cha. o Kim tra LDP nhn mt nhn ca nhng mng con v cc interface loopback ca Router core cha. 6) Hy hin th bng LFIB v phn tch? - Dng cu lnh: show mpls forwarding-table

Nhn ni m LSR to ra cho mt FEC.

Tnh trng x l nhn dnh cho prefix .

x - Cn phi phn bit gia Pop tag v Untagged: o Pop tag ngha l ch ly nhn trn cng ra, sau gi tin c th tip tc c x l bng nhn hoc IP. o Untagged ngha l ly c chng nhn ra (thng xy ra khi gi tin chun b c a ra khi mi trng MPLS), gi tin sau chc chn x l bng IP. - Ti sao y li xy ra qu trnh Pop tag? Ta xt prefix 192.168.1.0/24, LSR PE2 s to nhn ni l 16, sau chuyn tip i n s Pop tag. l v LSR P i vi prefix 192.168.1.0/24 local bindings ca n s l tag imp null ngha l gi tin c x l da trn c s IP ch khng da vo nhn (xem phn show mpls ldp bingdings cu hi 5). Bc 4: To VRF trn cc Router bin v forward cc VRF cho cc giao din kt ni vi khch hng Cu hi c th t ra: 1) Nu cc bc to mt VRF v forward (gn) VRF cho mt giao din? ng nhp vo trong ch (mode) VRF, t tn cho VRF m ta mun to (to mt bng VRF): ip vrf tn_VRF_mun_to. Khi to gi tr RD mt s ti liu gi bc ny l to bng nh tuyn v chuyn tip: rd gi_tr_RD t cc gi tr import v export : route-target import/export gi_tr Hoc s dng cu lnh: route-target both gi_tr kt hp (gn) VRF cho giao din thc hin cc bc sau: o Vo mode interface: interface tn_giao_din o Kt hp (gn) VRF cho giao din: ip vrf fowarding tn_VRF o t li a ch IP cho giao din : ip address a_ch_host subnetmask

x o Bt cng (thc cht khng cn nhng c bt cho chc n): no shutdown 2) Bng cch no kim tra cc lin kt va khi to ? - Dng cu lnh: ping vrf tn_VRF a_ch_IP_ca_Router_khch_hng_lin_kt - Lu rng sau khi forward VRF cho mt giao din ta s khi th ping connected gia Router bin vi khch hng (ng nhin l trc khi ta chy giao thc nh tuyn ni gia chng). Ti sao? Bi v VRF l trong sut i vi khch hng, lin kt ny khng c trong bng nh tuyn mc nh (th dng cu lnh show ip route trn router bin trc v sau khi forward VRF ta s thy dng connected vi Router khch hng mt sau khi forward) do kim tra lin kt ta phi s dng cu lnh ping vrf (ping mt host thng qua VRF). 3) Hy kim tra cc thng tin v VRF thit lp? - Hin th tng quan thng tin thit lp cho VRF : show ip vrf hoc show ip vrf brief Hai lnh ny tng ng nhau

- show ip vrf brief tn_vrf

x - show ip vrf interfaces tn_vrf

- Hin th chi tit thng tin cc VRF: show ip vrf detail tn_VRF

Bc 5, Bc 6: Cu hnh giao thc nh tuyn trn cc Router khch hng CE, PE Cu hi c th t ra: 1) Trnh by cu hnh giao thc nh tuyn trn Router CE? - Giao thc nh tuyn RIPv2: o Enable RIP: router rip o La chn phin bn: version 2 o Qung b lp mng : network major_network o Tt tnh nng auto-summary: no auto-summary

x Ti sao li c cu lnh no auto-summary? Hay ngha cu lnh no auto-summary? Auto-summary l tnh nng t ng tm tt tuyn. Trong giao thc nh tuyn RIP/EIGRP tnh nng auto-summary c enable mt cch t ng. Auto-summary cho php router c th gom nhiu tuyn li vi nhau thnh mt tuyn tm tt, vic thu gn ny lm gim kch thc bng nh tuyn. Tuy nhin nu nh ta c cc mng khng lin tc, vic nh tuyn cc gi tin s b sai. V d: ta c 3 network 172.168.1.0, 172.168.2.0, 172.168.3.0. Nu khng c cu lnh no auto-summary, lc ny trn bng nh tuyn ca router s l 172.16.0.0/16. Khi ta gi gi tin n cc lp mng .1, .2, .3 s khng c vn g. Tuy nhin khi ta gi gi tin n .4, gi tin vn s c gi i, nhng khng bao gi nhn c (chnh xc s i vo Null0 i vi EIGRP). - Giao thc nh tuyn EIGRP : o Enable EIGRP : router eigrp as_number o Qung b lp mng (hay chnh xc hn l cho php giao din kt ni vi lp mng c chy EIGRP): network major_network o Tt tnh nng auto-summary: no auto_summary 2) Trnh by cu hnh giao thc nh tuyn trn Router PE? - Giao thc nh tuyn RIP: o Enable RIP: router rip

x o Vo mode address-family cu hnh cho giao thc nh tuyn RIP, cu hnh mt phin mang cc prefix chun Ipv4, ch nh tn ca VRF m ta mun lin kt vi mode address-family: address-family ipv4 vrf tn_vrf o Chn phin bn: version 2 o Qung b lp mng, ch ra mt mng cho VRF, cu lnh ny c s dng xc nh xem cc interface no s c nh tuyn trong EIGRP, VRF s phi c cu hnh vi mt di a ch c cu hnh trong cu lnh network: network major_network o Phn phi li BGP vo RIP (hay qung b cc Route ca BGP vo RIP): redistribute bgp autonomous_system_number metric 1 o Tt tnh nng auto-summary: no auto_summary - Giao thc nh tuyn EIGRP: o Enable EIGRP: router eigrp as_number Lu rng as_number ny l thuc v nh cung cp dch v v khng c ngha cho khch hng. o Vo mode address-family cu hnh cho giao thc nh tuyn EIGRP, cu hnh mt phin mang cc prefix chun Ipv4, ch nh tn ca VRF m ta mun lin kt vi mode address-family: address-family ipv4 vrf tn_vrf

x o Qung b lp mng, ch ra mt mng cho VRF, cu lnh ny c s dng xc nh xem cc interface no s c nh tuyn trong EIGRP, VRF s phi c cu hnh vi mt di a ch c cu hnh trong cu lnh network: network network [mask] Ch ny phi gii thch mt t v qung b mng: C nhiu cch qung b mt mng v ph thuc chng ta bt hay tt tnh nng auto-summary. y ly v d qung b mng loopback c a ch 3.3.3.3/24. - Bt auto-summary: Nu qung b: network 3.0.0.0 Khi show ip route, cc Router ghi nhn lp mng qung b 3.0.0.0/8 Nu qung b: network 3.3.3.0 0.0.0.255 Khi show ip route, cc Router ghi nhn lp mng qung b 3.0.0.0/24 Chnh xc hn. - Tt tnh nng auto-summary bng cu lnh no auto-summary: Qung b: network 3.0.0.0 No auto-summary Khi show ip route, cc Router ghi nhn lp mng qung b 3.0.0.0/24 o Phn phi li BGP vo EIGRP (hay qung b cc Route ca BGP vo trong EIGRP), v BGP s phi c qung

x b vo trong EIGRP cho CE site chp nhn cc BGP route c th mang theo thng tin EIGRP: redistribute bgp autonomous_system_number metric bandwidth delay reliablity loading MTU autonomouse system number: c khai bo lc ta bt BGP. Cng thc tnh metric trong EIGRP: Thng thng mc nh: K1 (bandwidth) v K3 (delay) c thit lp gi tr 1, K2 (load), K4 (reliability) v K5 (MTU) c thit lp gi tr. Metric = [K1*bandwidth +K2* bandwidth/(256 - load) + K3*delay]*[K5/( reliability + K4)] o Tch quyn t tr: Autonomouse-system local_as_number Local_as_number chnh l as number ca EIGRP trn Router khch hng. o Tt tnh nng auto-summary: no auto_summary 3) Hy hin th bng nh tuyn ca mt VRF? - Dng cu lnh: show ip route vrf tn_vrf

x
VRF A s dng giao thc nh tuyn RIPv2

VRF B s dng giao thc nh tuyn EIGRP

4) Hin th cc interface c cu hnh nh tuyn trong EIGRP? - Dng lnh: show ip eigrp vrf tn_VRF interface

5) Hin th cc VRF neighbor khi cc neighbor hot ng v khng hot ng? - Dng lnh: show ip eigrp vrf_tn neighbor

Lit k th t cc phin kt ni vi neighbor. Phin u tin bt u l 0.

a ch IP ca neighbor.

Giao din ni ca Router, ni tip nhn cc gi tin Hello gi t cc neighbor.

Thi gian cn li trc khi Router tuyn b lin kt vi neighbor b down. Thi gian s c thit lp li mc ti a ngay khi Router nhn c gi tin Hello t neighbor.

SRTT: cho bit phi mt bao lu neighbor ny p ng c gi tin. RTO: cho bit mt bao lu trc khi pht li nu khng nhn c ACK.

Q count: s hng i lun l s 0 nu khng c tnh trng tc nghn gia cc lin kt. Sequence Number: s th t ca gi tin cui cng nhn c t hng xm (gi cp nht, truy vn, tr li,)

Bc 7: nh tuyn PE-PE bng giao thc nh tuyn MP-BGP Cu hi c th t ra: 1) Cho bit cch cu hnh giao thc nh tuyn BGP gia cc Router bin? - Vo mode cu hnh ca BGP: router bgp autonomoussystem_number - Thit lp lng ging u xa (hay ch nh lng ging u xa l ai) : Neighbor a_ch_IP_router_u_xa remote-as s_as_ca_Router_u_xa - c c Cisco IOS software cho php cc phin ca IBGP s dng mi interface cho vic kt ni TCP, s dng cu lnh

x sau (ci ny l ti liu n gii thch cn theo tui th cu lnh sau gip Router bit c ngun cp nht thng tin t lng ging u xa): Neighbor a_ch_IP_u_xa update-source giao_din_ca_a_ch_IP_u_xa - Tt tnh nng auto-summary: no auto-summary Bc 8: Cu hnh trao i cc Router VPNv4 address family Cu hi c th t ra: 1) Cu hnh th no cc Router bin trao i cc tuyn VPNv4? - Vo li mode cu hnh BGP: router bgp autonomoussystem_number - Chn tham s cu hnh ca a ch VPNv4: address-family vpnv4 - Kch hot neighbor s trao i tuyn VPNv4: neighbor a_ch_IP_u_xa active - Cho php Router gi v nhn cc tuyn t neighbor va kch hot: neighbor a_ch_IP_u_xa send-community both 2) Kim tra cc trng thi kt ni vi cc neighbor trong BGP ? - Dng cu lnh : show ip bgp summary -

ID BGP ca Router. S autonomous -system thit lp cho BGP

Neighbor u xa m Router kt ni.

Bc 9: Cu hnh IPv4 address family trao i nh tuyn gia PE v CE Cu hi c th t ra: 1) Cu hnh th no trao i cc tuyn IPv4 gia PE v CE? - Vo li mode cu hnh BGP: router bgp autonomoussystem_number - Chn mt VRF instance ca giao thc nh tuyn: Address-family ipv4 vrf vrf-name - Phn phi li cc tuyn t RIP/EIGRP vo li BGP: Redistribute rip Redistribute eigrp as-number_ca pha khch hng 2) Cc lnh show? Hin th ton b c s d liu hon chnh cc tuyn ca VPNv4:

Hin th a ch mng t bng BGP

Hin th a ch ca next hop BGP

Hin th metric ca BGP

Hin th mc u tin

x Hin th cc tuyn VPNv4 ca mt VRF:

Hin th thng tin nhn ca cc tuyn VPNv4 ca mt vrf:

- y v d vi tuyn 4.4.4.0/24: in tag l nhn 19, ngha l nu Router CEA2 mun gi gi tin n 4.4.4.4 th khi gi tin n PE2 nhn trong cng s l nhn 19. Khi gi tin t P n PE1 s ch cn nhn 19, nn gi l In tag. - V d vi tuyn 6.6.6.0/24: khi CEA1 mun gi gi tin n 6.6.6.6, th nhn 19 y chnh l nhn trong cng m Router PE1 s phi gn chuyn gi tin i. M gi tin vi nhn 19 i ra t PE1 nn ta gi l Out tag.