0% found this document useful (0 votes)
41 views25 pages

Deep CN

Uploaded by

atharvakakade259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views25 pages

Deep CN

Uploaded by

atharvakakade259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

DYPIU

D Y Patil International University Akurdi, Pune

Second Year B.Tech. CSE

Computer Networks (CSE 2104)

Lab Manual

1
DYPIU
D Y Patil International University Akurdi, Pune
Vision of the University:
To Create a vibrant learning environment – fostering innovation and
creativity, experiential learning, which is inspired by research, and focuses
on regionally, nationally and globally relevant areas.

Mission
– To provide a diverse, vibrant and inspirational learning environment.
– To establish the university as a leading experiential learning and
research-oriented center.
– To Become a responsive university serving the needs of industry and
society.
– To embed internationalization, employability and value thinking.

Computer Networks
Course Objectives:
– To understand the fundamentals of networking topologies. OSI, TCP/IP Model
– To illustrate the working and function of Physical and data link layer
– To analyze different routing algorithms
– To understand UDP and TCP protocol.
– To demonstrate socket programming

Course Outcomes:
– On completion of the course, learner will be able to
– CO1: Summarize the fundamental concepts of computer network, topologies,
– CO2: Illustrate the working functions of physical and data link layer.
– CO3: To illustrate different routing algorithms.
– CO4: Implement client server application.
– CO5: Illustrate any one automation system using cisco packet tracer.

Rules and Regulations for Laboratory:


– Students should be regular and punctual to all the Lab practical
– Lab assignments and practical’s should be submitted within a given time.
– Mobile phones are strictly prohibited in the Lab.
– Please shut down the Electronic Devices before leaving the Lab.
– Please keep the chair in proper position before leaving the Lab
– Maintain proper discipline in Lab
2
D Y Patil International University Akurdi, Pune
Computer Networks (CSE 2104)
Index
Sr. Title of the Experiment Date of Page No. Signature Remarks
Performance of TA
No.
From To
1. Exploring Different Network 05/02/2024 4 7
Topologies with Cisco Packet
Tracer.
2. Configuring Email, Web, and 12/02/2024 8 11
DHCP Servers with Cisco
Packet Tracer
3. Introduction to Physical 26/02/2024 12 15
View in Cisco Packet Tracer
4. Dynamic and Static Routing with 04/03/2024 16 19
Cisco Packet Tracer
5. Socket Programming and 01/04/2024 20 25
Wireshark

CERTIFICATE
This is to certify that Mr. Deep Salvi PRN No.20220802443 of B. tech CSE Class has completed
practical in the course of Computer Networks Second Year, within DYPIU Akurdi, Pune during the
academic year 2023 - 2024.

Date: 30/04/2024 Mr. Shubham Jagdale / Mr. Sanjay Badhe


Mr. Saransh Kushwaha

3
Experiment No. 1

Objec ve: Exploring Di erent Network Topologies with Cisco Packet Tracer.

So ware Required: Cisco Packet Tracer

Prerequisites: Basic understanding of networking concepts such as nodes, links, and


network protocols. Familiarity with Cisco Packet Tracer interface.

Theory:
1) Ring Topology -
– Objec ve: Build a network with a ring topology.
– Topology: Connect mul ple PCs or switches in a circular con gura on, ensuring
that each node has exactly two neighbors.
– Con gura on: Con gure IP addresses for devices. Test connec vity by sending data
packets around the ring.

2) Star Topology -
– Objec ve: Build a network with a Star topology.
– Topology: Connect mul ple PCs or switches to a central switch or router.
– Con gura on: Assign IP addresses to devices. Test connec vity between devices
and the central switch/router.

4
ft
fi
fi
ti
ti
ti
ti
ti
fi
ff
ti
ti
ti
fi
ti
ti
3) Bus Topology Objec ve -
– Objec ve: Construct a network with a bus topology.
– Topology: Connect mul ple PCs or switches in a linear arrangement, all sharing a
common communica on channel.
– Con gura on: Assign IP addresses to devices. Test data transmission along the bus.

