Encyclopedia
2026-09-03 18:17:51
How Does a PDR Detect and Classify Packets on the N4 Interface?
Packet Detection Rules (PDRs) on the N4 interface tell the UPF how to identify and classify traffic. This guide explains PDI, precedence, SDF filters, F-TEID, UE IP matching, and how PDR works with FAR, QER, and URR.

Becke Telcom

How Does a PDR Detect and Classify Packets on the N4 Interface?

When a UPF receives a user-plane packet, it does not immediately decide where that packet should be forwarded. It first needs to determine which PFCP session the packet belongs to and which processing rule should apply. Within the PFCP rule framework on the N4 interface, the PDR (Packet Detection Rule) handles this first stage of packet processing. A PDR tells the UPF which packets belong to a particular traffic category. Once a packet matches, the UPF can apply the associated FAR, QER, URR, and other rules for forwarding, QoS enforcement, and usage reporting.

  • The easiest way to understand PDR is to separate three different responsibilities: PDR identifies the traffic, PDI defines the matching conditions, and FAR/QER/URR determine what happens after a match. Keeping these roles separate makes PFCP packet processing much easier to follow than trying to memorize every individual IE.

What Problem Does a PDR Solve on the N4 Interface?

N4 is the control interface between the SMF and UPF in the 5G Core. The SMF uses PFCP sessions to install user-plane processing rules in the UPF, and PDR is the rule type responsible for detecting and classifying packets. A PDR is commonly created during PFCP Session Establishment and can later be added, removed, or updated through PFCP Session Modification. In other words, packet classification is controlled by rules provisioned by the SMF according to the current PDU Session, traffic flow, and forwarding requirements.

A single PFCP session can contain multiple PDRs. The same PDU Session, for example, normally needs separate rules for uplink and downlink traffic. Additional PDRs may be required when the session contains multiple service data flows, different QoS Flows, or more granular traffic classifications. A PDR can therefore be viewed as the UPF's traffic-selection rule: it determines what kind of packet has arrived before other rules decide how that packet should be processed.

UPF packet processing on the N4 interface showing PDR precedence matching and associated FAR, QER, and URR rules

How Does the UPF Find the Matching PDR?

Packet processing in the UPF follows a defined sequence. After a packet enters the UPF, the function first identifies the corresponding PFCP session and then evaluates the PDRs associated with that session. If more than one PDR could potentially match, the UPF uses the Precedence value to determine their relative priority. A lower Precedence value represents higher precedence, so higher-priority rules are evaluated before lower-priority rules when searching for a match.

Once a PDR matches, the PDR itself does not perform every subsequent packet-processing operation. Instead, it can reference other PFCP rules:

  • FAR (Forwarding Action Rule): determines how the packet should be handled and forwarded, including whether it should be forwarded, dropped, buffered, or sent toward a particular destination interface.

  • QER (QoS Enforcement Rule): applies QoS-related controls such as gating, rate enforcement, and other traffic treatment.

  • URR (Usage Reporting Rule): measures traffic usage and provides reporting information that can be used for charging, monitoring, or policy-related purposes.

The overall UPF processing path can therefore be simplified as:
Identify the PFCP session → evaluate PDRs by Precedence → classify the packet → apply FAR/QER/URR. The order matters. FAR answers the question of how a packet should be handled, but the UPF first needs a PDR to establish which packet or traffic flow the action applies to.

What Are the Main Parameters in a PDR?

A Create PDR contains a number of Information Elements, but only a smaller set needs to be understood first when studying packet-detection behavior. These parameters define how the rule is identified, how packets are matched, and which subsequent processing rules are associated with the result.

ParameterMain Function
PDR IDUniquely identifies the PDR within the PFCP session and distinguishes it from other packet-detection rules
PrecedenceDefines the relative priority of the PDR when multiple rules are evaluated; lower values indicate higher precedence
PDIContains the packet-detection criteria used by the UPF to determine whether incoming traffic matches the PDR
Outer Header RemovalIndicates whether the UPF should remove an outer protocol header, such as a GTP-U/UDP/IP header on uplink traffic
FAR IDReferences the FAR that defines the forwarding action for matching packets
URR IDReferences a URR used for traffic measurement and usage reporting
QER IDReferences a QER that applies QoS-related treatment to the matching traffic
Activate Predefined RulesActivates one or more predefined rules already available to the UPF
Activate Time / Deactivate TimeDefines when the PDR becomes active and when it stops being active

