0% found this document useful (0 votes)
37 views26 pages

2445 CN Lab

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 DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views26 pages

2445 CN Lab

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 DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

DYPIU

D Y Patil International University Akurdi,


Pune

Second Year B.Tech. CSE

Computer Networks (CSE 2104)

Lab Manual

School of Computer Science Engineering and Applications


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

School of Computer Science Engineering and Applications


D Y Patil International University Akurdi, Pune
Computer Networks (CSE 2104)
Index
Sr. Title of the Experiment Date of Page No. Remarks
Performance Signature
No. of TA
From To

1. Introduction to CPT & 4 6


Wireshark
2. Exploring Different Network 7 10
Topologies with Cisco
Packet Tracer.

3. Configuring Email, Web, 11 13


and DHCP Servers with
Cisco Packet Tracer

4. Introduction to Physical View in 14 17


Cisco Packet Tracer

5. Dynamic and Static Routing with 18 21


Cisco Packet Tracer

6. Socket Programming and 22 26


Wireshark

CERTIFICATE
This is to certify that Mr. Ayush Gaykar, PRN No. 20220802255 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/4/24 TA Faculty

School of Computer Science Engineering and Applications


4

Experiment No.1

Objective: Introduction to CISCO Packet tracer, Networking components and


Wireshark.
Software Required: Cisco Packet Tracer, Wireshark

Prerequisites:
Basic definitions of end devices, hubs, network devices

Theory:
Cisco Packet Tracer
Cisco Packet Tracer is a powerful network simulation tool developed by Cisco
Systems. It's widely used for teaching, learning, and practicing networking concepts
in a virtual environment. Here's a basic introduction to Cisco Packet Tracer:
1. Simulation Environment: Cisco Packet Tracer provides a simulated environment
where users can create, configure, and troubleshoot networks without the need
for physical hardware. It allows users to design complex network topologies and
observe how data flows through them.
2. Networking Devices: Packet Tracer includes a wide range of Cisco networking
devices such as routers, switches, hubs, wireless devices, and end devices like
PCs and servers. Users can drag and drop these devices onto a workspace and
connect them to build their network. Protocols and Technologies: It supports
various networking protocols and technologies including Ethernet, TCP/IP,
OSPF, EIGRP, VLANs, DHCP, NAT, and more. Users can configure these
protocols on the devices to mimic real-world network behavior.
3. Visualization and Simulation: Packet Tracer offers visualization tools to help
users understand network operations better. Users can simulate data transfer,
monitor network traffic, and troubleshoot connectivity issues within the virtual
environment. Educational Tool: One of the primary purposes of Packet Tracer is
education. It's commonly used in networking courses and certifications (such as
Cisco's CCNA and CCNP) to provide hands-on experience with networking
concepts. Instructors can create lab exercises and assignments for students to
complete using Packet Tracer.
4. Community and Resources: Cisco Packet Tracer has a large community of users
who share resources, tutorials, and network designs. This community aspect
enhances the learning experience and provides support for users at all levels.
5. Free Version: There's a free version of Packet Tracer available for students,
educators, and anyone interested in learning about networking. This version
offers most of the features needed for educational purpose.

School of Computer Science Engineering and


5

Wireshark -
Wireshark is a widely used network protocol analyzer that allows you to capture and
interactively browse the traffic running on a computer network in real time.
1. Packet Analysis: Wireshark lets you capture and analyze packets (data
units) traveling across a network. It supports a vast array of protocols, allowing
you to inspect the details of each packet, including its source and destination,
protocol type, and payload.
2. Real-Time Monitoring: With Wireshark, you can capture network traffic in real
time as it flows across your network interface. This feature is invaluable
for troubleshooting network issues, analyzing network performance, and
detecting security threats.
3. Cross-Platform Compatibility: Wireshark is available for various operating
systems, including Windows, macOS, and Linux, making it accessible to a wide
range of users.
4. Packet Filtering: Wireshark provides powerful filtering capabilities, allowing you
to focus on specific types of traffic or packets of interest. Filters can be based on
protocols, addresses, ports, or other packet attributes.
5. Protocol Support: Wireshark supports a vast number of network protocols,
ranging
from common ones like TCP/IP, UDP, HTTP, and DNS to more
specialized protocols used in industrial control systems, wireless networks, and
VoIP (Voice over IP) communications.
6. Graphical User Interface (GUI): Wireshark features a user-friendly GUI that
makes it easy to capture, analyze, and visualize network traffic. Its intuitive
layout
and extensive documentation make it suitable for both novice and
experienced users.
7. Packet Decryption: Wireshark can decrypt encrypted traffic if you have access to
the encryption keys. This feature is particularly useful for troubleshooting
encrypted protocols such as HTTPS (HTTP over SSL/TLS). Community
Support: Wireshark has a large and active user community that
provides support, documentation, and additional resources such as tutorials
and plugins. The
community also contributes to the ongoing development of Wireshark, ensuring
that it remains up to date with the latest networking technologies.

