Category: junos

Recovering primary JUNOS image

When I booted my SRX device I saw the following output on the console;  WARNING: THIS DEVICE HAS BOOTED FROM THE BACKUP JUNOS IMAGE   It is possible that the primary copy of JUNOS failed to boot up  properly, and so this device has booted from the backup copy.  Please re-install JUNOS to recover the
Read More »

SRX password reset/recovery

Here are some basic steps to reset the password on an SRX firewall. Note: If you are looking for a default password, there is no default password in SRX. A new SRX out of the box has the root user with no password. 1) Reboot the box and press SPACE when you see the following
Read More »

Junos factory default configuration

I know that it is an easy command but for a few minutes I tried to remember the command to bring a junos box to factory default configuration. Isn’t it funny? I am taking a note here if I need to remember this just prior to my retirement:) [edit] root# load factory-default warning: activating factory
Read More »

Fetching JUNOS config as xml

If you want to fetch a junos device config remotely first configure netconf on the device via; junos#set system services netconf ssh junos#commit Then connect to the junos device (IP 192.168.1.1) via an ssh client from a linux host and redirect the output to a file which is the xml config of the device indeed:
Read More »

Maximum rollback configuration in SRX

I used to remember that junos by default keeps 50 configuration rollbacks by number through 0 to 49. However in a default setup when I saw that I only have up to number 5 rollback, I realized that default isn’t 50 config files. Once you set the command; #set system max-configuration-rollbacks 49 you can keep
Read More »

Simple Junos Commit Script

Here is a simple junos commit script that checks if a given interface is assigned to trust zone or not. It is very basic of course but can be extended using junos automation reference documents. /* basic-sanity-check.slax */ version 1.0; ns junos = "http://xml.juniper.net/junos/*/junos"; ns xnm = "http://xml.juniper.net/xnm/1.1/xnm"; ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0"; import "../import/junos.xsl"; match
Read More »