4) Mesh Topology
– Objec ve: Implement a network with a mesh topology.
– Topology: Create a fully connected mesh network where every node is connected
to every other node.
– Con gura on: Assign IP addresses to devices. Test connec vity between any two
nodes within the mesh.

5
fi
fi
ti
ti
ti
ti
ti
ti
ti
ti
5) Hybrid Topology -

– Objec ve: Design a network with a hybrid topology.


– Topology: Combine elements of di erent topologies such as star, ring, and mesh to
form a hybrid network.
– Con gura on: Con gure IP addresses for devices. Test connec vity and analyze the
advantages of the hybrid approach.

6
fi
ti
ti
fi
ff
ti
6) Tree Topology
– Objective: Construct a network with tree topology.
– Topology: Build a hierarchical network structure resembling a tree, with a root
node and multiple branches.
– Configuration: Assign IP addresses to devices. Test data flows between nodes at
different levels of the tree.


Steps:
1. Take the required amount of switch and end devices to represent respec ve
topology.
2. Connect them using the respec ve type of connector required.
3. Assign IP to every end device.
4. Use CPT protocol data unit to check the connec on is properly established or not.

Conclusion:

7
ti
ti
ti
Experiment No. 2

Objec ve: The objec ve of this lab is to guide through the process of con guring
Email, Web, and DHCP servers using Cisco Packet Tracer.

Prerequisites: Basic understanding of networking concepts such as IP addressing and


server administra on. Familiarity with Cisco Packet Tracer interface.

So ware Required: Cisco Packet Tracer

Theory:

1: DHCP Server Con gura on


Objec ve: Set up a Dynamic Host Con gura on Protocol (DHCP) server to
automa cally assign IP addresses to network devices.
Topology: Create a network topology with PCs and a router. Introduce a DHCP server
connected to the router.
Con gura on: Con gure DHCP server se ngs such as IP address range, subnet mask,
default gateway, and DNS server. Test DHCP func onality by connec ng new devices
to the network and verifying IP address assignment.

8
ft
fi
ti
ti
ti
ti
ti
fi
fi
ti
ti
fi
tti
ti
ti
ti
fi
2: Email Server Con gura on
Objec ve: Con gure an Email server to send and receive emails within the network.
Topology: Expand the exis ng network topology with a dedicated Email server.
Connect Email clients (PCs) to the network.
Con gura on: Set up Email accounts, domains, and mailboxes. Test Email func onality
by sending and receiving emails between clients.

3: Web Server Con gura on


Objec ve: Set up a Web server to host and serve web pages over the network.
Topology: Further expand the network topology with a Web server. Connect Web
clients (PCs) to the network.
Con gura on: Install and con gure a Web server so ware (e.g., Apache, Microso
IIS). Create and upload web pages to the Web server's root directory. Test Web server
func onality by accessing hosted web pages from client PCs.

4: FTP Server Con gura on


Objec ve: Set up a FTP server to transfer les from one client to another client within
a network.
Topology: Further expand the network topology with a FTP server. Connect clients
(PCs) to the network.

Con gur on: Install and con gure a FTP server through command prompt by wri ng
command “ p <ip_add_ pserver>”. Then,Enter username and password. Test FTP
server func onality.

Output:
1. Email

9
fi
fi
fi
ti
ti
ti
ti
ti
ti
ti
ti
ft
fi
fi
fi
fi
ti
ft
ti
ti
ti
fi
fi
fi
ft
ti
tti
ft
2. FTP

10
3. DHCP

4. WEB

Conclusion:

11
Experiment No.3

Objec ve: The objec ve of this lab is to introduce you to the physical aspects of
networking using Cisco Packet Tracer, including devices, cables, and connec ons.

Prerequisites: Basic understanding of networking concepts such as devices, cables,


and network topologies. Familiarity with Cisco Packet Tracer interface.

