< Home

reset cdp statistics

Function

The reset cdp statistics command clears statistics about CDP packets that all interfaces receive and send or CDP packets that a specified interface receives and sends.

Format

reset cdp statistics [ interface interface-type interface-number ]

Parameters

Parameter Description Value
interface interface-type interface-number
Interface on which statistics about CDP packets are to be cleared.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

If this parameter is not specified, CDP packet information about all interfaces is cleared.

-

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If you want to quickly locate and process a CDP fault, you must calculate the numbers of CDP packets sent and received by a device for a specified period. Before collecting specific CDP packet statistics, you can run the reset cdp statistics command to clear existing statistics about CDP packets.

Prerequisites

LLDP has been globally enabled using the lldp enable command in the system view and LLDP has been configured to be compatible with CDP on interfaces using the lldp compliance cdp receive command.

Follow-up Procedure

After running the reset cdp statistics command to clear existing statistics about CDP packets, you can run the display cdp statistics command to check statistics about CDP packets sent and received by a device for a specific period.

Precautions

If you do not set the interface parameter when running the reset cdp statistics command, statistics about CDP packets sent and received by all interfaces are cleared. Exercise caution when running this command.

Example

# Display statistics about CDP packets that all interfaces receive and send.

<HUAWEI> reset cdp statistics
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >