How to use Inet's FlatNConfigurator in Omnet++

913 views
Skip to first unread message

Lenny Linus

unread,
Oct 18, 2014, 6:40:03 PM10/18/14
to omn...@googlegroups.com

Hello there people! I am a beginner in Omnet++, i do not have an in depth knowledge about it. I am following a book on omnet++ and Inet. There is a small simulation inside in which a basic network consisting of a server node, a client node and a router is present. The books tells me to add a FlatNetworkConfigurator to my Network. When i do so before running the simulation, i get an error saying 

"Error in module (IPv4NodeConfigurator) Ethsit.pc1.networkLayer.configurator (id=12) during network initialization: Configurator module 'configurator' not found (check the 'networkConfiguratorModule' parameter)."

I searched and a solution said to add the line  ' **.networkLayer.configurator.networkConfiguratorModule = "" '. But after i did that there came another error 
this time it said "Error in module (EtherMACFullDuplex) Network.server.eth[0].mac(id=21 ... " I have attached a screen shot... Have a look, i would be thank ful if anyone can solve this for me.


Alfonso Ariza Quintana

unread,
Oct 20, 2014, 4:00:04 AM10/20/14
to omn...@googlegroups.com

1.- The module name flatNetworkConfigurator should be “configurator”

2.- Ethernets gates must be connected using channel of the type ChannelDataRate, they can’t be connected without channels.

--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lenny Linus

unread,
Oct 20, 2014, 4:40:04 PM10/20/14
to omn...@googlegroups.com, aari...@hotmail.com
Thank you so much for the reply! Can you tell me exactly how do we connect the two nodes using "ChannelDataRate" 


After you said i did connect the nodes and the router using a DatarateChannel, But the problem still persists. If i use a FlatNetworkConfigurator it says "error: cannot cast 'FlatNetworkConfigurator*' To 'IPv4NetworkConfigurator *'" something... I have attached both the package.ned and omnetpp.ini files please have a look at them and guide me. Thank you! :)
omnetpp.ini
package.ned

Alfonso Ariza Quintana

unread,
Oct 20, 2014, 5:31:13 PM10/20/14
to omn...@googlegroups.com
 channel cable extends DatarateChannel
{
    datarate = 1000Mbps;
}

 @license(LGPL);
 //
 // TODO documentation
 //
 network Network
 {
     @display("bgb=462,347");
     types:
     submodules:
     server: StandardHost {
         @display("p=402,224");
     }
     client: StandardHost {
         @display("p=115,233");
     }
     router: Router {
         @display("p=251,144");
     }
     
     
     configurator: IPv4NetworkConfigurator{
         @display("p=105,57");
     }
     connections:
     router.ethg++ <--> cable <--> client.ethg++;
     router.ethg++ <--> cable <--> server.ethg++;
 }





Date: Mon, 20 Oct 2014 13:39:54 -0700
From: lennylenny...@gmail.com
To: omn...@googlegroups.com
CC: aari...@hotmail.com
Subject: Re: [Omnetpp-l] How to use Inet's FlatNConfigurator in Omnet++

Mac Sar

unread,
Dec 21, 2014, 4:43:03 AM12/21/14
to omn...@googlegroups.com, aari...@hotmail.com
Alfonso, Hi

The answers do not help in resolving this problem and honestly I have no idea how to finally get started with omnet. Moving away from NS2 I have found it frustrating to build even simple simulations with omnet. I cannot find a clean and straight tutorial and I cannot understand the error messages.

I have 2 StandardHosts (connected with an Ethernet100 cable) and I still get this error:

Error in module (IPv4NodeConfigurator) Network.standardHost.networkLayer.configurator (id=11) during network initialization: CheckAndCast() : cannot cast (FlatNetworkConfigurator *) Newtork.configurator to type "IPv4NetworkConfigurator *)

Thanks


-----
channel Ethernet100 extends ned.DatarateChannel
{
    datarate = 100Mbps;
    delay = 100us;
    ber = 1e-10;
}

network Network
{
    @display("bgb=638,379");
    submodules:
        standardHost: StandardHost {
            @display("p=123,198");
        }
        standardHost1: StandardHost {
            @display("p=378,204");
        }
        configurator: FlatNetworkConfigurator {
            @display("p=549,56");
        }
    connections:
        standardHost.ethg++ <--> Ethernet100 <--> standardHost1.ethg++;
}

Michael Kirsche

unread,
Dec 21, 2014, 8:49:32 AM12/21/14
to omn...@googlegroups.com
Why don't you switch your "configurator" to the type that OMNeT complains about?

import inet.networklayer.configurator.ipv4.IPv4NetworkConfigurator;
...

configurator
: IPv4NetworkConfigurator {
...

Take a look at the NED files in the configurator folder, they include explanations on their behavior and restrictions and so on.
Reply all
Reply to author
Forward
0 new messages