
- •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

Input rate |
: 536 bps (0 pps) |
|
Output rate |
: 0 bps (0 pps) |
|
Active |
alarms |
: None |
Active |
defects : None |
Logical interface ge-0/0/0.0 (Index 68) (SNMP ifIndex 509) Flags: SNMP-Traps 0x0 Encapsulation: ENET2
Input packets : 299996 Output packets: 211433 Security: Zone: Null
...TRIMMED...
Step 1.7
Try to clear SNMP statistics by entering the clear snmp command.
lab@srxA-1> clear snmp
^
syntax error, expecting <command>.
Question: What do you think the resulting display means?
Answer: The display indicates that the command was incomplete as entered. The caret symbol (^) indicates the area of the problem, and the error message tells you that the system expects additional command input.
Step 1.8
Verify that the CLI does not let you complete invalid commands by trying to enter the command show ip interface brief.
lab@srxA-1> show ip<space>
lab@srxA-1> show ipv6
lab@srxA-1> show ipinterfacebrief
^
syntax error, expecting <command>.
Lab 1–6 • The Junos CLI (Detailed) |
www.juniper.net |

Question: What happens when you try to enter this command?
Answer: The system’s command completion feature completes a show ipv6 command in this case because ipv6 is the only valid completion. If you attempt to continue with invalid syntax, the system informs you of your error. Unlike some CLI implementations, the Junos OS will not let you waste time typing in an illegitimate command!
Step 1.9
Enter a show route command followed by a show system users command. You are entering these commands to demonstrate command history recall. When finished, enter the keyboard sequences indicated to answer the related questions.
lab@srxA-1> show route
inet.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both
10.210.14.128/27 *[Direct/0] 02:12:04 > via ge-0/0/0.0
10.210.14.131/32 *[Local/0] 02:12:10 Local via ge-0/0/0.0
lab@srxA-1> show system users |
|
|
|||
5:12AM |
up 2 |
days, |
3:14, 1 user, load averages: 0.04, 0.10, 0.07 |
||
USER |
TTY |
|
FROM |
LOGIN@ |
IDLE WHAT |
lab |
u0 |
|
- |
4:43AM |
- -cli (cli) |
Question: What happens when you press Ctrl+p twice?
Answer: The system recalls the show route command and displays it at the prompt.
Question: What happens when you press Ctrl+n?
Answer: The system recalls the next command in the buffer, which is a show system users command in this example.
www.juniper.net |
The Junos CLI (Detailed) • Lab 1–7 |

Question: What happens when you use the Up
Arrow and Down Arrow keys?
Answer: The Up Arrow and Down Arrow keys function as substitutes for the Ctrl+p and Ctrl+n sequences as long as the system is configured for VT100-type emulation, which is the default.
Step 1.10
In many cases, the output of a command might exceed one full screen. For example, the show interfaces interface-name extensive command displays a lot of information about the specified interface. Enter this command now for your system’s ge-0/0/0 interface, and answer the following questions. Use the h key as needed to obtain help when CLI output is paused at the ---(more)--- prompt.
lab@srxA-1> show interfaces ge-0/0/0 extensive
Physical interface: ge-0/0/0, Enabled, Physical link is Up Interface index: 134, SNMP ifIndex: 507, Generation: 137 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 |
|
|
|
Interface flags: |
SNMP-Traps Internal: 0x0 |
|
|
||
Link flags |
: |
None |
|
|
|
CoS queues |
: |
8 supported, 8 maximum usable queues |
|
|
|
Hold-times |
: |
Up 0 ms, Down 0 ms |
|
|
|
Current |
address: |
00:26:88:e1:54:80, Hardware address: 00:26:88:e1:54:80 |
|||
Last flapped |
: |
2011-04-20 02:02:04 UTC (2d 03:11 ago) |
|
||
Statistics last cleared: Never |
|
|
|||
Traffic |
statistics: |
|
|
||
Input |
bytes |
: |
197626475 |
1008 |
bps |
Output |
bytes |
: |
196448392 |
0 |
bps |
Input |
packets: |
300053 |
1 |
pps |
|
Output |
packets: |
211433 |
0 |
pps |
Input errors:
Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Policed discards: 0, L3 incompletes: 0, L2 channel errors: 0, L2 mismatch timeouts: 0,
FIFO errors: 0, Resource errors: 0 Output errors:
Carrier transitions: 1, Errors: 0, Drops: 0, Collisions: 0, Aged packets: 0, FIFO errors: 0, HS link CRC errors: 0, MTU errors: 0, Resource errors: 0
...TRIMMED...
Lab 1–8 • The Junos CLI (Detailed) |
www.juniper.net |

