Computer Networks Lab Manual A23-24
Computer Networks Lab Manual A23-24
Lab Manual
SEM-V
A.Y. 2023-2024
Lab Manual
Vision
To evolve as a centre of excellence in Computer Science and Engineering to produce skilled
and proficient global professionals to build the society.
Mission
To provide the conducive environment for establishing students in the global platform
of research and innovation.
To educate students on cutting edge technologies with problem solving capabilities,
leadership and teamwork skills.
To inculcate the professional values with lifelong learning through curricular and co-
curricular activities and create globally-aware disciplined citizens.
To commence various initiatives for motivating students to work for the betterment of
society.
Program Outcomes
Engineering Graduates will be able to:
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
Lab Manual
6. The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent
responsibilities relevant to the professional engineering practice.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a
member and leader in a team, to manage projects and in multidisciplinary
environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological
change.
Lab Manual
Course Outcome
Prepared by:
Explanation:
1. Ping
This command is used to test network connectivity and measure round-trip time
(RTT) between devices. It helps verify if a device is reachable and assess network
latency.
2. ipconfig
Displays the IP configuration of network interfaces, including IP address, subnet
mask, default gateway, and DNS servers. It is useful for diagnosing IP-related issues.
3. tracert
Traces the route that packets take to reach a destination and provides information on
network hops and latency at each hop. It helps identify network routing issues.
4. nslookup
Performs DNS lookups to resolve domain names into IP addresses. It helps
troubleshoot DNS-related issues and verify DNS configurations.
5. netstat
Shows active network connections, listening ports, and network statistics. It can help
identify open ports, established connections, and network services running on a
system.
6. arp
Displays or modifies the Address Resolution Protocol (ARP) cache, which maps IP
addresses to MAC addresses. It is useful for troubleshooting connectivity problems at
the data-link layer.
7. route
Views or modifies the local IP routing table. It is helpful for diagnosing and
configuring routing issues in a network.
Procedure
1. Open Command Prompt: Press the Windows key, type "Command Prompt," and
select the app. Alternatively, press Windows key + R, type "cmd" in Run, and press
Enter.
2. Identify the issue: Determine the specific problem, like connectivity, DNS, or a slow
network.
3. Choose the relevant command: Select a command suited to the issue, e.g., "ping" for
connectivity problems.tracert
4. Enter the command: In the Command Prompt, type the command with
parameters/options, like "ping <IP address>", and press Enter.
5. Review output: Check responses, errors, or relevant information displayed.
6. Interpret results: Analyze output to understand network connection status or error
messages.
Lab Manual
7. Perform additional commands: If needed, run more commands for further information
or tests.
8. Take appropriate action: Based on the command results, resolve the network issue by
adjusting settings, resetting devices, or seeking assistance.
Input:
Conclusion: Thus these commands were implemented in the command prompt to check and
gather comprehensive network-related information, including connectivity, configuration,
route tracing, DNS resolution, active connections, ARP table, and routing table details.
Practice Problem:
Can you think of any additional network troubleshooting commands or tools that
complement the ones mentioned? Explain their relevance in troubleshooting network
issues.
a) ipconfig /flushdns
Relevance: Clears the DNS resolver cache, helpful when dealing with DNS resolution
problems.
b) tracert google.com
Relevance: Tests connectivity to a specific port on a remote host, useful for
troubleshooting issues related to specific services.
c) pathping google.com
Relevance: Combines features of ping and tracert, providing a comprehensive
analysis of network latency and packet loss along a path.
d) netsh interface show interface
Relevance: A versatile command-line scripting utility for network-related
configuration, including firewall settings, interface configuration, and more.
e) Wireshark
Relevance: A powerful packet analyzer that allows for detailed inspection of network
traffic, aiding in identifying specific issues at the packet level.
f) netsh advfirewall show allprofiles
Relevance: Commands like ‘netsh advfirewall show allprofiles’ help in reviewing
firewall settings, ensuring proper communication across the network.
g) nmap -sP 192.168.1.0/24
Relevance: A network scanning tool that can be used to discover hosts and services on
a computer network, helpful for identifying potential security issues.
Lab Manual
Practical 2
Title: Study various types of network components. Introduction to the network simulator
tool, Cisco packet tracer
Explanation:
Networking devices play a crucial role in facilitating communication and data transfer within
computer networks. These devices serve various purposes and functions to ensure the smooth
operation of networked systems.
Repeater
Repeaters are network devices operating at the physical layer of the OSI model that amplify
or regenerate an incoming signal before retransmitting it. They are incorporated in networks
to expand its coverage area. They are also known as signal boosters. Repeaters amplifies the
attenuated signal and then retransmit it. Digital repeaters can even reconstruct signals
distorted by transmission loss. So, repeaters are popularly incorporated to connect between
two LANs thus forming a large single LAN.
Router
A router is an electronic device that interconnects two or more computer networks, and
selectively interchanges packets of data between them. Each data packet contains address
information that a router can use to determine if the source and destination are on the same
network, or if the data packet must be transferred from one network to another. Where
multiple routers are used in a large collection of interconnected networks, the routers
exchange information about target system addresses, so that each router can build up a table
showing the preferred paths between any two systems on the interconnected networks.
Lab Manual
Network bridge
A network bridge is a device that divides a network into segments. Each segment represents a
separate collision domain, so the number of collisions on the network is reduced. Each
collision domain has its own separate bandwidth, so a bridge also improves the network
performance. A bridge works at the Data link layer (Layer 2) of the OSI model. It inspects
incoming traffic and decides whether to forward it or filter it. Each incoming Ethernet frame
is inspected for destination MAC address. If the bridge determines that the destination host is
on another segment of the network, it forwards the frame to that segment.
Procedure
Cisco Packet Tracer is a network simulation and visualization tool developed by Cisco
Systems. It provides a virtual environment where users can design, configure, and
troubleshoot computer networks. Packet Tracer allows users to simulate network topologies,
network devices, and network connections, enabling them to gain hands-on experience with
networking concepts and technologies.
The top row of icons represents the category list consisting of: [Networking Devices],
[End Devices], [Components], [Connections], [Miscellaneous], and [Multiuser].
Lab Manual
Each category contains at least one sub-category group.
The Physical tab provides an interface for interacting with the device including powering it on or
off or installing different modules such as a wireless network interface card (NIC).
The Config tab is a learning tab in Packet Tracer. This tab provides a way to do basic
configurations. It will show the equivalent CLI commands that perform the same action if
someone was configuring using the CLI tab.
Lab Manual
The CLI tab provides access to the CLI interface. Here, you can practice configuring the device
at the command line.
If you are configuring a server, the server has all of the functions of a host with the addition of
one more tab, the Services tab. This tab allows a server to be configured as a web server, a
DHCP server, a DNS server, or various other servers visible in the graphic.
Lab Manual
Input:
Practice Problem:
Lab Manual
Implement a design for a small network to include two switches and two PCs as
shown below. Write down your observations on how a packet is transferred.
Answer
Implemented a design for a small network to include two switches and two PCs.
Figure (13) Network with two switches and PCs in Cisco’s Packet Tracer
Lab Manual
Practical 3 (a)
Title: Study and Configure Bus, and Mesh Network Topologies in Cisco Packet Tracer.
Explanation:
1) Bus Topology
In this topology, all devices are connected to a single communication line, often
called a "bus."
Each device shares the same communication medium and can transmit and receive
data.
However, the entire network can be affected if there is a break or failure in the main
communication line.
Verification
Ping test. Select the "Desktop" view for one of the devices (e.g., a computer) by right-
clicking on it and selecting "Desktop." Open a command prompt or terminal window
on the device.
Use the ping command to test connectivity between devices. ping one computer from
the other by using its IP address. Type the following command in the command
prompt or terminal window as shown in Figure.
If the ping is successful, you should see replies indicating that the packets were sent
and received. This confirms that the bus topology is functioning properly.
Repeat the ping test for all devices connected to the bus to ensure connectivity
between them.
OR
Select a source device (e.g., PC 1) from which you want to send the packet. Select a
destination device (e.g., PC 2) from which you want to send the packet.
Click and hold the PDU icon in the toolbar, then drag it from the toolbar to the source
PC.
Release the mouse button to drop the PDU onto the source PC.
Click and drag the PDU from the source PC to the destination PC on the bus
topology.
Release the mouse button to drop the PDU onto the destination PC.
Observe the behavior of the bus topology.
Verification
Test the connectivity between the PCs by opening the "Command Prompt" or
"Terminal" on each PC and pinging the IP addresses of the other PCs. For example,
from PC1, you can ping PC2 using the command "ping 192.168.0.2".
Verify that all the PCs are able to communicate with each other successfully.
OR
Select a source device (e.g., PC 1) from which you want to send the packet. Select a
destination device (e.g., PC 2) from which you want to send the packet.
Click and hold the PDU icon in the toolbar, then drag it from the toolbar to the source
PC.
Release the mouse button to drop the PDU onto the source PC.
Click and drag the PDU from the source PC to the destination PC on the bus
topology.
Release the mouse button to drop the PDU onto the destination PC.
Observe the behavior of the Mesh topology.
Lab Manual
Conclusion: Implemented bus and mesh topologies in Cisco Packet Tracer.
Title: Study and configure Star and Ring Network Topologies in Cisco packet tracer.
Explanation:
1) Star Topology
In a star topology, each device is directly connected to a central hub or switch.
All communication between devices goes through the central hub, which helps in
better fault isolation.
If one device fails, it does not affect the rest of the network. This is one of the most
commonly used topologies in modern networks.
Procedure
a) Procedure to implement Star topology in Packet Tracer
Open Packet Tracer and create a new project.
Drag and drop a switch from the "Switches & Hubs" section of the device panel onto
the workspace.
Drag and drop (n) PCs from the "End Devices" section of the device panel onto the
workspace.
Connect each PC to the switch by selecting the copper straight-through cable from the
"Connections" section of the device panel. Click on a PC, then click on the switch to
establish the connection. Repeat this step for all (n) PCs.
Double-Click on each PC to open the configuration window. Set an appropriate IP
address for each PC. Make sure that the IP addresses are within the same subnet, but
each address should have a unique host portion. For example, you can use the IP
addresses 172.16.0.1, 172.16.0.2, 172.16.0.3, 172.16.0.4, and 172.16.0.5 with a
subnet mask of 255.255.255.0.
Verification
Test the connectivity between the PCs by opening the "Command Prompt" or
"Terminal" on each PC and pinging the IP addresses of the other PCs. For example,
from PC1, you can ping PC2 using the command "ping 172.16.0.2".
Verify that all the PCs are able to communicate with each other successfully.
o OR
Select a source device (e.g., PC 1) from which you want to send the packet. Select a
destination device (e.g., PC 2) from which you want to send the packet.
Click and hold the PDU icon in the toolbar, then drag it from the toolbar to the source
PC.
Release the mouse button to drop the PDU onto the source PC.
Click and drag the PDU from the source PC to the destination PC on the star
topology.
Release the mouse button to drop the PDU onto the destination PC.
Observe the behavior of the star topology and ensure that the packets flow in a
circular manner between the PCs.
Open Packet Tracer and select the "Empty Activity " under the New tab.
Drag and drop (n) PCs and (n) switches from the “End Devices” and “Switches &
Hubs” sections, respectively, onto the workspace.
Lab Manual
Connect each PC to a separate switch. Make sure to establish a direct link between
each PC and its respective switch.
Connect the switches in a circular manner to form the ring topology. Each switch
should be connected to two neighboring switches.
Right-Click on each PC, select "Configure," and assign a unique IP address to each
PC. Make sure they are in the same subnet.
Connect the switches using cross cables in a round-robin manner. For example,
connect the Fast Ethernet interfaces between switches in the order of Switch1 →
Switch2 → Switch3 → Switch4 → Switch1.
Verification
Ping test. Select the "Desktop" view for one of the devices (e.g., a computer) by right-
clicking on it and selecting "Desktop." Open a command prompt or terminal window
on the device.
Use the ping command to test connectivity between devices. ping one computer from
the other by using its IP address. Type the following command in the command
prompt or terminal window as shown in Figure.
If the ping is successful, you should see replies indicating that the packets were sent
and received. This confirms that the ring topology is functioning properly.
Repeat the ping test for all devices connected to the ring to ensure connectivity
between them.
OR
Select a source device (e.g., PC 1) from which you want to send the packet. Select a
destination device (e.g., PC 2) from which you want to send the packet.
Click and hold the PDU icon in the toolbar, then drag it from the toolbar to the source
PC.
Release the mouse button to drop the PDU onto the source PC.
Click and drag the PDU from the source PC to the destination PC on the ring
topology.
Release the mouse button to drop the PDU onto the destination PC.
Observe the behavior of the ring topology and ensure that the packets flow in a
circular manner between the PCs.
Title: Study different types of networks and build LAN, WAN, and MAN using a Cisco
packet tracer.
Explanation:
Networks play a vital role in modern networking by enabling communication and resource
sharing among devices. Various types of networks serve different purposes to meet the
diverse needs of users and organizations. The most prominent types of networks include
Local Area Networks (LANs), Wide Area Networks (WANs), Metropolitan Area Networks
(MANs), Storage Area Networks (SANs), Virtual Private Networks (VPNs), Wireless
Networks, and Cloud Networks.
Procedure
a) Procedure to implement LAN in Packet Tracer
Open Cisco Packet Tracer and create a new project.
Drag and drop 3 PCs, 1 switch, and 1 router from the device list onto the workspace.
Connect each PC to the switch using Ethernet cables.
Connect one of the switch's ports to the router's Ethernet interface (usually labeled
FastEthernet or GigabitEthernet) using an Ethernet cable.
Right-click on each device, select "Configure," and set the IP address, subnet mask,
and default gateway accordingly.
Router Configuration: Double-click on the router to open its configuration. Configure
FastEthernet0/0 or the appropriate interface connected to the LAN (Configure the
router interfaces with appropriate IP addresses (Default gateways of your
PCs/Laptops).
Verification
Lab Manual
• You can then ping or perform other network tests between the devices to verify the
connectivity within the LAN
Verification
You can then ping or perform other network tests between the devices to verify the
connectivity within the LAN
Practice Problem:
Simulate a Metropolitan Area Network (MAN) using Cisco Packet Tracer.
Title: Setting a Basic Network with Server Configuration Using Packet Tracer.
Explanation:
Every computer on a network is called a host or end device. Servers are computers that
provide information to end devices
email servers
web servers
file server
Clients are computers that send requests to the servers to retrieve information:
web page from a web server
email from an email server
Web The web server runs web server software. Clients use
browser software to access web pages.
File The file server stores corporate and user files. The
client devices access these files.
Procedure
Design Your Network Topology: Use DNS, DHCP, and Web Servers.
Network 1 (N1):
3 PCs
1 Switch
Network 2(N2):
1 PC
1 Web Server
Lab Manual
1 DNS Server
1 DHCP Server
1 Switch
Router Configuration:
Identify Router Ports.
Determine which ports on the router connect to the switches from Network 1 and
Network 2. For example, let's assume:
FastEthernet0/0 connects to Switch-N1 in Network 1.
FastEthernet0/1 connects to Switch-N2 in Network 2.
Select the router in the workspace.
In the bottom-right corner of the Packet Tracer window, you should see a "Physical"
and "Config" tab. Click on the "Config" tab.
In the "Config" tab, you will see a list of interfaces (FastEthernet0/0, FastEthernet0/1,
etc.). Click on "FastEthernet0/0" to configure the interface that connects to Switch-
N1.
In the configuration pane for FastEthernet0/0, you can set the IP address, and subnet
mask, and enable the interface. For example:
IP Address: 192.168.1.1
Subnet Mask: 255.255.255.0
Check the box to enable the interface.
Click on "FastEthernet0/1" to configure the interface that connects to Switch-N2.
In the configuration pane for FastEthernet0/1, set the IP address, and subnet mask,
and enable the interface. For example:
IP Address: 192.168.2.1
Subnet Mask: 255.255.255.0
Check the box to enable the interface.
Title: Implementation and Study of Sliding Window Protocols (Go-Back-N and Selective
Repeat)
Explanation:
Go-Back-N Protocol
In this protocol, the frames are sent again if they are lost while being transmitted. The size of
the receiver buffer will be one, while the size of the sender buffer is predefined. The receiver
cancels the frame if it gets corrupted; when the sender's timer for an acknowledgment to be
received expires, the sender sends the same frame again without moving on with different
frames.
Algorithm:
Go-Back-N Sender
Go-Back-N Receiver
Lab Manual
Title: Implement and analyse protocols: HTTP, TCP, and ICMP using Wireshark.
Explanation:
Wireshark (previously called Ethereal) is one of the most widely used network protocol
analyzers.
It passively sniffs packets that are sent from or received by a designated network
interface, but never sends packets itself.
It receives a copy of sent packets from or received by applications and protocols
executing on end systems (e.g., your computer).
Wireshark also has a graphical front-end to display the packets it sniffs.
Figure 23 shows the structure of a network protocol analyzer. The right of the figure shows
the protocol stack and application layer (such as a web browser or an FTP client) that
normally run on your computer. The network protocol analyzer, shown within the dashed
rectangle, has two parts: packet capture and a packet analyzer. The packet capture library
receives a copy of every link-layer frame that is sent from or received by a designated
network interface. Recall that messages exchanged by upper-layer protocols such as HTTP,
FTP, TCP, UDP, DNS, or IP are eventually encapsulated in link-layer frames that are sent
over physical media such as an Ethernet cable. In the above Figure, the assumed physical
medium is an Ethernet, and so all upper layer protocols’ headers are eventually encapsulated
within an Ethernet frame. Capturing all link-layer frames thus gives you all messages sent
from or received by all protocols and applications executing on your computer.
Procedure
Lab Manual
Exploring HTTP
Launch Wireshark: Open Wireshark on your computer. Depending on your operating
system, you may need administrative privileges to capture traffic.
Start Capture: After selecting the desired interface, click the "Start" or "Capture" button.
Wireshark will begin capturing traffic on the chosen interface.
While Wireshark is running, enter the URL:
http://gaia.cs.umass.edu/wireshark-labs/INTRO-wireshark-file1.html
and have that page displayed in your browser.
The Ethernet frames containing these HTTP messages will be
captured by Wireshark.
After your browser has displayed the INTRO-wireshark-file1.html page, stop Wireshark
packet capture by selecting stop in the Wireshark capture window.
This will cause the Wireshark capture window to disappear and the main
Wireshark window to display all packets captured since you began packet capture.
Type in “HTTP” (without the quotes, and in lower case – all protocol names are lower
case in Wireshark) into the display filter specification window at the top of the main
Wireshark window. Then select Apply (to the right of where you entered “http”).
This will cause only HTTP message to be displayed in the packet-listing
window.
HTTP GET message that is sent to the gaia.cs.umass.edu web server is contained
within a TCP segment, which is contained (encapsulated) in an IP datagram, which
is encapsulated in an Ethernet frame.
Select the first HTTP message shown in the packet-listing window. This should be the
HTTP GET message that was sent from your computer to the
gaia.cs.umass.edu HTTP server.
Lab Manual
When you select the HTTP GET message, the Ethernet frame, IP datagram, TCP
segment, and HTTP message header
Information will be displayed in the packet header window.
By clicking the plus-and-minus boxes on the left side of the packet details window,
minimize the amount of Frame, Ethernet, Internet Protocol, and Transmission Control
Protocol information displayed. Maximize the amount of information displayed about the
HTTP protocol.
In particular, the minimized amount of protocol information for all protocols except
HTTP, and the maximum amount of protocol information for HTTP in the packet-header
window.
To know about the parameters, click on https://www.rose-
hulman.edu/class/csse/csse432/201230/Wireshark-Labs/Wireshark_HTTP.pdf
Exploring TCP
First, filter the packets displayed in the Wireshark window by entering “tcp” (lowercase,
no quotes, and don’t forget to press return after entering!) into the display filter
specification window towards the top of the Wireshark window.
Access a Web page like amazon, and then type tcp contains “amazon" in the filter.
To know about the parameters, click on https://www.rose-
hulman.edu/class/csse/csse432/201230/Wireshark-Labs/Wireshark_TCP.pdf.
Exploring ICMP
Start-up Wireshark and begin packet capture.
Go to command and ping a webpage or IP address.
In your trace, you should be able to see the series of ICMP Echo Requests (in the case of
Windows machines).
You will be able to see the address that you pinged in the ICMP echo request.
To know about the parameters, click on https://www.rose-
hulman.edu/class/csse/csse432/201230/Wireshark-Labs/Wireshark_IP.pdf
Output:
HTTP
Lab Manual
TCP
Lab Manual
ICMP
Lab Manual
Conclusion: Thus, analysed HTTP, TCP, and ICMP protocols using Wireshark.
Explanation:
Distance vector routing: This falls under the category of dynamic routing algorithms. These
algorithms function by having each route maintain a table that records the shortest known
distance to reach a destination and includes the corresponding link used to achieve this. These
tables are updated through information exchange with neighboring routers, and examples of
such algorithms include the "Bellman-Ford algorithm" and the "Ford-Fulkerson algorithm."
Link state routing: Link state routing is a method in which each router shares its
neighborhood’s knowledge with every other router in the internetwork. In this algorithm,
each router in the network understands the network topology and then makes a routing table
depending on this topology.
Procedure
9. Open Command Prompt: Press the Windows key, type "Command Prompt," and
select the app. Alternatively, press Windows key + R, type "cmd" in Run, and press
Enter.
10. Identify the issue: Determine the specific problem, like connectivity, DNS, or a slow
network.
11. Choose the relevant command: Select a command suited to the issue, e.g., "ping" for
connectivity problems.tracert
12. Enter the command: In the Command Prompt, type the command with
parameters/options, like "ping <IP address>", and press Enter.
13. Review output: Check responses, errors, or relevant information displayed.
14. Interpret results: Analyze output to understand network connection status or error
messages.
15. Perform additional commands: If needed, run more commands for further information
or tests.
16. Take appropriate action: Based on the command results, resolve the network issue by
adjusting settings, resetting devices, or seeking assistance.
Program:
Distance vector routing program:
Lab Manual
Lab Manual
Lab Manual
Lab Manual
Lab Manual
Explanation:
The approach to congestion management is called traffic shaping. One of the methods is the
leaky bucket algorithm. Each host is connected to the network by an interface containing a
leaky bucket, that is, a finite internal queue. If a packet arrives at the queue when it is full, the
packet is discarded. In other words, if one or more processes are already queued, the new
packet is unceremoniously discarded. This arrangement can be built into the hardware
interface or simulated by the host operating system. In fact, it is nothing other than a single
server queuing system with constant service time. The host is allowed to put one packet per
clock tick onto the network. This mechanism turns an uneven flow of packets from the user
process inside the host into an even flow of packets onto the network, smoothing outbursts
and greatly reducing the chances of congestion.
Algorithm:
1. The figure shows the leaky bucket algorithm that can be used to police the traffic flow.
2. At the arrival of the first packet, the content of the bucket is set to zero and the last
conforming time (LCT) is set to the arrival time of the first packet.
3. The depth of the bucket is L+I, where l depends on the traffic bustiness.
4. At the arrival of the kth packet, the auxiliary variable X records the difference between the
bucket content at the arrival of the last conforming packet and the inter-arrival time
between the last conforming packet and the kth packet.
5. If the auxiliary variable is greater than L, the packet is considered nonconforming,
otherwise the packet is conforming. The bucket content and the arrival time of the packet
are then updated.
Title: URL split Experiment: Splitting a Uniform Resource Locator (URL) into Its Four
Components.
Explanation:
A Universal Resource Locator (URL) is a unique web address, and it represents the location
of specific resources on the internet and has 4 components: The protocol (also referred to as
transfer protocol or scheme) in a URL determines how data is transferred between the host
and a web browser (or client), usually given as HTTP. The domain is the domain name and is
always present and is the registered identification “string” (or word/phrase). The port address
is not always mentioned or specified. The path refers to the exact location of a page, post,
file, or other asset.
Procedure
1. Take the input of the URL.
2. Check if the protocol is specified else print „NULL‟ or empty.
3. Then print the domain that is specified after the protocol.
4. Then check for the port which is after the colon and it is also either specified or
unspecified.
5. Finally check the path or the location.
Program:
Conclusion: The program successfully splits a URL string into its four components:
Protocol, Host/Domain, Port, and Path.