Hierarchical

Package: inet.examples.inet.hierarchical

Hierarchical

network

(no description)

Ipv4NetworkConfigurator Router Area

Usage diagram

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

Parameters

Name Type Default value Description
columns int 3
rows int 3

Properties

Name Value Description
isNetwork

Unassigned submodule parameters

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

assign IP addresses to all interfaces in the network

configurator.assignUniqueAddresses bool true

avoid using the same address and raise an error if not possible

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.addDirectRoutes bool true

add direct routes (i.e. directly connected interfaces) to the routing table (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)

router.status.initialStatus string "UP"

TODO @signal, @statistic

router.pcapRecorder.verbose bool true

whether to log packets on the module output

router.pcapRecorder.pcapFile string ""

the PCAP file to be written

router.pcapRecorder.fileFormat string "pcapng"
router.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

router.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

router.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

space-separated list of sibling module names to listen on

router.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

router.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

router.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

router.pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

router.pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

router.pcapRecorder.alwaysFlush bool false

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

router.pcapRecorder.displayStringTextFormat string "rec: %n pks"
router.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

router.cb.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

router.cb.forwardServiceRegistration bool true
router.cb.forwardProtocolRegistration bool true
router.bl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

router.bl.forwardServiceRegistration bool true
router.bl.forwardProtocolRegistration bool true
router.li.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

router.li.forwardServiceRegistration bool true
router.li.forwardProtocolRegistration bool true
router.eth.bitrate double
router.nl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

router.nl.forwardServiceRegistration bool true
router.nl.forwardProtocolRegistration bool true
router.tn.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

router.tn.forwardServiceRegistration bool true
router.tn.forwardProtocolRegistration bool true
router.at.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

router.at.forwardServiceRegistration bool true
router.at.forwardProtocolRegistration bool true
router.bgp.interfaceTableModule string

The path to the InterfaceTable module

router.bgp.routingTableModule string
router.bgp.ospfRoutingModule string parent.hasOspf ? "^.ospf" : ""
area.lan.switch.macTable.agingTime double
area.lan.switch.macTable.forwardingTableFile string
area.lan.switch.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

area.lan.switch.l2NodeConfigurator.interfaceTableModule string
area.lan.switch.l2NodeConfigurator.l2ConfiguratorModule string "l2NetworkConfigurator"

the absolute path to the ~L2NetworkConfigurator; use "" if there is no configurator

area.lan.switch.status.initialStatus string "UP"

TODO @signal, @statistic

area.lan.switch.pcapRecorder.verbose bool true

whether to log packets on the module output

area.lan.switch.pcapRecorder.pcapFile string ""

the PCAP file to be written

area.lan.switch.pcapRecorder.fileFormat string "pcapng"
area.lan.switch.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

area.lan.switch.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

area.lan.switch.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

space-separated list of sibling module names to listen on

area.lan.switch.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

area.lan.switch.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

area.lan.switch.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

area.lan.switch.pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

area.lan.switch.pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

area.lan.switch.pcapRecorder.alwaysFlush bool false

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

area.lan.switch.pcapRecorder.displayStringTextFormat string "rec: %n pks"
area.lan.switch.stp.helloTime double
area.lan.switch.stp.forwardDelay double
area.lan.switch.stp.maxAge double
area.lan.switch.stp.bridgePriority int
area.lan.switch.stp.visualize bool
area.lan.switch.sc.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.lan.switch.sc.forwardServiceRegistration bool true
area.lan.switch.sc.forwardProtocolRegistration bool true
area.lan.switch.cb.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.lan.switch.cb.forwardServiceRegistration bool true
area.lan.switch.cb.forwardProtocolRegistration bool true
area.lan.switch.bl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.lan.switch.bl.forwardServiceRegistration bool true
area.lan.switch.bl.forwardProtocolRegistration bool true
area.lan.switch.li.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.lan.switch.li.forwardServiceRegistration bool true
area.lan.switch.li.forwardProtocolRegistration bool true
area.lan.switch.cutthrough.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.lan.switch.cutthrough.forwardServiceRegistration bool true
area.lan.switch.cutthrough.forwardProtocolRegistration bool true
area.lan.switch.eth.bitrate double
area.lan.host.status.initialStatus string "UP"

TODO @signal, @statistic

area.lan.host.pcapRecorder.verbose bool true

whether to log packets on the module output

area.lan.host.pcapRecorder.pcapFile string ""

the PCAP file to be written

area.lan.host.pcapRecorder.fileFormat string "pcapng"
area.lan.host.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

area.lan.host.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

area.lan.host.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

space-separated list of sibling module names to listen on

area.lan.host.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

area.lan.host.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

area.lan.host.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

