29
WARNING!!: By no means this is an official supported/recommended Juniper command list !!! Furthermore, care must be taken at the time to use Shell commands!! (only under JTAC supervision) COMMAND Description Example Chassis Management show chassis alarm Chassis alarm status show chassis craft-interface Information currently on craft display set chassis display message "M40e unit for swap" displays a user defined message on the LCD craft interface show chassis environment Environmental information & temperature show chassis temperature-thresholds Displays temperature thresholds show chassis routing-engine Displays info about the RE, memory & CPU utilization show chassis hardware detail/frus/ext Hardware inventory + serial numbers; frus shows fans; ext shows eeprom, flash/disk capacity show chassis fpc displays status of all FPCs installed (mem heap should be <80% !) show chassis fpc detail includes also SRAM/SDRAM available Mem and usage show chassis fpc pic-satus Displays info for all PICs show chassis pic fpc-slot 0 pic-slot 1 Displays info about one particular PIC show chassis mac-addresses MAC address show chassis [feb | scb | ssb | sfm slot ] displays satus about PFE system control board (temp, cpu%,DRAM…) System management show host ns lookup show host www.cisco.com show version displays software running on the box show system software detail displays installed packages show system uptime uptime of the router show system processes extensive/summary Show the process table show system statistics ip, icmp,… Show protocol statistics show system connections lists only active IP sockets on RE 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 request system storage cleanup 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 enters configuration mode show displays the current configuration show protocols ospf | match item filters the output of the command show config | match firewall | find item filters starting with the regular expression show config | find firewall | save <file> save configuration as <file> edit modifies configuration statements edit protocols ospf set sets configuration statements set chassis alarm sonet lo1 red delete removes configuration statements exit exists edit mode and also config mode commit save, validate and activate a complete config commit check just check config do not apply commit confirmed x activates config for a x minutes and then ask for confirmation, x=10 default commit and-quit activates config and exists edit mode commit synchronize activates config on active RE and replicates it into backup RE commit full (hidden) signals to all daemons a SIGHUP (kill -1) which forces them to read their config files (restarts all daemons) root% mgd -l (hidden) from shell same as commit full but from shell commit at activates config at a given time (schedule a commit) commit at "18:00:00" clear system commit Clear all pending commit requests rollback 0 deletes the new edited changes and returns to current config rollback returns to the last commited config rollback + commit it will return to previously saved config. Only at the top level! load merge </var/home/user/config> combines the current config and the new one load override </var/home/user/config> erases the candidate config and replaces it with "luis" load merge terminal copy and paste portions of the config, vanaf root config load factory-default loads the factory default settings config router# load override /packages/mnt/jbase/sbin/install/default-juniper.conf show | compare compares the candidate config with the running config show system rollback 40 displays a rollback file show system rollback compare 0 32 shows differences between rollbacks 0 and 32 files save saves config in /var/home directory save CJNR-reset save username@host:filename saves config in remote system using ssh save [email protected]:SYD-AJNR-basic-intf show configuration groups junos-defaults (hidden) displays only certain JUNOS default settins (system/services/apps) Managing files start shell /config flashdisk contains active config and rollbacks 1,2 & 3 /var/db/config harddisk contains rollback files 4 through 49 /var/tmp harddisk contains core files generated by the daemons when they crash /var/log harddisk files generated by the logging and traceoptions /var/home harddisk contains subdirectory per user /altroot harddisk contains a copy of the root file structure form the flash drive request system snapshot /altconfig harddisk contains a copy of the /config file structure on the flash drive request system snapshot file list displays all files on this user home directory file list /config displays all files on the /config directory file show <file> displays content of <file> file delete deletes a file from hard disk file delete /var/tmp/smpd.core file copy source destination copies files from one RE to the other GRTAMSTC1> file copy /var/home/jinstall-6.2-domestic-signed.tgz re0:/var/home/lgomez file copy filename ftp://hostname/filename ftp Copy Files from the Local Router to a Remote System root@host> file copy /config/juniper.conf ftp://jvserver.uu.net/tmp/juniper.conf root@host> file copy /config/juniper.conf ftp://[email protected]/tmp/juniper.conf file copy filename scp://user@hostname/filename scp root@host> file copy /config/juniper.conf scp://user@ssh-host/tmp/juniper.conf file copy ftp://hostname/filename filename ftp Copy Files from a Remote System to the local router 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 show system rollback 40 displays a rollback file show system rollback compare 0 32 shows differences between rollbacks 0 and 32 files Logs located in /var/log show log messages shows all the logs, location is /var/log show log file-name shows logs about an specific log file show log bgp-events.0 show log cli show logs about cli commands issued show log chassisd show logs about chassis probs show log install show logs releveant to an install JUNOS version show log debug show daemon logs show log messages? displays all the files with their dates of the collected logs show log inventory shows logs about inventory

