配置vlan和vlan间路由、配置vlan的ip和vrrp、mstp和主次根

简单的通信实验

拓扑图

1.配置vlan和链路聚合

Sw1 & sw2

复制代码
undo info-center enable
vlan batch 10 20 30 40
int eth-trunk 1
trunkport g 0/0/1 to 0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
int g0/0/3
port link-type trunk 
port trunk allow-pass vlan 10 20 30 40
int g0/0/4
port link-type trunk 
port trunk allow-pass vlan 10 20 30 40

sw3

复制代码
undo info-center enable
vlan batch 10 20 30 40
int g0/0/1 
port link-type trunk 
port trunk allow-pass vlan 10 20 30 40
int g0/0/2
port link-type trunk 
port trunk allow-pass vlan 10 20 30 40
int g0/0/3
port link-type access
port default vlan 10
int g0/0/4
port link-type access
port default vlan 20

sw4

复制代码
undo info-center enable
vlan batch 10 20 30 40
int g0/0/1 
port link-type trunk 
port trunk allow-pass vlan 10 20 30 40
int g0/0/2
port link-type trunk 
port trunk allow-pass vlan 10 20 30 40
int g0/0/3
port link-type access
port default vlan 30
int g0/0/4
port link-type access
port default vlan 40

2.配置vrrp和vlan

sw1

复制代码
int vlan 10
ip address 192.168.10.252 24
vrrp vrid 1 virtual-ip 192.168.10.254
vrrp vrid 1 priority 150
int vlan 20
ip address 192.168.20.252 24
vrrp vrid 2 virtual-ip 192.168.20.254
vrrp vrid 2 priority 150

int vlan 30
ip address 192.168.30.252 24
vrrp vrid 3 virtual-ip 192.168.30.254
int vlan 40
ip address 192.168.40.252 24
vrrp vrid 4 virtual-ip 192.168.40.254

sw2

复制代码
int vlan 10
ip address 192.168.10.253 24
vrrp vrid 1 virtual-ip 192.168.10.254
int vlan 20
ip address 192.168.20.253 24
vrrp vrid 2 virtual-ip 192.168.20.254

int vlan 30
ip address 192.168.30.253 24
vrrp vrid 3 virtual-ip 192.168.30.254
vrrp vrid 3 priority 150
int vlan 40
ip address 192.168.40.253 24
vrrp vrid 4 virtual-ip 192.168.40.254
vrrp vrid 4 priority 150

3.配置mstp

sw1 ~sw4

复制代码
stp region-configuration
region-name name
ins 1 vlan 10 20
ins 2 vlan 30 40
active region-configuration

4.配置主次根

Sw1

复制代码
stp ins 1 root pri
stp ins 2 root sec

sw2

复制代码
stp ins 1 root sec
stp ins 2 root pri

sw3 & sw4

复制代码
int g0/0/3
stp edg enable
int g0/0/4
stp edg enable

5.查看

  1. dis vrrp b
  1. dis stp b
  1. dis stp
  1. 查看链路聚合
    dis eth 1

sw2

  1. dis stp b
  1. dis vrrp b
  1. dis eth 1
  1. dis stp
  1. 配置pc



  1. ping


相关推荐
wangl_928 小时前
Modbus RTU 与 Modbus TCP 深入指南-决策树与选型建议
网络·网络协议·tcp/ip·tcp·modbus·rtu
xhbh6668 小时前
Windows自带端口转发完全教程:netsh命令详解与实战案例
网络·端口转发·流量端口转发·ssh端口转发·端口转发工具
暴力求解8 小时前
Linux---网络基础概念
linux·运维·服务器·网络·操作系统
Simon523148 小时前
常见404 500错误解析
网络·学习·servlet·html5
pengyi8710159 小时前
共享IP全面优缺点解析,适合什么人群使用?
linux·运维·服务器·网络·tcp/ip
IpdataCloud9 小时前
IPv6时代,IP归属地查询服务精准度面临哪些挑战?实测对比+提升方案
运维·服务器·网络
上海云盾-小余10 小时前
服务器异常流量排查:攻击识别与快速限流处置指南
运维·服务器·网络
The Shio10 小时前
OptiByte 操练场:面向 IoT/嵌入式的协议可视化调试工具
网络·嵌入式硬件·物联网·c#·.net·业界资讯·iot
志栋智能10 小时前
超自动化巡检:实现精细化运维管理的基础
运维·服务器·网络·人工智能·自动化
Felven11 小时前
盛科CTC8096端口速率40G切换10G配置
网络·40g·盛科·ctc8096·10g