Management and Configuration Guide K/KA/KB.15.15

Example
Example 97 CDP neighbors table listing
This example displays the CDP devices that the switch has detected by receiving their CDP packets.
(HP_Switch_name#) show cdp neighbors
CDP neighbors information
Port Device ID | Platform Capability
---- ----------------------------- + ---------------------------- -----------
1 Accounting (0030c1-7fcc40) | J4812A HP Switch. . . S
2 Resear¢1-1 (0060b0-889e43) | J4121A HP Switch. . . S
4 Support (0060b0_761a45) | J4121A HP Switch. . . S
7 Marketing (0030c5_33dc59) | J4313A HP Switch. . . S
12 Mgmt NIC(099a05-09df9b | NIC Model X666 H
12 Mgmt NIC(099a05-09df11 | NIC Model X666 H
Enabling and Disabling CDP Operation
Enabling CDP operation (the default) on the switch causes the switch to add entries to its CDP
Neighbors table for any CDP packets it receives from other neighboring CDP devices.
Disabling CDP operation clears the switch's CDP Neighbors table and causes the switch to drop
inbound CDP packets from other devices without entering the data in the CDP Neighbors table.
Syntax
[no] cdp run
Enables or disables CDP read-only operation on the switch.
(Default: Enabled)
Example
To disable CDP read-only on the switch:
(HP_Switch_name#) no cdp run
When CDP is disabled:
show cdp neighbors displays an empty CDP Neighbors table
show cdp displays
Global CDP information
Enable CDP [Yes]: No
Enabling or disabling CDP operation on individual ports
In the factory-default configuration, the switch has all ports enabled to receive CDP packets.
Disabling CDP on a port causes it to drop inbound CDP packets without recording their data in
the CDP Neighbors table.
Syntax
[no] cdp enable [ [ e ] <port-list> ]
Example
To disable CDP on port A1:
(HP_Switch_name#) no cdp enable a1
Enabling and Disabling CDP Operation 237