Compound Module LargeLAN

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

Several hosts and an Ethernet hub on a switch. One port of the hub connect to a 10Base2 segment.

EtherSwitch EtherHost EtherHub EtherHost EtherBus EtherHost

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Networks:

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

b int

number of hosts on the bus

Properties:

Name Value Description
display i=cloud

Gates:

Name Direction Size Description
ethg inout

Unassigned submodule parameters:

Name Type Default value Description
switch.relayUnit.addressTableFile string

set to empty string if not used

switch.relayUnit.addressTableSize int

max size of address table

switch.relayUnit.agingTime double

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

switch.mac.address string "auto"

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 double 100Mbps

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 true

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.txQueueLimit int 1000

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

switch.mac.mtu int 1500
host.cli.destAddress string ""

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

host.cli.startTime double this.waitTime

time of sending the first request

host.cli.waitTime double uniform(0s,1s)

interval between sending requests

host.cli.reqLength int 100B

length of request packets

host.cli.respLength int 1KB

length of response packets

host.mac.promiscuous bool false

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

host.mac.address string "auto"

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 double 100Mbps

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 true

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.txQueueLimit int 1000

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

host.mac.mtu int 1500
hhost.cli.destAddress string ""

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

hhost.cli.startTime double this.waitTime

time of sending the first request

hhost.cli.waitTime double uniform(0s,1s)

interval between sending requests

hhost.cli.reqLength int 100B

length of request packets

hhost.cli.respLength int 1KB

length of response packets

hhost.mac.promiscuous bool false

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

hhost.mac.address string "auto"

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.txrate double 100Mbps

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

hhost.mac.duplexEnabled bool true

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

hhost.mac.txQueueLimit int 1000

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

hhost.mac.mtu int 1500
bhost.cli.destAddress string ""

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

bhost.cli.startTime double this.waitTime

time of sending the first request

bhost.cli.waitTime double uniform(0s,1s)

interval between sending requests

bhost.cli.reqLength int 100B

length of request packets

bhost.cli.respLength int 1KB

length of response packets

bhost.mac.promiscuous bool false

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

bhost.mac.address string "auto"

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

bhost.mac.txrate double 100Mbps

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

bhost.mac.duplexEnabled bool true

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

bhost.mac.txQueueLimit int 1000

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

bhost.mac.mtu int 1500

Source code:

//
// Several hosts and an Ethernet hub on a switch. One port of the hub
// connect to a 10Base2 segment.
//
module LargeLAN
{
    parameters:
        int n; // number of hosts on the switch
        int h; // number of hosts on the hub
        int b; // number of hosts on the bus
        @display("i=cloud");
    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");
        }
        bus: EtherBus {
            parameters:
                positions = "5 10 15"; // every 5 meters
                propagationSpeed = 2e8 mps;  // 1us = 200m
                @display("b=424,6;o=#408060");
        }
        bhost[b]: EtherHost {
            parameters:
                @display("is=s;p=,,r");
        }
    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++;

        for i=0..b-1 {
            bus.ethg++ <--> bhost[i].ethg;
        }

        bus.ethg++ <--> hub.ethg++;

}