area.lan.host.pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

area.lan.host.pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

area.lan.host.pcapRecorder.alwaysFlush bool false

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

area.lan.host.pcapRecorder.displayStringTextFormat string "rec: %n pks"
area.lan.host.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

area.lan.host.cb.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.lan.host.cb.forwardServiceRegistration bool true
area.lan.host.cb.forwardProtocolRegistration bool true
area.lan.host.bl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.lan.host.bl.forwardServiceRegistration bool true
area.lan.host.bl.forwardProtocolRegistration bool true
area.lan.host.li.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.lan.host.li.forwardServiceRegistration bool true
area.lan.host.li.forwardProtocolRegistration bool true
area.lan.host.eth.bitrate double
area.lan.host.nl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.lan.host.nl.forwardServiceRegistration bool true
area.lan.host.nl.forwardProtocolRegistration bool true
area.lan.host.tn.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.lan.host.tn.forwardServiceRegistration bool true
area.lan.host.tn.forwardProtocolRegistration bool true
area.lan.host.at.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.lan.host.at.forwardServiceRegistration bool true
area.lan.host.at.forwardProtocolRegistration bool true
area.router.status.initialStatus string "UP"

TODO @signal, @statistic

area.router.pcapRecorder.verbose bool true

whether to log packets on the module output

area.router.pcapRecorder.pcapFile string ""

the PCAP file to be written

area.router.pcapRecorder.fileFormat string "pcapng"
area.router.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

area.router.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

area.router.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

space-separated list of sibling module names to listen on

area.router.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

area.router.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

area.router.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

area.router.pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

area.router.pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

area.router.pcapRecorder.alwaysFlush bool false

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

area.router.pcapRecorder.displayStringTextFormat string "rec: %n pks"
area.router.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

area.router.cb.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.router.cb.forwardServiceRegistration bool true
area.router.cb.forwardProtocolRegistration bool true
area.router.bl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.router.bl.forwardServiceRegistration bool true
area.router.bl.forwardProtocolRegistration bool true
area.router.li.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.router.li.forwardServiceRegistration bool true
area.router.li.forwardProtocolRegistration bool true
area.router.eth.bitrate double
area.router.nl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.router.nl.forwardServiceRegistration bool true
area.router.nl.forwardProtocolRegistration bool true
area.router.tn.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.router.tn.forwardServiceRegistration bool true
area.router.tn.forwardProtocolRegistration bool true
area.router.at.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

area.router.at.forwardServiceRegistration bool true
area.router.at.forwardProtocolRegistration bool true
area.router.bgp.interfaceTableModule string

The path to the InterfaceTable module

area.router.bgp.routingTableModule string
area.router.bgp.ospfRoutingModule string parent.hasOspf ? "^.ospf" : ""

Source code

network Hierarchical
{
    parameters:
        int columns = default(3);
        int rows = default(3);
    types:
        module LAN
        {
            parameters:
                int numHosts = default(3);
                @display("i=misc/cloud");
            gates:
                inout ethg[];
            submodules:
                switch: EthernetSwitch;
                host[numHosts]: StandardHost;
            connections:
                for i=0..numHosts-1 {
                    host[i].ethg++ <--> Eth100M <--> switch.ethg++;
                }
                for i=0..sizeof(ethg) - 1 {
                    switch.ethg++ <--> ethg++;
                }
        }

        module Area
        {
            parameters:
                int numAreas = default(3);
                @display("i=misc/cloud");
            gates:
                inout ethg[];
            submodules:
                lan[numAreas]: LAN;
                router[numAreas]: Router;
            connections:
                for i=0..numAreas-1 {
                    router[i].ethg++ <--> Eth1G <--> router[(i+1)%numAreas].ethg++ if numAreas > 1;
                    router[i].ethg++ <--> Eth1G <--> lan[i].ethg++;
                }
                router[0].ethg++ <--> ethg++;
        }

    submodules:
        configurator: Ipv4NetworkConfigurator {
            @display("p=100,100;is=s");
            config = xmldoc("hierarchical.xml");
        }
        router[columns*rows]: Router {
            @display("p=250,100,m,$columns,200,200");
        }
        area[columns*rows]: Area;
    connections:
        for i=0..rows-1, for j=0..columns-1 {
            router[i*columns+j].ethg++ <--> Eth100G <--> router[(i+1)*columns+j].ethg++ if i!=rows-1;
            router[i*columns+j].ethg++ <--> Eth100G <--> router[i*columns+j+1].ethg++ if j!=columns-1;
        }
        for i=0..rows*columns-1 {
            router[i].ethg++ <--> Eth100G <--> area[i].ethg++;
        }
}
File: examples/inet/hierarchical/Hierarchical.ned