简单的通信实验
拓扑图
:
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 150int 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.254int 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.查看
- dis vrrp b
- dis stp b
- dis stp
- 查看链路聚合
dis eth 1
sw2
- dis stp b
- dis vrrp b
- dis eth 1
- dis stp
- 配置pc
- ping