2445 CN Lab
2445 CN Lab
Lab Manual
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.
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.
Experiment No.1
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.
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
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.
Experiment No. 2
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.
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.
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.
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.
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.
Theory:
Output:
1. Email
2. FTP
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.
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.
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.
Output:
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.
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.
Experiment No.6
Objective: The objective of this lab manual is to introduce you to dynamic and
static routing protocols using 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.
Output:
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.
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.
• 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:
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.
➢ 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.
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.