Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Deactivating and Reactivating Statements and Identifiers in a Junos Configuration

In a Junos configuration, you can deactivate statements and identifiers so that they do not take effect when you issue the commit command. Any deactivated statements and identifiers are marked with the inactive: tag. They remain in the configuration, but are not activated when you issue a commit command.

To deactivate a statement or identifier, use the deactivate configuration mode command:

user@host# deactivate (statement identifier )

To reactivate a statement or identifier, use the activate configuration mode command:

user@host# activate (statement identifier )

In both commands, the statement and identifier you specify must be at the current hierarchy level.

Note: In Junos OS Release 10.3 and later, you can only deactivate identifiers or complete one-liner statements. You cannot deactivate just parts of a one-liner, such as only child or leaf statements. For example, in the following configuration:

[edit forwarding-options]dhcp-relay {dynamic-profile dynamic-profile-name aggregate-clients;}

You can deactivate the complete one-liner dynamic profile dynamic-profile-name aggregate-clients. However, you cannot deactivate only the aggregate-clients statement from the one-liner statement.

In some portions of the configuration hierarchy, you can include a disable statement to disable functionality. One example is disabling an interface by including the disable statement at the [edit interface interface-name] hierarchy level. When you deactivate a statement, that specific object or property is completely ignored and is not applied at all when you issue a commit command. When you disable a functionality, it is activated when you issue a commit command but is treated as though it is down or administratively disabled.

Published: 2012-11-27