Compound Module IPv4Underlay

File: Underlay/IPv4Underlay/IPv4Underlay.ned

The IPv4Underlay ned-file

See also: IPv4UnderlayConfigurator

underlayConfigurator: IPv4UnderlayConfigurator backboneRouter: Router outRouter: TunOutRouter accessRouter: AccessRouter overlayAccessRouter: OverlayAccessRouter overlayBackboneRouter: OverlayRouter globalObserver: GlobalObserver

Usage diagram:

The following diagram shows usage relationships between modules, networks and channels. Unresolved module (and channel) types are missing from the diagram. Click here to see the full picture.

Contains the following modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

AccessRouter

Access router connects the access nets to the network backbone

GlobalObserver

global module that contains the bootstrapOracle and the globalStatistics module

IPv4UnderlayConfigurator

Configurator of the IPv4Underlay

OverlayAccessRouter

Access router that participates in the overlay

OverlayRouter

Router in the overlay network

TunOutRouter

TunOut router.

Router (unknown -- not in documented files)

Contains the following channels:

fiberline (no description)

Networks:

IPv4Network

The IPv4Underlay network definition

Parameters:

Name Type Description
overlayType string

the overlay used in the simulation (for overlayBackboneRouters)

tier1Type string

the application on top of the overlay used in the simulation (for overlayBackboneRouters)

tier2Type string

the module type on top of tier 1 (for overlayBackboneRouters)

tier3Type string

the module type on top of tier 2 (for overlayBackboneRouters)

backboneRouterNum numeric

number of backbone routers in the network

accessRouterNum numeric

number of access routers in the network

overlayBackboneRouterNum numeric

number of backbone routers in the network that participate the overlay

overlayAccessRouterNum numeric

number of access routers in the network that participate the overlay

outRouterNum numeric

set to 1 if you want to use a TunOutRouter as connection to a real network

connectivity numeric

degree of connectivity of backbone routers (1 = every backbone router is connected to all the others)

Unassigned submodule parameters:

Name Type Description
underlayConfigurator.startIP string

IP configuration starts with this IP

underlayConfigurator.gatewayIP string

IP of the gateway (if an outRouter is used)

underlayConfigurator.churnChangeInterval numeric
underlayConfigurator.channelTypes string

used access technologies

underlayConfigurator.keepFirstNode bool

is the first node kept during simulation?

underlayConfigurator.gracefullLeaveDelay numeric

time between prekill and removal from overlay

underlayConfigurator.gracefullLeavePropability numeric

propability of gracefull leave

underlayConfigurator.churnGeneratorTypes string

a list of churn generators to be used

underlayConfigurator.transitionTime numeric

time to wait before measuring after init phase is finished

underlayConfigurator.measurementTime numeric

duration of the simulation after init and transition phase

outRouter[*].parser string

name of the PacketParser to use

outRouter[*].routingFile string

use predefined routing file if given

outRouter[*].tunDev.mtu numeric

maximum transmission unit of the underlaying network

accessRouter[*].routingFile string

use predefined routing file if given

overlayAccessRouter[*].IPForward bool

true if ip packets should be forwarded

overlayAccessRouter[*].routingFile string

use predefined routing file if given

overlayAccessRouter[*].numTiers numeric const

number of tiers

overlayBackboneRouter[*].numTiers numeric const

number of tiers

overlayBackboneRouter[*].IPForward bool

true if ip packets should be forwarded

overlayBackboneRouter[*].routingFile string

predefined routing

globalObserver.useGlobalFunctions numeric

are globalFunctions used?

globalObserver.globalFunctionsType string

type of globalFunctions

globalObserver.bootstrapOracle.maliciousNodeProbability numeric

probability for a node to be malicious on creation

globalObserver.bootstrapOracle.maliciousNodeChange bool

dynamically change number of malicious nodes

globalObserver.bootstrapOracle.maliciousNodeChangeStartTime numeric
globalObserver.bootstrapOracle.maliciousNodeChangeRate numeric
globalObserver.bootstrapOracle.maliciousNodeChangeInterval numeric
globalObserver.bootstrapOracle.maliciousNodeChangeStartValue numeric
globalObserver.bootstrapOracle.maliciousNodeChangeStopValue numeric
globalObserver.bootstrapOracle.maxNumberOfKeys numeric

