OSPF知識點(diǎn)
OSPF基本知識點(diǎn):
優(yōu)先級10,150
metric:cost企量,參考(100M)/實(shí)際
組播地址:224.0.0.5和簸;224.0.0.6
協(xié)議號:89
OSPF基本配置:
ospf 1 router-id 10.0.1.1 開啟OSPF進(jìn)程1凳枝,設(shè)置router-id為10.0.1.1
area 0 進(jìn)入?yún)^(qū)域0
network 10.0.1.0 0.0.0.255 將10.0.1.0,0.0.0.255網(wǎng)段宣告進(jìn)區(qū)域0
mtu 1400
ospf mtu-enable
OSPF 三張表:鄰居表省古,數(shù)據(jù)庫表粥庄,路由表
display ospf peer brief 查看簡要的OSPF鄰居信息
display ospf peer 10.0.3.3 查看該地址OSPF鄰居的詳細(xì)信息
display ospf interface GigabitEthernet 0/0/0 查看該接口的OSPF信息
display ospf lsdb self-originate
display ospf lsdb router 192.168.1.254
display ip routing-table protocol ospf
OSPF 5種報文: hello , DBD , LSR ,LSU , LSAck
7種鄰居狀態(tài): Down ,init豺妓,2-way 惜互,exstart ,exchange 科侈,loading 载佳,full
4種網(wǎng)絡(luò)類型: P2P網(wǎng)絡(luò)、P2MP網(wǎng)絡(luò)臀栈、廣播型網(wǎng)絡(luò)蔫慧、NBMA網(wǎng)絡(luò)
int s0/0/1
ospf network-type broadcast
ospf network-type p2p
ospf network-type p2mp
ospf network-type nbma
4種特殊區(qū)域:
STUB Totally STUB
NSSA Totally NSSA
ospf
area 1
stub
stub no-summary
7類LSA:
1類 LSA:Router
Link ID: router ID ADV router: router ID
2類 LSA:network
Link ID: DR的接口IP ADV router: DR的router ID
3類 LSA:sum-net
Link ID: 路由route(網(wǎng)絡(luò)號) Adv Router: ABR的router ID
4類LSA:sum-asbr
Link ID: ASBR的RID Adv Router: ABR的router ID
5類LSA:ase
Link ID: 路由(外部) Adv Router: ASBR的router ID
7類LSA:NSSA
Link ID: 路由(外部) Adv Router: ASBR的router ID
4種link type:
P2P: 描述鏈路是P to P
Stubnet: 描述網(wǎng)段信息
Transit: 描述DR.BDR
Virtual-link: 描述虛鏈接
標(biāo)識一條LSA的3個要素:type,Link ID权薯,Adv Router
接口姑躲、區(qū)域、虛鏈路(骨干區(qū)域)盟蚣、OSPF認(rèn)證(keychain)
DR的選舉:接口的DR優(yōu)先級越大越優(yōu)先黍析。 接口的DR優(yōu)先級相等時,Router ID越大越優(yōu)先
OSPF開銷值、協(xié)議優(yōu)先級及計時器的修改
ospf 1
a 0
authentication-mode simple huawei 區(qū)域認(rèn)證
int g0/0/0
ospf authentication-mode simple huawei 接口認(rèn)證
ospf timer hello 10 修改該接口的hello時間
ospf timer dead 40 修改該接口的dead時間
ospf dr-priority 0 修改該接口DR優(yōu)先級
ospf cost 1 修改該接口cost值
ospf
preference 10 修改ospf協(xié)議優(yōu)先級
bandwidth-reference 100000 修改默認(rèn)帶寬
OSPF被動接口
ospf 1
silent-interface g0/0/1
OSPF域間聚合: 在ABR 上進(jìn)行區(qū)域間的路由聚合
ospf
area 1
abr-summary 20.0.0.0 255.255.252.0
外部聚合:在ASBR上進(jìn)行外部路由聚合
ospf
asbr-summary 5.5.5.0 255.255.255.252
不規(guī)則區(qū)域的解決辦法(虛鏈路)
ospf
area 1
vlink-peer 3.3.3.3 鄰居的router-id
vlink-peer 2.2.2.2 hmac-md5 1 plain huawei
display ospf vlink
OSPF 選路規(guī)則 :
區(qū)域內(nèi)的 > 區(qū)域間的 > TYPE 1 > TYPE2
type1的cost=內(nèi)部+外部;
type2的cost=外部
OSPF外部路由引入:
默認(rèn)值:cost=1居触;tag=1梁丘;type=2;優(yōu)先級=150
ospf
import-route direct
下放默認(rèn)路由:
ip route-static 0.0.0.0 0.0.0.0 202.103.68.5
ospf
default-route-advertise 下放默認(rèn)路由
ospf
default-route-advertise always 自動生成默認(rèn)路由
OSPF在FR中的應(yīng)用
OSPF協(xié)議中Forwarding Address的理解
鄰接建不起來的原因:
1) hello間隔和dead 間隔不同祝高; 接口下OSPF網(wǎng)絡(luò)類型不匹配恬偷。
2) 區(qū)域號碼不一致供炎;
3) 特殊區(qū)域(如stub额划,nssa等)區(qū)域類型不匹配妙啃;
4) 認(rèn)證類型或密碼不一致;
5) 路由器 router-id 相同俊戳;
6) 鏈路上的 MTU 不匹配揖赴;
7)在broadcast鏈路上的子網(wǎng)掩碼不匹配
8)在MA 網(wǎng)絡(luò)中,沒有DR
9)接口設(shè)置為 silent-interface