ON THIS PAGE
Example: Configure GBR Forwarding on Junos Multi-Access User Plane
Overview
This example shows how to configure GBR and best-effort forwarding on the Junos Multi-Access User Plane. GBR queues enable you to prioritize traffic. You can also guarantee a minimum bandwidth for GBR traffic.
Junos OS handles subscriber traffic differently depending on the Transport Level Marking (TLM) assigned to it. The TLM contains a DSCP value, which classifiers use to map the traffic to the appropriate forwarding class. Each forwarding class is associated with an output queue on the VRF loopback interface of the anchor Packet Forwarding Engine.
We support eight queues on the VRF interface, of which four are GBR queues and four are best-effort queues. These queues are preconfigured with a fixed set of attributes. You cannot modify the queue configurations.
Queue Number | Queue Name | Description |
---|---|---|
0 | be-low-0 | Best effort queue with lowest priority |
1 | be-low-1 | Best effort queue with low to medium priority |
2 | be-high-0 | Best effort queue with medium to high priority |
3 | be-high-1 | Best effort queue with highest priority |
4 | gbr-low | GBR queue with low priority |
5 | gbr-med | GBR queue with medium priority |
6 | gbr-high | GBR queue with high priority |
7 | express | GBR queue with highest priority |
Make sure that you map the forwarding classes to the correct queues. You can use different names for the forwarding classes, but you must map the queues correctly.
If the TLM provided for a new or modified GBR bearer or flow maps to a non-GBR queue, the system rejects the session establishment or modification. Make sure that the TLM configurations for the control plane and user plane are consistent.
In this example, we define eight forwarding classes and map the classes to the VRF
queues. We define a classifier, upf-class-1
, and configure the
forwarding classes, their PLP values, and the applicable DSCP values. We define
another classifier called upf-class-2
and configure the default
mapping for DSCP. We add these classifiers to peer routing instances associated with
the outgoing interfaces on the gateway upf
. Classifier
upf-class-1
handles traffic for routing instances
4g-access
and 4g-core
. Classifier
upf-class-2
handles traffic for all other routing instances.
You can optionally define the fraction of the system bandwidth reserved for GBR
queues.
Requirements
This example uses the following hardware and software components:
-
MX480 (can also be MX240, MX960) router configured as an SAEGW-U or a UPF
-
Junos OS Releases 22.2R1 or later
Configuration
CLI Quick Configuration
To quickly configure this example, copy the following commands and paste them into a text file. Remove any line breaks, and change any details necessary to match your network configuration. Copy and paste the commands into the CLI at the [edit] hierarchy level.
set class-of-service forwarding-classes class be-low-0 queue-num 0 set class-of-service forwarding-classes class be-low-1 queue-num 1 set class-of-service forwarding-classes class be-high-0 queue-num 2 set class-of-service forwarding-classes class be-high-1 queue-num 3 set class-of-service forwarding-classes class gbr-low queue-num 4 set class-of-service forwarding-classes class gbr-med queue-num 5 set class-of-service forwarding-classes class gbr-high queue-num 6 set class-of-service forwarding-classes class express queue-num 7 set class-of-service classifiers dscp upf-class-1 import default set class-of-service classifiers dscp upf-class-1 forwarding-class be-high-0 loss-priority low code-points cs1 set class-of-service classifiers dscp upf-class-1 forwarding-class be-high-0 loss-priority low code-points cs2 set class-of-service classifiers dscp upf-class-1 forwarding-class be-high-0 loss-priority low code-points cs3 set class-of-service classifiers dscp upf-class-1 forwarding-class be-high-0 loss-priority low code-points cs4 set class-of-service classifiers dscp upf-class-1 forwarding-class be-high-0 loss-priority low code-points cs5 set class-of-service classifiers dscp upf-class-1 forwarding-class be-high-1 loss-priority medium-low code-points nc1 set class-of-service classifiers dscp upf-class-1 forwarding-class be-low-0 loss-priority medium-high code-points be set class-of-service classifiers dscp upf-class-1 forwarding-class be-low-1 loss-priority high code-points nc2 set class-of-service classifiers dscp upf-class-1 forwarding-class express loss-priority high code-points ef set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-high loss-priority low code-points af11 set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-high loss-priority low code-points af12 set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-high loss-priority low code-points af13 set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-low loss-priority medium-high code-points af31 set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-low loss-priority medium-high code-points af32 set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-low loss-priority medium-high code-points af33 set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-low loss-priority medium-high code-points af41 set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-low loss-priority medium-high code-points af42 set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-low loss-priority medium-high code-points af43 set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-med loss-priority medium-low code-points af21 set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-med loss-priority medium-low code-points af22 set class-of-service classifiers dscp upf-class-1 forwarding-class gbr-med loss-priority medium-low code-points af23 set services mobile-edge gateways saegw upf system class-of-service downlink-dscp-to-forwarding-class classifier upf-class-1 routing-instance 4g-access set services mobile-edge gateways saegw upf system class-of-service downlink-dscp-to-forwarding-class classifier upf-class-1 routing-instance 4g-core set services mobile-edge gateways saegw upf system class-of-service downlink-dscp-to-forwarding-class classifier upf-class-2 set services mobile-edge gateways saegw upf system class-of-service reserved-bandwidth express 2 set services mobile-edge gateways saegw upf system class-of-service reserved-bandwidth gbr 10
Step-By-Step Procedure
To configure GBR and best-effort forwarding, follow the steps below:
-
Define eight forwarding classes and map them to the output queues on the VRF loopback interface.
[edit class-of-service forwarding-classes] user@host# set class be-low-0 queue-num 0 user@host# set class be-low-1 queue-num 1 user@host# set class be-high-0 queue-num 2 user@host# set class be-high-1 queue-num 3 user@host# set class gbr-low queue-num 4 user@host# set class gbr-med queue-num 5 user@host# set class gbr-high queue-num 6 user@host# set class express queue-num 7
-
Define and configure the classifiers that will map the DSCP values to the forwarding classes. You can configure the forwarding class, the PLP value, and the DSCP values that the classifier applies to.
[edit class-of-service] user@host# set classifiers dscp upf-class-1 user@host# set classifiers dscp upf-class-2 [edit class-of-service classifiers dscp upf-class-1] user@host# set import default user@host# set forwarding-class be-high-0 loss-priority low code-points [ cs1 cs2 cs3 cs4 cs5 ] user@host# set forwarding-class be-high-1 loss-priority medium-low code-points nc1 user@host# set forwarding-class be-low-0 loss-priority medium-high code-points be user@host# set forwarding-class be-low-1 loss-priority high code-points nc2 user@host# set forwarding-class express loss-priority high code-points ef user@host# set forwarding-class gbr-high loss-priority low code-points [ af11 af12 af13 ] user@host# set forwarding-class gbr-low loss-priority medium-high code-points [ af31 af32 af33 af41 af42 af43 ] user@host# set forwarding-class gbr-med loss-priority medium-low code-points [ af21 af22 af23 ] [edit class-of-service classifiers dscp upf-class-2] user@host# set import default
-
Assign the classifiers to routing instances associated with the outgoing interfaces. If you do not assign any routing instance to a classifier, the system uses the classifier for all routing instances without an assigned classifier.
[edit services mobile-edge gateways saegw upf system class-of-service downlink-dscp-to-forwarding-class] user@host# set classifier upf-class-1 routing-instance 4g-access user@host# set classifier upf-class-1 routing-instance 4g-core user@host# set classifier upf-class-2
-
(Optional) Reserve a percentage of the total bandwidth for the express and GBR queues. The system reserves the same percentage of bandwidth across all anchor Packet Forwarding Engines.
[edit services mobile-edge gateways saegw upf system class-of-service reserved-bandwidth] user@host# set express 2 user@host# set gbr 10
Results
From configuration mode, confirm your configuration by entering the show
services
and show class-of-service
commands. If
the output does not display the intended configuration, repeat the instructions
in this example to correct the configuration.
user@host# show class-of-service forwarding-classes { class be-high-0 queue-num 2; class be-high-1 queue-num 3; class be-low-0 queue-num 0; class be-low-1 queue-num 1; class express queue-num 7; class gbr-high queue-num 6; class gbr-low queue-num 4; class gbr-med queue-num 5; } classifiers { dscp upf-class-1 { import default; forwarding-class be-high-0 { loss-priority low code-points [ cs1 cs2 cs3 cs4 cs5 ]; } forwarding-class be-high-1 { loss-priority medium-low code-points nc1; } forwarding-class be-low-0 { loss-priority medium-high code-points nc2; } forwarding-class be-low-1 { loss-priority high code-points be; } forwarding-class express { loss-priority high code-points ef; } forwarding-class gbr-high { loss-priority low code-points [ af11 af12 af13 ]; } forwarding-class gbr-low { loss-priority medium-high code-points [ af31 af32 af33 af41 af42 af43 ]; } forwarding-class gbr-med { loss-priority medium-low code-points [ af21 af22 af23 ]; } } dscp upf-class-2 { import default; } }
user@host# show services mobile-edge { gateways { saegw upf { system { class-of-service { downlink-dscp-to-forwarding-class { classifier upf-class-2; classifier upf-class-1 { routing-instance 4g-access; routing-instance 4g-core; } } reserved-bandwidth { express 2; gbr 10; } } } } } }
Verification
Use various show
commands to verify that the GBR forwarding is
functioning properly.
Verify Forwarding Queue Configuration
Purpose
Display the configuration of the forwarding queues and verify that the system reserves bandwidth for the GBR queues.
Action
At the CLI, enter the show services mobile-edge anchor
class-of-service
command.
user@host> show services mobile-edge anchor class-of-service Downlink forwarding queues/classes of service: Queue 0 (BE-LOW-0) Guaranteed priority: low Excess priority: low Reserved Bandwidth: 0 % Weight: 10 Queue 1 (BE-LOW-1) Guaranteed priority: low Excess priority: low Reserved Bandwidth: 0 % Weight: 20 Queue 2 (BE-HIGH-0) Guaranteed priority: low Excess priority: high Reserved Bandwidth: 0 % Weight: 20 Queue 3 (BE-HIGH-1) Guaranteed priority: low Excess priority: high Reserved Bandwidth: 0 % Weight: 50 Queue 4 (GBR-LOW) Guaranteed priority: low Excess priority: low Reserved Bandwidth: 10 % Weight: 0 Queue 5 (GBR-MEDIUM) Guaranteed priority: medium-high Excess priority: low Reserved Bandwidth: 10 % Weight: 0 Queue 6 (GBR-HIGH) Guaranteed priority: high Excess priority: low Reserved Bandwidth: 10 % Weight: 0 Queue 7 (EXPRESS) Guaranteed priority: strict-high Excess priority: low Reserved Bandwidth: 2 % Weight: 0
Verify GBR and Non-GBR Flows
Purpose
Verify that the system classifies traffic into GBR and non-GBR bearers or flows.
Action
At the CLI, enter the show services mobile-edge sessions
summary
command.
user@host> show services mobile-edge sessions summary Sessions by State: ESTABLISHED: 2000 Total: 2000 Bearers by State: ESTABLISHED: 2000 Total: 2000 Bearers by Downlink FAR State: FORWARD: 2000 Total: 2000 Bearers by Resource Type: Non-GBR: 2000 Total: 2000 5G QoS Flows by State: ESTABLISHED: 4000 Total: 4000 5G QoS Flows by Resource Type: GBR: 2000 Non-GBR: 2000 Total: 4000