CISCO 動態路由(OSPF)


OSPF(開放式最短路徑優先):是一個內部網關協議(Interior Gateway Protocol,簡稱IGP),用於在單一自治系統(autonomous system,AS)內決策路由。是對鏈路狀態路由協議的一種實現,隸屬內部網關協議(IGP),故運作於自治系統內部。OSPF是鏈路狀態協議。

網絡拓撲圖

實驗過程: 

R1配置如下:

R1>enable
R1#configure terminal
R1(config)#no ip domain-lookup
R1(config)#hostname R1
R1(config)#int f0/0
R1(config-if)#no shutdown
R1(config-if)#ip address 68.1.1.2 255.255.255.0
R1(config-if)#exit
R1(config)#int loopback 0  
R1(config-if)#ip address 7.7.7.7 255.255.255.0
R1(config-if)#exit
R1(config)#route ospf 1   #啟用ospf協議
R1(config-router)#network 7.7.7.7 area 0
R1(config-router)#network 68.1.1.2 area 0
R1(config-router)#end
R1#write

R2配置如下:

R2>enable
R2#configure terminal
R2(config)#no ip domain-lookup
R2(config)#hostname R2
R2(config)#int f0/0
R2(config-if)#no shutdown
R2(config-if)#ip address 68.1.1.3 255.255.255.0
R2(config)#int f0/1
R2(config-if)#no shutdown
R2(config-if)#ip address 86.1.1.4 255.255.255.0
R2(config-if)#exit
R2(config)#int loopback 0
R2(config-if)#ip address 8.8.8.8 255.255.255.0
R2(config-if)#exit
R2(config)#route ospf 1
R2(config-router)#network 8.8.8.8 area 0    
R2(config-router)#network 68.1.1.3 area 0
R2(config-router)#network 86.1.1.4 area 0
R2(config-router)#end
R2#write 

配置R3如下:

R3>enable
R3#configure terminal
R3(config)#no ip domain-lookup
R3(config)#hostname R3
R3(config)#int f0/0
R3(config-if)#no shutdown
R3(config-if)#ip address 86.1.1.5 255.255.255.0
R3(config-if)#exit
R3(config)#int loopback 0
R3(config-if)#ip address 9.9.9.9 255.255.255.0
R3(config-if)#exit
R3(config)#route ospf 1
R3(config-router)#network 9.9.9.9 area 0    
R3(config-router)#network 86.1.1.5 area 0
R3(config-router)#end
R3#write


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM