Package: simu5g.nodes
PgwStandard
compound moduleImplements a simplified EPC PDN Gateway (P-GW) of a 4G LTE network. It serves as the entry point to the core network of an LTE network, thus bridging it to the rest of the Internet. Packets arriving from the Internet are tunneled to the appropriate next hop in the core network (e.g., the eNodeB that will transmit the packet to the destination User Equipment through the radio access network) using the GPRS Tunneling Protocol (GTP). Conversely, packets received from the core network are detunneled and sent to the Internet (e.g., towards a remote server). To accomplish this, it utilizes a UserPlaneRelay, whose GtpUser handles GTP (de)tunneling and whose TrafficFlowFilter classifies incoming packets.
The interface toward the Internet (dnPpp, on the dnPppg gate) belongs to this user plane: it is not in the node's interface table, so the node's own network layer (the stack of the core network) neither sees nor uses it, and the address configurator gives it no address.
The relay reaches the SGi interface and the Ipv6NdResponder (ndResponder) through the rd message dispatcher, by service (see GtpUser).
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.
Used in
| Name | Type | Description |
|---|---|---|
| MultiCell | network |
Two eNodeB cells on a shared EPC PgwStandard, joined by an X2 link, with a router and a server behind the core. Four LteUe terminals are placed two per cell, and numExtCells ExtCell cells can be added as interferers. With hasD2D, the network holds the D2dBinder that D2D-capable nodes need, so that '**.hasD2D = true' turns D2D on in the network and in all its nodes. |
| MultiCell_D2DMultihop | network |
Five eNodeB cells, each reaching the EPC PgwStandard through a router of its own, with a further router and a server behind the core. There are no X2 links. numUe1 to numUe5 LteUe terminals attach per cell, and an EventGenerator and a MultihopD2DStatistics module sit beside them, wired to nothing. |
| MultiCell_withSecondaryGnb | network |
The two-cell version of SingleCell_withSecondaryGnb: two eNodeB masters, each paired over X2 with its own gNodeB secondary, and a further X2 link between the two masters. Both eNodeBs connect to the EPC PgwStandard, which faces a router and a server; neither gNodeB has a core-network link. numUe NrUe terminals attach, and numBgCells BackgroundCell cells can be added as interferers. |
| MultiCell_X2Mesh | network |
Three eNodeB cells in a full X2 mesh. Each reaches the EPC PgwStandard through a router of its own, and the server sits directly on the PgwStandard's data-network gate. numUe1, numUe2 and numUe3 LteUe terminals attach per cell, and numExtCells ExtCell cells can be added as interferers. |
| SingleCell | network |
The minimal LTE topology: one eNodeB connected to an EPC PgwStandard, which faces a router and a server, plus numUe LteUe terminals. |
| SingleCell_D2D | network |
SingleCell with its UEs split into three vectors, so that a configuration can address cellular terminals (ueCell), D2D transmitters (ueD2DTx) and D2D receivers (ueD2DRx) separately. The rest of the topology is the same: one eNodeB on an EPC PgwStandard, with a router and a server behind it. |
| SingleCell_D2DMulticast | network |
SingleCell with its UEs split into cellular terminals (ueCell) and members of a D2D multicast group (ueD2D). The rest of the topology is the same: one eNodeB on an EPC PgwStandard, with a router and a server behind it. |
| SingleCell_withSecondaryGnb | network |
An EN-DC topology: an eNodeB master paired over X2 with a gNodeB secondary. The eNodeB is the only node with a core-network link -- an EPC PgwStandard facing a router and a server -- so all data-plane traffic enters there, and the gNodeB contributes its radio leg alone. numUe NrUe terminals attach to both, and numBgCells BackgroundCell cells can be added as interferers. |
Extends
| Name | Type | Description |
|---|---|---|
| ApplicationLayerNodeBase | compound module |
An extension of the transport layer node base that adds support for applications. Provides the highest level of abstraction for network nodes, completing the full network stack from physical to application layer. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| hasStatus | bool | false | |
| hasEnvironment | bool | false | |
| osgModel | string | "" |
3D model for OSG visualization, no 3D model by default |
| osgModelColor | string | "" |
Tint color, no colorization by default |
| canvasImage | string | "" |
Image for canvas visualization, no image by default |
| canvasImageColor | string | "" |
Tint color, no colorization by default |
| recordPcap | bool | false | |
| numPcapRecorders | int | recordPcap ? 1 : 0 | |
| numLoInterfaces | int | 1 | |
| numWlanInterfaces | int | 0 | |
| numEthInterfaces | int | 0 |
Minimum number of Ethernet interfaces |
| numPppInterfaces | int | 0 |
Minimum number of PPP interfaces |
| numTunInterfaces | int | 0 | |
| numVirtInterfaces | int | 0 | |
| fcsMode | string | "declared" | |
| hasIpv4 | bool | true | |
| hasIpv6 | bool | false | |
| hasGn | bool | false | |
| forwarding | bool | true | |
| multicastForwarding | bool | false | |
| hasUdp | bool | firstAvailableOrEmpty("Udp") != "" | |
| hasTcp | bool | firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc") != "" | |
| hasSctp | bool | false | |
| hasQuic | bool | false | |
| numApps | int | 0 | |
| nodeType | string | "PGW" | |
| hasNdResponder | bool | false |
Answer the IPv6 Neighbor Discovery of the UEs' sessions (needed when UEs run IPv6), see Ipv6NdResponder |
Properties
| Name | Value | Description |
|---|---|---|
| class | NodeBase | |
| networkNode | ||
| labels | node | |
| display | i=device/mainframe;bgb=1700,1125 |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| radioIn [ ] | input | numWlanInterfaces | |
| pppg [ ] | inout | numPppInterfaces | |
| ethg [ ] | inout | numEthInterfaces | |
| dnPppg | inout |
Unassigned submodule parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| status.displayStringTextFormat | string | "{stateStr}" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| environment.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| environment.initStage | int | 0 |
Initialization stage for the setup command |
| environment.globalNamespace | bool | false |
Create new network namespaces under /var/run/netns/ (Linux only) |
| environment.namespace | string | "" |
Name of the host OS network namespace (optional) (Linux only) |
| environment.setupCommand | string | "" |
A host OS system command |
| environment.teardownCommand | string | "" |
A host OS system command |
| pcapRecorder.displayStringTextFormat | string | "rec: %n pks" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| pcapRecorder.verbose | bool | true |
Whether to log packets on the module output |
| pcapRecorder.recordEmptyPackets | bool | true |
Specifies if zero length packets are recorded or not |
| pcapRecorder.enableConvertingPackets | bool | true |
Specifies if converting packets to link type is allowed or not |
| pcapRecorder.pcapFile | string | "" |
The PCAP file to be written, suggested value: pcapFile = "${resultdir}/${configname}-#${runnumber}" + fullpath() + ".pcap" |
| pcapRecorder.fileFormat | string | "pcapng" | |
| pcapRecorder.snaplen | int | 65535 |
Maximum number of bytes to record per packet |
| pcapRecorder.timePrecision | int | 6 |
Time precision in recorded file. pcap supports only 6 (usec) or 9 (nanosec), pcapng supports more values (see 'if_tsresol' option in pcapng file format). |
| pcapRecorder.dumpBadFrames | bool | true |
Enable dump of frames with hasBitError |
| pcapRecorder.moduleNamePatterns | string | "wlan[*] eth[*] ppp[*]" |
Space-separated list of sibling module names to listen on |
| pcapRecorder.sendingSignalNames | string | "transmissionEnded" |
Space-separated list of outbound packet signals to subscribe to |
| pcapRecorder.receivingSignalNames | string | "receptionEnded" |
Space-separated list of inbound packet signals to subscribe to |
| pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
Space-separated list of protocol names as defined in the Protocol class |
| pcapRecorder.packetFilter | object | "*" |
Which packets are considered, matches all packets by default |
| pcapRecorder.helpers | string | "" |
Usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| pcapRecorder.alwaysFlush | bool | false |
Flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| interfaceTable.displayStringTextFormat | string | "{numInterfaces} interfaces" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| interfaceTable.displayAddresses | bool | false |
Whether to display IP addresses on links |
| cb.displayStringTextFormat | string | "processed {numProcessedPackets} pk ({processedTotalLength})" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| cb.interfaceTableModule | string |
Module path to the InterfaceTable module |
|
| cb.forwardServiceRegistration | bool | true | |
| cb.forwardProtocolRegistration | bool | true | |
| cb.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| cb.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| cb.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| bl.displayStringTextFormat | string | "processed {numProcessedPackets} pk ({processedTotalLength})" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| bl.interfaceTableModule | string |
Module path to the InterfaceTable module |
|
| bl.forwardServiceRegistration | bool | true | |
| bl.forwardProtocolRegistration | bool | true | |
| bl.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| bl.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| bl.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| li.displayStringTextFormat | string | "processed {numProcessedPackets} pk ({processedTotalLength})" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| li.interfaceTableModule | string |
Module path to the InterfaceTable module |
|
| li.forwardServiceRegistration | bool | true | |
| li.forwardProtocolRegistration | bool | true | |
| li.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| li.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| li.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| eth.bitrate | double | ||
| nl.displayStringTextFormat | string | "processed {numProcessedPackets} pk ({processedTotalLength})" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| nl.interfaceTableModule | string |
Module path to the InterfaceTable module |
|
| nl.forwardServiceRegistration | bool | true | |
| nl.forwardProtocolRegistration | bool | true | |
| nl.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| nl.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| nl.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| tn.displayStringTextFormat | string | "processed {numProcessedPackets} pk ({processedTotalLength})" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| tn.interfaceTableModule | string |
Module path to the InterfaceTable module |
|
| tn.forwardServiceRegistration | bool | true | |
| tn.forwardProtocolRegistration | bool | true | |
| tn.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| tn.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| tn.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| at.displayStringTextFormat | string | "processed {numProcessedPackets} pk ({processedTotalLength})" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| at.interfaceTableModule | string |
Module path to the InterfaceTable module |
|
| at.forwardServiceRegistration | bool | true | |
| at.forwardProtocolRegistration | bool | true | |
| at.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| at.serviceMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
| at.protocolMapping | object | {} |
Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
| dnPpp.pcapRecorder.displayStringTextFormat | string | "rec: %n pks" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| dnPpp.pcapRecorder.verbose | bool | true |
Whether to log packets on the module output |
| dnPpp.pcapRecorder.recordEmptyPackets | bool | true |
Specifies if zero length packets are recorded or not |
| dnPpp.pcapRecorder.enableConvertingPackets | bool | true |
Specifies if converting packets to link type is allowed or not |
| dnPpp.pcapRecorder.pcapFile | string | "" |
The PCAP file to be written, suggested value: pcapFile = "${resultdir}/${configname}-#${runnumber}" + fullpath() + ".pcap" |
| dnPpp.pcapRecorder.fileFormat | string | "pcapng" | |
| dnPpp.pcapRecorder.snaplen | int | 65535 |
Maximum number of bytes to record per packet |
| dnPpp.pcapRecorder.timePrecision | int | 6 |
Time precision in recorded file. pcap supports only 6 (usec) or 9 (nanosec), pcapng supports more values (see 'if_tsresol' option in pcapng file format). |
| dnPpp.pcapRecorder.dumpBadFrames | bool | true |
Enable dump of frames with hasBitError |
| dnPpp.pcapRecorder.sendingSignalNames | string | "transmissionEnded" |
Space-separated list of outbound packet signals to subscribe to |
| dnPpp.pcapRecorder.receivingSignalNames | string | "receptionEnded" |
Space-separated list of inbound packet signals to subscribe to |
| dnPpp.pcapRecorder.dumpProtocols | string | "ethernetmac ppp ieee80211mac" |
Space-separated list of protocol names as defined in the Protocol class |
| dnPpp.pcapRecorder.packetFilter | object | "*" |
Which packets are considered, matches all packets by default |
| dnPpp.pcapRecorder.helpers | string | "" |
Usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper" |
| dnPpp.pcapRecorder.alwaysFlush | bool | false |
Flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
| dnPpp.ppp.displayStringTextFormat | string | "rate: %b\nsent: %s, rcvd: %r\nqueue: %q, drop: %d" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| dnPpp.ppp.interfaceTableModule | string |
The path to the InterfaceTable module |
|
| dnPpp.ppp.sendRawBytes | bool | false |
When true packets are serialized into a sequence of bytes before sending out |
| dnPpp.ppp.mtu | int | 4470B | |
| dnPpp.ppp.stopOperationExtraTime | double | -1s |
Extra time after lifecycle stop operation finished |
| dnPpp.ppp.stopOperationTimeout | double | 2s |
Timeout value for lifecycle stop operation |
| relay.trafficFlowFilter.binderModule | string | "binder" | |
| relay.trafficFlowFilter.fastForwarding | bool | true | |
| relay.gtpUser.binderModule | string | "binder" | |
| relay.gtpUser.localPort | int | 31 | |
| relay.gtpUser.tunnelPeerPort | int | 31 | |
| rd.displayStringTextFormat | string | "processed {numProcessedPackets} pk ({processedTotalLength})" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| rd.interfaceTableModule | string |
Module path to the InterfaceTable module |
|
| rd.interfaceMapping | object | {} |
Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
| nodeControl.binderModule | string | "binder" | |
| nodeControl.gtpUserModule | string | "^.relay.gtpUser" | |
| nodeControl.trafficFlowFilterModule | string | "^.relay.trafficFlowFilter" | |
| nodeControl.ethernetBridgeModule | string | "^.ethBridge.sessionMux" |
The node's Ethernet session bridge (see EthernetSessionBridge), if it has one |
| nodeControl.gateway | string | "" |
A MEC host UPF's core network gateway, the anchor UPF whose sessions it serves; empty at an anchor |
| nodeControl.unstructuredPrefix | string | "" |
The prefix the N6 addresses of Unstructured sessions are allocated from, e.g. "2001:db8:5::/64" or "10.5.0.0/16"; empty = the node anchors no Unstructured session (see the main comment) |
| nodeControl.unstructuredServer | string | "" |
The application server the Unstructured sessions' uplink goes to: a module path relative to the network, resolved in the family of unstructuredPrefix |
| nodeControl.unstructuredServerPort | int | -1 |
The UDP port of unstructuredServer the uplink goes to; must be set for Unstructured sessions |
| nodeControl.unstructuredPort | int | -1 |
The UDP port the node receives the Unstructured sessions' downlink on, and sends their uplink from; must be set for Unstructured sessions |
| ndResponder.binderModule | string | "binder" | |
| ndResponder.linkLocalAddress | string | "fe80::1" |
The router's address on every session's link |
| ndResponder.routerLifetime | double | 9000s |
Router Lifetime in the Router Advertisements (max 9000s, RFC 4861) |
| ndResponder.curHopLimit | int | 64 |
Cur Hop Limit in the Router Advertisements (0 = unspecified) |
| ndResponder.checksumMode | string | "declared" |
Source code
// // Implements a simplified EPC PDN Gateway (P-GW) of a 4G LTE network. // It serves as the entry point to the core network of an LTE network, thus bridging it to the rest // of the Internet. Packets arriving from the Internet are tunneled to the appropriate next hop in // the core network (e.g., the ~eNodeB that will transmit the packet to the destination User Equipment // through the radio access network) using the GPRS Tunneling Protocol (GTP). Conversely, packets // received from the core network are detunneled and sent to the Internet (e.g., towards a remote server). // To accomplish this, it utilizes a ~UserPlaneRelay, whose ~GtpUser handles GTP (de)tunneling and // whose ~TrafficFlowFilter classifies incoming packets. // // The interface toward the Internet (dnPpp, on the dnPppg gate) belongs to this user plane: // it is not in the node's interface table, so the node's own network layer (the stack of // the core network) neither sees nor uses it, and the address configurator gives it no // address. // // The relay reaches the SGi interface and the ~Ipv6NdResponder (ndResponder) through the // rd message dispatcher, by service (see ~GtpUser). // module PgwStandard extends ApplicationLayerNodeBase { parameters: @display("i=device/mainframe;bgb=1700,1125"); @figure[userPlane](type=rectangle; pos=1275,5; size=400,437; fillColor=#ff8000; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); @figure[userPlane.title](type=text; pos=1670,10; anchor=ne; text="user plane"); @figure[sgiInterfaces](type=rectangle; pos=1275,458; size=400,660; fillColor=#00ffff; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); @figure[sgiInterfaces.title](type=text; pos=1670,463; anchor=ne; text="SGi interfaces"); @figure[submodules]; string nodeType = "PGW"; bool hasNdResponder = default(false); // Answer the IPv6 Neighbor Discovery of the UEs' sessions (needed when UEs run IPv6), see ~Ipv6NdResponder forwarding = default(true); multicastForwarding = default(false); gates: inout dnPppg @labels(PppFrame-conn); submodules: dnPpp: PppInterface { parameters: interfaceTableModule = ""; // Not an interface of the node's network layer: the user plane's SGi end displayStringTextFormat = ""; @display("p=1375,975"); } relay: UserPlaneRelay { parameters: @display("p=1125,75"); ownerType = parent.nodeType; } rd: MessageDispatcher { parameters: @display("p=1475,450;b=380,5,,,,1"); serviceMapping = {"ipv4": "dnPpp", "ipv6": "dnPpp"}; // The data network; the optional modules register their services protocolMapping = {"ipv4": "relay", "ipv6": "relay", "ethernetmac": "relay"}; forwardServiceRegistration = false; forwardProtocolRegistration = false; } nodeControl: UserPlaneNodeControl { parameters: @display("p=125,400;is=s"); nodeType = parent.nodeType; } ndResponder: Ipv6NdResponder if hasNdResponder { parameters: @display("p=1550,225"); } connections: relay.socketOut --> at.in++; relay.socketIn <-- at.out++; relay.userDataOut --> { @display("m=h,v"); } --> rd.in++; rd.out++ --> { @display("m=v,h"); } --> relay.userDataIn; rd.out++ --> dnPpp.upperLayerIn; dnPpp.upperLayerOut --> rd.in++; rd.out++ --> ndResponder.in if hasNdResponder; ndResponder.out --> rd.in++ if hasNdResponder; dnPpp.phys <--> { @display("m=s"); } <--> dnPppg; }File: src/simu5g/nodes/PgwStandard.ned