
- •Contents
- •Course Overview
- •Course Agenda
- •Document Conventions
- •Additional Information
- •The Junos CLI (Detailed)
- •Overview
- •Part 1: Logging In and Exploring the CLI
- •Step 1.1
- •Step 1.2
- •Step 1.3
- •Step 1.4
- •Step 1.5
- •Step 1.6
- •Step 1.7
- •Step 1.8
- •Step 1.9
- •Step 1.10
- •Step 1.11
- •Step 1.12
- •Step 1.13
- •Step 1.14
- •Step 1.15
- •Step 1.16
- •Step 1.17
- •Step 1.18
- •Step 1.19
- •Initial System Configuration (Detailed)
- •Overview
- •Part 1: Loading a Factory-Default Configuration and Performing Initial Configuration
- •Step 1.1
- •Step 1.2
- •Step 1.3
- •Step 1.4
- •Step 1.5
- •Step 1.6
- •Step 1.7
- •Step 1.8
- •Step 1.9
- •Step 1.10
- •Step 1.11
- •Step 1.12
- •Step 1.13
- •Step 1.14
- •Step 1.15
- •Step 1.16
- •Part 2: Saving, Displaying, Loading, and Deleting a Rescue Configuration
- •Step 2.1
- •Step 2.2
- •Step 2.3
- •Step 2.4
- •Step 2.5
- •Step 2.6
- •Step 2.7
- •Step 2.8
- •Step 2.9
- •Part 3: Configuring Interfaces and Verifying Operational State
- •Step 3.1
- •Step 3.2
- •Step 3.3
- •Step 3.4
- •Secondary System Configuration (Detailed)
- •Overview
- •Part 1: Configuring User Authentication
- •Step 1.1
- •Step 1.2
- •Step 1.3
- •Step 1.4
- •Step 1.5
- •Step 1.6
- •Step 1.7
- •Step 1.8
- •Step 1.9
- •Step 1.10
- •Step 1.11
- •Step 1.12
- •Step 1.13
- •Step 1.14
- •Step 1.15
- •Step 1.16
- •Step 1.17
- •Step 1.18
- •Step 1.19
- •Part 2: Performing System Management Options
- •Step 2.1
- •Step 2.2
- •Step 2.3
- •Step 2.4
- •Step 2.5
- •Step 2.6
- •Step 2.7
- •Step 2.8
- •Step 2.9
- •Step 2.10
- •Step 2.11
- •Step 2.12
- •Step 2.13
- •Step 2.14
- •Step 2.15
- •Step 2.16
- •Step 2.17
- •Step 2.18
- •Operational Monitoring and Maintenance (Detailed)
- •Overview
- •Part 1: Monitoring System and Chassis Operation
- •Step 1.1
- •Step 1.2
- •Step 1.3
- •Step 1.4
- •Step 1.5
- •Step 1.6
- •Step 1.7
- •Step 1.8
- •Step 1.9
- •Step 1.10
- •Step 1.11
- •Step 1.12
- •Step 1.13
- •Step 1.14
- •Step 1.15
- •Step 1.16
- •Part 2: Using Network Utilities and Monitoring Traffic
- •Step 2.1
- •Step 2.2
- •Step 2.3
- •Step 2.4
- •Step 2.5
- •Step 2.6
- •Part 3: Upgrading the Junos OS
- •Step 3.1
- •Step 3.2
- •Step 3.3
- •Step 3.4
- •Step 3.5
- •Part 4: Recovering the Root Password
- •Step 4.1
- •Step 4.2
- •Step 4.3
- •Step 4.4
- •Step 4.5
- •Step 4.6
- •Step 4.7
- •Step 4.8
- •Lab 5 (Optional)
- •The J-Web Interface (Detailed)
- •Overview
- •Part 1: Logging In to and Exploring the J-Web Interface
- •Step 1.1
- •Step 1.2
- •Step 1.3
- •Step 1.4
- •Step 1.5
- •Step 1.6
- •Step 1.7
- •Step 1.8
- •Step 1.9
- •Part 2: Exploring J-Web Configuration and Diagnostic Capabilities
- •Step 2.1
- •Step 2.2
- •Step 2.3
- •Step 2.4
- •Step 2.5
- •Step 2.6
- •Step 2.7
- •Step 2.8
- •Step 2.9
- •Appendix A: Lab Diagrams

