3.2 - Chord Simulations
Following discussion is based on Chord which is among the most popular structured P2P/overlay solutions. We will run Chord with iterative routing and SimpleUnderlayNetwork.
omnet.ini file
Simulation parameters are configured using the omnet.ini file which is located inside the OverSim/simulations directory.
You can provide your own .ini file(s). However path to those files need to be included in the omnet.ini file using include command.
For example, default parameters for all the application, tier 2-3, overlay, and underlay parameters are listed in default.ini file, and it is included as (see last line in omnet.ini):
include ./default.ini
Refer Chapter 8 of OMNet++ Manual for more details on syntax of the omnet.ini file.
Configuration of our first simulation looks like the following:
[Config Chord]
description = Chord (iterative, SimpleUnderlayNetwork)
*.underlayConfigurator.churnGeneratorTypes = "oversim.common.LifetimeChurn"
**.overlayType = "oversim.overlay.chord.ChordModules"
**.tier1Type = "oversim.applications.kbrtestapp.KBRTestAppModules"
Configuration basics:
- Each configuration starts with the "Config" keyword, followed by the configuration name, e.g., [Config Chord].
- You can give a description for your configuration using description keyword.
- Multiple lines can be added using "\".
- Lines starting with "#" are comments.
The remaining lines indicate run time simulation parameters and their values. The part left of the equals indicates the parameter name and the part right of the equals is the parameter value.
If the same parameter is used in multiple modules, you can use wildcard patterns ("*" and "**"). "*" matches zero or more characters except "." while "**" matches any character including ".". "." is used to differentiate module names and their hierarchy. For more details see Section 8.4.1 OMNet++ Manual.
For the standard Oversim configurations, parameters not given in omnetpp.ini are given in default.ini, so be sure to have a look there as well to get the complete picture of what the configuration is set up to do.
GUI Mode
We will first discuss how to run simulations using the graphical interface which is useful for learning, illustration, and debugging purposes. Command line-based examples will be discussed later.
When you run the simulation you need to select one of the configurations. This specifies all the parameters for the current simulation run. You can also specify multiple parameter values for any parameter, which will have Omnet++ automatically generate multiple runs for all combinations of parameters (see 9.4.1 of the Omnet++ manual on how to do this).