Network MixedLAN

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

Sample Ethernet LAN containing eight hosts, a switch and a bus.

EtherBus EtherHost EtherHost EtherHost EtherHost EtherHost EtherHost EtherHost EtherHost EtherSwitch EtherHost EtherHost EtherHost EtherHub

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.

Properties:

Name Value Description
isNetwork

Unassigned submodule parameters:

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

TODO @signal, @statistic

busHostA.cli.destAddress string ""

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

busHostA.cli.startTime double this.sendInterval

time of sending the first request

busHostA.cli.stopTime double -1s

time of finishing sending, negative values mean forever

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

interval between sending requests

busHostA.cli.reqLength int 100B

length of request packets

busHostA.cli.respLength int 1KiB

length of response packets

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

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

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

busHostA.mac.duplexMode bool

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

busHostA.mac.txQueueLimit int

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

busHostA.mac.mtu int
busHostB.status.initialStatus string "UP"

TODO @signal, @statistic

busHostB.cli.destAddress string ""

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

busHostB.cli.startTime double this.sendInterval

time of sending the first request

busHostB.cli.stopTime double -1s

time of finishing sending, negative values mean forever

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

interval between sending requests

busHostB.cli.reqLength int 100B

length of request packets

busHostB.cli.respLength int 1KiB

length of response packets

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

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

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

busHostB.mac.duplexMode bool

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

busHostB.mac.txQueueLimit int

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

busHostB.mac.mtu int
busHostC.status.initialStatus string "UP"

TODO @signal, @statistic

busHostC.cli.destAddress string ""

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

busHostC.cli.startTime double this.sendInterval

time of sending the first request

busHostC.cli.stopTime double -1s

time of finishing sending, negative values mean forever

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

interval between sending requests

busHostC.cli.reqLength int 100B

length of request packets

busHostC.cli.respLength int 1KiB

length of response packets

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

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

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

busHostC.mac.duplexMode bool

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

busHostC.mac.txQueueLimit int

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

busHostC.mac.mtu int
busHostD.status.initialStatus string "UP"

TODO @signal, @statistic

busHostD.cli.destAddress string ""

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

busHostD.cli.startTime double this.sendInterval

time of sending the first request

busHostD.cli.stopTime double -1s

time of finishing sending, negative values mean forever

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

interval between sending requests

busHostD.cli.reqLength int 100B

length of request packets

busHostD.cli.respLength int 1KiB

length of response packets

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

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

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

busHostD.mac.duplexMode bool

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

busHostD.mac.txQueueLimit int

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

busHostD.mac.mtu int
switchHostA.status.initialStatus string "UP"

TODO @signal, @statistic

switchHostA.cli.destAddress string ""

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

switchHostA.cli.startTime double this.sendInterval

time of sending the first request

switchHostA.cli.stopTime double -1s

time of finishing sending, negative values mean forever

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

interval between sending requests

switchHostA.cli.reqLength int 100B

length of request packets

switchHostA.cli.respLength int 1KiB

length of response packets

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

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

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

switchHostA.mac.duplexMode bool

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

switchHostA.mac.txQueueLimit int

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

switchHostA.mac.mtu int
switchHostB.status.initialStatus string "UP"

TODO @signal, @statistic

switchHostB.cli.destAddress string ""

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

switchHostB.cli.startTime double this.sendInterval

time of sending the first request

switchHostB.cli.stopTime double -1s

time of finishing sending, negative values mean forever

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

interval between sending requests

switchHostB.cli.reqLength int 100B

length of request packets

switchHostB.cli.respLength int 1KiB

length of response packets

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

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

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

switchHostB.mac.duplexMode bool

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

switchHostB.mac.txQueueLimit int

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

switchHostB.mac.mtu int
switchHostC.status.initialStatus string "UP"

TODO @signal, @statistic

switchHostC.cli.destAddress string ""

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

switchHostC.cli.startTime double this.sendInterval

time of sending the first request

switchHostC.cli.stopTime double -1s

time of finishing sending, negative values mean forever

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

interval between sending requests

switchHostC.cli.reqLength int 100B

length of request packets

switchHostC.cli.respLength int 1KiB

length of response packets

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

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

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

switchHostC.mac.duplexMode bool

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

switchHostC.mac.txQueueLimit int

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

switchHostC.mac.mtu int
switchHostD.status.initialStatus string "UP"

TODO @signal, @statistic

switchHostD.cli.destAddress string ""

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

switchHostD.cli.startTime double this.sendInterval

time of sending the first request

switchHostD.cli.stopTime double -1s

time of finishing sending, negative values mean forever

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

interval between sending requests

switchHostD.cli.reqLength int 100B

length of request packets

switchHostD.cli.respLength int 1KiB

length of response packets

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

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

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

switchHostD.mac.duplexMode bool

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

switchHostD.mac.txQueueLimit int

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

switchHostD.mac.mtu int
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
hubHostA.status.initialStatus string "UP"

TODO @signal, @statistic

hubHostA.cli.destAddress string ""

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

hubHostA.cli.startTime double this.sendInterval

time of sending the first request

hubHostA.cli.stopTime double -1s

time of finishing sending, negative values mean forever

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

interval between sending requests

hubHostA.cli.reqLength int 100B

length of request packets

hubHostA.cli.respLength int 1KiB

length of response packets

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

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

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

hubHostA.mac.duplexMode bool

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

hubHostA.mac.txQueueLimit int

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

hubHostA.mac.mtu int
hubHostB.status.initialStatus string "UP"

TODO @signal, @statistic

hubHostB.cli.destAddress string ""

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

hubHostB.cli.startTime double this.sendInterval

time of sending the first request

hubHostB.cli.stopTime double -1s

time of finishing sending, negative values mean forever

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

interval between sending requests

hubHostB.cli.reqLength int 100B

length of request packets

hubHostB.cli.respLength int 1KiB

length of response packets

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

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

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

hubHostB.mac.duplexMode bool

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

hubHostB.mac.txQueueLimit int

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

hubHostB.mac.mtu int
hubHostC.status.initialStatus string "UP"

TODO @signal, @statistic

hubHostC.cli.destAddress string ""

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

hubHostC.cli.startTime double this.sendInterval

time of sending the first request

hubHostC.cli.stopTime double -1s

time of finishing sending, negative values mean forever

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

interval between sending requests

hubHostC.cli.reqLength int 100B

length of request packets

hubHostC.cli.respLength int 1KiB

length of response packets

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

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

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

hubHostC.mac.duplexMode bool

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

hubHostC.mac.txQueueLimit int

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

hubHostC.mac.mtu int

Source code:

//
// Sample Ethernet LAN containing eight hosts, a switch and a bus.
//
network MixedLAN
{
    types:
        channel C extends ThruputMeteringChannel
        {
            delay = 01us;
            datarate = 100Mbps;
        }
    submodules:
        bus: EtherBus {
            parameters:
                positions = "10 20 24 35 40 48";
                propagationSpeed = 2e8 mps; // 1us = 200m
                @display("p=277,182;b=424,6;o=#408060");
            gates:
                ethg[6];
        }
        busHostA: EtherHost {
            parameters:
                @display("p=122,118");
        }
        busHostB: EtherHost {
            parameters:
                @display("p=210,118");
        }
        busHostC: EtherHost {
            parameters:
                @display("p=338,238");
        }
        busHostD: EtherHost {
            parameters:
                @display("p=426,238");
        }
        switchHostA: EtherHost {
            parameters:
                @display("p=82,300");
        }
        switchHostB: EtherHost {
            parameters:
                @display("p=162,300");
        }
        switchHostC: EtherHost {
            parameters:
                @display("p=234,300");
        }
        switchHostD: EtherHost {
            parameters:
                @display("p=306,300");
        }
        switch: EtherSwitch {
            parameters:
                @display("p=194,236");
            gates:
                ethg[5];
        }
        hubHostA: EtherHost {
            parameters:
                @display("p=297,55");
        }
        hubHostB: EtherHost {
            parameters:
                @display("p=365,55");
        }
        hubHostC: EtherHost {
            parameters:
                @display("p=430,55");
        }
        hub: EtherHub {
            parameters:
                @display("p=362,132");
            gates:
                ethg[4];
        }
    connections:
        bus.ethg[0] <--> C <--> busHostA.ethg;
        bus.ethg[1] <--> C <--> busHostB.ethg;
        bus.ethg[2] <--> C <--> switch.ethg[4];
        bus.ethg[3] <--> C <--> busHostC.ethg;
        bus.ethg[4] <--> C <--> hub.ethg[3];
        bus.ethg[5] <--> C <--> busHostD.ethg;

        switch.ethg[0] <--> C <--> switchHostA.ethg;
        switch.ethg[1] <--> C <--> switchHostB.ethg;
        switch.ethg[2] <--> C <--> switchHostC.ethg;
        switch.ethg[3] <--> C <--> switchHostD.ethg;

        hub.ethg[0] <--> {  delay = 0.1us; datarate = 100Mbps; } <--> hubHostA.ethg;
        hub.ethg[1] <--> {  delay = 0.3us; datarate = 100Mbps; } <--> hubHostB.ethg;
        hub.ethg[2] <--> {  delay = 0.2us; datarate = 100Mbps; } <--> hubHostC.ethg;
}