Lab Manual Computer Network
Lab Manual Computer Network
Lab Manual Computer Network
LAB MANUAL
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, layer 3 protocols
such as IP, ICMP, and ARP, and 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 Enter Simulation Mode
Step 2: Choosing Devices and Connections
We will begin building our network topology by selecting devices and the media in which to connect
them. Several types of devices and network connections can be used. For this lab we will keep it simple
by using End Devices, Switches, Hubs, and Connections.
Single click on each group of devices and connections to display the various choices. The devices you
see may differ slightly.
2
Step 3: Building the Topology – Adding Hosts
Move the cursor into topology area. You will notice it turns into a plus “+” sign.
3
1
Step 4: Building the Topology – Connecting the Hosts to Hubs and
Switches
Adding a Hub
Add the hub by moving the plus sign “+” below PC0 and PC1 and click once.
4
Perform the following steps to connect PC0 to Hub0:
1. Click once on PC0
2. Choose Fast Ethernet
3. Drag the cursor to Hub0
4. Click once on Hub0 and choose Port 0
5. Notice the green link lights on both the PC0 Ethernet NIC and the Hub0 Port 0 showing that the link is
active.
1 2 3 4
5
Repeat the steps above for PC1 connecting it to Port 1 on Hub0. (The actual hub port you choose does not
matter.)
5
Adding a Switch
Add the switch by moving the plus sign “+” below PC2 and PC3 and click once.
6
Perform the following steps to connect PC2 to Switch0:
1. Click once on PC2
2. Choose Fast Ethernet
3. Drag the cursor to Switch0
4. Click once on Switch0 and choose FastEthernet0/1
5. Notice the green link lights on PC2 Ethernet NIC and amber light Switch0 FastEthernet0/1 port. The
switch port is temporarily not forwarding frames, while it goes through the stages for the Spanning Tree
Protocol (STP) process.
6. After a about 30 seconds the amber light will change to green indicating that the port has entered the
forwarding stage. Frames can now forward out the switch port.
1 2 3 4 5
6
Repeat the steps above for PC3 connecting it to Port 3 on Switch0 on port FastEtherent0/2. (The actual
switch port you choose does not matter.)
Move the cursor over the link light to view the port number. Fa means Fast Ethernet, 100 Mbps Ethernet.
7
Step 5: Configuring IP Addresses and Subnet Masks on the Hosts
Before we can communicate between the hosts we need to configure IP Addresses and Subnet Masks on
Choose the Config tab and click on Settings. It is here that you can change the name of PC0. It is also here
where you would enter a Gateway IP Address, also known as the default gateway and the DNS Server IP
Address. We will discuss this later, but this would be the IP address of the local router. If you want, you can
enter the Gateway IP Address 172.16.1.1 and DNS Server IP Address 172.16.1.100, although it will not be
used in this lab.
8
9
To close this dialog box, click the “X” in the upper right.
Repeat these steps for the other hosts. Use the information below for IP Addresses and Subnet
Masks.
Host IP Address Subnet
PC0 172.16.1.10 255.255.0.
Mask
PC1 172.16.1.11 0
255.255.0.
PC2 172.16.1.12 0
255.255.0.
PC3 172.16.1.13 0
255.255.0.
0
To verify the information that you entered, move the Select tool (arrow) over each host.
To delete a device or link, choose the Delete tool and click on the item you wish to delete.
10
Step 6: Connecting Hub0 to Switch0
To connect like-devices, like a Hub and a Switch, we will use a Cross-over cable. Click once the Cross-
over Cable from the Connections options.
11
Move the Connections cursor to Switch0.
Click once on Switch0 and choose FastEthernet0/4 (actual port does not matter).
The link light for switch port FastEthernet0/4 will begin as amber and eventually change to green as the
Spanning Tree Protocol transitions the port to forwarding.
12
Step 7: Verifying Connectivity in Real-time Mode
13
Resetting the Network
At this point we will want to reset the network, whenever you want to reset the network and
begin the simulation again, perform the following tasks:
Note: Because Packet Tracer also simulates the Spanning Tree Protocol (later), at times the switch may show amber
lights on its interfaces. You will need to wait for the lights to turn green on the switches before they will forward any
Ethernetframes.
14
Step 8: Verifying Connectivity in Simulation Mode
15
Select the Add Simple PDU tool used to ping devices..
Continue clicking Capture/Forward button until the ICMP ping is completed. You should see the ICMP messages
move between the hosts, hub and switch. The PDU Last Status should show as Successful. Click on Clear Event List
if you do not want to look at the events or click Preview Previous Events if you do. For this exercise it does not
matter.
16
Step 9: Saving the Topology
Perform the following steps to save the topology (uses .pkt file extension).
17
Opening Existing Topologies
18
Minimum configuration for Packet Tracer 6.2
19
HOW TO INSTALL PACKET TRACER ON WINDOWS SYSTEM
Packet Tracer is a very useful Cisco network simulation tool which allows
network administrators and students to experiment with Cisco network device
behavior. Packet Tracer provides simulation and visualization capabilities
which facilitates the lab testing and learning of complex scenarios and concepts.
Packet Tracer does not require physical equipment. It creates a virtual network
with an almost unlimited number of devices, encouraging practice, design
scenarios testing and troubleshooting.
STEP 1 –
Once we have downloading the Packet Tracer exe file , Click on the exe
20
STEP 2 –
On next screen, select “I accept the agreement” and click on “Next”.
21
5
STEP 3 –
Setup will show the folder in which the program’s shortcuts will be created. If you want to change
the folder, you can change it. Click on “Next”.
22
STEP 4 –
Then the program will ask whether to create a Desktop icon and create a Quick Launch icon. Make
your choice and click on “Next”.
23
STEP 5 –
The summary of the settings we selected is displayed. Click on “Install”.
24
STEP 6 –The installation starts as shown below.
25
STEP 7 –Installation gets completed and the below screen is shown. Click
on “Finish”.
Click “OK” on next popup asking you to close or restart your computer.
26
Experiment No-2
Router>en
Router#config t
Router(config)#int fa0/0
Router(config-if)#ip address 192.168.8.1 255.255.255.0
Router(config-if)#no shut
27
Experiment No-3
Router(config-if)#hostname cse
cse(config)#enable password 123
cse(config)#enable secret 123456
cse(config)#line console 0
cse(config-line)#password 12345
cse(config-line)#login
cse(config)#line aux 0
cse(config-line)#password fft
cse(config-line)#login
28
Experiment No-4
Router>en
Router#config t
Router(config)#int fa0/0
Router(config-if)#ip address 192.168.8.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#line vty 0
Router(config-line)#password 123
Router(config-line)#login
Verification of telnet :-
29
30
Experiment No-5
MOTD-
Router>en
Router#config t
Router(config)#banner motd $ Authorised Access Only $
Router(config)#
Login-
Router>en
Router#config t
Router(config)#banner login $ Authorised Access Only $
Router(config)#
31
Experiment No-6
R-1
Router>en
Router#config t
Router(config)#int fa0/0
Router(config-if)#ip address 192.168.8.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#int se 2/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shut
R-2
Router>en
Router#config t
sRouter(config)#int fa0/0
Router(config-if)#ip address 192.168.9.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#int se 2/0
Router(config-if)#ip address 10.0.0.2 255.0.0.0
Router(config-if)#no shut
32
For R1:-
Router(config)#ip route 192.168.9.0 255.255.255.0
10.0.0.2
Router(config
For R2:-
Router(config)#ip route 192.168.8.0 255.255.255.0
10.0.0.1
Router(config)#
33
Experiment No-7
Router>en
Router#config t
Router(config)#int fa0/0
Router(config-if)#ip address 192.168.8.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#ip dhcp pool cse
Router(dhcp-config)#network 192.168.8.0
Router(dhcp-config)#network 192.168.8.0 255.255.255.0
Router(dhcp-config)#default-route 192.168.8.1
Router(dhcp-config)#dns 8.8.8.8
Router(dhcp-config)#
34
Router(config)#ip dhcp excluded-address 192.168.8.2
192.168.8.5
Router(config)#
35
Experiment No-8
R1:-
Router>en
Router#config t
Router(config)#int fa0/0
Router(config-if)#ip address 192.168.8.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#int se2/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shut
R2:-
Router>en
Router#config t
Router(config)#int fa0/0
Router(config-if)#ip address 192.168.9.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#int se2/0
Router(config-if)#ip address 10.0.0.2 255.0.0.0
Router(config-if)#no shut
Router(config-if)#int se3/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#no shut
R3:-
Router>en
Router#config t
Router(config)#int fa0/0
Router(config-if)#ip address 192.168.10.1
255.255.255.0
Router(config-if)#no shut
Router(config-if)#int se2/0
Router(config-if)#ip address 20.0.0.2 255.0.0.0
Router(config-if)#no shut
Router(config-if)#int se3/0
Router(config-if)#ip address 30.0.0.1 255.0.0.0
Router(config-if)#no shut
R4:-
Router>en
Router#config t
Router(config)#int fa0/0
Router(config-if)#ip address 192.168.11.1
255.255.255.0
Router(config-if)#no shut
Router(config-if)#int se 2/0.
Router(config-if)#int se 2/0
36
Router(config-if)#ip address 30.0.0.2 255.0.0.0
Router(config-if)#no shut
Router(config-if)#int se3/0
Router(config-if)#ip address 40.0.0.1 255.0.0.0
Router(config-if)#no shut
R5:-
Router>en
Router#config t
Router(config)#int f0/0
Router(config-if)#ip address 192.168.12.1
255.255.255.0
Router(config-if)#no shut
Router(config-if)#int se2/0
Router(config-if)#ip address 40.0.0.2 255.0.0.0
Router(config-if)#no shut
RIP configuration on R1:-
Router(config)#router rip
Router(config-router)#network 192.168.8.0
Router(config-router)#network 10.0.0.0
Router(config-router)#
RIP configuration on R2:-
Router(config)#router rip
Router(config-router)#network 192.168.9.0
Router(config-router)#network 10.0.0.0
Router(config-router)#network 20.0.0.0
Router(config-router)#
RIP configuration on R3:-
Router(config)#router rip
Router(config-router)#network 192.168.10.0
Router(config-router)#network 20.0.0.0
Router(config-router)#network 30.0.0.0
Router(config-router)#
RIP configuration on R4:-
Router(config)#router rip
Router(config-router)#network 192.168.11.0
Router(config-router)#network 30.0.0.0
Router(config-router)#network 40.0.0.0
Router(config-router)#
RIP configuration on R5:-
Router(config)#router rip
Router(config-router)#network 192.168.12.0
Router(config-router)#network 40.0.0.0
Router(config-router)#
37
Experiment No-9
Switch>en
Switch#config t
Switch(config)#hostname S1
S1(config)#int range fastEthernet 0/1-2
S1(config-if)# switchport mode access
S1(config-if)# switchport port-security
S1(config-if)# switchport port-security maximum 1
S1(config-if)# switchport port-security mac-address sticky
S1(config-if)# switchport port-security violation shutdown
S1(config-if-range)#exit
S1(config-if)#int range fa0/3-24
S1(config-if-range)#shutdown
38
Experiment No-10
Switch>en
Switch#config t
Switch(config)#vlan 2
Switch(config)#name cse
Switch(config)#valn 3
Switch(config)#name civil
Switch(config)#Vlan 4
Switch(config)#name application
Switch(config)#int fa0/0
Switch(config)#switchport mode access
Switch(config)#switchport access Vlan 2
Switch(config)#int range fa0/1-3
Switch(config)# switchport mode access
Switch(config)# switchport access Vlan 3
39
Experiment No-11
S1:-
Switch>en
Switch#sh spanning
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 000A.411D.B169
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
S2:-
40
Switch>en
Switch#sh spanning
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 000A.411D.B169
Cost 19
Port 21(FastEthernet0/21)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
S3:-
Switch>en
Switch#sh spanning
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 000A.411D.B169
Cost 38
Port 20(FastEthernet0/20)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
S4:-
Switch>en
Switch#sh spanning
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 000A.411D.B169
Cost 19
Port 2(FastEthernet0/2)
41
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
42