【正文】
,定制地址。當 databases構(gòu)建完成,運用 SPF算法計算出從本節(jié)點出發(fā)到達其他路由節(jié)點的 loopfree的路徑,并組成 SPF 的 tree結(jié)構(gòu)。在 NBMA和 multipoint類型接口則采用單點地址。 ? Broadcast works – 通過組播 據(jù)。在需要選擇 DR/BDR的區(qū)域,選擇最佳選擇。優(yōu)先級為 0的鄰居不參加選舉 – 如果 DR沒有選出或者不響應(yīng),則 BDR轉(zhuǎn)為 DR角色,而后選舉新的 BDR。 ? 所有路由器根據(jù)收集到的 LSA集合,建立 Linkstate databases。通過交互,路由維護各自鄰居信息。 ? NBMA works – 不能使用組播地址傳送數(shù)據(jù),鄰居關(guān)系需要手工指定, DR/BDR選舉出后,所有的數(shù)據(jù)均為單播地址傳送。 ? 通過 loopback interface或者直接設(shè)定 router ID的方式為每一臺路由指定 RID ? 在路由器上啟用 OSPF,并配置 RID ? 配置路由的各個接口地址參數(shù) ? 需要時指定 OSPF的鄰居節(jié)點 ? 需要時設(shè)置特殊 area類型 ? 設(shè)置其他 OSPF運行參數(shù)選項,如 hello interval/deadinterval, route summarization,authencation等 配置 OSPF協(xié)議 —— 劃分區(qū)域 ?劃分區(qū)域的基本原則 –按照自然的地區(qū)或者行政單位劃分 –按照網(wǎng)絡(luò)中的高端路由器來劃分 –按照 IP地址的規(guī)律 ?一些制約條件 –區(qū)域的規(guī)模 –與骨干區(qū)域連通 – ABR的處理能力 啟動 OSPF協(xié)議的基本配置 1. Enabling an OSPF process using the router ospf processid mand. 2. Assigning areas to the interfaces using the work work or IP address mask areaid mand. 3. Processid can be a value between 0 and 65,535 4. Wildcard mask NOT sub mask used with work mand 啟動 OSPF協(xié)議的基本配置 ?配置路由器的 Router ID – [Quidway] router id ?啟動 OSPF協(xié)議 – [Quidway] ospf enable ?配置 OSPF區(qū)域 – [QuidwaySerial0] ospf enable area area_id OSPF 基本配置樣例一 router ospf 63 work . area 1 work area 0 work area 1 Area 0 Area 1 E1 T0 E0 E2 TokenRingOSPF基本配置樣例二 ? Router5configure terminal ? Enter configuration mands, one per line. End with CNTL/Z. ? Router5(config)router ospf 87 ? Router5(configrouter)work area 0 ? Router5(configrouter)exit ? Router5(config)end ? Router5 OSPF基本配置樣例三 ? Router9configure terminal ? Enter configuration mands, one per line. End with CNTL/Z. ? Router9(config)router ospf 87 ? Router9(configrouter)exit ? Router9(config)interface FastEther0/0 ? Router9(configif)ip address ? Router9(configif)ip ospf 87 area 10 ? Router9(configif)exit ? Router9(config)end ? Router9 OSPF的附加配置 OSPF flooding Reduction/Tuning OSPF ? Router(configif) ip ospf floodreduction – 默認 LSA flooding每 3600秒( 1小時)進行一次,此命令可禁止 flooding ? Router(configif) ospf databasefilter all out – 禁止在指定接口向外傳送 LSA ? Router(configrouter) neighbour ip_address databasefilter all out – 禁止向特定的 neighbour傳送 LSA ? Router(configif) ip ospf hellointerval interal_in_seconds ? Router(configif) ip ospf deadinterval dead_interval_in_seconds ? Router(configif) ip ospf retransmitinterval ? Allows routinginformation exchange between OSPF and other routing protocols OSPF Route Redistribution OSPF RIP IGRP Enhanced IGRP ISIS BGP EGP Router (configrouter) redistribute protocol [ processid ] [ metric value ] [ metrictype value ] [ subs ] OSPF Redistribution Command ? Redistributes routes from OSPF into other routing protocols (and vice versa) OSPF Redistribution Example 1 Redistribution between RIP and OSPF RIP OSPF Area 0 S0 S1 R1 OSPF Redistribution Example 1 router ospf 109 work area 0 work area 0 redistribute rip subs metrictype 1 metric 20 router rip work passiveinterface serial 0 passiveinterface serial 1 defaultmetric 10 redistribute ospf 109 match internal external 1 external 2 OSPF Redistribution Example 2 Back door creates potential loop RIP RIP OSPF Area 0 RIP Avoiding Loops R2 R3 R2 R1 Redistribution Example 2 cont router ospf 109 work area 0 work area 0 redistribute rip subs metrictype 1 metric 20 distributelist 11 out rip accesslist 11 permit ? Minimizes routing table entries ? Localizes impact of a topology change OSPF Route Summarization Area 0 Backbone ABRs Area 1 Summarization x O O O O O O O Routing Table for B Routing Table for C IA ? Interarea (IA) summary link carries mask