VLAN
vlan
Command Objective: This command creates a VLAN ID and enters into the config- VLAN mode in which VLAN specific configurations are done. This command directly enters into the config-VLAN mode for the specified VLAN ID, if the VLAN is already created.
Syntax:
vlan <vlan-id>
no vlan <vlan-id>
Parameter Description
- <vlan-id>: This is a unique value that represents the specific VLAN. This value ranges between 1 and 4094.
Mode: Global Configuration Mode/ Switch Configuration Mode.
ports
Command Objective: This command statically configures a VLAN entry with the required member ports, untagged ports and/or forbidden ports, and activates the VLAN. The VLAN can also be activated using the vlan active command.
Syntax:
ports [add] <interface-type> <0/a-b,0/c,...> [<interface-type> <0/ a-b,0/c,...>] [untagged ([<interface-type> <0/a-b,0/c,...>] [<interface-type> <0/a-b,0/c,...>][all])][forbidden ([<interface-type> <0/a-b,0/c,...>] [<interface-type> <0/a- b,0/c,...>])]
ports [add] forbidden ([<interface-type> <0/a-b,0/c,...>] [<interface-type> <0/a-b,0/c,...>])
no ports [<interface-type> <0/a-b,0/c,...>] [<interface-type> <0/a- b,0/c,...>] [all] [untagged ([<interface-type> <0/a-b,0/c,...>] [<interface-type> <0/a-b,0/c,...>] [all])] [forbidden ([<interface-type> <0/a-b,0/c,...>] [<interface-type> <0/a-b,0/c,...>] [all])]
Parameter Description:
- add: Appends the new configured ports to the existing member port list of the vlan.
- <interface-type> \<0/a-b,0/c,...>: Configures the ports that should be set as a member of the VLAN.
- port-channel<a,b,c-d>: Sets the list of port channel in a separator without space while configuring list of interfaces. Example: 1,3.
- all: Deletes all configured member ports for the VLAN and sets the member ports as none. This option is available only in the no form of the command.
- untagged<interface-type> <0/a-b,0/c,...>: Configures the ports that should be used for the VLAN to transmit egress packets as untagged packets.
- forbidden<interface-type> <0/a-b,0/c,...>: Configures the ports that should never receive packets from the VLAN.
- name<vlan-name>: Configures the unique name of the VLAN. This name is used to identify the VLAN and is an administratively assigned string with the maximum size as 32.
Mode: Config-VLAN Mode.
ports name
Command Objective: This command configures Vlan name.
Syntax: ports name [<vlan-name>]
Mode: Config-VLAN Mode.
gvrp advertisment
Command Objective: This command sets Enables or Disables gvrp advertisement on this vlan.
Syntax: gvrp advertisment {enable | disable}
Mode: Config-VLAN Mode.
switchport pvid
Command Objective: This command configures the PVID on the specified port.The PVID represents the VLAN ID that is to be assigned to untagged frames or priority-tagged or C-VLAN frames received on the port.
The PVID is used for port based VLAN type membership classification. This value ranges between 1 and 65535.
Syntax:
switchport pvid <vlan-id/vfi_id>
no switchport pvid
Parameter Description:
- pvid<vlan-id(1-4094)>: Configures the PVID for the provider edge port for the specified VLAN ID. This is a unique value that represents the specific VLAN. This value ranges between 1 and 4094.
Mode: Interface Configuration mode (Physical / Port channel).
switchport acceptable-frame-type
Command Objective: This command configures the type of VLAN dependant BPDU frames such as GMRP BPDU, that the port should accept during the VLAN membership configuration.
The no form of the command resets the acceptable frame type for the port to its default value.
This configuration does not affect VLAN independent BPDU frames such as GVRP BPDU and STP BPDU. It affects only the VLAN dependent BPDU frames.
Syntax: switchport acceptable-frame-type {all | tagged | untaggedAndPrioritytagged}
Parameter Description:
- all: Configures the acceptable frame type as all. All tagged, untagged and priority tagged frames received on the port are accepted and subjected to ingress filtering.
- tagged: Configures the acceptable frame type as tagged.
- untaggedAndPrioritytagged: Configures the acceptable frame type as untagged and priority tagged. Only the untagged or priority tagged frames received on the port are accepted and subjected to ingress filtering. The tagged frames received on the port are rejected.
Mode: Interface Configuration mode (Physical / Port channel).
switchport ingress-filter
Command Objective: This command enables ingress filtering feature on the port.
The ingress filtering is applied for the incoming frames received on the port. Only the incoming frames of the VLANs that have this port in its member list are accepted. This configuration does not affect VLAN independent BPDU frames such as GVRP BPDU and STP BPDU. It affects only the VLAN dependent BPDU frames GMRP BPDU.
The no form of the command disables ingress filtering feature on the port. All incoming frames received on the port are accepted.
Syntax:
switchport ingress-filter
no switchport ingress-filter
Mode: Interface Configuration mode (Physical / Port channel).
show forward-all
Command Objective: This command displays all entries in the VLAN forward all table.
These entries contain forward all details of all active VLANs in the switch. The details have VLAN ID and information regarding forward all ports, forward all static ports and forward all forbidden ports assigned to the VLAN.
Syntax: show forward-all [switch <context_name>]
Mode: Privileged EXEC Mode.
show vlan
Command Objective: This command displays VLAN entry related information of all active VLANs and VLANs (that are not active) for which the port details are configured.
The information contain the member ports, untagged ports, forbidden ports, VLAN name and the status of that VLAN entry.
Syntax: show vlan [brief | id <vlan-range> | summary] [switch <context_name>]
Parameter Description:
- brief: Displays the VLAN entry related information of all active VLANs and VLANs (that are not active) for which the port details are configured.
- id <vlan-range>: Displays the VLAN entry related information for specified VLANs alone. This value denotes the VLAN ID range for which the information needs to be displayed. This value is a string whose maximum size is 9. For example, the value is provided as 4000-4010 to display the information for VLANs IDs from 4000 to 4010. The information is displayed only for the active VLANs and VLANs (that are not active) for which the port details are configured.
- summary: Displays only the total number of VLANs existing in the switch. This includes only the active VLANs and VLANs (that are not active) for which the port details are configured. The VLAN entry related information is not displayed.
- switch <context_name>: Displays the VLAN entry related information or total number of existing VLANs, for the specified context. This value represents unique name of the switch context. This value is a string whose maximum size is 32. This parameter is specific to multiple instance feature.
Mode: Privileged EXEC Mode.
show vlan device info
Command Objective: This command displays the VLAN global information that is applicable to all VLANs created in the switch / all contexts.
The information contains VLAN status, VLAN oper status, GVRP status, GMRP status, GVRP oper status, GMRP oper status, MAC-VLAN status, subnet-VLAN status, protocol-VLAN status, bridge mode of the switch, VLAN base bridge mode, VLAN traffic class status, VLAN learning mode, VLAN version number, maximum VLAN ID supported, maximum number of VLANs supported and VLAN unicast MAC learning limit.
Syntax: show vlan device info
Mode: Privileged EXEC Mode.
show vlan static
Command Objective: This command displays static VLAN global status for the specified VLAN range.
Syntax: show vlan static [id <vlan-range>]
Parameter Description:
- vlan <vlan-range>: Displays the unicast / broadcast statistics details for specified VLANs alone. This value denotes the VLAN ID range for which the details need to be displayed. This value is a string whose maximum size is 9. For example, the value is provided as 4000-4010 to display the details for VLAN IDs from 4000 to 4010. The details are displayed only for the VLANs that are activated and VLANs (that are not active) for which the port details are configured.
Mode: Privileged EXEC Mode.
show vlan device capabilities
Command Objective: This command displays only the list of VLAN features such as traffic class feature, supported in the switch / all contexts.
Syntax: show vlan device capabilities
Mode: Privileged EXEC Mode.
show vlan port config
Command Objective: This command displays the VLAN related port specific information for all interfaces available in the switch / all contexts. The information contains PVID, acceptable frame type, port mode, filtering utility criteria, default priority value and status of ingress filtering feature, GVRP module, GMRP module, restricted VLAN registration feature, restricted group registration feature, MAC-based VLAN membership, subnet based VLAN membership, protocol-VLAN based membership and port protected feature.
Syntax: show vlan port config [{port <interface-type> <ifnum> | switch <string(32)>}]
Parameter Description:
-
<interface-type>: Displays the VLAN related port specific information for the specified interface.
- gigabitethernet: A version of LAN standard architecture that supports data transfer up to 1 Gigabit per second.
-
switch <context_name>: Displays the VLAN global information that is applicable to all VLANs, for the specified context. This value represents unique name of the switch context. This value is a string whose maximum size is 32. This parameter is specific to multiple instance feature.
Mode: Privileged EXEC Mode.
show vlan statistics
Command Objective: This command displays the unicast / broadcast statistics details of all active VLANs and VLANs (that are not active) for which the port details are configured.
The statistics details include VLAN ID, number of unicast packets received in the VLAN, number of multicast / broadcast packets received in the VLAN, number of unknown unicast packets flooded in the VLAN, number of known unicast packets forwarded in the VLAN, and number of known broadcast packets forwarded in the VLAN.
Syntax: show vlan statistics [vlan <vlan-range>] [switch <string(32)>]
Parameter Description:
- vlan <vlan-range>: Displays the unicast / broadcast statistics details for specified VLANs alone. This value denotes the VLAN ID range for which the details need to be displayed. This value is a string whose maximum size is 9. For example, the value is provided as 4000-4010 to display the details for VLAN IDs from 4000 to 4010. The details are displayed only for the VLANs that are activated and VLANs (that are not active) for which the port details are configured.
- switch <context_name>: Displays the VLAN global information that is applicable to all VLANs, for the specified context. This value represents unique name of the switch context. This value is a string whose maximum size is 32. This parameter is specific to multiple instance feature.
Mode: Privileged EXEC Mode.