Data Communications & Computer Networks II.
Worksheet 1
Introduction to the Routers
Router is a network layer device that uses one or more metrics to determine the optimal path along which network traffic should be forwarded. Routers forward packets from one network to another based on network layer information. Occasionally this called as gateway.
• CISCO Routers
Cisco is one of the world leading manufactures of routers and many other communication equipments.
CISCO 805
CISCO 1700 SERIES
Basic Lab Overview
This lab will introduce the Cisco Internetwork Operating System (IOS) command line interface (CLI). You will need to logon to a router and become familiar with the different levels of access on the router. You will also become familiar with the commands available to you in each mode (user or privileged) and the router help facility, history, and editing features.
User vs. Privileged Mode
User mode is indicated with the ‘>’ next to the router name. You can look at settings but can not make changes from user mode. In Privilege mode (indicated by the '#') you can do additional tasks than user mode. To get into privilege mode the keyword is ‘enable’.
Router >
Router > enable
Password:
Router #
HELP
To view all commands available from this mode, type ‘?’ and press Enter Key. This will give you the list of all available commands for the router in your current mode. You can also use the question mark after you have started typing a command. For example if you want to use a show command but you do not remember which one it is, type ‘show ?’. This will output all commands that you can use with the show command.
Router#show ?
access-lists List access lists
arp Arp table
cdp CDP information
clock Display the system clock
controllers Interface controllers status
crypto Encryption module
debugging State of each debugging option
dhcp Dynamic Host Configuration Protocol status
flash: display information about flash: file system
frame-relay Frame-Relay information
history Display the session command history
--More—
Configuration Mode
From privilege mode, you can enter to the configuration mode by typing ‘configure terminal’. To exit configuration mode, type ‘exit’ or
+z
Router#configure terminal
Router( config)#exit
Show Version
The 'show version' command gives you a lot more information than at first you may think. Use 'show version' to obtain critical information, such as router platform type, operating system revision, operating system last boot time and file location, amount of memory, number of interfaces, and configuration register.
Router>show version
Cisco Internetwork Operating System Software
IOS (tm) PT1000 Software (PT1000-I-M), Version 12.2(28), RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 27-Apr-04 19:01 by miwang
Image text-base: 0x8000808C, data-base: 0x80A1FECC
ROM: System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)
Copyright (c) 2000 by cisco Systems, Inc.
ROM: PT1000 Software (PT1000-I-M), Version 12.2(28), RELEASE SOFTWARE (fc5)
System returned to ROM by reload
System image file is "flash:pt1000-i-mz.122-28.bin"
PT 1001 (PTSC2005) processor (revision 0x200) with 60416K/5120K bytes of memory
.
Processor board ID PT0123 (0123)
PT2005 processor: part number 0, mask 01
Bridging software.
X.25 software, Version 3.0.0.
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read/Write)
--More—
Routing Protocols
To view the status of any routing protocols currently configured on the router, can use the ‘show protocols’ command.
Router>show protocol
Global values:
Internet Protocol routing is enabled
FastEthernet0/0 is administratively down, line protocol is down
FastEthernet1/0 is administratively down, line protocol is down
Serial2/0 is administratively down, line protocol is down
Serial3/0 is administratively down, line protocol is down
FastEthernet4/0 is administratively down, line protocol is down
FastEthernet5/0 is administratively down, line protocol is down
Flash Memory
Flash memory is a special kind of memory on the router that contains the operating system image file(s). Unlike regular router memory, Flash memory continues to maintain the file image even after power is lost.
Router>show flash
System flash directory:
File Length Name/status
1 5571584 pt1000-i-mz.122-28.bin
[5571584 bytes used, 58444800 available, 64016384 total]
63488K bytes of processor board System flash (Read/Write)
Running Configuration
The currently active configuration script running on the router is referred to as the 'running configuration’ on the routers command-line interface. Note the privilege mode required. The running configuration script is not automatically saved on a Cisco router, and will be lost in the event of power failure. The running configuration must be manually saved with the 'copy' command (discussed in a later lab).
Router#show running-config
Building configuration...
Current configuration : 514 bytes
!
version 12.2
no service password-encryption
!
hostname Router
!
!
!
!
!
ip ssh version 1
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
shutdown
!
interface Serial2/0
no ip address
shutdown
!
interface Serial3/0
no ip address
shutdown
!
interface FastEthernet4/0
no ip address
shutdown
!
interface FastEthernet5/0
no ip address
shutdown
!
ip classless
!
!
!
line con 0
line vty 0 4
login
!
!
end
Router#
Command history
The routers Command Line Interface (CLI) maintains by default the last 10 commands you have entered in memory, for later retrieval. You can change this default value. You cycle through previous router commands entered (since the last power loss), using one of two methods. To view all of the past commands still in router memory at the same time, use the 'show history' command. For single line retrieval, use either the Arrow-Up (for previous command) and Arrow Down (for next command), or Control-P(for previous command)and Control-N(for next command).
Router>show history
show version
show protocols
show flash
enable
show running-config
disable
show history
Clock
The router keeps its own clock that you can use to synchronize devices to. To view the clock use the show clock command.
Router#show clock
*0:1:5.902 UTC Mon Mar 1 1993
Host Table
You can create a list host name on your router. You can view the entries (if any) by typing show hosts.
Router#show hosts
Default Domain is not set
Name/address lookup uses domain service
Name servers are 255.255.255.255
Codes: UN - unknown, EX - expired, OK - OK, ?? - revalidate
temp - temporary, perm - permanent
NA - Not Applicable None - Not defined
Host Port Flags Age Type Address(es)
Show users
The show users command displays users who are connected to the router.
Router#show users
Line User Host(s) Idle Location
* 0 con 0 idle 00:00:00
Interface User Mode Idle Peer Address
Show Interfaces
The show interfaces command will display statistics for all interfaces configured on the router
Router#show interfaces
FastEthernet0/0 is administratively down, line protocol is down (disabled)
Hardware is Lance, address is 00d0.bc8b.c34b (bia 00d0.bc8b.c34b)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
--More--
Show Protocols
The show protocols displays global and interface specific status of layer 3 protocols.
Router#show protocols
Global values:
Internet Protocol routing is enabled
FastEthernet0/0 is administratively down, line protocol is down
FastEthernet1/0 is administratively down, line protocol is down
Serial2/0 is administratively down, line protocol is down
Serial3/0 is administratively down, line protocol is down
FastEthernet4/0 is administratively down, line protocol is down
FastEthernet5/0 is administratively down, line protocol is down