03-Layer 2 - LAN Switching Command Reference

HomeSupportResource CenterRoutersH3C SR8800 Router SeriesH3C SR8800 Router SeriesTechnical DocumentsReference GuidesCommand ReferencesH3C SR8800 Command Reference-Release3347-6W10303-Layer 2 - LAN Switching Command Reference
08-GVRP Commands
Title Size Download
08-GVRP Commands 115.81 KB

display garp statistics

Syntax

display garp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

interface interface-list: Displays the GARP 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.

Description

Use the display garp statistics command to display the GARP statistics of the specified ports. If no ports are specified, this command displays the GARP statistics for all ports.

This command displays the statistics about GVRP PDUs received, transmitted, and dropped on GVRP-enabled ports. When the system is restarted or after you perform 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 GVRP PDU drop occurs on the port, you must 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 either of the modes.

Examples

# Display statistics about GARP for ports GigabitEthernet 4/1/1 and GigabitEthernet 4/1/2.

<Sysname> display garp statistics interface GigabitEthernet 4/1/1 to GigabitEthernet 4/1/2

 

         GARP statistics on port GigabitEthernet4/1/1

 

         Number of GVRP Frames Received          : 5

         Number of GVRP Frames Transmitted       : 2

         Number of Frames Discarded              : 1

 

         GARP statistics on port GigabitEthernet4/1/2

 

         Number of GVRP Frames Received          : 3

         Number of GVRP Frames Transmitted       : 4

         Number of Frames Discarded              : 2

display garp timer

Syntax

