Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configure Junos OS on the MX301

This topic guides you through the initial configuration of your MX301 by using the Junos OS CLI.

The MX301 Router is shipped with the Junos OS preinstalled and ready to be configured when the router is powered on. Two Serial Peripheral Interface (SPI) flash memories store the boot image to provide redundancy. If the primary flash memory fails, the Junos OS boots from the secondary SPI flash memory.

A USB storage device can be inserted into the USB slot in the front panel of the chassis. The router also has two M.2-based solid-state drives (SSDs) that act as the primary boot devices (nvme0n1 and nvme1n1). When the router boots, it first attempts to load the Junos OS image from the USB flash memory drive if it detects this drive. If the attempt fails because the USB flash drive is missing or for some other reason, the router tries the primary boot device and then the secondary boot device.

You can use the Junos OS command line interface (CLI) to perform the initial configuration.

Access the CLI on the MX301

To access the CLI on your device:
  1. Verify that the router is powered on.
  2. Connect the management device to the serial console port as described in Connect the MX301 to External Devices.
  3. Start your asynchronous terminal emulation application (such as Microsoft Windows HyperTerminal) and select the appropriate COM port to use (for example, COM1).
  4. Configure the serial port settings with the following values:
    • Baud rate—9600

    • Parity—N

    • Data bits—8

    • Stop bits—1

    • Flow control—none

  5. Power on the device. You can start performing initial software configuration on the device after the device is up.
    Note:

    After you complete the initial configuration, you can connect your device to a network for out-of-band management as described in Connect the MX301 to External Devices.

Configure Root Authentication and Management Interface from the CLI

The MX301 Router ships with factory-default settings that enable zero-touch provisioning (ZTP). These settings load as soon as you power on the switch. In this case, as we configure the router manually, we disable ZTP during the initial configuration.

When you don't use ZTP, you must perform the initial configuration of an MX301 router through the console port (CONSOLE) using the Junos OS command-line interface (CLI).

Gather the following information before configuring the device:

  • Router's host and domain name

  • IP address and subnet mask for the management and loopback interfaces

  • IP address of a default gateway for the management network

  • IP address of a DNS server

  • Root user's password

To configure root authentication and the management interface:

Note:

This procedure connects the router to the network but does not enable it to forward traffic. For complete information about enabling the router to forward traffic, including examples, see the Junos OS configuration guides.

  1. Start the CLI.
  2. Enter configuration mode.
  3. Set the root authentication password by entering either a plain text password, an encrypted password, or an SSH public key string (ECDSA, ED25519, or RSA).

    or

    or

  4. Remove factory default configuration statements that relate to ZTP. After you commit these initial changes, the ZTP process is stopped and the related console messages are no longer displayed.
  5. Configure the IP address and prefix length for the router’s management Ethernet interface (fxp0). You also configure an IPv4 address on the loopback interface in this step. Having a routable IP address on the loopback interface is a best practice and is generally needed later, when you configure routing protocols.
  6. Perform an initial commit to activate the modified configuration.
  7. Configure the router's host name. If the name includes spaces, enclose the name in quotation marks (“ ”).
  8. Configure the router’s domain name.
  9. Configure the IP address of a DNS server.
  10. Configure one or more static routes to remote subnets that have access to the management subnet. Without static routing, access to the management port is limited to devices attached to the management subnet. For more information about static routes, see Configure Static Routes.

    In our example, we define a single default static route to provide management network reachability to all possible remote destinations.

  11. Configure the IP address of a backup router. The backup router is used only while the routing protocol is not running. The primary use of the backup router is to provide routing capability for the management port on the backup Routing Engine. This is because the backup Routing-Engine does not run the routing protocol daemon (rpd).

    In most cases, the IP address of the backup router is the same as the next-hop IP address used for the management network's static routes. We configure a default route to provide the backup Routing Engine with reachability to all possible remote destinations.

  12. Configure remote access for the root user over SSH. By default the root user can log in only through the console port. The root-login allow statement permits remote login for the root user.
  13. (Optional) Verify if the configuration is correct.
  14. Commit the configuration to activate it on the router.
  15. When you've finished configuring the router, exit configuration mode.

    The initial configuration is now complete. At this point, you should be able to remotely access the device as the root user through SSH.