Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Use the Groups Configuration

    Apply a single configuration file to both Routing Engines using the groups group-name statement at the [edit] hierarchy level:

    [edit]user@host# set groups group-name

    Where group-name is 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 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.

    To view the existing groups configuration, use the following command in configuration mode:

    [edit]user@host# groups user@host# show
    [edit groups]
    user@host#  show
    re0 {
        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;
                    }
                }
            }
        }
    }
    

    Use the already-existing groups statement, and use re0 and re1 as 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 the groups statement, the configuration in the body takes precedence—the configuration from the group statement will not be inherited.

    [edit]user@host# show apply-groups
    user@host# show apply-groups
    apply-groups [ re0 re1 ];
    

    Published: 2012-08-20