Step 2: Use the Groups Configuration
Action
Apply a single configuration file to both Routing Engines using the
groupsgroup-namestatement at the [edit] hierarchy level:[edit]user@host# set groupsgroup-nameWhere
group-nameis the name of the configuration group. To configure multiple groups, specify more than one group-name. On routers that support multiple Routing Engines, you can also specify two special group names:
re0—Configuration statements that are applied to the Routing Engine in slot 0.re1—Configuration statements that are applied to the Routing Engine in slot 1.The configuration specified in group
re0is only applied if the current Routing Engine is in slot 0; likewise, the configuration specified in groupre1is 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. Eachre0orre1group 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.To view the existing
groupsconfiguration, use the following CLI command in configuration mode:[edit]user@host# groupsuser@host# showSample Output
[edit groups]user@host# showre0 {system {host-name foo-re0;}interfaces {fxp0 {unit 0 {family inet {address 10.0.0.1/24;}}}}}re1 {system {host-name foo-re1;}interfaces {fxp0 {unit 0 {family inet {address 10.0.0.2/24;}}}}}What it Means
Use the already-existing
groupsstatement, and usere0andre1as keyword group names. Each Routing Engine applies the slot-specific group configuration information to its configurations.In the main configuration body, add the rest of the configuration that will be the same on both Routing Engines. Do not include the configuration statements that you made in the group configurations (such as configurations for
fxp0). If you configure items in the body of the statement that also exist in thegroupsstatement, the configuration in the body takes precedence—the configuration from thegroupstatement will not be inherited.Action
Display the groups that were applied using the following configuration mode CLI command:
[edit]user@host# show apply-groupsSample Output
user@host# show apply-groupsapply-groups [ re0 re1 ];