冗余 vrrp
1.实验拓扑:
使用ENSP模拟器(版本V100R002C00 1.2.00.350)
2.实验需求
1:lsw2 lsw1 用vlan200做上行口
2:LSW1坏了或者Lsw2换了地址可以进行切换
3.实验配置
R1
sy
int g0/0/2
ip add 11.0.0.1 30
int g0/0/1
ip add 12.0.0.1 30
q
int LoopBack 0
ip add 1.1.1.1 32
q
sw1
sy
vlan 200
int vlan 200
ip add 11.0.0.2 30
int g0/0/2
port hybrid pvid vlan 200
port hybrid untagged vlan 200
q
ip route-static 0.0.0.0 0.0.0.0 11.0.0.1
sw2
sy
vlan 200
int vlan 200
ip add 12.0.0.2 30
int g0/0/1
port hybrid pvid vlan 200
port hybrid untagged vlan 200
q
ip route-static 0.0.0.0 0.0.0.0 12.0.0.1
vlan batch 10 20
int vlan 10
ip add 192.168.10.20 24
int vlan 20
ip add 192.168.20.20 24
q
sw1
sy
vlan batch 10 20
int vlan 10
ip add 192.168.10.10 24
int vlan 20
ip add 192.168.20.10 24
q
disp
sw3
sy
vlan batch 10 20
int e0/0/1
port link-type access
port default vlan 10
q
sw1
int vlan 10
vrrp vrid 1 virtual-ip 192.168.10.1
vrrp vrid 1 preempt-mode timer delay 0
dis this
默认100优先级
vrrp vrid 1 track interface Vlan 200
vrrp vrid 1 track int GigabitEthernet 0/0/1
int vlan 20
vrrp vrid 2 virtual-ip 192.168.20.1
vrrp vrid 2 priority 95
q
sw2
int vlan 10
vrrp vrid 1 virtual-ip 192.168.10.1
vrrp vrid 1 priority 95
int vlan 20
vrrp vrid 2 virtual-ip 192.168.20.1
vrrp vrid 2 track interface vlan 200
vrrp vrid 2 track interface GigabitEthernet 0/0/2
q
dis vrrp 1 brief
sw3
port-group group-member GigabitEthernet 0/0/1 GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
q
sw1
int g0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
sw2
int g0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
dis vrrp 2 brief
c1
192.168.10.100
192.168.10.1
ping
R1
ip route-static 192.168.10.0 24 11.0.0.2
ip route-static 192.168.10.0 24 12.0.0.2 preference 70
ip route-static 192.168.20.0 24 11.0.0.2 preference 70
ip route-static 192.168.20.0 24 12.0.0.2
int g0/0/0
display this 可以成功接口配置命令
测试
关闭接口看看能不能切换过去
丢了一个包
转到10.20那条路了
原文地址:http://funinghua.blog.51cto.com/9125449/1584417