Вы находитесь на странице: 1из 58

Using Packet Tracer

What is Packet Tracer?


Packet Tracer is a protocol simulator developed by Dennis
Frezzo and his team at Cisco Systems.

Packet Tracer (PT) is a powerful and dynamic tool that


displays the various protocols used in networking, in
either
Real Time or
Simulation mode.

This includes
Layer 2 protocols such as, Ethernet and PPP, l
Layer 3 protocols such as IP, ICMP, and ARP, and l
Layer 4 protocols such as TCP and UDP.
Routing protocols can also be traced.

Introduction to the
Packet Tracer
Interface using a Hub
Topology

Step 1: Start Packet Tracer and Entering Simulation Mode

Some important modules

Some important modules

Some important modules


1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

Menu Bar:
Main Tool Bar:
Common Tools Bar
Logical/Physical Workspace and Navigation Bar:
Workspace:
Realtime/Simulation Bar:
Network Component Box:
Device-Type Selection Box:
Device-Specific Selection Box:
User Created Packet Window

Creating a simple topology

1.

From the network component box, click on End Devices


and drag-and-drop a Generic PC icon and a Generic
laptop icon into the Workspace.

2.

Click on Connections, then click on Copper Cross-Over,


then on PC0, and select FastEthernet. After this, click on
Laptop0 and select FastEthernet. The link status LED
should show up in green, indicating that the link is up.

Creating a simple topology


3.

4.

Click on the PC, go to the Desktop tab, click on IP


Configuration, and enter an IP address and subnet
mask. In this topology, the default gateway and DNS
server information is not needed as there are only two
end devices in the network.
Close the window, open the laptop, and assign an IP
address to it in the same way. Make sure that both of
the IP addresses are in the same subnet.

Creating a simple topology


1.

Close the IP Configuration box, open the command


prompt, and ping the IP address of the device at the
end to check connectivity.

Add an Ethernet switch to this topology so that more than two end devices can be connected

1.

2.
3.

Click on Switches from the device-type selection box


and insert any switch (except Switch-PT-Empty) into the
workspace.
Remove the link between the PC and the laptop using
the delete tool from the common tools bar.
Choose the Copper Straight-Through cable and connect
the PC and laptop with the switch. At this point, the link
indicators on the switch are orange in color because the
switchports are undergoing the listening and learning
states of the Spanning Tree Protocol (STP).

Add an Ethernet switch to this topology so that more than two end devices can be connected

4.

Once the link turns green, as shown in the previous


screenshot, ping again to check the connectivity. The
next chapter, Chapter 2, Network Devices, will deal with
the configuration of network devices.

5.

5. To save this topology, navigate to File | Save As and


choose a location. The topology will be saved with a
.pkt extension, with the devices in the same state.

Cisco devices and Packet Tracer devices


Routers
A router provides connectivity between two logical
networks. Every router in Packet Tracer can be
switched on or off by using the provided power button.
The power switch is required to make a device simulate
its real counterpart. Modules can be added or
removed only after powering off the device. If the
running configuration is not saved, power cycling a
device will make it lose its configuration.

Cisco devices and Packet Tracer devices


Routers
Cisco 1600 series router: This router is best choice for home and small business. Cisco makes five products in this series.

Produc
t

Interfaces

1601

Ethernet one, Serial one, WAN interface card slot one

1602

Ethernet one, Serial one (56kbps DSU/CSU integrated ), WAN


interface card slot one

1603

Ethernet one, ISDN one ( BRI -Basic Rate Interface), WAN


interface card slot one

1604

Ethernet one, ISDN one ( BRI -Basic Rate Interface with


integrated NT1), S-bus port one ( for ISDN phone), WAN
interface card slot one

1605

Ethernet two, WAN interface card slot one

Cisco 1841 series router


Cisco 1841 router is designed for medium size branch office.
It provides secure data connectivity and significant additional features.
can install any supported interface based on your requirement.

Cisco 2500 series router


2500 series of router are specially made to connect Ethernet or token ring
networks via ISDN or serial connections.
This series of router had 3 interface slots available, 2 synchronous serial
interface and 1 ISDN port.

Cisco 2600 series router


2600 series is a modular router that extend performance by providing
flexible LAN and WAN configurations, multiple security options, voice and
data integration.
This series of router delivers high density, enhanced security performance,
and concurrent application support.

Switch
Switch is a device that connects devices together on a computer network.
When it receives a frame, it checks its destination address and forward the
frame from matching port.
2960 Switch provides cost effective network connectivity solution for branch
office and medium size business.
It has 2 uplink ports of 1 Gbps. It is available in two variant 24 and 48 fast
Ethernet ports.

Cisco devices and Packet Tracer devices