Among these parameters, the element that actually defines which packets can match the PDR is the PDI (Packet Detection Information). FAR ID and QER ID reference actions that take place after traffic has been classified; PDI contains the information used to perform the classification itself.

How Does PDI Define Packet-Matching Conditions?

PDI can be understood as the set of packet-detection conditions inside a PDR. It is not a single field. Instead, it contains multiple parameters that can be combined to identify traffic according to where the packet entered the UPF, its tunnel information, UE address, service-flow characteristics, and QoS information. Common PDI parameters include:

  • Source Interface: identifies the logical side from which the packet arrives, such as Access for access-side traffic or Core for traffic arriving from the core or data-network side.

  • Local F-TEID: can be used to match the TEID and related addressing information associated with a GTP-U tunnel, making it particularly important when detecting uplink tunnel traffic.

  • Network Instance: identifies a logical network configured in the UPF, such as an Internet or IMS-related network instance.

  • UE IP Address: matches traffic according to the UE source or destination IP address, depending on the direction of the packet.

  • Traffic Endpoint ID: identifies a traffic endpoint that can be used in supported PDI optimization scenarios.

  • SDF Filter: provides more granular filtering based on parameters such as source and destination addresses, protocol, ports, and traffic direction.

  • Application ID: can be used for application-level traffic identification when the required application-detection capability is available in the UPF.

  • QFI (QoS Flow Identifier): identifies the QoS Flow associated with the packet.

  • Source Interface Type: provides additional information about the 3GPP interface associated with the source, such as N3, N6, or N9.

When multiple matching parameters are present in the PDI, they collectively define the packet-detection condition. The incoming packet must satisfy the applicable criteria before the PDR is considered a match. This allows the SMF to create rules ranging from broad session-level classification to much more specific service-flow detection.

PFCP PDR and PDI parameter structure showing Source Interface, Local F-TEID, UE IP Address, and SDF Filter matching conditions

How Granular Can Traffic Detection Become with an SDF Filter?

Source Interface, F-TEID, and UE IP Address may be sufficient to identify a session or a broad category of traffic, but they do not always distinguish individual service data flows. An SDF Filter provides more granular classification. Its Flow Description can include source IP address, destination IP address, protocol number, source port, destination port, and traffic direction. These fields allow the UPF to distinguish specific IP flows rather than treating every packet associated with a UE in the same way.

An SDF Filter can also carry additional matching information:

  • TOS / Traffic Class: matches the IPv4 Type of Service or IPv6 Traffic Class field.

  • Security Parameter Index (SPI): can be used when matching traffic associated with an IPsec Security Association.

  • Flow Label: matches the Flow Label contained in an IPv6 header.

  • SDF Filter ID: identifies the associated SDF Filter for management and reference purposes.

This creates a layered classification model. PDI parameters such as the interface, tunnel, and UE address can first narrow the traffic to a particular context, while the SDF Filter can identify individual IP flows within that context. Where application identification is also supported, the UPF can apply an additional application-level classification mechanism rather than relying only on addresses and ports.

What Is the Difference Between Uplink and Downlink PDRs?

Comparing uplink and downlink traffic is one of the clearest ways to understand how PDRs operate. Both directions use the same general rule structure, but the packets enter the UPF from different interfaces and therefore require different detection criteria.

For typical uplink traffic, packets arrive at the UPF from the radio access side. The PDI can therefore use Source Interface = Access. The rule can additionally use a Local F-TEID to identify the GTP-U tunnel and a UE IP Address to identify the UE traffic. A typical uplink PDR may therefore require:

  • Source Interface is Access;

  • the incoming GTP-U packet matches the specified F-TEID, including the relevant TEID and address information;

  • the UE IP address matches the address associated with the session.

