OSPF簡單配置指令

2021-09-11 06:05:39 字數 1512 閱讀 4168

ospf區域劃分規則:

1、必須為星型結構----區域0為骨幹,中心站點

2、abr–區域邊界路由器

ospf 配置

r1(config)#router ospf 1    啟動時需要配置程序號,僅具有本地意義

r1(config-router)#router-id 1.1.1.1 配置rid,要求為全網唯一;

r1(config-router)#network 1.1.1.1 0.0.0.0 area 0

r1(config-router)#network 12.1.1.0 0.0.0.255 area 0 (反掩碼)

配置完成後可以檢視鄰居表

r2#show ip ospf neighbor
ospf擴充套件配置

認證 ——直接在連線鄰居的介面上配置

先開啟認證服務

r1(config)#inte***ce s1/1

r1(config-if)#ip ospf authentication message-digest

再配置認證的秘鑰和模式、編號

r1(config-if)#ip ospf message-digest-key 1 md5 cisco123   密文認證
r1 (config-if)#ip ospf authentication-key 1 cisco   明文認證
區域的認證

router(config)#router ospf 100

router(config-router)#area 0 authentication 明文認證

router(config)#router ospf 100

router(config-router)#area 0 authentication message-digest 密文認證

加快收斂 ——在直連鄰居的介面上修改,且鄰居間time 必須完全一致,否則無法保持鄰居關係

r1(config)#inte***ce s1/1

r1(config-if)#ip ospf hello-interval 5 修改本端的hello time,本端的dead time自動4倍關係匹配;

被動介面 ——僅接收不傳送路由協議資訊,用於連線使用者的介面,不得用於連線鄰居的介面

r2(config)#router ospf 1 

r2(config-router)#passive-inte***ce loopback 0

預設路由 ——在邊界路由器上配置預設資訊後,向內網傳送預設路由

r4(config)#router ospf 1 

r4(config-router)#default-information originate always

ospf簡單總結

二 ospf的特殊區域 1.stub區域 stub 設定為末節區域,不接收外部路由且能後到達外部網段,即4 5類不可進入,並且產生一條預設三類lsa 整個區域都要做 router ospf 100 area 1 stub 末節路由器的abr需要 自動 預設,否則無法與其他區域通訊 metric為種子...

OSPF協議配置

r0路由器上的配置 router en router conf t router config intf0 0 router config if ipadd 192.168.1.1 255.255.255.0 router config if noshut router config if ints...

OSPF高階配置

ospf高階配置 一 路由重分發。1 理解路由重分發 1 乙個單一ip路由協議是管理網路中ip路由的首選方案 2 ciscao ios能執行多個路由協議,每乙個路由協議和該路由協議所服務的網路屬於同乙個自治系統 3 cisco ios使用路由重分發特性以交換由不同協議建立的路由資訊 2 路由重分發的...