思科Cisco路由器配置——使用OSPF協(xié)議實(shí)現(xiàn)的全網(wǎng)互通配置實(shí)驗(yàn)詳解

本文實(shí)例講述了思科Cisco使用OSPF協(xié)議實(shí)現(xiàn)的全網(wǎng)互通配置實(shí)驗(yàn)。分享給大家供大家參考,具體如下:
一、實(shí)驗(yàn)?zāi)康?/strong>:用OSPF協(xié)議使全網(wǎng)互通
二、拓?fù)鋱D
三、具體步驟配置
(1)R1路由器配置
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R1 R1(config)#interface f0/0 R1(config-if)#ip address 192.168.1.2 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#interface s0/0/0 R1(config-if)#ip address 10.1.1.1 255.255.255.0 R1(config-if)#clock rate 64000 R1(config-if)#no shutdown R1(config-if)#interface s0/0/1 R1(config-if)#ip address 30.1.1.1 255.255.255.0 R1(config-if)#clock rate 64000 This command applies only to DCE interfaces R1(config-if)#no shutdown R1(config-if)#exit R1(config)#router ospf 1 R1(config-router)#router-id 1.1.1.1 R1(config-router)#network 192.168.1.0 0.0.0.255 area 0 R1(config-router)#network 10.1.1.0 0.0.0.255 area 0 R1(config-router)#network 30.1.1.0 0.0.0.255 area 0 R1(config-router)#end
(2)R2路由器配置
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R2 R2(config)#interface f0/0 R2(config-if)#ip address 192.168.2.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#interface s0/0/0 R2(config-if)#ip address 20.1.1.1 255.255.255.0 R2(config-if)#clock rate 64000 R2(config-if)#no shutdown R2(config-if)#interface s0/0/1 R2(config-if)#ip address 10.1.1.2 255.255.255.0 R2(config-if)#clock rate 64000 This command applies only to DCE interfaces R2(config-if)#no shutdown %LINK-5-CHANGED: Interface Serial0/0/1, changed state to down R2(config-if)#exit R2(config)#router ospf 1 R2(config-router)#router-id 2.2.2.2 R2(config-router)#network 192.168.2.0 0.0.0.255 area 0 R2(config-router)#network 20.1.1.0 0.0.0.255 area 0 R2(config-router)#network 10.1.1.0 0.0.0.255 area 0 R2(config-router)#end
(3)R3路由器配置
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R3 R3(config)#interface f0/0 R3(config-if)#ip address 192.168.3.1 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#interface s0/0/0 R3(config-if)#ip address 30.1.1.2 255.255.255.0 R3(config-if)#clock rate 64000 R3(config-if)#no shutdown %LINK-5-CHANGED: Interface Serial0/0/0, changed state to down R3(config-if)#interface s0/0/1 R3(config-if)#ip address 20.1.1.2 255.255.255.0 R3(config-if)#clock rate 64000 This command applies only to DCE interfaces R3(config-if)#no shutdown %LINK-5-CHANGED: Interface Serial0/0/1, changed state to down R3(config-if)#exit R3(config)#router ospf 1 R3(config-router)#router-id 3.3.3.3 R3(config-router)#network 192.168.3.0 0.0.0.255 area 0 R3(config-router)#network 30.1.1.0 0.0.0.255 area 0 R3(config-router)#network 20.1.1.0 0.0.0.255 area 0 R3(config-router)#end
(4)R4路由器配置
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R4 R4(config)#interface f0/0 R4(config-if)#ip address 192.168.1.1 255.255.255.0 R4(config-if)#no shutdown R4(config-if)#interface f0/1 R4(config-if)#ip address 192.168.10.254 255.255.255.0 R4(config-if)#no shutdown R4(config-if)#exit R4(config)#router ospf 1 R4(config-router)#router-id 4.4.4.4 R4(config-router)#network 192.168.1.0 0.0.0.255 area 0 R4(config-router)#network 192.168.10.0 0.0.0.255 area 0 R4(config-router)#end
(5)R5路由器配置
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R5 R5(config)#interface f0/0 R5(config-if)#ip address 192.168.3.2 255.255.255.0 R5(config-if)#no shutdown R5(config-if)#interface f0/1 R5(config-if)#ip address 192.168.30.254 255.255.255.0 R5(config-if)#no shutdown R5(config-if)#exit R5(config)#router ospf 1 R5(config-router)#router-id 5.5.5.5 R5(config-router)#network 192.168.3.0 0.0.0.255 area 0 R5(config-router)#network 192.168.30.0 0.0.0.255 area 0 R5(config-router)#end
(6)R6路由器配置
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R6 R6(config)#interface f0/0 R6(config-if)#ip address 192.168.2.1 255.255.255.0 R6(config-if)#no shutdown R6(config-if)#interface f0/1 R6(config-if)#ip address 192.168.20.254 255.255.255.0 R6(config-if)#no shutdown R6(config-if)#exit R6(config)#router ospf 1 R6(config-router)#router-id 6.6.6.6 R6(config-router)#network 192.168.2.0 0.0.0.255 area 0 R6(config-router)#network 192.168.20.0 0.0.0.255 area 0 R6(config-router)#end
四、驗(yàn)證測(cè)試
1、查看R1路由表信息
2、查看ip路由協(xié)議配置與統(tǒng)計(jì)信息
3、查看OSPF數(shù)據(jù)庫(kù)信息
4、查看OSPF進(jìn)程及區(qū)域的細(xì)節(jié)。如路由器運(yùn)行SPF算法的次數(shù)
5、測(cè)試各臺(tái)主機(jī)間是否互通
(1)PC1與PC2
(2)PC2與PC3
(3)PC3與PC1
相關(guān)文章
思科Cisco路由器配置——RIP路由全網(wǎng)互通配置實(shí)驗(yàn)詳解
這篇文章主要介紹了思科Cisco RIP路由全網(wǎng)互通配置實(shí)驗(yàn),詳細(xì)分析了思科Cisco基于rip協(xié)議的全網(wǎng)互通配置相關(guān)步驟、配置命令與操作注意事項(xiàng),需要的朋友可以參考下2020-02-28思科Cisco路由器配置——基于OSPF協(xié)議的路由重分布配置實(shí)驗(yàn)詳解
這篇文章主要介紹了思科Cisco基于OSPF協(xié)議的路由重分布配置實(shí)驗(yàn),結(jié)合具體實(shí)驗(yàn)案例形式詳細(xì)分析了思科Cisco基于OSPF協(xié)議的路由重分布全網(wǎng)互通相關(guān)原理、配置命令與操作注意2020-02-27思科Cisco路由器配置——基于rip協(xié)議的路由重分布配置實(shí)驗(yàn)詳解
這篇文章主要介紹了思科Cisco基于rip協(xié)議的路由重分布配置實(shí)驗(yàn),結(jié)合具體實(shí)驗(yàn)案例形式分析了思科Cisco基于rip協(xié)議實(shí)現(xiàn)的路由重分布全網(wǎng)互通配置操作具體實(shí)現(xiàn)步驟、配置命令2020-02-27思科Cisco路由器配置——浮動(dòng)靜態(tài)路由配置實(shí)驗(yàn)詳解
這篇文章主要介紹了思科Cisco浮動(dòng)靜態(tài)路由配置實(shí)驗(yàn),總結(jié)分析了思科Cisco浮動(dòng)靜態(tài)路由配置具體步驟、配置命令及相關(guān)操作注意事項(xiàng),需要的朋友可以參考下2020-02-26思科Cisco路由器配置——RIP路由配置實(shí)驗(yàn)詳解
這篇文章主要介紹了思科Cisco路由器配置RIP路由配置實(shí)驗(yàn),詳細(xì)分析了思科Cisco配置RIP路由的具體原理、步驟、配置命令與操作注意事項(xiàng),需要的朋友可以參考下2020-02-26思科Cisco路由器配置——靜態(tài)路由全網(wǎng)互通配置實(shí)驗(yàn)詳解
這篇文章主要介紹了思科Cisco靜態(tài)路由全網(wǎng)互通配置實(shí)驗(yàn),詳細(xì)分析了思科Cisco靜態(tài)路由設(shè)置固定IP實(shí)現(xiàn)全網(wǎng)互通的相關(guān)步驟、配置命令與操作注意事項(xiàng),需要的朋友可以參考下2020-02-24思科Cisco路由器配置——靜態(tài)路由實(shí)現(xiàn)回環(huán)地址測(cè)試實(shí)驗(yàn)詳解
這篇文章主要介紹了思科Cisco路由器配置靜態(tài)路由實(shí)現(xiàn)回環(huán)地址測(cè)試實(shí)驗(yàn),詳細(xì)分析了思科基于靜態(tài)路由的全網(wǎng)互聯(lián)配置相關(guān)步驟、配置命令與操作注意事項(xiàng),需要的朋友可以參考下2020-02-24思科Cisco路由器配置——單臂路由實(shí)現(xiàn)VLAN間通信實(shí)驗(yàn)詳解
這篇文章主要介紹了思科Cisco路由器配置單臂路由實(shí)現(xiàn)VLAN間通信實(shí)驗(yàn),總結(jié)分析了基于單臂路由實(shí)現(xiàn)VLAN間通信的具體步驟、操作命令及相關(guān)注意事項(xiàng),需要的朋友可以參考下2020-02-23思科Cisco路由器與交換機(jī)配置——配置文件和系統(tǒng)映像備份與恢復(fù)實(shí)驗(yàn)案
這篇文章主要介紹了思科Cisco交換機(jī)配置文件和系統(tǒng)映像備份與恢復(fù)實(shí)驗(yàn),結(jié)合具體案例形式詳細(xì)分析了思科Cisco交換機(jī)備份配置文件和系統(tǒng)映像到TFTP服務(wù)器,以及恢復(fù)備份的相關(guān)2020-02-18思科Cisco路由器與交換機(jī)配置——交換機(jī)默認(rèn)網(wǎng)關(guān)實(shí)現(xiàn)跨網(wǎng)段telnet案例
這篇文章主要介紹了思科Cisco交換機(jī)默認(rèn)網(wǎng)關(guān)實(shí)現(xiàn)跨網(wǎng)段telnet,結(jié)合具體案例形式分析了思科Cisco交換機(jī)跨網(wǎng)段telnet配置的具體實(shí)現(xiàn)步驟與相關(guān)操作命令,需要的朋友可以參考下2020-02-14