Upload
nguyen-dieu-thuy
View
222
Download
0
Embed Size (px)
Citation preview
8/6/2019 Seeren Cos Junos Module3
1/59
Copyright 2006 Juniper Networks, Inc. www.juniper.net 1
SEEREN2 Summer SchoolHeraklion, Sept 25th
Routing Issues: QoS/CoS
Jean-Marc Uz
Liaison Research & Education, [email protected]
8/6/2019 Seeren Cos Junos Module3
2/59
2Copyright 2006 Juniper Networks, Inc. www.juniper.net
Agenda: QoS/CoS Workshop
Module 1: Overview of QoS/CoS
Module 2: JUNOS QoS implementation (J/M/T-Series)
Module 3: Introduction to JUNOS CLI
Module 4: GEANT2 QoS services Implementation
8/6/2019 Seeren Cos Junos Module3
3/59
3Copyright 2006 Juniper Networks, Inc. www.juniper.net
Module 3: JUNOS CLI Outline
Overview and objectives
Connecting to a Juniper Networks M-Series router JUNOS CLI Overview
JUNOS Operational Mode JUNOS Configuration Mode
System Debugging and Troubleshooting
Additional Information
8/6/2019 Seeren Cos Junos Module3
4/59
4Copyright 2006 Juniper Networks, Inc. www.juniper.net
Overview and objectives
This presentation is meant to establish a basicunderstanding of the JUNOS operating systemCommand Line Interface (CLI)
Similarities exist between JUNOS and CiscosIOS
Modular structure takes JUNOS to the next levelfor ease of configuration
Additional features have been implemented forconfiguration verification
8/6/2019 Seeren Cos Junos Module3
5/59
5Copyright 2006 Juniper Networks, Inc. www.juniper.net
Overview and Objectives
This overview is not intended as a substitute forJuniper Networks Technical Education Courses.These courses are recommended for anyone
that has responsibility for configuration andmanagement of Juniper Networks routers.
For complete course information, please referto Juniper Networks website:
www.juniper.net/support/training/
8/6/2019 Seeren Cos Junos Module3
6/59
6Copyright 2006 Juniper Networks, Inc. www.juniper.net
Assumptions and Prerequisites
Experience managing and configuring routers
Understanding of IP addressing and subnetting
Understanding of IP routing protocols Ex. OSPF, IS-IS, BGP4
Physical access to the router console port
JUNOS version 5.1 or later
Access to JUNOS documentation and QuickReference Guides
New, non-configured Juniper Network router
8/6/2019 Seeren Cos Junos Module3
7/597Copyright 2006 Juniper Networks, Inc. www.juniper.net
JUNOS CLI Outline
Overview and objectives
Connecting to a Juniper Networks M-Series router
JUNOS CLI Overview
JUNOS Operational Mode
JUNOS Configuration Mode System Debugging and Troubleshooting
Additional Information
8/6/2019 Seeren Cos Junos Module3
8/598Copyright 2006 Juniper Networks, Inc. www.juniper.net
Accessing the Juniper Networks Router
Command Line Interface (CLI) access Console port
Auxiliary port
Out-of-band Ethernet port
Console cable (9-pin male to 9-pin female)shipped with router
Communications application (ex Hyperterminal) Settings are 9600, 8, N, 1 with VT100 terminal
emulation
Initial boot-up basic configuration
Initiate the Command Line Interface
8/6/2019 Seeren Cos Junos Module3
9/599Copyright 2006 Juniper Networks, Inc. www.juniper.net
JUNOS CLI Outline
Overview and objectives
Connecting to a Juniper Networks M-Series router
JUNOS CLI Overview
JUNOS Operational Mode
JUNOS Configuration Mode System Debugging and Troubleshooting
Additional Information
8/6/2019 Seeren Cos Junos Module3
10/5910Copyright 2006 Juniper Networks, Inc. www.juniper.net
CLI Overview
Command Line Interface access Router console port
Network access via SSH or Telnet
Simple to use, text-based command interface
Various commands for configuring JUNOS and
Monitoring/Troubleshooting software, hardware,and network connectivity
JUNOS supports two modes
Operational Mode Configuration Mode
CLI Command Hierarchy
8/6/2019 Seeren Cos Junos Module3
11/5911Copyright 2006 Juniper Networks, Inc. www.juniper.net
CLI Overview Help
Provides context sensitive(Operational or Configuration mode)help at any level of the hierarchy
juniper@host> ?
juniper@host > show ?
juniper@host > show system ?
[edit]
juniper@host#> set protocols bgp ?
8/6/2019 Seeren Cos Junos Module3
12/5912Copyright 2006 Juniper Networks, Inc. www.juniper.net
CLI Overview Command Completion
Allows completion of commands withoutrequiring user to recall entire syntax
Applies to filenames, usernames, configurationdependant policies, firewall filters, etc.
Use Space or tab
show version
show ver [press space or tab] => show version
8/6/2019 Seeren Cos Junos Module3
13/5913Copyright 2006 Juniper Networks, Inc. www.juniper.net
Juniper Networks Documentation Set is Online
Help topic ?
Help reference ?
8/6/2019 Seeren Cos Junos Module3
14/5914Copyright 2006 Juniper Networks, Inc. www.juniper.net
CLI Overview CLI Messages
Messages appear when you: Enter or exit from configuration mode
Commit a configuration
Type a string or value that is not valid
Invalid string a message "syntax error" or "unknown command"appears w ith a caret (^) indicating error location
user@host> clear route^ syntax error, expecting .
CLI may display commands available to correct the syntax error
[edit]user@host# load myconfig-file
^ syntax error, expecting `merge',`override', or `replace'.
8/6/2019 Seeren Cos Junos Module3
15/5915Copyright 2006 Juniper Networks, Inc. www.juniper.net
CLI Overview Hierarchy Movement
Keyboard command sequences (Unix Emacs) for linecommands and viewing recently used commands
Ctrl-U Erase Line
Ctrl-W Erase word
Ctrl-A / Ctrl-E Goto Beginning/ End of line
Crtl-L Redraw line
Ctrl-F Forward
Ctrl-B Backwardsdelete/ backspace Delete char before cursor
Exactly Like CiscoExactly Like Cisco
8/6/2019 Seeren Cos Junos Module3
16/59
16Copyright 2006 Juniper Networks, Inc. www.juniper.net
CLI Overview Command output
All output in Junos is Unix less just like more but with additional options
Output does not scroll off the screen
/ string search/ string search
n repeat search
q quit
b previous screen
space next screen
s fi lename
(saves in user default
directory / var/ home/ user)
Enter l ine
h help
N full li st ing
G End of fi le
show interfaces/ lo0
Example:
8/6/2019 Seeren Cos Junos Module3
17/59
17Copyright 2006 Juniper Networks, Inc. www.juniper.net
CLI Overview Command History
Command history for CLI and configure mode
Up / Down arrow (VT100) (Ctrl-P / Ctrl-N)
show cli history (CLI mode only)
Default is to show last 100 commands
Maximum number of commands to display
8/6/2019 Seeren Cos Junos Module3
18/59
18Copyright 2006 Juniper Networks, Inc. www.juniper.net
JUNOS CLI Outline
Overview and objectives
Connecting to a Juniper Networks M-Series router
JUNOS CLI Overview JUNOS Operational Mode
JUNOS Configuration Mode System Debugging and Troubleshooting
Additional Information
8/6/2019 Seeren Cos Junos Module3
19/59
19Copyright 2006 Juniper Networks, Inc. www.juniper.net
Various CommandsVarious Commands
Controlling the CLIMonitoring and Troubleshooting
Connecting to other systems
File management
Controlling the system
Initiating Configuration mode
Exiting the CLI
Primarily used for view ing the operation of system status
Operational Mode Overview
Initial mode following successful login
8/6/2019 Seeren Cos Junos Module3
20/59
20Copyright 2006 Juniper Networks, Inc. www.juniper.net
Operational Mode CLI Environment
Setting the CLI environment show cli
user@host> show cli
CLI complete-on-space set to on
CLI idle-timeout disabled
CLI restart-on-upgrade set to on
CLI screen-length set to 24
CLI screen-width set to 80
CLI terminal is 'unknown'
CLI is operating in enhanced mode
set cli
Change any of the CLI parameters
8/6/2019 Seeren Cos Junos Module3
21/59
21Copyright 2006 Juniper Networks, Inc. www.juniper.net
Operational Mode A Few Commands
show version
show system ?
file ? show interface
show interface terse show interface extensive
request support information show chassis ?
8/6/2019 Seeren Cos Junos Module3
22/59
22Copyright 2006 Juniper Networks, Inc. www.juniper.net
Operational Mode Command Pipes
show interfaces | ?
show interfaces | count
show interfaces | match fxp1
show interfaces | find fxp1
show interfaces | save filename
show configuration | compare rollback 1
request support information | save filename
show configuration| compare (filename | rollback n) Like Unix diff
8/6/2019 Seeren Cos Junos Module3
23/59
23Copyright 2006 Juniper Networks, Inc. www.juniper.net
Operational Mode File Directory Structure
/config (flash) juniper.conf, juniper.conf.1, juniper.conf.2, andjuniper.conf.3
/var (disk)
/var/home - users home directories
/var/db/config - juniper.conf.4 through juniper.conf.9
/var/log - Contains system log and tracing files
/var/tmpcore files, temp directory for new software
/altroot (disk)
request system snapshot command
the root file system (/) is backed up to /altroot /altconfig (disk)
request system snapshot command
/config directory is backed up to /altconfig.
8/6/2019 Seeren Cos Junos Module3
24/59
24Copyright 2006 Juniper Networks, Inc. www.juniper.net
Operational Mode Log Files
Log files kept in /var/log
show log
list of log files in /var/log
show log filename
more filename
monitor start filename like Unix tail f multiple people can view log files at same time
O i l M d JUNOS S f
8/6/2019 Seeren Cos Junos Module3
25/59
25Copyright 2006 Juniper Networks, Inc. www.juniper.net
Operational Mode JUNOS Software
Each JUNOS software release consists of the base operatingsystem (jbase) and six software packages:
jbase - Contains additions to the operating system
jkernel - Operating system package
jroute - Software that runs on the Routing Engine
jcrypto - Security software (Domestic version only)
jpfe - Software that runs on the routers Packet Forwarding Engine
jdocs - Documentation for the software
These six packages, when grouped together, are know as ajbundle
Download software packages from: www.juniper.net/support/
The same binary image of JUNOS runs acrossall Juniper platforms!
Operational Mode
8/6/2019 Seeren Cos Junos Module3
26/59
26Copyright 2006 Juniper Networks, Inc. www.juniper.net
pSoftware Naming Convention
Package-m.nZnumber.tgz m.n is the major version
Z is a single uppercase letter A Alpha
B Beta R Release
I Internal Test or Experimental
Number is the release number
Operational Mode
8/6/2019 Seeren Cos Junos Module3
27/59
27Copyright 2006 Juniper Networks, Inc. www.juniper.net
pSoftware Naming Convention (continued)
jbundle-5.2R1.3-domestic.tgz
Software version 5.2 Released software
Release 1 Build 3
Domestic export restricted version
O ti l M d S t Sh td
8/6/2019 Seeren Cos Junos Module3
28/59
28Copyright 2006 Juniper Networks, Inc. www.juniper.net
Operational Mode System Shutdown
Two methods to gracefully shutdown and restartthe router and JUNOS
request system halt
request system reboot
R t S t S h t
8/6/2019 Seeren Cos Junos Module3
29/59
29Copyright 2006 Juniper Networks, Inc. www.juniper.net
Request System Snapshot
Back up the currently running and active filesystem so that you can recover to a known, stableenvironment in case something goes wrongwith an upgrade
/altroot
the root file system (/) is backed up to /altroot /altconfig
/config directory is backed up to /altconfig.
Use request system software rollbackto recover
JUNOS CLI O tline
8/6/2019 Seeren Cos Junos Module3
30/59
30Copyright 2006 Juniper Networks, Inc. www.juniper.net
JUNOS CLI Outline
Overview and objectives
Connecting to a Juniper Networks M-Series router
JUNOS CLI Overview JUNOS Operational Mode
JUNOS Configuration Mode System Debugging and Troubleshooting
Additional Information
Configuration Mode Overview
8/6/2019 Seeren Cos Junos Module3
31/59
31Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Overview
Initiated by entering configure in Operational Mode Prompt changes
Banner appears indicating hierarchy level
Hierarchy of statements
area interface
traceoptions
area-range
stub
virtual-link
Trunk of Hierarchy Tree
(Top-level Statements)
Trunk of Hierarchy Tree
(Top-level Statements)
bgp
dvmrp
igmp
isis
icmp
ospf
rip
rsvp
router-discovery
mpls
sap
Protocols
Branches of Hierarchy Tree
(Container Statements)
Branches of Hierarchy Tree
(Container Statements)
dead-interval
hello-interval
metric
passive
interface-type
priority
retransmit-interval
transmit-interval
transit-delay
poll-interval
Tree Leaves
(Leaf Statements)
Tree Leaves
(Leaf Statements)
Configuration Mode Prompt Changes
8/6/2019 Seeren Cos Junos Module3
32/59
32Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Prompt Changes
Prompt changes from > to #
user@host#
Banner appears indicating Hierarchy level
[edit interfaces]
user@host#
C fi ti M d C did t C fi ti
8/6/2019 Seeren Cos Junos Module3
33/59
33Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration
In text fi le
Nine previous
configurations
Nine previous
configurations
Candidate
Configuration
Candidate
Configuration
Interim
ConfigurationCommit
Confirmed
Commit
Rollback
Configuration Mode Candidate Configuration
Initially a copy of the active configuration Changes to candidate configuration do not take
effect until successful commit or commit confirmed
Container and Leaf statements
load
copy,save
x minutes
Without
Committing
/ config/ juniper.conf.n (n=0-3)
/ var/ db/ config/ juniper.conf.n (n=4-9)
Active
Configuration
Active
Configuration
Configuration Mode Set Command
8/6/2019 Seeren Cos Junos Module3
34/59
34Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Set Command
Add or change configuration set system host-name Denver
set interface fxp0 unit 0 family inet address
1.1.1.1/24 set routing-options router-id 2.2.2.2/32
Configuration Mode Edit Command
8/6/2019 Seeren Cos Junos Module3
35/59
35Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Edit Command
Example: top
?
show
edit interfaces
? show
top
Configuration Mode Top Command
8/6/2019 Seeren Cos Junos Module3
36/59
36Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Top Command
top level moves to top of edit hierarchy edit interfaces
show
top
show
Configuration Mode Up Command
8/6/2019 Seeren Cos Junos Module3
37/59
37Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Up Command
move up one level in edit hierarchy Example:
edit system login
show
up
show up
show
Configuration Mode Exit Command
8/6/2019 Seeren Cos Junos Module3
38/59
38Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Exit Command
Exit configuration mode Move to previous edit level in hierarchy
Configuration Mode Show Command
8/6/2019 Seeren Cos Junos Module3
39/59
39Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Show Command
View the candidate configuration Pipe the show command to compare existing
Candidate configuration with previousconfigurations or files
Configuration Mode Status Command
8/6/2019 Seeren Cos Junos Module3
40/59
40Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Status Command
Display other users configuring router
Multiple users can edit the same candidate
configuration, and the configuration changesare visible to everyone.
If another user is in the configuration mode at thesame time, this information is displayed when youenter the configuration mode
configure exclusive in 4.3
Configuration Mode Delete Command
8/6/2019 Seeren Cos Junos Module3
41/59
41Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Delete Command
Remove configuration statements edit interfaces fxp1 unit 0
show
set family inet address 1.1.1.1/24
show
delete family inet address 1.1.1.1/24
show
delete protocol ospf
delete protocol bgp
top
delete
Configuration Mode Run Command
8/6/2019 Seeren Cos Junos Module3
42/59
42Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Run Command
Execute CLI commands from configurationmode with the run command
run show interface fxp0
run show bgp sum
Configuration Mode Commit Command
8/6/2019 Seeren Cos Junos Module3
43/59
43Copyright 2006 Juniper Networks, Inc. www.juniper.net
Configuration Mode Commit Command
Save changes and activate
commit - checks configuration before activating it
commit check - Check only, do not apply changes
commit and-quit- Quit configuration mode if commitsucceeds
commit confirmed next page
Configuration Mode Commit Confirmed Command
8/6/2019 Seeren Cos Junos Module3
44/59
44Copyright 2006 Juniper Networks, Inc. www.juniper.net
Commit Confirmed Command
commit confirmed- Automatically rollback if notconfirmed.
By default, the configuration runs for 10 minutesbefore the rollback.
You can change the time by specifying the numberof minutes at the end of the command.
If you do not want the rollback to occur, issue asecond commit command before the rollbackoccurs.
Current config is juniper.conf (/config on flash)
Saved configs are juniper.conf.1, juniper.conf.2,,juniper.conf.9
Configuration Mode Save Command
8/6/2019 Seeren Cos Junos Module3
45/59
45Copyright 2006 Juniper Networks, Inc. www.juniper.net
g
save filename saves the configuration to an ASCII file on
hard drive, floppy drive, ftp site,
Default directory is your user directory /var/home/username
saves from current level and below top
save filename
Note: only commit activates and saves allyour changes to flash (/config).
Configuration Mode Load a Configuration File
8/6/2019 Seeren Cos Junos Module3
46/59
46Copyright 2006 Juniper Networks, Inc. www.juniper.net
g
Configuration information can comefrom an ASCII file prepared offline
Use the loadcommand to
override an existing configuration
merge new statements into existing configuration replace existing statement in current
configuration
Configuration Mode Filenames
8/6/2019 Seeren Cos Junos Module3
47/59
47Copyright 2006 Juniper Networks, Inc. www.juniper.net
g
In some CLI commands and configurationstatements you can include a filename.
Including: file copy, load, save, set system login
user user-name authentication load-key-file, andrequest system software add.
Configuration Mode Filenames
8/6/2019 Seeren Cos Junos Module3
48/59
48Copyright 2006 Juniper Networks, Inc. www.juniper.net
g You can specify a filename in one of the following ways:
filename
File in the users home directory on the local flash disk.
path/filename
File on the local flash disk.
/var/filename or /var/path/filename
File on the local hard disk.
a:filename or a:path/filename
File on local removable media. Can be in MS-DOS or UNIX(UFS) format.
hostname/path/filename or scp://hostname/path/filename
File on an scp/ssh client. You can also specify hostname asusername@hostname or username:password@hostname.
ftp://hostname/path/filename File on an FTP server. You can also specify hostname as
username@hostname or username:password@hostname.
http://hostname/path/filename
File on an HTTP server.
Configuration Mode Rollback Command
8/6/2019 Seeren Cos Junos Module3
49/59
49Copyright 2006 Juniper Networks, Inc. www.juniper.net
g
Restore previously committed config
Stores last 9 committed 0 is currentrunning config and 9 is oldest saved config
set system host-name
commit
show
rollback 1 show
Delete Entire Candidate Config.
8/6/2019 Seeren Cos Junos Module3
50/59
50Copyright 2006 Juniper Networks, Inc. www.juniper.net
configure
delete
show rollback
show
OR
configure save demo
delete
show
load replace demo
show
Basic System Configuration
8/6/2019 Seeren Cos Junos Module3
51/59
51Copyright 2006 Juniper Networks, Inc. www.juniper.net
set system host-name Denver
set system domain name juniper.net
set system services telnet
set system services ftp
set system login user juniper authentication plain-text-password
set system login user juniper class fullaccess
set system login class fullaccess permissions all
set syslog file filename interactive-commands info
set interfaces fxp0 unit 0 family inet 1.1.1.1/24
JUNOS CLI Outline
8/6/2019 Seeren Cos Junos Module3
52/59
52Copyright 2006 Juniper Networks, Inc. www.juniper.net
Overview and objectives Connecting to a Juniper Networks M-Series router
JUNOS CLI Overview JUNOS Operational Mode
JUNOS Configuration Mode
System Debugging and Troubleshooting
Additional Information
Trace Options
8/6/2019 Seeren Cos Junos Module3
53/59
53Copyright 2006 Juniper Networks, Inc. www.juniper.net
set traceoptions file filename files (default 10)
size (default 128k)
world-readable set traceoptions flag
What do you want to look at?
Various options
monitor start filename like Unix tail f multiple people can view log files at same time
Trace Options
8/6/2019 Seeren Cos Junos Module3
54/59
54Copyright 2006 Juniper Networks, Inc. www.juniper.net
Example: edit protocols bgp set traceoptions file bgp.log
set traceoptions flag ?
all Trace everything
aspath
damping
General Trace general events
keepalive
Normal Trace normal events
open Trace BGP open packets
Packets Trace all BGP protocol packets
Trace Options (continued)
8/6/2019 Seeren Cos Junos Module3
55/59
55Copyright 2006 Juniper Networks, Inc. www.juniper.net
policy Trace policy processing route Trace routing information
state Trace state transitions
task Trace routing protocol task processing
timer Trace routing protocol timer processing
update Trace BGP update packets
Commit and-exit
Monitor start bgp.log
Troubleshooting Real-time Monitoring
8/6/2019 Seeren Cos Junos Module3
56/59
56Copyright 2006 Juniper Networks, Inc. www.juniper.net
monitor interface monitor interface traffic
May need to set terminal type
set cli terminal vt100
JUNOS CLI Outline
8/6/2019 Seeren Cos Junos Module3
57/59
57Copyright 2006 Juniper Networks, Inc. www.juniper.net
Overview and objectives Connecting to a Juniper Networks M-Series router
JUNOS CLI Overview JUNOS Operational Mode
JUNOS Configuration Mode
System Debugging and Troubleshooting
Additional Information
Additional Information
8/6/2019 Seeren Cos Junos Module3
58/59
58Copyright 2006 Juniper Networks, Inc. www.juniper.net
JUNOS Documentation CD-ROM (included with every new router)
Website www.juniper.net/support/techpubs/
Hardcopy manuals (orderable item)
Online Video of the material covered in thispresentation
http://www.juniper.net/training/elearning/junos_cli/
http://www.juniper.net/training/elearning/junos_cli/http://www.juniper.net/training/elearning/junos_cli/8/6/2019 Seeren Cos Junos Module3
59/59
59Copyright 2006 Juniper Networks, Inc. www.juniper.net
Thank you
Jean-Marc UzLiaison Research & Education, EMEA
Mobile: +3361543251231 Place Ronde, 92986 Paris-La-Defense, France
mailto:[email protected]:[email protected]:[email protected]