SwitchedDuplexLAN

Package: inet.examples.ethernet.lans

SwitchedDuplexLAN

network

(no description)

hostA : EthernetHost

A simplified network device that communicates directly over Ethernet without higher layer protocols...

Source:
hostA: EthernetHost {
    parameters:
        csmacdSupport = false;
        eth.duplexMode = true;
        @display("p=250,100");
} hostB : EthernetHost

A simplified network device that communicates directly over Ethernet without higher layer protocols...

Source:
hostB: EthernetHost {
    parameters:
        csmacdSupport = false;
        eth.duplexMode = true;
        @display("p=400,200");
} hostC : EthernetHost

A simplified network device that communicates directly over Ethernet without higher layer protocols...

Source:
hostC: EthernetHost {
    parameters:
        csmacdSupport = false;
        eth.duplexMode = true;
        @display("p=250,300");
} hostD : EthernetHost

A simplified network device that communicates directly over Ethernet without higher layer protocols...

Source:
hostD: EthernetHost {
    parameters:
        csmacdSupport = false;
        eth.duplexMode = true;
        @display("p=100,200");
} switch : EthernetSwitch

EthernetSwitch models a Layer 2 Ethernet switch with support for various IEEE 802.1 protocols and...

Source:
switch: EthernetSwitch {
    parameters:
        @display("p=250,200");
    gates:
        ethg[4];
}

Usage diagram

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

Properties

Name Value Description
isNetwork

Unassigned submodule parameters

Name Type Default value Description
hostA.status.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostA.status.initialStatus string "UP"

TODO @signal, @statistic

hostA.interfaceTable.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostA.interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

hostA.cli.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostA.cli.interfaceTableModule string
hostA.cli.destAddress string ""

Destination MAC address, or module path name of destination station; empty means off

hostA.cli.startTime double this.sendInterval

Time of sending the first request

hostA.cli.stopTime double -1s

Time of finishing sending, negative values mean forever

hostA.cli.localSAP int 0xf0

Local service access point

hostA.cli.remoteSAP int 0xf1

Remote service access point

hostA.cli.sendInterval double uniform(0s,1s)

Interval between sending requests

hostA.cli.reqLength int 100B

Length of request packets

hostA.cli.respLength int 1KiB

Length of response packets

hostA.cli.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation finished

hostA.cli.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

hostA.srv.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostA.srv.localSAP int 0xf1
hostA.srv.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation is finished

hostA.srv.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

hostA.dp.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostA.dp.interfaceTableModule string

Module path to the ~InterfaceTable module

hostA.dp.forwardServiceRegistration bool true
hostA.dp.forwardProtocolRegistration bool true
hostA.dp.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

hostA.dp.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

hostA.dp.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

hostA.li.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostA.li.interfaceTableModule string

Module path to the ~InterfaceTable module

hostA.li.forwardServiceRegistration bool true
hostA.li.forwardProtocolRegistration bool true
hostA.li.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

hostA.li.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

hostA.li.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

hostA.eth.bitrate double
hostB.status.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostB.status.initialStatus string "UP"

TODO @signal, @statistic

hostB.interfaceTable.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostB.interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

hostB.cli.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostB.cli.interfaceTableModule string
hostB.cli.destAddress string ""

Destination MAC address, or module path name of destination station; empty means off

hostB.cli.startTime double this.sendInterval

Time of sending the first request

hostB.cli.stopTime double -1s

Time of finishing sending, negative values mean forever

hostB.cli.localSAP int 0xf0

Local service access point

hostB.cli.remoteSAP int 0xf1

Remote service access point

hostB.cli.sendInterval double uniform(0s,1s)

Interval between sending requests

hostB.cli.reqLength int 100B

Length of request packets

hostB.cli.respLength int 1KiB

Length of response packets

hostB.cli.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation finished

hostB.cli.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

hostB.srv.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostB.srv.localSAP int 0xf1
hostB.srv.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation is finished

hostB.srv.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

hostB.dp.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostB.dp.interfaceTableModule string

Module path to the ~InterfaceTable module

