- Table of Contents
-
- 02-Layer 2-LAN Switching Command Reference
- 00-Preface
- 01-Ethernet interface configuration commands
- 02-Loopback and null interface configuration commands
- 03-Bulk interface configuration commands
- 04-MAC address table configuration commands
- 05-Ethernet link aggregation configuration commands
- 06-Port isolation configuration commands
- 07-Spanning tree configuration commands
- 08-BPDU tunneling configuration commands
- 09-VLAN configuration commands
- 10-GVRP configuration commands
- 11-LLDP configuration commands
- 12-Service loopback group configuration commands
- 13-MVRP commands
- Related Documents
-
Title | Size | Download |
---|---|---|
10-GVRP configuration commands | 110.83 KB |
display garp statistics
Use display garp statistics to display the GARP statistics of the specified ports. If no ports are specified, this command displays the GARP statistics for all ports.
Syntax
display garp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface interface-list: Displays the GARP statistics of one or multiple ports. You can specify up to 10 port lists. By using each port list, you can specify a single port in the form of interface-type interface-number, or a port range in the form of interface-type interface-number1 to interface-type interface-number2, where the end port number specified by interface-number2 must be greater than the start port number specified by interface-number1.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
This command displays the statistics about GVRP PDUs received, transmitted, and dropped on GVRP-enabled ports. When the system is restarted or after you use the reset garp statistics command, the existing packet statistics are cleared and the system starts to collect new GARP statistics. With the statistics, you can judge whether a GVRP-enabled port is operating normally.
· If the number of received and transmitted GVRP PDUs on the port is the same as the remote port, it indicates that the two ends are transmitting and receiving GVRP PDUs normally and no registration information is lost.
· If the port drops GVRP PDUs, you should check its registration mode. GVRP PDUs are likely to be dropped if the registration mode is fixed or forbidden, because dynamic VLANs cannot be registered in these two modes.
Examples
# Display GARP statistics on ports GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2.
<Sysname> display garp statistics interface gigabitethernet 1/0/1 to gigabitethernet 1/0/2
GARP statistics on port GigabitEthernet1/0/1
Number of GVRP Frames Received : 5
Number of GVRP Frames Transmitted : 2
Number of Frames Discarded : 1
GARP statistics on port GigabitEthernet1/0/2
Number of GVRP Frames Received : 3
Number of GVRP Frames Transmitted : 4
Number of Frames Discarded : 2
reset garp statistics
display garp timer
Use display garp timer to display GARP timers on specific ports. If no ports are specified, this command displays the GARP timers on all ports.
Syntax
display garp timer [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface interface-list: Displays the GARP timer settings of one or multiple ports. You can specify up to 10 port lists. By using each port list, you can specify a single port in the form of interface-type interface-number, or a port range in the form of interface-type interface-number1 to interface-type interface-number2, where the end port number specified by interface-number2 must be greater than the start port number specified by interface-number1.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display GARP timers on port GigabitEthernet 1/0/1.
<Sysname> display garp timer interface gigabitethernet 1/0/1
GARP timers on port GigabitEthernet1/0/1
Garp Join Time : 20 centiseconds
Garp Leave Time : 60 centiseconds
Garp LeaveAll Time : 1000 centiseconds
Garp Hold Time : 10 centiseconds
· garp timer hold
· garp timer join
· garp timer leave
· garp timer leaveall
display gvrp local-vlan
Use display gvrp local-vlan to display the local VLAN information maintained by GVRP on the specified port.
Syntax
display gvrp local-vlan interface interface-type interface-number [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
0: Visit level
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the local VLAN information maintained by GVRP on GigabitEthernet 1/0/1.
<Sysname> display gvrp local-vlan interface gigabitethernet 1/0/1
Following VLANs exist in GVRP local database:
1(default),2-500
display gvrp state
Use display gvrp state to display GVRP state machines in a specified VLAN on a port.
Syntax
display gvrp state interface interface-type interface-number vlan vlan-id [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
0: Visit level
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
vlan vlan-id: Specifies a VLAN ID, ranging from 1 to 4094.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display GVRP state machines in VLAN 2 on port GigabitEthernet 1/0/1.
<Sysname> display gvrp state interface gigabitethernet 1/0/1 vlan 2
GVRP state of VLAN 2 on port GigabitEthernet1/0/1
Applicant state machine : VP
Registrar state machine : MTR
Table 1 Command output
Field |
Description |
GVRP state of VLAN 2 on port GigabitEthernet1/0/1 |
Information about the GVRP state machines in VLAN 2 on port GigabitEthernet 1/0/1. |
Applicant state machine |
Applicant state machine handles attribute declarations. Its state can be VA, AA, QA, LA, VP, AP, QP, VO, AO, QO, LO, VON, AON, and QON. Each state consists of two or three letters with the following meanings: · The first letter indicates the state: V for Very anxious, A for Anxious, Q for Quiet, and L for Leaving. · The second letter indicates the membership state: A for Active member, P for Passive member, and O for Observer. · The third letter N, if any, stands for Non-participant. For example, VP indicates "Very anxious, Passive member." |
Registrar state machine |
Registrar state machine records the registration of attributes declared by other participants. Its state can be INN, LV, L3, L2, L1, MT, INR, LVR, L3R, L2R, L1R, MTR, INF, LVF, L3F, L2F, L1F, and MTF. Each state consists of two or three letters or numbers with the following meanings: · The first two letters or numbers indicate the state: IN stands for In; LV, L3, L2, and L1 all stand for Leaving, and L3, L2, L1 are three sub-states of LV; MT stands for Empty. · The third letter indicates the registration mode: N, if any, stands for Normal registration, R stands for Registration fixed, and F stands for Registration forbidden. For example, MTR stands for "Empty, Registration fixed" and indicates the fixed registration mode in Empty state. |
display gvrp statistics
Use display gvrp statistics to display the GVRP statistics of the specified trunk ports. If no ports are specified, this command displays the GVRP statistics for all trunk ports.
Syntax
display gvrp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface interface-list: Displays the GVRP statistics of one or multiple Ethernet ports. You can specify up to 10 Ethernet port lists, by each of which you can specify an individual port in the form of interface-type interface-number, or a port range in the form of interface-type interface-number1 to interface-type interface-number2, where the end-port number specified by interface-number2 must be greater than the start-port number specified by interface-number1.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display GVRP statistics for trunk port GigabitEthernet 1/0/1.
<Sysname> display gvrp statistics interface gigabitethernet 1/0/1
GVRP statistics on port GigabitEthernet1/0/1
GVRP Status : Enabled
GVRP Running : YES
GVRP Failed Registrations : 0
GVRP Last Pdu Origin : 0000-0000-0000
GVRP Registration Type : Normal
Table 2 Command output
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 mode (fixed, forbidden, or normal) on the port. |
display gvrp status
Use display gvrp status to display the global GVRP state.
Syntax
display gvrp status [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the global GVRP state.
<Sysname> display gvrp status
GVRP is enabled
display gvrp vlan-operation
Use display gvrp vlan-operation to display information about dynamic VLAN operations on a port.
Syntax
display gvrp vlan-operation interface interface-type interface-number [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
0: Visit level
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display information about dynamic VLAN operations on GigabitEthernet 1/0/1.
<Sysname> display gvrp vlan-operation interface gigabitethernet 1/0/1
Dynamic VLAN operations on port GigabitEthernet1/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
garp timer hold
Use garp timer hold to set the GARP Hold timer for an Ethernet port, Layer 2 aggregate interface, or all ports in a port group.
Use undo garp timer hold to restore the default of the GARP Hold timer. This may fail if the default is beyond the valid value range for the Hold timer.
Syntax
garp timer hold timer-value
undo garp timer hold
Default
The Hold timer is 10 centiseconds.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view, port group view
Default command level
2: System level
Parameters
timer-value: Specifies the Hold timer (in centiseconds), which must be a multiple of 5 and range from 10 (inclusive) to half the Join timer (inclusive).
Examples
# Set the GARP Hold timer to 15 centiseconds, assuming that the Join timer is 30 centiseconds.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] garp timer hold 15
· display garp timer
· garp timer join
garp timer join
Use garp timer join to set the GARP Join timer for an Ethernet port, Layer 2 aggregate interface, or all ports in a port group.
Use undo garp timer join to restore the default of the GARP Join timer. This may fail if the default is beyond the valid value range for the Join timer.
Syntax
garp timer join timer-value
undo garp timer join
Default
The Join timer is set to 20 centiseconds.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view, port group view
Default command level
2: System level
Parameters
timer-value: Specifies the Join timer (in centiseconds), which must be a multiple of 5 and range from twice the Hold timer (inclusive) and half the Leave timer (inclusive).
Examples
# Set the GARP Join timer to 25 centiseconds, assuming that both the Hold timer and the Leave timer are using the default.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] garp timer join 25
Related commands
· display garp timer
· garp timer hold
· garp timer leave
garp timer leave
Use garp timer leave to set the GARP Leave timer for an Ethernet port, Layer 2 aggregate interface, or all ports in a port group.
Use undo garp timer leave to restore the default of the GARP Leave timer. This may fail if the default is beyond the valid value range for the Leave timer.
Syntax
garp timer leave timer-value
undo garp timer leave
Default
The Leave timer is set to 60 centiseconds.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view, port group view
Default command level
2: System level
Parameters
timer-value: Specifies the Leave timer (in centiseconds), which must be a multiple of 5 and range from twice the Join timer (exclusive) to the LeaveAll timer (exclusive).
Examples
# Set the GARP Leave timer to 100 centiseconds, assuming that both the Join timer and the LeaveAll timer are using the default.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] garp timer leave 100
Related commands
· display garp timer
· garp timer join
· garp timer leaveall
garp timer leaveall
Use garp timer leaveall to set the GARP LeaveAll timer.
Use undo garp timer leaveall to restore the default. This may fail if the default is beyond the valid value range for the LeaveAll timer.
Syntax
garp timer leaveall timer-value
undo garp timer leaveall
Default
The LeaveAll timer is 1000 centiseconds.
Views
System view
Default command level
2: System level
Parameters
timer-value: Specifies the Leaveall timer (in centiseconds), which must be a multiple of 5 and range from the maximum Leave timer on the device (exclusive) to 32765 (inclusive).
Usage guidelines
To keep the dynamic VLANs learned through GVRP stable, do not set the LeaveAll timer smaller than its default value.
Examples
# Set the leaveall timer to 2000 centiseconds, assuming that the Leave timer on every port is set to 60 centiseconds.
<Sysname> system-view
[Sysname] garp timer leaveall 2000
· display garp timer
· garp timer leave
gvrp
Use gvrp to enable GVRP.
Use undo gvrp to disable GVRP.
Syntax
gvrp
undo gvrp
Default
GVRP is disabled.
Views
System view, Layer 2 Ethernet interface view, Layer 2 aggregate interface view, port group view
Default command level
2: System level
Usage guidelines
Settings in system view take effect globally. Settings in Layer 2 Ethernet view or Layer 2 aggregate interface take effect only on the current interface. Settings in port group view take effect on all ports in the port group.
To enable GVRP on a port, enable GVRP globally before you enable it on the port.
In interface view, you can use this command on trunk ports only.
You cannot change the link type of a GVRP-enabled trunk port.
Examples
# Enable GVRP globally.
<Sysname> system-view
[Sysname] gvrp
GVRP is enabled globally.
display gvrp status
gvrp registration
Use gvrp registration to configure the GVRP registration mode.
Use undo gvrp registration to restore the default.
Syntax
gvrp registration { fixed | forbidden | normal }
undo gvrp registration
Default
The GVRP registration mode is normal.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view, port group view
Default command level
2: System level
Parameters
fixed: Sets the GVRP registration mode to fixed.
forbidden: Sets the GVRP registration mode to forbidden.
normal: Sets the GVRP registration mode to normal.
Usage guidelines
Settings in system view take effect globally. Settings in Ethernet view or Layer 2 aggregate interface take effect on the current interface. Settings in port group view take effect on all ports in the port group.
This command is only available on trunk ports.
Examples
# Set the GVRP registration mode to fixed on port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] gvrp registration fixed
Related commands
display garp statistics
reset garp statistics
Use reset garp statistics to clear the GARP statistics on the specified ports. If no ports are specified, this command clears the GARP statistics on all ports.
Syntax
reset garp statistics [ interface interface-list ]
Views
User view
2: System level
Parameters
interface interface-list: Clears the GARP statistics of one or multiple ports. You can specify up to 10 port lists, by each of which you can specify a single port in the form of interface-type interface-number, or a port range in the form of interface-type interface-number1 to interface-type interface-number2, where the end port number specified by interface-number2 must be greater than the start port number specified by interface-number1.
Usage guidelines
The cleared statistics include the statistics about GVRP PDUs sent, received, and dropped.
Examples
# Clear the GARP statistics on all ports.
<Sysname> reset garp statistics
Related commands
display garp statistics