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 labels | Network Service Description |
---|---|
DOWNLINK_S_UPLINK_S | small downlink and uplink bandwidth |
DOWNLINK_S_UPLINK_M | small downlink and medium uplink bandwidth |
DOWNLINK_S_UPLINK_L | small downlink and large uplink bandwidth |
DOWNLINK_M_UPLINK_S | medium downlink and small uplink bandwidth |
DOWNLINK_M_UPLINK_M | medium downlink and medium uplink bandwidth |
DOWNLINK_M_UPLINK_L | medium downlink and large uplink bandwidth |
DOWNLINK_L_UPLINK_S | large downlink and small uplink bandwidth |
DOWNLINK_L_UPLINK_M | large downlink and medium uplink bandwidth |
DOWNLINK_L_UPLINK_L | large 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.
Keep track of your session statuses and learn more about the QoD session life cycle.
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 labels | Network Service Description |
---|---|
QOS_E | Maintains stable latency under congestion with limited bandwidth. |
QOS_L | Prioritizes the throughput up to a certain higher limit or no explicit limit. |
QOS_M | Prioritizes the throughput up to a certain medium limit. |
QOS_S | Prioritizes 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(
service_ipv4="233.252.0.2",
service_ipv6="2001:db8:1234:5678:9abc:def0:fedc:ba98",
profile="QOS_L"
)
# Show a list of all the QoD sessions associated with a device
print(my_device.sessions())
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:
Parameter | Description |
---|---|
profile | The QoS profile that indicates the connection type to be prioritized between two points. |
service_ipv4 | The service identified by the application IPv4 address. |
service_ipv6 | The service identified by the application IPv6 address. |
Keywords:
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(
"QOS_L",
"233.252.0.2",
"2001:db8:1234:5678:9abc:def0:fedc:ba98"
)
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.