Ivy Consultants Inc.

Consulting Services for Security, Networking, Wi-Fi and Windows Server

If a device has dual Routing Engines, you can create configuration groups and use the same configuration for both Routing Engines. This ensures that the configuration will not change during a failover scenario because of the identical configuration shared between the Routing Engines.

Configure the hostnames and addresses of the two Routing Engines using configuration groups at the [edit groups] hierarchy level. Use the reserved configuration group re0 for the Routing Engine in slot 0 and re1 for the Routing Engine in slot 1 to define Routing Engine-specific parameters. Configuring re0 and re1 groups enables both Routing Engines to use the same configuration file.

Use the apply-groups statement to apply the apply the configuration to the device.

The commit synchronize command commits the same configuration on both Routing Engines. The command makes the active or applied configuration the same for both Routing Engines except for the groups, re0 being applied to only RE0 and re1 being applied only to RE1. If you do not synchronize the configurations between two Routing Engines and one of them fails, the router may not forward traffic correctly, because the backup Routing Engine may have a different configuration.

To initially configure a device with dual Routing Engines that have no base configuration, follow these steps:

  1. If you have not already done so, refer to my post “Basic first Junos Configuration (Single Routing Engine)” and follow the steps to initially configure the backup Routing Engine.
  2. Create the configuration group re0. The re0 group is a special group designator that is only used by RE0 in a redundant routing platform.

[edit]

root@host# set groups re0

  1. Navigate to the groups re0 level of the configuration hierarchy.

[edit]

root@host# edit groups re0

  1. Specify the device hostname.

[edit groups re0]

root@host# set system host-name host-name

NOTE: The hostname specified in the device configuration is not used by the DNS server to resolve to the correct IP address. This hostname is used to display the name of the Routing Engine in the CLI. For example, the hostname appears at the command-line prompt when you are logged in to the CLI:

user-name@host-name>

NOTE: Before you begin the next step, see Supported Routing Engines by Router to find the management Ethernet interface that you should use to perform this configuration.

  1. Configure the IP address and prefix length for the device management Ethernet interface. The management Ethernet interface provides a separate out-of-band management network for the device.
    • For devices using the management Ethernet interface fxp0:

[edit groups]

root@host# set interfaces fxp0 unit 0 family inet address address/prefix-length

  1. For devices that use the management Ethernet interface em0:

[edit groups]

root@host# set interfaces em0 unit 0 family inet address address/prefix-length

  1. Set the loopback interface address for the re0 configuration group:

[edit groups]

root@host# set re0 interfaces lo0 unit 0 family inet address address/prefix-length

  1. Return to the top level of the hierarchy.

[edit groups re0]

root@host# top

The next steps repeat for re1 the same steps as were done for the re0 configuration group.

  1. Create the configuration group re1.

[edit]

root@host# set groups re1

  1. Navigate to the groups re1 level of the configuration hierarchy.

[edit]

root@host# edit groups re1

  1. Specify the device hostname.

[edit groups re1]

root@host# set system host-name host-name

NOTE: 

Before you begin the next step, see Supported Routing Engines by Router to find the management Ethernet interface that you should use to perform this configuration.

  1. Configure the IP address and prefix length for the device management Ethernet interface.
    • For devices that use the management Ethernet interface fxp0:

[edit groups]

root@host# set interfaces fxp0 unit 0 family inet address address/prefix-length

  1. For devices that use the management Ethernet interface em0:

[edit groups]

root@host# set interfaces em0 unit 0 family inet address address/prefix-length

  1. Set the loopback interface address for re1 configuration group:

[edit groups]

root@host# set re1 interfaces lo0 unit 0 family inet address address/prefix-length

  1. Once both configuration groups have been set up, return to the top level of the hierarchy.

[edit groups re0]

root@host# top

  1. Use the apply-groups statement to apply the configuration to the device.

[edit]

root@host# set apply-groups [ re0 re1 ]

  1. Configure Routing Engine redundancy:

[edit]

root@host# set chassis redundancy routing-engine 0 master

root@host# set chassis redundancy routing-engine 1 backup

  1. Save the configuration change on both Routing Engines:

[edit]

user@host> commit synchronize

After the configuration changes are saved, complete the management console configuration.

  1. Set the root password by choosing one of the following:
    • To enter a clear-text password, use the following command:

[edit]

root@host# set system root-authentication plain-text-password

New password: type password

Retype new password: retype password

  1. To enter a password that is already encrypted, use the following command:

[edit]

root@host# set system root-authentication encrypted-password encrypted-password

  1. To enter an SSH public key, use the following command:

[edit]

root@host# set system root-authentication ssh-rsa key

  1. Configure the IP address of the DNS server.

[edit ]

root@host# set system name-server address

  1. Configure the router domain name:

[edit ]

root@host# set system domain-name domain-name

  1. Configure the IP address of a backup or default network device. A backup device is used only while the routing protocol process is not running. Choose a backup device that is directly connected to the local device by way of the management interface. The device uses this backup only when it is booting and or when the Junos routing software (the routing protocol process, rpd) is not running. For devices with two Routing Engines, the backup Routing Engine, RE1, uses the backup as a default gateway after the device boots. This enables you to access the backup Routing Engine. (RE0 is the default primary Routing Engine.)

NOTE: The backup router Routing Engine does not support more than 16 backup destinations. If you configure more than 16 destinations on the backup Routing Engine, the Junos OS ignores any destination addresses after the sixteenth address and displays a commit-time warning message to this effect.

[edit]

root@host# set system backup-router address

  1. Optionally, display the configuration statements:

[edit]

root@ show

system {

    host-name hostname;

    domain-name domain.name;

    backup-router address;

    root-authentication {

        (encrypted-password “password” | public-key);

        ssh-dsa “public-key“;

        ssh-ecdsa “public-key“;

        ssh-rsa “public-key“;

    }

    name-server {

        address;

    }

    interfaces {

        fxp0 {

            unit 0 {

                family inet {

                    address address ;

                }

            }

        }

    }

}

Show more 

On devices that use management Ethernet interface em0, you will see em0 in place of fxp0 in the show command output.

  1. After you are satisfied that the configuration is successfully running, issue the request system snapshot command to back up the new configuration on both primary and backup Routing Engines.

{master}

user@host> request system snapshot

The root file system is backed up to /altroot, and /config is backed up to /altconfig. The root and /config file systems are on the device’s CompactFlash card, and the /altroot and /altconfig file systems are on the device’s hard drive.

NOTE: After you issue the request system snapshot command, you cannot return to the previous configuration, because the running copy and backup copy are identical.