JUNOS Command Line Interface. Copyright 2003 Juniper Networks, Inc. www.juniper.net 1



Similar documents
Using the Command-Line Interface

SEEREN2 Summer School Heraklion, Sept 25 th. Routing Issues: QoS/CoS. Jean-Marc Uzé Liaison Research & Education, EMEA juze@juniper.

Introduction to the Junos Operating System

Configuration and File Management Feature Guide for QFabric Systems

DAY ONE: EXPLORING THE JUNOS CLI

vcenter Server Appliance Configuration

Chapter 2 Using the Command Line Interface

Basic Command-Line Interface Commands

Fundamentals of UNIX Lab Networking Commands (Estimated time: 45 min.)

Using the Command Line Interface (CLI)

Junos OS. MPLS Network Operations Guide. Published: Copyright 2012, Juniper Networks, Inc.

Basic System. Vyatta System. REFERENCE GUIDE Using the CLI Working with Configuration System Management User Management Logging VYATTA, INC.

Using the Cisco IOS Command Line Interface

HP 5820X & 5800 Switch Series Fundamentals

Firewall Filters Feature Guide for EX9200 Switches

Junos OS for EX Series Ethernet Switches

Using the Command Line Interface (CLI)

Comware versus Cisco IOS Command Guide

Chapter 21 Terminal Server

Junos OS. DDoS Protection Configuration Guide. Release Published: Copyright 2012, Juniper Networks, Inc.

Junos OS. DDoS Protection Configuration Guide. Release Published: Copyright 2012, Juniper Networks, Inc.

Juniper Secure Analytics

Juniper Networks Certified Internet Associate (JNCIA-Junos) Exam.

Managing Service Design for PTP Timing

Oracle E-Business Suite R11i System Navigation Training

Junos OS. DHCP Relay Agent Feature Guide for Subscriber Management. Release Published: Copyright 2013, Juniper Networks, Inc.

Junos Space. Audit Logs. Release Published: Copyright 2014, Juniper Networks, Inc.

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

Junos OS. System Log Messages. Release Modified: Copyright 2015, Juniper Networks, Inc.

Monitoring and Analyzing Switch Operation

UNIX: Introduction to TELNET and FTP on UNIX

Layer 2 Switch 24 Port 10/100 Managed Switch Plus 2 Combo Gigabit Copper/SFP Ports

Cisco ISE Command-Line Interface

Junos OS. Firewall Filters Configuration Guide. Release Published: Copyright 2012, Juniper Networks, Inc.

Juniper Operating System Fundamental for APNIC Training Lab. APNIC Technical Workshop June 18, 2015, APNIC Office In-house training.

USER GUIDE WEB-BASED SYSTEM CONTROL APPLICATION. August 2014 Phone: Publication: , Rev. C

Remote Management. Vyatta System. REFERENCE GUIDE SSH Telnet Web GUI Access SNMP VYATTA, INC.

Brocade to Cisco Comparisons

Junos OS. Distributed Denial-of-Service Protection Feature Guide. Release Published: Copyright 2013, Juniper Networks, Inc.

PT Activity: Configure Cisco Routers for Syslog, NTP, and SSH Operations

ISE TACACS+ Configuration Guide for Cisco NX-OS Based Network Devices. Secure Access How-to User Series

Junos OS for EX Series Ethernet Switches

7750 SR OS System Management Guide

MUNIS Instructions for Logging into SaaS (ASP) Dashboard

How to upload large files to a JTAC Case

Junos Switching Basics

JUNOS Secure Template

Administering the Network Analysis Module. Cisco IOS Software. Logging In to the NAM with Cisco IOS Software CHAPTER

JDarkRoom. User Guide. Version 14. Copyright 2009 Duncan Jauncey.

Junos OS. Firewall Filters Feature Guide for Routing Devices. Release Published: Copyright 2013, Juniper Networks, Inc.

Juniper Secure Analytics

Configuring Basic Settings

