Upf

Package: simu5g.nodes

Upf

compound module

Implements the 5G Core User Plane Function (UPF).

The UPF is responsible for packet routing and forwarding, packet inspection, and (de)tunneling according to GTP. The core network can contain multiple UPFs. Intermediate UPFs, which are not connected to an external Data Network, act like IP routers in the current version. Allows the connection of mobile terminals to external data networks or other 5G network elements through GTP tunneling.

The N6 interface toward the data network (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 N6 Ethernet interface (dnEth, on the dnEthg gate, with hasEthernetBridge) is a port of the EthernetSessionBridge (ethBridge), registered in the bridge's own interface table.

The relay reaches the N6 interface, the EthernetSessionBridge (ethBridge) and the Ipv6NdResponder (ndResponder) through the rd message dispatcher, by service (see GtpUser).

status : NodeStatus
[from inet] ↗

Keeps track of the status of the network node (up, down, etc.) for other modules, and also displays...

Source:
status: NodeStatus if hasStatus {
    @display("p=125,80;is=s");
} clock : like IClock

IClock [from inet] ↗: Interface for clock models.

Source:
clock: <default("")> like IClock if typename != "" {
    @display("p=125,320;is=s");
} energyStorage : like IEnergyStorage

IEnergyStorage [from inet] ↗: The energy storage models describe devices that absorb energy produced by generators, and provide...

Source:
energyStorage: <default("")> like IEnergyStorage if typename != "" {
    @display("p=125,400;is=s");
} energyManagement : like IEnergyManagement

IEnergyManagement [from inet] ↗: The energy management models monitor an energy storage, estimate its state, and control the...

Source:
energyManagement: <default("")> like IEnergyManagement if typename != "" {
    @display("p=125,480;is=s");
} energyGenerator : like IEnergyGenerator

IEnergyGenerator [from inet] ↗: The energy generator models describe the energy generation process of devices over time.

Source:
energyGenerator: <default("")> like IEnergyGenerator if typename != "" {
    @display("p=125,560;is=s");
} mobility : like IMobility

IMobility [from inet] ↗: The module interface for mobility models.

Source:
mobility: <default("")> like IMobility if typename != "" {
    @display("p=125,160;is=s");
} measurer : like IMeasurer

IMeasurer [from inet] ↗: Interface for all standalone measurement modules.

Source:
measurer: <default("")> like IMeasurer if typename != "" {
    @display("p=125,640;is=s");
} environment : ExternalEnvironment
[from inet] ↗

Executes a setup command on the host OS during initialization and another teardown command during...

Source:
environment: ExternalEnvironment if hasEnvironment {
    @display("p=125,800;is=s");
} pcapRecorder[numPcapRecorders] : PcapRecorder
[from inet] ↗

Records PCAP traces of frames sent/received by other modules within the same host.

Source:
pcapRecorder[numPcapRecorders]: PcapRecorder {
    @display("p=125,720;is=s");
} interfaceTable : InterfaceTable
[from inet] ↗

Keeps the table of network interfaces.

Source:
interfaceTable: InterfaceTable {
    @display("p=125,240;is=s");
} llc : like IIeee8022Llc

IIeee8022Llc [from inet] ↗

Source:
llc: <default("")> like IIeee8022Llc if typename != "" {
    @display("p=375,525");
} cb : MessageDispatcher
[from inet] ↗

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
cb: MessageDispatcher {
    @display("p=750,600;b=1000,5");
} bridging : like IProtocolLayer

IProtocolLayer [from inet] ↗: Interface for all protocol layer modules that connect to a higher and to a lower protocol layer,...

Source:
bridging: <default("")> like IProtocolLayer if typename != "" {
    @display("p=750,675");
} bl : MessageDispatcher
[from inet] ↗

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
bl: MessageDispatcher {
    @display("p=750,750;b=1000,5");
} ethernet : like IEthernetLayer

IEthernetLayer [from inet] ↗: Module interface for Ethernet protocol layer implementations.

Source:
ethernet: <default(sizeof(ethg) > 0 ? "EthernetEncapsulation" : "")> like IEthernetLayer if typename != "" {
    @display("p=375,825");
} ieee8021q : like IIeee8021qLayer

IIeee8021qLayer [from inet] ↗

Source:
ieee8021q: <default("")> like IIeee8021qLayer if typename != "" {
    @display("p=525,825");
} ieee8021r : like IIeee8021rLayer

IIeee8021rLayer [from inet] ↗

Source:
ieee8021r: <default("")> like IIeee8021rLayer if typename != "" {
    @display("p=675,825");
} li : MessageDispatcher
[from inet] ↗

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
li: MessageDispatcher {
    @display("p=750,900;b=1000,5,,,,1");
} lo[numLoInterfaces] : like ILoopbackInterface

LoopbackInterface [from inet] ↗: Implements a loopback network interface.

ILoopbackInterface [from inet] ↗: Interface for loopback network interfaces.

Source:
lo[numLoInterfaces]: <default("LoopbackInterface")> like ILoopbackInterface {
    @display("p=750,975,row,150");
} wlan[numWlanInterfaces] : like IWirelessInterface

Ieee80211Interface [from inet] ↗: Implements an IEEE 802.11 network interface.

IWirelessInterface [from inet] ↗: Interface for wireless network interfaces.

Source:
wlan[numWlanInterfaces]: <default("Ieee80211Interface")> like IWirelessInterface {
    @display("p=375,1000,row,150;q=queue");
} ppp[sizeof(pppg)] : like IPppInterface

PppInterface [from inet] ↗: Implements a PPP network interface.

IPppInterface [from inet] ↗: Interface for PPP network interfaces.

Source:
ppp[sizeof(pppg)]: <default("PppInterface")> like IPppInterface {
    @display("p=300,975,row,150;q=txQueue");
} eth[sizeof(ethg)] : like IEthernetInterface

EthernetInterface [from inet] ↗: Represents an Ethernet network interface.

IEthernetInterface [from inet] ↗: Interface for Ethernet network interfaces.

Source:
eth[sizeof(ethg)]: <default("EthernetInterface")> like IEthernetInterface {
    @display("p=900,975,row,150;q=txQueue");
} tun[numTunInterfaces] : like ITunnelInterface

TunInterface [from inet] ↗: Implements a (simulated) TUN network interface.

ITunnelInterface [from inet] ↗: Interface for tunnel network interfaces.

Source:
tun[numTunInterfaces]: <default("TunInterface")> like ITunnelInterface {
    @display("p=975,1000,row,150;q=txQueue");
} virt[numVirtInterfaces] : like IVirtualInterface

VirtualInterface [from inet] ↗: Implements a virtual network interface.

IVirtualInterface [from inet] ↗: Interface for virtual network interfaces.

Source:
virt[numVirtInterfaces]: <default("VirtualInterface")> like IVirtualInterface {
    @display("p=975,1000,row,150;q=txQueue");
} ipv4 : like INetworkLayer

Ipv4NetworkLayer [from inet] ↗: Network layer of an IPv4 node.

INetworkLayer [from inet] ↗

Source:
ipv4: <default("Ipv4NetworkLayer")> like INetworkLayer if hasIpv4 {
    @display("p=375,375;q=queue");
} ipv6 : like INetworkLayer

Ipv6NetworkLayer [from inet] ↗: Represents a complete IPv6 network layer (L3), to be used within hosts and routers.

INetworkLayer [from inet] ↗

Source:
ipv6: <default("Ipv6NetworkLayer")> like INetworkLayer if hasIpv6 {
    @display("p=525,375;q=queue");
} generic : like INetworkLayer

INetworkLayer [from inet] ↗

Source:
generic: <default("")> like INetworkLayer if hasGn {
    @display("p=675,375;q=queue");
} nl : MessageDispatcher
[from inet] ↗

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
nl: MessageDispatcher {
    @display("p=750,450;b=1000,5,,,,1");
} udp : like IUdp

IUdp [from inet] ↗: UDP protocol interface.

Source:
udp: <default(firstAvailableOrEmpty("Udp"))> like IUdp if hasUdp {
    @display("p=375,225");
} tcp : like ITcp

ITcp [from inet] ↗: Interface for TCP protocol implementations.

Source:
tcp: <default(firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc"))> like ITcp if hasTcp {
    @display("p=525,225");
} sctp : like ISctp

ISctp [from inet] ↗: Interface for SCTP protocol.

Source:
sctp: <default(firstAvailableOrEmpty("Sctp"))> like ISctp if hasSctp {
    @display("p=675,225");
} quic : like IQuic

IQuic [from inet] ↗: QUIC protocol interface.

Source:
quic: <default(firstAvailableOrEmpty("Quic"))> like IQuic if hasQuic {
    @display("p=825,226");
} tn : MessageDispatcher
[from inet] ↗

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
tn: MessageDispatcher {
    @display("p=750,300;b=1000,5,,,,1");
} app[numApps] : like IApp

IApp [from inet] ↗: Generic application interface.

Source:
app[numApps]: <> like IApp {
    @display("p=375,75,row,150");
} at : MessageDispatcher
[from inet] ↗

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
at: MessageDispatcher {
    @display("p=750,150;b=1000,5,,,,1");
} dnPpp : PppInterface
[from inet] ↗

Implements a PPP network interface.

Source:
dnPpp: PppInterface {
    parameters:
        interfaceTableModule = "";  // Not an interface of the node's network layer: the user plane's N6 end
        displayStringTextFormat = "";
        @display("p=1375,975");
} relay : UserPlaneRelay

The user-plane relay of a node that ends GTP-U tunnels: the rd : MessageDispatcher
[from inet] ↗

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
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"}... nodeControl : UserPlaneNodeControl

The control-plane entry point of a user plane node (~Upf, ~PgwStandard, a MEC host's UPF): the...

Source:
nodeControl: UserPlaneNodeControl {
    parameters:
        @display("p=125,400;is=s");
        nodeType = parent.nodeType;
        gateway = parent.gateway;
} ndResponder : Ipv6NdResponder

Answers the IPv6 Neighbor Discovery traffic of the UEs' sessions at the session anchor (~Upf,...

Source:
ndResponder: Ipv6NdResponder if hasNdResponder {
    parameters:
        @display("p=1550,225");
} ethBridge : EthernetSessionBridge

The Ethernet bridge of a ~Upf, which forwards the traffic of its Ethernet PDU sessions dnEth : like IEthernetInterface

LayeredEthernetInterface [from inet] ↗: Implements an Ethernet network interface.

IEthernetInterface [from inet] ↗: Interface for Ethernet network interfaces.

Source:
dnEth: <default("LayeredEthernetInterface")> like IEthernetInterface if hasEthernetBridge {
    parameters:
        @display("p=1575,975");
}

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 compound modules

Name Type Description
MecHost compound module

Represents a model of a Multi-access Edge Computing (MEC) host belonging to a MEC system, as specified by the ETSI GS MEC 003 specifications. It runs MEC applications within its VirtualisationInfrastructure and can provide a number of MEC services via the MEC platform. MEC applications can be created either dynamically by the MEC orchestrator or statically at the initialization of the simulation. The MEC host possesses a configurable number of computing resources (such as CPU speed, RAM, and storage) and keeps track of the utilization of these resources by the MEC applications via the VirtualisationInfrastructureManager. Moreover, this module includes a User Plane Function (UPF) that allows it to be connected with the 5G core network.

Used in

Name Type Description
EthernetSessions network

A 5G standalone network whose UPF anchors Ethernet PDU sessions: its Ethernet N6 link goes to dnStation, a host of the data network's Ethernet LAN, and its IP N6 link to a router and a server, for the UEs of IP sessions. With hasSecondGnb, a second gNB (with an X2 link to the first) lets a UE hand over. device[] are the Ethernet devices behind ue[0], which is then an Ethernet bridge (see the ethernetMode parameter of LteUe).

ExtClientServer_bgCells network

ExtClientServerExample with background cells instead of external ones: one gNodeB served by a Upf core, a router in front of the Upf, one NrUe, and numBgCells BackgroundCell cells. The router has no simulated peer: the host it talks to, and the applications on the NrUe, are configured in the ini file.

ExtClientServerExample network

One gNodeB served by a Upf core, a router in front of the Upf, and one NrUe. numExtCells ExtCell cells can be added as interferers. The router has no simulated peer: the host it talks to, and the applications on the NrUe, are configured in the ini file.

ExtMecAppExample network

One gNodeB and one MecHost hung off the same intermediate Upf, behind an anchor Upf that carries the Ualcmp and, behind it, the MecOrchestrator, plus one NrUe. Nothing here is external: which node talks to a real host, and over which interface, is configured in the ini file.

ExtServerExample network

One gNodeB served by a Upf core, a router in front of the Upf, and two NrUe terminals. numExtCells ExtCell cells can be added as interferers. The router has no simulated peer: the host it talks to, and the applications on the UEs, are configured in the ini file.

ExtUeAppExample network

One gNodeB and one MecHost hung off the same intermediate Upf, behind an anchor Upf that carries the Ualcmp and, behind it, the MecOrchestrator, plus one NrUe. Nothing here is external: which node talks to a real host, and over which interface, is configured in the ini file.

ExtUeAppMecAppExample network

One gNodeB and one MecHost hung off the same intermediate Upf, behind an anchor Upf that carries the Ualcmp and, behind it, the MecOrchestrator, plus one NrUe. Nothing here is external: which node talks to a real host, and over which interface, is configured in the ini file.

MultiCell_Standalone network

Two gNodeB cells served by a 5G core: the anchor Upf faces the data network (a router and a server), an intermediate Upf feeds both gNodeBs, and an X2 link joins them. numUe NrUe terminals attach, and numBgCells BackgroundCell cells can be added as interferers.

MultiMecHost network

Two gNodeB cells, each on an intermediate Upf of its own with a MecHost hung off it, so every cell has its own MEC host. Both intermediate Upf nodes meet at the anchor Upf, which carries the Ualcmp and, behind it, the MecOrchestrator. An X2 link joins the two gNodeBs. numUe NrUe terminals attach, and numBgCells BackgroundCell cells can be added as interferers.

MultiMecHost_delay network

MultiMecHost with the two intermediate Upf nodes linked directly to each other, and with no X2 link between the gNodeBs. The length of that link -- and so its propagation delay -- follows the routersDelay parameter, which makes the distance between the two MEC hosts configurable.

MultiOperator network

Two operator networks side by side. Each has three gNodeB cells chained by X2, an intermediate Upf that feeds them and carries the operator's MecHost, an anchor Upf, and a Ualcmp with its MecOrchestrator. The two anchor Upf nodes meet at a shared router, the only node the operators have in common. numUe_A and numUe_B NrUe terminals attach to operator A and B respectively, and numBgCells BackgroundCell cells can be added as interferers.

RnisTest network

The topology of SingleMecHost -- one gNodeB and one MecHost on a shared intermediate Upf, with a Ualcmp and a MecOrchestrator behind the anchor Upf -- without its playground size parameters. numUes NrUe terminals attach to the gNodeB.

SingleCell_Standalone network

One gNodeB served by a 5G core: the anchor Upf faces the data network (a router and a server), and an intermediate Upf sits between it and the gNodeB. numUe NrUe terminals attach to the gNodeB, and numBgCells BackgroundCell cells can be added around it as interferers.

SingleCell_Standalone_D2D network

SingleCell_Standalone 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 gNodeB behind an intermediate and an anchor Upf, with a router and a server on the data network, plus numBgCells BackgroundCell interferers.

SingleCell_withSecondaryEnb network

The mirror image of SingleCell_withSecondaryGnb: here the gNodeB is the master node and the eNodeB is its secondary, so the UE is anchored on its NR stack and its LTE stack carries the secondary cell group. All data-plane traffic enters at the gNodeB.

SingleMecHost network

One gNodeB and one MecHost hung off the same intermediate Upf, behind an anchor Upf that carries the Ualcmp and, behind it, the MecOrchestrator. numUes NrUe terminals attach to the gNodeB.

UrbanNetwork network (no description)

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 "UPF"

Do NOT change!

gateway string ""
hasNdResponder bool false

Answer the IPv6 Neighbor Discovery of the UEs' sessions (needed when UEs run IPv6), see Ipv6NdResponder

hasEthernetBridge bool false

Anchor Ethernet PDU sessions: the node's Ethernet bridge and N6 Ethernet link (dnEthg), see EthernetSessionBridge

Properties

Name Value Description
class NodeBase
networkNode
labels node
display i=abstract/switch;bgb=1700,1125

Gates

Name Direction Size Description
radioIn [ ] input numWlanInterfaces
pppg [ ] inout numPppInterfaces
ethg [ ] inout numEthInterfaces
dnPppg inout

This gate is used for the UPF connected to the external data network it must be left unconnected for intermediate UPFs

dnEthg inout

The N6 Ethernet link of the Ethernet PDU sessions (with hasEthernetBridge)

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.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"
ethBridge.macTable.agingTime double
ethBridge.macTable.forwardingTableFile string
ethBridge.interfaceTable.displayStringTextFormat string "{numInterfaces} interfaces"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

ethBridge.interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

ethBridge.sessionMux.interfaceTableModule string

The bridge's interface table, which the session ports are registered in

ethBridge.sessionMux.macTableModule string

The bridge's MAC table, flushed of a released session's port

ethBridge.sessionMux.portModuleType string "simu5g.corenetwork.ethernetSessionBridge.EthernetSessionPort"

The module type of the session ports

ethBridge.sessionMux.portDisplayString string "p=500,420,row,100;g=sessionPorts"

Display string of the session ports (their place in the bridge's layout)

ethBridge.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

ethBridge.cb.interfaceTableModule string

Module path to the InterfaceTable module

ethBridge.cb.forwardServiceRegistration bool true
ethBridge.cb.forwardProtocolRegistration bool true
ethBridge.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

ethBridge.cb.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

ethBridge.cb.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

ethBridge.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

ethBridge.bl.interfaceTableModule string

Module path to the InterfaceTable module

ethBridge.bl.forwardServiceRegistration bool true
ethBridge.bl.forwardProtocolRegistration bool true
ethBridge.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

ethBridge.bl.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

ethBridge.bl.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

ethBridge.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

ethBridge.li.interfaceTableModule string

Module path to the InterfaceTable module

ethBridge.li.forwardServiceRegistration bool true
ethBridge.li.forwardProtocolRegistration bool true
ethBridge.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

ethBridge.li.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

ethBridge.li.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

dnEth.bitrate double

Source code

//
// Implements the 5G Core User Plane Function (UPF).
//
// The UPF is responsible for packet routing and forwarding, packet inspection, and (de)tunneling according to GTP.
// The core network can contain multiple UPFs. Intermediate UPFs, which are not connected to an external Data Network,
// act like IP routers in the current version.
// Allows the connection of mobile terminals to external data networks or other 5G network elements through GTP tunneling.
//
// The N6 interface toward the data network (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 N6 Ethernet interface (dnEth, on the dnEthg gate, with hasEthernetBridge) is a port of
// the ~EthernetSessionBridge (ethBridge), registered in the bridge's own interface table.
//
// The relay reaches the N6 interface, the ~EthernetSessionBridge (ethBridge) and the
// ~Ipv6NdResponder (ndResponder) through the rd message dispatcher, by service (see ~GtpUser).
//
module Upf extends ApplicationLayerNodeBase
{
    parameters:
        @display("i=abstract/switch;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[n6Interfaces](type=rectangle; pos=1275,458; size=400,660; fillColor=#00ffff; lineColor=#808080; cornerRadius=5; fillOpacity=0.1);
        @figure[n6Interfaces.title](type=text; pos=1670,463; anchor=ne; text="N6 interfaces");
        @figure[submodules];

        string nodeType = default("UPF");   // Do NOT change!
        string gateway = default("");
        bool hasNdResponder = default(false);  // Answer the IPv6 Neighbor Discovery of the UEs' sessions (needed when UEs run IPv6), see ~Ipv6NdResponder
        bool hasEthernetBridge = default(false);  // Anchor Ethernet PDU sessions: the node's Ethernet bridge and N6 Ethernet link (dnEthg), see ~EthernetSessionBridge
        forwarding = default(true);
        multicastForwarding = default(false);
        dnEth.interfaceTableModule = absPath(".ethBridge.interfaceTable");  // A port of the Ethernet session bridge, not an interface of the node's network layer

    gates:
        // This gate is used for the UPF connected to the external data network
        // it must be left unconnected for intermediate UPFs
        inout dnPppg @loose @labels(PppFrame-conn);
        // The N6 Ethernet link of the Ethernet PDU sessions (with hasEthernetBridge)
        inout dnEthg @loose @labels(EtherFrame-conn);

    submodules:
        dnPpp: PppInterface {
            parameters:
                interfaceTableModule = "";  // Not an interface of the node's network layer: the user plane's N6 end
                displayStringTextFormat = "";
                @display("p=1375,975");
        }
        relay: UserPlaneRelay {
            parameters:
                @display("p=1125,75");
                ownerType = parent.nodeType;
                gateway = parent.gateway;
        }
        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;
                gateway = parent.gateway;
        }
        ndResponder: Ipv6NdResponder if hasNdResponder {
            parameters:
                @display("p=1550,225");
        }
        ethBridge: EthernetSessionBridge if hasEthernetBridge {
            parameters:
                @display("p=1575,700");
        }
        dnEth: <default("LayeredEthernetInterface")> like IEthernetInterface if hasEthernetBridge {
            parameters:
                @display("p=1575,975");
        }

    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;

        rd.out++ --> ethBridge.sessionIn if hasEthernetBridge;
        ethBridge.sessionOut --> rd.in++ if hasEthernetBridge;
        ethBridge.lowerLayerOut --> dnEth.upperLayerIn if hasEthernetBridge;
        dnEth.upperLayerOut --> ethBridge.lowerLayerIn if hasEthernetBridge;
        dnEth.phys <--> { @display("m=s"); } <--> dnEthg if hasEthernetBridge;

        dnPpp.phys <--> { @display("m=s"); } <--> dnPppg;
}
File: src/simu5g/nodes/Upf.ned