Juniper Commands v2

Embed Size (px)

DESCRIPTION

jUNIPER

Citation preview

  • WARNING!!: By no means this is an official supported/recommended Juniper command list !!! Furthermore, care must be taken at the time to use Shell commands!! (only under JTAC supervision)COMMAND Description Example

    Chassis Management show chassis alarm Chassis alarm statusshow chassis craft-interface Information currently on craft display set chassis display message "M40e unit for swap" displays a user defined message on the LCD craft interfaceshow chassis environment Environmental information & temperatureshow chassis temperature-thresholds Displays temperature thresholdsshow chassis routing-engine Displays info about the RE, memory & CPU utilizationshow chassis hardware detail/frus/ext Hardware inventory + serial numbers; frus shows fans; ext shows eeprom, flash/disk capacityshow chassis fpc displays status of all FPCs installed (mem heap should be 5 jinstall)restart [ gracefully, immediately, soft] Restart processrequest chassis routing-engine diagnostics all (hidden) runs a diagnostic script in compact-flash,hard-disk & memoryrequest system storage cleanup 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 enters configuration modeshow displays the current configuration show protocols ospf

    | match item filters the output of the command show config | match firewall| find item filters starting with the regular expression show config | find firewall| save save configuration as

    edit modifies configuration statements edit protocols ospfset sets configuration statements set chassis alarm sonet lo1 reddelete removes configuration statementsexit exists edit mode and also config modecommit save, validate and activate a complete configcommit check just check config do not applycommit confirmed x activates config for a x minutes and then ask for confirmation, x=10 defaultcommit and-quit activates config and exists edit modecommit synchronize activates config on active RE and replicates it into backup REcommit full (hidden) signals to all daemons a SIGHUP (kill -1) which forces them to read their config files (restarts all daemons) root% mgd -l (hidden) from shell same as commit full but from shellcommit at activates config at a given time (schedule a commit) commit at "18:00:00" clear system commit Clear all pending commit requestsrollback 0 deletes the new edited changes and returns to current configrollback returns to the last commited configrollback + commit it will return to previously saved config. Only at the top level!load merge combines the current config and the new oneload override erases the candidate config and replaces it with "luis"load merge terminal copy and paste portions of the config, vanaf root configload factory-default loads the factory default settings config router# load override /packages/mnt/jbase/sbin/install/default-juniper.confshow | compare compares the candidate config with the running configshow system rollback 40 displays a rollback file show system rollback compare 0 32 shows differences between rollbacks 0 and 32 filessave saves config in /var/home directory save CJNR-resetsave username@host:filename saves config in remote system using ssh save [email protected]:SYD-AJNR-basic-intfshow configuration groups junos-defaults (hidden) displays only certain JUNOS default settins (system/services/apps)

    Managing files

    start shell/config flashdisk contains active config and rollbacks 1,2 & 3/var/db/config harddisk contains rollback files 4 through 49/var/tmp harddisk contains core files generated by the daemons when they crash/var/log harddisk files generated by the logging and traceoptions/var/home harddisk contains subdirectory per user/altroot harddisk contains a copy of the root file structure form the flash drive request system snapshot/altconfig harddisk contains a copy of the /config file structure on the flash drive request system snapshotfile list displays all files on this user home directoryfile list /config displays all files on the /config directoryfile show displays content of file delete deletes a file from hard disk file delete /var/tmp/smpd.corefile copy source destination copies files from one RE to the other GRTAMSTC1> file copy /var/home/jinstall-6.2-domestic-signed.tgz re0:/var/home/lgomez

    file copy filename ftp://hostname/filename ftp Copy Files from the Local Router to a Remote Systemroot@host> file copy /config/juniper.conf ftp://jvserver.uu.net/tmp/juniper.confroot@host> file copy /config/juniper.conf ftp://[email protected]/tmp/juniper.conf

    file copy filename scp://user@hostname/filename scp root@host> file copy /config/juniper.conf scp://user@ssh-host/tmp/juniper.conf

    file copy ftp://hostname/filename filename ftp Copy Files from a Remote System to the local router root@host> file copy ftp://jvserver.uu.net/jbundle-package-name /var/tmp/jbundle-package-nameroot@host> file copy ftp://[email protected]/jbundle-package-name /var/tmp/jbundle-package-name

    show system rollback 40 displays a rollback file show system rollback compare 0 32 shows differences between rollbacks 0 and 32 files

    Logs located in /var/log

    show log messages shows all the logs, location is /var/logshow log file-name shows logs about an specific log file show log bgp-events.0show log cli show logs about cli commands issuedshow log chassisd show logs about chassis probsshow log install show logs releveant to an install JUNOS versionshow log debug show daemon logsshow log messages? displays all the files with their dates of the collected logsshow log inventory shows logs about inventory

  • monitor start file-name monitors logs in real timemonitor stop stops monitoringhelp syslog explanation of log meaning help syslog ASP SFW IP FRAGMENT ASSEMBLY TIMEOUT

    Show interfaces

    show interfaces detail shows detailed info about an interfaceextensive shows all possible info about an interface (very detailed)terse shows ip interface briefdescription shows interfaces descriptionmedia Display media informationstatistics Display statistics and detailed inforouting Display routing status

    monitor interface x-x/x/x monitors interface real-time statisticsmonitor traffic interface x-x/x/x prints packet headers to your terminal screen for info sent/received by the RE. No filtering allowed !!monitor traffic interface x-x/x/x write-file [file] (hidden) writes output to this command to a file, with L2 headers present

    all info is stored in a file so you can use tcpdump to read it monitor traffic interface fe-0/0/0 write-file dump % tcpdump -r Shell command read the contents of a tcpdump file XR1.AMS6> start shell

    % tcpdump -r dump icmpmonitor start prints logfile to your terminal screenshow arp shows ARP entries clear interfaces statistics so-2/0/1 reset counters & statistics for this particular interfaceshow interfaces diagnostics optics so-1/0/0 displays SONET signaling power values and laser Tx Rx

    Routing

    show route show ip routeshow route protocol [static, isis] show ip route for an specific protocol show route protocol staticshow route x.x.x.x extensive extensive view of a routeshow route advertising-protocolshow route receiving-protocol

    Forwarding

    show route forwarding-table destination x.x.x.x displays route entries in the master copy of the FT (on RE) XR1.AMS6> show route forwarding-table destination 192.168.20.1clear route forwarding-table x.x.x.x clears entries from the FT (be careful! could lead to RIB/FIB inconsistencies!!) SFM0 (vty)# show route ip prefix x.x.x.x Shell command displays route entries into the PFE FT (should be identical to RE FT)

    Firewall

    show firewall show packet/byte counts for all policing filtersshow firewall log detail log in memory resident buffer/kernel cache (detail: packet length)clear firewall [all|filter-name|counter-name] clears countersshow interfaces filters displays all firewall filters on all interfacesshow interfaces policers displays all firewall policers on all interfacesshow policer displays all policers, where it is used and no. packets processed

    Management & Interface testing

    ping icmp echo-request/echo-responseping atm interface vci ping remote atm interface using oam cellstraceroute send udp 33434/ttl=1- receive icmp time-exceeded

    send udp 33435/ttl=2 - receive icmp time-exceededsend udp 33439/ttl=6 - receive icmp port unreachable

    Loopback testset t3-options loopback local and delete sets loopback on PIC towards routerset t3-options loopback remote and delete sets loopback on PIC towards far-end

    BERT test set t3-options bert-period 120 BERT test duration set t3-options bert-algorithm all-ones-repeating BERT test pattern set t3-options bert-error-rate 0 BERT test error ratetest interface t3-1/2/0 t3-bert-start Starts BERT testtest interface t3-1/2/0 t3-bert-stop Stops BERT testshow interfaces t3-1/2/0 extensive | find bert

    Policy

    test policy 0/0 Pass all routes (0/0) through the policy as test

  • COMMAND

    JTAC support info

    request suport information

    Restore factory settins

    load override /packages/mnt/jbase/sbin/install/default-juniper.confload 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 offlinerequest chassis fpc slot 3 onlinerequest chassis pic fpc-slot 3 pic-slot 3 offlinerequest 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-dumpsshow system core-dumps core-file-info detail request system core-dump [process] High mem tax!% gcore -s path/binary-name pid disruptive!!% gzip vmcore.0.gz% cat vmcore.0 | gzip vmcore.0.gz

    PCMCIA from root shell dd if=filename of=/dev/rdevice address bs=64k

  • dd if=/deb/zero of=/dev/rad3 count=20dd if=install-media-7.0R1.5-export of=/dev/rad3 bs=64k

    RE & Redundancy

    show chassis routing-engineshow chassis routing-engine biosrequest chassis routing-engine master switchrequest routing-engine login other-routing-engine root# rsh -T re1request chassis routing-engine diagnostics all (hidden)fsck /dev/ad1s1f from root shell

    PFE

    show pfe terseshow pfe fpc 0show pfe statistics error !! clear pfe statistics Hidden!show pfe route summary !!show pfe next-hopshow pfe interface Hidden!show lchip ifd Hidden!show ichip ifd Hidden!

    Logging into PFE Components

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

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

    file copy ftp://hostname/filename filename ftp

    file copyroot% dd if=/dev/rad3 of=/dev/null bs=1k count=1show system storage% sysctl -a | grep bootdev % sysctl -w machdep.bootdevs=pcmcia-flash,compact-flash,disk,lanrequest chassis routing-engine diagnostics all (hidden)request system snapshotrequest system software add validate /var/tmp/jinstall-6.4R3-domestic.tgzrequest system reboot

    Memory & processes issues

    show system processes extensive/summashow 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

  • Description

    collects shoversion, uptime, hardware, processes, pfe stats, fpc detail, boo

    Restores the router to its default configRestores the router to its default config

    shows files in the directoryinitializes configuration database (commit related problems)shows boot devices

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

    restart a particular daemon process (kill -1)bounces a particular instance of rpd onlyobtains process pathobtains the PID associated with a process

    Displays all connections (ports) on which the RE listensdisplays sockets (-a) & all Protocol Control Blocks (PCB) info (-A)

    Displays info about a file. If you specify a particular PCB you willdetermine 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 connectionsgives you a list of services-to-port mappings

    lists core files if there are lists core files if there are decode a core fileforces a core file for one particular process (creates copy of process)forces a core file by suspending the daemoncompresses corefile to gzsame 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 utilizationDisplays revision level of the RE BIOSchanges RE mastership from active to backup REslogs into the other RElogs into the other RE from a root shell promtruns a diagnostic script in compact-flash,hard-disk & memoryfile system check

    Show list of Packet Forwarding Engine componentShow FPC status and statisticsdisplays FPE ASIC-related errorsclears PFE statisticsShow summary version of routing tables (size and # of routes)Show PFE next-hop informationshows interfaces and indexes (not snmp!)shows which interface belongs to which PFE for T-seriesshows 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 FPCshows syslog messages

    status of the SFM and mastershiplogin into the SFMcollects data from the SFMdisplays logs about the SFMdisplays log messagesdisplays scheduler information (SFM CPU%)Interrupt throttle informationshows C chip notification registersrestarts a dead FPCruns memory address data tests (10 meg, loop 1)

  • n /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 systemshows boot devices alters the order of the booting devicesruns a diagnostic script in compact-flash,hard-disk & memorySave config in /altconfig and software in /altroot before upgradeInstalls JUNOS package, validating against potential config errorsReboot the system

    Show the process tableShows memory tasks

    displays all ( -a ) kernel parametersconfirms if kernel core dumps are enabledshows boot devices in orderwrites ( -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 systemto find the CF

  • Example

    ot messages, memory, buffers, stats, etc

    Restores the router to its default config

    GRTMADPE2> request chassis fpc slot 2 offlineGRTMADPE2> request chassis fpc slot 2 onlineGRTMADPE2> request chassis pic fpc-slot 3 pic-slot 2 offlineGRTMADPE2> request chassis pic fpc-slot 3 pic-slot 2 online

    GRTAMSTC1> restart routing

    % netstat -Aa | grep 179c3780200 tcp4 0 0 10.0.9.7. 179 10.0.9.6.3651 ESTABLISHED

    % fstat | grep c3780200root rpd 2456 20* internet stream tcp c3780200

    GRTAMSTC1> file list detail /var/crash/GRTAMSTC1>show system core-dumps

    GRTAMSTC1> request system core-dump routingroot% gcore -s /usr/sbin/rpd 2275

  • 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 sfm0SFM0(GRTAMSTC1 vty)# show nvramSFM0(GRTAMSTC1 vty)# show syslog info

  • root@host> file copy ftp://jvserver.uu.net/jbundle-package-name /var/tmp/jbundle-package-nameroot@host> file copy ftp://[email protected]/jbundle-package-name /var/tmp/jbundle-package-nameGRTAMSTC1> 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:

  • COMMAND Description Example

    Show commands show rip neighbor view status of neighbors, send/receive mode (ripv1/2)show route protocol rip view all RIP routes in the routing tableshow route advertising-protocol rip 10.1.1.1 displays routes that a rip interface sendsshow route receiving-protocol rip 10.1.1.1 displays routes that a rip interface receivesshow rip statistics displays various rip statistics

  • COMMAND Description Example

    Show commands show ospf neighbor view status of OSPF neighbors, priority, dead intervals, FSM stateshow ospf neighbor extensive view detailed info about an ospf neighbor (area, option

    fields, DR, BDR...) clear ospf neighbor [192.168.254.225] restarts an adjacency or allshow ospf statistics view basic ospf statistics, number of Hellos, DD

    LSRs, LSUs, LSAcks. OSPF packet types + LSA rexmitshow ospf interface view status of an interface, Area, DR, BDR, Neighbors,

    State (DR, BDR, DRother, PtoP, Down)show ospf interface extensive ...also cost, MTUshow ospf route abr The results of the SPF algorithm, LSA type, metric...

    asbrextern

    show route protocol ospf viet ospf routes in inet.0 (routing table) show route protocol ospf 192.168/16 terseshow ospf database view the LSA database per area, Seq no./Age/Checksum, Optionsshow ospf database summary view how many LSA types per area (usefull!!)show ospf database brief view the LSA database briefly described clear ospf database purge deletes de database and restarts adjacencies, purge floods LSA with maxageshow ospf database router view the LSA specific type database

    networknetsummaryasbrsummaryexternnssa

    show ospf database router advertising-router 10.0.3.3 detail view LSAs advertised by a paricular router ID show ospf database router advertising-router 10.0.3.4 detailshow 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)

    show ospf database area 0 lsa-id extensive view one particular LSA in detail show ospf database area 0 lsa-id 192.168.1.1 extensiveshow ospf log displays how often the SPF is being initiated

    show bfd session verify BFD operation

  • COMMAND Description Example

    Show commands show isis adjacency view status of ISIS adjacencies, Level, state, SNPA, Hold timeshow isis adjacency extensive restart capability, piority, circuit type, ip address clear isis adjacency clears and restarts an adjacencyshow isis interface displays the interfaces that are operational for isisshow isis interface details interface, level, circuit ID, DR Level 1/2, Metricshow isis hostname verifies the dynamic hostname resolution of system ID valuesshow isis spf log displays history of SPF calculations, why it was performedshow isis statistics verifies which isis PDUs are being transmitted/received

    (IIH, LSP, CSNP, PSNP) and number of SPF runsshow isis route displays the results of the SPF calculations before the routes are places into the routing table. show route protocol isis view routes in inet.0show isis database displays LSPs on the database, including sequence, checksum,

    lifetime and attributesshow isis database detail displays advertised prefixes, metrics, origin for each route show isis database GRTMADPE2 detailshow isis database extensive [level 1 | 2] plus LSP headers and all TVL details

    monitor traffic interface so-0/0/0 size 1514 detail Monitor IS-IS messages

    show bfd session verify BFD operation

  • COMMAND Description Example

    Show commands show bgp summary peers, ASN, Flaps, routes active/received/damped + total/active pathsshow bgp group view the configured peer groupsshow bgp neighbor detailed info about bgp peers

    (AS number, hold time, router IDs, prefixes, NLRI support, capabilitiesand received routes, no of input/output packets, state...)

    show route next-hop database shows the bgp next-hop dBshow route protocol bgp RIB shows the Local-RIB database as part of inet.0, next-hop, metric1/2 AS-pathshow route protocol bgp terse shows next-hop but not protocol next-hopshow route receive-protocol bgp RIB shows the Adjacency-RIB-In table.

    (routes received by a peer before a routing policy is applied)show route advertising-protocol bgp RIB shows the Adjacency-RIB-Out table

    (routes being advertised to a peer after routing policy is applied)

    show route detail 10.10.1/24 all of the BGP attributes of this route, metric=MED, metric2=IGP costshow route hidden shows routes with unreachable next-hops

    show route community detail/terse show routes matching community show route terse community-name detail/terse shows all routes with this community name configuredshow route aspath-regex "regex" detail/terse

    show route damping [history|decayed|surpressed] detail show routes being dampedclear bgp damping clear damping and reuse damped routes immediately

    clear bgp neighbor soft inbound to regain routes not in Adj-Rib-In (keep none or loops)

    monitor traffic interface fe-0/0/0 size 4096 detail Monitors BGP messages

  • COMMAND Description Example

    Show commands IGMP

    show igmp interface shows state, querier (DR for that segment), version (default 2) and IGMP timersshow igmp group shows the multicast groups joinedshow igmp statistics shows igmp message statistics

    PIM

    show pim interface lists configured PIM interfaces -- mode (default sparse), state (DR, ptp), neighborsshow pim neighbors detail shows info about pim neighboring routersshow pim statistics shows pim messages being sent or receivedshow pim join extensive 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 infoclear pim join flushes join states!show pim source detail shows active multicast sources and their RPF intf.

    also multicast groups serviced by these sourceshow pim rps extensive shows the RP addresses, how it was learned and which groups are servedshow pim bootstrap shows the BSR election process and state

    RPF

    show multicast usage to view packets/bytes seen for every multicast group addressshow multicast rpf !!!! to view the RPF table used during multicast forwarding, similar to inet.0

    displays source prefix, from which protocol was learned & the uptsream interfaceshow multicast route to verify multicast group addresses and their sources (S,G)

    extensive also displais NHID which are a numerical reference to the OILshow route table inet.1 as above with protocol and preference (S,G)show multicast next-hops displays the multicast outgoing interface list (OIL), mapping of NHid to interfacesshow nhdb id extensive next-hop database with IFL-list

    MSDP

    show msdp detail shows MSDP sessions and their statusshow msdp source-active shows MSDP sources active (SA) and whether the SA is accepted, rejected or filteredshow route table inet.4 MSPD table. Almost the same as the above but with (S,G) notation

    show multicast rpf inet summary displays what table multicast uses (inet.0 by default)

  • COMMAND Description Example

    Show commands show mpls interface shows status of an mpls interface and admin groups (colors)show mpls lsp verify the establishment of the LSP at ingress, egress or transit level AND the label in/out/Pushed valuesshow mpls lsp extensive history of LSP, paths and RRO is shownshow mpls lsp ingress extensive show the originated LSPs at ingress. Also secondary paths are showed and fast rerouteshow mpls lsp transit show transit LSPs

    clear mpls lsp [optimize|optimze-aggressive] Rebuilds all LSPs, [non-preemptive|aggressive] now

    show ted database extensive Examines the info in the TE database, including all IGP extensions (admin groups -colors-, BW priority reservations)RSVP

    show rsvp interface shows status of RSVP interfaces, Active resv, Subscription rate, Bandwidth allocationsshow rsvp neighbor shows RSVP neighbors which has an LSP active, also Hello-intervalshow rsvp session detail shows ingress/egress/transit sessions and the label in/out values assigned!!! RRO, Style, ERO and also bypass LSPsshow rsvp session ingress detail shows also the links used by detour paths and their statusshow rsvp version shows RSVP version, soft-state refresh timer, keep-multiplier (hello & soft-state use same)

    show route table mpls.0 shows MPLS switching table (label values)show route table inet.3 shows LSP table. RSVP info is installed here

    LDP

    show ldp neighbors displays all LDP neighborsshow ldp session displays all established sessions, state and hold-timeshow ldp database [session peer] displays all label-to-FEC mappings [from specific peer]

  • COMMAND Description Example

    L3 VPN COMMANDS

    Show commands show route table vpn-a detail shows this particular VRF table, containing

    * all routes learned from CE * all routes imported from l3vpn.bgp table coming from other PEs

    watch for the inner (VPN) & outer (LSP) labels

    show route table vpn-a hidden If LSP is missing between PEs, VPN IPv4 routes will be visible but with and invalid NHshow route forwarding-table vpn vpn-a shows a VRF forwwarding table (note the double push operation)

    ping x.x.x.x routing-instance vpn-a ping using a particular VRF tabletraceroute x.x.x.x routing-instance vpn-a traceroute using a partiuclar VRF tabletelnet x.x.x.x routing-instance vpn-a telnet using a particular VRF tableping mpls l3vpn vpn-a prefix 172.20.4/24 checks if route at destination VRF exists and reachability to it no need for 127.0.0.1 in lo0

    show route table bgp.l3vpn.0 houses all VPN IPv4 routes learned from all PEs DEFAULT: only store routes with a matched RT

    "keep all" knob: store all MBGP routes even if there is no matched RT

    show route advertising-protocol bgp x.x.x.x view routes sent to other PEsshow route receive-protocol bgp x.x.x.x view routes received from other PEsshow arp displays ARP entries in both inet.0 and VRF tablesclear arp vpn vpn-a clears ARP entries off the VRP table

    OSPF VPN commands

    show ospf interface instance vpn-a displays all configured OSPF interfaces on this VRFshow ospf neighbor instance vpn-a displays all OSPF neighbors on this VRFshow ospf database instance vpn-a displays the LSDB for this particular VRF

    L2 VPN COMMANDS

    Kompella Show commands

    show l2vpn connections extensive shows states of layer 2 vpns connections (site to site)show route table vpn-a detail shows contents of a VFT, including

    * local site L2 NLRIs advertised to other PEs [L2VPN] * remote site L2 NLRIs coming from other PEs [BGP]

    L2 NLRI = RD + Site ID + label offset

    show route table bgp.l2vpn.0 houses all L2 VPN NLRIs with at least one matching RTshow route advertising-protocol bgp x.x.x.x view L2 VPN NLRIs sent to other PEsshow route receive-protocol bgp x.x.x.x view L2 VPN NLRIs received from other PEs

    show route table mpls.o detail shows MPLS switching table entries for L2 VPNs (displays VRF interfaces to label -double push operation- mappings) ((which VRF interface is mapped to which LSP ))

    show route forwarding-table family mpls view FT entries for L2 VPN connections

    ping mpls l2vpn instance vpn-a remote-site-id 2 local-site-id 1 test the l2vpn connection site to site (PE to PE)ping mpls l2vpn interface fe-0/0/0.512 test the l2vpn local interface

    Martini Show commands

    show l2circuit connections extensive shows states of layer 2 circuits connections (site to site)show ldp neighbor detail check if neighbor relationship is successful between PEs

    (use of extended neighbor discovery has worked)show ldp database detail check the presence of a FEC associated with the l2circuit

  • 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 (all) show class-of-service forwarding-table classifier mapping show class-of-service forwarding-table scheduler-map

  • Description

    shows classification results at ingress (BE, EF, AF, NC)SHOWS HOW TRAFFIC IS CLASSIFIED. Provides info about FC (queue) and RE show queue statistics for this interfacedetermines how many queues an interface supports & check the CoS queues

    shows what CoS parameters are in effect for a given interface. Number of queuesi.e. which scheduler map, classifier, rewrite is appliedshows listing of cos bits to simbolic name mapings: DSCP, inet-prec, exp

    shows mappings between simbolic names and dscp values (unless configured, defaul 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 numbersShow contents of a specific code point to forwarding class & PLP classifiershows mapping of forwarding classes to schedulers detailsShow mapping of forwarding class/loss priority to code point. Displays rewrite tableShows available drop profiles and interpolated data points of named drop profile

    displays CoS parameters in effect within the forwarding tabledisplays which classifiers are mapped to what logical unitsdisplays the scheduler map in service for each interface

  • Example

    ED and priority counters for this interfaceshow interfaces queue forwarding-class best-effort so-0/* | match "Physical| Bytes"

    lt will apply)

  • COMMAND

    Show commands

    show interfaces filtersshow firewall

    show firewall filter show firewall filter prefix-action from 1 to 8 show firewall log detailshow log

    clear firewall show policershow interface policer fe-0/1/0show log /var/tmp/ show log sampled

  • Description

    displays all firewall filters on all interfacesdisplays counter and policer statistics for all firewall filters

    displays the contents of a particular firewall filter namedisplays the n policers & counters of a Prefix-Specific Counter & Policer (PSCP)displays the contents of the kernel firewall logdisplays logged entries into syslog. Needs an action of syslog on the filter and also create a file with that name under system syslog. Basically is all about redirect all logs into syslog system

    resets counters associated with a firewalldisplays a list of interface policersdisplays details about interface policersdisplays a sample file created by the otuput of traffic samplingdisplays a copy of cflowd aggregates that are sent to the cflowd serverrequires local-dump command on the cflowd config

  • Example

    root@r3> show firewall

    Filter: lo0-inCounters:Name Bytes Packetsdenied-traffic 3480 61Policers:Name Packetspolice-icmp-icmp 132

    root@r3> show log filteringrequires enabling this particular file

    syslog { file filtering { firewall info; }

  • COMMAND

    Show commands

    show snmp statistics extensiveshow snmp mib walk .1.3.6.1.2.1.4.18 show snmp mib walk ipfragfailsshow interface lo0 extensive | display xml

  • Description

    shows SNMP statistics(hidden!) shows snmwalk of an OID

    shows output of xml tags. What variables are consulted for the display

  • Example

  • COMMAND Description Example

    Show commands

    show interface terse displays the IPv6 address configurationshow route table inet6 displays the IPv6 routing tableshow ipv6 neighbor shows IPv6 cache of neighbors neighbors h show interface lo0 extensive | display xml shows output of xml tags. What variables are consulted for the

  • have to be discorever (via ping i.e.) display

    CLIHardware commandsRIPOSPFISISBGPMulticastMPLSVPNCoSFirewallSNMPIPv6