18 switchport mode, 19 switchport trunk allowed vlan – PLANET WGSW-50040 User Manual

Page 131

Advertising
background image

Switch(Config-Vlan100)#switchport interface ethernet 1/1;3;4-7;8

7.1.18 switchport mode

Command:

switchport mode {trunk | access}

Function:

Set the port in access mode, trunk mode or hybrid mode.

Parameter:

trunk means the port allows traffic of multiple VLAN;

access indicates the port belongs to one VLAN only; hybrid means the port allows the traffic of

multi-VLANs to pass with tag or untag mode.

Command mode:

Port Mode.

Default:

The port is in Access mode by default.

Usage Guide:

Ports in trunk mode is called Trunk ports. Trunk ports can allow traffic of multiple VLANs to pass

through. VLAN in different switches can be interconnected with the Trunk ports. Ports under access

mode are called Access ports. An access port can be assigned to one and only one VLAN at a time.

Example:

Set port 5 to trunk mode and port 8 to access mode.

Switch(config)#interface ethernet 1/5

Switch(Config-If-Ethernet1/5)#switchport mode trunk

Switch(Config-If-Ethernet1/5)#exit

Switch(config)#interface ethernet 1/8

Switch(Config-If-Ethernet1/8)#switchport mode access

Switch(Config-If-Ethernet1/8)#exit

7.1.19 switchport trunk allowed vlan

Command:

switchport trunk allowed vlan {WORD | all | add WORD | except WORD | remove WORD}

no switchport trunk allowed vlan

Function:

Set trunk port to allow VLAN traffic; the “no switchport trunk allowed vlan” command restores the

Advertising