5th Sem CN Lab Manual 2021-22
5th Sem CN Lab Manual 2021-22
COMPUTER NETWORK
LABORATORY
Manual
(Subject Code: 18CSL57)
SEMESTER – V
BMS INSTITUTE OF TECHNOLOGYAND MANAGEMENT
VISION MISSION
Accomplish a stimulating learning
To emerge as one of the finest technical
environment through high quality
institutions of higher learning, to develop
academic instruction, innovation and
engineering professionals who are
industry-institute interface.
technically competent, ethical and
environment friendly for betterment of
the society.
ABOUT INSTITUTION
In view of the growing demand for technical education and with the goal of establishing a
premier technical education on par with international standards, a new technical institution by
name 'BMS Institute of Technology and Management' was established in 2002. Currently,
BMSIT & M offers eight UG, three PG programs and Ph.D. /M.Sc. (Engg.) in seven disciplines. BMSIT
& M considers research to be of equal importance as academics for the betterment of an
institution. Research culture has been embraced well by the faculty members and research
scholars at BMSIT and M. In this report, we present an overview of the research activities of
Information Science and Engineering, BMSIT & M.
BMS Institute of Technology and Management Computer Network Laboratory [18CSL57]
VISION
Emerge as Centre of Learning in the field of information
Science & engineering with technical competency to serve
the society.
MISSION
To provide excellent learning environment
Through Balanced Curriculum, Best Teaching
Methods, Innovation, Mentoring and Industry
Institute Interaction.
ABOUT DEPARTMENT
The Department of Information Science and Engineering started in the Year 2010 with an
approved intake of 60 and enhanced to 180 from the academic year 2019-20. The Department
has qualified and professionally dedicated faculty member practice OBE in the academic
deliverables. The faculties have published research articles in various National, International,
IEEE Conferences and Journals.
The department has modern laboratories to serve the teaching and research needs of the
students as well as faculty members. The Department has been organizing
conferences, workshops, expert lectures and student centric activities to encourage students and
faculty to install lifelong learning. Few of our students are working for consultancy projects
along with few faculty members. The staffs are encouraged to attend the 10 days internship to
bridge the gap between the academics and industry. The department has admirable research
ambiance.
Laboratory Instructors
COURSE OUTCOMES
PSO-2: Design and Develop hardware systems, manage and monitor resources in the
Product life cycle.
PEO-2: Pursue higher studies & research for advancement of knowledge in IT industry.
PROGRAMME OUTCOMES
Program outcomes are narrower statements that describe what students are expected to know
and be able to do by the time of graduation. These relate to the skills, knowledge and behavior.
Bachelor of Engineering Graduation students of Information science and Engineering program at
B M S Institute of Technology will attain the following program outcomes.
Program Outcomes:
After the successful completion of the course, the graduate will be able to
PO1: Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex engineering problems.
PO2: Problem analysis: Identify, formulate, review research literature, and analyse complex
engineering problems reaching substantiated conclusions using first principles of mathematics,
natural sciences, and engineering sciences.
PO5: 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.
PO6: 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.
PO7: Environment and sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and need for
sustainable development.
PO8: Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
PO9: Individual and team work: Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
PO11: 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.
PO12: 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.
CONTENTS:
Sl.
Topic. Page No
no
1. Syllabus 8
Implement three nodes point – to – point network with duplex links between 18
3. them. Set the queue size, vary the bandwidth and find the number of packets
dropped.
Implement transmission of ping messages/trace route over a network topology 20
4. consisting of 6 nodes and find the number of packets dropped due to
congestion.
Implement an Ethernet LAN using n nodes and set multiple traffic nodes and 23
5. plot congestion window for different source / destination.
Implement and study the performance of CDMA on NS2/NS3 (Using stack called 36
8. Call net) or equivalent environment.
Write a program for error detecting code using CRC-CCITT (16- bits). 42
9.
Write a program to find the shortest path between vertices using bellman-ford 45
10. algorithm.
Using TCP/IP sockets, write a client – server program to make the client send 49
11. the file name and to make the server send back the contents of the requested
file if present.
Write a program on datagram socket for client/server to display the messages 51
12. on client side, typed at the server side.
13. Write a program for simple RSA algorithm to encrypt and decrypt the data. 53
14. Write a program for congestion control using leaky bucket algorithm. 56
Introduction to NS-2
Tcl scripting
Tcl is a general purpose scripting language. [Interpreter]
Tcl runs on most of the platforms such as Unix, Windows, and Mac.
The strength of Tcl is its simplicity.
It is not necessary to declare a data type for variable prior to the usage.
Basics of TCL
Syntax: command arg1 arg2 arg3
Hello World!
puts stdout{Hello, World!}
Hello, World!
• Variables Command Substitution
set a 5 set len [string length foobar]
set b $a set len [expr [string length foobar] + 9]
• Loops
NS Simulator Preliminaries.
1. Initialization and termination aspects of the ns simulator.
2. Definition of network nodes, links, queues and topology.
3. Definition of agents and of applications.
4. The nam visualization tool.
5. Tracing and random variables.
Initialization and Termination of TCL Script in NS-2 An ns
simulation starts with the command
set ns [new Simulator]
Which is thus the first line in the tcl script? This line declares a new variable as using the set command,
you can call this variable as you wish, In general people declares it as ns because it is an instance of the
Simulator class, so an object the code[new Simulator] is indeed the installation of the class Simulator
using the reserved word new.
In order to have output files with data on the simulation (trace files) or files used for
visualization (nam files), we need to create the files using ―open‖ command:
#Open the Trace file set tracefile1 [open out.tr w]
$ns trace-all $tracefile1
The above creates a data trace file called ―out.tr‖ and a nam visualization trace file called
―out.nam‖. Within the tcl script, these files are not called explicitly by their names, but instead by
pointers that are declared above and called ―tracefile1‖ and ―namfile‖ respectively. Remark that they
begins with a # symbol. The second line open the file ―out.tr‖ to be used for writing, declared with the
letter ―w‖. The third line uses a simulator method called trace-all that have as parameter the name of the
file where the traces will go.
The last line tells the simulator to record all simulation traces in NAM input format. It also gives
the file name that the trace will be written to later by the command $ns flush-trace. In our case, this will
be the file pointed at by the pointer ―$namfile‖,i.e the file ―out.tr‖.
The termination of the program is done using a ―finish‖ procedure.
The word proc declares a procedure in this case called finish and without arguments. The word
global is used to tell that we are using variables declared outside the procedure. The simulator method
―flush-trace” will dump the traces on the respective files. The tcl command ―close” closes the trace
files defined before and exec executes the nam program for visualization. The command exit will ends
the application and return the number 0 as status to the system. Zero is the default for a clean exit. Other
values can be used to say that is a exit because something fails.
At the end of ns program we should call the procedure ―finish‖ and specify at what time the
termination should occur. For example,
Which means that $n0 and $n2 are connected using a bi-directional link that has 10ms of
propagation delay and a capacity of 10Mb per sec for each direction.
In our case, if the buffer capacity of the output queue is exceeded then the last packet to arrive is
dropped. Many alternative options exist, such as the RED (Random Early Discard) mechanism, the FQ
(Fair Queuing), the DRR (Deficit Round Robin), the stochastic Fair Queuing (SFQ) and the CBQ
(which including a priority and a round-robin scheduler).
In ns, an output queue of a node is implemented as a part of each link whose input is that node.
We should also define the buffer capacity of the queue related to each link. An example would be:
Defines the behaviour of the destination node of TCP and assigns to it a pointer called sink. #Setup a
UDP connection
set udp [new Agent/UDP]
For example, the default TCP packet size has a size of 1000bytes.This can be changed to another
value, say 552bytes, using the command $tcp set packetSize_ 552. When we have several flows, we
may wish to distinguish them so that we can identify them with different colors in the visualization part.
This is done by the command $tcp set fid_1 that assigns to the TCP connection a flow identification of
―1‖.We shall later give the flowidentification of ―2‖ to the UDP connection.
A UDP source and destination is defined in a similar way as in the case of TCP.
Instead of defining the rate in the command $cbr set rate_ 0.01Mb, one can define the time
interval between transmission of packets using the command.
$cbr set interval_ 0.005
Scheduling Events
NS is a discrete event based simulation. The tcp script defines when event should occur. The initializing
command set ns [new Simulator] creates an event scheduler, and events are then scheduled using the format:
$ns at <time><event>
The scheduler is started when running ns that is through the command $ns run. The
beginning and end of the FTP and CBR application can be done through the following command
$ns at 0.1 “$cbr start”
When tracing into an output ASCII file, the trace is organized in 12 fields as follows in fig
shown below, The meaning of the fields are:
Event Time From To PKT PKT Flags Fid Src Dest Seq Pkt
Node Node Type Size Addr Addr Num id
1. The first field is the event type. It is given by one of four possible symbols r, +, -, d which
correspond respectively to receive (at the output of the link), enqueued, dequeued and dropped.
2. The second field gives the time at which the event occurs.
3. Gives the input node of the link at which the event occurs.
4. Gives the output node of the link at which the event occurs.
5. Gives the packet type (eg CBR or TCP)
6. Gives the packet size
7. Some flags
8. This is the flow id (fid) of IPv6 that a user can set for each flow at the input OTcl script one can
further use this field for analysis purposes; it is also used when specifying stream color for the NAM
display.
9. This is the source address given in the form of ―node.port‖.
10. This is the destination address, given in the same form.
11. This is the network layer protocol‘s packet sequence number. Even though UDP implementations in
a real network do not use sequence number, ns keeps track of UDP packet sequence number for
analysis purposes
12. The last field shows the unique id of the packet.
XGRAPH
The xgraph program draws a graph on an x-display given data read from either data file or from
standard input if no files are specified. It can display upto 64 independent data sets using different colors
and line styles for each set. It annotates the graph with a title, axis labels, grid lines or tick marks, grid
labels and a legend.
Syntax:
Xgraph [options] file-name
Awk- An Advanced
Here, selection_criteria filters input and select lines for the action component to act upon. The
selection_criteria is enclosed within single quotes and the action within the curly braces. Both the
selection_criteria and action forms an awk program.
Example: $ awk „/manager/ {print}‟ emp.lst
Variables
Awk allows the user to use variables of there choice. You can now print a serial number, using the
variable kount, and apply it those directors drawing a salary exceeding 6700:
$ awk –F”|” „$3 == “director” && $6 > 6700 { count
=count+1
printf “ %3f %20s %-12s %d\n”, count,$2,$3,$6 }‟ empn.lst THE –f
OPTION: STORING awk PROGRAMS INA FILE
You should holds large awk programs in separate file and provide them with the awk extension
for easier identification. Let‘s first store the previous program in the file empawk.awk:
$ cat empawk.awk
Observe that this time we haven‘t used quotes to enclose the awk program. You can now use
awk with the –f filename option to obtain the same output:
Awk –F”|” –f empawk.awk empn.lst
Awk statements are usually applied to all lines selected by the address, and if there are no
addresses, then they are applied to every line of input. But, if you have to print something before
processing the first line, for example, a heading, then the BEGIN section can be used gainfully.
Similarly, the end section useful in printing some totals after processing is over. The BEGIN and END
sections are optional and take the form
BEGIN {action}
END {action}
These two sections, when present, are delimited by the body of the awk program. You can use
them to print a suitable heading at the beginning and the average salary at the end.
BUILT-IN VARIABLES
Awk has several built-in variables. They are all assigned automatically, though it is also possible
for a user to reassign some of them. You have already used NR, which signifies the record number of
the current line. We‘ll now have a brief look at some of the other variable. The FS Variable:as stated
elsewhere, awk uses a contiguous string of spaces as the defaultfield delimiter.
FS redefines this field separator, which in the sample database happens to be the |. When used at
all, it must occur in the BEGIN section so that the body of the program knows its value before it starts
processing:
BEGIN {FS=”|”}
This is an alternative to the –F option which does the same thing.
The OFS Variable:when you used the print statement with comma-separated arguments, eachargument
was separated from the other by a space. This is awk‘s default output field separator, and can reassigned
using the variable OFS in the BEGIN section:
BEGIN { OFS=”~” }
When you reassign this variable with a ~ (tilde), awk will use this character for delimiting the print
arguments. This is a useful variable for creating lines with delimited fields.
The NF variable:NF comes in quite handy for cleaning up a database of lines that don‘tcontain the right
number of fields. By using it on a file, say emp.lst, you can locate those lines not having 6 fields, and
which have crept in due to faulty data entry:
$awk „BEGIN {FS = “|”}
NF! =6 {
Print “Record No “, NR, “has”, “fields”}‟ empx.lst
The FILENAME Variable:FILENAME stores the name of the current file being processed.Like grep
and sed, awk can also handle multiple filenames in the command line. By default, awk doesn‘t print the
filename, but you can instruct it to do so:
„$6<4000 {print FILENAME, $0 }‟
With FILENAME, you can device logic that does different things depending on the file that is
processed.
NS2 Installation
➢ Go to Computer File System now paste the zip file “ns-allinone-2.34.tar.gz” into opt folder.
Now unzip the file by typing the following command [root@localhost
opt] # tar -xzvf ns-allinone-2.34.tar.gz
After the files get extracted, we get ns-allinone-2.34 folder as well as zip file ns-allinone-
2.34.tar.gz
[root@localhost opt] # ns-allinone-2.34 ns-allinone-2.34.tar.gz
Now go to ns-allinone-2.33 folder and install it
[root@localhost opt] # cd ns-allinone-2.34
[root@localhost ns-allinone-2.33] # ./install
Once the installation is completed successfully we get certain pathnames in that terminal which
must be pasted in “.bash_profile” file.
First minimize the terminal where installation is done and open a new terminal and open the file
“.bash_profile”
[root@localhost ~] # vi .bash_profile
When we open this file, we get a line in that file which is shown below
PATH=$PATH:$HOME/bin
To this line we must paste the path which is present in the previous terminal where ns wasinstalled.
First put “:” then paste the path in-front of bin. That path is shown below.
“:/opt/ns-allinone-2.33/bin:/opt/ns-allinone-2.33/tcl8.4.18/unix:/opt/ns-allinone-
2.33/tk8.4.18/unix”.
In the next line type “LD_LIBRARY_PATH=$LD_LIBRARY_PATH:” and paste the two
paths separated by “:” which are present in the previous terminal i.e Important notices section
(1)
“/opt/ns-allinone-2.33/otcl-1.13:/opt/ns-allinone-2.33/lib”
In the next line type “TCL_LIBRARY=$TCL_LIBRARY:” and paste the path which is
present in previous terminal i.e Important Notices section (2)
“/opt/ns-allinone-2.33/tcl8.4.18/library”
In the next line type “export LD_LIBRARY_PATH”
In the next line type “export TCL_LIBRARY”
The next two lines are already present the file “export PATH” and “unset USERNAME”
Save the program ( ESC + shift : wq and press enter )
Now in the terminal where we have opened .bash_profile file, type the following command to
check if path is updated correctly or not
[root@localhost ~] # vi .bash_profile [root@localhost
~] # source .bash_profile
If path is updated properly, then we will get the prompt as shown below
[root@localhost ~] #
Now open the previous terminal where you have installed ns
[root@localhost ns-allinone-2.33] #
Here we need to configure three packages “ns-2.33”, “nam-1.13” and “xgraph-12.1”
First, configure “ns-2.33” package as shown below
[root@localhost ns-allinone-2.33] # cd ns-2.33
[root@localhost ns-2.33] # ./configure [root@localhost
ns-2.33] # make clean [root@localhost ns-2.33] # make
[root@localhost ns-2.33] # make install [root@localhost
ns-2.33] # ns
%
If we get “%” symbol it indicates that ns-2.33 configuration was successful.
Second, configure “nam-1.13” package as shown below
[root@localhost ns-2.33] # cd . . [root@localhost ns-
allinone-2.33] # cd nam-1.13 [root@localhost nam-1.13] #
./configure [root@localhost nam-1.13] # make clean
[root@localhost nam-1.13] # make [root@localhost nam-
1.13] # make install [root@localhost nam-1.13] # ns
PART-A
1. Implement three nodes point – to – point network with duplex links between them. Set the
queue size, vary the bandwidth and find the number of packets dropped.
#===================================
# Simulation parameters setup
#===================================
set val(stop) 10.0 ;# time of simulation end
#===================================
# Initialization
#===================================
#Create a ns simulator
set ns [new Simulator]
#===================================
# Nodes Definition
#===================================
#Create 3 nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
#===================================
# Links Definition
#===================================
#Createlinks between nodes
$ns duplex-link $n0 $n1 100.0Mb 10ms DropTail
$ns queue-limit $n0 $n1 50
$ns duplex-link $n1 $n2 0.1Mb 10ms DropTail
$ns queue-limit $n1 $n2 50
#===================================
# Agents Definition
#===================================
#Setup a UDP connection
set udp0 [new Agent/UDP]
$ns attach-agent $n0 $udp0
set null1 [new Agent/Null]
$ns attach-agent $n2 $null1
$ns connect $udp0 $null1
$udp0 set packetSize_ 1500
#===================================
# Applications Definition
#===================================
#Setup a CBR Application over UDP connection
set cbr0 [new Application/Traffic/CBR]
$cbr0 attach-agent $udp0
$cbr0 set packetSize_ 1000
$cbr0 set rate_ 1.0Mb
$cbr0 set random_ null
$ns at 1.0 "$cbr0 start"
$ns at 2.0 "$cbr0 stop"
#===================================
# Termination
#===================================
#Define a 'finish' procedure
proc finish {} {
global ns tracefile namfile
$ns flush-trace
close $tracefile
close $namfile
exec nam p1.nam &
exit 0
}
$ns at $val(stop) "$ns nam-end-wireless $val(stop)"
$ns at $val(stop) "finish"
$ns at $val(stop) "puts \"done\" ; $ns halt"
$ns run
Output
Output
3. Implement an Ethernet LAN using n nodes and set multiple traffic nodes and plot
congestion window for different source / destination.
proc finish {} {
global ns f nf
$ns flush-trace
close $f
close $nf
exit 0
}
set n0 [$ns node]
set n1 [$ns node]
proc findWindowSize
{tcpSource outFile} {
global ns f nf
proc plotWindow {} {
exec xgraph congestion1.xg -
bg white -fg black -lw 2
400*400 &
exec xgraph congestion2.xg -
bg white -fg black -lw 2
400*400 &
exit 0
$ns run
$ns run
Output
4. Implement simple ESS and with transmitting nodes in wire-less LAN by simulation and
determine the performance with respect to transmission of packets.
proc finish {} {
global ns f nf
$ns flush-trace
close $f
close $nf
exec nam p4.nam &
exit 0;
}
$ns make-lan "$n0 $n1 $n2 $n3 $n4" 1Mb 10ms LL Queue/DropTail Mac/802_3
$ns make-lan "$n5 $n6 $n7 $n8 $n9" 1Mb 10ms LL Queue/DropTail Mac/802_3
$ns run
#To run the awk file use command : awk -f 4.awk p4.tr
BEGIN {
cbrPktReceived=0;
totalPktReceived=0;
ftpPktReceived=0;
throughput=0;
}
{
totalPktReceived=cbrPktReceived+ftpPktReceived;
}
END {
throughput=((totalPktReceived*500*8)/(1000000))
printf "the throughput is:%dMbps\n",throughput
}
Output
5. Implement and study the performance of GSM on NS2/NS3 (Using MAC layer) or
equivalent environment.
Second Generation (2G) technology is based on the technology known as global system for
mobile communication (GSM). This technology enabled various networks to provide services
like text messages, picture messages and MMS. The technologies used in 2G are either TDMA
(Time Division Multiple Access) which divides signal into different time slots or CDMA (Code
Division Multiple Access) which allocates a special code to each user so as to communicate over
a multiplex physical channel.
GSM uses a variation of time division multiple access (TDMA). 2G networks developed as a
replacement for first generation (1G) analog cellular networks, and the GSM standard originally
described as a digital, circuit-switched network optimized for fullduplex voice telephony. This
expanded over time to include data communications, first by circuit-switched transport, then by
packet data transport via GPRS (General Packet Radio Services).
GSM can be implemented on all the versions of NS2 (Since year 2004: ns-2.27, and later
versions of NS2)
Design:
Program
puts "---------------------------------------"
set m 0
puts "----------------------------------------"
puts "| Node | One hop neighbour |"
puts "----------------------------------------"
for {set i 0} {$i < $val(nn) } {incr i} {
set k 0
for {set j 0} {$j < $val(nn) } {incr j} {
}
puts "----------------------------------------"
}
set holdtime 0
set holdseq 0
set holdrate1 0
proc record {} {
global sink f0 f1 f2 holdtime holdseq holdrate1
source link.tcl
proc stop {} {
global ns_ tracefd f0 f1 f2
$ns_ flush-trace
#link code
Output :
6. Implement and study the performance of CDMA on NS2/NS3 (Using stack called Call net)
or equivalent environment.
3G networks developed as a replacement for second generation (2G) GSM standard network
with full duplex voice telephony. CDMA is used as the access method in many mobile phone standards.
IS-95, also called cdma One, and its 3G evolution CDMA2000, are often simply referred to as CDMA,
but UMTS(The Universal Mobile Telecommunications System is a third generation mobile cellular
system for networks based on the GSM standard.), the 3G standard used by GSM carriers, also uses
wideband CDMA. Long-Term Evolution (LTE) is a standard for high-speed wireless communication
which uses CDMA network technology.
3G technology generally refers to the standard of accessibility and speed of mobile devices. The
standards of the technology were set by the International Telecommunication Union (ITU). This
technology enables use of various services like GPS (Global Positioning System), mobile television and
video conferencing. It not only enables them to be used worldwide, but also provides with better
bandwidth and increased speed. The main aim of this technology is to allow much better coverage and
growth with minimum investment.
CDMA can be implemented on all the versions of NS2 (Since year 2004: ns-2.27, and later versions
of NS2)
Program:
-agentTrace ON \
-routerTrace ON \
-macTrace OFF
set holdtime 0
set holdseq 0
set holdrate1 0
proc record {} {
source link.tcl
proc stop {} {
global ns_ tracefd f0 f1 f2
#link code
Output :
PART-B
Java is a general-purpose computer programming language that is simple, concurrent, class object
language. The compiled Java code can run on all platforms that support Java without the need for
Department of Information Science and Engineering Page 40
BMS Institute of Technology and Management Computer Network Laboratory [18CSL57]
recompilation hence Java is called as "write once, run anywhere"(WORA).The Java compiled
intermediate output called ―byte-code‖ that can run on any Java virtual machine (JVM) regardless of
computer architecture. The language derives much of its syntax from C and C++, but it has fewer low-
level facilities than either of them.
In Linux operating system Java libraries are preinstalled. It‘s very easy and convenient to
compile and run Java programs in Linux environment. To compile and run Java Program is a two-step
process:
The Java compiler (Javac) compiles java program and generates a byte-code with the same file
name and .class extension.
2. Run Java program from Command Prompt
[root@host ~]# java Filename
The java interpreter (Java) runs the byte-code and gives the respective output. It is important to
note that in above command we have omitted the .class suffix of the byte-code (Filename.class).
1. Write a program for error detecting code using CRC-CCITT (16- bits).
Whenever digital data is stored or interfaced, data corruption might occur. Since the beginning of
computer science, developers have been thinking of ways to deal with this type of problem. For serial data
they came up with the solution to attach a parity bit to each sent byte. This simple detection mechanism
works if an odd number of bits in a byte changes, but an even number of false bits in one byte will not be
detected by the parity check. To overcome this problem developers have searched for mathematical sound
mechanisms to detect multiple false bits. The CRC calculation or cyclic redundancy check was the result of
this. Nowadays CRC calculations are used in all types of communications. All packets sent over a network
connection are checked with a CRC. Also each data block on your hard disk has a CRC value attached to it.
Modern computer world cannot do without these CRC calculations. So let's see why they are so widely used.
The answer is simple; they are powerful, detect many types of errors and are extremely fast to calculate
especially when dedicated hardware chips are used.
The idea behind CRC calculation is to look at the data as one large binary number. This number is
divided by a certain value and the remainder of the calculation is called the CRC. Dividing in the CRC
calculation at first looks to cost a lot of computing power, but it can be performed very quickly if we use a
method similar to the one learned at school. We will as an example calculate the remainder for the character
'm'—which is 1101101 in binary notation— by dividing it by 19 or 10011. Please note that 19 is an odd
number. This is necessary as we will see further on. Please refer to your schoolbooks as the binary
calculation method here is not very different from the decimal method you learned when you were young. It
might only look a little bit strange. Also notations differ between countries, but the method is similar.
With decimal calculations you can quickly check that 109 divided by 19 gives a quotient of 5 with 14 as
the remainder. But what we also see in the scheme is that every bit extra to check only costs one binary
comparison and in 50% of the cases one binary subtraction. You can easily increase the number of bits
of the test data string—for example to 56 bits if we use our example value "Lammert"—and the result
can be calculated with 56 binary comparisons and an average of 28 binary subtractions. This can be
implemented in hardware directly with only very few transistors involved. Also software algorithms can
be very efficient.
All of the CRC formulas you will encounter are simply checksum algorithms based on modulo-2
binary division where we ignore carry bits and in effect the subtraction will be equal to an exclusive or
operation. Though some differences exist in the specifics across different CRC formulas, the basic
mathematical process is always the same:
The message bits are appended with c zero bits; this augmented message is the dividend
A predetermined c+1-bit binary sequence, called the generator polynomial, is the divisor
The checksum is the c-bit remainder that results from the division operation
Table 1 lists some of the most commonly used generator polynomials for 16- and 32-bit CRCs.
Remember that the width of the divisor is always one bit wider than the remainder. So, for example,
you‘d use a 17-bit generator polynomial whenever a 16-bit checksum is required.
Checksum
16 bits 16 bits 32 bits
Width
Generator
10001000000100001 11000000000000101 100000100110000010001110110110111
Polynomial
Source Code:
import java.util.*;
public class CRC {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int m,g[],n,d[],z[],r[],msb,i,j,k;
System.out.println("Enter no. of bits in Dataword(d) : ");
n=sc.nextInt();
System.out.println("Enter no. of generator bits : ");
m=sc.nextInt();
d=new int[n+m];
g=new int[m];
System.out.println("Enter Dataword bits(one bit per line):");
for(i=0;i<n;i++)
d[i]=sc.nextInt();
System.out.println("Enter generator bits(one bit per line):");
for(j=0;j<m;j++)
g[j]=sc.nextInt();
for(i=0;i<m-1;i++)
d[n+i]=0;
r=new int[m+n];
for(i=0;i<m;i++)
r[i]=d[i];
z=new int[m];
Department of Information Science and Engineering Page 43
BMS Institute of Technology and Management Computer Network Laboratory [18CSL57]
for(i=0;i<m;i++)
z[i]=0;
for(i=0;i<n;i++)
{
k=0;
msb=r[i];
for(j=i;j<m+i;j++)
{
if(msb==0)
r[j]=xor(r[j],z[k]);
else
r[j]=xor(r[j],g[k]);
k++;
}
r[m+i]=d[m+i];
}
System.out.println("The redundant(r) bits added are : ");
for(i=n;i<n+m-1;i++)
{
d[i]=r[i];
System.out.println(d[i]);
}System.out.println();
System.out.println("The codeword(c=d+r) is :");
for(i=0;i<n+m-1;i++)
{
System.out.println(d[i]);
}
int c[]=new int[n+m];
System.out.println();
System.out.println("Enter the data bits recieived(one bit per line)");
for(i=0;i<n+(m-1);i++)
c[i]=sc.nextInt();
int count=0;
for(i=0;i<n+m-1;i++)
{ if(c[i]==d[i])
count++;
else
break;
}
if(count==n+m-1)
System.out.println("No error");
else{
System.out.println("Error present");
System.out.println("Error occurs at "+(count+1));
} }
public static int xor(int x,int y)
{
if(x==y)
return(0);
else
return(1);
}
}
Output:
2. Write a program to find the shortest path between vertices using bellman-ford
algorithm.
Distance Vector Algorithm is a decentralized routing algorithm that requires that each router
simply inform its neighbors of its routing table. For each network path, the receiving routers pick the
neighbor advertising the lowest cost, then add this entry into its routing table for re-advertisement. To
find the shortest path, Distance Vector Algorithm is based on one of two basic algorithms: the Bellman-
Ford and the Dijkstra algorithms.
Routers that use this algorithm have to maintain the distance tables (which is a one-dimension
array -- "a vector"), which tell the distances and shortest path to sending packets to each node in the
network. The information in the distance table is always up date by exchanging information with the
neighboring nodes. The number of data in the table equals to that of all nodes in networks (excluded
itself). The columns of table represent the directly attached neighbors whereas the rows represent all
destinations in the network. Each data contains the path for sending packets to each destination in the
network and distance/or time to transmit on that path (we call this as "cost"). The measurements in this
algorithm are the number of hops, latency, the number of outgoing packets, etc.
The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex
to all of the other vertices in a weighted digraph. It is slower than Dijkstra'salgorithm for the same
problem, but more versatile, as it is capable of handling graphs in which some of the edge weights are
negative numbers. Negative edge weights are found in various applications of graphs, hence the
usefulness of this algorithm. If a graph contains a "negative cycle" (i.e. a cycle whose edges sum to a
negative value) that is reachable from the source, then there is no cheapest path: any path that has a
point on the negative cycle can be made cheaper by one more walk around the negative cycle. In such a
case, the Bellman–Ford algorithm can detect negative cycles and report their existence
Source code:
import java.util.Scanner;
public BellmanFord(int n)
{
this.n = n;
d = new int[n + 1];
}
d[source] = 0;
for (int node = 1; node <= n - 1; node++)
{
{
a[i][j] = 0;
continue;
}
if (a[i][j] == 0)
{
a[i][j] = MAX_VALUE;
}
}
}
Output:
3. Using TCP/IP sockets, write a client – server program to make the client send the file name
and to make the server send back the contents of the requested file if present. Implement the
above program using as message queues or FIFOs as IPC channels.
Socket is an interface which enables the client and the server to communicate and pass on
information from one another. Sockets provide the communication mechanism between two
computers using TCP. A client program creates a socket on its end of the communication and
attempts to connect that socket to a server. When the connection is made, the server creates a socket
object on its end of the communication. The client and the server can now communicate by writing to
and reading from the socket.
Source Code:
TCP Client
import java.net.*;
import java.io.*;
public class TCPClient
{
public static void main( String args[ ] ) throws Exception
{
Socket sock = new Socket( "127.0.0.1", 4000);
System.out.print("Enter the file name\n");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String fname = br.readLine();
OutputStream ostream = sock.getOutputStream( );
PrintWriter pwrite = new PrintWriter(ostream, true);
pwrite.println(fname);
String str;
while((str = socketRead.readLine()) != null) // reading line-by-line
{
System.out.println(str);
}
pwrite.close(); socketRead.close(); br.close(); sock.close();
}
}
TCP Server
import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
public class TCPServer
{
public static void main(String args[]) throws Exception
{
ServerSocket sersock = new ServerSocket(4000);
Department of Information Science and Engineering Page 49
BMS Institute of Technology and Management Computer Network Laboratory [18CSL57]
sock.close(); sersock.close();
pwrite.close(); br.close(); contentRead.close();
}
}
Output:
4. Write a program on datagram socket for client/server to display the messages on client
side, typed at the server side.
A datagram socket is the one for sending or receiving point for a packet delivery service.
Each packet sent or received on a datagram socket is individually addressed and routed. Multiple
packets sent from one machine to another may be routed differently, and may arrive in any order.
Source Code:
UDP Client
import java.io.*;
import java.net.*;
class UDPClient
{
public static void main(String args[]) throws Exception
{
BufferedReader inFromUser =
new BufferedReader(new InputStreamReader(System.in));
DatagramSocket clientSocket = new DatagramSocket();
InetAddress IPAddress = InetAddress.getByName("localhost");
byte[] sendData = new byte[1024];
byte[] receiveData = new byte[1024];
System.out.println("Enter 'START' to connect to Server");
String sentence = inFromUser.readLine();
sendData = sentence.getBytes();
DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, IPAddress,
9876);
clientSocket.send(sendPacket);
DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
clientSocket.receive(receivePacket);
String modifiedSentence = new String(receivePacket.getData());
System.out.println("Message received from Server: " + modifiedSentence);
clientSocket.close();
}
}
UDP Server
import java.io.*;
import java.net.*;
import java.util.Scanner;
class UDPServer
{
public static void main(String args[]) throws Exception
{
DatagramSocket serverSocket = new DatagramSocket(9876);
System.out.println("Server Started on Port 9876");
byte[] receiveData = new byte[1024];
byte[] sendData = new byte[1024];
while(true)
{
}
}
Output:
5. Write a program for simple RSA algorithm to encrypt and decrypt the data.
RSA is an example of public key cryptography. It was developed by Rivest, Shamir and
Adelman. The RSA algorithm can be used for both public key encryption and digital signatures. Its
security is based on the difficulty of factoring large integers.
The RSA algorithm's efficiency requires a fast method for performing the modular
exponentiation operation. A less efficient, conventional method includes raising a number (the
input) to a power (the secret or public key of the algorithm, denoted e and d, respectively) and
taking the remainder of the division with N. A straight-forward implementation performs these two
steps of the operation sequentially: first, raise it to the power and second, apply modulo. The RSA
algorithm comprises of three steps, which are depicted below:
1. Generate two large random primes, p and q, of approximately equal size such that their
product n = p*q
2. Compute n = p*q and Euler‘s totient function (φ) phi(n) = (p-1)(q-1).
3. Choose an integer e, 1 < e < phi, such that gcd(e, phi) = 1.
4. Compute the secret exponent d, 1 < d < phi, such that e*d ≡ 1
(mod phi).
5. The public key is (e, n) and the private key is (d, n). The values of p, q, and phi should
also be kept secret.
Encryption
Decryption
Source Code:
import java.math.BigInteger;
import java.io.*;
Output:
The main concept of the leaky bucket algorithm is that the output data flow remains constant
despite the variant input traffic, such as the water flow in a bucket with a small hole at the bottom. In
case the bucket contains water (or packets) then the output flow follows a constant rate, while if the
bucket is full any additional load will be lost because of spillover. In a similar way if the bucket is
empty the output will be zero. From network perspective, leaky bucket consists of a finite queue
(bucket) where all the incoming packets are stored in case there is space in the queue, otherwise the
packets are discarded. In order to regulate the output flow, leaky bucket transmits one packet from the
queue in a fixed time (e.g. at every clock tick). In the following figure we can notice the main rationale
of leaky bucket algorithm, for both the two approaches (e.g. leaky bucket with water (a) and with
packets (b)).
While leaky bucket eliminates completely bursty traffic by regulating the incoming data flow its
main drawback is that it drops packets if the bucket is full. Also, it doesn‘t take into
account the idle process of the sender which means that if the host doesn‘t transmit data for some time
the bucket becomes empty without permitting the transmission of any packet.
Source Code:
import java.util.*;
{
System.out.println("Bucket is Empty. Waiting for Incoming Packets");
}
if(p == N && bs == 0)
outCtrl = false;
}
public static void main(String[] args)
{
LeakyBucket bkt = new LeakyBucket();
bkt.read();
InsertThread insThread = new InsertThread(bkt); //Call insert thread
DeleteThread delThread = new DeleteThread(bkt); //Call delete thread
}
}
{
bkt1.delete();
Thread.sleep(1000);
}
System.out.println("\nAll Packets Have Been Sent");
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
Output:
A link refers to the connectivity between two devices. It includes the type of cables and protocols used
in order for one device to be able to communicate with the other.
2) What are the layers of the OSI reference model?
There are 7 OSI layers: Physical Layer, Data Link Layer, Network Layer, Transport Layer, Session Layer,
Presentation Layer and Application Layer.
3) What is backbone network?
A backbone network is a centralized infrastructure that is designed to distribute different routes and
data to various networks. It also handles management of bandwidth and various channels.
4) What is a LAN?
LAN is short for Local Area Network. It refers to the connection between computers and other network
devices that are located within a small physical location.
5) What is a node?
A node refers to a point or joint where a connection takes place. It can be computer or device that is
part of a network. Two or more nodes are needed in order to form a network connection.
6) What are routers?
Routers can connect two or more network segments. These are intelligent network devices that store
information in its routing table such as paths, hops and bottlenecks. With this info, they are able to
determine the best path for data transfer. Routers operate at the OSI Network Layer.
7) What is point to point link?
It refers to a direct connection between two computers on a network. A point to point connection
does not need any other network devices other than connecting a cable to the NIC cards of both
computers.
8) What is anonymous FTP?
Anonymous FTP is a way of granting user access to files in public servers. Users that are allowed access
to data in these servers do not need to identify themselves, but instead log in as an anonymous guest.
9) What is subnet mask?
A subnet mask is combined with an IP address in order to identify two parts: the extended network
address and the host address. Like an IP address, a subnet mask is made up of 32 bits.
10) What is the maximum length allowed for a UTP cable?
A single segment of UTP cable has an allowable length of 90 to 100 meters. This limitation can be
overcome by using repeaters and switches.
11) What is data encapsulation?
Data encapsulation is the process of breaking down information into smaller manageable chunks
before it is transmitted across the network. It is also in this process that the source and destination
addresses are attached into the headers, along with parity checks.
12) Describe Network Topology
Network Topology refers to the layout of a computer network. It shows how devices and cables are
physically laid out, as well as how they connect to one another.
13) What is VPN?
VPN means Virtual Private Network, a technology that allows a secure tunnel to be created across a
network such as the Internet. For example, VPNs allow you to establish a secure dialup connection to a
remote server.
14) Briefly describe NAT.
NAT is Network Address Translation. This is a protocol that provides a way for multiple computers on a
common network to share single connection to the Internet.
15) What is the job of the Network Layer under the OSI reference model?
The Network layer is responsible for data routing, packet switching and control of network congestion.
Routers operate under this layer.
16) How does a network topology affect your decision in setting up a network?
Department of Information Science and Engineering Page 60
BMS Institute of Technology and Management Computer Network Laboratory [18CSL57]
Network topology dictates what media you must use to interconnect devices. It also serves as basis on
what materials, connector and terminations that is applicable for the setup.
17) What is RIP?
RIP, short for Routing Information Protocol is used by routers to send data from one network to
another. It efficiently manages routing data by broadcasting its routing table to all other routers within
the network. It determines the network distance in units of hops.
18) What are different ways of securing a computer network?
There are several ways to do this. Install reliable and updated anti-virus program on all computers.
Make sure firewalls are setup and configured properly. User authentication will also help a lot. All of
these combined would make a highly secured network.
19) What is NIC?
NIC is short for Network Interface Card. This is a peripheral card that is attached to a PC in order to
connect to a network. Every NIC has its own MAC address that identifies the PC on the network.
20) What is WAN?
WAN stands for Wide Area Network. It is an interconnection of computers and devices that are
geographically dispersed. It connects networks that are located in different regions and countries.
21) What is the importance of the OSI Physical Layer?
The physical layer does the conversion from data bits to electrical signal, and vice versa. This is where
network devices and cable types are considered and setup.
22) How many layers are there under TCP/IP?
There are four layers: the Network Layer, Internet Layer, Transport Layer and Application Layer.
23) What are proxy servers and how do they protect computer networks?
Proxy servers primarily prevent external users who identifying the IP addresses of an internal network.
Without knowledge of the correct IP address, even the physical location of the network cannot be
identified. Proxy servers can make a network virtually invisible to external users.
24) What is the function of the OSI Session Layer?
This layer provides the protocols and means for two devices on the network to communicate with each
other by holding a session. This includes setting up the session, managing information exchange during
the session, and tear-down process upon termination of the session.
NOS, or Network Operating System, is specialized software whose main task is to provide network
connectivity to a computer in order for it to be able to communicate with other computers and
connected devices.
29) What is DoS?
DoS, or Denial-of-Service attack, is an attempt to prevent users from being able to access the internet or
any other network services. Such attacks may come in different forms and are done by a group of
perpetuators. One common method of doing this is to overload the system server so it cannot anymore
process legitimate traffic and will be forced to reset.
30) What is OSI and what role does it play in computer networks?
OSI (Open Systems Interconnect) serves as a reference model for data communication. It is made up of
7 layers, with each layer defining a particular aspect on how network devices connect and
communicate with one another. One layer may deal with the physical media used, while another layer
dictates how data is actually transmitted across the network.
31) What is the purpose of cables being shielded and having twisted pairs?
The main purpose of this is to prevent crosstalk. Crosstalks are electromagnetic interferences or noise
that can affect data being transmitted across cables.
32) What is the advantage of address sharing?
By using address translation instead of routing, address sharing provides an inherent security benefit.
That's because host PCs on the Internet can only see the public IP address of the external interface on
the computer that provides address translation and not the private IP addresses on the internal
network.
33) What are MAC addresses?
MAC, or Media Access Control, uniquely identifies a device on the network. It is also known as physical
address or Ethernet address. A MAC address is made up of 6-byte parts.
34) What is the equivalent layer or layers of the TCP/IP Application layer in terms of OSI reference
model?
The TCP/IP Application layer actually has three counterparts on the OSI model: the Session layer,
Presentation Layer and Application Layer.
35) How can you identify the IP class of a given IP address?
By looking at the first octet of any given IP address, you can identify whether it's Class A, B or C. If the
first octet begins with a 0 bit, that address is Class A. If it begins with bits 10 then that address is a Class
B address. If it begins with 110, then it's a Class C network.
36) What is the main purpose of OSPF?
OSPF, or Open Shortest Path First, is a link-state routing protocol that uses routing tables to determine
the best possible path for data exchange.
37) What are firewalls?
Firewalls serve to protect an internal network from external attacks. These external threats can be
hackers who want to steal data or computer viruses that can wipe out data in an instant. It also
prevents other users from external networks from gaining access to the private network.
38) Describe star topology
Star topology consists of a central hub that connects to nodes. This is one of the easiest to setup and
maintain.
39) What are gateways?
Gateways provide connectivity between two or more network segments. It is usually a computer that
runs the gateway software and provides translation services. This translation is a key in allowing
different systems to communicate on the network.
One major disadvantage of star topology is that once the central hub or switch get damaged, the
entire network becomes unusable.
41) What is SLIP?
SLIP, or Serial Line Interface Protocol, is actually an old protocol developed during the early UNIX days.
This is one of the protocols that are used for remote access.
42) Give some examples of private network addresses.
10.0.0.0 with a subnet mask of 255.0.0.0
172.16.0.0 with subnet mask of 255.240.0.0
192.168.0.0 with subnet mask of 255.255.0.0
43) What is tracert?
Tracert is a Windows utility program that can used to trace the route taken by data from the router to
the destination network. It also shows the number of hops taken during the entire transmission route.
44) What are the functions of a network administrator?
A network administrator has many responsibilities that can be summarize into 3 key functions:
installation of a network, configuration of network settings, and maintenance/troubleshooting of
networks.
45) Describe at one disadvantage of a peer to peer network.
When you are accessing the resources that are shared by one of the workstations on the network, that
workstation takes a performance hit.
46) What is Hybrid Network?
A hybrid network is a network setup that makes use of both client-server and peer-to-peer
architecture.
47) What is DHCP?
DHCP is short for Dynamic Host Configuration Protocol. Its main task is to automatically assign an IP
address to devices across the network. It first checks for the next available address not yet taken by
any device, then assigns this to a network device.
48) What is the main job of the ARP?
The main task of ARP or Address Resolution Protocol is to map a known IP address to a MAC layer
address.
49) What is TCP/IP?
TCP/IP is short for Transmission Control Protocol / Internet Protocol. This is a set of protocol layers
that is designed to make data exchange possible on different types of computer networks, also known
as heterogeneous network.
50) How can you manage a network using a router?
Routers have built in console that lets you configure different settings, like security and data logging.
You can assign restrictions to computers, such as what resources it is allowed access, or what
particular time of the day they can browse the internet. You can even put restrictions on what
websites are not viewable across the entire network.
51) What protocol can be applied when you want to transfer files between different platforms, such
between UNIX systems and Windows servers?
Use FTP (File Transfer Protocol) for file transfers between such different servers. This is possible
because FTP is platform independent.
Good passwords are made up of not just letters, but by combining letters and numbers. A password
that combines uppercase and lowercase letters is favorable than one that uses all upper case or all
lower case letters. Passwords must be not words that can easily be guessed by hackers, such as dates,
names, favorites, etc. Longer passwords are also better than short ones.
54) What is the proper termination rate for UTP cables?
The proper termination for unshielded twisted pair network cable is 100 ohms.
55) What is netstat?
Netstat is a command line utility program. It provides useful information about the current TCP/IP
settings of a connection.
56) What is the number of network IDs in a Class C network?
For a Class C network, the number of usable Network ID bits is 21. The number of possible network IDs
is 2 raised to 21 or 2,097,152. The number of host IDs per network ID is 2 raised to 8 minus 2, or 254.
57) What happens when you use cables longer than the prescribed length?
Cables that are too long would result in signal loss. This means that data transmission and reception
would be affected, because the signal degrades over length.
58) What common software problems can lead to network
defects? Software related problems can be any or a
combination of the following: - client server problems
- application conflicts
- error in configuration
- protocol mismatch
- security issues
- user policy and rights issues
65) What are the different network protocols that are supported by Windows RRAS
services? There are three main network protocols supported: NetBEUI, TCP/IP, and
IPX.
66) What are the maximum networks and hosts in a class A, B and C
network? For Class A, there are 126 possible networks and 16,777,214
hosts
For Class B, there are 16,384 possible networks and
65,534 hosts For Class C, there are 2,097,152 possible
networks and 254 hosts
67) What is the standard color sequence of a straight-through cable?
orange/white, orange, green/white, blue, blue/white, green, brown/white,
brown.
68) What protocols fall under the Application layer of the TCP/IP stack?
The following are the protocols under TCP/IP Application layer: FTP, TFTP, Telnet and SMTP.
69) You need to connect two computers for file sharing. Is it possible to do this without using a hub
or router? Yes, you can connect two computers together using only one cable. A crossover type cable
can be use in this scenario. In this setup, the data transmit pin of one cable is connected to the data
receive pin of the other cable, and vice versa.
70) What is ipconfig?
Ipconfig is a utility program that is commonly used to identify the addresses information of a computer
on a network. It can show the physical address as well as the IP address.
71) What is the difference between a straight-through and crossover cable?
A straight-through cable is used to connect computers to a switch, hub or router. A crossover cable is
used to connect two similar devices together, such as a PC to PC or Hub to hub.
72) What is client/server?
Client/server is a type of network wherein one or more computers act as servers. Servers provide a
centralized repository of resources such as printers and files. Clients refers to workstation that access
the server.
73) Describe networking.
Networking refers to the inter connection between computers and peripherals for data
communication. Networking can be done using wired cabling or through wireless link.
74) When you move the NIC cards from one PC to another PC, does the MAC address gets
transferred as well? Yes, that's because MAC addresses are hard-wired into the NIC circuitry, not the
PC. This also means that a PC can have a different MAC address when the NIC card was replace by
another one.
75) Explain clustering support
Clustering support refers to the ability of a network operating system to connect multiple servers in a
fault-tolerant group. The main purpose of this is the in the event that one server fails, all processing
will continue on with the next server in the cluster.
76) In a network that contains two servers and twenty workstations, where is the best place to
install an Anti-virus program?
An anti-virus program must be installed on all servers and workstations to ensure protection. That's
because individual users can access any workstation and introduce a computer virus when plugging in
their removable hard drives or flash drives.
77) Describe Ethernet.
Ethernet is one of the popular networking technologies used these days. It was developed during the
early 1970s and is based on specifications as stated in the IEEE. Ethernet is used in local area networks.
1. Write a program to find the shortest path between vertices using dijkstra's algorithm.
2. Write a program for Diffie-Hellman Key Exchange algorithm to encrypt and decrypt the data.
3. Simulate a four node point-to-point network with the links connected as follows: a) n0 – n2,
n1 – n2 and n2 – n3. Apply TCP agent between n0-n3 and UDP between n1-n3. Apply relevant
applications over TCP and UDP agents, changing the parameter and determine the number of
packets sent by TCP / UDP.
4. Simulate an Ethernet LAN using n nodes (6-10), change error rate and data rate and compare
throughput.
Rubrics used for Continuous Evaluation in every lab session (Record: 10M)
Allocated
Parameter LOW MEDIUM HIGH
Marks
Execution 05 The given program was not The given program The given program
code/debug/execute in the was coded & was coded, debugged
lab session debugged but not and executed in the
executed in the lab lab session
session
0 marks 1 -3 mark 4-5marks
Viva-voce 02 The student did not The student The student answered
answered any viva answered few viva all viva questions
questions asked questions asked asked
0 marks 1 marks 2 marks
Record 03 The record was not The record was Completed record was
writing submitted in the lab session submitted in the lab submitted in the lab
session but was session
incomplete (no
Algorithm / wrong
Algorithm & no
Flowchart / wrong
Flowchart )
Every program is evaluated for 10 Marks and average of all programs for 10 marks will be calculated. The
final average is converted to 5 Marks.
1. 1stcycle test: Mid semester after completion of 50% of university specified experiment.
2. 2ndcycle test: End of semester after completion of all the university specified experiment
In each cycle test the student pick a program from the pool and execute that program. The student
should answer the Viva-voce asked. The marks are awarded for each lab internals based on rubrics
defined in table 2.11 average marks of both the Internal test is considered for awarding final internal
assessment marks.
asked
Report with 03 Report was The report was well The report was well
Unplagarised submitted and organized and organized and
content Plagiarism is more submitted. plagiarism submitted. plagiarism
(Ethics) than 35% content is between 25% content is less than 25%
to 35%