You are on page 1of 43

Nhm 5a:

L T Qun - 20093793 Nguyn Huy Tam - 20093790 Phm Vn Cng - 20093797

Ni dung chnh
1. Khi nim 2. c im

A. OSPF

3. Hot ng ca Router

4. Cu hnh

B. BGP

5. OSPF a vng

A. OSPF

I. Khi nim giao thc OSPF


Open Shortest Path First.

Kiu Link-State (trng thi ng lin kt)


c nh ngha bi OSPFv2 trong RFC 2328

(1998: IPv4), OSPVv3 trong RFC 5340 ( 2008: IPv4). L mt chun m. Ph hp vi mng ln, c kh nng m rng c s dng rng ri trong cc mng doanh nghip ln.

II. C IM OSPF

II. C IM OSPF 1. Kiu Link - State


Duy tr chng lp v bng nh tuyn

chnh xc. S dng a ch Multi Cast v cc cp nht thay i. Bng nh tuyn c gi y sau mi 30 pht. S dng thut ton Dijkstra tm ng i ngn nht.

II. C IM OSPF 2. AD bng 110


Vit tt ca Administrative Distance. Router s dng tnh nng phn loi

tin cy tm ng. AD chnh l u tin ca mi giao thc. AD cng thp th cng c u tin.

II. C IM OSPF
3. C Metric = Cost = 10^8/BW(bps). 4. S dng giao thc Internet Protocol vn chuyn cc gi tin OSPF. 5. C Protocol ID = 89.

AD ca mt s giao thc

III. Hot ng ca Router khi tham gia nh tuyn OSPF

1. Router ID
L gi tr m Router t bu cho mnh

C nh dng l a ch IP
Dng nh danh Router khi tham

gia vo mng Chn Router ID nh sau: - Chn IP cao nht - u tin cng loopback

V d v la chn Router ID

2. Thit lp quan h
2 Router chy OSPF kt ni trc tip vi nhau s

thit lp quan h lng ging Gi gi tin Hello 10s/ln (Ti a ch 224.0.0.5) Ch gi tin Dead Time 30s/ln iu kin thit lp lng ging: - Cng Area ID - Subnet/ Subnet-Mask - Hello/Dead time phi ging nhau trn 2 cng - Cng ch Authentication (Xc thc). - Stub Area Flag phi cung bt hoc tt (Dng cho OSPF a vng)

3. Trao i Link-State Database


Mc ch: Xy dng bn mng. a. Link-Sate Database c chia nh thnh cc LinkState-Adverstisement (LSA): - LSA l bng c s d liu, c dng trong Dijkstra. - c cc Router trao i vi nhau Minh ha trao i LSA

3. Trao i Link-State Database


b. LSA c ng gi vo cc gi tin: - Gi Hello: c dng pht hin, trao i thng tin vi cc Router cn k. - Gi Database Desciption: la chn Router no s c trao i thng tin trc. - Link-State Request: Ch nh loi LSA no tham gia vo trao i cc gi tin DBD. -Link-State Update - Link-State Acknowledge: Bo hiu nhn gi Update.

3. Trao i Link-State Database


c. Cc loi mng khi trao i LSDB: - BroadCast Multi Access: Mng qung b a truy cp, VD: Ethernet. - Mng point-to-point. - NonbroadCast MultiAccess: mng khng qung b a truy cp, VD: Frame Relay, ATM - Mng Point-to-Multipoint: c dng cho nh qun tr cu hnh cho mt cng Router.,

Trao i Link-State Database


d. Bu chn DR v BDR - Mc ch: Gim thiu cc kt ni - DR (Designated Router): Qun l mt area - BDR lm "d b cho DR. - Khi c Router mi tham gia mng: + Router mi gi hello packet ti DR ly thng tin, xc nhn neighbor,xc nhn quyn hn. + DR s thng bo vi cc Router cn li v Router mi ny. - Khi c s thay i v link: Router kt ni trc tip vi link s bo cho DR, DR s flood LSAs nhn t Router ra ton mng.

Trao i Link-State Database

4. Xy dng bng nh tuyn


Cc Router chy gii thut Dijkstra.

Da vo bn mng c xy dng

bc trn. Kt qu lu vo bng nh tuyn. Bng nh tuyn c dng tnh ng i n cc Router khc.

