Está en la página 1de 30

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

MC LC

LI M U
Bu chnh vin thng v cng ngh thng tin ngy nay rt pht trin.Cuc cch mng thng tin v ang din ra trn hu ht cc nc tin tin trn th gii. C th ni thng tin ngy nay ng vai tr ht sc quan trng trong cuc sng hng ngy ca mi con ngi t vic n g u ,xem g trong nhng ngy ti n vn c phiu tng gi hay gim gi hay nhng vn quan trng ca c th gii u c phn nh qua thng tin c cp nht hng ngy. iu cho thy mng li vin thng bao trm trn ton th gii . Ngy nay chng ta cng khng phi lo v vic thiu ht bng thng cho truyn tin nh trc kia thay vo l vic lm sao s l gi tin ti cc nt l nhanh nht. Giao thc l mt kiu cch thc giao tip, i thoi. Cng nh con ngi my mc mun lm vic vi nhau cng cn c nhng cch thc giao tip ring. Trong vic truyn tin cng vy cc Router mun giao tip vi nhau cng cn phi c nhng giao thc lm vic vi nhau. Cc giao thc thng l RIP, IGRP, EGRP, IS-IS,BGP4 v OSPF. OSPF L giao thc nh tuyn nhm link-state, thng c trin khai trong cc h thng mng phc tp. Giao thc OSPF t xy dng nhng c ch ring cho mnh ,t bo m nhng quan h ca chnh mnh vi cc router khc. N c th d tm nhanh chng s thay ca topology (cng nh li ca cc interface ) v tnh ton li nhng route mi sau chu k hi t. Chu k hi t ca OSPF rt ngn v cng tn rt t lu lng ng truyn. Chnh v cc l do trn em la chn giao thc nh tuyn OSPF v a ra cc m hnh m phng trc quan v sinh ng bng phn mm m phng Packet tracer ca CISCO. Em xin gi li cm n chn thnh ti thy Nguyn Tin Ban to iu kin cho em trong qu trnh lm v thc hin . Mc d c gng ht sc nhng do kh nng cn hn ch nn khng th trnh khi thiu st em mong nhn c s gp t cc thy c v cc bn c nhm c th hon thin bi bo co .Xin chn thnh cm n ! H Ni, Ngy..Thng ..Nm. Sinh vin thc hin V Tr Cng Lp H09VT10 1

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

V Tr Cng

CHNG I: A CH IP V NH A CH IP
a ch IP l a ch lp mng, c s dng nh danh cc my trm (HOST) trong lin mng. a ch IP.v4 c di 32 bt. N c th c biu th di dng thp phn, bt phn, thp lc phn v nh phn. C hai cch cp pht a ch IP ph thuc vo cch thc ta kt ni mng. Nu mng ca ta kt ni vo mng Internet, a ch mng c xc nhn bi NIC (Network Information Center). Nu mng ca ta khng kt ni vi Internet, ngi qun tr mng s cp pht a ch IP cho mng ny. V c bn, khun dng a ch IP gm hai phn: Network Number v Host Number nh hnh v:

Trong , phn Network Number l a ch mng cn Host Number l a ch cc my trm lm vic trong mng . Do vic tng cc WW theo hm m trong nhng nm gn y v s lng WW m ra rt nhiu, nn vi a ch IP l 32 bt l rt t do vy m rng kh nng nh i ch cho mng IP v v nhu cu s dng c rt nhiu quy m mng khc nhau, nn ngi ta chia cc i ch IP thnh 5 lp k hiu l A, B, C, D v E c cu trc nh sau:

V Tr Cng Lp H09VT10

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Hnh 1.1: Cc kiu a ch IP


