Constrained Shortest Path First (CSPF) is a way of computing a network path after removing links that do not satisfy the requirements of a particular service. In a traffic-engineering design, a path may need available bandwidth, a particular administrative color, or another supported property in addition to a low routing metric. CSPF does not replace ordinary IP shortest-path routing for every packet, and it does not guarantee that a path will succeed merely because a calculation returns a sequence of links.
The useful question is: “Can this traffic-engineered path be built over links that meet its constraints?” That is different from: “What route would an ordinary IP packet follow right now?” MPLS traffic engineering and PCE-based architectures use constraint-based path computation in specific contexts. Actual signaling, forwarding and resource admission depend on the chosen technology and platform.
Why ordinary SPF and CSPF answer different questions
Ordinary link-state routing computes paths based on the topology and link metrics known to the routing process. In a simplified example, the least-cost route from A to D may be A–B–D because its total configured metric is 20, while A–C–D has a metric of 30. If the service requires 5 Gbps of available bandwidth and B–D has only 2 Gbps available under the chosen traffic-engineering model, the least-cost route may be ineligible. CSPF can remove B–D from the candidate graph and then find A–C–D.
This example shows why a constrained result can be longer in terms of cost or hops. It also shows why the constraint must have a defined meaning. Available reservable bandwidth is not necessarily the same as observed idle traffic on an interface. Engineering a reliable service requires an agreed traffic-engineering database and an actual mechanism that uses its path decision.
What information is required for a constrained calculation
A CSPF computation needs topology information and the properties relevant to the requested service. Traffic-engineering extensions to routing protocols can advertise attributes to populate a traffic engineering database (TED), such as administrative groups or reservable bandwidth, where supported. The path computation element applies policy and requested constraints to this view of the network.
If the TED is stale or incomplete, the resulting path may no longer be feasible. A link can become congested, a router can fail, or another service can reserve resources between path calculation and signaling. RFC 4655 explicitly discusses the tension between computation state and actual network resources. A controller or PCE can improve planning but cannot create a mathematical guarantee that the physical network will remain available.
Hard constraints, preferences and exclusions
Some requests are hard requirements: a path must avoid a particular link, stay inside an allowed administrative group, or have sufficient reservable capacity. Other values are preferences: lower cost, fewer links or improved latency when several feasible paths remain. The precise treatment depends on the implementation. Do not assume that one vendor’s affinity-bit syntax, priority conventions or path-protection features transfer unchanged to another platform.
For example, an operator might label links crossing a particular maintenance zone and require that a sensitive traffic-engineered service avoid that zone during a scheduled change. The attribute is only useful if the TED accurately reflects the link labels, and if the path computation and signaling processes enforce the requirement. A misapplied administrative group can make a feasible network look disconnected, or worse, permit an unapproved segment into the chosen path.
How CSPF relates to RSVP-TE and MPLS
RSVP-TE, described by RFC 3209, extends RSVP signaling to establish explicitly routed MPLS label-switched paths. The ingress node can supply an explicit route object for the path, whether the route was computed locally, requested from another component, or administratively specified. The calculation and the signaling are distinct steps. CSPF may determine a candidate path; RSVP-TE then attempts to establish the relevant signaling and resource state along that path where supported.
An ingress device can compute a valid-looking explicit route, only for an intermediate hop to reject the signaling request because a constraint changed or a required feature is unavailable. Operators must distinguish “calculation succeeded,” “LSP was established,” and “application traffic followed the LSP.” For background on MPLS label forwarding, the site’s MPLS labels and forwarding guide addresses a separate layer of the mechanism.
Path Computation Elements in larger networks
RFC 4655 describes a Path Computation Element (PCE) architecture in which a path computation client can request a path from a component responsible for evaluating network graph information and constraints. A PCE may be in a router or external system, and deployments may use centralized, distributed or cooperative arrangements. The architecture does not require every network to have a single omniscient controller.
A PCE may not know all resources of a multi-domain network, and a stateless computation does not track every live reservation. A stateful design can use more detailed information about existing paths but must manage synchronization and concurrency. In a large deployment, the amount of trustworthy TE data and operational consistency can matter more than whether the path-computation algorithm is described as centralized or distributed.
A worked decision: bandwidth and administrative intent
Suppose a data-center service needs to cross between two sites with a minimum reserved capacity on links that meet an assigned security-zone label. There are two available routes: one is short but traverses a disallowed link; another is longer, meets the administrative constraint, and has adequate reservable bandwidth. A CSPF computation can select the longer candidate. Before treating it as operational, verify that the path signaling supports its constraints, forwarding is installed, the expected traffic matches it, and a protection path can be established if required.
If no candidate passes the hard constraints, the correct result may be “no feasible path.” Automatically dropping the constraint just to produce a route can violate the original service contract. Where the design allows fallback behavior, make that an explicit policy with a documented exception and appropriate visibility. That decision is about service intent, not a defect in the shortest-path algorithm.
Common failure modes and how to investigate them
- Missing TE attributes: the router may learn the IP route but lack the resource or policy attributes needed for constraint-based computation.
- Stale TED information: a recently changed link may still appear available in the compute view; compare control-plane data with current interface state.
- Incompatible signaling: the calculated explicit route may include a hop unable to support the required TE or protection behavior.
- Resource contention: multiple requests can compete for reservations that looked available when each path was calculated.
- Unexpected data-plane path: the path can be established but the intended traffic may not be classified into it or may use a different forwarding rule.
A disciplined troubleshooting sequence inspects the requested constraints, TED view, computed path, signaling outcome, installed forwarding entry and measured traffic path separately. A configured objective does not make every layer of that chain correct. For the related decision of whether to use SD-WAN, SDN or an MPLS service, the SDN/SD-WAN/MPLS comparison addresses a higher-level architecture choice.
Where CSPF should and should not be used
CSPF belongs to a network design in which topology, path constraints and a mechanism for steering or establishing paths are defined. It is useful for some traffic-engineered MPLS and related environments; it is not proof that every Internet router performs a bandwidth-constrained calculation for each packet. IP routing, load balancing, segment routing and policy-based paths have distinct control-plane and forwarding mechanisms even when some share a constrained-path idea.
For smaller networks with no TE requirement, ordinary routing may be simpler and more predictable. Adding a computation system introduces operational work: topology synchronization, access control, version compatibility and failover behavior. Adopt CSPF because the service needs a constrained path and the network can implement it, not because “shortest path” sounds insufficiently sophisticated.
Checklist before accepting a computed path
Why two constrained paths can still conflict
Suppose two application teams independently request a 5-Gbps reserved path across the same 8-Gbps-capacity link. Both requests might be calculated against a TE database snapshot that reports enough capacity for one request. If the first service reserves its bandwidth, the second may fail when it attempts to establish the path. That behavior does not mean CSPF ignored the constraint; it means resource state and path computation were not perfectly synchronized at the moment of two independent decisions.
In a production environment, path admission, update ordering, reservation priorities and preemption policy require separate design. A high-priority service may be permitted to replace an existing reservation, but doing so can disrupt another application. The policy therefore needs explicit service ownership and business impact, not a generic “always prefer highest priority” switch. Simulate the contention case or evaluate it in a controlled lab before allowing automated reoptimization to affect critical traffic.
What operational evidence closes a path-selection incident
An engineer investigating a failed traffic-engineered tunnel should save the requested constraints, time of computation, relevant TED attributes, computed explicit route, signaling messages, and forwarding state after attempted setup. Compare these as a sequence, rather than pasting only the final “path unavailable” error into a ticket. If the network changed during the attempt, capture that timeline as well.
After an accepted repair, demonstrate that the intended traffic follows the new path and that its failure recovery is acceptable. A route can satisfy the algorithm yet violate the operational objective because an endpoint sent traffic into a different class, an intermediary did not support a feature, or a protection route could not be established. The successful outcome is a service that behaves according to its documented constraints, not a mathematically elegant path in isolation.
Document the path’s endpoints, whether the service is unidirectional or bidirectional, the hard constraints, preferred metrics, link inventory, TED age, signaling support and rollback or protection plan. Test the path under normal operation and at least one relevant failure. Record evidence that traffic actually follows the intended route. This separates a plausible graph result from a reliable operational service and avoids a costly mismatch between path engineering and real forwarding behavior.