Compound Module SmallLAN

File: Examples/Ethernet/LANs/LargeNet.ned

Several hosts on an Ethernet hub

hub: EtherHub host: 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.

EtherHub

A generic wiring hub model.

Contains the following channels:

cable (no description)

Used in compound modules:

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

LargeNet

A large Ethernet LAN -- see model description here.

Parameters:

Name Type Description
h numeric const

number of hosts on the hub

Gates:

Name Direction Description
in input
out output

Unassigned submodule parameters:

Name Type Description
hub.writeScalars bool

enable/disable recording statistics in omnetpp.sca

host[*].cli.destStation string

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

host[*].cli.destAddress string

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

host[*].cli.waitTime numeric

interarrival time between sending requests; may be random value

host[*].cli.reqLength numeric

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

host[*].cli.respLength numeric

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

host[*].cli.writeScalars bool

enable/disable recording statistics in omnetpp.sca

host[*].srv.writeScalars bool

enable/disable recording statistics in omnetpp.sca

host[*].llc.writeScalars bool

enable/disable recording statistics in omnetpp.sca

host[*].mac.promiscuous bool

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

host[*].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.

host[*].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.

host[*].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).

host[*].mac.writeScalars bool

enable/disable recording statistics in omnetpp.sca

Source code:

module SmallLAN
    parameters:
        h: numeric const; // number of hosts on the hub
    gates:
        in: in;
        out: out;
    submodules:
        hub: EtherHub;
            display: "i=device/switch";
        host: EtherHost[h];
            display: "i=device/pc2_s";
    connections:
        for i=0..h-1 do
            hub.out++ --> cable --> host[i].in;
            hub.in++ <-- cable <-- host[i].out;
        endfor
        hub.out++ --> out;
        hub.in++ <-- in;
endmodule