So ware Required: Cisco Packet Tracer

Theory:
1: Basic Device Con gura on
Objec ve: Familiarize students with di erent networking devices and their physical
characteris cs.
Topology: Create a simple network topology with devices such as routers, switches,
PCs, and servers.
Con gura on: Drag and drop various devices onto the workspace. Examine the
physical a ributes of each device, including ports, interfaces, LEDs, and chassis.

2: Cable Types and Connec ons


Objec ve: Learn about di erent types of cables and how to make physical connec ons
between devices.
Topology: Expand the exis ng network topology with addi onal devices. Add cables
(Ethernet, serial, console) to establish connec ons between devices.
Con gura on: Select appropriate cable types for di erent connec ons (e.g., straight-
through, crossover). Prac ce making physical connec ons by connec ng devices with
cables.

3: Rack View Con gura on


Objec ve: Understand how devices are mounted in racks and organized within
network cabinets.
Topology: Create a rack or network cabinet using Packet Tracer's rack view feature.
Mount devices such as switches, routers, and servers in the rack.
Con gura on: Arrange devices in the rack according to standard prac ces (e.g., rack
units, cable management). Label devices and cables for easy iden ca on.

12
ft
fi
fi
fi
ti
ti
ti
ti
ti
ti
ti
tt
ti
fi
fi
ti
ti
ti
ff
ti
ti
ti
ff
ti
ff
ti
ti
ti
ti
fi
ti
ti
ti
ti
ti
4: Wall Mount and Patch Panel Con gura on
Objec ve: Learn about wall-mounted equipment and the use of patch panels for
e cient cable management.
Topology: Expand the exis ng network topology with wall-mounted devices and patch
panels. Include addi onal switches, servers, and PCs as needed.
Con gura on:
1) Wall Mount Installa on: Iden fy loca ons for wall-mounted equipment such as
switches and patch panels in the topology. Mount switches and patch panels securely
on the walls using Packet Tracer's wall mount feature. Ensure proper alignment and
spacing for easy access and cable management.
2) Patch Panel Connec on: Introduce patch panels into the network topology and
connect them to switches using Ethernet cables. Use appropriate patch panel ports for
incoming and outgoing connec ons. Organize and label cables neatly within the patch
panel.
3) Cable Management: Route Ethernet cables from devices to the patch panels
e ciently, maintaining proper cable lengths. U lize cable management accessories
such as cable es or Velcro straps to bundle and organize cables. Ensure cables are
neatly arranged and do not obstruct access to devices or patch panels.
4) Tes ng and Veri ca on: Verify connec vity between devices by tes ng network
connec ons through the patch panel. Conduct cable tes ng to ensure proper
termina on and connec vity. Troubleshoot any connec vity issues and make
necessary adjustments to cable connec ons.

Output :

13
ffi
ffi
fi
ti
ti
ti
ti
ti
ti
fi
ti
ti
ti
ti
ti
ti
ti
ti
fi
ti
ti
ti
ti
ti
ti
ti
ti
14
Steps:
1. Accessing the Physical View:
– Open Cisco Packet Tracer.By default, you'll be in the Logical View, which shows a
simpli ed layout of your network devices.
– Click the Physical View bu on located behind the Logical View bu on in the top
le corner of the workspace.

2. Naviga ng the Physical View:


– The default view might show the Intercity container, represen ng a broader
geographical area.
– Use the naviga on panel on the right to zoom in and out, change your loca on
(e.g., Home City, Building), and explore di erent containers within your network.

3. Placing Devices in Containers:


– Drag and drop network devices (switches, routers, PCs) from the Device Inventory
onto the desired container within the Physical View.
– You can move exis ng devices in the Logical View by right-clicking them and
selec ng "Go to Physical View."
– Use your mouse to posi on the devices within the container to re ect their
physical placement.

4. Switching Back to Logical View:


– Click the Logical View bu on at any me to return to the tradi onal network
device layout. The physical placement of devices in the Physical View is re ected in
their posi ons within the Logical View.

