HostsWithSwitch

Package: inet.tests.ethernet

HostsWithSwitch

network

(no description)

hostA : EthernetHost2

An example host with one Ethernet interface and an Ethernet traffic generator directly connected to...

Source:
hostA: EthernetHost2 {
    parameters:
        @display("p=113,43");
} hostB : EthernetHost2

An example host with one Ethernet interface and an Ethernet traffic generator directly connected to...

Source:
hostB: EthernetHost2 {
    parameters:
        @display("p=106,136");
} hostC : EthernetHost2

An example host with one Ethernet interface and an Ethernet traffic generator directly connected to...

Source:
hostC: EthernetHost2 {
    parameters:
        @display("p=397,68");
} switch : EthernetSwitch

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

Source:
switch: EthernetSwitch {
    parameters:
        @display("p=260,79");
}

Usage diagram

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

Properties

Name Value Description
isNetwork
display bgl=2

Unassigned submodule parameters

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

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

hostA.app.destAddress string ""

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

hostA.app.interfaceTableModule string
hostA.app.ssap int -1

Llc ssap to set on outgoing packets

hostA.app.dsap int -1

Llc dsap to set on outgoing packets

hostA.app.startTime double this.sendInterval

Time of sending the first packet

hostA.app.stopTime double -1s

Time of finishing sending, negative values mean forever

hostA.app.sendInterval double

Interval between sending bursts

hostA.app.numPacketsPerBurst int 1

Number of packets to send per burst (packets within a burst are sent at the same simulation time)

hostA.app.packetLength int

Length of packets to send

hostA.app.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation finished

hostA.app.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

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.eth.bitrate double
hostB.app.displayStringTextFormat string ""

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

hostB.app.destAddress string ""

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

hostB.app.interfaceTableModule string
hostB.app.ssap int -1

Llc ssap to set on outgoing packets

hostB.app.dsap int -1

Llc dsap to set on outgoing packets

hostB.app.startTime double this.sendInterval

Time of sending the first packet

hostB.app.stopTime double -1s

Time of finishing sending, negative values mean forever

hostB.app.sendInterval double

Interval between sending bursts

hostB.app.numPacketsPerBurst int 1

Number of packets to send per burst (packets within a burst are sent at the same simulation time)

hostB.app.packetLength int

Length of packets to send

hostB.app.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation finished

hostB.app.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

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.eth.bitrate double
hostC.app.displayStringTextFormat string ""

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

hostC.app.destAddress string ""

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

hostC.app.interfaceTableModule string
hostC.app.ssap int -1

Llc ssap to set on outgoing packets

hostC.app.dsap int -1

Llc dsap to set on outgoing packets

hostC.app.startTime double this.sendInterval

Time of sending the first packet

hostC.app.stopTime double -1s

Time of finishing sending, negative values mean forever

hostC.app.sendInterval double

Interval between sending bursts

hostC.app.numPacketsPerBurst int 1

Number of packets to send per burst (packets within a burst are sent at the same simulation time)

hostC.app.packetLength int

Length of packets to send

hostC.app.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation finished

hostC.app.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

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.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 HostsWithSwitch
{
    @display("bgl=2");
    submodules:
        hostA: EthernetHost2 {
            parameters:
                @display("p=113,43");
        }
        hostB: EthernetHost2 {
            parameters:
                @display("p=106,136");
        }
        hostC: EthernetHost2 {
            parameters:
                @display("p=397,68");
        }
        switch: EthernetSwitch {
            parameters:
                @display("p=260,79");
        }
    connections:
        hostA.ethg <--> DatarateChannel <--> switch.ethg++;
        hostB.ethg <--> DatarateChannel <--> switch.ethg++;
        hostC.ethg <--> DatarateChannel <--> switch.ethg++;
}
File: tests/networks/ethernet/network-switch.ned