When the conditions are satisfied, the PDR matches. Because traffic received over N3 is normally encapsulated in GTP-U, Outer Header Removal can instruct the UPF to remove the GTP-U/UDP/IP outer headers before the packet is processed according to the associated FAR.

Downlink detection starts from the opposite direction. Packets typically arrive from a data network toward the UPF, so the PDI can use Source Interface = Core. In this case, parameters such as the Network Instance and UE IP Address can be used to determine which PDU Session the packet belongs to. A typical downlink PDR may therefore require:

  • Source Interface is Core;

  • the Network Instance matches the required logical network, such as "internet" or "ims";

  • the packet destination matches the UE IP address associated with the session.

After the downlink PDR matches, the associated FAR determines how the packet should be forwarded toward the access side, including the required tunnel forwarding behavior. The difference between uplink and downlink PDRs therefore reflects the direction from which packets enter the UPF and the information available for identifying them.

Uplink Access PDR and downlink Core PDR matching based on F-TEID, Network Instance, and UE IP Address on the N4 interface

How Do PDR, FAR, QER, and URR Work Together?

A PDR solves the packet-identification problem, but it does not represent the entire user-plane processing policy. PFCP separates packet detection, forwarding, QoS enforcement, and usage measurement into different rule types. This separation allows each rule to perform a specific function while still operating within the same PFCP session.

PDR: What traffic is this? (Detection and classification)
FAR: What should happen to it and where should it go? (Forwarding action)
QER: What QoS treatment should apply? (QoS enforcement)
URR: How should its usage be measured and reported? (Usage reporting)

Consider an uplink packet that matches a PDR. Once the UPF determines which UE and service flow the packet belongs to, it can remove the required GTP-U outer header, apply the forwarding behavior referenced by the FAR, enforce the applicable QER, and account for traffic according to the associated URR. The packet-detection result therefore provides the context needed for all subsequent operations.

From an engineering perspective, PDR should not be viewed as an isolated forwarding policy. It is the entry point into the PFCP user-plane rule set. Once the relationship between PDR for classification, PDI for matching criteria, and FAR/QER/URR for subsequent processing is clear, parameters such as Source Interface, F-TEID, UE IP Address, and SDF Filter become much easier to understand in actual N4 signaling and packet analysis.

FAQ

When Does PDR Precedence Have No Practical Effect on the Result?

Precedence is used when the UPF evaluates PDRs within a PFCP session. If the PDI conditions of two rules are completely mutually exclusive, however, the two PDRs cannot match the same packet, so their relative precedence does not change the final match. Precedence becomes particularly important when rule conditions overlap and more than one PDR could otherwise match the same traffic.

Does a PDR Need to Be Updated If the UE IP Address Changes?

If the UE address used as a PDI matching condition changes, the rule associated with that address must also reflect the updated session information. The SMF can update relevant PDR information through PFCP Session Modification so that the UPF continues to classify the UE traffic correctly.

Can a PDR Match a Broad Range of Traffic Instead of a Single Port?

Yes. SDF filtering does not require every possible field to restrict traffic to one specific port. Depending on the rule definition, port ranges or less restrictive matching conditions can be used to cover a broader set of traffic. Address masks can also be used where the applicable filter definition requires matching an address range.

What Happens If a Packet Does Not Match a PDR?

If an incoming packet cannot be associated with an applicable PDR, the UPF has no matching packet-processing rule for that traffic within the relevant context. The resulting handling depends on the applicable PFCP rules, UPF implementation, and session configuration. In troubleshooting, an unexpected PDR mismatch is therefore an important point to investigate when traffic reaches the UPF but is not forwarded as expected.

How Are PDRs Related to Predefined Rules?

PFCP supports predefined rules that are already provisioned in the UP function and can be activated when required. Instead of repeatedly provisioning every rule parameter for applicable scenarios, the control plane can activate the corresponding predefined rule. This can reduce the amount of signaling required when the same rule sets are reused across suitable sessions.

