Similar to Cisco routers, Juniper routers are also used to perform the routing functions on networks. Before you should start to learn the routing and switching configuration through the Juniper routers, first, you need to be familiar with basic Juniper Router Configuration commands. Here, we are going to explain the step by step Juniper Router Configuration guide.
We hope you have already added Juniper Router in GNS3 and created a topology. If not yet, visit the following link to add Juniper Router in GNS3.
This article will help to understand the most Basic Juniper Router Configuration commands for the beginners who are new to juniper devices.
Juniper Router CLI Commands Modes
Similar to Cisco IOS CLI modes, JunOS also has different command modes to perform different types of configuration tasks. The major JunOS CLI command modes are:
- Operational mode: You can compare this mode to the Privileged mode of Cisco IOS. It is used to display the current status of the Juniper device. In this mode, the JunOS commands are used to monitor and troubleshoot the Juniper devices and their network connectivity.
- Configuration mode: The configuration mode of Juniper router is almost similar to the Global Configuration mode of Cisco IOS. You use this mode to define all the properties of the Juniper devices. It includes interfaces configuration, general routing information configuration, routing protocols configuration, user access configuration, and various other system and hardware properties configurations.
Basic Juniper Router Configuration Command and Tasks
The following are some of the basic Juniper router configuration tasks that every network administrator should know:
How To Login to Juniper Router
Working with JunOS is almost similar to working with the CLI interface of Linux/UNIX-based operating systems. To login into JunOS Command mode, simply type username and password. The default login credentials for JunOS Olive are: username as root and password is blank.
Login: root password:
Note: If you face to login into JunOS Olive, please visit the Juniper.net official Website.
How To enter JunOS CLI Mode
Once you logged into JunOS CLI mode, type CLI and press Enter to switch into CLI mode.
[email protected]% cli root>
How To Switch into JunOS Configuration Mode
As discussed earlier, configuration mode allows you to configure most of the basic JunOS configuration tasks. In order to switch to JunOS configuration mode, type the configure command and press Enter.
root> configure  root#
To exit from the current mode, use the exit command.
How To Check the Current Configurations of a Juniper Router
To check the current configuration settings on a Juniper Router, execute the following command at the Operational CLI mode.
root> show configuration
Viewing configurations commands starting with the specific group of commands use the following command syntax. For example, to show all the command of Operation CLI mode starting with “set” prefix, execute the following command.
root> show configuration | display set
How To View the Interface Information on a Juniper Router
To show all the available interfaces on a Juniper Router you are using, use the following command.
root# show interfaces
How To View the Status of a Specific Interface on a Juniper Router
To view the status of a specific interface information on Juniper Router running on JunOS, use the following command syntax.
root# show interfaces <interface name>
For example, to view the interface configuration information of emo interface, use the following command.
Root> show interfaces em0
How To Set IPv4 address on a Juniper Router
To configure an appropriate IPv4 address on a Juniper Router, use the following command syntax.
root# set interfaces <interface name> unit <unit number> family inet <IP address>/mask
For example, use the following command to set 184.108.40.206/24 IPv4 address 220.127.116.11 on the em0 interface.
root# set interfaces em0 unit 0 family inet 18.104.22.168/24
How To Change the Hostname of a Juniper Router
Use the following JunOS CLI command syntax to set the desired hostname for a Juniper Router.
root# set system host-name <type-name>
For example, to change the current hostname to JunOSR1 hostname, use the following command.
root# set system host-name JunOSR1
How To Set Password on a Juniper Router
To set the desired root password for your Juniper Router, execute the following JunOS CLI command.
root# set system root-authentication plain-text-password New password: [email protected] Retype new Password: [email protected]
Note: Password will not be displayed.
How To Save JunOS Configuration Permanently
Whatever you do on a Juniper or Cisco router, the current configuration is stored on the temporary memory called RAM. However, if the power supply fails, your configuration will be lost. So, it is important to save your configuration at the regular time intervals. On a Juniper router, the commit command is used to save the current configuration as permanently. Refer the following figure.
How To View Routing Table (Routes) on a Juniper Router
The following command is used to view the all the routes on a Juniper Router running on the JunOS.
root> show route
How To Configure Static Route on a Juniper Router
Configuring the static route on a Juniper Router is pretty simple. For example, to add 22.214.171.124/24 route with 126.96.36.199 as the default gateway, use the following JunOS CLI command.
root# set routing-options static route <Network/Prefix Length> next-hop <Gateway Address>
root# set routing-options static route 188.8.131.52/24 next-hop 184.108.40.206
Login To and Logout From JunOS CLI Interface
Take a look at the following figure to understand the command used in the given output.
In this article, we have explained the Basic Juniper Router Configuration Commands used to configure basic tasks for a Juniper Router. Don’t hesitate to share this nice article to your friends.