[an error occurred while processing this directive][an error occurred while processing this directive]

Applying a JUNOS Configuration Group

To have a JUNOS configuration inherit the statements from a configuration group, include the apply-groups statement:

apply-groups [ group-names ];

If you specify more than one group name, list them in order of inheritance priority. The configuration data in the first group takes priority over the data in subsequent groups.

For routers that support multiple Routing Engines, you can specify re0 and re1 group names. The configuration specified in group re0 is only applied if the current Routing Engine is in slot 0; likewise, the configuration specified in group re1 is only applied if the current Routing Engine is in slot 1. Therefore, both Routing Engines can use the same configuration file, each using only the configuration statements that apply to it. Each re0 or re1 group contains at a minimum the configuration for the hostname and the management interface (fxp0). If each Routing Engine uses a different management interface, the group also should contain the configuration for the backup router and static routes.

You can include only one apply-groups statement at each specific level of the configuration hierarchy. The apply-groups statement at a specific hierarchy level lists the configuration groups to be added to the containing statement’s list of configuration groups.

Values specified at the specific hierarchy level override values inherited from the configuration group.

Groups listed in nested apply-groups statements take priority over groups in outer statements. In the following example, the BGP neighbor 10.0.0.1 inherits configuration data from group one first, then from groups two and three. Configuration data in group one overrides data in any other group. Data from group ten is used only if a statement is not contained in any other group.

apply-groups [ eight nine ten ];protocols {apply-groups seven;bgp {apply-groups [ five six ];group some-bgp-group {apply-groups four;neighbor 10.0.0.1 {apply-groups [ one two three ];}}}}

Published: 2010-04-27

[an error occurred while processing this directive]