Steps
1. Setting Up the Network:
– Open Cisco Packet Tracer.
– From the "End Devices" section on the left panel, drag and drop six PCs onto the
workspace.
2. Connecting the PCs:
– Click on "Connections" in the left panel.
– Select the "Cross-over Cable" (looks like a twisted Ethernet cable).
– Click on the FastEthernet0 interface (usually the only Ethernet port) of one PC,
then drag the cable to the FastEthernet0 interface of the other PC. The cable
should turn green, indicating a successful connection.
School of Computer Science Engineering and
6

3. Configuring IP Addresses (Optional):


– While not strictly necessary for sending a single packet within a simple network,
assigning IP addresses allows you to explore how devices identify each other on
a larger network.
– Right-click on one of the PCs and select "Desktop."
– Click on "IP Configuration."
– In the "IPv4 Address" field, enter an IP address like 192.168.1.1 and a subnet
mask of 255.255.255.0 (common for home networks).
– Repeat this process for the other PC, using a different IP address in the same
subnet (e.g., 192.168.1.2).
4. Sending a Packet:
– Click on the "Devices" section in the left panel.
– Drag and drop a "Message" (looks like an envelope) onto the workspace.
– Click and hold the message, then drag it to the first PC (the sender). The message
will attach to the PC.
– Click on the second PC (the receiver).
5. Simulating the Packet Transfer (Optional):
– While not essential, you can observe the packet flow by running the simulation.
– Click the "Play" button (triangle) on the top toolbar.
– In the "Packet Tracer Activity Window" that appears, you should see the packet
travel from the sender PC, through the cable, and eventually reach the receiver
PC.

Result:

Conclusion:
This intro lab to Cisco Packet Tracer familiarized you with network simulation,
device connectivity, and basic packet transfer. Wireshark, a network traffic capture
tool, is explored in future labs.

School of Computer Science Engineering and


7

Experiment No. 2

Objective: Exploring Different Network Topologies with Cisco Packet Tracer.

Software 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 -
– Objective: Build a network with a ring topology.
– Topology: Connect multiple PCs or switches in a circular configuration, ensuring
that each node has exactly two neighbors.
– Configuration: Configure IP addresses for devices. Test connectivity by sending
data packets around the ring.

2) Star Topology -
– Objective: Build a network with a Star topology.
– Topology: Connect multiple PCs or switches to a central switch or router.
– Configuration: Assign IP addresses to devices. Test connectivity between
devices and the central switch/router.

School of Computer Science Engineering and


8

3) Bus Topology Objective -


– Objective: Construct a network with a bus topology.
– Topology: Connect multiple PCs or switches in a linear arrangement, all sharing
a common communication channel.
– Configuration: Assign IP addresses to devices. Test data transmission along the
bus.

4) Mesh Topology
– Objective: Implement a network with a mesh topology.
– Topology: Create a fully connected mesh network where every node is
connected to every other node.
– Configuration: Assign IP addresses to devices. Test connectivity between any
two nodes within the mesh.

5) Hybrid Topology -
– Objective: Design a network with a hybrid topology.
– Topology: Combine elements of different topologies such as star, ring, and mesh
to form a hybrid network.
– Configuration: Configure IP addresses for devices. Test connectivity and analyze
the advantages of the hybrid approach.

