Download CISCO Modes of Operations

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Deep packet inspection wikipedia , lookup

Parallel port wikipedia , lookup

AppleTalk wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Network tap wikipedia , lookup

Computer network wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Airborne Networking wikipedia , lookup

Serial digital interface wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Transcript
National University of
Sciences & Technology
CISCO Project
Computer Networks
Ghyoor Arshad Lodi
Muhammad Fahad Shabbir
2006-NUST-BEE-109
2006-NUST-BEE-127
TABLE OF CONTENTS
Introduction
…………………………………………………………………………………………………………………… 03
Objectives
…………………………………………………………………………………………………………………… 03
Importance of Objectives
Main Section
………………………………………………………………………….……………….. 03
……………………………………………………..……………….…………………………………………… 03
CISCO IOS ………………………………………….………………………………………………….……….. 03
CISCO Modes of Operations
…………….……………………………………………………………………..……. 04
User EXEC Mode (Unprivileged)
………………………………………………………………… 04
Configuration Mode (Privileged) ………………………………………………………….. …… 04
Global Configuration Mode……………………………………….……………………………………. 05
Interface Configuration Mode
……………………………………….……………..………… 06
IP Address Configuration
………………………………………………………………………………………….
07
Routing Protocol Configuration ………………………………………………………………………………………….. 08
Routing Information Protocol (RIP)
Open Shortest Path First (OSPF)
Simulation
…………….………………………….……………
…………………………….….…………………..
08
09
…………………………………………………………………………………….…………………………….. 09
GNS3 ……………………………………………………………………….…………..………………….
Packet Tracer ………………………………………………………….……………………………….
09
12
Applications of Project ……………………………………………………………………….……………….…………….
12
Conclusion
…………………………………………………………………………………….…………………………….
13
References
…………………………………………………………………………………….……………………………
14
Page | 2
INTRODUCTION
In more than one ways, the Internet has changed the world. In order to fulfill the fast communication needs, the
modern world is dependent on the application of Interconnectivity and Internetworking. In general terms, the process of
defining a line of path, for any type of traffic such that it reaches the desired destination is called routing. In Networking
terms this traffic is in the form of data, and the electronic device through which routing is achieved is called router.
OBJECTIVES
Configuring the CISCO Router(s)
Simulation of CISCO Router Network in GNS3 environment
IMPORTANCE OF THE OBJECTIVES
Cisco Systems, Inc. is a multinational corporation which is the international leader in designing networking and
communications technology and offers a wide range of ‘application network services’. Cisco’s products cover a wide range
of networking devices such as routers, switches, servers, broadband Cable products etc.
As Cisco’s routers are widely used in the industry, the know-how of their operation and learning to configure them
according to any network’s requirement is useful for every electrical engineer. Although, the process of configuration as
defined in this project is basic in nature, any interested engineer can only further pursue his career, in research and
development, in this field by acquiring the basic knowledge required.
The GNS3 software introduced by Cisco serves as a graphical network simulator and can be used to configure many
Cisco routers. It can also be used as a complementary tool for network engineers, administrators and people wanting to
pass certifications such as CCNA, CCNP, CCIP or CCIE.
MAIN SECTION
CISCO IOS
Cisco IOS (originally Internetwork Operating System) is the software used on the vast majority of Cisco
Systems routers and current Cisco network switches. IOS consists of routing, switching, internetworking and
telecommunications functions integrated with a multitasking operating system.
Command Line Interface (CLI) is used by the Cisco IOS. There is a fixed set of multiple-word commands in CLI. The set
available can be shown by the "mode" and the privilege level of the current user. There are two basic configuration modes
in Cisco IOS:
Global configuration mode: Provides commands to change the system's configuration
Interface configuration mode: Provides commands to change the configuration of a specific interface.
All commands are assigned a privilege level, from 0 to 15, and can these commands only be accessed by users with the
necessary privilege. The commands available to each privilege level can be defined through the CLI.
Page | 3
CISCO MODES OF OPERATIONS
The following table describes some of the most commonly used modes, how to enter the modes, and the resulting
prompts. The prompt helps us to identify that currently in which mode we are and, therefore, which commands are
available.
#
Mode of
Operation
Usage
How to Enter
the
Mode
1.
User EXEC
Change terminal settings on a
temporary basis, perform basic
tests, and list system Information.
First level accessed.
2.
Privileged EXEC
System administration set operating
Parameters.
From user EXEC
mode, enter enable
password command
Router#
3.
Global Config
Modify configuration that affect the
system as a Whole.
From privileged
EXEC, enter config t.
Router(config)#
From global mode,
Enter interface, type
and number.
From privileged EXEC
mode, enter the
Command of setup.
Router(config-if)#
4.
Interface Config
Modify the operation of an interface.
5.
Setup
Create the initial Configuration.
Prompt
Router>
Prompted dialog
The Cisco IOS command-line interface is organized around the idea of modes. We move in and out of different
modes while configuring a router, and which mode we are in determines what commands we can use. Each mode has a set
of commands that are available in that mode, and some of these commands can only be accessed in that mode. In any
mode, typing a question mark will display all the commands that are available in that mode e.g.
Router>?
USER EXEC MODE (UNPRIVILEGED)
When we first connect to the router we enter the user EXEC mode which is the unprivileged mode of operation.
This is the first mode in which we can issue commands from the command-line. From here we can use
such unprivileged commands e.g. Ping. We can also use some of the show commands to obtain information about the
system. In unprivileged mode typing ‘show?’ will display all the commands available in the mode we are presently in. typing
the show version will show the version of the IOS running on the router. All the user EXEC commands are available in the
privileged EXEC commands.
CONFIGURATION MODE (PRIVILEGED)
We must enter privileged mode to configure the router. We do this by typing the command enable in the user
EXEC mode using CLI. Privileged mode will usually be password protected unless the router is un-configured. Configuration
mode has a set of sub modes that you use for modifying interface settings, routing protocol settings, line settings, and so
forth.
Page | 4
To enter configuration mode, enter the command ‘config t’ and exit by pressing ‘Ctrl-Z’.
To help the user keep track of what mode they are in, the command-line prompt changes each time we enter a different
mode. When we switch from unprivileged mode to privileged mode, the prompt changes from:
Router> to
Router#
Cisco describes two modes, unprivileged and privileged, and then a hierarchy of commands used in privileged
mode. Within privileged mode there are different sub-modes. The reason that it is much clearer to understand if you just
consider there to be many sub-modes of privileged mode, which is also call parent mode. Once we enter privileged mode
(parent mode) the prompt ends with a pound sign (#). There are numerous modes that we can enter only after entering
privileged mode. The prompt of this mode is of the form:
Router (argument) #
They still all end with the pound sign (#).Many of these modes have sub-modes. Once we enter privileged mode,
we have access to all the configuration information and options the IOS provides, either directly from the parent mode, or
from one of its sub modes.
GLOBAL CONFIGURATION MODE
To configure any feature of the router, you must enter configuration mode. Global configuration mode is the first
sub-mode of the parent mode. In the parent mode, we issue the command ‘config’ as shown below.
Router#config
Router (config) #
In configuration mode you can set options that apply system-wide, also referred to as "global configurations." For
instance, it is a good idea to name your router so that you can easily identify it. We can do this in configuration mode with
the command ‘hostname’ e.g.
Router (config) #hostname R1
R1 (config) #
As demonstrated above, when you set the name of the host with the hostname command, the prompt
immediately changes by replacing Router with R1. Another useful command issued from config mode is the command to
designate the DNS server to be used by the router:
R1 (config) #ip name-server aa.bb.cc.dd
R1 (config) #ctrl-Z
R1#
This is also where you set the password for privileged mode.
R1 (config) #enable secret ‘pakistan’
R1config) #ctrl-Z
R1#
Page | 5
Until you hit ctrl-Z (or type exit until you reach parent mode) your command has not been put into affect. You can
enter config mode, issue several different commands, and then hit ctrl-Z to activate them all. Each time you hit ctrl-Z you
return to parent mode and the prompt:
R1#
Here you use show commands to verify the results of the commands you issued in config mode. Show host
command can be used to verify the results of ip name-server.
INTERFACE CONFIGURATION
Router interfaces include both virtual interfaces and physical interfaces. The examples of physical interface
are Fast Ethernet (Fa) interfaces and serial (S) interfaces.
It is important to remember, while configuring interface ip addresses, that we may only use IP addresses assigned
by our ISP, or private addresses, unless in a lab environment which is not connected to the internet.
To enter an interface, start from the global configuration mode. Type the command interface [interface
name] to enter the given [interface name] e.g. ‘interface s0/0’. Now the prompt will be Router (config-if) #. Individual
interfaces are referred to by this convention:
Media type slot#/port#
"Media type" shows the type of media that the port is an interface for, e.g. Ethernet, Token Ring, FDDI, serial, etc.
Slot numbers are only applicable for routers that provide slots into which we can install modules. These modules contain
several different ports for a given media. The 7200 series is an example of it. These modules are even hot-swappable. We
can remove a module from a slot and replace it with a different module, without interrupting service provided by the other
modules installed in the same router. These slots are numbered on that router.
Port number refers to the ports in that module. Numbering is from left-to-right, and all numbering starts at 0, not
at one.
For example, a Cisco 7206 is a 7200 series router which has six slots. To refer to an interface that is the third port
of an Ethernet module installed in the sixth slot, it would be interface Ethernet 6/3. Therefore, to display the configuration
of that interface you use the command:
R1#show interface Ethernet 6/3
If your router does not have slots, like a 1600, then the interface name consists only of:
Media type port#
For example:
R1#show interface serial 0
Here is an example of configuring a serial port with an IP address:
R1#config
R1 (config) #interface serial 1/1
R1 (config-if) #ip address 192.168.1.2 255.255.255.0
R1 (config-if) #no shutdown
Page | 6
R1 (config-if) #ctrl-Z
R1#
Then to verify configuration:
R1#show interface serial 1/1
An interface may be correctly configured and physically connected, yet be "administratively down." In this state it
will not function. Issuing the command of ‘shutdown’ will causes an interface to be administratively down.
R1 (config) #interface serial 1/1
R1 (config-if) #shutdown
R1 (config-if) #ctrl-Z
R1#show interface serial 1/1
NO SHUTDOWN COMMAND
In the Cisco IOS, the way to reverse or delete the results of any command is to simply put no in front of it. For
instance, if we wanted to un-assign the IP address we had assigned to interface serial 1/1:
R1 (config) #interface serial 1/1
R1 (config-if) #no ip address 192.168.1.2 255.255.255.0
R1 (config-if) ctrl-Z
R1#show interface serial 1/1
IP ADDRESS CONFIGURATION
Take the following steps to configure the IP address of an interface.
Step 1: First of all enter privileged EXEC mode:
Router>enable password
Step 2: Enter the configure terminal command to enter global configuration mode.
R1#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:
R1 (config) #interface Ethernet 0/1
Step 4: Enter the IP address and subnet mask of the interface using the ip address ip address subnet mask command.
Example:
R1 (config-if) #ip address 192.168.1.1 255.255.255.0
Step 5: Exit the configuration mode by pressing Ctrl-Z
R1 (config-if) # [Ctrl-Z]
Page | 7
ROUTING PROTOCOL CONFIGURATION
There are many different routing protocols, and they all use different variables, known as "metrics," to decide
upon appropriate routes. A router needs to be running the same routing protocols as its neighbors do. Many routers can,
however, run multiple protocols. Many protocols are designed to be able to pass routing information to other routing
protocols; this process is called "redistribution."
IP routing is automatically enabled on Cisco routers. If it has been previously disabled on our router, we can turn it
back on in config mode with the command ‘ip routing’.
R1 (config) #ip routing
R1 (config) #ctrl-Z
There are two main ways a router knows where to send packets. The administrator can also assign static routes, or
the router can learn routes by employing a dynamic routing protocol.
Static routes are generally used in very simple networks or in particular cases in which that necessitate their use.
To create a static route, the administrator tells the router operating system that any network traffic destined for a specified
network layer address should be forwarded to a similarly specified network layer address. The ‘ip route’ command is used
in Cisco IOS for this.
R1#config
R1 (config) #ip route 192.168.1.1 255.255.255.0 192.168.11.2
R1 (config) #ctrl-Z
R1#show ip route
First, the packet destination address must include the subnet mask for that destination network. Second, the
address it is to be forwarded to is the specified address of the next router along the path to the destination. This is the most
common way of setting a static route in routers.
Dynamic routing protocols, running on connected routers, enable those routers to share routing information
among them. This enables routers to learn the routes that are available to them. The advantage of this method is that
routers are able to adjust to changes in network topologies themselves. If a router is physically removed, or a neighbor
router goes down, the routing protocol searches for a new route. Routing protocols can dynamically choose between
possible routes based on variables such as network congestion and network reliability.
ROUTING INFORMATION PROTOCOL (RIP)
Step 1: Enter privileged EXEC mode:
R1>enable password
Step 2: Enter the configure terminal command to enter global configuration mode.
R1#config terminal
Step 3: Enter the router rip command
R1 (config) #router rip
Step 4: Add the network number to use RIP and repeat this step for all the numbers.
R1 (config-router) #network network-number
Example:
R1 (config-router) #network 192.168.10.0
Page | 8
Note: To turn off RIP, use the no router rip command.
R1 (config) #no router rip
OPEN SHORTEST PATH FIRST (OSPF)
Step 1: Enter privileged EXEC mode:
R1>enable password
Step 2: Enter the configure terminal command to enter global configuration mode.
R1#config terminal
Step 3: Enter the router ospf command and follow by the process-id.
R1 (config) #router ospf process-id
Pick the process-id which is not being used. Enter the ‘show process’ command to determine, what ids are being
used?
R1 (config) #show process
Step 4: Add the network number, mask and area-id
R1 (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 networknumber and which bits for host number, and the area-id is used for determining areas in an OSPF configuration.
Some other routing protocols available in CISCO routers are given below.
Interior Gateway Routing Protocol (IGRP)
Border Gateway Protocol (BGP)
SIMULATION
GNS3
The software used for the simulation of the CISCO networks is GNS3. GNS3 stands for Graphical Network
Simulator, and used to make different networks. These networks can consist of different Routers, ATM Bridges and
Switches, Ethernet Switches, Frame Relay Switches and Clouds representing any sub-network. Using these network
elements the required network topology is made. The routers used in the network topology are then configured using CLI
(Command Line Interface). The router’s different interfaces are assigned different IP addresses and Subnet Mask. The
routers are assigned different routing protocols using different commands.
CONFIGURING IN GNS3
Following different steps are followed to configure different networks in the GNS3.
Integrate IOS Images
Make Network Topology
Assign the IPs to all the interfaces of all the Routers using CLI
Use ping command to ensure the connectivity
Page | 9
First of all the IOS images of the routers that are used in the network topology are integrated into the GNS3 to make
their use possible. The different network elements available in GNS3 can be used by drag and drop in the work space. After
all the elements are dropped into the work space, their connections are made with each other. Different types of
connections are also available in GNS3 like Serial Link, Ethernet or Fast Ethernet Link, Gigabit Ethernet etc. The desired link
is chosen and the devices are interconnected. After the network topology is made now all the routers are started, it means
now all the routers are up. Now we can assign IP addresses to the different interfaces of the routers and define different
routing protocols working on the routers by entering in configuring mode using CLI. After the topology is made and all the
routers are configured now we can check the connectivity between two routers. For this we enter into the console of one
router and type the ping command followed by the IP address of the destination router. The echo packet is sent to the
router and it replies back to this echo packet, the success rate and the total RTT (Round Trip Time) for that router are
displayed.
NETWORK TOPOLOGY
The network topology that we made to simulate the CISCO routers network is shown below.
R0, R1, R2, R3 are the hostnames of the routers while s0/0, s0/1, s0/2 etc. are the interface names of different
routers. In the above network the routers R0, R1, R2and R3 are interconnected by the serial links.
Page | 10
COMMANDS TO CONFIGURE
To configure the router we have to enter different modes of routers. To do so, right click on the router and click on
‘console’. The command prompt will appear and we can issue commands. Now type the following commands one by one to
configure any interface of the selected router. For example to configure the interface s0/1 of R1, do the following.
ENABLE
Initially the router will be in user EXEC mode (Router>). Type this command to enter privileged EXEC mode
(Router#).
CONFIG T
Type this command to enter the global configuration mode (Router (config) #).
INTERFACE S0/1
To select the interface and enter into the interface configuration mode (Router (config-if) #) type this command.
IP ADDRESS 192.168.1.6 255.255.255.0
This IP address will be assigned to the interface s0/1 of the router R1.
NO SH
This is no shutdown command. Now the state of the interface is changed to up.
EXIT
Type this to enter global configuration mode (Router (config) #).
ROUTER RIP
Type this to define RIP routing protocol on router R1.
NETWORK 192.168.1.0
Give the network address to the router.
EXIT
Type this, first to enter global configuration mode and then type to enter privileged EXEC mode.
Now the interface s0/1 of R1 is completely configured. The snap shot of the CLI, configuring s0/1 of R1 is given below.
Page | 11
PACKET TRACER
INTRODUCTION
Packet Tracer introduced by Cisco Networking Academy is a comprehensive networking technology, teaching and
learning software. Its salient features include powerful simulation and visualization of complex computer networks. It also
acts as an aid in solving problems, and learning concepts in dynamic simulation environment. It can also be used for
exploration, experimentation, and explanation of networking concepts and technologies.
APPLICATION IN THE PROJECT
In our project packet, we used packet tracer as supplementary software with GNS3. As packet tracer provides
visual demonstration of the networks more dynamically we thought it would be useful not only to us but to our peers in
understanding the concepts of computer networks.
We implemented a simple network in packet tracer and tested its connectivity through the PDU packet added to
the source and destination. We applied filters in the simulation so that we only received visual demonstration of the ICMP
packet. The successful transfer of this packet ensures the connectivity of the two nodes involved.
APPLICATIONS OF THE PROJECT
Configure CISCO routers according to the needs of the network.
Develop better understanding of router’s operation in different routing protocols
Useful for students of CCNA, CCIP, CCIE and other Cisco certified courses
Gns3 can be used to visualize complex networks
Testing of networks
Simulation of desired network can be performed quickly which saves time and other physical resources.
Page | 12
CONCLUSION
Through this project we tried to understand the basics of Cisco router configuration, its basic modes of operation
and how to implement those configurations according to the requirement of our network. The software GNS3 was
instrumental in developing the understanding of our project as it helped to create a simulation environment.
We also used a supplementary software ‘packet tracer 5.1’through which increased level of visual elaboration was
achieved. We found the project interesting and it was very useful in raising our level of understanding of computer
networks, as the project had a practical dimension to it.
Through this project we not only developed better understanding of computer networks but it also opened new
horizons in this field for us as an electrical engineer There is fast research and development going on in this field
internationally. Due to time constraints we limited the scope of our project to the basics, and we achieved our objectives
successfully. There is always room for improvement but still learning was quite good.
In the end, we would like to thank our instructor Dr Junaid Qadir who provided us with the opportunity to do this
project. His help throughout the project was instrumental in achieving the goals of the project successfully.
Page | 13
REFERENCES
Cisco Routers:
http://www.cisco.com
http://en.wikipedia.org/wiki/Cisco_systems
http://en.wikipedia.org/wiki/Router
http://www.swcp.com
http://www.scribd.com
http://www.ittrainingexpert.com
http://pages.swcp.com/~jgentry/topo/cisco.htm
http://www.tele.pitt.edu/~telelab/labs/General%20Lab%20Documentation/pdf/GeneralLab%20Documentation~Cisco%20R
outer%20Configuration%20Tutorial~08.20.05.pdf
GNS3:
http://nchc.dl.sourceforge.net/sourceforge/gns-3/GNS3-0.5-tutorial.pdf
http://www.gns3.net/
http://www.simulationexams.com
http://www.temple.edu.com
http://www.youtube.com/watch?v=anYWJIW2ht0&feature=related
http://www.youtube.com/watch?v=GAea5CixUJM&feature=related
http://www.configureterminal.com/ccna-ccent-ccnp-ccvp-ccie-cisco-free-ebooks-study-guides/free-gns3-labs-trainingresources/gns3-tutorial-pdf-documentation-install-configure-how-to-use-gns3.html
Packet Tracer:
http://www.cisco.com/web/learning/netacad/course_catalog/PacketTracer.html
http://www.youtube.com/watch?v=nwTvscbOXQE&feature=related
http://www.youtube.com/watch?v=L_ahomJ6aNY&feature=related
Cisco Image:
http://www.laurustech.com/uploadDir/adminCisco_l_res.jpg
Page | 14