Category Archives: system management

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.

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;

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

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

monitoring files in JUNOS

If you want to monitor a growing log file in JUNOS, there is a builtin command for this purpose. For example, if you want to monitor the log file /var/log/messages just run;

and any change in this file will be displayed on your screen. To stop monitoring simply run;

This is a very handy command indeed. You can also use “tail -f /var/log/messages” after dropping to freebsd shell though, builtin command has several advantages.  You can also monitor the file based on a pattern i.e if you want to look for error messages real time simply run;

This is the first post of my juniper notes. I would like to add more if I can get round to. Maybe I can add some useful stuff in run up to my juniper certification.