Error in module (cModule) Test (id=1) during network setup: Class "FlatNetworkConfigurator" not found - omnet++

I want to run a simulation in omnet++ 4.6 and inet 4.
I made a network with a .ned file (see below) and a .ini but I get a confusing error which I can not unterstand.
test.ned
package test1;
import inet.networklayer.autorouting.ipv4.FlatNetworkConfigurator;
import inet.nodes.inet.StandardHost;
import inet.nodes.ethernet.EtherSwitch;
import inet.nodes.inet.Router;
import ned.DatarateChannel;
import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
//
// TODO auto-generated type
//
network Test
{
#display("bgb=961,379");
types:
submodules:
etherHost2: StandardHost {
#display("p=89,249");
}
etherHost1: StandardHost {
#display("p=746,179");
}
etherSwitch2: EtherSwitch {
#display("p=341,233");
gates:
ethg[3];
}
etherHost3: StandardHost {
#display("p=227,333");
}
etherHost4: StandardHost {
#display("p=398,333");
}
etherSwitch3: EtherSwitch {
#display("p=528,38");
gates:
ethg[2];
}
router: Router {
#display("p=447,157");
}
router1: Router {
#display("p=206,153");
}
configurator: FlatNetworkConfigurator {
#display("p=73,87");
}
connections:
router.ethg++ <--> DatarateChannel { datarate = default(1000Mbps); } <--> etherSwitch3.ethg++;
router1.ethg++ <--> DatarateChannel { datarate = default(100Mbps); } <--> router.ethg++;
etherSwitch2.ethg[0] <--> DatarateChannel { datarate = default(100Mbps); } <--> router1.ethg++;
etherSwitch2.ethg[0] <--> DatarateChannel { datarate = default(100Mbps); } <--> etherHost2.ethg++;
etherSwitch3.ethg[0] <--> DatarateChannel { datarate = default(100Mbps); } <--> etherHost1.ethg++;
etherSwitch2.ethg[0] <--> DatarateChannel { datarate = default(100Mbps); } <--> etherHost3.ethg++;
etherSwitch2.ethg[0] <--> DatarateChannel { datarate = default(100Mbps); } <--> etherHost4.ethg++;
}
test.ini
[General]
network = Test
#configurator
*.configurator.dumpAddresses = true
*.configurator.dumpTopology = true
*.configurator.dumpLinks = true
*.configurator.dumpRoutes = true
# Routing settings
*.*.ipv4.arp.typename = "GlobalArp"
*.*.ipv4.routingTable.netmaskRoutes = ""
*.router*.tcpType="TCP"
**.etherSwitch*.relayUnitType = "MACRelayUnit" #config für Switch
**.eth[*].mac.duplexMode = true
**.eth.typename="EthernetInterface"
*.etherHost*.tcpType = "TCP_none"
*.etherHost*.udpType ="UDP"
*.etherHost*.sctpType ="SCTP"
**.eth[*].queueType = "DropTailQueue" # in routers
**.eth[*].queue.dataQueue.frameCapacity = 10 # in routers
It would be nice if someone could help me, I already tried to use the IPv4NetworkConfigurator instead of the FlatNetworkconfigurator but that did not work.
I also set inet in the settings of the project as reference.
Here is the error message

INET 4.0 requires OMNeT++ 5.4. If you try to use it with OMNeT++ 4.6 you can expect a ton of various errors.

Related

How to add an ethernet port to a simu5G UE with the connection to TsnDevice?

Hello OmNetPP and simu5G users,
I have the same questions on this link: How to add an ethernet port to a simu5G UE?
What I am trying to do is directly add an Ethernet interface in NRUe.ned and establish a Ethernet link between UE and TSN device in the main network file (TSN_5G.ned).
However, the following error message pops up:
No submodule 'ue[1]' to be connected, at /home//Simu5G/simulations/NR/networks/TSN_5G.ned:107 -- in module (omnetpp::cModule) TSN_5G (id=1), during network setup
Can someone give me some hints to solve the problem?
Thank you and best regards.
My codes are as follows:
omnetpp.ini (Basically copy from NR tutorial with single UE scenario)
[General]
output-scalar-file-append = false
# Network configuration
network = simu5g.simulations.NR.networks.TSN_5G
sim-time-limit = 10s
warmup-period = 1s
seed-set = ${repetition}
# Statistics
output-scalar-file = ${resultdir}/${configname}/${repetition}.sca
output-vector-file = ${resultdir}/${configname}/${repetition}.vec
**.routingRecorder.enabled = false
# General parameters
**.amcType = "NRAmc"
**.targetBler = 0.01
**.blerShift = 5
*.configurator.config = xmldoc("./demo.xml")
# Floorplan definition
**.mobility.constraintAreaMaxX = 1000m
**.mobility.constraintAreaMaxY = 1000m
**.mobility.constraintAreaMinX = 0m
**.mobility.constraintAreaMinY = 0m
**.mobility.constraintAreaMinZ = 0m
**.mobility.constraintAreaMaxZ = 0m
**.mobility.initFromDisplayString = false
# --------------------------------------------------------#
# --------------------------------------------------------#
# Config "Single-UE"
#
# Simple scenario with one UE attached to one gNB. A remote
# server sends 800 kbps CBR traffic to the UE
#
[Config Single-UE]
# gNodeB position
*.gnb.mobility.initialX = 500m
*.gnb.mobility.initialY = 500m
# UE configuration
*.numUe = 1
# UE position (400m far from the gNB)
*.ue[*].mobility.initialX = 500m
*.ue[*].mobility.initialY = 900m
# connect the UE's NIC (NR side) to the corresponding serving gNB
*.ue[*].macCellId = 0
*.ue[*].masterId = 0
*.ue[*].nrMacCellId = 1
*.ue[*].nrMasterId = 1
# Application Setup
# *.ue[*].numApps = 1
#*.ue[*].app[*].typename = "CbrReceiver"
#*.ue[*].app[*].localPort = 1000
#*.ue[*].app[*].source.packetLengths = 128B CbrReceiver
#*.ue[*].app[*].source.productionInterval = 1s
#*.ue[*].app[*].io.destPort = 1001
#*.server.app[*].typename = "CbrSender" UdpSourceApp
#*.server.app[*].PacketSize = 1000 # send 800 Kb/s
#*.server.app[*].sampling_time = 0.01s
#*.server.app[*].destAddress = "ue["+string(ancestorIndex(0))+"]" # obtain the address of the client by reading its index in the array of Apps
#*.server.app[*].destPort = 1000
#*.server.app[*].localPort = 3088+ancestorIndex(0)
#*.server.app[*].startTime = uniform(0.01s,0.05s)
# --------------------------------------------------------#
*.tsnDevice1.numApps = 1
*.tsnDevice1.app[0].typename = "CbrReceiver"
*.tsnDevice1.app[0].io.localPort = 1001
# --------------------------------------------------------#
*.tsnDevice.numApps = 1
*.tsnDevice.app[0].typename = "CbrSender"
*.tsnDevice.app[0].display-name = "tactile"
#*.tsnDevice.app[0].destAddress = "ue[0]"
*.tsnDevice.app[0].io.destAddress = "tsnDevice1"
#*.tsnDevice.app[0].destAddress = "ue["+string(ancestorIndex(0))+"]"
#*.tsnDevice.app[0].destPort = 1000
*.tsnDevice.app[0].io.destPort = 1001
*.tsnDevice.app[0].source.packetLength = 512B
*.tsnDevice.app[0].source.productionInterval = 0.5ms
TSN_5G.ned
//
// Simu5G
//
// Authors: Giovanni Nardini, Giovanni Stea, Antonio Virdis (University of Pisa)
//
// This file is part of a software released under the license included in file
// "license.pdf". Please read LICENSE and README files before using it.
// The above files and the present reference are part of the software itself,
// and cannot be removed from it.
//
package simu5g.simulations.NR.networks;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.networklayer.ipv4.RoutingTableRecorder;
import inet.node.ethernet.Eth10G;
import inet.node.ethernet.Eth1G;
import inet.node.ethernet.EthernetSwitch;
import inet.node.inet.Router;
import inet.node.inet.StandardHost;
import inet.node.tsn.TsnDevice;
import inet.node.tsn.TsnSwitch;
import inet.node.contract.IEthernetNetworkNode;
import inet.node.base.LinkLayerNodeBase;
import inet.linklayer.contract.IEthernetInterface;
import simu5g.common.binder.Binder;
import simu5g.common.carrierAggregation.CarrierAggregation;
import simu5g.nodes.Upf;
import simu5g.nodes.NR.gNodeB;
import simu5g.nodes.NR.NRUe;
import simu5g.nodes.backgroundCell.BackgroundCell;
import simu5g.world.radio.LteChannelControl;
// SingleCell_standalone
//
// This network represents the deployment option 3 in 3GPP 38.801
//
network TSN_5G
{
parameters:
int numUe = default(0);
int numBgCells = default(0);
#display("i=block/network2;bgb=1000,1000;bgi=background/pisa");
*.eth[*].bitrate = default(1000Mbps);
types:
module Translators extends Router like IEthernetNetworkNode
{
parameters:
bool hasCutthroughSwitching = default(false);
bool hasFramePreemption = default(false);
bool hasEgressTrafficShaping = default(false);
ethernet.typename = default("EthernetLayer"); // use Ethernet protocol layer outside of network interfaces
eth[*].typename = default(hasCutthroughSwitching ? "EthernetCutthroughInterface" : "LayeredEthernetInterface"); // switch to modular Ethernet interface
eth[*].macLayer.typename = default(hasFramePreemption ? "EthernetPreemptingMacLayer" : "EthernetMacLayer");
eth[*].macLayer.queue.typename = default(hasEgressTrafficShaping ? "Ieee8021qTimeAwareShaper" : "PacketQueue"); // use compound priority queue having multiple subqueues controlled by separate gates when egress traffic shaping is enabled
eth[*].phyLayer.typename = default(hasCutthroughSwitching ? "EthernetStreamThroughPhyLayer" : (hasFramePreemption ? "EthernetPreemptingPhyLayer" : "EthernetPhyLayer")); // use packet streaming when cut-through switching is enabled
}
submodules:
channelControl: LteChannelControl {
#display("p=50,25;is=s");
}
routingRecorder: RoutingTableRecorder {
#display("p=78.312,86.343994;is=s");
}
configurator: Ipv4NetworkConfigurator {
#display("p=78.312,194.776");
}
binder: Binder {
#display("p=78.312,311.24;is=s");
}
carrierAggregation: CarrierAggregation {
#display("p=62.247997,395.576;is=s");
}
router: Router {
#display("p=363.175,115.66875;i=device/smallrouter");
}
upf: Upf {
#display("p=527.35,116.9125");
}
iUpf: Upf {
#display("p=725,118");
}
gnb: gNodeB {
#display("p=726.35,277.35626;is=vl");
}
ue[numUe]: NRUe {
#display("p=628.09375,411.68124");
}
tsnDevice: TsnDevice {
#display("p=200.79999,524.088");
}
tsnSwitch: <default("TsnSwitch")> like IEthernetNetworkNode {
#display("p=361.44,522.07996");
}
tsnDevice1: TsnDevice {
#display("p=628.50397,642.56");
}
translators: Translators {
#display("p=465.856,305.216");
}
connections allowunconnected:
//router.pppg++ <--> Eth10G <--> upf.filterGate;
translators.pppg++ <--> Eth10G <--> upf.filterGate;
upf.pppg++ <--> Eth10G <--> iUpf.pppg++;
iUpf.pppg++ <--> Eth10G <--> gnb.ppp;
ue[numUe].ethg++ <--> Eth1G <--> tsnDevice1.ethg++;
tsnDevice.ethg++ <--> Eth1G <--> tsnSwitch.ethg++;
tsnSwitch.ethg++ <--> Eth1G <--> translators.ethg++;//router.ethg++;
}
NRUe.ned
//
// Simu5G
//
// Authors: Giovanni Nardini, Giovanni Stea, Antonio Virdis (University of Pisa)
//
// This file is part of a software released under the license included in file
// "license.pdf". Please read LICENSE and README files before using it.
// The above files and the present reference are part of the software itself,
// and cannot be removed from it.
//
package simu5g.nodes.NR;
import simu5g.nodes.Ue;
import simu5g.stack.NRNicUe;
import simu5g.corenetwork.statsCollector.NRueStatsCollector;
import inet.linklayer.ethernet.contract.IEthernetLayer;
//
// User Equipment Module
//
module NRUe extends Ue
{
parameters:
nicType = default("NRNicUe");
int numEth = default(1);
int nrMasterId #mutable = default(0);
int nrMacNodeId #mutable = default(0); // TODO: this is not a real parameter
int nrMacCellId #mutable = default(0); // TODO: this is not a real parameter
gates:
input nrRadioIn #directIn; // connection to master
inout ethg[numEth] #labels(EtherFrame-conn) #allowUnconnected;
submodules:
//# UeStatsCollector - for MEC
// NRueCollector: NRueStatsCollector if hasRNISupport {
// #display("p=73.687996,445.75198;is=s");
// }
connections allowunconnected:
for i=0..sizeof(ethg)-1 {
ethg[i] <--> { #display("m=s"); } <--> eth[i].phys;
}
cellularNic.nrRadioIn <-- nrRadioIn;
}
demo.xml
<config>
<interface hosts="tsnDevice" names="eth0" address="10.0.0.50" />
<interface hosts="ue[0]" names="eth0" address="10.0.0.51"/>
<interface hosts="*" address="10.x.x.x" netmask="255.255.255.x" />
<!--<route hosts="router" destination="10.0.1.1" netmask="255.255.255.255" gateway="10.0.0.14" />-->
<!-- <route hosts="*"> -->
</config>
Expected to happen: The simulatoin can run.
Actually resulted: A error during network setup
You've set *.numUe = 1 in your ini file as well as ue[numUe].ethg++ <--> Eth1G <--> tsnDevice1.ethg++; --> ue[1].ethg++ <--> Eth1G <--> tsnDevice1.ethg++; in your ned file. As a consequence: 1) you're not connecting all your modules from vector, only ue[1], 2) you're going out of range since the only element presented in your vector is ue[0].
Try to change ue[numUe].ethg++ <--> Eth1G <--> tsnDevice1.ethg++; to:
for i=0..numUe-1 {
ue[i].ethg++ <--> Eth1G <--> tsnDevice1.ethg++;
}

How to change datarate of a channel during simulation in INET4?

I'm looking for TCP behavior via INET4. I'd like to know whether there's a way to change the data rate while the TCP simulation is running? As we have this parameters in the ned file of INET->example->tcpwindowscale:
//
// author: Thomas Reschka
//
package inet.examples.inet.tcpwindowscale;
import inet.common.misc.ThruputMeteringChannel;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.node.inet.StandardHost;
network tcpwindowscale
{
parameters:
types:
channel LFNPath extends ThruputMeteringChannel
{
parameters:
datarate = 10Mbps;
delay = 900s;
per = 0;
ber = 0.00000001;
thruputDisplayFormat = default("p b u");
}
submodules:
client: StandardHost {
parameters:
#display("p=250,100");
gates:
pppg[1];
}
server: StandardHost {
parameters:
#display("p=400,100;i=device/server");
gates:
pppg[1];
}
configurator: Ipv4NetworkConfigurator {
#display("p=100,100;is=s");
}
connections:
client.pppg[0] <--> LFNPath <--> server.pppg[0];
}
Now Here I want change the data rate during simulation from 1Mbps to 10Mbps for every 10sec. So every 10sec the data rate change and pick random value and run for 100s. Total of 10 values it pick randomly of datarate.

Parameters to communicate between car node and standard host in omnet++

I want to communicate between a car node and standard host node. I'm using veins_inet car node. when I run my simulation, alot of parameters are asked e.g. analomodel,x- axis, y axis etc.
What parameters should I insert in my ini file.?
What should be application type of my server node (standard host)?
##############################My .ned file#######################
package testingFOG;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.ethernet.Eth100M;
import inet.node.inet.AdhocHost;
import inet.node.inet.Router;
import inet.node.inet.StandardHost;
import inet.node.inet.WirelessHost;
import inet.node.wireless.AccessPoint;
import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
import inet.visualizer.contract.IIntegratedVisualizer;
import org.car2x.veins.nodes.Car;
network testingFOG
{
#display("bgb=500,300");
submodules:
visualizer: <default("IntegratedCanvasVisualizer")> like IIntegratedVisualizer if hasVisualizer() {
parameters:
#display("p=36,34");
}
configurator: IPv4NetworkConfigurator {
parameters:
assignDisjunctSubnetAddresses = false;
#display("p=36,83");
}
radioMedium: Ieee80211ScalarRadioMedium {
parameters:
#display("p=34,134");
}
//endNode: WirelessHost { //wirelessHost1
// parameters:
// #display("p=246,111");
//}
serverNode: StandardHost {//wiredHost1
parameters:
#display("p=400,147;i=device/server");
}
// wiredHost2: StandardHost {
// parameters:
// #display("p=412,70");
// }
// router: Router {
// parameters:
// #display("p=296,69");
// }
AP: AccessPoint {
parameters:
#display("p=351,86");
}
vehicularNode: Car {
#display("p=239,198");
}
connections allowunconnected:
//accessPoint.ethg++ <--> Eth100M <--> router.ethg++;
serverNode.ethg++ <--> Eth100M <--> AP.ethg++;
// wiredHost2.ethg++ <--> Eth100M <--> router.ethg++;
}
################################My .ini file###############################
[General]
network = testingFOG
sim-time-limit = 400s
tkenv-plugin-path = ../../../etc/plugins
**.addDefaultRoutes = false
**.*Node.numUdpApps = 2
**.*Node.udpApp[0].typename = "UDPEchoApp"
**.*Node.udpApp[0].localPort = 1000
**.serverNode.udpApp[*].typename = "UDPBasicApp"
**.vehicularNode.applType= "TraCIDemo11p"
**.serverNode.udpApp[1].destAddresses = "vehicularNode"
**.vehicularNode.udpApp[1].destAddresses = "serverNode"
**.*Node.udpApp[1..].destPort = 1000
**.*Node.udpApp[1..].messageLength = 100B
**.*Node.udpApp[1..].sendInterval = 1s
**.*Node.udpApp[1..].stopTime = 300s
**.initialZ = 0m
In the .ini file source mode, Go to the console tabs and find the NED parameter tab. It has all available parameters for the modules you have.

error in module ipv4NetworkConfigurator, configurator module 'ipv4NetworkConfigurator' not found

i am working in omnet++ for network simulation, i want to do a network client server with 2 routers as topology, i used the module ipv4NetworkConfigurator for assigning ip address automatically and routing table. But i can't understand the error 'ipv4NetworkConfigurator' not found
\\file ClientServeur.ned
package networkclientserver.simulations;
import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
import inet.node.inet.Router;
import inet.node.inet.StandardHost;
import ned.DatarateChannel;
network ClientServer
{
submodules:
Client: StandardHost {
#display("p=56,154");
}
Server: StandardHost {
#display("p=501,154;i=device/server");
}
R1: Router {
#display("p=201,154");
}
R2: Router {
#display("p=342,154");
}
Configurator: IPv4NetworkConfigurator {
#display("p=251,62");
}
connections:
Client.pppg++ <--> DatarateChannel { delay = 100ms; datarate =
64kbps; } <--> R1.pppg++;
R1.pppg++ <--> DatarateChannel { delay = 100ms; datarate = 64kbps; }
<--> R2.pppg++;
R2.pppg++ <--> DatarateChannel { delay = 100ms; datarate = 64kbps; }
<--> Server.pppg++;
}
\\File omnetpp.ini
network = ClientServer
description = "Fully automatic IP address assignment"
# Configurator settings
tkenv-plugin-path = ../../../etc/plugins
record-eventlog = true
**.networkLayer.configurator.networkConfiguratorModule =
"Ipv4networkconfigurator"
**.channel.throughput.result-recording-modes = all
*.Configurator.dumpAddresses = true
*.Configurator.dumpTopology = true
*.Configurator.dumpLinks = true
*.Configurator.dumpRoutes = true
# Routing settings
*.*.ipv4.arp.typename = "GlobalArp"
#*.*.ipv4.routingTable.netmaskRoutes= ""
sim-time-limit = 100s
**.tcpType = "TCP"
**.Client.numTcpApps = 1
**.Client.tcpApp[*].typename = "TCPSessionApp"
**.Client.tcpApp[*].connectAddress = "server"
**.Client.tcpApp[*].connectPort = 80
**.Client.tcpApp[*].sendBytes = 10MiB
**.Server.numTcpApps = 1
**.Server.tcpApp[*].typename = "TCPSinkApp"
**.Server.tcpApp[*].localAddress = ""
**.Server.tcpApp[*].localPort = 80
**.tcpApp[*].dataTransferMode = "object"
**.R1.ppp[*].queueType ="DropTailQueue"
**.R1.ppp[*].queue.frameCapacity = 10
**.ppp[*].numOutputHooks = 1
**.ppp[*].outputHook[*].typename = "ThruputMeter"
\\end file
error in module (inet::IPv4NodeConfigurator), Configurator module 'ipv4NetworkConfigurator' not found
By default all the nodes expect that the configurator is called configurator (starts with lowercase), while you have
v
Configurator: IPv4NetworkConfigurator
^
where it starts with uppercase. As a convention it is recommended to start module names, types, interface names with uppercase, while use lowercase names for parameters, gates and submodule names.

