UserPlaneRelay

Package: simu5g.corenetwork.userPlaneRelay

UserPlaneRelay

compound module

The user-plane relay of a node that ends GTP-U tunnels: the "relay" between the two protocol stacks in the user-plane stack diagrams of 3GPP (TS 23.401, 23.501, 38.300). At a base station it relays between the radio interface and the N3/S1-U tunnels, at a Upf or PgwStandard between the data network (N6/SGi) and the tunnels toward the base stations or other UPFs.

The relay has two sides: the user data (the T-PDUs of TS 29.281: IP datagrams, Ethernet frames, Unstructured payloads) on userDataIn/userDataOut, and the tunnels (G-PDUs, i.e. GTP-U over UDP) on socketOut/socketIn. User data arriving on userDataIn is classified by the TrafficFlowFilter, which picks the tunnel it goes into, and tunneled by the GtpUser; user data arriving in a tunnel leaves on userDataOut, or is tunneled on (see GtpUser). At a Upf or PgwStandard, the user data side is a message dispatcher, through which the relay reaches the data-network interface, the EthernetSessionBridge and the Ipv6NdResponder (see GtpUser).

trafficFlowFilter : TrafficFlowFilter

Maps IP 4-Tuples to Traffic Flow Template (TFT) identifiers, which are used by the ~GtpUser module...

Source:
trafficFlowFilter: TrafficFlowFilter {
    parameters:
        @display("p=225,75");
        ownerType = parent.ownerType;
        gateway = parent.gateway;
        mecHost = parent.mecHost;
} gtpUser : GtpUser

Implements a simplified version of the user plane of the GPRS Tunneling Protocol (GTP).

Source:
gtpUser: GtpUser {
    parameters:
        @display("p=75,175");
        gateway = parent.gateway;
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Used in compound modules

Name Type Description
eNodeB compound module

Models an evolved Node B (eNB) of a 4G LTE network. It is a specialized device equipped with a Network Interface Card (NIC) that enables communication with the LteUe devices connected to it. It serves as an access point that routes packets between the UEs and the 4G Core Network. Packets arriving from the UEs are tunneled to the appropriate next hop in the core network (e.g., the PDN Gateway, PGW) using the GPRS Tunneling Protocol (GTP). Conversely, packets received from the core network are detunneled and sent to the appropriate destination UE. In addition to the 4G NIC, this compound module includes a configurable number of wired interfaces to connect with routers of the core network or directly to the PgwStandard module, which serves as the IP module to perform forwarding, and the UserPlaneRelay that relays between the NIC and the GTP tunnels: its TrafficFlowFilter classifies incoming packets and determines the next hop, and its GtpUser handles GTP (de)tunneling. Furthermore, it features a configurable number of LteX2App modules to facilitate peer-to-peer communications with other eNodeBs within the same LTE network.

PgwStandard compound module

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.

Upf compound module

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

Parameters

Name Type Default value Description
ownerType string

The type of the containing node, which sets it

gateway string ""

The core network gateway of a base station or a MEC host's UPF, a module path relative to the network; unused at an anchor (PGW, UPF)

mecHost string ""

At a base station: the MEC host the base station steers traffic to; empty = none

Properties

Name Value Description
display i=block/routing;bgb=300,250

Gates

Name Direction Size Description
socketOut output

To the UDP of the node: the tunnels

socketIn input
userDataIn input

The user data to tunnel: from the cellular NIC at a base station, from the node's message dispatcher at a UPF or PGW

userDataOut output

The user data out of the tunnels

Unassigned submodule parameters

Name Type Default value Description
trafficFlowFilter.binderModule string "binder"
trafficFlowFilter.fastForwarding bool true
gtpUser.binderModule string "binder"
gtpUser.localPort int 31
gtpUser.tunnelPeerPort int 31

Source code

//
// The user-plane relay of a node that ends GTP-U tunnels: the "relay" between the
// two protocol stacks in the user-plane stack diagrams of 3GPP (TS 23.401, 23.501,
// 38.300). At a base station it relays between the radio interface and the N3/S1-U
// tunnels, at a ~Upf or ~PgwStandard between the data network (N6/SGi) and the
// tunnels toward the base stations or other UPFs.
//
// The relay has two sides: the user data (the T-PDUs of TS 29.281: IP datagrams, Ethernet
// frames, Unstructured payloads) on userDataIn/userDataOut, and the tunnels (G-PDUs, i.e.
// GTP-U over UDP) on socketOut/socketIn. User data arriving on userDataIn is classified by
// the ~TrafficFlowFilter, which picks the tunnel it goes into, and tunneled by the
// ~GtpUser; user data arriving in a tunnel leaves on userDataOut, or is tunneled on (see
// ~GtpUser). At a ~Upf or ~PgwStandard, the user data side is a message dispatcher,
// through which the relay reaches the data-network interface, the ~EthernetSessionBridge
// and the ~Ipv6NdResponder (see ~GtpUser).
//
module UserPlaneRelay
{
    parameters:
        @display("i=block/routing;bgb=300,250");
        string ownerType @enum(ENODEB,GNODEB,PGW,UPF,UPF_MEC);  // The type of the containing node, which sets it
        string gateway = default("");  // The core network gateway of a base station or a MEC host's UPF, a module path relative to the network; unused at an anchor (PGW, UPF)
        string mecHost = default("");  // At a base station: the MEC host the base station steers traffic to; empty = none

    gates:
        output socketOut;  // To the UDP of the node: the tunnels
        input socketIn;
        input userDataIn;  // The user data to tunnel: from the cellular NIC at a base station, from the node's message dispatcher at a UPF or PGW
        output userDataOut;  // The user data out of the tunnels

    submodules:
        trafficFlowFilter: TrafficFlowFilter {
            parameters:
                @display("p=225,75");
                ownerType = parent.ownerType;
                gateway = parent.gateway;
                mecHost = parent.mecHost;
        }
        gtpUser: GtpUser {
            parameters:
                @display("p=75,175");
                gateway = parent.gateway;
        }

    connections:
        gtpUser.socketOut --> { @display("m=s"); } --> socketOut;
        gtpUser.socketIn <-- { @display("m=s"); } <-- socketIn;

        userDataIn --> { @display("m=e"); } --> trafficFlowFilter.in;
        trafficFlowFilter.out --> gtpUser.userDataIn;
        gtpUser.userDataOut --> { @display("m=e"); } --> userDataOut;
}
File: src/simu5g/corenetwork/userPlaneRelay/UserPlaneRelay.ned