IP configuration failed by finding address prefix.

844 views
Skip to first unread message

uwerothfeld

unread,
Sep 11, 2013, 12:50:03 PM9/11/13
to omn...@googlegroups.com
Hello again,

I try to define a network, where the peers have successive IP addresses (in terms of peer 1: 192.168.1.1, peer 2: 192.168.1.2 ...). My test-ned file is:

network TestNetwork
{
    types:

        channel ethernetline extends DatarateChannel
        {
            delay = 0.1us;
            datarate = 10Mbps;
        }

    submodules:

        cli[8]: StandardHost;

        rte[2]: Router {
            parameters:
                @display("is=vs");
        }

        configurator: IPv4NetworkConfigurator {
            parameters:
                config = xmldoc("IPv4Config.xml");
        }

    connections:
        cli[0].ethg++ <--> ethernetline <--> rte[0].ethg++;
        cli[1].ethg++ <--> ethernetline <--> rte[0].ethg++;
        cli[2].ethg++ <--> ethernetline <--> rte[0].ethg++;
        cli[3].ethg++ <--> ethernetline <--> rte[0].ethg++;
        cli[4].ethg++ <--> ethernetline <--> rte[1].ethg++;
        cli[5].ethg++ <--> ethernetline <--> rte[1].ethg++;
        cli[6].ethg++ <--> ethernetline <--> rte[1].ethg++;
        cli[7].ethg++ <--> ethernetline <--> rte[1].ethg++;
        rte[0].ethg++ <--> ethernetline <--> rte[1].ethg++;
}


And the IP config is given by the IPv4Config.xml file like:
<config>
    <interface hosts='cli[0]' names="eth0"  address='192.168.1.1'   netmask='255.255.0.0'/>
    <interface hosts='cli[1]' names='eth0'  address='192.168.1.2'   netmask='255.255.0.0'/>
    <interface hosts='cli[2]' names='eth0'  address='192.168.1.3'   netmask='255.255.0.0'/>
    <interface hosts='cli[3]' names='eth0'  address='192.168.1.4'   netmask='255.255.0.0'/>
    <interface hosts='cli[4]' names='eth0'  address='192.168.1.5'   netmask='255.255.0.0'/>
    <interface hosts='cli[5]' names='eth0'  address='192.168.1.6'   netmask='255.255.0.0'/>
    <interface hosts='cli[6]' names='eth0'  address='192.168.1.7'   netmask='255.255.0.0'/>
    <interface hosts='cli[7]' names='eth0'  address='192.168.1.8'   netmask='255.255.0.0'/>
    <interface hosts='rte[0]' names='eth0'  address='192.168.2.1'   netmask='255.255.0.0'/>
    <interface hosts='rte[0]' names='eth1'  address='192.168.2.2'   netmask='255.255.0.0'/>
    <interface hosts='rte[0]' names='eth2'  address='192.168.2.3'   netmask='255.255.0.0'/>
    <interface hosts='rte[0]' names='eth3'  address='192.168.2.4'   netmask='255.255.0.0'/>
    <interface hosts='rte[0]' names='eth4'  address='192.168.2.5'   netmask='255.255.0.0'/>
    <interface hosts='rte[1]' names='eth0'  address='192.168.2.6'   netmask='255.255.0.0'/>
    <interface hosts='rte[1]' names='eth1'  address='192.168.2.7'   netmask='255.255.0.0'/>
    <interface hosts='rte[1]' names='eth2'  address='192.168.2.8'   netmask='255.255.0.0'/>
    <interface hosts='rte[1]' names='eth3'  address='192.168.2.9'   netmask='255.255.0.0'/>
    <interface hosts='rte[1]' names='eth4'  address='192.168.2.10'   netmask='255.255.0.0'/>
</config>

Running the app, i receive the error:

