Archive

Archive for March 24th, 2017

Archive DHCP Bindings from Cisco Router using EEM

March 24th, 2017 No comments

This recipe describes a simple method to send DHCP bindings from a Cisco router to a remote TFTP server running on Windows.  A batch file renanes and date-stamps the file and another batch file removes the archived files after a retention period:

EEM SCRIPT ON CISCO ROUTER:

(Note: the cron entry sends the file every 5 minutes)
event manager session cli username “your_username”  (NOTE: this is required if tacacs+ is running on the router)
event manager applet copy-dhcp-bindings
event timer cron cron-entry “*/5 * * * * ”
action 0.5 cli command “enable”
action 1.0 cli command “show ip dhcp binding | redirect tftp://[ip_address]/bindings.txt”
!
end Read more…

Categories: CISCO, EEM Scripts Tags: