Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
8Activity
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

Availability:

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

09/28/2010

pdf

text

original

 
Simulation of Different Protocols using
 cnet
Network Simulator
The
cnet 
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 
 
cnet 
 simulation model, topology files, and global, node and link attributes.
1.1 The
 cnet
simulation model
cnet 
supports a model of networking in which
nodes
are connected by either 
 point-to- point 
links or 
 Ethernet 
segments. Nodes may be either 
hosts
or 
routers
; introductory protocols will only use hosts and
 point-to-point 
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
cnet 
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
0
to the number of physical links that the node has. Link number 
0
 is always the node's
LOOPBACK
link, which simply delivers anything transmitted to it1
 
straight back to the same host. The first ``real'' link is number 
1
and every node will havea link number 
1
. Each node's link attributes may be accessed, at runtime, via elements of the C structure variables
linkinfo[1]
,
linkinfo[2]
, and so on.
cnet 
itself provides each node with an Application Layer and a Physical Layer. Inaddition, a
hidden
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
cnet 
protocols are written from the point of view of each node, that is, we imagine that weare writing our protocols
inside
each node. We have the ability to write all of the
interior  protocols
(or 
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
current 
 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
cnet 
  protocols and are very well motivated and described in many undergraduate textbooks ondata communications and computer networking. However,
cnet 
supports these ideas by
not getting in the way
, by
not 
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
cnet 
(as if an operatingsystem) to permit other activities.
cnet 
is unaware of your using one or ten interior layers-
cnet 
only provides the highest and lowest layers, and anapplication programminginterface (API)to interact with these layers.
1.3 Topology files
cnet 
accepts (many)command line optionsto control its execution. However, moreimportant is
cnet 
'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
stopandwait 
protocol is being developed to provide a reliabledata-link layer protocol over the single
 point-to-point 
link.
cnet 
keywords are presented in bold font.If necessary, the topology file is first preprocessed by the C-preprocessor,enabling the use of 
#include
,
#define
and conditional ``compilation'' directives if required. Simple
 /* C and C++ style comments */ 
are also supported.
/* A simple 2 node point-to-point network topology */ 
 
compile
= "stopandwait.c"
 messagerate
= 500
 ms
,
 propagationdelay
= 700
 ms
,
 probframecorrupt
= 3,
host
Perth {
ostype
= "palm"
x y
0=100, =10 
 messagerate
= 1000
 ms
,
link to
Melbourne}
host
Melbourne {
ostype
= "linux"
east of
Perth
link to
Perth{
 probframeloss
= 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 
bgimage
and
drawframes
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

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