Verifying the configuration – H3C Technologies H3C S5560 Series Switches User Manual

Page 197

Advertising
background image

163

[DeviceB-vlan21] quit

# Configure GigabitEthernet 1/0/2 as a hybrid port, and assign it to VLANs 11 and 21 as a

tagged VLAN member.

[DeviceB] interface gigabitethernet 1/0/2

[DeviceB-GigabitEthernet1/0/2] port link-type hybrid

[DeviceB-GigabitEthernet1/0/2] port hybrid vlan 11 21 tagged

[DeviceB-GigabitEthernet1/0/2] quit

# Assign the port GigabitEthernet 1/0/4 to VLAN 11.

[DeviceB] interface gigabitethernet 1/0/4

[DeviceB-GigabitEthernet1/0/4] port access vlan 11

[DeviceB-GigabitEthernet1/0/4] quit

# Assign the port GigabitEthernet 1/0/3 to VLAN 21.

[DeviceB] interface gigabitethernet 1/0/3

[DeviceB-GigabitEthernet1/0/3] port access vlan 21

[DeviceB-GigabitEthernet1/0/3] quit

3.

Configure Device C:
# Create VLANs 10 and 20.

<DeviceC> system-view

[DeviceC] vlan 10

[DeviceC-vlan10] quit

[DeviceC] vlan 20

[DeviceC-vlan20] quit

# Configure GigabitEthernet1/0/5 as a hybrid port, and assign it to VLANs 10 and 20 as a
tagged VLAN member.

[DeviceC] interface gigabitethernet 1/0/5

[DeviceC-GigabitEthernet1/0/5] port link-type hybrid

[DeviceC-GigabitEthernet1/0/5] port hybrid vlan 10 20 tagged

[DeviceC-GigabitEthernet1/0/5] quit

Verifying the configuration

# Display the configuration of primary VLAN 10 on Device A.

[DeviceA] display private-vlan 10

Primary VLAN ID: 10

Secondary VLAN ID: 11-12

VLAN ID: 10

VLAN type: Static

Private-vlan type: Primary

Route interface: Not configured

Description: VLAN 0010

Name: VLAN 0010

Tagged ports:

GigabitEthernet1/0/2 GigabitEthernet1/0/5

Untagged ports:

GigabitEthernet1/0/3

VLAN ID: 11

Advertising