Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Using Configuration Groups and Inheritance in a Routing Matrix with a TX Matrix Plus Router

To simplify configuration of individual Routing Engines in a routing matrix with a TX Matrix Plus router, you can create a configuration group for each Routing Engine in the routing matrix:

Overview of Configuration Groups and Inheritance in a Routing Matrix

The configuration groups feature in the Junos OS enables you to create a group containing configuration statements and to direct the inheritance of that group’s statements in the rest of the configuration. The same group can be applied to different sections of the configuration, and different sections of one group’s configuration statements can be inherited in different places in the configuration.

Configuration groups enable you to create smaller, more logically constructed configuration files, making it easier to configure and maintain the Junos OS. For example, you can group statements that are repeated in many places in the configuration, such as when configuring interfaces, and thereby limit updates to just the group.

Configuration groups use true inheritance, which involves a dynamic, ongoing relationship between the source of the configuration data and the target of that data. Data values changed in the configuration group are automatically inherited by the target. The target need not contain the inherited information, although the inherited values can be overridden in the target without affecting the source from which they were inherited.

This inheritance model allows you to see only the instance-specific information without seeing the inherited details. A command pipe in configuration mode allows you to display the inherited data.

Creating Configuration Groups in a Routing Matrix

For areas of your configuration to inherit configuration statements, you must first put the statements into a configuration group and then apply that group to the levels in the configuration hierarchy that require the statements.

To create configuration groups in a routing matrix with a TX Matrix Plus router, you can include the groups statement at the [edit] hierarchy level on the TX Matrix Plus router:

[edit]
groups {group-name {...configuration-data...}}

The group-name statement specifies the name of a configuration group. You can configure more than one configuration group by specifying multiple group-name statements at the [edit groups] hierarchy level.

You cannot use the prefix junos- in a group name because it is reserved for use by the Junos OS. One reason for the naming restriction is a configuration group called junos-defaults. This preset configuration group is applied to the configuration automatically. You cannot modify or remove the junos-defaults configuration group. For more information about the Junos default configuration group, see “Using Junos OS Defaults Groups” in the CLI User Guide.

Similarly, the configuration group juniper-ais is reserved exclusively for Juniper Advanced Insight Solutions (AIS)-related configuration. For more information about the juniper-ais configuration group, see the Juniper Networks Advanced Insight Solutions Guide.

Applying a Configuration Group in a Routing Matrix

To have a configuration inherit the statements in a configuration group, include the apply-groups statement on the TX Matrix Plus router:

apply-groups [ group-names ];

Include the apply-groups [ group-names ] statement anywhere in the configuration that the configuration statements contained in a configuration group are needed.

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

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 ];}}}}

Displaying Inherited Statements

Configuration groups can add some confusion regarding the actual values used by the router, because configuration data can be inherited from configuration groups. To view the actual values used by the router, use the display inheritance command after the pipe in a show command. This command displays the inherited statements at the level at which they are inherited and the group from which they have been inherited.

The following example shows part of the output of the show | display inheritance command that shows configuration statements inherited from the special configuration group re0, which contains configuration statements that apply to the Routing Engine in slot 0 (labeled RE0) on the TX Matrix Plus router:

[edit]user@host# show | display inheritance...
system {## 'sfc0' was inherited from group 're0'host-name sfc0;## 'backup-router' was inherited from group 're0'backup-router 192.168.35.254;}
interfaces {## 'em0' was inherited from group 're0'em0 {## '0' was inherited from group 're0'unit 0 {## 'inet' was inherited from group 're0'family inet {## '192.168.35.95/24' was inherited from group 're0'address 192.168.35.95/24;}}}}
...

Disabling Inheritance of a Configuration Group in the Routing Matrix

To disable inheritance of a configuration group at any level except the top level of the hierarchy, include the apply-groups-except statement:

apply-groups-except [ group-names ];

This statement is useful when you use the apply-group statement at a specific hierarchy level but also want to override the values inherited from the configuration group for a specific parameter.

Using Special Configuration Groups for the Routing Engines in the Routing Matrix

Using special configuration group names for all Routing Engines in the routing matrix allows you to configure the individual Routing Engines in each router differently. Parameters that are not configured at the [edit groups] hierarchy level apply to all Routing Engines in the routing matrix.

To configure configuration groups and apply inheritance for the Routing Engines in a routing matrix, you can include the groups statement at the [edit] hierarchy level on the TX Matrix Plus router and then include special configuration group names for all the Routing Engines in the routing matrix:

[edit]
groups {re0 { # Create the group for the SFC master Routing Engine.system {host-name sfc0-re0-hostname;backup-router ip-address;...}interfaces {em0 {unit logical-unit-number {...}}}re1 { # Create the group for the SFC backup Routing Engine.system {host-name sfc0-re1-hostname;backup-router ip-address;...}interfaces {em0 {unit logical-unit-number {...}}}lccn-re0 { # Create the group for the master Routing Engine in a specific LCC.system {host-name lccN-re0-hostname;backup-router ip-address;...}interfaces {em0 {unit logical-unit-number {...}}}lccn-re1 { # Create the group for the backup Routing Engine in a specific LCC.system {host-name lccN-re1-hostname;backup-router ip-address;...}interfaces {em0 {unit logical-unit-number {...}}}...additional-routing-engine-group-configurations...}
apply-groups [ re0 re1 lccn-re0 lccn-re1 ... ]; # Enable inheritance of the groups. 

For routers in a routing matrix with a TX Matrix Plus router, you can specify the following special group names:

  • re0—Configuration statements apply to the Routing Engine in slot 0 (labeled RE0) on the TX Matrix Plus router.
  • re1—Configuration statements apply to the Routing Engine in slot 1 (labeled RE1) on the TX Matrix Plus router.
  • lccn-re0—Configuration statements apply to the Routing Engine in slot 0 (labeled RE0) on the router identified as lccn, where n is the LCC number and has the following values depending on the LCC configuration:.
    • From 0 through 3 on a T1600 router in a routing matrix with a TX Matrix Plus router.
    • From 0 through 7 on a T1600 router in a routing matrix with a TX Matrix Plus router with 3D SIBs.
    • 0, 2, 4, or 6 on a T4000 router in a routing matrix with a TX Matrix Plus router with 3D SIBs.
  • lccn-re1—Configuration statements applied to the Routing Engine in slot 1 (labeled RE1) on the router identified lccn, where n is the LCC number and has the following values depending on the LCC configuration:
    • From 0 through 3 on a T1600 router in a routing matrix with a TX Matirx Plus router.
    • From 0 through 7 on a T1600 router in a routing matrix with a TX Matrix Plus router with 3D SIBs.
    • 0, 2, 4, 6 on a T4000 router in a routing matrix with a TX Matrix Plus router with 3D SIBs.

Because the configuration statements in the special configuration groups for Routing Engines apply to specific Routing Engines in the routing matrix, you can create a single configuration for all of the routers, with each Routing Engine using only the configuration statements that apply to it.

Each Routing Engine configuration group contains at a minimum the configuration for the Routing Engine hostname and the management Ethernet interface (em0). In addition, if each Routing Engine uses a different management interface, the group also should contain the configuration for the backup router and static routes.

Note that apply groups can be nested. For example, any configuration statements that are common to lcc0-re0 and lcc0-re1 can be included in a separate configuration group and then added as an apply group to the lcc0-re0 and lcc0-re1 groups, which in turn are applied to the main configuration.

For more information about configuring and applying configuration groups, see the CLI User Guide.

Published: 2013-03-13