VLAN Configuration Examples 495VLAN ConfigurationExamplesNetwork requirements■ Device A connects to Device B through the Trunk port Ethernet 1/0;■ The default VLAN ID of the port is 100;■ This port allows packets from VLAN 2, VLAN 6 to VLAN 50, and VLAN 100 topass through.Network diagramFigure 140 Network diagram for port-based VLAN configurationConfiguration procedure1 Configure Device A# Create VLAN 2, VLAN 6 through VLAN 50, and VLAN 100. system-view[DeviceA] vlan 2[DeviceA-vlan2] quit[DeviceA] vlan 100[DeviceA-vlan100] vlan 6 to 50Please wait... Done.# Enter the Ethernet 1/0 interface view.[DeviceA] interface Ethernet 1/0# Configure Ethernet 1/0 as a Trunk port and configure its default VLAN ID as 100.[DeviceA-Ethernet1/0] port link-type trunk[DeviceA-Ethernet1/0] port trunk pvid vlan 100# Configure Ethernet 1/0 to deny packets of VLAN 1 to pass. (All ports allowpackets of VLAN 1 to pass by default.)[DeviceA-Ethernet1/0] undo port trunk permit vlan 1# Configure Ethernet 1/0 to permit packets of VLAN 2, VLAN 6 through VLAN 50,and VLAN 100.[DeviceA-Ethernet1/0] port trunk permit vlan 2 6 to 50 100Please wait... Done.2 Configure Device B following similar steps as that of Device A.VerificationVerifying the configuration of Device A is similar to that of Device B. so only DeviceA is taken for example here.# Display the information about Ethernet 1/0 of Device A to verify the aboveconfigurations.Eth1/0Eth1/0Device A Device B