display garp timer [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

interface interface-list: Displays the GARP timer settings 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.

Description

Use the display garp timer command to display GARP timer settings of specific ports. If no ports are specified, this command displays the GARP timer settings on all ports.

Related commands: garp timer hold, garp timer join, garp timer leave, and garp timer leaveall.

Examples

# Display GARP timers on port GigabitEthernet 4/1/1.

<Sysname> display garp timer interface GigabitEthernet 4/1/1

 

         GARP timers on port GigabitEthernet4/1/1

 

                 Garp Join Time          : 20 centiseconds

                 Garp Leave Time         : 60 centiseconds

                 Garp LeaveAll Time      : 1000 centiseconds

                 Garp Hold Time          : 10 centiseconds

display gvrp local-vlan

Syntax

display gvrp local-vlan interface interface-type interface-number [ | { begin | exclude | include } regular-expression ]

View

Any view

Default 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.

Description

Use the display gvrp local-vlan command to display the local VLAN information maintained by GVRP on a port.

Examples

# Display the local VLAN information maintained by GVRP on GigabitEthernet 4/1/1.

<Sysname> display gvrp local-vlan interface GigabitEthernet 4/1/1

 Following VLANs exist in GVRP local database:

  1(default),2-500

display gvrp state

Syntax

display gvrp state interface interface-type interface-number vlan vlan-id [ | { begin | exclude | include } regular-expression ]

View

Any view

Default 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.

Description

Use the display gvrp state command to display GVRP state machines in a specified VLAN on a port.

Examples

# Display GVRP state machines in VLAN 2 on port GigabitEthernet 4/1/1.

<Sysname> display gvrp state interface GigabitEthernet 4/1/1 vlan 2

        GVRP state of VLAN 2 on port GigabitEthernet4/1/1

 

                 Applicant state machine      : VP

                 Registrar state machine      : MTR

Table 1 Output description

Field

Description

GVRP state of VLAN 2 on port GigabitEthernet4/1/1

Information about the GVRP state machines in VLAN 2 on port GigabitEthernet 4/1/1

Applicant state machine

The 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

The 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/numbers with the following meanings:

·       The first two letters/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 (or the third letter being absent) for Normal registration, R for Registration fixed, and F for Registration forbidden.

For example, MTR stands for “Empty, Registration fixed", indicating the fixed registration mode in Empty state.

 

display gvrp statistics

Syntax

display gvrp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

interface interface-list: Displays the GVRP statistics of one or multiple Ethernet ports. You can provide 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.

Description

Use the display gvrp statistics command to display the GVRP statistics of specified trunk ports. If no ports are specified, this command displays the GVRP statistics for all trunk ports.

Examples

# Display statistics about GVRP for trunk port GigabitEthernet 4/1/1.

<Sysname> display gvrp statistics interface GigabitEthernet4/1/1

 

         GVRP statistics on port GigabitEthernet4/1/1

 

                 GVRP Status                     : Enabled

                 GVRP Running                    : YES

                 GVRP Failed Registrations       : 0

                 GVRP Last Pdu Origin            : 0000-0000-0000

                 GVRP Registration Type          : Normal

Table 2 Output description

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

Syntax

display gvrp status [ | { begin | exclude | include } regular-expression ]

View

Any view

Default 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.

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

display gvrp vlan-operation

Syntax

display gvrp vlan-operation interface interface-type interface-number [ | { begin | exclude | include } regular-expression ]

View

Any view

Default 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.

Description

Use the display gvrp vlan-operation command to display the information about dynamic VLAN operations on a port.

Examples

# Display the information about dynamic VLAN operations on GigabitEthernet 4/1/1.

<Sysname> display gvrp vlan-operation interface GigabitEthernet 4/1/1

         Dynamic VLAN operations on port GigabitEthernet4/1/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

Syntax

garp timer hold timer-value

undo garp timer hold

View

Ethernet interface view, Layer 2 aggregate interface view, port group view

Default level

2: System level

Parameters

timer-value: Hold timer setting (in centiseconds), which must be a multiple of 5 and range from 10 (inclusive) to half the Join timer setting (inclusive).

Description

Use the garp timer hold command to set the GARP Hold timer for an Ethernet port, Layer-2 aggregate interface, or all ports in a port group.

Use the undo garp timer hold command 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.

By default, the Hold timer is set to 10 centiseconds.

Related commands: display garp timer and garp timer join.

Examples

# Set the GARP Hold timer to 15 centiseconds, assuming that the Join timer is 30 centiseconds.

<Sysname> system-view

[Sysname] interface GigabitEthernet 4/1/1

[Sysname-GigabitEthernet4/1/1] garp timer hold 15

garp timer join

Syntax

garp timer join timer-value

undo garp timer join

View

Ethernet interface view, Layer-2 aggregate interface view, port group view

Default level

2: System level

Parameters

timer-value: Join timer setting (in centiseconds), which must be a multiple of 5 and range from twice the Hold timer (inclusive) to half of the Leave timer (inclusive). When the Hold timer and the Leave timer are set to their default, the Join timer ranges from 20 (inclusive) to 25 (inclusive).

Description

Use the garp timer join command to set the GARP Join timer for an Ethernet port, Layer-2 aggregate interface, or all ports in a port group.

Use the undo garp timer join command 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.

By default, the Join timer is set to 20 centiseconds.

Related commands: display garp timer, garp timer hold, and garp timer leave.

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 4/1/1

[Sysname-GigabitEthernet4/1/1] garp timer join 25

garp timer leave

Syntax

garp timer leave timer-value

undo garp timer leave

View

Ethernet interface view, Layer-2 aggregate interface view, port group view

Default level

2: System level

Parameters

timer-value: Leave timer setting (in centiseconds), which must be a multiple of 5 and range from twice the Join timer (exclusive) to the LeaveAll timer setting (exclusive).

Description

Use the garp timer leave command to set the GARP Leave timer for an Ethernet port, Layer-2 aggregate interface, or all ports in a port group.

Use the undo garp timer leave command 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.

By default, the Leave timer is set to 60 centiseconds.

Related commands: display garp timer, garp timer join, and garp timer leaveall.

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 4/1/1

[Sysname-GigabitEthernet4/1/1] garp timer leave 100

garp timer leaveall

Syntax

garp timer leaveall timer-value

undo garp timer leaveall

View

System view

Default level

2: System level

Parameters

timer-value: LeaveAll timer setting (in centiseconds), which must be a multiple of 5 and range from the maximum Leave timer on the switch (exclusive) to 32765 (inclusive).

Description

Use the garp timer leaveall command to set the GARP LeaveAll timer.

Use the undo garp timer leaveall command to restore the default. This may fail if the default is beyond the valid value range for the LeaveAll timer.

By default, the setting of the LeaveAll timer is 1000 centiseconds.

 

 

NOTE:

To keep the dynamic VLANs learned through GVRP stable, do not set the LeaveAll timer smaller than its default value.

 

Related commands: display garp timer and garp timer leave.

Examples

# Set the LeaveAll timer to 2000 centiseconds, assuming that the Leave timer is 60 centiseconds.

<Sysname> system-view

[Sysname] garp timer leaveall 2000

gvrp

Syntax

gvrp

undo gvrp

View

System view, Ethernet interface view, Layer 2 aggregate interface view, port group view

Default level

2: System level

Parameters

None

Description

Use the gvrp command to enable GVRP.

Use the undo gvrp command to disable GVRP.

By default, GVRP is disabled.

 

 

NOTE:

·       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.

·       To enable GVRP on a port, enable GVRP globally before you enable it on the port.

·       When executing this command in Ethernet interface view, make sure that the Ethernet interface is configured as a trunk port.

·       You cannot change the link type of a GVRP-enabled trunk port.

 

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 interface view, Layer 2 aggregate interface view, port group view

Default level

2: System level

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.

This command is available only on trunk ports.

Related commands: display gvrp statistics.

Examples

# Set the GVRP registration type to fixed on port GigabitEthernet 4/1/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 4/1/1

[Sysname-GigabitEthernet4/1/1] port link-type trunk

[Sysname-GigabitEthernet4/1/1] gvrp registration fixed

reset garp statistics

Syntax

reset garp statistics [ interface interface-list ]

View

User view

Default level

2: System level

Parameters

interface interface-list: Clear 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.

Description

Use the reset garp statistics command to clear the GARP statistics on specified ports. If no ports are specified, this command clears the GARP statistics on all ports.

The cleared statistics include the statistics about GVRP PDUs sent, received, and dropped..

Related commands: display garp statistics.

Examples

# Clear statistics about GARP on all ports.

<Sysname> reset garp statistics