Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to the Junos Operating System

Similar presentations


Presentation on theme: "Introduction to the Junos Operating System"— Presentation transcript:

1 Introduction to the Junos Operating System
Chapter 3: User Interface Options

2 Chapter Objectives After successfully completing this chapter you will be able to: Describe some user interface options for devices running the Junos operating system Demonstrate the Junos CLI and its features

3 Agenda: User Interface Options
The Junos CLI CLI Basics Operational Mode Configuration Mode

4 Common User Interface Options
Junos CLI Text-based command shell Accessible through the console port using a terminal emulation program Uses RJ Bps, 8/1/N (not configurable) Also accessible through network ports using an access management protocol such as Telnet or SSH Requires network interface and related service configuration Many Junos devices include a dedicated management Ethernet interface used for out-of-band access J-Web Web-based graphical user interface Accessible through an HTTP-enabled or HTTPS-enabled browser

5 Agenda: User Interface Options
The Junos CLI CLI Basics Operational Mode Configuration Mode

6 Logging In When logging in:
Nonroot users are placed into the CLI automatically The root user must start the CLI from the shell Remember to exit the root shell after logging out of the CLI! router (ttyu0) login: user Password: --- JUNOS 12.1R1.9 built :12:49 UTC router (ttyu0) login: root Password: --- JUNOS 12.1R1.9 built :12:49 UTC cli Shell Prompt CLI Prompt

7 CLI Modes Operational mode: Configuration mode:
Monitor and troubleshoot the software, network connectivity, and hardware Configuration mode: Configure the device, including interfaces, protocols, user access, and system hardware properties The > character identifies operational mode [edit] The # character identifies configuration mode

8 Context-Sensitive Help
Type ? anywhere on the command line to get help: ? Possible completions: clear Clear information in the system configure Manipulate software configuration information file Perform file operations help Provide help information . . . clear ? amt Show AMT Protocol information arp Clear address resolution information auto-configuration Clear auto-configuration action bfd Clear Bidirectional Forwarding Detection information

9 Topical Help help topic provides topical information:
help topic interfaces ? Possible completions: accept-data Accept packets destined for virtual address accept-source-mac Policers for specific source MAC addresses access-profile-chap CHAP profile associated with physical interface accounting Packet counting for transit traffic accounting-profile Accounting profile acfc Compression of Address and Control fields in PPP header ... help topic interfaces address Configuring the Interface Address You assign an address to an interface by specifying the address when configuring the protocol family. For the inet family, configure the interface's IP address. For the iso family, configure one or more addresses for the loopback interface. For the ccc, tcc, mpls, tnp, and vpls families, you never configure an address.

