I am fairly new to Juniper, apprecaite the help.
Please consider the following command
user@Merlot> request system software add jbundle-5.3R2.4-domestic-signed.tgz
1)Above, after add , we just tell the file name "bundle-5.3R2.4-domestic-signed.tgz", what assumption does router make about the location of this file? How can we view the contents of the directory where the above file resides from CLI ?
2) Let say we have FTP server, a folder JUNUPGRADE contains " bundle-5.3R2.4-domestic-signed.tgz" on this FTP server. FTP server's IP is 18.104.22.168 and our Juniper router has IP of 22.214.171.124
What command can I use on Juniper CLI to copy the file bundle-5.3R2.4-domestic-signed.tgz onto Juniper router so that we can use the command request system software add jbundle-5.3R2.4-domestic-signed.tgz to upgrade JUNOS?
Regarding your queries;
>> The device would generally look for the file in the current location where it is pointing to.
You can check this via below steps;
This is generally /cf/root
If you change the directory to another location and then move to the operational mode , the particular command will look for the file in that location. for eg;
root> start shellroot@% pwd/cf/rootroot@% cd /var/log/root@% cliroot> file list/cf/var/log/:JTAC__jsrpd_commit_check__appiddauthd_libstatsauthd_profilelibauthd_sdb.logauthlib_jdhcpd_trace.logautodbin_messageschassisdcosddcddfwceccdext/flowc/fwauthd_chk_onlyggsn/gres-tpgroup_db.loghttpd.loghttpd.log.old idpdidpinfo_erridpinfo_err.20110720ifstracedinstallinstall.0.gzinstall.1.gzinstall.2.gzinstall.3.gzinstall.4.gzinteractive-commandsinventoryipfdjdhcpd_era_discover.logjdhcpd_era_discover.log.0jdhcpd_era_discover.log.1jdhcpd_era_discover.log.2jdhcpd_era_discover.log.3jdhcpd_era_solicit.logjdhcpd_era_solicit.log.0jdhcpd_era_solicit.log.1jdhcpd_era_solicit.log.2---(more 44%)---[abort]root> request system software add in ^'in' is ambiguous.Possible completions: <package-name> URL or pathname of package install Size: 831, Last changed: Nov 03 2016 install.0.gz Size: 911, Last changed: Nov 19 2011 install.1.gz Size: 610, Last changed: Jul 20 2011 install.2.gz Size: 625, Last changed: Mar 22 2011 install.3.gz Size: 622, Last changed: Dec 14 2010 install.4.gz Size: 630, Last changed: Dec 13 2010 interactive-commands Size: 0, Last changed: Mar 06 10:35:03 inventory Size: 108080, Last changed: Jun 24 02:20:07root> request system software add in
You can check for the contents in that location by doing;
1. > file list
2. >start shell
For your second query;
>> Please go through the method 2 in below kb;
The above command will find the bundle and load it from where you copied. This is usually downloaded before the maintenace to the juniper recommended location /var/tmp/
If you face any issue you can optionally specify the location of the bundle with the command :
request system software add /var/tmp/ < JUNOS_install_file>
Below is from Juniper document:
Note: We recommend that you always download the software image to /var/tmp only.
Copy the bundle from server to /var/tmp using the below scp command from juniper cli:
scp <Server_path>/bundle-5.3R2.4-domestic-signed.tgz user@<IP_address_lo0>:/var/tmp/
Please mark my solution as accepted if it helped.
Just thought about it a little deeper:
So when we use the command " request sytem software add THE PATH TO JUNOS IMAGE, Router simply copies the image into flash. Does it not delete the image after it gets copied into flash? If not , we can have multiple JUNOS images eating all the memory on the hard disk.
Thanks and have a nice day!!
The Junos image copied on hard disk will not be automatically deleted. We need to delete the unused files either manually or using command " request system storage cleanup". To see what all files this command will delete use "show system storage cleanup dry-run".
Here is the document :