目录
前言
拓扑
一、AC-SW1
二、Core-sw1
三、Core-sw2
四、汇聚层
五、AC1
六、SW1-6
七、DMZ区域
前言
具体原理和操作可以访问我的主页视频
白帽小丑的个人空间-白帽小丑个人主页-哔哩哔哩视频
拓扑
一、AC-SW1
sys
sysname AC-SW1
vlan batch 100 200 210 220 230 240 250stp region-configuration
region-name huawei
revision-level 1
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qinterface gi0/0/1
port link-type trunk
port trunk allow-pass vlan allinterface gi0/0/2
port link-type trunk
port trunk allow-pass vlan allinterface gi0/0/3
port link-type trunk
port trunk allow-pass vlan all
二、Core-sw1
sys
sysname core-sw1
vlan batch 10 20 30 40 50 60 100
vlan batch 200 210 220 230 240 250 stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qstp instance 1 root primary
stp instance 3 root primary
stp instance 5 root primarystp instance 2 root secondary
stp instance 4 root secondaryinter gi0/0/1
port link trunk
port trunk all vlan allinter gi0/0/2
port link trunk
port trunk all vlan allinterface Eth-Trunk 1p l tp t a v allinter gi0/0/3eth-trunk 1inter gi0/0/4eth-trunk 1
qinterface Vlanif 10
ip address 172.16.0.252 23
vrrp vrid 10 virtual-ip 172.16.1.254
vrrp vrid 10 priority 120interface Vlanif 20
ip address 172.16.2.252 23
vrrp vrid 10 virtual-ip 172.16.3.254
vrrp vrid 10 priority 120interface Vlanif 30
ip address 172.16.4.252 23
vrrp vrid 10 virtual-ip 172.16.5.254
vrrp vrid 10 priority 120interface Vlanif 40
ip address 172.16.6.252 23
vrrp vrid 10 virtual-ip 172.16.7.254
vrrp vrid 10 priority 100interface Vlanif 50
ip address 172.16.8.252 23
vrrp vrid 10 virtual-ip 172.16.9.254
vrrp vrid 10 priority 100interface Vlanif 60
ip address 172.16.10.252 23
vrrp vrid 10 virtual-ip 172.16.11.254
vrrp vrid 10 priority 100dhcp enable
ip pool vlan10
network 172.16.0.0 mask 23
gateway-list 172.16.1.254
dns-list 192.168.150.1
excluded-ip-address 172.16.1.1 172.16.1.253
excluded-ip-address 172.16.0.252 172.16.0.253
qinterface Vlanif 10
dhcp select global
qip pool vlan20
network 172.16.2.0 mask 23
gateway-list 172.16.3.254
dns-list 192.168.150.1
excluded-ip-address 172.16.3.1 172.16.3.253
excluded-ip-address 172.16.2.252 172.16.2.253
qinterface Vlanif 20
dhcp select global
qip pool vlan30
network 172.16.4.0 mask 23
gateway-list 172.16.5.254
dns-list 192.168.150.1
excluded-ip-address 172.16.5.1 172.16.5.253
excluded-ip-address 172.16.4.252 172.16.4.253
qinterface Vlanif 30
dhcp select global
qip pool vlan40
network 172.16.6.0 mask 23
gateway-list 172.16.7.254
dns-list 192.168.150.1
excluded-ip-address 172.16.7.1 172.16.7.253
excluded-ip-address 172.16.6.252 172.16.6.253
qinterface Vlanif 40
dhcp select global
qip pool vlan50
network 172.16.8.0 mask 23
gateway-list 172.16.9.254
dns-list 192.168.150.1
excluded-ip-address 172.16.9.1 172.16.9.253
excluded-ip-address 172.16.8.252 172.16.8.253
qinterface Vlanif 50
dhcp select global
qip pool vlan60
network 172.16.10.0 mask 23
gateway-list 172.16.11.254
dns-list 192.168.150.1
excluded-ip-address 172.16.11.1 172.16.11.253
excluded-ip-address 172.16.10.252 172.16.10.253
qinterface Vlanif 60
dhcp select global
qinterface Vlanif 200
ip address 172.200.1.251 23
vrrp vrid 20 virtual-ip 172.200.1.254
vrrp vrid 20 priority 120interface Vlanif 210
ip address 172.210.3.251 23
vrrp vrid 20 virtual-ip 172.210.3.254
vrrp vrid 20 priority 120interface Vlanif 220
ip address 172.220.5.251 23
vrrp vrid 20 virtual-ip 172.220.5.254
vrrp vrid 20 priority 120interface Vlanif 230
ip address 172.230.7.251 23
vrrp vrid 20 virtual-ip 172.230.7.254
vrrp vrid 20 priority 100interface Vlanif 240
ip address 172.240.9.251 23
vrrp vrid 20 virtual-ip 172.240.9.254
vrrp vrid 20 priority 100interface Vlanif 250
ip address 172.250.11.251 23
vrrp vrid 20 virtual-ip 172.250.11.254
vrrp vrid 20 priority 100interface Vlanif 100
ip address 192.168.100.251 24
vrrp vrid 20 virtual-ip 192.168.100.254
vrrp vrid 20 priority 120vlan 70inter vlan 70ip address 10.1.70.1 30inter gi0/0/5p l acp de vlan 70inter loop 0
ip address 2.2.2.2 32router id 2.2.2.2
ospf 1
area 0
network 10.1.70.0 0.0.0.3
network 172.16.0.0 255.255.254.0
network 172.16.2.0 255.255.254.0
network 172.16.4.0 255.255.254.0
network 172.16.6.0 255.255.254.0
network 172.16.8.0 255.255.254.0
network 172.16.10.0 255.255.254.0
network 172.200.0.0 255.255.254.0
network 172.210.2.0 255.255.254.0
network 172.220.4.0 255.255.254.0
network 172.230.6.0 255.255.254.0
network 172.240.8.0 255.255.254.0
network 172.250.10.0 255.255.254.0
network 192.168.100.0 255.255.255.0
network 2.2.2.2 0.0.0.0
quit#无线配置
inter gi0/0/6
port link t
p t a v alldhcp enable
ip pool vlan200
network 172.200.0.0 mask 23
gateway-list 172.200.1.254
dns-list 192.168.150.1
excluded-ip-address 172.200.1.1 172.200.1.253
qinterface Vlanif 200
dhcp select global
qip pool vlan210
network 172.210.2.0 mask 23
gateway-list 172.210.3.254
dns-list 192.168.150.1
excluded-ip-address 172.210.3.1 172.210.3.253
qinterface Vlanif 210
dhcp select global
qip pool vlan220
network 172.220.4.0 mask 23
gateway-list 172.220.5.254
dns-list 192.168.150.1
excluded-ip-address 172.220.5.1 172.220.5.253
qinterface Vlanif 220
dhcp select global
qip pool vlan230
network 172.230.6.0 mask 23
gateway-list 172.230.7.254
dns-list 192.168.150.1
excluded-ip-address 172.230.7.1 172.230.7.253
qinterface Vlanif 230
dhcp select global
qip pool vlan240
network 172.240.8.0 mask 23
gateway-list 172.240.9.254
dns-list 192.168.150.1
excluded-ip-address 172.240.9.1 172.240.9.253
qinterface Vlanif 240
dhcp select global
qip pool vlan250
network 172.250.10.0 mask 23
gateway-list 172.250.11.254
dns-list 192.168.150.1
excluded-ip-address 172.250.11.1 172.250.11.253
qinterface Vlanif 250
dhcp select global
qip pool vlan100
network 192.168.100.0 mask 24
gateway-list 192.168.100.254
dns-list 192.168.150.1
excluded-ip-address 192.168.100.126 192.168.100.253
qinterface Vlanif 100
dhcp select global
qinter gi0/0/6
port link trunk
port trunk allow vlan all
三、Core-sw2
sys
sysname core-sw2
vlan batch 10 20 30 40 50 60 100
vlan batch 200 210 220 230 240 250 stp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qstp instance 1 root secondary
stp instance 3 root secondary
stp instance 5 root secondarystp instance 2 root primary
stp instance 4 root primaryinter gi0/0/1
port link trunk
port trunk all vlan allinter gi0/0/2
port link trunk
port trunk all vlan allinterface Eth-Trunk 1p l tp t a v allinter gi0/0/3eth-trunk 1inter gi0/0/4eth-trunk 1interface Vlanif 10
ip address 172.16.0.253 23
vrrp vrid 10 virtual-ip 172.16.1.254
vrrp vrid 10 priority 100interface Vlanif 20
ip address 172.16.2.253 23
vrrp vrid 10 virtual-ip 172.16.3.254
vrrp vrid 10 priority 100interface Vlanif 30
ip address 172.16.4.253 23
vrrp vrid 10 virtual-ip 172.16.5.254
vrrp vrid 10 priority 100interface Vlanif 40
ip address 172.16.6.253 23
vrrp vrid 10 virtual-ip 172.16.7.254
vrrp vrid 10 priority 120interface Vlanif 50
ip address 172.16.8.253 23
vrrp vrid 10 virtual-ip 172.16.9.254
vrrp vrid 10 priority 120interface Vlanif 60
ip address 172.16.10.253 23
vrrp vrid 10 virtual-ip 172.16.11.254
vrrp vrid 10 priority 120dhcp enable
ip pool vlan10
network 172.16.0.0 mask 23
gateway-list 172.16.1.254
dns-list 192.168.150.1
excluded-ip-address 172.16.0.1 172.16.0.254
qinterface Vlanif 10
dhcp select global
qip pool vlan20
network 172.16.2.0 mask 23
gateway-list 172.16.3.254
dns-list 192.168.150.1
excluded-ip-address 172.16.2.1 172.16.2.254
qinterface Vlanif 20
dhcp select global
qip pool vlan30
network 172.16.4.0 mask 23
gateway-list 172.16.5.254
dns-list 192.168.150.1
excluded-ip-address 172.16.4.1 172.16.4.254
qinterface Vlanif 30
dhcp select global
qip pool vlan40
network 172.16.6.0 mask 23
gateway-list 172.16.7.254
dns-list 192.168.150.1
excluded-ip-address 172.16.6.1 172.16.6.254
qinterface Vlanif 40
dhcp select global
qip pool vlan50
network 172.16.8.0 mask 23
gateway-list 172.16.9.254
dns-list 192.168.150.1
excluded-ip-address 172.16.8.1 172.16.8.254
qinterface Vlanif 50
dhcp select global
qip pool vlan60
network 172.16.10.0 mask 23
gateway-list 172.16.11.254
dns-list 192.168.150.1
excluded-ip-address 172.16.10.1 172.16.10.254
qinterface Vlanif 60
dhcp select global
qinterface Vlanif 200
ip address 172.200.1.252 23
vrrp vrid 20 virtual-ip 172.200.1.254
vrrp vrid 20 priority 100interface Vlanif 210
ip address 172.210.3.252 23
vrrp vrid 20 virtual-ip 172.210.3.254
vrrp vrid 20 priority 100interface Vlanif 220
ip address 172.220.5.252 23
vrrp vrid 20 virtual-ip 172.220.5.254
vrrp vrid 20 priority 100interface Vlanif 230
ip address 172.230.7.252 23
vrrp vrid 20 virtual-ip 172.230.7.254
vrrp vrid 20 priority 120interface Vlanif 240
ip address 172.240.9.252 23
vrrp vrid 20 virtual-ip 172.240.9.254
vrrp vrid 20 priority 120interface Vlanif 250
ip address 172.250.11.252 23
vrrp vrid 20 virtual-ip 172.250.11.254
vrrp vrid 20 priority 120interface Vlanif 100
ip address 192.168.100.252 24
vrrp vrid 20 virtual-ip 192.168.100.254
vrrp vrid 20 priority 100vlan 80inter vlan 80ip address 10.1.80.1 30inter gi0/0/5p l acp de vlan 80inter loop 0
ip address 3.3.3.3 32router id 3.3.3.3
ospf 1
silent-interface Vlanif 10
silent-interface Vlanif 20
silent-interface Vlanif 30
silent-interface Vlanif 40
silent-interface Vlanif 50
silent-interface Vlanif 60
silent-interface Vlanif 200
silent-interface Vlanif 210
silent-interface Vlanif 220
silent-interface Vlanif 230
silent-interface Vlanif 240
silent-interface Vlanif 250
silent-interface Vlanif 100
area 0
network 10.1.80.0 0.0.0.3
network 172.16.0.0 255.255.254.0
network 172.16.2.0 255.255.254.0
network 172.16.4.0 255.255.254.0
network 172.16.6.0 255.255.254.0
network 172.16.8.0 255.255.254.0
network 172.16.10.0 255.255.254.0
network 172.200.0.0 255.255.254.0
network 172.210.2.0 255.255.254.0
network 172.220.4.0 255.255.254.0
network 172.230.6.0 255.255.254.0
network 172.240.8.0 255.255.254.0
network 172.250.10.0 255.255.254.0
network 192.168.100.0 255.255.255.0
network 3.3.3.3 0.0.0.0
q#无线配置inter gi0/0/6
port link trunk
port trunk allow vlan alldhcp enable
ip pool vlan200
network 172.200.0.0 mask 23
gateway-list 172.200.1.254
dns-list 192.168.150.1
excluded-ip-address 172.200.1.251 172.200.1.253
excluded-ip-address 172.200.0.1 172.200.0.254
qinterface Vlanif 200
dhcp select global
qip pool vlan210
network 172.210.2.0 mask 23
gateway-list 172.210.3.254
dns-list 192.168.150.1
excluded-ip-address 172.210.3.251 172.210.3.253
excluded-ip-address 172.210.2.1 172.210.2.254
qinterface Vlanif 210
dhcp select global
qip pool vlan220
network 172.220.4.0 mask 23
gateway-list 172.220.5.254
dns-list 192.168.150.1
excluded-ip-address 172.220.5.251 172.220.5.253
excluded-ip-address 172.220.4.1 172.220.4.254
qinterface Vlanif 220
dhcp select global
qip pool vlan230
network 172.230.6.0 mask 23
gateway-list 172.230.7.254
dns-list 192.168.150.1
excluded-ip-address 172.230.7.251 172.230.7.253
excluded-ip-address 172.230.6.1 172.230.6.254
qinterface Vlanif 230
dhcp select global
qip pool vlan240
network 172.240.8.0 mask 23
gateway-list 172.240.9.254
dns-list 192.168.150.1
excluded-ip-address 172.240.9.251 172.240.9.253
excluded-ip-address 172.240.8.1 172.240.8.254
qinterface Vlanif 240
dhcp select global
qip pool vlan250
network 172.250.10.0 mask 23
gateway-list 172.250.11.254
dns-list 192.168.150.1
excluded-ip-address 172.250.11.251 172.250.11.253
excluded-ip-address 172.250.10.1 172.250.10.254
qinterface Vlanif 250
dhcp select global
qip pool vlan100
network 192.168.100.0 mask 24
gateway-list 192.168.100.254
dns-list 192.168.150.1
excluded-ip-address 192.168.100.1 192.168.100.125
excluded-ip-address 192.168.100.251 192.168.100.253
qinterface Vlanif 100
dhcp select global
q
四、汇聚层
汇聚层配置见python自动化管理和zabbix监控网络设备(有线网络和路由配置部分)-CSDN博客的汇聚层的sum-sw1-2两台设备配置
五、AC1
sys
sysname AC1
vlan batch 100 200 210 220 230 240 250stp region-configuration
region-name huawei
revision-level 1
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qinterface Vlanif 200
ip address 172.200.1.253 23interface Vlanif 210
ip address 172.210.3.253 23interface Vlanif 220
ip address 172.220.5.253 23interface Vlanif 230
ip address 172.230.7.253 23interface Vlanif 240
ip address 172.240.9.253 23interface Vlanif 250
ip address 172.250.11.253 23interface Vlanif 100
ip address 192.168.100.253 24inter gi0/0/1
port link trun
port trun a vlan all
quitwlan
ap auth-mode no-auth
quit
capwap source ip-address 192.168.100.253wlan
ap-mac 00e0-fc21-40b0
ap-name RA1_APap-mac 00e0-fc70-64c0
ap-name RA2_APap-mac 00e0-fc37-3860
ap-name HL_APap-mac 00e0-fcab-0a90
ap-name CF_APap-mac 00e0-fc7f-5cc0
ap-name DI_APap-mac 00e0-fc19-4ff0
ap-name ET_APwlan
ap-group name RA1
regulatory-domain-profile defualt
Y
ap-group name RA2
regulatory-domain-profile defualt
Y
ap-group name HL
regulatory-domain-profile defualt
Y
ap-group name CF
regulatory-domain-profile defualt
Y
ap-group name DI
regulatory-domain-profile defualt
Y
ap-group name ET
regulatory-domain-profile defualt
Yap-name RA1_AP
ap-group RA1
Y
quitap-name RA2_AP
ap-group RA2
Y
quitap-name HL_AP
ap-group HL
Y
quitap-name CF_AP
ap-group CF
Y
quitap-name DI_AP
ap-group DI
Y
quitap-name ET_AP
ap-group ET
Y
quit#RA1调优
wlan
security-profile name RA1
security wpa2 psk pass-phrase Aa1bB2Cc3 aes
quitwlan
ssid-profile name Room_Area1
ssid Room_Area1
quitwlan
vap-profile name Room_Area1
security-profile RA1
ssid-profile Room_Area1
forward-mode tunnel
service-vlan vlan-id 200
quit#开启4G和5G频段wlan
ap-name RA1_AP
vap-profile Room_Area1 wlan 1 radio 0
vap-profile Room_Area1 wlan 1 radio 1quitwlan
security-profile name RA2_AP
security wpa2 psk pass-phrase De4FgH5iJ aes
quitwlan
ssid-profile name Room_Area2
ssid Room_Area2
quitwlan
vap-profile name Room_Area2
security-profile RA2
ssid-profile Room_Area2
forward-mode tunnel
service-vlan vlan-id 210
quit开启4G和5G频段wlan
ap-name RA2_AP
vap-profile Room_Area2 wlan 1 radio 0
vap-profile Room_Area2 wlan 1 radio 1quitHL_APwlan
security-profile name HL_AP
security wpa2 psk pass-phrase K6lLmNo7P aes
quitwlan
ssid-profile name Hotel_Lobby
ssid Hotel_Lobby
quitwlan
vap-profile name Hotel_Lobby
security-profile HL_AP
ssid-profile Hotel_Lobby
forward-mode tunnel
service-vlan vlan-id 220
quit开启4G和5G频段wlan
ap-name HL_AP
vap-profile Hotel_Lobby wlan 1 radio 0
vap-profile Hotel_Lobby wlan 1 radio 1quit流量限速,上行和下行限速为3M
traffic-profile name wlan-traffic-HL_AP
rate-limit client down 3000
rate-limit client up 3000
vap-profile name HL_AP
traffic-profile wlan-traffic-HL_AP禁止低速率
ap-name HL_AP
radio-2g-profile name 0
dot11bg basic-rate 6 9
ap-name HL_AP
radio-5g-profile name 0
dot11a basic-rate 6 9
qCF_APwlan
security-profile name CF_AP
security wpa2 psk pass-phrase Qr8sT9uUv aes
quitwlan
ssid-profile name Conference
ssid Conference
quitwlan
vap-profile name Conference
security-profile CF_AP
ssid-profile Conference
forward-mode tunnel
service-vlan vlan-id 230
quit开启4G和5G频段wlan
ap-name CF_AP
vap-profile Conference wlan 1 radio 0
vap-profile Conference wlan 1 radio 1quit流量限速,上行和下行限速为3M
traffic-profile name wlan-traffic-CF_AP
rate-limit client down 3000
rate-limit client up 3000
vap-profile name CF_AP
traffic-profile wlan-traffic-CF_AP禁止低速率
ap-name CF_AP
radio-2g-profile name 0
dot11bg basic-rate 6 9
ap-name CF_AP
radio-5g-profile name 0
dot11a basic-rate 6 9 DI_AP
wlan
security-profile name DI_AP
security wpa2 psk pass-phrase Wx5Yz6A7B aes
quitwlan
ssid-profile name Dining
ssid Dining
quitwlan
vap-profile name Dining
security-profile DI_AP
ssid-profile Dining
forward-mode tunnel
service-vlan vlan-id 240
quit开启4G和5G频段wlan
ap-name DI_AP
vap-profile Dining wlan 1 radio 0
vap-profile Dining wlan 1 radio 1quit流量限速,上行和下行限速为3M
traffic-profile name wlan-traffic-DI_AP
rate-limit client down 3000
rate-limit client up 3000
vap-profile name DI_AP
traffic-profile wlan-traffic-DI_AP禁止低速率
ap-name DI_AP
radio-2g-profile name 0
dot11bg basic-rate 6 9
ap-name DI_AP
radio-5g-profile name 0
dot11a basic-rate 6 9
qET_AP
wlan
security-profile name ET_AP
security wpa2 psk pass-phrase Wx5Yz6A7B aes
quitwlan
ssid-profile name Entertainment
ssid Entertainment
quitwlan
vap-profile name Entertainment
security-profile ET_AP
ssid-profile Entertainment
forward-mode tunnel
service-vlan vlan-id 250
quit开启4G和5G频段wlan
ap-name ET_AP
vap-profile Entertainment wlan 1 radio 0
vap-profile Entertainment wlan 1 radio 1quit流量限速,上行和下行限速为3M
traffic-profile name wlan-traffic-ET_AP
rate-limit client down 3000
rate-limit client up 3000
vap-profile name ET_AP
traffic-profile wlan-traffic-ET_AP禁止低速率
ap-name ET_AP
radio-2g-profile name 0
dot11bg basic-rate 6 9
ap-name ET_AP
radio-5g-profile name 0
dot11a basic-rate 6 9
q
六、SW1-6
SW1
system-view
sysname SW1
vlan batch 10 100 200inter gi0/0/1port link-type trunkport trunk allow-pass vlan 10 100 200quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 10 100 200quitinter gi0/0/3port link-type accessport default vlan 10quitstp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qvlan 200
interface g 0/0/4
port link-type trunk
port trunk allow vlan 100 200
port trunk pvid vlan 100
q
SW2
system-view
sysname SW2
vlan batch 20 100 210inter gi0/0/1port link-type trunkport trunk allow-pass vlan 20 100 210quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 20 100 210quitinter gi0/0/3port link-type accessport default vlan 20quitstp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qinterface g 0/0/4
port link-type trunk
port trunk allow vlan 100 210
port trunk pvid vlan 100
q
SW3
system-view
sysname SW3
vlan batch 30 100 220inter gi0/0/1port link-type trunkport trunk allow-pass vlan 30 100 220quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 30 100 220quitinter gi0/0/3port link-type accessport default vlan 30quitstp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qinterface g 0/0/4
port link-type trunk
port trunk allow vlan 100 220
port trunk pvid vlan 100
q
SW4
system-view
sysname SW4
vlan batch 40 100 230inter gi0/0/1port link-type trunkport trunk allow-pass vlan 40 100 230quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 40 100 230quitinter gi0/0/3port link-type accessport default vlan 40quitstp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qinterface g 0/0/4
port link-type trunk
port trunk allow vlan 100 230
port trunk pvid vlan 100
q
SW5
system-view
sysname SW5
vlan batch 50 100 240inter gi0/0/1port link-type trunkport trunk allow-pass vlan 50 100 240quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 50 100 240quitinter gi0/0/3port link-type accessport default vlan 50quitstp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qinterface g 0/0/4
port link-type trunk
port trunk allow vlan 100 240
port trunk pvid vlan 100
q
SW6
system-view
sysname SW6
vlan batch 60 100 250inter gi0/0/1port link-type trunkport trunk allow-pass vlan 60 100 250quitinter gi0/0/2port link-type trunkport trunk allow-pass vlan 60 100 250quitinter gi0/0/3port link-type accessport default vlan 60quitstp region-configuration
region-name huawei
revision-level 1
instance 1 vlan 10 20 30
instance 2 vlan 40 50 60
instance 3 vlan 200 210 220
instance 4 vlan 230 240 250
instance 5 vlan 100
active region-configuration
qinterface g 0/0/4
port link-type trunk
port trunk allow vlan 100 250
port trunk pvid vlan 100
q
七、DMZ区域
DMZ区域见python自动化管理和zabbix监控网络设备(有线网络和路由配置部分)-CSDN博客的DMZ-SW1配置