Part I: Introduction
In this project, you will be using various OPNET Tools in order to create your own agents with
their customized protocol stack and packet format. In order to do this project you should learn to
work with process editor, node model editor, link editor and packet format editor, in addition to the
network model editor that you may have become familiar with before. Each of these editors will
help you develop a part of your nodes, while process editor helps you to define the state machine
for each layer in the protocol stack and the things that need to be performed in each state.
Transmitting real time traffic over a WLAN has been a challenging problem because of two main
reasons. 1) The need for a distributed medium access control protocol, being practically implemented
1
in WLAN. 2) The need for having a framing over time and allocating a specific time slot to each RT
packet stream. Usually, reservation based protocols require some degree of synchronization which
impede distributed implementation.
In this project you become familiar with a simple and attractive real time MAC protocol, named as
2
MACA-PR . This protocol is an asynchronous reservation-based MAC protocol which is simply
3
implemented in a distributed way. The base of this protocol is very similar to CSMA-CA (IEEE
802.11) protocol. This protocol supports transmission of both data and RT packet streams.
Transmission of data packets is basically the same as CSMA-CA. Specifically; each wireless station
having a data packet to send, tries to find a free window (subsequently defined), senses the channel
and, takes the channel through RTS/CTS exchange cycle, sends the packet and receives its
corresponding acknowledge.
Real Time
Medium Access Collision Avoidance with Piggyback Reservation
3
Carrier Sense Multiple Access Collision Avoidance
1
2
Packet
Packet
Figure 1: The mechanism of sending control packets and reserving the channel in MACA_PR protocol
The same procedure takes place for the first packet of a RT packet stream, through which a time slot
of the channel is reserved for subsequent intervals (Figure 1). Specifically, each wireless station upon
receiving the first packet of a RT packet stream sends an RTS signal to its neighbor nodes. The
addressed neighbor node replies through CTS. Next, the sender sends the first packet of stream. In
addition to the sender and receiver nodes, each neighbor node hearing CTS or the first packet, logs
the instant of ending reception of CTS or the instant of starting reception of the first packet as the start
point of a slot.
Assuming fixed slot duration, , and fixed framing interval, , each station only logs the start point of
each reserved slot in a table known as reservation table. An example of a sample network and the
corresponding reservation table formed in some nodes, are shown in Figure 2. On this basis, each
station which is about to send an RT packet stream to one of its neighbors, could recognize a free
window, a time interval during which both of the sender and receiver are free. Length of the free
window should be at least as long as duration of a contention phase (
).
Figure 2: A sample network topology and the corresponding reservation table of some nodes
Consider four single-hop RT traffic streams. The first two streams initiating from nodes 2 and 3 are
destined for node 1. The second two streams initiating from nodes 6 and 7 are destined for node 5.
The first two streams and also the second of two streams become backlogged simultaneously.
Some attributes could be promoted, so that you can see them in higher hierarchy level (Project
Editor in this case). You can refer to OPNET documentation for further help.
Some useful Hints:
Setting radio transmission power of wireless nodes as 0.1 mw, provides a radio range of
about 1.5 km which is desired in this project.
Altitude of each wireless node should be set any value greater than zero. For this purpose,
choose Edit Attributes (Advanced), and set altitude as 0.003.
Source
MAC_Address
Destination
MAC_Address
Source
UID
Destination
UID
Packet Type/
Payload info
CRC
Payload
Experiment Report
After developing your agents in the process editor and compiling them, make node models out of
them to do simulation. In order for nodes to be able to collect the simulation results, you should
define a number of statistics such as number of received packets, e n d t o e n d delay,
startup time, etc. Define a number of statistics for nodes in the Node Model Editor. Then you
should update those statistics using a class of Kernel Procedures starting with op_stat keyword.
So, you are able to see the results after running the simulation.
5
Project Report
Write a proper report using MS Word or Latex and include the results and discussions of your results.
You should then pack this report with the project (and other necessary files to run your project as a
standalone program) in a folder named as yourname_yourUID_Project, and then zip this folder and
upload this one file to the courseware. You should include the followings in your report
1. Explain all the steps in creating your agents. Use snapshots from the OPNET editors if
required.
2. Include the state machines and codes from OPNET process editors.
3. Justify your results from the experimental part.
4. Optional (added mark): A simple and fixed topology was assumed in the main scenario.
Enhance your implementation to support any arbitrary topology, possibly changing dynamically.
Indeed, you should advise a supplementary protocol for identifying neighbors of a node.
Evaluate your implementation when applying movement for one or two nodes.