School of Computer Science Engineering and


9

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 respective
topology.
2. Connect them using the respective type of connector required.
3. Assign IP to every end device.
4. Use CPT protocol data unit to check the connection is properly established or
not.

School of Computer Science Engineering and


1

Conclusion:
This practical session provided valuable hands-on experience in building and
simulating various network topologies using Cisco Packet Tracer. You explored
concepts like:
– Network Devices: Understanding the roles of PCs, switches, hubs, and cables in
network communication.
– Topology Design: Creating different network configurations (bus, star, mesh)
and observing their effects on packet flow.
– Packet Transfer: Simulating data transfer between devices and visualizing the
path packets take through the network.

School of Computer Science Engineering and


1

Experiment No. 3

Objective: The objective of this lab is to guide through the process of configuring
Email, Web, and DHCP servers using Cisco Packet Tracer.

Prerequisites: Basic understanding of networking concepts such as IP addressing


and server administration. Familiarity with Cisco Packet Tracer interface.

Software Required: Cisco Packet Tracer

Theory:

1: DHCP Server Configuration


Objective: Set up a Dynamic Host Configuration Protocol (DHCP) server to
automatically assign IP addresses to network devices.
Topology: Create a network topology with PCs and a router. Introduce a DHCP
server connected to the router.
Configuration: Configure DHCP server settings such as IP address range, subnet
mask, default gateway, and DNS server. Test DHCP functionality by connecting
new devices to the network and verifying IP address assignment.

2: Email Server Configuration


Objective: Configure an Email server to send and receive emails within the network.
Topology: Expand the existing network topology with a dedicated Email server.
Connect Email clients (PCs) to the network.
Configuration: Set up Email accounts, domains, and mailboxes. Test Email
functionality by sending and receiving emails between clients.

School of Computer Science Engineering and


1

3: Web Server Configuration


Objective: 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.
Configuration: Install and configure a Web server software (e.g., Apache, Microsoft
IIS). Create and upload web pages to the Web server's root directory. Test Web
server functionality by accessing hosted web pages from client PCs.

Output:
1. Email

2. FTP

School of Computer Science Engineering and


1

3. DHCP

Conclusion:
Through these lab exercises, I gained practical experience in configuring and
managing essential network services such as DHCP, Email, and Web servers using
Cisco Packet Tracer. This hands-on approach will deepen my understanding of
server administration principles and prepare them for real-world deployment and
maintenance of network services.

School of Computer Science Engineering and


1

Experiment No.4

Objective: The objective of this lab is to introduce you to the physical aspects of
networking using Cisco Packet Tracer, including devices, cables, and connections.

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


and network topologies. Familiarity with Cisco Packet Tracer interface.

Software Required: Cisco Packet Tracer

Theory:
1: Basic Device Configuration
Objective: Familiarize students with different networking devices and their physical
characteristics.
Topology: Create a simple network topology with devices such as routers, switches,
PCs, and servers.
Configuration: Drag and drop various devices onto the workspace. Examine the
physical attributes of each device, including ports, interfaces, LEDs, and
chassis.

2: Cable Types and Connections


Objective: Learn about different types of cables and how to make physical
connections between devices.
Topology: Expand the existing network topology with additional devices. Add
cables (Ethernet, serial, console) to establish connections between devices.
Configuration: Select appropriate cable types for different connections (e.g.,
straight-through, crossover). Practice making physical connections by connecting
devices with cables.

3: Rack View Configuration


Objective: 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.
Configuration: Arrange devices in the rack according to standard practices (e.g.,
rack units, cable management). Label devices and cables for easy identification.

School of Computer Science Engineering and


1

4: Wall Mount and Patch Panel Configuration


