You are on page 1of 50

1194 North Mathilda Avenue

Sunnyvale, CA 94089
USA
408-745-2000
www.juniper.net
Worldwide Education Services Worldwide Education Services
Junos Operating System
Highlights
Lab Guide
Course Number: SSFJUN01
This document is produced by Juniper Networks, Inc.
This document or any part thereof may not be reproduced or transmitted in any form under penalty of law, without the prior written permission of Juniper Networks
Education Services.
Juniper Networks, Junos, Steel-Belted Radius, NetScreen, and ScreenOS are registered trademarks of Juniper Networks, Inc. in the United States and other
countries. The Juniper Networks Logo, the Junos logo, and JunosE are trademarks of Juniper Networks, Inc. All other trademarks, service marks, registered
trademarks, or registered service marks are the property of their respective owners.
Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication without notice.
YEAR 2000 NOTICE
Juniper Networks hardware and software products do not suffer from Year 2000 problems and hence are Year 2000 compliant. The Junos operating system has
no known time-related limitations through the year 2038. However, the NTP application is known to have some difficulty in the year 2036.
SOFTWARE LICENSE
The terms and conditions for using Juniper Networks software are described in the software license provided with the software, or to the extent applicable, in an
agreement executed between you and Juniper Networks, or Juniper Networks agent. By using Juniper Networks software, you indicate that you understand and
agree to be bound by its license terms and conditions. Generally speaking, the software license restricts the manner in which you are permitted to use the Juniper
Networks software, may contain prohibitions against certain uses, and may state conditions under which the license is automatically terminated. You should
consult the software license for further details.
Junos Operating System Highlights Lab Guide
Copyright 2012 Juniper Networks, Inc. All rights reserved.
Revision History:
July, 2010
November, 2011
April, 2012
July 2012
The information in this document is current as of the date listed above.
The information in this document has been carefully verified and is believed to be accurate for software Release 11.4R1.6. Juniper Networks assumes no
responsibilities for any inaccuracies that may appear in this document. In no event will Juniper Networks be liable for direct, indirect, special, exemplary,
incidental, or consequential damages resulting from any defect or omission in this document, even if advised of the possibility of such damages.
www.juniper.net Contents iii
Contents Contents Contents Contents
Lab 0: Lab 0: Lab 0: Lab 0: Introduction to the Juniper Networks Virtual Lab Introduction to the Juniper Networks Virtual Lab Introduction to the Juniper Networks Virtual Lab Introduction to the Juniper Networks Virtual Lab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .000 0-1 -1 -1 -1
Part 1: Accessing the Virtual Lab Homepage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-2
Part 2: Accepting the EULA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-2
Part 3: Logging in to the TrueLab Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-2
Part 4: Selecting Your Time Zone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-3
Part 5: Creating an On-Demand Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-4
Part 6: Creating a Dynamic Session (If the On-Demand Session Is Unavailable) . . . . . . . . . . . . . . . . . . . . . . 0-5
Part 7: Starting the Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-6
Part 8: Additional Information and Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0-9
Lab 1: Lab 1: Lab 1: Lab 1: Junos Operating System Highlights Junos Operating System Highlights Junos Operating System Highlights Junos Operating System Highlights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 1-1 -1 -1 -1
Part 1: Logging In Using the CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Part 2: Experimenting with the CLIs Operational Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Part 3: Entering Configuration Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
Lab 2: Lab 2: Lab 2: Lab 2: Configuring Junos OS Using the CLI Configuring Junos OS Using the CLI Configuring Junos OS Using the CLI Configuring Junos OS Using the CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222 2-1 -1 -1 -1
Part 1: Exploring Configuration Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Part 2: Using a Rescue Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Lab 3: Lab 3: Lab 3: Lab 3: Configuring OSPF on Junos OS Devices Configuring OSPF on Junos OS Devices Configuring OSPF on Junos OS Devices Configuring OSPF on Junos OS Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333 3-1 -1 -1 -1
Part 1: Configuring and Monitoring Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Part 2: Configuring and Monitoring Static Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Part 3: Configuring and Monitoring OSPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
Appendix A: Appendix A: Appendix A: Appendix A: Lab Diagrams Lab Diagrams Lab Diagrams Lab Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1 A-1 A-1 A-1
iv Contents www.juniper.net
www.juniper.net Document Conventions v
Document Conventions Document Conventions Document Conventions Document Conventions
CLI and GUI Text CLI and GUI Text CLI and GUI Text CLI and GUI Text
Frequently throughout this course, we refer to text that appears in a command-line interface (CLI)
or a graphical user interface (GUI). To make the language of these documents easier to read, we
distinguish GUI and CLI text from chapter text according to the following table.
Input Text Versus Output Text Input Text Versus Output Text Input Text Versus Output Text Input Text Versus Output Text
You will also frequently see cases where you must enter input text yourself. Often this will be shown
in the context of where you must enter it. We use bold style to distinguish text that is input versus
text that is simply displayed.
Defined and Undefined Syntax Variables Defined and Undefined Syntax Variables Defined and Undefined Syntax Variables Defined and Undefined Syntax Variables
Finally, this course distinguishes between regular text and syntax variables, and it also
distinguishes between syntax variables where the value is already assigned (defined variables) and
syntax variables where you must assign the value (undefined variables). Note that these styles can
be combined with the input style as well.
Style Description Usage Example
Franklin
Gothic
Normal text. Most of what you read in the Lab Guide
and Student Guide.
Courier
New
Console text:
Screen captures
Noncommand-related syntax
GUI text elements:
Menu names
Text field entry
commit complete
Exiting configuration mode
Select File > Open, and then click
Configuration.conf in the
Filename text box.
Style Description Usage Example
Normal CLI
Normal GUI
No distinguishing variant. Physical interface:fxp0,
Enabled
View configuration history by clicking
Configuration > History.
CLI Input
GUI Input
Text that you must enter. lab@San_Jose> show route
Select File > Save, and enter
config.ini in the Filename field.
Style Description Usage Example
CLI Variable
GUI variable
Text where variable value is
already assigned.
policy my-peers
Click my-peers in the dialog.
CLI Undefined
GUI Undefined
Text where the variables value
is the users discretion and text
where the variables value as
shown in the lab guide might
differ from the value the user
must input.
Type set policy
policy-name.
ping 10.0.x.y
Select File > Save, and enter
filename in the Filename field.
vi Document Conventions www.juniper.net
Introduction to the Juniper Networks Virtual Lab Lab 01
Lab 0
Introduction to the Juniper Networks Virtual Lab Introduction to the Juniper Networks Virtual Lab Introduction to the Juniper Networks Virtual Lab Introduction to the Juniper Networks Virtual Lab
Overview Overview Overview Overview
This lab shows the basic procedures for how to access the Juniper Networks Virtual Lab (vLab)
using a standard Web browser.
The Purpose of the Virtual Labs The Purpose of the Virtual Labs The Purpose of the Virtual Labs The Purpose of the Virtual Labs
The vLabs help partners receive hands-on training through a virtual portal which is available
24 hours a day, 7 days a week. This is not a simulator, but live equipment to promote learning
and development for interested partners to the Juniper Networks Partner Learning Academy.
The vLab exercises assist a student to become proficient at installing, configuring, and
troubleshooting Juniper products. Each JNSS track takes approximately 8 hours to complete.
Once connected to the vLab site, you will need to register (with a valid e-mail address) and then
log in.
Access is granted on a first come, first serve basis through the training section of the Partner
Center. The vLabs are also available for dedicated instructor-led courses on an as needed
basis. The system will check to see if one of the selected labs is available. If a vLab is available,
access is granted. If no lab is available, you will be asked to try again later.
Each of the vLabs is duplicated multiple times. In the case of the Router/Firewall lab there are
extra cross connects between the labs so that in a classroom environment they can be
connected in interesting network topologies.

