Skip to content

CDP

Configure Cisco Discovery Protocol (CDP) settings on a device.

Diagram
NameTypeConstraintMandatoryDefault Value
cdpClass[cdp]No

NameTypeConstraintMandatoryDefault Value
advertise_v1Booleantrue, falseNo
enableBooleantrue, falseNo
holdtimeIntegermin: 10, max: 255No
log_adjacency_changesBooleantrue, falseNo
timerIntegermin: 5, max: 254No

Example-1: Enable CDP with custom timer and holdtime settings.

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
cdp:
enable: true
timer: 60
holdtime: 180

Example-2: Enable CDP with adjacency change logging and v1 advertisement.

iosxr:
devices:
- name: router-2
host: 10.10.10.1:57400
configuration:
cdp:
enable: true
log_adjacency_changes: true
advertise_v1: true

Example-3: Configure CDP globally for all devices.

iosxr:
global:
configuration:
cdp:
enable: true
timer: 30
holdtime: 120
log_adjacency_changes: true