Junos OS. Firewall User Authentication for Security Devices. Release 12.1X44-D10. Published: Copyright 2013, Juniper Networks, Inc.

Network Configuration Example

Connect the Host to attach to Fast Ethernet switch port Fa0/2. Configure the host as shown in the topology diagram above.

Juniper Secure Analytics

Computer Networks Administration Help Manual Sana Saadaoui Jemai Oliver Wellnitz

Junos OS Support for OpenFlow v1.0 Beta Draft

Clustered Data ONTAP 8.3

Server Management Tools (ASMT)

There are numerous ways to access monitors:

Common Services Platform Collector 2.5 Quick Start Guide

Clustered Data ONTAP 8.3

2 Advanced Session... Properties 3 Session profile... wizard. 5 Application... preferences. 3 ASCII / Binary... Transfer

Lab Advanced Telnet Operations

Configuring the Firewall Management Interface

Junos OS for EX Series Ethernet Switches

Using Network Attached Storage with Linux. by Andy Pepperdine

Configuration of Cisco Routers. Mario Baldi

Network provider filter lab

ICE. TCP PLUS. J. River, Inc. ICE.TCP PLUS Programs. DejaWinT with SSH FTP Pro ICElp Printing Network Toolbox

SQLServer Mgmt Studio 2005 (Std keyset) Keyboard Shortcuts

Troubleshooting Network Performance with Alpine

Connecting to the Firewall Services Module and Managing the Configuration

F-SECURE MESSAGING SECURITY GATEWAY

How to test and debug an ASP.NET application

Tera Term Telnet. Introduction

Router CLI Overview. CradlePoint, Inc.

TREK HOSC PAYLOAD ETHERNET GATEWAY (HPEG) USER GUIDE

Lab: Basic Router Configuration

Integrating idrac 7 with Microsoft Active Directory

Integrating idrac7 With Microsoft Active Directory

Telnet, Console and AUX Port Passwords on Cisco Routers Configuration Example

Firefly Host. Installation and Upgrade Guide for VMware. Release 6.0. Published: Copyright 2014, Juniper Networks, Inc.

Lab Load Balancing Across Multiple Paths Instructor Version 2500

Evaluation guide. Vyatta Quick Evaluation Guide

Abstract. Avaya Solution & Interoperability Test Lab

7450 ESS OS System Management Guide. Software Version: 7450 ESS OS 10.0 R1 February 2012 Document Part Number: * *

DS-5 ARM. Using the Debugger. Version Copyright ARM. All rights reserved. ARM DUI 0446M (ID120712)

Getting Started with KompoZer

Junos OS. Flow Monitoring Feature Guide for Routing Devices. Release Published: Copyright 2014, Juniper Networks, Inc.

fåíéêåéí=péêîéê=^çãáåáëíê~íçêûë=dìáçé

Juniper Networks Certified Associate Junos Bootcamp, IJOS and JRE (JNCIA-Junos BC)

Applicazioni Telematiche

Junos Space Security Director

MBA Dedicated Servers: A How-to Guide

Juniper Secure Analytics

- The PIX OS Command-Line Interface -

EMC Smarts. Installation Guide for SAM, IP, ESM, MPLS, VoIP, and NPM Managers. Version 9.3 P/N REV 01

Junos Space. Network Director Monitor Mode User Guide. Release 1.5. Published: Copyright 2013, Juniper Networks, Inc.

Transcription:

JUNOS Command Line Interface Copyright 2003 Juniper Networks, Inc. www.juniper.net 1

Agenda Command-Line Interface Logging-In & Editing Interpret Output & Getting Help CLI Configuration Moving around Hierarchy Modify, View, Review & Remove Activate, Save, Load & Commit Slide 2

Agenda Command-Line Interface Logging-In & Editing Interpret Output & Getting Help CLI Configuration Moving around Hierarchy Modify, View, Review & Remove Activate, Save, Load & Commit Slide 3