Conclusion:

15
ft
ti
fi
ti
ti
ti
ti
ti
tt
tt
ti
ff
ti
ti
tt
fl
fl
ti
Experiment No.4

Objec ve: The objec ve of this lab manual is to introduce you to dynamic and sta c
rou ng protocols using Cisco Packet Tracer.

Prerequisites: Basic understanding of networking concepts such as IP addressing,


subne ng, and rou ng. Familiarity with Cisco Packet Tracer interface.

So ware Required: Cisco Packet Tracer

Theory:
1: Sta c Rou ng
– Con gura on Objec ve: Con gure sta c routes to establish network
communica on between mul ple networks.
– Topology: Create a network topology with mul ple routers and subnets. Ensure
each network is connected to a router.
– Con gura on: Con gure sta c routes on routers. Test connec vity between
devices in di erent networks by sending packets or using ping commands.

16
ft
ti
fi
fi
ti
ti
tti
ti
ti
ti
ff
ti
fi
ti
ti
ti
ti
fi
ti
ti
ti
ti
ti
2: RIP (Rou ng Informa on Protocol)
– Con gura on Objec ve: Con gure RIP rou ng protocol to enable dynamic rou ng
between routers.
– Topology: Expand the exis ng network topology with addi onal routers. Remove
sta c routes if con gured in sta c rou ng.
– Con gura on: Enable RIP rou ng protocol on routers. Con gure RIP and network.
Test dynamic rou ng by introducing new networks and verifying automa c route
propaga on.

Output:

17
ti
fi
fi
ti
ti
ti
ti
ti
fi
ti
ti
ti
fi
ti
ti
ti
ti
ti
fi
ti
ti
18
Conclusion:

19
Experiment No.5

Objec ve: Socket Programming and Wireshark

So ware Required: Wireshark, python 3.9+, VS Code

Theory:
Wireshark
– Wireshark is a packet sni er and analysis tool. It captures network tra c from
ethernet, Bluetooth, wireless (IEEE.802.11), token ring, and frame relay
connec ons, among others, and stores that data for o ine analysis.
– Note: A “packet” is a single message from any network protocol (e.g., TCP, DNS,
etc.).
– LAN tra c is in broadcast mode, meaning a single computer with Wireshark can
see tra c between two other computers. To see tra c to an external site, you
need to capture the packets on the local computer.
– Wireshark allows you to lter the log before the capture starts or during analysis,
so you can narrow down and zero in on what you’re looking for in the network
trace. For example, you can set a lter to see TCP tra c between two IP addresses,
or you can set it only to show you the packets sent from one computer. The lters
in Wireshark are one of the primary reasons it has become the standard tool for
packet analysis.
Download: h p://www.wireshark.org/download.html

Socket Programming
– Sockets and the socket API are used to send messages across a network. They
provide a form of inter-process communica on (IPC). The network can be a logical,
local network to the computer, or one that’s physically connected to an external
network, with its own connec ons to other networks.
– A network socket is an endpoint of an inter-process communica on ow across a
computer network. Sockets may communicate within a process, between
processes on the same machine, or between processes on di erent con nents.
Today, most communica on between computers is based on the internet protocol;
therefore most network sockets are internet sockets. To create a connec on
between machines, Python programs import the socket module, create a socket
object, and call the object’s methods to establish connec ons and send and receive
data. Sockets are the endpoints of a bidirec onal communica ons channel.

20
ft
ti
ffi
ti
ffi
tt
ti
fi
ff
ti
fi
ti
ti
ffi
ffi
ffl
ti
ff
ti
ti
fl
ffi
ti
ti
fi
There are two basic types of communica on
• Streams (TCP): Computers establish a connec on with each other and read/write
data in a con nuous stream of bytes---like a le. This is the most common.
• Datagrams (UDP): Computers send discrete packets (or messages) to each other.
Each packet contains a collec on of bytes, but each packet is separate and self-
contained.
Client - Server Concept
• Each endpoint is a running program
• Servers wait for incoming connec ons and provide a service (e.g., web, mail, etc.)
• Clients make connec ons to servers

