Skip to main content

The ONE Tutorial (Moved)

  1. Introduction
  2. Why?
  3. Target Audience
  4. Pre-conditions
  5. The Scenario
  6. General Steps
  7. Configuration File(s)
  8. Specify Scenario Settings
  9. Specify Network Interfaces for Nodes
  10. Create a Group of Nodes
  11. Specify Motion Patterns
  12. Specify Traffic Pattern
  13. Specify Reports to be Generated
  14. Running the Simulation

The ONE tutorial has moved to a new page. Please click here to follow.


Opportunistic Network Environment is a Java-based simulator targeted for research in Delay Tolerant Networks (DTNs)/Opportunistic Mobile Networks (OMNs). Apart from letting a user to simulate different scenarios quickly and in a flexible manner, it also provides an easy way to generate statistics from the simulation performed.
ONE can be run on Linux, Windows, or any other platform supporting Java. Details about ONE, including how to download and run, can be found from the official site. A list of common questions and their answers are listed here.

Read more »


  1. Hi,
    thanks for the useful ONE tutorial.
    If possible, I am interested in more details about creating messages by loading an external file containing a list of messages. Like: file structure, parameters, how the file is called from the config file, etc.

  2. Thanks for your comments, Mirza! I plan to write a post on the external events. Right now, I would briefly outline it. The external file containing messages should be in the format: time C msg_id node_from node_to size

    Your settings file should include the following:
    Events1.class = ExternalEventsQueue
    Events1.filePath = path/to/message/trace.txt

  3. sounds good, thanks for the answer ..
    one key problem concerning ONE is lacking a good documentation. a single "read me" file can't perform the job !!
    a further question plz: can the sender's and receiver's IDs be randomly generated ?! even if in the "default_settings" file !

  4. Very useful Tutorial, I'm new with ONE simulation and your blog it's finally given me a direction to where to Look.

  5. Hi.. I have recently started using ONE for my term project. Your tutorial has been of great help indeed. I had some queries regarding movement models and manually assigning position of nodes.. can u please help me understand that?

    1. Alok,

      Please join the ONE mailing list at and post your question there. The community would be able to help you.

  6. Hello..
    I have recently started my masters final year project on opportunistic networks using one simulator.Your tutorials are extremely helpful. I had some queries regarding the TTL and message creation..Can you please help me??

    I want to know

    What is the Relationship between TTL expiry and New Message Creation???
    How the messages are being created??
    For different messages the TTL are diffferent??? What is the logic behind the TTL??
    Also Epidemic Routing replicates the actual message.But when i saw the event log it displayed messages with different size. Then how it becomes Epidemic Routing??

    1. The value of TTL would depend on your application/context. It can be different for different messages. Larger TTL generally translates to better chances of message delivery.

  7. Hello sir..
    I have started my project paper on opportunistic network.I have a query.Can you please help me???

    Apart from the prescribed routing algorithm in the one folder ,how will I implement my own routing algorithm so that it will be followed by one simulator???
    What are the steps required?? Where will I start???

    please help me sir...

    1. Our forthcoming book, Opportunistic Mobile Networks: Advances and Applications (, has a chapter on this. In general, you should start by studying the existing routing protocols.

  8. Hi, mate.
    I am not so familiar with the ONE Simulator. I want to ask you, I look at each node packet carries green, blue, and red. What's the difference? thanks.

    1. From the README file, "If a node is carrying messages, each
      message is represented by a green or blue filled rectangle. If node
      carries more than 10 messages, another column of rectangles is drawn for
      each 10 messages but every other rectangle is now red."

  9. hello sir,
    I want to ask you, how can I implement selfish behavior in the ONE Simulator, there isn't much more documents and tutorials on that!
    Best regards.

    1. Short answer: override the message replication logic so that one or more messages are not sent to a set of node(s).


Post a Comment

Popular posts from this blog

Text Highlighting in Latex

While preparing a manuscript with Latex, it is often useful to highlight the changes made in the current revision with a different color. This can be achieved using the\textcolor command provided by Latex. For example,\textcolor{red}{Hello World}would display the string "Hello World" in red color.

However, the final/published copy of the manuscript does not contain any highlighted text. Therefore, if a large volume of changes were made, it becomes tiresome at the end to find and remove all the individual portions of highlighted text.

This can be circumvented by defining a utility command to switch highlighting on and off as desired. In the following, we define a new Latex command, highlighttext, for this purpose. The command takes only a single argument -- the text that it should highlight.


% For highlighting changes in this version with red color
    \newcommand{\highlighttext}[1] {\textcolor{red}{#1}}
    % Remove all text highlighting
    % Useful to gener…

Specifying Source and Destination of Messages

One of the frequently asked questions in the community is how to specify which particular nodes would act as source(s) and destination(s) of the messages created in the ONE simulator. The simulator, in fact, provides a pair of settings (shown below in bold face) aimed for this particular purpose.

Let us consider that there are $n + 1$ nodes in an OMN.  Further, let the nodes with addresses from $x$ to $y$, both inclusive, would create messages. The nodes in the range $w$ to $z$, both inclusive, would be the destinations of those messages, where $0 \le x \le y \le n$, and $0 \le w \le z \le n$. Then, the corresponding simulation scenario can be configured as follows.

## Message creation parameters # How many event generators Events.nrof = 1 # Class of the first event generator Events1.class = MessageEventGenerator # (Following settings are specific for the MessageEventGenerator class) # Creation interval in seconds (one new message every 25 to 35 seconds) Events1.interval = 25,35 # Me…

SeeR: Simulated Annealing-based Routing in Opportunistic Mobile Networks

Opportunistic Mobile Networks (OMNs) are characterized by intermittent connectivity among nodes. In many scenarios, the nodes attempt at local decision making based on greedy approaches, which can result in getting trapped at local optimum. Moreover, for efficient routing, the nodes often collect and exchange lot of information about others. To alleviate such issues, we present SeeR, a simulated annealing-based routing protocol for OMNs. In SeeR, each message is associated with a cost function, which is evaluated by considering its current hop-count and the average aggregated inter-contact time of the node. A node replicates a message to another node, when the latter offers a lower cost. Otherwise, the message is replicated with decreasing probability. Moreover, SeeR works based solely upon local observations. In particular, a node does not track information about other nodes, and, therefore, reduces the risk of privacy leaks unlike many other protocols. We evaluated the …