您现在的位置是:首页 > 运维网络杂文

VRRP+MSTP实验

阿龙2022-08-18【网络杂文】人已围观

VRRP+MSTP主要实践负载均衡

PC,192.168.10.2     PC2:192.168.20.2

LSW2
#
vlan batch 10 20

stp region-configuration
 region-name hao
 instance 10 vlan 10
 instance 20 vlan 20
 active region-configuration

interface Vlanif10
 ip address 192.168.10.1 255.255.255.0
 vrrp vrid 10 virtual-ip 192.168.10.254
 vrrp vrid 10 priority 105
#
interface Vlanif20
 ip address 192.168.20.1 255.255.255.0
 vrrp vrid 20 virtual-ip 192.168.20.254
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 10
LSW2
#
vlan batch 10 20

stp region-configuration
 region-name hao
 instance 10 vlan 10
 instance 20 vlan 20
 active region-configuration

interface Vlanif10
 ip address 192.168.10.1 255.255.255.0
 vrrp vrid 10 virtual-ip 192.168.10.254
#
interface Vlanif20
 ip address 192.168.20.1 255.255.255.0
 vrrp vrid 20 virtual-ip 192.168.20.254
 vrrp vrid 10 priority 105
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
 port link-type access
 port default vlan 20
LSW1
#
vlan batch 10 20

#
stp region-configuration
 region-name hao
 instance 10 vlan 10
 instance 20 vlan 20
 active region-configuration
#
stp instance 10 root primary
stp instance 20 root secondary

#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
LSW2视角下2号口是关闭的,因为LSW1是根,所以接口肯定都是开放的

Tags:VRRP   MSTP

很赞哦! ()