Recommended Products
catalogue
customer service Phone
We use cookie to improve your online experience. By continuing to browse this website, you agree to our use of cookie.

Cookies

This Cookie Policy explains how we use cookies and similar technologies when you access or use our website and related services. Please read this Policy together with our Terms and Conditions and Privacy Policy so that you understand how we collect, use, and protect information.

By continuing to access or use our Services, you acknowledge that cookies and similar technologies may be used as described in this Policy, subject to applicable law and your available choices.

Updates to This Cookie Policy

We may revise this Cookie Policy from time to time to reflect changes in legal requirements, technology, or our business practices. When we make updates, the revised version will be posted on this page and will become effective from the date of publication unless otherwise required by law.

Where required, we will provide additional notice or request your consent before applying material changes that affect your rights or choices.

What Are Cookies?

Cookies are small text files placed on your device when you visit a website or interact with certain online content. They help websites recognize your browser or device, remember your preferences, support essential functionality, and improve the overall user experience.

In this Cookie Policy, the term “cookies” also includes similar technologies such as pixels, tags, web beacons, and other tracking tools that perform comparable functions.

Why We Use Cookies

We use cookies to help our website function properly, remember user preferences, enhance website performance, understand how visitors interact with our pages, and support security, analytics, and marketing activities where permitted by law.

We use cookies to keep our website functional, secure, efficient, and more relevant to your browsing experience.

Categories of Cookies We Use

Strictly Necessary Cookies

These cookies are essential for the operation of the website and cannot be disabled in our systems where they are required to provide the service you request. They are typically set in response to actions such as setting privacy preferences, signing in, or submitting forms.

Without these cookies, certain parts of the website may not function correctly.

Functional Cookies

Functional cookies enable enhanced features and personalization, such as remembering your preferences, language settings, or previously selected options. These cookies may be set by us or by third-party providers whose services are integrated into our website.

If you disable these cookies, some services or features may not work as intended.

Performance and Analytics Cookies

These cookies help us understand how visitors use our website by collecting information such as traffic sources, page visits, navigation behavior, and general interaction patterns. In many cases, this information is aggregated and does not directly identify individual users.

We use this information to improve website performance, usability, and content relevance.

Targeting and Advertising Cookies

These cookies may be placed by our advertising or marketing partners to help deliver more relevant ads and measure the effectiveness of campaigns. They may use information about your browsing activity across different websites and services to build a profile of your interests.

These cookies generally do not store directly identifying personal information, but they may identify your browser or device.

First-Party and Third-Party Cookies

Some cookies are set directly by our website and are referred to as first-party cookies. Other cookies are set by third-party services, such as analytics providers, embedded content providers, or advertising partners, and are referred to as third-party cookies.

Third-party providers may use their own cookies in accordance with their own privacy and cookie policies.

Information Collected Through Cookies

Depending on the type of cookie used, the information collected may include browser type, device type, IP address, referring website, pages viewed, time spent on pages, clickstream behavior, and general usage patterns.

This information helps us maintain the website, improve performance, enhance security, and provide a better user experience.

Your Cookie Choices

You can control or disable cookies through your browser settings and, where available, through our cookie consent or preference management tools. Depending on your location, you may also have the right to accept or reject certain categories of cookies, especially those used for analytics, personalization, or advertising purposes.

Please note that blocking or deleting certain cookies may affect the availability, functionality, or performance of some parts of the website.

Restricting cookies may limit certain features and reduce the quality of your experience on the website.

Cookies in Mobile Applications

Where our mobile applications use cookie-like technologies, they are generally limited to those required for core functionality, security, and service delivery. Disabling these essential technologies may affect the normal operation of the application.

We do not use essential mobile application cookies to store unnecessary personal information.

How to Manage Cookies

Most web browsers allow you to manage cookies through browser settings. You can usually choose to block, delete, or receive alerts before cookies are stored. Because browser controls vary, please refer to your browser provider’s support documentation for details on how to manage cookie settings.

Contact Us

If you have any questions about this Cookie Policy or our use of cookies and similar technologies, please contact us at support@becke.cc .