Routers
Cisco 1841: This is an Integrated Service Router (ISR) having two
Fast Ethernet ports, two slots for High Speed WAN Interface Cards
(HWICs), and one slot for Advanced Integration Module (AIM)
Cisco 1941: This is similar to the previous model but runs on Cisco
IOS Version 15. It has two ports that operate at Gigabit Ethernet
speeds.
Cisco 2620XM: This is a multiservice router with one Fast Ethernet
port, two slots for WAN Interface cards, and one slot for AIM.
Cisco 2621XM: This is similar to the previous model, except that
this router has two Fast Ethernet ports.

Cisco devices and Packet Tracer devices


Routers
Cisco 2811: This ISR comes with two Fast Ethernet ports, four WIC
slots, and a dual slot for AIM.
Cisco 2901: This router has two Gigabit Ethernet ports, four WIC
slots, and two Digital Signal Processor (DSP) slots. This router uses
Cisco IOS Version 15.
Cisco 2911: This router has three Gigabit Ethernet ports and all the
other features of the previous router. It runs on IOS Version 15.
Generic Router-PT: This is a custom router running on Cisco IOS. It
contains 10 slots and has separate modules with a naming
convention beginning with PT.

Cisco devices and Packet Tracer devices


Switches: A switch, also called a multiport bridge,
connects
more than two end devices together. Each switch port is a
collision domain.
Cisco 2950-24: This managed switch comes with 24 Fast Ethernet ports.
Cisco 2950T-24: This switch is a member of the Catalyst 2590 Intelligent
Switch family and has two Gigabit Ethernet ports in addition to the 24
Fast Ethernet ports.
Cisco 2960-24TT: T his is another 24 port switch; the previous switch has
Gigabit Interface Converter (GBIC) for Gigabit Ethernet ports, whereas
this switch has Small Form-factor Pluggable (SFP) modules for the same.
Note that this is a difference only on real switches, it has no impact on
Packet Tracer.

Cisco devices and Packet Tracer devices


