cisco routers

The network router is quickly evolving from a device dedicated to connecting disparate networks to an integrated services device capable of multiple functions beyond routing. Cisco customers are increasingly deploying integrated services routers, or sophisticated network routers that can deliver voice, video, data and Internet access, wireless, and other applications

Getting started with Cisco
Initially you will probably configure your router from a terminal. If the router is already configured and at least one port is configured with an IP address, and it has a physical connection to the network, you might be able to telnet to the router and configure it across the network. If it is not already configured, then you will have to directly connect to it with a terminal and a serial cable. With any Windows box you can use Hyperterminal to easily connect to the router. Plug a serial cable into a serial (COM) port on the PC and the other end into the console port on the Cisco router. Start Hyperterminal, tell it which COM port to use and click OK. Set the speed of the connection to 9600 baud and click OK. If the router is not on, turn it on.

If you wish to configure the router from a Linux box, either Seyon or Minicom should work. At least one of them, and maybe both, will come with your Linux distribution.

Often you will need to hit the Enter key to see the prompt from the router. If it is unconfigured it will look like this:

Router>
If it has been previously configured with a hostname, it will look like this:

hostname of router>
If you have just turned on the router, after it boots it will ask you if you wish to begin initial configuration. Say no. If you say yes, it will put you in the menu interface. Say no.

2.1 Modes
The Cisco IOS command-line interface is organized around the idea of modes. You move in and out of several different modes while configuring a router, and which mode you are in determines what commands you can use. Each mode has a set of commands available in that mode, and some of these commands are only available in that mode. In any mode, typing a question mark will display a list of the commands available in that mode.

Router>?
2.2 Unprivileged and privileged modes
When you first connect to the router and provide the password (if necessary), you enter EXEC mode, the first mode in which you can issue commands from the command-line. From here you can use such unprivileged commands as ping, telnet, and rlogin. You can also use some of the show commands to obtain information about the system. In unprivileged mode you use commands like, show version to display the version of the IOS the router is running. Typing show ? will diplay all the show commands available in the mode you are presently in.

Router>show ?
You must enter privileged mode to configure the router. You do this by using the command enable. Privileged mode will usually be password protected unless the router is unconfigured. You have the option of not password protecting privileged mode, but it is HIGHLY recommended that you do. When you issue the command enable and provide the password, you will enter privileged mode.

To help the user keep track of what mode they are in, the command-line prompt changes each time you enter a different mode. When you switch from unprivileged mode to privileged mode, the prompt changes from:

Router>
to

Router#
This would probably not be a big deal if there were just two modes. There are, in fact, numerous modes, and this feature is probably indispensable. Pay close attention to the prompt at all times.

