Laptop 1 and Laptop 2 are owned by different departments. The two departments use VLAN 100
•
and VLAN 200, respectively. Each laptop can access only its own department server no matter
which meeting room it is used in.
The MAC address of Laptop 1 is 000d-88f8-4e71, and that of Laptop 2 is 0014-222c-aa69.
•
Figure 39 Network diagram for MAC-based VLAN configuration
Configuration consideration
Create VLANs 100 and 200.
•
Configure the uplink ports of Device A and Device C as trunk ports, and assign them to VLANs 100
•
and 200.
Configure the downlink ports of Device B as trunk ports, and assign them to VLANs 100 and 200.
•
Configure the uplink ports of Device B as access ports connecting to the servers, respectively, and
assign them to VLANs 100 and 200, respectively.
Associate the MAC address of Laptop 1 with VLAN 100, and the MAC address of Laptop 2 with
•
VLAN 200.
Configuration procedure
Configuration on Device A
1.
# Create VLANs 100 and 200.
<DeviceA> system-view
[DeviceA] vlan 100
[DeviceA-vlan100] quit
[DeviceA] vlan 200
[DeviceA-vlan200] quit
# Associate the MAC address of Laptop 1 with VLAN 100, and the MAC address of Laptop 2 with VLAN
200.
[DeviceA] mac-vlan mac-address 000d-88f8-4e71 vlan 100
[DeviceA] mac-vlan mac-address 0014-222c-aa69 vlan 200
118