Overview Universal access to router Console Management port, using Telnet, ssh, RADIUS, TACACS+ User authentication using login name and password Users have individual accounts Per-user command class permissions Line editor with command history Context-sensitive help Command completion UNIX-style pipes 4

Overview Configure Object-based hierarchy Commit changes when done Rollback if necessary Load/save configuration files Monitor show command hierarchy Troubleshoot Traceroute Ping Log and trace file monitoring 5

Overview Command hierarchy clear configure monitor set show Less Specific bgp chassis interfaces isis ospf route version brief exact protocol table terse More Specific 6

Log In Router administrator configures login ID and password for each user Example session lab2 (ttyd0) login: perkins Password: Last login: Fri Feb 18 19:23:16 on ttyd0 Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. ---JUNOS 4.0R1 built 2000-02-10 09:29:44 UTC perkins@lab2> 7

Log In Start the CLI manually lab2 (ttyd0) login: root Password: Last login: Fri Feb 18 19:23:16 on ttyd0 Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. ---JUNOS 4.0R1 built 2000-02-10 09:29:44 UTC # cli root@lab2> quit # logout lab2 (ttyd0) login: 8

Log In Special treatment for root login Can only log in as root from console port Must create additional user with superuser privileges to log in via network ports Be sure to review security implications 9

Edit Lines Move the cursor Ctrl-B Ctrl-F Ctrl-A Ctrl-E Back one character Forward one character To beginning of line To end of line Delete characters Delete or backspace key Ctrl-D Ctrl-K Ctrl-U Ctrl-W Delete character before cursor Delete character under cursor Delete from cursor to end of line Delete all characters Delete entire word to left of cursor 10

Edit Lines Other keys Ctrl-L Ctrl-P Ctrl-N Redraw the current line Move backwards through command history Move forward through command history 11

Edit Lines Command completion saves typing Typing entire command not necessary Type the minimum characters required and press space or tab key Completion example root@lab2> sh<space>ow i<space> 'i' is ambiguous. Possible completions: igmp interfaces isis Show information about IGMP Show interface information Show information about IS-IS root@lab2> show i 12

Agenda Command-Line Interface Logging-In & Editing Interpret Output & Getting Help CLI Configuration Moving around Hierarchy Modify, View, Review & Remove Activate, Save, Load & Commit Slide 13

Interpret Output Error messages ^ displayed under error Message indicates type of error Example [edit] root@lab2# load config-file<enter> ^ syntax error, expecting merge, override, or replace. root@lab2# 14

Interpret Output Output does not scroll off screen CLI displays ---(more)--- prompt Important key sequences Space Display next output screen b Return to previous screen d Scroll down one-half screen Enter /string n q h Display next line of output Search for a string in output Repeat search for string Return to CLI prompt Show help message for key sequences 15

Get Help Type? anywhere on command line Help depends on where you are Beginning of line Shows help for top level of hierarchy End of command Shows help for next level in hierarchy Middle of command Shows list of matching commands at current level in hierarchy 16

Agenda Command-Line Interface Logging-In & Editing Interpret Output & Getting Help CLI Configuration Moving around Hierarchy Modify, View, Review & Remove Activate, Save, Load & Commit Slide 17

Overview CLI has separate configuration mode You edit a copy of current configuration called the candidate configuration Changes you make are visible to other CLI users Changes they make might conflict with your changes Changes do not take effect until you commit them When committed, candidate configuration becomes active and a new candidate is created 18

Configure the Router: Overview commit Candidate configuration Active configuration 0 rollback n Rollback files stored in /config/juniper.conf.n (n=1-3) /var/db/config/juniper.conf.n (n=4-9) 1 2... 19

Enter Configuration Mode Type configure at the CLI prompt root@lab2> configure Entering configuration mode [edit] root@lab2# Other users in configuration mode root@lab2> configure Entering configuration mode Current configuration users: diana terminal d0 on since 1999-10-14 07:11:29 UTC, idle 00:00:49 [edit protocols ospf] The configuration has been changed but not committed [edit] root@lab2# 20