Note
We recommend that you download and read the
course lab guide prior to starting your lab. The guide
provides important information to access the lab
environment and the labs themselves.
Lab 02 Introduction to the Juniper Networks Virtual Lab
Part 1: Accessing the Virtual Lab Homepage Part 1: Accessing the Virtual Lab Homepage Part 1: Accessing the Virtual Lab Homepage Part 1: Accessing the Virtual Lab Homepage
The first step in accessing the Virtual Lab is to login to the vLab homepage. To access the
Virtual Lab home page, copy and paste the below URL into a browser window:
https://virtuallabs.juniper.net
Part 2: Accepting the EULA Part 2: Accepting the EULA Part 2: Accepting the EULA Part 2: Accepting the EULA
You will need to accept the End User License Agreement to log in and begin your work in the
Virtual Lab.
Part 3: Logging in to the TrueLab Manager Part 3: Logging in to the TrueLab Manager Part 3: Logging in to the TrueLab Manager Part 3: Logging in to the TrueLab Manager
If you are already logged in to the Partner Learning Academy on the Juniper Partner Center, you
will not need to log in to TrueLab Manager. However, if you are not logged in to the Partner
Center, you can log in on this screen.


Introduction to the Juniper Networks Virtual Lab Lab 03
Part 4: Selecting Your Time Zone Part 4: Selecting Your Time Zone Part 4: Selecting Your Time Zone Part 4: Selecting Your Time Zone
Next, you must specify a time zone. Once your correct time zone has been specified, click
Update in the bottom left corner of the screen.
Step 4.1 Step 4.1 Step 4.1 Step 4.1
You can modify your user name, password, and time zone if necessary by clicking on the
Profile tab. Once you have made the updates, you must click Update to save these
changes.
Lab 04 Introduction to the Juniper Networks Virtual Lab
Part 5: Creating an On-Demand Session Part 5: Creating an On-Demand Session Part 5: Creating an On-Demand Session Part 5: Creating an On-Demand Session
You will then create a session under the Sessions tab and select the lab that you want to
use.
First, identify the correct row for your course under the Event heading. Next, select the course
title from the Purpose drop down menu under the Session Information column and
click Open.
Note Note Note Note
Click the View Event Details link under each
Event description to access the course lab guide
and credentials.
Introduction to the Juniper Networks Virtual Lab Lab 05
Part 6: Creating a Dynamic Session (If the On-Demand Session Is Unavailable) Part 6: Creating a Dynamic Session (If the On-Demand Session Is Unavailable) Part 6: Creating a Dynamic Session (If the On-Demand Session Is Unavailable) Part 6: Creating a Dynamic Session (If the On-Demand Session Is Unavailable)
To reserve a dynamic session, first identify the correct row for your course under the Event
heading. Next, select the course title from the Purpose drop down menu under the Session
Information column and the lab you want to schedule under the Lab Option drop down
menu. Click Reserve to schedule a session.
Lab 06 Introduction to the Juniper Networks Virtual Lab
Step 6.1 Step 6.1 Step 6.1 Step 6.1
Click Start Session Now.
Step 6.2 Step 6.2 Step 6.2 Step 6.2
Click Finish to return to the Sessions tab.
Part 7: Starting the Session Part 7: Starting the Session Part 7: Starting the Session Part 7: Starting the Session
Once the Start Session Now link has been clicked (under the session link), you will be
prompted to click OK to continue and log in.
Note Note Note Note
The system will send you a reminder e-mail prior to
your session start time.
Introduction to the Juniper Networks Virtual Lab Lab 07
Step 7.1 Step 7.1 Step 7.1 Step 7.1
Click OK to see the following screen.

Note Note Note Note
Each session can be a maximum of 3 hours.
Note Note Note Note
Do not close the browser window. Closing your
browser window will disconnect your Virtual Lab
session connected.
Lab 08 Introduction to the Juniper Networks Virtual Lab
Step 7.2 Step 7.2 Step 7.2 Step 7.2
Once you have an active session, you will see the following virtual desktop screen. On this
virtual desktop, you must double-click on the Secure CRT icon to begin your lab.
Note Note Note Note
The Help tab also has links to the related course
lab guide and vLab environment help guides.
Introduction to the Juniper Networks Virtual Lab Lab 09
Step 7.3 Step 7.3 Step 7.3 Step 7.3
Choose the device you will be working with in the Secure CRT session and click Connect.
Part 8: Additional Information and Feedback Part 8: Additional Information and Feedback Part 8: Additional Information and Feedback Part 8: Additional Information and Feedback
Connection Test Connection Test Connection Test Connection Test
You can test your ability to connect by navigating to
https://truelab.hatsize.com/syscheck/sunnyvale/.
Virtual Lab Support Virtual Lab Support Virtual Lab Support Virtual Lab Support
For support, please call 1-866-933-5487 (207-319-1142 if outside North America)
Go to: https://support.hatsize.com/
Or send an e-mail to support@hatsize.com
Feedback Feedback Feedback Feedback
If you would like to provide feedback on ways we can improve your vLab experience, please an
e-mail to salestraining@juniper.net.

STOP
Note Note Note Note
Make sure that you consult your lab guide before
opening any of the VT100 terminal sessions.

