[DeviceA-GigabitEthernet1/0/3] display vlan 200
VLAN ID: 200
VLAN type: Static
Route interface: Not configured
Description: VLAN 0200
Name: VLAN 0200
Tagged ports:
GigabitEthernet1/0/3
Untagged ports:
GigabitEthernet1/0/2
MAC-based VLAN configuration example
Network requirements
As shown in
•
GigabitEthernet 1/0/1 of Device A and Device C are each connected to a meeting room. Laptop
1 and Laptop 2 are used for meetings and might be used in either of the two meeting rooms.
•
One department uses VLAN 100 and owns Laptop 1. The other department uses VLAN 200
and owns Laptop 2.
Configure MAC-based VLANs, so that Laptop 1 and Laptop 2 can access Server 1 and Server 2,
respectively, no matter which meeting room they are used in.
Figure 40 Network diagram
VLAN 100
IP: 1.1.1.1/24
GE1/0/2
Device A
GE1/0/1
VLAN 100
Laptop1
IP: 1.1.1.2/24
MAC: 000d-88f8-4e71
Configuration procedure
Configure Device A:
1.
# Create VLANs 100 and 200.
<DeviceA> system-view
[DeviceA] vlan 100
[DeviceA-vlan100] quit
Figure
40:
Server1
Server2
IP: 1.1.2.1/24
GE1/0/14
GE1/0/13
GE1/0/4
GE1/0/3
Device B
Laptop2
IP: 1.1.2.2/24
MAC: 0014-222c-aa69
VLAN 200
GE1/0/2
Device C
GE1/0/1
VLAN 200
130