Introduction to CISCO IOS
Almost all current Cisco routers and switches run Cisco IOS (Internetwork Operating System),The routing and switching software in Cisco devices.
Cisco IOS command-line interface (CLI) is the text-based user interface to a Cisco device forconfiguring, administering, and managing the Cisco device.
CLI can be accessed through:
i) Console with a rollover cable and terminal emulator application. [line console 0]
ii) AUX through a dialup device such as modem for out-of-band management. The modem
is connected with a straight-through cable to the auxiliary port. [line aux 0]
iii) In-band management through the network via Telnet or SSH. [line vty 0 4]
Below lists the main Cisco IOS modes:
User EXEC mode
Least privileges and limited access. Only provides a set of nondestructive
show commands that allow examination of configuration.
Privileged mode
More show commands, and limited configuration commands.
Configuration mode
Configuration commands are being entered in this mode. Unable to check status with the series of show commands. Sub-divided into some child modes, eg: interface configuration mode, line configuration mode, router configuration mode, etc. Commands entered in this mode update the active or running
configuration immediately after the Enter button is pressed.Configuration commands can be divided into global configuration commands and subcommands, eg: interface subcommand,subinterface subcommand, controller subcommand, line subcommand,
Console Connectivity
•
Connect a rollover cable to the router console port
(RJ-45 connector).
•
Connect the other end of the rollover cable to
the RJ-45 to DB-9 converter
•
Attach the female DB-9 converter to a PC Serial Port.
•
Open emulation software on the PC.
WINDOWS
•
Start à Programs à
Accessories à Communications à HyperTerminal à
HyperTerminal.
•
Give the Connection Name & Select Any Icon
•
Select Serial (Com) Port where Router is Connected.
•
In Port Settings à Click on Restore
Defaults
LINUX
•
# minicom -s
To
configure Cisco Router IOS commands are used. There are different IOS modes for
various configurations.
The
IOS modes are:
1.
User Mode:
Router>
Router
is
the default hostname and can be changed, ‘>’ symbol implies “User
Mode”.
This
is the first mode user interacts with the IOS. It is a restricted mode and
support only a very few basic commands.
2.
Privilege Mode
Router#
‘#’
symbol implies Privilege Mode”. This mode has full administrative rights. This
mode is generally used for advance troubleshooting using ‘show’ and ‘debug’
command. This is also called as the EXEC mode.
3.
Global Configuration Mode
Router(config)#
‘(config)#’
symbol implies “Global Configuration Mode”. Configuration of the Router starts
from this mode. In this mode configurations that affect the complete router are
given. Example, hostname of the router.
4.
Interface Configuration Mode
Router(config-if)#
‘(config-if)#’
symbol implies “Interface Configuration Mode”. This mode is used to configure a
specific interface.
The
different types of interfaces are
1.
LAN interface
a. Ethernet
b. Fastethernet
c.
Gigabitethernet
2.
WAN interface
a.
Serial
www.zoomgroup.com
12
Each interface is identified by a
number. The first interface is numbered as 0 the second interface is numbered
as 1 and so on. In a modular router the number is given as ‘module
number/interface number’. Example 0/0
5.
Line Configuration Mode
Router(config-line)#
‘(config-line)#’
symbol implies “Line Configuration Mode”. This mode is used to configure
Telnet, Console and Auxiliary
6.
Router Mode
Router(config-router)#
‘(config-router)#’ symbol implies “Router Mode”.
This mode is used to advertise network under dynamic routing protocols.
Below
describes some basic Cisco IOS commands:
enable Switches from EXEC mode to Privileged mode.
disable Switches from Privileged mode back to EXEC mode.
show version Views the basic configuration of the system hardware,
software
version,
the name and source of the system boot image, etc.
configure terminal Switches
from Privileged mode to Global Configuration mode.
hostname Changes the
hostname of a Cisco device.
^Z / end / exit Exits
from the Global Configuration mode back to Privileged mode.
exit / quit Exits
from the EXEC mode.
Some special IOS CLI features are Context-Sensitive
Help with [?] and
Auto-Completion with [TAB]
can be used to display or auto-complete
the available commands or parameters.
The context-sensitive help is divided into word
help and command syntax help. word help Ex:
cl? –
Displays any command or syntax that
starts with cl.
command syntax help Ex:
clock ? – Displays
the available parameters after the clock
command.
Note:
The escape sequence for entering the ? character is Ctrl+V.
Below lists the
common IOS CLI error messages:
% Invalid input detected at ‘^’ User
issued an incorrect or invalid command.
% Ambiguous command User
used an abbreviation that did not specify enough
characters for the
IOS to determine or recognize the specific command that the user has intended
to issue.
% Incomplete command User
did not specify enough parameters.
& Unrecognized command User
issued an unavailable command.
Below shows a configuration example of some
basic Cisco IOS commands:
The clock set privileged command sets the time and
date settings on Cisco devices.
2 supportive line subcommands for console and
telnet sessions:
logging synchronous Stops
the annoying console messages from interrupting user input
and readability.
exec-timeout
{minutes} {seconds}
Configures the inactivity
timeout – automatic session logout if there is no keyboard activity. 0 min 0 sec means never expires. The default
is 10 minites and 0 seconds (exec-timeout 10 0).
Note:
no exec-timeout is
equivalent to exec-timeout 0 0.
Initial Configuration - Example
Router>
Router> enable
Router#
Router #configure terminal
Router(config)#
Router(config)#hostname
Hyderabad
configuring an interface
Hyderabad(config)#interface
Ethernet 0
Hyderabad(config-if)#
Hyderabad(config-if)#ip
address 192.168.1.1 255.255.255.0
Hyderabad(config-if)#no
shutdown
Hyderabad(config-if)#exit
Router>enable
Router#configure terminal
Enter configuration commands, one
per line. End with CNTL/Z.
Router(config)#hostname RT1
RT1(config)#end
RT1#
00:00:30: %SYS-5-CONFIG_I:
Configured from console by console
RT1#disable
RT1>quit
RT1 con0 is now available
Press RETURN to get started.
RT1#clock set 20:20:20 20 Jan 2008
00:10:10: %SYS-6-CLOCKUPDATE:
System clock has been updated from 00:10:10
UTC Mon Mar 1 1993 to 20:20:20
UTC Sun Jan 20 2008, configured from console
by console.
verification
RT1#show clock
20:20:21.520 UTC Sun Jan 20 2008