Junos Automation (Scripting)
Junos Automation (Scripting)

Re: JunosScript export DHCP bindings

‎08-11-2010 12:50 PM

It sound like you probably want to use an event script rather than an off-box script. I'm not familiar with the Junos DHCP functionality. Is there a syslog message generated in response to a DHCP binding? If so, then the event script could run automatically, gather the new binding, and write it to an external output file, but if there is no event generated then you'd have to do a time-based event and check the DHCP bindings every X minutes.

1 REPLY 1
Junos Automation (Scripting)

JunosScript export DHCP bindings

‎08-11-2010 08:44 AM

All,

 

  Recently I was given the requirement to export all of the DHCP bindings for public customers.  This is kind of daunting as I have about 35 SRX-210 routers so manually is kind of out of the question.  I am hoping that JunosScript can help.

 

  I am unfamiliar with how JunosScript works so if someone can point me in the right direction here is what I am looking to do:

 

Trigger: dhcp binding created

Action:  Export MAC address, IP address, and Time to external file (Appended of course)

 

I can then parse the external file into a mySQL database since I'm assuming that exporting directly into the database (something that would be awesome if possible) is not terrible within the realm of possibility.

 

Thank you,

 

George