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


相关推荐
Nuyoah11klay18 小时前
华清远见25072班网络编程学习day5
网络
CyHacker_101019 小时前
网络编程-day4
网络
wow_DG1 天前
【WebSocket✨】入门之旅(五):WebSocket 的安全性
网络·websocket·网络协议
会开花的二叉树1 天前
UDP Socket 进阶:从 Echo 到字典服务器,学会 “解耦” 网络与业务
服务器·网络·udp
-SGlow-1 天前
Linux相关概念和易错知识点(45)(网络层、网段划分)
linux·运维·服务器·网络
阿部多瑞 ABU1 天前
《学校机房终端安全全链条攻防分析与防御体系建设报告》
网络·安全
拷贝码农卡卡东1 天前
pre-commit run --all-files 报错:http.client.RemoteDisconnected
网络·网络协议·http
郝亚军1 天前
websocket 服务器往客户端发送的数据要加掩码覆盖吗?
服务器·网络·websocket
今天秃头了吗??1 天前
【JAVA】网络编程
java·网络·网络编程·socket