beautypg.com

Configuration procedure – H3C Technologies H3C S5560 Series Switches User Manual

Page 172

background image

138

Figure 42 Network diagram

Configuration procedure

1.

Configure Device A:
# Create VLANs 100 and 200.

system-view

[DeviceA] vlan 100

[DeviceA-vlan100] quit

[DeviceA] vlan 200

[DeviceA-vlan200] quit

# Associate the MAC addresses of Laptop 1 and Laptop 2 with VLANs 100 and 200, respectively.

[DeviceA] mac-vlan mac-address 000d-88f8-4e71 vlan 100

[DeviceA] mac-vlan mac-address 0014-222c-aa69 vlan 200

# Configure GigabitEthernet 1/0/1 as a hybrid port to forward packets from VLANs 100 and
200 without VLAN tags.

[DeviceA] interface gigabitethernet 1/0/1

[DeviceA-GigabitEthernet1/0/1] port link-type hybrid

[DeviceA-GigabitEthernet1/0/1] port hybrid vlan 100 200 untagged

# Enable the MAC-based VLAN feature on GigabitEthernet 1/0/1.

[DeviceA-GigabitEthernet1/0/1] mac-vlan enable

[DeviceA-GigabitEthernet1/0/1] quit

# Configure the uplink port GigabitEthernet 1/0/2 as a trunk port, and assign it to VLANs 100

and 200.

[DeviceA] interface gigabitethernet 1/0/2

[DeviceA-GigabitEthernet1/0/2] port link-type trunk

[DeviceA-GigabitEthernet1/0/2] port trunk permit vlan 100 200

[DeviceA-GigabitEthernet1/0/2] quit

2.

Configure Device B: