Cisco Packet Tracer - Basic Commands

 

Cisco Packet Tracer - Basic Commands

Experiment: Familiarization with Cisco Router Commands and Basic Interface Configuration

 Aim

To familiarize students with the Cisco IOS command-line interface (CLI) using Cisco Packet Tracer and to practice basic router monitoring, configuration, and interface configuration commands.


 Software Required

  • Cisco Packet Tracer
  • Cisco router, such as Cisco 1941/2911
  • PC/Laptop nodes
  • Copper straight-through cable
  • Serial DCE/DTE cable where required

Basic Cisco IOS Modes

Cisco routers use different command modes. The prompt helps us identify the current mode.

ModePromptPurpose
User EXEC mode    Router>    Basic monitoring commands
Privileged EXEC mode    Router#    Advanced monitoring and administration
Global Configuration mode    Router(config)#    Configure the router
Interface Configuration mode    Router(config-if)#    Configure a particular interface

Mode transition

Router>
|
| enable
Router#
|
| configure terminal
Router(config)#

To return from configuration mode:

Router(config)# end
Router#

or use:

Router(config)# exit
Router#

Network Topology

For this experiment, create a simple topology containing:

Serial Link
DCE DTE
+------------+ +------------+
| Router0 |------| Router1 |
+------------+ +------------+
| G0/0 | G0/0
| |
PC0 PC1

Suggested IP addressing

Device    InterfaceIP AddressSubnet Mask
Router0G0/0    192.168.1.1        255.255.255.0
Router0S0/0/0    10.0.0.1255.255.255.252
Router1S0/0/0    10.0.0.2255.255.255.252
Router1G0/0    192.168.2.1255.255.255.0
PC0NIC    192.168.1.10255.255.255.0
PC1NIC    192.168.2.10255.255.255.0

Note: Interface names can vary depending on the router model selected in Packet Tracer. For example, you may see GigabitEthernet0/0, FastEthernet0/0, or Serial0/0/0.


Procedure

Part A — Knowing the Current Mode

Step 1: Access the router CLI

Click:

Router → CLI

You will initially see:

Router>

The symbol > indicates User EXEC mode.

Step 2: Switch to Privileged EXEC mode

Enter:

Router> enable
Router#

The symbol # indicates Privileged EXEC mode.

Step 3: Return to User EXEC mode

Router# disable
Router>

Observation

CommandResult
enable    User EXEC → Privileged EXEC
disable    Privileged EXEC → User EXEC

Part B — Switching to Configuration Mode

From privileged EXEC mode:

Router# configure terminal
Router(config)#

or the abbreviated form:

Router# conf t

The prompt changes to:

Router(config)#

This indicates Global Configuration mode.

To return:

Router(config)# end
Router#

Part C — Obtaining Router Information

The command:

Router# show version

provides important information about the router.

Information obtained includes:

  • Router model/type
  • Cisco IOS version
  • IOS image
  • Configuration register
  • Amount of RAM
  • Flash memory
  • Number and type of interfaces
  • System uptime
  • Serial number and hardware information
  • Configuration register

Command

Router# show version

Important observation

Students should identify the following from the output:

ParameterObserved Value
Router model__________
IOS version__________
RAM__________
Flash memory__________
Number of interfaces__________
System uptime__________

Part D — Viewing Routing Protocol Information

Use:

Router# show ip protocols

This command displays information about the IP routing protocols configured on the router.

It can show:

  • Routing protocol being used
  • Networks advertised
  • Routing protocol timers
  • Administrative information
  • Passive interfaces
  • Sources of routing information

If no dynamic routing protocol has been configured, the router may indicate that no routing protocol is running.

Command

Router# show ip protocols

Observation

Routing protocol configured:

________________________________

Networks advertised:

________________________________

Part E — Viewing the Routing Table

Use:

Router# show ip route

The command displays the router's IP routing table.

Example:

Router# show ip route

Typical route codes include:

Code    Meaning
C    Connected
L    Local
S    Static
R    RIP
O    OSPF
D    EIGRP

For example:

C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0

Important point

The routing table tells the router where and how to forward packets.


Part F — Saving the Running Configuration

Cisco IOS maintains the active configuration in running configuration.

To save it into startup configuration:

Router# copy running-config startup-config