maximum number of overlay keys the bootstrap oracle handles

globalObserver.bootstrapOracle.keyProbability numeric

probability of keys to be owned by nodes

globalObserver.globalStatistics.outputMinMax bool
globalObserver.globalStatistics.outputVariance bool
globalObserver.globalStatistics.measureNetwInitPhase bool
globalObserver.globalStatistics.globalStatTimerInterval numeric

Source code:

module IPv4Underlay

    parameters:
	overlayType: string, // the overlay used in the simulation (for overlayBackboneRouters)
	tier1Type: string, // the application on top of the overlay used in the simulation (for overlayBackboneRouters)
	tier2Type: string, // the module type on top of tier 1 (for overlayBackboneRouters)
	tier3Type: string, // the module type on top of tier 2 (for overlayBackboneRouters)
        backboneRouterNum: numeric, // number of backbone routers in the network
        accessRouterNum: numeric, // number of access routers in the network
        overlayBackboneRouterNum: numeric, // number of backbone routers in the network that participate the overlay
        overlayAccessRouterNum: numeric, // number of access routers in the network that participate the overlay
        outRouterNum: numeric, // set to 1 if you want to use a TunOutRouter as connection to a real network
        connectivity: numeric; // degree of connectivity of backbone routers (1 = every backbone router is connected to all the others)

    submodules:
        underlayConfigurator: IPv4UnderlayConfigurator;
            display: "i=block/cogwheel";
        backboneRouter: Router[backboneRouterNum];
            display: "i=device/server2";
        outRouter: TunOutRouter[min(1, outRouterNum)];
            display: "i=misc/globe";
        accessRouter: AccessRouter[accessRouterNum];
            display: "i=device/server2,gray,30";
        overlayAccessRouter: OverlayAccessRouter[overlayAccessRouterNum]
	    parameters:
		overlayType = overlayType, // the overlay used in the simulation
		tier1Type = tier1Type, // the application on top off the overly used in the simulation
		tier2Type = tier2Type, // tier 2 module to use
		tier3Type = tier3Type; // tier 3 module to use
            display: "i=device/server2,gray,30;i2=block/circle_s";
        overlayBackboneRouter: OverlayRouter[overlayBackboneRouterNum]
	    parameters:
	       	overlayType = overlayType, // the overlay used in the simulation
		tier1Type = tier1Type, // the application on top off the overly used in the simulation
		tier2Type = tier2Type, // tier 2 module to use
		tier3Type = tier3Type; // tier 3 module to use
            display: "i=device/server2;i2=block/circle_s";
        globalObserver: GlobalObserver;
            display: "i=block/control";
    connections nocheck:

        //
        // BACKBONE ROUTER
        //
	// connect outRouter to a backboneRouter
            backboneRouter[0].out++ --> fiberline --> outRouter[0].in++ if outRouterNum > 0;
            backboneRouter[0].in++ <-- fiberline <-- outRouter[0].out++ if outRouterNum > 0;

        // connect backboneRouters with other backboneRouters
        for i=0..backboneRouterNum - 1, j=0..backboneRouterNum - 1 do
            backboneRouter[i].out++ --> fiberline --> backboneRouter[j].in++ if i < j && uniform2(0, 1, i, 1) <= connectivity;
            backboneRouter[i].in++ <-- fiberline <-- backboneRouter[j].out++ if i < j && uniform2(0, 1, i, 0) <= connectivity;
        endfor;

        // connect backboneRouters with overlayBackboneRouters
        for i=0..backboneRouterNum - 1, j=0..overlayBackboneRouterNum - 1 do
            backboneRouter[i].out++ --> fiberline --> overlayBackboneRouter[j].in++ if i <= j && uniform2(0, 1, i, 0) <= connectivity;
            backboneRouter[i].in++ <-- fiberline <-- overlayBackboneRouter[j].out++ if i <= j && uniform2(0, 1, i, 0) <= connectivity;
        endfor;

        // connect overlayBackboneRouters with backboneRouters
        for i=0..overlayBackboneRouterNum - 1, j=0..backboneRouterNum - 1 do
            overlayBackboneRouter[i].out++ --> fiberline --> backboneRouter[j].in++ if i < j && uniform2(0, 1, i, 1) <= connectivity;
            overlayBackboneRouter[i].in++ <-- fiberline <-- backboneRouter[j].out++ if i < j && uniform2(0, 1, i, 0) <= connectivity;
        endfor;

        // connect overlayBackboneRouters with other overlayBackboneRouters
        for i=0..overlayBackboneRouterNum - 1, j=0..overlayBackboneRouterNum - 1 do
            overlayBackboneRouter[i].out++ --> fiberline --> overlayBackboneRouter[j].in++ if i < j && uniform2(0, 1, i, 0) <= connectivity;
            overlayBackboneRouter[i].in++ <-- fiberline <-- overlayBackboneRouter[j].out++ if i < j && uniform2(0, 1, i, 0) <= connectivity;
        endfor;

        //
        // ACCESS ROUTER
        //
        // connect accessRouters with backboneRouters
        for i=0..accessRouterNum - 1 do
            accessRouter[i].out++ --> fiberline --> backboneRouter[intuniform2(0, backboneRouterNum - 1, 0, 1)].in++ if uniform2(0, 1, i, 1) > overlayBackboneRouterNum / (overlayBackboneRouterNum + backboneRouterNum);
            accessRouter[i].in++ <-- fiberline <-- backboneRouter[intuniform2(0, backboneRouterNum - 1, 0, 0)].out++ if uniform2(0, 1, i, 0) > overlayBackboneRouterNum / (overlayBackboneRouterNum + backboneRouterNum);
        endfor;

        // connect accessRouters with overlayBackboneRouters
        for i=0..accessRouterNum - 1 do
            accessRouter[i].out++ --> fiberline --> overlayBackboneRouter[intuniform2(0, overlayBackboneRouterNum - 1, 0, 1)].in++ if uniform2(0, 1, i, 0) <= overlayBackboneRouterNum / (overlayBackboneRouterNum + backboneRouterNum);
            accessRouter[i].in++ <-- fiberline <-- overlayBackboneRouter[intuniform2(0, overlayBackboneRouterNum - 1, 0, 0)].out++ if uniform2(0, 1, i, 0) <= overlayBackboneRouterNum / (overlayBackboneRouterNum + backboneRouterNum);
        endfor;

        // connect overlayAccessRouters with backboneRouters
        for i=0..overlayAccessRouterNum - 1 do
            overlayAccessRouter[i].out++ --> fiberline --> backboneRouter[intuniform2(0, backboneRouterNum - 1, 0, 1)].in++ if uniform2(0, 1, i, 1) > overlayBackboneRouterNum / (overlayBackboneRouterNum + backboneRouterNum);
            overlayAccessRouter[i].in++ <-- fiberline <-- backboneRouter[intuniform2(0, backboneRouterNum - 1, 0, 0)].out++ if uniform2(0, 1, i, 0) > overlayBackboneRouterNum / (overlayBackboneRouterNum + backboneRouterNum);
        endfor;

        // connect overlayAccessRouters with overlayBackboneRouters
        for i=0..overlayAccessRouterNum - 1 do
            overlayAccessRouter[i].out++ --> fiberline --> overlayBackboneRouter[intuniform2(0, overlayBackboneRouterNum - 1, 0, 1)].in++ if uniform2(0, 1, i, 0) <= overlayBackboneRouterNum / (overlayBackboneRouterNum + backboneRouterNum);
            overlayAccessRouter[i].in++ <-- fiberline <-- overlayBackboneRouter[intuniform2(0, overlayBackboneRouterNum - 1, 0, 0)].out++ if uniform2(0, 1, i, 0) <= overlayBackboneRouterNum / (overlayBackboneRouterNum + backboneRouterNum);
        endfor;

endmodule