PCNSE Static Routing Guide: Palo Alto Networks Firewalls

This guide explores the comprehensive utilization of static routing in Palo Alto Networks firewalls. It covers fundamental configurations, advanced scenarios like routing to tunnel interfaces for IPSec VPN and GlobalProtect, manipulation of administrative distance and metric for complex routing, and seamless backup in conjunction with dynamic routing. We will also delve into how Bidirectional Forwarding Detection (BFD) enhances faster failover for static routes and discuss various static route destination types. This content is tailored for PCNSE students aiming to pass the exam and for engineers seeking to master Palo Alto Networks firewall routing.

1. Introduction to Static Routing

Static routing is a fundamental networking concept where routes are manually configured on a routing device, such as a Palo Alto Networks firewall. Unlike dynamic routing protocols that automatically discover and update routes, static routes remain fixed unless an administrator changes them. Static routes are useful in various scenarios, including small, stable networks, defining specific paths for certain traffic, or as a backup to dynamic routes. Palo Alto Networks firewalls offer robust static routing capabilities, allowing for precise control over traffic flow.

2. Static Route Configuration

Configuring a static route on a Palo Alto Networks firewall involves specifying several key parameters to define how traffic to a particular destination network should be handled.

Navigate to Network > Virtual Routers , select the desired virtual router, and go to the Static Routes tab.

  1. Name: A descriptive name for the static route (e.g., To_Remote_Branch_VPN ).
  2. Destination: The network address of the destination you want to reach (e.g., 10.10.20.0/24 ). A common use case is configuring a default route ( 0.0.0.0/0 ) to direct all traffic for unknown destinations.
  3. Interface: The egress interface on the firewall that will be used to send traffic towards the next hop or destination. This is optional if the next hop IP address is directly reachable via a different interface already known to the virtual router. For certain next-hop types like 'None', an interface might still be specified.
  4. Next Hop Type & Value: This defines the next device or action for packets matching the destination. Common types include:
    • IP Address: The IP address of the next-hop router. This is the most common type.
    • Next VR: Forwards traffic to another virtual router (VR) within the same firewall. This is useful for inter-VR communication.
    • Discard (Null Route): Drops traffic destined for the specified network. This is often used for blackholing unwanted traffic (e.g., DDoS mitigation) or preventing routing loops for summarized routes.
    • None: Often used when the route is for traffic that will be handled by Policy-Based Forwarding (PBR) or for routes to directly connected networks over a specific interface (though connected routes are typically learned automatically). The firewall might use the destination IP of a path monitor as the next hop in this scenario.
    • FQDN: (Available in some PAN-OS versions) Allows specifying the next hop as a Fully Qualified Domain Name, which the firewall resolves to an IP address.
  5. Administrative Distance (AD): A value from 1 to 255 indicating the trustworthiness of the route source. Lower values are preferred. The default AD for static routes is 10 . This is crucial when static routes interact with dynamic routing protocols.
  6. Metric: A value (default 10 ) used to differentiate between multiple static routes to the same destination with the same AD. The route with the lower metric is preferred.
  7. Click OK and then Commit the changes.

3. Typical Utilization Scenarios

3.1 Routing to Tunnel Interfaces (IPSec VPN & GlobalProtect)

A primary use case for static routes is directing traffic destined for remote networks through IPSec VPN tunnels or to GlobalProtect client subnets.

A tunnel interface itself doesn't always require an IP address unless you are using tunnel monitoring (pinging an IP across the tunnel) or running dynamic routing protocols over the tunnel.

3.2 Stub Networks and Default Routes

Static routes are ideal for connecting to stub networks —networks accessible through a single path. For instance, a small branch office connected to a central site via a single WAN link can use a static route on the central firewall to reach the branch office's subnets.

A default static route ( 0.0.0.0/0 ) is essential when the firewall doesn't learn a default route from a dynamic routing protocol. This route specifies the next-hop (usually an ISP gateway) for all traffic whose destination is not explicitly listed in the routing table. You can have multiple default routes with different metrics or ADs for redundancy.

3.3 Inter-Virtual Router (Inter-VR) Routing

In Palo Alto Networks firewalls, multiple virtual routers (VRs) can exist. To enable communication between networks attached to different VRs, you can use static routes with a Next Hop Type of Next VR . This allows traffic to be passed from one VR to another specified VR, facilitating segmented yet interconnected network designs. For instance, if VR1 needs to send traffic to a network in VR2, a static route in VR1 for that network would specify VR2 as the next hop.

4. Path Monitoring for Static Routes

Path monitoring enhances the reliability of static routes by ensuring they are only active when the specified path is reachable. This is particularly useful for ISP redundancy scenarios.

  1. While adding or editing a static route, navigate to the Path Monitoring tab.
  2. Enable path monitoring and add one or more Monitored Destinations (IP addresses that the firewall will ping). You can monitor up to 128 static routes.
  3. Specify the Source IP for the ICMP pings (often an IP on the egress interface of the static route).
  4. Set the Ping Interval (how often to ping) and Ping Count (number of consecutive failures before declaring the path down).
  5. Choose the Failure Condition ( Any or All monitored destinations must fail) and set the Preemptive Hold Time (how long to wait after a path recovers before re-installing the route).
  6. Click OK and then Commit the changes.

When path monitoring detects that a monitored destination is unreachable, the static route is dynamically removed from the routing table. This allows an alternative route (e.g., a floating static route or a route learned via a dynamic protocol) to become active. When the path recovers, the original static route can be re-installed.

4.1 Bidirectional Forwarding Detection (BFD) for Static Routes

