Introduction to Cisco Router
Introduction to the Cisco IOS
The Cisco IOS (Internetwork Operating System) is a command-line interface used by nearly all current Cisco routers and Catalyst switches. The IOS provides the mechanism to configure all Layer 2 and Layer 3 functions on Cisco devices.
The IOS is structured into several modes, which contain sets of commands specific to the function of that mode. Access to a specific mode (and specific commands) is governed by privilege levels. (Both modes and privilege levels are covered in great detail in this guide).
The following is a representation of the IOS command-line interface, with an example command:
Router# show startup-config
1.IOS Version Numbers
The latest version of the IOS (as of this writing) is 12.4(11)T. To view the
IOS version of your Cisco device:
Router# show version IOS version of your Cisco device:
a) Replacing the existing Flash stick
The IOS .bin file stored in flash follows a specific naming convention. Observe the following IOS image:
c2600-ik9s-mz.121-3.T.bin b) Via a TFTP server
c) Via Xmodem
d) Via a PCMCIA slot (not supported by all Cisco devices)
c) Via Xmodem
d) Via a PCMCIA slot (not supported by all Cisco devices)
The IOS supports a wide variety of feature sets. The following is a list of common feature sets (and is by no means comprehensive):
a) isb) ipbase
c) ipvoice
d) advsecurityk9
e) advipservicesk9
f) ik9s
g) jk9s
h) io3
i) bin
c) ipvoice
d) advsecurityk9
e) advipservicesk9
f) ik9s
g) jk9s
h) io3
i) bin
As stated earlier, the Cisco IOS is comprised of several modes, each of which contains a set of commands specific to the function of that mode.
a) By default, the first mode we enter when logging into a Cisco device is User EXEC mode. User mode appends a “>” after the device hostname:
Router>
Router>
No configuration can be changed or viewed from User mode. Only basic status information can be viewed from this mode.
b) Privileged EXEC mode allows all configuration files, settings, and status information to be viewed. Privileged mode appends a “#” after the device hostname:
Router#
Router> enable
Router#
Router# disable
Router>
Router(config)#
Router# configure terminal
Router(config)#
Router(config)# exit
Router#
As its name implies, Global Configuration mode allows parameters that globally affect the device to be changed. Additionally, Global Configuration mode is sectioned into several sub-modes dedicated for specific functions. Among the most common sub-modes are the following:
a) Interface Configuration mode - Router(config-if)#
b) Line Configuration mode - Router(config-line)#
c) Router Configuration mode - Router(config-router)#
Router(config)# interface ethernet 0
Router(config-if)#
Router(config-if)#
Router(config)# line console 0
Router(config-line)#
Router(config)# line vty 0 4
Router(config-line)#
Remember that the numbering for both interfaces and lines begins with “0.”
Router Configuration mode - Router Configuration mode is used to configure dynamic routing protocols, such as RIP.
Shortcuts are allowed on the IOS command-line, as long as the truncated command is not ambiguous. For example, observe the following commands:
Router# clearRouter# clock
Router# configure
Router# connect
Router# copy
Router# debug
Router# co
% Ambiguous command: “co”
Router# clcok
^
% Invalid input detected at “^” marker
3.Keyboard Shortcuts
Several hotkeys exist to simplify using the IOS interface:
CTRL-B (or Left-Arrow) Moves cursor back one character
CTRL-F (or Right-Arrow) Moves cursor forward one character
CTRL-A Moves cursor to beginning of a line.
CTRL-E Moves cursor to end of a line
ESC-B Moves cursor back one word
ESC-F Moves cursor forward one word
CTRL-P (or Up-Arrow) Returns previous command(s) from history buffer
CTRL-N (or Down-Arrow) Returns next command from history buffer
CTRL-Z Exits out of the current mode
TAB Finishes an incomplete command (assuming it is
not ambiguous)
4.Terminal History Buffer
The Cisco IOS keeps a history of previously entered commands. By default, this history buffer stores the previous 10 commands entered. To view the terminal history buffer:
RouterA# show history
enableconfig t
hostname RouterA
exit
show history
The Up-Arrow key (or CTRL-P) allows you to scroll through previously entered commands. To scroll back down the list, use the Down-Arrow key (or CTRL-N).
To adjust the number of commands the history buffer stores (range 0-256):
RouterA# terminal history size 30
5.Enable Passwords
The enable password protects a router’s Privileged mode. This password can be set or changed from Global Configuration mode:
Router(config)# enable password MYPASSWORD
Router(config)# enable secret MYPASSWORD2
The enable password command sets an unencrypted password intended for legacy systems that do not support encryption. It is no longer widely used. Router(config)# enable secret MYPASSWORD2
6.Line Passwords and Configuration
Passwords can additionally be configured on router lines, such as telnet (vty), console, and auxiliary ports. To change the password for a console port and all telnet ports:
Passwords can additionally be configured on router lines, such as telnet (vty), console, and auxiliary ports. To change the password for a console port and all telnet ports:
Router(config)# line console 0
Router(config-line)# login
Router(config-line)# password cisco1234
By default, line passwords are stored in clear-text in configuration files. To ensure these passwords are encrypted in all configuration files:
Router(config)# service password–encryption Router(config-line)# login
Router(config-line)# password cisco1234
Router(config)# line vty 0 4
Router(config-line)# login
Router(config-line)# password cisco1234
Router(config-line)# exec-timeout 0 0
Router(config-line)# logging synchronous
Router(config-line)# exec-timeout 0 0
Router(config-line)# logging synchronous
Router(config-line)# login
Router(config-line)# password cisco1234
Router(config-line)# logging synchronous
Router(config-line)# logging synchronous
The exec-timeout 0 0 command is optional, and disables the automatic timeout of your connection. The two zeroes represent the timeout value in minutes and seconds, respectively. Thus, to set a timeout for 2 minutes and 30 seconds:
Router(config-line)# exec-timeout 2 30
The logging synchronous command is also optional, and prevents system messages from interrupting your command prompt.
7.Router Interfaces
To configure an interface, one must specify both the type of interface, and the interface number (which always begins at “0”). Thus, to configure the first Ethernet interface on a router:
Router(config)# interface ethernet 0
Router(config-if)#
Router(config-if)#
Certain router families (such as the 3600 series) are modular, and have multiple “slots” for interfaces. All commands must reflect both the module number and the interface number, formatted as: module/interface
Thus, to configure the third Fast Ethernet interface off of the first module:
Router(config)# interface fastethernet 0/2
Router(config-if)#
By default, all router interfaces are administratively shutdown. To take an interface out of an administratively shutdown state:
Router(config)# interface fa 0/0
Router(config-if)# no shutdown
Router(config)# interface fa 0/0
Router(config-if)# no shutdown
Notice the use of fa as a shortcut for fastethernet in the above example. To manually force an interface into a shutdown state:
Router(config-if)# shutdown
Router(config-if)# shutdown
To assign an IP address to an interface:
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# ip address 192.168.1.1 255.255.255.0
An additional secondary IP Address can be assigned to an interface:
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# ip address 192.168.1.2 255.255.255.0 secondary
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# ip address 192.168.1.2 255.255.255.0 secondary
Serial interfaces require special consideration. The DCE (Data Communication Equipment) side of a serial connection must set the speed, or clock rate, for the DTE (Data Terminal Equipment) side. Clock rate is measured in BPS (bits-per-second).
To set the clock rate, if you are the DCE side of a serial connection:
Router(config)# interface serial 0
Router(config-if)# clock rate 64000
Note:- The clock rate serves to synchronize the receiver on the other side of the link. Each clock pulse signals the transmission of a bit. Note that it is mainly used in lab setups.
When we set the clock rate for a serial interface, we are setting the speed of the interface, in other words, the bandwidth (bandwidth meaning rate of data transfer). When using this command it's in the form of bits: 64000 bits = 64 kb.
8. Managing Configuration Files
Cisco IOS devices employ two distinct configuration files
- running-config – stored in RAM, contains the active configuration
- startup-config – stored in NVRAM (or flash), contains the saved
configuration
Any configuration change made to an IOS device is made to the runningconfig. Because the running-config file is stored in RAM, the contents of this file will be lost during a power-cycle. Thus, we must save the contents of the running-config to the startup-config file. We accomplish this by using the copy command from Privileged mode:
Router# copy running-config startup-config
The copy command follows a very specific logic: copy [from] [to]. Thus, if we wanted to copy the contents of the startup-config file to running-config:
Router# copy startup-config running-config
We can use shortcuts to simplify the above commands:
Router# copy run start
Router# copy start run
To view the contents of the running-config and startup-config files:
Router# show run
Router# show start
To delete the contents of the startup-config file:
Router# erase start
If the router is power-cycled after erasing the startup-config file, the router will enter Initial Configuration Mode (sometimes called Setup Mode). This mode is a series of interactive questions intended for quick reconfiguration of the router.
Initial Configuration Mode can be exited by typing CTRL-C.
9.Some useful commands
-Piping Commands
In newer versions of the Cisco IOS, the output of show commands can be filtered to remove irrelevant lines, through the use of the pipe “ | ” character. The following command will display the contents of the startup-config, beginning with the first line containing the text ethernet:
Router# show startup | begin ethernet
Router# show startup | exclude ethernet
The following command will include all lines containing the text ethernet:
Router# show startup | include ethernet
Router(config)# hostname MyRouter
MyRouter(config)# hostname MyRouter
To assign a description to an interface for documentation purposes:
Router(config)# interface serial 0
Router(config-if)# description SBC T1 connection to India
Router# show interfaces
device:
Router(config)# banner motd #
The # symbol is used as a delimiter to indicate the beginning and end of the banner. Any character can be used as a delimiter.
-The Configuration Register
The configuration register (config-register) is a hexadecimal value that controls various aspects of how a router boots, including:a) Baud Rate
b) Boot Messages (enable/disable)
c) Break (disable/ignore)
d) Flash (read-only, read-write)
b) Boot Messages (enable/disable)
c) Break (disable/ignore)
d) Flash (read-only, read-write)
e) NVRAM (use startup-config/bypass startup-config)
The default config-register is 0x2102. To view your router’s current config-register setting:
Router# show version
Router# show version
Common config-register settings include:
Remember, 0x2102 is the default config-register value on Cisco routers. In order to upgrade the Cisco IOS, the config-register must be changed to 0x2101, so that the Flash memory becomes writeable.
Router(config)# config-register 0x2142
This configuration change does not take affect until the next reboot.
10.Backing up and Restoring the Cisco IOS
To load an IOS file from a TFTP server to the router’s flash:
Router# copy tftp flash
The process is nearly identical to copy a startup-configuration file to or from a router’s NVRAM:
Router# copy startup tftp
Router# copy tftp startup
11.CDP (Cisco Discovery Protocol)
CDP is a Cisco propriety protocol used to collect information about locally attached Cisco switches and routers. CDP is enabled by default on all IOS enabled routers and switches, and sends out updates every 60 seconds.The Cisco IOS is stored in flash. Multiple IOS files can be loaded into flash, assuming there is enough free space. WE can view available free space, and the name of any file(s) in flash, by typing
Router# show flash
To backup the IOS, a TFTP server is required. The TFTP server must have IP connectivity to the router.
To backup the IOS file from the router’s flash to the TFTP server:
Router# copy flash tftp
To backup the IOS file from the router’s flash to the TFTP server:
Router# copy flash tftp
We will be prompted for the following information:
a) Address of remote host (the TFTP server)
b) Source file name (the name of the file in flash)
c) Destination file name
b) Source file name (the name of the file in flash)
c) Destination file name
To load an IOS file from a TFTP server to the router’s flash:
Router# copy tftp flash
The process is nearly identical to copy a startup-configuration file to or from a router’s NVRAM:
Router# copy startup tftp
Router# copy tftp startup
CDP will provide the following information about directly connected neighbors:
b) Local Interface – interface that remote router/switch is directly connected to
c) Holdtime – amount of time before remote device information is purged from CDP table
d) Capability – Type of remote device (router, switch, host)
e) Platform – Model of remote device
Router# show cdp
To display neighbor information:
Router# show cdp neighbors
To display traffic statistics:
Router# sh cdp traffic
To display port and interface information:
Router# sh cdp interface
To disable CDP on an interface:
Router(config-if)# no cdp enable
To globally disable CDP:
Router(config)# no cdp run
12.Telnet
It is possible to telnet from a router into a remote device, using either the hostname or IP address of the remote device:
Router# telnet Router2
Router# telnet 172.17.1.2
It is possible to telnet from a router into a remote device, using either the hostname or IP address of the remote device:
Router# telnet Router2
Router# telnet 172.17.1.2
To exit a telnet session:
Router2# exit
To return to the router we telnetted from, without exiting the session:
a) Hold CTRL+SHIFT+6 and then release
b) Type the character x
To view all open telnet sessions:
Router# show sessions
To view all open telnet sessions:
Router# show sessions
13.Privilege Levels
IOS devices have a total of 16 privilege levels, numbered 0 through 15. User Exec mode is privilege level 1. Privileged Exec mode is privilege level 15.
We can create a custom Privilege level, including the commands users are allowed to input at that mode:IOS devices have a total of 16 privilege levels, numbered 0 through 15. User Exec mode is privilege level 1. Privileged Exec mode is privilege level 15.
Router(config)# privilege exec all level 3 show interface
Router(config)# privilege exec all level 3 show ip route
Router(config)# privilege exec all level 3 show reload
To then enter that privilege level from User Mode:
Router> enable 3
Router> enable 3
To view the processor load on a Cisco Router:
Router# show processes cpu
15.IOS Troubleshooting Commands
The debug command is a powerful tool to view real-time information and events occurring on an IOS device. As with the show command, there are a multitude of arguments for the debug command. An example debug command is as follows:
Router# debug ip rip events
To disable a specific debugging command, simply preprend the word no in front of the command:
Router# no debug ip rip events
To enable all possible debugging options on an IOS device:
Router# debug all
The show tech-support command prints to screen every configuration file, and the output of several important show commands. This can be redirected to a file and either viewed or sent to Cisco for troubleshooting purposes:
Router# show tech-support
Router# show tech-support
Router# debug ip rip events
Router# no debug ip rip events
Router# debug all
Using the debug all command is not recommended, as it will critically impair router performance.
To disable all possible debugging options on an IOS device:
Router# no debug all
Router# no debug all
Introduction to Router
1.Router
Router is a internetworking device which connect the multiple device with geographical.
Router is a device which provides communication between two or more network. Router finds the the best path (route).
2.Function of Router
1. Internetwork router
2. Best Path selection
3. Packet switching
4. Packet forwarding
3.Router Interface
1. Ethernet:- It is a LAN interface some of the router's have RJ45 port for 10Base-T and some have other 15 pins female port which is called (Attachment unit interface)
2. AUI - Attachment unit interface
It is a 15 Pin female interface to connect the LAN. Transceiver is used for connecting AUI port to LAN, Hub/Switch.
3. Serial Port
IT is a 60 pin female interface for leased line connection. Serial port is used for WAN connectivity. Smart serial port is 26 pins V.35 cable used to connect between leased line modem of serial router.
4. BRI/PRI - Basic Rate interface
It is RJ45 WAN interface for ISDN line. It is known as remote administrative port.
This is used for remote administrative/configuration. In it console/rollover cable is used.
5. Console Port- It is a RJ45 port used to configure router for first time. It is known as local administrative port. This port is used for initial configuration, password recovery and advanced trouble shooting. It is most important port for router.
6. Auxiallary Port- It is RJ45 port which is used to connect or used for remote access administrator It is known as remote administrative port. In this Rollover and Console cable is used..
7. Asyn Port -
4.Cisco Hierarchical Model
There are three layer in cisco hierarchical model
(i) Access layer
(ii) Distribution layer
(iii) Core layer
Access layer - Router which are used at branch office known as access layer or [ROBO] Remote office branch office. Access layer series [700_ _ _ _ _2500]
Distribution layer - Routers which are used at head office are known as distribution layer/Enterprises layer.
Distribution layer [2600_ _ _ _ _ _ _5000]
Core layer - Router which are used by internet service provide are known as core on backbone routers.
Core layer series [7000_ _ _ _ _ _12000 or above]
5.Router Categories
Modular Router - These type of routers have upgradable slots and the number of ports can be increased just by adding cards in the slots.
Modular Router Series 2600 - 12000 or Above
Non Modular Router - These types of routers have fixed numbers of ports.
Non Modular Router Series 700-2500
6.Router Memory Element
1. Boot ROM - It stores the MINI IOS [Internetworking Operating System] image with limited capabilites and post routines and core level OS for maintenance.
A boot strap programe's is located here. It is same as BIOS [Basic Input Output System] of PC.
2. Flash - It is an erasable programmable ROM chip, that holds most the [IOS] image. It maintains everything when router is turned off.
Note:- IOS is stored here. IOS is command line interface.
3. Non-volatile memory - It is a rewritable memory that holds router configuration files NVRAM retains the information whenever router is reboot once configuration is saved.
Note:- Router configuration saved in NVRAM and this saved configuration is called as 'startup configuration'. NVRAM similar to hard disk. It is also known as permanent storage.
4. RAM (Random Access Memory) - RAM holds IOS running IOS configuration RAM is a volatile memory and looses its information when the router is turned off. The configuration present in RAM is called running configuration. It is also known as temporary storage.
IOS Version
7.Working mode of Cisco Router
1. User Mode [Default mode] - User mode is the first default mode. It means that whenever router boots successfully. It land into the user mode.
Note:- Router cannot be configured from this mode. It is only for monitoring purpose.
User Mode is the first mode a user has access to after logging into the router. This mode allows the user to execute only the basic commands such as those that show the system's status. The cannot be configured or restarted from this mode. The usermode can be identified by Router>
2. Privileged mode - It is the administrative mode. We can check whether setting and configuration which have implemented on router.
Privileged mode allow the users to view the system configuration, restart the system and enter the router configuration mode. Privileged mode also allows all the commands that are the available in the user mode. Privileged mode can be identified by the Router# From the usermode, a user can change to privileged mode by enter the >Enable command.
3. Global configuration mode - From this mode we can configure router interface and settings, implements security level, authentication, password, Telnet etc.
Global configuration mode allows the user to modify the running system configuration. From the privileged mode a user can move to configuration mode by running the command #configure terminal
Global configuration mode can be identified by Router(config)#
4. ROMMAN (ROM Mon) MODE - If our router or access server does not find a valid system image to load, the system will read only memory (ROM) monitor mode. ROM Monitor (ROMMON) mode can also be accessed by interrupting the boot sequence during startup.
ROMMON (ROM Monitor) Mode can be identified by the ROMMON1>
5. Line configuration mode:-
6. Router mode :-
7. Subinterface mode:-
8.Routing
It is a process which transfer the data one router to another router.
-Types of Routing
1. Static Routing
2. Dynamic Routing
3. Default Routing
Static Routing - This static routing entry is created manually by the network administrator in the routing table of a router. All the routers path is predetermined in the network by the network designer which entered line by line in the routing table of each other. Once all the router in the internetwork have been programmed with the static routes they do not need to try to automatically discover new routes.
We can configure route by manually into routing table. Static routing is used in small network, not in large network.
Dynamic Routing - Dynamic routing is configured on network where the router can learn the changes in the network topology automatically without on administrator intervention in configuring routes on the router.
We can configure route by protocol. Like RIP, IGRP, EIGRP, OSPF, BGP, IS-IS. Dynamic routing is used in large network.
Default Routing - Default routing is defined as the route that is not present in the network. Default routing is possible with the routers that have only one exit path from network.
9.Routing Table
A routing table contains series of entries called routes that the information about location of different network ID in the internetwork.
It is a database which stores the information of about the network or network path.
Use #show ip route command to check the route.
Loops-
Split Horizon - It is a method of preventing a routing loop in a network. The basic principal is simple information about the routing for a particular packet is never sent back in the direction from which it was received.
Routing Loops - A routing loop is a serious network problem which happens when a data packet is continuously routed through the same routers over and over. The data packets continue to be routed within the network in an endless circle.
Types of Protocol
1. Routing Protocol :- Routing protocols are the set of guideliness that determine the appropriate path the packet should take to forward data.
The routing protocol play a major role by automatically updating the table whenever the change the network.
These protocol are those protocol which defines the best route for the data transmission and update routing table. Like:- RIP, IGRP, EIGRP OSPF and IS-IS.
2. Routed Protocol :- These protocols are those protocol which define the routing and addressing.
Like : - IP, IPX and Apple Talk
Types of Routing Protocol
1. Interior Routing Protocol :- These are the protocol that designed for the use of inside single AS.
Like:- RIP, IGRP, EIGRP OSPF and IS-IS.
2. Exterior Routing Protocol :- These are the protocol that designed for the use of between and different AS. Like :- BGP
Types of Interior Routing Protocol
1. Distance Vector Protocol - Where the router communicate with each other and update the network information in the routing table. RIP and IGRP are the example of distance vector routing protocol. These protocol update neighbour's routing table after a particular time.
a) RIP update timer 30 sec
b) IGRP update timer 90 sec
2. Link State Protocol :- In the link-state routing, the router which communicating share the status of the links on the network. This includes a connection type , speed of the links and metric cost. This way protocol know the state or map of the entire network. The protocol send link state advertisement (LSA) that contain routing information and details of the router that send the information. LSA are generated when there are some changes in the network. Eg:- OSPF and IS-IS
3. Hybrid Protocol :- It is the combination of Distance Vector Routing Protocol and Link State Routing Protocol. It can look at bandwidth, load, delay, reliability and hop count to make a decision on what is the best route. Eg:- EIGRP
Serial Port and Cable
Serial ports like USB and RS-232 are for connecting peripheral devices directly to the computer.
In computer networking, a serial port enables external modems to connect to a PC or network router via a serial cable. The term 'serial' signifies that data sent in one direction always travels over a single wire within the cable.
A serial cable is a cable that used to transfer information between two devices using a serial communication protocol. The form of connectors depends on the particular serial port used. A cable wired for connecting two DTEs directly is known as a null modem cable.
Fastethernet Port and Cable
DCE

Comments
Post a Comment