Syntax |
switchport hybrid allowed vlan add {VLAN-LIST} switchport hybrid allowed vlan remove { VLAN-LIST} [(tagged|untagged)] |
Parameter |
VLAN-LIST Specifies the VLAN list to be added or remove. ( tagged | untagged ) Specifies the member type is tagged or untagged. |
Default |
Only vlan 1 is untagged member by default. Default is tagged member when added. |
Mode |
Port Configuration |
Example |
This example sets port GigabitEthernet 2 VLAN to join the VLAN 100 as tagged member. Switch#configure terminal Switch(config)# interface GigabitEthernet 2 Switch(config-if)# switchport hybrid allowed vlan add 100-105 Switch(config-if)# switchport hybrid allowed vlan remove 105 Switch# show interfaces switchport GigabitEthernet 2 |
35.8 SWITCHPORT ACCESS VLAN
Use the switchport access vlan port configuration command to set native vlan on interface. The vlan will be pvid on interface as well. Use the “no” form of this command to restore to default vlan. You can verify your setting by entering the show interfaces switchport Privileged EXEC command.
Switch#configure terminal
Switch (config)#interface {Interface-ID}
Switch(config-if)# switchport access vlan <1-4094>
Switch(config-if)# no switchport access vlan
Syntax |
switchport access vlan <1-4094> no switchport access vlan |
Parameter |
<1-4094>Specifies the access VLAN ID. |
Default |
Default is vlan 1 |
Mode |
Port Configuration |
Example |
This example sets Access port gi10 native VLAN ID to 100. Switch#configure terminal Switch(config)# interface gi2 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 4 Switch# show interfaces switchport GigabitEthernet 2 |
35.9 SWITCHPORT TUNNEL VLAN
Use the switchport tunnel vlan port configuration command to set dot1q tunnel vlan on interface. The vlan will be pvid on interface as well. Use the “no” form of this command to remove vlan on interface. The tunnel vlan id will set to reserve vlan 4095. You can verify your setting by entering the show interfaces switchport Privileged EXEC command.
Switch#configure terminal
Switch (config)#interface {Interface-ID}
Switch(config-if)# switchport tunnel vlan <1-4094>
Switch(config-if)# no switchport tunnel vlan
Syntax |
switchport tunnel vlan <1-4094> no switchport tunnel vlan |
Parameter |
<1-4094>Specifies the tunnel VLAN ID. |
Default |
Default is vlan 1 |
Mode |
Port Configuration |
Example |
This example sets Tunnel port GigabitEthernet 2 native VLAN to 4. Switch#configure terminal Switch(config)# interface GigabitEthernet 2 Switch(config-if)# switchport mode tunnel Switch(config-if)# switchport tunnel vlan 4 Switch# show interfaces switchport GigabitEthernet 2 |
35.10 SWITCHPORT TRUNK NATIVE VLAN
Use the switchport trunk native vlan port configuration command to set native vlan on interface. Use the “no” form of this command to restore to default vlan. You can verify your setting by entering the show interfaces switchport Privileged EXEC command.
Switch#configure terminal
Switch (config)#interface {Interface-ID}
Switch(config-if)# switchport trunk native vlan <1-4094>
Switch(config-if)# no switchport trunk native vlan
Syntax |
switchport trunk native vlan <1-4094> no switchport trunk native vlan |
Parameter |
<1-4094>Specifies the native VLAN ID. |
Default |
Default is vlan 1 |
Mode |
Default is vlan 1 |
Example |
This example sets Trunk port GigabitEthernet 2 native VLAN to 4. Switch#configure terminal Switch(config)# interface GigabitEthernet 2 Switch(config-if)# switchport mode trunk Switch(config-if)# switchport trunk native vlan 4 Switch# show interfaces switchport GigabitEthernet 2 |
35.11 SWITCHPORT TRUNK ALLOWED VLAN
Use the switchport trunk allow vlan add port configuration command to allow vlan on interface. Use the switchport trunk allows vlan remove port configuration command to remove vlan on interface. You can verify your setting by entering the show interfaces switchport Privileged EXEC command.
Switch#configure terminal
Switch (config)#interface {Interface-ID}
Switch(config-if)# switchport trunk allowed vlan ( add | remove ) ( VLAN-LIST | all )
Syntax |
switchport trunk allowed vlan ( add | remove ) ( VLAN-LIST | all ) |
Parameter |
( add | remove ) Specify the action to add or remove the allowed VLAN list. ( VLAN-LIST | all ) Specify the VLAN list or all VLANs to be added or removed. |
Mode |
Port Configuration |
Example |
This example sets Trunk port GigabitEthernet 2 to add the allowed VLAN 4. Switch# configure Switch(config)# interface GigabitEthernet 2 Switch(config-if)# switchport trunk allowed vlan add 4 Switch# show interfaces switchport GigabitEthernet 2 |
35.12 SWITCHPORT DEFAULT-VLAN TAGGED
Use the switchport default vlan tagged port configuration command to become default vlan tagged member. Use the “no” switchport default vlan tagged port configuration command to restore to default. You can verify your setting by entering the show interfaces switchport Privileged EXEC command.
Switch#configure terminal
Switch (config)#interface {Interface-ID}
Switch(config-if)# switchport default-vlan tagged
Switch(config-if)# no switchport default-vlan tagged
Syntax |
switchport default-vlan tagged no switchport default-vlan tagged |
Default |
Default is untagged |
Mode |
Port Configuration |
Example |
This example sets Trunk port GigabitEthernet 2 membership with the default VLAN to tag. Switch#configure terminal Switch(config)# interface GigabitEthernet 2 Switch(config-if)# switchport default-vlan tagged Switch# show interfaces switchport GigabitEthernet 2 |
35.13 SWITCHPORT FORBIDDEN DEFAULT-VLAN
Use the switchport forbidden default-vlan port configuration command to forbid default-vlan on interface. Use the “no” switchport forbidden default-vlan port configuration command to restore to default. You can verify your setting by entering the show interfaces switchport Privileged EXEC command.
Switch#configure terminal
Switch (config)#interface {Interface-ID}
Switch(config-if)# switchport forbidden default-vlan
Switch(config-if)# no switchport forbidden default-vlan
Syntax |
switchport forbidden default-vlan no switchport forbidden default-vlan |
Default |
Default is allowed |
Mode |
Port Configuration |
Example |
This example sets the membership of the default VLAN with port GigabitEthernet 2 to Forbidden. Switch#configure terminal Switch(config)# interface GigabitEthernet 2 Switch(config-if)# switchport forbidden default-vlan Switch# show interfaces switchport GigabitEthernet 2 |
35.14 SWITCHPORT FORBIDDEN VLAN
Uses the switchport forbidden vlan add port configuration command to forbid vlan on interface. Use the switchport forbidden vlan remove port configuration command to accept vlan on interface. You can verify your setting by entering the show interfaces switchport Privileged EXEC command.
Switch#configure terminal
Switch (config)#interface {Interface-ID}
Switch(config-if)# switchport forbidden vlan ( add | remove ) VLAN-LIST
Syntax |
switchport forbidden vlan ( add | remove ) VLAN-LIST |
Parameter |
(add | remove) Add or remove forbidden membership. VLAN-LIST Specify the VLAN list. |
Mode |
Port Configuration |
Example |
This example sets the membership of the VLAN 4 with port GigabitEthernet 2 to Forbidden. Switch#configure terminal Switch(config)# interface GigabitEthernet 2 Switch(config-if)# switchport forbidden vlan add 4 Switch# show interfaces switchport GigabitEthernet 2 |
35.15 SWITCHPORT VLAN TPID
Use the switchport vlan tpid port configuration command to set TPID on interface. You can verify your setting by entering the show running-config Privileged EXEC command.
Switch#configure terminal
Switch (config)#interface {Interface-ID}
Switch(config-if)# switchport vlan tpid (0x8100|0x88a8|0x9100|0x9200)
Syntax |
switchport vlan tpid (0x8100|0x88a8|0x9100|0x9200) |
Parameter |
(0x8100|0x88a8|0x9100|0x9200) Select TPID to set. |
Default |
Default TPID is 0x8100 |
Mode |
Port Configuration |
Example |
This example sets the TPID to 0x9100 on interface GigabitEthernet 2. Switch#configure terminal Switch(config)# interface GigabitEthernet 2 Switch(config-if)# switchport vlan tpid 0x9100 |
35.16 MANAGEMENT-VLAN
Use the management vlan Global Configuration mode command to set management vlan id. Vlan id must be created first. Use the “no” form of this command to restore to default setting. You can verify your setting by entering the show management-vlan Privileged EXEC command.
Switch#configure terminal
Switch(config)# management-vlan vlan <1-4094>
Switch(config)# no management-vlan
Syntax |
management-vlan vlan <1-4094> no management-vlan |
Parameter |
<1-4094> Specify the VLAN ID of management-vlan. |
Default |
Default management vlan is 1. |
Mode |
Global Configuration |
Example |
The following example specifies that management vlan 2 is created Switch#configure terminal Switch(config)# vlan 2 Switch(config)# management-vlan vlan 2 The following example specifies that management-vlan is restored to be default VLAN. Switch(config)# no management-vlan |
35.17 SHOW VLAN
Display information about vlan entry.
Switch# show vlan [(VLAN-LIST|dynamic|static)]
Syntax |
show vlan [(VLAN-LIST|dynamic|static)] |
Parameter |
(VLANLIST|dynamic|static)Specify vlan id to show information or show all static or dynamic vlan entries. |
Mode |
Privileged EXEC |
Example |
The following example specifies that show vlan Switch# show vlan |
35.18 SHOW VLAN INTERFACE MEMBERSHIP
Display information about vlan membership on interfaces.
Switch# show vlan VLAN-LIST interfaces {IF_PORTS} membership
Syntax |
show vlan VLAN-LIST interfaces {IF_PORTS} membership |
Parameter |
Specify vlan to show IF_PORTS Specify interface is to show |
Mode |
Privileged EXEC |
Example |
The following example specifies that show vlan interface membership Switch# show vlan 2 interfaces GigabitEthernet 2 membership |
35.19 SHOW INTERFACE SWITCHPORT
Display information about default vlan.
Switch# show interface switchport interfaces {IF_PORTS}
Syntax |
show interface switchport interfaces {IF_PORTS} |
Default |
IF_PORTS Specify interfaces protocol vlan to display |
Mode |
Privileged EXEC |
Example |
The following example specifies that show interfacce switchport. Switch#configure terminal Switch(config)# interface GigabitEthernet 2 Switch(config-if)# switchport trunk allowed vlan add 2 Switch# show interfaces switchport GigabitEthernet 2 |
35.20 SHOW MANAGEMENT-VLAN
Display information about management vlan.
Switch# show management-vlan
Syntax |
show management-vlan |
Mode |
Privileged EXEC |
Example |
The following example specifies that show management vlan Switch# show management-vlan |