Network HttpNnodes

Package: inet.examples.httptools.socket.simpleddos
File: examples/httptools/socket/simpleddos/nnodes.ned

n-nodes test scenario for sockets.

The scenario consists of a number of clients and servers connected to two routers. The routers are connected with a single link.

IPv4NetworkConfigurator HttpController Router Router StandardHost StandardHost StandardHost StandardHost

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters:

Name Type Default value Description
numclients double 10

Properties:

Name Value Description
isNetwork
display bgb=474,374

Unassigned submodule parameters:

Name Type Default value Description
configurator.minLinkWeight double 1E-3
configurator.assignAddresses bool true

assign IP addresses to all interfaces in the network

configurator.assignDisjunctSubnetAddresses bool true

avoid using the same address prefix and netmask on different links when assigning IP addresses to interfaces

configurator.addStaticRoutes bool true

add static routes to the routing tables of all nodes to route to all destination interfaces (only where applicable; turn off when config file contains manual routes)

configurator.addDefaultRoutes bool true

add default routes if all routes from a source node go through the same gateway (used only if addStaticRoutes is true)

configurator.addSubnetRoutes bool true

add subnet routes instead of destination interface routes (only where applicable; used only if addStaticRoutes is true)

configurator.optimizeRoutes bool true

optimize routing tables by merging routes, the resulting routing table might route more packets than the original (used only if addStaticRoutes is true)

configurator.dumpTopology bool false

print extracted network topology to the module output

configurator.dumpLinks bool false

print recognized network links to the module output

configurator.dumpAddresses bool false

print assigned IP addresses for all interfaces to the module output

configurator.dumpRoutes bool false

print configured and optimized routing tables for all nodes to the module output

configurator.dumpConfig string ""

write configuration into the given config file that can be fed back to speed up subsequent runs (network configurations)

controller.events string ""

Popularity modification events defintion file.

controller.eventsSection string ""

Section within the popularity modification file, if one is defined.

controller.config xml

XML configuration file.

router_c.status.initialStatus string "UP"

TODO @signal, @statistic

router_c.routingTable.forwarding bool
router_c.routingTable.multicastForwarding bool
router_c.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

router_c.pcapRecorder.verbose bool false

whether to log packets on the module output

router_c.pcapRecorder.pcapFile string ""

the PCAP file to be written

router_c.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

router_c.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

router_c.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*] ext[*]"

space-separated list of sibling module names to listen on

router_c.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

router_c.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

router_c.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

router_c.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

router_c.lo0.lo.mtu int 4470B
router_c.bgp.interfaceTableModule string

The path to the InterfaceTable module

router_c.bgp.routingTableModule string
router_c.bgp.ospfRoutingModule string hasOSPF ? "^.ospf" : ""
router_c.bgp.dataTransferMode string
router_s.status.initialStatus string "UP"

TODO @signal, @statistic

router_s.routingTable.forwarding bool
router_s.routingTable.multicastForwarding bool
router_s.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

router_s.pcapRecorder.verbose bool false

whether to log packets on the module output

router_s.pcapRecorder.pcapFile string ""

the PCAP file to be written

router_s.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

router_s.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

router_s.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*] ext[*]"

space-separated list of sibling module names to listen on

router_s.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

router_s.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

router_s.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

router_s.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

router_s.lo0.lo.mtu int 4470B
router_s.bgp.interfaceTableModule string

The path to the InterfaceTable module

router_s.bgp.routingTableModule string
router_s.bgp.ospfRoutingModule string hasOSPF ? "^.ospf" : ""
router_s.bgp.dataTransferMode string
client.status.initialStatus string "UP"

TODO @signal, @statistic

client.routingTable.forwarding bool
client.routingTable.multicastForwarding bool
client.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

client.pcapRecorder.verbose bool false

whether to log packets on the module output

client.pcapRecorder.pcapFile string ""

the PCAP file to be written

client.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

client.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

client.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*] ext[*]"

