The show vlans command lists the VLANs currently running in the switch, with VID, VLAN name and VLAN status. Dynamic VLANs appear only if the switch is running with GVRP enabled and one or more ports has dynamically joined an advertised VLAN. In the default configuration, GVRP is disabled. Show
Syntax:
Displaying VLAN listing with GVRP enabled This example shows the listing from the show vlans command. When GVRP is disabled (the default), Dynamic VLANs do not exist on the switch and do not appear in this listing. For more information, see GVRP. HP Switch#: show vlans Status and Counters - VLAN Information Maximum VLANs to support : 256 Primary VLAN : DEFAULT_VLAN Management VLAN : VLAN ID Name | Status Voice Jumbo ------- -------------------- + ---------- ----- ----- 1 DEFAULT_VLAN | Port-based No No 10 VLAN_10 | Port-based Yes Yes 15 VLAN_15 | Port-based No No 20 VLAN_20 | Protocol No No 33 VLAN_33 | Dynamic No NoViewing the VLAN membership of one or more ports (CLI)Syntax:
Displaying VLAN ports (cumulative listing) HP Switch(config)#:show vlan ports a1-a24 Status and Counters - VLAN Information - for ports A1-A24 VLAN ID Name | Status Voice Jumbo ------- -------------------- + ---------- ----- ----- 1 DEFAULT_VLAN | Port-based No No 10 VLAN_10 | Port-based Yes No 15 VLAN_15 | Protocol No NoDisplaying VLAN ports (detailed listing) HP Switch(config)#:show vlan ports a1-a3 detail Status and Counters - VLAN Information - for ports A1 VLAN ID Name | Status Voice Jumbo Mode ------- -------------------- + ---------- ----- ----- -------- 1 DEFAULT_VLAN | Port-based No No Untagged 10 VLAN_10 | Port-based Yes No Tagged Status and Counters - VLAN Information - for ports A2 VLAN ID Name | Status Voice Jumbo Mode ------- -------------------- + ---------- ----- ----- -------- 1 DEFAULT_VLAN | Port-based No No Untagged 20 VLAN_20 | Protocol No No Untagged Status and Counters - VLAN Information - for ports A3 VLAN ID Name | Status Voice Jumbo Mode ------- -------------------- + ---------- ----- ----- -------- 1 DEFAULT_VLAN | Port-based No No Untagged 33 VLAN_33 | Port-based No No TaggedViewing the configuration for a particular VLAN (CLI)Syntax:
Displaying information for a specific static VLAN HP Switch(config)#:show vlans 22 Status and Counters - VLAN Information - VLAN 22 VLAN ID : 22 Name : VLAN22 Status : Port-based Voice : Yes Jumbo : No Port Information Mode Unknown VLAN Status ---------------- -------- ------------ ---------- 12 Untagged Learn Up 13 Untagged Learn Up 14 Untagged Learn Up 15 Untagged Learn Down 16 Untagged Learn Up 17 Untagged Learn Up 18 Untagged Learn UpDisplaying information for a specific dynamic VLAN The following example shows the information displayed for a specific dynamic VLAN. The show vlans command lists this data when GVRP is enabled and at least one port on the switch has dynamically joined the designated VLAN. HP Switch(config)#: show vlans 22 Status and Counters - VLAN Information - VLAN 22 VLAN ID : 33 Name : GVRP_33 Status : Dynamic Voice : No Jumbo : No Port Information Mode Unknown VLAN Status ---------------- -------- ------------ ---------- 6 Auto Learn UpCustomizing the show VLANs output (CLI)Syntax
Fields that can be included in the customized display:
Customizing the VLAN display The following example displays id at its default width and name:20 allows up to 20 characters of the VLAN name to be displayed. The columns selected for display are separated by spaces. If the width of the column requested is smaller than the header name of the column, the display of the header name is truncated. HP Switch(config)#: show vlan custom A1-A3 id name:20 ipaddr state Status and Counters - VLAN Information - Custom view VLANID VLAN name IP Addr State ------ -------------------- --------------------------------- ----- 1 DEFAULT_VLAN 15.255.134.74 Up 33 Vlan33 10.10.10.01 Up 44 Vlan44 15.255.164.13 Up 55 Vlan55 15.255.178.2 Down 15.255.178.3 15.255.178.4 60 Vlan60 fe80::212:79ff:fe8d:8000%vlan60 UpWrapping column headers The total output wraps if it is longer than the terminal width; it is not truncated. HP Switch(config)#: show vlan custom id Status and Counters - VLAN Information - Custom view VLANID ------ 1 33 44 HP Switch(config)#: show vlan custom id:2 Status and Counters - VLAN Information - Custom view VL -- 1 33 44Using pattern matching with the show VLANs custom commandIf a pattern matching command is in a search for a field in the output of the show vlan custom command and it produces an error, the error message may not be visible. For example, if you enter a command with the pattern matching include option that contains an error (such as 'vlan' is misspelled) as in the following example, the output may be empty: HP Switch(config)#: show vlans custom 1-3 name vlun include vlan1HP recommends that you try the show vlans custom command first to ensure there is output and then enter the command again with the pattern matching option. Creating an alias for show VLAN commands (CLI)Create an alias for a frequently used show vlans custom command to avoid entering the selected columns each time you use the command. Using a VLAN alias HP Switch(config)#: alias showvlanstatus = “show vlan custom A1-A3 id name:20 status” HP Switch(config)#: show vlan status Status and Counters - VLAN Information - Custom view VLANID VLAN name Status ------ -------------------- ---------- 1 DEFAULT_VLAN Port-based 33 Vlan33 Port-basedWhen configuring VLANs on a switch what is used to identify VLAN membership of a device?A VLAN represents a broadcast domain. VLANs are identified by a VLAN ID (a number between 0 – 4095), with the default VLAN on any network being VLAN 1. Each port on a switch or router can be assigned to be a member of a VLAN (i.e., to allow receiving and sending traffic on that VLAN).
What is used to identify which VLAN a device belongs to?To identify which VLAN the traffic belongs to, all frames on an Ethernet VLAN are identified by a tag, as defined in the IEEE 802.1Q standard. These frames are tagged and are encapsulated with 802.1Q tags.
What is used to configure VLAN?A VLAN interface, or switched virtual interface (SVI), is a Layer 3 interface that is created to provide communication between VLANs. In order to route traffic between VLANs, you must create and configure a VLAN interface for each VLAN. Each VLAN requires only one VLAN interface.
When configuring VLANs on a switch which type of switch ports are members of all the VLANs defined on the switch?When configuring VLANs on a switch, what type of switch ports are members of all VLANs defined on the switch? In the lobby of your building are three RJ-45 ports connected to the switch. You want to make sure that visitors cannot plug in their computer to the free network jacks and connect to the network.
|