Compound Module SwitchedLAN

File: Examples/Ethernet/LANs/Networks.ned

Sample Ethernet LAN: four hosts connected to a switch.

hostA: EtherHost hostB: EtherHost hostC: EtherHost hostD: EtherHost switch: EtherSwitch

Usage diagram:

The following diagram shows usage relationships between modules, networks and channels. Unresolved module (and channel) types are missing from the diagram. Click here to see the full picture.

Contains the following modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

EtherHost

Example host model with one Ethernet port and several traffic generators to create traffic in the test network.

EtherSwitch

Model of an Ethernet switch.

Networks:

switchedLAN (no description)

Unassigned submodule parameters:

Name Type Description
hostA.cli.destStation string

module path name of destination station (must be blank if destAddress is given)

hostA.cli.destAddress string

destination MAC address (must be blank if destStation is given)

hostA.cli.waitTime numeric

interarrival time between sending requests; may be random value

hostA.cli.reqLength numeric

length of request packets (bytes); may be random value

hostA.cli.respLength numeric

length of response packets (bytes); may be random value

hostA.cli.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostA.srv.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostA.llc.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostA.mac.promiscuous bool

if true, all packets are received, otherwise only the ones with matching destination MAC address

hostA.mac.address string

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

hostA.mac.txrate numeric

maximum data rate supported by this station (bit/s); actually chosen speed may be lower due to auto- configuration. 0 means fully auto-configured.

hostA.mac.duplexEnabled bool

whether duplex mode can be enabled or not; whether MAC will actually use duplex mode depends on the result of the auto-configuration process (duplex is only possible with DTE-to-DTE connection).

hostA.mac.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostB.cli.destStation string

module path name of destination station (must be blank if destAddress is given)

hostB.cli.destAddress string

destination MAC address (must be blank if destStation is given)

hostB.cli.waitTime numeric

interarrival time between sending requests; may be random value

hostB.cli.reqLength numeric

length of request packets (bytes); may be random value

hostB.cli.respLength numeric

length of response packets (bytes); may be random value

hostB.cli.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostB.srv.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostB.llc.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostB.mac.promiscuous bool

if true, all packets are received, otherwise only the ones with matching destination MAC address

hostB.mac.address string

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

hostB.mac.txrate numeric

maximum data rate supported by this station (bit/s); actually chosen speed may be lower due to auto- configuration. 0 means fully auto-configured.

hostB.mac.duplexEnabled bool

whether duplex mode can be enabled or not; whether MAC will actually use duplex mode depends on the result of the auto-configuration process (duplex is only possible with DTE-to-DTE connection).

hostB.mac.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostC.cli.destStation string

module path name of destination station (must be blank if destAddress is given)

hostC.cli.destAddress string

destination MAC address (must be blank if destStation is given)

hostC.cli.waitTime numeric

interarrival time between sending requests; may be random value

hostC.cli.reqLength numeric

length of request packets (bytes); may be random value

hostC.cli.respLength numeric

length of response packets (bytes); may be random value

hostC.cli.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostC.srv.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostC.llc.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostC.mac.promiscuous bool

if true, all packets are received, otherwise only the ones with matching destination MAC address

hostC.mac.address string

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

hostC.mac.txrate numeric

maximum data rate supported by this station (bit/s); actually chosen speed may be lower due to auto- configuration. 0 means fully auto-configured.

hostC.mac.duplexEnabled bool

whether duplex mode can be enabled or not; whether MAC will actually use duplex mode depends on the result of the auto-configuration process (duplex is only possible with DTE-to-DTE connection).

hostC.mac.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostD.cli.destStation string

module path name of destination station (must be blank if destAddress is given)

hostD.cli.destAddress string

destination MAC address (must be blank if destStation is given)

hostD.cli.waitTime numeric

interarrival time between sending requests; may be random value

hostD.cli.reqLength numeric

length of request packets (bytes); may be random value

hostD.cli.respLength numeric

length of response packets (bytes); may be random value

hostD.cli.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostD.srv.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostD.llc.writeScalars bool

enable/disable recording statistics in omnetpp.sca

hostD.mac.promiscuous bool

if true, all packets are received, otherwise only the ones with matching destination MAC address

hostD.mac.address string

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

hostD.mac.txrate numeric

maximum data rate supported by this station (bit/s); actually chosen speed may be lower due to auto- configuration. 0 means fully auto-configured.

hostD.mac.duplexEnabled bool

whether duplex mode can be enabled or not; whether MAC will actually use duplex mode depends on the result of the auto-configuration process (duplex is only possible with DTE-to-DTE connection).

hostD.mac.writeScalars bool

enable/disable recording statistics in omnetpp.sca

switch.relayUnitType string

type of the MACRelayUnit; currently possible values are MACRelayUnitNP and MACRelayUnitPP

switch.relayUnit.addressTableFile string

set to empty string if not used

switch.relayUnit.addressTableSize numeric

max size of address table

switch.relayUnit.agingTime numeric

max idle time for address table entries (if expires, entry is removed from the table)

switch.mac[*].address string

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

switch.mac[*].txrate numeric

maximum data rate supported by this station (bit/s); actually chosen speed may be lower due to auto- configuration. 0 means fully auto-configured.

switch.mac[*].duplexEnabled bool

whether duplex mode can be enabled or not; whether MAC will actually use duplex mode depends on the result of the auto-configuration process (duplex is only possible with DTE-to-DTE connection).

switch.mac[*].writeScalars bool

enable/disable recording statistics in omnetpp.sca

Source code:

module SwitchedLAN
    submodules:
        hostA: EtherHost;
            display: "p=161,55;i=device/server";
        hostB: EtherHost;
            display: "p=253,125;i=device/pc2";
        hostC: EtherHost;
            display: "p=158,199;i=device/pc2";
        hostD: EtherHost;
            display: "p=59,127;i=device/pc2";
        switch: EtherSwitch;
            gatesizes:
                in[4],
                out[4];
            display: "p=162,124;i=switch2";
    connections:
        switch.out[0] --> delay 0.1us --> hostA.in;
        switch.in[0] <-- delay 0.1us <-- hostA.out;
        switch.out[1] --> delay 0.1us --> hostB.in;
        switch.in[1] <-- delay 0.1us <-- hostB.out;
        switch.out[2] --> delay 0.1us --> hostC.in;
        switch.in[2] <-- delay 0.1us <-- hostC.out;
        switch.out[3] --> delay 0.1us --> hostD.in;
        switch.in[3] <-- delay 0.1us <-- hostD.out;
endmodule