Bidirectional Forwarding Detection (BFD) is a protocol designed for very fast failure detection in the bidirectional path between two routing peers. Palo Alto Networks firewalls support BFD for static routes, providing much faster failover times (sub-second) than traditional path monitoring based on ICMP pings.

Key points for BFD with static routes:

While BFD offers faster failover, path monitoring via ICMP is simpler to implement if the peer device doesn't support BFD or for less critical links.

5. Administrative Distance and Metric Manipulation

Administrative Distance (AD) and Metric are crucial for controlling route preference, especially when multiple routes to the same destination exist from different sources (e.g., static, OSPF, BGP).

5.1 Administrative Distance (AD)

AD indicates the trustworthiness of a route source. Lower AD values are preferred . Palo Alto Networks firewalls use these default ADs:

By default, a static route (AD 10) will be preferred over an OSPF route (AD 30 or 110) or a RIP route (AD 120) to the same destination.

Floating Static Routes: You can create a "floating" static route by setting its AD higher than that of a dynamically learned route. For example, if OSPF provides the primary path (AD 30), a static route to the same destination with an AD of 35 or higher will only be installed in the routing table if the OSPF route disappears. This makes the static route a backup.

5.2 Metric

If multiple static routes to the same destination have the same AD , the firewall uses the metric to choose the best path. The route with the lowest metric is preferred. The default metric for static routes is 10 .

Use Case: Consider two static routes to 10.5.5.0/24 .

Route A will be preferred. If Route A becomes inactive (e.g., due to path monitoring failure), Route B will be used. If both had a metric of 10, ECMP (Equal Cost Multi-Path) might be considered if enabled, though behavior can depend on specific PAN-OS versions and configurations.

6. Static Routes and Dynamic Routing

Static routes and dynamic routing protocols (like OSPF, BGP, RIP) can coexist and complement each other within a virtual router.

7. Special Static Route Next-Hop Types

Palo Alto Networks firewalls offer flexible next-hop options for static routes:

8. Policy-Based Routing (PBR)

Policy-Based Routing (PBR) provides a mechanism to forward packets based on criteria other than just the destination IP address found in the routing table. PBR rules can consider source IP, source/destination port, application, or user to make forwarding decisions.

Navigate to Policies > Policy Based Forwarding .

  1. Click Add to create a PBR rule.
  2. Define match criteria: Source Zone , Source Address/User , Destination Address , Application , Service/URL Category .
  3. Specify the Action (Forwarding) :
    • Egress Interface: The interface out of which to send matching traffic.
    • Next Hop: IP address of the next device.
    • Can also choose to forward to a Next VR .
  4. Optionally, enable Monitor to track the health of the PBR path (similar to static route path monitoring). If the monitored path fails, the PBR rule can be disabled.
  5. Click OK and then Commit .

PBR is useful for scenarios like source-based routing (e.g., sending traffic from specific departments via different ISP links), directing certain application traffic through specific paths, or for temporary troubleshooting.

9. Interaction Between Static Routes and PBR

Understanding the order of operations is crucial when both static routes and PBR are configured:

While PBR offers granular control, it can make troubleshooting more complex as the forwarding path isn't solely determined by the routing table. Static route path monitoring is often preferred for simple ISP failover scenarios due to its clearer integration with the routing table.

10. Monitoring and Troubleshooting

Effective monitoring and troubleshooting are key to maintaining a healthy routed environment:

11. Best Practices for Static Routing

12. Conclusion

Static routing, while simple in concept, offers powerful and granular control over traffic flow in Palo Alto Networks firewalls. By understanding its configuration options, utilization scenarios like VPN routing and ISP redundancy, the interplay with Administrative Distance and metrics, and enhancements like Path Monitoring and BFD, network engineers can build resilient, efficient, and predictable network infrastructures. Mastering these concepts is crucial for success in the PCNSE exam and in deploying and managing Palo Alto Networks security solutions effectively.

Static Routing Concepts Quiz

1. What is the default Administrative Distance for a static route on a Palo Alto Networks firewall?

2. Which static route next-hop type is used to drop traffic destined for a specific network?

3. To use a static route as a backup for an OSPF route (default AD 30), what should the AD of the static route be configured to?

4. What is the primary purpose of Path Monitoring for a static route?

5. Which feature provides faster failover detection for static routes compared to traditional ICMP-based path monitoring?

6. When is a static route with a "Next VR" next-hop type typically used?

7. What is the default metric for a static route on a Palo Alto Networks firewall?

8. In what order are PBR rules and the routing table evaluated for a packet?

9. Which CLI command is used to view the active routing table on a Palo Alto Networks firewall?

10. For BFD to be used with a static route, the next-hop type MUST be:

11. Which of the following is a common use case for a static route pointing to a tunnel interface?

12. If two static routes exist for the same destination with the same AD, how is the preferred route determined?

13. What is a "floating static route"?

14. A "discard" static route is also known as a:

15. Which BFD parameter defines the number of consecutive missed BFD packets before a session is declared down?

16. An administrator configures a static route for 192.168.1.0/24 via tunnel.1. What is the primary purpose of this configuration?

17. Which of these dynamic routing protocols is NOT supported by BFD on Palo Alto Networks firewalls?

18. What is a key advantage of using BFD over standard path monitoring for static routes?

19. An engineer needs to ensure that traffic from the marketing department (10.1.10.0/24) uses ISP1, while traffic from engineering (10.1.20.0/24) uses ISP2. The default route points to ISP1. Which feature is most suitable for this requirement?

20. Why might an administrator configure a static route with a destination of 0.0.0.0/0 and a next-hop type of "Discard"?