10,000 Foot View Move around statement hierarchy using edit command Like UNIX cd command Alter configuration using set command Activate configuration using commit command 21

Move around the Hierarchy Configuration statements organized as a tree Similar to UNIX/Windows style directories top Less Specific chassis firewall interfaces protocols system more alarm clock fpc atm e3 ethernet sonet t3 More Specific 22

Move around the Hierarchy Use the edit command to focus your attention on a particular part of the hierarchy top chassis firewall interfaces protocols system more alarm clock fpc atm e3 ethernet sonet t3 user@host# edit chassis alarm ethernet [edit chassis alarm ethernet] 23

Move around the Hierarchy Use the exit command to move back to where you just were exit at the top level exits configuration mode and puts you back into operational mode exit configuration-mode exits no matter where you are Use the up command to move up a level Use the top command to move to the top of the hierarchy 24

Move around the Hierarchy The question mark is your friend [edit] root@lab2# edit? Possible completions: > chassis Chassis configuration > class-of-service Class-of-service configuration > firewall Define a firewall configuration > forwarding-options Configure options to control packet sampling > groups Configuration groups > interfaces Interface configuration > policy-options Routing policy option configuration > protocols Routing protocol configuration > routing-options Protocol-independent routing option configuration > snmp Simple Network Management Protocol > system System parameters [edit] 25

Move around the Hierarchy [edit] root@lab2# edit chassis [edit chassis] root@lab2# edit? Possible completions: <[Enter]> Execute this command > alarm Global alarm settings > clock Clock sources > fpc FPC card parameters Pipe through a command [edit chassis] root@lab2# 26

Move around the Hierarchy [edit chassis] root@lab2# edit alarm [edit chassis alarm] root@lab2# edit? Possible completions: > atm ATM alarms > e3 E3 alarms > ethernet Ethernet alarms > sonet SONET alarms > t3 DS3 alarms [edit chassis alarm] root@lab2# up [edit chassis] root@lab2# up [edit] Copyright root@lab2# 2003 Juniper Networks, Inc. Proprietary and Confidential www.juniper.net 27

Move around the Hierarchy [edit] root@lab2# edit chassis alarm [edit chassis alarm] root@lab2# edit sonet [edit chassis alarm sonet] root@lab2# exit [edit chassis alarm] root@lab2# top [edit] root@lab2# 28

Test Your Knowledge (I) What is the result of the final command? [edit] root@lab2# edit protocols ospf [edit protocols ospf] root@lab2# edit area 0 [edit protocols ospf area 0.0.0.0] root@lab2# exit 29

Agenda Command-Line Interface Logging-In & Editing Interpret Output & Getting Help CLI Configuration Moving around Hierarchy Modify, View, Review & Remove Activate, Save, Load & Commit Slide 30

Modify the Configuration Use the set command to add or change configuration statements set command creates configuration statements, or changes them if they already exist [edit] root@lab2# set chassis alarm sonet lol red [edit] root@lab2# 31

Modify the Configuration Optionally, move into the alarm hierarchy and save some keystrokes [edit] root@lab2# edit chassis alarm sonet [edit chassis alarm sonet] root@lab2# set lol red [edit chassis alarm sonet] root@lab2# set los red [edit chassis alarm sonet] root@lab2# set pll yellow [edit chassis alarm sonet] root@lab2# up [edit chassis alarm] 32

View the Configuration Use the show command to see the candidate configuration Begins at current hierarchy level You can specify starting level Indented to match each hierarchy level [edit chassis alarm] root@lab2# show sonet { lol red; los red; pll yellow; } [edit chassis alarm] root@lab2# 33

View the Configuration [edit chassis alarm sonet] root@lab2# top [edit] root@lab2# show chassis filter-check 180; alarm { sonet { lol red; los red; pll yellow; } } root@lab2# 34

