7-6
n
z
Configure VLAN interfaces for the two VLANs on Switch A for forwarding data from PC 1 to Server
2 at Layer 3.
Network diagram
Figure 7-1
Network diagram for VLAN configuratio
Configuration procedure
z
Configure Switch A.
# Create VLAN 100, specify its descriptive string as
Dept1
, and add Ethernet 1/0/1 to VLAN 100.
<SwitchA> system-view
[SwitchA] vlan 100
[SwitchA-vlan100] description Dept1
[SwitchA-vlan100] port Ethernet 1/0/1
[SwitchA-vlan100] quit
# Create VLAN 200, and specify its descriptive string as
Dept2
.
[SwitchA] vlan 200
[SwitchA-vlan200] description Dept2
[SwitchA-vlan200] quit
# Create VLAN-interface 100 and VLAN-interface 200, and assign IP addresses 192.168.1.1 and
192.168.2.1 to them respectively. The two VLAN-interfaces are used for forwarding packets from Host 1
to Server 2 at Layer 3.
[SwitchA] interface Vlan-interface 100
[SwitchA-Vlan-interface100] ip address 192.168.1.1 24
[SwitchA-Vlan-interface100] quit
[SwitchA] interface Vlan-interface 200
[SwitchA-Vlan-interface200] ip address 192.168.2.1 24
z
Configure Switch B.
# Create VLAN 100, specify its descriptive string as
Dept1
, and add Ethernet 1/0/13 to VLAN 100.
<SwitchB> system-view
[SwitchB] vlan 100
[SwitchB-vlan100] description Dept1
[SwitchB-vlan100] port Ethernet 1/0/13
[SwitchB-vlan103] quit