On-box Scripts notes

On-box Scripts notes

During my preparation for JNCIE-DC lab exam, I’ll post here my notes about exam topics. Firstly there will be just theory (excerpts from books and config/feature guides), and later on I plan to practice most important topics in my virtual lab.

First topic – On-box Scripting.

I don’t believe that there will be some complex tasks on this topic in the lab exam – I expect just really basic stuff. Definitely no hard programming skills required.
So I think it wolud be enough to just know how to download and apply already prepared commit, op or event script to score a few easy points at the end of the lab (hopefully I’ll have some time after finishing core part of the lab to do this kind of tasks).

So there are my notes for this section:

commit script—Copy the script to the /var/db/scripts/commit directory on the hard disk or the /config/scripts/commit directory in flash memory.

op script—Copy the script to the /var/db/scripts/op directory on the hard disk or the /config/scripts/op directory in flash memory.

event script—Copy the script to the /var/db/scripts/event directory on the hard disk or the /config/scripts/event directory in flash memory.

If you store scripts in and load them from flash memory:

user@host# set system scripts load-scripts-from-flash


For updating scripts from remote file server:
set source URL for script:

[edit system scripts commit file filename]
user@R1# set source url

[edit system scripts op file filename]
user@R1# set source url

[edit event-options event-script file filename]
user@R1# set source url


And then refresh specific script:

[edit system scripts commit file filename]
user@R1# set refresh


Or refresh all scripts of this type:

[edit system scripts commit]
user@R1# set refresh


Or refresh specific script from specific URL:

[edit system scripts commit file filename]
user@R1# set refresh-from url


Also you can use operational mode command to refresh scripts:

request system scripts refresh-from (commit | event | op) file filename url url <sync>;

Leave a Reply

Your email address will not be published. Required fields are marked *