CDP creates a security exposure when enabled. To avoid the exposure of allowing an
attacker to learn details about each switch, CDP can be easily enabled. Cisco recommends
that CDP be enabled on all interfaces that do not have a specific need for it. The most likely
interfaces that need to use CDP are interfaces connected to other Cisco routers and switches
and interfaces connected to Cisco IP phones. Otherwise, CDP can be enabled per interface
using the no cdp enable interface subcommand. (The cdp enable interface subcommand
reenables CDP.) Alternately, the no cdp run global command disables CDP for the entire
switch, with the cdp run global command reenabling CDP globally.