It is just a step-by-step guide for the most basic configuration needed to make the router operational. This document is intended to instruct in the basics of Cisco router configuration and maintenance.
The Cisco IOS software provides two levels of access to commands: user and privileged. The unprivileged user mode is called user EXEC mode. The privileged mode is called privileged EXEC mode and requires a password. The commands available in user EXEC mode are a subset of the commands available in privileged EXEC mode.
USER EXEC MODE:
When you are connected to the router, you are started in user EXEC mode. The user EXEC commands are a subset of the privileged EXEC commands.
PRIVILEGED EXEC MODE:
Privileged Commands Include The Following:
• Configure – Changes the software configuration.
• Debug – Display process and hardware event messages.
• Setup – Enter configuration information at the prompts.
Enter the command disable to exit from the privileged EXEC mode and return to user EXEC mode.
CONFIGURATION MODE:
Configuration mode has a set of submodes that you use for modifying interface settings, routing protocol settings, line settings, and so forth. Use caution with configuration mode because all changes you enter take effect immediately.
To enter configuration mode, enter the command configure terminal and exit by pressing Ctrl-Z.
When you first power on a new Cisco Router, you have the option of using the “setup” utility, which allows you to create a basic initial configuration. However, in this post I will show you how to do this basic setup with the Command Line Interface (CLI).
Mastering the Cisco Router CLI is essential for more complex configuration tasks and it is the most important knowledge you should acquire if you want to become a Cisco network administrator.
THE BASIC CLI MODES THAT WE WILL BE REFERRING BELOW ARE AS FOLLOWING:
Router # – User EXEC Mode
Router# – Privileged EXEC mode
Router(config)# – Global Configuration Mode
Router(config-if)# – Interface Configuration Mode
Router(config-line)# – Line Configuration Mode
Already you have some basic knowledge of CLI and how to navigate between different configuration modes (user mode, privileged exec mode etc), so let’s get started:
STEP1: CONFIGURE ACCESS PASSWORDS:
The first step is to secure your access to the router by configuring a global secret password and also passwords for Telnet or Console as needed.
Enter into Global Configuration mode from the Privileged EXEC mode:
Router# configure terminal – Privileged EXEC mode Router(config)# – Global Configuration Mode
In Global Configuration Mode you configure parameters that affect the whole router device. Here we will configure the Enable Secret password that you will be using from now own to enter into Privileged EXEC Mode from User EXEC Mode.
Router(config)# enable secret “somestrongpassword”
From now on, when you log in from user EXEC mode you will be asked for a password.
It is suggested also to configure a password for the Telnet Lines (VTY lines) which will secure your access when connecting via Telnet over the network.
Router(config)# line vty 0 4 Router(config-line)# password “strongTelnetPass” Router(config-line)# login
STEP2: CONFIGURE A ROUTER HOSTNAME:
To differentiate your Router from other devices in the network, you should configure a Hostname for your device.
Router(config)# hostname My-Router My-Router(config)#
Notice that your Router prompt changes to the new hostname that you have just set.
STEP3: CONFIGURE IP ADDRESSES FOR ROUTER INTERFACES:
This is an essential step in order for your router to be able to forward packets in the network. The most basic parameter for a Router Interface is the IP address. From Global Configuration Mode you need to enter into Interface Configuration Mode:
My-Router(config)# interface serial 1/1 My-Router(config-if)# ip address 100.100.100.1 255.255.255.252 My-Router(config-if)# no shutdown My-Router(config-if)# exit
My-Router(config)# interface fastethernet 0/1 My-Router(config-if)# ip address 192.168.10.1 255.255.255.0 My-Router(config-if)# no shutdown My-Router(config-if)# exit
STEP4: CONFIGURE ROUTING (STATIC OR DYNAMIC):
The Router’s main purpose is to find the best route path towards a destination network and forward packets according to the best path. There are two main ways a router knows where to send packets. The administrator can assign static routes, or the router can learn routes by using a dynamic routing protocol. For simple network topologies, static routing is preferred over dynamic routing. Let’s see how to configure static routes from Global Configuration Mode.
My-Router(config)# ip route [destination network] [subnet mask] [gateway]
My-Router(config)# ip route 200.200.200.0 255.255.255.0 100.100.100.2
The command above tells the router that network 200.200.200.0/24 is reachable via gateway address 100.100.100.2.
Another popular static route that we usually configure on Internet Border routers is the default static route:
My-Router(config)# ip route 0.0.0.0 0.0.0.0 50.50.50.1
The default static route above instructs the router to send ALL packets that the router does not have a more specific route entry to gateway address 50.50.50.1 (which might be the ISP gateway address).
STEP5: SAVE YOUR CONFIGURATION:
Save your current running configuration into NVRAM. This will overwrite the startup configuration.
My-Router(config)# exit My-Router# copy running-config startup-config
You can display your current configuration to verify your settings as following:
My-Router# show running-config
ROUTING PROTOCOL CONFIGURATION: Routing Information Protocol (RIP)
Step 1: Enter privileged EXEC mode:
Router>enable password
Step 2: Enter the configure terminal command to enter global configuration mode.
Router#config terminal
Step 3: Enter the router rip command
Router(config)#router rip
Step 4: Add the network number to use RIP and repeat this step for all the numbers.
Router(config-router)#network network-number
Example: Router(config-router)#network 192.168.10.0
NOTE: To turn off RIP, use the no router rip command.
Router(config)#no router rip
ALSO USEFUL COMMANDS: SPECIFY A RIP VERSION:
By default, the software receives RIP version 1 and version 2 packets, but sends only version 1 packets. To control which RIP version an interface sends, use one of the following commands in interface configuration mode:
Command
|
Purpose
|
ip rip send version 1
|
Configure an interface to send only RIP version 1 packets.
|
ip rip send version 2
|
Configure an interface to send only RIP version 2 packets.
|
ip rip send version 1 2
|
Configure an interface to send only RIP version 1 and version 2 packets.
|
HOW TO READ ROUTER/LINK STATUS:
Status of router and links can be easily determined by power LED of router and link LED of each interface (if any). However, you may find a transceiver connected to an AUI port looks like the following:
When this transceiver is correctly connected, the “POWER” LED should light. Similarly, the “LINK” and “POLARITY” LEDs should light when you inserted the cable into the RJ45 socket on the transceiver. (Note that to get this result; the other end of the cable should be connected to some other devices as well.) If these LEDs are not light, you probably have problems with the link (cable).
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.
This password overrides the enable password and is encypted within the config file |
Router(config)#enable secret peter
|
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 interface
|
Router(config-if)bandwidth 64
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 mask of 255.255.255.0, the next hop is 172.16.2.1, at a cost of 5 hops
|
Router(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.1 5
|
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 displayed matches
|
show access-lists
|
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 COPY COMMANDS:
Requirement
|
Cisco Command
|
Save the current configuration from DRAM to NVRAM
|
copy running-config startup-config
|
Merge NVRAM configuration to DRAM
|
copy startup-config running-config
|
Copy DRAM configuration to a TFTP server
|
copy runing-config tftp
|
Merge TFTP configuration with current router configuration held in DRAM
|
copy tftp runing-config
|
Backup the IOS onto a TFTP server
|
copy flash tftp
|
Upgrade the router IOS from a TFTP server
|
copy tftp flash
|
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
|
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
|
Recall next command
|
down arrow or
|
Suspend or abort
| |
Refresh screen output
| |
Compleat Command
|
TAB
|
FOR MORE INF4:
- http://www.cisco.com/en/US/docs/routers/access/500/520/software/configuration/guide/520scg_basic.pdf
This Article Written Author By: Premakumar Thevathasan. CCNA, CCNP, CCIP, MCSE, MCSA, MCSA - MSG, CIW Security Analyst, CompTIA Certified A+.
No comments:
Post a Comment