Content Overview Sometimes network administrators are faced with situations where network documentation is incomplete or inaccurate. Cisco Discovery Protocol (CDP) can be a useful tool in these situations because it can help to build a basic picture of the network. CDP is a media and protocol independent, Cisco proprietary protocol used for neighbor discovery. CDP will only show information about directly connected neighbors but it is nevertheless a powerful tool. In many cases after a router is initially configured it is difficult or inconvenient for a network administrator to connect directly to the router for configuration changes or other activities. Telnet is a TCP/IP-based application that allows remote connection to the router command-line interface (CLI) for configuration, monitoring, and troubleshooting purposes. It is an essential tool for the network professional. Students completing this module should be able to:
Content 4.1 Discovering and Connecting to Neighbors 4.1.1 Introduction to CDP Cisco Discovery Protocol (CDP) is a Layer 2 protocol that connects lower physical media and upper network layer protocols, as shown in Figure . CDP is used to obtain information about neighboring devices, such as the types of devices connected, the router interfaces they are connected to, the interfaces used to make the connections, and the model numbers of the devices. CDP is media and protocol independent, and runs on all Cisco equipment over the Subnetwork Access Protocol (SNAP). CDP Version 2 (CDPv2) is the most recent release of the protocol. Cisco IOS (Release 12.0(3)T or later) supports CDPv2. CDP Version 1 (CDPv1) is enabled by default with Cisco IOS (Release 10.3 to 12.0(3)T). When a Cisco device boots up, CDP starts up automatically and allows the device to detect neighboring devices that are also running CDP. It runs over the data link layer and allows two systems to learn about each other, even if they are using different network layer protocols. Each device configured for CDP sends periodic messages, known as advertisements, to multiple routers. Each device advertises at least one address at which it can receive Simple Network Management Protocol (SNMP) messages. The advertisements also contain “time-to-live” or holdtime information, indicating the length of time that receiving devices should hold CDP information before discarding it. Additionally, each device listens to periodic CDP messages sent by others in order to learn about neighboring devices. Web Links Tech Notes http://www.cisco.com/en/US/ tech/tk389/tk214/ tech_tech_notes_list.html
Content 4.1 Discovering and Connecting to Neighbors 4.1.2 Information obtained with CDP The primary use of CDP is to discover all Cisco devices that are directly connected to a local device. Use the show cdp neighbors command to display CDP updates on the local device. Figure displays an example of how CDP delivers its collection of information to a network administrator. Each router that is running CDP exchanges protocol information with its neighbors. The network administrator can display the results of this CDP information exchange on a console that is connected to a local router. The administrator uses the show cdp neighbors command to display information about the networks directly connected to the router. CDP provides information about each CDP neighbor device by transmitting type length values (TLVs), which are blocks of information embedded in CDP advertisements. Device TLVs displayed by the show cdp neighbors command include the following: Notice that the lowest router in the figure is not directly connected to the administrator’s console router. To obtain CDP information about this device, the administrator would need to Telnet to a router that is directly connected to this device. Web Links CDP Commands http://www.cisco.com/en/US/ products/sw/ iosswrel/ps1831/ products_command_ reference_ chapter09186a00800d983f.html
Content 4.1 Discovering and Connecting to Neighbors 4.1.3 Implementation, monitoring, and maintenance of CDP The following commands are used to implement, monitor, and maintain CDP information: The cdp run command is used to enable CDP globally on the router. By default, CDP is globally enabled. The cdp enable command is used to enable CDP on a particular interface. On Cisco IOS Release 10.3 or higher, CDP is enabled by default on all supported interfaces to send and receive CDP information. CDP could be enabled on each of the devices interfaces by using the cdp enable command. Lab Activity e-Lab Activity: Implementation, Monitoring, and Maintenance of CDP In this lab, the students will learn some commands associated with the Cisco Discovery Protocol (CDP) and learn to view some CDP information. Web Links CDP Commands http://www.cisco.com/en/US/ products/sw/ iosswrel/ps1831/ products_command_ reference_ chapter09186a00800d983f.html
Content 4.1 Discovering and Connecting to Neighbors 4.1.4 Creating a network map of the environment CDP was designed and implemented as a simple, low-overhead protocol. Though a CDP frame can be small, it can retrieve a great deal of useful information about connected neighboring Cisco devices. This information can be used to create a network map of the connected devices. Devices connected to neighboring devices can be discovered by using Telnet to connect to the neighbors, and using the show cdp neighbors command to discover what devices are connected to those neighbors. Lab Activity Lab Exercise: Creating a Network Map using CDP In this lab, the students will use CDP commands to get information about neighboring network devices.
Content 4.1 Discovering and Connecting to Neighbors 4.1.5 Disabling CDP To disable CDP at the global level, use the no CDP run command in global configuration mode. If CDP is disabled globally, individual interfaces cannot be enabled for CDP. On Cisco IOS Release 10.3 or higher, CDP is enabled by default on all supported interfaces to send and receive CDP information. However, on some interfaces, such as asynchronous interfaces, CDP is disabled by default. If CDP is disabled use the CDP enable command in interface configuration mode. To disable CDP on a specific interface after it has been enabled, use the no CDP enable command in interface configuration mode. Web Links CDP Commands http://www.cisco.com/en/US/products/sw/ iosswrel/ps1831/products_command_reference_ chapter09186a00800d983f.html#xtocid2
Content 4.1 Discovering and Connecting to Neighbors 4.1.6 Troubleshooting CDP The following commands can be used to show the version, update information, tables, and traffic: