Network Simulation Lab Manual

Published on May 2016 | Categories: Types, Instruction manuals | Downloads: 95 | Comments: 0 | Views: 358
of 85
Download PDF   Embed   Report

network simulation lab manual.In communication and computer network research, network simulation is a technique where a program models the behavior of a network either by calculating the interaction between the different network entities (hosts/packets, etc.) using mathematical formulas, or actually capturing and playing back observations from a production network. The behavior of the network and the various applications and services it supports can then be observed in a test lab; various attributes of the environment can also be modified in a controlled manner to assess how the network would behave under different conditions.A network simulator is software that predicts the behavior of a computer network. In simulators, the computer network is typically modeled with devices, links, applications etc. and the performance is analysed. Typically, users can then customize the simulator to fulfill their specific analysis needs. Simulators typically come with support for the most popular protocols and networks in use today, such as WLAN, Wi-Max, TCP, WSN, cognitive radio

Comments

Content


EC0421 NETWORK SIMULATION LAB
LABORATORY MANUAL
SEMESTER VII
DEAPRTMENT OF
ELECTRONICS AND COMMUNICATION ENGINEERING
SRM UNIVERISTY
(Under SECTION 3 of the UGC Act, 1956)
S.R.M. NAGAR, KATTANKULATHUR - 603203.
KANCHEEPURAM DISTRICT
1
Department of Electronics and Communication Engineering
EC0421
Network Simulation Lab
Laboratory Manual
Course Team
Dr.B.Ramachandran
Mrs.V.Nithya
Ms.1.Radhika
Mrs. P. Malarvezhi
Mr. M. Aravindan
Mrs. A. Suvarnamma
1uly 2012 Revision: 1
EC0421 Network Simulation Lab L T P C
0 0 3 2
2
PURPOSE
To know and understand communication networks using NETSIM Software and LAN
Trainer kit.
INSTRUCTIONAL OB1ECTIVES
To study the communication networks characteristics and to analyze various MA and
routing layer !rotocols.
LIST OF EXPERIMENTS
". Ethernet LAN #rotocol. To create Scenario and study the #erformance of SMA$%
#rotocol through simulation
&. Token 'us and Token (ing #rotocols. To create scenario and study the #erformance of
token )us and token ring #rotocols through simulation
*. +ireless LAN #rotocols. To create scenario and study the #erformance of network
with SMA$A #rotocol and com#are with SMA$% #rotocols
,. Im#lementation and study of Sto# and +ait #rotocol
-. Im#lementation and study of .o )ack N and Selective (e#eat #rotocols
/. Im#lementation of %istance 0ector (outing algorithm
1. Im#lementation of Link state routing algorithm
2. Im#lementation of data encry#tion and decry#tion
3. Transfer of files from ! to ! using +indows$ 4NI5 socket #rocessing
TOTAL 45
REFERENCE: LABORATORY MANUAL
EC0421-Network Simulation Lab
3
ourse designed )y %e#artment of Electronics 6 ommunication Engineering
!rogram
outcome
a ) c d e f g h i 7 k
5 5 5 5 5 5
ategory
.eneral
8.9
'asic
Sciences
8'9
Engineering
Sciences and
Technical Arts8E9
!rofessional
Su)7ects8!9
5
'road area 8for
:!;category9
ommunication Signal
!rocessing
Electronics 0LSI Em)edded
5

Staff res#onsi)le for
#re#aring the sylla)us
Ms.0.Nithya
Ms.<.(adhika
%ate of #re#aration %ecem)er &==/
S.R.M University
Faculty of Engineering and Technology
Department of Electronics and Communication Engineering
Sub Code: EC0421 Semester : VII
Sub Title: Network Simulation Lab Course Time: 1ul-Dec`12
Pre_requisite : Nil
Co_requisite : Nil
Program Outcome
a. Graduates will demonstrate knowledge of mathematics, science and engineering
E>#eriments " to -? The #ractical through#ut and the offered load are
calculated from the o)tained simulation readings.
b. Graduate will demonstrate the ability to identify, formulate and solve engineering
problem
E>#eriment? "@3? The e>#eriments are #erformed )y configuring the nodes to
identify the network #arameters such as num)er of collisionsA successfully
transmitted #ackets Alink failureA ( errors etc and the through#ut is
calculated using the formula to analyze and solve the network engineering
#ro)lem.
c. Graduate will demonstrate the ability to design and conduct experiments, analyze
and interpret data
E>#eriment? "@-: The #ractical through#ut and the offered load for different
LAN To#ologies are calculated )y varying the #arameters like 'E(A Inter
#acket delay etc .The o)tained data are analyzed and inter#reted using #lots.
d. Graduate will demonstrate the ability to design a system, component or process as
per needs and specification
4
E>#eriment? "@-? The network is designed and configured for s#ecific
#arameters like the )itratesB num)er of nodesA )it error rateA MA #rotocol and
their #erformance are analyzed.
f. Graduate will demonstrate the skills to use modern engineering tools, software`s
and equipment to analyze problems
E>#eriment? /A 1A 2 and 3 Chel#s in using the NetSim software to analyze the
various routing algorithms
La) /? Im#lementation of %istance 0ector (outing algorithm
La) 1? Im#lementation of Link State (outing Algorithm
La)2? Im#lementation of data encry#tion and decry#tion
La)3? Transfer of files from ! to ! using +indows$ 4NI5 socket
#rocessing
k. Graduate will show the ability to participate and try to succeed in competitive
examinations
All the e>#eriments carried out in the la) aim in knowing the )asic #rinci#les
relating to network and solving network #ro)lems.
Sub Code: EC0421 Semester : VII
Sub Title: Network Simulation Lab Course Time: 1ul-Dec`12
Pre_requisite : Nil
Co_requisite : Nil
Program Educational Objectives vs Program Outcome
Program
Outcomes
Program Educational Objectives
". To #re#are
students to
com#ete for a
successful
career in their
chosen
#rofession
through glo)al
education
standards.
&. To ena)le the
students to a#tly to
a##ly their acDuired
knowledge in )asic
sciences and
mathematics in
solving engineering
#ro)lems.
*. To #roduce skill
full graduates to
analyzeA design and
develo# a
system$com#onent$
#rocess for the
reDuired needs
under the realistic
constraints.
,.To train the
students to
a##roach
ethically any
multidisci#linar
y engineering
challenges with
economicA
environmental
and social
conte>ts
-. To create an
awareness
among students
a)out the need
for life long
learning to
succeed in their
#rofessional
career.
a9.raduates
will
demonstrate
knowledge of
mathematicsA
science and
engineering
x x
5
)9.raduate
will
demonstrate
the a)ility to
identifyA
formulate
and solve
engineering
#ro)lem
x x X
c9.raduate
will
demonstrate
the a)ility to
design and
conduct
e>#erimentsA
analyze and
inter#ret data
x X
d9.raduate
will
demonstrate
the a)ility to
design a
systemA
com#onent or
#rocess as
#er needs and
s#ecification
x X x
f9.raduate
will
demonstrate
the skills to
use modern
engineering
toolsA
software;s
and
eDui#ment to
analyze
#ro)lems
x x
k9.raduate
will show the
a)ility to
#artici#ate
and try to
succeed in
com#etitive
x x x
6
e>aminations
7
Sub Code: EC0421 Semester : VII
Sub Title: Network Simulation Lab Course Time: 1ul-Dec`12
Pre_requisite : Nil
Co_requisite : Nil
Instructional Objective and Program Outcome
S.No.
Instructional
Objective
Program Outcome Experiment Details
1
To study the
communication
networks
characteristics and to
analyze various MA
and routing layer
!rotocols.
a. .raduates will demonstrate
knowledge of mathematicsA
science and engineering
b. .raduate will demonstrate the
a)ility to identifyA formulate and
solve engineering #ro)lem
c. .raduate will demonstrate the
a)ility to design and conduct
e>#erimentsA analyze and inter#ret
data
d. .raduate will demonstrate the
a)ility to design a systemA
com#onent or #rocess as #er needs
and s#ecification
f. .raduate will demonstrate the
skills to use modern engineering
toolsA software;s and eDui#ment to
analyze #ro)lems.
k. .raduate will show the a)ility to
#artici#ate and try to succeed in
com#etitive e>aminations
". Ethernet LAN #rotocol? To create
a network scenario and study the
#erformance of SMA$%
#rotocol through simulation
&. Token 'us and Token (ing
#rotocols? To create a network
scenario and study the
#erformance of token )us and
token ring #rotocols through
simulation
*. +ireless LAN #rotocols? To create
a network scenario and study the
#erformance of network with
SMA$A #rotocol and com#are
with SMA$% #rotocols
,. Im#lementation and study of Sto#
and +ait #rotocol
-. Im#lementation and study of .o
)ack N and Selective (e#eat
#rotocols
/. Im#lementation of %istance 0ector
(outing algorithm
1. Im#lementation of Link state
routing algorithm
2. Im#lementation of data encry#tion
and decry#tion
3. Transfer of files from ! to !
using +indows$ 4NI5 socket
#rocessing
8
S.R.M University
Faculty of Engineering and Technology
Department of Electronics and Communication Engineering
Sub Code: EC0421 Semester : VII
Sub Title: Network Simulation Lab Course Time : 1ul-Dec`12
Pre_requisite : Nil
Co_requisite : Nil
EXPERIMENTS DETAILS
9
S.No. Experiments Detail Equipments Required
"
Ethernet LAN #rotocol. To
create Scenario and study the
#erformance of SMA$%
#rotocol through simulation.
LAN Trainer Eit and three
om#uters
& Token 'us and Token (ing
#rotocols. To create scenario and
study the #erformance of token
)us and token ring #rotocols
through simulation
LAN Trainer Eit and three
om#uters
* +ireless LAN #rotocols. To
create scenario and study the
#erformance of network with
SMA$A #rotocol and
com#are with SMA$%
#rotocols
LAN Trainer Eit and three
om#uters
,
Im#lementation and study of
Sto# and +ait #rotocol
LAN Trainer Eit and three
om#uters
-
Im#lementation and study of .o
)ack N and Selective (e#eat
#rotocols
LAN Trainer Eit and
om#uters
/ Im#lementation of %istance
0ector (outing algorithm
om#uters with Net Sim
Software
1
Im#lementation of Link state
routing algorithm
om#uters with Net Sim
Software
2
Im#lementation of data
encry#tion and decry#tion
Two om#uters with Net Sim
software
3
Transfer of files from ! to !
using +indows$ 4NI5 socket
#rocessing
Two om#uters with Net Sim
software
Specification of LAN Trainer Kit
Experiment Software
• LAN Trainer Shell C #rovides a menu driven interface to the e>#eriments.
• :; li)rary @ !rogramming interface to the NI4.
• Stand alone #rograms for o)servation e>#eriments. Source code #rovided for study
and analysis.
• Saving of e>#eriment results to a file.
• %is#lay of e>#eriment activities in the a##lication windowA wherever a##lica)le.
Hardware
Network Emulator Unit (NEU)
• %ata rates? 2A "/A *&A /,A "&2A &-/A -"&E)#sA "M)#s.
• To#ology? 'usA (ingA Star.
• %elay? = . . . . "- )its )etween each #air of nodes.
• Error .enerators? 'it error C = to "=@/
8)etween one #air of nodes9 Frame error C = to "= @-
• Nodes? / nodes #er NE4 8* !s can )e connected #er NE4.
• Each ! acts as & nodes9
• NE4s can )e cascaded to emulate larger networks.
Network Interface Unit (NIU)
• ! #lug in card? ISA )us.
• MA Layer su##ort? ALGHAA SMAA SMA$%A Token )usA Token (ing.
• Nodes? & nodes #er NI4.System Requirements
• !? !entium or higher
• Gne ISA slot reDuired
• "/M' (AM
• G#erating System? +indows 3-
• Num)er of !s? & C *
• 0isual II com#iler? 0ersion -.= or a)ove
• 8G#tional C for #rogramming$modifying e>#eriments at Level & and for further
develo#ment9
EC0421 Laboratory Policies and Report Format
(e#orts are due at the )eginning of the la) #eriod. The re#orts are intended to )e a
com#lete documentation of the work done in #re#aration for and during the la). The
re#ort should )e com#lete so that someone else familiar with com#uter networks
could use it to verify your work. The #re la) and #ost la) re#ort format is as follows?
10
". A neat thorough #re la) must )e #resented to your Staff In charge at the )eginning
of your scheduled la) #eriod. Lab reports should be submitted on A4 paper. Jour
re#ort is a #rofessional #resentation of your work in the la). NeatnessA organizationA
and com#leteness will )e rewarded. !oints will )e deducted for any #art that is not
clear.
&. In this la)oratory students will work in teams of four. HoweverA the la) re#orts will
)e written individually. !lease use the following format for your la) re#orts.
a. Cover Page: Include your nameA Su)7ect odeA Section No.A E>#eriment
No. and %ate.
).Objectives: Enumerate * or , of the to#ics that you think the la) will teach
you. There should )e one or two sentences #er o)7ective. (emem)erA you should write
a)out what you will learnA not what you will do.
c.Configuration: This #art contains the configuration details of the node used
for the simulation. This should include onfiguration menu ta)le where the values of
network simulation #arametersA ty#e of #rotocols used are given here. This section
should also include a clear written description of your simulation process. Sim#ly
including a configuration ta)le is not sufficient.
d. Simulation Results: The analysis of the given #rotocol is studied with the
hel# of simulation results. 4se the necessary formulas to study the #erformance of the
given #rotocol and draw necessary #lots with the o)tained results. The model gra#h
should also )e given .Make sure that the neat gra#h must )e drawn for the o)tained
results.
e. Questions: S#ecific Duestions 8!re la) and !ost la)9 asked in the la) should
)e answered here. Retype the questions presented in the lab and then formally
answer them.
*. Jour work must )e original and #re#ared inde#endently. HoweverA if you need any
guidance or have any Duestions or #ro)lemsA #lease do not hesitate to a##roach your
faculty in charge during office hours. o#ying any #re la) $#ost la) will result in a
grade of =. The incident will )e formally re#orted to the 4niversity and the students
should follow the dress code in the La) session.
,. Each la)oratory e>#eriment must )e com#leted and demonstrated to your faculty in
charge in order to receive working module credit. This is the #rocedure to follow?
a. E>#ected simulation results o)tained? If the e>#eriment is com#leted with
e>#ected simulation results during the la) #eriod 8* hours9A call your
Staff in chargeA and he$she will sign and date it. This is the end of this la)A and you
will
get a com#lete grade for this #ortion of the la).
). No E>#ected simulation results? If the e>#eriment is done )ut not with
e>#ected resultsA you must make use of the o#en times for the la) room to com#lete
your e>#eriment. +hen your simulation results are correctA contact your staff in
charge to set u# a time when the two of you can meet to check your results.
11
-. Attendance at your regularly scheduled la) #eriod is reDuired. An une>#ected
a)sence will result in loss of credit for your la). If for valid reason a student misses a
la)A or makes a reasona)le reDuest in advance of the class meetingA it is #ermissi)le
for the student to do the la) in a different section later in the week if a##roved )y the
staff in charge of )oth the sections. Ha)itually late students 8i.e.A students late more
than "- minutes more than once9 will receive "= #oint reductions in their grades for
each occurrence following the first.
/. Final grade in this course will )e )ased on la)oratory assignments. All la)s have an
eDual weight in the final grade. .rading will )e )ased on #re@la) workA la)oratory
re#ortsA #ost@la) and in@la) #erformance 8i.e.A com#leting la)A answering la)oratory
related DuestionsA etc.A9.The faculty in charge will ask #ertinent Duestions to individual
mem)ers of a team at random. La)s will )e graded as #er the following grading
#olicy?
!re@La) +ork "=.==K
In@La) !erformance &=.==K
!ost La) +ork "=.==K
La)oratory (e#ort "=.==K
2. Reports Due Dates? (e#orts are due one week after com#letion of the
corres#onding la).
3. Systems of Tests: (egular la)oratory class work over the full semester will carry a
weightage of 1-K. The remaining &-K weightage will )e given )y conducting an end
semester #ractical e>amination for every individual student if #ossi)le or )y
conducting a " to " L hours duration common written test for all studentsA )ased on all
the e>#eriment carried out in the semester.
10. General Procedure:
a. !ro#erly #lace the #atch cord in its res#ective #osition for good internal connection
in the trainer kit
). Make sure with the connection of #atch cords in the trainer kit in res#ect to the
e>#eriment concerned.
c. %o not meddle with the trainer kit
d. (un the %iagnostics #rocedure from one of the !s connected to the NE4.
e. The driver file name and #ath 8?MLantrainM'inMLANT0"*.e>e9 should not )e
changed.
f. lick (eset )utton to reset NI4
g. (e#eat the a)ove ste#s from 8d to f9 to other !s 8one ! at a time9 connected to
NE4 to confirm the LAN@T working.
h. Set u# the )it delay and )it error rate according to the e>#eriment reDuirement.
SRM UNIVERSITY
Department of Electronics and Communication Engineering
EC0421 Network Simulation Lab
Laboratory Report Cover Sheet
12
ODD SEM - 2010
Name? NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Section? Tick Gne M 8 9 T4 8 9 + 8 9 Th 8 9 Fr 8 9
0enue? Networking La)
Title of La)? E=,&" Network Simulation La)
Preparation Verification
Staff Name 6 Signature? NNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNN
Experiment Completion Verification
Staff Name 6 Signature? NNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNN
%ateA Time? NNNNNNNNNNNNNNNNNNNNNN
Particulars Max Marks Marks Obtained
!re@la) +ork "=
La) !rocedure &=
!ost la) +ork "=
La) (e#ort "=
Total -=
Report Verification
Staff Name 6 Signature? NNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNN
%ateA Time? NNNNNNNNNNNNNNNNNNNNNN
LAN Trainer KIT Operation
13
Figure 1.1? om#onents in the LAN Trainer
Introduction to the LAN Trainer?
To successfully use the LAN TrainerA a num)er of hardware and software com#onents must )e
#ro#erly used together 8see Fig. "."9. Each ! acts as two nodes in the network. 'oth are
connected to the Network Emulator 4nit via the same ca)le. ThusA with * !sA you can
e>#eriment with a /@node network. Gn the software sideA the screen is divided into & windowsA
one for each node. This is accom#lished using the LAN Trainer control #anel running under
+indows C 3-
NIU Card? Each ! that is #art of the LAN Trainer setu# must have an NI4 ard #lugged into it.
Network Emulator Unit
The Network Emulator 4nit acts as a network interconnecting u# to / network nodes 8* NI4
ards in * !s9. Each card is connected to the Network Emulator 4nit via a ca)le with %'@*1
connectors. Gnce #ro#erly installedA these should not normally )e distur)ed. The Network
Emulator 4nit has a num)er of 7um#ers that must )e #ro#erly wired@u# de#ending on the ty#e of
network one wants @ a )usA a ringA or a star. This must corres#ond to the setting of the To#ology
selector switch. The Network Emulator 4nit also has selector switches for %ata (ateA 'it %elayA
Error (ate and Frame Error (ate. These should )e set in accordance with the instructions of each
e>#eriment. In additionA there is a (eset switchA which should )e used )efore every e>#erimentA
and in case of trou)le.
CONTENTS
Lab 1. Study of Ethernet LAN Protocol CSMA/CD
14
"." Introduction
".& Hardware (eDuirement
".* 'ackground
"., !re la)
".- La) !rocedure
"./ !ost la)
Lab 2: Study of Token Ring and Token Bus Protocols
&." Introduction
&.& Hardware (eDuirement
&.* 'ackground
&., !re la)
&.- La) !rocedure
&.-." Token 'us
&.-.& Token (ing
&./ !ost la)
Lab 3: Study of Wireless LAN protocol CSMA/CA
*." Introduction
*.& Hardware (eDuirement
*.* 'ackground
*., !re la)
*.- La) !rocedure
*./ !ost la)
Lab 4: Implementation and study of Stop and Wait Protocols
,." Introduction
,.& Hardware (eDuirement
,.* 'ackground
,., !re la)
,.- La) !rocedure
,./ !ost la)
Lab 5: Implementation and study of Go back N and Selective Repeat
Protocol
-." Introduction
-.& Hardware (eDuirement
-.* 'ackground
-., !re la)
15
-.- La) !rocedure
-.-." .o 'ack N #rotocol
-.-.& Selective (e#eat !rotocol
-./ !ost la)
Lab 6: Implementation of Distance Vector Routing algorithm

/." Introduction
/.& Hardware (eDuirement
/.* 'ackground
/., !re la)
/.- La) !rocedure
/./ !ost la)
Lab 7: Implementation of Link State Routing Algorithm
1." Introduction
1.& Hardware (eDuirement
1.* 'ackground
1., !re la)
1.- La) !rocedure
1./ !ost la)
Lab8: Implementation of data encryption and decryption
2." Introduction
2.& Hardware (eDuirement
2.* 'ackground
2., !re la)
2.- La) !rocedure
2./ !ost la)
Lab9: Transfer of files from PC to PC using Windows/ UNIX socket
processing
3." Introduction
3.& Hardware (eDuirement
3.* 'ackground
3., !re la)
3.- La) !rocedure
3./ !ost la)
Appendix
Lab 1: Study of Ethernet LAN Protocol CSMA/CD
16
1.1 Introduction?
The #ur#ose of this e>#eriment is to understand the conce#t of Listen@while@transmit to
im#rove efficiency. In this la)A you will )e a)le to im#lement the SMA$% #rotocol for
#acket communication )etween a num)er of nodes connected to a common )us.
1.2 Hardware Requirement
• *!s with NI4 card
• Network Emulation 4nit
• <um#er a)les
1.3 Background
Carrier Sense Multiple Access / Collision Detection, a set of rules determining how
network devices res#ond when two devices attem#t to use a data channel simultaneously
8called a collision9. Standard Ethernet networks use SMA$% to #hysically monitor the
traffic on the line at #artici#ating stations. To translate this into Ethernet termsA each interface
must wait until there is no signal on the channelA then it can )egin transmitting. If some other
interface is transmitting there will )e a signal on the channelA which is called carrier. All other
interfaces must wait until carrier ceases )efore trying to transmitA and this #rocess is called
arrier Sense.
If no transmission is taking #lace at the timeA the #articular station can transmit. If two
stations attem#t to transmit simultaneouslyA this causes a collisionA which is detected )y all
#artici#ating stations. After a random time intervalA the stations that collided attem#t to
transmit again. If another collision occursA the time intervals from which the random waiting
time is selected are increased ste# )y ste#. This is known as e>#onential )ack off.
1.4 Pre lab questions
". %efine network to#ology and list the ty#es with the advantages and disadvantages.
&. +hich media access method is used in EthernetO
*. +hich GSI Layer includes the SMA$% mechanismO
,. How is the collision occurrence intimated to other nodes in a networkO
-. %efine through#ut.
17
1.5 Procedure:
18
19
20
21
1.6 Post lab questions:
". alculate the through#ut for a network with )andwidth "= M)#s which can #ass at an
average of "&A=== frames $min each carrying "=A=== )its.
&. +hat are the draw)acks of SMA$% #rotocolO
*. an a node transmit #ackets during )ack@off #eriodO +hyO
,. How to overcome the draw)acks of SMA$%O
22
Lab 2: Study of Token Ring and Token Bus protocol
2.1 Introduction?
The #ur#ose of this e>#eriment is to understand the conce#t of demand assignment versus
random accessA setting #riorities and token management in a ring and )us LAN .In this la)
you will )e a)le to im#lement a token C#assing access method for a ring and )us LAN.
2.2 Hardware Requirement
• *!s with NI4 card
• Network Emulation 4nit
• <um#er a)les
2.3 Background
Token ring local area network 8LAN9 technology is a local area network #rotocol
which resides at the data link layer 8%LL9 of the GSI model. It uses a s#ecial three@)yte
frame called a token that travels around the ring. Token ring frames travel com#letely
around the loo#. Stations on a token ring LAN are logically organized in a ring to#ology
with data )eing transmitted seDuentially from one ring station to the ne>t with a control
token circulating around the ring controlling access..!hysicallyA a token ring network is
wired as a starA with Phu)sP and arms out to each station and the loo# going out@and@)ack
through each.
Each station #asses or repeats the s#ecial token frame around the ring to its nearest
downstream neigh)or. This token@#assing #rocess is used to ar)itrate access to the shared
ring media. Stations that have data frames to transmit must first acDuire the token )efore
they can transmit them. Token ring LANs normally use differential Manchester encoding
of )its on the LAN media.
+hen no station is transmitting a data frameA a s#ecial token frame circles the loo#.
This s#ecial token frame is re#eated from station to station until arriving at a station that
needs to transmit data. +hen a station needs to transmit dataA it converts the token frame
into a data frame for transmission. Gnce the sending station receives its own data frameA it
converts the frame )ack into a token
23
Token bus is a network im#lementing the token ring #rotocol over a Qvirtual ringQ on
a coa>ial ca)le. A token is #assed around the network nodes and only the node #ossessing
the token may transmit. If a node doesnPt have anything to sendA the token is #assed on to
the ne>t node on the virtual ring. Each node must know the address of its neigh)our in the
ringA so a s#ecial #rotocol is needed to notify the other nodes of connections toA and
disconnections fromA the ring.
2.4 Pre Lab Questions
". +hat is meant )y )ack)one in a networkO
&. +hat is meant )y token and how is it used in ring methodologyO
*. .ive the advantages of token ring over Ethernet.
,. %efine Token Holding Timer 8THT9.
-. .ive the IEEE standard of token ring and token )us LAN.
2.5 Procedure
2.5.1 Token Bus
". lick on the Token 'us icon twice from the deskto#.
&. lick the onfiguration )utton in the window in )oth the !;s.
Setting the onfigurations Menu for Token 'us
24
".If you connect two !;s and configured four nodes then set the My Address as = to * in all
four nodesA if you connect three !s and configured si> nodes then set the My Address as =
to
- in all si> nodes.
&.Start running the e>#eriment from the lowest #riority node 8i.e.A from My Address * in case
of
four nodes and - in the case of si> nodes9
*. No of Nodes has to )e set as , when two !s are connected and / when three !s are
connected.
. is the generated load in the network.
N is the num)er of nodes #artici#ating in the network. For e>am#leA let us say that , nodes
8using & com#uters9
! is the #acket length e>#ressed in )itsB say "== )ytes 82== )its9.
is the data rate normally set as 2k)sA which is selected in the NE4.
t
a
is the inter #acket delay e>#ressed in secondsB the time interval )etween two consecutive
#ackets generated.
SoA lets assume t
a
R ,= milliseconds and su)stitute the a)ove mentioned #arameters in the
EDuation A which leads to . R "=. Like wise assume various values of t
a
to generate offer
loads in the range of =." to "=. Su)stitute the value of t
a
in the configuration menu.
25
*. lick GE )utton and %ownload the driver to the NI4 using the 'GGT )utton
command.
'ooting from any one of the a##lications is enough.
,. (un the e>#eriment )y clicking )utton or )y choosing (4N N Start from each
a##lication.
(un the all the e>#eriments at the same time.
Note? +hile you do this THT window #o#s u#A enter the THT time in all nodes and #ress the
GE
)utton first in the nodeA which has the lowest #riority of My Address.
-. Set the Token Holding Time 8THT9 8say "==== ms9.
/. 0iew the statistics window for results. To view the statistics window click on )utton.
1. Note down the readings once the e>#eriment is com#leted.
2. (e#eat the a)ove ste#s for various values of t
a

3. alculate the !ractical offered load from the )elow given formula and #lot the gra#h
)etween
the #ractical Gffered load and Through#ut.
Note? Jou can also use the tem#late for #lotting the gra#h. !lease refer A##endi>@" to #lot the
gra#h using the tem#late.
"=. (e#eat the e>#eriment for various values of !acket lengthA NodeA %ata rate.
"". (e#eat the a)ove ste#sA while running the e>#eriment set the 'E( to "=@& in the NE4 or
try to sto# one of the nodes and o)serve the )ehavior and e>#lain the same.
alculations of !ractical Through#ut from the o)tained readings
26
alculations of Gffered Load
. C Gffered load
N C Num)er of nodes
! C !acket length in )its
C %ata rate in )its$sec
t
a
@Inter #acket delay in millisecs.
Model Ta)ulations
Model .ra#h
2.5.2 Token Ring
27
". lick on the Token ring icon twice from the deskto#.
&. lick the onfiguration )utton in the window in )oth the !;s.
Setting the configuration menu?
. is the generated load in the network.
N is the num)er of nodes #artici#ating in the network. For e>am#leA let us say that , nodes
8using & com#uters9
! is the #acket length e>#ressed in )itsB say "== )ytes 82== )its9.
is the data rate normally set as 2k)sA which is selected in the NE4.
ta is the inter #acket delay e>#ressed in secondsB the time interval )etween two consecutive
#ackets generated.
SoA lets assume taR ,= milliseconds and su)stitute the a)ove mentioned #arameters in the
28
EDuation A which leads to . R "=. Like wise assume various values of ta to generate offer
loads in the range of =." to "=. Su)stitute the value of ta in the configuration menu.
*. lick GE )utton and %ownload the driver to the NI4 using the 'GGT )utton
command.
'ooting from any one of the a##lications is enough.
,. (un the e>#eriment )y clicking )utton or )y choosing (4N N Start from each
a##lication.
(un the all the e>#eriments at the same time.
-. Set the Token Holding Time 8THT9 8say "==== ms9.
/. 0iew the statistics window for results. To view the statistics window click on )utton
.
1. Note down the readings once the e>#eriment is com#leted.
2. (e#eat the a)ove ste#s for various values of ta.
3. alculate the !ractical offered load from the )elow given formula and #lot the gra#h
)etween
the #ractical Gffered load and Through#ut.
Note? Jou can also use the tem#late for #lotting the gra#h.
"=. (e#eat the e>#eriments for various values of !acket lengthA NodeA %ata rate.
"". (e#eat the a)ove ste#sA while running the e>#eriment set the 'E( to "=@& in the NE4 or
try
to sto# one of the nodes and o)serve the )ehavior and e>#lain the same.
29
alculation of !ractical Through#ut 859 from the o)tained readings?
alculation of the Gffered load?
. C Gffered load
N C Num)er of nodes
! C !acket length in )its
C %ata rate in )its$sec
ta C Inter #acket delay in millisecs.
Model Ta)ulation?
Model .ra#h
30
2.6 Post lab questions:
". alculate the #ro#agation time and transmission time for &.-E)yte message if the
)andwidth of ".)#sOdistance is "&A=== Em and light travels at &.,>"=
2
m$s
&. .ive the frame format of Token (ing LAN
*. +hat ty#e of token #assing used in F%%I.
,. +hich network architecture uses a dual@ring to#ologyO
-. om#are the #erformance )etween ring and )us methodology
Lab 3: Study of Wireless LAN protocol CSMA/CA
3.1 Introduction
The #ur#ose of this e>#eriment is to introduce you the conce#ts of virtual channel
sensing using (TS$TSA #hysical medium reservation and (TS@TS@%ATA@AE cycle. In
this la) you will )e a)le to im#lement the SMA$A #rotocol for #acket communication
)etween a num)er of nodes connected to a common )us.
3.2 Hardware Requirement
• *!s with NI4 card
• Network Emulation 4nit
• <um#er a)les
3.3 Background
Carrier Sense Multiple Access With Collision Avoidance 8CSMA/CA9A in com#uter
networkingA is a wireless network multi#le access method in which?
• a carrier sensing scheme is used.
31
• a node wishing to transmit data has to first listen to the channel for a #redetermined
amount of time to determine whether or not another node is transmitting on the
channel within the wireless range. If the channel is sensed QidleAQ then the node is
#ermitted to )egin the transmission #rocess. If the channel is sensed as Q)usyAQ the
node defers its transmission for a random #eriod of time. Gnce the transmission
#rocess )eginsA it is still #ossi)le for the actual transmission of a##lication data to not
occur.
CSMA/CA is a modification of #ure arrier Sense Multi#le Access 8CSMA9. ollision
avoidance is used to im#rove CSMA #erformance )y not allowing wireless transmission of a
node if another node is transmittingA thus reducing the #ro)a)ility of collision due to the use
of a random time. G#tionallyA )ut almost always im#lementedA an IEEE 2=&."" (TS$TS
e>change can )e reDuired to )etter handle situations such as the hidden node #ro)lem in
wireless networking.
SMA$A is a layer & access methodA not a #rotocol of the GSI model. A node wishing to
send data initiates the #rocess )y sending a (eDuest to Send frame 8(TS9. The destination
node re#lies with a lear to send frame 8TS9. Any other node receiving the (TS or TS
frame should refrain from sending data for a given time 8solving the hidden node #ro)lem9.
The amount of time the node should wait )efore trying to get access to the medium is
included in )oth the (TS and the TS frame. This #rotocol was designed under the
assum#tion that all nodes have the same transmission range.
(TS$TS is an additional method to im#lement virtual carrier sensing in arrier sense
multi#le access with collision avoidance 8SMA$A9. 'y defaultA 2=&."" relies on physical
carrier sensing only which is known to suffer from the hidden terminal #ro)lem.
(TS$TS #acket size threshold is =@&*,1 octets. Ty#icallyA sending (TS$TS frames does not
occur unless the #acket size e>ceeds this threshold. If the #acket size the node wants to
transmit is larger than the thresholdA the (TS$TS handshake gets triggered. GtherwiseA the
data frame gets sent immediately. (TS$TS #ackets carry the e>#ected duration of the data
transmissionA which will have some im#lications.
3.4 Pre lab questions
32
". +hat is the difference )etween SMA$% and SMA$AO
&. +hat are hidden terminal #ro)lem and e>#osed terminal #ro)lemO
*. +hat is %FO
,. +hat is the use of (TS$TS handshake #rotocolO
-. +hat is random )ack off algorithmO
3.5 Procedure
Ste#s to configure (eceiver?
". lick on the SMA$A icon from the deskto# on one !.
&. lick the onfiguration )utton.
33
34
35
36
37
38
39
40
3.6 Post lab questions
". +hat is NA0O
&. +hat do you mean )y e>#onential )ack off algorithmO
*. Fragment a "=== )yte #acket into five &== )ytes #acket and com#are the through#ut
o)tained with single "=== )yte #acket transmission
,. In what situations can collision occur in +LAN networkO How to solve the collisions or
minimize the #ro)a)ility of collisionsO
-. +hat is the choice of contention windowO
41
Lab 4: Implementation and study of Stop and Wait Protocols
4.1 Introduction?
The #ur#ose of this e>#eriment is to introduce you to the )asics of error correctionA time
outs and state machines. In this la)A you will )e a)le to #rovide relia)le data transfer )etween
two nodes over an unrelia)le network using the sto#@ and@wait #rotocol.
4.2 Hardware Requirement
• *!s with NI4 card
• Network Emulation 4nit
• <um#er a)les
4.3 Background
Sto# and wait is the fundamental techniDue to #rovide relia)le transfer under unrelia)le
#acket delivery system. After transmitting one #acketA the sender waits for an
acknowledgment 8AE9 from the receiver )efore transmitting the ne>t one. In this wayA the
sender can recognize that the #revious #acket is transmitted successfully and we could say
Qsto#@n@waitQ guarantees relia)le transfer )etween nodes. To su##ort this featureA the sender
kee#s a record of each #acket it sends. AlsoA to avoid confusion caused )y delayed or
du#licated AEsA Qsto#@n@waitQ send each #acket with uniDue seDuence num)ers and receive
that num)ers in each AE. If the sender doesnPt receive AE for #revious sent #acket after a
certain #eriod of timeA the sender times out and retransmits that #acket again. There are two
cases when the sender doesnPt receive AEB Gne is when the AE is lost and the other is
when the frame itself is not transmitted. To su##ort this featureA the sender kee#s timer #er
each #acket.
4.4 Pre lab questions
". +hat are the functions of data link layerO
&. +hat is the need for flow control techniDuesO
*. E>#lain the mechanism of sto# and wait flow control techniDue.
,. In what situations does the sender retransmit a #acketO
42
-. +hat is meant )y #romiscuous modeO
4.5 Procedure:
". lick on the Sto# 6 +ait icon from the deskto# on )oth !s.
&. lick the onfiguration )utton in the window in )oth the !c;s.
Setting the configuration menu?
*. Set the Inter !acket %elay to ,==msecs
,. lick GE )utton and %ownload the driver to the NI4 using the 'GGT )utton
command. 'ooting from any one of the a##lications is enough.
43
-. (un the e>#eriment )y clicking )utton or )y choosing (4N N Start from each
a##lication.
/. Set the Timeout 0alue to "-== ms
1. Note down the no of successfully Transmitted !ackets.
2. (e#eat the a)ove ste#s for various time out values and #lot the gra#h )etween timeout
0alue 6Through#ut. Find the o#timum timeout value from the #lot.
3. E>#lain why the through#ut is less com#ared to SMA% #rotocol.
alculation of !ractical Through#ut?
Model Ta)ulation?
44
Model Graph?
4.6 Post lab questions
". om#uter A uses sto# and wait A(S #rotocol to send #ackets to com#uter '. If the
distance )etween A and ' is ,===kmA how long does it take com#uter A to receive
acknowledgement for a #acketO 4se the s#eed of light for #ro#agation s#eed and assume
the time )etween receiving and sending the acknowledgement is zero.
&. +hy there is no need to num)er the acknowledgements in sto# and wait A(SO
*. For the Duestion no" how long it takes for com#uter A to send out a #acket of size
"===)ytes if the through#ut is "==A===k)#sO
Lab 5: Implementation and study of Go back N and Selective Repeat
45
Protocol
5.1 Introduction?
The #ur#ose of this e>#eriment is to introduce you to the )asics of error correctionA time
outs and state machines. In this la)A you will )e a)le to #rovide relia)le data transfer )etween
two nodes over an unrelia)le network using .o )ack N and selective re#eat #rotocol.
5.2 Hardware Requirement
• *!s with NI4 card
• Network Emulation 4nit
• <um#er a)les
5.3 Background
Go-Back-N ARQ is a s#ecific instance of the Automatic (e#eat@reDuest 8A(S9 !rotocolA
in which the sending #rocess continues to send a num)er of frames s#ecified )y a window
size even without receiving an AE #acket from the receiver. It is a s#ecial case of the
general sliding window #rotocol with the transmit window size of N and receive window size
of ".
The receiver #rocess kee#s track of the seDuence num)er of the ne>t frame it e>#ects to
receiveA and sends that num)er with every AE it sends. The receiver will ignore any frame
that does not have the e>act seDuence num)er it e>#ects C whether that frame is a Q#astQ
du#licate of a frame it has already AEPed
T"U
or whether that frame is a QfutureQ frame #ast
the last #acket it is waiting for. Gnce the sender has sent all of the frames in its windowA it
will detect that all of the frames since the first lost frame are outstandingA and will go )ack to
seDuence num)er of the last AE it received from the receiver #rocess and fill its window
starting with that frame and continue the #rocess over again.
.o@'ack@N A(S is a more efficient use of a connection than Sto#@and@wait A(SA since
unlike waiting for an acknowledgement for each #acketA the connection is still )eing utilized
as #ackets are )eing sent. In other wordsA during the time that would otherwise )e s#ent
waitingA more #ackets are )eing sent. HoweverA this method also results in sending frames
multi#le times C if any frame was lost or damagedA or the AE acknowledging them was lost
46
or damagedA then that frame and all following frames in the window 8even if they were
received without error9 will )e re@sent. To avoid thisA Selective (e#eat A(S can )e used.
Selective Repeat ARQ / Selective Reject ARQ is a s#ecific instance of the
Automatic (e#eat@reDuest 8A(S9 !rotocol. It may )e used as a #rotocol for the delivery and
acknowledgement of message unitsA or it may )e used as a #rotocol for the delivery of
su)divided message su)@units.
+hen used as the #rotocol for the delivery of messagesA the sending #rocess continues to
send a num)er of frames s#ecified )y a window size even after a frame loss. 4nlike .o@'ack@
N A(SA the receiving #rocess will continue to acce#t and acknowledge frames sent after an
initial errorB this is the general case of the sliding window #rotocol with )oth transmit and
receive window sizes greater than ".
The receiver #rocess kee#s track of the seDuence num)er of the earliest frame it has not
receivedA and sends that num)er with every AE it sends. If a frame from the sender does not
reach the receiverA the sender continues to send su)seDuent frames until it has em#tied its
window. The receiver continues to fill its receiving window with the su)seDuent framesA
re#lying each time with an AE containing the seDuence num)er of the earliest missing
frame. Gnce the sender has sent all the frames in its windowA it re@sends the frame num)er
given )y the AEsA and then continues where it left off.
The size of the sending and receiving windows must )e eDualA and half the ma>imum
seDuence num)er 8assuming that seDuence num)ers are num)ered from = to nV"9 to avoid
miscommunication in all cases of #ackets )eing dro##ed. To understand thisA consider the
case when all AEs are destroyed. If the receiving window is larger than half the ma>imum
seDuence num)erA someA #ossi)ly even allA of the #ackages that are resent after timeouts are
du#licates that are not recognized as such. The sender moves its window for every #acket that
is acknowledged.
+hen used as the #rotocol for the delivery of su)divided messages it works somewhat
differently. In non@continuous channels where messages may )e varia)le in lengthA standard
A(S or Hy)rid A(S #rotocols may treat the message as a single unit. Alternately selective
retransmission may )e em#loyed in con7unction with the )asic A(S mechanism where the
message is first su)divided into su)@)locks 8ty#ically of fi>ed length9 in a #rocess called
47
!acket segmentation. The original varia)le length message is thus re#resented as a
concatenation of a varia)le num)er of su)@)locks. +hile in standard A(S the message as a
whole is either acknowledged 8AEed9 or negatively acknowledged 8NAEed9A in A(S with
selective transmission the NAEed res#onse would additionally carry a )it flag indicating the
identity of each su)@)lock successfully received. In A(S with selective retransmission of
su)@divided messages each retransmission diminishes in lengthA needing to only contain the
su)@)locks that were NAEed.
In most channel models with varia)le length messagesA the #ro)a)ility of error@free rece#tion
diminishes in inverse #ro#ortion with increasing message length. In other words itPs easier to
receive a short message than a longer message. Therefore standard A(S techniDues involving
varia)le length messages have increased difficulty delivering longer messagesA as each re#eat
is the full length. Selective retransmission a##lied to varia)le length messages com#letely
eliminates the difficulty in delivering longer messagesA as successfully delivered su)@)locks
are retained after each transmissionA and the num)er of outstanding su)@)locks in following
transmissions diminishes.
5.4 Pre lab questions
". E>#lain the mechanism of .o )ack N A(S.
&. In sliding window flow control if the window size is /* what is the range of seDuence
num)ersO
*. For a sliding window of size n@" 8n@seDuence num)ers9 there can )e a ma>imum of @@@@@@@
frames sent )ut unacknowledged.
,. %ifferentiate )etween )it rate and )aud rate.
-. E>#lain the mechanism of selective re#eat A(S.
/. om#are selective re#eat and .o)ack N A(S schemes.
5.5 Procedure:
5.5.1 Go Back N Protocol
". lick on the Sliding +indow .'N icon from the deskto# on )oth !s.
48
&. lick the onfiguration )utton in the window in )oth the !c;s.
Setting the configuration menu?
Note? The No of !ackets #arameter defines the window size.
*. Set the Inter !acket %elay to ,==msecs
,. lick GE )utton and %ownload the driver to the NI4 using the 'GGT )utton
command.'ooting from any one of the a##lications is enough.
-. (un the e>#eriment )y clicking )utton or )y choosing (4N N Start from each
a##lication.
49
/. Set the Timeout 0alue to "-== ms
1. Note down the no of successfully Transmitted !ackets.
2. (e#eat the a)ove ste#s for various time out values and #lot the gra#h )etween timeout
0alue 6Through#ut. Find the o#timum timeout value from the #lot.
3. E>#lain why the through#ut is less com#ared to SMA% #rotocol.
alculation of !ractical Through#ut?
Model Tabulation?
Go-Back N Protocol
50
Model Graph:
Go-Back N Protocol

5.5.2 Selective Repeat Protocol
". lick on the Selective (e#eat icon from the deskto# on )oth !s.
&. lick the onfiguration )utton in the window in )oth the !c;s.
51
Setting the configuration menu?
Note? The No of !ackets #arameter defines the window size.
*. Set the Inter !acket %elay to ,==msecs
,. lick GE )utton and %ownload the driver to the NI4 using the 'GGT )utton
command.'ooting from any one of the a##lications is enough.
-. (un the e>#eriment )y clicking )utton or )y choosing (4N N Start from each
a##lication.
52
/. Set the Timeout 0alue to "=== ms
1. Note down the no of successfully Transmitted !ackets.
2. (e#eat the a)ove ste#s for various time out values and #lot a gra#h )etween timeout 0alue
6 Through#ut. Find the o#timum timeout value from the #lot.
alculation of !ractical Through#ut?
Model Ta)ulation?
53
Model Graph:
Selective Repeat Protocol
5.6 Post lab questions
". %raw the sender and receiver windows for a system using .o@)ack@N A(S given the
following .
a. Frame = is sentA frame = is acknowledged.
). Frames " and & are sentA frames " and & are acknowledged.
c. Frame *A, and - are sentA NAE, is received.
d. Frame ,A-A/ and 1 are sentB frames, through 1 are acknowledged.
&. A sliding window #rotocol uses a sliding window of size"-. How many )its are needed to
define the seDuence num)ersO
*. %raw the sender and receiver windows for a system using selective re#eat A(S given the
following.
a. Frame = is sentA frame = is acknowledged.
). Frames " and & are sentA frames " and & are acknowledged.
c. Frame *A, and - are sentA NAE, is received.
d. Frame ,A -A/ and 1 are sentB frames, through 1 are acknowledged.
,.
= " & * , - / 1 2 3 "= "" "& "* ", "- = " & *
a. Show the window after the sender has sent #ackets = to "" and has received
AE2.
54
). The receiver has sent AE/ and AE3 )ut AE/ is lost. Show the sender
window.
Lab 6: Implementation of Distance Vector Routing algorithm
6.1 Introduction To simulate the distance vector routing #rotocol to maintain routing ta)les
as the traffic and to#ology of the network changes
6.2 Hardware Requirement
• *!s with NI4 card
• Network Emulation 4nit
• <um#er a)les
6.3 Background
The name distance vector is derived from the fact that routes are advertised as vectors
of 8distanceA direction9A where distance is defined in terms of a metric and direction is defined
in terms of the ne>t@ho# router. For e>am#leA Q%estination A is a distance of - ho#s awayA in
the direction of ne>t@ho# router 5.Q As that statement im#liesA each router learns routes from
its neigh)oring routersP #ers#ectives and then advertises the routes from its own #ers#ective.
'ecause each router de#ends on its neigh)ors for informationA which the neigh)ors in turn
may have learned from their neigh)orsA and so onA distance vector routing is sometimes
facetiously referred to as Qrouting )y rumor.Q
The common haracteristics are
Periodic Updates
Periodic updates means that at the end of a certain time #eriodA u#dates will )e transmitted.
Neighbors
In the conte>t of routersA neighbors always mean routers sharing a common data link.
Broadcast Updates
+hen a router first )ecomes active on a networkA how does it find other routers and how does
it announce its own #resenceO Several methods are availa)le.
Full Routing Table Updates
55
Most distance vector routing #rotocols take the very sim#le a##roach of telling their
neigh)ors everything they know )y )roadcasting their entire route ta)leA with some
e>ce#tions that are covered in following sections.
Split Horizon
A route #ointing )ack to the router from which #ackets were received is called a reverse
route. Split horizon is a techniDue for #reventing reverse routes )etween two routers.
6.4 Prelab Questions
". +hat is (outingO
&. %escri)e a)out the %esign .oals of (outing
3. +hat is a distance vector routing #rotocolO
,. List the common characteristics of %0(
6.5 Procedure:
". %ou)le click on LanT (outing Simulator icon from the deskto#.
&. lick )utton and )rowse o#en ?MLantrainMonfigM linear.t>t.
*. lick )utton and select %istance vector algorithm
,. The icon in the screen re#resents the nodes and the green colour line re#resents the #ath.
The values inside the )races re#resents the :Forward and (everse; weights.
56
-. lick on the node icon to o)tain the routing ta)le.
/. The a)ove #icture shows the nodes and its routing ta)le.
57
1. G)serve the routing ta)le showing No route to some of the destinations even though there
is a #hysical connection. This is )ecause the routing ta)le of the corres#onding nodes is not
)een u#dated since there is no ho##ing. To u#date the routing ta)le click )utton .
2. Ho##ing ha##ens )y clicking )utton.
58
3. Now after several ho##ing the routing ta)le gets u#dated. As the num)er nodes increasesA
the num)er of ho##ing increases. This is one of the disadvantages of distance vector
algorithm.
Count to Infinity problem
"=. lick the green colour line lying )etween N* and N,.
"". Enter the forward and reverse weight as :@"; in order to disconnect N, from the other
nodes
59
"&. Now o)serve the routing ta)le.
"*. Now you could o)serve that there are no changes in the routing ta)leA as they are not
u#dated. lick )utton to u#date the routing ta)le.
60
",. Even after several ho##ing the routing ta)les of N=A N"A N&A N* shows the #ath and
weight to N,. These false u#dates are another disadvantage in the :%istance vector
algorithm;.
6.6 Post Lab Questions
". Name several #ro)lems associated with distance vector #rotocols
&. +hat is counting@to@infinity #ro)lemA and how can it )e controlledO
*. %escri)e a)out the various (outing Metrics
Lab 7 - Link State routing protocol
7.1 Introduction:
61
To simulate the link state routing #rotocol to maintain routing ta)les as the traffic and
to#ology of the network changes
7.2 Hardware Requirement
• *!s with NI4 card
• Network Emulation 4nit
• <um#er a)les
7.3 Background
The information availa)le to a distance vector router has )een com#ared to the
information availa)le from a road sign. Link state routing #rotocols are like a road ma#. A
link state router cannot )e fooled as easily into making )ad routing decisionsA )ecause it has a
com#lete #icture of the network. The reason is that unlike the routing@)y@rumor a##roach of
distance vectorA link state routers have firsthand information from all their #eer
1
routers. Each
router originates information a)out itselfA its directly connected linksA and the state of those
links 8hence the name9. This information is #assed around from router to routerA each router
making a co#y of itA )ut never changing it. The ultimate o)7ective is that every router has
identical information a)out the internetworkA and each router will inde#endently calculate its
own )est #aths. Link state #rotocolsA sometimes called shortest path first or distributed
database #rotocolsA are )uilt around a well@known algorithm from gra#h theoryA E. +.
%i7kstraPa shortest #ath algorithm. E>am#les of link state routing #rotocols are?
• G#en Shortest !ath First 8GS!F9 for I!
• The ISGPs Intermediate System to Intermediate System 8IS@IS9 for LNS and I!
• %EPs %NA !hase 0
• NovellPs Net+are Link Services !rotocol 8NLS!9
Although link state #rotocols are rightly considered more com#le> than distance vector
#rotocolsA the )asic functionality is not com#le> at all?
". Each router esta)lishes a relationshi#Wan ad7acencyWwith each of its neigh)ors.
&. Each router sends link state advertisements 8LSAs9A some
62
*. Each router stores a co#y of all the LSAs it has seen in a data)ase. If all works wellA
the data)ases in all routers should )e identical.
,. The com#leted topological databaseA also called the link state databaseA descri)es a
gra#h of the internetwork. 4sing the %i7kstra algorithmA each router calculates the
shortest #ath to each network and enters this information into the route ta)le.
7.4 Prelab Questions
". E>#lain the #rocedure to calculate Shortest #ath in LS( #rotocol
&. +hat is the #ur#ose of a to#ological data)aseO
*. +hy are seDuence num)ers im#ortant in link state #rotocolsO
7.5 Procedure:
". %ou)le click on LanT (outing Simulator icon from the deskto#.
&. lick )utton and )rowse o#en ?MLantrainMonfigMlinear.t>t.
*. lick )utton and select Link state algorithm
63
,. lick on the nodes to o)tain the routing ta)le.
-. lick the )utton to u#date the routing ta)le. (outing ta)le of entire nodes gets
u#dated after a single ho##ing. This is one of the advantages of Link state algorithm over
%istance vector algorithm.
64
ount to Infinity #ro)lem?
/. lick on the green colour line lying )etween N* and N,.
1. Enter forward and reverse weights as @" to disconnect N, from the other nodes.
65
2. G)serve the routing ta)le. The values are not changed as it;s not u#dated.
3. lick the single ste# )utton .
"=. Now you could see the routing ta)le for each nodes )een u#dated. This is the advantage
of :Link state algorithm; over :%istance vector algorithm;.
66
7.6 Post Lab Questions
". +hat are the differences )etween distance vector and link state routing #rotocolsO
&. E>#lain the Ste#s involved in )uilding a (outing Ta)le using %i7ktra;s Algorithm
*. an to#ology )e )uilt using #artial knowledge of the each nodeO If yes e>#lain whyO
Lab 8: Encrypting a file using RC4 algorithm
8.1 Introduction?
The #ur#ose of this e>#eriment is to introduce you to (, algorithmA encry#tion and
decry#tion.
8.2 Hardware Requirement
• *!s with NI4 card
• Network Emulation 4nit
• <um#er a)les
8.3 Background
In cry#togra#hyA (, 8also known as A(, or A(FG4( meaning Alleged (,9 is the
most widely@used software stream ci#her and is used in #o#ular #rotocols such as Secure
Sockets Layer 8SSL9 8to #rotect Internet traffic9 and +E! 8to secure wireless networks9. It is
remarka)le for its sim#licity and s#eed in software. (, generates a #seudorandom stream of
67
)its 8a keystream9 whichA for encry#tionA is com)ined with the #lainte>t using )it@
wise e>clusive@orB decry#tion is #erformed the same way 8since e>clusive@or is a symmetric
o#eration9. 8This is similar to the 0ernam ci#her e>ce#t that generated pseudorandom bitsA
rather than a #re#ared streamA are used.9 To generate the keystreamA the ci#her makes use of a
secret internal state which consists of two #arts?
". A #ermutation of all &-/ #ossi)le )ytes 8denoted QSQ )elow9.
&. Two 2@)it inde>@#ointers 8denoted QiQ and Q7Q9.
The #ermutation is initialized with a varia)le length keyA ty#ically )etween ,= and &-/ )itsA
using the key-scheduling algorithm 8ESA9. Gnce this has )een com#letedA the stream of )its
is generated using the pseudo-random generation algorithm 8!(.A9.
8.4 Pre lab questions
". +hat does (, stands forO
&. +hat is Eey scheduling algorithm and !seudo (andom .eneration AlgorithmO
*. +hat is i#herO E>#lain the ste#s in .eneration of i#hers
8.5 Procedure
Initial set-up:
Install 7re ".-87ava run time environment9 to run this a##lication.
4nderstand the Ste#s Involved in (, Encry#tion and %ecry#tion Algorithm.
1. %ou)le click on icon.
68
&. Select Ste# mode and ty#e any te>t to encry#t. Ty#e any encry#tion key in either te>t or
)inary mode.
*. lick the Ne>t )utton from the right side #anel.
69
,. Now the State ta)le and Eey ta)les are formed. 8S 'o> contains a matri> of &-/ values
starting from = and E 'o> contains the matri> of re#eated ASII values of the key entered9.
-. The flow of the algorithm in each ste# is e>#lained in the descri#tion #anel on the right
side.
/. In the ne>t ste# the #ermutated values are stored in the S 'o> !ermutation.
1. Eey )it stream is generated from the values o)tained from S 'o> !ermutation.
2. 5G( o#eration is done )etween the )inary value and key )it stream generated..
70
3. i#her te>t is formed corres#onding to the 5G( value generated.
"=. o#y the ci#her te>t )y selecting and #ressing ctrl I c.
"". lick the clear )utton and #aste the ci#her te>t in the te>t field.
"&. Enter the same key that is used for encry#tion.
71
"*. Now you could retrieve )ack the original message.
Encrypting a file using RC4 algorithm
Initial Setup:
". 'rowse ?MLantrainM%ataSecurity.
&. o#y the (, folder and three class files 8onnectA (,lientA Server9 and #aste it into
the
<avaM7dk".-M)in folder in )oth the server and client !;s
Setting up the Server:
". G#en the command #rom#t window 8Start N(un N ty#e cmd9.
&. 'rowse the 7ava )in folder.
*. Ty#e 7ava Server to run the server.
72
Encrypting a file:
". G#en command #rom#t in the client side.
&. 'rowse the 7ava )in folder.
*. Ty#e 7ava (,lient.
,. Enter the I! address of the server.
-. Enter the mode of o#eration.
/. Enter the Encry#tion key not more than - characters.
1. Enter the #ath name of the file to )e encry#ted. 8for eg? c?MMa)c.t>t9
2. Ty#e JES if you like to close the session or ty#e NG if you like to continue decry#ting the
i#her te>t.
3. The encry#ted te>t is availa)le in c?Mout#ut.t>t.
"=. Try to re@arrange the ci#her te>t using any cry#t@analysis tool.
73
Decrypting the Cipher text file:
". Enter the mode of o#eration as %E for decry#ting the ci#her te>t.
&. Enter the %ecry#tion key same as used for Encry#tion.
*. Enter the full #ath name of the file to )e decry#ted. 8i.e.A c?MMout#ut.t>t9
,. Find out the decry#ted file in c?MMout#ut.t>t.
74
8.6 Post Lab Questions
". 4sing the (, Encry#tion schemeA encry#t a character with a key and o)serve the ci#her
te>t. (e#eat the same #rocedure for a different key )ut with the same te>t and see if there
is any relation )etween them. (e#eat with two same characters and o)serve whether the
ci#her te>t also gets re#eated.
&. E>#lain in %etail the generation of key in Eey Scheduling Algorithm
75
Lab9: Transfer of files from PC to PC using Windows/ UNIX socket processing
9.1 Introduction
The #ur#ose of this la) is to introduce you the conce#t of socket #rogrammingA T!
connection esta)lishmentA and Session management. In this la) you will )e a)le to esta)lish a
socket connection )etween two com#uters and use it to relia)ly transfer a file.
9.2 Hardware Requirement
Two com#uters with Net Sim software
9.3 Background
File transfer uses the client Cserver #aradigm. The server waits #assively listening for
reDuests from a client. After servicing the reDuestA the server resumes listening. The client is
usually interactive and acce#ts commands s#ecifying the file nameA whether to or from the
serverA username and #assword etc.
File transfer is a session oriented task. It has three #hases?
". Session esta)lishment? Setu# a logical connection )etween client and server.
&. %ata transfer? the file is transferred to $from the serverA with a##ro#riate error
checking.
*. Session termination? the files are closed and the logical connection taken down.
Three #hases are descri)ed in detail )elow.
Session Establishment
This involves several ste#s.
". Setu# of a trans#ort layer connection with the server. This is usually T!.
&. Sending username and #assword to the server for authentication
*. hecking the file #ermissions on )oth ends. E.g to send a file FA the local file F must
e>ist and )e reada)le )y the userA and the remote file F must )e writa)le )y the user.
In case Xno overwrite modeY is s#ecifiedA the remote file F must not e>ist.
76
,. Negotiating session #arameters such as the file ty#e 8te>t or )inary9 and )lock size.
Data Transfer
The sender reads the file one segment at a time and sends it on the T! connection. The
segment size may )e largeA e.g. "=s to "==s of E'. Note that some T! im#lementations may
limit the size of each segmentA say to /, E'. T! #rovides relia)le data transfer. HoweverA it
may a)ru#tly close the connection without delivering the data to the remote a##lication. To
handle such situationsA the file transfer receiver send an AE to the sender after successfully
writing the data to the destination file.
Session Termination
This may )e initiated )y either side. The initiator closes its local files and sends a disconnect
reDuest to the other side. The other #arty closes its file and res#onds with a disconnect
confirm. Each side closes its T! socket. The server resumes listening for connect reDuests.
A session may )e terminated normally after successful transfer of the file or a)normally after
incom#lete transfer such as due to network failure. In the latter caseA the receiver should
delete the incom#lete file so that it is not inadvertently used.
Error Handling
For any o#eration where an AE is e>#ectedA the sender starts a timer. In case of e>#iry of
the timerA the o#eration may )e retried or is a)orted and an error indication returned.
9.4 Pre lab questions
". +hat is socket #rogrammingO
&. +hat are the #hases involved in file transferO
*. List the features of T! model.
,. +hat is %H!O
77
-. .ive the I! address range of class AA 'A A %.
9.5 Procedure
78
79
80
81
9.6 Post lab questions
". +hat is the difference )etween T! and 4%! #rotocolO
&. +hat are the timers availa)le in T!O
*. +hat do you mean )y socket addressO
,. .ive the #ort num)ers of T! and 4%!.
-. .iven the I! address? "3&."/2.=.". Identify the range and net id.
82
Appendix
Configuration menu details
Config View dis#lays the configuration dialog )o> where all the #arameter values are
dis#layed.
Node Id @ S#ecify that that #articular a##lication$e>#eriment window should )e as node = or
".This is the one that differentiates the two a##lications in the same !.
Protocol @ S#ecify the MA !rotocol that NI4 has to emulate. 'y defaultA it is set to Aloha
Baud Rate @ S#ecify the data rate )etween 2E)#s and "M)#s. 8Gnly for SMA$% and (ing
ModeA this needs to )e set )oth in the A##lication window and the NE4. For Aloha and
SMAA settings in NE4 are sufficient.9
No of Nodes @ S#ecify the num)er of nodes in the network that are used to do Token (ing
E>#eriment. This field may )e used for other #ur#oses while writing codes for suggested
E>#eriments in e>ercise also.
Duration @ S#ecify the duration of the e>#eriment in seconds.
Packet Length @ S#ecify the length of #ackets that are used in the e>#eriment. an )e set to a
ma>imum of "=== )ytes.
83
Inter Packet Delay @ S#ecify the inter #acket delay 8that is eDuivalent to the inter #acket
arrival time9 )ased on the calculation suggested in the e>#eriments. This has to )e in
milliseconds.
Number of Packets @ S#ecify num)er of #ackets in a window for Sliding +indow
e>#eriment. This field may )e used for other #ur#oses while writing codes for suggested
e>#eriments in e>erciseA say for e>am#leA to s#ecify num)er of #ackets to )e transmitted or
received in a MA e>#eriment instead of following time.
My Address @ S#ecify the address of each node 8)etween " and /9 in to# layers. For e>am#leA
the server uses this field in FT! to identify the client for sending and receiving files.
Rx Mode @ S#ecify !romiscuous or Non@!romiscuous mode of #acket rece#tion. 'y default
all the stand@alone e>#eriments use #romiscuous mode of rece#tion 8receives the entire
#acket9. Altering this field will not have effect in the stand@alone e>#eriments. (efer
#rogrammer;s manual for using various ty#es while writing codes for e>ercises.
I/O Mode @ Fi>es the ty#es of transmit and receive modes. In ma7ority of the stand@alone
E>#erimentsA )locking transmit and receive is used and the other ty#es are left for the user to
im#lement wherever necessary as suggested in e>ercises. Altering this field will not have
effect in the stand@alone e>#eriments. (efer #rogrammer;s manual for using various ty#es
while writing codes for e>ercises.
Token Release Mode @ S#ecify the ty#e of token release mode to )e followed in token ring.
Manual token release is used in token ring e>#eriment. Altering this field will not have effect
in this stand@alone e>#eriment. (efer #rogrammer;s manual for using various ty#es while
writing codes for e>ercises.
Direction @ S#ecify which direction to )e followed )y each node. In MA e>#erimentsA
Sender will only transmit data #ackets and (eceiver will only receive. In %LL e>#erimentsA
Sender will transmit data #ackets and receive acknowledgement #ackets while (eceiver will
receive them and transmit acknowledgement #ackets. In FT! Sender is the client and
(eceiver is the server.
Boot File Name @ Name and #ath of the NI4 driver file. This is for future use. The default
file and location is ?MLantrainM)inMLant0"*.e>e. It may )e left to this default name.
84
85

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close