Server Code:

21
ti
ti
ti
ti
ti
fi
ti
Client Code:

Network/Packets Analysis
– Wireshark shows you three di erent panes for inspec ng packet data. The Packet
List, the top pane, lists all the packets in the capture. When you click on a packet,
the other two panes change to show you the details about the selected packet. You
can also tell if the packet is part of a conversa on. Here are details about each
column in the top pane:
– No.: This is the number order of the packet captured. The bracket indicates that
this packet is part of a conversa on.
– Time: This column shows how long a er you started the capture this par cular
packet was captured. You can change this value in the Se ngs menu to display a
di erent op on.
22
ff
ti
ff
ti
ft
ti
ti
tti
ti
➢ Source: This is the address of the system that sent the packet.
➢ Des na on: This is the address of the packet des na on.
➢ Protocol: This is the type of packet. For example: TCP, DNS, DHCPv6, or ARP
➢ Length: This column shows you the packet’s length, measured in bytes.
➢ Info: This column shows you more informa on about the packet contents, which
will vary depending on the type of packet.

Flags Associated with the packets.


1. (SYN): Synchronize
2. This ag is set to 1 in the ini al packet sent from the client to the server when
establishing a TCP connec on. It's used to ini ate a connec on and synchronize
sequence numbers between the two endpoints.
3. (FIN): Finish
4. When set to 1, this ag indicates that the sender has nished sending data and
wants to close the connec on. It's part of the connec on termina on process.
5. (ACK): Acknowledgment
6. This ag signi es that the ACK number in the TCP header is acknowledging the data
received from the other endpoint. It's used in the establishment, maintenance, and
termina on phases of a TCP connec on.
7. (PSH): Push
8. When set, the PSH ag tells the receiving endpoint to push the data to the
receiving applica on immediately without wai ng for the bu er to ll up. This is
used to ensure that data is processed quickly.
9. (URG): Urgent
10.The URG ag indicates that the segment contains urgent data, and it should be
processed immediately. The loca on of the urgent data within the segment is
de ned by the urgent pointer eld of the TCP header.
11.(RST): Reset
12.This ag is used to forcibly abort a connec on in response to an error or to reject
an invalid segment. It can also be used to refuse a connec on request.
13.Three-way Handshake
14.Step 1 (SYN): In the rst step, the client wants to establish a connec on with a
server, so it sends a segment with SYN (Synchronize Sequence Number) which
informs the server that the client is likely to start communica on and with what
sequence number it starts segments with
15.Step 2 (SYN + ACK): Server responds to the client request with SYN-ACK signal bits
set. Acknowledgement (ACK) signi es the response of the segment it received, and
SYN signi es with what sequence number it is likely to start the segments with
16.Step 3 (ACK): In the nal part client acknowledges the response of the server and
they both establish a reliable connec on with which they will start the actual data
transfer.
23
fi
ti
fl
fl
fl
ti
ti
fi
fl
fi
ti
fl
fl
fi
fi
ti
ti
ti
fi
ti
fi
ti
ti
ti
ti
ti
ti
ti
ti
ti
fi
ti
ti
ff
ti
ti
fi
ti
Steps:
– Run the server.py on a machine.
– Now run the client.py on another machine and enter the IP address of the server
machine and make sure wireshark is running and capturing packets in the
background.
– A er establishing the connec on send 3-4 to server
– Now go to wireshark and stop capturing packets, then apply the display lter
“ip.dst==’server ip’” to nd the packets which where send to server from client
– A er nding all the packets which were sent to server, analyze the packets, nd the
ags associated with packets and the original message sent.

Output:
Client Side

Server Side
Wireshark

24
fl
ft
ft
fi
fi
ti
fi
fi
Conclusion:

25

You might also like