10 Help with Configuration Syntax
help reference offers configuration syntax help: help reference interfaces address address Syntax address address { arp ip-address (mac | multicast-mac) mac-address <publish>; broadcast address; ... Hierarchy Level [edit interfaces interface-name unit logical-unit-number family family], [edit logical-routers logical-router-name interfaces interface-name unit logical-unit-number family family]

11 Command and Variable Completion
Use the Spacebar to complete commands: Use the Tab key to complete commands and variables: sh<space>ow i<space> 'i' is ambiguous. Possible completions: iccp Show Inter Chassis Control Protocol... igmp Show Internet Group Management Protocol... igmp-snooping Show IGMP snooping information interfaces Show interface information ipv Show IP version 6 information isdn Show Integrated Services Digital isis Show Intermediate System-to-Intermediate... show i Press the Spacebar to complete a command [edit policy-options] show policy-statement t<tab>his-is-my-policy then accept; Press Tab to complete assigned variables

12 Editing Command Lines Emacs-style editing sequences are supported:
A VT100 terminal type also supports the Arrow keys show interfaces Ctrl+b Ctrl+a Ctrl+f Ctrl+e Keyboard Sequence Cursor Position

13 Using | (Pipe) Use | (pipe) to filter and manipulate command output:
show route | ? Possible completions: count Count occurrences display Show additional kinds of information except Show only text that does not match a pattern find Search for first occurrence of pattern hold Hold text without exiting the --More-- prompt last Display end of output only match Show only text that matches a pattern no-more Don't paginate output request Make system-level requests resolve Resolve IP addresses save Save output text to file trim Trim specified number of columns from start of line

14 Agenda: User Interface Options
The Junos CLI CLI Basics Operational Mode Configuration Mode

15 CLI Operational Mode Execute operational mode commands to monitor and control the operation of devices running the Junos OS Hierarchy of commands Example: show ospf interface Less Specific More Specific clear configure help monitor set show arp configuration ospf version database interface neighbor

16 Operational Mode Capabilities
? Possible completions: clear Clear information in the system configure Manipulate software configuration information file Perform file operations help Provide help information load Load information from file monitor Show real-time debugging information mtrace Trace multicast path from source to receiver op Invoke an operation script ping Ping remote target quit Exit the management session request Make system-level requests restart Restart software process save Save information to file set Set CLI properties, date/time, craft interface message show Show system information ssh Start secure shell on another host start Start shell telnet Telnet to another host test Perform diagnostic debugging traceroute Trace route to remote host

17 Agenda: User Interface Options
The Junos CLI CLI Basics Operational Mode Configuration Mode

18 Active Versus Candidate Configuration
Batch configuration model: Must commit configuration changes Active configuration: Current operational configuration Boot-up configuration Candidate configuration: A working copy for configuration changes Initialized with the active configuration Becomes active configuration upon commit

19 Overview: The Life of a Configuration File
commit rollback n Candidate Configuration Active 1 2 ... 49 configure Bit Bucket

20 Entering Configuration Mode (1 of 2)
Type configure at the operational mode prompt to enter configuration mode: Use configure exclusive to exclude other users from editing the configuration Any uncommitted changes are discarded when users exit: configure Entering configuration mode [edit] configure exclusive warning: uncommitted changes will be discarded on exit Entering configuration mode [edit]

21 Entering Configuration Mode (2 of 2)
Use configure private to allow users to edit private copies of candidate configuration concurrently When users issue a commit, their private changes merge back into the global configuration Any uncommitted changes are discarded when users exit If two users make competing changes, the first user’s commit succeeds, and the second user receives a warning The second user must issue a second commit to activate the change configure private warning: uncommitted changes will be discarded on exit Entering configuration mode Users currently editing the configuration: nancy terminal p0 (pid 9935) on since :11:22 UTC private [edit] [edit] Allows other users to edit private copies of the candidate configuration

22 Configuration Statement Hierarchy
[edit] edit protocols ospf area 51 stub [edit protocols ospf area stub] [edit] Less Specific chassis interfaces protocols services system bgp isis mpls ospf pim rip rsvp vrrp area area_id graceful-restart overload traffic-engineering More Specific area-range area_range interface nssa stub

23 Configuration File Is Hierarchical
Enter CLI commands without curly brackets: [edit system] set services web-management http port 8080 The result is a hierarchical configuration file, complete with curly brackets show services web-management { http { port 8080; }

24 Moving Between Levels (1 of 6)
edit functions like a change directory command: [edit] edit protocols ospf area 51 stub [edit protocols ospf area stub] [edit] chassis interfaces protocols services system bgp isis mpls ospf pim rip rsvp vrrp area area_id graceful-restart overload traffic-engineering area-range area_range interface nssa stub

25 Moving Between Levels (2 of 6)
up moves up one level in the hierarchy: [edit protocols ospf area stub] up [edit protocols ospf area ] [edit] chassis interfaces protocols services system bgp isis mpls ospf pim rip rsvp vrrp area area_id graceful-restart overload traffic-engineering area-range area_range interface nssa stub

26 Moving Between Levels (3 of 6)
up n moves up n levels in the hierarchy: [edit protocols ospf area ] up 2 [edit protocols] [edit] chassis interfaces protocols services system bgp isis mpls ospf pim rip rsvp vrrp area area_id graceful-restart overload traffic-engineering area-range area_range interface nssa stub

27 Moving Between Levels (4 of 6)
top moves to the top of the hierarchy: [edit protocols ospf area stub] top [edit] [edit] chassis interfaces protocols services system bgp isis mpls ospf pim rip rsvp vrrp area area_id graceful-restart overload traffic-engineering area-range area_range interface nssa stub

28 Moving Between Levels (5 of 6)
exit moves to the previous, higher level in hierarchy: [edit protocols ospf] edit area 51 stub [edit protocols ospf area stub] exit [edit] chassis interfaces protocols services system bgp isis mpls ospf pim rip rsvp vrrp area area_id graceful-restart overload traffic-engineering area-range area_range interface nssa stub

29 Moving Between Levels (6 of 6)
Summary of moving between levels: edit functions like a CD command up moves up one level up n moves up n levels top moves to the top of the hierarchy exit moves to the previous, higher level in the hierarchy or exits configuration mode if at the top level of the hierarchy [edit] edit protocols ospf area 51 stub [edit protocols ospf area stub] up [edit protocols ospf area ] up 2 [edit protocols] top exit The configuration has been changed but not committed Exit with uncommitted changes? [yes,no] (yes)

30 Adding Configuration Statements
Use set to add configuration statements: [edit system services] show ssh; telnet; set ftp ftp; FTP service added

31 Removing Configuration Statements
Use the delete command to remove statements Removes everything from the specified hierarchy down [edit system services] show ftp; ssh; telnet; delete telnet Telnet service removed

32 Test Your Knowledge Pop quiz: You just disabled an interface with a set interface interface-name disable statement. How do you re-enable this interface?

33 Helpful Configuration Mode Commands (1 of 2)
Commands to aid in configuration: rename a configuration statement [edit] rename interfaces ge-0/0/10 to ge-0/0/11 replace pattern of configuration statements replace pattern ge-0/0/10 with ge-0/0/11 copy a configuration statement to another statement copy interfaces ge-0/0/10 to ge-0/0/11

34 Helpful Configuration Mode Commands (2 of 2)
Commands to aid in configuration: deactivate or ignore a configuration statement [edit] deactivate interfaces ge-0/0/10 insert a configuration statement in another location [edit policy-options policy-statement test] insert term three before term two annotate a comment to a configuration statement [edit system] annotate name-server “adding new name servers”

35 Viewing the Candidate Configuration
[edit] show system services ssh; web-management { http { port 8080; } edit system services [edit system services] show You can display the portions that concern you from the root of the hierarchy… …or use edit to park yourself at a specific subhierarchy Hint: To view the set commands used to build the configuration, use the show | display set command.

36 Committing a Configuration (1 of 2)
Use commit to activate configuration changes: If multiple REs are installed, use commit synchronize Use commit check to confirm syntax: Use commit confirmed to temporarily activate: [edit] commit commit complete [edit] commit check [edit interfaces ge-0/0/10 unit 0] 'family' When ethernet-switching family is configured on an interface, no other family type can be configured on the same interface. error: configuration check-out failed [edit] commit confirmed commit confirmed will be automatically rolled back in 10 minutes unless confirmed commit complete

37 Committing a Configuration (2 of 2)
Use commit at to schedule a future commit: Use commit comment to add comments: Use commit and-quit to save time: [edit] commit at 21:00:00 configuration check succeeds commit at will be executed at :00:00 UTC Exiting configuration mode [edit] commit comment "Changed OSPF configuration" commit complete show system commit :32:42 UTC by user via cli Changed OSPF configuration [edit] commit and-quit commit complete Exiting configuration mode

38 Comparing Configuration File Differences
Compare candidate and active configurations: Compare active and historical configurations: Compare arbitrary files: [edit system services] show | compare + ftp; - telnet; show configuration | compare rollback number show configuration | compare filename file compare files filename_1 filename_2

39 Backing Out of Configuration Changes
Use rollback to restore a previous configuration: rollback (or rollback 0 ) resets the candidate configuration to the currently active configuration rollback 1 loads the previously active configuration rollback n loads referenced rollback version Modifies only the candidate configuration Do not forget to commit the changes! [edit] rollback ? Possible completions: <[Enter]> Execute this command :55:48 UTC by user via cli :16:27 UTC by lab via cli ... :11:00 UTC by lab via cli

40 Review: The Life of a Configuration File
commit rollback n Candidate Configuration Active 1 2 ... 49 configure Bit Bucket

41 Saving Configuration Files
Use save to save the current configuration: Saves only from the current hierarchy down Saves to user’s working directory by default You can also specify a full path and filename or a URL (FTP and SCP) [edit] save filename Wrote 101 lines of configuration to 'filename' [edit] save path/filename save save

42 Loading Configuration Files
Use the load command to load a configuration file: Use terminal to input from terminal capture buffer: Use relative to load from current configuration hierarchy: Use commit to activate the candidate configuration [edit] load ? Possible completions: factory-default Override existing configuration with factory default merge Merge contents with existing configuration override Override existing configuration patch Load patch file into configuration replace Replace configuration data set Execute set of commands on existing configuration update Update existing configuration load (replace | merge | override) terminal load (replace | merge) (filename | terminal) relative

43 Using the run Command Use run to execute operational mode CLI commands while in configuration mode Can save time when testing the effects of a recent change [edit interfaces ge-0/0/12] set unit 0 family inet address /16 commit commit complete run ping count 1 PING ( ): 56 data bytes 64 bytes from : icmp_seq=0 ttl=255 time=0.967 ms ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.967/0.967/0.967/0.000 ms Use run to test configuration changes without leaving configuration mode

44 Summary In this chapter, we:
Described some user interface options for Junos devices Demonstrated the Junos CLI and its features

45 Review Questions Which modes exist within the Junos OS?
Which operations can be performed in each mode? Which keystrokes complete a system command and a user-defined variable? Which command provides the quickest method of returning to the top of the hierarchy? What is the difference between the active and candidate configurations? Which command displays the differences between the candidate and active configurations?

46 Lab 1: The Junos CLI Become familiar with the Junos CLI.

47


Download ppt "Introduction to the Junos Operating System"

Similar presentations


Ads by Google