loading junos configuration is very easy

I love the way junos manages configuration file.  Here is my favorite command “load” and some examples about it.

[edit interfaces ge-4/0/0]
root@router#load update terminal relative
[Type ^D at a new line to end input] 

If you are at a relative location such as an interface configuration as above, any thing you paste will override the configuration for that particular relative location. The key word here is relative in the command. If you don’t use it, you will get errors. If you replace the option “update” by “merge” then instead of overriding, you will merge the changes in your pasted config with the current candidate configuration in place.

Another handy option is patch, it might be a real time saver if you are configuring several routers with similar commands/options, then take the configuration difference with the archived config;

root@router1# show | compare 
[edit system name-server]
+   8.8.8.8;
-   192.168.9.14;

then paste the config you get above into the other router (e.g router2)  that you want to configure the same way.

root@router2#load patch terminal

then the magic happens and the same changes are replicated into the other router

About: rtoodtoo

Worked for more than 10 years as a Network/Support Engineer and also interested in Python, Linux, Security and SD-WAN // JNCIE-SEC #223 / RHCE / PCNSE


You have a feedback?

Discover more from RtoDto.net

Subscribe now to keep reading and get access to the full archive.

Continue reading