Objective: Learn about wall-mounted equipment and the use of patch panels for
efficient cable management.
Topology: Expand the existing network topology with wall-mounted devices and
patch panels. Include additional switches, servers, and PCs as needed.
Configuration:
1) Wall Mount Installation: Identify locations 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 Connection: Introduce patch panels into the network topology and
connect them to switches using Ethernet cables. Use appropriate patch panel ports
for incoming and outgoing connections. Organize and label cables neatly within the
patch panel.
3) Cable Management: Route Ethernet cables from devices to the patch panels
efficiently, maintaining proper cable lengths. Utilize cable management accessories
such as cable ties or Velcro straps to bundle and organize cables. Ensure cables are
neatly arranged and do not obstruct access to devices or patch panels.
4) Testing and Verification: Verify connectivity between devices by testing network
connections through the patch panel. Conduct cable testing to ensure proper
termination and connectivity. Troubleshoot any connectivity issues and make
necessary adjustments to cable connections.

Output:

School of Computer Science Engineering and


1

Steps:
1. Accessing the Physical View:
– Open Cisco Packet Tracer.
– By default, you'll be in the Logical View, which shows a simplified layout of
your network devices.
– Click the Physical View button located behind the Logical View button in the
top left corner of the workspace.

School of Computer Science Engineering and


1

2. Navigating the Physical View:


– The default view might show the Intercity container, representing a broader
geographical area.
– Use the navigation panel on the right to zoom in and out, change your location
(e.g., Home City, Building), and explore different 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 existing devices in the Logical View by right-clicking them and
selecting "Go to Physical View."
– Use your mouse to position the devices within the container to reflect their
physical placement.

4. Switching Back to Logical View:


– Click the Logical View button at any time to return to the traditional network
device layout. The physical placement of devices in the Physical View is
reflected in their positions within the Logical View.

Conclusion:
Through these lab exercises, I gained practical experience in understanding the
physical view of networking using Cisco Packet Tracer. By exploring devices,
cables, racks, and documentation tools, students will develop a solid foundation in
network hardware and physical infrastructure. This hands-on approach will prepare
them for real-world scenarios in network design, implementation, and
maintenance.

School of Computer Science Engineering and


1

Experiment No.6

Objective: The objective of this lab manual is to introduce you to dynamic and
static routing protocols using Cisco Packet Tracer.

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


subnetting, and routing. Familiarity with Cisco Packet Tracer interface.

Software Required: Cisco Packet Tracer

Theory:
1: Static Routing
– Configuration Objective: Configure static routes to establish network
communication between multiple networks.
– Topology: Create a network topology with multiple routers and subnets. Ensure
each network is connected to a router.
– Configuration: Configure static routes on routers. Test connectivity between
devices in different networks by sending packets or using ping commands.

School of Computer Science Engineering and


1

2: RIP (Routing Information Protocol)


– Configuration Objective: Configure RIP routing protocol to enable dynamic
routing between routers.
– Topology: Expand the existing network topology with additional routers.
Remove static routes if configured in static routing.
– Configuration: Enable RIP routing protocol on routers. Configure RIP and
network. Test dynamic routing by introducing new networks and verifying
automatic route propagation.

Output:

School of Computer Science Engineering and


2

School of Computer Science Engineering and Applications


2

Conclusion:
Through these lab exercises, you will gain practical experience in configuring and
troubleshooting dynamic and static routing protocols using Cisco Packet Tracer. By
working with different routing protocols and scenarios, you will develop a deeper
understanding of routing concepts and gain valuable skills applicable to network
design and administration in real-world environments.

School of Computer Science Engineering and


2

Experiment No.5 & 7

Objective: Socket Programming and Wireshark

Software Required: Wireshark, python 3.9+, VS Code

Theory:
Wireshark
– Wireshark is a packet sniffer and analysis tool. It captures network traffic from
ethernet, Bluetooth, wireless (IEEE.802.11), token ring, and frame relay
connections, among others, and stores that data for offline analysis.
– Note: A “packet” is a single message from any network protocol (e.g., TCP,
DNS, etc.).
– LAN traffic is in broadcast mode, meaning a single computer with Wireshark
can see traffic between two other computers. To see traffic to an external site,
you need to capture the packets on the local computer.
– Wireshark allows you to filter 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 filter to see TCP traffic between two IP
addresses, or you can set it only to show you the packets sent from one
computer. The filters in Wireshark are one of the primary reasons it has become
the standard tool for packet analysis.
Download: http://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 communication (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 connections to other networks.
– A network socket is an endpoint of an inter-process communication flow across a
computer network. Sockets may communicate within a process, between
processes on the same machine, or between processes on different continents.
Today, most communication between computers is based on the internet
protocol; therefore most network sockets are internet sockets. To create a
connection between machines, Python programs import the socket module,
create a socket object, and call the object’s methods to establish connections and
send and receive data. Sockets are the endpoints of a bidirectional
communications channel.