Remove Statements [edit] root@lab2# edit chassis alarm sonet [edit chassis alarm sonet] root@lab2# delete lol [edit chassis alarm sonet] root@lab2# delete los [edit chassis alarm sonet] root@lab2# 35

Remove Statements [edit chassis alarm sonet] root@lab2# up [edit chassis alarm] root@lab2# show sonet { pll yellow; } [edit chassis] root@lab2# 36

Agenda Command-Line Interface Logging-In & Editing Interpret Output & Getting Help CLI Configuration Moving around Hierarchy Modify, View, Review & Remove Activate, Save, Load & Commit Slide 37

Activate a Configuration Activate configuration changes using the commit command [edit] user@host# commit commit complete [edit] user@host# Checks configuration before activating it System never commits for you One exception: commit confirmed 38

Activate a Configuration Inband configuration has disadvantages Might disrupt connectivity to router Might disrupt inband session Avoid disadvantages using commit confirmed command Activates configuration for a few minutes (default is 10 minutes) If configuration is not confirmed, router returns to previous configuration automatically Confirm configuration by issuing a second commit command 39

Back out Changes Use the rollback command to restore one of the last nine previously committed configurations rollback or rollback 0 resets the candidate configuration to the currently running configuration, which is the last version committed. rollback 1 loads the configuration before that and so on 40

Commit Dual RE When commit is entered, the system will only activates the changes in the local RE. Use commit sync command to make changes to activates in both RE. 41

Save Configuration Files Current candidate configuration from current hierarchy level and below can be saved to ASCII file using save command [edit] cli# save filename [edit] cli# File is saved to user s home directory unless full path name is specified Filename can be URL or in user@host notation 42

Load a Configuration File Configuration information can come from an ASCII file prepared elsewhere Use the load command to Override an existing configuration Merge new statements into existing configuration Replace existing statements in current configuration 43

Load a Configuration File Syntax load (replace merge override) filename Changes candidate configuration only You must commit to activate Can take input from the terminal 44

Save and Load Configuration Files commit Candidate configuration Active configuration 0 save load rollback n 1 2... 45

Configuration Command Summary Add and modify configuration statements edit,set, rename, and insert commands Display current configuration show command Save, validate, and activate a complete configuration commit command Return to previously saved configuration rollback command Remove configuration statements delete command Display other users configuring router status command 46

CLI Commands in Configuration Mode You can execute CLI commands from configuration mode [edit protocols isis] user@host# run show isis routes IS-IS routing table Current version: L1: 42 L2: 42 Prefix L Version Metric Interface Via 192.168.1.112/30 1 42 20 so-1/1/3.0 Miami so-5/0/0.0 Miami so-1/1/1.0 Miami 192.168.1.116/30 1 42 20 so-1/1/3.0 Miami so-5/0/0.0 Miami so-1/1/1.0 Miami [edit protocols isis] user@host# 47

View Log Files System keeps log files in /var/log messages file contains running commentary about system operation Can be tuned to provide minimal to extensive logging View with show log file-name View in real time with monitor start file-name 48

View Log Files Additional logging can be turned on on a permodule basis use traceoptions flag keywords specify file name with traceoptions file file-name command Example [edit protocols ospf] cli# set traceoptions flag errors cli# set traceoptions file ospf-log 49

Hands-On Session 50

JUNOS CLI Familiarization A : Commands & On-line Help Hands-on Session 1 Type? List 6 commands on the screen Type c? List all show commands starting with c? Type clear? List few of remaining command B : Word Completion Type sh<space>ow i<tab> Type sh<tab>terfaces List remaining command What interfaces do you see? C : CLI Messages & Keystroke shortcuts Type clear route Type con<space>figure Type quit What message do you see? Why? Did the prompt change? Why? What is the prompt now? D : Keyboard Sequence Type show interfaces<don t press enter> Type sh route and sh sys users Press Ctrl-f, Ctrl-a, Ctrl-b Press Ctrl-p, Ctrl-n What happen E: Command Output Typesh inter detail What happen whens you press space bar? What happens when you press enter? Slide 51