Using the Cisco Discovery Protocol
Problem
You want to see summary information about what is connected to your router’s interfaces.
Solution
You can selectively enable or disable Cisco Discovery Protocol (CDP) on the entire router, or on individual interfaces:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#cdp runRouter1(config)#interfaceRouter1(config-if)#Serial0/0cdp enableRouter1(config-if)#exitRouter1(config)#interfaceRouter1(config-if)#FastEthernet0/0no cdp enableRouter1(config-if)#exitRouter1(config)#interfaceRouter1(config-if)#FastEthernet1/0cdp enableRouter1(config-if)#endRouter1#
Discussion
CDP is enabled by default on the router, and on all interfaces. If you have previously disabled it, as discussed in Recipe 2.6, and you want to re-enable CDP on the router, you can issue the cdp run global configuration command:
Router1(config)#cdp runThis turns on CDP processing on all supported interfaces by default. If you don’t want to run CDP on a particular interface, you can use the no cdp enable command, as we did for the serial interface in the example:
Router1(config)#interfaceRouter1(config-if)#Serial0/0no cdp enable
CDP is a Cisco proprietary protocol that allows Cisco devices to identify one another and exchange useful identifying information. The show cdp neighbors command gives a summary of information about adjacent devices that also happen to be running CDP:
Router1#show cdp neighbors Capability Codes: R ...