omnet++inet

On aodv networks in OMNeT++


I want to implement the network topology shown in the following code. Each aodv node is connected to an extRouter, which can forward messages from external programs that are passed into the simulation to the corresponding aodv node. The role of extRouter is only to connect to each aodv node and forward messages to them, without participating in the simulation of aodv networks. The following error occurred when the simulation started:

enter image description here

package inet.examples.aodv.drone;   
import inet.common.scenario.ScenarioManager;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import inet.networklayer.ipv4.RoutingTableRecorder;
import inet.node.aodv.AodvRouter;
import inet.physicallayer.unitdisk.UnitDiskRadioMedium;
import inet.visualizer.integrated.IntegratedVisualizer;
import inet.node.inet.Router;
import ned.DatarateChannel;
import inet.linklayer.contract.IPppInterface;

network Drone
{
    parameters:
        int numHosts;
        @display("bgb=944.376,745.56");

    types:
          channel ethline extends DatarateChannel
        {
            datarate = 100 Gbps;
        }

    submodules:
        radioMedium: UnitDiskRadioMedium {
            parameters:
                @display("p=100,200;is=s");
        }
        configurator: Ipv4NetworkConfigurator {
            parameters:
                config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.0.0'/></config>");
                @display("p=100,100;is=s");
        }
        routingTableRecorder: RoutingTableRecorder {
            parameters:
                @display("p=100,300;is=s");
        }
        visualizer: IntegratedVisualizer {
            parameters:
                @display("p=100,30");
        }
        scenarioManager: ScenarioManager {
            parameters:
                script = default(xml("<scenario/>"));
                @display("p=100,400;is=s");
        }
        uav1: AodvRouter {
            parameters:
                @display("i=device/pocketpc_s;r=,,#707070");
                //ipv4.routingTable.routingFile = "cli1.mrt";
            gates:
                ethg[1];

        }
        uav2: AodvRouter {
            parameters:
                @display("i=device/pocketpc_s;r=,,#707070");
                ipv4.routingTable.routingFile = "cli2.mrt";
            gates:
                ethg[1];
        }
        uav3: AodvRouter {
            parameters:
                @display("i=device/pocketpc_s;r=,,#707070");
                ipv4.routingTable.routingFile = "cli3.mrt";
            gates:
                ethg[1];

        }
        uav4: AodvRouter {
            parameters:
                @display("i=device/pocketpc_s;r=,,#707070");
                ipv4.routingTable.routingFile = "cli4.mrt";
            gates:
                ethg[1];

        }
        extRouter: Router {
            parameters:

                @display("i=device/router_l;p=497.336,352.03");
            gates:
                ethg[4];

        }

    connections allowunconnected:

        extRouter.ethg[0] <--> ethline <-->uav1.ethg[0];
        extRouter.ethg[1] <--> ethline <--> uav2.ethg[0];
        extRouter.ethg[2] <--> ethline <--> uav3.ethg[0];
        extRouter.ethg[3] <--> ethline <--> uav4.ethg[0];
}

Solution

  • Change the XML config as follows:

     configurator: Ipv4NetworkConfigurator {
            parameters:
                config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.x.x'/></config>");
                @display("p=100,100;is=s");
        }