Package: inet.examples.inet.ipv4largenet
IPv4LargeLAN
compound moduleSeveral hosts and an Ethernet hub on a switch. One port of the hub connect to a 10Base2 segment.
Usage diagram
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
Used in
| Name | Type | Description |
|---|---|---|
| IPv4LargeNet | network |
A large Ethernet LAN -- see model description |
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=old/cloud |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| ethg | inout |
Unassigned submodule parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| router.status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| router.pcapRecorder.verbose | bool | true |
whether to log packets on the module output |
| router.pcapRecorder.pcapFile | string | "" |
the PCAP file to be written |
| router.pcapRecorder.fileFormat | string | "pcapng" | |
| router.pcapRecorder.snaplen | int | 65535 |
maximum number of bytes to record per packet |
| router.pcapRecorder.dumpBadFrames | bool | true |
enable dump of frames with hasBitError |
| router.pcapRecorder.moduleNamePatterns | string | "wlan[*] eth[*] ppp[*]" |
space-separated list of sibling module names to listen on |
| router.pcapRecorder.sendingSignalNames | string | "packetSentToLower" |
space-separated list of outbound packet signals to subscribe to |
| router.pcapRecorder.receivingSignalNames | string | "packetReceivedFromLower" |
space-separated list of inbound packet signals to subscribe to |
| router.pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
space-separated list of protocol names as defined in the Protocol class |
| router.pcapRecorder.packetFilter | object | "*" |
which packets are considered, matches all packets by default |
| router.pcapRecorder.helpers | string | "" |
usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| router.pcapRecorder.alwaysFlush | bool | false |
flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| router.pcapRecorder.displayStringTextFormat | string | "rec: %n pks" | |
| router.interfaceTable.displayAddresses | bool | false |
whether to display IP addresses on links |
| router.cb.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.cb.forwardServiceRegistration | bool | true | |
| router.cb.forwardProtocolRegistration | bool | true | |
| router.bl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.bl.forwardServiceRegistration | bool | true | |
| router.bl.forwardProtocolRegistration | bool | true | |
| router.li.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.li.forwardServiceRegistration | bool | true | |
| router.li.forwardProtocolRegistration | bool | true | |
| router.eth.bitrate | double | ||
| router.nl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.nl.forwardServiceRegistration | bool | true | |
| router.nl.forwardProtocolRegistration | bool | true | |
| router.tn.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.tn.forwardServiceRegistration | bool | true | |
| router.tn.forwardProtocolRegistration | bool | true | |
| router.at.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| router.at.forwardServiceRegistration | bool | true | |
| router.at.forwardProtocolRegistration | bool | true | |
| router.bgp.interfaceTableModule | string |
The path to the InterfaceTable module |
|
| router.bgp.routingTableModule | string | ||
| router.bgp.ospfRoutingModule | string | parent.hasOspf ? "^.ospf" : "" | |
| switch.macTable.agingTime | double | ||
| switch.macTable.forwardingTableFile | string | ||
| switch.interfaceTable.displayAddresses | bool | false |
whether to display IP addresses on links |
| switch.l2NodeConfigurator.interfaceTableModule | string | ||
| switch.l2NodeConfigurator.l2ConfiguratorModule | string | "l2NetworkConfigurator" |
the absolute path to the ~L2NetworkConfigurator; use "" if there is no configurator |
| switch.status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| switch.pcapRecorder.verbose | bool | true |
whether to log packets on the module output |
| switch.pcapRecorder.pcapFile | string | "" |
the PCAP file to be written |
| switch.pcapRecorder.fileFormat | string | "pcapng" | |
| switch.pcapRecorder.snaplen | int | 65535 |
maximum number of bytes to record per packet |
| switch.pcapRecorder.dumpBadFrames | bool | true |
enable dump of frames with hasBitError |
| switch.pcapRecorder.moduleNamePatterns | string | "wlan[*] eth[*] ppp[*]" |
space-separated list of sibling module names to listen on |
| switch.pcapRecorder.sendingSignalNames | string | "packetSentToLower" |
space-separated list of outbound packet signals to subscribe to |
| switch.pcapRecorder.receivingSignalNames | string | "packetReceivedFromLower" |
space-separated list of inbound packet signals to subscribe to |
| switch.pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
space-separated list of protocol names as defined in the Protocol class |
| switch.pcapRecorder.packetFilter | object | "*" |
which packets are considered, matches all packets by default |
| switch.pcapRecorder.helpers | string | "" |
usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| switch.pcapRecorder.alwaysFlush | bool | false |
flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| switch.pcapRecorder.displayStringTextFormat | string | "rec: %n pks" | |
| switch.stp.helloTime | double | ||
| switch.stp.forwardDelay | double | ||
| switch.stp.maxAge | double | ||
| switch.stp.bridgePriority | int | ||
| switch.stp.visualize | bool | ||
| switch.sc.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| switch.sc.forwardServiceRegistration | bool | true | |
| switch.sc.forwardProtocolRegistration | bool | true | |
| switch.cb.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| switch.cb.forwardServiceRegistration | bool | true | |
| switch.cb.forwardProtocolRegistration | bool | true | |
| switch.bl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| switch.bl.forwardServiceRegistration | bool | true | |
| switch.bl.forwardProtocolRegistration | bool | true | |
| switch.li.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| switch.li.forwardServiceRegistration | bool | true | |
| switch.li.forwardProtocolRegistration | bool | true | |
| switch.cutthrough.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| switch.cutthrough.forwardServiceRegistration | bool | true | |
| switch.cutthrough.forwardProtocolRegistration | bool | true | |
| switch.eth.bitrate | double | ||
| host.status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| host.pcapRecorder.verbose | bool | true |
whether to log packets on the module output |
| host.pcapRecorder.pcapFile | string | "" |
the PCAP file to be written |
| host.pcapRecorder.fileFormat | string | "pcapng" | |
| host.pcapRecorder.snaplen | int | 65535 |
maximum number of bytes to record per packet |
| host.pcapRecorder.dumpBadFrames | bool | true |
enable dump of frames with hasBitError |
| host.pcapRecorder.moduleNamePatterns | string | "wlan[*] eth[*] ppp[*]" |
space-separated list of sibling module names to listen on |
| host.pcapRecorder.sendingSignalNames | string | "packetSentToLower" |
space-separated list of outbound packet signals to subscribe to |
| host.pcapRecorder.receivingSignalNames | string | "packetReceivedFromLower" |
space-separated list of inbound packet signals to subscribe to |
| host.pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
space-separated list of protocol names as defined in the Protocol class |
| host.pcapRecorder.packetFilter | object | "*" |
which packets are considered, matches all packets by default |
| host.pcapRecorder.helpers | string | "" |
usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| host.pcapRecorder.alwaysFlush | bool | false |
flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| host.pcapRecorder.displayStringTextFormat | string | "rec: %n pks" | |
| host.interfaceTable.displayAddresses | bool | false |
whether to display IP addresses on links |
| host.cb.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.cb.forwardServiceRegistration | bool | true | |
| host.cb.forwardProtocolRegistration | bool | true | |
| host.bl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.bl.forwardServiceRegistration | bool | true | |
| host.bl.forwardProtocolRegistration | bool | true | |
| host.li.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.li.forwardServiceRegistration | bool | true | |
| host.li.forwardProtocolRegistration | bool | true | |
| host.eth.bitrate | double | ||
| host.nl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.nl.forwardServiceRegistration | bool | true | |
| host.nl.forwardProtocolRegistration | bool | true | |
| host.tn.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.tn.forwardServiceRegistration | bool | true | |
| host.tn.forwardProtocolRegistration | bool | true | |
| host.at.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| host.at.forwardServiceRegistration | bool | true | |
| host.at.forwardProtocolRegistration | bool | true | |
| hhost.status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| hhost.pcapRecorder.verbose | bool | true |
whether to log packets on the module output |
| hhost.pcapRecorder.pcapFile | string | "" |
the PCAP file to be written |
| hhost.pcapRecorder.fileFormat | string | "pcapng" | |
| hhost.pcapRecorder.snaplen | int | 65535 |
maximum number of bytes to record per packet |
| hhost.pcapRecorder.dumpBadFrames | bool | true |
enable dump of frames with hasBitError |
| hhost.pcapRecorder.moduleNamePatterns | string | "wlan[*] eth[*] ppp[*]" |
space-separated list of sibling module names to listen on |
| hhost.pcapRecorder.sendingSignalNames | string | "packetSentToLower" |
space-separated list of outbound packet signals to subscribe to |
| hhost.pcapRecorder.receivingSignalNames | string | "packetReceivedFromLower" |
space-separated list of inbound packet signals to subscribe to |
| hhost.pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
space-separated list of protocol names as defined in the Protocol class |
| hhost.pcapRecorder.packetFilter | object | "*" |
which packets are considered, matches all packets by default |
| hhost.pcapRecorder.helpers | string | "" |
usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| hhost.pcapRecorder.alwaysFlush | bool | false |
flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| hhost.pcapRecorder.displayStringTextFormat | string | "rec: %n pks" | |
| hhost.interfaceTable.displayAddresses | bool | false |
whether to display IP addresses on links |
| hhost.cb.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.cb.forwardServiceRegistration | bool | true | |
| hhost.cb.forwardProtocolRegistration | bool | true | |
| hhost.bl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.bl.forwardServiceRegistration | bool | true | |
| hhost.bl.forwardProtocolRegistration | bool | true | |
| hhost.li.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.li.forwardServiceRegistration | bool | true | |
| hhost.li.forwardProtocolRegistration | bool | true | |
| hhost.eth.bitrate | double | ||
| hhost.nl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.nl.forwardServiceRegistration | bool | true | |
| hhost.nl.forwardProtocolRegistration | bool | true | |
| hhost.tn.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.tn.forwardServiceRegistration | bool | true | |
| hhost.tn.forwardProtocolRegistration | bool | true | |
| hhost.at.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| hhost.at.forwardServiceRegistration | bool | true | |
| hhost.at.forwardProtocolRegistration | bool | true | |
| bhost.status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| bhost.pcapRecorder.verbose | bool | true |
whether to log packets on the module output |
| bhost.pcapRecorder.pcapFile | string | "" |
the PCAP file to be written |
| bhost.pcapRecorder.fileFormat | string | "pcapng" | |
| bhost.pcapRecorder.snaplen | int | 65535 |
maximum number of bytes to record per packet |
| bhost.pcapRecorder.dumpBadFrames | bool | true |
enable dump of frames with hasBitError |
| bhost.pcapRecorder.moduleNamePatterns | string | "wlan[*] eth[*] ppp[*]" |
space-separated list of sibling module names to listen on |
| bhost.pcapRecorder.sendingSignalNames | string | "packetSentToLower" |
space-separated list of outbound packet signals to subscribe to |
| bhost.pcapRecorder.receivingSignalNames | string | "packetReceivedFromLower" |
space-separated list of inbound packet signals to subscribe to |
| bhost.pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
space-separated list of protocol names as defined in the Protocol class |
| bhost.pcapRecorder.packetFilter | object | "*" |
which packets are considered, matches all packets by default |
| bhost.pcapRecorder.helpers | string | "" |
usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| bhost.pcapRecorder.alwaysFlush | bool | false |
flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| bhost.pcapRecorder.displayStringTextFormat | string | "rec: %n pks" | |
| bhost.interfaceTable.displayAddresses | bool | false |
whether to display IP addresses on links |
| bhost.cb.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| bhost.cb.forwardServiceRegistration | bool | true | |
| bhost.cb.forwardProtocolRegistration | bool | true | |
| bhost.bl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| bhost.bl.forwardServiceRegistration | bool | true | |
| bhost.bl.forwardProtocolRegistration | bool | true | |
| bhost.li.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| bhost.li.forwardServiceRegistration | bool | true | |
| bhost.li.forwardProtocolRegistration | bool | true | |
| bhost.eth.bitrate | double | ||
| bhost.nl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| bhost.nl.forwardServiceRegistration | bool | true | |
| bhost.nl.forwardProtocolRegistration | bool | true | |
| bhost.tn.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| bhost.tn.forwardServiceRegistration | bool | true | |
| bhost.tn.forwardProtocolRegistration | bool | true | |
| bhost.at.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
| bhost.at.forwardServiceRegistration | bool | true | |
| bhost.at.forwardProtocolRegistration | bool | true |
Source code
// // Several hosts and an Ethernet hub on a switch. One port of the hub // connect to a 10Base2 segment. // module IPv4LargeLAN { 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=old/cloud"); gates: inout ethg; types: channel cabletobus extends DatarateChannel { parameters: delay = 0s; datarate = 10Mbps; } submodules: router: Router; switch: EthernetSwitch; host[n]: StandardHost; hub: EthernetHub; hhost[h]: StandardHost; tap[b+1]: WireJunction { parameters: @display("p=424,6,r,50"); } bhost[b]: StandardHost; connections: for i=0..n-1 { switch.ethg++ <--> cable <--> host[i].ethg++; } switch.ethg++ <--> cable <--> router.ethg++; router.ethg++ <--> ethg; for i=0..h-1 { hub.ethg++ <--> cabletobus <--> hhost[i].ethg++; } router.ethg++ <--> cabletobus <--> hub.ethg++; for i=0..b-1 { tap[i].port++ <--> cabletobus <--> bhost[i].ethg++; } tap[b].port++ <--> cabletobus <--> hub.ethg++; for i=0..b-1 { tap[i].port++ <--> cabletobus <--> tap[i+1].port++; } }File: examples/inet/ipv4largenet/IPv4LargeNet.ned