Junos® OS
Overview for Junos OS
Published
2024-06-23
Juniper Networks, Inc.
1133 Innovaon Way
Sunnyvale, California 94089
USA
408-745-2000
www.juniper.net
Juniper Networks, the Juniper Networks logo, Juniper, and Junos are registered trademarks of Juniper Networks, Inc.
in the United States and other countries. All other trademarks, service marks, registered marks, or registered service
marks are the property of their respecve owners.
Juniper Networks assumes no responsibility for any inaccuracies in this document. Juniper Networks reserves the right
to change, modify, transfer, or otherwise revise this publicaon without noce.
Junos® OS Overview for Junos OS
Copyright © 2024 Juniper Networks, Inc. All rights reserved.
The informaon in this document is current as of the date on the tle page.
YEAR 2000 NOTICE
Juniper Networks hardware and soware products are Year 2000 compliant. Junos OS has no known me-related
limitaons through the year 2038. However, the NTP applicaon is known to have some diculty in the year 2036.
END USER LICENSE AGREEMENT
The Juniper Networks product that is the subject of this technical documentaon consists of (or is intended for use
with) Juniper Networks soware. Use of such soware is subject to the terms and condions of the End User License
Agreement ("EULA") posted at hps://support.juniper.net/support/eula/. By downloading, installing or using such
soware, you agree to the terms and condions of that EULA.
ii
Table of Contents
About This Guide | vi
1
Understanding Junos OS
Junos OS Soware Overview | 2
About the Overview for Junos OS | 2
Junos OS Overview | 3
Junos OS Architecture Overview | 5
Router Hardware Components | 7
Junos OS Roung Engine Components and Processes | 9
Junos OS Roung Processes | 11
Default Directories for Junos OS File Storage on the Network Device | 22
Junos OS Support for IPv4, IPv6, and MPLS Roung Protocols | 24
Junos OS Roung and Forwarding Tables | 26
Roung Policy Overview | 27
Junos OS Support for VPNs | 28
Conguring FIB Localizaon | 29
FIB Localizaon Overview | 29
Example: Conguring Packet Forwarding Engine FIB Localizaon | 30
Requirements | 31
Overview | 31
Conguraon | 31
Vericaon | 34
Junos OS Security Overview | 38
Junos OS Features for Device Security | 38
Junos OS Default Sengs for Device Security | 43
Junos OS Conguraon Overview | 44
iii
Junos OS Conguraon Basics | 44
Methods for Conguring Junos OS | 45
Junos OS Conguraon from External Devices | 48
The Commit Model for Conguraons | 48
Conguraon Groups Overview | 50
2
Conguring and Administering Junos Devices
Conguring Junos Devices | 52
Inial Router or Switch Conguraon Using Junos OS | 52
Conguring Junos OS for the First Time on a Device with a Single Roung Engine | 53
Conguring Junos OS for the First Time on a Device with Dual Roung Engines | 58
How to Improve Commit Time When Using Conguraon Groups | 64
Creang and Acvang a Candidate Conguraon | 65
Format for Specifying IP Addresses, Network Masks, and Prexes in Junos OS Conguraon
Statements | 65
Format for Specifying Filenames and URLs in Junos OS CLI Commands | 66
Mapping the Name of the Router to IP Addresses | 67
Conguring Automac Mirroring of the CompactFlash Card on the Hard Drive | 68
Using Junos OS to Specify the Number of Conguraons Stored on the CompactFlash Card | 69
Back Up Conguraons to an Archive Site | 70
Congure the Transfer of the Acve Conguraon | 70
Conguring Junos OS to Set Console and Auxiliary Port Properes | 72
Monitoring Junos Devices | 74
Junos OS Tools for Monitoring | 74
Tracing and Logging Junos OS Operaons | 75
Understanding Dropped Packets and Untransmied Trac Using show Commands | 77
Log a User Out of the Device | 81
Managing Junos OS Processes | 82
iv
Saving Core Files from Junos OS Processes | 82
Viewing Core Files from Junos OS Processes | 83
Disabling Junos OS Processes | 84
Conguring Failover to Backup Media If a Junos OS Process Fails | 84
Using Virtual Memory for Process Conguraon Data | 85
3
Conguraon Statements and Operaonal Commands
Junos CLI Reference Overview | 87
v
About This Guide
Use this guide to get familiar with the various funcons of Junos OS devices, and learn how to
congure, monitor, and manage them.
vi
1
PART
Understanding Junos OS
Junos OS Soware Overview | 2
Junos OS Security Overview | 38
Junos OS Conguraon Overview | 44
CHAPTER 1
Junos OS Soware Overview
IN THIS CHAPTER
About the Overview for Junos OS | 2
Junos OS Overview | 3
Junos OS Architecture Overview | 5
Router Hardware Components | 7
Junos OS Roung Engine Components and Processes | 9
Junos OS Roung Processes | 11
Default Directories for Junos OS File Storage on the Network Device | 22
Junos OS Support for IPv4, IPv6, and MPLS Roung Protocols | 24
Junos OS Roung and Forwarding Tables | 26
Roung Policy Overview | 27
Junos OS Support for VPNs | 28
Conguring FIB Localizaon | 29
About the Overview for Junos OS
The Overview for Junos OS is intended to provide a technical and detailed exploraon of Junos OS,
explaining both concepts and operaonal principles, as well as how to congure and use Juniper
Networks devices.
In this guide, we cover:
Understanding Junos OS
Security management
Device conguraon
Device monitoring
Managing network devices
2
Using conguraon statements and operaonal commands
For a basic introducon to Junos OS, see the Geng Started Guide for Junos OS. It provides a high-level
descripon of Junos OS, describes how to access devices, and provides simple step-by-step instrucons
for inial device conguraon.
For introductory and overview informaon specic to Junos OS Evolved, see Introducing Junos OS
Evolved. This guide will acquaint you with Junos OS Evolved, the next generaon Junos OS, and explain
its strengths, similaries to, and dierences from Junos OS.
To learn how to use the Junos OS command-line interface (CLI) and understand more advanced Junos
OS topics, see the CLI User Guide. This guide explains how to use the CLI, enter conguraon
statements, manage conguraons, and enter operaonal commands for monitoring Junos OS
networking devices.
RELATED DOCUMENTATION
CLI User Guide
Geng Started Guide for Junos OS
Introducing Junos OS Evolved
Junos OS Overview
Juniper Networks provides high-performance network devices that create a responsive and trusted
environment for accelerang the deployment of services and applicaons over a single network. The
Junos operang system (Junos OS) is the foundaon of these high-performance networks. Unlike other
complex, monolithic soware architectures, Junos OS incorporates key design and developmental
dierences to deliver increased network availability, operaonal eciency, and exibility. These key
advantages are:
One operang system
Concurrent soware releases
Modular soware architecture
One Operang System
Unlike other network operang systems that share a common name but splinter into many dierent
programs, Junos OS is a cohesive operang system that is supported across all devices and product
lines. This enables Juniper Networks engineers to develop soware features once and share the features
across product lines simultaneously. Because features are common to a single source, generally these
3
features are implemented the same way for all of the product lines, reducing the training required to
learn dierent tools and methods for each product.
Concurrent Soware Releases
Each new mainline version of Junos OS is released concurrently for all product lines. Each new Junos OS
release includes working features released in previous versions of the soware and must achieve zero
crical regression errors. Any deprecated features or funcons are not only announced, but any needed
workarounds or soluons are provided. This discipline ensures reliable operaons for the enre release.
Modular Soware Architecture
Although individual architecture modules of Junos OS communicate through well-dened interfaces,
each module runs in its own protected memory space, prevenng one module from disrupng another.
It also enables the independent restart of each module as necessary. This is in contrast to monolithic
operang systems for which a malfuncon in one module can ripple to other modules, possibly causing
a full system crash or restart. This modular Junos OS architecture provides a high level of performance,
high availability, security, and device scalability not found in other operang systems.
Generally, Junos OS is preinstalled on your Juniper Networks device when you receive it from the
factory. When you rst power on the device, all soware starts automacally. You then congure the
soware so that the device can parcipate in your network. However, if needed, you can order Juniper
Networks devices without any soware installed, for addional exibility.
You can upgrade the device soware as new features are added or soware problems are xed. You
obtain new soware by downloading images from the Juniper Networks Support website onto your
device or another system on your local network, then install the soware upgrade on the device.
Juniper Networks devices run only binaries supplied by Juniper Networks. Each Junos OS image
includes a digitally signed manifest of executables, which are registered with the system only if the
signature can be validated. Junos OS will not execute any binary without a registered ngerprint. This
feature protects the system against unauthorized soware and acvity that might compromise the
integrity of your network devices.
RELATED DOCUMENTATION
Junos OS Architecture Overview | 5
Junos OS Commit Model for Conguraons
Junos OS Conguraon Basics | 44
Router Hardware Components | 7
Junos OS Roung and Forwarding Tables | 26
Junos OS Roung Engine Components and Processes | 9
Junos OS Support for IPv4, IPv6, and MPLS Roung Protocols | 24
4
Junos OS Support for VPNs | 28
Roung Policy Overview | 27
Junos OS Architecture Overview
IN THIS SECTION
Roung Process Architecture | 5
This topic provides an overview of the Junos OS
roung process architecture:
Roung Process Architecture
The roung process is handled by the following two components (see Figure 1 on page 6):
Roung Engine
Packet Forwarding Engine
Because this architecture separates control operaons such as roung updates and system management
from packet forwarding, the router can deliver superior performance and highly reliable Internet
operaon.
5
Figure 1: Product Architecture
Packet Forwarding Engine
The Packet Forwarding Engine uses applicaon-specic integrated circuits (
ASIC
s) to perform Layer 2
and Layer 3 packet switching, route lookups, and packet forwarding. The Packet Forwarding Engine
forwards packets between input and output interfaces.
Roung Engine
The Roung Engine controls the roung updates and the system management. The Roung Engine
consists of roung protocol soware processes running inside a protected memory environment on a
general-purpose computer plaorm. The Roung Engine handles all of the roung protocol processes
6
and other soware processes that control the routers’ interfaces, some of the chassis components,
system management, and user access to the router. These routers and soware processes run on top of
a kernel that interacts with the Packet Forwarding Engine.
The Roung Engine has these features:
Roung protocol packets processing—All roung protocol packets from the network are directed to
the Roung Engine, and therefore do not unnecessarily delay the Packet Forwarding Engine.
Soware modularity—Soware funcons are in separate processes, so a failure of one process has
lile or no eect on other soware processes.
In-depth IP funconality—Each roung protocol is implemented with a complete set of IP features
and provides full exibility for adversing, ltering, and modifying routes. Roung policies are set
according to route parameters, such as
prex
, prex lengths, and Border Gateway Protocol (
BGP
)
aributes.
Scalability—Junos OS roung tables are designed to hold all the routes used in current and near-
future networks. Addionally, Junos OS can eciently support large numbers of
interfaces
and
virtual circuit
s.
Storage and change management—Conguraon les, system images, and microcode are held and
maintained in one primary and two secondary storage systems, perming local or remote upgrades.
Monitoring eciency and exibility—Alarms are generated and packets are counted without
adversely aecng packet forwarding performance.
The Roung Engine constructs and maintains one or more roung tables. From the roung tables, the
Roung Engine derives a table of acve routes, called the
forwarding table
, which is then copied into the
Packet Forwarding Engine. The forwarding table in the Packet Forwarding Engine can be updated
without interrupng the router’s forwarding.
RELATED DOCUMENTATION
Junos OS Overview | 3
Router Hardware Components
Junos OS runs on all Juniper Networks devices, including both routers and switches. This secon
focuses specically on router hardware components.
Table 1 on page 8 lists the major hardware components in each router series.
7
NOTE: The ACX Series router is a single-board router with a built-in Roung Engine and one
Packet Forwarding Engine. The “pseudo” FPCs and PICs are described in
ACX2000 and
ACX2100 Routers Hardware and CLI Terminology Mapping
.
Table 1: Major Router Hardware Components
M Series MX Series T Series PTX Series J Series
Roung Engines X X X X X
Control Board X X X
Switch Interface Board (SIB) X X X
Forwarding Engine Board (FEB) X
Power Supply X X X X X
Cooling System X X X X X
Dense Port Concentrators (DPC) X
Switch Control Board (SCB) X
Flexible PIC Concentrators (FPC) X X X X
Physical Interface Module (PIM) X
Physical Interface Card (PIC) X X X X
Flexible PIC Concentrators (
FPCs
) are each populated by
PICs
for various interface types. On some
routers, the PICs are installed directly in the chassis.
For informaon about specic components in your router, refer to its hardware guide.
8
RELATED DOCUMENTATION
Junos OS Architecture Overview | 5
Junos OS Roung Engine Components and Processes
IN THIS SECTION
Roung Engine Kernel | 9
Inializaon Process | 10
Management Process | 10
Process Limits | 10
Roung Protocol Process | 10
Interface Process | 10
Chassis Process | 11
SNMP and MIB II Processes | 11
Junos OS also runs on the
Roung Engine
. Junos OS consists of soware processes that support
Internet roung
protocols
, control router interfaces and the router chassis, enable router system
management, and much more. Junos OS processes run on top of a
kernel
, which enables communicaon
between processes and provides a direct link to the Packet Forwarding Engine soware. Junos OS can
be used to congure roung protocols and router interface properes, as well as to monitor and
troubleshoot protocol and network connecvity problems.
The Roung Engine soware consists of several soware processes that control router funconality and
a kernel that provides the communicaon among the processes. Following is a lisng of the major
Roung Engine-related processes.
Roung Engine Kernel
The Roung Engine kernel provides the underlying infrastructure for all Junos OS processes, including
providing the link between the roung tables and the Roung Engine’s forwarding table. The kernel is
also responsible for all communicaon with the
Packet Forwarding Engine
, which includes keeping the
Packet Forwarding Engine’s copy of the forwarding table synchronized with the master copy in the
Roung Engine.
9
Inializaon Process
When the device boots, an inializaon process (init) starts and monitors all the other soware
processes.
If a soware process terminates or fails to start when called, the init process aempts to restart it a
limited number of mes and logs any failure informaon for further invesgaon.
Management Process
The management process (mgd) manages the conguraon of the router and all user commands. The
management process is responsible for nofying other processes when a new conguraon is
commied. A dedicated management process handles Junos XML protocol XML requests from its client,
which might be the CLI or any Junos XML protocol client.
Process Limits
There are limits to the total number of Junos OS processes that can run simultaneously on a device.
There are also limits set for the maximum number of iteraons of any single process. The limit for
iteraons of any single process can only be reached if the limit of overall system processes is not
exceeded.
Access methods such as
telnet
and
SSH
spawn mulple system processes for each session created. For
this reason, it might not be possible to simultaneously support the maximum number of access sessions
for mulple services.
Roung Protocol Process
Within Junos OS, the roung protocol process (rpd) controls the roung protocols that run on the
device. The rpd process starts all congured roung protocols and handles all roung messages. It
maintains one or more roung tables, which consolidate the roung informaon learned from all roung
protocols. From this roung informaon, the roung protocol process determines the acve routes to
network desnaons and installs these routes into the Roung Engine’s forwarding table. Finally, rpd
implements roung policy, which enables you to control the roung informaon that is transferred
between the roung protocols and the roung table. Using roung policy, you can lter and limit the
transfer of informaon as well as set properes associated with specic routes.
Interface Process
The Junos OS interface process enables you to congure and control the physical interface devices and
logical interfaces present in a network device. You can congure interface properes such as the
interface locaon, for example, in which slot the Flexible PIC Concentrator (FPC) is installed and in
10
which locaon on the FPC the
Physical Interface Card
(PIC) is installed, as well as the interface
encapsulaon and interface-specic properes. You can congure the interfaces currently present in the
device, as well as interfaces that are not present but that you might add later.
The Junos OS interface process communicates through the Junos OS kernel with the interface process
in the Packet Forwarding Engine, enabling Junos OS to track the status and condion of the network
device’s interfaces.
Chassis Process
The Junos OS chassis process (chassisd) enables you to congure and control the properes of the
device, including condions that trigger alarms. The chassisd on the Roung Engine communicates
directly with its peer processes running on the Packet Forwarding Engine.
SNMP and MIB II Processes
Junos OS supports the Simple Network Management Protocol (
SNMP
), which helps administrators
monitor the state of a device. The soware supports SNMP version 1 (SNMPv1), version 2 (SNMPv2,
also known as version 2c, or v2c), and version 3 (SNMPv3). The Junos OS implementaon of SNMP
does not include any of the security features that were originally included in the
IETF
SNMP dras but
were later dropped. The SNMP soware is controlled by the Junos OS SNMP and Management
Informaon Base II (MIB II) processes, which consist of an SNMP master agent and various subagents.
RELATED DOCUMENTATION
Junos OS Architecture Overview | 5
Junos OS Roung Processes
Junos OS consists of mulple processes that run on dierent plaorms and have unique funcons. The
separaon of funcons provides operaonal stability, because each process accesses its own protected
memory space. This secon provides a brief overview of Junos OS roung-specic processes.
As an example, Table 2 on page 12 describes the processes that run on MX Series 5G Universal
Roung Plaorms.
11
Table 2: Junos OS Processes on MX Series Plaorm
Process Name Descripon
Clksync process (RE) clksyncd Denes the operaon of synchronous Ethernet and
Precision Time Protocol (
PTP
) on a Juniper Networks
MX Series router. The operaon includes
communicaon with the Packet Forwarding Engine
(clock-sync module) to program and process clock
events from the
EEC
clock.
Operates the PTP stack, exchanges packets, and
handles the conguraon changes for the modular
MX Series (MX80).
Controls the conguraon and monitoring of the
overall operaon of the PTP funconality for chassis-
based MX Series plaorms (MX240, MX480, and so
on).
Clock-sync process (PFE) clock-sync Programs and monitors the modular interface card
(MIC), the CPLD, and the EEC clock. Peer of the
clksyncd process module.
Captures all PTP and Synchronous Ethernet stascs
on the Packet Forwarding Engine and provides them
to the Roung Engine.
Interchassis communicaon
process
iccpd Exchanges proprietary Junos OS messages between
two Juniper Networks MX Series routers that take
part in a mulchassis link aggregaon group (
LAG
).
Stascs agent process stats-agentd Acts as a relay process to collect interface stascs
for all soware development kit (
SDK
) applicaons.
Interacts with the pfed process to collect the logical
interface stascs for SDK applicaons.
Table 3 on page 13 lists other processes that are common across Junos OS roung plaorms.
12
Table 3: Junos OS Roung-Specic Processes
Process Name Descripon
Adapve services
process
adapve-services Manages the conguraon for
stateful rewall
,
Network Address Translaon (
NAT
), intrusion
detecon service (
IDS
), and IP Security (
IPsec
)
services on the Adapve Services
PIC
.
Alarm control process alarm-control Congures the system alarm.
Access Node Control
Protocol (
ANCP
)
process
ancpd-service Works with a special Internet Group Management
Protocol (
IGMP
) session to collect outgoing interface
mapping events in a scalable manner.
Applicaon
idencaon process
applicaon-idencaon Idenes an applicaon using intrusion detecon
and prevenon (
IDP
) to allow or deny trac based
on applicaons running on standard or nonstandard
ports.
RADIUS
accounng
process
audit-process Gathers stascal data that can be used for general
network monitoring, analyzing, and tracking usage
paerns, for billing a user based upon the amount of
me or type of services accessed.
Auto-conguraon
process
auto-conguraon Congures interfaces automacally.
Boot process bootp Enables a router, switch, or interface to act as a
Dynamic Host Conguraon Protocol (
DHCP
) or
bootstrap protocol (
BOOTP
) relay agent. DHCP
relaying is disabled.
Capve portal
content delivery
process
capve-portal-content-delivery Species the locaon to which a subscriber's inial
Internet browser session is redirected, enabling
inial provisioning and service selecon for the
subscriber.
13
Table 3: Junos OS Roung-Specic Processes
(Connued)
Process Name Descripon
Universal Edge Layer
2 Tunneling Protocol
process
ce-l2tp-service (M10, M10i, M7i, and MX Series routers only)
Establishes L2TP tunnels and Point-to-Point
Protocol (
PPP
) sessions through L2TP tunnels.
Ethernet
OAM
connecvity fault
management process
cfm Monitors the physical link between two switches.
Chassis control
process
chassis-control Manages the chassis.
Class of service
process
class-of-service Controls the network device’s
CoS
conguraon.
Ethernet clock
synchronizaon
process
clksyncd-service Uses Synchronous Ethernet (
SyncE
) for external
clock synchronizaon .
Cra interface
I/O
control process
cra-control Controls the I/O of the cra interface.
Database replicaon
process
database-replicaon (EX Series switches and MX Series routers only)
Manages the replicaon of updates from the
primary to the client in the database management
system.
Datapath trace
process
datapath-trace-service Traces the path taken by the packet through the
network.
Dynamic Host
Conguraon
Protocol process
dhcp-service (EX Series switches and MX Series routers only)
Enables a DHCP server to allocate network IP
addresses and deliver conguraon sengs to client
hosts without user intervenon.
14
Table 3: Junos OS Roung-Specic Processes
(Connued)
Process Name Descripon
Diameter process diameter-service Implements the Diameter protocol which uses the
Transmission Control Protocol (
TCP
) and Stream
Control Transmission Protocol (
SCTP
) instead of
User Datagram Protocol (
UDP
), for monitoring the
network.
Disk monitoring
process
disk-monitoring Checks the health of the hard drive on the Roung
Engine.
Dynamic ow
capture (
DFC
)
process
dynamic-ow-capture Controls the DFC conguraons on Monitoring
Services III PICs.
ECC
parity errors
logging process
ecc-error-logging Logs the ECC parity errors into the memory on the
Roung Engine.
Connecvity fault
management (
CFM
)
process
ethernet-connecvity-
fault-management
Provides IEEE 802.1ag OAM CFM database
informaon for CFM maintenance associaon end
points
(MEPs
) in a CFM session.
Ethernet
OAM
Link-
Fault-Management
process
ethernet-link-fault-management (EX Series switches and MX Series routers only)
Provides the OAM link fault management (
LFM
)
informaon for Ethernet interfaces.
Event processing
process
event-processing
or
eventd
Congures the applicaon to handle all generated
events.
Firewall
process rewall Manages the rewall conguraon and enables
accepng or rejecng packets that are transing an
interface on a device.
15
Table 3: Junos OS Roung-Specic Processes
(Connued)
Process Name Descripon
General
authencaon
process
general-authencaon-service (EX Series switches and MX Series routers only)
Manages general authencaon of a user.
Inter-Chassis
Communicaon
Protocol (
ICCP
)
process
iccp-service Synchronizes data within a set of two (or more)
PEs
that form a redundancy group (
RG
).
IDP
policy process idp-policy Enables various aack detecon and prevenon
techniques on trac traversing the network.
Integrated Local
Management
Interface process
ilmi Provides bidireconal exchange of management
informaon between two Asynchronous Transfer
Mode (
ATM
) interfaces across a physical connecon.
Inet process inet-process Congures the IP mulcast family.
Init process init Inializes the
USB
modem.
Interface control
process
interface-control Controls the router's or switch’s physical interface
devices and logical interfaces.
Kernel replicaon
process
kernel-replicaon Replicates the state of the backup Roung Engine
when graceful Roung Engine switchover (
GRES
) is
congured.
16
Table 3: Junos OS Roung-Specic Processes
(Connued)
Process Name Descripon
Layer 2 address
ooding and learning
process
l2-learning Enables a network device to:
Learn unicast media access control (
MAC
)
addresses to avoid ooding the packets to all the
ports in a bridge domain.
Create a source MAC entry in its source and
desnaon MAC tables for each MAC address
learned from packets received on ports that
belong to the bridge domain.
Layer 2 Control
Protocol process
l2cpd-service Enables features such as Layer 2 protocol tunneling
and nonstop bridging.
Link Aggregaon
Control Protocol
process
lacp The process:
Provides a standardized means for exchanging
informaon between partner systems on a link.
Allows the link aggregaon control instances to
reach agreement on the identy of the Link
Aggregaon Group (
LAG
) to which the link
belongs, and then to move the link to that LAG.
Enables the transmission and recepon
processes for the link to funcon in an orderly
manner.
Link management
process
link-management Manages trac engineering links.
Local policy decision
funcon process
local-policy-decision-funcon Regulates the collecon of stascs related to
applicaons and applicaon groups and tracking of
informaon about dynamic subscribers and stac
interfaces.
17
Table 3: Junos OS Roung-Specic Processes
(Connued)
Process Name Descripon
Logical system
mulplexer
process
logical-system-mux
or
lrmuxd
Manages mulple instances of the roung protocols
process (rpd) on a machine running logical routers.
MAC validaon
process
mac-validaon Congures MAC address validaon that enables a
network device to validate if received packets
contain a trusted IP source and an Ethernet MAC
source address.
Management
Informaon Base II
process
mib-process Provides the device's
MIB
II agent.
Mobile IP process mobile-ip Congures Junos OS Mobile IP features.
NFS
mount requests
process
mountd-service (Some EX Series switches and MX Series routers
only) Completes internal NFS mount requests for
MS-PIC and MS-MPC.
MPLS Periodic
Traceroute process
mpls-traceroute Enables tracing of forwarding equivalence classes
(
FECs
) for
LDP
Layered Service Providers (
LSPs
).
Mulservice process mspd Congures mulservice edge routers.
Mulcast Snooping
process
mulcast-snooping (EX Series switches and MX Series routers only)
Makes Layer 3 informaon, such as the MAC
addresses of members of a mulcast group, known
to Layer 2 devices, such as
VLAN
switches.
DNS
server process named-service Enables a device to resolve hostnames into
addresses.
18
Table 3: Junos OS Roung-Specic Processes
(Connued)
Process Name Descripon
Bidireconal
Forwarding Detecon
(BFD) process
neighbor-liveness Displays the process that species the maximum
length of me that the device waits for its neighbor
to re-establish an LDP session.
Remote
NFS
server
process
nfsd-service Provides remote le access for applicaons that
need NFS-based transport.
Network me
process
ntp Provides the mechanisms to synchronize me and
coordinate me distribuon in a large, diverse
network.
Packet-triggered
dynamic subscribers
and policy control
(PTCP) process
packet-triggered-subscribers Enables the applicaon of policies to dynamic
subscribers that are controlled by a subscriber
terminaon device.
Peer selecon service
process
peer-selecon-service Enables peer selecon.
Periodic packet
management process
periodic-packet-services Processes a variety of me-sensive periodic tasks
so that other processes can more opmally direct
their resources.
Packet Forwarding
Engine process
pfed Gathers and reports Packet Forwarding Engine
stascs.
Packet gateway
service process
pgcp-service
or
pgcpd
Congures the Packet Gateway Control Protocol
(
PGCP
) that is required for the border gateway
funcon (
BGF
) feature.
Pragmac General
Mulcast process
pgm Enables a reliable transport layer for mulcast
applicaons.
19
Table 3: Junos OS Roung-Specic Processes
(Connued)
Process Name Descripon
PIC services logging
process
pic-services-logging
or
fsad (the le system access
daemon)
Enables PICs to send special logging informaon to
the Roung Engine for archiving on the hard drive.
Point-to-Point
Protocol (
PPP
)
process
ppp Enables transporng IP trac across point-to-point
links.
Universal edge PPP
process
ppp-service Enables transporng IP trac across universal edge
routers.
Point-to-Point
Protocol over
Ethernet process
pppoe Allows users to connect to a network of hosts over a
bridge or access concentrator.
Process health
monitor process
process-monitor
or
pmond
Extends the SNMP
RMON
alarm infrastructure to
provide predened monitoring for a selected set of
object instances (such as le system usage, CPU
usage, and memory usage) and dynamic object
instances (such as Junos OS processes).
NOTE: The process health monitor process is
enabled by default on the Roung Engines of MX
Series routers, even when no service interfaces are
congured. To disable this process, include the
disable statement at the [edit system processes
process-monitor] hierarchy level.
Redundancy interface
management process
redundancy-interface-process Serves as an acve or backup process of an
applicaon server and can be congured to process
trac for more than one logical applicaon server.
Remote operaons
process
remote-operaons Provides the
ping
and
traceroute
MIBs.
20
Table 3: Junos OS Roung-Specic Processes
(Connued)
Process Name Descripon
Resource cleanup
process
resource-cleanup Enables cleaning of resources by enes other than
the applicaon itself.
Roung process roung Directs forwarding on the basis of roung tables,
which maintain a record of the routes to various
network desnaons.
Trac sampling
control process
sampling Performs packet sampling based on parcular input
interfaces and various elds in the packet header.
Session Border
Control (
SBC
)
conguraon process
sbc-conguraon-process Congures the session border controller
funconality that enables delivery of voice, video,
and other mulmedia services with assured quality
and security.
SDK
service process sdk-service Runs on the Roung Engine and enables
communicaon between the SDK applicaon and
Junos OS. Although the SDK service process is
present on the router, it is turned o by default.
Secure Neighbor
Discovery (
SND
)
protocol process
secure-neighbor-discovery
or
send
(EX Series switches and MX Series routers only)
Provides support for protecng
NDP
messages.
Service Deployment
System (
SDX
) process
service-deployment Enables Junos OS to work with the Session and
Resource Control (
SRC
) soware.
Simple Network
Management
Protocol (SNMP)
process
snmp Enables the monitoring of network devices from a
central locaon, and provides the device’s SNMP
primary agent.
21
Table 3: Junos OS Roung-Specic Processes
(Connued)
Process Name Descripon
SONET
Automac
Protecon Switching
(APS) process
sonet-aps Monitors any SONET interface that parcipates in
APS
.
Stac subscribers
process
stac-subscribers Associates subscribers with stacally congured
interfaces, and provides dynamic service acvaon
and acvaon for these subscribers.
Tunnel OAM process tunnel-oamd Enables the Operaons, Administraon, and
Maintenance of Layer 2 tunneled networks.
Virtual Router
Redundancy Protocol
(
VRRP
) process
vrrp (EX Series switches and MX Series routers only)
Enables hosts on a LAN to make use of redundant
roung plaorms on that LAN without requiring
more than the stac conguraon of a single default
route on the hosts.
Watchdog mer
process
watchdog Enables the watchdog mer when Junos OS
encounters a problem.
Default Directories for Junos OS File Storage on the Network Device
IN THIS SECTION
Directories on the Logical System | 23
Generally, Junos OS les are stored in the following directories on the device:
/altcong—When you back up the currently running and acve le system parons on the device to
standby parons using the request system snapshot command, the /cong directory is backed up to /
22
altcong. Normally, the /cong directory is on the CompactFlash card and /altcong is on the hard
disk.
/altroot—When you back up the currently running and acve le system parons on the router to
standby parons using the request system snapshot command, the root le system (/) is backed up to /
altroot. Normally, the root directory is on the CompactFlash card and /altroot is on the hard drive.
/congThis directory is located on the primary boot device, that is, on the permanent storage from
which the device booted (generally the CompactFlash card (device wd0) or internal ash storage).
This directory contains the current operaonal router or switch conguraon and the last three
commied conguraons, in the les juniper.conf, juniper.conf.1, juniper.conf.2, and juniper.conf.3,
respecvely.
/varThis directory is located either on the hard drive (device wd2) or internal ash storage. It
contains the following subdirectories:
/home—Contains users’ home directories, which are created when you create user access
accounts. For users using SSH authencaon, their .ssh le, which contains their SSH key, is
placed in their home directory. When a user saves or loads a conguraon le, that le is loaded
from the user’s home directory unless the user species a full pathname.
/db/cong—Contains up to 46 addional previous versions of commied conguraons, which
are stored in the les juniper.conf.4.gz through juniper.conf.49.gz.
/log—Contains system log and tracing les.
/tmp—Contains core les. The soware saves up to ve core les, numbered from 0 through 4.
File number 0 is the oldest core le and le number 4 is the newest core le. To preserve the
oldest core les, the soware overwrites the newest core le, number 4, with any subsequent
core le.
Each device ships with removable media (device wfd0) that contains a backup copy of Junos OS.
Directories on the Logical System
In addion to saving the conguraon of logical systems in the current juniper.conf le, each logical
system has an individual directory structure created in the /var/logical-systems/
logical-system-name
directory.
The /var/logical-systems/
logical-system-name
directory contains the following subdirectories:
/cong—Contains the current operaonal conguraon specic to the logical system.
/log—Contains system log and tracing les specic to the logical system.
23
To maintain backward compability for the log les with previous versions of Junos OS, a symbolic
link (symlink) from the /var/logs/
logical-system-name
directory to the /var/logical-systems/
logical-
system-name
directory is created when a logical system is congured.
/tmp—Contains temporary les specic to the logical system.
This le system for each logical system enables logical system users to view trace logs and modify logical
system les. Logical system administrators have full access to view and modify all les specic to the
logical system.
Logical system users and administrators can save and load conguraon les at the logical-system
hierarchy level using the save and load conguraon mode commands. In addion, they can also issue the
show log, monitor, and file operaonal mode commands at the logical-system hierarchy level.
RELATED DOCUMENTATION
Format for Specifying Filenames and URLs in Junos OS CLI Commands | 66
Junos OS Support for IPv4, IPv6, and MPLS Roung Protocols
Junos OS implements full IP roung funconality, providing support for IP version 4 and IP version 6
(IPv4 and IPv6, respecvely). The roung protocols are fully interoperable with exisng IP roung
protocols, and they have been developed to provide the scale and control necessary for the Internet
core.
Junos OS supports the following unicast roung protocols:
BGP—Border Gateway Protocol version 4 is an
EGP
that guarantees loop-free exchange of roung
informaon between roung domains (also called autonomous systems). BGP, in conjuncon with
Junos OS roung policies, provides a system of administrave checks and balances that can be used
to implement peering and transit agreements.
ICMP—Internet Control Message Protocol router discovery enables hosts to discover the addresses
of operaonal routers on the subnet.
IS-IS—Intermediate System to Intermediate System is a link-state
IGP
for IP networks that uses the
SPF
algorithm, which also is referred to as the
Dijkstra
algorithm, to determine routes. The Junos OS
supports a new and complete implementaon of the protocol, addressing issues of scale,
convergence, and resilience.
24
OSPF—Open Shortest Path First is an IGP that was developed for IP networks by the Internet
Engineering Task Force (
IETF
). OSPF is a link-state protocol that makes roung decisions based on
the
SPF
algorithm.
OSPF Version 2 supports IPv4. OSPF Version 3 supports IPv6. The fundamental mechanisms of
OSPF such as ooding, designated router (
DR
) elecon, area-based topologies, and the
SPF
calculaons remain unchanged in OSPF Version 3. Some dierences exist either because of changes
in protocol semancs between IPv4 and IPv6, or because of the need to handle the increased
address size of IPv6.
RIP—Roung Informaon Protocol version 2 is a distance-vector IGP for IP networks based on the
Bellman-Ford
algorithm. RIP dynamically routes packets between a subscriber and a service provider
without the subscriber having to congure BGP or to parcipate in the service provider’s
IGP
discovery process.
Junos OS also provides the following roung and Mulprotocol Label Switching (
MPLS
) applicaons
protocols:
Unicast
roung protocols:
BGP
ICMP
IS-IS
OSPF Version 2
RIP Version 2
Mulcast roung protocols:
DVMRP—Distance Vector Mulcast Roung Protocol is a
dense-mode
(
ood-and-prune
)
mulcast roung protocol.
IGMP—Internet Group Management Protocol versions 1 and 2 are used to manage membership in
mulcast groups.
MSDP—Mulcast Source Discovery Protocol enables mulple Protocol Independent Mulcast
(
PIM
)
sparse mode
domains to be joined. A rendezvous point (
RP
) in a PIM sparse mode domain
has a peer relaonship with an RP in another domain, enabling it to discover mulcast sources
from other domains.
PIM sparse mode and dense mode—Protocol-Independent Mulcast is a mulcast roung
protocol. PIM sparse mode routes to mulcast groups that might span wide-area and interdomain
internets. PIM dense mode is a ood-and-prune protocol.
25
SAP/SDP—Session Announcement Protocol and Session Descripon Protocol handle conference
session announcements.
MPLS applicaons protocols:
LDP—The Label Distribuon Protocol provides a mechanism for distribung labels in non-trac-
engineered applicaons. LDP enables routers to establish label-switched paths (LSPs) through a
network by mapping network layer roung informaon directly to data-link layer switched paths.
LSPs created by LDP can also traverse LSPs created by the Resource Reservaon Protocol (
RSVP
).
MPLS—Mulprotocol Label Switching, formerly known as tag switching, enables you to manually
or dynamically congure LSPs through a network. It lets you direct trac through parcular paths
rather than rely on the IGP least-cost algorithm to choose a path.
RSVPThe Resource Reservaon Protocol version 1 provides a mechanism for engineering
network trac paerns that is independent of the shortest path decided upon by a roung
protocol. RSVP itself is not a roung protocol; it operates with current and future unicast and
mulcast roung protocols. The primary purpose of RSVP is to support dynamic signaling for
MPLS LSPs.
RELATED DOCUMENTATION
Junos OS Overview
Junos OS Roung and Forwarding Tables
A major funcon of the Junos OS roung protocol process is to maintain the Roung Engine’s roung
tables and use these tables to determine the acve routes to network desnaons. The roung protocol
process then installs these routes into the Roung Engine’s forwarding table. The Junos OS kernel then
copies this forwarding table to the Packet Forwarding Engine.
The roung protocol process maintains mulple roung tables. By default, it maintains the following
three roung tables. You can congure addional roung tables to suit your requirements.
Unicast
roung table—Stores roung informaon for all unicast roung protocols running on the
router. BGP, IS-IS, OSPF, and RIP all store their roung informaon in this roung table. You can
congure addional routes, such as stac routes, to be included in this roung table. BGP, IS-IS,
OSPF, and RIP use the routes in this roung table when adversing roung informaon to their
neighbors.
26
Mulcast roung table (cache)—Stores roung informaon for all the running mulcast protocols.
DVMRP
and
PIM
both store their roung informaon in this roung table, and you can congure
addional routes to be included in this roung table.
MPLS roung table—Stores
MPLS
path and label informaon.
With each roung table, the roung protocol process uses the collected roung informaon to
determine acve routes to network desnaons.
For
unicast
routes, the roung protocol process determines acve routes by choosing the most
preferred route, which is the route with the lowest preference value. By default, the route’s preference
value is simply a funcon of how the roung protocol process learned about the route. You can modify
the default preference value using roung policy and with soware conguraon parameters.
For
mulcast
trac, the roung protocol process determines acve routes based on trac ow and
other parameters specied by the mulcast roung protocol algorithms. The roung protocol process
then installs one or more acve routes to each network desnaon into the Roung Engines forwarding
table.
RELATED DOCUMENTATION
Roung Policy Overview | 27
Roung Policy Overview
By default, all roung protocols place their routes into the
roung table
. When adversing routes, the
roung protocols by default adverse only a limited set of routes from the roung table. Specically,
each roung protocol exports only the acve routes that were learned by that protocol. In addion, the
interior gateway protocols (IS-IS, OSPF, and RIP) export the direct (interface) routes for the interfaces on
which they are explicitly congured.
You can control the routes that a protocol places into each table and the routes from that table that the
protocol adverses. You do this by dening one or more roung policies and then applying them to the
specic roung protocol.
Roung policies applied when the roung protocol places routes into the roung table are referred to as
import policies
because the routes are being imported into the roung table. Policies applied when the
roung protocol is adversing routes that are in the roung table are referred to as
export policies
because the routes are being exported from the roung table. In other words, the terms
import
and
export
are used with respect to the roung table.
27
A roung policy enables you to control (lter) which routes a roung protocol imports into the roung
table and which routes a roung protocol exports from the roung table. A roung policy also enables
you to set the informaon associated with a route as it is being imported into or exported from the
roung table. Filtering imported routes enables you to control the routes used to determine acve
routes. Filtering routes being exported from the roung table enables you to control the routes that a
protocol adverses to its neighbors.
A dened roung policy species the condions to use to match a route and the acon to perform on
the route when a match occurs. For example, when a roung table imports roung informaon from a
roung protocol, a roung policy might modify the route’s preference, mark the route with a color to
idenfy it and allow it to be manipulated later, or prevent the route from even being installed in a
roung table. When a roung table exports routes into a roung protocol, a policy might assign metric
values, modify the BGP community informaon, tag the route with addional informaon, or prevent
the route from being exported altogether. You also can dene policies for redistribung the routes
learned from one protocol into another protocol.
RELATED DOCUMENTATION
Junos OS Roung and Forwarding Tables | 26
Junos OS Support for IPv4, IPv6, and MPLS Roung Protocols | 24
Junos OS Support for VPNs
Junos OS supports several types of virtual private networks (
VPNs
), including:
Layer 2 VPNs link a set of sites that share roung informaon, and whose connecvity is controlled
by a collecon of policies. A Layer 2 VPN is not aware of routes within your network. It simply
provides private links between sites over the service provider’s exisng public Internet
backbone
.
Layer 3 VPNs are the same as a Layer 2 VPN, but it is aware of routes within your network, requiring
more conguraon on the part of the service provider than a Layer 2 VPN. The sites that make up a
Layer 3 VPN are connected over a service provider’s exisng public Internet backbone.
An Ethernet VPN (EVPN) enables you to connect dispersed customer sites using a Layer 2 virtual
bridge. As with other types of VPNs, an EVPN consists of customer edge (CE) devices (host, router,
or switch) connected to provider edge (PE) routers. The PE routers can include an MPLS edge switch
(MES) that acts at the edge of the MPLS infrastructure. Either an MX Series 5G Universal Roung
Plaorm or a standalone switch can be congured to act as an MES. You can deploy mulple EVPNs
within a service provider network, each providing network connecvity to a customer while ensuring
that the trac sharing on that network remains private.
28
Interprovider VPNs supply connecvity between two VPNs in separate autonomous systems (
AS
s).
This funconality can be used by a VPN user with connecons to several Internet service providers
(
ISP
s), or dierent connecons to the same ISP in various geographic regions.
Carrier-of-carrier VPNs allow a VPN service provider to supply VPN service to a someone who is also
a service provider. The laer service provider supplies Internet or VPN service to an end user.
RELATED DOCUMENTATION
Junos OS Overview | 3
Conguring FIB Localizaon
IN THIS SECTION
FIB Localizaon Overview | 29
Example: Conguring Packet Forwarding Engine FIB Localizaon | 30
FIB Localizaon Overview
On Juniper Networks devices, the forwarding table on the Packet Forwarding Engine, also referred to as
forwarding informaon base (FIB), maintains the complete set of acve IPv4 (inet) and IPv6 (inet6)
routes. In Junos OS Release 11.4 and later, you can congure FIB localizaon for a Packet Forwarding
Engine. FIB-localizaon characterizes Packet Forwarding Engines in a router as either “FIB-remote” or
“FIB-local”.
FIB-local Packet Forwarding Engines install all routes from the default inet and inet6 route tables into
the Packet Forwarding Engine forwarding hardware. FIB-remote Packet Forwarding Engines do not
install all the routes for the inet and inet6 roung tables. However, they do maintain local and mulcast
routes.
FIB-remote Packet Forwarding Engines create a default (0/0) route in the Packet Forwarding Engine
forwarding hardware for the inet and inet6 table. The default route references a next-hop or a unilist of
next-hops that idenfy the FIB-local Packet Forwarding Engines that can perform full IP table lookups
for received packets.
FIB-remote Packet Forwarding Engines forward received packets to the set of FIB-local Packet
Forwarding Engines. The FIB-local Packet Forwarding Engines then perform full IP longest-match lookup
29
on the desnaon address and forward the packet appropriately. The packet might be forwarded out of
an egress interface on the same FIB-local Packet Forwarding Engine that performed the lookup or an
egress interface on a dierent FIB-local or FIB-remote Packet Forwarding Engine. The packet might also
be forwarded out of an FPC where FIB localizaon is not congured. The packet might also be received
locally at the Roung Engine.
When FIB localizaon is congured on a router with some Flexible PIC Concentrators (FPCs) being FIB-
remote and some others being FIB-local, packets arriving on the interface of the FIB-remote FPC are
forwarded to one of the FIB-local FPCs for route lookup and forwarding.
The advantage of conguring FIB localizaon is that it enables upgrading the hardware forwarding table
capacity of FIB-local Packet Forwarding Engines while not requiring upgrades to the FIB-remote Packet
Forwarding Engines. In a typical network deployment, FIB-local Packet Forwarding Engines are core-
facing, while FIB-remote Packet Forwarding Engines are edge-facing. The FIB-remote Packet Forwarding
Engines also load-balance trac over the available set of FIB-local Packet Forwarding Engines.
FIB localizaon is currently supported on specic Junos OS devices, including the T320, T640, T1600,
and MX Series routers. To see if your hardware supports FIB localizaon, see the Juniper Networks
Feature Explorer.
NOTE: On MX Series routers, you can congure mulservices Dense Port Concentrators (DPCs)
as FIB-remote. However, only Modular Port Concentrators (MPCs) can be congured as FIB-
local. FIB-localizaon is supported only for redundant link services intelligent queuing interfaces
that carry Mullink Point-to-Point Protocol (MLPPP) trac.
Example: Conguring Packet Forwarding Engine FIB Localizaon
IN THIS SECTION
Requirements | 31
Overview | 31
Conguraon | 31
Vericaon | 34
This example shows how to congure Packet Forwarding Engine FIB localizaon.
30
Requirements
Before you begin:
1. Congure device interfaces and loopback interface addresses.
2. Congure stac routes.
3. Congure OSPF and OSPFv3 and make sure that OSPF adjacencies and OSPF routes to loopback
addresses are established.
This example uses the following hardware and soware components:
A T320, T640,T1600, or MX Series router.
Junos OS Release 11.4 or later running on the router for T-Series routers. Junos OS Release 12.3 or
later running on the router for MX Series routers.
Overview
In this example, you congure the chassis for IPv4 and IPv6 routes and FIB localizaon on Router R0
and then congure the edge-facing Packet Forwarding Engines on FPC0 as fib-remote and the core-facing
Packet Forwarding Engines on FPC1 and FPC2 as fib-local. You then congure a roung policy named
fib-policy with the no-route-localize opon to ensure that all routes from a specied route lter are
installed on the FIB-remote FPC.
Conguraon
IN THIS SECTION
Procedure | 31
Procedure
CLI Quick Conguraon
To quickly congure this example, copy the following commands, paste them into a text le, remove any
line breaks, change any details necessary to match your network conguraon, and then copy and paste
the commands into the CLI at the [edit] hierarchy level.
31
NOTE: Conguring FIB local results in a reboot of the related line card to acvate the changes.
R0
set chassis fpc 0 route-localization fib-remote
set chassis fpc 1 route-localization fib-local
set chassis fpc 2 route-localization fib-local
set chassis route-localization inet
set chassis route-localization inet6
set policy-options policy-statement fib-policy term a from route-filter 10.4.4.4/32 exact
set policy-options policy-statement fib-policy term a then no-route-localize
set policy-options policy-statement fib-policy term b from route-filter fec0:4444::4/128 exact
set policy-options policy-statement fib-policy term b then no-route-localize
set policy-options policy-statement fib-policy then accept
set routing-options forwarding-table export fib-policy
Step-by-Step Procedure
The following example requires you to navigate various levels in the conguraon hierarchy. For
informaon about navigang the Junos OS CLI, see the Junos OS CLI User Guide.
To congure Packet Forwarding Engine FIB localizaon:
1. Congure route localizaon or FIB localizaon for IPv4 and IPv6 trac.
[edit chassis]
user@R0# set route-localization inet
user@R0# set route-localization inet6
2. Congure the Packet Forwarding Engine of an FPC as either fib-local or fib-remote.
[edit chassis]
user@R0# set fpc 0 route-localization fib-remote
user@R0# set fpc 1 route-localization fib-local
user@R0# set fpc 2 route-localization fib-local
32
3. Congure the roung policy by including the no-route-localize statement to enable the forwarding
table policy to mark route prexes such that the routes are installed into forwarding hardware on the
FIB-remote Packet Forwarding Engines.
[edit policy-options]
user@R0# set policy-statement fib-policy term a from route-filter 10.4.4.4/32 exact
user@R0# set policy-statement fib-policy term a then no-route-localize
user@R0# set policy-statement fib-policy term b from route-filter fec0:4444::4/128 exact
user@R0# set policy-statement fib-policy term b then no-route-localize
user@R0# set policy-statement fib-policy then accept
4. Enable the roung policy in the forwarding table by conguring the forwarding table with the fib-
policy statement.
[edit routing-options]
user@R0# set forwarding-table export fib-policy
NOTE: At least, one Packet Forwarding Engine must be congured as fib-local for the commit
operaon to be successful. If you do not congure fib-local for the Packet Forwarding Engine,
the CLI displays an appropriate error message and the commit fails.
Results
From conguraon mode, conrm your conguraon by entering the show chassis and show policy-options
commands. If the output does not display the intended conguraon, repeat the instrucons in this
example to correct the conguraon.
user@R0# show chassis
fpc 0 {
route-localization fib-remote;
}
fpc 1 {
route-localization fib-local;
}
fpc 2 {
route-localization fib-local;
}
route-localization {
33
inet;
inet6;
}
user@R0# show policy-options
policy-statement fib-policy {
term a {
from {
route-filter 10.4.4.4/32 exact;
}
then no-route-localize;
}
term b {
from {
route-filter fec0:4444::4/128 exact;
}
then no-route-localize;
}
then accept;
}
}
Vericaon
IN THIS SECTION
Verifying Policy Conguraon | 35
Verifying FIB-Localizaon Conguraon | 35
Verifying Routes Aer the Policy Is Applied | 36
Conrm that the conguraon is working properly.
34
Verifying Policy Conguraon
Purpose
Verify that the congured policy exists.
Acon
Issue the show policy fib-policy command to check that the congured policy fib-policy exists.
user@R0> show policy fib-policy
Policy fib-policy:
Term a:
from
route filter:
10.4.4.4/32 exact
then no-route-localize
Term b:
from
route filter:
fec0:4444::4/128 exact
then no-route-localize
Term unnamed:
then accept
Verifying FIB-Localizaon Conguraon
Purpose
Verify FIB-localizaon conguraon details by using the show route localization and show route localization
detail commands.
Acon
user@R0> show route localization
FIB localization ready FPCs (and FIB-local Forwarding Engine addresses)
FIB-local: FPC2(4,5)
35
FIB-remote: FPC0, FPC1
Normal: FPC3, FPC4, FPC5, FPC6, FPC7
user@R0> show route localization detail
FIB localization ready FPCs (and FIB-local Forwarding Engine addresses)
FIB-local: FPC2(4,5)
FIB-remote: FPC0, FPC1
Normal: FPC3, FPC4, FPC5, FPC6, FPC7
FIB localization configuration
Protocols: inet, inet6
FIB-local: FPC2
FIB-remote: FPC0, FPC1
Forwarding Engine addresses
FPC0: 1
FPC1: 2
FPC2: 4, 5
FPC3: 6
FPC4: 8
FPC5: 11
FPC6: 13
FPC7: 15
Verifying Routes Aer the Policy Is Applied
Purpose
Verify that routes with the no-route-localize policy opon are installed on the fib-remote FPC.
Acon
user@R0> show route 10.4.4.4/32 extensive
inet.0: 30 destinations, 30 routes (29 active, 0 holddown, 1 hidden)
10.4.4.4/32 (1 entry, 1 announced)
TSI:
KRT in-kernel 10.4.4.4/32 -> {10.130.0.2 Flags no-localize}
^^^^^^^^^^^^^^^^^
36
*Static Preference: 5
Next hop type: Router, Next hop index: 629
Next-hop reference count: 3
Next hop: 10.130.0.2 via ge-1/0/4.0, selected
State: <Active Int="">
Age: 10:33
Task: RT
Announcement bits (1): 0-KRT
AS path: I</Active
>
RELATED DOCUMENTATION
b-local
b-remote
no-route-localize
route-localizaon
37
CHAPTER 2
Junos OS Security Overview
IN THIS CHAPTER
Junos OS Features for Device Security | 38
Junos OS Default Sengs for Device Security | 43
Junos OS Features for Device Security
IN THIS SECTION
Methods of Remote Access for Device Management | 39
Junos OS Supported Protocols and Methods for User Authencaon | 39
Junos OS Plain-Text Password Requirements | 40
Junos OS Support for Roung Protocol Security Features and IPsec | 41
Junos OS Support for Firewall Filters | 41
Junos OS Support Distributed Denial-of-Service Protecon | 42
Junos OS Auding Support for Security | 42
Device security consists of three major elements: Physical security of the hardware, operang system
security, and security that can be aected through conguraon.
Physical security involves restricng access to the device. Exploits that can easily be prevented from
remote locaons are extremely dicult or impossible to prevent if an aacker can gain access to the
device’s management port or console. The inherent security of Junos OS also plays an important role in
router security. Junos OS is extremely stable and robust, and provides features to protect against
aacks, allowing you to congure the device to minimize vulnerabilies.
The following are Junos OS features available to improve device security:
38
Methods of Remote Access for Device Management
When you rst install Junos OS, all remote access to the device is disabled, thereby ensuring that
remote access is possible only if deliberately enabled by an authorized user. You can establish remote
communicaon with a device in one of the following ways:
Out-of-band management: Enables connecon to the device through an interface dedicated to
device management. Juniper Networks devices support out-of-band management with a dedicated
management Ethernet interface, as well as EIA-232 console and auxiliary ports. On all devices other
than the TX Matrix Plus, T1600, T1600 or T4000 devices connected to a TX Matrix Plus device in a
roung matrix, and PTX Series Packet Transport Routers, the management interface is fxp0. On a TX
Matrix Plus, T1600, T1600 or T4000 devices in a roung matrix, and PTX Series Packet Transport
Routers, the management Ethernet Interface is labeled em0. The management Ethernet interface
connects directly to the Roung Engine. No transit trac is allowed through this interface, providing
complete separaon of customer and management trac and ensuring that congeson or failures in
the transit network do not aect the management of the device.
Inband management: Enables connecon to the devices using the same interfaces through which
customer trac ows. Although this approach is simple and requires no dedicated management
resources, it has two disadvantages:
Management ows and transit trac ows are mixed together. Any aack trac that is mixed
with the normal trac can aect the communicaon with the device.
The links between device components might not be totally trustworthy, leading to the possibility
of wiretapping and replay aacks.
For management access to the device, the standard ways to communicate with the device from a remote
console are with Telnet and SSH. SSH provides secure encrypted communicaons and is therefore
useful for inband device management. Telnet provides unencrypted, and therefore less secure, access to
the device.
Junos OS Supported Protocols and Methods for User Authencaon
On a device, you can create local user login accounts to control who can log in to the device and the
access privileges they have. A password, either an SSH key or a Message Digest 5 (MD5) password, is
associated with each login account. To dene access privileges, you create login classes into which you
group users with similar jobs or job funcons. You use these classes to explicitly dene what commands
their users are and are not allowed to issue while logged in to the device.
The management of mulple devices by many dierent personnel can create a user account
management problem. One soluon is to use a central authencaon service to simplify account
management, creang and deleng user accounts only on a single, central server. A central
authencaon system also simplies the use of one-me password systems such as SecureID, which
39
oer protecon against password sning and password replay aacks (aacks in which someone uses a
captured password to pose as a device administrator).
Junos OS supports two protocols for central authencaon of users on mulple devices:
Terminal Access Controller Access Control System Plus (TACACS+).
Remote Authencaon Dial-In User Service (RADIUS), a mulvendor IETF standard whose features
are more widely accepted than those of TACACS+ or other proprietary systems. All one-me-
password system vendors support RADIUS.
Junos OS also supports the following authencaon methods:
Internet Protocol Security (IPsec). IPsec architecture provides a security suite for the IPv4 and IPv6
network layers. The suite provides such funconality as authencaon of origin, data integrity,
condenality, replay protecon, and nonrepudiaon of source. In addion to IPsec, Junos OS
supports the Internet Key Exchange (IKE), which denes mechanisms for key generaon and
exchange, and manages security associaons (SAs).
MD5 authencaon of MSDP peering sessions. This authencaon provides protecon against
spoofed packets being introduced into a peering session.
SNMPv3 authencaon and encrypon. SNMPv3 uses the user-based security model (USM) for
message security and the view-based access control model (VACM) for access control. USM species
authencaon and encrypon. VACM species access-control rules.
Junos OS Plain-Text Password Requirements
Junos OS has special requirements when you create plain-text passwords on a device. The default
requirements for plain-text passwords are as follows:
The password must be between 6 and 128 characters long.
You can include uppercase leers, lowercase leers, numbers, punctuaon marks, and any of the
following special characters:
! @ # $ % ^ & * , + = < > : ;
Control characters are not recommended.
The password must contain at least one change of case or character class.
You can change the requirements for plain-text passwords.
You can include the plain-text-password statement at the following hierarchy levels:
[edit system diag-port-authentication]
[edit system pic-console-authentication]
40
[edit system root-authentication]
[edit system login user
username
authentication]
Junos OS Support for Roung Protocol Security Features and IPsec
The main task of a device is to forward user trac toward its intended desnaon based on the
informaon in the device’s roung and forwarding tables. You can congure roung policies that dene
the ows of roung informaon through the network, controlling which routes the roung protocols
place in the roung tables and which routes they adverse from the tables. You can also use roung
policies to change specic route characteriscs, change the BGP route ap-damping values, perform
per-packet load balancing, and enable
class of service
(CoS).
Aackers can send forged protocol packets to a device with the intent of changing or corrupng the
contents of its roung table or other databases, which can degrade the funconality of the device. To
prevent such aacks, you must ensure that devices form roung protocol peering or neighboring
relaonships with trusted peers. One way to do this is by authencang roung protocol messages. The
Junos OS BGP, IS-IS, OSPF, RIP, and RSVP protocols all support HMAC-MD5 authencaon, which uses
a secret key combined with the data being protected to compute a hash. When the protocols send
messages, the computed hash is transmied with the data. The receiver uses the matching key to
validate the message hash.
Junos OS supports the IPsec security suite for the IPv4 and IPv6 network layers. The suite provides such
funconality as authencaon of origin, data integrity, condenality, replay protecon, and
nonrepudiaon of source. Junos OS also supports IKE, which denes mechanisms for key generaon
and exchange, and manages SAs.
Junos OS Support for Firewall Filters
Firewall lters allow you to control packets transing the device to a network desnaon and packets
desned for and sent by the device. You can congure rewall lters to control which data packets are
accepted on and transmied from the physical interfaces, and which local packets are transmied from
the physical interfaces and the Roung Engine. Firewall lters provide a means of protecng your device
from excessive trac. Firewall lters that control local packets can also protect your device from
external aggressions, such as DoS aacks.
To protect the Roung Engine, you can congure a
rewall lter
only on the device’s loopback interface.
Adding or modifying lters for each interface on the device is not necessary. You can design rewall
lters to protect against ICMP and Transmission Control Protocol (TCP) connecon request (SYN) oods
and to rate-limit trac being sent to the Roung Engine.
41
Junos OS Support Distributed Denial-of-Service Protecon
A denial-of-service aack is any aempt to deny valid users access to network or server resources by
using up all the resources of the network element or server. Distributed denial-of-service aacks involve
an aack from mulple sources, enabling a much greater amount of trac to aack the network. The
aacks typically use network protocol control packets to trigger a large number of excepons to the
device’s control plane. This results in an excessive processing load that disrupts normal network
operaons.
Junos OS DDoS protecon enables the device to connue funconing while under an aack. It
idenes and suppresses malicious control packets while enabling legimate control trac to be
processed. A single point of DDoS protecon management enables network administrators to customize
proles for their network control trac. Protecon and monitoring persists across graceful Roung
Engine switchover (GRES) and unied in-service-soware-upgrade (ISSU) switchovers. Protecon is not
diminished as the number of subscribers increases.
To protect against DDoS aacks, you can congure policers for host-bound excepon trac. The
policers specify rate limits for individual types of protocol control packets or for all control packet types
for a protocol. You can monitor policer acons for packet types and protocol groups at the level of the
device, Roung Engine, and line cards. You can also control logging of policer events.
Flow detecon is an enhancement to DDoS protecon that supplements the DDoS policer hierarchies
by using a limited amount of hardware resources to monitor the arrival rate of host-bound ows of
control trac. Flow detecon is much more scalable than a soluon based on lter policers. Filter
policers track all ows, which consumes a considerable amount of resources. In contrast, ow detecon
only tracks ows it idenes as suspicious, using far fewer resources to do so.
The ow detecon applicaon has two interrelated components, detecon and tracking. Detecon is
the process where ows suspected of being improper are idened and subsequently controlled.
Tracking is the process where ows are tracked to determine whether they are truly hosle and when
these ows recover to within acceptable limits.
Junos OS Auding Support for Security
Junos OS logs signicant events that occur on the device and within the network. Although logging itself
does not increase security, you can use the system logs to monitor the eecveness of your security
policies and device conguraons. You can also use the logs when reacng to a connued and
deliberate aack as a means of idenfying the source address, device, or port of the aacker’s trac.
You can congure the logging of dierent levels of events, from only crical events to all events,
including informaonal events. You can then inspect the contents of the system log les either in real
me or later.
Debugging and troubleshoong are much easier when the mestamps in the system log les of all
devices are synchronized, because events that span the network might be correlated with synchronous
42
entries in mulple logs. Junos OS supports the Network Time Protocol (NTP), which you can enable on
the device to synchronize the system clocks of devices and other networking equipment. By default,
NTP operates in an unauthencated mode. You can congure various types of authencaon, including
an HMAC-MD5 scheme.
RELATED DOCUMENTATION
Overview of IPsec
Junos OS System Log Overview
Junos OS Default Sengs for Device Security
Junos OS protects against common network device security weaknesses with the following default
sengs:
Junos OS does not forward directed broadcast messages. Directed broadcast services send ping
requests from a spoofed source address to a broadcast address and can be used to aack other
Internet users. For example, if broadcast ping messages were allowed on the 200.0.0.0/24 network, a
single ping request could result in up to 254 responses to the supposed source of the ping. The
source would actually become the vicm of a denial-of-service (DoS) aack.
Generally, by default, only console access to the device is enabled. Remote management access to
the device and all management access protocols, including Telnet, FTP, and SSH (Secure Shell), are
disabled by default, unless the device setup specically includes a factory-installed DHCP
conguraon.
Junos OS does not support the SNMP set capability for eding conguraon data. Although the
soware supports the SNMP set capability for monitoring and troubleshoong the network, this
support exposes no known security issues. (You can congure the soware to disable this SNMP set
capability.)
Junos OS ignores maran (intenonally non-routable) IP addresses that contain the following
prexes: 0.0.0.0/8, 127.0.0.0/8, 128.0.0.0/16, 191.255.0.0/16, 192.0.0.0/24, 223.255.55.0/24, and
240.0.0.0/4. Maran addresses are reserved host or network addresses about which all roung
informaon should be ignored.
43
CHAPTER 3
Junos OS Conguraon Overview
IN THIS CHAPTER
Junos OS Conguraon Basics | 44
Methods for Conguring Junos OS | 45
Junos OS Conguraon from External Devices | 48
The Commit Model for Conguraons | 48
Conguraon Groups Overview | 50
Junos OS Conguraon Basics
Usually, your Juniper Networks device comes with Junos OS installed on it, unless you specically order
it without the operang system. When Junos OS is pre-installed, you simply power on the device and all
soware starts automacally. You just need to congure the device so it will be ready to parcipate in
the network.
To congure the Junos OS, you must specify a hierarchy of conguraon statements which dene the
preferred soware properes. You can congure all properes of the Junos OS, including interfaces,
general roung informaon, roung protocols, and user access, as well as some system hardware
properes. Aer you have created a candidate conguraon, you commit the conguraon to be
evaluated and acvated by Junos OS.
RELATED DOCUMENTATION
Junos OS Conguraon from External Devices | 48
Methods for Conguring Junos OS | 45
Inial Router or Switch Conguraon Using Junos OS | 52
44
Methods for Conguring Junos OS
IN THIS SECTION
Junos OS Command-Line Interface | 46
ASCII File | 46
J-Web Package | 46
Junos XML Management Protocol Soware | 47
NETCONF XML Management Protocol Soware | 47
Conguraon Commit Scripts | 47
Depending on specic device support, you can use the methods shown in Table 4 on page 45 to
congure Junos OS. For more informaon, see the Juniper Networks Feature Explorer.
Table 4: Methods for
Conguring Junos OS
Method Descripon
Command-line interface
(CLI)
Create the conguraon for the device using the CLI. You can enter commands from a
single command line, and scroll through recently executed commands.
ASCII le Load an ASCII le containing a conguraon that you created earlier, either on this
system or on another system. You can then acvate and run the conguraon le, or
you can edit it using the CLI and then acvate it.
J-Web graphical user
interface (GUI)
Use the J-Web GUI to congure the device. J-Web enables you to monitor, congure,
troubleshoot, and manage the router on a client by means of a Web browser. The J-
Web GUI is supported on only certain Juniper Networks devices. For more
informaon, see the Juniper Networks Feature Explorer.
Junos XML
management protocol
(API)
Client applicaons use the Junos XML management protocol to monitor and congure
Juniper Networks devices. The Junos XML management protocol is customized for
Junos OS, and operaons in the API are equivalent to those in the CLI.
45
Table 4: Methods for Conguring Junos OS
(Connued)
Method Descripon
NETCONF applicaon
programming interface
(API)
Client applicaons use the NETCONF XML management protocol to monitor and
congure supported devices. The NETCONF XML management protocol includes
features that accommodate the conguraon data models of mulple vendors.
Conguraon commit
scripts
Create scripts that run at commit me to enforce custom conguraon rules. Commit
scripts are wrien in Python, Stylesheet Language Alternave syntaX (SLAX), or
Extensible Stylesheet Language Transformaons (XSLT).
The following
secons describe the methods you can use to congure Junos OS:
Junos OS Command-Line Interface
The Junos OS CLI is a straighorward terminal-based command interface. You use Emacs-style keyboard
sequences to move around on a command line and scroll through a buer that contains recently
executed commands. You type commands on a single line, and the commands are executed when you
press the Enter key. The CLI also provides command help and command compleon.
ASCII File
You can load an ASCII le containing a conguraon that you created earlier, either on this system or
another system. You can then acvate and run the conguraon le as is, or you can edit it using the CLI
and then acvate it.
J-Web Package
As an alternave to entering CLI commands, Junos OS supports the J-Web GUI. The J-Web user
interface enables you to monitor, congure, troubleshoot, and manage the router on a client by means
of a Web browser with Hypertext Transfer Protocol (HTTP) or HTTP over Secure Sockets Layer (HTTPS)
enabled.
The J-Web user interface is an oponal, licensed soware package (jweb package) on M Series and
TSeries routers. The jweb package is not included in jinstall and jbundle soware bundles. It must be
installed separately. To install the package on M Series and T Series routers, follow the procedure
described in the Soware Installaon and Upgrade Guide.
J-Web supports weak (56-bit) encrypon by default. This enables non-US customers to install J-Web
and use HTTPS connecons for J-Web access. US customers can also install the jcrypto strong
encrypon package. This package automacally overrides the weak encrypon.
46
NOTE: Because the J-Web package is bundled separately from other packages, it is possible to
have a version mismatch between J-Web and other Junos OS packages you have installed.
To check for a version mismatch, use the show system alarms CLI command. If the version number
does not match exactly, a system alarm appears.
Junos XML Management Protocol Soware
The Junos XML Management Protocol is an XML-based protocol that client applicaons use to monitor
and congure Juniper Networks devices. It uses an XML-based data encoding for the conguraon data
and remote procedure calls. This API is customized for Junos OS, and operaons in the API are
equivalent to CLI commands.
NETCONF XML Management Protocol Soware
The NETCONF XML management protocol is an XML-based protocol that client applicaons use to
monitor and congure network devices. It uses an XML-based data encoding for the conguraon data
and remote procedure calls. NETCONF includes features that accommodate the conguraon data
models of mulple vendors. Juniper Networks provides a set of Perl modules that enable Perl client
applicaons to communicate with the NETCONF server on Junos devices. The Perl modules enable you
to develop custom applicaons for conguring and monitoring Junos devices.
Conguraon Commit Scripts
You can create and use scripts that run at commit me to enforce custom conguraon rules. If a
conguraon breaks the custom rules, the script can generate acons that the Junos OS performs.
These acons include:
Generang custom error messages
Generang custom warning messages
Generang custom system log messages
Making changes to the conguraon
Conguraon commit scripts also enable you to create macros, which expand simplied custom aliases
for frequently used conguraon statements into standard Junos OS conguraon statements. Commit
scripts are wrien in Python, Stylesheet Language Alternave syntaX (SLAX), or Extensible Stylesheet
Language Transformaons (XSLT).
47
RELATED DOCUMENTATION
CLI Explorer
CLI User Guide
Junos OS Automaon Scripng User Guide
Junos OS Conguraon from External Devices | 48
NETCONF XML Management Protocol Developer Guide
Soware Installaon and Upgrade Guide
Junos OS Conguraon from External Devices
You can congure Junos OS network device from a
system console
connected to the console port or by
using
Telnet
to access the device remotely. External management hardware can be connected to the
Roung Engine and the Junos OS through these ports:
Console port
Auxiliary port
Ethernet management port
NOTE: See hardware guide for your parcular Junos OS device for instrucons about how to
connect external hardware to the console, auxiliary, and/or Ethernet management ports.
Capabilies and features can vary depending on device model.
RELATED DOCUMENTATION
Methods for Conguring Junos OS | 45
Conguring Junos OS to Set Console and Auxiliary Port Properes | 72
The Commit Model for Conguraons
The device conguraon is saved using a commit model—a candidate conguraon is modied as
desired and then commied to the system. When a conguraon is commied, the device checks the
conguraon for syntax errors, and if no errors are found, the conguraon is saved as juniper.conf.gz
and acvated. The formerly acve conguraon le is saved as the rst rollback conguraon le
48
(juniper.conf.1.gz), and any other rollback conguraon les are incremented by 1. For example,
juniper.conf.1.gz is incremented to juniper.conf.2.gz, making it the second rollback conguraon le.
The device can have a maximum of 49 rollback conguraons (numbered 1 through 49) saved on the
system.
On the device, the current conguraon le and the rst three rollback les (juniper.conf.gz.1,
juniper.conf.gz.2, juniper.conf.gz.3) are located in the /cong directory. (The remaining rollback les, 4
through 49, are located in /var/db/cong.)
If the recovery conguraon le rescue.conf.gz exists, this le is also located in the /cong directory.
The factory default les are located in the /etc/cong directory.
There are two mechanisms used to propagate the conguraons between Roung Engines within a
device:
Synchronizaon: Propagates a conguraon from one Roung Engine to a second Roung Engine
within the same device chassis.
To synchronize conguraons, use the commit synchronize CLI command. If one of the Roung Engines
is locked, the synchronizaon fails. If synchronizaon fails because of a locked conguraon le, you
can use the commit synchronize force command. This command overrides the lock and synchronizes the
conguraon les.
Distribuon: Propagates a conguraon across the roung plane on a mulchassis device.
Distribuon occurs automacally. There is no user command available to control the distribuon
process. If a conguraon is locked during a distribuon of a conguraon, the locked conguraon
does not receive the distributed conguraon le, so the synchronizaon fails. You need to clear the
lock before the conguraon and resynchronize the roung planes.
NOTE: When you use the commit synchronize force CLI command on a mulchassis plaorm, the
forced synchronizaon of the conguraon les does not aect the distribuon of the
conguraon le across the roung plane. If a conguraon le is locked on a device remote
from the device where the command was issued, the synchronizaon fails on the remote
device. You need to clear the lock and reissue the synchronization command.
RELATED DOCUMENTATION
Conguring Junos OS for the First Time on a Device with a Single Roung Engine
49
Conguraon Groups Overview
IN THIS SECTION
How Conguraon Groups Work | 50
Inheritance Model | 50
This topic provides an overview of conguraon groups and the inheritance model in the Junos OS CLI.
How Conguraon Groups Work
Conguraon groups enable you to create a group containing conguraon statements and to direct the
inheritance of that group’s statements in the rest of the conguraon. The same group can be applied to
dierent secons of the conguraon. Dierent secons of one groups conguraon statements can
be inherited in dierent places in the conguraon.
Conguraon groups enable you to create smaller, more logically constructed conguraon les, making
it easier to congure and maintain Juniper Networks devices. For example, you can group statements
that are repeated in many places in the conguraon, such as when conguring interfaces. By grouping
statements, you can limit conguraon updates to just the group.
You can also use wildcards in a conguraon group. Any object that matches the wildcard expression
inherits the group conguraon data.
The conguraon group mechanism is separate from the grouping mechanisms used elsewhere in the
conguraon, such as BGP groups. Conguraon groups provide a generic mechanism that you can use
throughout the conguraon but that are known only to the CLI. The individual soware processes that
perform the acons directed by the conguraon receive the expanded form of the conguraon; they
have no knowledge of conguraon groups.
Inheritance Model
Conguraon groups use true inheritance, which involves a dynamic, ongoing relaonship between the
source of the conguraon data and the target of that data. The target automacally inherits data values
that you change in the conguraon group. The target does not need to contain the inherited
informaon. However, the inherited values can be overridden in the target without aecng the source
from which they were inherited.
This inheritance model enables you to see only the instance-specic informaon without seeing the
inherited details. A command pipe in conguraon mode enables you to display the inherited data.
50
2
PART
Conguring and Administering Junos
Devices
Conguring Junos Devices | 52
Monitoring Junos Devices | 74
Managing Junos OS Processes | 82
CHAPTER 4
Conguring Junos Devices
IN THIS CHAPTER
Inial Router or Switch Conguraon Using Junos OS | 52
Conguring Junos OS for the First Time on a Device with a Single Roung Engine | 53
Conguring Junos OS for the First Time on a Device with Dual Roung Engines | 58
How to Improve Commit Time When Using Conguraon Groups | 64
Creang and Acvang a Candidate Conguraon | 65
Format for Specifying IP Addresses, Network Masks, and Prexes in Junos OS Conguraon
Statements | 65
Format for Specifying Filenames and URLs in Junos OS CLI Commands | 66
Mapping the Name of the Router to IP Addresses | 67
Conguring Automac Mirroring of the CompactFlash Card on the Hard Drive | 68
Using Junos OS to Specify the Number of Conguraons Stored on the CompactFlash Card | 69
Back Up Conguraons to an Archive Site | 70
Conguring Junos OS to Set Console and Auxiliary Port Properes | 72
Inial Router or Switch Conguraon Using Junos OS
This topic provides an overview of inial network device conguraon tasks using Junos OS.
When you turn on a device for the rst me, Junos OS automacally boots and starts. You must enter
basic conguraon informaon so the device is on the network and you can log in to it over the
network.
To congure the device inially, you must connect through the console port.
When you rst connect to the console of a device that has not yet been congured, log in as the user
root. At rst, the root account requires no password. You can see that you are the user root, because the
command prompt shows the username root@#.
52
You must start the Junos OS command-line interface (CLI) using the command cli. The command
prompt root@> indicates that you are the user root and that you are in Junos OS operaonal mode. Enter
Junos OS conguraon mode by typing the command configure. The command prompt root@# indicates
that you are in the Junos OS conguraon mode.
When you rst congure a device, you should congure the following basic properes:
Device hostname
Domain name
IP address of the device management Ethernet interface. To nd the management Ethernet interface
that you should use for conguraon, see Supported Roung Engines by Router.
IP address of a backup router
IP address of one or more DNS name servers on your network
Password for the root account
RELATED DOCUMENTATION
Conguring Junos OS for the First Time on a Device with a Single Roung Engine | 53
Conguring Junos OS for the First Time on a Device with Dual Roung Engines | 58
Supported Roung Engines by Router
Junos OS Conguraon Using the CLI
Conguring Junos OS for the First Time on a Device with a Single Roung
Engine
To congure the Junos OS for the rst me on a router with a single Roung Engine and no base
conguraon, follow these steps:
1. Connect to the device through the console port.
2. Power on the device and wait for it to boot.
The Junos OS boots automacally. The boot process is complete when you see the login: prompt
on the console.
3.
Log in as the user root.
Inially, the root user account requires no password. You can see that you are the root user, because
the prompt on the device shows the username root@#.
53
4. Start the Junos OS command-line interface (CLI):
root@# cli
root@>
5. Enter Junos OS conguraon mode:
cli> configure
[edit]
root@#
6. Congure the hostname of the device. We do not recommend spaces in the router name. However,
if the name does include spaces, enclose the enre name in quotaon marks (" ").
[edit]
root@# set system host-name
hostname
7. Set the root password, entering either a clear-text password that the system will encrypt, a
password that is already encrypted, or an SSH public key string.
Choose one of the following:
a. To enter a clear-text password, use the following command:
[edit]
root@# set system root-authentication plain-text-password
New password:
type password
Retype new password:
retype password
b. To enter a password that is already encrypted, use the following command:
[edit]
root@# set system root-authentication encrypted-password
encrypted-password
c. To enter an SSH public key, use the following command:
[edit]
root@# set system root-authentication ssh-rsa
key
54
8. Congure the device domain name:
[edit]
root@# set system domain-name
domain-name
NOTE: Before you begin the next step, see Supported Roung Engines by Router to nd the
management Ethernet interface that you should use to perform this conguraon.
9. Congure the IP address and prex length for the device management Ethernet interface. The
management Ethernet interface provides a separate out-of-band management network for the
device.
For devices that use management Ethernet interface fxp0:
[edit]
root@# set interfaces fxp0 unit 0 family inet address
address
/
prefix-length
For devices that use management Ethernet interface em0:
[edit]
root@# set interfaces em0 unit 0 family inet address
address
/
prefix-length
10. Congure the IP address of a backup or default network device. Choose a device that is directly
connected to the local router by way of the management interface. This backup is used only when
it is boong and only or when the Junos roung soware (the roung protocol process, rpd) is not
running.
For devices with two Roung Engines, the backup Roung Engine, RE1, uses the backup device as a
default gateway aer the device boots. This enables you to access the backup Roung Engine. (RE0
is the default primary Roung Engine.)
NOTE: The backup Roung Engine does not support more than 16 backup roung
desnaons. If you congure more than 16 desnaons on the backup Roung Engine, the
55
Junos OS ignores any desnaon addresses aer the sixteenth address and displays a
commit-me warning message to this eect.
[edit]
root@# set system backup-router
address
11. Congure the IP address of a DNS server. The router uses the DNS name server to translate
hostnames into IP addresses.
[edit]
root@# set system name-server
address
12. Oponally, display the conguraon statements:
[edit]
root@ show
system {
host-name
hostname
;
domain-name
domain
.
name
;
backup-router
address
;
root-authentication {
(encrypted-password "password" | public-key);
ssh-dsa "
public-key
";
ssh-ecdsa "
public-key
";
ssh-rsa "
public-key
";
}
name-server {
address
;
}
interfaces {
fxp0 {
unit 0 {
family inet {
address
address
;
}
}
}
}
}
56
On devices that use management Ethernet interface em0, you will see em0 in place of fxp0 in the
show command output.
13. Commit the conguraon, which acvates the conguraon on the device:
[edit]
root@# commit
Aer comming the conguraon, you see the newly congured hostname appear aer the
username in the prompt—for example, user@hostname#.
A basic conguraon for Junos OS is now set on the device.
If you want to congure addional Junos OS properes at this me, remain in the CLI conguraon
mode and add the necessary conguraon statements. You need to commit your conguraon
changes to acvate them on the device.
14. Exit from the CLI conguraon mode.
[edit]
root@
hostname
# exit
root@
hostname
>
15. Back up the conguraon.
Aer you have commied the conguraon and are sased that the new conguraon is
successfully running, you should issue the request system snapshot command to back up the new
soware to the /altcong le system. If you do not issue the request system snapshot command, the
conguraon on the alternate boot device will be out of sync with the conguraon on the primary
boot device.
The request system snapshot command causes the root le system to be backed up to /altroot, and /
cong to be backed up to /altcong. The root and /cong le systems are on the device’s
CompactFlash card, and the /altroot and /altcong le systems are on the device’s hard drive.
NOTE: Aer you issue the request system snapshot command, you cannot easily return to the
previous conguraon, because the running copy and the backup copies are idencal.
RELATED DOCUMENTATION
Inial Router or Switch Conguraon Using Junos OS | 52
Supported Roung Engines by Router
57
Format for Specifying IP Addresses, Network Masks, and Prexes in Junos OS Conguraon
Statements | 65
Default Directories for Junos OS File Storage on the Network Device | 22
Conguring Automac Mirroring of the CompactFlash Card on the Hard Drive | 68
Conguring Junos OS for the First Time on a Device with Dual Roung
Engines
If a device has dual Roung Engines, you can create conguraon groups and use the same
conguraon for both Roung Engines. This ensures that the conguraon will not change during a
failover scenario because of the idencal conguraon shared between the Roung Engines.
Congure the hostnames and addresses of the two Roung Engines using conguraon groups at the
[edit groups] hierarchy level. Use the reserved conguraon group re0 for the Roung Engine in slot 0
and re1 for the Roung Engine in slot 1 to dene Roung Engine-specic parameters. Conguring re0
and re1 groups enables both Roung Engines to use the same conguraon le.
Use the apply-groups statement to apply the apply the conguraon to the device.
The commit synchronize command commits the same conguraon on both Roung Engines. The command
makes the acve or applied conguraon the same for both Roung Engines with the excepon of the
groups, re0 being applied to only RE0 and re1 being applied only to RE1. If you do not synchronize the
conguraons between two Roung Engines and one of them fails, the router may not forward trac
correctly, because the backup Roung Engine may have a dierent conguraon.
To inially congure a device with dual Roung Engines that have no base conguraon, follow these
steps:
1. If you have not already done so, refer "Conguring Junos OS for the First Time on a Device with a
Single Roung Engine" on page 53 and follow the steps to inially congure the backup Roung
Engine.
2. Create the conguraon group re0. The re0 group is a special group designator that is only used by
RE0 in a redundant roung plaorm.
[edit]
root@host# set groups re0
58
3. Navigate to the groups re0 level of the conguraon hierarchy.
[edit]
root@host# edit groups re0
4. Specify the device hostname.
[edit groups re0]
root@host# set system host-name
host-name
NOTE: The hostname specied in the device conguraon is not used by the DNS server to
resolve to the correct IP address. This hostname is used to display the name of the Roung
Engine in the CLI. For example, the hostname appears at the command-line prompt when
you are logged in to the CLI:
user-name
@
host-name
>
NOTE: Before you begin the next step, see Supported Roung Engines by Router to nd the
management Ethernet interface that you should use to perform this conguraon.
5. Congure the IP address and prex length for the device management Ethernet interface. The
management Ethernet interface provides a separate out-of-band management network for the
device.
For devices using the management Ethernet interface fxp0:
[edit groups re0]
root@host# set interfaces fxp0 unit 0 family inet address
address
/
prefix-length
For devices that use the management Ethernet interface em0:
[edit groups re0]
root@host# set interfaces em0 unit 0 family inet address
address
/
prefix-length
59
6. Set the loopback interface address for the re0 conguraon group:
[edit groups re0]
root@host# set interfaces lo0 unit 0 family inet address
address
/
prefix-length
7. Return to the top level of the hierarchy.
[edit groups re0]
root@host# top
The next steps repeat for re1 the same steps as were done for the re0 conguraon group.
8. Create the conguraon group re1.
[edit]
root@host# set groups re1
9. Navigate to the groups re1 level of the conguraon hierarchy.
[edit]
root@host# edit groups re1
10. Specify the device hostname.
[edit groups re1]
root@host# set system host-name
host-name
NOTE: Before you begin the next step, see Supported Roung Engines by Router to nd the
management Ethernet interface that you should use to perform this conguraon.
11. Congure the IP address and prex length for the device management Ethernet interface.
For devices that use the management Ethernet interface fxp0:
[edit groups re1]
root@host# set interfaces fxp0 unit 0 family inet address
address
/
prefix-length
60
For devices that use the management Ethernet interface em0:
[edit groups re1]
root@host# set interfaces em0 unit 0 family inet address
address
/
prefix-length
12. Set the loopback interface address for re1 conguraon group:
[edit groups re1]
root@host# set interfaces lo0 unit 0 family inet address
address
/
prefix-length
13. Once both conguraon groups have been set up, return to the top level of the hierarchy.
[edit groups re1]
root@host# top
14.
Use the apply-groups statement to apply the conguraon to the device.
[edit]
root@host# set apply-groups [ re0 re1 ]
15. Congure Roung Engine redundancy:
[edit]
root@host# set chassis redundancy routing-engine 0 master
root@host# set chassis redundancy routing-engine 1 backup
16. Save the conguraon change on both Roung Engines:
[edit]
user@host> commit synchronize
Aer the conguraon changes are saved, complete the management console conguraon.
1. Set the root password by choosing one of the following:
To enter a clear-text password, use the following command:
[edit]
root@host# set system root-authentication plain-text-password
61
New password:
type password
Retype new password:
retype password
To enter a password that is already encrypted, use the following command:
[edit]
root@host# set system root-authentication encrypted-password
encrypted-password
To enter an SSH public key, use the following command:
[edit]
root@host# set system root-authentication ssh-rsa
key
2. Congure the IP address of the DNS server.
[edit ]
root@host# set system name-server
address
3. Congure the router domain name:
[edit ]
root@host# set system domain-name
domain-name
4. Congure the IP address of a backup or default network device. A backup device is used only while
the roung protocol process is not running. Choose a backup device that is directly connected to the
local device by way of the management interface. The device uses this backup only when it is
boong and or when the Junos roung soware (the roung protocol process, rpd) is not running.
For more informaon, see
Conguring a Backup Router
.
For devices with two Roung Engines, the backup Roung Engine, RE1, uses the backup as a default
gateway aer the device boots. This enables you to access the backup Roung Engine. (RE0 is the
default primary Roung Engine.)
NOTE: The backup router Roung Engine does not support more than 16 backup
desnaons. If you congure more than 16 desnaons on the backup Roung Engine, the
62
Junos OS ignores any desnaon addresses aer the sixteenth address and displays a
commit-me warning message to this eect.
[edit]
root@host# set system backup-router
address
5. Oponally, display the conguraon statements:
[edit]
root@ show
system {
host-name
hostname
;
domain-name
domain
.
name
;
backup-router
address
;
root-authentication {
(encrypted-password "password" | public-key);
ssh-dsa "
public-key
";
ssh-ecdsa "
public-key
";
ssh-rsa "
public-key
";
}
name-server {
address
;
}
interfaces {
fxp0 {
unit 0 {
family inet {
address
address
;
}
}
}
}
}
On devices that use management Ethernet interface em0, you will see em0 in place of fxp0 in the
show command output.
63
6. Aer you are sased that the conguraon is successfully running, issue the request system snapshot
command to back up the new conguraon on both primary and backup Roung Engines.
{master}
user@host> request system snapshot
The root le system is backed up to /altroot, and /cong is backed up to /altcong. The root and /
cong le systems are on the device’s CompactFlash card, and the /altroot and /altcong le
systems are on the devices hard drive.
NOTE: Aer you issue the request system snapshot command, you cannot return to the previous
conguraon, because the running copy and backup copy are idencal.
For informaon about creang conguraon groups, see Junos OS CLI User Guide.
For informaon about conguring high availability features for redundant Roung Engine systems and
the re0 group, see Junos OS High Availability User Guide.
RELATED DOCUMENTATION
Conguring Automac Mirroring of the CompactFlash Card on the Hard Drive | 68
Conguring Junos OS for the First Time on a Device with a Single Roung Engine | 53
Default Directories for Junos OS File Storage on the Network Device | 22
Format for Specifying IP Addresses, Network Masks, and Prexes in Junos OS Conguraon
Statements | 65
Inial Router or Switch Conguraon Using Junos OS | 52
Supported Roung Engines by Router
How to Improve Commit Time When Using Conguraon Groups
You use conguraon groups to apply conguraons across other hierarchies without re-entering
conguraon data. You can specify every conguraon detail in a conguraon groups. You can also use
wildcards in conguraon groups to congure ranges of data, without detailing each conguraon line.
Another way to use conguraon groups is to create an inheritance path that includes a long string of
conguraons to be applied.
64
When a conguraon that uses conguraon groups is commied, the commit process expands and
reads all the conguraon data of the group into memory to apply the conguraons as intended. The
commit performance can be negavely aected if many conguraon groups are being applied,
especially if the conguraon groups use wildcards extensively.
If your system uses many conguraon groups that use wildcards, you can congure the persist-groups-
inheritance statement at the [edit system commit] hierarchy level to improve commit me performance.
Using this opon enables the system to build the inheritance path for each conguraon group inside
the database rather than in the process memory. This change can improve commit me performance.
However, it can also increase the database size.
Creang and Acvang a Candidate Conguraon
You can enter soware conguraon statements using the CLI to create a candidate conguraon that
contains a hierarchy of statements. To have a candidate conguraon take eect, you commit the
changes. At this point, the candidate le is checked for proper syntax, acvated, and marked as the
current, operaonal soware conguraon le. If mulple users are eding the conguraon, when you
commit the candidate conguraon, all changes made by all the users take eect.
The CLI always maintains a copy of previously commied versions of the soware conguraon. If you
need to return to a previous conguraon, you can do this from within the CLI.
RELATED DOCUMENTATION
Junos OS Commit Model for Conguraons
Format for Specifying IP Addresses, Network Masks, and Prexes in
Junos OS Conguraon Statements
Many statements in the Junos OS conguraon include an opon to specify an IP address or route
prex. This opon is represented as
destination-prefix
/
prefix-length
. Specically, the route prex, followed
by a slash and the desnaon prex length. For example, 192.168.1.10/32.
You enter all IP addresses in classless mode. You can enter the IP address with or without a prex length,
in standard doed notaon (for example, 1.2.3.4), or hexadecimal notaon as a 32-bit number in
network-byte order (for example, 0x01020304). If you omit any octets, they are assumed to be zero.
Specify the prex length as a decimal number from 1 through 32.
65
RELATED DOCUMENTATION
Format for Specifying Filenames and URLs in Junos OS CLI Commands | 66
Format for Specifying Filenames and URLs in Junos OS CLI Commands
In some CLI commands and conguraon statements—including file copy, file archive, load, save, set
system login user
username
authentication
load-key-file
, and request system software add—you can include a
lename. On a roung matrix, you can include chassis informaon (for example, lcc0, lcc0-re0, or lcc0-re1)
as part of the lename.
You can specify a lename or URL in one of the following ways:
filename
—A le in the user’s current directory on the local CompactFlash card (not applicable on the
QFX Series). You can use wildcards to specify mulple source les or a single desnaon le.
Wildcards are not supported in FTP.
NOTE: Wildcards are supported only by the file (compare | copy | delete | list | rename | show)
commands. When you issue the file show command with a wildcard, it must resolve to one
lename.
path
/
filename
—A le on the local ash drive.
filename
or
path
/
filename
—File on the local hard drive. You can also specify a le on a local Roung
Engine for a specic T640 router or a T1600 router in a roung matrix:
user@host> file delete lcc0-re0:/var/tmp/junk
a:
filename
or a:
path
/
filename
—A le on the local removable media. The default path is / (the root-level
directory). The removable media can be in MS-DOS or UNIX (UFS) format.
hostname
:/
path
/
filename
,
hostname
:
filename
,
hostname
:
path
/
filename
, or “scp://
hostname
/
path
/
lename
—File
on an scp/ssh server. This form is not available in the worldwide version of Junos OS. The default
path is the user’s home directory on the remote system. You can also specify
hostname
as
username
@
hostname
.
p://
hostname
/
path
/
lename
—File on an FTP server. You can also specify
hostname
as
username
@
hostname
or
username
:
password
@
hostname
. The default path is the user’s home
directory. To specify an absolute path, the path must start with %2F; for example, p://
hostname
/%2F
path
/
lename
. To have the system prompt you for the password, specify prompt in
66
place of the password. If a password is required and you do not specify the password or prompt, an
error message is displayed:
user@host> file copy ftp://[email protected]/filename
file copy ftp.hostname.net: Not logged in.
user@host> file copy ftp://username:[email protected]/filename
Password for [email protected]:
hp://
hostname
/
path
/
lename
—A le on an HTTP server. You can also specify hostname as
username@hostname or username:password@hostname. If a password is required and you omit it,
you are prompted for it.
NOTE: You cannot specify a HTTP(s) URL for a le as a desnaon, because HTTP(s) URLs are
not writable. However you can specify HTTP(s) URL for a le as a source.
re0:/
path
/
lename
or re1:/
path
/
lename
—A le on a local Roung Engine. You can also specify a
le on a local Roung Engine for a specic T640 router or a T1600 router in a roung matrix:
user@host> show log lcc0-re1:chassisd
RELATED DOCUMENTATION
Default Directories for Junos OS File Storage on the Network Device | 22
Format for Specifying IP Addresses, Network Masks, and Prexes in Junos OS Conguraon
Statements | 65
Mapping the Name of the Router to IP Addresses
While using the Domain Name System (DNS) is an easier and more scalable way to resolve IP addresses
from hostnames, you might want to manually map the hostname to a stac IP address for the following
reasons:
You might not have a DNS entry for the device.
You might not want the computer to contact the DNS server to resolve a parcular IP address—you
might use this parcular IP address frequently, or it might be just for tesng or development
purposes.
67
To map a device’s hostname to one or more IP addresses:
1. Include the inet statement at the [edit system static-host-mapping
hostname
] hierarchy level.
user@host# set system static-host-mapping
hostname
inet <
ip-addresses
>
2. Verify the conguraon with the show command.
[edit system]
user@host# show
static-host-mapping {
hostname
{
inet [
ip-addresses
];
}
}
RELATED DOCUMENTATION
Conguring a Device’s Unique Identy for the Network
Conguring a DNS Name Server for Resolving Hostnames into Addresses
Conguring Automac Mirroring of the CompactFlash Card on the Hard
Drive
You can direct the device hard drive to automacally mirror the contents of the CompactFlash card.
When you include the mirror-flash-on-disk statement, the hard drive maintains a synchronized mirror
copy of the CompactFlash card contents. Data wrien to the CompactFlash card is simultaneously
updated in the mirrored copy of the hard drive. If the CompactFlash card fails to read data, the hard
drive automacally retrieves its mirrored copy of the CompactFlash card.
NOTE: We recommend that you disable ash-to-disk mirroring when you upgrade or downgrade
the router.
You cannot issue the request system snapshot command while ash-to-disk mirroring is enabled.
68
To congure the mirroring of the CompactFlash card to the hard drive, include the mirror-flash-on-disk
statement at the [edit system] hierarchy level:
[edit system]
mirror-flash-on-disk;
NOTE: Aer you have enabled or disabled the mirror-flash-on-disk statement, you must reboot
the device for your changes to take eect. To reboot, issue the request system reboot command.
NOTE: This feature is not supported in Junos OS Release 20.1.
RELATED DOCUMENTATION
Conguring Junos OS for the First Time on a Device with a Single Roung Engine | 53
Using Junos OS to Specify the Number of Conguraons Stored on the CompactFlash Card | 69
Using Junos OS to Specify the Number of Conguraons Stored on the
CompactFlash Card
By default, Junos OS saves the current conguraon and three previous versions of the commied
conguraon on the CompactFlash card, with an addional 46 older versions stored on the hard drive.
The currently operaonal Junos OS conguraon is stored in the le juniper.conf.gz, and the last three
commied conguraons are stored in the les juniper.conf.1.gz, juniper.conf.2.gz, and
juniper.conf.3.gz. These four les are located in the CompactFlash card in the directory /cong.
In addion to saving the current conguraon and the current operaonal version, you can also specify
how many previous versions of the commied conguraons you want stored on the CompactFlash
card in the directory /cong. The remaining previous versions of commied conguraons (4 through
49) are stored in the directory /var/db/cong on the hard disk. This is useful when you have very large
conguraons that might not t on the CompactFlash card.
69
To specify how many previous versions of the commied conguraons you want stored on the
CompactFlash card, include the max-configurations-on-flash statement at the [edit system] hierarchy level:
[edit system]
max-configurations-on-flash
number
;
number
is a value from 0 through 49.
RELATED DOCUMENTATION
Conguring Automac Mirroring of the CompactFlash Card on the Hard Drive | 68
Back Up Conguraons to an Archive Site
IN THIS SECTION
Congure the Transfer of the Acve Conguraon | 70
You can congure a device to transfer its conguraon to an archive le periodically.
Congure the Transfer of the Acve Conguraon
If you want to back up your device’s current conguraon to an archive site, you can congure the
device to transfer its acve conguraon by FTP, HTTP, secure copy (SCP), or SFTP periodically or aer
each commit.
To congure the device to transfer its acve conguraon to an archive site, include statements at the
[edit system archival configuration] hierarchy level:
[edit system archival configuration]
archive-sites {
file:/
path
;
file:///
path
;
ftp://
username
@
host
<:
port
>//
url-path
;
http://
username
@
host
<:
port
>/
url-path
;
scp://
username
@
host
<:
port
>/
url-path
;
70
sftp://
username
@
host
<:
port
>/
url-path
;
}
routing-instance
routing-instance
;
transfer-interval
interval
;
transfer-on-commit;
When you congure the device to transfer its conguraon les, you specify an archive site to which
the les are transferred. If you specify more than one archive site, the device aempts to transfer les to
the rst archive site in the list, moving to the next site only if the transfer fails.
When you use the archive-sites statement, you can specify a desnaon as an FTP URL, HTTP URL,
SCP-style remote le specicaon, or SFTP URL. The URL type le: is also supported. When you specify
the archive site, do not add a forward slash (/) to the end of the URL.
NOTE:
The URL type le: is supported only for local les.
When using the FTP opon, specify a double forward slash (//) aer the host:port. For
example: p://username@host<:port>//url-path
le:/path/ is the minimal representaon of a local le with no authority eld and an absolute path that
begins with a slash "/" as dened in RFC 8089.
le:///path is an example for a tradional le URI for a local le with an empty authority as dened in
RFC 8089.
NOTE: When specifying a URL in a statement using an IPv6 host address, you must enclose the
enre URL in quotaon marks ("") and enclose the IPv6 host address in brackets ([ ]). For
example, "p://
username
<:
password
>@[
ipv6-host-address
]<:
port
>//
url-path
"
To congure the device to periodically transfer its acve conguraon to an archive site, include the
transfer-interval statement at the [edit system archival configuration] hierarchy level:
[edit system archival configuration]
transfer-interval
interval
;
The
interval
is a period of me ranging from 15 through 2880 minutes.
71
To congure the device to transfer the conguraon to an archive site each me you commit the
conguraon, include the transfer-on-commit statement at the [edit system archival configuration] hierarchy
level:
[edit system archival configuration]
transfer-on-commit;
If the network device reaches the archive server through a specic roung instance, congure the
routing-instance statement at the [edit system archival configuration] hierarchy level, and specify the
roung instance.
[edit system archival configuration]
routing-instance
routing-instance
;
The desnaon lename is saved in the following format, where
n
corresponds to the number of the
compressed conguraon rollback le that has been archived:
<
router-name
>_
YYYYMMDD_HHMMSS
_juniper.conf.
n
.gz
NOTE: The me included in the desnaon lename is in Coordinated Universal Time (UTC).
Conguring Junos OS to Set Console and Auxiliary Port Properes
Most Juniper Networks devices have a console port and an auxiliary port for connecng terminals to the
router or switch. The console port is enabled by default, and its speed is 9600 baud. The auxiliary port is
disabled by default.
To congure the properes for the console and auxiliary ports, include the ports statement at the [edit
system] hierarchy level:
[edit system]
ports {
auxiliary {
disable;
insecure;
type
terminal-type
;
72
}
console {
authentication-order;
disable;
insecure;
log-out-on-disconnect;
type
terminal-type
;
}
}
By default, the terminal type is set to unknown. To change the terminal type, include the type statement,
specifying a
terminal-type
of ansi, vt100, small-xterm, or xterm. The rst three terminal types set a screen size
of 80 columns by 24 lines. The last type, xterm, sets the size to 80 columns by 65 rows.
By default, the console session is not logged out when the data carrier is lost on the console modem
control lines. To change this default and log out the session automacally when the data carrier on the
console port is lost, include the log-out-on-disconnect statement. You can use the show system users
command to verify the console session is logged out.
By default, terminal connecons to the console and auxiliary ports are secure. When you congure the
console as insecure, root logins are not allowed to establish terminal connecons. In addion,
superusers and anyone with a user idener (UID) of 0 are not allowed to establish terminal connecons
in muluser mode when you congure the console as insecure. To disable root login connecons to the
console and auxiliary ports, include the insecure statement. This opon can be used to prevent someone
from aempng password recovery by boong into single-user mode, if they do not know the root
password.
To disable console login, include the disable statement. By default, console login is enabled.
NOTE: For Common Criteria compliance, the console port must be disabled.
RELATED DOCUMENTATION
Methods for Conguring Junos OS | 45
73
CHAPTER 5
Monitoring Junos Devices
IN THIS CHAPTER
Junos OS Tools for Monitoring | 74
Tracing and Logging Junos OS Operaons | 75
Understanding Dropped Packets and Untransmied Trac Using show Commands | 77
Log a User Out of the Device | 81
Junos OS Tools for Monitoring
The primary method of monitoring and troubleshoong Junos OS, roung protocols, network
connecvity, and the device hardware is to enter commands from the CLI. The CLI enables you to
display informaon in the roung tables and roung protocol-specic data, and to check network
connecvity using ping and traceroute commands.
The J-Web GUI is a Web-based alternave to using CLI commands to monitor, troubleshoot, and
manage the device.
Junos OS includes SNMP soware, which enables you to manage routers. The SNMP soware consists
of an SNMP master agent and a MIB II agent, and supports MIB II SNMP version 1 traps and version 2
nocaons, SNMP version 1 Get and GetNext requests, and version 2 GetBulk requests.
The soware also supports tracing and logging operaons so that you can track events that occur—both
normal device operaons and error condions—and track the packets that are generated by or pass
through the device. Logging operaons use a syslog-like mechanism to record system-wide, high-level
operaons, such as interfaces going up or down and users logging in to or out of the device. Tracing
operaons record more detailed messages about the operaon of roung protocols, such as the various
types of roung protocol packets sent and received, and roung policy acons.
RELATED DOCUMENTATION
Junos OS Features for Device Security | 38
Methods for Conguring Junos OS | 45
74
Tracing and Logging Junos OS Operaons
Tracing and logging operaons allow you to track events that occur in the device—both normal
operaons and error condions—and to track the packets that are generated by or passed through the
device. The results of tracing and logging operaons are placed in les in the /var/log directory.
Remote Tracing
Junos OS provides an opon to do remote tracing for specic processes, which greatly reduces use of
device internal storage for tracing and is analogous to remote system logging. You congure remote
tracing system-wide using the tracing statement at the [edit system] hierarchy level. By default, remote
tracing is not congured. You can disable remote tracing for specic processes using the no-remote-trace
statement at the [edit
process-name
traceoptions] hierarchy level. This feature does not alter local tracing
funconality in any way, and logging les are stored on the device.
Junos OS supports remote tracing for the following processes:
chassisd—Chassis-control process
eventd—Event-processing process
cosd—Class-of-service process
spd—Adapve-services process
To enable system-wide remote tracing, include the destination-override syslog host statement at the [edit
system tracing] hierarchy level. This species the remote host running the system log process (syslogd),
which collects the traces. Traces are wrien to le(s) on the remote host per the syslogd conguraon
in /etc/syslog.conf. By default remote tracing is
not
congured.
To override the system-wide remote tracing conguraon for a parcular process, include the no-remote-
trace statement at the [edit
process-name
traceoptions] hierarchy. When no-remote-trace is enabled, the
process does local tracing.
NOTE: When remote tracing is congured, traces will go to the remote host.
To collect traces, use the local0 facility as the selector in /etc/syslog.conf on the remote host. To
separate traces from various processes into dierent les, include the process name or trace-le name if
it is specied at the [edit
process-name
traceopons le] hierarchy level, in the Program eld in /etc/
syslog.conf. If your syslog server supports parsing hostname and program name, then you can separate
traces from the various processes.
Logging Operaons
75
Logging operaons use a system logging mechanism similar to the UNIX syslogd ulity to record system-
wide, high-level operaons, such as interfaces going up or down and users logging in to or out of the
device. You congure these operaons by using the syslog statement at the [edit system] hierarchy level,
as described in
Junos OS System Log Overview
, and by using the options statement at the [edit routing-
options] hierarchy level, as described in the Junos OS Roung Protocols Library for Roung Devices.
Tracing Operaons
Tracing operaons record more detailed messages about the operaon of roung protocols, such as the
various types of roung protocol packets sent and received, and roung policy acons. You congure
tracing operaons using the traceoptions statement. You can dene tracing operaons in dierent
porons of the router conguraon:
Global tracing operaons: Dene tracing for all roung protocols. You dene these tracing operaons
at the [edit routing-options] hierarchy level of the conguraon.
Protocol-specic tracing operaons: Dene tracing for a specic roung protocol. You dene these
tracing operaons in the [edit protocols] hierarchy when conguring the individual roung protocol.
Protocol-specic tracing operaons override any equivalent operaons that you specify in the global
traceoptions statement. If there are no equivalent operaons, they supplement the global tracing
opons. If you do not specify any protocol-specic tracing, the roung protocol inherits all the global
tracing operaons.
Tracing operaons within individual roung protocol enes: Some protocols allow you to dene
more granular tracing operaons. For example, in Border Gateway Protocol (BGP), you can congure
peer-specic tracing operaons. These operaons override any equivalent BGP-wide operaons or, if
there are no equivalents, supplement them. If you do not specify any peer-specic tracing
operaons, the peers inherit, rst, all the BGP-wide tracing operaons and, second, the global tracing
operaons.
Interface tracing operaons: Dene tracing for individual router interfaces and for the interface
process itself. You dene these tracing operaons at the [edit interfaces] hierarchy level of the
conguraon as described in the Junos OS Network Interfaces Library for Roung Devices.
RELATED DOCUMENTATION
Junos OS Network Interfaces Library for Roung Devices
Junos OS Roung Protocols Library for Roung Devices
Junos OS System Log Overview
76
Understanding Dropped Packets and Untransmied Trac Using show
Commands
Starng with Junos OS Release 14.2, packets that need to be forwarded to the adjacent network
element or a neighboring device along a roung path might be dropped by a device owing to several
factors. Some of the causes for such a loss of trac or a block in transmission of data packets include
overloaded system condions, proles and policies that restrict the bandwidth or priority of trac,
network outages, or disrupon with physical cable faults. You can use a number of show commands to
determine and analyze the stascal counters and metrics related to any trac loss and take an
appropriate correcve measure. The elds displayed in the output of the show commands help in
diagnosing and debugging network performance and trac-handling eciency problems.
The following show commands and associated elds applicable for dropped packets enable you to view
and analyze some of the system parameters for errors or disrupon in transmied packets.
show interfaces extensive—Display input and output packet errors or drops. Following are some of the show
interfaces extensive input counters and their denions.
Following are denions for some of the output counters for show interfaces extensive:
Following are denions for some of the Queue counters for show interfaces extensive (both outbound
and inbound). This includes CoS queue number and its associated user-congured forwarding class
name, and is displayed on IQ2 interfaces.
Errors
Sum of the incoming frame terminates and FCS errors.
Drops
Number of packets dropped by the input queue of the I/O Manager ASIC. If the
interface is saturated, this number increments once for every packet that is dropped
by the ASIC's RED mechanism.
Framing errors
Number of packets received with an invalid frame checksum (FCS).
Runts
Number of frames received that are smaller than the runt threshold.
Policed discards
Number of frames that the incoming packet match code discarded because they
were not recognized or not of interest. Usually, this eld reports protocols that the
Junos OS does not handle.
L3 incompletes
Number of incoming packets discarded because they failed Layer 3 (usually IPv4)
sanity checks of the header. For example, a frame with less than 20 bytes of
available IP header is discarded. L3 incomplete errors can be ignored by conguring
the ignore-l3-incompletes statement.
77
L2 channel errors
Number of mes the soware did not nd a valid logical interface for an incoming
frame.
L2 mismatch
meouts
Number of malformed or short packets that caused the incoming packet handler to
discard the frame as unreadable.
FIFO errors
Number of FIFO errors in the receive direcon that are reported by the ASIC on the
PIC. If this value is ever nonzero, the PIC is probably malfunconing.
Resource errors
Error counter specic to the plaorm.
For example on MX series routers, resource errors count PFE oversubscripon
drops.
Carrier
transions
Number of mes the interface has gone from down to up. This number does not
normally increment quickly, increasing only when the cable is unplugged, the far-
end system is powered down and then up, or another problem occurs. If the number
of carrier transions increments quickly (perhaps once every 10 seconds), the cable,
the far-end system, or the PIC or PIM is malfunconing.
Errors
Sum of the outgoing frame terminates and FCS errors.
Drops
Number of packets dropped by the output queue of the I/O Manager ASIC. If the
interface is saturated, this number increments once for every packet that is dropped
by the ASIC's RED mechanism.
Collisions
Number of Ethernet collisions. The Gigabit Ethernet PIC supports only full-duplex
operaon, so for Gigabit Ethernet PICs, this number should always remain 0. If it is
nonzero, there is a soware bug.
Aged packets
Number of packets that remained in shared packet SDRAM so long that the system
automacally purged them. The value in this eld should never increment. If it does,
it is most likely a soware bug or possibly malfunconing hardware.
FIFO errors
Number of FIFO errors in the send direcon as reported by the ASIC on the PIC. If
this value is ever nonzero, the PIC is probably malfunconing.
HS link CRC
errors
Number of errors on the high-speed links between the ASICs responsible for
handling the router interfaces.
MTU errors
Number of packets whose size exceeded the MTU of the interface.
Resource errors
Error counter specic to the plaorm.
Queued packets
Number of queued packets.
78
Transmied
packets
Number of transmied packets.
Dropped packets
Number of packets dropped by the ASIC's RED mechanism.
show interfaces queue—Display class-of-service (CoS) queue informaon for physical interfaces. Following
are some of the show interfaces queue output elds and their denions.
Queued packets
Number of queued packets.
Transmied
packets
Number of transmied packets.
Dropped packets
Number of packets dropped by the ASIC's RED mechanism.
Tail-dropped
packets
Number of packets dropped because of tail drop.
RL-dropped
packets
Number of packets dropped due to rate liming. For rate-limited interfaces hosted
on MICs, MPCs, and Enhanced Queuing DPCs only, this stasc is not included in
the queued trac stascs.
RED-dropped
packets
Number of packets dropped because of random early detecon (RED).
On M320 and M120 routers and most T Series routers, just the total number of
dropped packets is displayed. For other M Series routers, as well as MX Series
routers with enhanced DPCs, T Series routers with enhanced FPCs, and all J Series
routers, the output classies dropped packets into the following catetories:
Low, non-TCP—Number of low-loss priority non-TCP bytes dropped because of
RED.
Low, TCP—Number of low-loss priority TCP packets dropped because of RED.
High, non-TCP—Number of high-loss priority non-TCP packets dropped because of
RED.
High, TCP—Number of high-loss priority TCP packets dropped because of RED.
show class-of-service fabric statistics summary—Display class-of-service (CoS) switch fabric queue drop
stascs. Following are the fabric queue stascs for dropped trac:
Packets
Dropped packet count for high-priority and low-priority queues.
Bytes
Dropped byte count for high-priority and low-priority queues.
pps
Dropped packets-per-second count for high-priority and low-priority queues.
79
bps
Dropped bits-per-second count for high-priority and low-priority queues.
show pfe statistics traffic fpc—Display packet drops related to the enre FPC. Following are the FPC-
level stascs for Packet Forwarding Engine hardware discards:
The following stascs are related to Packet Forwarding Engine local trac for show pfe statistics traffic
fpc:
Timeout
Number of packets discarded because of meouts.
Truncated key
Number of packets discarded because of truncated keys.
Bits to test
Number of bits to test.
Data error
Number of packets discarded because of data errors.
Stack underow
Number of packets discarded because of stack underows.
Normal discard
Number of packets discarded because of discard routes. Packets are dropped
silently without being further processed by the host. Normal discards are
reported when packets match a rewall lter term that has an acon of discard
or when the nal result of the route look-up is a next hop of discard.
Extended discard
Number of packets discarded because of illegal next hops. Packets are dropped
silently but are also sent to the Roung Engine for further processing. Extended
discards are reported when packets match a rewall lter term that has an
acon of discard and an addional acon that requires Roung Engine
processing, such as log, count, sample, or syslog.
Invalid interface
Number of packets discarded because of invalid incoming interfaces.
Info cell drops
Number of informaon cell drops.
Fabric drops
Number of fabric drops.
Local packets input
Number of incoming packets from the local network.
Local packets output
Number of outgoing packets dispatched to a host in the local network.
Soware input high
drops
Number of incoming soware packets of high-priority, dropped during
transmission.
Soware input
medium drops
Number of incoming soware packets of medium-priority, dropped during
transmission.
80
Soware input low
drops
Number of incoming soware packets of low-priority, dropped during
transmission.
Soware output
drops
Number of outgoing soware packets that were dropped during transmission.
Hardware input
drops
Number of incoming hardware packets that were dropped during transmission.
The preceding commands represent only the main parameters that you can use to idenfy and monitor
trac drops or errors. Depending on your specic deployment scenario and network condions, you
might need to view the output of other relevant show commands to evaluate dierent factors that might
be resulng in trac transmission losses.
Log a User Out of the Device
Somemes you may need to disconnect a user session if it does not terminate aer a user logs out, or
you may otherwise want to log a user out for some other reason.
To log a user out of all terminal sessions on a router, enter the following Junos OS CLI command:
user@host> request system logout
username
user@host> show system users
10:07PM up 13 days, 1:25, 2 users, load averages: 0.17, 0.05, 0.02
USER TTY FROM LOGIN@ IDLE WHAT
harry p0 hpot-lt.cmpy.net 10:07PM - -cli (cl
lisa p1 hpot-lt.cmpy.net 10:06PM - -cli (cl
user@host> request system logout user harry
user@host> show system users
10:07PM up 13 days, 1:25, 1 user, load averages: 0.24, 0.06, 0.02
USER TTY FROM LOGIN@ IDLE WHAT
lisa p1 hpot-lt.cmpy.net 10:06PM - -cli (cl
The sample output for the rst show system users command shows there were two users on the router,
harry and lisa. The request system logout user command was issued to log out user harry. Because there is
no output to indicate that harry was logged out, the show system users command was issued again to
verify that user harry was actually logged out of the router, while the user lisa remains logged in.
81
CHAPTER 6
Managing Junos OS Processes
IN THIS CHAPTER
Saving Core Files from Junos OS Processes | 82
Viewing Core Files from Junos OS Processes | 83
Disabling Junos OS Processes | 84
Conguring Failover to Backup Media If a Junos OS Process Fails | 84
Using Virtual Memory for Process Conguraon Data | 85
Saving Core Files from Junos OS Processes
By default, when an internal Junos OS process generates a core le, the le and associated context
informaon are saved for debugging purposes in a compressed tar le named
process-name
.core.
core-
number
.tgz in the /var/tmp/ and /var/crash/ directories. For Junos OS Evolved, the output is saved in
the /var/core/ directory for Roung Engine core les and /var/lib/p/in/ for FPC core les. The
contextual informaon includes the conguraon and system log message les.
To disable the saving of core les and associated context informaon, include the no-saved-core-context
statement at the [edit system] hierarchy level:
[edit system]
no-saved-core-context;
To save the core les only, include the saved-core-files statement at the [edit system] hierarchy level and
specify the number of les to save:
[edit system]
saved-core-files
number
;
number
is the number of core les to save and can be a value from 1 through 10.
82
To save the core les along with the contextual informaon, include the saved-core-context statement at
the [edit system] hierarchy level:
[edit system]
saved-core-context;
RELATED DOCUMENTATION
saved-core-context
saved-core-les
Viewing Core Files from Junos OS Processes
Viewing Core Files from Junos OS Processes
When an internal Junos OS process generates a core le, you can nd the output at /var/crash/
and /var/tmp/. For Junos OS Evolved, you can nd the output core les at /var/core/ for Roung
Engine core les and /var/lib/p/in/ for FPC core les. Using these directories provides a quick method
of nding core issues across large networks.
Use the CLI command show system core-dumps to view core les.
root@host> show system core-dumps
-rw------- 1 root wheel 268369920 Jun 18 17:59 /var/crash/vmcore.0
-rw-rw---- 1 root field 3371008 Jun 18 17:53 /var/tmp/rpd.core.0
-rw-r--r-- 1 root wheel 27775914 Jun 18 17:59 /var/crash/kernel.0
RELATED DOCUMENTATION
Saving Core Files from Junos OS Processes
83
Disabling Junos OS Processes
CAUTION: Never disable any of the soware processes unless instructed to do so by a
Customer Support engineer.
To disable a soware process, specify the appropriate opon in the processes statement at the [edit
system] hierarchy level:
[edit system]
processes {
process-name
(enable | disable);
}
NOTE: The
process-name
variable is one of the valid process names. You can obtain a complete list
of process names by using the CLI command compleon feature.
RELATED DOCUMENTATION
processes
Conguring Failover to Backup Media If a Junos OS Process Fails | 84
Viewing Core Files from Junos OS Processes
Conguring Failover to Backup Media If a Junos OS Process Fails
For network devices with redundant Roung Engines, you can congure the device to switch to backup
media that contains a version of the system if a soware process fails repeatedly, or to the other
Roung Engine.
To congure automac switchover to backup media if a soware process fails, include the failover
statement at the
[edit system processes
process-name
]
hierarchy level. If this statement is congured for a
84
process, and that process fails four mes within 30 seconds, the device reboots from either the
alternave media or the other Roung Engine.:
[edit system processes]
process-name
failover (alternate-media | other-routing-engine);
The value for
process-name
should be one of the valid process names.
RELATED DOCUMENTATION
Disabling Junos OS Processes | 84
Saving Core Files from Junos OS Processes | 82
Using Virtual Memory for Process Conguraon Data
Conguraon data for each process in Junos OS is stored in memory that is mapped within the address
space of each process, requiring a xed maximum space to be reserved in each process. This scheme
works well unl a process is managing many funcons at commit me and negavely impacts the
commit me, or simply needs more memory than the default allotment. For example, the rpd process
might be managing many routes and require more space to store important informaon about the
routes.
In circumstances that require more than the maximum memory-mapped size, you can use virtual-memory-
mapping at the [edit system configuration-database] hierarchy level to make more memory available for the
conguraon database per process.
You can congure a poron of virtual memory at a xed size for the inial poron of the conguraon
database, and you can specify an amount to be used for page-pooling. Page-pooling uses a small amount
of memory to bring database pages into memory as needed, rather than mapping the enre
conguraon database into the virtual memory space for the process.
85
3
PART
Conguraon Statements and
Operaonal Commands
Junos CLI Reference Overview | 87
Junos CLI Reference Overview
We've consolidated all Junos CLI commands and conguraon statements in one place. Learn about the
syntax and opons that make up the statements and commands and understand the contexts in which
you’ll use these CLI elements in your network conguraons and operaons.
Junos CLI Reference
Click the links to access Junos OS and Junos OS Evolved conguraon statement and command
summary topics.
Conguraon Statements
Operaonal Commands
87