Compound Module IPv4MediumLAN

Package: inet.examples.inet.ipv4largenet
File: examples/inet/ipv4largenet/IPv4LargeNet.ned

Several hosts and a router on an Ethernet hub and a switch

Router EtherSwitch StandardHost EtherHub 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.

Networks:

Name Type Description
IPv4LargeNet network

A large Ethernet LAN -- see model description

Parameters:

Name Type Default value Description
n int

number of hosts on the switch

h int

number of hosts on the hub

Properties:

Name Value Description
display i=old/cloud_s

Gates:

Name Direction Size Description
ethg inout

Unassigned submodule parameters:

Name Type Default value Description
router.status.initialStatus string "UP"

TODO @signal, @statistic

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

whether to display IP addresses on links

router.pcapRecorder.verbose bool false

whether to log packets on the module output

router.pcapRecorder.pcapFile string ""

the PCAP file to be written

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[*] ext[*]"

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.alwaysFlush bool false

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

router.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

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

The path to the InterfaceTable module

router.bgp.routingTableModule string
router.bgp.ospfRoutingModule string hasOSPF ? "^.ospf" : ""
router.bgp.dataTransferMode string
switch.status.initialStatus string "UP"

TODO @signal, @statistic

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

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

switch.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

switch.macTable.agingTime double
switch.macTable.addressTableFile string
switch.stp.helloTime double
switch.stp.forwardDelay double
switch.stp.maxAge double
switch.stp.bridgePriority int
switch.stp.visualize bool
host.status.initialStatus string "UP"

TODO @signal, @statistic

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

whether to display IP addresses on links

host.pcapRecorder.verbose bool false

whether to log packets on the module output

host.pcapRecorder.pcapFile string ""

the PCAP file to be written

host.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

host.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

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

space-separated list of sibling module names to listen on

host.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

host.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

host.pcapRecorder.alwaysFlush bool false

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

host.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

host.lo0.lo.mtu int 4470B
hhost.status.initialStatus string "UP"

TODO @signal, @statistic

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

whether to display IP addresses on links

hhost.pcapRecorder.verbose bool false

whether to log packets on the module output

hhost.pcapRecorder.pcapFile string ""

the PCAP file to be written

hhost.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

hhost.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

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

space-separated list of sibling module names to listen on

hhost.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

hhost.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

hhost.pcapRecorder.alwaysFlush bool false

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

hhost.lo0.lo.interfaceTableModule string

The path to the InterfaceTable module

hhost.lo0.lo.mtu int 4470B

Source code:

//
// Several hosts and a router on an Ethernet hub and a switch
//
module IPv4MediumLAN
{
    parameters:
        int n; // number of hosts on the switch
        int h; // number of hosts on the hub
        @display("i=old/cloud_s");
    gates:
        inout ethg;
    submodules:
        router: Router {
            @display("is=s");
        }
        switch: EtherSwitch {
            @display("is=s");
        }
        host[n]: StandardHost {
            @display("is=s");
        }
        hub: EtherHub {
            @display("is=s");
        }
        hhost[h]: StandardHost {
            @display("is=s");
        }
    connections:
        for i=0..n-1 {
            switch.ethg++ <--> cable <--> host[i].ethg++;
        }

        switch.ethg++ <--> cable <--> router.ethg++;
        router.ethg++ <--> ethg;

        for i=0..h-1 {
            hub.ethg++ <--> cable <--> hhost[i].ethg++;
        }

        router.ethg++ <--> cable <--> hub.ethg++;

}