【eNSP实战】MSTP与VRRP配合使用

拓扑图
在这里插入图片描述
要求:

  1. PC1划分在vlan10;PC2划分在vlan20;主机IP和网关如图所示,这里不做展示
  2. LSW1配置vlan10的根交换机,vlan20的备根交换机;LSW2配置vlan20的根交换机,vlan10的备根交换机
  3. LSW1配置vlan10的VRRP作为vlan10 的网关;LSW2配置vlan20的VRRP作为vlan20的网关

LSW1配置vlan

vlan batch 10 20
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20

LSW2配置vlan

vlan batch 10 20
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20

LSW3配置vlan

vlan batch 10 20
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 10
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 20
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 10 20

下面开始配置MSTP
LSW1配置MSTP

stp mode mstp
#
stp region-configuration
 region-name re-mstp
 revision-level 1
 instance 1 vlan 10
 instance 2 vlan 20
 active region-configuration
#
stp instance 1 root primary
stp instance 2 root secondary

LSW2配置MSTP

stp mode mstp
#
stp region-configuration
 region-name re-mstp
 revision-level 1
 instance 1 vlan 10
 instance 2 vlan 20
 active region-configuration
#
stp instance 1 root secondary
stp instance 2 root primary

LSW3配置MSTP

stp mode mstp
#
stp region-configuration
 region-name re-mstp
 revision-level 1
 instance 1 vlan 10
 instance 2 vlan 20
 active region-configuration

下面开始配置VRRP
LSW1配置VRRP

interface Vlanif10
 ip address 192.168.10.253 255.255.255.0
 vrrp vrid 10 virtual-ip 192.168.10.1
 vrrp vrid 10 priority 120
 vrrp vrid 10 preempt-mode timer delay 30
#
interface Vlanif20
 ip address 192.168.20.253 255.255.255.0
 vrrp vrid 20 virtual-ip 192.168.20.1
 vrrp vrid 20 priority 100		# 设置优先级100(默认值是100,也可以不设置)

LSW2配置VRRP

interface Vlanif10
 ip address 192.168.10.254 255.255.255.0
 vrrp vrid 10 virtual-ip 192.168.10.1
 vrrp vrid 10 priority 100		# 设置优先级100(默认值是100,也可以不设置)
#
interface Vlanif20
 ip address 192.168.20.254 255.255.255.0
 vrrp vrid 20 virtual-ip 192.168.20.1
 vrrp vrid 20 priority 120
 vrrp vrid 20 preempt-mode timer delay 30

至此MSTP与VRRP配置完成,下面测试PC1 ping PC2
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值