You are on page 1of 11

Cisco Router Configuration Commands

Requirement Cisco Command


Set a console password to cisco Router(config)#line con 0
Router(config-line)#login
Router(config-line)#password cisco
Set a telnet password Router(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#password cisco
Stop console timing out Router(config)#line con 0
Router(config-line)#exec-timeout 0 0
Set the enable password to cisco Router(config)#enable password
cisco
Set the enable secret password to peter. Router(config)#enable secret peter
This password overrides the enable password and is
encypted within the config file
Enable an interface Router(config-if)#no shutdown
To disable an interface Router(config-if)#shutdown
Set the clock rate for a router with a DCE cable to 64K Router(config-if)clock rate 64000
Set a logical bandwidth assignment of 64K to the serial Router(config-if)bandwidth 64
interface Note that the zeroes are not missing
To add an IP address to a interface Router(config-if)#ip addr 10.1.1.1
255.255.255.0
To enable RIP on all 172.16.x.y interfaces Router(config)#router rip
Router(config-router)#network
172.16.0.0
Disable RIP Router(config)#no router rip
To enable IRGP with a AS of 200, to all interfaces Router(config)#router igrp 200
Router(config-router)#network
172.16.0.0
Disable IGRP Router(config)#no router igrp 200
Static route the remote network is 172.16.1.0, with a Router(config)#ip route 172.16.1.0
mask of 255.255.255.0, the next hop is 172.16.2.1, at a 255.255.255.0 172.16.2.1 5
cost of 5 hops
Disable CDP for the whole router Router(config)#no cdp run
Enable CDP for he whole router Router(config)#cdp run
Disable CDP on an interface Router(config-if)#no cdp enable

Cisco Router Show Commands


Requirement Cisco Command
View version information show version
View current configuration (DRAM) show running-config
View startup configuration (NVRAM) show startup-config
Show IOS file and flash space show flash
Shows all logs that the router has in its memory show log
View the interface status of interface e0 show interface e0
Overview all interfaces on the router show ip interfaces brief
View type of serial cable on s0 show controllers 0 (note the space between
the 's' and the '0')
Display a summary of connected cdp devices show cdp neighbor
Display detailed information on all devices show cdp entry *
Display current routing protocols show ip protocols
Display IP routing table show ip route
Display access lists, this includes the number of show access-lists
displayed matches
Check the router can see the ISDN switch show isdn status
Check a Frame Relay PVC connections show frame-relay pvc
show lmi traffic stats show frame-relay lmi
Display the frame inverse ARP table show frame-relay map

Cisco Router Basic Operations


Requirement Cisco Command
Enable Enter privileged mode
Return to user mode from privileged disable
Exit Router Logout or exit or quit
Recall last command up arrow or <Ctrl-P>
Recall next command down arrow or <Ctrl-N>
Suspend or abort <Shift> and  <Ctrl> and 6 then x
Refresh screen output <Ctrl-R>
Compleat Command TAB

Cisco Router Copy Commands


Requirement Cisco Command
Save the current configuration from copy running-config startup-config
DRAM to NVRAM
Merge NVRAM configuration to DRAM copy startup-config running-config
Copy DRAM configuration to a TFTP copy runing-config tftp
server
Merge TFTP configuration with current copy tftp runing-config
router configuration held in DRAM
Backup the IOS onto a TFTP server copy flash tftp
Upgrade the router IOS from a TFTP copy tftp flash
server

Cisco Router Debug Commands


Requirement Cisco Command
Enable debug for RIP debug ip rip
Enable summary IGRP debug information debug ip igrp events
Enable detailed IGRP debug information debug ip igrp transactions
Debug IPX RIP debug ipx routing activity
Debug IPX SAP debug IPX SAP
Enable debug for CHAP or PAP debug ppp authentication
Switch all debugging off no debug all
undebug all
Configuration :

Router> enable
Router# show ?
Router # clock set 11:24:30 22 Aug 2009 // set clock in router
Router # configuration terminal
Router (config)# hostname R1 // change router name
R 1 (config)# banner motd * hello welcome have a nice day * / message of the day

Password set on line

Console line
R1 (config)# line console 0
R 1(config- line) # password cisco
R 1(config- line) #login
R 1(config- line) #exit

VTY line
R1 (config)# line vty 0 4
R 1(config- line) # password cisco
R 1(config- line) #login
R 1(config- line) #exit

Auxiliary line
R1 (config)# line aux 0
R 1(config- line) # password cisco
R 1(config- line) #login
R 1(config- line) #exit

Enable mode password

R1 (config)# enable password cisco

R1 (config)# enable secret cisco

Remove any password use no cmd

Interfaces Configuration

Ethernet Interface

R1 (config)# interface fastethernet 0/0


R1 (config-if )# ip address 192.168.1.100 255.255.255.0
R1 (config-if )#no shutdown
R1 (config-if )#exit

Serial Interface

R1 (config)#interface serial 0/0


R1 (config-if )#ip address 1.1.1.1 255.0.0.0
R1 (config-if )#clock rate 64000 // clock rate set only DCE end of cable
R1 (config-if )#encapsulation ? // encapsulation same on both side in router
R1 (config-if )#no shutdown
R1 (config-if )#exit

Copy configuration command

R1# copy running- configuration start-up configuration

CDP cisco discovery protocol

R1(config)# cdp run


R1# sh cdp neighbor
R1# sh cdp neighbor detail
R1# sh ip interface brief

Two types of Routing


 Static Routing
 Dynamic Routing

Static Routing

R1# sh ip route

R1 (config)# ip route 200.100.100.0 255.255.255.0 1.1.1.2


R1 (config)# ip route 200.100.200.0 255.255.255.0 4.1.1.2

R2 (config)# ip route 200.100.50.0 255.255.255.0 1.1.1.1


R (config)# ip route 200.100.150.0 255.255.255.0 2.1.1.2

Dynamic Routing

 RIP : Routing Information Protocol


 IGRP: Interior Gate way Routing Protocol
 EIGRP: Enhance Interior Gate way Routing Protocol
 OSPF: Open shortest Path First
RIP : Routing Information Protocol

R1 (config)#route rip
R1 (config-route)#network 1.0.0.0
R1 (config-route)#network 4.0.0.0
R1 (config-route )#network 200.100.50.0
R2 (config)#route rip
R2 (config-route)#network 2.0.0.0
R2 (config-route)#network 3.0.0.0
R2 (config-route )#network 200.100.100.0
Same all

IGRP: Interior Gate way Routing Protocol

R1(config)#route igrp 100


R1 (config-route)#network 1.0.0.0
R1 (config-route)#network 4.0.0.0
R1 (config-route )#network 200.100.50.0

R2 (config)#route igrp 100


R2 (config-route)#network 2.0.0.0
R2 (config-route)#network 3.0.0.0
R2 (config-route )#network 200.100.100.0

R1# sh ip route igrp

EIGRP: Enhance Interior Gate way Routing Protocol

R1(config)#route eigrp 300


R1 (config-route)#network 1.0.0.0
R1 (config-route)#network 4.0.0.0
R1 (config-route )#network 200.100.50.0

R2 (config)#route igrp 300


R2 (config-route)#network 2.0.0.0
R2 (config-route)#network 3.0.0.0
R2 (config-route )#network 200.100.100.0

Show cmd
R1# sh ip route
R1# sh ip route eigrp
R1# sh ip eigrp neighbor
R1# sh ip eigrp topology
OSPF: Open shortest Path First

R1(config)#route ospf 20
R1 (config-route)#network 1.0.0.0 0. 255.255.255 area 0.0.0.0
R1 (config-route)#network 4.0.0.0 0.255.255.255 area 0.0.0.0
R1 (config-route )#network 200.100.50.0 0.0.0.255 area 0.0.0.0

R2 (config)#route ospf 20
R2 (config-route)#network 2.0.0.0 0.255.255.255 area 0.0.0.0
R2 (config-route)#network 3.0.0.0 0.255.255.255 area 0.0.0.0
R2 (config-route )#network 200.100.100.0 0.0.0.255 area 0.0.0.0

Show cmd
R1# sh ip route
R1# sh ip route ospf
R1# sh ip ospf neighbor
R1# sh ip ospf topology
R1 # sh ip protocol

Cisco Router 2811 Configuration

Configure cisco Router 2811 and Configure Natting with one serial and one ethernet card

Here we are going to confgure cisco router 2811/2611 with the ISP connection and create
natting .

telnet 192.168.0.1 (Router Ip)


Enter passwd - xyz

step 1 :-

hostname>en - enable to login to router configuration


passwd - abc

hostname# sh run - to see running configuration


hostname# config t - To configure terminal

step 2 :-

hostname(config)#ip name-server 203.148.202.3


hostname(config)#ip name-server 203.148.202.4

where 203.148.202.3 and 203.148.202.4 are all the available dns server ip

step 3 :-

hostname(config)#interface Serial0/0
hostname(config-if)#ip address 58.68.30.130 255.255.255.0
hostname(config-if)# ip nat outside
hostname(config-if)#CLTR=Z
hostname#wr

hostname#config t
hostname(config)# ip nat pool sunny 125.16.1.20 125.16.1.20 prefix-length 24

hostname(config)# ip nat inside source list 7 pool sunny overload


hostname(config)# ip classless
hostname(config)# ip route 0.0.0.0 0.0.0.0 Serial0/0

hostname(config)#ip route 0.0.0.0 0.0.0.0 Serial0/1

hostnmae(config)# ip http server

hostname(config)#access-list 7 permit 192.168.100.0 0.0.0.255

Wan Ip 58.68.30.130 is the public Ip provided by the ISP and this ip will be natted with
your complete network.I mean your network will have 192.168.0.1,2,3 series but outside
this will be your main nattimg IP
hostname(config-if)ip nat outside
hostname(config-if)duplex auto
hostname(config-if)speed auto
hostname(config-if)control+Z - save configuration

hostname#wr - write the changes

step 4 :-

hostname#config t
hostname(config)# interface FastEthernet0/0
hostname(config-if)#ip address 192.168.0.20 255.255.255.0 secondary
hostname(config-if)# ip address 125.16.1.17 255.255.255.240
hostname(config-if)# ip nat inside

press CLTR+Z and then write


This will be Ip series you can use in your network now
hostname(config-if)#speed auto
hostname(config-if)control+Z - save configuration
hostname#wr - write the changes

 You have to configure the "interface vlan's" first before switchport access vlan 10
& 20.

 https://learningnetwork.cisco.com/message/81911

interface Vlan 10
description LAN 10
ip address 192.168.0.1 255.255.255.0
!
interface Vlan 20
description LAN 20
ip address 192.168.1.1 255.255.255.0

interface FastEthernet0/1/0
description LAN 10
switchport access vlan 10
!
interface FastEthernet0/1/5
description LAN 20
switchport access vlan 20

Restart the router 1 or 2 times and your router is ready configured and natting is also
done

Basic Cisco 2811


Configuration
 
1) Is DHCP enabled (FastEthernet0/1)
2) Connects to my Time Warner internet box (Dynamic IP via. DHCP) (FastEthernet0/0)
 
