Juniper – configuration basics.

By | 25.05.2019

Short article about juniper configuration basics. This can be helpful for network engineers who are new to Juniper.

On Junos, the configuration is stored in a shared database called a shared or global configuration database.
When editing the config, a candidate configuration is created, which after editing and checking for errors is applied as a working one.
The configuration can be edited at the same time by up to 32 users.

Configuration modes.

There are 3 configuration modes:
In this mode, everyone can edit config at the same time.
When configuration is committed by any user, all changes are applied.
If several users have changed same data, the latest changes will be applied.
-configure exclusive
Exclusive configuration. Other users cannot change anything.
-configure private
Each user can make changes independently.
If someone made changes during the configuration, you need to use the “update” command to renew the current version of the shared config database.

Commiting configuration.

After you have done changes in the configuration, to apply it, you need run command:

rtr3-msk# commit 

Also, before commit, you can check the configuration for errors:

rtr3-msk# commit check
configuration check succeeds

View the changes made before committing:

rtr3-msk# show | compare 

You can add a comment to commit:

rtr3-msk# commit comment "adding as-path prepend to peer"

For delayed commit, for example, at 14-00, you can use timer:

rtr3-msk# commit at 14:00:00

To cancel scheduled commit:

rtr3-msk> clear system commit

To test configurarion, if you are not sure in results, you can use the automatic rollback function with the specified interval. In this case, the config will be canceled and rolled back after 5 minutes, if it is not confirmed by the commit command.

rtr3-msk# commit confirmed 5

Rollback configuration and comparison.

To rollback the configuration, you can use the rollback functionality. Junos stores the last 49 changes.

rtr3-msk> show system commit 
0   2019-05-25 15:41:17 GMT-3 by root via cli commit synchronize
1   2019-05-25 15:36:45 GMT-3 by root via cli commit synchronize
2   2019-05-25 15:30:43 GMT-3 by root via cli commit synchronize
3   2019-05-25 14:23:45 GMT-3 by root via cli commit synchronize

You can roll back the configuration to any aviable point.

rtr3-msk# rollback 3
load complete

You can also compare any rollback point to other rollback point.
For example, to compare the current configuration and rollback 3:

rtr3-msk> show configuration | compare rollback 3   

To compare rollback 3 and rollback 5:

rtr3-msk> show system rollback compare 3 5

Notify of
0 комментариев
Inline Feedbacks
View all comments