Lab 010 Introduction to the Juniper Networks Virtual Lab
www.juniper.net Junos Operating System Highlights Lab 11
11.4R1.6
Lab 1
Junos Operating System Highlights Junos Operating System Highlights Junos Operating System Highlights Junos Operating System Highlights
Overview Overview Overview Overview
This lab introduces you to the Junos OS command-line interface (CLI). In this lab, you will
familiarize yourself with various CLI operational mode features.
By completing this lab, you will perform the following tasks:
Log in to the CLI.
Explore the Junos OS CLI operational mode.
Junos Operating System Highlights
Lab 12 Junos Operating System Highlights www.juniper.net
Part 1: Logging In Using the CLI Part 1: Logging In Using the CLI Part 1: Logging In Using the CLI Part 1: Logging In Using the CLI
The goal of this lab part is for you to become familiar with the access details used to
connect to the lab equipment. Once you are familiar with the access details, you will
use the CLI to log in to your designated device.
Step 1.1 Step 1.1 Step 1.1 Step 1.1
Access the CLI using SecureCRT. Double click on the SecureCRT 5.0 icon located on
the desktop to open the connection manager. Highlight SRX1 and click Connect.
Step 1.2 Step 1.2 Step 1.2 Step 1.2
Log in as user lab with the password lab123.
login: lab
Password:
--- JUNOS 11.4R1.6 built 2011-11-15 12:44:14 UTC
lab@srxB-1>
Part 2: Experimenting with the CLIs Operational Mode Part 2: Experimenting with the CLIs Operational Mode Part 2: Experimenting with the CLIs Operational Mode Part 2: Experimenting with the CLIs Operational Mode
In this part, you will use the CLI to become familiar with operational mode. You will
also gain experience with some of the tools and functionality available within
operational mode.
Step 2.1 Step 2.1 Step 2.1 Step 2.1
Determine what system information you can clear from the operational mode
command prompt.
lab@srxB-1> clear ?
Possible completions:
amt Show AMT Protocol information
arp Clear address resolution information
auto-configuration Clear auto-configuration action
Junos Operating System Highlights
www.juniper.net Junos Operating System Highlights Lab 13
bfd Clear Bidirectional Forwarding Detection information
bgp Clear Border Gateway Protocol information
bridge Clear learned Layer 2 MAC address information
chassis Clear chassis information
database-replication Clear database replication information
dhcpv6 Clear DHCPv6 information
dot1x Clear 802.1X session
esis Clear end system-to-intermediate system information
ethernet-switching Clear ethernet switching information
firewall Clear firewall counters
gvrp Clears Generic VLAN Registration Protocol information
helper Clear port-forwarding helper information
igmp Clear Internet Group Management Protocol information
igmp-snooping Clear IGMP snooping information
interfaces Clear interface information
ipv6 Clear IP version 6 information
isdn Clear Integrated Services Digital Network information
isis Clear Intermediate System-to-Intermediate System
information
l2-learning Clear learned Layer 2 MAC address information
lacp Clear Link Aggregation Control Protocol information
ldp Clear Label Distribution Protocol information
lldp Clear Link Layer Discovery Protocol information
log Clear contents of log file
mld Clear multicast listener discovery information
mpls Clear mpls information
msdp Clear Multicast Source Discovery Protocol information
multicast Clear multicast information
network-access Clear network-access related information
ospf Clear Open Shortest Path First information
ospf3 Clear Open Shortest Path First version 3 information
passive-monitoring Clear passive monitoring statistics
pfe Clear Packet Forwarding Engine information
pgm Clear Pragmatic Generalized Multicast information
pim Clear Protocol Independent Multicast information
ppp Clear PPP information
pppoe Clear PPP over Ethernet information
r2cp Clear Radio-to-Router Protocol information
rip Clear Routing Information Protocol information
ripng Clear Routing Information Protocol for IPv6 information
rsvp Clear Resource Reservation Protocol information
security Clear security information
services Clear services
snmp Clear Simple Network Management Protocol information
spanning-tree Clear Spanning Tree Protocol information
system Clear system information
vpls Clear learned Layer 2 MAC address information
vrrp Clear Virtual Router Redundancy Protocol statistics
wlan Clear Wireless LAN information
Junos Operating System Highlights
Lab 14 Junos Operating System Highlights www.juniper.net
Question: Which command do you use to clear the
contents of a system log (syslog) file?
Answer: Use the clear log log-filename
command to clear the contents of a particular
syslog file.
Step 2.2 Step 2.2 Step 2.2 Step 2.2
Experiment with command completion by entering show i<space>.
lab@srxB-1> show i<space>
^
'i' is ambiguous.
Possible completions:
iccp Show Inter Chassis Control Protocol information
igmp Show Internet Group Management Protocol information
igmp-snooping Show IGMP snooping information
ingress-replication Show Ingress-Replication tunnel information
interfaces Show interface information
ipv6 Show IP version 6 information
isdn Show Integrated Services Digital Network information
isis Show Intermediate System-to-Intermediate System
information
Step 2.3 Step 2.3 Step 2.3 Step 2.3
Add characters to disambiguate your command so that you can display
interface-related information; use the Spacebar or Tab key for automatic command
completion.
lab@srxB-1> show int<space>erfaces
Physical interface: ge-0/0/0, Enabled, Physical link is Up
Interface index: 134, SNMP ifIndex: 509
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
Current address: b0:c6:9a:7a:88:00, Hardware address: b0:c6:9a:7a:88:00
Last flapped : 2012-07-11 23:10:36 UTC (14:46:41 ago)
Input rate : 472 bps (0 pps)
Note
You can return to the command prompt
without scrolling through all of the
generated output from a command. Enter
q to abort the operation and return to the
command prompt.
Junos Operating System Highlights
www.juniper.net Junos Operating System Highlights Lab 15
Output rate : 0 bps (0 pps)
Active alarms : None
Active defects : None
Interface transmit statistics: Disabled
Logical interface ge-0/0/0.0 (Index 69) (SNMP ifIndex 510)
Flags: SNMP-Traps 0x0 Encapsulation: ENET2
Input packets : 32141
Output packets: 173
Security: Zone: Null
Protocol inet, MTU: 1500
Flags: Sendbcast-pkt-to-re, Is-Primary
Addresses, Flags: Is-Default Is-Preferred Is-Primary
Destination: 10.210.14.128/27, Local: 10.210.14.133,
Broadcast: 10.210.14.159
...TRIMMED...
Step 2.4 Step 2.4 Step 2.4 Step 2.4
Try to clear SNMP statistics by entering the clear snmp command.
lab@srxB-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 carrot symbol (^)
indicates the area of the problem, and the error
message tells you that the system expects
additional command input.
Step 2.5 Step 2.5 Step 2.5 Step 2.5
Verify that the CLI will not let you complete invalid commands by trying to enter the
command show ip interface brief.
lab@srxB-1> show ip<space>
lab@srxB-1> show ipv6
lab@srxB-1> show ipinterfacebrief
^
syntax error, expecting <command>.
Junos Operating System Highlights
Lab 16 Junos Operating System Highlights www.juniper.net
Question: What happens when you try to enter this
command?
Answer: The systems 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, Junos OS will not let you waste
time typing in an illegitimate command!
Step 2.6 Step 2.6 Step 2.6 Step 2.6
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@srxB-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] 14:48:08
> via ge-0/0/0.0
10.210.14.133/32 *[Local/0] 14:48:17
Local via ge-0/0/0.0
lab@srxB-1> show system users
1:58PM up 14:51, 1 user, load averages: 0.06, 0.09, 0.08
USER TTY FROM LOGIN@ IDLE WHAT
lab u0 - Wed11PM - -cli (cli)
Question: What happens when you press the
up-arrow key twice?
Answer: The system recalls the show route
command and displays it at the prompt.
Question: What happens when you press the
down-arrow key once?
Answer: The system recalls the next command in
the buffer, which is a show system users
command in this example.
Junos Operating System Highlights
www.juniper.net Junos Operating System Highlights Lab 17
Step 2.7 Step 2.7 Step 2.7 Step 2.7
A large portion of the Junos OS documentation is available directly from the CLI. You
can retrieve high-level topics using the help topic command, whereas you can
obtain detailed configuration-related information with the help reference
command.
Use the help reference command along with the CLI question-mark operator
(?) to find detailed information about configuring a system hostname.
Question: Which CLI command displays reference
information about configuration of the systems
hostname?
Answer: The help reference system
host-name command displays information
regarding system hostnames.
lab@srxB-1> help reference system host-name
host-name
Syntax
host-name hostname;
Hierarchy Level
[edit system]
Release Information
Statement introduced before JUNOS Release 7.4.
Statement introduced in JUNOS Release 9.0 for EX Series switches.
Description
Set the hostname of the router or switch.
Options
hostname--Name of the router or switch.

