0

So, I am trying to do a very basic wired network simulation (later on I will add wireless nodes) in OMNET++: packet type: UDP Traffic Type: Video Streaming OMNET version:6.0.1 INET version: 4.5

The simulation ends without running properly and it just says "simulation timed ended" when I run it. There is no error. Thus, no results are being recorded either. enter image description here

The log also shows me this:

INFO (Tcp)GiB.standardHost1[20].tcp: GiB.standardHost1[20].tcp: finishing with 0 connections open. INFO (Tcp)GiB.standardHost1[21].tcp: GiB.standardHost1[21].tcp: finishing with 0 connections open. INFO (Tcp)GiB.standardHost1[22].tcp: GiB.standardHost1[22].tcp: finishing with 0 connections open. INFO (Tcp)GiB.standardHost1[23].tcp: GiB.standardHost1[23].tcp: finishing with 0 connections open. INFO (Tcp)GiB.standardHost1[24].tcp: GiB.standardHost1[24].tcp: finishing with 0 connections open. INFO (Tcp)GiB.server.tcp: GiB.server.tcp: finishing with 0 connections open.

here is my .NED file:

import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.ethernet.EthernetSwitch;
import inet.node.inet.StandardHost;
import ned.DatarateChannel;

//WIRED-SCENARIO
network GiB
{
    parameters:
        int numHosts;
        @display("bgb=650,520");
        @statistic[endToEndDelay](title="end-to-end delay"; source="messageAge(rcvdPk)"; unit=s; record=histogram,vector; interpolationmode=none);
        @statistic[throughput](title="throughput"; unit=bps; source="throughput(rcvdPk)"; record=histogram,vector);

    types:
        channel Ether1000m extends DatarateChannel
        {
            datarate = 1000Mbps;
            delay = 0.1us;
        }
    submodules:
        standardHost[numHosts]: StandardHost {
            @display("p=85,179");
        }
        standardHost1[numHosts]: StandardHost {
            @display("p=302,374");
        }
        server: StandardHost {
            @display("p=531,67;i=device/server");
        }
        configurator: Ipv4NetworkConfigurator {
            @display("p=46,39");
        }
        centerSwitch: EthernetSwitch {
            @display("p=418,146");
        }
        ethernetSwitch1: EthernetSwitch {
            @display("p=256,146");
            
                
        }
        ethernetSwitch2: EthernetSwitch {
            @display("p=341,260");
            
        }
    connections:
        server.ethg++ <--> Ether1000m <--> centerSwitch.ethg++;
        ethernetSwitch1.ethg++ <--> Ether1000m <--> centerSwitch.ethg++;
        ethernetSwitch2.ethg++ <--> Ether1000m <--> centerSwitch.ethg++;
        for i=0..numHosts-1 {
            ethernetSwitch1.ethg++ <--> Ether1000m <--> standardHost[i].ethg++;
            standardHost1[i].ethg++ <--> Ether1000m <--> ethernetSwitch2.ethg++;
        }
        
}

and ini file:

[General]
network = GiB
#wiredscenario
sim-time-limit = 5400s

**.numHosts = ${5..25 step 10}
*.*.numUdpApps = 1

**.channel.throughput.statistic-recording = true
**.channel.throughput.result-recording-modes = all
**.*.vector-recording = true
**.*.vector-recording-intervals = 0..900
**.*.scalar-recording = true

[Config UDP]

**.standardHost[*].udpApp[*].typename = "UdpVideoStreamClient"
**.standardHost[*].udpApp[*].serverAddress = "server"
**.standardHost[*].udpApp[*].serverPort = 1000
**.standardHost[*].udpApp[*].startTime = 5s


**.standardHost1[*].udpApp[*].typename = "UdpVideoStreamClient"
**.standardHost1[*].udpApp[*].serverAddress = "server"
**.standardHost1[*].udpApp[*].serverPort = 1000

**.server.udpApp[*].typename = "UdpVideoStreamServer"
**.server.udpApp[*].localPort = 1000
**.server.udpApp[*].sendInterval = 0.001s
**.server.udpApp[*].packetLen = 1400B
**.server.udpApp[*].videoSize = 1Gb

  1. Am I doing it right?
  2. If yes, then please guide how to fix this scenario
  3. If no, then please correct.

Please I need help. Thank you :)

1 Answer 1

1

There are two problems in your omnetpp.ini:

  1. INET uses numApps instead of numUdpApps or numTcpApps.
  2. StandardHost has app[] for storing application - neither udpApp[] nor tcpApp[].

Reference: INET NED Documentation - StandardHost

So the corrected omnetpp.ini should look like this:

[General]
network = GiB
sim-time-limit = 5400s

**.numHosts = ${5..25 step 10}

**.channel.throughput.statistic-recording = true
**.channel.throughput.result-recording-modes = all
**.*.vector-recording = true
**.*.vector-recording-intervals = 0..900
**.*.scalar-recording = true

[Config UDP]
**.standardHost[*].numApps = 1
**.standardHost[*].app[*].typename = "UdpVideoStreamClient"
**.standardHost[*].app[*].serverAddress = "server"
**.standardHost[*].app[*].serverPort = 1000
**.standardHost[*].app[*].startTime = 5s

**.standardHost1[*].numApps = 1
**.standardHost1[*].app[*].typename = "UdpVideoStreamClient"
**.standardHost1[*].app[*].serverAddress = "server"
**.standardHost1[*].app[*].serverPort = 1000

**.server.numApps = 1
**.server.app[*].typename = "UdpVideoStreamServer"
**.server.app[*].localPort = 1000
**.server.app[*].sendInterval = 0.001s
**.server.app[*].packetLen = 1400B
**.server.app[*].videoSize = 1Gb

Moreover, in your NED file I suggest removing @display for hosts, because it results in displaying all hosts in the same place:

submodules:
 standardHost[numHosts]:  StandardHost;
 standardHost1[numHosts]: StandardHost;
Sign up to request clarification or add additional context in comments.

6 Comments

It's working!!! Thank you so much. Appreciate it! :)
Could you please tell me that if I add *.*.numApps = 1 after this **.numHosts = ${5..25 step 10} in [General] and not like you did with each standardHosts/server i.e., **.standardHost1[*].numApps = 1 I got following error which I couldn't understand: Unable to determine type name for submodule app, missing entry GiB.centerSwitch.app[0].typename and no default value, at C:/Omnetv6/omnetpp-6.0.1/samples/inet4.4/src/inet/node/ ethernet/EthernetSwitch.ned:94 -- in module (omnetpp::cModule) GiB.centerSwitch (id=14) This is why I changed it to udpApps
The generic model of switch in INET assumes that it may contain a TCP or UDP application. Therefore ``*.*.numApps = 1` results in setting one application for all hosts as well as for all switches. However, omnetpp.ini does not contain a typename of application for switches - therefore the error is generated. Usually we do not need switch's application, so I suggest setting the number of application only for standardHost and standardHost1.
Again, thanks a lot! One last question (I hope you don't mind, its hard to find someone who knows OMNET like you do). What if I try to create subnets (wired+wireless) in the above scenario. Do I need a router (submodule) to do that? or can I just use IPV4NetworkConfigurator and it will take care of the routing and subnetting?
IPv4NetworkConfigurator is responsible only for assigning addresses for hosts and routers. IPv4NetworkConfigurator does not transfer any packets. If your network is flat, router is not necessary.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.