Вы находитесь на странице: 1из 6

Basic Cisco Router Commands

( Not All Commands May Be Available Without Enable Access Or Router Version ) User executable mode, view but cant make changes Router Name> Gets you to Privilege mode allowing you to make Router Name> changes to the router enable Router Name Privilege mode, changes can now be made to router # Router Name # To get back to user mode disable Router Name # exit To exit router Router Name # Break Key shft+ctrl+6 Router Name # write To clear all previous configurations erase Router Name # Reboot the router reload Router Name # Setup command brings up the configuration dialog box. setup

Some Router Show Commands


Router Name # sh ? Router Name # sh int Router s0 Router int Router brief Router route Router Router Router Router Router Name # sh int Name # sh ip Name # sh ip int Name # sh ip Name Name Name Name Name # # # # # sh sh sh sh sh proc cpu mem mem big log version shows parameters supported by the router shows status of all interfaces shows status of interface you selected, ie: s0, s1, e0, e1, ... view ip parameters brief summary of all interfaces and status shows networks available to interface and routing table shows CPU utilization on router shows memory utilization to see the largest blocks of memory to check recent history of router shows summary of hardware and reason for last reload shows more detailed hardware information

Router Name # sh diag Router Name # sh flash Router Name # sh run Router Name # wr t Router Name # sh env all

shows IOS file shows running configurations on router ( version 10.3 and above ) shows running configurations on router (version 10.3 below/above) shows current router temps, power supply

and general health of router Router Name # sh env table shows warning levels for shutdown to take place Router Name # sh startupshows saved config in NVRAM
config Router Name # sh controllers(int) Router Name # sh cdp neighbor Router Name # sh cdp neighbors detail Router Name # sh cdp int Router Name # sh arp Router Name # sh ip arp Router Name # sh protocol Router Name # sh ip protocol Router Name # sh ip route isis Router Name # sh isis spflog Router Name # sh isis database Router Name # sh isis database detail Router Name # sh isis topology Router Name # sh ip bgp Router Name # sh ip bgp <route> Router Name #sh ip bgp community-list Router Name # sh ip bgp filter-list Router Name # sh ip bgp neigh(address) Router Name # sh ip bgp sum Router Name # sh routemap (name) Router Name # sh adjacency detail Router Name # sh ip cef Router Name # sh ip cef summary Router Name # sh cef not-

shows serial line configurations. Make sure a space is used for int. ie: s 0
shows directly connected neighbors shows detail of directly connected devices: (router, bridge, switch) shows which interfaces are running CDP shows lan devices and mac address' ( arp table ) shows the arp table in the router shows which protocols are configured shows routing protocol configured and parameters displays all routes in the route table that originated in ISIS displays information on the duration/cause of recent SPF runs

displays all information known by ISIS


displays contents of entire LSP (add router info, hr1.lga2.00-00) summary of best path from router to every other router lists all routes learned from bgp shows BGP information for that particular route, use w/ sh ip rou add list # to end of string. Bgp routes that match a given list bgp routes that match a given AS path filter list shows the details on a route in the route table used to view the status of a BGP session show the details of a specific route-map adjacency table used by CEF. Verify router/device is discovered to view the CEF cache or FIB (forwarding information base) table gives an overview of the cef entries if CEF is enabled, this will show packets not

cef-switched Router Name # sh standby Router Name # sh standby brief Router Name # sh standby (interface) R# sh mpls traffic-eng tunnels tunnel #

being CEF switched displays the information on the operation of HSRP displays a summary of interfaces running HSRP displays state of the port, hello intervals, MAC address, config displays tunnels between hops in a route masked by MPLS

Some Basic Switch Commands


( Not All Commands May Be Available Without Enable Access ) Switch1> Switch1> Switch1> Switch1> Switch1> Switch1> responds with main help menu to view a listing of previous commands used ? responds with various show commands ver information about IOS and hardware components module quick view of status on all modules port provides general summary of all ports: errors, collisions, speed, duplex Switch1> show port specific information for a individual port (#) Switch1> show port provides single line general summary of all ports status Switch1> show mac summary information on what has been sent and (port#) received on a given port Switch1> show test if a module is in failed status, show test will show (module#) specifics Switch1> show log shows history of switch on a per module basis Switch1> show config shows configurations on switch Switch1> show system shows uptime and levels of utilization Switch1> show vlan lists the VLAN's that are resident on the switch Switch1> show cam lists the LAN switch transparent bridging table Switch1> sh cam (mac to locate a single MAC address address) Switch1> show cam lists all dynamically learned MAC addresses dynamic Switch1> show span lists info on a port listening/diagnostics feature (switched port analyzer) Switch1> show allows you to see the spantree status of a specific spantree (port#) port Switch1> show trunk provides a summary of the ports in trunking mode ? hist show show show show

Some Router Enable Commands


To Enable A Port

Router Name# config t

Router Name# int (+ interface you are designating, token ring must put in 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 instructions) (protocol type + any extensions needed in

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)

Router Name# write mem (saves everything to NV Ram)

Router Name# write t (shows running configurations, also can use show run) 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, ... screen changes, 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, ... screen changes) Config-if# ip address 150.11.1.1 255.255.255.0 (full statement with subnet mask, sub command) Config-if# no shut (this logically activates the interface, required at every interface configuration) To Enable SNMP Router Name# config t Router Name# snmp server community public (RO, RW)

To Enable IPX (Novell)

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) shows ipx servers on the network shows ipx networks seen by the routers shows ipx related protocols view ipx address on an

Router Name # sh ipx servers Router Name # sh ipx route Router Name # sh ipx traffic Router Name # sh ipx int interface To Enable VTY

Router Name# config t enable password cisco enter command) Router Name# line vty 0 4 Router Name# login Router Name# password cisco

(global