Cisco Router Command

Command

Effect

Basic Router Operations

enable | disable

Enter privileged mode | exit to usr

Ctrl+P

Previous command

Ctrl+N

Next command

Ctrl+A

Move to beginning of the line

Ctrl+E

Move to the end of the line

Ctrl+F

Forward one character

Ctrl+B

Back one character

Esc+B

Moves back one word at a time

Esc+A

Moves forward one word at a time

<shift>+<ctrl>+6 X

Shift between telnet sessions

<tab>

Completes commands

 

Viewing Router Information

show version

IOS Version Information

show memory

Memory statistics.

show protocols

Active network routing protocols.

show running-config

Current config in RAM.

show startup-config

Saved config in NVRAM.

show interfaces

Interface status + config.

show flash

IOS file and free space.

 

Cisco Discovery Protocol (CDP)

show cdp

cdp info (broadcast holdtime).

show cdp neighbor

This shows all devices directly connected to the router, hold time, local and remote port, ID, platform and capability info.

show cdp neighbor detail

Adds IP / IPX addresses to above info.

show cdp entry [*(all) | NAME]

Shows info for all entries ( *) or only one (NAME).

show cdp traffic

Shows traffic statistics.

show cdp interface [type number]

Display info about the interfaces on which CDP is enabled

cdp run

Enables CDP (global configuration)

cdp enable

Enables CDP for an interface (interface configuration mode)

cdp timer seconds

Specifies CDP updates frequency.

cdp holdtime seconds

Specifies the hold time to be sent in the CDP update packets.

 

TCP/IP

no ip routing

Disables IP routing.

show ip route

View IP routing table.

show ip interface

IP interface info (IP access lists)

debug ip rip

Shows routing updates as they are received and sent.

debug igrp events

Shows a summary of the IGRP routing info that is running on the network.

debug igrp transactions

Show message requests from neighbor routers asking for updates and the broadcasts sent to them.

 

IPX/SPX

ipx routing

Enables IPX and (enables RIP routing automatically).

ipx maximum-paths <1-512>

IPX load balancing. (default 1)

show ipx route

Views IPX routing tables.

show ipx interface

IPX interface info (IPX access lists)

show ipx servers

Lists the IPX servers discovered through SAP.

show ipx traffic

View info about the number and type of IPX packets transmitted and received.

debug ipx routing activity

Displays messages relating to IPX routing activity.

debug ipx routing events

Displays messages relating to IPX routing events.

debug ipx sap

Debug IPX sap packets

 

Backup Configurations

copy run start

Copy current config to NVRAM

copy start run

Copy config from NVRAM to RAM

copy run tftp

Copy config to TFTP server

copy tftp run

Restore config from Server

copy flash tftp

Backup IOS to TFTP server

copy tftp flash

Restore IOS from TFTP server

boot system flash [filename]

Tells router which IOS file in flash to boot.

boot system tftp [filename]

Tells router which IOS file to request from tftp server

 

Set Passwords (Global Config Mode)

line con 0

line aux 0

line vty 0 4

-Selects Console

-Selects Auxiliary

-Selects Telnet

login

password cisco

-Allows logins and

-sets the password to cisco

enable password cisco

-Set password for privilege mode to cisco

enable secret cisco2

-Set encrypted password to cisco2

 

 

 

 

Configure Logical Addresses

 

TCP/IP -32 bits

 

Syntax:

   Router#configure terminal

   Router(config)#interface <type>

   Router(config-if)#ip address <addr>

   Router(config-if)#no shutdown
 

Example:

   Router(config)#interface Ethernet 0

   Router(config-if)#ip address 192.168.1.100 255.255.255.0

   Router(config-if)#no shutdown

 

 

IPX (only configure network ID, MAC is used for host ID) -80 bits

 

Syntax:

   Router#configure terminal

   Router(config)#ipx routing

   Router(config)#interface <type> <Number>

   Router(config-if)#ipx network <#> encapsulation <type>

   Router(config-if)#no shutdown

 

Example:

   Router(config)#ipx routing

   Router(config)#interface Ethernet 0

   Router(config-if)#ipx network 2aa encap arpa

   Router(config-if)#no shutdown

 

 

Subinterfaces (For IP or IPX)

 

Syntax:

   Router(config)#int <type> <#.subinterface #>

 

Examples:
IP

   Router#configure terminal

   Router(config)#interface serial 0.1

   Router(config-subif)#ip address 192.168.1.1 255.255.255.0

 

IPX

   Router(config)#int ethernet0.1

   Router(config-subif)#ipx network 1 encap snap

   Router(config-subif)#int ethernet0.2

   Router(config-subif)#ipx network 2 encap sap

 

 

Configure DCE Serial Interface

Command or Prompt Level

Effect of Command

1. Prompt is Router>

enable

Enters privileged mode.

2. Prompt changes to Router#

show controllers serial 1

Tells you information about the physical interface itself, it also gives you the cable type and whether it is a DTE or DCE interface.

configure terminal

Enter Global Configuration mode.

3. Changes prompt to Router(config)#

interface serial 1

Enter interface configuration mode.

4. Changes prompt to Router(config-if)#

clock rate 64000

Changes clock rate to 64000 bits per second.

bandwidth 56

Bandwidth in Kilobits.

no shutdown

Brings up the interface.

Ctrl+Z

Exits Global Configuration mode.

5. Prompt changes to Router#

show interface s1

Shows interface status and configuration.

 

 

 

 

FRAME RELAY

 

Command or Prompt Level

Effect of Command

Viewing Configurations

show frame-relay pvc [type number [dlci]]

Lists all PVCs and DLCIs Type, number, & DLCI optional.

show interface serial 0

View DLCI and LMI info.

show frame-relay map

Display the current Frame Relay map entries.

show frame-relay lmi

View LMI statistics.

 

 

Enabling Frame Relay

encapsulation frame-relay <type>

Enables Frame Relay

keepalive <seconds>

Defines the keepalive interval, must be less than the switch default 10 sec

 

 

Frame Relay Encapsulation Types

cisco

Default

ietf

Used for connecting to non-Cisco equipment

 

 

Specifying LMI Type

frame-relay lmi-type <type>

Specifies LMI type

 

 

LMI Types

cisco

LMI defined by the Gang of Four (default).

ansi

ANSI standard T1.617 Annex D provides for 976 virtual circuit addresses and uses DLCI 0 as the management circuit.

q933a

ITU-T Q.933 Annex A, similar to ANSI T1.617 Annex D, uses DLCI 0 as a management circuit.

-LMI is a standard signaling mechanism between CPE (usually a router) and the Frame Relay connection. It provides the CPE with a local DLCI number and gives that DLCI number network-wide or local significance.

-IOS 11.2 and up, supports LMI autosense, which enables the interface to automatically determine the LMI type.

 

 

 

 

Setting Passwords

 

Setting the enable and enable secret password:

   Router(config)#enable ccna

   Router(config)#enable secret ccna2

 

Setting the auxiliary port password:

   Router(config)#line aux 0

   Router(config-line)#login

   Router(config-line)#password ccna

 

Setting the console password:

   Router(config)#line con 0

   Router(config-line)#login

   Router(config-line)#password ccna

 

Setting the Virtual Terminal (Telnet) password:

   Router(config)#line vty 0 4

   Router(config-line)#login

   Router(config-line)#password ccna