- Table of Contents
-
- H3C WX6103 Access Controller Switch Interface Board Command Reference-6W102
- 00-Preface
- 01-Login Commands
- 02-VLAN Commands
- 03-IP Addressing and IP Performance Commands
- 04-QinQ-BPDU Tunneling Commands
- 05-Port Correlation Commands
- 06-Link Aggregation Commands
- 07-MAC Address Table Management Commands
- 08-Port Security Commands
- 09-MSTP Commands
- 10-IP Routing-GR Overview Commands
- 11-IPv4 Routing Commands
- 12-IP Source Guard Commands
- 13-DLDP Commands
- 14-Multicast Commands
- 15-LLDP Commands
- 16-sFlow Commands
- 17-ARP Commands
- 18-DHCP Commands
- 19-ACL Commands
- 20-QoS Commands
- 21-Port Mirroring Commands
- 22-UDP Helper Commands
- 23-SNMP-RMON Commands
- 24-NTP Commands
- 25-DNS Commands
- 26-File System Management Commands
- 27-Information Center Commands
- 28-System Maintaining and Debugging Commands
- 29-NQA Commands
- 30-SSH Commands
- 31-SSL-HTTPS Commands
- 32-PKI Commands
- 33-Track Commands
- 34-Index
- Related Documents
-
Title | Size | Download |
---|---|---|
02-VLAN Commands | 141.37 KB |
Table of Contents
display interface Vlan-interface
Port-Based VLAN Configuration Commands
MAC Address-Based VLAN Configuration Commands
2 Voice VLAN Configuration Commands
Voice VLAN Configuration Commands
3 GARP/GVRP Configuration Commands
display gvrp local-vlan interface
display gvrp vlan-operation interface
The term switch in this document refers to a switch in a generic sense or an access controller configured with the switching function unless otherwise specified.
VLAN Configuration Commands
description
Syntax
description text
undo description
View
VLAN view, VLAN interface view
Parameters
text: String that describes the current VLAN or VLAN interface (Space can be included), case sensitive.
l For VLAN, this is a string of 1 to 32 characters.
l For VLAN interface, this is a string of 1 to 80 characters.
Description
Use the description command to configure the descriptive string of the current VLAN or VLAN interface.
Use the undo description command to restore the default.
By default, the descriptive string for a VLAN is the VLAN ID, for example, “VLAN 0001"; for a VLAN interface is name of the current VLAN interface, for example, “Vlan-interface 1 Interface”
Examples
# Assign a descriptive string RESEARCH for VLAN 1.
<Sysname> system-view
[Sysname] vlan 1
[Sysname-vlan1] description RESEARCH
# Assign a descriptive string VLAN-INTERFACE-2 for VLAN-interface 2
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] quit
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] description VLAN-INTERFACE-2
display interface Vlan-interface
Syntax
display interface vlan-interface [ vlan-interface-id ]
View
Any view
Parameters
vlan-interface-id: VLAN interface ID.
Description
Use the display interface Vlan-interface command to display the relevant information of a VLAN interface.
Execution of the command with vlan-interface-id specified will display the information of the specified VLAN interface; otherwise, information on all created VLAN interfaces will be displayed.
Related commands: interface Vlan-interface.
Examples
# Display the information of VLAN-interface 2.
<Sysname> display interface vlan-interface 2
Vlan-interface2 current state: DOWN
Line protocol current state: DOWN
Description: Vlan-interface2 Interface
The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 000f-e200-3904
IPv6 Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 000f-e200-3904
Table 1-1 Description on the fields of the display interface Vlan-interface command
Field |
Description |
Vlan-interface2 current state |
The physical state of a VLAN interface |
Line protocol current state |
The link layer protocol state of a VLAN interface |
Description |
The description string of a VLAN interface |
The Maximum Transmit Unit |
The MTU of a VLAN interface |
Internet protocol processing : |
IP packets processing ability |
IP Packet Frame Type |
IPv4 outgoing frame format |
Hardware address |
MAC address corresponding to a VLAN interface |
IPv6 Packet Frame Type |
IPv6 outgoing frame format |
display vlan
Syntax
display vlan [ vlan-id1 [ to vlan-id2 ] | all | dynamic | reserved | static ]
View
Any view
Parameters
vlan-id1: Displays the information of a VLAN specified by VLAN ID in the range of 1 to 4,094.
vlan-id1 to vlan-id2: Displays the information of a range of VLANs specified by a VLAN ID range.
all: Displays all current VLAN information except for the reserved VLANs.
dynamic: Displays the information of dynamic VLANs
reserved: Displays information of the reserved VLANs. Protocol modules determine reserved VLANs according to function implementation, and reserved VLANs serve protocol modules. You cannot do any operation on reserved VLANs.
static: Displays static VLAN information.
Description
Use the display vlan command to display VLAN information.
Related commands: vlan.
Examples
# Display VLAN 2 information.
<Sysname> display vlan 2
VLAN ID: 2
VLAN Type: static
Route interface: not configured
Description: VLAN 0002
Tagged Ports: none
Untagged Ports:
GigabitEthernet0/0/1 GigabitEthernet0/0/3 GigabitEthernet0/0/4
# Display VLAN 3 information.
<Sysname> display vlan 3
VLAN ID: 3
VLAN Type: static
Route Interface: configured
IP Address: 1.1.1.1
Subnet Mask: 255.255.255.0
Description: VLAN 0003
Tagged Ports: none
Untagged Ports: none
Table 1-2 Description on the fields of the display vlan command
Field |
Description |
VLAN ID |
VLAN ID |
VLAN Type |
VLAN type (static or dynamic) |
Route interface |
Whether the VLAN interface is configured for the VLAN: not configured or configured |
Description |
VLAN descriptive string |
IP Address |
IP address of the VLAN interface (not display if the VLAN interface has no IP address configured) |
Subnet Mask |
Subnet mask of the IP address (not display if the VLAN interface has no IP address configured) |
Tagged Ports |
Ports through which packets of the VLAN are sent with the VLAN tag kept |
Untagged Ports |
Ports through which packets of the VLAN are sent with the VLAN tag stripped off |
interface Vlan-interface
Syntax
interface Vlan-interface vlan-interface-id
undo interface Vlan-interface vlan-interface-id
View
System view
Parameters
vlan-interface-id: VLAN interface ID, in the range of 1 to 4,094.
Description
Use the interface Vlan-interface command to enter the specified VLAN interface view. If the specified VLAN interface does not exist, this command creates the VLAN interface and then enters its view. Before creating a VLAN interface, make sure the corresponding VLAN has been created; otherwise, the VLAN interface cannot be created.
Use the undo interface Vlan-interface command to delete the specified VLAN interface.
Before creating a VLAN interface, make sure the corresponding VLAN has been created; otherwise, the VLAN interface cannot be created.
Related commands: display interface Vlan-interface.
Examples
# Create VLAN-interface 2.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] quit
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2]
ip address
Syntax
ip address ip-address { mask | mask-length } [ sub ]
undo ip address [ ip-address { mask | mask-length } [ sub ] ]
View
VLAN interface view
Parameters
ip-address: IP address of a VLAN interface, in dotted decimal format.
mask: Subnet mask that corresponds to the IP address of a VLAN interface, in dotted decimal format.
mask-length: Length of a sub-net mask, indicated by the number of “1”s. This argument ranges from 0 to 32.
sub: Indicates the address is a sub-IP address of the VLAN interface.
Description
Use the ip address command to specify the IP address and subnet mask for a VLAN interface.
Use the undo ip address command to remove the IP address and sub-net mask for a VLAN interface.
By default, no IP address is configured.
An interface normally has one IP address. To enable a VLAN of a device to connect to multiple subnets, a maximum of 20 IP addresses can be configured on the VLAN interface, in which only one is the main IP address and all the rest are sub-IP addresses. At most five IP addresses can be configured on a VLAN interface on a WX6103 access controller switch interface board. Their relationship is illustrated as follows:
l A newly configured main IP address will replace the original one, if there is one.
l Using the undo ip address command without any parameter indicates that all IP addresses will be deleted from the VLAN interface.
l Use the undo ip address ip-address { mask | mask-length } command to delete the main IP address.
l Use the undo ip address ip-address { mask | mask-length } sub command to delete a sub-IP address.
l Note that before deletion of the main IP address you must first delete the sub-IP addresses.
Examples
# Specify the IP address as 1.1.0.1, the sub-net mask as 255.255.255.0 for the VLAN-interface 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ip address 1.1.0.1 255.255.255.0
shutdown
Syntax
shutdown
undo shutdown
View
VLAN interface view
Parameters
None
Description
Use the shutdown command to shut down a VLAN interface.
Use the undo shutdown command to bring up a VLAN interface.
By default, the VLAN interface is down if all ports in the VLAN are down, as long as one port in the VLAN is up, the VLAN interface is up
You can use the undo shutdown command to bring up a VLAN interface after related parameters and protocols are configured for the VLAN interface. When there is a fault in a VLAN interface, you can use the shutdown command to shut down the interface and then bring it up using the undo shutdown command. In this way, the interface may resume.
Shutting down/bringing up a VLAN interface does not affect any Ethernet ports in the VLAN. The state of an Ethernet port does not change with the VLAN interface state.
Examples
# Shut down the VLAN interface and then bring it up.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] shutdown
[Sysname-Vlan-interface2] undo shutdown
vlan
Syntax
vlan { vlan-id1 [ to vlan-id2 ] | all }
undo vlan { vlan-id1 [ to vlan-id2 ] | all }
View
System view
Parameters
vlan-id : VLAN ID, in the range of 1 to 4,094.
vlan-id1 to vlan-id2: Specifies a VLAN range. VLAN ID is in the range 1 to 4094.
all: Creates or deletes all VLANs except reserved VLANs.
Description
Use the vlan vlan-id command to create the specified VLAN. If the specified VLAN exits, the command brings you to its view.
Use the vlan vlan-id1 to vlan-id2 command to create a range of VLANs specified by vlan-id1 and vlan-id2.
Use the undo vlan command to delete specified VLAN(s).
l As the default VLAN, VLAN 1 cannot be created, or removed.
l You cannot create/remove reserved VLANs that are reserved for specific function implementation.
l Dynamic VLANs cannot be removed using the undo vlan command.
l A VLAN configured with QoS policies cannot be removed.
l If a VLAN is configured as a remote-probe VLAN for remote port mirroring, it cannot be removed using the undo vlan command unless its remote-probe VLAN configuration is removed.
Related commands: display vlan.
Examples
# Enter VLAN 2 view.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2]
# Create VLAN 4 through VLAN 100.
<Sysname> system-view
[Sysname] vlan 4 to 100
Please wait............. Done.
Port-Based VLAN Configuration Commands
port
Syntax
port interface-list
undo port interface-list
View
VLAN interface view
Parameters
interface interface-list: Ethernet interface list, in the format of interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where &<1-10> indicates that you can specify up to 10 ports or port ranges.
Description
Use the port command to add one Access port or a group of Access ports to a VLAN.
Use the undo port command to remove one Access port or a group of Access ports from a VLAN.
Note:
l This command is only applicable to Access ports.
l All ports have their default link type configured as Access, however, users can manually configure the port type. For more information, refer to port link-type.
Related commands: display vlan.
Examples
# Add the ports from GigabitEthernet 0/0/1 to GigabitEthernet 0/0/3 to VLAN 2.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] port GigabitEthernet 0/0/1 to GigabitEthernet 0/0/3
port access vlan
Syntax
port access vlan vlan-id
undo port access vlan
View
Ethernet port view, port group view
Parameters
vlan-id : VLAN ID, in the range of 1 to 4,094.
Description
Use the port access vlan command to add the current Access port to the specified VLAN.
Use the undo port access vlan command to add the current Access port to the default VLAN.
By default, all Access ports are added to VLAN 1.
Execution of the above command in Ethernet port view will apply the configurations to the current port only whereas in port group view will apply the configurations to all ports in the port group.
Ensure the VLAN specified by the vlan-id argument exists before issuing the above commands.
Examples
# Add GigabitEthernet 0/0/1 to VLAN 3.
<Sysname> system-view
[Sysname] vlan 3
[Sysname-vlan3] quit
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] port access vlan 3
port hybrid pvid vlan
Syntax
port hybrid pvid vlan vlan-id
undo port hybrid pvid
View
Ethernet port view, port group view
Parameters
vlan-id : VLAN ID, in the range of 1 to 4,094.
Description
Use the port hybrid pvid vlan command to configure the default VLAN ID of the Hybrid port.
Use the undo port hybrid pvid command to restore the default, that is, VLAN 1.
For a Hybrid port, after you execute the undo vlan command to remove the default VLAN of the Hybrid port, the default VLAN of the Hybrid port does not change. That is to say, the Hybrid port can use the non-existing VLAN as the default VLAN.
Execution of the above commands in Ethernet interface view will apply to the current port only whereas in port group view will apply to all ports in the port group.
The default VLAN ID of local Hybrid port must be consistent with that of the peer; otherwise, packets cannot be forwarded properly.
Related commands: port link-type.
Examples
# Configure the default VLAN ID for the Hybrid port GigabitEthernet 0/0/1 to be 100.
<Sysname> system-view
[Sysname] vlan 100
[Sysname-vlan100] quit
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] port link-type hybrid
[Sysname-GigabitEthernet0/0/1] port hybrid pvid vlan 100
port hybrid vlan
Syntax
port hybrid vlan vlan-id-list { tagged | untagged }
undo port hybrid vlan vlan-id-list
View
Ethernet port view, port group view
Parameters
vlan-id-list: The range of VLANs that the Hybrid ports will be added to, vlan-id-list = [ vlan-id1 [ to vlan-id2 ] ]&<1-10>, where vlan-id ranges from 1 to 4,094 and &<1-10> indicates that the you can specify up to 10 VLAN IDs or VLAN ID ranges.
tagged: Specifies to send the packets of the specified VLAN (s) with the tags kept.
untagged: Specifies to send the packets of the specified VLAN(s) with the tags stripped off.
Description
Use the port hybrid vlan command to add the current Hybrid port to the specified VLAN(s).
Use the undo port hybrid vlan command to remove the current Hybrid port from the specified VLAN(s).
The Hybrid port can allow multiple VLANs to pass. If you execute the port hybrid vlan command for multiple times, the VLANs allowed on the Hybrid port are the set of VLANs specified by vlan-id-list in each execution.
Execution of the above commands in Ethernet interface view will apply to the current port only whereas in port group view will apply to all ports in the port group.
Related commands: port link-type.
Examples
# Add the Hybrid port GigabitEthernet 0/0/1 to VLAN 2, VLAN 4, and the range of VLANs from VLAN 50 to VLAN 100, and configure the port to send packets of all these VLANs with tags kept.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] port link-type hybrid
[Sysname-GigabitEthernet0/0/1] port hybrid vlan 2 4 50 to 100 tagged
# Add Hybrid ports of port group 2 to VLAN 2. Packets are untagged when sent by the ports.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] quit
[Sysname] port-group manual 2
[Sysname-port-group-manual-2] group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/6
[Sysname-port-group-manual-2] port link-type hybrid
[Sysname-port-group-manual-2] port hybrid vlan 2 untagged
Configuring GigabitEthernet0/0/1... Done.
Configuring GigabitEthernet0/0/2... Done.
Configuring GigabitEthernet0/0/3... Done.
Configuring GigabitEthernet0/0/4... Done.
Configuring GigabitEthernet0/0/5... Done.
Configuring GigabitEthernet0/0/6... Done.
port link-type
Syntax
port link-type { access | hybrid | trunk }
undo port link-type
View
Ethernet port view, port group view
Parameters
access: Configures the link type of a port as Access.
hybrid: Configures the link type of a port as Hybrid.
trunk: Configures the link type of a port as Trunk.
Description
Use the port link-type command to configure the link type of a port.
Use the undo port link-type command to restore the default link type of a port, which is Access by default.
Execution of the above commands in Ethernet interface view will apply to the current port only whereas in port group view will apply to all ports in the port group.
The Trunk and Hybrid ports cannot be converted to each other directly. You can convert either to the Access port, and then to the other type. For example, convert a Trunk port to an Access port, and then to a Hybrid port.
Examples
# Configure GigabitEthernet 0/0/1 to be a Trunk port.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] port link-type trunk
# Configure all the ports in the manual port group group1 as Hybrid ports.
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group manual group1] group-member GigabitEthernet 0/0/1
[Sysname-port-group manual group1] group-member GigabitEthernet 0/0/2
[Sysname-port-group manual group1] port link-type hybrid
port trunk permit vlan
Syntax
port trunk permit vlan { vlan-id-list | all }
undo port trunk permit vlan { vlan-id-list | all }
View
Ethernet port view, port group view
Parameters
vlan-id-list: The range of VLANs that the Hybrid ports will be added to, in the format of vlan-id-list = [ vlan-id1 [ to vlan-id2 ] ]&<1-10>, where vlan-id ranges from 1 to 4,094 and &<1-10> indicates that you can specify up to 10 VLAN IDs or VLAN ID ranges.
all: Adds the Trunk port to all VLANs.
Description
Use the port trunk permit vlan command to add a Trunk port to a specified VLAN, a selection of VLANs, or all VLANs.
Use the undo port trunk permit vlan command to remove the Trunk port from a specified VLAN, a selection of VLANs, or all VLANs.
The Trunk port can allow multiple VLANs to pass. If you execute the port trunk permit vlan command for multiple times, the VLANs allowed on the Trunk port are the set of VLANs specified by vlan-id-list in each execution.
Execution of the above commands in Ethernet interface view will apply to the current port only whereas in port group view will apply to all ports in the port group.
Related commands: port link-type.
Examples
# Add the Trunk port GigabitEthernet 0/0/1 to VLAN 2, VLAN 4, and the range of VLANs from VLAN 50 to VLAN 100.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] port link-type trunk
[Sysname-GigabitEthernet0/0/1] port trunk permit vlan 2 4 50 to 100
Please wait........... Done.
port trunk pvid vlan
Syntax
port trunk pvid vlan vlan-id
undo port trunk pvid
View
Ethernet port view, port group view
Parameters
vlan-id : VLAN ID, in the range of 1 to 4,094
Description
Use the port trunk pvid vlan command to configure the default VLAN ID for the Trunk port.
Use the undo port trunk pvid command to restore the default.
By default, the default VLAN on a Trunk port is VLAN 1.
For a Trunk port, after you execute the undo vlan command to remove the default VLAN of the Trunk port, the default VLAN of the Trunk port does not change. That is to say, the Trunk port can use the non-existing VLAN as the default VLAN.
Execution of the above commands in Ethernet interface view will apply to the current port only whereas in port group view will apply to all ports in the port group.
You must configure the same default VLAN ID for the Trunk ports on both the local and peer devices. Otherwise, the packets cannot be transmitted properly.
Related commands: port link-type.
Examples
# Configure the default VLAN ID for the Trunk port GigabitEthernet 0/0/1 as 100.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] port link-type trunk
[Sysname-GigabitEthernet0/0/1] port trunk pvid vlan 100
MAC Address-Based VLAN Configuration Commands
display mac-vlan interface
Syntax
display mac-vlan interface
View
Any view
Parameters
None
Description
Use the display mac-vlan interface command to display all the ports with MAC address-based VLAN enabled.
Related commands: mac-vlan enable.
Examples
# Display all the interfaces with MAC VLAN enabled.
<Sysname> display mac-vlan interface
MAC VLAN is enabled on following ports:
---------------------------------------
GigabitEthernet0/0/1 GigabitEthernet0/0/2 GigabitEthernet0/0/3
display mac-vlan
Syntax
display mac-vlan { all | dynamic | interface | mac-address mac-addr | static | vlan vlan-id }
View
Any view
Parameters
all: Displays all the MAC address-to-VLAN entries.
dynamic: Displays dynamically configured MAC address-to-VLAN entries.
interface: Displays MAC address-to-VLAN entries of all enabled interfaces.
mac-address mac-addr: Displays the MAC address-to-VLAN entry containing the specified MAC address.
static: Displays the statically configured MAC address-to-VLAN entries.
vlan vlan-id: Displays the MAC address-to-VLAN entries associated with the specified VLAN.
Description
Use the display mac-vlan command to display the information about specific MAC address-to-VLAN entries.
If the mac-address mac-addr keyword-argument combination is specified while the mask keyword is not specified, only the information about the MAC address-to-VLAN entry containing the specified MAC address is displayed.
Examples
# Display the information about all the MAC address-to-VLAN entries.
<Sysname> display mac-vlan all
The following MAC VLAN addresses exist:
S: Static D: Dynamic
MAC ADDR MASK VLAN ID PRIO STATE
-------------------------------------------------------------------
0002-0001-0000 ffff-ffff-ffff 5 3 S&D
Total MAC VLAN address count:2
Table 1-3 Description on the fields of the display mac-vlan command
Field |
Description |
The following MAC-VLAN address exist: |
The information about the existing MAC address-to-VLAN entries is listed. |
S: Static |
The character S stands for the MAC address-to-VLAN entries that are configured statically. |
D: Dynamic |
The character D stands for the MAC address-to-VLAN entries that are configured dynamically. |
MAC ADDR |
MAC address of a MAC address-to-VLAN entry |
MASK |
Mask of the MAC address of a MAC address-to-VLAN entry |
VLAN ID |
VLAN ID of a MAC address-to-VLAN entry |
PRIO |
802.1p priority corresponding to the MAC address of a MAC address-to-VLAN entry |
STATE |
The state of a MAC address-to-VLAN entry, which can be: S, indicating that the MAC address-to-VLAN entry is configured statically. D, indicating that the MAC address-to-VLAN entry is configured automatically through the authentication server S&D, indicating that the MAC address-to-VLAN entry is configured both statically and dynamically |
mac-vlan mac-address
Syntax
mac-vlan mac-address mac-addr [ mask mask-address ] vlan vlan-id [ priority priority ]
undo mac-vlan { all | mac-address mac-addr | vlan vlan-id }
View
System view
Parameters
mac-address mac-addr: Specifies a MAC address.
vlan vlan-id: Specifies a VLAN ID, in the range of 1 to 4094.
priority priority: Specifies the 802.1p priority value corresponding to the specified MAC address. This argument is in the range of 0 to 7.
all: Removes all the static MAC address-to-VLAN entries.
Description
Use the mac-vlan mac-address command to set the VLAN and priority value corresponding to a specific MAC address.
Use the undo mac-vlan command to remove the association between MAC addresses and VLANs.
Examples
# Associate a single MAC address 000f-e201-1111 with VLAN 100 and set the priority to 7.
<Sysname> system-view
[Sysname] mac-vlan mac-address 0-1-1 vlan 100 priority 7
mac-vlan enable
Syntax
mac-vlan enable
undo mac-vlan enable
View
Ethernet port view
Parameters
None
Description
Use the mac-vlan enable command to enable MAC address-based VLAN on a port.
Use the undo mac-vlan enable command to disable MAC address-based VLAN on a port.
By default, MAC address-based VLAN is disabled on a port.
Examples
# Enable MAC address-based VLAN on GigabitEthernet 0/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 0/0/1
[Sysname–GigabitEthernet0/0/1] mac-vlan enable
Voice VLAN Configuration Commands
display voice vlan oui
Syntax
display voice vlan oui
View
Any view
Parameters
None
Description
Use the display voice vlan oui command to display the currently supported organizationally unique identifier (OUI) address(es), the OUI address mask, and the descriptive string.
Related commands: voice vlan, voice vlan enable.
As the first 24 bits of a MAC address (in binary format), an OUI address is a globally unique identifier assigned to a vendor by IEEE.
Examples
# Display the OUI address of the voice VLAN.
<Sysname> display voice vlan oui
Oui Address Mask Description
0001-e300-0000 ffff-ff00-0000 Siemens phone
0003-6b00-0000 ffff-ff00-0000 Cisco phone
0004-0d00-0000 ffff-ff00-0000 Avaya phone
0060-b900-0000 ffff-ff00-0000 Philips/NEC phone
00d0-1e00-0000 ffff-ff00-0000 Pingtel phone
00e0-7500-0000 ffff-ff00-0000 Polycom phone
00e0-bb00-0000 ffff-ff00-0000 3com phone
Table 2-1 Description on the fields of the display voice vlan oui command
Field |
Description |
Oui Address |
OUI addresses that are allowed to pass |
Mask |
Masks of the OUI addresses that are allowed to pass |
Description |
Description of the OUI addresses that are allowed to pass |
display voice vlan state
Syntax
display voice vlan state
View
Any view
Parameters
None
Description
Use the display voice vlan state command to display the voice VLAN configuration.
Related commands: voice vlan vlan-id enable, voice vlan enable.
Examples
# Display the voice VLAN configurations.
<Sysname> display voice vlan state
Voice VLAN status: ENABLE
Voice VLAN ID: 2
Voice VLAN security mode: Security
Voice VLAN aging time: 1440 minutes
Voice VLAN enabled port and its mode:
PORT MODE
--------------------------------
GigabitEthernet0/0/2 MANUAL
GigabitEthernet0/0/3 MANUAL
GigabitEthernet0/0/4 MANUAL
GigabitEthernet0/0/5 AUTO
Table 2-2 Description on the fields of the display voice vlan state command
Field |
Description |
Voice VLAN status |
The current voice VLAN status: ENABLE or DISABLE. |
Voice VLAN ID |
ID of the voice VLAN |
Voice VLAN security mode |
Security mode for the voice VLAN |
Voice VLAN aging time |
Aging time of the voice VLAN |
Current voice vlan enabled port and its mode |
The port that is currently enabled with the voice VLAN feature and its voice VLAN mode |
PORT |
port ID |
MODE |
Voice VLAN mode of the port: manual or automatic. |
voice vlan
Syntax
voice vlan vlan-id enable
undo voice vlan enable
View
System view
Parameters
vlan-id: ID of the VLAN to be enabled with the voice VLAN feature, in the range of 2 to 4,094.
Description
Use the voice vlan command to enable the voice VLAN feature globally.
Use the undo voice vlan enable command to disable the voice VLAN feature globally.
l Only one VLAN of a device can have the voice VLAN function enabled at a time, and the VLAN must be an exsiting static VLAN.
l To configure a VLAN as a voice VLAN, the specified VLAN must exist and cannot be VLAN 1. Otherwise, the configurations will fail.
l To delete a VLAN with voice VLAN enabled, you need to disable the voice VLAN feature before deleting the VLAN.
Related commands: display voice vlan state.
Examples
# Enable the voice VLAN feature on VLAN 2(assuming that VLAN 2 already exists).
<Sysname> system-view
[Sysname] voice vlan 2 enable
voice vlan aging
Syntax
voice vlan aging minutes
undo voice vlan aging
View
System view
Parameters
minutes: Aging time of a voice VLAN, in the range 5 to 43,200 minutes.
Description
Use the voice vlan aging command to configure the aging time of a voice VLAN.
Use the undo voice vlan aging command to restore the default aging time of a voice VLAN.
By default, the aging time of a voice VLAN is 1440 minutes.
When a port in automatic voice VLAN mode receives voice packets, the system will decide whether to add the port to the voice VLAN based on the source MAC address contained in the inbound voice packets. When adding the port to the voice VLAN, the system starts the aging timer at the same time. If within the aging time, no voice packets are received on the port, the system automatically removes the port from the voice VLAN when the aging time expires.
Related commands: display voice vlan state.
Examples
# Configure the aging time of the voice VLAN as 100 minutes.
<Sysname> system-view
[Sysname] voice vlan aging 100
voice vlan enable
Syntax
voice vlan enable
undo voice vlan enable
View
Ethernet port view
Parameters
None
Description
Use the voice vlan enable command to enable the voice VLAN feature on an Ethernet port.
Use the undo voice vlan enable command to disable the voice VLAN feature on an Ethernet port.
No voice VLAN is enabled on a port by default.
l For a port configured to work in automatic voice VLAN mode, the port must be a Trunk or Hybrid port. An Access port configured in automatic mode cannot be enabled with the voice VLAN feature.
l Enable the voice VLAN feature globally before enabling the feature on a port
l The voice VLAN functions properly only after the voice VLAN feature is enabled both globally and on a port.
Examples
# Enable the voice VLAN feature on port GigabitEthernet 0/0/1.
<Sysname> system-view
[Sysname] voice vlan 2 enable
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] voice vlan enable
voice vlan mac-address
Syntax
voice vlan mac-address mac-addr mask oui-mask [ description text ]
undo voice vlan mac-address oui
View
System view
Parameters
mac-addr: MAC address, in the format of H-H-H, such as 1234-1234-1234.
mask oui-mask: Specifies the valid length of the OUI address, represented in mask, in the format of H-H-H, with the higher bits being consecutive fs and the lower bits 0s, for example, ffff-f000-0000.
description text: Specifies a string that describes the OUI address. The string is of 1 to 30 characters and is case sensitive.
oui: Specifies the OUI address to be removed, in the format H-H-H, such as 1234-1200-0000, which is the logic AND result of mac-addr and oui-mask. Using the display voice vlan oui command can display OUI address information. The OUI address cannot be a broadcast, multicast or address of all 0s or all fs.
Description
Use the voice vlan mac-address command to configure the specified OUI address to be identified by the voice VLAN.
Use the undo voice vlan mac-address command to remove an OUI address identified by the voice VLAN.
A maximum of 16 OUI addresses can be supported by the system.
By default, the system is configured with the default OUI addresses, which can be removed and then added, as illustrated in the following table.
Table 2-3 Default OUI addresses
Number |
OUI |
Description |
1 |
0001-e300-0000 |
Siemens phone |
2 |
0003-6b00-0000 |
Cisco phone |
3 |
0004-0d00-0000 |
Avaya phone |
4 |
0060-b900-0000 |
Philips/NEC phone |
5 |
00d0-1e00-0000 |
Pingtel phone |
6 |
00e0-7500-0000 |
Polycom phone |
7 |
00e0-bb00-0000 |
3com phone |
Related commands: display voice vlan oui.
Examples
# Configure the OUI address as 1234-1234-1234, the mask as ffff-ff00-0000, and the descriptive string as phone A, that is, voice packets from Phone A with source MAC address being 1234-1234-1234 can pass through the voice VLAN.
<Sysname> system-view
[Sysname] voice vlan mac-address 1234-1234-1234 mask ffff-ff00-0000 description PhoneA
# Display information about the supported OUI address.
<Sysname> display voice vlan oui
Oui Address Mask Description
0001-e300-0000 ffff-ff00-0000 Siemens phone
0003-6b00-0000 ffff-ff00-0000 Cisco phone
0004-0d00-0000 ffff-ff00-0000 Avaya phone
0060-b900-0000 ffff-ff00-0000 Philips/NEC phone
00d0-1e00-0000 ffff-ff00-0000 Pingtel phone
00e0-7500-0000 ffff-ff00-0000 Polycom phone
00e0-bb00-0000 ffff-ff00-0000 3com phone
1234-1200-0000 ffff-ff00-0000 PhoneA
# Disable voice packets of Phone A from passing through the voice VLAN.
<Sysname> system-view
[Sysname] undo voice vlan mac-address 1234-1200-0000
voice vlan mode auto
Syntax
voice vlan mode auto
undo voice vlan mode auto
View
Ethernet port view
Parameters
None
Description
Use the voice vlan mode auto command to configure the voice VLAN mode on the current port to be automatic.
Use the undo voice vlan mode auto command to configure the voice VLAN mode on the current port to be manual.
By default, the port voice VLAN mode is automatic.
Different voice VLAN modes can be configured on different ports, independent of one another.
Note that: if a port is enabled with voice VLAN and works in manual mode, you need to add the port to the voice VLAN manually to make the voice VLAN take effect on the port.
Examples
# Configure the voice VLAN work mode on GigabitEthernet 0/0/1 as manual.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] undo voice vlan mode auto
voice vlan security enable
Syntax
voice vlan security enable
undo voice vlan security enable
View
System view
Parameters
None
Description
Use the voice vlan security enable command to enable the security mode for the voice VLAN.
Use the undo voice vlan security enable command to disable the security mode for the voice VLAN.
By default, the security mode for the voice VLAN is enabled.
Examples
# Disable the security mode for the voice VLAN.
<Sysname> system-view
[Sysname] undo voice vlan security enable
GARP Configuration Commands
display garp statistics
Syntax
display garp statistics [ interface interface-list ]
View
Any view
Parameters
interface interface-list: Specifies an Ethernet port list, in the format of { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where &<1-10> means that you can specify up to 10 port ranges. A port range defined without the to interface-type interface-number portion comprises only one port.
Description
Use the display garp statistics command to display GARP statistics of specified or all the ports.
Note that:
l If the interface interface-list keyword-argument combination is not specified, this command displays the GARP statistics of all the ports.
l If the interface interface-list keyword-argument combination is specified, this command displays the GARP statistics of the specified ports.
Examples
# Display statistics about GARP for port GigabitEthernet 0/0/1.
<Sysname> display garp statistics interface GigabitEthernet 0/0/1
GARP statistics on port GigabitEthernet 0/0/1
Number of GVRP Frames Received : 0
Number of GVRP Frames Transmitted : 0
Number of Frames Discarded : 0
display garp timer
Syntax
display garp timer [ interface interface-list ]
View
Any view
Parameters
interface interface-list: Specifies an Ethernet port list, in the format of { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where &<1-10> means that you can specify up to 10 port ranges. A port range defined without the to interface-type interface-number portion comprises only one port.
Description
Use the display garp timer command to display GARP timer settings of specific ports.
Note that:
l If the interface interface-list keyword-argument combination is not specified, this command displays the GARP timer settings of all the ports.
l If the interface interface-list keyword-argument combination is specified, this command displays the GARP timer settings of the specified ports.
Related commands: garp timer, garp timer leaveall.
Examples
# Display GARP timers on port GigabitEthernet 0/0/1.
<Sysname> display garp timer interface GigabitEthernet 0/0/1
GARP timers on port GigabitEthernet0/0/1
Garp Join Time : 20 centiseconds
Garp Leave Time : 60 centiseconds
Garp LeaveAll Time : 1000 centiseconds
Garp Hold Time : 10 centiseconds
garp timer
Syntax
garp timer { hold | join | leave } timer-value
undo garp timer { hold | join | leave }
View
Ethernet port view, port group view
Parameters
hold: Sets the hold timer.
join: Sets the join timer.
leave: Sets the leave timer.
timer-value: Timer setting (in centiseconds), which must be a multiple of 5 centiseconds.
Description
Use the garp timer command to set a GARP timer for an Ethernet port or all ports in a port group in compliance with the timer setting dependencies shown in Table 3-1.
Use the undo garp timer command to restore the default of a GARP timer. This may fail if the default does not satisfy the dependencies shown in Table 3-1.
By default, the hold timer, the join timer, and the leave timer are set to 10 centiseconds, 20 centiseconds, and 60 centiseconds.
Note that:
l In Ethernet port view, these two commands apply to the current port only; in port group view, these two commands apply to all the ports in the port group.
l When restoring the default GARP timers, you are recommended to do that on the timers in the order of hold, join, leave, and leaveall.
l When configuring GARP timers, note that their values are dependent on each other and must be a multiplier of five centiseconds. If the value range for a timer is not desired, you may change it by tuning the value of another timer as shown in the following table:
Table 3-1 Dependencies of GARP timers
Timer |
Lower limit |
Upper limit |
Hold |
10 centiseconds |
Not greater than half of the join timer setting |
Join |
Not less than two times the hold timer setting |
Less than half of the leave timer setting |
Leave |
Greater than two times the join timer setting |
Less than the leaveall timer setting |
Leaveall |
Greater than the leave timer setting |
32765 centiseconds |
Related commands: display garp timer.
Examples
# Set the GARP join timer on port GigabitEthernet 0/0/1 to 25 centiseconds, assuming that both the hold timer and the leave timer are using the default.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] garp timer join 25
garp timer leaveall
Syntax
garp timer leaveall timer-value
undo garp timer leaveall
View
System view
Parameters
timer-value: Leaveall timer setting, in the range 65 to 32765 (in centiseconds), Note that the setting of the leaveall timer must be a multiple of 5 centiseconds and must be greater than the leave timer settings of all the ports.
Description
Use the garp timer leaveall command to set the leaveall timer of GARP.
Use the undo garp timer leaveall command to restore the default. This may fail if the default is less than the setting of the current leave timer.
By default, the setting of the leaveall timer is 1000 centiseconds (that is, 10 seconds).
A leaveall timer starts upon the start of a GARP application entity. When this timer expires, the entity sends a LeaveAll message so that other entities can re-register its attribute information and starts another leaveall timer at the same time.
Each time a device on the network receives a LeaveAll message, it resets its leaveall timer. Therefore, a GARP application entity may send LeaveAll messages at the interval set by its leaveall timer or the leaveall timer on another device on the network, whichever is smaller.
Related commands: display garp timer.
Examples
# Set the leaveall timer to 100 centiseconds, assuming that the leave timer is 60 centiseconds.
<Sysname> system-view
[Sysname] garp timer leaveall 100
reset garp statistics
Syntax
reset garp statistics [ interface interface-list ]
View
User view
interface interface-list: Specifies an Ethernet port list, in the format of { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where &<1-10> means that you can specify up to 10 port ranges. A port range defined without the to interface-type interface-number portion comprises only one port.
Description
Use the reset garp statistics command to clear GARP statistics of specific or all the ports.
Note that:
l If the interface interface-list keyword-argument combination is not specified, this command clears the GARP statistics of all the ports.
l If the interface interface-list keyword-argument combination is specified, this command clears the GARP statistics of the specified ports.
Related commands: display gvrp statistics.
Examples
# Clear statistics about GARP on all ports.
<Sysname> reset garp statistics
GVRP Configuration Commands
display gvrp local-vlan interface
Syntax
display gvrp local-vlan interface interface-type interface-number
View
Any view
Parameters
interface-type interface-number: Specifies an interface by its type and number.
Description
Use the display gvrp local-vlan interface command to display the local VLAN information maintained by GVRP on a port.
Examples
# Display the local VLAN information maintained by GVRP on GigabitEthernet 0/0/1.
<Sysname> display gvrp local-vlan interface GigabitEthernet 0/0/1
Following VLANs exist in GVRP local database:
1(default),2-500
// The information above shows that GVRP maintains the information about VLAN 1, VLAN 2 through VLAN 500, which GigabitEthernet 0/0/1 belongs to.
display gvrp state
Syntax
display gvrp state interface interface-type interface-number vlan vlan-id
View
Any view
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
vlan vlan-id: Specifies a VLAN ID, in the range of 1 to 4094.
Description
Use the display gvrp state command to display the current GVRP state.
Examples
# Display the GVRP state of VLAN 1, which GigabitEthernet 0/0/1 belongs to.
<Sysname> display gvrp state interface GigabitEthernet 0/0/1 vlan 1
GVRP state of VLAN 1 on port GigabitEthernet0/0/1
Applicant state machine : VP
Registrar state machine : MTR
display gvrp statistics
Syntax
display gvrp statistics [ interface interface-list ]
View
Any view
Parameters
interface interface-list: Specifies an Ethernet port list, in the format of { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where &<1-10> means that you can specify up to 10 port ranges. A port range defined without the to interface-type interface-number portion comprises only one port.
Description
Use the display gvrp statistics command to display the GVRP statistics of specified or all trunk ports.
Note that if the interface interface-list is not provided, the GVRP statistics of all trunk ports will be displayed. Otherwise, only the GVRP statistics of all the specified trunk port will be displayed.
Examples
# Display statistics about GVRP for trunk port GigabitEthernet 0/0/1.
<Sysname> display gvrp statistics interface GigabitEthernet 0/0/1
GVRP statistics on port GigabitEthernet0/0/1
GVRP Status : Enabled
GVRP Running : YES
GVRP Failed Registrations : 0
GVRP Last Pdu Origin : 0000-0000-0000
GVRP Registration Type : Normal
Table 3-2 Description on the fields of the display gvrp statistics command
Field |
Description |
GVRP Status |
Indicates whether GVRP is enabled or disabled. |
GVRP Running |
Indicates whether GVRP is running. |
GVRP Failed Registrations |
Indicates the number of GVRP registration failures. |
GVRP Last Pdu Origin |
Indicates the source MAC address in the last GVRP PDU. |
GVRP Registration Type |
Indicates the GVRP registration type on the port. |
display gvrp status
Syntax
display gvrp status
View
Any view
Parameters
None
Description
Use the display gvrp status command to display the global enable/disable state of GVRP.
Examples
# Display the global GVRP enable/disable state.
<Sysname> display gvrp status
GVRP is enabled
//The above output information indicates that GVRP is enabled globally.
display gvrp vlan-operation interface
Syntax
display gvrp vlan-operation interface interface-type interface-number
View
Any view
Parameters
interface-type interface-number: Specifies an interface by its type and number.
Description
Use the display gvrp vlan-operation interface command to display the information about dynamic VLAN operations performed on a port.
Examples
# Display information about dynamic VLAN operations performed on GigabitEthernet 0/0/1.
<Sysname> display gvrp vlan-operation interface GigabitEthernet 0/0/1
Dynamic VLAN operations on port GigabitEthernet0/0/1
Operations of creating VLAN : 2-100
Operations of deleting VLAN : none
Operations of adding VLAN to TRUNK : 2-100
Operations of deleting VLAN from TRUNK : none
gvrp
Syntax
gvrp
undo gvrp
View
System view, Ethernet port view, port group view
Parameters
None
Description
Use the gvrp command to enable GVRP globally, on a port, or on all ports in a port group depending on the view you entered.
Use the undo gvrp command to disable GVRP globally, on a port, or on all ports in a port group depending on the view you entered.
By default, GVRP is disabled.
Executed in system view, the command takes effect globally. Executed in Ethernet port view, the command takes effect on the current port. Executed in port group view, the command takes effect on all the ports in the port group.
l To enable GVRP on a port, you need to enable it globally.
l The port where you enable/disable GVRP must be a Trunk port.
l BPDU Tunnel is incompatible with GVRP. Before enabling GVRP, disable BPDU Tunnel.
Related commands: display gvrp status.
Examples
# Enable GVRP globally.
<Sysname> system-view
[Sysname] gvrp
GVRP is enabled globally.
gvrp registration
Syntax
gvrp registration { fixed | forbidden | normal }
undo gvrp registration
View
Ethernet port view, port group view
Parameters
fixed: Sets the registration type to fixed.
forbidden: Sets the registration type to forbidden.
normal: Sets the registration type to normal.
Description
Use the gvrp registration command to configure the GVRP registration type on a port or all ports in a port group.
Use the undo gvrp registration command to restore the default.
The default GVRP registration type is normal.
Executed in Ethernet port view, the command takes effect on the current port. Executed in port group view, the command takes effect on all the ports in the port group.
GVRP provides the following three registration types on a port:
l Normal –– Enables the port to dynamically register/deregister VLANs, and to propagate both dynamic and static VLAN information.
l Fixed –– Disables the port from dynamically registering/deregistering VLANs or propagating information about dynamic VLANs, but allows the port to propagate information about static VLANs. A trunk port with fixed registration type thus allows only manually configured VLANs to pass through even though it is configured to carry all VLANs.
l Forbidden –– Disables the port from dynamically registering/deregistering VLANs or propagating VLAN information except information about VLAN 1. A trunk port with forbidden registration type thus allows only VLAN 1 to pass through even though it is configured to carry all VLANs.
Note that this command is only available on trunk ports.
Related commands: display garp statistics.
Examples
# Set the GVRP registration type to fixed on port GigabitEthernet 0/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet 0/0/1
[Sysname-GigabitEthernet0/0/1] port link-type trunk
[Sysname-GigabitEthernet0/0/1] gvrp registration fixed