Question: What effect does pressing the Spacebar have?
Answer: The Spacebar causes the display to scroll forward to display the next screen of output.
Question: What effect does pressing the Enter key have on the paused output?
Answer: The Enter key causes the display to scroll forward by one line.
Question: What effect does pressing the b key have?
Answer: Pressing the b key causes the display to scroll backwards by one full screen, up to the point where the first full screen of information displays.
Question: What effect does pressing the u key have?
Answer: Pressing the u key causes the display to scroll backwards by one half of a screen, up to the point where the first screen displays.
Question: Which key would you press to search forward through a display that consists of multiple screens of output?
Answer: To search forward, press the forward slash
(/) character followed by the search pattern.
Step 1.11
Use the pipe (|) and match functions of the Junos CLI to list all interfaces that are physically down.
lab@srxA-1> |
show |
interfaces | |
match down |
||
Physical |
interface: ge-0/0/5, |
Enabled, Physical link is Down |
|||
|
Device |
flags |
: Present Running Down |
||
|
Interface |
flags: Hardware-Down SNMP-Traps Internal: 0x0 |
|||
|
|
|
|
|
|
|
www.juniper.net |
|
|
The Junos CLI (Detailed) • Lab 1–9 |

Physical |
interface: ge-0/0/6, Enabled, Physical link is Down |
||
Device |
flags |
: Present Running Down |
|
Interface flags: Hardware-Down SNMP-Traps Internal: |
0x0 |
||
Physical |
interface: ge-0/0/7, Enabled, Physical link is Down |
||
Device |
flags |
: Present Running Down |
|
Interface flags: Hardware-Down SNMP-Traps Internal: |
0x0 |
||
Physical |
interface: ge-0/0/8, Enabled, Physical link is Down |
||
Device |
flags |
: Present Running Down |
|
Interface flags: Hardware-Down SNMP-Traps Internal: |
0x0 |
||
Physical |
interface: ge-0/0/9, Enabled, Physical link is Down |
||
Device |
flags |
: Present Running Down |
|
Interface flags: Hardware-Down SNMP-Traps Internal: |
0x0 |
||
Physical |
interface: ge-0/0/10, Enabled, Physical link |
is Down |
|
Device |
flags |
: Present Running Down |
|
Interface flags: Hardware-Down SNMP-Traps Internal: |
0x0 |
||
Physical |
interface: ge-0/0/11, Enabled, Physical link |
is Down |
|
Device |
flags |
: Present Running Down |
|
Interface flags: Hardware-Down SNMP-Traps Internal: |
0x0 |
||
Physical |
interface: ge-0/0/12, Enabled, Physical link |
is Down |
|
Device |
flags |
: Present Running Down |
|
Interface flags: Hardware-Down SNMP-Traps Internal: |
0x0 |
||
Physical |
interface: ge-0/0/13, Enabled, Physical link |
is Down |
|
Device |
flags |
: Present Running Down |
|
Interface flags: Hardware-Down SNMP-Traps Internal: |
0x0 |
||
Physical |
interface: ge-0/0/14, Enabled, Physical link |
is Down |
|
Device |
flags |
: Present Running Down |
|
Interface flags: Hardware-Down SNMP-Traps Internal: |
0x0 |
||
Physical |
interface: ge-0/0/15, Enabled, Physical link |
is Down |
|
Device |
flags |
: Present Running Down |
|
Interface flags: Hardware-Down SNMP-Traps Internal: |
0x0 |
Question: Are any of your interfaces listed as Down?
Answer: In this example, the answer is yes; several interfaces show as Down. The interfaces shown might vary depending on your lab environment.
Question: Can you think of a way to have the Junos OS count the number of interfaces that are physically down? (Hint: Remember that you can use the results of one pipe as input to another pipe operation.)
Answer: To count the number of down interfaces, pipe the results of the previous command to the CLI count function. In this example, we included an extra match function to ensure that the software does not count interfaces that are down both logically and physically more than once:
Lab 1–10 • The Junos CLI (Detailed) |
www.juniper.net |