Gate is not connected to a submodule error

I am trying to create a network with six nodes as following
module Node
{
parameters:
#display("i=abstract/router_vs");
gates:
inout g[];
}
channel Link extends ned.DatarateChannel
{
parameters:
int cost = default(0);
}
//
// Generated network with random topology (6 nodes, 8 edges, seed=100).
//
network net
{
#display("bgb=478,329");
submodules:
S: Node {
#display("p=19,87;is=s");
}
n1: Node {
#display("p=130,142;is=s");
}
n2: Node {
#display("p=130,36;is=s");
}
n3: Node {
#display("p=262,142;is=s");
}
n4: Node {
#display("p=262,36;is=s");
}
T: Node {
#display("p=364,87;is=s");
}
connections:
S.g++ <--> Link { cost = 13;#display("t=13"); } <--> n1.g++;
S.g++ <--> Link { cost = 16;#display("t=16"); } <--> n2.g++;
n1.g++ <--> Link { cost = 1;#display("t=1"); } <--> n2.g++;
n1.g++ <--> Link { cost = 14;#display("t=14"); } <--> n3.g++;
n1.g++ <--> Link { cost = 9;#display("t=9"); } <--> n4.g++;
n2.g++ <--> Link { cost = 12;#display("t=12"); } <--> n4.g++;
n4.g++ <--> Link { cost = 20;#display("t=20"); } <--> T.g++;
n3.g++ <--> Link { cost = 4;#display("t=4"); } <--> T.g++;
n3.g++ <--> Link { cost = 7;#display("t=7"); } <--> n4.g++;
}
But I got this error when I try to run the simulator and it crash the exe file.
Error in module (cModule) net.S (id=2) during network setup: Gate
`net.S.g$i[0]' is not connected to a submodule (or internally to
another gate of the same module).
The problem is in module Node, which you declared as a compound module. OMNeT++ thus expects it to have submodules which connect to the declared gate g. However, your compound module has no submodules.
You most likely want to declare your module as simple Node (that is, a module without submodules).

Resources