Comandos-V2 Juniper
Comandos-V2 Juniper
Comandos-V2 Juniper
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
show
show
show
show
show
host
version
system software
system uptime
system processes
system statistics
ns lookup
displays software running on the box
displays installed packages
uptime of the router
extensive/summ Show the process table
ip, icmp,
Show protocol statistics
lists only active IP sockets on RE
show system connections
show system users
Show users currently logged into the system
show system storage
displays the amount of amount of free disk space on file system
root% df -k
show system storage from Shell
show system boot-messages
displays contents of boot log (boot-up messages)
show system virtual-memory
displays current memory state
request system reboot
Restarts the system
request system halt
Stops the router and prepares it to be shut down
request system reboot
Reboot the system
request system snapshot
Save config in /altconfig and software in /altroot before upgrade
request support information
show tech
request system software add <pkgname>
performs bsd pgkadd; always use jbundle (4->5 jinstall)
restart <process> [ gracefully, immediately, soft]
Restart process
request chassis routing-engine diagnostics all
(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
file copy filename ftp://hostname/filename
flashdisk
harddisk
harddisk
harddisk
harddisk
harddisk
harddisk
ftp
ftp
Logs
located in /var/log
Show interfaces
show interfaces
detail
extensive
terse
description
media
statistics
routing
Routing
show
show
show
show
show
route
route
route
route
route
Forwarding
show ip route
show ip route for an specific protocol
extensive view of a route
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
request
request
request
chassis
chassis
chassis
chassis
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 ftp://hostname/filename filename
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
Memory & processes issues
show system processes
show task memory detail
Shell Commands
i) Kernel related
% sysctl -a
% sysctl -a | grep dump
% sysctl -a | grep bootdev
% sysctl -w
extensive/summary
Description
collects shoversion, uptime, hardware, processes, pfe stats, fpc detail, boot messages, memory, buffers, sta
puts
puts
puts
puts
to find the CF
Example
GRTMADPE2>
GRTMADPE2>
GRTMADPE2>
GRTMADPE2>
request
request
request
request
root
rpd
root@Sydney-3%
fsck /dev/ad1s1f
boot:
dle-package-name
tmp/jbundle-package-name
re0:/var/home/lgomez
COMMAND
Description
Example
Show commands
show
show
show
show
show
rip neighbor
route protocol rip
route advertising-protocol rip 10.1.1.1
route receiving-protocol rip 10.1.1.1
rip statistics
COMMAND
Description
Example
Show commands
show ospf neighbor
show ospf neighbor extensive
show
show
show
show
abr
asbr
extern
router
network
netsummary
asbrsummary
extern
nssa
ospf database router advertising-router 10.0.3.3 detail
view LSAs advertised by a paricular router ID
ospf database router area 0 extensive
view the LSA database in a particular area
LSA header (opt bits, ID, advertis rtr)
LSA type content (V E B bits and all packet)
ospf database area 0 lsa-id extensive
view one particular LSA in detail
ospf log
displays how often the SPF is being initiated
COMMAND
Description
Example
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]
monitor traffic interface so-0/0/0 size 1514 detail Monitor IS-IS messages
show bfd session
COMMAND
Description
Example
Show commands
show bgp summary
show bgp group
show bgp neighbor
show
show
show
show
route
route
route
route
next-hop database
protocol bgp
protocol bgp terse
receive-protocol bgp
RIB
RIB
RIB
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
show
show
show
pim
pim
pim
pim
interface
neighbors
statistics
join 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
extensiveshows the RP addresses, how it was learned and which groups are served
shows the BSR election process and state
detail
RPF
show multicast usage
show multicast rpf
show multicast route
show route table inet.1
show multicast next-hops
show nhdb id extensive
MSDP
show msdp
show msdp source-active
show route table inet.4
detail
COMMAND
Description
Example
Show commands
show
show
show
show
show
mpls
mpls
mpls
mpls
mpls
interface
lsp
lsp extensive
lsp ingress
lsp transit
RSVP
show
show
show
show
show
rsvp
rsvp
rsvp
rsvp
rsvp
interface
neighbor
session
session ingress
version
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
detail
detail
ping mpls l2vpn instance vpn-a remote-site-id 2 local-site-id 1test the l2vpn connection site to site (PE to PE)
test the l2vpn local interface
ping mpls l2vpn interface fe-0/0/0.512
Martini Show commands
show l2circuit connections
show ldp neighbor detail
show ldp database
COMMAND
Show commands
show interface xx-x/x/x detail
show interface queue xx-x/x/x
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
show
show
show
show
Description
Example
Filter: lo0-in
Counters:
Name
Packets
denied-traffic
61
Policers:
Name
police-icmp-icmp
Bytes
3480
Packets
132
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
Show commands
show
show
show
show
interface terse
route table inet6
ipv6 neighbor
interface lo0 extensive | display
Description
Example