Compound Module MediumLAN

Package: inet.examples.ethernet.lans
File: examples/ethernet/lans/LargeNet.ned

Several hosts and an Ethernet hub on a switch; part of LargeNet(1,2).

EtherSwitch EtherHost EtherHub EtherHost

Usage diagram:

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

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Networks:

Name Type Description
LargeNet network

A large Ethernet LAN -- see model description here.

Parameters:

Name Type Default value Description
n int

number of hosts on the switch

h int

number of hosts on the hub

Properties:

Name Value Description
display i=old/cloud_s

Gates:

Name Direction Size Description
ethg inout

Unassigned submodule parameters:

Name Type Default value Description
switch.status.initialStatus string "UP"

TODO @signal, @statistic

switch.l2NodeConfigurator.interfaceTableModule string
switch.l2NodeConfigurator.l2ConfiguratorModule string "l2NetworkConfigurator"

the absolute path to the L2NetworkConfigurator; use "" if there is no configurator

switch.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

switch.macTable.agingTime double
switch.macTable.addressTableFile string
switch.stp.helloTime double
switch.stp.forwardDelay double
switch.stp.maxAge double
switch.stp.bridgePriority int
switch.stp.visualize bool
host.status.initialStatus string "UP"

TODO @signal, @statistic

host.cli.destAddress string ""

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

host.cli.startTime double this.sendInterval

time of sending the first request

host.cli.stopTime double -1s

time of finishing sending, negative values mean forever

host.cli.localSAP int 0xf0
host.cli.remoteSAP int 0xf1
host.cli.sendInterval double uniform(0s,1s)

interval between sending requests

host.cli.reqLength int 100B

length of request packets

host.cli.respLength int 1KiB

length of response packets

host.srv.localSAP int 0xf1
host.queue.pauseQueue.frameCapacity int 100
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.duplexMode bool

selects full-duplex (true) or half-duplex (false) operation

host.mac.txQueueLimit int

maximum number of frames queued up for transmission; additional frames are dropped. Only used if queueModule==""

host.mac.mtu int
hhost.status.initialStatus string "UP"

TODO @signal, @statistic

hhost.cli.destAddress string ""

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

hhost.cli.startTime double this.sendInterval

time of sending the first request

hhost.cli.stopTime double -1s

time of finishing sending, negative values mean forever

hhost.cli.localSAP int 0xf0
hhost.cli.remoteSAP int 0xf1
hhost.cli.sendInterval double uniform(0s,1s)

interval between sending requests

hhost.cli.reqLength int 100B

length of request packets

hhost.cli.respLength int 1KiB

length of response packets

hhost.srv.localSAP int 0xf1
hhost.queue.pauseQueue.frameCapacity int 100
hhost.mac.promiscuous bool

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

hhost.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.

hhost.mac.duplexMode bool

selects full-duplex (true) or half-duplex (false) operation

hhost.mac.txQueueLimit int

maximum number of frames queued up for transmission; additional frames are dropped. Only used if queueModule==""

hhost.mac.mtu int

Source code:

//
// Several hosts and an Ethernet hub on a switch; part of ~LargeNet.
//
module MediumLAN
{
    parameters:
        int n; // number of hosts on the switch
        int h; // number of hosts on the hub
        @display("i=old/cloud_s");
    gates:
        inout ethg;
    submodules:
        switch: EtherSwitch {
            @display("is=s");
        }
        host[n]: EtherHost {
            @display("is=s");
        }
        hub: EtherHub {
            @display("is=s");
        }
        hhost[h]: EtherHost {
            @display("is=s");
        }
    connections:
        for i=0..n-1 {
            switch.ethg++ <--> cable <--> host[i].ethg;
        }

        switch.ethg++ <--> ethg;

        for i=0..h-1 {
            hub.ethg++ <--> cable <--> hhost[i].ethg;
        }

        switch.ethg++ <--> cable <--> hub.ethg++;

}