ip dhcp snooping database

Answered Question
Aug 11th, 2009

Can this config be entered multiple times to send the db to multiple URLs/locations? Or can it handle multiple URLs/locations on one line? If not, any other techniques to get around the single-URL limitation?

I have this problem too.
0 votes
Correct Answer by Joe Clarke about 7 years 4 months ago

It's definitely available in EEM 2.1. Give it a shot:

event manager applet routername

event none

action 1.0 info type routername

action 2.0 syslog msg "Name is $_info_routername"

nms-3660#event manager run routername

Aug 11 19:31:12.755: %HA_EM-6-LOG: routername: Name is nms-3660

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Joe Clarke Tue, 08/11/2009 - 08:16

No, only one database URL can be specified (the last one entered takes precedence). A workaround might be to specify a local database file (e.g. flash:/snoop.db), then use EEM to periodically copy the file to another location.

yjdabear Tue, 08/11/2009 - 11:01

At one point, I thought Anycast might help, but then it's not going to suit the purpose of getting a copy to every URL when every host is available.

On the EEM front, can EEM 2.1 (or a later version) handle the following?

# cron every n hours

event timer cron cron-entry "@hourly"

event timer cron cron-entry "everyhour"

event timer cron cron-entry "0 */6 * * *"

event timer cron cron-entry "0 0,6,12,18 * * *"

# dynamically grab the "hostname" of whichever IOS device the applet is running on. I'm not sure "routername" is a predefined var because there's only one reference to it on cisco.com.

action 1.0 info type routername

...

action 3.0 syslog msg "$eem_applet_name execution on $_info_routername"

Are there similar built-in variables 1) to print a timestamp, and 2) to let the applet refer to itself (its own name)?

Joe Clarke Tue, 08/11/2009 - 11:13

First, EEM's cron is Vixie cron (i.e. the same one used by BSD operating systems). So the same syntax (e.g. @hourly) does work. In fact, all but the "everyhour" syntax should work.

No, there is no variable to refer to the policy itself. You can, however, use $_event_type_string to get the name of the event. If the ED used is a timer ED, then you also have $_timer_time as well as $_event_pub_time, $_event_pub_sec, and on newer versions of EEM $_event_pub_msec.

yjdabear Tue, 08/11/2009 - 11:27

I thought I came across a reference to "cron-entry * everyweek * * *" in the context of EEM on cisco.com somewhere, but I can't find it right now. The other three should more than suffice.

"info type routername" appears to be a valid predefined EEM env var, but I cannot determine from the scant few hits on cisco.com which version of EEM it's available in. There's hints that it's not valid for EEM 2.1.

Correct Answer
Joe Clarke Tue, 08/11/2009 - 11:31

It's definitely available in EEM 2.1. Give it a shot:

event manager applet routername

event none

action 1.0 info type routername

action 2.0 syslog msg "Name is $_info_routername"

nms-3660#event manager run routername

Aug 11 19:31:12.755: %HA_EM-6-LOG: routername: Name is nms-3660

Actions

This Discussion