RIP路由重分發
一、RIP路由重分發功能介紹:将從其他路由協定學習的路由引入rip域内
二、RIP路由重分發應用場景:
企業的網絡裡面啟用了多種的路由協定,為了實作整個網絡可以互相通信,共享資料,那麼需要把其它路由協定的路由引入到RIP協定裡面
三、RIP路由重分發實驗配置:
1.拓撲圖
2.實驗目的:
全網除了運作rip協定外,還有其他路由協定(如靜态路由),需要把其它路由協定學習的路由,重分發進rip。
3.配置思路:
1)搭建好拓撲圖環境,标出規劃好的IP位址
2)修改網絡裝置預設名稱、配置好IP位址
3)配置RIP路由重分發,使各網段之間實作互訪
4.配置過程:
步驟一:修改網絡裝置預設名稱、配置好IP位址
1)配置各PC資訊
2)配置路由器R1預設名稱及接口IP
Router>en //進入特權模式
Router#conf t //進入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1 //給裝置改名稱
R1(config)#int fa0/1 //進入接口配置模式
R1(config-if)#ip address 192.168.1.2 255.255.255.0 //配置接口的ip位址、子網路遮罩
R1(config-if)#no shut //激活接口,拓撲圖上接口由紅變綠
R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R1(config-if)#int fa0/0
R1(config-if)#ip address 172.16.0.1 255.255.0.0
R1(config-if)#no shut
R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
3)配置路由器R2預設名稱及接口IP
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#int fa0/0
R2(config-if)#ip add 172.16.0.2 255.255.0.0
R2(config-if)#no shut
R2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2(config-if)#int fa0/1
R2(config-if)#ip add 172.17.0.1 255.255.0.0
R2(config-if)#no shut
4)配置路由器R3預設名稱及接口IP
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#int fa0/1
R3(config-if)#ip add 172.17.0.2 255.255.0.0
R3(config-if)#no shut
R3(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R3(config-if)#int fa0/0
R3(config-if)#ip add 192.168.2.2 255.255.0.0
R3(config-if)#no shut
步驟二:配置RIP路由重分發,使各網段之間實作互訪
1)配置RIP路由部分:
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.1.0
R1(config-router)#network 172.16.0.0
2) 配置引入靜态路由部分:
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 172.16.0.0
R2(config-router)#exit
R2(config)#ip route 192.168.2.0 255.255.255.0 172.17.0.2
R2(config)#router rip
R2(config-router)#redistribute static metric 3
3)配置靜态路由:
R3(config)#ip route 0.0.0.0 0.0.0.0 172.17.0.1 //因為R3為邊界路由器,是以可以直接配一條預設路由,
四、配置驗證:
1)檢視各路由器路由表,指令為show ip route
注意:1、在檢視路由表的時候,需要在特權模式下進行,也即在“R1#”這樣的提示資訊後輸入檢視路由表的指令
2、在路由表資訊中,C:代表是直連的
R:代表是RIP路由資訊
S:代表是靜态路由資訊
S*:代表是預設路由資訊
2)檢視兩台主機通過RIP重分發後的通信情況:
3)通過将思科模拟器實時模式切換為模拟模式,可以檢視到如下資訊:
通過上述路徑,最終實作了PC0和PC1的通信
4)在特權模式下,輸入“write”可以儲存配置
至此,RIP路由引入靜态路由實驗完成,後面會更新rip引入OSPF以及rip+OSPF+靜态路由的綜合實驗