Within privileged mode there are many sub-modes. In this document I do not closely follow Cisco terminology for this hierarchy of modes. I think that my explanation is clearer, frankly. Cisco describes two modes, unprivileged and privileged, and then a hierarchy of commands used in privileged mode. I reason that it is much clearer to understand if you just consider there to be many sub-modes of privileged mode, which I will also call parent mode. Once you enter privileged mode (parent mode) the prompt ends with a pound sign (#). There are numerous modes you can enter only after entering privileged mode. Each of these modes has a prompt of the form:

Router(arguments)#
They still all end with the pound sign. They are subsumed within privileged mode. Many of these modes have sub-modes of their own. Once you enter priliged mode, you have access to all the configuration information and options the IOS provides, either directly from the parent mode, or from one of its submodes.

Cisco Router Configuration

Cisco Inter-network Operating System:

Cisco IOS Modes of Operation

The Cisco IOS software provides access to several different command modes.
Each command mode provides a different group of related commands.

For security purposes, 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.

The following table describes some of the most commonly used modes, how to
enter the modes, and the resulting prompts. The prompt helps you identify which
mode you are in and, therefore, which commands are available to you


Prompt
Usage How to Enter the
Mode of
Mode
Operation
First level accessed. Router>
User EXEC Change terminal
settings on a temporary
basis, perform basic
tests, and list system
information.
Router#
From user EXEC
Privileged EXEC System administration,
mode, enter enable
set operating
password command
parameters.
Router(config)#
From privileged
Global Config Modify configuration that
EXEC, enter
affect the system as a
configure terminal.
whole.
Router(config-if)#
From global mode,
Interface Config Modify the operation of
enter interface type
an interface.
number.
Prompted dialog
From privileged EXEC
Setup Create the initial
mode, enter
configuration.
command setup.



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.

Note:
Almost every configuration command also has a no form. In general, use the no
form to disable a feature or function. Use the command without the keyword no
to re-enable a disabled feature or to enable a feature that is disabled by default.
For example, IP routing is enabled by default. To disable IP routing, enter the no
ip routing command and enter ip routing to re-enable it.
Getting Help

In any command mode, you can get a list of available commands by entering a
question mark (?).
Router>?

To obtain a list of commands that begin with a particular character sequence,
type in those characters followed immediately by the question mark (?).

Router#co?
configure connect copy

To list keywords or arguments, enter a question mark in place of a keyword or
argument. Include a space before the question mark.

Router#configure ?
memory Configure from NV memory
network Configure from a TFTP network host
terminal Configure from the terminal

You can also abbreviate commands and keywords by entering just enough
characters to make the command unique from other commands. For example,
you can abbreviate the show command to sh.
Configuration Files

Any time you make changes to the router configuration, you must save the
changes to memory because if you do not they will be lost if there is a system
reload or power outage. There are two types of configuration files: the running
(current operating) configuration and the startup configuration.

Use the following privileged mode commands to work with configuration files.
• configure terminal – modify the running configuration manually
from the terminal.
• show running-config – display the running configuration.
• show startup-config – display the startup configuration.
• copy running-config startup-config – copy the running
configuration to the startup configuration.
• copy startup-config running-config – copy the startup
configuration to the running configuration.
• erase startup-config – erase the startup-configuration in NVRAM.
• copy tftp running-config – load a configuration file stored on a
Trivial File Transfer Protocol (TFTP) server into the running
configuration.
• copy running-config tftp – store the running configuration on a
TFTP server.
IP Address Configuration

Take the following steps to configure the IP address of an interface.

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 interface type slot/port (for Cisco 7000 series) or interface
type port (for Cisco 2500 series) to enter the interface configuration mode.
Example:
Router (config)#interface ethernet 0/1

Step 4: Enter the IP address and subnet mask of the interface using the ip
address ipaddress subnetmask command.
Example,
Router (config-if)#ip address 192.168.10.1 255.255.255.0

Step 5: Exit the configuration mode by pressing Ctrl-Z
Router(config-if)#[Ctrl-Z]


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

Other 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.
Configure an interface to send only RIP
ip rip send version 1
version 1 and version 2 packets.
2


To control how packets received from an interface are processed, use one of the
following commands:



Command Purpose
ip rip receive version 1 Configure an interface to accept only
RIP version 1 packets.
ip rip receive version 2 Configure an interface to accept only
RIP version 2 packets
Configure an interface to accept only
ip rip receive version 1
RIP version 1 or 2 packets.
2


• Enable or Disable Split Horizon

Use one of the following commands in interface configuration mode:


Command Purpose

ip split-horizon Enable split horizon.

no ip split-horizon Disable split horizon.



Open Shortest Path First (OSPF)

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 ospf command and follow by the process-id.
Router(config)#router ospf process-id

Pick the process-id which is not being used. To determine what ids
are being used, issue the show process command.
Router(config)#show process

Step 4: Add the network number, mask and area-id
Router(config-router)#network network-number mask area area-id

The network-number identifies the network using OSPF. The mask tells which
bits to use from the network-number, and the area-id is used for determining
areas in an OSPF configuration.

Example:
Router(config-router)#network 192.168.10.0 255.255.255.0 area
0.0.0.0

Repeat this step for all the network numbers.

To turn off OSPF, use the following command.
Router(config)#no router ospf process-id

Other useful commands

• Configure OSPF Interface Parameters
You are not required to alter any of these parameters, but some interface
parameters must be consistent across all routers in an attached network.
In interface configuration mode, specify any of the following:

Command Purpose
ip ospf cost cost Explicitly specify the cost of sending a
packet on an OSPF interface.
Specify the number of seconds between
ip ospf retransmit-interval
link state advertisement retransmissions
seconds
for adjacencies belonging to an OSPF
interface.
Set the estimated number of seconds it
ip ospf transmit-delay
takes to transmit a link state update
seconds
packet on an OSPF interface.
ip ospf priority number Set router priority to help determine the
OSPF designated router for a network.
Specify the length of time, in seconds,
ip ospf hello-interval
between the hello packets that a router
seconds
sends on an OSPF interface.
Set the number of seconds that a
ip ospf dead-interval
router’s hello packets must not have
seconds
been seen before its neighbors declare
the OSPF router down.
Assign a specific password to be used
ip ospf authentication-key
by neighboring OSPF routers on a
password
network segment that is using OSPF’s
simple password authentication.


Interior Gateway Routing Protocol (IGRP)

• Create the IGRP Routing Process
To create the IGRP routing process, use the following required commands
starting in global configuration mode.



Step Command Purpose
Enable an IGRP routing process, which
1 router igrp
place you in router configuration mode.
autonomous-system
Associate networks with an IGRP
2 network network-
routing process.
number


• Disable Holddown
The holddown mechanism is used to help avoid routing loop in the network, but
has the effect of increasing the topology convergence time.

To disable holddowns with IGRP, use the following command in router
configuration mode. All devices in an IGRP autonomous system must be
consistent in their use of holddowns.

Command Purpose
No metric holddown Disable the IGRP holddown
period.

• Enforce a Maximum Network Diameter
Define a maximum diameter to the IGRP network. Routes whose hop counts
exceed this diameter are not advertised. The default maximum diameter is 100
hops. The maximum diameter is 255 hops.

Use the following command in router configuration mode.

Command Purpose
Configure the maximum network
metric maximum-hops
diameter.
hops

• To turn off IGRP, use the following command.
Router(config)#no router igrp autonomous-system


Border Gateway Protocol (BGP)

• Enable BGP Routing
Use the following commands in global configuration mode.

Step Command Purpose
Enable a BGP routing
1 router bgp autonomous-
process, which places you in
system
router configuration mode.
Flag a network as local to this
2 network network-number
[mask network-mask] [route-
autonomous system and enter
map route-map-name]
it to the BGP table.

• Configure BGP Neighbors
BGP must completely understand the relationships it has with its neighbors.

Command Purpose
Specify a BGP neighbor.
neighbor {ip-address | peer-
group-name} remote-as number

• Reset BGP Connections
Use either of the following commands in EXEC mode to reset BGP connections

Command Purpose
clear ip bgp address Reset a particular BGP
connection.
clear ip bgp * Reset all BGP connections.


• To turn off BGP, use the following command.
Router(config)#no router bgp autonomous-system

اعلان