思科Cisco路由器配置——基于rip協(xié)議的路由重分布配置實(shí)驗(yàn)詳解

本文實(shí)例講述了思科Cisco基于rip協(xié)議的路由重分布配置實(shí)驗(yàn)。分享給大家供大家參考,具體如下:
一、實(shí)驗(yàn)?zāi)康?/strong>:使用路由重分布達(dá)到全網(wǎng)互通
二、拓?fù)鋱D:
三、具體實(shí)驗(yàn)步驟配置
先給各個(gè)主機(jī)配置ip地址和網(wǎng)關(guān)以PC1為例:
(1)R1路由器配置
Router>enable --進(jìn)入特權(quán)模式 Router#configure terminal --進(jìn)入全局配置 Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R1 --修改路由器名為R1 R1(config)#interface s0/0/0 --進(jìn)入端口 R1(config-if)#ip address 192.168.32.2 255.255.255.0 --配置端口ip地址 R1(config-if)#no shutdown --激活端口 R1(config-if)#clock rate 64000 --配置時(shí)鐘速率 R1(config-if)#interface s0/1/0 --進(jìn)入端口 R1(config-if)#ip address 192.168.12.1 255.255.255.0 --配置端口ip地址 R1(config-if)#no shutdown --激活端口 R1(config-if)#clock rate 64000 --配置時(shí)鐘速率 This command applies only to DCE interfaces R1(config-if)#interface s0/0/1 --進(jìn)入端口 R1(config-if)#ip address 192.168.22.1 255.255.255.0 --配置端口ip地址 R1(config-if)#no shutdown --激活端口 R1(config-if)#clock rate 64000 --配置時(shí)鐘速率 This command applies only to DCE interfaces R1(config-if)#exit --返回上一級(jí) R1(config)#route rip --開啟rip協(xié)議 R1(config-router)#version 2 版本2 R1(config-router)#network 192.168.12.0 --添加直連網(wǎng)段到rip R1(config-router)#network 192.168.22.0 R1(config-router)#exit --返回上一級(jí) R1(config)#ip route 192.168.42.0 255.255.255.0 192.168.32.1 --配置靜態(tài)路由 R1(config)#router rip --開啟路由重分布 R1(config-router)#redistribute static --重分布靜態(tài)路由 R1(config-router)#redistribute connected --重分布直連路由 R1(config-router)#end --返回特權(quán)模式
(2)R2路由器配置
Router>enable --進(jìn)入特權(quán)模式 Router#configure terminal --進(jìn)入全局配置模式 Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R2 --修改路由器名為R1 R2(config)#interface s0/1/0 --進(jìn)入端口 R2(config-if)#ip address 192.168.12.2 255.255.255.0 --為端口配置ip地址 R2(config-if)#no shutdown --激活端口 R2(config-if)#clock rate 64000 --配置時(shí)鐘速率 R2(config-if)#interface s0/0/1 --進(jìn)入端口 R2(config-if)#ip address 192.168.23.2 255.255.255.0 --為端口配置ip地址 R2(config-if)#no shutdown --激活端口 %LINK-5-CHANGED: Interface Serial0/0/1, changed state to down R2(config-if)#clock rate 64000 --配置時(shí)鐘速率 R2(config-if)#interface s0/0/0 --進(jìn)入端口 R2(config-if)#ip address 192.168.13.1 255.255.255.0 --為端口配置ip地址 R2(config-if)#no shutdown --激活端口 %LINK-5-CHANGED: Interface Serial0/0/0, changed state to down R2(config-if)#clock rate 64000 --配置時(shí)鐘速率 R2(config-if)#exit --返回上一級(jí) R2(config)#route rip --開啟rip協(xié)議 R2(config-router)#version 2 --版本2 R2(config-router)#network 192.168.12.0 --添加直連網(wǎng)段到rip R2(config-router)#network 192.168.13.0 R2(config-router)#exit --返回上一級(jí) R2(config)#ip route 192.168.43.0 255.255.255.0 192.168.23.1 --配置靜態(tài)路由 R2(config)#router rip --開啟路由重分布 R2(config-router)#redistribute static --重分布靜態(tài)路由 R2(config-router)#redistribute connected --重分布直連路由 R2(config-router)#end --返回特權(quán)模式
(3)R3路由器配置
Router>enable --進(jìn)入特權(quán)模式 Router#configure terminal --進(jìn)入全局配置模式 Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R3 --修改路由器名為R3 R3(config)#interface s0/0/0 --進(jìn)入端口 R3(config-if)#ip address 192.168.22.2 255.255.255.0 --為端口配置ip地址 R3(config-if)#no shutdown --激活端口 R3(config-if)#clock rate 64000 --配置時(shí)鐘速率 R3(config-if)#interface s0/0/1 --進(jìn)入端口 R3(config-if)#ip address 192.168.13.2 255.255.255.0 --為端口配置ip地址 R3(config-if)#no shutdown --激活端口 R3(config-if)#clock rate 64000 --配置時(shí)鐘速率 This command applies only to DCE interfaces R3(config-if)#interface s0/1/0 --進(jìn)入端口 R3(config-if)#ip address 192.168.33.1 255.255.255.0 --為端口配置ip地址 R3(config-if)#no shutdown --激活端口 %LINK-5-CHANGED: Interface Serial0/1/0, changed state to down R3(config-if)#clock rate 64000 --配置時(shí)鐘速率 R3(config-if)#exit --返回上一級(jí) R3(config)#route rip --開啟rip協(xié)議 R3(config-router)#version 2 --版本2 R3(config-router)#network 192.168.22.0 --添加直連網(wǎng)段到rip R3(config-router)#network 192.168.13.0 R3(config-router)#exit --返回上一級(jí) R3(config)#ip route 192.168.53.0 255.255.255.0 192.168.33.2 --配置靜態(tài)路由 R3(config)#router rip --開啟路由重分布 R3(config-router)#redistribute static --重分布靜態(tài)路由 R3(config-router)#redistribute connected --重分布直連路由 R3(config-router)#end --返回特權(quán)模式
(4)R4路由器配置
Router>enable --進(jìn)入特權(quán)模式 Router#configure terminal --進(jìn)入全局配置模式 Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R4 --修改路由器名為R4 R4(config)#interface f0/0 --進(jìn)入端口 R4(config-if)#ip address 192.168.42.254 255.255.255.0 --為端口配置ip地址 R4(config-if)#no shutdown --激活端口 R4(config-if)#interface s0/0/0 --進(jìn)入端口 R4(config-if)#ip address 192.168.32.1 255.255.255.0 --為端口配置ip地址 R4(config-if)#no shutdown --激活端口 R4(config-if)#clock rate 64000 --配置時(shí)鐘速率 This command applies only to DCE interfaces R4(config-if)#exit --返回上一級(jí) R4(config)#ip route 0.0.0.0 0.0.0.0 192.168.32.2 --配置缺省路由 R4(config)#end --返回特權(quán)模式
(5)R5路由器配置
Router>enable --進(jìn)入特權(quán)模式 Router#configure terminal --進(jìn)入全局配置模式 Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R5 --修改主機(jī)名為R5 R5(config)#interface s0/0/0 --進(jìn)入端口 R5(config-if)#ip address 192.168.23.1 255.255.255.0 --為端口配置ip地址 R5(config-if)#no shutdown --激活端口 R5(config-if)#clock rate 64000 --配置時(shí)鐘速率 This command applies only to DCE interfaces R5(config-if)#interface f0/0 --進(jìn)入端口 R5(config-if)#ip address 192.168.43.254 255.255.255.0 --為端口配置ip地址 R5(config-if)#no shutdown --激活端口 R5(config-if)#exit --返回上一級(jí) R5(config)#ip route 0.0.0.0 0.0.0.0 192.168.23.2 --配置缺省路由 R5(config)#end --返回特權(quán)模式
(6)R6路由器配置
Router>enable --進(jìn)入特權(quán)模式 Router#configure terminal --進(jìn)入全局配置模式 Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R6 --修改路由器名為R6 R6(config)#interface s0/0/0 --進(jìn)入端口 R6(config-if)#ip address 192.168.33.2 255.255.255.0 --為端口配置ip地址 R6(config-if)#no shutdown --激活端口 R6(config-if)#clock rate 64000 --配置時(shí)鐘速率 This command applies only to DCE interfaces R6(config-if)#interface f0/0 --進(jìn)入端口 R6(config-if)#ip address 192.168.53.254 255.255.255.0 --為端口配置ip地址 R6(config-if)#no shutdown --激活端口 R6(config-if)#exit --返回上一級(jí) R6(config)#ip route 0.0.0.0 0.0.0.0 192.168.33.1 --配置缺省路由 R6(config)#end --返回特權(quán)模式
四、驗(yàn)證:各主機(jī)互相ping,看是否全網(wǎng)互通
(1)PC1與PC2
(2)PC2與PC3
(3)PC3與PC1
結(jié)果:全網(wǎng)互通成功
相關(guān)文章
思科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-14CCNA認(rèn)證考試學(xué)習(xí)筆記之思科(Cisco)路由器常用命令總結(jié)
這篇文章主要介紹了CCNA認(rèn)證考試學(xué)習(xí)筆記之思科(Cisco)路由器常用命令,整理總結(jié)了CCNA認(rèn)證考試思科Cisco路由器配置、設(shè)置、靜態(tài)路由、動(dòng)態(tài)路由、訪問控制列表等常用命令及2020-02-02- 這篇文章主要為大家介紹了怎么設(shè)置思科路由器IS-IS,很多熟悉思科路由器的朋友都知道sisi,但是對(duì)于新手來說,就不知道思科路由器設(shè)置IS-IS該怎么處理了,以下是思科路由器2014-09-24
思科Cisco路由器access-list訪問控制列表命令詳解
CISCO路由器中的access-list(訪問列表)最基本的有兩種,分別是標(biāo)準(zhǔn)訪問列表和擴(kuò)展訪問列表,二者的區(qū)別主要是前者是基于目標(biāo)地址的數(shù)據(jù)包過濾,而后者是基于目標(biāo)地址、源2013-01-25