Lp A (/8): c xc nh bng bt u tin trong byte th nht l 0 v dng cc bt cn li ca byte ny nh danh mng. Do , n cho php nh danh ti 126 mng, vi 16 triu my trm trong mi mng. Lp B (/16): c xc nh bng hai bt u tin nhn gi tr 10, v s dng byte th nht v th hai cho nh danh mng. N cho php nh danh 16.384 mng vi ti a 65.535 my trm trn mi mng. Lp C (/24): c xc nh bng ba bt u tin l 110 v dng ba byte u nh danh mng. N cho php nh danh ti 2.097.150 mng vi ti a 254 my trm trong mi my trm trong mi mng. Do , n c s dng trong cc mng c quy m nh. Lp D: c xc nh bng bn bt u tin l 1110, n c dng gi cc IP datagram ti mt nhm cc host trn mt mng. Tt c cc s ln hn 233 trong trng u l thuc nhm D. Lp E: c xc nh bng nm bt u tin l 11110, c d phng cho tng lai. Vi phng thc nh a ch IP nh trn, s lng mng v s my ti a trong mi lp mng l c nh. Do , s ny sinh vn l c cc a ch khng c s dng trong mng ca mt doanh nghip, trong khi mt doanh nghip khc li khng c a ch mng dng. Do tit kim a ch mng, trong nhiu trng hp mt mng c th c chia thnh nhiu mng con (subnet). Khi , c th a thm cc vng subnetid nh danh cho cc mng con. Vng subnetid ny c ly t vng hostid ca cc lp A, B v C.

V Tr Cng Lp H09VT10

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

CHNG II: CC GIAO THC TRONG NH TUYN IP


2.1 Khi Nim nh tuyn l cch thc m Router (b nh tuyn) hoc thit b mng khc s dng truyn pht cc gi tin ti a ch ch trn mng. Khi nim routing gn lin vi mng Intranet v Internet s dng mt m hnh nh tuyn hop-by-hop. iu ny c ngha rng mi PC hay Router s tin hnh kim tra trng a ch ch trong phn tiu ca gi IP, tnh ton chng tip theo (Next hop) tng bc chuyn gi IP dn n ch ca n v cc Router c tip tc pht cc gi ti chng tip theo nh vy cho ti khi cc gi IP n c ch. 2.2 Phn loi. C 2 loi nh tuyn : nh tuyn tnh v nh tuyn ng 2.2.1 nh tuyn tnh Trong bng nh tuyn gm a ch mng v subnet mask v a ch IP ca router tip theo hoc exit interface. c k hiu l ch S trong bng nh tuyn. Chng ta s dng nh tuyn tnh khi : Khi mng ch c 1 vi router hay m hnh mng n gin . Mng c kt ni vi Internet ch thng qua 1 ISP. M hnh Hub & spoke c s dng trn 1 mng ln.

V Tr Cng Lp H09VT10

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Hnh 2.1 Bng nh tuyn 2.2.2 nh Tuyn ng Giao thc nh tuyn ng c s dng bi cc router chia s thng tin v tnh trng ca cc mng t xa.Giao thc nh tuyn ng thc hin 1 s hot ng bao gm : Khm ph mng. Cp nht v duy tr bng nh tuyn. im c trng ca nh tuyn ng l : T ng khm ph mng Duy tr bng nh tuyn. Cc loi nh tuyn ng : 1. RIP(Routing Information Protocol). 2. IGRP(Interior Gateway Routing Protocol) 3. EIGRP(Enhanced IGRP) 4. OSPF(Open Shortest Path First) 5. IS-IS(Intermediate System-to-Intermediate System ) 6. BGP (Border Gateway Protocol). Cc thut ton tm ng :gm 2 loi Giao thc nh tuyn Distance vector : Cc giao thc nh tuyn thuc loi ny nh RIP,IGRP........ Hot ng theo nguyn tc Neighbors , ngha l mi router s gi bng nh tuyn ca mnh cho tt c router kt ni trc tip vi n. Cc router sau so snh vi bng nh tuyn m mnh hin c v kim tra li cc tuyn ng ca

V Tr Cng Lp H09VT10

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

mnh vi cc tuyn ng mi nhn c , tuyn ng no ti u hn s c a vo bng nh tuyn cc gi tin update s c gi theo chu k (30s vi RIP, 90s vi EIGRP). Giao thc nh tuyn Link-state : Cc giao thc nh tuyn thuc loi ny nh : OSPF,IS-IS Link-state khng gi bng nh tuyn ca mnh, m ch gi trng thi ca cc ng link trong linkstate database ca mnh i cho cc router khc,cc router s p dng gii thut SPF(shortest path first), t xy dng bng nh tuyn ring cho mnh.khi mng hi t,link state protocol s khng gi update nh k m ch gi khi no c s thay i trong mng. 2.3 Giao Thc RIP (Routing Information Protocol) Routing Information Protocol (RIP) l giao thc nh tuyn vector khong cch (Distance Vector Protocol) xut hin sm nht. N sut hin vo nm 1970 bi Xerox nh l mt phn ca b giao thc Xerox Networking Services (XNS). Mt iu k l l RIP c chp nhn rng ri trc khi c mt chun chnh thc c xut bn. Mi n nm 1988 RIP mi c chnh thc ban b trong RFC1058 bi Charles Hedrick. RIP c s dng rng ri do tnh cht n gin v tin dng ca n. Giao thc nh tuyn RIP c 2 phin bn RIPv1 v RIPv2. 2.3.1 Giao Thc RIPv1 c im: RIPv1 (RIP phin bn 1) l giao thc nh tuyn theo vect khong cch nn qung b ton b bng nh tuyn ca n cho cc router lng ging theo nh k. Chu k cp nht ca RIP l 30 giy. Thng s nh tuyn ca RIP l s lng hop, gi tr ti a l 15 hop. RIPv1 l giao thc nh tuyn theo lp a ch. Khi RIP router nhn thng tin v mt mng no t mt cng, trong thng tin nh tuyn ny khng c thng tin v subnet mask i km. Do router s ly subnet mask ca cng p dng cho a ch mng m n nhn c t cng ny. Nu subnet mask ny khng ph hp th n s ly subnet mask mc nh theo lp a ch p dng cho a ch mng m n nhn c. Mt s hn ch ca RIPv1: - Khng gi thng tin subnet mask trong thng tin nh tuyn V Tr Cng Lp H09VT10 6

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

- Gi qung b thng tin nh tuyn theo a ch 255.255.255.255 - Khng h tr xc minh thng tin nhn c - Khng h tr VLSM v CIDR (Classless Interdomain Routing) 2.3.2 Giao Thc RIPv2 RIPv2 c pht trin t RIPv1 nn c nhiu c im ging RIP v1 : - L mt giao thc nh tuyn theo vct khong cch, s dng s hop lm thng s nh tuyn. - S dng thi gian holddown chng lp (loop), thi gian ny mc nh l 180 giy. - S dng c ch split horizon chng loop. - Gi tr hop ti a l 15 RIPv2 c gi subnet mask i km vi cc a ch mng trong thng tin nh tuyn v vy RIPv2 c h tr VLSM v CIDR. RIPv2 cng h tr vic xc minh thng tin nh tuyn. V vy ta c th cu hnh cho RIP gi v nhn thng tin xc minh trn cng giao tip ca router bng m ha MD5 hay khng m ha. 2.4 Giao Thc IGRP Trc nhng nhc im vn c ca RIP nh: metric l hop count, kch thc mng ti a l 15 hop. Cisco pht trin mt giao thc c quyn ca ring mnh l IGRP khc phc nhng nhc im . C th l metric ca IGRP l s t hp ca 5 yu t, mc nh l bandwidth v delay: Bandwidth, Delay Load, Reliability, Maximum transfer unit (MTU). IGRP khng s dng hop count trong metric ca mnh, tuy nhin n vn theo di c hop count. Mt mng ci t IGRP th kch thc mng c th nn ti 255 hop. u im na ca IGRP so vi RIP l n h tr c unequal-cost load sharing v thi gian update lu hn RIP gp 3 ln. (90 giy). Tuy nhin bn cnh nhng u im ca mnh so vi RIP, IGRP cng c nhng nhc im l giao thc c quyn ca Cisco. 2.5 Giao Thc EIGRP L mt giao thc m rng ca IGRP, c pht trin bi Cisco. IGRP l classful routing protocol, cn EIGRP l classless routing protocol. EIGRP l mt giao thc nh tuyn lai (hybrid routing), n va mang nhng c im ca distance vector va mang mt s c im ca link-state.

V Tr Cng Lp H09VT10

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

EIGRP h tr VLSM v CIDR nn s dng hiu qu khng gian a ch. S dng a ch multicast (224.0.0.10) trao i thng tin cp nht nh tuyn.

CHNG III: GIAO THC NH TUYN OSPF


3.1 Khi Nim OSPF l giao thc nh tuyn dng Link-State da trn chun m c pht trin thay th phng thc Distance Vector (RIP). RIP l mt giao thc nh tuyn c chp nhn trong nhng ngy u ca mng v Internet,nhng do ph thuc vo s lng hop m router c th i c ch l 15 nn RIP nhanh chng khng th chp nhn c trong cc mng ln hn .Cc mng ln hn cn 1 gii php nh tuyn mnh m hn. OSPF l 1 giao thc nh tuyn classless m s dng khi nim vng cho kh nng m rng .N s dung thng s cost tnh ng i tt nht .OSPF s dng bng thng nh l thc o chi ph. 3.2 OSPF Gii Quyt Cc Vn Tc hi t nhanh H tr VLSM (Variable length subnet mask) Kch thc mng c th h tr ln Chn ng theo trng thi ng link hiu qu hn distance vector ng i linh hot hn. H tr xc thc (Authenticate). 3.3 ng Gi Bn Tin OSPF Phn d liu ca 1 thng bo OSPF c ng trong 1 gi.Trng d liu ny c th bao gm 1trong 5 loi bn tin OSPF.

V Tr Cng Lp H09VT10

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Cc gi tiu OSPF c gi km vi mi gi tin OSPF,bt k loi bn tin no ca OSPF.Cc OSPF header v loi gi d liu c th c gi gn trong gi tin IP.Trong gi tiu IP,trng giao thc c thit lp bng 89 cho bit l OSPF,v a ch ch c thit lp l 1 trong 2 a ch multicast :224.0.0.5 hoc 224.0.0.6.Nu gi OSPF c ng gi trong 1 khung Ethernet,a ch MAC ch cng l 1 a ch multicast : 01-00-5E-00-00-05 or 01-00-5E-00-00-06.

Hnh 3.1 ng gi bn tin OSPF 3.4 Cc Loi Gi Tin OSPF Hello : dng thit lp v duy tr mi quan h hng xm vi nhng router khc . DBD : gi tin ny dng chn la router no s c trao i thng tin trc (master/slave) LSR : Link state request gi tin ny dng ch nh loi LSA dng trong tin trnh trao i gi tin DBD. LSU : Link-state update c s dng tr li LSRs cng nh cng b thng tin mi.LSUs cha 7 loi khc nhau ca LSAs. LSAck : khi 1 LSU c nhn,router gi 1 Link-State Acknowledgement (LSAck) xc nhn LSU. 3.5 Gi Tin Hello Gi OSPF loi 1 l gi OSPF Hello.Cc gi Hllo c s dng :

V Tr Cng Lp H09VT10

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Khm ph hng xm OSPF v thit lp hng xm gn k. Qung b cc thng s trn 2 con router m l hng xm ca nhau. Bu chn DR va BDR trn mng multiaccess v ethernet nh Frame Relay. 3.5.1 Thit lp hng xm Trc khi 1 router OSPF gi trng thi lin kt ca n ti tt c cc router khc, trc tin n phi xc nh xem c bt k hng xm OSPF no trn bt k lin kt no ca n .Trong hnh, router OSPF ang gi nhng gi Hello ra tt c cc cng ca n cho php cc cng ca n xc nh xem c bt k hng xm no trn lin kt khng . Thng tin trong OSPF Hello bao gm OSPF Router ID ca router ang gi gi Hello .Nhn 1 gi OSPF Hello trn giao din xc nhn cho 1 router m c router OSPF khc trn lin kt ny.Sau OSPF c thit lp l hng xm gn k.

Hnh 3.2 Giao thc Hello 3.5.2 OSPF Hello v Dead Interval Trc khi 2 router c th hnh thnh hng xm gn k,chng phi ng v 3 gi tr thi gian Hello,cng thi gian duy tr Dead Interval,v kiu mng.

V Tr Cng Lp H09VT10

10

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Thi gian Hello ch ra vic goi Hello gi thng xuyn th no mc nh vi mng multiaccess v point-to-point l 10s v 30s vi mng non-broadcast multiaccess (NBMA). Trong hu ht trng hp,gi OSPF Hello gi nh multicast n 1 a ch dnh ring cho tt c SPF router ti 224.0.0.5.S dng a ch multicast cho php thit b b qua cc gi d liu nu cc cng ca n khng c kch hot chp nhn cc gi tin OSPF. Dead Interval l thi gain m router ch trc khi cho hng xm vo trng thi down. thi gian ny theo cisco mc nh l gp 4 ln thi gian Hello. Vi mng multiaccess v point-topoint l 40s v vi NBMA l 120s. 3.5.3 OSPF link-state Updates Link-state updates (LSU) l gi tin c s dng cp nht nh tuyn OSPF.Mt gi LSU c th cha 10 loi bn tin khc nhau ca link-state Advertisements (LSAs) nh hin th hnh bn di.S khc nhau gia cc iu khon LSU v LSA i khi c th kh hiu.i khi nhng thut ng ny c dng ln ln Mt LSU cha 1 hoc nhiu LSAs v cc iu khon khc c th c s dng tuyn truyn thng tin trng thi lin kt bi router OSPF.

