Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Term Project: Simulation of Different Protocols using cnet Network Simulator

Term Project: Simulation of Different Protocols using cnet Network Simulator

Ratings: (0)|Views: 769|Likes:
Published by mpscr
I did this project for a computer networking course. I was not very happy with the outcome. But it helped me to understand network simulation concepts.
I did this project for a computer networking course. I was not very happy with the outcome. But it helped me to understand network simulation concepts.

More info:

Published by: mpscr on Jul 08, 2008
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





Simulation of Different Protocols using
Network Simulator
network simulator enables experimentation with various layers of OSI/ISOnetworking model using various protocols in different networks consisting of point-to- point links and IEEE 802.3 Ethernet segments. In the making of this paper I have mainlyworked with three different protocols
two of these work with the data link layer and oneworks with the network layer. While working with the project I have tried to analyze theefficiency of different protocols using various measures like efficiency (bytes AL/PL)against different variables ( i.e. time, maximum / minimum message size, number of transmitted, received and corrupted frames against variable frame size, average deliverytime against variable frame size.But before going into these discussions, first here is a simple overview of 
 simulation model, topology files, and global, node and link attributes.
1.1 The
simulation model
supports a model of networking in which
are connected by either 
 point-to- point 
links or 
segments. Nodes may be either 
; introductory protocols will only use hosts and
links. Hosts are like workstations, witheach having an Application Layer which generates messages for delivery to theApplication Layers on other hosts. Hosts never generate messages for themselves, androuters never generate messages at all.The
simulation model appears in the following diagram:Each node, from 2 to hundreds, is connected to other nodes by one or more physical point-to-point links or IEEE 802.3 Ethernet segments. Links are numberedwithin each node from
to the number of physical links that the node has. Link number 
 is always the node's
link, which simply delivers anything transmitted to it1
straight back to the same host. The first ``real'' link is number 
and every node will havea link number 
. Each node's link attributes may be accessed, at runtime, via elements of the C structure variables
, and so on.
itself provides each node with an Application Layer and a Physical Layer. Inaddition, a
Error Layer resides above the Physical Layer, and causes transmitteddata frames to become corrupted or lost according to specified probabilities. (Note: Thestandard OSI/ISO model does not provide an Error Layer!)Perhaps surprisingly, the nodes initially have very little knowledge of the network. Nodes do not know how many other nodes there are, what the other nodes are called, nor the attributes of any nodes or links other than their own. All inter-node communicationnecessary to learn this information must traverse the Physical Layer.
1.2 Protocol layers
protocols are written from the point of view of each node, that is, we imagine that weare writing our protocols
each node. We have the ability to write all of the
interior  protocols
student protocols
) between the Application and Physical Layers (and evento rewrite these two layers if we need). The protocols may be as simple or as complex asdesired, and should follow a layered approach to isolate distinct responsibilities. For example:
a network of only 2 nodes will only need a single layer between the Applicationand Physical Layers (usually termed the Data-Link Layer). This protocol willsimply have the responsibility of reliably moving frames across the single bidirectional link between the two nodes.
a network consisting of more than two nodes, will (ideally) require an additionallayer between the Application and Data-Link Layers (usually termed the Network Layer) to manage packet routing, possibly congestion- and flow-control, andmessage fragmentation (and possibly some other responsibilities).
a network in which the nodes may crash or the links may be severed will (ideally)require an additional layer between the Network and Application Layers (usuallytermed the Session Layer) to ensure that old packets that have been ``floating''around the network between crashes are not considered as part of the
 communication sequence, and
a network in which we are conscious of limited bandwidth and security mayrequire an additional layer between the Session and Application Layers (usuallytermed the Presentation Layer) to provide compression and/or encryption of our data before it is transmitted.Of course, these ideas and the responsibilities of each layer are not peculiar to
  protocols and are very well motivated and described in many undergraduate textbooks ondata communications and computer networking. However,
supports these ideas by
not getting in the way
, by
imposing particular methodologies or data structures onyour protocols.2
Protocols are written using anevent-driven programming styleas if we were writingthe protocols as part of an operating system's kernel. As well as handling network-relatedevents, a traditional operating system must handle other events for its file-system,devices, and to let user-level processes execute. For this reason, our protocols mustexecute as quickly as possible, and then relinquish control to
(as if an operatingsystem) to permit other activities.
is unaware of your using one or ten interior layers-
only provides the highest and lowest layers, and anapplication programminginterface (API)to interact with these layers.
1.3 Topology files
accepts (many)command line optionsto control its execution. However, moreimportant is
's use of a
topology file
to define the attributes and connections in eachnetwork simulation. Consider the following topology file which defines a 2 node network.An implementation of the
protocol is being developed to provide a reliabledata-link layer protocol over the single
keywords are presented in bold font.If necessary, the topology file is first preprocessed by the C-preprocessor,enabling the use of 
and conditional ``compilation'' directives if required. Simple
 /* C and C++ style comments */ 
are also supported.
/* A simple 2 node point-to-point network topology */ 
= "stopandwait.c"
= 500
= 700
= 3,
Perth {
= "palm"
x y
0=100, =10 
= 1000
link to
Melbourne {
= "linux"
east of
link to
= 2 }}/*(Image of this topology can be found in page 10.)*/
Global attributesmay be defined in each topology file and affect the execution of the whole simulation. They may not be redefined on a per-node or per-link basis. In theabove topology, the global attributes of 
are defined.3

Activity (8)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
jamorenoc1 liked this
Nikhil Ranjan liked this
dinkua liked this
nopiks liked this
nopiks liked this
ravindrapjoshi liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->