- Router Commands Overview
There are hundreds of basic and advance level commands of a router. It is not easy to remember all the commands. But some commands are frequently used and can be remembered with some practice. I have provided a list of the most commonly used commands based on their features and usage.
You will find here some basic terminology of a router.
Routing: Routing is a process of moving the data (packets) through an inter network. Routing performs the two basic tasks. Define the paths for a packet and then forward the packets on the basis of defined paths. Routing can also be defined as the communication between two or more logically and physical networks and this communication (packet transfer) is brought by a router.
First of all you should remember the keyboard shortcuts of a router.
Keyboard Shortcuts
CTRL-N - show next command
CTRL-P - show previous command
SHIFT-CTRL-6 – Break
- Configuring the Router
You will be able to learn the basic commands for configuring a router.
sh running-config - details the running configuration file (RAM)
sh startup-config - displays the configuration stored in NVRAM
setup - Will start the the automatic setup; the same as when you first boot the router
config t - use to execute configuration commands from the terminal
config mem - executes configuration commands stored in NVRAM; copies startup-config to running-config
copy running-config startup-config - copies saved config in running config (RAM) to NVRAM or "write memory" for IOS under ver.11
copy startup-config running-config - copies from non-volatile (NVRAM) to current running config (RAM)
boot system flash
boot system tftp - tells router which IOS file on the tftp server to boot from
boot system rom - tell router to boot from ROM at next boot
copy flash tftp - Copies flash to tftp server
copy tftp flash - Restores flash from tftp server
copy run tftp - Copies the current running-config to tftp server
copy tftp run - Restores the running-config from tftp server
- General Commands
no shutdown - (enables the interface)
reload - restarts the router
sh ver - Cisco IOS version, uptime of router, how the router started, where system was loaded from, the interfaces the POST found, and the configuration register
sh clock - shows date and time on router
sh history - shows the history of your commands
sh debug - shows all debugging that is currently enabled
no debug all - turns off all debugging
sh users - shows users connected to router
sh protocols - shows which protocols are configured
banner motd # Your customized message here # - Set/change banner
hostname
clear counters - clear interface counters
- Privileged Mode commands of a router
enable - get to privileged mode
disable - get to user mode
enable password
enable secret
Setting Passwords on router
Here you will be able to learn how to set the password on a router.
enable secret
enable password
Setting the password for console access:
(config)#line console 0
(config-line)#login
(config-line)#password
Set password for virtual terminal (telnet) access (password must be set to access router through telnet):
(config)#line vty 0 4
(config-line)#login
(config-line)#password
Set password for auxiliary (modem) access:
(config)#line aux 0
(config-line)#login
(config-line)#password
- Router Processes & Statistics
sh processes - shows active processes running on router
sh process cpu - shows cpu statistics
sh mem - shows memory statistics
sh flash - describes the flash memory and displays the size of files and the amount of free flash memory
sh buffers - displays statistics for router buffer pools; shows the size of the Small, Middle, Big, Very Big, Large and Huge Buffers
sh stacks - shows reason for last reboot, monitors the stack use of processes and interrupts routines
- IP Commands
Configure IP on an interface:
int serial 0
ip address 157.89.1.3 255.255.0.0
int eth 0
ip address 2008.1.1.4 255.255.255.0
- Other IP Commands:
ip route
ip route 0.0.0.0 0.0.0.0
ip classless - use with static routing to allow packets destined for unrecognized subnets to use the best possible route
sh arp - view arp cache; shows MAC address of connected routers
ip address 2.2.2.2 255.255.255.0 secondary - configure a 2nd ip address on an interface
sh ip protocol
CDP Commands (Cisco Discovery Protocol uses layer 2 multicast over a SNAP-capable link to send data):
sh cdp neighbor - shows directly connected neighbors
sh cdp int - shows which interfaces are running CDP
sh cdp int eth 0/0 - show CDP info for specific interface
sh cdp entry
cdp timer 120 - change how often CDP info is sent (default cdp timer is 60)
cp holdtime 240 - how long to wait before removing a CDP neighbor (default CDP holdtime is 180)
sh cdp run - shows if CDP turned on
no cdp run - turns off CDP for entire router (global config)
no cdp enable - turns off CDP on specific interface
- IPX Commands
ipx routing
Configure IPX + IPX-RIP on an int:
int ser 0
ipx network 4A
- Other Commands:
sh ipx int e0 - shows ipx address on int
sh ipx servers - shows SAP table
sh ipx traffic - view traffic statistics
debug ipx routing activity - debugs IPS RIP packets
debug ipx sap - debugs SAP packets
- Routing Protocols
Configure RIP:
router rip
network 157.89.0.0
network 208.1.1.0
Other RIP Commands:
debug ip rip - view RIP debugging info
Configure IGRP:
router IGRP 200
network 157.89.0.0
network 208.1.1.0
Other IGRP Commands:
debug ip igrp events - view IGRP debugging info
debug ip igrp transactions - view IGRP debugging
Post a Comment