Related Documentation
- EX, M, MX, PTX, T Series
- Configuring Basic Router or Switch Properties
- M, MX, PTX, T Series
- Configuring the Junos OS for the First Time on a Router or Switch with a Single Routing Engine
- Initial Router or Switch Configuration Using the Junos OS
- Default Directories for Junos OS File Storage on the Router or Switch
- Configuring Automatic Mirroring of the CompactFlash Card on the Hard Disk Drive
- M, MX, PTX, QFX, T Series
- Format for Specifying IP Addresses, Network Masks, and Prefixes in Junos OS Configuration Statements
Configuring the Junos OS the First Time on a Router with Dual Routing Engines
If a router 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 reproduce the configuration group information in the main part of the configuration.
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 with the exception of 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.
![]() | Note: For T640 routers with a Routing Engine supporting 32-bit Junos OS, the management interface is fxp0. For T640 routers with a Routing Engine supporting 64-bit Junos OS, it is em0. |
To initially configure a router with dual Routing Engines, follow these steps:
- Go to Configuring the Junos OS for the First Time on a Router or Switch with a Single Routing Engine and follow Step 1 through Step 5 to initially configure the backup Routing Engine.
- 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# set groups re0
- Navigate to the groups re0 level of the configuration
hierarchy.
[edit]root# edit groups re0
- Specify the router hostname.
[edit groups re0]root# set system host-name host-name
Note: The hostname specified in the router 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 the user is logged in to the CLI:
user-name@host-name>
Configure the IP address and prefix length for the router Ethernet interface.
- For all routers except the TX Matrix Plus router and T1600
routers in a routing matrix:[edit]root@# edit groups[edit groups]root@# set interfaces fxp0 unit 0 family inet address address/prefix-length
- For TX Matrix Plus and T1600 routers in a routing matrix
only:[edit]root@# edit groups[edit groups]root@# set interfaces em0 unit 0 family inet address address/prefix-length
To use em0 as an out-of-band management Ethernet interface, you must configure its logical port, em0.0, with a valid IP address.
- For a T1600 standalone router (not connected to a TX Matrix
Plus router and not in a routing matrix):[edit]root@# edit groups[edit groups]root@# set interfaces fxp0 unit 0 family inet address address/prefix-length
- For all routers except the TX Matrix Plus router and T1600
routers in a routing matrix:
- Set the loopback interface address for re0 configuration
group:[edit groups]root@# set re0 interfaces lo0 unit 0 family inet address address/prefix-length
- Return to the top level of the hierarchy.
[edit groups re0]root# top
- Create the configuration group re1.
[edit]root# set groups re1
- Navigate to the groups re1 level of the configuration
hierarchy.
[edit]root# edit groups re1
- Specify the router hostname.
[edit groups re1]root# set system host-name host-name
Configure the IP address and prefix length for the router Ethernet interface.
- For all routers except the TX Matrix Plus router and T1600
routers in a routing matrix:[edit]root@# edit groups[edit groups]root@# set interfaces fxp0 unit 0 family inet address address/prefix-length
- For TX Matrix Plus and T1600 routers in a routing matrix
only:[edit]root@# edit groups[edit groups]root@# set interfaces em0 unit 0 family inet address address/prefix-length
To use em0 as an out-of-band management Ethernet interface, you must configure its logical port, em0.0, with a valid IP address.
- For a T1600 standalone router (not connected to a TX Matrix
Plus router and not in a routing matrix):[edit]root@# edit groups[edit groups]root@# set interfaces fxp0 unit 0 family inet address address/prefix-length
- For all routers except the TX Matrix Plus router and T1600
routers in a routing matrix:
- Set the loopback interface address for re1 configuration
group:[edit groups]root@# set re1 interfaces lo0 unit 0 family inet address address/prefix-length
- Return to the top level of the hierarchy.
[edit groups re0]root# top
- Configure the apply-groups statement to reproduce
the configuration group information to the main part of the configuration
and to specify the group application order.[edit]root# set apply-groups [ re0 re1 ]
- Configure Routing Engine redundancy:[edit]root@# set chassis redundancy routing-engine 0 masterroot@# set chassis redundancy routing-engine 1 backuproot@# set chassis redundancy routing-engine graceful-switchover
- Save the configuration change on both Routing Engines:[edit]user@host> commit synchronizeroot@#
After the configuration changes are saved, complete the management console configuration.
- Configure the IP address of the DNS server.
[edit ]root# set system name-server address
- Configure the router domain name:
[edit ]root# set system domain-name domain-name
- Configure the IP address of a backup
or default router. This device is called the backup router, because
it is used only while the routing protocol process is not running.
Choose a router that is directly connected to the local router by
way of the management interface. The router uses this backup router
only when it is booting and only or when the Junos routing software
(the routing protocol process, rpd) is not running.
For routers with two Routing Engines, the backup Routing Engine, RE1, uses the backup router as a default gateway after the router boots. This enables you to access the backup Routing Engine. (RE0 is the default master Routing Engine.)
Note: The backup router Routing Engine does not support more than 16 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@# set system backup-router address - Set the root password, entering either a clear-text password
that the system will encrypt, a password that is already encrypted,
or an SSH public key string.
Choose one of the following:
- To enter a clear-text password, use the following command:[edit]root@# set system root-authentication plain-text-passwordNew password: type passwordRetype new password: retype password
- To enter a password that is already encrypted, use the
following command:[edit]root@# set system root-authentication encrypted-password encrypted-password
- To enter an SSH public key, use the following command:[edit]root@# set system root-authentication ssh-rsa key
- To enter a clear-text password, use the following command:
- Optionally, display the configuration
statements:[edit]root@ showsystem {host-name hostname;domain-name domain.name;backup-router address;root-authentication {(encrypted-password "password" | public-key);ssh-rsa "public-key";ssh-dsa "public-key";}name-server {address;}interfaces {fxp0 {unit 0 {family inet {address address ;}}}}}
On a TX Matrix Plus router, the management Ethernet interface is em0 and not fxp0. Therefore, when you issue the show command in the configuration mode, the configuration statements would be:
[edit]root@ showsystem {host-name hostname;domain-name domain.name;backup-router address;root-authentication {(encrypted-password "password" | public-key);ssh-rsa "public-key";ssh-dsa "public-key";}name-server {address;}interfaces {em0 {unit 0 {family inet {address address ;}}}}} - After you have installed the new software and are satisfied
that it is successfully running, issue the request system snapshot command to back up the new software on both master 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 router’s CompactFlash card, and the /altroot and /altconfig file systems are on the router’s hard disk.
Note: After you issue the request system snapshot command, you cannot return to the previous version of the software, because the running copy and backup copy of the software are identical.
For more information about creating configuration groups, see Junos OS CLI User Guide .
For more information about the initial configuration for redundant Routing Engine systems and the re0 group, see Junos OS High Availability Configuration Guide .
Related Documentation
- EX, M, MX, PTX, T Series
- Configuring Basic Router or Switch Properties
- M, MX, PTX, T Series
- Configuring the Junos OS for the First Time on a Router or Switch with a Single Routing Engine
- Initial Router or Switch Configuration Using the Junos OS
- Default Directories for Junos OS File Storage on the Router or Switch
- Configuring Automatic Mirroring of the CompactFlash Card on the Hard Disk Drive
- M, MX, PTX, QFX, T Series
- Format for Specifying IP Addresses, Network Masks, and Prefixes in Junos OS Configuration Statements
Published: 2012-07-03
Related Documentation
- EX, M, MX, PTX, T Series
- Configuring Basic Router or Switch Properties
- M, MX, PTX, T Series
- Configuring the Junos OS for the First Time on a Router or Switch with a Single Routing Engine
- Initial Router or Switch Configuration Using the Junos OS
- Default Directories for Junos OS File Storage on the Router or Switch
- Configuring Automatic Mirroring of the CompactFlash Card on the Hard Disk Drive
- M, MX, PTX, QFX, T Series
- Format for Specifying IP Addresses, Network Masks, and Prefixes in Junos OS Configuration Statements