hostB.dp.forwardServiceRegistration bool true
hostB.dp.forwardProtocolRegistration bool true
hostB.dp.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

hostB.dp.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

hostB.dp.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

hostB.li.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostB.li.interfaceTableModule string

Module path to the ~InterfaceTable module

hostB.li.forwardServiceRegistration bool true
hostB.li.forwardProtocolRegistration bool true
hostB.li.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

hostB.li.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

hostB.li.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

hostB.eth.bitrate double
hostC.status.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostC.status.initialStatus string "UP"

TODO @signal, @statistic

hostC.interfaceTable.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostC.interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

hostC.cli.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostC.cli.interfaceTableModule string
hostC.cli.destAddress string ""

Destination MAC address, or module path name of destination station; empty means off

hostC.cli.startTime double this.sendInterval

Time of sending the first request

hostC.cli.stopTime double -1s

Time of finishing sending, negative values mean forever

hostC.cli.localSAP int 0xf0

Local service access point

hostC.cli.remoteSAP int 0xf1

Remote service access point

hostC.cli.sendInterval double uniform(0s,1s)

Interval between sending requests

hostC.cli.reqLength int 100B

Length of request packets

hostC.cli.respLength int 1KiB

Length of response packets

hostC.cli.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation finished

hostC.cli.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

hostC.srv.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostC.srv.localSAP int 0xf1
hostC.srv.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation is finished

hostC.srv.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

hostC.dp.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostC.dp.interfaceTableModule string

Module path to the ~InterfaceTable module

hostC.dp.forwardServiceRegistration bool true
hostC.dp.forwardProtocolRegistration bool true
hostC.dp.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

hostC.dp.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

hostC.dp.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

hostC.li.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostC.li.interfaceTableModule string

Module path to the ~InterfaceTable module

hostC.li.forwardServiceRegistration bool true
hostC.li.forwardProtocolRegistration bool true
hostC.li.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

hostC.li.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

hostC.li.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

hostC.eth.bitrate double
hostD.status.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostD.status.initialStatus string "UP"

TODO @signal, @statistic

hostD.interfaceTable.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostD.interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

hostD.cli.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostD.cli.interfaceTableModule string
hostD.cli.destAddress string ""

Destination MAC address, or module path name of destination station; empty means off

hostD.cli.startTime double this.sendInterval

Time of sending the first request

hostD.cli.stopTime double -1s

Time of finishing sending, negative values mean forever

hostD.cli.localSAP int 0xf0

Local service access point

hostD.cli.remoteSAP int 0xf1

Remote service access point

hostD.cli.sendInterval double uniform(0s,1s)

Interval between sending requests

hostD.cli.reqLength int 100B

Length of request packets

hostD.cli.respLength int 1KiB

Length of response packets

hostD.cli.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation finished

hostD.cli.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

hostD.srv.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostD.srv.localSAP int 0xf1
hostD.srv.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation is finished

hostD.srv.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

hostD.dp.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostD.dp.interfaceTableModule string

Module path to the ~InterfaceTable module

hostD.dp.forwardServiceRegistration bool true
hostD.dp.forwardProtocolRegistration bool true
hostD.dp.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

hostD.dp.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

hostD.dp.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

hostD.li.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

hostD.li.interfaceTableModule string

Module path to the ~InterfaceTable module

hostD.li.forwardServiceRegistration bool true
hostD.li.forwardProtocolRegistration bool true
hostD.li.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

hostD.li.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

hostD.li.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

hostD.eth.bitrate double
switch.macTable.agingTime double
switch.macTable.forwardingTableFile string
switch.interfaceTable.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

switch.interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

switch.status.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

switch.status.initialStatus string "UP"

TODO @signal, @statistic

switch.pcapRecorder.displayStringTextFormat string "rec: %n pks"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

switch.pcapRecorder.verbose bool true

Whether to log packets on the module output

switch.pcapRecorder.recordEmptyPackets bool true

Specifies if zero length packets are recorded or not

switch.pcapRecorder.enableConvertingPackets bool true

Specifies if converting packets to link type is allowed or not

switch.pcapRecorder.pcapFile string ""