You may see:

Destination filename [startup-config]?

Press Enter.

Alternative command

Router# write memory

or:

Router# wr

Important distinction

ConfigurationDescription
Running configuration        Configuration currently active in RAM
Startup configuration        Configuration stored in NVRAM and used after reboot

A useful command to view the running configuration is:

Router# show running-config

Part G — Viewing Command History

Cisco IOS maintains a history of recently entered commands.

Use:

Router# show history

Example:

Router# show history

The command displays recently executed commands.

Useful keyboard shortcuts

KeyFunction
        Previous command
        Next command
Ctrl + P        Previous command
Ctrl + N        Next command

Part H — Viewing the Router Clock

Use:

Router# show clock

Example:

Router# show clock

The output displays the current time maintained by the router.

Observation

Router clock: ______________________

In Packet Tracer, the displayed time may not represent an accurately synchronized real-world clock unless time-related configuration has been performed.


Part I — Viewing the List of Hosts

Cisco IOS can maintain a table that maps host names to IP addresses.

Use:

Router# show hosts

The output displays information about the configured or learned host names.

Example

Router# show hosts

Students should observe:

  • Host names
  • IP addresses associated with host names
  • Method/source of name resolution, where applicable

Part J — Displaying Interface Statistics

There are two useful forms of interface information.

1. Detailed Interface Information

Use:

Router# show interfaces

This displays detailed information about all interfaces.

For a particular interface:

Router# show interfaces gigabitEthernet 0/0

or depending on the router:

Router# show interfaces serial 0/0/0

Information available includes:

  • Interface status
  • Line protocol status
  • MAC address
  • IP-related information
  • MTU
  • Bandwidth
  • Delay
  • Encapsulation
  • Input packets
  • Output packets
  • Errors
  • Collisions
  • Interface counters

Example:

GigabitEthernet0/0 is up, line protocol is up

This indicates that both the physical interface and data-link protocol are operational.


2. Brief Interface Information

Use:

Router# show ip interface brief

This is one of the most useful troubleshooting commands.

Example:

Interface IP-Address OK? Method Status
GigabitEthernet0/0 192.168.1.1 YES manual up
GigabitEthernet0/1 unassigned YES unset administratively down
Serial0/0/0 10.0.0.1 YES manual up

Interpretation

StatusMeaning
up    Physical interface is operational
down    Physical/link problem
administratively down    Interface has been disabled using shutdown

The command:

show ip interface brief

provides a quick summary, whereas:

show interfaces

provides detailed statistics.


Part K — Determining DTE or DCE

Serial connections use two types of devices:

  • DTE — Data Terminal Equipment
  • DCE — Data Communications Equipment

The DCE side provides clocking for a synchronous serial connection.

Use:

Router# show controllers serial 0/0/0

Example output may contain information indicating whether the interface is:

DCE

or:

DTE

Important rule

Clock rate is configured on the DCE side.

For example:

Router0(config-if)# clock rate 64000

Important Packet Tracer note

The exact interface name depends on the router model. If your interface is Serial0/1/0, replace Serial0/0/0 accordingly.


Part L — Configuring an Ethernet Interface

Suppose Router0's GigabitEthernet0/0 interface has to be configured with:

IP address: 192.168.1.1
Subnet mask: 255.255.255.0

Step 1: Enter privileged mode

Router> enable

Step 2: Enter global configuration mode

Router# configure terminal

Step 3: Select the interface

Router(config)# interface gigabitEthernet 0/0

The prompt becomes:

Router(config-if)#

Step 4: Assign the IP address

Router(config-if)# ip address 192.168.1.1 255.255.255.0

Step 5: Enable the interface

Router(config-if)# no shutdown

You may see messages such as:

%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

Step 6: Exit

Router(config-if)# exit
Router(config)# exit
Router#

Step 7: Verify

Router# show ip interface brief

The interface should show:

GigabitEthernet0/0 192.168.1.1 YES manual up up

Part M — Configuring a Serial Interface

Assume Router0 is the DCE side.

Configure:

IP address: 10.0.0.1
Subnet mask: 255.255.255.252
Clock rate: 64000

Commands

Router# configure terminal
Router(config)# interface serial 0/0/0
Router(config-if)# ip address 10.0.0.1 255.255.255.252
Router(config-if)# clock rate 64000
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# end

