CDP
Cisco Discovery Protocol (CDP) configuration manages global CDP behavior on NX-OS devices. CDP is enabled by default; these settings tune CDP timer interval and holdtime, protocol version selection (v1 or v2), device ID format for CDP advertisements, and PnP startup VLAN assignment.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”configuration (nxos.devices)
Section titled “configuration (nxos.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| cdp | Class | [cdp] | No |
cdp (nxos.devices.configuration)
Section titled “cdp (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| timer | Integer | min: 5, max: 254 | No | |
| holdtime | Integer | min: 10, max: 255 | No | |
| advertise | Choice | v1, v2 | No | |
| format_device_id | Choice | none, mac, serial-number, system-name | No | |
| pnp_startup_vlan | Integer | min: 1, max: 4094 | No |
Examples
Section titled “Examples”Example 1: Basic CDP with custom timers and advertise version
nxos: devices: - name: LEAF1 configuration: cdp: timer: 30 holdtime: 120 advertise: v2Example 2: CDP with serial-number device ID for inventory tracking
nxos: devices: - name: LEAF1 configuration: cdp: timer: 60 holdtime: 180 advertise: v2 format_device_id: serial-numberExample 3: CDP with PnP startup VLAN for zero-touch provisioning
nxos: devices: - name: LEAF1 configuration: cdp: timer: 60 holdtime: 180 advertise: v2 format_device_id: system-name pnp_startup_vlan: 100