IV. CU HNH OSPF

IV. Cu hnh OSPF


1. Chy OSPF
Router(config) # Router ospf process id Router(config-router)#network ip wildcard-mask area Router(config-router)# area area-id virtual-link router-id.

2. Mt s lnh kim tra cu hnh


Router#show ip route ospf Router# show ip ospf neighbor Router# show ip ospf database .

V. OSPF A VNG

V. OSPF A VNG
Chia mng thnh cc vng (AREA) khc nhau. Gip gim tiu tn b nh v ti nguyn CPU

khi chy OSPF. Cc Router ch phi ghi nh thng tin trong vng.

V. OSPF A VNG
-

c im: Cc vng c t tn ln lt Area 0, 1, 2, 3, . L cc vng Logic. Area 0 l vng xng sng. Cc vng khc trao i thng tin qua Area 0. Cc thit b ca Area 0 phi n nh v mnh m.

Ni dung chnh

A. OSPF
1. Khi nim 2. Cc thuc tnh

B. BGP

B. BGP

1. Khi nim BGP


Border Gateway Protocol. BGP l giao thc kiu Path Vector. L giao thc nng ct trn Internet. Kt ni cc AS (Autonomous System).

2. Cc thuc tnh ca BGP


-

Cc thuc tnh c chia thnh 4 nhm: Nhm well-known mandatory: c qung b n tt c cc Router (Bt buc) Nhm well-known discretionary: Khng bt buc tt c cc Router phi bit. Nhm Optional transitive: Thuc tnh thuc nhm ny s c chuyn n cc Router khng hiu n. Nhm Optional nontransitive: Thuc tnh thuc nhm ny se khng c chuyn tip nu Router khng hiu n.

2. Cc thuc tnh ca BGP


a. Thuc tnh Weight.

- L trng s nh tuyn. - C gi tr cc b trn mi Router - Cng ln th cng c u tin.

2. Cc thuc tnh ca BGP


b. Thuc tnh Local preference (LOCAL_PREF) - Thuc nhm well-known discretionary. - L mt s 32 bit, c gi tr trong 1 AS. - Cng ln th cng c u tin.

2. Cc thuc tnh ca BGP


c. Thuc tnh AS_PATH. - Thuc nhm well-known mandatory. - L mt s16 bit, c chia lm 2 loi: AS public v AS private. - chn tuyn v chng loop cho mng BGP.

2. Cc thuc tnh ca BGP


d. Thuc tnh MED (metric). - Thuc nhm Optional Nontransitive - c s dng gia cc AS. - u tin gi tr nh. - ng sau Weight, Local_Pref v As_Path

2. Cc thuc tnh ca BGP


e. Thuc tnh ORIGIN.
Thuc nhm wellknown mandatory

Cho bit cch m cc tuyn c hc

IGP: T lnh Network


EGP: T mt EGP hng xm Incomplete: Thng qua Redistribution

2. Cc thuc tnh ca BGP


f. Thuc tnh Next-hop
L tiu ch u tin kim tra iu kin nh tuyn

Nu Next-Hop khng t, qu trnh s chm dt trn Router

III. THIT LP MI QUAN H GIA CC ROUTER TRONG BGP

III. Thit lp mi quan h


Cn ch r hng xm cho tng Router. Tri qua 6 bc:

Idle State Connect State Active State OpenSent State OpenConfirm State Entablished

Cu trc cc thng bo trong BGP:


Thng bo Open
Cc loi thng bo

Thng bo Update
Thng bo NOTIFICATION

Thng bo Open

Thng bo Update

Thng bo NOTIFICATION

IV. Qu trnh nh tuyn trong BGP

IV. Qu trnh nh tuyn..


Th t u tin nh sau: - u tin tuyn c WEIGHT cao nht. - u tin cc tuyn c LOCAL_PREF cao nht. - u tin cc tuyn gc. - u tin tuyn c AS_PATH thp nht. - u tin theo tht IGP, EGP v INCOMPLETE. - u tin tuyn c MED thp nht. - u tin cc tuyn EGP hn IGP. - u tin cc tuyn c IGP metric thp nht n BGP NEXT_HOP. - u tin nhng tuyn tBGP router c Router-id nh nht.

IV. Qu trnh nh tuyn..

S minh ha th t u tin