Você está na página 1de 6

1.

Common User Interface Options


-

Junos CLI
Text based command shell
Access through the console port using a terminal emulation program
Uses RJ-45 RS-232 @ 9600 bps, 8/1/N ( Not configurable )

- J-Web
- Webbased graphical user interface
- Accessible through HTTP/HTTPS
2. CLI Basics
- Non root user are placed into the CLI automatically
- Root user must start the CLI from the shell
- Factoty-default configuration without the hostname displays Amnesiac
- CLI Modes:
- Operational Mode : Monitor and troubleshoot the device : monitor, ping, show,
test and traceroute
user@router>
- Configuration Mode : Configure the device including the interfaces, protocols,
user access and system hardware properties.
user@router#
3. Context-Sensitive Help
- Type a question mark ? at any point in a command line.
- the CLI lists the available commands and options including user-defined variab
les at the appropriate context
- user@router > ?
Possible completion
clear
configure
...
4. Topical Help
- help topic command displays usage guidelines for the statement
user@router> help topic interfaces address
5. Configuration Syntax Help
- help reference command offers configuration syntax help
user@router> help reference interfaces address
- help apropos command only displays contexts that are relevant to the current c
onfiguration hierarchy level
6. Command and variable completion
- Spacebar to complete system commands.
- Command completion is ON by default - to turn if off issue the following
user@router> set cli complete-on-space off
- Tab to complete system and user-defined variables
7. Emacs-style editing sequences - Junos OS default terminal type should be VT10
0
- Ctrl+b - Moves the cursor left one character
- Ctrl+a - Moves the cursor to the beginning of the command line
- Ctrl+f - Moves the cursor right one character

Ctrl+e - Moves the cursor to the end of the command line


Ctrl+d - Deletes the character over the cursor
Delete and Backspace: Deletes the character before the cursor
Ctrl+k - Deletes from the cursor to the end of the line
Ctrl+u - Deletes all character and negates the current command
Ctrl+w - Deletes the entire word to the left of the cursor
Ctrl+l - Redraws the current line
Ctrl+p, Ctrl+n - Repeats the previous and next command in the command history,
respectively
- Esc+d - Deletes the word to the right
- Esc+b - Moves the cursor back one word with no delete
- Esc+f - Moves the cursor forward one word with no delete
8. Using | ( Pipe )
- Filter and manipulate command output
- show route | ?
count display except
find hold last
match no-more request
resolve save Trim
9. Operational Mode Capabilities
- Monitoring and Troubleshooting
clear
monitor
mtrace
ping
show
test
traceroute
- Copying files
- Restarting software processes
- Performing system-level operations
10. Active versus Candidate Configuration
- Active config is the config currently operational and is the config the system
s load during the boot seq
- Configure command creates a candidate config that is initially populate with t
he active config
- when satisfied, a commit command can cause the candidate config to become the
active config
- Recover the previous config by using a rollback n command followed by a commit
command
11. Entering Configuration Mode
-

Issue the config command to enter into configurtion mode


uncommitted changes are retained when use the standard configure command
by default, multiple user can enter config mode and commit changes
configure exclusive command allow only a single user to edit the configuration

- uncommitted changes are deleted when users exit from config exclusive prompt
- configure private command allows multiple users to edit the configuration mode
while committing only their private changes
- if issue a rollback 0 command, the software discard only their changes

- when a user is in private moder, other users must enter either private mode or
configure exclusive mode
- Any uncommitted changes are discarded when users exit
- the changes made by the 1st user in standard config mode must be committed or
discarded before another user can enter into config private or exclusive mode
- configure private will be automated when chasis clustering is in effect
12. Configuration Statement Hierarchy
-

edit command to create a hierarchy and move down to that level


up command to move up
up n moves up n levels in the hierarchy
top command moves to the top of the hierarchy
user@router> top edit system login
user@router> top show system services
exit moves to the previous, higher level in the hierarchy
use set to add configuration statement
use delete command to remove statement
deactivate command to ignore a configuratio statement
user@router# deactivate interfaces ge-0/0/10
activate command to place the config into active state
user@router# activate interfaces ge-0/0/10

13. Helpful configuration mode command


- rename a configuration statement
user@router# rename interfaces ge-0/0/10 to ge-0/0/11
- replace pattern of configuration statement
user@router# replace pattern ge-0/0/10 with ge-0/0/11
- Copy a configuration statment to another statement
user@router# copy interfaces ge-0/0/10 to ge-0/0/11
- Insert a configuration statement in another location
[ edit policy-options policy-statement test ]
user@router# insert term three before term two
- annonate a comment to a configuration statement
[ edit system ]
user@router# annonat name-server "added new name servers"
user@router# show
/* added new nane servers */
...
...
14. Viewing the Candidate Configuration
- display the portions that concern you from the root of the hierarchy
user@router# show system services
- or use edit to park yourself to the right hierarchy
user@router# edit system services
user@router# show
- To view the set commands used to build the configuration
show | display set
show system services | display set

15. Committing a Configuration


- commit to activate configuration changes from any hierarchy level
exception - configure private required commit to be performed at the top hiera
rchy level.
- commit synchronize - if multiple RE s are installed
user@router# set system commit synchronize - can auto perform a commit sync
- commit check - to confirm syntax
- commit confirmed - activate temporarily
will be auto rolled back in 10 minutes unless commit conformed
- commit at to schedule a future commit
- To view pending commit show system commit
- To clear pending commit
clear system commit
- commit comment to add a comment to the commit
- commit and quit to save time
16. Compare the configuration file differences
- compare candidate n active config
user@router# show | compare
- compare active and historical config
user@router>show configuration | compare rollback n
user@router>show configuration | compare filename
- compare arbitrary files
user@router>file compare file filename1 filename2
- compare candidate and historical config
user@router# show | compare rollback n
user@router# show | compare filename
17. Backing out of configuration change
- user@router# rollback n
iguration
- user@router# commit

// n = 0 - 49 default is 0 means current active conf

- To modify the n value


user@router# edit system
user@router# set max-configurations-flash ?
18. Saving Configuration files
- Use save to save the current candidate configuration
- Saves only from the current hierarchy down
- Saves to user's working directory by default
user@router>
user@router#
OR
user@router#
OR
user@router#
OR

edit
save filename
save path/filename
save ftp://user:password@router/path/filename

user@router# save scp://user@router/path/filename


19. Loading Configuration files
- Use load command to load a configuration files
user@router# load ?
factory-default - Replaces the current config with the factory-default configu
ration
merge - Combines the current configuration with the config you load
override - Completely over writes the current config with the config you load
- works only from the top level hierarchy
patch - Adds or deletes variables from the config based on the contents of a s
pecified patch file
path file uses the contextual diff format which can be created by show
| compare | save
replace - looks for a replace tag in the configuration you load
set - Looks for set statement in the configuration you load
update - Looks for update statement in the configuration you load
- Use terminal to input from the terminal capture buffer
user@router# load (replace|merge|override) terminal
- User relative to load from the current configuraton hierarchy
user@router# load (replace|merge|override) (filename|terminal) relative
- Use commit to activate the candidate configuration
20. Using the run command
- Use run to execute operation command while in configuration mode
user@router> edit interfaces ge-0/0/12
user@router#set unit 0 family inet address 10.250.0.141/16
user@router#run ping 10.250.0.141

Você também pode gostar