Thursday, April 7, 2011

Router Commands

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.

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

General Commands

Here is a list of the general commands. These are the basic level commands and most commonly used
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 - use to configure the hostname of the router
clear counters - clear interface counters

Privileged Mode commands of a route

enable - get to privileged mode
disable - get to user mode
enable password - sets privileged mode password
enable secret - sets encrypted privileged mode password
Setting Passwords on router
Here you will be able to learn how to set the password on a router.
enable secret - set encrypted password for privileged access
enable password - set password for privileged access (used when there is no enable secret and when using older software)
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

IP Commands

Here is a list of the 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
sh ip route - view ip routing table
ip route [administrative_distance] - configure a static IP route
ip route 0.0.0.0 0.0.0.0 - sets default gateway

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

WAN Configurations Commands

Networking over WAN is the main functionality of a router. The most common use of a router is for the WAN connectivity. Here is a list of the commands for the different methods of the WAN connectivity.

PPP Configuration

encapsulation pppppp authentication
ppp chap hostname
ppp pap sent-username
sh int ser 0 - use to view encapsulation on the interface

Frame-Relay Configuration

encapsulation frame-relay ietf - use IETF when setting up a frame-relay network between a Ciscorouter and a non-Cisco router
frame-relay lmi-type ansi - LMI types are Cisco, ANSI, Q933A; Cisco is the default; LMI type is auto-sensed in IOS v11.2 and up
frame-relay map ip 3.3.3.3 100 broadcast - if inverse ARP won't work, map Other IP to Your DLCI # (local)
keep alive 10 - use to set keep alive
sh int ser 0 - use to show DLCI, LMI, and encapsulation info
sh frame-relay pvc - shows the configured DLCI's; shows PVC traffic stats
sh frame-relay map - shows route mapssh frame-relay lmi - shows LMI info

No comments:

Post a Comment

Dear Reader, if you like My Blog content, feel free to comment on our blog posts.