Compound Module TwoHosts

File: Examples/Ethernet/LANs/Networks.ned

Sample Ethernet LAN: two hosts directly connected to each other via twisted pair.

hostA: EtherHost hostB: EtherHost

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.

Networks:

twoHosts (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

Source code:

module TwoHosts
    submodules:
        hostA: EtherHost;
            display: "p=60,160;i=device/pc2";
        hostB: EtherHost;
            display: "p=200,140;i=device/pc2";
    connections:
        hostA.out --> delay 0.5us --> hostB.in;
        hostB.out --> delay 0.5us --> hostA.in;
endmodule