VRRP技术简单实验:
VRRP是网关冗余技术,当一台出口路由器故障,保证可以切换到另外一台路由器做出口路由。是一种网络虚拟化技术。
实验拓扑如图:
R1配置如下:
#
interface GigabitEthernet0/0/0
ip address 192.168.1.253 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.1.254 #设置虚拟网关及IP地址
vrrp vrid 1 priority 120 #设置优先级为120,默认是100,这个比大
vrrp vrid 1 preempt-mode timer delay 60 #抢占延长60s
#
R2配置如下:
#
interface GigabitEthernet0/0/0
ip address 192.168.1.252 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.1.254 #设置虚拟网关的ID及ip地址
#
查看结果:
[R1]display vrrp brief #查看R1的结果是master.
Total:1 Master:1 Backup:0 Non-active:0
VRID State Interface Type Virtual IP
----------------------------------------------------------------
1 Master GE0/0/0 Normal 192.168.1.254
<R2>display vrrp brief #查看R2的VRRP结果是Backup.
Total:1 Master:0 Backup:1 Non-active:0
VRID State Interface Type Virtual IP
----------------------------------------------------------------
1 Backup GE0/0/0 Normal 192.168.1.254
<完>.