Configuring CDP

This chapter describes how to configure Cisco Discovery Protocol (CDP) on the Cisco LoRaWAN Gateway.

Understanding CDP

CDP is a device discovery protocol that runs over Layer 2 (the data link layer) on all Cisco-manufactured devices (routers, bridges, access servers, and switches) and allows network management applications to discover Cisco devices that are neighbors of already known devices. With CDP, network management applications can learn the device type and the Simple Network Management Protocol (SNMP) agent address of neighboring devices running lower-layer, transparent protocols. This feature enables applications to send SNMP queries to neighboring devices.

CDP runs on all media that support Subnetwork Access Protocol (SNAP). Because CDP runs over the data-link layer only, two systems that support different network-layer protocols can learn about each other.

Each CDP-configured device sends periodic messages to a multicast address, advertising at least one address at which it can receive SNMP messages. The advertisements also contain time-to-live, or holdtime information, which is the length of time a receiving device holds CDP information before discarding it. Each device also listens to the messages sent by other devices to learn about neighboring devices.

Configuring CDP

These sections include CDP configuration information and procedures.

Enabling and Disabling CDP

Beginning in privileged EXEC mode, follow these steps to enable or disable the CDP device discovery capability:

Procedure

  Command or Action Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

(no) cdp run

Enable or disable CDP.

Step 3

exit

Return to privileged EXEC mode.

Configuring the CDP Characteristics

Beginning in privileged EXEC mode, follow these steps to configure the CDP timer and holdtime.

You can configure the frequency of CDP updates, and the amount of time to hold the information before discarding it.

Procedure

  Command or Action Purpose

Step 1

configure terminal

Enter global configuration mode.

Step 2

cdp timer seconds

(Optional) Set the transmission frequency of CDP updates in seconds.

The range is 5 to 254; the default is 60 seconds.

Step 3

cdp holdtime seconds

(Optional) Specify the amount of time a receiving device should hold the information sent by your device before discarding it.

The range is 10 to 255 seconds; the default is 180 seconds.

Step 4

exit

Return to privileged EXEC mode.

Step 5

show cdp

Verify configuration by displaying global information about CDP on the device.

Step 6

show cdp neighbors

Display information about neighbors.

Step 7

copy running-config startup-config

(Optional) Save your entries in the configuration file.

What to do next

Use the no form of the CDP commands to return to the default settings.