<!> Error in module (IPv4NodeConfigurator) TestNetwork.cli[0].networkLayer.configurator (id=19) during network initialization: Failed to find address prefix (using 192.168.3.2 with specified bits 255.255.255.255) and netmask (length from 16 bits to 16 bits) for interface TestNetwork.cli[1].eth0 and 1 other interface(s). Please refine your parameters and try again!.

Unfortunately i dont understand that error. If the config wrong? Does the config not match for my network? How can i setup the addresses of the peers without defining the addresses of the routers??? Thanks for any advice or hint.

best uwe

Rudolf Hornig

unread,
Oct 9, 2013, 1:07:57 PM10/9/13
to omn...@googlegroups.com
This is an invalid configuration. Actually you have a single subnet (192.168.0.0) and you want to place all nodes on that single subnet. On the other hand each link between a router and and a client must be a separate subnet (routers are connecting different subnets).

if you want to place all cli[*] nodes on the same network then you must use a switches and not routers to connect them. 

uwerothfeld

unread,
Oct 10, 2013, 9:34:09 AM10/10/13
to omn...@googlegroups.com
Hey Rudolf,

thank you for reply ;)

There is still a problem or rather an additional error by me:  If  I chance the configuration up to:

<interface hosts='cli[0]' names='eth0' address='192.168.1.1' netmask='255.255.255.0'/>
<interface hosts='cli[1]' names='eth0' address='192.168.2.1' netmask='255.255.255.0'/>

or 

<interface hosts='cli[0]' names='eth0' address='192.168.1.1' /> 
<interface hosts='cli[1]' names='eth0' address='192.168.2.1' />

The goal is to create a subnet per client/peer, to be able to determine the IP addresses of each peer in advance

To create a subnet per client, the application terminates with an segmentation fault (error 139). The stack trace for this error is:

IPv4Address::IPv4Address (this=0x7fffffffc340, obj=@0x10: <error reading variable>)
IPv4InterfaceData::getIPAddress (this=0x0)
RoutingTable::configureRouterId (this=0x185576d0)
RoutingTable::initialize (this=0x185576d0, stage=3)
cModule::initializeModules (this=0x185576d0, stage=3)
cModule::initializeModules (this=0x18534ef0, stage=3)
cModule::initializeModules (this=0x18534950, stage=3)
cModule::callInitialize (this=0x18534950)
cSimulation::startRun (this=0x815570)
EnvirBase::startRun (this=0x815990)
Tkenv::newRun (this=0x815990, configname=0x18536280 \"AAA\", runnumber=0)
newRun_cmd (interp=0x16717360, argc=3, argv=0x7fffffffc830)
TclInvokeStringCommand ()
TclEvalObjvInternal ()
?? ()
TclCompEvalObj ()
TclObjInterpProc ()
TclEvalObjvInternal ()
?? ()
TclCompEvalObj ()
TclObjInterpProc ()
TclEvalObjvInternal ()
Tcl_EvalEx ()
Tcl_Eval ()
Tkenv::run (this=0x815990)
EnvirBase::run (this=0x815990, argc=7, argv=0x7fffffffe528, configobject=0x813710)
setupUserInterface (argc=7, argv=0x7fffffffe528)
evMain (argc=7, argv=0x7fffffffe528)
main (argc=7, argv=0x7fffffffe528)


and the eventlog is interrupted at:


MB sm 5 tm 33 m ""
ME
MB sm 5 tm 9 m ""
ME
MB sm 5 tm 33 m ""
ME
MB sm 5 tm 21 m ""
ME
- Time spent in IPv4NetworkConfigurator::extractTopology(topology): 0s
- Time spent in IPv4NetworkConfigurator::readInterfaceConfiguration(topology): 0s
- Time spent in IPv4NetworkConfigurator::assignAddresses(topology): 0s
- Time spent in IPv4NetworkConfigurator::readMulticastGroupConfiguration(topology): 0s
- Time s

Is there still an error in my config or is it a bug?

best
uwe
Reply all
Reply to author
Forward
0 new messages