Use it when a QoS policy exists but has no effect, or is applied in the wrong direction.
Apply Policy
1. Apply a policy-map with service-policy input or output.
2. Direction matters; queuing only works outbound.
3. Counters prove matching.
4. Hierarchical policies for shaping + queuing.
5. Check drops per class.
policy-map → service-policy on interface → counters
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
service-policy input <policy>Primary Commands
Configuration and operational commands for this Topic.
service-policy input <policy>ReferenceApply a QoS policy to traffic entering the interface.
Use when: Use at the Control Plane Policing / CoPP boundary after prerequisite state is verified.
Quick note: Operational guidance. CoPP counters do not alone prove an attack or safe thresholds; legitimate bursts can exceed a poorly sized policer.
Cisco IOS / IOS XE · mixedservice-policy output <policy>ReferenceApply a QoS policy to traffic leaving the interface.
Use when: Use this command at the QoS boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. A configured policy-map does not prove attachment, matching traffic, congestion or end-to-end service quality.
Cisco IOS / IOS XE · mixedShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification and output interpretation Verify boundary
Use the applied-policy view to show the exact policy name, interface and direction, then send or observe representative traffic and confirm the expected class/action counters increment. If a policy appears in configuration but not in the operational attachment, treat it as inactive. When queueing is the concern, verify egress policy state and interface congestion together; ingress attachment cannot show egress scheduling behavior.
Step 2 Verification & troubleshooting Narrow the fault
1. Define trust boundary and traffic classes.
2. Verify class-map matches.
3. Verify policy actions.
4. Confirm service-policy interface/direction.
5. Generate representative load and read offered/drop/queue counters.
service-policy input|output <policy>applies a policy map to an interface.- Queuing policies normally apply outbound only.
- One policy per direction per interface.
show policy-map interface <interface>— policy applied and countersshow running-config interface <interface>— service-policy input/output
ReferenceImportant terms & boundaries4 sections · depth on demand
In depth
Applying a QoS policy
A policy map has no effect until it's attached with service-policy. Cisco's IOS XE QoS guide gives the syntax (service-policy {input | output} <policy> under the interface) and the limits: one input and one output policy per interface, queuing mechanisms only in the output direction, and non-queuing features such as policing and marking supported inbound.
Direction guide
| Direction | Typical use |
|---|---|
| Input | Classify and mark at trust boundaries; police incoming traffic |
| Output | Queue, shape and prioritise where congestion happens |
SW1(config)# interface GigabitEthernet1/0/5
SW1(config-if)# service-policy input ACCESS-MARKING
R1(config)# interface GigabitEthernet0/0/0
R1(config-if)# service-policy output SHAPE-100M
R1(config)# interface GigabitEthernet0/0/0.100
R1(config-subif)# service-policy output BRANCH-50M
R1# show running-config interface GigabitEthernet0/0/0 | include service-policy
service-policy output SHAPE-100M
R1# show policy-map interface GigabitEthernet0/0/0 output | include Service-policy|Class-map
Service-policy output: SHAPE-100M
Class-map: class-default (match-any)
Service-policy : WAN-EDGE-OUT
Class-map: VOICE (match-any)
Where to apply
| Location | Policy |
|---|---|
| Access ports | Input: trust phones, classify and mark PCs |
| Access uplinks | Output: queuing (platform-specific) |
| WAN / Internet edge | Output: shape to the provider rate, queue inside |
| Tunnels | Output on the tunnel or physical interface, depending on platform |
| Wireless | Controller policy profiles and AP QoS |
Rejections and errors
| Message type | Cause |
|---|---|
| Policy rejected on input | Queuing actions in an input policy |
| Bandwidth exceeds available | Percentages or rates larger than the interface or shaper |
| Unsupported on platform | Feature not available on that interface type |
Shaping is essential on sub-rate links
If the provider's service is slower than the physical interface (100 Mbit/s on a 1 Gbit/s port), the router never sees congestion, so queuing doesn't trigger; shape to the contracted rate and queue inside the shaper.
Documented example, not captured output.
Quick reference
Applying a QoS policy attaches a policy map to an interface in one direction with service-policy input|output. Marking and policing usually go inbound at the trust boundary; queuing and shaping go outbound where congestion occurs.
interface Gi1/0/10
service-policy input ACCESS-MARKING
interface Gi0/0
service-policy output WAN-SHAPER
Documented example, not captured output.
Catalyst switches also need queuing configured on egress ports; some platforms restrict which actions are allowed in each direction.
State model and technical mechanics
A service policy turns reusable class/policy definitions into an active datapath function. Input policy observes packets as they enter the attachment point; output policy observes packets as they leave. Some platforms support different actions, queue structures or hierarchical policies depending on interface type and direction. The attachment point therefore changes semantics: an ingress marker before routing is different from an egress queue after route selection, and a parent policy on a tunnel or subinterface can constrain a child. Hardware QoS implementation can also map the abstract policy into platform-specific queues or policers while preserving the logical MQC contract shown in the configuration.
Limits and common misconceptions
Policy definition and policy attachment are different evidence layers. A correctly attached policy can still have no visible effect if no traffic matches or if the link is not congested enough for scheduler behavior to matter. Likewise, moving a policy from input to output is not a cosmetic change: it changes packet observation point and often the available QoS actions.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration model
Attach the policy at the interface and direction that matches the intended traffic boundary. Avoid duplicating the same action at multiple points unless the design explicitly needs it, because repeated remarking/policing can make counters difficult to interpret. Confirm platform support for the requested action on the chosen interface and document hierarchical relationships. When changing attachment, consider both traffic direction and where encapsulation, de-encapsulation, VLAN tags or tunnels exist, since classification fields available at one point may differ from another.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IP Services → QoS → Apply Policy. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc2475.html · confidence 94%Quick lookup tables
Apply Policy · technical reference
Compact mechanics, configuration and evidence boundaries for fast lookup.
| Attachment question | Meaning |
|---|---|
| Interface | Where policy is active |
| Input/output | Packet direction at that point |
| Counters | Matching/action evidence |
| Hierarchy | Parent/child resource relationship |