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.
| Mode | Prompt | Purpose |
|---|---|---|
| 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)# endRouter#
or use:
Router(config)# exitRouter#
Network Topology
For this experiment, create a simple topology containing:
Serial LinkDCE DTE+------------+ +------------+| Router0 |------| Router1 |+------------+ +------------+| G0/0 | G0/0| |PC0 PC1
Suggested IP addressing
| Device | Interface | IP Address | Subnet Mask |
|---|---|---|---|
| Router0 | G0/0 | 192.168.1.1 | 255.255.255.0 |
| Router0 | S0/0/0 | 10.0.0.1 | 255.255.255.252 |
| Router1 | S0/0/0 | 10.0.0.2 | 255.255.255.252 |
| Router1 | G0/0 | 192.168.2.1 | 255.255.255.0 |
| PC0 | NIC | 192.168.1.10 | 255.255.255.0 |
| PC1 | NIC | 192.168.2.10 | 255.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, orSerial0/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> enableRouter#
The symbol # indicates Privileged EXEC mode.
Step 3: Return to User EXEC mode
Router# disableRouter>
Observation
| Command | Result |
|---|---|
enable | User EXEC → Privileged EXEC |
disable | Privileged EXEC → User EXEC |
Part B — Switching to Configuration Mode
From privileged EXEC mode:
Router# configure terminalRouter(config)#
or the abbreviated form:
Router# conf t
The prompt changes to:
Router(config)#
This indicates Global Configuration mode.
To return:
Router(config)# endRouter#
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:
| Parameter | Observed 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/0L 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
| Configuration | Description |
|---|---|
| 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
| Key | Function |
|---|---|
| ↑ | 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 StatusGigabitEthernet0/0 192.168.1.1 YES manual upGigabitEthernet0/1 unassigned YES unset administratively downSerial0/0/0 10.0.0.1 YES manual up
Interpretation
| Status | Meaning |
|---|---|
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)# exitRouter(config)# exitRouter#
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 terminalRouter(config)# interface serial 0/0/0Router(config-if)# ip address 10.0.0.1 255.255.255.252Router(config-if)# clock rate 64000Router(config-if)# no shutdownRouter(config-if)# exitRouter(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 terminalRouter1(config)# interface serial 0/0/0Router1(config-if)# ip address 10.0.0.2 255.255.255.252Router1(config-if)# no shutdownRouter1(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
| Purpose | Command |
|---|---|
| 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. | Task | Command Used | Observation |
|---|---|---|---|
| 1 | Identify current mode | show ... / observe prompt | __________ |
| 2 | Enter privileged mode | enable | __________ |
| 3 | Enter configuration mode | configure terminal | __________ |
| 4 | Obtain router information | show version | __________ |
| 5 | View routing protocols | show ip protocols | __________ |
| 6 | View routing table | show ip route | __________ |
| 7 | View running configuration | show running-config | __________ |
| 8 | Save configuration | copy run start | __________ |
| 9 | View command history | show history | __________ |
| 10 | View router clock | show clock | __________ |
| 11 | View hosts | show hosts | __________ |
| 12 | View detailed interface statistics | show interfaces | __________ |
| 13 | View brief interface status | show ip interface brief | __________ |
| 14 | Determine DTE/DCE | show controllers serial 0/0/0 | __________ |
| 15 | Configure Ethernet interface | ip address ... | __________ |
| 16 | Configure serial interface | ip address ... | __________ |
| 17 | Enable interface | no shutdown | __________ |
| 18 | Configure DCE clock | clock 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 *
- What is Cisco Packet Tracer?
- What is the difference between User EXEC and Privileged EXEC mode?
-
What does the
>symbol indicate in a Cisco router prompt? -
What does the
#symbol indicate? - How do you enter Global Configuration mode?
-
What is the purpose of
show version? -
What information can be obtained using
show ip route? - What is a routing table?
- What is the difference between running configuration and startup configuration?
- Why is it necessary to save the running configuration?
-
What is the purpose of
show ip protocols? -
What is the difference between
show interfacesandshow ip interface brief? -
What does
administratively downmean? -
What is the purpose of
no shutdown? - What is DCE?
- What is DTE?
- On which side of a serial connection is the clock rate configured?
-
What is the purpose of the
clock ratecommand? -
What does
show controllers serial 0/0/0do? -
What is the purpose of
show history? -
What is the purpose of
show clock? -
What does
show hostsdisplay? -
What is the purpose of the
ip addresscommand? - Why must different interfaces normally belong to different IP networks?
- How can you verify whether an interface has been configured correctly?
Comments
Post a Comment