WIPIVERSE All articles

Policy-based routing

Policy-based routing (PBR) is a networking technique that directs traffic flow based on policies set by network administrators rather than solely on destination IP addresses in the routing table. By evaluating attributes such as source address, destination address, port numbers, protocol type, or application-layer characteristics, PBR can apply customized routing decisions to meet specific operational, security, or performance objectives.

Key Characteristics

Aspect Description
Decision Criteria Source/destination IP, TCP/UDP ports, protocol, MPLS label, packet size, DSCP/ToS, time‑of‑day, or custom firewall/ACL matches.
Implementation Layer Typically realized on routers or switches that support route maps, ACLs, or policy frameworks; often configured via CLI or management software.
Routing Influence Overrides the normal longest‑prefix match, selecting a next‑hop, interface, or VPN tunnel defined by the policy.
Fallback If no policy matches, the packet follows the standard routing table lookup.
Typical Use Cases • Directing traffic to a security appliance (e.g., IDS/IPS, firewall).
• Load‑balancing across multiple WAN links based on application type or SLA.
• Enforcing QoS by routing latency‑sensitive traffic over low‑delay paths.
• Implementing compliance routing, such as sending certain data through a specific geographic region.
Vendor Support Implemented in major routing platforms from Cisco (Route‑maps, set ip next-hop), Juniper (policy statements, forwarding-options), Huawei, Nokia, and open‑source platforms (e.g., Linux iptables + ip rule/ip route).
Standards Not defined by an IETF RFC as a separate protocol; rather, it leverages existing IP routing and forwarding mechanisms, with vendor‑specific extensions.

Operational Overview

  1. Policy Definition – Administrators create a set of rules (often called a “route map” or “policy statement”) that match specific packet attributes.
  2. Policy Application – The policy is attached to an interface or a routing process. When a packet arrives, the router evaluates the policies in order.
  3. Action Execution – Upon a match, the router forwards the packet according to the defined action (e.g., next‑hop IP, output interface, tunnel encapsulation, or discard).
  4. Logging & Monitoring – Many implementations provide counters or logging for each policy rule, aiding troubleshooting and performance analysis.

Advantages

  • Provides granular traffic control without modifying end‑host configurations.
  • Enables dynamic adaptation to changing network conditions (e.g., link failures or congestion) when combined with monitoring tools.
  • Facilitates compliance with regulatory or contractual routing requirements.

Limitations

  • Increases configuration complexity and potential for policy conflicts.
  • May introduce additional processing overhead on routers, affecting throughput and latency.
  • Requires careful documentation to avoid unintended routing loops or asymmetric paths.

Typical Configuration Example (Cisco IOS)

ip access-list extended VOIP-TRAFFIC
 permit udp any any eq 5060
 permit udp any any eq 5061

route-map PBR-VOIP permit 10
 match ip address VOIP-TRAFFIC
 set ip next-hop 10.0.0.2   ! Forward to dedicated VoIP gateway

interface GigabitEthernet0/0
 ip policy route-map PBR-VOIP

In this example, all UDP packets using SIP ports (5060/5061) are redirected to the next‑hop address 10.0.0.2 irrespective of their destination IP.

References

  • Cisco Systems, Policy-Based Routing Configuration Guide, version 17.9, 2023.
  • Juniper Networks, Understanding Policy-Based Routing, TechLibrary, 2022.
  • IETF, “Routing Policy Specification Language (RPSL)”, RFC 2622 (1999) – provides a language for expressing routing policies, though not specific to PBR.
Browse

More topics to explore

    Browse all articles