The PCAP file to be written, suggested value: pcapFile = "${resultdir}/${configname}-#${runnumber}" + fullpath() + ".pcap"

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

Maximum number of bytes to record per packet

switch.pcapRecorder.timePrecision int 6

Time precision in recorded file. pcap supports only 6 (usec) or 9 (nanosec), pcapng supports more values (see 'if_tsresol' option in pcapng file format).

switch.pcapRecorder.dumpBadFrames bool true

Enable dump of frames with hasBitError

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

Space-separated list of sibling module names to listen on

switch.pcapRecorder.sendingSignalNames string "transmissionEnded"

Space-separated list of outbound packet signals to subscribe to

switch.pcapRecorder.receivingSignalNames string "receptionEnded"

Space-separated list of inbound packet signals to subscribe to

switch.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

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

switch.pcapRecorder.packetFilter object "*"

Which packets are considered, matches all packets by default

switch.pcapRecorder.helpers string ""

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

switch.pcapRecorder.alwaysFlush bool false

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

switch.mrp.ccmInterval double
switch.mrp.mrpRole string
switch.mrp.timingProfile int
switch.mrp.uuid0 int
switch.mrp.uuid1 int
switch.mrp.ringPort1 int
switch.mrp.ringPort2 int
switch.mrp.interconnectionLinkCheckAware bool
switch.mrp.interconnectionRingCheckAware bool
switch.mrp.nonblockingMrcSupported bool
switch.mrp.reactOnLinkChange bool
switch.mrp.visualize bool
switch.stp.helloTime double
switch.stp.forwardDelay double
switch.stp.maxAge double
switch.stp.bridgePriority int
switch.stp.visualize bool
switch.gptp.gptpNodeType string "BRIDGE_NODE"
switch.sc.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

switch.sc.interfaceTableModule string

Module path to the ~InterfaceTable module

switch.sc.forwardServiceRegistration bool true
switch.sc.forwardProtocolRegistration bool true
switch.sc.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

switch.sc.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

switch.sc.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

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

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

switch.cb.interfaceTableModule string

Module path to the ~InterfaceTable module

switch.cb.forwardServiceRegistration bool true
switch.cb.forwardProtocolRegistration bool true
switch.cb.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

switch.cb.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

switch.cb.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

switch.bl.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

switch.bl.interfaceTableModule string

Module path to the ~InterfaceTable module

switch.bl.forwardServiceRegistration bool true
switch.bl.forwardProtocolRegistration bool true
switch.bl.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

switch.bl.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

switch.bl.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

switch.li.displayStringTextFormat string "processed %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

switch.li.interfaceTableModule string

Module path to the ~InterfaceTable module

switch.li.forwardServiceRegistration bool true
switch.li.forwardProtocolRegistration bool true
switch.li.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

switch.li.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

switch.li.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

switch.eth.bitrate double

Source code

network SwitchedDuplexLAN
{
    types:
        channel ethernetline extends DatarateChannel
        {
            parameters:
                delay = 0.1us;
                datarate = 10Mbps;
        }

    submodules:
        hostA: EthernetHost {
            parameters:
                csmacdSupport = false;
                eth.duplexMode = true;
                @display("p=250,100");
        }
        hostB: EthernetHost {
            parameters:
                csmacdSupport = false;
                eth.duplexMode = true;
                @display("p=400,200");
        }
        hostC: EthernetHost {
            parameters:
                csmacdSupport = false;
                eth.duplexMode = true;
                @display("p=250,300");
        }
        hostD: EthernetHost {
            parameters:
                csmacdSupport = false;
                eth.duplexMode = true;
                @display("p=100,200");
        }
        switch: EthernetSwitch {
            parameters:
                @display("p=250,200");
            gates:
                ethg[4];
        }
    connections:
        switch.ethg[0] <--> ethernetline <--> hostA.ethg;
        switch.ethg[1] <--> ethernetline <--> hostB.ethg;
        switch.ethg[2] <--> ethernetline <--> hostC.ethg;
        switch.ethg[3] <--> ethernetline <--> hostD.ethg;
}

File: examples/ethernet/lans/Networks.ned