05-GVRP Command

Download


Chapter 1  GARP and GVRP Configuration Commands

1.1  GARP Configuration Commands

1.1.1  display garp statistics

Syntax

display garp statistics [ interface interface-list ]

View

Any view

Parameter

interface-list: Ethernet port list, in the format of { interface-type interface-number [ to interface-type interface-number ] } &<1-10>. Here, interface-type is the port type, interface-number is the port number, and &<1-10> is the repeatable times of the expression (from 1 to 10). The GARP statistics about the ports in this list will be displayed.

Description

Use the display garp statistics command to display the GARP statistics.

The displayed information includes:

l           Number of GVRP packets the port received

l           Number of GVRP packets the port received

l           Number of packets the port discarded

Example

# Display the GARP statistics on the port Ethernet1/0/1.

<H3C> display garp statistics interface Ethernet1/0/1

 

         GARP statistics on port Ethernet1/0/1

 

 

         Number Of GVRP Frames Received          : 0

         Number Of GVRP Frames Transmitted       : 0

         Number Of Frames Discarded              : 0

1.1.2  display garp timer

Syntax

display garp timer [ interface interface-list ]

View

Any view

Parameter

interface-list: Ethernet port list, in the format of { interface-type interface-number [ to interface-type interface-number ] }&<1-10>. Here, interface-type is the port type, interface-number is the port number, and &<1-10> is the repeatable times of the expression (from 1 to 10). The timer information about the ports in this list will be displayed.

Description

Use the display garp timer command to display the values of the GARP timers.

The displayed information includes:

l           Value of the Join timer

l           Value of the Leave timer

l           Value of the LeaveAll timer

l           Value of the Hold timer

Related command: garp timer, garp timer leaveall.

Example

# Display the values of GARP timers of the port Ethernet1/0/1.

<H3C> display garp timer interface Ethernet1/0/1

 

         GARP timers on port Ethernet1/0/1

 

                 Garp Join Time          : 20 centiseconds

                 Garp Leave Time         : 60 centiseconds

                 Garp LeaveAll Time      : 1000 centiseconds

                 Garp Hold Time          : 10 centiseconds

1.1.3  garp timer

Syntax

garp timer { hold | join | leave } timer-value

undo garp timer { hold | join | leave }

View

Ethernet port view

Parameter

hold: GARP Hold timer. When a GARP entity receives a piece of registration information, it does not send out a Join message immediately. Instead, to save the bandwidth resources, it starts the Hold timer, puts all registration information it receives before the timer times out into one Join message and sends out the message after the timer times out.

join: To transmit the Join messages reliably to other entities, a GARP entity sends each Join message two times. The Join timer is used to define the interval between the two sending operations of each Join message.

leave: GARP Leave timer. When a GARP entity expects to unregister a piece of attribute information, it sends out a Leave message. Any GARP entity receiving this message starts its Leave timer, and unregisters the attribute information if it does not receives a Join message again before the timer times out.

timer-value: Timeout time of the specified GARP timer (Hold, Join or Leave) in centiseconds, with a step size of five. By default, it is 10, 20, and 60 for Hold, Join and Leave timers respectively.

Description

Use the garp timer command to set the timeout time of the GARP Hold, Join or Leaver timer of the port.

Use the undo garp timer command to restore the default timeout time of the GARP Hold, Join or Leaver timer of the port.

The timeout ranges of the timers vary depending on the timeout values you set for other timers. If you want to set the timeout time of a timer to a value out of the current range, you can set the timeout time of the associated timer to another value to change the timeout range of this timer.

The following table describes the relations between the timers:

Table 1-1 Relations between the timers

Timer

Lower threshold

Upper threshold

Hold

10 centiseconds

This upper threshold is less than or equal to one-half of the timeout time of the Join timer. You can change the threshold by changing the timeout time of the Join timer.

Join

This lower threshold is greater than or equal to twice the timeout time of the Hold timer. You can change the threshold by changing the timeout time of the Hold timer.

This upper threshold is less than one-half of the timeout time of the Leave timer. You can change the threshold by changing the timeout time of the Leave timer.

Leave

This lower threshold is greater than twice the timeout time of the Join timer. You can change the threshold by changing the timeout time of the Join timer.

This upper threshold is less than the timeout time of the LeaveAll timer. You can change the threshold by changing the timeout time of the LeaveAll timer.

LeaveAll

This lower threshold is greater than the timeout time of the Leave timer. You can change threshold by changing the timeout time of the Leave timer.

32,765 centiseconds

 

Related command: display garp timer.

Example

# Set the GARP Join timer to 20 centiseconds.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Ethernet1/0/1

