配置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


相关推荐
野生技术架构师6 分钟前
原来可以搭建一个HTTP服务
网络·网络协议·http
奇树谦18 分钟前
FastDDS路由可达的跨网段通信支持说明
网络
tianyuanwo33 分钟前
深入解析CentOS 8网络配置:NetworkManager DNS管理机制与网卡类型深度剖析
linux·网络·centos
DX_水位流量监测1 小时前
无人机测流之雷达流速仪监测技术分析
大数据·网络·人工智能·数据分析·自动化·无人机
Xの哲學1 小时前
Linux io_uring 深度剖析: 重新定义高性能I/O的架构革命
linux·服务器·网络·算法·边缘计算
testpassportcn2 小时前
Fortinet FCSS_SDW_AR-7.4 認證介紹|Fortinet Secure SD-WAN 高級路由專家考試
网络·学习·改行学it
盛世宏博北京3 小时前
《可复制推广:智慧档案馆 “十防” 安全防护体系建设指南》
网络·人工智能·web安全·智慧档案
liulilittle3 小时前
LIBTCPIP 技术探秘(tun2sys-socket)
开发语言·网络·c++·信息与通信·通信·tun
zbtlink3 小时前
2.5G路由器是啥?和家用的有哪些差异?
网络·智能路由器
以太浮标3 小时前
华为eNSP模拟器综合实验之- HRP(华为冗余协议)双机热备
运维·网络·华为·信息与通信