So i'm creating an adhoc network of vehicles. The wireless nodes are configured with UdpBasicApp. I want to calculate Goodputs and end to end delay. Unfortunately i'm getting zeros in end to end delay and can't figure out the way for goodput (not throughput). Since it is written that "The received packets are discarded" on the omnet website on UdpBasicApp. Therefore on application layer, only sent packets are there.. not the received . For example
node[0].app[0].packetSent..... = 345
But
node[0].app[0].packetreceived..... = 0
However
node[0].udp do receive something...
The ini file is as follows:
[General]
network = RoutingScenario
sim-time-limit = 10s
debug-on-errors = true
cmdenv-express-mode = true
image-path = ../../../../images
## UDPBasicApp
*.node[*].numApps = 1
*.node[*].app[0].typename = "UdpBasicBurst"
*.node[*].app[0].destAddresses = "10.0.0.72"
*.node[*].app[0].destPort = 5000
*.node[*].app[0].messageLength = 256B
*.node[*].app[0].sendInterval = 0.25s
*.node[*].app[0].packetName = "UDPData"
*.node[*].app[0].startTime = uniform(1s, 2s)
# Ieee80211Interface
*.node[*].wlan[0].opMode = "p"
*.node[*].wlan[0].radio.bandName = "5.9 GHz"
*.node[*].wlan[0].radio.channelNumber = 3
*.node[*].wlan[0].radio.transmitter.power = 100mW
*.node[*].wlan[0].radio.bandwidth = 10 MHz
# HostAutoConfigurator
*.node[*].ipv4.configurator.typename = "HostAutoConfigurator"
*.node[*].ipv4.configurator.interfaces = "wlan0"
*.node[*].ipv4.configurator.mcastGroups = "224.0.0.1"
# VeinsInetMobility
*.node[*].mobility.typename = "VeinsInetMobility"
*.node[*].mobility.speed = normal(8mps, 0.01mps)
# VeinsInetManager
*.manager.updateInterval = 0.1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.autoShutdown = true
*.manager.launchConfig = xmldoc("osm.launchd.xml")
*.manager.moduleType = "vanettutorials.veins_inet.VeinsInetRoutingCar"
**.vector-recording = true
**.scalar-recording = true
**.statistic-recording = true
# Routing
**.router = "Aodv"
With UdpBasicApp, the received packets are discarded, but the statistics are recorded (throughput, endtoenddelay, number of received/sent packets, etc).
The throughput recorded by UdpBasicApp is goodput (as in application-level throughput).
Related
I am facing a problem with the simulation time limit.When It is reached, a new udp packet is created and the routing protocol is about to send a control packet then the end simulation event appears .so, how to prevent creating this udp packet at the end of simulation.
I am using INET veins-5.1-i2
omnetpp.ini file
network = Scenario
sim-time-limit = 24s
debug-on-errors = true
cmdenv-express-mode = true
image-path = ../../../../images
#UDPBasicApp
*.node[*].numApps = 1
*.node[*].app[0].typename = "UdpBasicApp"
*.node[1].app[0].destAddresses = "node[4]"
*.node[*].app[0].multicastInterface = "wlan0"
*.node[*].app[0].joinLocalMulticastGroups = true
*.node[*].app[0].destPort = 9001
*.node[*].app[0].localPort = 9001
*.node[*].app[0].messageLength = 100B
*.node[1].app[0].startTime = 21s
*.node[*].app[0].sendInterval = 1s
# Ieee80211Interface
*.node[*].wlan[0].opMode = "p"
*.node[*].wlan[0].radio.typename = "Ieee80211DimensionalRadio"
*.node[*].wlan[0].radio.bandName = "5.9 GHz"
*.node[*].wlan[0].radio.channelNumber = 3
*.node[*].wlan[0].radio.transmitter.power = 20mW
*.node[*].wlan[0].radio.bandwidth = 10 MHz
*.node[*].wlan[*].radio.antenna.mobility.typename = "AttachedMobility"
*.node[*].wlan[*].radio.antenna.mobility.mobilityModule = "^.^.^.^.mobility"
*.node[*].wlan[*].radio.antenna.mobility.offsetX = -2.5m
*.node[*].wlan[*].radio.antenna.mobility.offsetZ = 1.5m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMinX = 0m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMaxX = 0m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMinY = 0m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMaxY = 0m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMinZ = 0m
*.node[*].wlan[*].radio.antenna.mobility.constraintAreaMaxZ = 0m
# HostAutoConfigurator
*.node[*].ipv4.configurator.typename = "HostAutoConfigurator"
*.node[*].ipv4.configurator.interfaces = "wlan0"
*.node[*].ipv4.configurator.mcastGroups = "224.0.0.1"
# VeinsInetMobility
*.node[*].mobility.typename = "VeinsInetMobility"
# VeinsInetManager
*.manager.updateInterval = 0.1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.autoShutdown = true
*.manager.launchConfig = xmldoc("square.launchd.xml")
*.manager.moduleType = "org.car2x.veins.subprojects.veins_inet.VeinsInetCar"
# PhysicalEnvironment
*.physicalEnvironment.config = xmldoc("obstacles.xml")
*.radioMedium.obstacleLoss.typename = "IdealObstacleLoss"
# Misc
**.vector-recording = true
If the simulation time limit is low and you are afraid that a single extra packet can affect and throw off your results then:
a) You are doing it wrong because you have so few events and messages in your simulation that the result you receive has no statistical significance. (like: my packet delivery ratio is 81% (+- 60%) ???). This is useless. So, you should either run the simulation for a much longer time (if it converges to a steady state) or run a lot of simulations with different random generator seeds. In either case the effect of a single packet will disappear.
b) If you insist on counting all packets accurately and you don't want to loose even a single packet, then do what you would do in real life: stop sending packets from the data sources well before the simulation stops so all packets will have a chance (and time) to arrive at destination. You should configure your applications to stop sending at least a few seconds before the simulation time limit. There are parameters to do that in almost all application models.
I am new to veins and I would like to make DoS attack using flooding technique. I have tried sending a message, that used in case of an accident, say, a million times by a specific car. Is this enough to make a DoS attack? Can I make this code more sophisticated?
void TraCIDemo11p::handlePositionUpdate(cObject* obj) {
BaseWaveApplLayer::handlePositionUpdate(obj);
if (externalID == "2"){ //2 is the attacker
for (int i = 0; i<1000000; i++)
sendMessage(mobility->getRoadId());
}
Note: I am using omnet 5.0, sumo-0.25.0 and veins-4.4, TraCIDemo11p.cc
For the NED File
import inet.applications.dhcp.DhcpServer;
import inet.node.dsdv.DsdvRouter;
import inet.node.inet.AdhocHost;
import inet.node.inet.MulticastRouter;
import inet.node.inet.WirelessHost;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.aodv.AodvRouter;
import inet.node.wireless.AccessPoint;
import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.visualizer.integrated.IntegratedVisualizer;
import inet.visualizer.networklayer.NetworkRouteVisualizer;
import inet.visualizer.integrated.IntegratedMultiVisualizer;
import ned.DelayChannel;
network pingattack
{
parameters:
int numhost;
int numattacker;
submodules:
visualizer: IntegratedMultiVisualizer {
#display("p=14,295");
}
configurator: Ipv4NetworkConfigurator {
//config = default(xml("<config><interface WirelessHost='**' address='10.0.0.x' netmask='255.255.255.0'/></config>"));
#display("p=42,430");
}
radioMedium: Ieee80211ScalarRadioMedium {
#display("p=14,339");
}
Attacker[numattacker]: WirelessHost {
#display("p=180,331");
}
Master: WirelessHost {
#display("p=274,316");
}
Slaves[numhost]: WirelessHost {
#display("p=313,247");
}
ap: AccessPoint {
#display("p=244,246");
}
}
For the Ini File,
[General]
description = Displaying Ping Attack
network = pingattack
# Setting up the max area which the modules are able to travel to
# "Z" limits the height. It can only be observed in 3D
**.constraintAreaMinX = 0m
**.constraintAreaMinY = 0m
**.constraintAreaMinZ = 0m
**.updateInterval = 0.1s # test with 0s too, and let getCurrentPosition update the display string from a test module
# Does not specify the intial positions. Random initial position will be chosen within the contraint area,
# unless it is specified in the display string in NED file or initialX,Y,Z
**.mobility.initFromDisplayString = false
# Setting all the default application type to "GlobalArp"
**.arp.typename = "GlobalArp"
# Attacker parameters
*.Attacker[*].numApps = 1 # Number of application layers on attackers
*.Attacker[*].app[0].typename = "PingApp" # Application type for attackers
*.Attacker[*].app[0].destAddr = "Master" # Set ping destination
*.Attacker[*].app[0].startTime = 10s # Initialize start time of ping
# Master Communication
*.Master.numApps = 1 # Number of application layers on master
*.Master.app[0].typename = "PingApp" # Application type for master
# MasterDrone Mobility
*.Master.mobility.typename = "LinearMobility" # Master move at constant speed
*.Master.mobility.speed = 20mps # of 20mps
# Slave Communication
*.Slaves[*].numApps = 1 # Number of application layers on slaves
*.Slaves[*].app[0].typename = "PingApp" # Application type for slaves
*.Slaves[*].app[0].destAddr = "Master" # Set ping destination, to ensure connection with master
*.Slaves[*].app[0].startTime = replaceUnit (0.1*(parentIndex()), "s") # to avoid synchronization
#*.Slaves[*].app[0].sendInterval= 1s # Slaves send ping every 1 second
# Slave mobility
*.Slaves[*].mobility.typename = "MassMobility" # Slaves move randomly
*.Slaves[*].mobility.changeInterval = truncnormal(2s, 0.5s)
*.Slaves[*].mobility.angleDelta = normal(0deg, 30deg)
#*.Slaves[*].mobility.speed = 15mps
# Wlan Config
*.Master.wlan[*].radio.transmitter.power = 10mW # Setting up Master, slaves, attacker wlan transmit power
*.ap.wlan[*].radio.transmitter.power = 100mW
# Pcap recording
**.crcMode = "computed" # To include CRC values in capture files
**.fcsMode = "computed" # To include FCS values in capture files
**.numPcapRecorders = 1 # To include PcapRecordere module
**.pcapRecorder[*].pcapNetwork = 105 # Set PCAP files link-layer header type to 802.11
**.pcapRecorder[*].pcapFile = "results/all.pcap" # Specifying file to write traces in & enable packet capture
**.pcapRecorder[*].verbose = true # To print tcpdump-like textual information to the log (EV)
**.pcapRecorder[*].alwaysFlush = true # Record the packets even if simulation crashes
**.pcapRecorder[*].packetFilter = "ping*"
#Analysis
*.*.wlan[*].**.vector-recording = false
# Visualizer parameters
# Displaying network path activity
*.visualizer.*.numDataLinkVisualizers = 2
*.visualizer.*.numInterfaceTableVisualizers = 2
*.visualizer.*.dataLinkVisualizer[0].displayLinks = true
*.visualizer.*.dataLinkVisualizer[0].packetFilter = "*ping*"
#*.visualizer.*.physicalLinkVisualizer[*].displayLinks = true
#*.visualizer.*.interfaceTableVisualizer[*].displayInterfaceTables = true
#*.visualizer.*.interfaceTableVisualizer[0].format = "%4"
*.visualizer.*.infoVisualizer[0].modules = "*.*.app[0]"
*.visualizer.*.infoVisualizer[1].modules = "*.*.app[1]"
#*.visualizer.*.infoVisualizer[*].format = "%t"
#*.visualizer.*.statisticVisualizer[0].sourceFilter = "**.app[*]"
#*.visualizer.*.statisticVisualizer[0].signalName = "rtt"
#*.visualizer.*.statisticVisualizer[0].unit = "ms"
#*.visualizer.*.infoVisualizer[*].placementHint = "topCenter"
#*.visualizer.*.packetDropVisualizer[*].displayPacketDrops = true
#*.visualizer.*.packetDropVisualizer[*].packetFilter = "ping*"
#*.visualizer.*.packetDropVisualizer[*].labelFormat = "%n/reason: %r"
#*.visualizer.*.packetDropVisualizer[*].fadeOutTime = 3s
#edit
# Set number of Attacker
# Set number of Host
# Set Attacker Ping interval
# Set Transmittion Power of Master Slave Attacker and AP
# Set Max constrain area XYZ
sim-time-limit = 20s
pingattack.numhost = 5
pingattack.numattacker = 1
*.Attacker[*].app[0].sendInterval = 0.0001s
**.constraintAreaMaxX = 2000m
**.constraintAreaMaxY = 2000m
**.constraintAreaMaxZ = 2000m
*.Slaves[*].wlan[*].radio.transmitter.power = 100mW
*.Attacker[*].wlan[*].radio.transmitter.power = 200mW
*.Attacker[*].**.vector-recording = false
*.Slaves[*].mobility.speed = 16mps
Hi I did a DOS Attack using PingApp. I think you can refer to the source code of PingApp. The important part is to have the sendInterval be 0.0001s. Hope this helps!
I'm trying to set up a kannel gateway that connects to a server, it receives SMS messages (that's already working) and it has to answer "OK".
But I'm not even seeing an error in the log related with the outgoing message.
This is my kannel.conf. I see in the log that I get the messages but it seems kannel is not trying to send anything.
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = <mypass>
log-file = "/tmp/kannel.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
group=smsc
smsc=smpp
smsc-id=personal
interface-version=34
host=<smpp-host>
port=5016
system-id=<smpp-username>
smsc-username=<smpp-username>
smsc-password=<smpp-password>
system-type=default
transceiver-mode = yes
my-number = <my-number>
group=smsc
smsc=smpp
smsc-id=personal
interface-version=34
host=<smpp-host>
port=5016
system-id=<smpp-username>
smsc-username=<smpp-username>
smsc-password=<smpp-password>
system-type=default
transceiver-mode = yes
log-file = /tmp/smsc.log
my-number = <my-number>
group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
log-level = 0
group = sms-service
keyword = default
text = "OK"
catch-all = true
omit-empty = true
max-messages = 0
What am I doing wrong? Did I missunderstand anything in the documentation?
Am I reading the incorrect log?
Thanks in advance
Try this configuration
group = sms-service
keyword = default
text = "OK"
catch-all = true
omit-empty = true
max-messages = 0
accepted-smsc = personal
#omit-empty = true
#max-messages = 100
can any one help me in code of simple ping app
i am trying to ping from 4 nodes but only 2 can communicate in my case
omnet ini code is here
# ping app (host[0] pinged by others)
*.host[0].numPingApps = 0
*.host[*].numPingApps = 4
*.host[1].pingApp[*].destAddr = "host[0]"
*.host[2].pingApp[*].destAddr = "host[0]"
*.host[3].pingApp[*].destAddr = "host[0]"
*.host[4].pingApp[*].destAddr = "host[0]"
*.host[1].pingApp[*].startTime = 3s
*.host[1].pingApp[*].sendInterval = 1s
*.host[1].pingApp[*].srcAddr = "host[1]"
#*.host[1].pingApp[*].destAddr = "host[2]"
*.host[2].pingApp[*].startTime = 2s
*.host[2].pingApp[*].sendInterval = 1s
*.host[2].pingApp[*].srcAddr = "host[2]"
#*.host[2].pingApp[*].destAddr = "host[1]"
*.host[3].pingApp[*].startTime = 1s
*.host[3].pingApp[*].sendInterval = 1s
*.host[3].pingApp[*].srcAddr = "host[3]"
#*.host[3].pingApp[*].destAddr = "host[4]"
Hosts 1, 2, 3, and 4 should have only one pingApp. Moreover, srcAddr may be omitted, because this field will be automatically set by network layer. So minimal omnetpp.ini should look like:
*.host[0].numPingApps = 0
*.host[0].pingApp[0].destAddr = ""
*.host[*].numPingApps = 1
*.host[*].pingApp[0].destAddr = "host[0]"
My kannel.conf is :
group = core
admin-port = X
smsbox-port = Y
admin-password = Z
log-file = "/usr/local/kannel/log/clientA/kannel.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
access-log = "/usr/local/kannel/log/clientA/Access.log"
store-type = file
store-file = "/usr/local/kannel/log/clientA/clientA.store"
###############################################################
group = smsc
smsc = smpp
smsc-id = clientA
host =A.B.C.D
port = 9081
throughput = 2
wait-ack = 600
smsc-username = myuser
smsc-password = mypass
keepalive=30
system-type =
transceiver-mode = 1
enquire-link-interval = 1200
source-addr-ton = 0
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
max-pending-submits = 3
#################################################################
group = smsbox
smsbox-id = smsbox82
bearerbox-host = localhost
sendsms-port = portSend
global-sender = XXXXXXX
mo-recode = true
log-file = "/usr/local/kannel/log/clientA/smsbox.log"
log-level = 0
access-log = "/usr/local/kannel/log/clientA/Access.log"
###################################################################
group = sendsms-user
username = myu
password = myp
max-messages = 3
concatenation = true
##################################################################
group = sms-service
keyword = default
get-url = "http://localhost:80/insdb.php?sender=%p&receiver=%r&smsid=%I"
I have apache running on port 80 and the URL when individually called inserts messages in DB, however, when a message is sent to the App , it never reaches DB, and I do not see any error in logs explaining this.
Any thoughts where am I missing ?
Thanks
If you need to save all SMS messages that arrived to kannel, than you need to add sms-service group into kannel.conf, so add something like this:
group = sms-service
keyword = default
get-url="http://127.0.0.1/save?sender=%p&text=%a&receiver=%P"
This will cause that , for all received messages, there will be executed the get-url where your application (apache etc) should be able to save message details to DB.
You should check kannel documentation for detailed info about available placeholders, I used only some of them (sender, receiver, text of message).
BR,
Izabel