Hello, I am a beginner in Omnet ++ and i would like to compare the routing protocols ADOV and DSDV. For comparison, I want to use the results in throughput, end-to-end delay, and routing overhead.
I've looked at the TicToc and INET examples, but still I can not get on.
In some forums I looked for the same problem and also found some onces. Unfortunately, the discussions in the forums also did not help me why I now ask my question here.
The network should be kept small, which is why the NED looks easy. Also serves only for understanding.
There are 8 mobile nodes where one is the startup account and one is the destination node. (For later testing, I wanted to make the network even bigger).
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.inet.ManetRouter;
//import inet.node.gpsr.GpsrRouter;
//import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.visualizer.integrated.IntegratedMultiVisualizer;
import inet.physicallayer.unitdisk.UnitDiskRadioMedium;
import inet.networklayer.ipv4.RoutingTableRecorder;
import inet.common.scenario.ScenarioManager;
network Test
{
parameters:
@display("bgb=1000,1000;bgg=100,1,grey95");
@figure[title](type=label; pos=0,-1; anchor=sw; color=darkblue);
@figure[rcvdPkText](type=indicatorText; pos=380,20; anchor=w; font=,18; textFormat="packets received: %g"; initialValue=0);
@statistic[packetReceived](source=destination.packetReceived; record=figure(count); targetFigure=rcvdPkText);
submodules:
source: ManetRouter {
@display("p=50,200");
}
node1: ManetRouter {
@display("p=100,200");
}
node2: ManetRouter {
@display("p=150,200");
}
node3: ManetRouter {
@display("p=200,200");
}
node4: ManetRouter {
@display("p=250,200");
}
node5: ManetRouter {
@display("p=300,200");
}
node6: ManetRouter {
@display("p=350,200");
}
destination: ManetRouter {
@display("p=400,200");
}
radioMedium: UnitDiskRadioMedium {
@display("p=668,66");
}
configurator: Ipv4NetworkConfigurator {
@display("p=668,134");
}
routingTableRecorder: RoutingTableRecorder {
parameters:
@display("p=667.83,279.11;is=s");
}
visualizer: IntegratedMultiVisualizer {
@display("p=667.83,212.44");
}
scenarioManager: ScenarioManager {
@display("p=667.83,345.78;is=s");
}
connections allowunconnected:
}
[General]
record-eventlog = true
sim-time-limit = 20s
**.packetReceived.statistic-recording = true
**.vector-recording = true
**.throughput.result-recording-modes = mean
**.endToEndDelay.result-recording-modes = mean
#output-scalar-file=scalars1.sca
# ping app
*.source.numApps = 1
**.wlan[*].bitrate = ${bitrate = 6,9,12,18,24,36,48,54}Mbps
*.
source.app[*].messageLength = ${packetLength = 100, 2268}byte
*.
source.app[*].sendInterval = ${packetLength} * 8 / ${bitrate} * 1us
*.destination.numApps = 1
# data link visualizer
*.visualizer.*.numDataLinkVisualizers = 5
*.visualizer.*.dataLinkVisualizer[*].activityLevel = "peer"
*.visualizer.*.dataLinkVisualizer[*].displayLinks = true
*.visualizer.*.dataLinkVisualizer[0].packetFilter = "aodv::Rreq"
*.visualizer.*.dataLinkVisualizer[1].packetFilter = "ping* or UDP*"
*.visualizer.*.dataLinkVisualizer[1].*Color = "blue"
*.visualizer.*.dataLinkVisualizer[2].packetFilter = "aodv::Rrep"
*.visualizer.*.dataLinkVisualizer[2].*Color = "darkslategray"
*.visualizer.*.dataLinkVisualizer[3].packetFilter = "aodv::Rerr"
*.visualizer.*.dataLinkVisualizer[3].*Color = "red"
*.visualizer.*.dataLinkVisualizer[4].packetFilter = "Hello"
*.visualizer.*.dataLinkVisualizer[4].*Color = "green"
# uncomment for video recording
#*.visualizer.*.networkRouteVisualizer[0].fadeOutMode = "animationTime"
#*.visualizer.*.dataLinkVisualizer[*].fadeOutMode = "animationTime"
# misc
**.wlan[*].typename = "AckingWirelessInterface"
**.wlan[*].radio.transmitter.communicationRange = 150m
**.wlan[*].radio.displayCommunicationRange = true
**.wlan[*].bitrate = 24Mbps
*.configurator.addStaticRoutes = false
**.netmaskRoutes = ""
**.arp.typename = "GlobalArp"
[Config Test]
network = Test
# tx power
**.transmitter.power = 1mW
# node movement
*.node*.mobility.typename = "LinearMobility"
*.node*.mobility.angle = uniform(0deg,360deg)
*.node*.mobility.speed = 10mps
**.constraintAreaMaxX = 1000m
**.constraintAreaMaxY = 1000m
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
# visualization
*.visualizer.*.routingTableVisualizer[0].displayLabels = false
*.visualizer.*.routingTableVisualizer[0].displayRoutesIndividually = false
*.visualizer.*.routingTableVisualizer[0].lineShift = 0
*.visualizer.*.networkRouteVisualizer[0].displayRoutes = true
*.visualizer.*.networkRouteVisualizer[0].packetFilter = "*ping*"
*.visualizer.*.interfaceTableVisualizer[0].displayInterfaceTables = true
*.visualizer.*.interfaceTableVisualizer[0].format = "%a/%l"
[Config Test_Aodv]
extends = Test
# routing protocol parameters
*.*.routing.typename = "Aodv"
*.*.routing.activeRouteTimeout = 1s
*.*.routing.deletePeriod = 0.5s
# visualization
*.visualizer.*.routingTableVisualizer[0].displayRoutingTables = true
*.visualizer.*.routingTableVisualizer[0].destinationFilter = "destination"
[Config Aodv_without_Mobilitiy]
extends = Test
# mobility
**.node*.mobility.typename = "StationaryMobility"
**.mobility.constraintAreaMinZ = 0m
**.mobility.constraintAreaMaxZ = 0m
**.mobility.constraintAreaMinX = 0m
**.mobility.constraintAreaMinY = 0m
**.mobility.constraintAreaMaxX = 1000m
**.mobility.constraintAreaMaxY = 1000m
# routing protocol parameters
*.*.routing.typename = "Aodv"
*.*.routing.activeRouteTimeout = 1s
*.*.routing.deletePeriod = 0.5s
# visualization
*.visualizer.*.routingTableVisualizer[0].displayRoutingTables = true
*.visualizer.*.routingTableVisualizer[0].destinationFilter = "destination"
[Config Test_Dsdv]
extends = Test
# routing protocol
*.*.routing.typename = "Dsdv"
*.*.routing.routeLifetime = 2s
# ping app
# visualization
*.visualizer.*.routingTableVisualizer[0].displayRoutingTables = true