Hnh 3.3 Cu trc gi tin LSUs 3.5.4 Bu DR v BDR gim lu lng truy cp trn cc mng multiaccess, OSPF bu 1 DR va 1 BDR. DR c nhim v cp nht router khc (gi l DROthers) khi c s thay i trong mng. BDR d phng cho DR. 3.6 Xc Thc V Tr Cng Lp H09VT10 11

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Ging nh cc giao thc nh tuyn khc OSPF c th c cu hnh xc thc.RIPV2,EIGRP,OSPF,IS-IS v BGP tt c u c cu hnh m ho v xc thc thng tin nh tuyn iu ny m bo rng cc con router ch chp nhn thng tin nh tuyn t router khc c cu hnh vi cng mt khu v thng tin xc thc. 3.7 Cch Xc nh Router ID Cc OSPF Router ID c s dng nhn din tng router trong vng nh tuyn OSPF.Mt router ID ch n gin l 1 a ch IP.Router cisco chn router id da trn 3 tiu ch : S dng a ch IP c cu hnh vi lnh router-id . Nu router-id khng c cu hnh th router chn a ch IP cao nht ca bt k cng loopback no. Nu khng c cng loopback c cu hnh th router s chon a ch IP cao nht ca bt k cng vt l no ca n ang hot ng . V D :cho m hnh nh hnh v

Hnh 3.4 m hnh 3 router Bi v chng ta khng cu hnh router id hoc cng loopback nn chng ta xc nh router id da vo iu kin th 3.ta c th x dng lnh show ip protocol kim tra router id.1 s IOS khng hin th c nh hnh v th ta s dng lnh show ip ospf interface.Nh th hin trong hnh router id ca mi router l : R1: 192.168.10.5, which is higher than either 172.16.1.17 or 192.168.10.1 R2: 192.168.10.9, which is higher than either 10.10.10.1 or 192.168.10.2

V Tr Cng Lp H09VT10

12

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

R3: 192.168.10.10, which is higher than either 172.16.1.33 or 192.168.10.6

3.6 Bng nh Tuyn Xt m hinh nh hnh v sau khi mang hi t th mi router se c 1 bng nh tuyn ca n nh trong hnh v:

Hnh 3.5 M hnh mng gm 3 router Ta dng lnh show ip route thy bng nh tuyn ca tng router.

V Tr Cng Lp H09VT10

13

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Hnh 3.6 Bng nh tuyn ca Router R1

Hnh 3.7 Bng nh tuyn ca Router R2

V Tr Cng Lp H09VT10

14

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Hnh 3.8 Bng nh tuyn ca Router R3 OSPF c 5 kiu mng : Point-to-point Broadcast Multiaccess. Nonbroadcast Multiaccess (NBMA). Point-to-multipoint. Virtual links. 3.7 Qu trnh lan trn bn tin LSAs v bu chn DR v BDR trong mng Multiaccess. 3.7.1 Qu trnh lan trn bn tin LSAs. Bn tin LSAs c gi i khi khi to hoc khi c s thay i ca m hnh mng. Nh trong hnh v:

V Tr Cng Lp H09VT10

