vrrp实验

配置Trunk和Access

[SW3]int e0/0/1
[SW3-Ethernet0/0/1]p l a
[SW3-Ethernet0/0/1]p d v 10
[SW3-Ethernet0/0/1]int e0/0/2
[SW3-Ethernet0/0/2]p l a
[SW3-Ethernet0/0/2]p d v 10
[SW3-Ethernet0/0/2]int e0/0/3
[SW3-Ethernet0/0/3]p l a
[SW3-Ethernet0/0/3]p d v 20
[SW3-Ethernet0/0/3]int e0/0/4
[SW3-Ethernet0/0/4]p l a
[SW3-Ethernet0/0/4]p d v 20

[SW3-Ethernet0/0/4]int e0/0/5
[SW3-Ethernet0/0/5]p l t
[SW3-Ethernet0/0/5]p t a v a
[SW3-Ethernet0/0/5]int e0/0/6
[SW3-Ethernet0/0/6]p l t
[SW3-Ethernet0/0/6]p t a v a
[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]p l t
[SW1-GigabitEthernet0/0/1]p t a v a
[SW1-GigabitEthernet0/0/1]int g0/0/2
[SW1-GigabitEthernet0/0/2]p l t
[SW1-GigabitEthernet0/0/2]p t a v a
[SW2]int g0/0/1
[SW2-GigabitEthernet0/0/1]p l t
[SW2-GigabitEthernet0/0/1]p t a v a
[SW2-GigabitEthernet0/0/1]int g0/0/2
[SW2-GigabitEthernet0/0/2]p l t
[SW2-GigabitEthernet0/0/2]p t a v a

配置mstp

[SW3]stp region-configuration 	
[SW3-mst-region]region-name topsec.com
[SW3-mst-region]instance 1 vlan 10
[SW3-mst-region]instance 2 vlan 20
[SW3-mst-region]active region-configuration

[SW1]stp mode mstp
[SW1]stp region-configuration 
[SW1-mst-region]region-name topsec.com
[SW1-mst-region]instance 1 vlan 10
[SW1-mst-region]instance 2 vlan 20
[SW1-mst-region]active region-configuration 
Info: This operation may take a few seconds. Please wait for a moment....done.
	
[SW1]stp instance 1 root primary 	
[SW1]stp instance 2 root secondary 
[SW2]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2]stp mode mstp
[SW2]stp region-configuration 	
[SW2-mst-region]region-name topsec.com
[SW2-mst-region]instance 1 vlan 10
[SW2-mst-region]instance 2 vlan 20
[SW2-mst-region]active region-configuration 

[SW2]stp instance 2 root primary 	
[SW2]stp instance 1 root secondary 

配置vrrp

[SW1]int vlanif 10
[SW1-Vlanif10]ip add 192.168.1.251 24	
[SW1-Vlanif10]vrrp vrid 10 virtual-ip 192.168.1.254
[SW1-Vlanif10]int vlanif 20
[SW1-Vlanif20]ip add 172.16.10.251 24
[SW1-Vlanif20]vrrp vrid 20 virtual-ip 172.16.10.254

[SW2]int vlanif 10
[SW2-Vlanif10]ip add 192.168.1.252 24
[SW2-Vlanif10]vrrp vrid 10 virtual-ip 192.168.1.254
[SW2-Vlanif10]int vlanif 20
[SW2-Vlanif20]ip add 172.16.10.252 24
[SW2-Vlanif20]vrrp vrid 20 virtual-ip 172.16.10.254

[SW2-Vlanif20]vrrp vrid 20 priority 200

结果

用vlan10的PC ping .254,并抓包查看

发现SW1的g0/0/1接口可以看到通信,但SW2的g0/0/1接口不可以看到通信

用vlan20的PC ping .254,并抓包查看

发现SW1的g0/0/1接口不可以看到通信,但SW2的g0/0/1接口可以看到通信

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值