华为交换机经典组网配置案例
目录
- 小型企业网络组网
- 中型园区网络组网
- 大型数据中心网络组网
- MSTP+VRRP 高可用组网
- 堆叠组网配置
- 无线 AC+AP 组网
- QinQ 组网配置
1. 小型企业网络组网
1.1 组网拓扑
1 2 3 4 5 6 7 8 9 10 11
| Internet | [防火墙] | [核心交换机] / \ / \ [接入交换机 1] [接入交换机 2] / \ / \ PC1 PC2 PC3 PC4 VLAN10 VLAN20 VLAN10 VLAN20
|
1.2 需求分析
- 2 个部门:行政部(VLAN10)、技术部(VLAN20)
- 核心交换机提供 VLAN 间路由
- 接入交换机二层接入
- 统一出口上网
1.3 核心交换机配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
| <Huawei> system-view [Huawei] sysname Core-SW
[Core-SW] vlan batch 10 20 100
[Core-SW] interface GigabitEthernet 0/0/1 [Core-SW-GigabitEthernet0/0/1] description To_Access_SW1 [Core-SW-GigabitEthernet0/0/1] port link-type trunk [Core-SW-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 20 [Core-SW-GigabitEthernet0/0/1] quit
[Core-SW] interface GigabitEthernet 0/0/2 [Core-SW-GigabitEthernet0/0/2] description To_Access_SW2 [Core-SW-GigabitEthernet0/0/2] port link-type trunk [Core-SW-GigabitEthernet0/0/2] port trunk allow-pass vlan 10 20 [Core-SW-GigabitEthernet0/0/2] quit
[Core-SW] interface GigabitEthernet 0/0/24 [Core-SW-GigabitEthernet0/0/24] description To_Firewall [Core-SW-GigabitEthernet0/0/24] port link-type access [Core-SW-GigabitEthernet0/0/24] port default vlan 100 [Core-SW-GigabitEthernet0/0/24] quit
[Core-SW] interface Vlanif 10 [Core-SW-Vlanif10] description HR_Department [Core-SW-Vlanif10] ip address 192.168.10.1 255.255.255.0 [Core-SW-Vlanif10] quit
[Core-SW] interface Vlanif 20 [Core-SW-Vlanif20] description IT_Department [Core-SW-Vlanif20] ip address 192.168.20.1 255.255.255.0 [Core-SW-Vlanif20] quit
[Core-SW] interface Vlanif 100 [Core-SW-Vlanif100] description To_Internet [Core-SW-Vlanif100] ip address 192.168.100.2 255.255.255.0 [Core-SW-Vlanif100] quit
[Core-SW] ip routing
[Core-SW] ip route-static 0.0.0.0 0.0.0.0 192.168.100.1
[Core-SW] dhcp enable [Core-SW] ip pool vlan10 [Core-SW-ip-pool-vlan10] network 192.168.10.0 mask 255.255.255.0 [Core-SW-ip-pool-vlan10] gateway-list 192.168.10.1 [Core-SW-ip-pool-vlan10] dns-list 114.114.114.114 8.8.8.8 [Core-SW-ip-pool-vlan10] quit
[Core-SW] ip pool vlan20 [Core-SW-ip-pool-vlan20] network 192.168.20.0 mask 255.255.255.0 [Core-SW-ip-pool-vlan20] gateway-list 192.168.20.1 [Core-SW-ip-pool-vlan20] dns-list 114.114.114.114 8.8.8.8 [Core-SW-ip-pool-vlan20] quit
[Core-SW] interface Vlanif 10 [Core-SW-Vlanif10] dhcp select global [Core-SW-Vlanif10] quit
[Core-SW] interface Vlanif 20 [Core-SW-Vlanif20] dhcp select global [Core-SW-Vlanif20] quit
<Core-SW> save
|
1.4 接入交换机配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| <Huawei> system-view [Huawei] sysname Access-SW1
[Access-SW1] vlan batch 10 20
[Access-SW1] interface GigabitEthernet 0/0/1 [Access-SW1-GigabitEthernet0/0/1] description To_PC1_HR [Access-SW1-GigabitEthernet0/0/1] port link-type access [Access-SW1-GigabitEthernet0/0/1] port default vlan 10 [Access-SW1-GigabitEthernet0/0/1] quit
[Access-SW1] interface GigabitEthernet 0/0/2 [Access-SW1-GigabitEthernet0/0/2] description To_PC2_IT [Access-SW1-GigabitEthernet0/0/2] port link-type access [Access-SW1-GigabitEthernet0/0/2] port default vlan 20 [Access-SW1-GigabitEthernet0/0/2] quit
[Access-SW1] interface GigabitEthernet 0/0/24 [Access-SW1-GigabitEthernet0/0/24] description To_Core_SW [Access-SW1-GigabitEthernet0/0/24] port link-type trunk [Access-SW1-GigabitEthernet0/0/24] port trunk allow-pass vlan 10 20 [Access-SW1-GigabitEthernet0/0/24] quit
<Access-SW1> save
<Huawei> system-view [Huawei] sysname Access-SW2 [Access-SW2] vlan batch 10 20 [Access-SW2] interface GigabitEthernet 0/0/1 [Access-SW2-GigabitEthernet0/0/1] port link-type access [Access-SW2-GigabitEthernet0/0/1] port default vlan 10 [Access-SW2] interface GigabitEthernet 0/0/2 [Access-SW2-GigabitEthernet0/0/2] port link-type access [Access-SW2-GigabitEthernet0/0/2] port default vlan 20 [Access-SW2] interface GigabitEthernet 0/0/24 [Access-SW2-GigabitEthernet0/0/24] port link-type trunk [Access-SW2-GigabitEthernet0/0/24] port trunk allow-pass vlan 10 20 <Access-SW2> save
|
2. 中型园区网络组网
2.1 组网拓扑
1 2 3 4 5 6 7 8 9 10
| Internet | [防火墙] | [核心交换机 1] <====> [核心交换机 2] / | \ / | \ / | \ / | \ [汇聚 1] [汇聚 2] [汇聚 3] [汇聚 1] [汇聚 2] [汇聚 3] / \ / \ / \ / \ / \ / \ 接入 接入 接入 接入 接入 接入 接入 接入 接入 接入 接入
|
2.2 需求分析
- 核心层双机冗余
- 汇聚层链路聚合
- 多 VLAN 隔离
- 生成树防环
- 无线覆盖
2.3 核心交换机配置(MSTP+VRRP)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
| <Huawei> system-view [Huawei] sysname Core-SW1
[Core-SW1] vlan batch 10 20 30 40 100
[Core-SW1] stp mode mstp [Core-SW1] stp region-configuration [Core-SW1-mst-region] region-name CAMPUS [Core-SW1-mst-region] instance 1 vlan 10 20 [Core-SW1-mst-region] instance 2 vlan 30 40 [Core-SW1-mst-region] revision-level 1 [Core-SW1-mst-region] active region-configuration [Core-SW1-mst-region] quit
[Core-SW1] stp instance 1 priority 0 [Core-SW1] stp instance 2 priority 4096
[Core-SW1] interface Vlanif 10 [Core-SW1-Vlanif10] ip address 192.168.10.2 255.255.255.0 [Core-SW1-Vlanif10] vrrp vrid 1 virtual-ip 192.168.10.1 [Core-SW1-Vlanif10] vrrp vrid 1 priority 120 [Core-SW1-Vlanif10] vrrp vrid 1 preempt-mode timer delay 20 [Core-SW1-Vlanif10] quit
[Core-SW1] interface Vlanif 20 [Core-SW1-Vlanif20] ip address 192.168.20.2 255.255.255.0 [Core-SW1-Vlanif20] vrrp vrid 2 virtual-ip 192.168.20.1 [Core-SW1-Vlanif20] vrrp vrid 2 priority 120 [Core-SW1-Vlanif20] quit
[Core-SW1] interface Vlanif 30 [Core-SW1-Vlanif30] ip address 192.168.30.2 255.255.255.0 [Core-SW1-Vlanif30] vrrp vrid 3 virtual-ip 192.168.30.1 [Core-SW1-Vlanif30] vrrp vrid 3 priority 100 [Core-SW1-Vlanif30] quit
[Core-SW1] interface Vlanif 40 [Core-SW1-Vlanif40] ip address 192.168.40.2 255.255.255.0 [Core-SW1-Vlanif40] vrrp vrid 4 virtual-ip 192.168.40.1 [Core-SW1-Vlanif40] vrrp vrid 4 priority 100 [Core-SW1-Vlanif40] quit
[Core-SW1] interface Eth-Trunk 1 [Core-SW1-Eth-Trunk1] description To_Core-SW2 [Core-SW1-Eth-Trunk1] port link-type trunk [Core-SW1-Eth-Trunk1] port trunk allow-pass vlan 10 20 30 40 100 [Core-SW1-Eth-Trunk1] mode lacp [Core-SW1-Eth-Trunk1] quit
[Core-SW1] interface GigabitEthernet 1/0/1 [Core-SW1-GigabitEthernet1/0/1] eth-trunk 1 [Core-SW1] interface GigabitEthernet 1/0/2 [Core-SW1-GigabitEthernet1/0/2] eth-trunk 1
[Core-SW1] interface Eth-Trunk 10 [Core-SW1-Eth-Trunk10] description To_Aggregation-SW1 [Core-SW1-Eth-Trunk10] port link-type trunk [Core-SW1-Eth-Trunk10] port trunk allow-pass vlan 10 20 30 40 [Core-SW1-Eth-Trunk10] quit
[Core-SW1] interface GigabitEthernet 1/0/10 [Core-SW1-GigabitEthernet1/0/10] eth-trunk 10
[Core-SW1] ospf 1 router-id 1.1.1.1 [Core-SW1-ospf-1] area 0 [Core-SW1-ospf-1-area-0.0.0.0] network 192.168.10.0 0.0.0.255 [Core-SW1-ospf-1-area-0.0.0.0] network 192.168.20.0 0.0.0.255 [Core-SW1-ospf-1-area-0.0.0.0] network 192.168.30.0 0.0.0.255 [Core-SW1-ospf-1-area-0.0.0.0] network 192.168.40.0 0.0.0.255 [Core-SW1-ospf-1-area-0.0.0.0] network 192.168.100.0 0.0.0.255
[Core-SW1] ip route-static 0.0.0.0 0.0.0.0 192.168.100.254
<Core-SW1> save
|
2.4 核心交换机 2 配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| <Huawei> system-view [Huawei] sysname Core-SW2
[Core-SW2] vlan batch 10 20 30 40 100 [Core-SW2] stp mode mstp [Core-SW2] stp region-configuration [Core-SW2-mst-region] region-name CAMPUS [Core-SW2-mst-region] instance 1 vlan 10 20 [Core-SW2-mst-region] instance 2 vlan 30 40 [Core-SW2-mst-region] revision-level 1 [Core-SW2-mst-region] active region-configuration
[Core-SW2] stp instance 1 priority 4096 [Core-SW2] stp instance 2 priority 0
[Core-SW2] interface Vlanif 10 [Core-SW2-Vlanif10] ip address 192.168.10.3 255.255.255.0 [Core-SW2-Vlanif10] vrrp vrid 1 virtual-ip 192.168.10.1 [Core-SW2-Vlanif10] vrrp vrid 1 priority 100 [Core-SW2-Vlanif10] quit
[Core-SW2] interface Vlanif 20 [Core-SW2-Vlanif20] ip address 192.168.20.3 255.255.255.0 [Core-SW2-Vlanif20] vrrp vrid 2 virtual-ip 192.168.20.1 [Core-SW2-Vlanif20] vrrp vrid 2 priority 100 [Core-SW2-Vlanif20] quit
[Core-SW2] interface Vlanif 30 [Core-SW2-Vlanif30] ip address 192.168.30.3 255.255.255.0 [Core-SW2-Vlanif30] vrrp vrid 3 virtual-ip 192.168.30.1 [Core-SW2-Vlanif30] vrrp vrid 3 priority 120 [Core-SW2-Vlanif30] quit
[Core-SW2] interface Vlanif 40 [Core-SW2-Vlanif40] ip address 192.168.40.3 255.255.255.0 [Core-SW2-Vlanif40] vrrp vrid 4 virtual-ip 192.168.40.1 [Core-SW2-Vlanif40] vrrp vrid 4 priority 120 [Core-SW2-Vlanif40] quit
<Core-SW2> save
|
3. 大型数据中心网络组网
3.1 组网拓扑(Spine-Leaf 架构)
1 2 3 4 5 6 7 8
| [核心路由器] | [Spine 1] <====> [Spine 2] / \ / \ / \ / \ [Leaf 1] [Leaf 2] [Leaf 3] [Leaf 4] / \ / \ / \ / \ [服务器集群] [服务器集群] [服务器集群] [服务器集群]
|
3.2 需求分析
- 高带宽、低延迟
- 无阻塞转发
- 横向扩展能力
- VXLAN overlay 网络
3.3 Spine 交换机配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| <Huawei> system-view [Huawei] sysname Spine-1
[Spine-1] vlan batch 100 [Spine-1] interface Eth-Trunk 1 [Spine-1-Eth-Trunk1] description To_Spine-2 [Spine-1-Eth-Trunk1] port link-type trunk [Spine-1-Eth-Trunk1] port trunk allow-pass vlan 100 [Spine-1-Eth-Trunk1] mode lacp
[Spine-1] interface 100GE 1/0/1 [Spine-1-100GE1/0/1] description To_Leaf-1 [Spine-1-100GE1/0/1] port link-type trunk [Spine-1-100GE1/0/1] port trunk allow-pass vlan 100
[Spine-1] interface 100GE 1/0/2 [Spine-1-100GE1/0/2] description To_Leaf-2 [Spine-1-100GE1/0/2] port link-type trunk [Spine-1-100GE1/0/2] port trunk allow-pass vlan 100
[Spine-1] ospf 1 router-id 1.1.1.1 [Spine-1-ospf-1] area 0 [Spine-1-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[Spine-1] bgp 65001 [Spine-1-bgp] router-id 1.1.1.1 [Spine-1-bgp] peer 10.0.0.2 as-number 65001 [Spine-1-bgp] peer 10.0.0.4 as-number 65001 [Spine-1-bgp] peer 10.0.0.6 as-number 65001 [Spine-1-bgp] peer 10.0.0.8 as-number 65001 [Spine-1-bgp] ipv4-family unicast [Spine-1-bgp-af-ipv4] peer 10.0.0.2 enable [Spine-1-bgp-af-ipv4] peer 10.0.0.4 enable [Spine-1-bgp-af-ipv4] peer 10.0.0.6 enable [Spine-1-bgp-af-ipv4] peer 10.0.0.8 enable
<Spine-1> save
|
3.4 Leaf 交换机配置(VXLAN)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| <Huawei> system-view [Huawei] sysname Leaf-1
[Leaf-1] vxlan
[Leaf-1] vxlan 10 [Leaf-1-vxlan-10] vni 5010 [Leaf-1-vxlan-10] quit
[Leaf-1] vxlan 20 [Leaf-1-vxlan-20] vni 5020 [Leaf-1-vxlan-20] quit
[Leaf-1] interface Vbdif 10 [Leaf-1-Vbdif10] ip address 192.168.10.1 255.255.255.0 [Leaf-1-Vbdif10] arp collect host enable [Leaf-1-Vbdif10] quit
[Leaf-1] interface Vbdif 20 [Leaf-1-Vbdif20] ip address 192.168.20.1 255.255.255.0 [Leaf-1-Vbdif20] arp collect host enable [Leaf-1-Vbdif20] quit
[Leaf-1] interface Nve 1 [Leaf-1-Nve1] source 10.0.0.1 [Leaf-1-Nve1] vni 5010 head-end peer-list 10.0.0.2 [Leaf-1-Nve1] vni 5020 head-end peer-list 10.0.0.2 [Leaf-1-Nve1] quit
[Leaf-1] interface 10GE 1/0/1 [Leaf-1-10GE1/0/1] port link-type access [Leaf-1-10GE1/0/1] port default vlan 10 [Leaf-1-10GE1/0/1] quit
[Leaf-1] interface 10GE 1/0/2 [Leaf-1-10GE1/0/2] port link-type access [Leaf-1-10GE1/0/2] port default vlan 20 [Leaf-1-10GE1/0/2] quit
[Leaf-1] interface 100GE 1/0/49 [Leaf-1-100GE1/0/49] port link-type trunk [Leaf-1-100GE1/0/49] port trunk allow-pass vlan 100 [Leaf-1-100GE1/0/49] quit
[Leaf-1] interface 100GE 1/0/50 [Leaf-1-100GE1/0/50] port link-type trunk [Leaf-1-100GE1/0/50] port trunk allow-pass vlan 100 [Leaf-1-100GE1/0/50] quit
[Leaf-1] ospf 1 router-id 10.0.0.1 [Leaf-1-ospf-1] area 0 [Leaf-1-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[Leaf-1] bgp 65001 [Leaf-1-bgp] router-id 10.0.0.1 [Leaf-1-bgp] peer 10.0.0.100 as-number 65001 [Leaf-1-bgp] ipv4-family unicast [Leaf-1-bgp-af-ipv4] peer 10.0.0.100 enable [Leaf-1-bgp] l2vpn-family evpn [Leaf-1-bgp-af-evpn] peer 10.0.0.100 enable [Leaf-1-bgp-af-evpn] peer 10.0.0.100 advertise-all-vni
<Leaf-1> save
|
4. MSTP+VRRP 高可用组网
4.1 组网拓扑
1 2 3 4 5 6 7
| [核心交换机 A] <====> [核心交换机 B] || || || || [汇聚交换机 A] <====> [汇聚交换机 B] / \ / \ / \ / \ [接入 A1] [接入 A2] [接入 B1] [接入 B2]
|
4.2 配置要点
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| [Core-A] stp mode mstp [Core-A] stp region-configuration [Core-A-mst-region] region-name DC [Core-A-mst-region] instance 1 vlan 10 30 [Core-A-mst-region] instance 2 vlan 20 40 [Core-A-mst-region] active region-configuration
[Core-A] stp instance 1 priority 0 [Core-A] stp instance 2 priority 4096
[Core-A] interface Vlanif 10 [Core-A-Vlanif10] ip address 192.168.10.2 24 [Core-A-Vlanif10] vrrp vrid 1 virtual-ip 192.168.10.1 [Core-A-Vlanif10] vrrp vrid 1 priority 120 [Core-A-Vlanif10] vrrp vrid 1 preempt-mode timer delay 20
[Core-A] interface Vlanif 20 [Core-A-Vlanif20] ip address 192.168.20.2 24 [Core-A-Vlanif20] vrrp vrid 2 virtual-ip 192.168.20.1 [Core-A-Vlanif20] vrrp vrid 2 priority 100
[Core-B] stp mode mstp [Core-B] stp region-configuration [Core-B-mst-region] region-name DC [Core-B-mst-region] instance 1 vlan 10 30 [Core-B-mst-region] instance 2 vlan 20 40 [Core-B-mst-region] active region-configuration
[Core-B] stp instance 1 priority 4096 [Core-B] stp instance 2 priority 0
[Core-B] interface Vlanif 10 [Core-B-Vlanif10] ip address 192.168.10.3 24 [Core-B-Vlanif10] vrrp vrid 1 virtual-ip 192.168.10.1 [Core-B-Vlanif10] vrrp vrid 1 priority 100
[Core-B] interface Vlanif 20 [Core-B-Vlanif20] ip address 192.168.20.3 24 [Core-B-Vlanif20] vrrp vrid 2 virtual-ip 192.168.20.1 [Core-B-Vlanif20] vrrp vrid 2 priority 120 [Core-B-Vlanif20] vrrp vrid 2 preempt-mode timer delay 20
|
4.3 配置验证
1 2 3 4 5 6 7 8 9 10 11 12 13
| display stp brief display stp instance 1 display stp instance 2
display vrrp brief display vrrp
|
5. 堆叠组网配置
5.1 组网拓扑
1 2 3 4
| [堆叠交换机 1] <==== 堆叠电缆 ====> [堆叠交换机 2] / \ / \ / \ / \ [服务器] [服务器] [服务器] [服务器]
|
5.2 堆叠配置(以 S5700 为例)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| <Huawei> system-view [Huawei] sysname Stack-Member1
[Stack-Member1] stack [Stack-Member1-stack] stack member 1 priority 150 [Stack-Member1-stack] stack member 1 renumber 1 [Stack-Member1-stack] quit
[Stack-Member1] interface 10GE 1/0/25 [Stack-Member1-10GE1/0/25] stack port 1 [Stack-Member1] interface 10GE 1/0/26 [Stack-Member1-10GE1/0/26] stack port 1
<Stack-Member1> save <Stack-Member1> reboot
<Huawei> system-view [Huawei] sysname Stack-Member2
[Stack-Member2] stack [Stack-Member2-stack] stack member 1 priority 100 [Stack-Member2-stack] stack member 1 renumber 2 [Stack-Member2-stack] quit
[Stack-Member2] interface 10GE 1/0/25 [Stack-Member2-10GE1/0/25] stack port 1 [Stack-Member2] interface 10GE 1/0/26 [Stack-Member2-10GE1/0/26] stack port 1
<Stack-Member2> save <Stack-Member2> reboot
|
5.3 堆叠验证
1 2 3 4 5 6 7 8 9 10 11 12
| <Stack> display stack <Stack> display stack topology <Stack> display stack configuration
<Stack> display device
|
5.4 堆叠分裂检测(MAD)
1 2 3 4 5 6 7 8 9 10 11
| [Stack] mad enable [Stack] interface Eth-Trunk 10 [Stack-Eth-Trunk10] mad detect mode direct
[Stack] interface GigabitEthernet 1/0/1 [Stack-GigabitEthernet1/0/1] mad detect mode agent
<Stack> display mad
|
6. 无线 AC+AP 组网
6.1 组网拓扑
1 2 3 4 5 6 7 8
| [核心交换机] | [AC 控制器] | [PoE 交换机] / | \ / | \ [AP1] [AP2] [AP3]
|
6.2 核心交换机配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| <Huawei> system-view [Huawei] sysname Core-SW
[Core-SW] vlan batch 10 100 200
[Core-SW] interface Vlanif 100 [Core-SW-Vlanif100] ip address 192.168.100.1 255.255.255.0 [Core-SW-Vlanif100] quit
[Core-SW] interface Vlanif 200 [Core-SW-Vlanif200] ip address 192.168.200.1 255.255.255.0 [Core-SW-Vlanif200] quit
[Core-SW] dhcp enable [Core-SW] ip pool ap-management [Core-SW-ip-pool-ap-management] network 192.168.100.0 mask 255.255.255.0 [Core-SW-ip-pool-ap-management] gateway-list 192.168.100.1 [Core-SW-ip-pool-ap-management] option 43 sub-option 3 ascii 192.168.100.254 [Core-SW-ip-pool-ap-management] quit
[Core-SW] ip pool station [Core-SW-ip-pool-station] network 192.168.200.0 mask 255.255.255.0 [Core-SW-ip-pool-station] gateway-list 192.168.200.1 [Core-SW-ip-pool-station] dns-list 114.114.114.114 [Core-SW-ip-pool-station] quit
[Core-SW] interface Vlanif 100 [Core-SW-Vlanif100] dhcp select global [Core-SW-Vlanif100] quit
[Core-SW] interface GigabitEthernet 0/0/24 [Core-SW-GigabitEthernet0/0/24] port link-type trunk [Core-SW-GigabitEthernet0/0/24] port trunk allow-pass vlan 100 200 [Core-SW-GigabitEthernet0/0/24] port trunk pvid vlan 100
|
6.3 AC 控制器配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| <Huawei> system-view [Huawei] sysname AC
[AC] wlan [AC-wlan-view] ap auth-mode no-auth
[AC-wlan-view] ap-group name default [AC-wlan-ap-group-default] quit
[AC-wlan-view] radio-2g-profile name default [AC-wlan-radio-2g-prof-default] channel 20mhz [AC-wlan-radio-2g-prof-default] eirp 27 [AC-wlan-radio-2g-prof-default] quit
[AC-wlan-view] radio-5g-profile name default [AC-wlan-radio-5g-prof-default] channel 80mhz [AC-wlan-radio-5g-prof-default] eirp 30 [AC-wlan-radio-5g-prof-default] quit
[AC-wlan-view] vap-profile name default [AC-wlan-vap-prof-default] forward-mode tunnel [AC-wlan-vap-prof-default] service-vlan vlan 200 [AC-wlan-vap-prof-default] ssid-profile name default [AC-wlan-vap-prof-default] security-profile name default [AC-wlan-vap-prof-default] quit
[AC-wlan-view] ssid-profile name default [AC-wlan-ssid-prof-default] ssid Huawei-WLAN [AC-wlan-ssid-prof-default] quit
[AC-wlan-view] security-profile name default [AC-wlan-sec-prof-default] security wpa2 psk pass-phrase Huawei@123 aes [AC-wlan-sec-prof-default] quit
[AC-wlan-view] ap-group name default [AC-wlan-ap-group-default] radio 0 [AC-wlan-ap-group-default-radio-0] vap-profile default wlan 1 [AC-wlan-ap-group-default-radio-0] radio-2g-profile default [AC-wlan-ap-group-default-radio-0] quit [AC-wlan-ap-group-default] radio 1 [AC-wlan-ap-group-default-radio-1] vap-profile default wlan 1 [AC-wlan-ap-group-default-radio-1] radio-5g-profile default [AC-wlan-ap-group-default-radio-1] quit [AC-wlan-ap-group-default] quit
[AC] display ap all [AC] display station all
|
7. QinQ 组网配置
7.1 组网拓扑
1 2 3 4 5
| [用户 Site A] [用户 Site B] | | [CE-A] [CE-B] | | [PE-A] ======= 运营商网络 ======= [PE-B]
|
7.2 PE 交换机配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| <Huawei> system-view [Huawei] sysname PE-A
[PE-A] vlan batch 10 100
[PE-A] interface GigabitEthernet 0/0/1 [PE-A-GigabitEthernet0/0/1] description To_CE-A [PE-A-GigabitEthernet0/0/1] port link-type hybrid [PE-A-GigabitEthernet0/0/1] port hybrid tagged vlan 100 [PE-A-GigabitEthernet0/0/1] qinq vlan-translation enable [PE-A-GigabitEthernet0/0/1] port vlan-stacking vlan 10 stack-vlan 100 [PE-A-GigabitEthernet0/0/1] quit
[PE-A] interface GigabitEthernet 0/0/24 [PE-A-GigabitEthernet0/0/24] description To_P-Network [PE-A-GigabitEthernet0/0/24] port link-type trunk [PE-A-GigabitEthernet0/0/24] port trunk allow-pass vlan 100 [PE-A-GigabitEthernet0/0/24] quit
[PE-A] display qinq vlan-translation [PE-A] display port vlan-stacking
|
7.3 灵活 QinQ 配置
1 2 3 4 5 6 7 8 9
| [PE-A] interface GigabitEthernet 0/0/1 [PE-A-GigabitEthernet0/0/1] port vlan-stacking vlan 10 to 20 stack-vlan 100 [PE-A-GigabitEthernet0/0/1] port vlan-stacking vlan 30 to 40 stack-vlan 200
[PE-A] interface GigabitEthernet 0/0/1 [PE-A-GigabitEthernet0/0/1] port vlan-stacking 8021p 5 stack-vlan 100 [PE-A-GigabitEthernet0/0/1] port vlan-stacking 8021p 6 stack-vlan 200
|
文档版本: 1.0
最后更新: 2026-02-27
适用设备: 华为 S5700/S6700/S7700/S9700/CE 系列交换机