Prototype for modules providing Ethernet switch functionality. These modules handle the mapping between ports and MAC addresses, and forward frames (EtherFrame) to appropriate ports.
Functions:
Address caching is modeled by a fixed-size lookup table. When the table is full, the oldest address is kicked out of the cache.
Entries are also deleted if their age exceeds a certain limit.
If needed, address tables can be pre-loaded from text files at the beginning of the simulation; this controlled by the addressTableFile module parameter.
This module is not a concrete implementation, it just defines gates and parameters a MACRelayUnit should have. Concrete inplementations add capacity and performance aspects to the model (number of frames processed per second, amount of memory available in the switch, etc.) C++ implementations can subclass from the class MACRelayUnitBase.
Known implementations are MACRelayUnitNP and MACRelayUnitPP.
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Name | Type | Description |
---|---|---|
EtherSwitch | compound module |
Model of an Ethernet switch. |
EtherSwitch2 | compound module |
Model of an Ethernet switch built with EtherMAC2, which means that all ports are operating in strictly full-duplex mode. Use EtherSwitch if you need half-duplex operation on some ports. |
WirelessAPWithEth | compound module |
Models a 802.11 Access Point with Ethernet ports. It can be used in conjunction with WirelessHost, or any other host model containing WirelessNicSTA. |
WirelessAPWithEthSimplified | compound module |
Models a 802.11 Access Point with Ethernet ports, but using a simplified NIC that does not support handovers. It can be used in conjunction with WirelessHostSimplified, or any other host model containing WirelessNicSTASimplified. |
Name | Type | Default value | Description |
---|---|---|---|
addressTableFile | string |
set to empty string if not used |
|
addressTableSize | int |
max size of address table |
|
agingTime | double |
max idle time for address table entries (when it expires, entry is removed from the table) |
Name | Value | Description |
---|---|---|
display | i=block/switch |
// // Prototype for modules providing Ethernet switch functionality. // These modules handle the mapping between ports and MAC addresses, // and forward frames (EtherFrame) to appropriate ports. // // Functions: // - relays frames based on their dest MAC addresses (dest-->port mapping) // - models finite buffer size (drops) and finite processing power (latency, queueing) // // Address caching is modeled by a fixed-size lookup table. // When the table is full, the oldest address is kicked out of the cache. // // Entries are also deleted if their age exceeds a certain limit. // // If needed, address tables can be pre-loaded from text files at the beginning // of the simulation; this controlled by the addressTableFile module parameter. // // This module is not a concrete implementation, it just defines gates and // parameters a MACRelayUnit should have. Concrete inplementations add // capacity and performance aspects to the model (number of frames processed // per second, amount of memory available in the switch, etc.) // C++ implementations can subclass from the class <tt>MACRelayUnitBase</tt>. // // Known implementations are MACRelayUnitNP and MACRelayUnitPP. // moduleinterface MACRelayUnit { parameters: string addressTableFile; // set to empty string if not used int addressTableSize; // max size of address table double agingTime @unit("s"); // max idle time for address table entries // (when it expires, entry is removed from the table) @display("i=block/switch"); gates: input lowerLayerIn[] @labels(EtherFrame); output lowerLayerOut[] @labels(EtherFrame); }