Juniper Basic Config
Juniper Basic Config
Juniper Basic Config
help topic
help reference
lab@srxA-1> configure
Entering configuration mode
[edit]
lab@srxA-1# load factory-default
warning: activating factory configuration
Define the system’s hostname. Use the hostname specified on the management
network diagram provided by your instructor.
[edit]
root@srxA-1# set system host-name hostname
Configure the time zone and system time using the local time zone and current date
and time as input values.
[edit]
root@srxA-1# set system time-zone time-zone
[edit]
root@srxA-1# run set date date/time
Wed April 25 04:19:00 PDT 2012
Remove the DHCP, interface, security, protocols and vlan sections from the
factory-default configuration, as this is not necessary in this lab environment.
[edit]
root@srxA-1# delete system services dhcp
[edit]
root@srxA-1# delete interfaces
[edit]
root@srxA-1# delete security
[edit]
root@srxA-1# delete protocols
[edit]
root@srxA-1# delete vlans
[edit]
lab@srxA-1# edit interfaces
[edit interfaces]
lab@srxA-1# set ge-0/0/3 unit 0 family inet address address/30
[edit interfaces]
lab@srxA-1# set ge-0/0/2 unit 0 family inet address address/30
[edit interfaces]
lab@srxA-1# set ge-0/0/1 unit 0 family inet address address/30
[edit interfaces]
lab@srxA-1# set lo0 unit 0 family inet address address/32
[edit interfaces]
lab@srxA-1# commit and-quit
commit complete
Exiting configuration mode
lab@srxA-1
Navigate to [edit system login] and define a custom login class named
juniper with the following permissions:
• view
• view-configuration
• reset
[edit]
lab@srxA-1# edit system login
[edit system login]
lab@srxA-1# set class juniper permissions [view view-configuration reset]
error: invalid value: ]
Next, define two new user accounts using the information from the following table:
[edit system login]
lab@srxA-1# set user walter class juniper
[edit system login]
lab@srxA-1# set user walter authentication plain-text-password
New password:
Retype new password:
[edit system login]
lab@srxA-1# set user nancy class read-only
[edit system login]
lab@srxA-1# set user nancy authentication plain-text-password
New password:
Retype new password:
Restart the routing process using the restart routing command. This
command restarts the routing protocol daemon (rpd), which can be useful when
troubleshooting routing problems.
walter@srxA-1> restart routing
Routing protocols process started, pid 9777
From the session opened to the lab user attempt to add the clear permission to
the default read-only login class. Issue the show command to view the system
login hierarchy.
[edit system login]
lab@srxA-1# set class read-only permissions clear
warning: 'read-only' is a predefined class name; changing to 'read-only-local'
From the session opened to the lab user and change the IP address of the RADIUS
server to 10.1.1.1. You can use the rename command for this change. Do not forget
to issue commit to activate the change.
[edit]
lab@srxA-1# rename system radius-server RADIUS server to 10.1.1.1
[edit]
lab@srxA-1# commit
commit complete
Configure the system to synchronize its clock with an NTP server. Refer to the
management network diagram for the server’s IP address.
[edit system syslog]
lab@srxA-1# top
[edit]
lab@srxA-1# set system ntp server server address
[edit]
lab@srxA-1# set system ntp boot-server server address
[edit]
lab@srxA-1# commit and-quit
commit complete
Manually force synchronization with the NTP server by issuing the set date ntp
operational mode command.
lab@srxA-1> set date ntp
22 Apr 19:04:24 ntpdate[3080]: step time server 10.210.14.130 offset -0.000025
sec
lab@srxA-1> configure
Entering configuration mode
[edit]
lab@srxA-1# set snmp community junos clients server address
[edit]
lab@srxA-1#
Configure an SNMP trap group to send traps to the NMS server. The SNMP trap
group should send traps whenever an interface transitions to a down state. Name
the trap group interfaces.
[edit]
lab@srxA-1# set snmp trap-group interfaces targets server address
[edit]
lab@srxA-1# set snmp trap-group interfaces categories link
To test your SNMP configuration, temporarily disable the ge-0/0/0 interface using
the set interfaces ge-0/0/0 disable command.
Perform an SNMP MIB walk with the Junos CLI using the show snmp mib walk
jnxOperatingDescr command. Note that the resolved object identifier (OID) of
jnxOperatingDescr is case sensitive. The OID is variable; we are simply using
this OID as an example.
lab@srxA-1> show snmp mib walk jnxOperatingDescr
jnxOperatingDescr.1.1.0.0 = midplane
jnxOperatingDescr.2.1.0.0 = PEM 0
jnxOperatingDescr.4.1.0.0 = SRX240 PowerSupply fan 1
jnxOperatingDescr.4.2.0.0 = SRX240 PowerSupply fan 2
jnxOperatingDescr.4.3.0.0 = SRX240 CPU fan 1
jnxOperatingDescr.4.4.0.0 = SRX240 CPU fan 2
jnxOperatingDescr.4.5.0.0 = SRX240 IO fan 1
jnxOperatingDescr.4.6.0.0 = SRX240 IO fan 2
jnxOperatingDescr.7.1.0.0 = FPC: FPC @ 0/*/*
jnxOperatingDescr.7.2.0.0 = FPC: FPC @ 1/*/*
jnxOperatingDescr.8.1.1.0 = PIC: 16x GE Base PIC @ 0/0/*
jnxOperatingDescr.8.2.1.0 = PIC: 1x Serial mPIM @ 1/0/*
jnxOperatingDescr.9.1.0.0 = Routing Engine
jnxOperatingDescr.9.1.1.0 = USB Hub
lab@srxA-1> configure
Entering configuration mode
[edit]
lab@srxA-1# edit system archival configuration
[edit system archival configuration]
lab@srxA-1# set archive-sites "ftp://192.168.101.1/archive" password ftp
[edit system archival configuration]
lab@srxA-1# set transfer-on-commit
[edit system archival configuration]
lab@srxA-1# commit and-quit
commit complete
Exiting configuration mode
Issue the show system processes extensive command to check the status
of the routing protocol daemon (rpd). Alternatively, issue the show system
processes extensive | match "pid | rpd"
Issue the show system storage command to view information regarding the
device storage space.
lab@srxA-1> show system storage
Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 898M 497M 330M 60% /
devfs 1.0K 1.0K 0B 100% /dev
devfs 1.0K 1.0K 0B 100% /dev/
/dev/md0 477M 477M 0B 100% /junos
/cf 898M 497M 330M 60% /junos/cf
devfs 1.0K 1.0K 0B 100% /junos/dev/
Issue the show system uptime command to view the current system time.
lab@srxA-1> show system uptime
Current time: 2012-04-20 08:01:50 PDT
System booted: 2012-04-18 10:24:42 PDT (1d 21:37 ago)
Protocols started: 2012-04-18 12:27:26 PDT (1d 19:34 ago)
Last configured: 2012-04-20 07:52:13 PDT (00:09:37 ago) by lab
8:01AM up 1 day, 21:37, 2 users, load averages: 0.07, 0.05, 0.03
Return to the original session logged in as lab and issue the show system users
command to view information about users logged in to your team’s device.
lab@srxA-1> show system users
12:41PM up 46 mins, 2 users, load averages: 0.03, 0.08, 0.12
USER TTY FROM LOGIN@ IDLE WHAT
lab u0 - 2:33PM - -cli (cli)
walter p0 10.210.14.129 3:07PM 1 -cli (cli)
Issue the request system logout user walter command to force a log
out for the user walter. Next, issue the show system users command to verify
that the user session for walter was terminated.
lab@srxA-1> request system logout user walter
logout-user: done
lab@srxA-1> show system users
12:46PM up 51 mins, 1 user, load averages: 0.06, 0.12, 0.12
USER TTY FROM LOGIN@ IDLE WHAT
lab u0 - 12:29PM - -cli (cli)
Check the environmental status of your team’s device by issuing the show
chassis environment command.
lab@srxA-1> show chassis environment
Class Item Status Measurement
Temp Routing Engine OK 37 degrees C / 98 degrees F
Routing Engine CPU OK 36 degrees C / 96 degrees F
Fans SRX240 PowerSupply fan 1 OK Spinning at high speed
SRX240 PowerSupply fan 2 OK Spinning at high speed
SRX240 CPU fan 1 OK Spinning at high speed
SRX240 CPU fan 2 OK Spinning at high speed
SRX240 IO fan 1 OK Spinning at high speed
SRX240 IO fan 2 OK Spinning at high speed
Power Power Supply 0 OK
View details about your system’s hardware components using the show chassis
hardware command.
lab@srxA-1> show chassis hardware
Hardware inventory:
Item Version Part number Serial number Description
Chassis AH2909AA0041 SRX240-poe
Routing Engine REV 31 750-021794 AAAK4071 RE-SRX240-POE
FPC 0 FPC
PIC 0 16x GE Base PIC
Power Supply 0
Issue the show interface terse command to quickly verify the administrative
and link state for your device’s interfaces.
lab@srxA-1> show interfaces terse
Interface Admin Link Proto Local Remote
ge-0/0/0 up up
ge-0/0/0.0 up up inet 10.210.14.131/27
Issue the show interfaces ge-0/0/0 extensive command and answer
the questions that follow:
lab@srxA-1> show interfaces ge-0/0/0 extensive
Physical interface: ge-0/0/0, Enabled, Physical link is Up
Interface index: 131, SNMP ifIndex: 117, Generation: 134
Description: MGMT Interface - DO NOT DELETE
Link-level type: Ethernet, MTU: 1514, Link-mode: Full-duplex, Speed: 1000mbps,
BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled,
Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled,
Remote fault: Online
Device flags : Present Running