Packet Tracer Lab: Using Packet Tracer To Build A Network: One Three
Packet Tracer Lab: Using Packet Tracer To Build A Network: One Three
Reference: https://fas-web.sunderland.ac.uk/~cs0ssw/PacketTracerTutorial.pdf.
We will be using Packet Tracer today to create the following network.
This topology requires one 2811 router, two 2960 switches and three workstations.
Launch Packet Tracer then drag a 2811 router icon onto the white area of the screen.
Select the
Drag three Generic
WorkStation
Workstations onto the
Icon here
working area
Our Router now needs an upgrade. Left click on the router G1R1. The following window should now
appear
We can now add cables to our topology. Left click on the cable icon shown below then select a
straight through cable (which is represented by a solid black line)
Cable Icon
Left Click on the straight
through cable icon
Now left click on router G1R1. A list of interfaces should appear. Left click on Fa0/0. Now Left click
on switch G1S1. Another list of interfaces should appear. Select Fa0/1. Once this is done, a solid
black line should appear on the screen as shown below. This line represents a straight through patch
cable.
If you want the interface labels to appear on the screen all the time then choose Options followed by
Preferences then select the check box next to Always show port labels.
Add additional cables until the network looks like this
The table below shows the cables connections you must use to complete the wiring for this network
The screenshot on the following pages shows the finished wiring plan. Check over your work to make
sure that everything is correct before proceeding.
If you make a mistake and choose the wrong cable type or you connect the cables to the wrong
interfaces then use the Delete icon shown below to delete your mistakes
Delete Icon
You are now ready to start configuring your Router. Left click on Router G1R1 then select the CLI
tab shown below:
Press Enter again and the screen should now look like this
Enter enable to move to Privileged mode then type configure terminal to enter Global Configuration
mode. You will know you are in Global Configuration Mode because the prompt will have changed to
Router(config)#
It is from Global Configuration mode that we enter commands that affect the whole router. It is
also from here that we enter specialist modes used to configure particular aspects of the router.
Type the command hostname G1R1 then press Enter. You have now changed the name of the device.
This should be evident from the prompt which should now be G1R1(Config)# The screenshot below
contains the commands described above.
We must now configure the interfaces labelled fa0/0 and fa0/1 on our router. Each interface must
be given an IP address and must be activated.
Issue the command interface fa0/0 then press Enter. The prompt should now have changed to
G1R1(config-if)# which indicates that the router is now in interface configuration mode. Any
command issued now will apply to the interface fa0/0.
The table below identifies the interface labels, IP addresses and subnet masks for router G1R1
no shutdown
You should receive a message indicating that the interface is now active as shown in the screen shot
below
Type exit then press Enter to return to Global Configuration mode. Now configure interface fa0/1
by issuing the following commands:
Interface fa0/1
No shutdown
Return to Global Configuration mode by issuing the exit command again. Your screen should look
something like the one on the following page
It would be a good idea at this stage to save our configuration. This must be done from Privileged
mode. We are currently in Global Configuration Mode. Type exit then press enter to return to
Privileged mode. The Prompt should change to G1R1# Now issue the command
Press Enter to confirm. Your screen should now look like this
We will now turn our attention to switch G1S1. Left click on its icon. The following screen should
appear. If you cannot see the prompt, press the enter key until it appears.
Type enable then press Enter to move to Privileged mode. The prompt should have change to
Switch#
Now type configure terminal to move to Global Configuration mode. The prompt should have changed
to Switch(config)#
Hostname G1S1
The prompt should have changed to G1S1(config)# and the screen should look like the one shown
below:
We are going to logically divide this switch into two. Ports fa0/1 to fa0/12 will be reserved for Light
Weight Access Points (LWAPs). Ports fa0/13 to fa0/24 will be reserved for wired PCs. As Packet
Tracer doesn’t support LWAPs we will pretend that PC 1 is an access point.
A switch may be logically segmented by building VLANs (Virtual Local Area Networks) and by
assigning ports to VLANs. If two ports are in different VLANs then direct communication between
them is not allowed. Communication between VLANs must be controlled by a router.
Vlan 6
The switch should now have created vlan 6 and the prompt should have changed to
G1S1(config-vlan)#
Which indicates that you have entered VLAN Configuration mode. The screen should look like this
You must now give your vlan its name by issuing the command
name LWAP
Issue the exit command to return to Global Configuration mode then create vlan 7 and assign it the
name Wired. The screenshot below holds the commands you must use.
Type exit and press enter to return to Privileged mode then issue the command show vlan brief to
verify that our VLANs have been created and given the correct names. The screen should contain the
following output:
At present all of our ports are in the default VLAN which is VLAN 1. We must now move 12 of them
to join VLAN 6 and 12 to join VLAN 7.
Enter configure terminal to return to Global Configuration Mode. Now issue the command below
The prompt should have changed to G1S1(Config-range-if)# The range option allows us to assign a
number of commands to a group of interfaces. Now issue the commands below:
exit
The first command tells the switch that each port in the range will belong to just one VLAN. The
second command tells the switch that each port in the range will be assigned to VLAN 6. The third
command returns you to Global Configuration mode.
Exit
to confirm that the interfaces have been moved to the correct VLANs. Your screen should now look
like this:
It is now time to assign IP addresses to our Workstations PC1 and PC0 so that they can participate in
the network. Left click on the icon for PC1. The following window should appear
Left click on the IP Configuration button (see diagram above). You should now see the following
window:
Enter the information shown above. Please note that PC1 is attached to switch port Fa0/2. This port
is in VLAN 6 and can communicate with any port in VLAN 6. Router G1R1 is also attached to the
switch via VLAN 6 through its fa0/0 interface. This means that PC1 will be able to communicate with
the router via its Fa0/0 interface.
If this is to happen, the PC must belong to the same subnet as the router’s Fa0/0 interface. The
Fa0/0 interface of G1R1 has IP address 10.0.6.1 and subnet mask 255.255.255.0 We have assigned
PC1 an unused IP address from the same subnet (address 10.0.6.2). The PC must also have the same
subnet mask as the router if they are to communicate. That is why the PC’s mask was set to
255.255.255.0
The Default Gateway is the IP address of a router that the PC can reach. It must be part of the PC’s
own subnet – the only candidate is 10.0.6.1 which is the IP address of G1R1’s fa0/0 interface.
Close this window then select the PC0. Repeat the process outlines above to assign PC0 the following
IP address, subnet mask and default gateway.
Please note the PC0 is attached to the switch G1S1 via port fa0/13 which is in VLAN 7. It can
therefore communicate directly with any device also plugged into VLAN 7. The router G1R1 is
connected to VLAN 7 via its f0/1 interface. This interface has IP address 10.0.7.1. If PC0 is to be
able to communicate with the router it must be assigned an IP address that belongs to the same
subnet as Fa0/1 on G1R1.
The IP address 10.0.7.2 is the first unused IP address from the subnet associated with Fa0/1 of
G1R1. The PC must also have the same subnet mask as the router if they are to communicate. That is
why the PC’s mask was set to 255.255.255.0
The Default Gateway is the IP address of a router that the PC can reach. It must be part of the PC’s
own subnet – the only candidate is 10.0.7.1 which is the IP address of G1R1’s fa0/1 interface.
Our two PCs should be able to communicate with each other now through the router – they cannot
communicate directly through the switch as they belong to two separate VLANs. Traffic from PC0
will be sent to Fa0/1 of router G1R1. From there the router will route the traffic out of fa0/0 back
to the switch. The switch will then forward the traffic to PC1.
We can test this using the ping command. Navigate to the following window for PC1 then select the
Command Prompt button (see below).
The screenshot below shows you what you should be seeing. If you cannot see any replies then ask
your lecturer to examine your configuration.
Please note that the first “ping” will often timeout (no reply) because it takes a finite amount of time
for the initial connection to be established. This is normal.
Now configure Switch G1S2. You will have to:
Use the show vlan brief command to verify that switch G1S2 has been successfully configured. The
output should look like this:
The Router G1R1 also contains a four port switch. This was the module that we added to the router at
the beginning of the tutorial. This module must now be configured to operate with the router and the
rest of the network.
Packet Tracer requires us to build the VLANs on the router. Navigate to Privileged mode on router
G1R1 then issue the command
Vlan database
This command accesses the mode from where we build VLANs on a router. The prompt should have
changed to G1R1(vlan)#
Issue the command vlan 2 name Management This will create VLAN 2 and assign its name. Repeat this
command for VLANs 3, 4 and 5. Refer to the table on Page 21 for the VLAN names. Your screen
should now look like this:
Type exit then press Enter to return to Privileged mode. We cannot assign IP addresses directly to
the ports within the switch module as they don’t support this function. We must instead create
virtual interfaces for each VLAN that operate through the ports.
Move to Global Configuration mode then issue the commands below to create a virtual interface that
works with VLAN 2.
Interface vlan 2
No shutdown
Exit
Now repeat this process to create virtual interfaces for VLANs 3, 4 and 5. Use the information
within the table below:
This command identifies the name, IP address and status of each interface as shown below:
Port Fa0/1/0 on router G1R1 is the only switch port currently in use. It must be configured to carry
traffic for VLANs 2, 3, 4 and 5 so that our virtual interfaces will be able to work. A switch port will
normally only carry traffic for one VLAN. Such a port is called an Access Port. We have already
configured many Access Ports on our two switches (G1S1 and G1S2).
Sometimes, as in this instance, a switch port must carry traffic for more than one VLAN. Such a port
is called a Trunk port. We must configure port Fa0/1/0 on G1R1 as a Trunk. We must also configure
port Fa0/1 on Switch G1S2 as a trunk since it must also send and receive traffic from several
VLANs.
Move to Global Configuration mode on router G1R1 the issue the following commands
Interface fa0/1/0
No shutdown
Exit
As soon as you entered the command no shutdown you should have seen the four virtual interfaces
activate as in the screenshot below:
This should indicate that port Fa0/1/0 is a trunk port and is now carrying traffic for multiple
VLANs. Your screen should look like this:
Go to Switch G1S2 and access Global Configuration mode. Now issue the commands below
Interface fa0/1
Exit
Now access Privileged mode and issue the command below to verify that interface fa01 is now
configured as trunk
The only thing left to do is to assign PC2 an IP address, subnet mask and default gateway so that it
may properly join the network. PC2 is attached to switch G1S2 by port fa0/2 which is assigned to
VLAN 2. Switch G1S2 is connected to the router G1R1 via a trunk port which will carry all VLANs
including VLAN 2. The VLAN 2 virtual interface on router G1R1 has been assigned the IP address
10.0.2.1 so PC2 must be given a spare IP address from this subnet if it is to be able to connect to the
network. We will assign it the IP address 10.0.2.2 with mask 255.255.255.0. The default gateway
should be the router IP Address from this subnet which is 10.0.2.1
Configure PC2 accordingly then use the ping command to verify that it can communicate with PC0 and
PC1.
Save your configurations. Go to Privileged mode on G1R1, G1S1 and G1S2 and issue the command
Now Save your Packet Tracer configuration. The Save command is accessed from the File menu on
the Packet Tracer main window.
You may view your complete configuration by accessing Privileged mode on a router or a switchand
then issuing the command
Show running-config
Here is a partial configuration taken from router G1R1 using this command.