Juniper

Configuring Juniper Junos OS for the first time

Configuring Juniper Junos OS for the first time
In: Juniper

In this blog post, we will explore Juniper Junos initial configurations. The following example is based on Juniper vSRX running Junos 21.3R1.9.

Model: vSRX
Junos: 21.3R1.9

Getting Started

This is a virtual vSRX unit so, there is no console port. If you have a physical appliance, please connect your laptop to the console port to get started.

First-time login

Booting from Junos volume ...
Verified /boot/manifest signed by PackageProductionECP256_2021
Verified /boot/loader.rc

**************************
       TRUNCATED
**************************

nic_uio3: Bar 4 @ febf4000, size 4000
nic_uio4: Allocate 3 MSI-X
nic_uio4: Bar 1 @ febc5000, size 1000

FreeBSD/amd64 (Amnesiac) (ttyu0)

login: 
💡
Initially, the root user account requires no password. Please use root as the username and no password. 
login: root

--- JUNOS 21.3R1.9 Kernel 64-bit XEN JNPR-12.1-20210828.6e5b1bf_buil
root@:~ # 

Once you logged in, start the Junos OS CLI by typing cli

root@:~ # cli
root> 

Configure root-password

The next step is to configure the root-password as shown below.

root> configure 
Entering configuration mode
[edit]
root# set system root-authentication plain-text-password 
New password:
Retype new password:

Configure hostname and domain name

[edit]
root# set system host-name srx_branch_02
root# set system domain-name packet.lan 

Management IP

The Junos management interface provides a separate out-of-band management network for the device.

[edit]
root# set interfaces fxp0 unit 0 family inet address 10.10.50.16/16
💡
Please note that if your device uses em0 interface for management then replace fxp0 with emo

Summary

Let's look at the changes we've made and commit if all looks good.

root# show | compare  
[edit system]
+  host-name srx_branch_02;
+  root-authentication {
+      encrypted-password "$6$vbMCkv58$.hoAjcSyOvn.3qT0ardbMBhqcTRXnKGgLambzUeVl7748ItC9UPpO6VGFumn1sUaCbqNn6Y0PYWVAp..ph9Zr."; ## SECRET-DATA
+  }
+  domain-name packet.lan;
[edit interfaces fxp0 unit 0]
+     family inet {
+         address 10.10.50.16/16;
+     }
[edit]
root# commit 
commit complete

SSH Access

If you need SSH access, please make sure to enable SSH services.

set system services ssh 

User accounts

I prefer to create a new admin user to make subsequent changes instead of using the root user. Let's create a new user account as a super-user.

[edit]
root@srx_branch_02# set system login user admin class super-user authentication plain-text-password                 
New password:
Retype new password:
[edit]
root@srx_branch_02# commit 
commit complete

Closing thoughts

That's all the config you need to get started with your new Junos device.

If you have any thoughts or questions about the topic, please feel free to leave a comment or send me a message. I would love to continue the discussion and hear your perspective. Again, thank you for taking the time to read my post and for supporting my writing.

Reference

https://www.juniper.net/documentation/us/en/software/junos/junos-overview/topics/task/routing-engine-single-initial-configuration.html

Written by
Suresh Vina
Tech enthusiast sharing Networking, Cloud & Automation insights. Join me in a welcoming space to learn & grow with simplicity and practicality.
Comments
More from Packetswitch
Table of Contents
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Packetswitch.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.