Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Furthermore, care must be taken at the time to use Shell commands!! (only under JTAC supervision)
COMMAND
Description
Example
Chassis Management
show chassis alarm
show chassis craft-interface
set chassis display message "M40e unit for swap"
show chassis environment
show chassis temperature-thresholds
show chassis routing-engine
show chassis hardware
detail/frus/ext
show chassis fpc
show chassis fpc detail
show chassis fpc pic-satus
show chassis pic fpc-slot 0 pic-slot 1
show chassis mac-addresses
show chassis [feb | scb | ssb | sfm slot]
System management
show host
show version
show system software
show system uptime
show system processes
show system statistics
show system connections
show system users
show system storage
root% df -k
show system boot-messages
show system virtual-memory
request system reboot
request system halt
request system reboot
request system snapshot
request support information
request system software add <pkgname>
restart <process> [ gracefully, immediately, soft]
request chassis routing-engine diagnostics all
ns lookup
displays software running on the box
displays installed packages
uptime of the router
extensive/summary Show the process table
ip, icmp,
Show protocol statistics
lists only active IP sockets on RE
Show users currently logged into the system
displays the amount of amount of free disk space on file system
show system storage from Shell
displays contents of boot log (boot-up messages)
displays current memory state
Restarts the system
Stops the router and prepares it to be shut down
Reboot the system
Save config in /altconfig and software in /altroot before upgrade
show tech
performs bsd pgkadd; always use jbundle (4->5 jinstall)
Restart process
(hidden)
runs a diagnostic script in compact-flash,hard-disk & memory
detail
Free storage space on the router by rotating log files and proposing a list
of files for deletion. User input is required for file deletion.
Configuration
configuration
show
edit
set
delete
exit
commit
commit check
commit confirmed x
commit and-quit
commit synchronize
commit full
root% mgd -l
commit at
clear system commit
rollback 0
rollback
rollback + commit
load merge </var/home/user/config>
load override </var/home/user/config>
load merge terminal
load factory-default
show | compare
show system rollback 40
show system rollback compare 0 32
save
save username@host:filename
show configuration groups junos-defaults
Managing files
start shell
/config
/var/db/config
/var/tmp
/var/log
/var/home
/altroot
/altconfig
file list
file list /config
file show <file>
file delete
file copy source destination
flashdisk
harddisk
harddisk
harddisk
harddisk
harddisk
harddisk
ftp
scp
ftp
Logs
located in /var/log
Show interfaces
show interfaces
detail
extensive
terse
description
media
statistics
routing
monitor interface x-x/x/x
monitor traffic interface x-x/x/x
monitor traffic interface x-x/x/x write-file [file]
% tcpdump -r
(hidden)
Shell command
Routing
show route
show route protocol [static, isis]
show route x.x.x.x extensive
show route advertising-protocol
show route receiving-protocol
show ip route
show ip route for an specific protocol
extensive view of a route
Forwarding
show route forwarding-table destination x.x.x.x
clear route forwarding-table x.x.x.x
SFM0 (vty)# show route ip prefix x.x.x.x
Shell command
Firewall
show firewall
show firewall log
clear firewall [all|filter-name|counter-name]
show interfaces filters
show interfaces policers
show policer
detail
Loopback test
set t3-options loopback local
set t3-options loopback remote
BERT test
set t3-options bert-period 120
set t3-options bert-algorithm all-ones-repeating
set t3-options bert-error-rate 0
test interface t3-1/2/0 t3-bert-start
test interface t3-1/2/0 t3-bert-stop
show interfaces t3-1/2/0 extensive | find bert
icmp echo-request/echo-response
ping remote atm interface using oam cells
send udp 33434/ttl=1- receive icmp time-exceeded
send udp 33435/ttl=2 - receive icmp time-exceeded
Policy
test policy <policy-name> 0/0
COMMAND
JTAC support info
request suport information
Restore factory settins
load override /packages/mnt/jbase/sbin/install/default-juniper.conf
load factory-default
Shell Commands (file related)
start shell
root% df -k
root% mgd -l
% sysctl -a | grep bootdev
Resetting cards
request chassis fpc slot 3 offline
request chassis fpc slot 3 online
request chassis pic fpc-slot 3 pic-slot 3 offline
request chassis pic fpc-slot 3 pic-slot 3 online
Processes & Connections
restart .
#deactivate protocols ospf
% which rpd
% ps ax | grep rpd
% netstat -Aa
from shell
from shell
(hidden)
from root shell
PFE
show pfe terse
show pfe fpc 0
show pfe statistics error
clear pfe statistics
show pfe route summary
show pfe next-hop
show pfe interface
show lchip ifd
show ichip ifd
!!
Hidden!
!!
Hidden!
Hidden!
Hidden!
Hidden!
Shell required
requires su
!!!
!!!
JUNOS upgrades
ftp
file copy
root% dd if=/dev/rad3 of=/dev/null bs=1k count=1
show system storage
% sysctl -a | grep bootdev
% sysctl -w machdep.bootdevs=pcmcia-flash,compact-flash,disk,lan
request chassis routing-engine diagnostics all
(hidden)
request system snapshot
request system software add validate /var/tmp/jinstall-6.4R3-domestic.tgz
request system reboot
Shell Commands
i) Kernel related
% sysctl -a
% sysctl -a | grep dump
% sysctl -a | grep bootdev
% sysctl -w
boot: /boot/loader
extensive/summa
Description
collects shoversion, uptime, hardware, processes, pfe stats, fpc detail, boot messages, memory, buffers, stats, etc
Example
0 10.0.9.7.179
10.0.9.6.3651
ESTABLISHED
COMMAND
Description
Show commands
show rip neighbor
show route protocol rip
show route advertising-protocol rip 10.1.1.1
show route receiving-protocol rip 10.1.1.1
show rip statistics
Example
COMMAND
Description
Example
Show commands
show ospf neighbor
show ospf neighbor extensive
clear ospf neighbor [192.168.254.225]
show ospf statistics
show ospf interface
show ospf interface extensive
show ospf route
abr
asbr
extern
router
network
netsummary
asbrsummary
extern
nssa
COMMAND
Description
Show commands
show isis adjacency
show isis adjacency extensive
clear isis adjacency
show isis interface
show isis interface details
show isis hostname
show isis spf log
show isis statistics
show isis route
show route protocol isis
show isis database
show isis database detail
show isis database GRTMADPE2 detail
show isis database extensive [level 1 | 2]
Example
COMMAND
Description
Show commands
show bgp summary
show bgp group
show bgp neighbor
RIB
RIB
RIB
detail
Example
COMMAND
Description
Example
Show commands
IGMP
show igmp interface
show igmp group
show igmp statistics
shows state, querier (DR for that segment), version (default 2) and IGMP timers
shows the multicast groups joined
shows igmp message statistics
PIM
show pim interface
show pim neighbors
show pim statistics
show pim join extensive
detail
extensive
lists configured PIM interfaces -- mode (default sparse), state (DR, ptp), neighbors
shows info about pim neighboring routers
shows pim messages being sent or received
shows current state of pim joins, multicast group address & interface used to forward streams. Also rpt or stp tree in use
displays (*,G) and (S,G) states and also RPF interface info
flushes join states!
shows active multicast sources and their RPF intf.
also multicast groups serviced by these source
shows the RP addresses, how it was learned and which groups are served
shows the BSR election process and state
RPF
show multicast usage
show multicast rpf
!!!!
MSDP
show msdp
show msdp source-active
show route table inet.4
show multicast rpf inet summary
detail
COMMAND
Description
Example
Show commands
show mpls interface
show mpls lsp
show mpls lsp extensive
show mpls lsp ingress
show mpls lsp transit
extensive
extensive
RSVP
show rsvp interface
show rsvp neighbor
show rsvp session
show rsvp session ingress
show rsvp version
show route table mpls.0
show route table inet.3
detail
detail
shows status of RSVP interfaces, Active resv, Subscription rate, Bandwidth allocations
shows RSVP neighbors which has an LSP active, also Hello-interval
shows ingress/egress/transit sessions and the label in/out values assigned!!! RRO, Style, ERO and also bypass LSPs
shows also the links used by detour paths and their status
shows RSVP version, soft-state refresh timer, keep-multiplier (hello & soft-state use same)
shows MPLS switching table (label values)
shows LSP table. RSVP info is installed here
LDP
show ldp neighbors
show ldp session
show ldp database [session peer]
COMMAND
Description
Example
L3 VPN COMMANDS
Show commands
show route table vpn-a
detail
detail
extensive
detail
COMMAND
Show commands
show interface xx-x/x/x detail
show interface queue xx-x/x/x
show interfaces so-1/0/0 extensive
show class-of-service ...
show class-of-service interfaces so-1/0/0
show class-of-service code-point-aliases
show class-of-service code-point-aliases dscp
show class-of-service code-point-aliases inet-prec
show class-of-service code-point-aliases exp
show class-of-service forwarding-class
show class-of-service classifier [name]
show class-of-service scheduler-map
show class-of-service rewrite-rule
show class-of-service drop-profile
show class-of-service forwarding-table
show class-of-service forwarding-table classifier mapping
show class-of-service forwarding-table scheduler-map
(all)
Description
shows what CoS parameters are in effect for a given interface. Number of queues
i.e. which scheduler map, classifier, rewrite is applied
shows listing of cos bits to simbolic name mapings: DSCP, inet-prec, exp
shows mappings between simbolic names and dscp values (unless configured, default will apply)
shows mappings between simbolic names and IP prec values
shows mappings between simbolic names and EXP values
shows mappings of forwarding class names to queue numbers
Show contents of a specific code point to forwarding class & PLP classifier
shows mapping of forwarding classes to schedulers details
Show mapping of forwarding class/loss priority to code point. Displays rewrite table
Shows available drop profiles and interpolated data points of named drop profile
displays CoS parameters in effect within the forwarding table
displays which classifiers are mapped to what logical units
displays the scheduler map in service for each interface
Example
COMMAND
Show commands
show interfaces filters
show firewall
detail
Description
Example
Bytes
3480
Packets
132
Packets
61
COMMAND
Show commands
show snmp statistics extensive
show snmp mib walk .1.3.6.1.2.1.4.18
show snmp mib walk ipfragfails
show interface lo0 extensive | display xml
Description
Example
COMMAND
Description
Example
Show commands
show interface terse
show route table inet6
show ipv6 neighbor
show interface lo0 extensive | display xml