You can remotely access a Sisco IOS (Internetworking Operating System) in what is knows as an EXEC session to control a router using its CLI (Command Line Interface).

EXEC sessions are separated into a basic user EXEC level and a privileged EXEC level to run configuration and other critical commands.

Critical Cisco Router configuration commands
‘————’ is used to prefix comments in this small tutorial

Router>enable ———— enable is used to change into privileged level
Password: —————— if passwords is enabled
Router# ———————- # means we are in privileged level
Router#disable ———– switch to user EXEC level
Router>

Router>ping xxx.xxx.xxx.xxx ———— ping is supported

The show command is used to troubleshoot your Cisco router

Router#show ?—————————— display arguments
Router#show interfaces
Router#show ip protocols
Router#show ipv6 protocols
Router#show ip route
Router#show ipv6 route
Router#show ip arp
Router#show ipv6 neighbors

Router#show running-config———— display running-configuration
Router#show startup-config———— display startup-configuration stored in NVRAM

P.S. typing ‘?’ after a word directly (no space in between) such as ‘co?’ shows all command wards starting with co

The configuration mode

Router#config———————————————————– start config
Router(config)#——————————————————— inside config mode
Router(config)#hostname MyRouter—————————- change router name to MyRouter
MyRouter(config)#
MyRouter(config)#enable secret [password]—————– set password for privileged level
MyRouter(config)# no enable secret—————————- remove password

Within config mode there are three levels. These are: interface, router and line.

Interface level example

MyRouter(config)#interface FastEthernet0/1
MyRouter(config-if)#ip address 192.168.0.1 255.255.255.0
MyRouter(config-if)#ipv6 address fe80::230:1bff:fe80:b8ea/64
MyRouter(config-if)#ipv6 enable

MyRouter(config-if)#no shutdown—————— to activate interface
MyRouter(config-if)#ctrl-z—————————– ctrl-z is used to save&exit

Routing engine level example

MyRouter(config)# router rip —————– to configure RIP (Routing Information Protocol) routing engine
MyRouter(config-router)# network 192.168.4.0———— adds network 192.168.4.0 to RIP engine
MyRouter(config-router)# network 192.168.5.0———— adds network 192.168.5.0 to RIP engine
MyRouter(config-router)# exit————————————- exits back to global configuration level

MyRouter(config)#ip name-server xxx.xxx.xxx.xxx———– To specify the address of one or more name servers
MyRouter(config)# ip route 0.0.0.0 0.0.0.0 20.2.2.3———— configures a static IP route (global)

Line level (CTY, VTY, AUX, TTY/ASYNC) example

‘Lines’ on Cisco routers are physical or visual serial ports. For instance, the console (CTY) port is used to connect your computer to the router using a cable through a serial interface. This port require protection as such we should set a password for future connection attempts.

MyRouter(config)#line con 0
MyRouter(config-line)#password [password]————- set a PW for the console line
MyRouter(config-line)#login————————————– activate login/password requirement
MyRouter(config-line)#exit

VTY ports are visual ports. As such, they are used for remote access using Telnet or SSH.
The following examples demonstrate how to configure VTY ports in a Sisco router

MyRouter(config)#line vty 0 4———————————— typically there are 5 ports
MyRouter(config-line)#password [password]————- set a PW for the Virtual Terminal Line
MyRouter(config-line)#login————————————– activate login/password requirement
MyRouter(config-line)#exit

note, you may add ‘?’ to learn last line number as in the following example

MyRouter(config)#line vty 0 ?
<1-4> Last Line Number
MyRouter(config)#

An AUX port acts as a secondary console port.
TTY/ASYNC exist only if the router has an ASYNC card.

Finally, make sure your new configurations will be perminant with the following command

MyRouter# copy running-config startup-config ———— or ‘write memory’ for old IOS prior to 11.x

References:

[1] Configure lines and VTYs on Cisco routers.

http://www.techrepublic.com/blog/networking/configure-lines-and-vtys-on-cisco-routers/409

[2] Cisco IOS Command Line Interface Tutorial. http://www.cisco.com/warp/cpropub/45/tutorial.htm

Leave a Reply

*
Haider’s WebSpace
Welcome to my technical blog. This is where I write, archive and share computer related articles. Subjects vary from posting technical solutions to researching particular topics. Feel free to comment and talk IT!
Sponsored Links
My Tweets
Posts Calendar
February 2012
M T W T F S S
« Nov    
 12345
6789101112
13141516171819
20212223242526
272829