15

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Hnh 3.9 Qu trnh lan trn bn tin LSAs Do tt c router trong mng u l lt gi bn tin LSAs s lm cho lu lng mng tr nn tc nghn khng lu thng c.Gii php ua ra l phi bu chn DR v BDR. 3.7.2 Bu chn DR v BDR qun l c lu lng mng cng nh s lng bn tin LSAs ta bu DR va BDR.DR c nhim v thu thp v phn phi bn tin LSAs.BDR dung d phng trong trng hp DR khng hot ng.Cc con router khc gi l DROthers. Cch thc hot ng: Thay v phi gi lan trn bn tin LSAs th DROthers ch gi LSAs ca n cho DR v BDR s dung a chi 224.0.0.6.trong trng hp ny R1 gi LSA cho DR v BDR ,Sau BDR lng nghe xem DR co hot ng tt hay khng.sau DR c nhim v chuyn tip cc LSAs ti tt c cc router khc trong mng bng a ch 224.0.0.5.Kt qu cui cng ch 1 router lm nhim v gi lan trn cc LSAs. Cc tiu ch bu DR v BDR: DR : router vi u tin ca cng l cao nht BDR : router vi u tin ca cng l cao th 2 Nu u tin bng nhau th Router ID cao nht c s dng lm DR V Tr Cng Lp H09VT10 16

BO CO THC TP TT NGHIP Mc nh u tin l 1

GIAO THC NH TUYN OSPF

Thi gian bu chn DR v BDR ch din ra trong vng vi giy ngay sau khi router khi ng vi vic kch hot giao thc OSPF hoc mng Multiaccess. khi 1 router c bu lam DR th n vn l DR cho n khi 1 trong cc iu kin sau thay i DR b hng Tin trnh OSPF trn con DR b hng Cng Multiaccess trn con DR b hng 3.8 Metric OSPF Metric OSPF c gi l cost.OSPF s dng cost nh l metric xc nh ng i tt nht. gi tr cost cng nh cng tt v cost c tnh theo cng thc: 108 / bandwidth Bng thng mc nh l 100Mbps gi tr ny c th thay i c nh cu lnh. auto-cost reference-Bandwidth Cost ca mt tuyn ng l gi tr tch lu t 1 router ti router k tip cho ti khi n ch.

V Tr Cng Lp H09VT10

17

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Hnh 3.10 Gi tr Cost ca OSPF 3.9 Cc Cu Lnh C Bn trong OSPF Cu hnh c bn Router(config)#router ospf 10 Router(config-router)#network 10.0.0.1 0.0.0.0 area 1 Router(config-router)#network 30.0.0.1 0.0.0.0 a 2 Router(config-router)#network 0.0.0.0 255.255.255.255 area 0 Router(config-router)#auto-cost reference-bandwidth 1000 Router (config-router)#router-id 10.0.0.1 Router(config-router)#end Cu hnh priority cc interface bu DR v BDR Router(config)#interface s0/0 Router(config-if)#ip ospf priority 50 Cu hnh authentication n gin Router(config-if)#ip ospf authentication-key password Router(config-router)#area area number authentication Cu hnh authentication theo dng m ho, bo mt cao. Router(config-if)ip ospf message-digest-key key ID md5 encryption-type key Router(config-router)#area area ID authentication message-digest Cu hnh qung b mt tuyn mc nh trong OSPF: V Tr Cng Lp H09VT10 18

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Router(config-router)#default-information originate Qung b mt tuyn khc (khng phi l default): Router(config-router)#redistribute protocols subnets Cc lnh show dng kim tra cu hnh OSPF: show ip protocol show ip route show ip ospf show ip ospf interface show ip ospf database show ip ospf neighbor detail clear ip route * debug ip ospf events debug ip ospf adj

CHNG IV: M PHNG BNG PACKEY TRACER


4.1 M Hnh 1

V Tr Cng Lp H09VT10

19

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Kt qu duyt web vi tn min h09vt10ptit.com trn PC2 sau khi cu hnh OSPF :

Kt qu kim tra cc tuyn :

V Tr Cng Lp H09VT10

20

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

4.1.1 Kim tra cc cu lnh ca Router Quang Ninh Dng lnh Show running-config c nh sau: interface FastEthernet0/0 description KET NOI TOI switch1 ip address 192.168.5.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 no ip address duplex auto speed auto shutdown ! interface Serial0/0 ip address 192.168.1.2 255.255.255.0 clock rate 128000 ! interface Serial0/1 description KET NOI TOI Hai Phong V Tr Cng Lp H09VT10 21

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

