路由器VRRP配置
设备:二台交换机,二台路由器
SwitchAvlan1ip192.168.1.1255.255.255.0
SwitchBvlan1ip10.10.1.4255.255.255.0
SwitchBvlan2ip10.10.1.5255.255.255.0
RouterAg0/3ip192.168.1.2255.255.255.0
RouterAg0/5ip10.10.1.2255.255.255.0
RouterBg0/3ip192.168.1.3255.255.255.0
RouterBg0/5ip10.10.1.3255.255.255.0
虚拟网关地址:192.168.1.100255.255.255.0
一、配置IP地址划分VLAN并测试连通性
略
二、配置VRRP
1、创建VRRP一个序号为1的虚拟路由器
2、为虚拟路由器添加IP地址(即PC网关地址)
3、配置优先级
4、配置跟踪端口设置递减值
5、配置认证字符串
6、配置为抢占模式
hostnameRouterA
interfaceGigaEthernet0/3
ipaddress192.168.1.3255.255.255.0
vrrp1associate192.168.1.100255.255.255.0
vrrp1authenticationDCN
vrrp1priority150
vrrp1trackinterfaceGigaEthernet0/510
interfaceGigaEthernet0/5
ipaddress10.10.1.2255.255.255.0
hostnameRouterB
interfaceGigaEthernet0/3
ipaddress192.168.1.100255.255.255.0
vrrp1associate192.168.1.100255.255.255.0
vrrp1authenticationDCN
vrrp1priority150
vrrp1trackinterfaceGigaEthernet0/510
interfaceGigaEthernet0/5
ipaddress10.10.1.3255.255.255.0
实验结果
RouterA_config#showvrrp
GigaEthernet0/3-Group1
VRRPStateisBACKUP
VirtualIPaddress:192.168.1.2/24
VirtualMacaddress:0000.5e00.0101
CurrentPriority:150(Config150)
VRRPtimer:Advertise1.0s(default)master_down3.4s
VRRPcurrenttimer:Advertise0.5smaster_down2.9spreemptafter0.0s
Authenticationstringis:fbyu
Preemptisset(delay:0s)
LearnAdvertiseIntervalisnotset
MasterRouterIP:192.168.1.200,priority:150,advertisment:1.0s
Trackinterface:InterfaceDecrementState
GigaEthernet0/510UP
Router_config#showvrrp
GigaEthernet0/3-Group1
VRRPStateisMaster
VirtualIPaddress:192.168.1.2/24
VirtualMacaddress:0000.5e00.0101
CurrentPriority:150(Config150)
VRRPtimer:Advertise1.0s(default)master_down3.4s
VRRPcurrenttimer:Advertise1.0smaster_down0.0spreemptafter0.0s
Authenticationstringis:fbyu
Preemptisset(delay:0s)
LearnAdvertiseIntervalisnotset
MasterRouterIP:192.168.1.200,priority:150,advertisment:1.0s
Trackinterface:InterfaceDecrementState
GigaEthernet0/510UP