space-separated list of sibling module names to listen on

client.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

client.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

client.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

client.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

client.lo0.lo.mtu int 4470B
thegood.status.initialStatus string "UP"

TODO @signal, @statistic

thegood.routingTable.forwarding bool
thegood.routingTable.multicastForwarding bool
thegood.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

thegood.pcapRecorder.verbose bool false

whether to log packets on the module output

thegood.pcapRecorder.pcapFile string ""

the PCAP file to be written

thegood.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

thegood.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

thegood.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*] ext[*]"

space-separated list of sibling module names to listen on

thegood.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

thegood.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

thegood.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

thegood.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

thegood.lo0.lo.mtu int 4470B
thebad.status.initialStatus string "UP"

TODO @signal, @statistic

thebad.routingTable.forwarding bool
thebad.routingTable.multicastForwarding bool
thebad.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

thebad.pcapRecorder.verbose bool false

whether to log packets on the module output

thebad.pcapRecorder.pcapFile string ""

the PCAP file to be written

thebad.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

thebad.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

thebad.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*] ext[*]"

space-separated list of sibling module names to listen on

thebad.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

thebad.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

thebad.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

thebad.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

thebad.lo0.lo.mtu int 4470B
theugly.status.initialStatus string "UP"

TODO @signal, @statistic

theugly.routingTable.forwarding bool
theugly.routingTable.multicastForwarding bool
theugly.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

theugly.pcapRecorder.verbose bool false

whether to log packets on the module output

theugly.pcapRecorder.pcapFile string ""

the PCAP file to be written

theugly.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

theugly.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

theugly.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*] ext[*]"

space-separated list of sibling module names to listen on

theugly.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

theugly.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

theugly.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

theugly.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

theugly.lo0.lo.mtu int 4470B

Source code:

//
// n-nodes test scenario for sockets.
//
// The scenario consists of a number of clients and servers connected to two routers. The routers are connected
// with a single link.
//
network HttpNnodes
{
    parameters:
        double numclients @prompt("Number of clients") = default(10);
        @display("bgb=474,374");
    types:
        channel ethernetline extends ned.DatarateChannel
        {
            delay = 0.1us;
            datarate = 100Mbps;
        }
    submodules:
        //        channelInstaller: ChannelInstaller {
        //            parameters:
        ////                channelClass = "ThruputMeteringChannel";
        ////                channelAttrs = "format=u";
        //                @display("p=98,50;i=block/cogwheel_s");
        //        }
        configurator: IPv4NetworkConfigurator {
            parameters:
                //                moduleTypes = "Router StandardHost";
                //                nonIPModuleTypes = "";
                config = xml("<config><interface hosts='*' address='145.236.x.x' netmask='255.255.x.x'/></config>");
                @display("p=50,64;i=block/cogwheel");
        }
        controller: HttpController {
            parameters:
                @display("p=46,140;i=block/cogwheel");
        }
        router_c: Router {
            parameters:
                @display("p=100,200;i=abstract/router_l");
        }
        router_s: Router {
            parameters:
                @display("p=300,200;i=abstract/router_l");
        }
        client[numclients]: StandardHost {
            parameters:
                @display("i=device/laptop_l");
        }
        thegood: StandardHost {
            parameters:
                @display("i=device/server_l");
        }
        thebad: StandardHost {
            parameters:
                @display("i=device/server_l");
        }
        theugly: StandardHost {
            parameters:
                @display("i=device/server_l");
        }
    connections allowunconnected:
        thegood.ethg++ <--> ethernetline <--> router_s.ethg++;
        thebad.ethg++ <--> ethernetline <--> router_s.ethg++;
        theugly.ethg++ <--> ethernetline <--> router_s.ethg++;
        for i=0..numclients-1 {
            client[i].ethg++ <--> ethernetline <--> router_c.ethg++;
        }
        router_s.ethg++ <--> ethernetline <--> router_c.ethg++;
}