Samenvatiing Junos Study Guide
Samenvatiing Junos Study Guide
Processes that control routing and switching protocols are cleanly separated from the processes
that forward frames, packets or both through the device running Junos OS
o Maximum performance and reliability
Control plane
o Runs on the routing engine (RE)
Brains of the platform: performing protocol updates and system management
Maintains routing tables, bridging tables and primary forwarding table
Connect to the packet forwarding engine (PFE) through an internal link
Forwarding plane
o PFE
runs on separate hardware and is responsible for forwarding transit traffic
through the device
Application-specific integrated circuits for increased performance
receives FT from the RE (internal link)
forwards frames, packets or both
Forward traffic
PFE
o Forwards traffic based on its local copy of the FT
Synchronized copy of the information created on and provided by RE
Forwards traffic more efficiently and eliminates the need to consult the RE
o Implements advanced services
Rate limiting
Stateless firewall filters
Class of service
Transit traffic
Consists of: all traffic that enters an ingress network port is compared to the FT and is forwarded
out an egress network port toward its destination
Is never sent to or processed by the control plane
Can be unicast traffic
o Enters one ingress port and is transmitted out exactly one egress port toward its
destination
Can be multicast traffic
o Enters one ingress port and can be replicated and sent out multiple egress ports
depending on the number of multicast receivers and network environment
Does not pass through the local device but rather requires some form of special handling; for
example:
o Packets addressed to the chassis; for example:
Routing protocol updates
telnet sessions
pings
tracerts
o IP packets with the IP options field
o ICMP messages
Report various error conditions and respond to ping requests
Destination host unreachable
TTL expired
Part 2
J-Web interface
Graphical user interface
Access using HTTP(S)
Quick configuration wizard
Logging in
Requires a username and a password for access
o Default: root without any password
Root has complete access and control of the device
o Shell (%) --> cli to start CLI
Need help?
Cli provides context-sensitive help
?
o List of available commands and options including user-defined variables
Help topic
o Displays usage guidelines for the statement
Help reference
o Displays summary information for the referenced configuration statement
o Displays a complete list of related configuration options along with several other details
specific to the referenced command statement
Help apropos
o Displays the contexts that reference a specific variable
o Only displays context that are relevant to the configuration hierarchy level
Control keys
Ctrl + b --> moves the cursor left one character
Using pipeline
Filter display output
o Compare --> Compares configuration changes with another configuration file
o Count --> Displays number of lines in the output
o Display changed --> Tags changes with junos:changed attribute only for XML use
o Display commit-scripts --> Shows data after Junos applies commit scripts
o Display detail --> Displays additional information about the contents of the configuration
o Display inheritance --> Displays inherited configuration data and source group
o Display omit --> Omits configuration statements with omit statement
o Display set --> Shows set commands created configuration statements
o Display xml --> Display the output in XML format
o Except --> Ignores text matching when searching the output
o Find --> Display the output starting at the first occurrence of text matching
o Hold --> Holds text without exiting the –more-- prompt
o Last --> Display the last screen of information
o Match --> Searches for text matching
o No-more --> Display output all at once
o Request message --> Displays output to multiple users
o Resolve --> Converts IP to DNS names
o Save --> Save output to file or url
o Trim --> Trims specified nr of columns from the start line
Operational mode
Monitor and control the operation of a device running the Junos
Exist in a hierarchical structure
Capabilities
Entering configuration mode
Controlling the CLI environment
Exiting the CLI
Configuration mode
By default multiple users can enter configuration mode and commit changes
Uncommitted changes are retained when exiting the configuration mode
Exclusive mode
Allow one single user to edit the configuration
Uncommitted changes are always discarded when exiting the exclusive mode
Private mode
Allow multiple users to edit the configuration while committing their private changes
Uncommitted changes are always discarded when exiting the private mode
Other users must enter private or exclusive mode to become the master
Chassis clustering: private mode is automated
Candidate configuration
This configuration is a temporary configuration that might become the active configuration
You can modify the candidate configuration and commit the changes
Hierarchical configuration
Container statements: curly brackets to visually display the hierarchical structure of the
configuration
Leaf statements: semicolon to visually display the end of the hierarchical structure of the
configuration
Configuring statements
Set: adding statement
Delete: deleting statement and all its subordinate statements and identifiers
o Wildcard delete
Rename
Replace pattern
Copy
Deactivate – activate
Insert
Annotate
…
Remember to commit
Commit to activate the candidate configuration
Commit synchronize:
o On devices with redundant RE’s
o Activates and synchronizes the configuration on both RE’s
Commit check
o Validate the syntax of a candidate configuration without actually placing it into effect
Commit confirmed
o The system starts a timer during which time it expects to see another commit
Viewing differences
Show | compare: displays differences between candidate and active configuration
Show configuration | compare rollback <n>: displays differences between active and rollback
configuration
Show configuration | compare <filename>: displays differences between active and an arbitrary
file
File compare files <filename 1> <filename 2>: displays differences between any two text files
Loading a factory-default
Return a device to its factory-default configuration --> overwrite candidate configuration
Load factory-default
o Commit!!
To the rescue
A rescue configuration is a user defined, known good configuration
Designed to restore connectivity in the event of configuration problems
o Rollback rescue & commit
Contain the minimum elements necessary to restore network connectivity
Must include a root password
Default: no rescue is defined
o Request system configuration rescue save
Interface overview
An interface is used to connect a device to a network
Some are used to provie a service or a specific function
o Management: connect the device to a management network
o Internal: connect the control and forwarding plane
Interface naming
Media type – line carde (FPC) slot number / interface card (PIC) slot number / port number
o ge-0/0/0
o Slot and port numbers begin with 0
Other interface name designations
o Don’t adhere to the naming convention
Loopback: lo0
Aggregated Ehternet: ae
Aggregated SONET: as
VLAN: vlan
Logical interfaces
Each physical interface descriptor can contain one or more logical interface descriptors
Allow you to map one or more logical interfaces to a single physical device
Multiple address
o Junos can have more than one address on a single logical interface
o Set command adds an additional address under the logical unit
Physical properties
Data link layer protocol and keepalives
Link mode --> half or full-duplex
Speed
Maximum transmission unit --> from 256 to 9192 bytes
Clocking --> clock source (internal/external)
Scrambling --> payload scrambling
Frame check sequence --> modify to 32 bit mode (default 16)
Diagnostic characteristics --> local or remote loopbacks
Logical properties
Protocol family --> inet, inet6, iso, mpls or ethernet-switching
Addresses
Local password authentication: configure usernames and passwords individually for each user to
log into a device
o The system automatically generates a home directory for that user
Default working directory for each locally configured user
Can be changed for individual sessions
Run set cli directory <directory>
RADIUS and TACAS+ are distributed client and server systems used as authentication methods to
validate users
o Client runs on devices running Junos
o Server runs on a host connected to a remote network
o Configuration of RADIUS
set groups global radius-server <server address>
set groups global system radius-server <server address>
secret password
o Configuration of TACAS+
set system tacplus-server <server address>
set system groups global system tacplus-server <server-
address> secret password
Authentication order
You can prioritize the order in which the software tries one or more of the three authentication
methods
o Set groups global system authentication-order <method1 method2
method3>
For each login attempt, Junos tries the authentication method in order until the password is
accepted
o The next method is consulted if the previous authentication method failed to reply or if
the method rejected the login attempt
o If no reply is received from any of the listed methods, Junos consults local authentication
as a last resort
System logging
Use a UNIX syslog-style mechanism to record system-wide, high-level operations such as
interfaces going up or down or users logging in to or out the device
The primary syslog file is the /var/log/messages
Syslog configuration options
o Host <name>: sends messages to a remote host
o Host <ip>: sends messages to a remote host
o Archive: configures how to archive system logging files (default 100–maximum size 128K)
o Console: configures the types of syslog messages to log to the system console
o Facility: displays the class of log messages
o Severity: displays the severity level of log messages
o File <filename>: configures the name of the log file
Tracing
Used to store decoded protocol information received or sent by the RE
Used for testing
o One you have completed your testing turn off tracing to avoid unnecessary resource
consumption
Configuration for tracing files
o File <filename>: name of the file which to store information
o Size <size>: maximum size of each trace file
o Files <number>: maximum number of trace files
o No-stamp: prevents timestamp information from being placed at the beginning of each
line in the trace file.
o Replace: replaces an existing trace file if one exists
o Readable: allows any user to view the file
o No-world-readable: allows only the user who configured the file to view it.
Monitoring NTP
Run show ntp associations: display synchronization status
Run show ntp status: further synchronization details
SNMP operation
SNMP support
Version 1: initial implementation of SNMP that defines the architecture and framework for SNMP
Version 2: added support for community strings, which act as password determining access to
SNMP agent MIBs
Version 3: provides enhanced security features including the definition of a user-based security
model and a view-based access control model.
o Provides message integrity, authentication and encryption
Monitoring system
Show system
o Alarms: displays current system alarms
o Boot-messages: displays the messages seen during the last system boot
o Connections: displays the status of local TCP and UCP connections
o Statistics: provides options for viewing various protocol statistics
o Storage: displays status of the file system storage space
o …
Monitoring chassis
Show chassis
o Alarms: displays current chassis alarms
o Environment: displays component and environmental status as well as the operational
speeds of the cooling system
o Hardware: displays an inventory of the installed hardware components along with the
serial number of each component
o Routing-engine: provides operational status and utilization details for the RE
Monitoring traffic
Monitor traffic: provides access to the tcpdump utility
o Traffic that originates or terminates on the local RE
o Layer2-headers: Monitor and diagnose problems at layer 2
o Matching: match packet fields
o Write-file: save packet captures for analysis from a third-party packet decoder such as
Ehternet or Wireshark
Option is hidden
Use with caution
Naming convention
The Junos naming convention format is package-release-edition
o Package: description of the software contents
Jinstall
Jinstall-ex
Junos-jsr
Junos-srx
o Release: describes the Junos release and includes several subcomponents
Major and minor release numbers as well as a capital letter that indicates the
type of software release
o Edition: typically domestic or export
Domestic: support strong encryption
Export: does not support strong encryption
Packages contain digital signatures, SHA-1 and MD5 checksums
o Package is installed only if the checksum within it matches the hash recorded in its
corresponding file
unit 200 {
vlan-id 200;
family inet {}
}
}
}
Unit 202 {
dcli 202;
family inet {}
}
}
}
Host2
Interface {
ls-0/0/0.0 {family inet {..}}
serial-1/0/0 {
serial-options {
clocking-mode internal;
}
unit 0 {
family mlppp {
bundle ls-0/0/0.0
}}}
serial-1/0/1 {
serial-options {
clocking-mode internal;
}
unit 0 {
family mlppp {
bundle ls-0/0/0.0
}}} }
Ge-0/0/0{
Gigether-options {
802.3ad ae0;
}}
Configuration groups
Allow you to create a group containing configuration statements and to direct the inheritance of
that group’s statements in the rest of the configuration
Apply the same group to different sections of the configuration
Allow you to create smaller, more logically constructed configuration files
Use of wildcards is possible
Show interfaces … | display inheritance
Interface configuration
You must have at least one logical interface configured on our physical Ethernet interface
Network monitoring
Quickly capture and analyze router control traffic on a device
o Destined for or originating from the RE
Routing components
Two primary requirements
o An end-to-end communications path
o Ensuring all L3 devices within the communications path have the required information
Gateway: a router that connects to the internal networks as well as the Internet
Define a proper next-hop for each destination prefix for transit traffic it receives
FT to make this determination
A proper gateway
o Gateway user A: 10.1.1.1
o Gateway user B: 10.1.1.1
o Gateway devices within the data center: 10.2.2.1
The router which functions as the gateway requires sufficient routing information to determine
the proper next hop for the traffic sent between the connected networks.
Forwarding table
Stores a subset of information from the routing table
Show route forwarding-table: details used by the device running the Junos to forward packets
such as the learned destination prefixes and the outgoing interfaces associated with each
destination prefix
o Destination default: matches all packets when no other matching entry exists
The router discards the packet and it sends an ICMP destination unreachable
message back to the sender
o Common route types
When a packet enters the device, it compares that packet against the entries within the
forwarding table to determine the proper next hop
o Destined to the local device: Junos processes the packet locally
o Destined to a remote device an a valid entry exist: forwards the packet out the next-hop
interface associated with the forwarding table entry
Multiple destination prefixes match? --> most specific entry
Longest match
o Destined to a remote device an no valid entry exist: responds to the source device with a
destination unreachable notification
Destined to 172.19.52.101
o Destination prefix: 172.19.52.0/24
Junos logically groups routing tables, interfaces and routing protocol parameters to form unique
routing instances
The device logically keeps the routing information in one routing instance apart from all other
routing instances
Dynamic routing
Configure the network interface to participate in a routing protocol
o Dynamically learn routing information from each other
o When a device adds or removes routing information for a participating device, all other
devices automatically update
Benefits
o Lower administrative overhead: the device learns routing information automatically,
which eliminates the need for manual route definition
o Increased network availability: during failure situations, dynamic routing can reroute
traffic around the failure automatically
o Greater network scalability: the device easily manages network growth by dynamically
learning routes and calculating the best paths through a network
Routing policy allows you to control the flow of routing information to and from the routing table
o Apply as information enters the routing table and as information leaves the routing table
o Use to choose which routes you accept or reject from neighbors running dynamic routing
protocols
o Also allows you to modify attributes on routes as they enter or leave the routing table
Routing policy allow you to control the flow of routing information into the forwarding table
o To control which routes you install in the forwarding table
o To control some of the attributes associated with those routes
Import policy: control how the software imports routes into the routing table
o Import policies before placing routes in the routing table
o Can change the routes that are available in the routing table
o Can affect the local route selection process
Export policy: control how the software sends routes from the routing table
o Export policies as it exports routes from the routing table to dynamic routing protocols or
to the forwarding table
o Only active routes are available for export from the routing table
o Can choose which active routes to export
o Can modify attributes of those routes
o Cannot cause the exportation of inactive routes!
Select routes based on their prefix, protocol, some routing attributes or next-hop information
Prefix list
o List of prefixes configured under policy-options
o You can use them in multiple places
o Reference prefix list in multiple terms in a single policy or in different policies
o Use prefix lists both for routing policies as well as firewall filters
o You can use prefix lists in two ways in the from statements of routing policies
Prefix-list: routes match only if they exactly match one of the prefixes in the list
Prefix-list-filter: specify a match type of exact, longer or orlonger
Route-filter
o Lists of prefixes configured within a single routing policy or policy term
o Are nor reusable
o Specific to the policy or term in which they are configured
o Provide more match types for selecting prefixes
Match types
o Exact: only routes that match the given prefix exactly match the filter statement
o Longer: routes within the specified prefix with a prefix length greater than the given
prefix length match the filter statement
o Orlonger: routes within the specified prefix with a prefix length greater than or equal to
the given prefix length match the filter statement
o Upto: routes within the specified prefix with a prefix length greater than or equal to the
given prefix length, but less than or equal to the upto prefix length, match the filter
statement
o Prefix-length-range: routes within the specified prefix with a prefix length greater than or
equal to the first given prefix length, but less than or equal to the second given prefix
length, match the filter statement
Policy chaining
Common actions
!!! by default, traffic is discarded !!!
Specify action in then
Firewall filter action include
o Terminating action: cause the evaluation of the firewall filter to stop
Accept: causes the system to accept the packet and continue the input or output
processing of the packet
Discard: causes the system to silently discard the packet, without sending an
ICMP message to the source address
Reject: causes the system to discard the packet and send an ICMP message to the
source
Destination unreachable
Tcp-reset: the system respond the TCP packets with a TCP reset, but it
sends no message in response to non-TCP packets
o Flow control
Next term: causes Junos to evaluate the next term
o Action modifiers
Count.log and syslog: record information about packets
Forwarding-class and loss-priority: specify class of service information
Policer: invoke a traffic policer
Policing
In addition to dropping or accepting packets, firewall filters can also police or rate-limit traffic
o Enables you to limit the amount of traffic that passes into or out of an interface
o Still employ match conditions such as addressed, protocols, ports, … to determine which
traffic on an interface is subject to rate-limiting
o Term has no from and contains a policer --> all packets on the interface are subject to
rate policing
Interface-based policers
o Apply directly to a given protocol family on a given logical unit of a particular interface
o Accommodate L2 VPN traffic, MPLS and IPv6 families
o Operate without the need for a calling firewall filter
Token-bucket algorithm
o Enforces a limit on average bandwidth while allowing bursts up to a specified maximum
value
o Two rate limits
Bandwidth: number of bps permitted on average
Bandwidth-limit
Maximum burst size: total number of bytes the system allows in bursts of data
that exceed the given bandwidth limit
Speed of the interface * amount of time burst
Burst-size-limit
A packet matches a term that has a policer in then
o The packet does not exceed the policer
System performs the actions in the firewall filter’s then as if you left the policer
out of the configuration
o Packet does exceed the policer
System takes the actions in the policer’s then
Case study
Output filter
set firewall family inet filter output-ff term deny-spoofed from source-address
0.0.0.0/0
set firewall family inet filter output-ff term deny-spoofed from source-address
172.27.102.0/24
set firewall family inet filter output-ff term deny-spoofed then log
set firewall family inet filter output-ff term deny-spoofed then discard
set firewall family inet filter output-ff term else-accept then count outbound-
accepted
set firewall family inet filter output-ff term else-accept then accept
Input filter
set policy-options prefix-list internal-prefixes 172.27.102.0/24
set firewall family inet filter input-ff term deny-spoofed from source-prefix-
list internal-prefixes
set firewall family inet filter output-ff term deny-spoofed then log
set firewall family inet filter output-ff term deny-spoofed then discard
set firewall family inet filter input-ff term allow-some-icmp from protocol
icmp
set firewall family inet filter input-ff term allow-some-icmp from protocol
icmp-tpe [echo-reply time-exceeded unreachable]
set firewall family inet filter input-ff term allow-some-icmp then accept
set firewall family inet filter input-ff term else-discard then count inbound-
discarded
set firewall family inet filter input-ff term else-discard discard
Unicast reverse path-forwarding checks validate packet receipt on interfaces where Junos would
expect to receive such traffic
By default: the system expects to receive traffic on a given interface if it has an active route to the
packet’s source address and if it received the packet on the interface that is the next hop for the
active route to the packet’s source address
Junos accomplishes unicast RPF checks by downloading additional information to the PFE
o Activating this feature increases PFE memory usage
Fail filters
A packet has failed the RPF check --> discard it
Specify an optional fail filter
o Processes packets that fail the RPF check through that filter prior to discarding them
o Perform all actions and action modifiers you could in any other firewall filter
Accepting the traffic despite the packet failing the RPF check