Basic Cisco Router Commands
-
Upload
abhaytech8451 -
Category
Documents
-
view
221 -
download
0
Transcript of Basic Cisco Router Commands
-
8/3/2019 Basic Cisco Router Commands
1/6
Basic Cisco Router Commands
( Not All Commands May Be Available Without Enable Access Or RouterVersion )
Router Name> User executable mode, view but cant make changes
Router Name>
enable
Gets you to Privilege mode allowing you to makechanges to the router
Router Name#
Privilege mode, changes can now be made to router
Router Name #disable
To get back to user mode
Router Name # exit To exit routerRouter Name #shft+ctrl+6
Break Key
Router Name # writeerase
To clear all previous configurations
Router Name #reload
Reboot the router
Router Name #setup
Setup command brings up the configuration dialog box.
Some Router Show Commands
Router Name # sh ? shows parameters supported by the routerRouter Name # sh int shows status of all interfaces
Router Name # sh int
s0
shows status of interface you selected, ie: s0,
s1, e0, e1, ...Router Name # sh ipint
view ip parameters
Router Name # sh ip intbrief
brief summary of all interfaces and status
Router Name # sh iproute
shows networks available to interface androuting table
Router Name # sh proc cpu shows CPU utilization on routerRouter Name # sh mem shows memory utilizationRouter Name # sh mem big to see the largest blocks of memoryRouter Name # sh log to check recent history of routerRouter Name # sh version shows summary of hardware and reason for
last reloadRouter Name # sh diag shows more detailed hardware informationRouter Name # sh flash shows IOS fileRouter Name # sh run shows running configurations on router
( version 10.3 and above )Router Name # wr t shows running configurations on router
(version 10.3 below/above)Router Name # sh env all shows current router temps, power supply
-
8/3/2019 Basic Cisco Router Commands
2/6
and general health of routerRouter Name # sh env table shows warning levels for shutdown to take
placeRouter Name # sh startup-config
shows saved config in NVRAM
Router Name # shcontrollers(int) shows serial line configurations. Make surea space is used for int. ie: s 0Router Name # sh cdpneighbor
shows directly connected neighbors
Router Name # sh cdpneighbors detail
shows detail of directly connected devices:(router, bridge, switch)
Router Name # sh cdp int shows which interfaces are running CDPRouter Name # sharp
shows lan devices and mac address' ( arp table)
Router Name # sh iparp
shows the arp table in the router
Router Name # sh protocol shows which protocols are configured
Router Name # sh ipprotocol
shows routing protocol configured andparameters
Router Name # sh ip routeisis
displays all routes in the route table thatoriginated in ISIS
Router Name # sh isis spf-log
displays information on the duration/cause ofrecent SPF runs
Router Name # sh isisdatabase
displays all information known by ISIS
Router Name # sh isisdatabase detail
displays contents of entire LSP (add router info,hr1.lga2.00-00)
Router Name # sh isistopology
summary of best path from router to everyother router
Router Name # sh ip bgp lists all routes learned from bgpRouter Name # sh ip bgp
shows BGP information for that particularroute, use w/ sh ip rou
Router Name #sh ip bgpcommunity-list
add list # to end of string. Bgp routes thatmatch a given list
Router Name # sh ip bgpfilter-list
bgp routes that match a given AS path filter list
Router Name # sh ip bgpneigh(address)
shows the details on a route in the route table
Router Name # sh ip bgpsum
used to view the status of a BGP session
Router Name # sh route-map (name) show the details of a specific route-map
Router Name # sh adjacencydetail
adjacency table used by CEF. Verifyrouter/device is discovered
Router Name # sh ip cef to view the CEF cache or FIB (forwardinginformation base) table
Router Name # sh ip cefsummary
gives an overview of the cef entries
Router Name # sh cef not- if CEF is enabled, this will show packets not
-
8/3/2019 Basic Cisco Router Commands
3/6
cef-switched being CEF switchedRouter Name # sh standby displays the information on the operation of
HSRPRouter Name # sh standbybrief
displays a summary of interfaces running HSRP
Router Name # sh standby(interface)
displays state of the port, hello intervals, MACaddress, config
R# sh mpls traffic-engtunnels tunnel #
displays tunnels between hops in a routemasked by MPLS
Some Basic Switch Commands
( Not All Commands May Be Available Without Enable Access )
Switch1> ? responds with main help menuSwitch1> hist to view a listing of previous commands usedSwitch1> show ? responds with various show commandsSwitch1> show ver information about IOS and hardware componentsSwitch1> show module quick view of status on all modulesSwitch1> show port provides general summary of all ports: errors,
collisions, speed, duplexSwitch1> show port(#)
specific information for a individual port
Switch1> show portstatus
provides single line general summary of all ports
Switch1> show mac(port#)
summary information on what has been sent andreceived on a given port
Switch1> show test
(module#)
if a module is in failed status, show test will show
specificsSwitch1> show log shows history of switch on a per module basisSwitch1> show config shows configurations on switchSwitch1> show system shows uptime and levels of utilizationSwitch1> show vlan lists the VLAN's that are resident on the switchSwitch1> show cam lists the LAN switch transparent bridging tableSwitch1> sh cam (macaddress)
to locate a single MAC address
Switch1> show camdynamic
lists all dynamically learned MAC addresses
Switch1> show span lists info on a port listening/diagnostics feature(switched port analyzer)
Switch1> showspantree (port#)
allows you to see the spantree status of a specificport
Switch1> show trunk provides a summary of the ports in trunking mode
Some Router Enable Commands
To Enable A Port
-
8/3/2019 Basic Cisco Router Commands
4/6
Router Name# config t
Router Name# int (+ interface you are designating, token ring must putin ring speed 16 or 4)
Router Name# ip address _._._._ (mask)
Router Name# no shut
To Disable A Port
Router Name# int (interface or port)
Router Name# shut
To Enable A Protocol
Different protocols will have different instructions below is a generic example:
Router Name# config t
Router Name# router (protocol type + any extensions needed ininstructions)
Router Name# network (+ IP address)
To Disable A Protocol
Router Name# config t
Router Name# no router (+ protocol type)
To Change Router Name
Router Name# config t
Router Name# hostname Jim (global command)
Router Name# ctrl z
From Config T settings:
Router Name# ctrl z (to save settings and execute the command)
Router Name# ctrl c (starts over, abort)
-
8/3/2019 Basic Cisco Router Commands
5/6
Router Name# write mem (saves everything to NV Ram)
Router Name# write t (shows running configurations, also can use showrun)
Router Name# telnet (to telnet into another router)
Router Name# ip host name (name & address - To Build Host Table -Global Command)
Router Name# no host (to remove a host name)
* On a 4000 series router you must specify what type of media is being used:
Router Name# config t
Router Name# int (+ interface you plan to configure, ie: e0, s0, ... screenchanges, major command)
Router Name# media-type 10baseT (or whichever media is being used,sub command)
To Enable RIP
Router Name# config t
Router Name# router rip
Router Name# network(+ network address, ie: 150.111.0.0 )
Router Name# int (+ interface you plan to configure, ie: e0, s0, ... screenchanges)
Config-if# ip address 150.11.1.1 255.255.255.0 (full statement withsubnet mask, sub command)
Config-if# no shut (this logically activates the interface, required atevery interface configuration)
To Enable SNMP
Router Name# config t
Router Name# snmp server community public (RO, RW)
To Enable IPX (Novell)
-
8/3/2019 Basic Cisco Router Commands
6/6
Router Name# config t
Router Name# ipx routing
Router Name# int (+ interface you plan to configure, ie: e0, s0, ... screen
changes)
Router Name# ipx network(ipx address)
Router Name # sh ipxservers
shows ipx servers on the network
Router Name # sh ipxroute
shows ipx networks seen by the routers
Router Name # sh ipxtraffic
shows ipx related protocols
Router Name # sh ipx int view ipx address on an
interface
To Enable VTY
Router Name# config t enable password cisco enter (globalcommand)
Router Name# line vty 0 4
Router Name# login
Router Name# password cisco