当前位置: 首页 > news >正文

【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
在这里插入图片描述

相关文章:

  • 图论part2|200. 岛屿数量、695. 岛屿的最大面积
  • 如何制作Windows系统盘、启动盘?(MediaCreationTool_22H2)
  • 韦伯望远镜的拉格朗日点计算推导过程,包含MATLAB和python运动轨迹仿真代码
  • Redis 数据持久化之AOF
  • 3-2 深入解析数字电路设计中的竞争条件及解决策略
  • blazemeter工具使用--用于自动生成jmeter脚本并进行性能测试
  • 【动手学深度学习】基于SoftMax回归算法实现图片分类
  • docker-compose部署MongoDB分片集群
  • 如何绕过 reCAPTCHA V2/V3:Python、Selenium 与其他工具的实战指南
  • Unity 封装一个依赖于MonoBehaviour的计时器(上) 基本功能
  • 30天学习Java第三天——控制循环
  • 电机控制常见面试问题(九)
  • 深度学习 常见优化器
  • ROS实践(四)机器人SLAM建图(gmapping)
  • linux纯干货
  • 汉得 x 头部大型传媒集团|AI革新:智启出版新征程!
  • scoop退回软件版本的方法
  • AI 大模型统一集成|如何封装多个大模型 API 调用
  • 如何使用 Shopify API 实现第三方服务集成
  • Vite打包原理: Tree-shaking在Vue3项目中的实际效果
  • 北京银行一季度净赚超76亿降逾2%,不良贷款率微降
  • 西班牙葡萄牙电力基本恢复
  • 王毅:携手做世界和平与发展事业的中流砥柱
  • 柳州警方通报临牌车撞倒行人:扣留涉事车辆,行人无生命危险
  • 深圳一季度GDP为8950.49亿元,同比增长5.2%
  • 找化学的答案,解人类的命题:巴斯夫的“变革者”成长之道