目录
总结:浮动路由需要注意的是有两条线相连的两个路由器需要设置两遍静态路由,设置备用路由协议时,优先级的数值要高于主路由器的路由协议优先级的数值
一、浮动路由
1、定义:配置两条静态路由,默认选项选取质量优(带宽大的)作为主路径,当主路径出现故障时,由带宽较小的备份路径顶替主路径。
2、作用:保持网络的不中断
3、浮动路由在同一时刻,数据只会由一条链路代为转发
4、实际操作命令
PC1 ip192.168.1.10 24网关192.168.1.1
PC1 ip172.16.10.10 24网关172.16.10.3
R1
[ ]int G0/0/0 进入接口g0/0/0
[ ]undo shutdown 开启接口
[ ]ip add 192.168.1.1 24 设置接口ip和掩码长度
[ ]int g0/0/1 进入接口g0/0/1
[ ]undo shutdown 开启接口
[ ]ip add 10.1.2.1 24设置接口ip和掩码长度
[ ]int e3/0/1进入接口e3/0/1
[ ]undo shutdown 开启接口
[ ]ip add 10.1.1.1 24设置接口ip和掩码长度
[ ]q 退出
[ ]ip route-static 0.0.0.0 0 10.1.2.2配置默认路由 目的网段0.0.0.0掩码长度0 下一跳入接口ip10.1.2.2
[ ]ip route-static 0.0.0.0 0 10.1.1.2 preference 65配置默认路由 目的网段0.0.0.0掩码长度0 下一跳入接口ip10.1.1.2,优先级为65
[ ]int g0/0/1进入接口g0/0/1
[ ]shutdown 开启接口
R2
[ ]int g0/0/1
[ ]undo shutdown
[ ]ip add 10.1.2.2 24
[ ]int e3/0/1
[ ]undo shutdown
[ ]ip add 10.1.1.2 24
[ ]int g0/0/0
[ ]undo shutdown
[ ]ip add 10.1.3.2 24
[ ]q
[ ]ip route-static 192.168.1.0 24 10.1.2.1
[ ]ip route-static 192.168.1.0 24 10.1.1.1 preference 65
[ ]ip route-static 172.16.10.0 24 10.1.3.3
R3
[ ]int g0/0/0
[ ]undo shutdown
[ ]ip add 10.1.3.3 24
[ ]int g0/0/1
[ ]undo shutdown
[ ]ip add 172.16.10.3 24
[ ]q
[ ]ip route-static 0.0.0.0 0 10.1.3.2
二、VRRP的理论
VRRP的作用:出口网关的备份,保证出口网关的高用性能
VRRP的好处:
1、主路由器失效后,备