I tried to use the SDM to get this to work, however what keeps happening is that it will not get an IP from my
ISP.  When I plug my other Linksys router in it gets an IP, starts DHCP and works great.  I know without any
doubt that the Cisco rouer is WAY better, I just dont know how to use it yet.  I dont mind starting from
scratch at all, so a full config file is perfectly fine.  I understand (at the surface) how the config file works.
 
I currently have FastEthernet0/0 as the WAN (outside) and FastEthernet0/1 as LAN (inside).  Everything is
wired, I just need a config file to get me going.  I am working on my CCNA which is largly the reason I got
the router in the first place.  I have Googled this (not a total n00b) however I am not exactly what to search
for.  If there is an existing thread to help, that would be greatly appreciated as well.

Login to the router and type


config t
interface FastEthernet0/0
ip address dhcp
 
The router will get an IP address form your service provider
 
for your other interfcae (0/1):
config t
interface FastEthernet0/1
ip address 10.1.1.1 255.255.255.0 (this is an example, use the ip addess range
that you are using for your PCs, printer, etc at home.
 
If you want to use DHCP addressing for your devices at home, then you would
need to define an IP DHCP pool and sepcify
ip dhcp pool LAN
network 10.1.1.0 255.255.255.0
default-router 10.1.1.1
dns-server  (DNS servers supplied by the ISP)
 
You will also need a default route tward your

SWITCH CONFIGURATION:

SW>en
SW# config t
SW(config)#sh spanning tree

Priority Change

SW(config)#spannig-tree vlan 1 priority 4096

Port fast configuration

SW(config)# int fastethernet 0/1


SW(config-if)#spanning-tree port fast
SW(config-if)#no spanning-tree port fast

Prot Security

SW(config)# int fastethernet 0/1

SW(config-if)#switchport mode access


SW(config-if)#switchport port-security
SW(config-if)#switchport port-security mac address sticky

Or
SW(config-if)#switchport port-security mac address H.H.H
SW(config-if)#switchport port-security maximum
(1 -132) address are save

SW(config-if)#no shutdown

SW# sh interface status

V- LAN

SW# show vlan

SW(config)# vlan 10
SW(config-vlan)#name sales

SW(config)# interface fastethernet 0/24


SW(config-if) switch port access vlan 10

Telnet switch

SW(config)# interface vlan 1


SW(config-if)#ip address 192.168.1.1 255.255.255.0
SW(config-if)#no shutdown

You might also like