实验拓扑:
实验步骤:
VRRP虚拟路由冗余协议
1、在同一网段内实现网关设备备份
2、PC设置为网关地址为虚拟路由器IP地址
===============================================================================
当VRRP优选级主路由器与备份路由器相同时,看接口IP地址,IP数值
大的作为主路由器
[ar1]int g0/0/1
[ar1-GigabitEthernet0/0/1]ip add 192.168.1.254 24
[ar1-GigabitEthernet0/0/1]un shu
[ar1-GigabitEthernet0/0/1]vrrp vrid 1 virtual-ip 192.168.1.250
[ar2]int g0/0/1
[ar2-GigabitEthernet0/0/1]ip add 192.168.1.253 24
[ar2-GigabitEthernet0/0/1]un shu
[ar2-GigabitEthernet0/0/1]vrrp vrid 1 virtual-ip 192.168.1.250
--------------------------------------------------------------------------------
配置优选级可以更改 主、备路由器,优选级高的作为主路由器
[ar2-GigabitEthernet0/0/1]vrrp vrid 1 priority 200 //更改优选级
[ar2-GigabitEthernet0/0/1]vrrp vrid 1 preempt-mode timer delay 10 //切换时间S
[ar2-GigabitEthernet0/0/1]vrrp vrid 1 track interface GigabitEthernet 0/0/0 redu
ced 150
//跟踪上行端口, 是下行端口感知上行端口变化
-------------------------------------------------------------------------------
1、当主路由器出现问题,备份路由器开始转发数据,
2 当主路由器恢复时,自动抢回转发数据功能
[ar2-GigabitEthernet0/0/1]vrrp vrid 1 authentication-mode simple cipher 123
//设置验证模式为明文,储存为加密
[ar1-GigabitEthernet0/0/1]vrrp vrid 1 authentication-mode simple cipher 123
//设置验证模式为明文,储存为加密
--------------------------------------------------------------------------------
[ar1]ip route-static 200.1.1.0 255.255.255.0 100.0.0.1
[ar2]ip route-static 200.1.1.0 255.255.255.0 100.1.1.1
[ar3]ip route-static 0.0.0.0 0.0.0.0 100.0.0.2
[ar3]ip route-static 0.0.0.0 0.0.0.0 100.1.1.2
==================================================================================
验证 display vrrp 抓包看数据走向
Master主路由器 Backup备份路由器
--------------------------------------------------------------------------------