This is an old revision of the document!
Cisco routers have many similarities with personal computers. After all, most operating systems offer basic routing features to any PC with at least two network cards. The advantages of routers over personal computers lie in their dedicated hardware, specialized in routing functions, as well as in their operating system. This is why the performance of a router with a CPU 20-times slower than the one of a PC is still above the PC’s performance when it comes down to routing packets.
Routers also have the common memory types that can be found in a PC, too:
A router also has a CPU that does all the arithmetical and logical work. The lookup in the routing table and the routing process are done in software. Layer 3 switches have dedicated circuits that accelerate the routing table lookup, making them faster than routers.
A router also has different types of interfaces that allow it to communicate with the outside world. All interfaces are indexed starting from 0 (zero):
A router does much more than “simple” routing functions. It can run a lot of services and provide many features to the networks it connects to. For example, it can also function as a firewall or some other security device. All these features are provided by the operating system, Cisco IOS (Internetwork Operating System).
The Cisco IOS command-line interface (CLI) is the primary user interface used for configuring, monitoring, and maintaining Cisco devices. This user interface allows you to directly and simply execute Cisco IOS commands, whether using a router console or terminal, or using remote access methods.
To aid in the configuration of Cisco devices, the Cisco IOS command-line interface is divided into different command modes. Each command mode has its own set of commands available for the configuration, maintenance, and monitoring of router and network operations. The commands available to you at any given time depend on the mode you are in. Entering a question mark (?) at the system prompt (router prompt) allows you to obtain a list of commands available for each command mode.
The use of specific commands allows you to navigate from one command mode to another. The standard order that a user would access the modes is as follows: user EXEC mode; privileged EXEC mode; global configuration mode; specific configuration modes; configuration submodes (and several other configuration sub-sub-…-submodes).
When you start a session on a router, you generally begin in user EXEC mode, which is one of two access levels of the EXEC mode. For security purposes, only a limited subset of EXEC commands are available in user EXEC mode. This level of access is reserved for tasks that do not change the configuration of the router, such as determining the router status.
In order to have access to all commands, you must enter privileged EXEC mode, which is the second level of access for the EXEC mode. Normally, you must enter a password to enter privileged EXEC mode. In privileged EXEC mode, you can enter any EXEC command, as the privileged EXEC mode is a superset of the user EXEC mode commands.
From privileged EXEC mode, you can enter global configuration mode. In this mode, you can enter commands that configure general system characteristics. You also can use global configuration mode to enter specific configuration modes. Configuration modes, including global configuration mode, allow you to make changes to the running configuration. If you later save the configuration, these commands are stored across router reboots.
Throughout these labs, you will be using Cisco Packet Tracer, a network simulator from Cisco. It simulates several network devices (routers, switches, access points) along with the connections between them. PT can save the topology, together with the configuration for all the devices involved, in a .pkt file.
Remember that PT is only a simulator. It does not offer all the functionality of a real router IOS and you might encounter some bugs from time to time. Still, you will be able to solve all the tasks in these labs using Packet Tracer.
To enter a router’s CLI, click once on a router in PT and go the CLI tab. This is where all your configuration will take place.
After a router boots up, you get an output that look like this:
Cisco 1841 (revision 5.0) with 114688K/16384K bytes of memory. Processor board ID FTX0947Z18E M860 processor: part number 0, mask 49 2 FastEthernet/IEEE 802.3 interface(s) 191K bytes of NVRAM. 63488K bytes of ATA CompactFlash (Read/Write) Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2007 by Cisco Systems, Inc. Compiled Wed 18-Jul-07 04:52 by pt_team --- System Configuration Dialog --- Continue with configuration dialog? [yes/no]:
The output summarizes the router’s hardware configuration. After you type no you get to the Router> prompt. At this prompt you can type show version again to display a summary of the router’s hardware configuration.
Continue with configuration dialog? [yes/no]: no Press RETURN to get started! Router>
This is the user EXEC mode. Press ? to get a list of available commands:
Router>? Exec commands: <1-99> Session number to resume connect Open a terminal connection disable Turn off privileged commands disconnect Disconnect an existing network connection enable Turn on privileged commands exit Exit from the EXEC logout Exit from the EXEC ping Send echo messages resume Resume an active network connection show Show running system information ssh Open a secure shell client connection telnet Open a telnet connection terminal Set terminal line parameters traceroute Trace route to destination
To turn on privileged commands, type enable. The prompt changes to indicate the privileged EXEC mode. Type disable to go back to user EXEC:
Router>enable Router#disable Router>
A router maintains a configuration file in RAM (active or „running” configuration) and a permanent configuration file in NVRAM. To enter the configuration mode, type configure terminal in the privileged EXEC mode. The prompt changes:
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#
The (config) indicates the configuration mode the router is currently in. Right now, this is the „root” of the configuration mode. All other sub-modes will be accessed from here. You can list the available commands using „?” in every mode. To go „back” one level in the configuration hierarchy, type exit. To go back to the Router# prompt and completely exit all configuration modes, use end or press CTRL-Z.
Interface configuration is done in interface configuration mode. For example, to configure a FastEthernet interface with an IP address and a network maks and to turn it on, type the following commands:
Router(config)#interface FastEthernet0/0 Router(config-if)#ip address 192.168.0.1 255.255.255.0 Router(config-if)#no shutdown
Use the show interfaces and show ip interfaces commands to view the full configuration of all network interfaces. To quicky view the state of each interface and the IP configuration, use the show ip interface brief command:
Router#show ip interface brief Interface IP-Address OK? Method Status Protocol Serial1/0 10.0.0.1 YES manual up down Serial1/1 192.168.0.1 YES manual up up Serial1/2 unassigned YES unset administratively down down Serial1/3 unassigned YES unset administratively down down Loopback0 200.100.0.1 YES manual up up
The status of the interface can be up (layer 1 OK), down (layer 1 error) or administratively down, if the administrator specifically shut down the interface or was never brought up. All interfaces on a router are administratively down, by default. The „protocol” field indicates the layer 2 protocol status (Ethernet, PPP and others). For example, the first serial interface has been brought up but the layer 2 protocol is not operational between the two interfaces.
A line is a special kind of interface and they are used for administrative purposes. The lines exist only in software but some of them can have a hardware counterpart. For example, when you connect to the console, the IOS „sees” you on the „console 0” line. The same goes for telnet connections: each time a user connects via Telnet to the router, the user communicates with the IOS through a Virtual TeletYpes (VTY) interface that allow the user to connect to the listening telnet daemon. Each user „occupies” one vty, even if multiple users connect through the same physical interface.
To enter line configuration mode, use the same syntax as you did when you entered interface configuration mode and substitute the word interface with the word line:
Router(config)#line console 0 Router(config-line)#exit Router(config)#line vty 0 Router(config-line)#exit Router(config)#line vty 0 4 Router(config-line)#
Commands similar to line vty 0 4
can be used to select multiple vty lines. The configuration made in the (config-line) mode will then apply to all the lines that were selected.
Open the Laborator 2.pkt file. To solve the following tasks, DO NOT configure anything on the switch.
Important! „?” and „tab”:
Important! Writing answers: