File: Examples/Ethernet/LANs/EtherHost.ned
Example host model with one Ethernet port and several traffic generators to create traffic in the test network.
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.
If a module type shows up more than once, that means it has been defined in more than one NED file.
EtherAppCli | Simple traffic generator for the Ethernet model; generates EtherAppReq packets. It should be connected directly to EtherLLC. |
EtherAppSrv | Server side of the EtherCli model -- generates EtherAppResp packets with the number of bytes requested by the client in EtherAppReq. It should be connected directly to EtherLLC. |
EtherLLC | Provides Ethernet 802.3 encapsulation/decapsulation and dispatching to the appropriate higher layer by DSAP values. |
EtherMAC | Ethernet MAC layer. MAC performs transmission and reception of frames. Doesn't do encapsulation/decapsulation; see EtherLLC and EtherEncap for that. Also does not perform interface registration in RoutingTable -- that task is delegated to ARP, which makes it possible to use EtherMAC independent of the IP framework. |
If a module type shows up more than once, that means it has been defined in more than one NED file.
MixedLAN | Sample Ethernet LAN containing eight hosts, a switch and a bus. |
TwoHosts | Sample Ethernet LAN: two hosts directly connected to each other via twisted pair. |
SwitchedLAN | Sample Ethernet LAN: four hosts connected to a switch. |
HubLAN | Sample Ethernet LAN: four hosts connected by a hub. |
BusLAN | Sample Ethernet LAN: four hosts on a bus. |
SmallLAN | Several hosts on an Ethernet hub |
MediumLAN | Several hosts and an Ethernet hub on a switch |
LargeLAN | Several hosts and an Ethernet hub on a switch. One port of the hub connect to a 10Base2 segment. |
LargeNet | A large Ethernet LAN -- see model description here. |
Name | Direction | Description |
---|---|---|
in | input | |
out | output |
Name | Type | Description |
---|---|---|
cli.destStation | string | module path name of destination station (must be blank if destAddress is given) |
cli.destAddress | string | destination MAC address (must be blank if destStation is given) |
cli.waitTime | numeric | interarrival time between sending requests; may be random value |
cli.reqLength | numeric | length of request packets (bytes); may be random value |
cli.respLength | numeric | length of response packets (bytes); may be random value |
cli.writeScalars | bool | enable/disable recording statistics in omnetpp.sca |
srv.writeScalars | bool | enable/disable recording statistics in omnetpp.sca |
llc.writeScalars | bool | enable/disable recording statistics in omnetpp.sca |
mac.promiscuous | bool | if true, all packets are received, otherwise only the ones with matching destination MAC address |
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. |
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. |
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). |
mac.writeScalars | bool | enable/disable recording statistics in omnetpp.sca |
module EtherHost gates: in: in; out: out; submodules: cli: EtherAppCli; display: "p=60,60,col"; srv: EtherAppSrv; display: "p=250,60,col"; llc: EtherLLC; gatesizes: upperLayerIn[2], upperLayerOut[2]; display: "p=155,120;i=block/fork"; mac: EtherMAC; parameters: txQueueLimit = 1000, // increase if needed queueModule = ""; display: "p=155,200;i=block/queue;q=queue"; connections: llc.lowerLayerIn <-- mac.upperLayerOut; llc.lowerLayerOut --> mac.upperLayerIn; mac.physIn <-- in; mac.physOut --> out; cli.out --> llc.upperLayerIn[0]; cli.in <-- llc.upperLayerOut[0]; srv.out --> llc.upperLayerIn[1]; srv.in <-- llc.upperLayerOut[1]; endmodule