Required Privilege Level
system--To view this statement in the configuration.
system-control--To add this statement to the configuration.
Related Topics
* Configuring the Hostname of the Router
Junos Operating System Highlights
Lab 18 Junos Operating System Highlights www.juniper.net
Part 3: Entering Configuration Mode Part 3: Entering Configuration Mode Part 3: Entering Configuration Mode Part 3: Entering Configuration Mode
In this part, you will enter and explore configuration mode.
Step 3.1 Step 3.1 Step 3.1 Step 3.1
Enter configuration mode.
lab@srxB-1> configure
Entering configuration mode
[edit]
lab@srxB-1#
Question: What happens to your prompt?
Answer: A pound sign (#) replaces the angle bracket
(>), and a configuration hierarchy banner displays.
Question: According to the prompt, what is your
position in the configuration hierarchy?
Answer: The display indicates that you are now at
the [edit] hierarchy, which is the root of the
configuration tree.
Step 3.2 Step 3.2 Step 3.2 Step 3.2
Display the interfaces portion of the candidate configuration.
[edit]
lab@srxB-1# show interfaces
ge-0/0/0 {
description "MGMT Interface - DO NOT DELETE";
unit 0 {
family inet {
address 10.210.14.133/27;
}
}
}

STOP
You have completed Lab 1. Please return to the course and complete You have completed Lab 1. Please return to the course and complete You have completed Lab 1. Please return to the course and complete You have completed Lab 1. Please return to the course and complete
the next section. the next section. the next section. the next section.
www.juniper.net Configuring Junos OS Using the CLI Lab 21
11.4R1.6
Lab 2
Configuring Junos OS Using the CLI Configuring Junos OS Using the CLI Configuring Junos OS Using the CLI Configuring Junos OS Using the CLI
Overview Overview Overview Overview
This lab continues to explore the functionality of the Junos OS command-line interface
(CLI). In this lab, you will familiarize yourself with various CLI configuration mode features.
By completing this lab, you will perform the following tasks:
Explore the Junos OS CLI using configuration mode.
Save, view, and use a rescue configuration.
Junos Operating System Highlights
Lab 22 Configuring Junos OS Using the CLI www.juniper.net
Part 1: Exploring Configuration Mode Part 1: Exploring Configuration Mode Part 1: Exploring Configuration Mode Part 1: Exploring Configuration Mode
In this part, you will use the CLI to explore configuration mode.
Step 1.1 Step 1.1 Step 1.1 Step 1.1
Access the CLI using SecureCRT. Double click on the SecureCRT 5.0 icon located on
the desktop to open the connection manager. Highlight SRX1 and click Connect.
Step 1.2 Step 1.2 Step 1.2 Step 1.2
Log in as user lab with the password lab123.
login: lab
Password:
--- JUNOS 11.4R1.6 built 2011-11-15 12:44:14 UTC
lab@srxB-1>
Step 1.3 Step 1.3 Step 1.3 Step 1.3
Issue the configure command to enter configuration mode.
lab@srxB-1> configure
Entering configuration mode
Step 1.4 Step 1.4 Step 1.4 Step 1.4
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@srxB-1# top edit protocols ospf
[edit protocols ospf]
Junos Operating System Highlights
www.juniper.net Configuring Junos OS Using the CLI Lab 23
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@srxB-1# top
[edit]
lab@srxB-1#
Step 1.5 Step 1.5 Step 1.5 Step 1.5
Try to display the status of chassis hardware with a show chassis
hardware operational command while in configuration mode.
[edit]
lab@srxB-1# show chassis hardware
^
syntax error.
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:
Note Note Note Note
If you have not already done so, return to
the [edit] hierarchy level using one of
the available methods.
Junos Operating System Highlights
Lab 24 Configuring Junos OS Using the CLI www.juniper.net
[edit]
lab@srxB-1# run show chassis hardware
Hardware inventory:
Item Version Part number Serial number Description
Chassis BD5009AA0022 SRX240H-POE
Routing Engine REV 37 750-024366 AABA9253 RE-SRX240H-POE
FPC 0 FPC
PIC 0 16x GE Base PIC
Power Supply 0
Step 1.6 Step 1.6 Step 1.6 Step 1.6
Try to return to operational mode by entering an exit command.
[edit]
lab@srxB-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.
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:
Junos Operating System Highlights
www.juniper.net Configuring Junos OS Using the CLI Lab 25
The configuration has been changed but not committed
Exit with uncommitted changes? [yes,no] (yes) no
Exit aborted
[edit]
lab@srxB-1# show | compare rollback 0
[edit]
lab@srxB-1#
Question: Considering that nothing changed, which
command can you enter in order to 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 any being warned of uncommitted
changes:
[edit]
lab@srxB-1# rollback 0
load complete
[edit]
lab@srxB-1# exit
Exiting configuration mode
lab@srxB-1>
Part 2: Using a Rescue Configuration Part 2: Using a Rescue Configuration Part 2: Using a Rescue Configuration Part 2: Using a Rescue Configuration
In this part, you will save, display, load, and delete a rescue configuration using the
Junos OS CLI.
Step 2.1 Step 2.1 Step 2.1 Step 2.1
Save the active configuration as the rescue configuration.
lab@srxB-1> request system configuration rescue save
lab@srxB-1
Step 2.2 Step 2.2 Step 2.2 Step 2.2
Display the contents of the recently saved rescue configuration.
Junos Operating System Highlights
Lab 26 Configuring Junos OS Using the CLI www.juniper.net
lab@srxB-1> file show /config/rescue.conf.gz
## Last changed: 2012-07-12 13:52:08 UTC
version 11.4R1.6;
system {
host-name srxB-1;
root-authentication {
encrypted-password "$1$KI99zGk6$MbYFuBbpLffu9tn2.sI7l1";
ssh-dsa "ssh-dss
AAAAB3NzaC1kc3MAAACBAMQrfP2bZyBXJ6PC7XXZ+MzErI8Jl6jah5L4/
O8BsfP2hC7EvRfNoX7MqbrtCX/9gUH9gChVuBCB+ERULMdgRvM5uGhC/
gs4UX+4dBbfBgKYYwgmisM8EoT25m7qI8ybpl2YZvHNznvO8h7kr4kpYuQEpKvgsTdH/
Jle4Uqnjv7DAAAAFQDZaqA6QAgbW3O/
zveaLCIDj6p0dwAAAIB1iL+krWrXiD8NPpY+w4dWXEqaV3bnobzPC4eyxQKBUCOr80Q5YBlWXVBH
x9elwBWZwj0SF4hLKHznExnLerVsMuTMA846RbQmSz62vM6kGM13HFonWeQvWia0TDr78+rOEgWF
2KHBSIxL51lmIDW8Gql9hJfD/Dr/
NKP97w3L0wAAAIEAr3FkWU8XbYytQYEKxsIN9P1UQ1ERXB3G40YwqFO484SlyKyYCfaz+yNsaAJu
2C8UebDIR3GieyNcOAKf3inCG8jQwjLvZskuZwrvlsz/xtcxSoAh9axJcdUfSJYMW/
g+mD26JK1Cliw5rwp2nH9kUrJxeI7IReDp4egNkM4i15o= configurator@server1.he";
}
login {
user lab {
uid 2000;
class super-user;
authentication {
encrypted-password "$1$84J5Maes$cni5Hrazbd/IEHr/50oY30";
}
}
}
services {
ssh;
telnet;
}
syslog {
user * {
any emergency;
}
file messages {
any any;
authorization info;
}
file interactive-commands {
interactive-commands any;
}
}
}
interfaces {
ge-0/0/0 {
description "MGMT Interface - DO NOT DELETE";
unit 0 {
family inet {
address 10.210.14.133/27;
}
}
}
}
Junos Operating System Highlights
www.juniper.net Configuring Junos OS Using the CLI Lab 27
security {
forwarding-options {
family {
mpls {
mode packet-based;
}
}
}
}
Question: Does the rescue configuration match the
recently created active configuration?
Answer: Yes, the rescue configuration should match
the recently created active configuration.
Step 2.3 Step 2.3 Step 2.3 Step 2.3
Return to configuration mode and delete either ssh or telnet access to the device
(whichever one you are NOT using), under the [edit system services]
hierarchy level. Activate the change.
lab@srxB-1> configure
Entering configuration mode
[edit]
lab@srxB-1# delete system services telnet
[edit]
lab@srxB-1# commit
commit complete
Step 2.4 Step 2.4 Step 2.4 Step 2.4
Verify that the appropriate service has been deleted under the [edit system
services] hierarchy level and then load the rescue configuration.
[edit]
lab@srxB-1# show system services
ssh;
[edit]
lab@srxB-1# rollback rescue
load complete
Step 2.5 Step 2.5 Step 2.5 Step 2.5
Verify that both the ssh and telnet services are once again enabled.
[edit]
lab@srxB-1# show system services
ssh;
telnet;
Step 2.6 Step 2.6 Step 2.6 Step 2.6
Activate the rescue configuration and return to operational mode.
Junos Operating System Highlights
Lab 28 Configuring Junos OS Using the CLI www.juniper.net
[edit]
lab@srxB-1# commit and-quit
commit complete
Exiting configuration mode
lab@srxB-1>
Step 2.7 Step 2.7 Step 2.7 Step 2.7
Delete the rescue configuration and attempt to display the rescue.conf.gz file to
confirm the deletion.
lab@srxB-1> request system configuration rescue delete
lab@srxB-1> file show /config/rescue.conf.gz
error: could not resolve file: /config/rescue.conf.gz
Question: Did you successfully delete the rescue
configuration?
Answer: Yes, based on the CLIs feedback, the
deletion of the rescue configuration was successful.

STOP
You have completed Lab 2. Please return to the course and complete You have completed Lab 2. Please return to the course and complete You have completed Lab 2. Please return to the course and complete You have completed Lab 2. Please return to the course and complete
the next section. the next section. the next section. the next section.
www.juniper.net Configuring OSPF on Junos OS Devices Lab 31
11.4R1.6
Lab 3
Configuring OSPF on Junos OS Devices Configuring OSPF on Junos OS Devices Configuring OSPF on Junos OS Devices Configuring OSPF on Junos OS Devices
In this lab, you will use the Junos OS command-line interface (CLI) to configure and
monitor static routing and basic OSPF. Throughout these configuration tasks, you will
become familiar with and describe the contents of the routing and forwarding tables.
By completing this lab, you will perform the following tasks:
Configure and monitor static routing.
Configure and monitor OSPF.
Junos Operating System Highlights
Lab 32 Configuring OSPF on Junos OS Devices www.juniper.net
Part 1: Configuring and Monitoring Interfaces Part 1: Configuring and Monitoring Interfaces Part 1: Configuring and Monitoring Interfaces Part 1: Configuring and Monitoring Interfaces
In this lab part, you will load a basic configuration from flash memory, then configure
a new network interface on your assigned device. You will then verify that the
interface is operational and that the system adds the corresponding route table
entries for all the configured interfaces on your device.
Step 1.1 Step 1.1 Step 1.1 Step 1.1
Access the CLI using SecureCRT. Double click on the SecureCRT 5.0 icon located on
the desktop to open the connection manager. Highlight SRX1 and click Connect.
Step 1.2 Step 1.2 Step 1.2 Step 1.2
Log in as user lab with the password lab123.
login: lab
Password:
--- JUNOS 11.4R1.6 built 2011-11-15 12:44:14 UTC
lab@srxB-1>
Step 1.3 Step 1.3 Step 1.3 Step 1.3
Enter Configuration mode using the configure command.
lab@srxB-1> configure
Entering configuration mode
Step 1.4 Step 1.4 Step 1.4 Step 1.4
Using the load override command, load the file lab3p1s4.config from the
/var/home/lab/ssfjun01/ directory. This will load the basic configuration
needed to complete the lab. Issue the commit command to apply the changes and
exit configuration mode.
Junos Operating System Highlights
www.juniper.net Configuring OSPF on Junos OS Devices Lab 33
[edit]
lab@srxB-1# load override /var/home/lab/ssfjun01/lab3p1s4.config
[edit]
lab@srxB-1# commit
commit complete
[edit]
lab@srxB-1#
Step 1.5 Step 1.5 Step 1.5 Step 1.5
Open a new SecureCRT tab and connect to the SRX2 device. Enter configuration
mode and load the lab3p1s9.config file from the
/var/home/lab/ssfjun01/ directory. Commit the changes and exit when
complete.
Click File > Connect in Tab from the SecureCRT window.
Junos Operating System Highlights
Lab 34 Configuring OSPF on Junos OS Devices www.juniper.net
Step 1.6 Step 1.6 Step 1.6 Step 1.6
Select SRX2 from the available devices and click Connect.
Step 1.7 Step 1.7 Step 1.7 Step 1.7
Log in as user lab with the password lab123.
srxB-2 (ttyp0)
login: lab
Password:
--- JUNOS 11.4R1.6 built 2011-11-15 12:44:14 UTC
lab@srxB-2>
Step 1.8 Step 1.8 Step 1.8 Step 1.8
Enter configuration mode.
lab@srxB-2> configure
Entering configuration mode
[edit]
lab@srxB-2#
Step 1.9 Step 1.9 Step 1.9 Step 1.9
Load the configuration file and then exit. Exit the device and close the tab and return
to the SRX1 device.
[edit]
lab@srxB-2# load override /var/home/lab/ssfjun01/lab3p1s9.config
[edit]
lab@srxB-2# commit and-quit
commit complete
Exiting configuration mode
Junos Operating System Highlights
www.juniper.net Configuring OSPF on Junos OS Devices Lab 35
lab@srxB-2> exit
srxB-2 (ttyu0)
login:
Step 1.10 Step 1.10 Step 1.10 Step 1.10
Return back to the SRX1 device. Navigate to the [edit interfaces]
hierarchy level.
[edit]
lab@srxB-1# edit interfaces
[edit interfaces]
lab@srxB-1#
Step 1.11 Step 1.11 Step 1.11 Step 1.11
Refer to the following diagram and configure the new interface, ge-0/0/4, for
your assigned device. Use the VLAN-ID as the logical unit value for the tagged
interface.
[edit interfaces]
lab@srxB-1# set ge-0/0/4 vlan-tagging
[edit interfaces]
lab@srxB-1# set ge-0/0/4 unit 10v vlan-id 10v
[edit interfaces]
lab@srxB-1# set ge-0/0/4 unit 10v family inet address 172.20.10v.1/24
Note Note Note Note
VLAN Assignments VLAN Assignments VLAN Assignments VLAN Assignments
Hostname VLAN-ID
srxA-1 101
srxB-1 103
srxC-1 105
srxD-1 107
VLAN tagging is used on the ge-0/0/4
interface to support the underlying lab
architecture for this course. The use of a
VLAN ID serves no other specific purpose in
this lab.
Junos Operating System Highlights
Lab 36 Configuring OSPF on Junos OS Devices www.juniper.net
Step 1.12 Step 1.12 Step 1.12 Step 1.12
Display the interface configuration and ensure it matches the details outlined on the
network diagram for this lab. When you are comfortable with the interface
configuration, issue the commit-and-quit command to activate the
configuration and return to operational mode.
[edit interfaces]
lab@srxB-1# show
ge-0/0/0 {
description "MGMT Interface - DO NOT DELETE";
unit 0 {
family inet {
address 10.210.14.133/27;
}
}
}
ge-0/0/1 {
unit 0 {
family inet {
address 172.20.77.1/30;
}
}
}
ge-0/0/2 {
unit 0 {
family inet {
address 172.20.66.1/30;
}
}
}
ge-0/0/3 {
unit 0 {
family inet {
address 172.18.1.2/30;
}
}
}
ge-0/0/4 {
vlan-tagging;
unit 103 {
vlan-id 103;
family inet {
address 172.20.103.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 192.168.1.1/32;
}
}
}
Junos Operating System Highlights
www.juniper.net Configuring OSPF on Junos OS Devices Lab 37
[edit interfaces]
lab@srxB-1# commit and-quit
commit complete
Exiting configuration mode
Step 1.13 Step 1.13 Step 1.13 Step 1.13
Issue the show interfaces terse command to verify the current state of the
interface you just configured.
lab@srxB-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.133/27
...TRIMMED..
ge-0/0/1 up up
ge-0/0/1.0 up up inet 172.20.77.1/30
ge-0/0/2 up up
ge-0/0/2.0 up up inet 172.20.66.1/30
ge-0/0/3 up up
ge-0/0/3.0 up up inet 172.18.1.2/30
ge-0/0/4 up up
ge-0/0/4.103 up up inet 172.20.103.1/24
...TRIMMED..
lo0 up up
lo0.0 up up inet 192.168.1.1 --> 0/0
...TRIMMED..
Question: What is the Admin and Link state for
the ge-0/0/4 interface?
Answer: The new interface should all show an
Admin and Link state of up.
Step 1.14 Step 1.14 Step 1.14 Step 1.14
Issue the show route command to view the current route entries.
lab@srxB-1> show route
inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.210.14.128/27 *[Direct/0] 15:47:37
> via ge-0/0/0.0
10.210.14.133/32 *[Local/0] 15:47:46
Local via ge-0/0/0.0
172.18.1.0/30 *[Direct/0] 00:36:20
> via ge-0/0/3.0
172.18.1.2/32 *[Local/0] 00:36:20
Local via ge-0/0/3.0
172.20.66.0/30 *[Direct/0] 00:36:20
> via ge-0/0/2.0
Junos Operating System Highlights
Lab 38 Configuring OSPF on Junos OS Devices www.juniper.net
172.20.66.1/32 *[Local/0] 00:36:20
Local via ge-0/0/2.0
172.20.77.0/30 *[Direct/0] 00:36:20
> via ge-0/0/1.0
172.20.77.1/32 *[Local/0] 00:36:20
Local via ge-0/0/1.0
172.20.103.0/24 *[Direct/0] 00:02:10
> via ge-0/0/4.103
172.20.103.1/32 *[Local/0] 00:02:10
Local via ge-0/0/4.103
192.168.1.1/32 *[Direct/0] 00:36:20
> via lo0.0
Question: Does the route table display an entry for
all local interface addresses and directly connected
networks?
Answer: The answer should be yes. If needed, you
can refer back to the network diagram and compare
it with the displayed route entries.
Question: What is the route preference for the
Local and Direct route entries?
Answer: The Local and Direct route entries both
have a route preference of 0.
Step 1.15 Step 1.15 Step 1.15 Step 1.15
Use the ping utility to verify reachability to the neighboring devices connected to your
device. The following sample capture shows ping tests from srxB-1 to the Internet
gateway, srxB-2-a, and vr103, which are all directly connected:
lab@srxB-1> ping 172.18.1.1 rapid count 25
PING 172.18.1.1 (172.18.1.1): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!
--- 172.18.1.1 ping statistics ---
25 packets transmitted, 25 packets received, 0% packet loss
round-trip min/avg/max/stddev = 3.560/5.276/26.080/4.364 ms
lab@srxB-1> ping 172.20.66.2 rapid count 25
PING 172.20.66.2 (172.20.66.2): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!
--- 172.20.66.2 ping statistics ---
Note Note Note Note
Use Ctrl+C to stop a continuous ping
operation.
Junos Operating System Highlights
www.juniper.net Configuring OSPF on Junos OS Devices Lab 39
25 packets transmitted, 25 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.776/6.841/29.045/4.672 ms
lab@srxB-1> ping 172.20.77.2 rapid count 25
PING 172.20.77.2 (172.20.77.2): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!
--- 172.20.77.2 ping statistics ---
25 packets transmitted, 25 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.817/7.077/27.688/4.360 ms
lab@srxB-1> ping 172.20.10v.10 rapid count 25
PING 172.20.103.10 (172.20.103.10): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!
--- 172.20.103.10 ping statistics ---
25 packets transmitted, 25 packets received, 0% packet loss
round-trip min/avg/max/stddev = 3.499/4.644/6.253/0.871 ms
Question: Are the ping tests successful?
Answer: Yes, the ping tests should be successful at
this time.
Part 2: Configuring and Monitoring Static Routing Part 2: Configuring and Monitoring Static Routing Part 2: Configuring and Monitoring Static Routing Part 2: Configuring and Monitoring Static Routing
In this part, you will configure and monitor static routing.
Step 2.1 Step 2.1 Step 2.1 Step 2.1
Attempt to ping the loopback address of the directly attached virtual router
referenced on the network diagram for this lab.
Note Note Note Note
lab@srxB-1> ping 192.168.1.2/32
ping: cannot resolve 192.168.1.2/32: Host name lookup failure
Question: What does the result from the ping
operation indicate?
Answer: The results from the ping operation
indicate that no route to the specified host currently
exists.
Use Ctrl+C to stop a continuous ping
operation.
Junos Operating System Highlights
Lab 310 Configuring OSPF on Junos OS Devices www.juniper.net
Step 2.2 Step 2.2 Step 2.2 Step 2.2
Enter configuration mode, navigate to the [edit routing-options] hierarchy
level, and add a static route to the loopback address of the directly attached virtual
router.
lab@srxB-1> configure
Entering configuration mode
[edit]
lab@srxB-1# edit routing-options
[edit routing-options]
lab@srxB-1# set static route 192.168.1.2/32 next-hop 172.20.10v.10
Step 2.3 Step 2.3 Step 2.3 Step 2.3
Define additional static routes to allow end-to-end connectivity to the remote subnet
and loopback addresses within your assigned pod. Use the IP address assigned on
the 172.20.66.0/30 subnet as the next hop for these static routes.
[edit routing-options]
lab@srxB-1# set static route 192.168.2.1/32 next-hop 172.20.66.2
[edit routing-options]
lab@srxB-1# set static route 192.168.2.2/32 next-hop 172.20.66.2
[edit routing-options]
lab@srxB-1# set static route 172.20.104.0/24 next-hop 172.20.66.2
Step 2.4 Step 2.4 Step 2.4 Step 2.4
Display the resulting configuration to review your work. Once satisfied, activate the
configuration changes and return to operational mode.
[edit routing-options]
lab@srxB-1# show
static {
route 192.168.1.2/32 next-hop 172.20.103.10;
route 192.168.2.1/32 next-hop 172.20.66.2;
route 192.168.2.2/32 next-hop 172.20.66.2;
route 172.20.104.0/24 next-hop 172.20.66.2;
}
[edit routing-options]
lab@srxB-1# commit and-quit
commit complete
Exiting configuration mode
Step 2.5 Step 2.5 Step 2.5 Step 2.5
Issue the show route protocol static command to view the current static
routes in your devices route table.
lab@srxB-1> show route protocol static
inet.0: 15 destinations, 15 routes (15 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
Junos Operating System Highlights
www.juniper.net Configuring OSPF on Junos OS Devices Lab 311
172.20.104.0/24 *[Static/5] 00:00:22
> to 172.20.66.2 via ge-0/0/2.0
192.168.1.2/32 *[Static/5] 00:00:22
> to 172.20.103.10 via ge-0/0/4.103
192.168.2.1/32 *[Static/5] 00:00:22
> to 172.20.66.2 via ge-0/0/2.0
192.168.2.2/32 *[Static/5] 00:00:22
> to 172.20.66.2 via ge-0/0/2.0
Question: How many static routes display?
Answer: Each device should show four static
routes.
Step 2.6 Step 2.6 Step 2.6 Step 2.6
Ping the loopback address of all internal devices to verify reachability.
lab@srxB-1> ping 192.168.2.1 rapid count 25
PING 192.168.2.1 (192.168.2.1): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!
--- 192.168.2.1 ping statistics ---
25 packets transmitted, 25 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.714/6.018/13.400/1.758 ms
lab@srxB-1> ping 192.168.1.2 rapid count 25
PING 192.168.1.2 (192.168.1.2): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!
--- 192.168.1.2 ping statistics ---
25 packets transmitted, 25 packets received, 0% packet loss
round-trip min/avg/max/stddev = 3.598/5.839/35.017/6.038 ms
lab@srxB-1> ping 192.168.2.2 rapid count 25
PING 192.168.2.2 (192.168.2.2): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!
--- 192.168.2.2 ping statistics ---
25 packets transmitted, 25 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.241/5.953/27.162/4.406 ms
Note Note Note Note
The virtual routers have a preconfigured
default static route using their directly
connected device as the next hop.
Junos Operating System Highlights
Lab 312 Configuring OSPF on Junos OS Devices www.juniper.net
Question: Did the ping tests succeed?
Answer: The ping tests should succeed.
Part 3: Configuring and Monitoring OSPF Part 3: Configuring and Monitoring OSPF Part 3: Configuring and Monitoring OSPF Part 3: Configuring and Monitoring OSPF
In this part, you will configure and monitor OSPF. You will configure a single OSPF
area based on the network diagram for this lab. Then you will perform some
verification tasks to ensure that OSPF works properly.
Step 3.1 Step 3.1 Step 3.1 Step 3.1
Enter configuration mode and navigate to the [edit protocols ospf]
hierarchy level.
lab@srxB-1> configure
Entering configuration mode
[edit]
lab@srxB-1# edit protocols ospf
[edit protocols ospf]
lab@srxB-1#
Step 3.2 Step 3.2 Step 3.2 Step 3.2
Define OSPF Area 0 and include all internal interfaces that connect to host device
and the directly connected virtual router. Ensure that you also include the lo0
interface. Issue the show command to view the resulting configuration.
[edit protocols ospf]
lab@srxB-1# set area 0 interface ge-0/0/1.0
[edit protocols ospf]
lab@srxB-1# set area 0 interface ge-0/0/2.0
[edit protocols ospf]
lab@srxB-1# set area 0 interface ge-0/0/4.10v
[edit protocols ospf]
lab@srxB-1# set area 0 interface lo0.0
[edit protocols ospf]
lab@srxB-1# show
area 0.0.0.0 {
interface ge-0/0/1.0;
Note Note Note Note
Remember to specify the appropriate
logical interface! If the logical unit is not
specified, Junos OS assumes a logical unit
of zero (0).
Junos Operating System Highlights
www.juniper.net Configuring OSPF on Junos OS Devices Lab 313
interface ge-0/0/2.0;
interface ge-0/0/4.103;
interface lo0.0;
}
Step 3.3 Step 3.3 Step 3.3 Step 3.3
Activate the candidate configuration using the commit command. Issue the run
show ospf neighbor command to verify OSPF neighbor adjacency state
information.
[edit protocols ospf]
lab@srxB-1# commit
commit complete
[edit protocols ospf]
lab@srxB-1# run show ospf neighbor
Address Interface State ID Pri Dead
172.20.77.2 ge-0/0/1.0 Full 192.168.2.1 128 38
172.20.66.2 ge-0/0/2.0 Full 192.168.2.1 128 32
172.20.103.10 ge-0/0/4.103 Full 192.168.1.2 128 39
Question: What state do the OSPF neighbor
adjacencies show?
Answer: Although you might see some transitional
states, the state for all three OSPF neighbors should
eventually show Full.
Step 3.4 Step 3.4 Step 3.4 Step 3.4
Issue the run show route protocol ospf to view the active OSPF routes in
your devices route table.
[edit protocols ospf]
lab@srxB-1# run show route protocol ospf
inet.0: 16 destinations, 20 routes (16 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
172.20.104.0/24 [OSPF/10] 00:01:33, metric 2
to 172.20.77.2 via ge-0/0/1.0
> to 172.20.66.2 via ge-0/0/2.0
192.168.1.2/32 [OSPF/10] 00:02:14, metric 1
> to 172.20.103.10 via ge-0/0/4.103
192.168.2.1/32 [OSPF/10] 00:01:33, metric 1
to 172.20.77.2 via ge-0/0/1.0
> to 172.20.66.2 via ge-0/0/2.0
192.168.2.2/32 [OSPF/10] 00:01:33, metric 2
Note
The OSPF adjacency state for each
neighbor is dependent on that neighbors
configuration.
Junos Operating System Highlights
Lab 314 Configuring OSPF on Junos OS Devices www.juniper.net
to 172.20.77.2 via ge-0/0/1.0
> to 172.20.66.2 via ge-0/0/2.0
224.0.0.5/32 *[OSPF/10] 00:02:24, metric 1
MultiRecv
Question: Are all of the OSPF routes for the remote
subnet and loopback destinations active? Why?
Answer: No, the OSPF routes for the remote subnet
and loopback destinations should not be active
(Note the lack of a * in front of most of the OSPF
routes). We still have the static routes in place,
which have a route preference of 5, making them
more preferred than OSPF routes. (Internal OSPF
routes use a route preference of 10, by default.)
Step 3.5 Step 3.5 Step 3.5 Step 3.5
Delete all static routes used for internal connectivity.
[edit protocols ospf]
lab@srxB-1# top edit routing-options
[edit routing-options]
lab@srxB-1# show
static {
route 192.168.1.2/32 next-hop 172.20.103.10;
route 192.168.2.1/32 next-hop 172.20.66.2;
route 192.168.2.2/32 next-hop 172.20.66.2;
route 172.22.104.0/24 next-hop 172.20.66.2;
[edit routing-options]
lab@srxB-1# delete static route 192.168.1.2/32
[edit routing-options]
lab@srxB-1# delete static route 192.168.2.1/32
[edit routing-options]
lab@srxB-1# delete static route 192.168.2.2/32
[edit routing-options]
lab@srxB-1# delete static route 172.20.10v.0/24
[edit routing-options]
lab@srxB-1# show
[edit routing-options]
lab@srxB-1#
Step 3.6 Step 3.6 Step 3.6 Step 3.6
Activate the configuration and return to operational mode. Issue the show route
protocol ospf command to verify that the OSPF routes are now active.
Junos Operating System Highlights
www.juniper.net Configuring OSPF on Junos OS Devices Lab 315
[edit routing-options]
lab@srxB-1# commit and-quit
commit complete
Exiting configuration mode
lab@srxB-1> show route protocol ospf
inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
172.20.104.0/24 *[OSPF/10] 00:07:13, metric 2
to 172.20.77.2 via ge-0/0/1.0
> to 172.20.66.2 via ge-0/0/2.0
192.168.1.2/32 *[OSPF/10] 00:07:54, metric 1
> to 172.20.103.10 via ge-0/0/4.103
192.168.2.1/32 *[OSPF/10] 00:07:13, metric 1
to 172.20.77.2 via ge-0/0/1.0
> to 172.20.66.2 via ge-0/0/2.0
192.168.2.2/32 *[OSPF/10] 00:07:13, metric 2
to 172.20.77.2 via ge-0/0/1.0
> to 172.20.66.2 via ge-0/0/2.0
224.0.0.5/32 *[OSPF/10] 00:08:04, metric 1
MultiRecv
lab@srxB-1>
Question: Are all of the OSPF routes for the remote
subnet and loopback destinations active now?
Answer: Yes, all OSPF routes should now be active.
(Notice that the * is now present for all of the OSPF
routes.)
Step 3.7 Step 3.7 Step 3.7 Step 3.7
Ping the loopback address of all internal devices to verify reachability through the
OSPF routes.
lab@srxB-1> ping 192.168.1.2 rapid count 25
PING 192.168.1.2 (192.168.1.2): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!
--- 192.168.1.2 ping statistics ---
25 packets transmitted, 25 packets received, 0% packet loss
round-trip min/avg/max/stddev = 3.445/4.646/9.481/1.217 ms
lab@srxB-1> ping 192.168.2.1 rapid count 25
PING 192.168.2.1 (192.168.2.1): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!
--- 192.168.2.1 ping statistics ---
25 packets transmitted, 25 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.736/5.888/11.097/1.327 ms
lab@srxB-1> ping 192.168.2.2 rapid count 25
PING 192.168.2.2 (192.168.2.2): 56 data bytes
Junos Operating System Highlights
Lab 316 Configuring OSPF on Junos OS Devices www.juniper.net
!!!!!!!!!!!!!!!!!!!!!!!!!
--- 192.168.2.2 ping statistics ---
25 packets transmitted, 25 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.069/7.120/54.837/9.810 ms
lab@srxB-1>
Question: Do the ping tests succeed?
Answer: Yes, the ping tests should succeed, due to
the OSPF routes in your devices route table.

STOP
You have completed Lab 3. Congratulations! You have completed the lab You have completed Lab 3. Congratulations! You have completed the lab You have completed Lab 3. Congratulations! You have completed the lab You have completed Lab 3. Congratulations! You have completed the lab
portion of this course. portion of this course. portion of this course. portion of this course.
Junos Operating System Highlights
Appendix A: Lab Diagrams
Junos Operating System Highlights
A2 Lab Diagrams www.juniper.net

You might also like