
b. Configure the core switch (CORE).
Create the VLANs for CORE to communicate with ACC1, ACC2, and the egress router.
1
<HUAWEI>
system-view
[
HUAWEI
] sysname CORE
//Set the switch name to
CORE
.
[CORE]
vlan batch 10 20 100
//Create VLANs in a batch.
Configure downstream interfaces and VLANIF interfaces. Communication between
departments A and B uses VLANIF interfaces. For example, CORE connects to ACC1
through Eth-Trunk 1.
2
[CORE]
interface eth-trunk 1
[CORE-Eth-Trunk1]
port link-type trunk
//Set the interface type to
Trunk for VLAN transparent transmission.
[CORE-Eth-Trunk1]
port trunk allow-pass vlan 10
//Configure Eth-Trunk 1 to
transparently transmit the service VLAN on ACC1.
[CORE-Eth-Trunk1]
mode lacp
//Configure the LACP mode.
[CORE-Eth-Trunk1]
quit
[CORE]
interface GigabitEthernet 0/0/1
//Add member interfaces to Eth-
Trunk 1.
[CORE-GigabitEthernet0/0/1]
Eth-Trunk 1
[CORE-GigabitEthernet0/0/1]
quit
[CORE]
interface GigabitEthernet 0/0/2
[CORE-GigabitEthernet0/0/2]
Eth-Trunk 1
[CORE-GigabitEthernet0/0/2]
quit
[CORE]
interface Vlanif 10
//Configure a VLANIF interface to
allow department A to communicate with department B through Layer 3.
[CORE-Vlanif10]
ip address 10.10.10.1 24
[CORE-Vlanif10]
quit
[CORE]
interface Vlanif 20
//Configure a VLANIF interface to
allow department B to communicate with department A through Layer 3.
[CORE-Vlanif20]
ip address 10.10.20.1 24
[CORE-Vlanif20]
quit
Configure upstream interfaces and VLANIF interfaces to allow the campus network to
communicate with the Internet.
3
[CORE]
interface GigabitEthernet 0/0/20
[CORE-GigabitEthernet0/0/20]
port link-type access
//Set the access mode.
[CORE-GigabitEthernet0/0/20]
port default vlan 100
[CORE-GigabitEthernet0/0/20]
quit
[CORE]
interface Vlanif 100
//Configure a VLANIF interface to
allow CORE to communicate with the router at Layer 3.
[CORE-Vlanif100]
ip address 10.10.100.1 24
[CORE-Vlanif100]
quit
11