Introduction to the QoS Policy Holder
ISO/IEC 29341-11-12:2008 defines the QoS Policy Holder, the persistent storage and management entity for QoS policy rules within the UPnP QoS Architecture. The Policy Holder maintains an authoritative database of all QoS policies applicable to the network, providing create, read, update, and delete (CRUD) operations through a standardized UPnP service interface. It serves as the single source of truth for QoS policy decisions, ensuring consistent rule enforcement across all QoS Manager instances and network segments.
The QoS Policy Holder is the “rulebook” of the UPnP QoS framework. While the QoS Manager makes real-time admission decisions, the Policy Holder defines the rules that govern those decisions — including which traffic classes are permitted, which applications receive priority, and under what conditions preemption is allowed.
The Policy Holder service exposes actions including AddPolicy, UpdatePolicy, RemovePolicy, GetPolicy, GetAllPolicies, and GetPolicyChangeCounter. These actions operate on a policy database where each entry is a complete QoS policy rule as defined in ISO/IEC 29341-10-12, including the precedence value, traffic descriptor, traffic class assignment, action list, and optional validity schedule. The service also generates event notifications when policies are added, modified, or removed, enabling QoS Managers and other subscribed control points to maintain synchronized policy caches.
| Policy Holder Action |
Description |
Arguments |
Error Conditions |
| AddPolicy |
Adds a new policy rule to the database |
PolicyRule (complete rule structure) |
Duplicate precedence, invalid descriptor, storage full |
| UpdatePolicy |
Modifies an existing policy rule identified by its policy ID |
PolicyID, UpdatedRule fields |
PolicyID not found, version mismatch |
| RemovePolicy |
Deletes a policy rule from the database |
PolicyID |
PolicyID not found, rule is protected |
| GetPolicy |
Retrieves a specific policy rule by ID |
PolicyID |
PolicyID not found |
| GetAllPolicies |
Retrieves all policy rules, optionally filtered by traffic class |
Optional TrafficClass filter |
— |
| GetPolicyChangeCounter |
Returns the current policy change counter value |
— |
— |
The GetPolicyChangeCounter action provides an efficient polling-based change detection mechanism. QoS Managers and other subscribers can poll this counter periodically (rather than subscribing to events) and only retrieve the full policy set when the counter value changes, minimizing bandwidth overhead in networks with infrequent policy updates.
Policy Database Architecture and Versioning
The Policy Holder manages policies using a versioned database model. Each policy rule carries a PolicyID (a unique identifier assigned at creation time) and a VersionNumber (monotonically increasing with each update). The VersionNumber enables concurrent access consistency: a QoS Manager that retrieves a policy rule with a specific version can use conditional update operations to prevent lost-update conflicts when multiple managers or administrative tools modify the same policy simultaneously.
The policy database supports policy grouping through an optional PolicyGroup tag, enabling administrators to organize rules by application domain (e.g., “video-streaming”, “voice”, “gaming”), network segment, or device type. Grouping also facilitates bulk operations — the GetAllPolicies action can filter by group, and the RemovePolicy action can clear all policies belonging to a specific group when a device or service is decommissioned.
Engineering Design Insights
Effective deployment of the QoS Policy Holder requires attention to several design considerations:
- Policy storage capacity planning: Home network devices commonly implement the Policy Holder on resource-constrained platforms (e.g., residential gateways with limited flash storage). Engineers should plan for a minimum of 128 policy rules as a baseline, with 512 or more for advanced deployments. The standard allows the Policy Holder to report maximum capacity via its device description, enabling the QoS Manager to make policy-addition decisions accordingly.
- Protected policy rules: The standard defines a “protected” flag that prevents a policy rule from being modified or removed through standard UpdatePolicy/RemovePolicy actions. Protected rules are typically manufacturer-defined default policies (e.g., “always prioritize DHCP and DNS traffic”) that ensure basic network functionality remains operational even if the policy database is misconfigured through administrative tools.
- Policy validation and conflict detection: Before accepting an AddPolicy or UpdatePolicy request, the Policy Holder should validate the rule structure for internal consistency — checking that the traffic descriptor is well-formed, that the precedence value is within the allowed range, and that the referenced traffic class is supported by the devices on the network. Advanced implementations may also perform cross-rule conflict detection to warn administrators about overlapping descriptors with inconsistent traffic class assignments.
Policy rules that are too broad (e.g., a single rule matching all TCP traffic and assigning it to TrafficClass 7) can cause unintended prioritization of bulk data transfers over real-time applications. Engineers should design policy rules with appropriate specificity — matching on port ranges, application signatures, or DSCP values — to ensure that prioritization is applied only where it is needed.
Event Notification and Cache Synchronization
The QoS Policy Holder implements the standard UPnP eventing mechanism. When a policy is added, updated, or removed, the Policy Holder sends a PolicyChanged event to all subscribed control points (typically QoS Managers and administrative tools). The event payload includes the PolicyChangeCounter value and the PolicyID of the affected rule, allowing subscribers to incrementally update their local caches rather than performing a full policy database retrieval on every change.
For network resilience, the Policy Holder should persist its policy database to non-volatile storage after every modification. On device restart, the Policy Holder reloads the policy database from persistent storage and sends a full policy set notification to all subscribers, ensuring that QoS Manager caches are resynchronized after any Policy Holder outage. This persistence and resynchronization mechanism is critical for maintaining consistent QoS behaviour across device reboots and network partitions.
Frequently Asked Questions
Q: Can there be multiple QoS Policy Holders on the same UPnP network?
A: Yes — a network may have multiple Policy Holders, each managing policies for different segments or device groups. The QoS Manager must query all available Policy Holders during admission control to obtain the complete policy set applicable to a traffic flow. Policy conflicts across multiple holders are resolved by the QoS Manager using a precedence-based merging algorithm: the most restrictive applicable policy wins.
Q: How does the Policy Holder handle factory reset scenarios?
A: The standard recommends that Policy Holder implementations support a “factory default” policy set that is restored when a device reset is triggered. Manufacturer-defined protected policies are included in this default set, while user-added policies are cleared. The QoS Manager is notified of the policy reset through a PolicyChanged event, triggering a full policy cache refresh.
Q: Is the QoS Policy Holder required to validate policies before storing them?
A: The standard mandates basic structural validation (correct formatting of required fields, valid value ranges), but complex semantic validation (e.g., verifying that referenced DSCP values are supported by network devices) is implementation-defined. Advanced Policy Holder implementations may integrate with the QoS Manager’s GetQoSDeviceInfo capabilities to perform cross-device policy validation during the AddPolicy operation.
Q: What security mechanisms protect the policy database from unauthorized modification?
A: The base UPnP QoS Architecture does not mandate specific security mechanisms for the Policy Holder interface. However, the UPnP Device Architecture (UDA) version 1.1 and later provides optional security features including action authorization and access control lists. Implementations targeting enterprise or service-provider deployments should enable these security features and additionally consider transport-layer protection (TLS) for Policy Holder communications.