Interactive Investigation Map
Article type: Tutorial
Scenario: A site has two internet links and selected business traffic must use a specific ISP while normal routing remains predictable.
Click to reveal the investigation path
- Step 1: Understand the topology
- Step 2: Configure the relevant Palo Alto objects
- Step 3: Verify policy/routing/NAT behavior
- Step 4: Test the expected traffic flow
- Step 5: Review logs and counters
- Step 6: Record production considerations
Visual generated specifically for this article.
Standard Virtual Router forwarding on a Palo Alto Networks firewall relies on the Forwarding Information Base (FIB) to make routing decisions based solely on the destination IP address. However, modern enterprise networks frequently require routing decisions based on additional attributes such as source subnets, applications, or target services. Implementing a proper Palo Alto PBF configuration (Policy Based Forwarding) allows network engineers to bypass the standard routing table and direct specific traffic flows over secondary paths, such as steering high-priority SaaS traffic over a leased fiber line while sending general internet traffic out a low-cost broadband connection.
This tutorial covers the architectural foundations, real-world deployment scenarios, packet-flow dynamics, and practical troubleshooting workflows for implementing PBF with path monitoring and dynamic failover in PAN-OS.
Real-Life Scenario
An enterprise branch site utilizes two Internet Service Provider (ISP) connections:
- ISP-1 (Primary / High-Performance Fiber): High cost, low latency, guaranteed SLA. Used for business-critical applications (such as a hosted ERP application and Voice over IP traffic).
- ISP-2 (Secondary / Commercial Broadband): Low cost, high bandwidth, variable latency. Used for general employee web browsing, guest Wi-Fi, and bulk file downloads.
The business requires that all traffic destined for the corporate cloud ERP platform (hosted at target IP address 192.0.2.50) MUST route through ISP-1. All general internet traffic must egress through ISP-2 to save bandwidth on ISP-1. If ISP-1 experiences a circuit outage or performance loss, the firewall must automatically disable the PBF rule and forward ERP traffic over ISP-2 until ISP-1 recovers.
Lab Topology
The following ASCII diagram illustrates the physical and logical layout of the enterprise branch firewall connected to dual ISPs:
+-----------------------+
| Cloud ERP Server |
| 192.0.2.50/32 |
+-----------+-----------+
|
+---------------------+---------------------+
| |
+----------+----------+ +----------+----------+
| ISP-1 Next Hop | | ISP-2 Next Hop |
| 198.51.100.1 | | 203.0.113.1 |
+----------+----------+ +----------+----------+
| |
| Primary Link | Secondary Link
| (Zone: Untrust-ISP1) | (Zone: Untrust-ISP2)
| |
ethernet1/1 ethernet1/2
+----------+-------------------------------------------+----------+
| |
| Palo Alto Networks Firewall |
| Virtual Router: "default" |
| |
+------------------------------+----------------------------------+
|
ethernet1/3
| (Zone: Trust-LAN)
|
+-------+-------+
| LAN Switch |
+-------+-------+
|
+----------+----------+
| Internal Host LAN |
| 192.168.10.0/24 |
+---------------------+
Example Addressing and Objects
The following table details the interfaces, IP addresses, zones, and security objects used throughout this configuration tutorial. All public IPv4 addresses use standard documentation subnets (RFC 5737).
| Object / Interface | Type / Name | IP Address / Subnet | Assigned Zone | Description |
|---|---|---|---|---|
ethernet1/1 |
Layer 3 Interface | 198.51.100.2/24 |
Untrust-ISP1 |
Primary ISP Dedicated Link |
ethernet1/2 |
Layer 3 Interface | 203.0.113.2/24 |
Untrust-ISP2 |
Secondary Broadband Link |
ethernet1/3 |
Layer 3 Interface | 192.168.10.1/24 |
Trust-LAN |
Internal User Segment Gateway |
H-Cloud-ERP |
Address Object | 192.0.2.50/32 |
N/A | Target Hosted ERP Application Target |
N-Internal-LAN |
Address Object | 192.168.10.0/24 |
N/A | Internal Local Area Network Subnet |
ISP1-Gateway |
Address Object | 198.51.100.1/32 |
N/A | Upstream ISP-1 Next-Hop Router |
Prerequisites
Before configuring Policy Based Forwarding, verify that the following core components are functional on your firewall:
- Layer 3 interfaces (
ethernet1/1,ethernet1/2, andethernet1/3) are assigned to their respective security zones. - A Virtual Router (e.g.,
default) is configured with static default routes (0.0.0.0/0) pointing to both ISP gateways, or at minimum pointing to the primary internet gateway. - Source NAT (SNAT) rules are configured for egress traffic on both ISP interfaces to ensure proper IP translation.
- Security Policy rules allow traffic between
Trust-LANand bothUntrust-ISP1andUntrust-ISP2zones.
Step-by-Step Palo Alto PBF Configuration
Follow these steps to build a resilient, failover-capable Palo Alto PBF configuration using the Web Interface (GUI).
Step 1: Create Address Objects
Navigate to Objects > Addresses and click Add to create the required address objects:
- Name:
N-Internal-LAN| Type: IP Netmask | Value:192.168.10.0/24 - Name:
H-Cloud-ERP| Type: IP Netmask | Value:192.0.2.50/32 - Name:
ISP1-Gateway| Type: IP Netmask | Value:198.51.100.1/32
Step 2: Configure the Policy Based Forwarding Rule
Navigate to Policies > Policy Based Forwarding and click Add to construct the PBF rule.
General Tab:
- Name:
PBF-Steer-ERP-ISP1 - Description: Directs Cloud ERP traffic over primary ISP-1 fiber link with path monitoring.
- Schedule: None (Leave default unless time-based steering is required).
Source Tab:
- Zone: Add
Trust-LAN - Source Address: Select
N-Internal-LAN
Destination Tab:
- Destination Address: Select
H-Cloud-ERP - Applications / Services: Keep set to
anyor select specific services likeservice-httpsto match web traffic.
Forwarding Tab:
- Action: Select
Forward - Egress Interface: Select
ethernet1/1 - Next Hop: Select
IP Addressand enter198.51.100.1 - Enforce Symmetric Return: Uncheck unless symmetric return for incoming connections on this interface is explicitly required.
Path Monitoring Tab:
Path Monitoring actively checks downstream availability. If the monitored IP stops responding to ICMP pings, the firewall automatically disables the PBF rule, allowing standard Virtual Router FIB lookup to take over.
- Enable Path Monitoring: Check the box.
- Add Monitoring Target: Click Add.
- IP Address: Enter
198.51.100.1(or an reliable upstream IP address reachable via ISP-1, such as1.1.1.1or8.8.8.8). - Probe Interval:
3seconds (Default value). - Max Pings:
3(Number of missed responses before marking target down). - Action: Select
Disable(Disables this PBF rule upon path failure so traffic falls back to normal FIB routing).
Click OK to save the PBF rule configuration.
Step 3: Ensure Security Policies and NAT Policies Match
PBF controls route forwarding, but security policy checks and Source NAT still apply.
Navigate to Policies > Security and verify a security rule permits traffic from source zone Trust-LAN to destination zones Untrust-ISP1 AND Untrust-ISP2.
Navigate to Policies > NAT and verify two NAT rules exist:
- NAT-Outbound-ISP1: Original Packet: Source Zone
Trust-LAN, Destination ZoneUntrust-ISP1, Outbound Interfaceethernet1/1. Translated Packet: Source Address Translation set to Dynamic IP and Port, Interface Addressethernet1/1(198.51.100.2). - NAT-Outbound-ISP2: Original Packet: Source Zone
Trust-LAN, Destination ZoneUntrust-ISP2, Outbound Interfaceethernet1/2. Translated Packet: Source Address Translation set to Dynamic IP and Port, Interface Addressethernet1/2(203.0.113.2).
CLI Commands for Policy-Based Forwarding
Network engineers who prefer working in the command-line interface (CLI) can configure and manage PBF rules using structured operational and configuration modes.
Configuration Mode Commands
Enter configuration mode and set up the address objects and PBF rule:
configure
set address N-Internal-LAN ip-netmask 192.168.10.0/24
set address H-Cloud-ERP ip-netmask 192.0.2.50/32
set rulebase pbf rules PBF-Steer-ERP-ISP1 from zone Trust-LAN
set rulebase pbf rules PBF-Steer-ERP-ISP1 source N-Internal-LAN
set rulebase pbf rules PBF-Steer-ERP-ISP1 destination H-Cloud-ERP
set rulebase pbf rules PBF-Steer-ERP-ISP1 service any
set rulebase pbf rules PBF-Steer-ERP-ISP1 action forward egress-interface ethernet1/1 nexthop 198.51.100.1
set rulebase pbf rules PBF-Steer-ERP-ISP1 path-monitoring enable yes
set rulebase pbf rules PBF-Steer-ERP-ISP1 path-monitoring metric ping
set rulebase pbf rules PBF-Steer-ERP-ISP1 path-monitoring ping-interval 3
set rulebase pbf rules PBF-Steer-ERP-ISP1 path-monitoring ping-count 3
set rulebase pbf rules PBF-Steer-ERP-ISP1 path-monitoring target 198.51.100.1 enable yes
set rulebase pbf rules PBF-Steer-ERP-ISP1 path-monitoring failure-action disable
commit
Caution: Committing configuration changes alters active routing decisions. Execute commits during an approved change window or verify candidate configurations prior to committing.
Operational Mode Commands
Use these operational commands to inspect PBF rules and path monitoring status:
show pbf rule all
show pbf path-monitoring all
test pbf-policy-match source 192.168.10.15 destination 192.0.2.50 protocol 6 destination-port 443 from Trust-LAN
How Traffic Flows During PBF Processing
To implement and debug PBF effectively, engineers must understand how PAN-OS handles PBF within its single-pass parallel processing architecture.
- Ingress & Zone Lookup: A packet arrives on interface
ethernet1/3. The firewall identifies the ingress zone asTrust-LAN. - PBF Evaluation (Pre-FIB Lookup): PAN-OS evaluates PBF rules top-to-bottom *before* consulting the standard Virtual Router forwarding table (FIB).
- If a packet matches the PBF criteria (Source, Destination, Application/Service) and the rule is active, PAN-OS bypasses standard destination route lookup for forwarding.
- The firewall hard-codes the packet’s egress interface (
ethernet1/1) and next-hop IP (198.51.100.1) based on the PBF action.
- Egress Zone Determination: Although normal routing lookup is overridden for egress selection, PAN-OS queries the Virtual Router route table briefly to identify the egress zone tied to
ethernet1/1, which resolves toUntrust-ISP1. - Security Policy Evaluation: The firewall compares the packet against security policy rules using the ingress zone (
Trust-LAN), final egress zone (Untrust-ISP1), and pre-NAT source/destination IP addresses. - NAT Policy Evaluation: The firewall matches NAT rules using the pre-NAT packet details along with the designated egress interface (
ethernet1/1). The source IP address translates to198.51.100.2. - Session Creation: PAN-OS writes the flow to the active session table. Subsequent packets in this session skip PBF policy evaluation and hit the fastpath forwarding engine directly.
Verification
Verify that your Palo Alto PBF configuration functions as intended by performing the following checks from the CLI and Web Interface.
1. Check PBF Rule Status
Run the operational command to verify PBF rule status, matching counts, and state:
show pbf rule name PBF-Steer-ERP-ISP1
Look for the output indicating Rule status: active and path monitoring state showing UP.
2. Test Policy Match Simulation
Execute the PBF test command to verify how the policy engine handles test packets:
test pbf-policy-match source 192.168.10.50 destination 192.0.2.50 protocol 6 destination-port 443 from Trust-LAN
The command output should display the matching PBF rule name and state that traffic forwards out interface ethernet1/1 to next-hop 198.51.100.1.
3. Active Session Inspection
Initiate a connection from a test endpoint on the LAN (192.168.10.50) to the ERP host (192.0.2.50) over HTTPS. Query the active firewall session table:
show session all filter source 192.168.10.50 destination 192.0.2.50
Locate the Session ID and display its detailed information:
show session id <SESSION_ID>
Verify that the forward flow egresses via ethernet1/1 and that the source NAT translates the packet to 198.51.100.2.
Troubleshooting Common PBF Issues
When PBF forwarding fails or exhibits unexpected behavior, systematic investigation isolates the broken component.
Symptom 1: Traffic is Dropped When PBF is Active
- Potential Cause: Missing Security Policy or NAT policy rule matching the PBF-selected egress zone/interface.
- Investigation Step: Check Traffic Logs under Monitor > Logs > Traffic. Search for log entries filtered by destination IP
192.0.2.50. Check if the session end reason displayspolicy-denyor if packets fail to translate. - Fix: Confirm security rules allow
Trust-LANtoUntrust-ISP1and that a matching Source NAT rule exists forethernet1/1.
Symptom 2: Path Monitoring Flaps Continuously
- Potential Cause: Intermittent packet loss, aggressive probe intervals, or upstream ICMP rate limiting on the monitored target.
- Investigation Step: Run
show pbf path-monitoring allto check loss metrics and state transitions. - Fix: Change the path monitoring target address from the gateway IP to a stable, ping-responsive public IP address (such as a public recursive DNS server), or increase the Ping Interval to 5 seconds and Max Pings to 5.
Symptom 3: Traffic Ignores PBF and Uses Default Routing
- Potential Cause: PBF rule is disabled, Path Monitoring target is DOWN, or rule order is incorrect.
- Investigation Step: Run
show pbf rule alland confirm the rule status isactive. Ensure no higher-priority PBF rule matches the same traffic. - Fix: Re-evaluate path monitoring health or adjust the position of the PBF rule in the rulebase hierarchy.
Common Mistakes
Avoid these frequent engineering pitfalls when working with PBF on PAN-OS:
- Omitting Security Zone Mapping: Assuming PBF bypasses security policy checks. PBF overrides packet routing, but PAN-OS still enforces full security policy processing against the resulting destination zone.
- Forgetting Interface NAT Rules: Defining a PBF rule out an internet interface without creating a corresponding Source NAT rule for that specific egress interface.
- Monitoring Interface Link State Instead of Path Health: Monitoring only the local interface status or direct next-hop IP. If an upstream service provider issue occurs beyond the local gateway, the local link remains UP, preventing PBF failover. Always monitor an upstream IP target across the provider network.
- PBF Rule Order Neglect: Placing broad PBF rules above highly specific PBF rules. Like security policies, PAN-OS processes PBF rules top-to-bottom and applies the first matching rule.
Production Considerations
When deploying PBF in enterprise production environments, evaluate these additional factors:
- High Availability (HA) Clusters: In Active/Passive HA setups, PBF path monitoring runs on the Active firewall node. Session state and PBF status synchronize automatically to the passive peer upon failover.
- Symmetric Return Settings: Enable “Enforce Symmetric Return” only if external clients initiate incoming sessions directly to servers behind the firewall across multiple ISP interfaces. Symmetric return forces reply traffic out the same interface on which the request arrived.
- GlobalProtect Interactions: PBF rules can unintentionally capture GlobalProtect VPN tunnel traffic or client traffic if source/destination parameters are defined too broadly. Exclude VPN pool subnets or place explicit bypass PBF rules at the top of the PBF rulebase.
- Decryption Overhead: If SSL Decryption is enabled, ensure the firewall engine has sufficient resource capacity, as decrypting traffic on re-routed ISP paths increases dataplane CPU load.
Summary
Palo Alto Networks Policy Based Forwarding provides granular control over network traffic paths beyond traditional destination-based routing tables. By combining PBF with active Path Monitoring, enterprise networks achieve targeted traffic steering across dual ISP links while maintaining automatic failover capabilities. Successful implementations depend on aligning PBF rules with accurate Security policies, appropriate Source NAT rules, and robust path monitoring targets.