日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

OSPF配置命令

發布時間:2023/12/14 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 OSPF配置命令 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

一)常用:
router ospf 1?
router-id 1.1.1.1
network 1.1.1.1 0.0.0.0 area 0

二)配置特殊區域
area 1 stub
area 1 default-cost 5 ? ? ? ? ? ? ? ? ///將下發的默認路由的cost設置為5,默認是1
area 1 stub no-summary ? ? ? ? ? ///totally stub
area 1 nssa
area 1 nssa default-information-originate ? ? //NSSA下發默認路由
area 1 nssa default-information-originate metric6 metric-type 1 ? ? ? ? ? Metric-type 1的作用是將N2類型的路由改為N1類型的路由
area 2 nssa no-redistribution ? ? ????在ABR上做,阻止ABR上所直連的其它外部區域的路由進入nssa區域
area 1 nssa no-summary? ? ? ? ? ? ? ?///totally NSSA

三)配置認證:
1)接口 認證:
??明文認證:
??????interface f0/0
??????ip ospf authentication-key password?
???????ip ospf authentication
??密文認證:
???????interface f0/0
???????ip ospf message-digest-key 1 md5 passwork?
??????? ? ip ospf authentication message-digest
2)區域認證:
??明文認證:
???????interface f0/0
???????ip ospf authentication-key password
???????router ospf 1
???????area 1 authentication
??密文認證:
???????interface f0/0
???????ip ospf message-digest-key 1 md5 password
???????router ospf 1
???????area 0 authentication message-digest

四)配置被動接口
1)單個配置:
?Router(config-router)#passive-interface f0/0
2)被動接口較多時配置:--先將所有接口設置為被動接口,在設置特定接口為非被動接口
?Router(config-router)#passive-interface default?
?Router(config-router)#no passive-interface f0/0

五)匯總路由
1)外部路由匯總:---在ASBR上配置
?router ospf 1
?summary-address 10.1.0.0 255.255.0.0
2)區域間路由匯總:---在ABR上配置
?router ospf 1
?area 2 range 172.16.0.0 255.255.0.0 cost 1

六)修改ospf 優先級、Hello時間、失效時間、帶寬、開銷
?interface f0/0
?ip ospf priority 0
?ip ospf hello-interval 10
?ip ospf dead-interval 40
?bandwidth 5000
?ip ospf cost 30

七)下發默認路由
1)在有默認路由的情況下--只有存在默認路由才會下發,默認路由失效,下發的默認路由也會失效
? router ospf 1
? default-information originate
2)在沒有默認路由的情況下--無論是否存在默認路由,都會下發,且當默認路由失效后,也不會消失
? router ospf 1
? default-information originate always

八)Tunnel
R2(config)#int tunnel 23
R2(config-if)#tunnel source 2.2.2.2 ?
R2(config-if)#tunnel destination 3.3.3.3
R2(config-if)#ip address 23.1.1.2 255.255.255.0 ?
R2(config-if)#ip ospf 100 area 2

九)Virtual Link
在配置虛鏈路的兩端配置如下命令
area 2 virtual-link 4.4.4.4

十)修改路由AD值
router ospf 1
///100為修改的AD值,4.4.4.4 是源IP,0.0.0.0是反掩碼,66是ACL--ACL匹配的收到的路由才會生效(該命令對所有協議都適用,但AD值只在本地有效)
distance 100 4.4.4.4 0.0.0.0 66
十一)排錯常用命令
debug ip ospf adj??///查看ospf鄰接形成過程
debug ip ospf events???//調試所有ospf事件
show ip ospf neighbor ? ///查看ospf鄰居
show ip ospf interface ??///查看接口OSPF相關信息
show interface ???///查看接口
show ip ospf database ??///查看OSPF的LSDB
show ip route ????///查看路由表
show ip route ospf ??///查看ospf的路由表
show ip protocols????///查看當前正在運行的路由協議的詳細信息
show ip ospf border-routers ???///可以看到ASBR和ABR,但不能看到自已的角色,只能看到其它路由器的角色
show ip ospf virtual-link???//查看virtual-link

十二)其他
clear ip ospf process ? ? ? 重新啟動OSPF路由選擇進程


歡迎補充!!

總結

以上是生活随笔為你收集整理的OSPF配置命令的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。