Verify

Router# show ip interface brief

and:

Router# show controllers serial 0/0/0

Configuration of the Other Serial Router

Router1 is assumed to be the DTE side.

Configure:

IP address: 10.0.0.2
Subnet mask: 255.255.255.252

Router1# configure terminal
Router1(config)# interface serial 0/0/0
Router1(config-if)# ip address 10.0.0.2 255.255.255.252
Router1(config-if)# no shutdown
Router1(config-if)# end

Important

Do not configure:

clock rate 64000

on the DTE interface.

The clock is supplied by the DCE side.


Verification Commands

After completing the configuration, execute the following commands.

Check interface status

show ip interface brief

Check detailed interface information

show interfaces

Check routing table

show ip route

Check router information

show version

Check routing protocols

show ip protocols

Check clock

show clock

Check hosts

show hosts

Check command history

show history

Check DTE/DCE

show controllers serial 0/0/0

Save configuration

copy running-config startup-config

Important Commands — Quick Reference

PurposeCommand
Enter privileged mode        enable
Enter configuration mode        configure terminal
Exit configuration mode        end
Display router information        show version
Display running configuration        show running-config
Display startup configuration        show startup-config
Display routing protocols        show ip protocols
Display routing table        show ip route
Display command history        show history
Display router clock        show clock
Display hosts        show hosts
Detailed interface information        show interfaces
Brief interface information        show ip interface brief
Determine DTE/DCE        show controllers serial 0/0/0
Select an interface        interface ...
Assign IP address        ip address IP MASK
Enable interface        no shutdown
Disable interface        shutdown
Configure DCE clock        clock rate 64000
Save configuration        copy running-config startup-config

Observation Table

Students can complete the following table in the lab record.

Sl. No.TaskCommand UsedObservation
1Identify current modeshow ... / observe prompt__________
2Enter privileged modeenable__________
3Enter configuration modeconfigure terminal__________
4Obtain router informationshow version__________
5View routing protocolsshow ip protocols__________
6View routing tableshow ip route__________
7View running configurationshow running-config__________
8Save configurationcopy run start__________
9View command historyshow history__________
10View router clockshow clock__________
11View hostsshow hosts__________
12View detailed interface statisticsshow interfaces__________
13View brief interface statusshow ip interface brief__________
14Determine DTE/DCEshow controllers serial 0/0/0__________
15Configure Ethernet interfaceip address ...__________
16Configure serial interfaceip address ...__________
17Enable interfaceno shutdown__________
18Configure DCE clockclock rate 64000__________

Result

The basic Cisco IOS router commands were studied and practiced using Cisco Packet Tracer. The router information, routing information, interface statistics, configuration information, clock, host information, and command history were examined. Ethernet and serial interfaces were configured with appropriate IP addresses and subnet masks, and the interfaces were enabled and verified successfully.


 Viva Voce Questions *

  1. What is Cisco Packet Tracer?
  2. What is the difference between User EXEC and Privileged EXEC mode?
  3. What does the > symbol indicate in a Cisco router prompt?
  4. What does the # symbol indicate?
  5. How do you enter Global Configuration mode?
  6. What is the purpose of show version?
  7. What information can be obtained using show ip route?
  8. What is a routing table?
  9. What is the difference between running configuration and startup configuration?
  10. Why is it necessary to save the running configuration?
  11. What is the purpose of show ip protocols?
  12. What is the difference between show interfaces and show ip interface brief?
  13. What does administratively down mean?
  14. What is the purpose of no shutdown?
  15. What is DCE?
  16. What is DTE?
  17. On which side of a serial connection is the clock rate configured?
  18. What is the purpose of the clock rate command?
  19. What does show controllers serial 0/0/0 do?
  20. What is the purpose of show history?
  21. What is the purpose of show clock?
  22. What does show hosts display?
  23. What is the purpose of the ip address command?
  24. Why must different interfaces normally belong to different IP networks?
  25. How can you verify whether an interface has been configured correctly?

Comments

Popular posts from this blog

Networks Lab PCCSL507 Semester 5 KTU CS 2024 Scheme - Dr Binu V P

Study of whois Command

Study and Use of ifconfig Command