I was doing some ODR routing labs today and started mucking about with CDP timers (ODR uses CDP for advertisements). This is important to note in case you get a task that requires you to change the convergence time of an ODR learned route. CDP timers are changed at the global level. The default values are 60 seconds for advertisements with a 180 second holddown time.
How to change CDP timers (must change timer(send) and holdtime separately):
sw4(config)#cdp ?
advertise-v2 CDP sends version-2 advertisements
holdtime Specify the holdtime (in sec) to be sent in packets
run Enable CDP
timer Specify the rate at which CDP packets are sent (in sec)
sw4(config)#cdp timer ?
<5-254> Rate at which CDP packets are sent (in sec)
sw4(config)#cdp timer 5
sw4(config)#do sh cdp
Global CDP information:
Sending CDP packets every 5 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is enabled
sw4(config)#cdp hold 15
Global CDP information:
Sending CDP packets every 5 seconds
Sending a holdtime value of 15 seconds
Sending CDPv2 advertisements is enabled
Here’s some weirdness: you can configure the holdtime to be less than the update timer:
sw4(config)#cdp timer 30
sw4(config)#cdp hold 10
sw4(config)#do sh cdp
Global CDP information:
Sending CDP packets every 30 seconds
Sending a holdtime value of 10 seconds
Sending CDPv2 advertisements is enabled
To set the CDP timers back to the defaults, you could manually set the “timer” value to 60 seconds and the “holdtime” value to 180 seconds, but let’s use the “default” command to return the timers:
sw4(config)#default cdp timer
sw4(config)#do sh cdp
Global CDP information:
Sending CDP packets every 60 seconds
Sending a holdtime value of 15 seconds
Sending CDPv2 advertisements is enabled
sw4(config)#default cdp hold
sw4(config)#do sh cdp
Global CDP information:
Sending CDP packets every 60 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is enabled
Sweet! I love the “default” command.
Cisco Documention:cdp timercdp holdtime