Quality of Service (QoS) profiles

Oftentimes, it is necessary to manage or prioritize certain connectivity characteristics over a wide area network (WAN). Network-as-Code Quality-of-service on Demand (QoD) or QoS (CAMARA) profiles allow establishing these prioritized connections between devices or services and request on-demand capabilities from the network. Read more about it on the "What is Quality of Service (QoS)?" section.

Network-as-Code QoS profiles

You can choose the amount of bandwidth with an up/downlink profile label, according to your current demand. These are the specific Network-as-Code QoS profiles labels and their brief description:

QoS profile labelsNetwork Service Description
DOWNLINK_S_UPLINK_Ssmall downlink and uplink bandwidth
DOWNLINK_S_UPLINK_Msmall downlink and medium uplink bandwidth
DOWNLINK_S_UPLINK_Lsmall downlink and large uplink bandwidth
DOWNLINK_M_UPLINK_Smedium downlink and small uplink bandwidth
DOWNLINK_M_UPLINK_Mmedium downlink and medium uplink bandwidth
DOWNLINK_M_UPLINK_Lmedium downlink and large uplink bandwidth
DOWNLINK_L_UPLINK_Slarge downlink and small uplink bandwidth
DOWNLINK_L_UPLINK_Mlarge downlink and medium uplink bandwidth
DOWNLINK_L_UPLINK_Llarge downlink and large uplink bandwidth

NOTE: In each case, the network connection is given priority, which means that the network will aim at maintaining a stable connection at the desired level.

CAMARA QoS profiles

QoD Sessions also support the CAMARA QoS profile labels.

NOTE: You can learn more specifically about each label or its possible constraints here.

These are the currently available ones:

QOS Profile labelsNetwork Service Description
QOS_EMaintains stable latency under congestion with limited bandwidth.
QOS_LPrioritizes the throughput up to a certain higher limit or no explicit limit.
QOS_MPrioritizes the throughput up to a certain medium limit.
QOS_SPrioritizes the throughput up to a certain lower limit.

Good to know: The 5G System throughput refers to the ratio of data that can be transmitted in units of time, for example, bits per second(bps). In this case, a maximum throughput refers to a maximum rate at which data will be transmitted.

Using CAMARA QoS profile labels

import network_as_code as nac
from network_as_code.models.device import Device, DeviceIpv4Addr
client = nac.NetworkAsCodeClient(...)
my_device = client.devices.get(...)
# Here you can create a QoD session,
# identify the service IP address(es) and the network profile
my_session = device.create_qod_session(
# Show a list of all the QoD sessions associated with a device

Session parameters

What we've just done is instruct Network as Code to set up a session between a device and the service identified by the IP addresses and the CAMARA QoS profile. Then, we've printed a list of all the QoD sessions that have been created for this device. Here are the parameters used:

profileThe QoS profile that indicates the connection type to be prioritized between two points.
service_ipv4The service identified by the application IPv4 address.
service_ipv6The service identified by the application IPv6 address.


If you want to create the QoD session object without passing its parameters by name (keywords), then remember that their ordering will be important for your code to work properly. In which case, you will need to inform the QoS profile before the IP address(es). For example:

session = device.create_qod_session(

Note that the snippets above assume you have already created a QoD session before, which you can learn how to do here. It also implies that you have already created a Network-as-Code client and identified your mobile network device.

Last updated on May 23, 2024