Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
ISO/IEC 29341-8-3 defines the UPnP QoS Policy service, the component responsible for storing, evaluating, and distributing QoS policies within a UPnP network. While the QoS Device service handles the mechanics of traffic shaping, the QoS Policy service provides the rule engine that determines which traffic flows receive which level of service. It acts as the central authority for admission control decisions, ensuring that bandwidth allocation aligns with administrative rules and service-level agreements.
The QoS Policy service maintains a policy database that maps traffic characteristics — identified by source and destination addresses, protocol types, port numbers, or application signatures — to traffic class identifiers and TSPEC parameters. When the QoS Manager receives a QoS request from an application, it forwards the request to the Policy service for evaluation. The Policy service consults its rule set, applies priority and pre-emption logic, and returns an allow or deny decision along with the applicable traffic class and TSPEC.
The standard defines a policy as a set of conditions and associated actions. Conditions can be simple (e.g., “source IP = 192.168.1.100”) or compound (e.g., “source subnet = 192.168.1.0/24 AND destination port = 5060 AND protocol = UDP”). Actions specify the traffic class assignment, bandwidth parameters, and optionally a pre-emption priority. Policies are stored as entries in the QosPolicyTable state variable, which is an array of policy record structures.
| Policy Field | Description | Example Value |
|---|---|---|
| PolicyID | Unique identifier for the policy record | “POLICY_VOIP_001” |
| Condition | Traffic matching expression | “IP_SRC=192.168.1.0/24 & UDP_PORT=5060” |
| TrafficClass | Assigned QoS class (0–7) | 5 (Interactive Voice) |
| BandwidthGuarantee | Minimum reserved bandwidth in kbps | 128 |
| BandwidthLimit | Maximum allowed bandwidth in kbps | 384 |
| PreEmptionPriority | Priority level for pre-emption (0=lowest, 7=highest) | 6 |
| ValidityPeriod | Time window when this policy is active | “MON-FRI 09:00-17:00” |
The evaluation model uses a first-match paradigm: policies are ordered by priority in the table, and the first policy whose conditions match the traffic flow is applied. If no policy matches, a configurable default policy is used — typically assigning Best Effort (Class 0) with no bandwidth guarantees. This model is simple to implement and provides predictable behavior, but it requires careful policy ordering to avoid unintended matches.
In a UPnP QoS network, the Policy service may be distributed across multiple devices for redundancy. The standard specifies a synchronization mechanism based on UPnP eventing: when a policy is added, modified, or removed, the Policy service publishes an event containing the updated policy table. Other Policy service instances in the same QoS Domain receive the event and update their local copies. Conflict resolution follows a “last writer wins” rule, with the writer identified by its UPnP device UUID.
Policy persistence is also addressed. The standard recommends that the Policy service store its rule set in non-volatile memory and reload it on startup. However, it also defines a bootstrap procedure where a newly initialized Policy service can learn the active policy set from a peer via the GetQosPolicy action. This is particularly useful in hot-standby redundancy scenarios.
Beyond basic traffic classification, the QoS Policy service supports several advanced features. Time-based policies allow different QoS rules to apply during business hours versus off-peak times. Application-specific policies can identify traffic by well-known port numbers or protocol signatures. User-based policies (when combined with a UPnP authentication mechanism) can assign QoS classes based on the user identity associated with a traffic flow. These features make the Policy service a powerful tool for managing complex network environments.
The QoS Policy service also supports policy inheritance and override mechanisms. A child device can inherit policies from its parent domain while allowing specific overrides for local requirements. This hierarchical policy model is especially valuable in managed network environments such as enterprises or multi-dwelling units, where a central IT team defines global policies and individual departments or tenants can customize their own local rules within the boundaries set by the global policy framework.
How many policies can the QoS Policy service handle?
The standard does not specify a hard limit, but practical deployments typically support hundreds to low thousands of policy entries. The actual limit depends on the device’s memory capacity and the required policy evaluation throughput for new flow setup requests.
Can policies be grouped or organized hierarchically?
The standard does not mandate hierarchical policy grouping, but the policy table structure allows for policy IDs with implicit hierarchy (e.g., “VOIP/INTERNAL”, “VOIP/EXTERNAL”). Implementations can use this convention to simulate policy groups for administrative convenience.
What happens when a policy evaluation fails due to an internal error?
The Policy service should return a “Policy Evaluation Failed” error code to the QoS Manager, which then falls back to the default policy. The service should also log the failure for administrative review.
Does the standard support policy prioritization beyond table ordering?
Yes, each policy entry has a numeric priority field. When two policies have overlapping conditions, the one with the higher numeric priority wins regardless of its position in the table. Table ordering serves as a tie-breaker for policies with equal priority.