0% found this document useful (0 votes)
154 views

Junos Hardware Command

The document provides instructions for troubleshooting and diagnosing issues on a Juniper router including resetting components, checking processes and connections, managing core files, installing software, and accessing different router components. It includes commands for the Junos shell, Linux shell, and FreeBSD shell to check system information, reset cards, view logs and install software.

Uploaded by

Anonymous mAgj7Q
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views

Junos Hardware Command

The document provides instructions for troubleshooting and diagnosing issues on a Juniper router including resetting components, checking processes and connections, managing core files, installing software, and accessing different router components. It includes commands for the Junos shell, Linux shell, and FreeBSD shell to check system information, reset cards, view logs and install software.

Uploaded by

Anonymous mAgj7Q
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

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

% fstat | grep [PCB]

from shell

show system connections


file show /etc/services
Core Files
file list detail /var/crash/
show system core-dumps
show system core-dumps core-file-info detail <core-filename>
request system core-dump [process]
% gcore -s path/binary-name pid
% gzip vmcore.0.gz
% cat vmcore.0 | gzip vmcore.0.gz
PCMCIA
dd if=filename of=/dev/rdevice address bs=64k

High mem tax!


disruptive!!

from root shell

dd if=/deb/zero of=/dev/rad3 count=20


dd if=install-media-7.0R1.5-export of=/dev/rad3 bs=64k
RE & Redundancy
show chassis routing-engine
show chassis routing-engine bios
request chassis routing-engine master switch
request routing-engine login other-routing-engine
root# rsh -T re1
request chassis routing-engine diagnostics all
fsck /dev/ad1s1f

(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!

Logging into PFE Components


show tnp addresses
start shell
%su
%vty [ntp address]
FPC2(host vty)# show nvram
FPC2(host vty)# show syslog messages

Hidden!
Shell required
requires su

(same but straight from CLI)


start shell pfe network fpc2
EGFPC2(GRTMIANA2 vty)# sh nvram
EGFPC2(GRTMIANA2 vty)# sh lchip
EGFPC2(GRTMIANA2 vty)# sh lchip 0 errors
SFM0/FEB/CFEB
show chassis sfm detail
start shell pfe network sfm0
(vty)# show nvram
(vty)# show syslog info
(vty)# show syslog messages
SFM0 (vty)# show sched
SFM0(vty)# sh throttle
SFM0(vty)# show cchip notif
SBR(Sydney vty)# bringup nic 0 reanimate
SBR(Sydney vty)# test mem all verbosity 5 size 10 loops 1

!!!
!!!

JUNOS upgrades

junos files are in /var/home

file copy ftp://hostname/filename filename

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

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

ii) FreBSD related

boot: /boot/loader

extensive/summary

Description

collects shoversion, uptime, hardware, processes, pfe stats, fpc detail, boot messages, memory, buffers, stats, etc

Restores the router to its default config


Restores the router to its default config

shows files in the directory


initializes configuration database (commit related problems)
shows boot devices

puts fpc in slot 3 in offline state


puts fpc in slot 3 back in online state
puts pic in fpc 3 slot 3 in offline state
puts pic in fpc 3 slot 3 back in online state

restart a particular daemon process (kill -1)


bounces a particular instance of rpd only
obtains process path
obtains the PID associated with a process
Displays all connections (ports) on which the RE listens
displays sockets (-a) & all Protocol Control Blocks (PCB) info (-A)
Displays info about a file. If you specify a particular PCB you will
determine what PROCESS is actually using one particular port
(get the PCB from the netstat -Aa command listed port)
lists only active IP sockets on RE
similar to netstat but restricted only to Internet connections
gives you a list of services-to-port mappings

lists core files if there are


lists core files if there are
decode a core file
forces a core file for one particular process (creates copy of process)
forces a core file by suspending the daemon
compresses corefile to gz
same thing, but keeps original file

copies a file to a removable media

erases removable media (PCMCIA)


copies an install media from /var/tmp to flash

Displays info about the RE, memory & CPU utilization


Displays revision level of the RE BIOS
changes RE mastership from active to backup REs
logs into the other RE
logs into the other RE from a root shell promt
runs a diagnostic script in compact-flash,hard-disk & memory
file system check

Show list of Packet Forwarding Engine component


Show FPC status and statistics
displays FPE ASIC-related errors
clears PFE statistics
Show summary version of routing tables (size and # of routes)
Show PFE next-hop information
shows interfaces and indexes (not snmp!)
shows which interface belongs to which PFE for T-series
shows which interface belongs to which PFE for I-chip based PFE

obtains list of tnp endpoints addresses

connects to vty ntp address (FPC, SSB, SFM)


collects disagnostic info from FPC
shows syslog messages

status of the SFM and mastership


login into the SFM
collects data from the SFM
displays logs about the SFM
displays log messages
displays scheduler information (SFM CPU%)
Interrupt throttle information
shows C chip notification registers
restarts a dead FPC
runs memory address data tests (10 meg, loop 1)

nos files are in /var/home

Copy Files from a Remote System to the local router


copies files from one place to the other (i.e. between REs)
Checks there is no removable media inserted.
displays the amount of amount of free disk space on file system
shows boot devices
alters the order of the booting devices
runs a diagnostic script in compact-flash,hard-disk & memory
Save config in /altconfig and software in /altroot before upgrade
Installs JUNOS package, validating against potential config errors
Reboot the system

Show the process table


Shows memory tasks

displays all ( -a ) kernel parameters


confirms if kernel core dumps are enabled
shows boot devices in order
writes ( -w ) parameters to kernel components

If your router gets stuck after a reload and you get a


FreeBSD Prompt you might have to help your system
to find the CF

Example

Restores the router to its default config

GRTMADPE2> request chassis fpc slot 2 offline


GRTMADPE2> request chassis fpc slot 2 online
GRTMADPE2> request chassis pic fpc-slot 3 pic-slot 2 offline
GRTMADPE2> request chassis pic fpc-slot 3 pic-slot 2 online

GRTAMSTC1> restart routing

% netstat -Aa | grep 179


c3780200
tcp4
0

0 10.0.9.7. 179

10.0.9.6.3651

% fstat | grep c3780200


root rpd
2456 20* internet stream tcp c3780200

GRTAMSTC1> file list detail /var/crash/


GRTAMSTC1>show system core-dumps
GRTAMSTC1> request system core-dump routing
root% gcore -s /usr/sbin/rpd 2275

ESTABLISHED

GRTAMSTC1>dd if=install-media-7.0R1.5-export of=/dev/rad3 bs=64k

root@Sydney-3%

fsck /dev/ad1s1f

show tnp addresses

lgomez@GRTAMSTC1> start shell pfe network sfm0


SFM0(GRTAMSTC1 vty)# show nvram
SFM0(GRTAMSTC1 vty)# show syslog info

root@host> file copy ftp://jvserver.uu.net/jbundle-package-name /var/tmp/jbundle-package-name


root@host> file copy ftp://[email protected]/jbundle-package-name /var/tmp/jbundle-package-name
GRTAMSTC1> file copy /var/home/jinstall-6.2-20040424.0-domestic-signed.tgz re0:/var/home/lgomez

kern.coredump flag must be set to 1


% sysctl -w machdep.bootdevs=pcmcia-flash,compact-flash,disk,lan

>> FreeBSD/i386 BOOT


Default: 0:ad(0,a)mfs
boot:

You might also like