Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lab Manual Computer Network

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Department of Computer Science & Engineering

LAB MANUAL

B.Tech. (Computer Science and Engineering)

Subject Name : - Computer Network

Subject Code : - CS306

INTEGRAL UNIVERSITY LUCKNOW


Dasauli, Kursi Road, PO Basha-226026
Experiment No. Objective Page No.

1 Introduction & Installation to Packet Tracer 1-26

2 Simulation of Basic Router Configuration 27

Simulation of Setting up Router Name and Password


3 28

4 Simulation of Setting up telnet 29-30

5 Simulation of MOTD and Login Banner 31

6 Simulation setting up two router communication 32-33

Simulation Setting up DHCP(Dynamic Host Configuration


7 34-35
Protocol)

8 Simulation Setting up Routing Information Protocol 36-37

Simulation of CISCO Port Security.


9 38

Simulation of Add VLAN in Switch


10
39

11 Simulation of Spanning Tree Protocol 40-42


Experiment No-1

Object: - Introduction & Installation to 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, 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

Single click on the End Devices.

Single click on the Generic host.

Move the cursor into topology area. You will notice it turns into a plus “+” sign.

Single click in the topology area and it copies the device.

Add three more hosts.

3
1
Step 4: Building the Topology – Connecting the Hosts to Hubs and
Switches

Adding a Hub

Select a hub, by clicking once on Hubs and once on a Generic hub.

Add the hub by moving the plus sign “+” below PC0 and PC1 and click once.

Connect PC0 to Hub0 by first choosing Connections.

Click once on the Copper Straight-through cable.

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

Select a switch, by clicking once on Switches and once on a 2950-24 switch.

Add the switch by moving the plus sign “+” below PC2 and PC3 and click once.

Connect PC2 to Hub0 by first choosing Connections.

Click once on the Copper Straight-through cable.

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.

Note: Spanning Tree Protocol (STP) is discussed later.

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

the devices. Click once on PC0.

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

Verify the information

To verify the information that you entered, move the Select tool (arrow) over each host.

Deleting a Device or Link

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.

Move the Connections cursor over Hub0 and click once.

Select Port 5 (actual port does not matter).

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

Be sure you are in Real-time mode.

Select the Add Simple PDU tool used to ping devices..

Click once on PC0, then once on PC3.

The PDU Last Status should show as Successful.

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:

Click Delete in the PDU area.

Now, Power Cycle Devices and confirm the action.

Waiting for Spanning Tree Protocol (STP)

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

Be sure you are in Simulation mode.

Deselect all filters (All/None) and select only ICMP.

15
Select the Add Simple PDU tool used to ping devices..

Click once on PC0, then once on PC3.

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

Opening Existing PT Topologies

18
Minimum configuration for Packet Tracer 6.2

The following configuration is the minimum system requirements recommended by Cisco to


successfully install and run Packet Tracer 6.2:

CPU: Intel Pentium 4, 2.53 GHz or equivalent


OS: Microsoft Windows 7, 8.1, 10, Ubuntu Linux 16.04 LTS (Ubuntu 12.04 or 14.04 LTS not
supported anymore)
RAM: 2 GB
Storage: 1.4 GB of free disk space
Display resolution: 1024 x 768
Language fonts supporting Unicode encoding (if viewing in languages other than English)
Latest video card drivers and operating system updates

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

file downloaded. Once below Window will appears, click “Next”

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

Object: - Simulation of Basic Router Configuration

Required software: Cisco Packet Tracer 6.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

Object: - Simulation of Setting up Router Name and Password

Required software: Cisco Packet Tracer 6.2.

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

Object: - Simulation of Setting up telnet

Required software: Cisco Packet Tracer 6.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
Router(config-if)#line vty 0
Router(config-line)#password 123
Router(config-line)#login
Verification of telnet :-

29
30
Experiment No-5

Object:- Simulation of MOTD and Login Banner

Required software: Cisco Packet Tracer 6.2.

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

Object: - Simulation setting up two router communication

Required software: Cisco Packet Tracer 6.2.

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

Object:- Simulation Setting up DHCP(Dynamic Host Configuration Protocol).

Required software: Cisco Packet Tracer 6.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
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

Object:- Simulation Setting up Routing Information Protocol

Required software: Cisco Packet Tracer 6.2.

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

Object: Simulation of CISCO Port Security.

Required software: Cisco Packet Tracer 6.2.

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

Object: Simulation of Add VLAN in Switch

Required software: Cisco Packet Tracer 6.2.

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

Object: Simulation of Spanning Tree Protocol

Required software: Cisco Packet Tracer 6.2.

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

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 000A.411D.B169
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- -------------------
Fa0/11 Desg FWD 19 128.11 P2p
Fa0/2 Desg FWD 19 128.2 P2p

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

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 00E0.A384.D91B
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- -------------------
Fa0/17 Desg FWD 19 128.17 P2p
Fa0/21 Root FWD 19 128.21 P2p

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

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0040.0B76.9338
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- -------------------
Fa0/20 Root FWD 19 128.20 P2p
Fa0/21 Altn BLK 19 128.21 P2p

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

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0060.472E.BB4D
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type


---------------- ---- --- --------- -------- -------------------
Fa0/2 Root FWD 19 128.2 P2p
Fa0/3 Desg FWD 19 128.3 P2p

42

You might also like