ip address 192.168.3.2 255.255.255.0 clock rate 128000 ! router ospf 10 log-adjacency-changes network 192.168.5.0 0.0.0.255 area 0 network 192.168.1.0 0.0.0.255 area 0 network 192.168.3.0 0.0.0.255 area 0 ! ip classless ! line con 0 line vty 0 4 login ! end 4.1.2 Kim tra cc cu lnh ca Router Ha Noi HaNoi#show running-config Building configuration... Current configuration : 1103 bytes ! version 12.2 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname HaNoi ! interface FastEthernet0/0 description ket noi toi switch 2 ip address 192.168.4.1 255.255.255.0 duplex auto speed auto

V Tr Cng Lp H09VT10

22

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

! interface FastEthernet0/1 no ip address duplex auto speed auto shutdown ! interface Serial0/0 description KET NOI TOI Quang Ninh ip address 192.168.1.1 255.255.255.0 ! interface Serial0/1 description KET NOI TOI Hai Phong ip address 192.168.2.1 255.255.255.0 clock rate 128000 ! router ospf 10 log-adjacency-changes network 192.168.1.0 0.0.0.255 area 0 network 192.168.2.0 0.0.0.255 area 0 network 192.168.4.0 0.0.0.255 area 0 ! ip classless ! banner motd ^C day la router RA cau hinh boi Hoan ^C ! line con 0 line vty 0 4 login ! End 4.1.3 Kim tra cc cu lnh ca Router Hai Phong HaiPhong#show running-config

V Tr Cng Lp H09VT10

23

BO CO THC TP TT NGHIP Building configuration... Current configuration : 1035 bytes ! version 12.2 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname HaiPhong ! interface FastEthernet0/0 description KET NOI TOI switch3 ip address 192.168.6.3 255.255.255.0 duplex auto speed auto ! interface Serial0/0 description KET NOI TOI Ha Noi ip address 192.168.2.3 255.255.255.0 ! interface Serial0/1 description KET NOI TOI Quang Ninh ip address 192.168.3.3 255.255.255.0 ! router ospf 10 log-adjacency-changes network 192.168.2.0 0.0.0.255 area 0 network 192.168.3.0 0.0.0.255 area 0 network 192.168.6.0 0.0.0.255 area 0 ! ip classless ! line con 0

GIAO THC NH TUYN OSPF

V Tr Cng Lp H09VT10

24

BO CO THC TP TT NGHIP line vty 0 4 login ! end 4.2 M Hnh 2

GIAO THC NH TUYN OSPF

Kt qu: S thy RC l DR v RB l BDR v RA l DROTHER theo nguyn tc vi u tin nh nhau th chn Router c ID cao nht l DR sau l BDR v router c ID thp nht l DROTHER.

V Tr Cng Lp H09VT10

25

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

V Tr Cng Lp H09VT10

26

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Kim tra thi gian cc bn tin router ID v thit lp hng xm trn Ha Noi

V Tr Cng Lp H09VT10

27

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

Hnh di ta thy ngun thng tin nh tuyn cp nht t cc hng xm:

V Tr Cng Lp H09VT10

28

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

KT LUN
T nhng g trnh by trn v giao thc nh tuyn OSPF ta c th rt ra mt s kt lun sau y: nh a ch IP: Cho bit c phng thc nh a ch, cch chia a ch IP v cho bit cc lp a ch. Cc giao thc nh tuyn: a ra cc giao thc truyn trn mng, cc c im, nhc im, u im ca tng giao thc. Giao thc nh tuyn OSPF: Hiu r hn v giao thc OSPF v tm hiu c cu lnh cu hnh cho thit b M phng bng phn mm packey tracer: c cu hnh trn thit b o nhng cho mnh kinh nghim v cu hnh trn cc thit b truyn thng. Vi vic thc hin m phng trc tip trn packet tracer em c ci nhn trc quan hn v OSPF. em xin gi li cm n chn thnh ti thy Nguyn Tin Ban hng dn v gp em hon thnh bo co thc tp ny.

V Tr Cng Lp H09VT10

29

BO CO THC TP TT NGHIP

GIAO THC NH TUYN OSPF

TI LIU THAM KHO

1. Chuyn nh tuyn. Hong Trng Minh. 2. Cisco - OSPF Design Guide -2005 3. Chng 11 ca CCNAV4 (Cisco Networking Academy Program). 4. http://www.Cisco.com 5. http://www.quantrimang.com.vn 6. http://www.sara.com.vn 7. http://www.vnpro.com

V Tr Cng Lp H09VT10

30