Computer Networks Lab Manual 2025-26
Computer Networks Lab Manual 2025-26
D-19
Class: TY Computer
Term: V
Computer Networks Lab
(23UCOPCL3509)
Design and implement subnetting schemes for a given IP address. CO3 PO1,PO2,PO3,PO4,PO5,PO9, PO10,
8
PO11,PSO1
Configure routing tables and enable routing using Packet Tracer or GNS3. CO3 PO1,PO2,PO3,PO4,PO5,PO9, PO10,
9
PO11,PSO1
10 Configure IPv6 addressing on virtual/physical machines. CO4 PO1,PO2,PO3,PO10,PO11,PO12,PSO1,PSO2
11 Configure a basic wireless network using 802.11 standards in Packet Tracer. CO4 PO1,PO2,PO3,PO10,PO11,PO12,PSO1,PSO2
Virtual Lab Experiments
To implement OSPF protocol using 5 routers scenario. CO4
12 PO1,PO2,PO3,PO10,PO11,PO12,PSO1,PSO2
[Link]
Configure Multiple VLANs in Layer 2 Devices (Managed Switch(es)) CO4
13 PO1,PO2,PO3,PO10,PO11,PO12,PSO1,PSO2
[Link]
Experiment No: 01
Experiment Title:
Design and Simulate in Cisco Packet Tracer: Create LAN and WAN Topologies &
Configure Basic Device Settings (IP Addressing, Device Naming)
Objective:
To design and simulate Local Area Network (LAN) and Wide Area Network (WAN)
topologies using Cisco Packet Tracer. Also, to configure IP addressing and basic device
settings like device naming.
Tools Required:
Cisco Packet Tracer (version 7.2 or later)
A system with Windows/Linux/Mac
Experiment Steps
PART A: Create LAN TopologyGoal: Connect multiple PCs via switches and
configure IPs and names
Drag and drop the following from the bottom Device-Type box:
2 Switches → Switches → 2960
6 PCs → End Devices → PC
1 Router → Routers → 1841 (optional, if inter-LAN or gateway simulation is
needed)
LAN A:
PC0 & PC1 → Switch0 → Router0 (via FastEthernet 0/0)
LAN B:
PC2 & PC3 → Switch1 → Router1 (via FastEthernet 0/0)
Router0:
arduino
Router> enable
Router# configure terminal
Router(config)# interface fa0/0
Router(config-if)# ip address [Link] [Link]
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface s0/0/0
Router(config-if)# ip address [Link] [Link]
Router(config-if)# clock rate 64000
Router(config-if)# no shutdown
Router1:
arduino
Router> enable
Router# configure terminal
Router(config)# interface fa0/0
Router(config-if)# ip address [Link] [Link]
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# interface s0/0/0
Router(config-if)# ip address [Link] [Link]
Router(config-if)# no shutdown
On Router0:
arduino
CopyEdit
Router(config)# ip route [Link] [Link] [Link]
On Router1:
arduino
Router(config)# ip route [Link] [Link] [Link]
ping [Link]
Through this simulation, we gained hands-on experience with core network setup tasks that
form the foundation for all advanced networking configurations. The successful
communication between devices validated the correctness of the topology and configuration.
Experiment No: 02
Experiment Title:
Create and compare different topologies (Bus, Ring, Star, Mesh) using Packet Tracer.
Tools Required:
Cisco Packet Tracer (version 8.x recommended)
Objective:
Design and simulate four network topologies — Bus, Ring, Star, and Mesh — and compare
their configuration, working, and performance basics.
1. Bus Topology
Steps:
3. Star Topology
Steps:
4. Mesh Topology
Steps:
1. Add 4 PCs.
2. In mesh topology, each device is connected to every other device.
3. Connections:
o Use Cross-Over Cable.
o Connect each pair:
PC0 ↔ PC1
PC0 ↔ PC2
PC0 ↔ PC3
PC1 ↔ PC2
PC1 ↔ PC3
PC2 ↔ PC3
4. IP Configuration (Manual/Custom):
o Each PC can have multiple IPs on multiple interfaces (Advanced).
o For simple simulation, use routers or multi-interface PCs (optional).
o Alternatively, simulate using Switch and routers for scalability.
5. Testing:
o Ping between all possible pairs.
Comparison Table:
Devices Cabling Central
Topology Fault Tolerance Scalability Cost
Needed Complexity Device
Bus Few Low Hub Low Low Low
Ring Moderate Moderate No Low Moderate Low
High (central fails
Star Moderate Low Switch High Medium
= network down)
Low (for full
Mesh High Very High No Very High High
mesh)
Conclusion:
In this experiment, we successfully designed and simulated four different network topologies
Bus, Ring, Star, and Mesh — using Cisco Packet Tracer. Each topology demonstrated
unique characteristics in terms of structure, communication, fault tolerance, cost, and
scalability.
Bus topology was simple and economical but suffered from high chances of data
collisions and lacked fault tolerance.
Ring topology ensured orderly data transmission but was vulnerable — a single link
failure could disrupt the entire network.
Star topology offered efficient communication and scalability with centralized
control, but it heavily depended on the central switch.
Mesh topology provided maximum redundancy and reliability, ideal for fault-
tolerant systems, but required complex wiring and was cost-intensive.
Star topology is best suited for most practical LAN implementations due to its
balance of cost, performance, and reliability.
Mesh topology is preferable in critical environments where high fault tolerance is
essential.
Bus and Ring topologies are less commonly used today due to their limited
scalability and fragility.
Objective:
To install, configure, and use an FTP (File Transfer Protocol) server to transfer files between
client and server over a network.
Tools Required:
1. Go to [Link]
2. Download FileZilla Server (not the client).
4. Also, allow port 21 (default FTP port) through firewall if not already allowed.
Step 5: Get the Server IP Address
To Upload:
To Download:
Conclusion:
In this experiment, we successfully installed, configured, and used an FTP (File Transfer
Protocol) server using FileZilla Server to simulate file sharing between a client and a server
over a network. We created user accounts, defined access permissions, and transferred files
using both GUI-based FTP client and command-line utilities.
By completing this task, we demonstrated the use of FTP as an application layer protocol,
learned how clients and servers interact using predefined commands, and understood the
importance of user authentication and network accessibility in file-sharing systems.
Experiment No: 04
Experiment Title:
Send/receive email via SMTP and POP3 by using telnet or a mail client.
Objective
To configure and simulate the sending and receiving of emails using SMTP (for sending)
and POP3 (for receiving) through Telnet or a mail client in a simulated network.
Tools Required
1 Server
2 PCs (PC0 = sender, PC1 = receiver)
1 Switch
Cables (Copper Straight-through)
Step 2: Connect the Devices
PC0 → Switch
PC1 → Switch
Server → Switch
1. Click Compose
2. To: xyz@[Link]
3. Subject: Test Email
4. Body: This is a test email to XYZ
5. Click Send
HELO [Link]
MAIL FROM:<b=abc@[Link]>
RCPT TO:<xyz@[Link]>
DATA
Subject: Hello XYZ
This is a test message using Telnet.
.
QUIT
Sql
USER XYZ
PASS 6789
LIST
RETR 1
QUIT
Conclusion:
In this experiment, we successfully demonstrated how emails are sent and received over a
network using two essential application layer protocols: SMTP (Simple Mail Transfer
Protocol) and POP3 (Post Office Protocol 3). We configured an email server, created user
accounts, and simulated the complete email exchange process using both a GUI-based mail
client and Telnet commands.
Software/Tools Required:
IDE or Text Editor (e.g., VS Code, PyCharm, Eclipse), Terminal or Command
Prompt.
Theory:
Python’s socket module is a powerful tool for creating network applications. The socket
is the endpoint of a bidirectional communications channel between the server and the
client. Sockets may communicate within a process, between processes on the same
machine, or between processes on different machines.
To use python socket connection, we need to import socket module. Then, sequentially we
need to perform some tasks to establish connection between server and client. We can
obtain host address by using [Link]() function. The user port address should
above 1024 because port number lesser than 1024 are reserved for standard internet
protocol.
import socket
def server_program():
# get the hostname
host = [Link]()
port = 5000 # initiate port no above 1024
if __name__ == '__main__':
server_program()
def client_program():
host = [Link]() # as both code is running on same pc
port = 5000 # socket server port number
if __name__ == '__main__':
client_program()
[Link]
server-client
Result:
The client-server program was successfully executed using TCP sockets in Python (or
Java). The client was able to establish a connection with the server, send a message, and
receive a response from the server over a reliable TCP connection. This demonstrated
basic socket communication and connection-oriented networking.
Conclusion:
Oral Questions:
Aim: Implement a TCP-IP client-server application. The server accepts a string as a request
and sends the capitalized version back.
Software/Tools Required:
Python, Terminal/Command Prompt, Text editor or IDE (VS Code, PyCharm, etc.)
.
Theory:
In computer networks, communication between systems (hosts) is carried out using
protocols—rules that govern data transmission. The TCP/IP model, also known as the
Internet Protocol Suite, is the foundation of modern networking.
The TCP/IP model consists of four layers:
1. Application Layer – Supports network applications (e.g., HTTP, FTP, SMTP).
2. Transport Layer – Provides reliable data transfer using TCP or faster, connectionless
transfer using UDP.
3. Internet Layer – Handles logical addressing (IP addresses) and routing.
4. Network Access Layer – Deals with physical transmission of data over network
media.
Client-Server Architecture involves two components:
Client: Initiates communication by sending a request.
Server: Waits for incoming requests and sends back responses.
TCP (Transmission Control Protocol) is connection-oriented and ensures reliable
delivery of data.
TCP Server -
1. Using create(), Create TCP socket.
2. Using bind(), Bind the socket to server address.
3. Using listen(), put the server socket in a passive mode, where it waits for the client
to approach the server to make a connection
4. Using accept(), At this point, connection is established between client and server,
and they are ready to transfer data.
5. Go back to Step 3.
TCP Client -
1. Create TCP socket.
2. Connect newly created client socket to server.
import socket
# Accept connection
conn, addr = server_socket.accept()
print(f"Connected by {addr}")
# Receive data
data = [Link](1024).decode()
# Close connection
[Link]()
import socket
# Create a socket
# Connect to server
client_socket.connect(('localhost', 12345))
# Send input
client_socket.send([Link]())
# Receive response
response = client_socket.recv(1024).decode()
# Close socket
client_socket.close()
Procedure:
1. Open a terminal and run [Link].
2. Open another terminal and run [Link].
3. Enter a string in the client terminal.
4. Observe the capitalized string returned by the server.
Result:
The TCP/IP client-server application was successfully implemented. The server received a
string input from the client, processed it by converting it into uppercase letters, and sent the
transformed string back to the client. This demonstrated reliable, bidirectional
communication using TCP sockets, validating the concepts of socket programming, client-
server architecture, and TCP/IP protocol operations.
Conclusion:
In this lab experiment, we successfully developed a TCP/IP-based client-server application
using socket programming. The client sent a string to the server, which processed the input
by converting it to uppercase and returned the modified string.
Oral Questions:
1. What is the main objective of this experiment?
2. What did you conclude from this experiment?
3. Why was TCP used instead of UDP in this application?
4. What happens if the server is not running when the client tries to connect?
5. How does the server know when to stop receiving data?
6. What is the role of bind(), listen(), and accept() functions in the server program?
7. What does socket.AF_INET and socket.SOCK_STREAM mean in Python socket
programming?
8. Can this server handle multiple clients? Why or why not?
9. What is the importance of encoding and decoding messages in socket communication?
10. What changes would you make to convert this from a single-use to a multi-client server?
Experiment No: 07
Aim: Use Packet Tracer to simulate and analyse socket programming & packet flow
differences between sockets.
Theory:
A network socket is a software abstraction that serves as an endpoint for
communication between two processes over a network. It encapsulates both an IP address
and a port number, uniquely identifying each connection endpoint. On UNIX-like systems,
sockets are treated similarly to files and represented by file descriptors, enabling network
I/O to follow standard file read/write interactions.
TCP (Connection-Oriented)
Connection Establishment:
Uses a three-way handshake (SYN → SYN-ACK → ACK) before data is sent, ensuring
both endpoints are ready
Reliable & Ordered Data Transfer:
Data is sent as a byte-stream using sequence numbers. The receiver sends ACKs; lost or
corrupted segments are retransmitted
Flow & Congestion Control:
Utilizes sliding windows and congestion algorithms to adapt to network load, preventing
packet loss
Connection Termination:
Ends with a four-step teardown (FIN/ACK cycles), ensuring a graceful closure
Summary:
TCP ensures reliable, ordered, and error-checked delivery, making it ideal for
applications like web browsing, file transfers, email, and remote shells
UDP (Connectionless)
No Connection Setup:
Data is sent directly as independent datagrams, without handshakes
Unreliable & Unordered Delivery:
Packets have no sequence numbers or acknowledgments; they may be lost, arrive out-of-
order, or be duplicated
Minimal Overhead:
With just an 8-byte header and no congestion control, UDP is lightweight and fast
Summary:
UDP offers low-latency, high-speed transmission and suits applications like live
streaming, online gaming, and DNS, where occasional data loss is acceptable
4. Launch Clients
On each PC, open Desktop → Web Browser, Command Prompt, or FTP client.
Point to the server's IP or hostname to initiate connections (e.g., [Link]).
5. Switch to Simulation Mode
Click the Simulation tab.
Use Edit Filters to select relevant protocols (TCP, HTTP, UDP, DNS).
6. Generate Traffic
In the simulation, create a Simple PDU from PC to Server for HTTP, FTP, or DNS.
Run the simulation step-by-step using Capture/Forward to see packet flow.
7. Inspect Packet Details
Click each PDU envelope to view headers (IP, TCP/UDP, application layer).
Note details like source/destination ports, sequence/ACK numbers, and flags (SYN, ACK).
8. Interpret Observations
Identify the TCP three-way handshake (SYN → SYN-ACK → ACK).
Observe data packet transfers and session teardown (FIN/ACK).
For UDP/DNS: note the lack of handshake and data confirmation.
9. Correlate With Service Logs
On the PC, check console logs (e.g., Browser response, FTP login success).
Match events to packet simulation—helpful for understanding the mapping between
application behavior and network traffic.
Packet flow differences between TCP (stream sockets) and UDP (datagram sockets),
Data is sent as a continuous, ordered byte stream. Each segment carries sequence numbers;
the receiver reassembles and acknowledges these segments. Missing or corrupted segments
are automatically retransmitted.
No connection establishment:
Data packets (datagrams) are sent immediately without any handshake
Message-based, unordered delivery:
Each datagram remains independent; there is no guarantee of order, delivery, or
duplication prevention Minimal overhead:
UDP headers are small (only 8 bytes), with no sequence numbers, handshaking,
retransmission, or congestion control
Use-case efficiency:
Ideal for real-time applications like video/audio streaming, gaming, or DNS, where speed
is prioritized over reliability
Comparison Table
Conclusion:
Experiment No: 08
Theory:
Design and implement subnetting schemes for a given IPv4 address—using CIDR,
VLSM, and practical example is given below
Subnetting
A subnet mask (e.g., [Link]) divides an IPv4 address into the network and host
portions. In binary, valid masks always begin with consecutive 1-bits followed by 0-bits
CIDR (Classless Inter-Domain Routing) allows flexible allocation of IP address blocks using
a slash notation (e.g., [Link]/24). The /24 indicates the first 24 bits (network), and
remaining 8 bits for hosts. CIDR superseded rigid classful addressing, enabling efficient
routing and IP utilization [].
For CIDR notation, if the network prefix length is /n, number of addresses is 2^(32−n), and
usable hosts is 2^(32−n) − 2 (subtracting network and broadcast)
Example Summary
Summary Table
Concept Purpose
Identify:
Practical Example
Subnets:
Conclusion:
Experiment No: 09
Aim : Configure Routing Tables and Enable Routing using Packet Tracer or GNS3
Theory:
Routing is the process of selecting paths in a network along which to send network traffic.
Routers use routing tables to determine the best path for forwarding packets.
Routing is essential for inter-network communication and ensures data reaches its intended
destination.
Requirements:
Steps:
1. Topology Setup:
2. Assign IP Addresses:
3. Configure Routing:
4. Verify Configuration:
Conclusion:
By configuring routing tables and enabling routing protocols in Packet Tracer or GNS3, we
successfully established communication between devices in different networks. This activity
helps understand how routers direct traffic based on routing information.
Experiment No: 10
Aim:
Theory:
The Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol
designed to address the limitations of IPv4, especially the exhaustion of address space. IPv6
uses a 128-bit address format, allowing for a vastly larger number of unique IP addresses than
the 32-bit IPv4.
Requirements:
Procedure:
On Linux/Ubuntu Machine:
bash
CopyEdit
ip -6 addr
3. Assign an IPv6 address to a network interface:
bash
CopyEdit
sudo ip -6 addr add [Link]/64 dev eth0
bash
CopyEdit
ip -6 addr show dev eth0
bash
CopyEdit
ping6 [Link]
On Windows Machine:
bash
CopyEdit
ipconfig
bash
CopyEdit
netsh interface ipv6 set address "Local Area Connection" [Link]
bash
CopyEdit
ipconfig
5. Test connectivity:
bash
CopyEdit
ping -6 [Link]
Result:
IPv6 addresses were successfully configured on both virtual and physical machines, and
network connectivity between them was verified using appropriate networking tools.
Conclusion:
In this experiment, IPv6 addresses were configured on network interfaces in both Linux and
Windows systems. The connectivity was tested and validated using the ping6 or ping -6
commands, demonstrating successful IPv6 communication.
Experiment No: 11
Title:
Configure a Basic Wireless Network using 802.11 Standards in Cisco Packet Tracer
Objective:
To design and configure a simple wireless network using 802.11 standards in Cisco Packet
Tracer, allowing wireless devices to communicate with each other and access wired network
resources.
Tools/Software Required:
The IEEE 802.11 standard defines the protocols for implementing wireless local area
network (WLAN) communication in various frequency bands like 2.4 GHz and 5 GHz.
Common variants include:
Wireless Router
PC (Wireless-enabled)
Laptop (Wireless-enabled)
Smartphone (optional)
Switch (for wired LAN integration)
Ethernet-enabled PC (optional for wired testing)
(Create in Packet Tracer — visually show router, wireless devices, optional wired PC and
switch connections)
Procedure:
IP Addressing Scheme:
A basic wireless network was successfully configured using the 802.11 standards. Wireless
devices connected securely via Wi-Fi, communicated with each other, and optionally
integrated with wired LAN devices.
Conclusion:
This experiment demonstrated how to configure a simple wireless LAN using 802.11
standards in Cisco Packet Tracer. It also illustrated how wireless devices authenticate using
WPA2-PSK security and communicate within a network.