Step 1.16
Move to the [edit protocols ospf] portion of the hierarchy. This step requires that you first visit the root of the hierarchy, as you cannot jump directly between branches. You can perform this step with a single command in the form of top edit protocols ospf, however.
[edit interfaces]
lab@srxA-1# top edit protocols ospf
[edit protocols ospf] lab@srxA-1#
Question: Which commands can you now enter to reposition yourself at the [edit] portion of the hierarchy? Return to the [edit] hierarchy level now.
Answer: You can issue an up command twice, or an up 2 command. You can also issue an exit command or a top command.
[edit protocols ospf] lab@srxA-1# top
[edit] lab@srxA-1#
Note
If you have not already done so, return to the [edit] hierarchy level using one of the available methods.
Step 1.17
Try to display the status of chassis hardware with a show chassis hardware operational command while in configuration mode.
[edit]
lab@srxA-1# show chassis hardware
^
syntax error.
www.juniper.net |
The Junos CLI (Detailed) • Lab 1–15 |

Question: Why do you think you received an error? What can you do to execute operational mode commands while in configuration mode? Try that now.
Answer: The command issued is not valid in configuration mode. Precede operational mode commands with the keyword run to execute them while in configuration mode:
[edit] |
|
|
|
|
lab@srxA-1# run show chassis hardware |
|
|
||
Hardware inventory: |
|
|
|
|
Item |
Version |
Part number |
Serial number |
Description |
Chassis |
|
|
AH3809AA0054 |
SRX240h-poe |
Routing Engine |
REV 35 |
750-021794 |
AAAX6922 |
RE-SRX240H-POE |
FPC 0 |
|
|
|
FPC |
PIC 0 |
|
|
|
16x GE Base PIC |
Power Supply 0
Step 1.18
Try to return to operational mode by entering an exit command.
[edit] lab@srxA-1# exit
The configuration has been changed but not committed Exit with uncommitted changes? [yes,no] (yes)
Question: What happens when you execute the exit command?
Answer: You should see a message indicating that uncommitted changes exist. This message results from the creation of an empty [edit protocols ospf] stanza. This empty stanza causes the configuration database to believe that the configuration actually changed.
Lab 1–16 • The Junos CLI (Detailed) |
www.juniper.net |

Question: Which CLI command can you use to display differences between the candidate and active configuration file? Enter no at the current prompt and issue the required command to view the differences between the candidate and active configurations.
Answer: Use the show command with the results piped to compare rollback number. In this example, you should not see any actual configuration changes, as shown in the following sample capture:
The configuration has been changed but not committed
Exit with uncommitted changes? [yes,no] (yes) no
Exit aborted
[edit]
lab@srxA-1# show | compare rollback 0
[edit] lab@srxA-1#
Question: Considering that nothing changed, which command can you enter to allow an exit from configuration mode without being warned of uncommitted changes? Issue that command now.
Answer: Issue a rollback 0 command to replace the candidate configuration with a new copy of the active configuration. You can now exit configuration mode without being warned of uncommitted changes:
[edit]
lab@srxA-1# rollback 0 load complete
[edit] lab@srxA-1# exit
Exiting configuration mode
lab@srxA-1>
Step 1.19
Log out of your assigned device using the exit command.
www.juniper.net |
The Junos CLI (Detailed) • Lab 1–17 |

lab@srxA-1> exit
srxA-1 (ttyu0) login:
STOP |
Tell your instructor that you have completed Lab 1.
Lab 1–18 • The Junos CLI (Detailed) |
www.juniper.net |