路由器基礎配置之浮動靜態路由


我們將以上面的拓撲圖進行實驗,配置兩條rip路由,以實現負載均衡和冗余的效果,配置一條靜態路由,讓rip覆蓋靜態路由(當rip和靜態同時存在,默認情況下靜態會覆蓋rip,也就是路由表中只有靜態路由,但覆蓋並不是消失,其中一個協議掛掉時,另一個會自動生效進行工作)

首先配置router0

enable  進入特權模式

config t  進入全局配置模式

interface L0

ip address 192.168.1.1 255.255.255.0

exit

interface s0/3/0

ip address 192.168.3.1 255.255.255.0

clock rate 6400  設置同步時間

no shu  激活接口

exit

interface s0/3/1

ip address 192.168.5.1 255.255.255.0

clock rate 6400

no shu

exit

interface g0/0

ip address 192.168.4.1 255.255.255.0

no shu

在特權模式下

router rip

version 2

network 192.168.1.0

network 192.168.3.0

network 192.168.5.0

 

router2

enable  進入特權模式

config t  進入全局配置模式

interface L0

ip address 192.168.2.1 255.255.255.0

exit

interface s0/3/0

ip address 192.168.3.2 255.255.255.0

no shu  激活接口

exit

interface s0/3/1

ip address 192.168.5.2 255.255.255.0

no shu

exit

interface g0/0

ip address 192.168.4.2 255.255.255.0

在特權模式下

router rip

version 2

network 192.168.2.0

network 192.168.3.0

network 192.168.5.0

 

rip就配置完成了,可以在特權模式下使用show ip router來查看路由表,表中前綴是R,即為rip路由

配置靜態路由,並被rip覆蓋,默認靜態會覆蓋掉rip

router0

在全局配置模式下

ip router 192.168.2.0 255.255.255.0 192.168.4.2 125  默認情況下rip是120,我們這里把靜態設置為125,這樣rip就會覆蓋靜態

router1

在全局配置模式下

ip router 192.168.1.0 255.255.255.0 192.168.4.1 125

這樣浮動靜態路由就完成了,用shou ip router查看,會發現路由表里依然只有rip,但當rip掛掉的時候,靜態就會自動出現工作


免責聲明!

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



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