< Home

cdp clear neighbor

Function

The cdp clear neighbor command clears CDP neighbors in the system or on an interface of the device.

Format

cdp clear neighbor [ interface interface-type interface-number ]

Parameters

Parameter

Description

Value

interface interface-type interface-number

Indicates the type and number of the interface whose CDP neighbors are to be cleared. In the command:
  • interface-type specifies the type of the interface.
  • interface-number specifies the number of the interface.

If no interface is specified, this command clears CDP neighbors on all interfaces.

-

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If you want to obtain the latest CDP neighbor information of interfaces, use the cdp clear neighbor command to clear existing CDP neighbors. When an interface receives new CDP packets, new CDP neighbors are generated.

Prerequisites

The LLDP function has been enabled globally and on interfaces, and the lldp compliance cdp receive command has been run to enable CDP-compatible LLDP on interfaces.

Example

# Clear CDP neighbors on all the interfaces.

<HUAWEI> cdp clear neighbor
Warning: This command will clear CDP neighbor information of all the ports. Continue? [Y/N]:y
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >