Model of an Ethernet switch.
The duplexChannel attributes of the MACs must be set according to the medium connected to the port; if collisions are possible (it's a bus or hub) it must be set to false, otherwise it can be set to true. By default used half duples CSMA/CD mac
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 |
---|---|---|
IPv4LargeLAN | compound module |
Several hosts and an Ethernet hub on a switch. One port of the hub connect to a 10Base2 segment. |
IPv4MediumLAN | compound module |
Several hosts and a router on an Ethernet hub and a switch |
LargeLAN | compound module |
Several hosts and an Ethernet hub on a switch. One port of the hub connect to a 10Base2 segment. Part of LargeNet(1,2). |
MediumLAN | compound module |
Several hosts and an Ethernet hub on a switch; part of LargeNet(1,2). |
Name | Type | Description |
---|---|---|
advanced | network | (no description) |
ARPTest | network | (no description) |
BGPTest | network | (no description) |
BGPTest | network | (no description) |
BGPTest | network | (no description) |
BGPTest | network | (no description) |
Complexer | network | (no description) |
ConfiguratorA | network | (no description) |
ConfiguratorC | network | (no description) |
ConfiguratorF | network | (no description) |
DataLinkVisualizerFilteringShowcase | network |
TODO documentation |
DiffservNetwork | network |
This network contains a router with an 10Mbps Ethernet interface, and with a 128kbps dialup connection to a server. |
InterfaceTableVisualizationAdvancedFeaturesShowcase | network | (no description) |
LargeNet | network |
A large Ethernet LAN -- see model description here. |
LargeNet | network | (no description) |
MixedLAN | network |
Sample Ethernet LAN containing eight hosts, a switch and a bus. |
NClients | network | (no description) |
Network | network |
TODO documentation |
Network | network | (no description) |
NetworkPathComplexShowcase | network |
TODO documentation |
NetworkPathRIPShowcase | network |
TODO documentation |
PacketDropQueueOverflowShowcase | network | (no description) |
RoutingTableVisualizationFilteringShowcase | network | (no description) |
SwitchedLAN | network |
Sample Ethernet LAN: four hosts connected to a switch. |
SwitchNetwork | network | (no description) |
TransportConnectionVisualizationMultipleConnectionsShowcase | network | (no description) |
TransportPathVisualizerExtendedShowcase | network |
TODO documentation |
TransportPathVisualizerServerClientsShowcase | network |
TODO documentation |
UDPBroadcastNetwork | network | (no description) |
VisualizationE | network | (no description) |
VisualizationH | network | (no description) |
WiredNetWithDHCP | network | (no description) |
Name | Type | Default value | Description |
---|---|---|---|
hasStatus | bool | false | |
csmacdSupport | bool | true |
by default use CSMA/CD |
macType | string | csmacdSupport ? "EtherMAC" : "EtherMACFullDuplex" | |
spanningTreeProtocol | string | "" | |
relayUnitType | string | firstAvailable("Ieee8021dRelay","MACRelayUnit") |
type of the IMACRelayUnit; |
macTableType | string | "MACAddressTable" |
type of the IMACAddressTable |
Name | Value | Description |
---|---|---|
networkNode | ||
labels | node | |
display | i=device/switch |
Name | Direction | Size | Description |
---|---|---|---|
ethg [ ] | inout |
Name | Type | Default value | Description |
---|---|---|---|
status.initialStatus | string | "UP" |
TODO @signal, @statistic |
l2NodeConfigurator.interfaceTableModule | string | ||
l2NodeConfigurator.l2ConfiguratorModule | string | "l2NetworkConfigurator" |
the absolute path to the L2NetworkConfigurator; use "" if there is no configurator |
interfaceTable.displayAddresses | bool | false |
whether to display IP addresses on links |
macTable.agingTime | double | ||
macTable.addressTableFile | string | ||
stp.helloTime | double | ||
stp.forwardDelay | double | ||
stp.maxAge | double | ||
stp.bridgePriority | int | ||
stp.visualize | bool |
// // Model of an Ethernet switch. // // The duplexChannel attributes of the MACs must be set according to the // medium connected to the port; if collisions are possible (it's a bus or hub) // it must be set to false, otherwise it can be set to true. // By default used half duples CSMA/CD mac // // module EtherSwitch { parameters: @networkNode(); @labels(node,ethernet-node); @display("i=device/switch"); bool hasStatus = default(false); bool csmacdSupport = default(true); // by default use CSMA/CD string macType = default(csmacdSupport ? "EtherMAC" : "EtherMACFullDuplex"); // ~EtherMAC or ~EtherMACFullDuplex string spanningTreeProtocol = default(""); string relayUnitType = default(firstAvailable("Ieee8021dRelay","MACRelayUnit")); // type of the ~IMACRelayUnit; string macTableType = default("MACAddressTable"); // type of the ~IMACAddressTable eth[*].encapType = "EtherEncapDummy"; eth[*].csmacdSupport = csmacdSupport; eth[*].macType = macType; *.interfaceTableModule = default(absPath(".interfaceTable")); gates: inout ethg[] @labels(EtherFrame-conn); submodules: status: NodeStatus if hasStatus { @display("p=73,111;is=s"); } l2NodeConfigurator: L2NodeConfigurator if spanningTreeProtocol != "" { @display("p=73,208"); } interfaceTable: InterfaceTable { @display("p=73,65;is=s"); } macTable: <macTableType> like IMACAddressTable { @display("p=73,19;is=s"); } relayUnit: <relayUnitType> like IMACRelayUnit { parameters: @display("p=263,50;is=m"); gates: ifIn[sizeof(ethg)]; ifOut[sizeof(ethg)]; } stp: <spanningTreeProtocol> like ISpanningTree if spanningTreeProtocol != "" { @display("p=168,50"); } eth[sizeof(ethg)]: <default("EthernetInterface")> like IWiredNic { parameters: mac.promiscuous = true; @display("p=263,150,row;q=txQueue"); } connections: for i=0..sizeof(ethg)-1 { eth[i].upperLayerIn <-- relayUnit.ifOut++; eth[i].upperLayerOut --> relayUnit.ifIn++; eth[i].phys <--> ethg[i]; } if spanningTreeProtocol != "" { stp.relayIn <-- relayUnit.stpOut; stp.relayOut --> relayUnit.stpIn; } }