[H3C-Ethernet1/0/1] garp timer join 20

1.1.4  garp timer leaveall

Syntax

garp timer leaveall timer-value

undo garp timer leaveall

View

System view

Parameter

timer-value: Value of the GARP LeaveAll timer in centiseconds, ranging from 65 to 32,765, with a step size of five. This value must be greater than the value of the Leave timer. By default, it is 1,000 centiseconds (that is, 10 seconds).

Description

Use the garp timer leaveall command to set the GARP LeaveAll timer to a specified value.

Use the undo garp timer leaveall command to restore the default value of the GARP LeaveAll timer.

Once a GARP entity starts up, it starts the LeaveAll timer, and sends out a LeaveALL message after the timer times out, so that other GARP entities can re-register all the attribute information on this entity. After that, the entity restarts the LeaveAll timer to begin a new cycle.

Related command: display garp timer.

Example

# Set the GARP LeaveAll timer to 100 centiseconds.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] garp timer leaveall 100

1.1.5  reset garp statistics

Syntax

reset garp statistics [ interface interface-list ]

View

User view

Parameter

interface-list: Ethernet port list, in the format of { interface-type interface-number [ to interface-type interface-number ] }&<1-10>. Here, interface-type is the port type, interface-number is the port number, and &<1-10> is the repeatable times of the expression (from 1 to 10).

Description

Use the reset garp statistics command to clear the GARP statistics (such as the information about the packets received/sent/discarded by GVRP).

Executing the reset garp statistics command without parameter will clear the GARP statistics about all ports.

Related command: display garp statistics.

Example

# Clear GARP statistics about all ports.

<H3C> reset garp statistics

1.2  GVRP Configuration Commands

1.2.1  display gvrp statistics

Syntax

display gvrp statistics [ interface interface-list ]

View

Any view

Parameter

interface-list: Ethernet port list, in the format of { interface-type interface-number [ to interface-type interface-number ] }&<1-10>. Here, interface-type is the port type, interface-number is the port number, and &<1-10> is the repeatable times of the expression (from 1 to 10).

Description

Use the display gvrp statistics command to display the GVRP statistics about all or specified Trunk ports.

The displayed information includes:

l           GVRP status

l           Number of the failed GVRP registrations

l           Source MAC address of the last GVRP PDU

l           GVRP registration type of the port

Example

# Display the GVRP statistics about the port Ethernet1/0/1.

<H3C> display gvrp statistics interface Ethernet1/0/1

        GVRP statistics on port Ethernet1/0/1

 

                GVRP Status                     : Enabled

                GVRP Failed Registrations       : 0

                GVRP Last Pdu Origin            : 0000-0000-0000

                GVRP Registration Type          : Normal

1.2.2  display gvrp status

Syntax

display gvrp status

View

Any view

Parameter

None

Description

Use the display gvrp status command to display the enable/disable status of global GVRP.

Example

# Display the enable/disable status of global GVRP.

<H3C> display gvrp status

GVRP is enabled

The above information indicates GVRP is enabled globally.

1.2.3  gvrp

Syntax

gvrp

undo gvrp

View

System view or Ethernet port view

Parameter

None

Description

Use the gvrp command to enable GVRP globally (in system view) or on a port (in Ethernet port view).

Use the undo gvrp command to disable GVRP globally (in system view) or on a port (in Ethernet port view).

By default, GVRP is disabled both globally and on ports.

Note that:

l           Before enabling GVRP on a port, you must first enable GVRP globally.

l           If GVRP is disabled globally, it is also disabled on ports and you are not allowed to enable it on any port.

l           You can enable/disable GVRP only on Trunk ports.

Related command: display gvrp status.

Example

# Enable GVRP globally.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] gvrp

1.2.4  gvrp registration

Syntax

gvrp registration { fixed | forbidden | normal }

undo gvrp registration

View

Ethernet port view

Parameter

fixed: Allows the manual creation and registration of VLANs on the current port, and inhibits the dynamic registration and unregistration of VLANs on the current port.

forbidden: Unregisters all the VLANs except VLAN 1 on the current port, and inhibits the creation and registration of any other VLAN on the current port.

normal: Allows both manual and dynamic creation, registration, and unregistration of VLANs on the current port.

Description

Use the gvrp registration command to configure the GVRP registration type on a port.

Use the undo gvrp registration command to restore the default GVRP registration type on a port.

By default, the registration type is normal.

Note that these commands can be operated only on Trunk ports.

Related command: display gvrp statistics

Example

# Configure the GVRP registration type on the port Ethernet1/0/1 to fixed.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Ethernet1/0/1

[H3C-Ethernet1/0/1] gvrp registration fixed