Computer Network Lab (CSDS)Manual_2023 -24 (1)
Computer Network Lab (CSDS)Manual_2023 -24 (1)
LABORATORY MANUAL
B.Tech., Semester –VI
Subject Code: KCS-653
Roll. No.:
Group/Branch:
JSS MAHAVIDYAPEETHA
DEPARTMENT OF INFORMATION TECHNOLOGY
JSS ACADEMY OF TECHNICAL EDUCATION
C-20/1, SECTOR-62, NOIDA
Computer Network Lab (KCS-653)
Table of Contents
1. Vision and Mission of the Institute
2. Vision and Mission of the Department
3. Programme Educational Objectives (PEOs)
4. Programme Outcomes (POs)
5. Programme Specific Outcomes (PSOs)
6. University Syllabus
7. Course Outcomes (COs)
8. CO- PO and CO-PSO mapping
9. Course Overview
10. List of Experiments
11. DOs and DON’Ts
12. General Safety Precautions
13. Guidelines for Students for Report Preparation
14. Lab Assessment Criteria
15. Details of Conducted Experiments
16. Lab Experiments
Mission:
M1: Develop a platform for achieving globally acceptable level of intellectual acumen and
technological competence.
M2: Create an inspiring ambience that raises the motivation level for conducting quality research.
M3: Provide an environment for acquiring ethical values and positive attitude.
“To become a Centre of Excellence in teaching and research in Information Technology for
producing skilled professionals having a zeal to serve society”
Mission:
M1: To create an environment where students can be equipped with strong fundamental concepts,
programming and problem solving skills.
M2: To provide an exposure to emerging technologies by providing hands on experience for
generating competent professionals.
M3: To promote Research and Development in the frontier areas of Information Technology and
encourage students for pursuing higher education
M4: To inculcate in students ethics, professional values, team work and leadership skills.
PSO2: Design, implement and evaluate processes, components and/or programs using modern
techniques, skills and tools of core Information Technologies to effectively integrate
secure IT-based solutions into the user environment.
PSO3: Develop impactful IT solutions by using research based knowledge and research methods
in the fields of integration, interface issues, security & assurance and implementation.
University Syllabus
1. Implementation of Stop and Wait Protocol and Sliding Window Protocol.
2. Study of Socket Programming and Client – Server model.
3. Write a code simulating ARP /RARP protocols.
4. Write a code simulating PING and TRACEROUTE commands.
5. Create a socket for HTTP for web page upload and download.
6. Write a program to implement RPC (Remote Procedure Call).
7. Implementation of Subnetting.
8. Applications using TCP Sockets like a. Echo client and echo server b. Chat c. File
Transfer.
9. Applications using TCP and UDP Sockets like d. DNS e. SNMP f. File Transfer
10. Study of Network simulator (NS).and Simulation of Congestion Control Algorithms using
NS.
11. Perform a case study about the different routing algorithms to select the network path with
its optimum and economical during data transfer. i. Link State routing ii. Flooding iii.
Distance vector.
12. To learn handling and configuration of networking hardware like RJ-45 connector, CAT-6
cable, crimping tool, etc.
13. Configuration of router, hub, switch etc. (using real devices or simulators)
14. Running and using services/commands like ping, traceroute, nslookup, arp, telnet, ftp, etc.
15. Network packet analysis using tools like Wireshark, tcpdump, etc. \
16. Network simulation using tools like Cisco Packet Tracer, NetSim, OMNeT++, NS2, NS3,
etc.
17. Socket programming using UDP and TCP (e.g., simple DNS, data & time client/server,
echo client/server, iterative & concurrent servers).
CO-PO Mapping
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1 3 2 2 2 2 2 2 2 2 3
CO2 3 2 2 2 2 2 2 2 2 3
CO3 3 2 2 2 2 2 2 2 2 3
CO4 3 2 2 2 2 2 2 2 2 3
CO5 3 2 2 2 2 2 2 2 2 3
COs 3 2 2 2 2 2 2 2 2 3
CO-PSO Mapping
PSO1 PSO2 PSO3
CO1 2 2 1
CO2 2 2 1
CO3 2 2 1
CO4 2 2 1
CO5 2 2 1
COs 2 2 1
Course Overview
Computer Networking Lab provides students with hands on training on various topologies and
protocols of Networking. It makes students acquainted with an overview of how the information
is transferred from source to destination and different layers in networks. Students can come to
know that how the routing algorithms work out in the network layer and in what manner the
networking techniques that can take place in computer.
A computer network is made of two distinct subsets of components Distributed applications are
programs running on interconnected computers; a web server, a remote login server, an e-mail
exchanger are examples. Encapsulation of various learning objectives includes: Analysis the
different layers in networks; Define, use, and differentiate such concepts as OSI-ISO,TCP/IP;
Sending bits from physical layer to data link layer; Simulation of presentation layer, application
layer for data compression and network security.
Course
Sl No. Program Name
Outcome
DON’Ts
1. Do not share your username and password.
2. Do not remove or disconnect cables or hardware parts.
3. Do not personalize the computer setting.
4. Do not run programs that continue to execute after you log off.
5. Do not download or install any programs, games or music on computer in Lab.
6. Personal Internet use chat room for Instant Messaging (IM) and Sites Strictly Prohibited.
7. No Internet gaming activities allowed.
8. Tea, Coffee, Water & Eatables are not allowed in the Computer Lab.
1) All files must contain a title page followed by an index page. The files will not be signed by
the faculty without an entry in the index page.
2) Student’s Name, Roll number and date of conduction of experiment must be written on all
pages.
Note:
1. Students must bring their lab record along with them whenever they come for the lab.
LAB EXPERIMENTS
LAB EXPERIMENT 1
BRIEF DESCRIPTION:
System requirement
The following configuration is recommended by Cisco to successfully install and run Packet
Tracer 7.0 :
Summary
Packet Tracer is a cross-platform visual simulation tool designed by Cisco Systems that
allows users to create network topologies and imitate modern computer networks. The
software allows users to simulate the configuration of Cisco routers and switches using a
simulated command line interface.
Packet Tracer is a cross-platform visual simulation tool designed by Cisco Systems that
allows users to create network topologies and imitate modern computer networks. The
software allows users to simulate the configuration of Cisco routers and switches using a
simulated command line interface. Packet Tracer makes use of a drag and drop user interface,
allowing users to add and remove simulated network devices as they see fit. The software is
mainly focused towards Certified Cisco Network Associate Academy students as an
educational tool for helping them learn fundamental CCNA concepts.
NS-2/NS-3
1. ns (from network simulator) is a name for a series of discrete event network simulators,
specifically ns-1, and ns-2.
2. All of them are discrete-event computer network simulators, primarily used in
research[2] and teaching.
System Requirements
Summary
NETWORK SIMULATOR 3
ns-3 has been developed to provide an open, extensible network simulation platform, for
networking research and education.
In brief, ns-3 provides models of how packet data networks work and perform, and provides a
simulation engine for users to conduct simulation experiments.
Some of the reasons to use ns-3 include to perform studies that are more difficult or not
possible to perform with real systems, to study system behavior in a highly controlled,
reproducible environment, and to learn about how networks work.
NETWORK SIMULATOR 2
It is not possible to run a simulation in ns-2 purely from C++ (i.e., as a main() program
without any OTcl). Moreover, some components of ns-2 are written in C++ and others in OTcl.
In ns-3, the simulator is written entirely in C++, with optional Python bindings.
New animators and visualizers are available and under current development. Since ns-
3 generates pcap packet trace files, other utilities can be used to analyze traces as well.
WIRESHARK
1. Wireshark is a network packet analyzer. A network packet analyzer will try to capture
network packets and tries to display that packet data as detailed as possible.
2. You could think of a network packet analyzer as a measuring device used to examine
what’s going on inside a network cable, just like a voltmeter is used by an electrician to
examine what’s going on inside an electric cable (but at a higher level, of course).
3. Wireshark is perhaps one of the best open source packet analyzers available today.
System Requirements
The amount of resources Wireshark needs depends on your environment and on the size of the
capture file you are analyzing. The values below should be fine for small to medium-sized capture
files no more than a few hundred MB. Larger capture files will require more memory and disk
space. If Wireshark runs out of memory it will crash.
1. Microsoft Windows
2. Unix/Linux
Summary
In late 1997 Gerald Combs needed a tool for tracking down network problems and wanted to
learn more about networking so he started writing Ethereal (the original name of the Wireshark
project) as a way to solve both problems.
In October, 1998 Guy Harris was looking for something better than tcpview so he started
applying patches and contributing dissectors to Ethereal.
The list of people who have contributed to the project has become very long since then, and
almost all of them started with a protocol that they needed that Wireshark or did not already
handle. So they copied an existing dissector and contributed the code back to the team.
In 2006 the project moved house and re-emerged under a new name: Wireshark.
In 2008, after ten years of development, Wireshark finally arrived at version 1.0. This release was
the first deemed complete, with the minimum features implemented. Its release coincided with the
first Wireshark Developer and User Conference, called Sharkfest.
In 2015 Wireshark 2.0 was released, which featured a new user interface.
OmNet++
System Requirements
1. simulation kernel library
2. NED topology description language
3. GUI for simulation execution, links into simulation executable (Tkenv)
4. command-line user interface for simulation execution (Cmdenv)
5. utilities (makefile creation tool, etc.)
6. documentation, sample simulations, etc.
7. OMNeT++ IDE based on the Eclipse platform
Summary
The simulator contains several models for structured (e.g. Chord, Kademlia, Pastry) and
unstructured (e.g. GIA) peer-to-peer protocols. An example implementation of the framework is
an implementation of a peer-to-peer SIP communications network.
Research tool- OverSim provides a convenient platform for simulating large-scale complex
overlay protocols and applications. Though it can be overwhelming at first, you will realize its
power when you develop a better understanding of the tool.
LAB EXPERIMENT 2
BRIEF DESCRIPTION:
1. Open your Network Topology. Once you've opened your Network Topology on Cisco
Packet Tracer, access your network and identify the components of your network, for
example; Servers, Routers, End Devices, etc.
2. Complete the cabling. Access the cables section and connect completely and correctly the
cables between the networks in order to ensure connectivity between the devices in the
network using the connections table given.
3. Using the address table still, correctly and completely configure the IP addresses on all
end devices. This can be done by accessing the desktop platform on each device and
locating the IP configuration section. The reason for doing this is to enable the devices be
on the right network.
4. After configuring the addresses, you will have to test connectivity by opening a command
prompt window on the end devices and try pinging the address which the network
operates on. If it gives you a reply, it means your network was configured correctly.
The step by procedure of creating Bus topology on Cisco Packet Tracer is shown in Figures 1-
6 below
Fig 3: Establish the links between the network devices and generic switches
Bus Topology
LAB EXPERIMENT 3
ALGORITHM/SYNTAX:
SENDER SITE:
I. During the transmission, attach a flag pattern (01111110) at the start & end of data unit.
II. If transmitter for sees five consecutive one’s in data, it stuffs zero bit in data.
Ex: - Pattern to be transmitted – 00011110111110000
Message transmitted - 000111101111100000
as 5 consecutive 1’s are detected, one 0 should be stuffed
RECEIVER SITE:
I. During the reception de stuff flag pattern (01111110) from the data units.
II. At the receiving end, whenever in data it finds five consecutive one’s and the next bit are
zero then the receiver will de stuff that zero bit.
Ex:- Pattern to be transmitted – 00011110111110000
Message Received - 000111101111100000
at the receiver side again as it will detect 0 after 5 consecutive 1’s , it will destuff it.
LAB ASSIGNMENT:
LAB EXPERIMENT 4
ALGORITHM:
SENDER SITE:
RECEIVER SITE
I. At the receiving end, whenever the data it finds DLE STX then receiver will destuff One DLE
STX.
II. Whenever finds the Escape sequence de-stuff it.
LAB ASSIGNMENT:
Q.1 What happens if the two-character sequence DLE ETX happens to appear in the frame itself.
Q2. How byte stuffing is different from bit stuffing?
LAB EXPERIMENT 5
ALGORITHM:
1011 | 1001011100
1011
001001
1001
0010
001011
1011
0000 Remainder
LAB ASSIGNMENT:
SENDER SITE:
INPUT:
Enter the data word: 1001
Enter the divisor
1011
OUTPUT: Sent word is
1001110
RECEIVER SITE:
INPUT:
Enter the data word
1001110
Enter the divisor
1011
OUTPUT: 000
No error
Q.1 How do you interpret that the syndrome is free from errors?
LAB EXPERIMENT 6
ALGORITHM:
Hamming codes work well when we can reasonably expect errors to be rare events. (ex: hard
drives)
Hamming codes are useless when multiple adjacent errors are likely to occur. These errors are
called “burst errors” that result from mishandling removable media (ex: magnetic tapes or CDs).
LAB ASSIGNMENT:
Data Parity Code
Bits Bit Word
00 0 000
01 1 011
10 1 101
11 0 110
000* 100
001 101*
010 110*
011* 111
LAB EXPERIMENT 7
ALGORITHM:
1. Start the program.
2. Get the frame size from the user
3. To create the frame based on the user request.
4. To send frames to server from the client side.
5. If your frames reach the server it will send ACK signal to client otherwise it
will send NACK signal to client.
6. Stop the program.
LAB ASSIGNMENT:
INPUT:
Data frame based on sender window
OUTPUT:
ENTER THE WINDOWS SIZE: 10
SENDER WINDOW IS EXPANDED TO STORE MESSAGE OR WINDOW
ENTER THE DATA TO BE SENT:
MESSAGE SEND BY THE SENDER:
WINDOW SIZE OF RECEIVER IS EXPANDED
LAB EXPERIMENT 8
OBJECTIVE: Implement Subnetting to generate Range of IP Addresses (First & Last).
BRIEF DESCRIPTION: IP (Internet Protocol) addresses are used to identify hosts on the
campus Internet, a network that ties into the Internet, a global network. If the computer is attached
to the network, it needs an IP address to be recognized as part of the campus Internet. IP
addresses are constructed according to a set of specific rules so that hosts on any part of the
Internet can communicate with each other. An IP address consists of a 32-bit binary number,
which is typically presented as four decimal numbers (one for each 8-bit byte) separated by
decimal points. For example, 128.253.21.58.
HostAddress
The host address is the address given to the workstation, other computer, or device that is
connected to the LAN.
Subnetting
Subnetting is the process of dividing an IP network in to sub divisions called subnets. Computers
belonging to a sub network have a common group of most-significant bits in their IP addresses.
So, this would break the IP address in to two parts (logically), as the network prefix and the rest
field. Dividing an IP network in to sub divisions is subnetting. It divides an IP address in to two
parts as the network (or routing prefix) and the rest field (which is used to identify a specific
host). CIDR notation is used for writing a routing prefix. This notation uses a slash (/) to separate
the network starting address and the length of the network prefix (in bits). For example, in IPv4,
192.60.128.0/22 indicates that 22 bits are allocated for the network prefix and the remaining 10
bits are reserved for the host address. In addition, routing prefix can also be represented using the
subnet mask. 255.255.252.0 (11111111.11111111.11111100.00000000) is the subnet mask for
192.60.128.0/22. Separating the network portion and the subnet portion of an IP address is done
by performing a bitwise AND operation between the IP address and the subnet mask. This would
result in identifying the network prefix and the host identifier.
Supernetting
Supernetting combines several sub networks, having a Classless Inter-Domain Routing (CIDR)
routing prefix. Supernetting is also called route aggregation or route summarization. Supernetting
is the practice of combining several IP networks with a common network prefix. Supernetting was
introduced to tackle the problem of increasing size in routing tables. Supernetting also simplifies
the routing process. For example, the subnetworks 192.60.2.0/24 and 192.60.3.0/24 can be
merged with the supernetwork denoted by 192.60.2.0/23. In the supernet, the first 23 bits are the
network part of the address and the other 9 bits are used as the host identifier. So, one address will
represent several small networks and this would reduce the number of entries that should be
integrated in the routing table. Supernetting is typically used for class C IP addresses (addresses
beginning with 192 to 223 in decimal), and most of the routing protocols support supernetting.
Examples of such protocols are Border Gateway Protocol (BGP) and Open Shortest Path First
(OSPF). But, protocols such as Exterior Gateway Protocol (EGP) and the Routing Information
Protocol (RIP) do not support supernetting.
LAB ASSIGNMENT:
Q1. How many subnets and hosts per subnet can you get from the network
172.28.0.0 255.255.254.0?
LAB EXPERIMENT 9
OBJECTIVE: To implement date and time display along with message transfer
(Chat) from local host to server using TCP /UDP
BRIEF DESCRIPTION: To compute date and time from local host using transmission control
protocol.
ALGORITHM:
CLIENT
1. Start the program
2. Include necessary package in java
3. To create a socket in client to server.
4. The client connection accept to the server and replay to read the system date and time.
5. Stop the program.
SERVER
INPUT: Insert a client request
1. Start the program
2. Include necessary package in java
3. To create a socket in server to client.
4. To display the current date and time to client
5. Stop the program
OUTPUT:
CLIENTSIDE:
C:\Program Files\Java\jdk1.5.0\bin>javac dateclient.java Note:
dateclient.java uses or overrides a deprecated API. Note:
Recompile with -deprecation for details. C:\Program
Files\Java\jdk1.5.0\bin>java dateclient
LAB ASSIGNMENT:
THE date in the server is: Sat Jul 19 13:01:16 GMT+05:30 2008
C:\Program Files\Java\jdk1.5.0\bin>
SERVERSIDE:
C:\Program Files\Java\jdk1.5.0\bin>javac dateserver.java Note:
dateserver.java uses or overrides a deprecated API. Note:
Recompile with -deprecation for details.
C:\Program Files\Java\jdk1.5.0\bin>java dateserver
THE CLIENT SYSTEM ADDRESS IS :com17/192.168.21.17
LAB EXPERIMENT 10
ALGORITHM:
Key generation
RSA involves a public key and a private key; the public key can be known to everyone and is
used for encrypting messages. Messages encrypted with the public key can only be decrypted in a
reasonable amount of time using the private key. The keys for the RSA ALGORITHM are
generated the following way:
This can be done quickly using the method of exponentiation by squaring. Bob then transmits c to
Alice.
Decryption
Alice can recover m from c by using her private key exponent d via computing
Given m, she can recover the original message M by reversing the padding scheme.
LAB ASSIGNMENT:
Q1.Callie wants to send the message M = 13 to Alice. Using Alice’s public and private keys,
calculate the cipher text C, and the value for R when Alice recovers the message.
Q2. Dexter wants to set up his own public and private keys. He chooses p = 23 and q = 19 with
e = 283. Find d so that ed has a remainder of 1 when divided by (p − 1)(q − 1)
LAB EXPERIMENT 11
ALGORITHM:
The steps for Diffie Hellman key exchange ALGORITHM are:
Step 1 : GLOBAL PUBLIC ELEMENTS
Select any prime no : 'q'
LAB ASSIGNMENT:
INPUT: random prime number
OUTPUT: Symmetric Key