cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

204
Views
0
Helpful
10
Replies
Beginner

Regular DHCP Binding Output

Hi

I want to output the dhcp binding information using a krontab every 1 hour but I can't see to work out the krontab schedule for hourly or the krontab won't do an hourly output.

 

This is the command that I've got and it works but I want it to run every hour

 

show ip dhcp binding | redirect tftp://IPAddress/_dhcp_binding.txt

 

Can anyone tell me how I can schedule it every hour or let me know an alternative suggestion as to

10 REPLIES 10
VIP Advisor

Re: Regular DHCP Binding Output

Instead why not use EEM Script for this :

 

below example help you :

 

http://darenmatthews.com/blog/?p=2223#more-2223

BB
*** Rate All Helpful Responses ***
Beginner

Re: Regular DHCP Binding Output

Thanks - would this work on a switch?

VIP Advisor

Re: Regular DHCP Binding Output

Hello

Possibly try this, I haven't tested it but it should run at every minute past the hour on every day of week.
event manager applet DHCP
event timer cron cron-entry "1 1-23 * * 0-6"
action 1.1 cli command "enable"
action 1.2 cli command "show ip dhcp binding | redirect tftp://IPAddress/_dhcp_binding.txt"
action 1.3 cli command "end"



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future
Highlighted
Beginner

Re: Regular DHCP Binding Output

I don't have

event manager applet

or

event timer

It's a Cisco 9300 switch I'm trying to configure it on

VIP Advisor

Re: Regular DHCP Binding Output

Hello

Not sure not tried eem on 9ks before try as i posted it?



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future
Beginner

Re: Regular DHCP Binding Output

VIP Advisor

Re: Regular DHCP Binding Output

FYI

That cron timer sequence does work as expected , just tested it on IOS



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future
Beginner

Re: Regular DHCP Binding Output

So is it....?

 

conf t

event manager applet DHCP
event timer cron cron-entry "1 1-23 * * 0-6"
action 1.1 cli command "enable"
action 1.2 cli command "show ip dhcp binding | redirect tftp://IPAddress/_dhcp_binding.txt"
action 1.3 cli command "end"

 

 

 

VIP Advisor

Re: Regular DHCP Binding Output

yes here is IOX XE reference in case if you required.

 

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/eem/configuration/xe-3se/3650/eem-xe-3se-3650-book/eem-policy-cli.html

 

Let us know any issue.

BB
*** Rate All Helpful Responses ***
Beginner

Re: Regular DHCP Binding Output

Thanks for your help - I'll try it out and feedback with my findings.

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards