
a. Configure the access switch.
Starting with access switch ACC1 as an example, create service VLANs 10 and 20 on
ACC1.
1
<HUAWEI>
system-view
[
HUAWEI
] sysname ACC1
//Set the switch name to
ACC1
.
[ACC1]
vlan batch 10 20
//Create VLANs in a batch.
Configure GE0/0/3 and GE0/0/4, through which ACC1 connects to CORE1 and CORE2
respectively, to allow the packets from the VLANs of departments A and B to pass through.
2
[ACC1]
interface GigabitEthernet 0/0/3
[ACC1-GigabitEthernet0/0/3]
port link-type trunk
//Set GE0/0/3 type to
Trunk for VLAN transparent transmission.
[ACC1-GigabitEthernet0/0/3]
port trunk allow-pass vlan 10 20
//Configure
GE0/0/3 to transparently transmit the service VLANs on ACC1.
[ACC1-GigabitEthernet0/0/3]
quit
[ACC1]
interface GigabitEthernet 0/0/4
[ACC1-GigabitEthernet0/0/4]
port link-type trunk
//Set GE0/0/4 type to
Trunk for VLAN transparent transmission.
[ACC1-GigabitEthernet0/0/4]
port trunk allow-pass vlan 10 20
//Configure
GE0/0/4 to transparently transmit the service VLANs on ACC1.
[ACC1-GigabitEthernet0/0/4]
quit
Configure the interfaces on ACC1 that connect user devices so that user devices in
different departments can be added to VLANs.
3
[ACC1]
interface GigabitEthernet 0/0/1
//Configure the interface
connecting to department A.
[ACC1-GigabitEthernet0/0/1]
port link-type access
[ACC1-GigabitEthernet0/0/1]
port default vlan 10
[ACC1-GigabitEthernet0/0/1]
quit
[ACC1]
interface GigabitEthernet 0/0/2
//Configure the interface
connecting to department B.
[ACC1-GigabitEthernet0/0/2]
port link-type access
[ACC1-GigabitEthernet0/0/2]
port default vlan 20
[ACC1-GigabitEthernet0/0/2]
quit
To add all users connected to ACC1 to VLAN 10, you can add interfaces
on CORE1 and CORE2 that directly connect to ACC1 as Access
interfaces and do not add interfaces on ACC1 to VLAN 10, simplifying
the configuration. This configuration ensures that all users connected to
Eth-Trunk1 belong to VLAN 10.
[ACC1]
stp bpdu-protection
Configure the BPDU protection function to improve network stability.
4
Configuring Network Connectivity
30