TrafficFlowFilter

Package: simu5g.corenetwork.trafficFlowFilter

TrafficFlowFilter

simple module

Maps IP 4-Tuples to Traffic Flow Template (TFT) identifiers, which are used by the GtpUser module contained in the same node. It interacts with the Binder to determine the destination of the packet. Resides in any module that also includes a GtpUser module, such as eNodeB, gNodeB, PgwStandard, Upf, and MecHost modules. For instance, in a Upf module acting as the entry point of the 5G network, it identifies the destination endpoint of the GTP tunnel that the packet should traverse, which is the gNodeB serving the destination User Equipment (UE).

The module also assigns each packet entering the tunnel its QoS Flow Identifier (QFI). At a core-network tunnel entry (Upf, PgwStandard, a MEC host's UPF) the QFI-assignment rules are delivered by the BearerConfigurator (see its dlQfiRules parameter): they model the packet detection and QoS enforcement rules (PDR/QER) that the SMF installs into a UPF over N4 signaling at session setup -- a real UPF holds no classification policy of its own, and neither does this module. A packet matching no rule gets QFI 0 (the default flow).

A base station is no rule-enforcement point: no SMF installs classification rules there, and none can be authored for it. An uplink packet that SDAP already attributed to a QoS flow keeps that QFI on its way into the core network; uplink traffic from a stack without SDAP is classified by a built-in DSCP-as-QFI residual.

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 GtpUser module that handles GTP (de)tunneling. The latter utilizes the TrafficFlowFilter module to classify incoming packets and determine the next hop. 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 GtpUser module that handles GTP (de)tunneling, along with the TrafficFlowFilter module, which classifies incoming packets.

Upf compound module

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

Parameters

Name Type Default value Description
binderModule string "binder"
bearerConfiguratorModule string "bearerConfigurator"

Where a core-network instance registers for QFI-rule delivery

ownerType string

Must be one of ENODEB, GNODEB, PGW, UPF, UPF_MEC

fastForwarding bool true

Properties

Name Value Description
display i=block/filter

Gates

Name Direction Size Description
internetFilterGateIn input
gtpUserGateOut output

Source code

//
// Maps IP 4-Tuples to Traffic Flow Template (TFT) identifiers, which are used by the ~GtpUser module
// contained in the same node. It interacts with the ~Binder to determine the destination of the packet.
// Resides in any module that also includes a ~GtpUser module, such as ~eNodeB, ~gNodeB, ~PgwStandard,
// ~Upf, and ~MecHost modules. For instance, in a ~Upf module acting as the entry point of the 5G network, it
// identifies the destination endpoint of the GTP tunnel that the packet should traverse, which is the gNodeB
// serving the destination User Equipment (UE).
//
// The module also assigns each packet entering the tunnel its QoS Flow Identifier
// (QFI). At a core-network tunnel entry (~Upf, ~PgwStandard, a MEC host's UPF) the
// QFI-assignment rules are delivered by the ~BearerConfigurator (see its dlQfiRules
// parameter): they model the packet detection and QoS enforcement rules (PDR/QER)
// that the SMF installs into a UPF over N4 signaling at session setup -- a real UPF
// holds no classification policy of its own, and neither does this module. A packet
// matching no rule gets QFI 0 (the default flow).
//
// A base station is no rule-enforcement point: no SMF installs classification rules
// there, and none can be authored for it. An uplink packet that SDAP already
// attributed to a QoS flow keeps that QFI on its way into the core network; uplink
// traffic from a stack without SDAP is classified by a built-in DSCP-as-QFI
// residual.
//
simple TrafficFlowFilter
{
    parameters:
        @display("i=block/filter");

        string binderModule = default("binder");
        string bearerConfiguratorModule = default("bearerConfigurator");  // Where a core-network instance registers for QFI-rule delivery
        string ownerType @enum(ENODEB,GNODEB,PGW,UPF,UPF_MEC); // Must be one of ENODEB, GNODEB, PGW, UPF, UPF_MEC
        bool fastForwarding = default(true);
    gates:
        input internetFilterGateIn;
        output gtpUserGateOut;
}
File: src/simu5g/corenetwork/trafficFlowFilter/TrafficFlowFilter.ned