Switches
Cisco 3560-24PS: This switch is different from the others because it is a
layer 3 switch that can be used to perform routing in addition to switching.
The PS suffix implies support for Power over Ethernet (PoE), which can be
used to power up IP phones without using power adapters.
Bridge PT: This is a device used to segment a network and it has only two
ports (which is why it is a bridge; if it had more, it'd be called a switch).
Generic Switch PT: This is a Packet-Tracer-designed switch running on Cisco
IOS. This is the only customizable switch with 10 slots and several modules.

Cisco devices and Packet Tracer devices


Other devices
Hub PT: This network hub was the oldest way to connect
multiple end devices together. It still exists in Packet Tracer so
that you can simulate and learn about network storms and
broadcasts. This Packet Tracer device has 10 slots.
Repeater PT: This device is used to boost the signal on a wire
when the distance between two points is high. We'll be using it
in Chapter 5, Navigating and Modifying the Physical Workspace;
this device has two slots.
Coaxial Splitter PT: This is used to split a single coaxial
connector into two. It has three coaxial ports and cannot be
customized in any way.

Customizing devices with


modules
A device module is a piece of hardware containing
several device interfaces. For example, a HWIC-4ESW
module contains four Ethernet (10 MBps) ports. Similar
to a real router/switch, the device has to be powered
off in order to add or remove modules.
The power switch is on the right-hand side of each
device, with a green LED indicating that the power is
on.
Click on this switch to turn it off.
To add a module, drag one from the modules list and
drop it onto an empty slot
To remove a module, power off the device and drag it
from the slot back to the module list.

Naming Convention
HWIC-4ESW (four Ethernet switching ports)
WIC-1ENET (single Ethernet port)
NM-1E (single Ethernet port)
NM-1FE-TX (single Fast Ethernet port)
NM-4E (four Ethernet ports)
NM-ESW-161 (16 Ethernet switching ports)
PT-ROUTER-NM-1CE, PT-ROUTER-NM-1CFE, PTROUTER -NM-1CGE (Packet Tracer custom
modules)

Accessing the CLI


The Command-line Interface of a device in Packet Tracer can be
accessed in two ways:
The CLI tab
Console port
Although it is possible to access a device through SSH or Telnet,
these are Cisco methods and are not exclusive to Packet Tracer.

Accessing the CLI


The CLI tab
This is the simplest way of accessing the Command-line Interface of
a device; click on a network device, navigate to the CLI tab, and
booting process will be seen.

Accessing the CLI


The Console port
There is no difference between what is seen and controlled in this
method and the previous one, but the Console Port can be used to
make the topology look similar to the real world. Follow the steps to
configure the console port:
1. Add a PC or a laptop to the workspace.
2. Choose connections, and then click on the console cable.
3. Connect the console cable of the network device to the RS-232
port of the PC/laptop.
4. Open the PC/laptop, navigate to the Desktop tab, open Terminal,
and then with the default settings, click on OK to view the console.
The following screenshot displays a router's console through its
terminal:

Configuring network devices


A device modulePacket Tracer provides a Config tab
that contains GUI options for the most common
configurations. What's more, as you tinker with the
GUI, its equivalent Cisco IOS command is also
displayed.

Creating a Network Topology


Console: This is a console cable that is used to view the
network device's console from a PC/laptop. One end of
the cable connects to the console port of a network
device while the other one connects to the RS-232 port
on a PC/laptop.
Copper straight-through: This is a standard Ethernet
cable that is used to connect two devices that operate in
different layers of the OSI model (such as hub to
router and switch to PC). It can be used with Ethernet,
Fast Ethernet and Gigabit Ethernet port types.
Copper cross-over: This Ethernet cable connects devices
operating in the same OSI layer (such as hub to hub,
PC to PC, PC to router, and PC to printer). This cable

Testing connectivity with PDUs


Once a topology has been created, connectivity can be
tested between devices by using either simple or
complex PDUs. Although it is possible to do the same by
pinging devices from their command-line interface, using
the PDU option is quicker for large topologies.

Routing with OSPF

Cisco IOS Mode


Cisco IOS supports various command modes, among those following
are the main command modes.

User EXEC Mode


Privileged EXEC Mode
Global Configuration Mode
Interface Configuration Mode
Sub Interface Configuration Mode
Setup Mode
ROM Monitor Mode

Prompt

Command
to enter

Command to
exit

Mode

Purpose

User
EXEC

Allow you to
connect with
remote devices,
perform basic
tests,
temporary
Router >
change
terminal
setting, list
system
information

Default
mode after
booting.
Use exit
Login with
command
password, if
configured.

Privilege
d EXEC

Allow you to set


operating
parameters. It
also includes
high level
testing and list
commands like
show, copy,
debug.

Use enable
command
from user
exec mode

Router #

Use exit
command

Command
to enter

Command to
exit

Contain
Interface commands
Router(con
Configur those modify
fig-if)#
ation
the operation of
an interface

Use
interface
type
number
command
from global
configuratio
n mode

Use exit
command to
return in global
configuration
mode

Configure or
Submodify the
Interface virtual interface
Configur created from
ation
physical
interface

Use
interface
type sub
interface
number
command
from global
configuratio
n mode or
interface
configure
mode

Use exit to
return previous
mode. Use end
command to
return in
privileged exec
mode.

Mode

Purpose

Prompt

Router(con
fig-subif)

Configuring Routing with the CLI


Static routing
Static routing with GUI

Once a topology has been created, connectivity can be


tested between devices by using either simple or
complex PDUs. Although it is possible to do the same by
pinging devices from their command-line interface, using
the PDU option is quicker for large topologies.

Basic Routing
Device / Interface Connected To

IP Address

PC0

Router0's
FastEthernet 0/0

10.0.0.2/255.0.0.0

Router0's
FastEthernet 0/0

PC0

10.0.0.1/255.0.0.0

Router0's Serial
0/0/0

Router1's serial
0/0/0

50.0.0.1/255.0.0.0

Router1's Serial
0/0/0

Router0's serial
0/0/0

50.0.0.2/255.0.0.0

Router1's
FastEthernet 0/0

PC1

20.0.0.1/255.0.0.0

PC1 Router1's

FastEthernet 0/0

20.0.0.2/255.0.0.0

Basic Routing
IOS commands are not case sensitive; you can enter them in
uppercase, lowercase, or mixed case.
Password is case sensitive. Make sure you type it in correct
case.
In any mode, you can obtain a list of commands available on
that mode by entering a question mark (?).
Standard order of accessing mode is
User Exec mode => Privileged Exec mode => Global
Configuration mode => Interface Configuration mode => Sub
Interface Configuration mode
Router will enter in setup mode only if it fails to load a valid
running configuration.
Router will enter in ROMMON mode only if it fails to load a
valid IOS image file.
You can manually enter in ROMMON mode for diagnostics
purpose.

Access CLI prompt of router


Cisco IOS supports various command modes, among those followings are
the main command modes.

User EXEC Mode


Privileged EXEC Mode
Global Configuration Mode
Interface Configuration Mode
Sub Interface Configuration Mode
Setup Mode
ROM Monitor Mode

Mode

User EXEC

Privileged EXEC

Global
Configuration

Interface
Configuration

Command to
enter
Default mode
after booting.
Router >
Login with
password, if
configured.
Useenablecom
Router #
mand from user
exec mode
Useconfigure
terminalcomma
Router(config)# nd from
privileged exec
mode
Useinterface
typenumberco
mmand from
Router(config-if)#
global
configuration
mode
Useinterface
typesub
Prompt

Command to
exit
Useexitcomman
d

Useexitcomman
d

Useexitcomman
d

Useexitcomman
d to return in
global
configuration
mode
Useexitto return

Mode

Setup

ROMMON

Command to
exit
PressCTRL+C
to abort.
Router will
Typeyesto
automatically save
Parameter[Para insert in this
configuration,
meter value]:
mode if running ornoto exit
configuration is without saving
not present
when asked in
the end of
setup.
Enterreloadc
ommand from
privileged exec
mode.
PressCTRL +
Useexitcomm
ROMMON >
Ckey
and.
Prompt

Command to
enter

IOS commands are not case sensitive; you can enter them in
uppercase, lowercase, or mixed case.
Password is case sensitive. Make sure you type it in correct
case.
In any mode, you can obtain a list of commands available on
that mode by entering a question mark (?).
Standard order of accessing mode is
User Exec mode => Privileged Exec mode => Global
Configuration mode => Interface Configuration mode => Sub
Interface Configuration mode
Router will enter in setup mode only if it fails to load a valid
running configuration.
Router will enter in ROMMON mode only if it fails to load a valid
IOS image file.
You can manually enter in ROMMON mode for diagnostics
purpose.

Enter in global configuration mode

Router>
Router>
Router>enable
Router#config t
Enter configuration commands, one per line.
End with CNTL/Z.
Router(config)#
Change default router name
By default Router name is configured on routers. We can configure
any desired name on router. hostname command will change the
name of router.
Router(config)#hostname R1
R1(config)#
R1(config)#line console 0
R1(config-line)#password pass
R1(config-line)#login

Setting password

R1(config-line)#exit
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from
console by console

Return to console
mode

R1#exit
R1 con0 is now available
Press RETURN to get started.
User Access Verification
Password:
Password:
R1>

User Access Verification

Secure auxiliary port


Auxiliary port provides remote access to router. You can attach modem in
this port. Not all devices support this port. If your router supports this port
use following commands to secure it.
same

Enable telnet access on cisco router


Depending on the model number and IOS software version router may
supports various number of VTY connections range from 5 to 1000.
VTY is the standard name for telnet and SSH connection.
By default only first five VTYs connections are enabled.
Without configuring, when you try to connect them remotely you will
get following message
Password required but none set
R1>enable
R1#config t
Enter configuration commands, one per
line. End with CNTL/Z.
R1(config)#line vty 0 4
R1(config-line)#password telpass
R1(config-line)#login

Command

Description

Router(config)#line vty 0 4

Move into all five VTYs line

Router(config-line)#password
TELCNN

Set password to telpass on all


five lines

Router(config-line)#login

Configure VTYs to accept


telnet connection

Secure privilege exec mode with password


Along with access lines we can also secure privilege exec mode with
password. We have two commands to configure the password.
1. Switch(config)# enable password Privilege_EXEC_password
2. Switch(config)# enable secret Privilege_EXEC_password
Both commands will set the password on privilege exec mode. Difference
between these commands is the method of password storage. enable
password command will store password in plain text while enable
secret command will store password in encryption format.

Assign hostname to IP Address


Hostname are easy to remember. We can use host
name instead of their IP address while connecting with
remote address. Router resolves IP address to
hostname in two ways: static and dynamic.
In static method we have to assign hostname to IP
address.
In dynamic method we have to configure an external
DNS server and need to configure its IP address on
router.
show hosts command will display the
configured hosts with their IP addresses.

currently

Configure FastEthernet Interface in router


Usually FastEthernet connects local network with router. Following
commands will configure FastEhternet 0/0 interface.
R1(config)#interface fastethernet0/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown

Configure serial interface in router


R1(config)#interface Serial0/0/0
R1(config-if)#ip address 192.168.0.253
255.255.255.252
R1(config-if)#clock rate 64000
This command applies only to DCE
interfaces
R1(config-if)#bandwidth 64
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#

Command

Description

Router(config)#interface serial Enter into serial interface


0/0/0
0/0/0 configuration mode
Router(config-if)#description
Connected to bhilwara

Optional command. It set


description on interface that is
locally significant

Router(config-if)#ip address
192.168.0.253
255.255.255.252

Assigns address and subnet


mask to interface

Router(config-if)#clock rate
64000

DCE side only command.


Assigns a clock rate for the
interface

Router(config-if)#bandwidth
64

DCE side only command. Set


bandwidth for the interface.

Router(config-if)#no shutdown Turns interface on

Command

Description

Router(config)#line console 0

Move in console line mode

Router(config-line)#password
console

Set console line password to


pass

Router(config-line)#login

Enable password
authentication for console line

Saving running configuration in cisco router


R1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
R1#

Router is a critical device of network. It supports multiple lines for


connection. We need to secure each line [port].