O'Reilly logo

Junos Security by James Quinn, Timothy Eberhard, Patricio Giecco, Brad Woodberg, Rob Cameron

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Commit Model

Junos offers a flexible model for you to decide when a new configuration should be active, and it’s called the commit model. The concept comes from revision control systems which are used for software version control, whereby you edit the configuration (as shown previously) and then, once the configuration is complete, you commit it to the system. Upon commit, several things happen.

First, the configuration is validated by using a commit check. A commit check reviews the configuration for any syntax errors or disallowed statements. It’s a sanity check to ensure that a bad configuration is not installed. It’s also possible to issue a commit check manually by using the commit check command. If an error is encountered, Junos responds and specifies where the error occurs and what the error is.

[edit]
root@SRX210-A# set interfaces fe-2/0/3.0 family inet filter input bad-filter

[edit]
root@SRX210-A# commit
[edit interfaces fe-2/0/3 unit 0 family inet]
  'filter'
    Referenced filter 'bad-filter' is not defined
error: configuration check-out failed

[edit]
root@SRX210-A#

In the preceding output, a commit error is highlighted. The configuration was attempting to reference a firewall filter that did not exist and the commit check provided an error which prevented the configuration from being installed. The hierarchy in which the error occurred was returned to the user, [edit interfaces fe-2/0/3 unit 0 family inet], so it is easy to track down from where the error was issued. In some ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required