There are two basic types of communication


• Streams (TCP): Computers establish a connection with each other and read/write
data in a continuous stream of bytes---like a file. This is the most common.

School of Computer Science Engineering and


2

• Datagrams (UDP): Computers send discrete packets (or messages) to each other.
Each packet contains a collection of bytes, but each packet is separate and self-
contained.
Client - Server Concept
• Each endpoint is a running program
• Servers wait for incoming connections and provide a service (e.g., web, mail, etc.)
• Clients make connections to servers

Server Code:

School of Computer Science Engineering and


2

Client Code:

Network/Packets Analysis
– Wireshark shows you three different panes for inspecting 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 conversation. 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 conversation.
– Time: This column shows how long after you started the capture this particular
packet was captured. You can change this value in the Settings menu to display a
different option.
➢ Source: This is the address of the system that sent the packet.
➢ Destination: This is the address of the packet destination.
➢ Protocol: This is the type of packet. For example: TCP, DNS, DHCPv6, or ARP.

School of Computer Science Engineering and


2

➢ Length: This column shows you the packet’s length, measured in bytes.
➢ Info: This column shows you more information about the packet contents, which
will vary depending on the type of packet.

Flags Associated with the packets.


1. (SYN): Synchronize
2. This flag is set to 1 in the initial packet sent from the client to the server when
establishing a TCP connection. It's used to initiate a connection and synchronize
sequence numbers between the two endpoints.
3. (FIN): Finish
4. When set to 1, this flag indicates that the sender has finished sending data and
wants to close the connection. It's part of the connection termination process.
5. (ACK): Acknowledgment
6. This flag signifies 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 termination phases of a TCP connection.
7. (PSH): Push
8. When set, the PSH flag tells the receiving endpoint to push the data to the
receiving application immediately without waiting for the buffer to fill up. This
is used to ensure that data is processed quickly.
9. (URG): Urgent
10.The URG flag indicates that the segment contains urgent data, and it should be
processed immediately. The location of the urgent data within the segment is
defined by the urgent pointer field of the TCP header.
11.(RST): Reset
12. This flag is used to forcibly abort a connection in response to an error or to
reject an invalid segment. It can also be used to refuse a connection request.
13. Three-way Handshake
14. Step 1 (SYN): In the first step, the client wants to establish a connection with a
server, so it sends a segment with SYN (Synchronize Sequence Number) which
informs the server that the client is likely to start communication 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) signifies the response of the segment it
received, and SYN signifies with what sequence number it is likely to start the
segments with
16. Step 3 (ACK): In the final part client acknowledges the response of the server
and they both establish a reliable connection with which they will start the actual
data transfer.

School of Computer Science Engineering and


2

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.
– After establishing the connection send 3-4 to server
– Now go to wireshark and stop capturing packets, then apply the display filter
“ip.dst==’server ip’” to find the packets which where send to server from client
– After finding all the packets which were sent to server, analyze the packets, find
the flags associated with packets and the original message sent.
Output:
Client Side

Server Side

Wireshark

Conclusion:
This lab offered a fascinating glimpse into the inner workings of network
communication. We delved into two powerful tools:
– Socket Programming: We explored the low-level mechanisms that applications
use to establish connections, exchange data, and control communication flows
across networks. By manipulating sockets, we gained a deeper appreciation for
the complexities involved in sending and receiving data over a network.
– Wireshark: This network protocol analyser acted as our window into the
invisible world of network traffic. We learned to capture, dissect, and analyze
packets, allowing us to visualize the data flowing between devices and
troubleshoot potential network issues.

School of Computer Science Engineering and

You might also like