📘 PCNSE BGP Route Selection, Traffic Engineering, and Exam Preparation

1. BGP Route Selection Process in PAN-OS

Palo Alto Networks firewalls follow a specific sequence to select the best BGP route:

  1. Next-Hop Reachability: If the next-hop is reachable and it's the only path, select this route.
  2. Weight: Prefer the path with the highest weight.
  3. Local Preference: If weights are equal, prefer the path with the highest local preference.
  4. Originated Routes: Prefer routes originated by the local router.
  5. AS Path Length: Prefer the path with the shortest AS path.
  6. Origin Type: Prefer routes with the lowest origin type (IGP < EGP < Incomplete).
  7. MED: Prefer the path with the lowest Multi-Exit Discriminator (MED).
  8. eBGP over iBGP: Prefer external BGP routes over internal ones.
  9. IGP Metric to Next Hop: Prefer the path with the lowest IGP metric to the BGP next hop.
  10. Router ID: Prefer the path with the lowest BGP router ID.

For a detailed explanation, refer to the Palo Alto Networks Knowledge Base article: What is the BGP Best Path Selection Process?

2. Mnemonic for BGP Route Selection

To help remember the BGP best path selection process in PAN-OS, you can use the following mnemonic:

N ever W alk L azily, O r A ll O ranges M ight E scape I nto R ivers.

3. Influencing BGP Route Selection

Administrators can manipulate BGP attributes to influence route selection:

4. BGP Communities for Traffic Engineering

BGP communities are tags that can be attached to routes to signal routing preferences to peers:

By tagging routes with specific communities, administrators can influence how upstream providers handle their traffic, affecting both inbound and outbound routing decisions.

5. BGP Use Cases and Sequence Diagrams

Below are common BGP use cases for traffic engineering with conceptual sequence diagrams represented using Mermaid JS. These diagrams illustrate the flow of advertisements and decision-making.

Use Case 1: Primary/Backup Outbound Path with Local Preference

Scenario: Your AS (AS65000) has two connections to the internet via ISP A (AS100) and ISP B (AS200). You want all outbound traffic to prefer the link through ISP A. If ISP A's link fails, traffic should use ISP B.

Method: Set a higher Local Preference on routes learned from ISP A on your border routers connecting to ISP A. Local Preference is shared among iBGP peers within your AS.

Diagram: Influencing Outbound Traffic with Local Preference

Use Case 2: Influencing Inbound Path to ISP with MED

Scenario: Your AS (AS65000) has two links to the same ISP (AS100). You want the ISP to prefer sending traffic to your AS via Link 1 instead of Link 2.

Method: Advertise your prefixes to ISP A with a lower MED value over Link 1 and a higher MED value over Link 2. The ISP must agree to honor MEDs.

Diagram: Influencing Inbound Traffic with MED

Use Case 3: Depreferencing Path for Inbound Traffic with AS Path Prepending

Scenario: Your AS (AS65000) is multi-homed to ISP A (AS100) and ISP B (AS200). You want to make the path through ISP B less attractive for inbound traffic, effectively making ISP A the primary for incoming routes.

Method: When advertising your prefixes to ISP B, prepend your own AS number multiple times. This makes the AS Path appear longer and thus less preferable.

Diagram: Influencing Inbound Traffic with AS Path Prepending

Use Case 4: Limiting Route Propagation with `no-export` Community

Scenario: Your AS (AS65000) advertises a specific prefix to a partner AS (AS700). You want the partner AS to use this route but not advertise it to any of its other eBGP peers.

Method: Attach the `no-export` well-known community to the prefix when advertising it to AS700.

Diagram: Using `no-export` Community

Use Case 5: Restricting Routes Within an Organization using `local-as` Community

Scenario: Your AS (AS65000) uses BGP internally. For a specific prefix (e.g., a management network), you want to ensure it's advertised to all iBGP peers within AS65000 but never leaves AS65000, even to eBGP peers or other sub-ASes in a confederation.

Method: Attach the `local-as` (also known as `no-export-subconfed`) well-known community to the prefix. Note: The original HTML used local-as . Standard BGP often refers to this as NO_EXPORT_SUBCONFED . In PAN-OS, this is typically handled by the `no-export` for eBGP peers and confederation boundaries unless more specific confederation policies are in play. `local-as` is more stringent, ensuring it doesn't leave the originating AS at all, even to confederation peers. For simplicity, we'll illustrate its general intent to keep routes very local.

Diagram: Using `local-as` Community

6. Configuring BGP Communities in PAN-OS

To configure BGP communities in Palo Alto Networks firewalls:

  1. Navigate to Network > Virtual Routers and select your virtual router.
  2. Under BGP , configure the necessary Import and Export rules.
  3. In the Export rule, under the Action tab, set the desired community attributes (e.g., "no-export", or custom values like "65000:100").
  4. To add multiple community attributes to routes being redistributed into BGP from other routing protocols, configure a redistribution profile and specify the communities under the Set Community section.

Note: Multiple community attributes can be added primarily to routes that are being redistributed into BGP. For more details, refer to the Knowledge Base article: Add Multiple Community Attribute to BGP routes .

7. Filtering BGP Routes Using Communities

To filter BGP routes based on community attributes:

  1. Navigate to Network > Routing > Routing Profiles > Filters and select Community Lists .
  2. Create a new community list by specifying the name, type (Regular or Extended), and the community values to match.
  3. Apply the community list in a route map (within BGP Import/Export policies or Redistribution Profiles) to permit or deny routes based on the matched communities.

For detailed steps, refer to the documentation: Configure a Filter Community List .

8. Typical PCNSE Exam Questions for BGP

Based on publicly available information and common BGP topics, PCNSE exam questions related to BGP might cover areas like:

BGP Attribute Transitivity and Significance

BGP path attributes are pieces of information that describe a route and are used in the BGP best path selection process. They are categorized based on whether they are well-known or optional, and whether they are transitive or non-transitive.

Well-Known Attributes

Well-known attributes are expected to be recognized by all BGP implementations.

Optional Attributes

Optional attributes may not be recognized by all BGP implementations.

Significance of Transitivity

The transitivity of an attribute determines its scope and how it propagates through the BGP network:

All well-known attributes are inherently transitive (their transitive bit is set to 1).


Influencing Traffic with BGP Communities

BGP Communities are optional transitive attributes that act like "tags" attached to BGP routes. This allows for more flexible and scalable traffic engineering and policy enforcement.

How Communities Influence Traffic:

  1. Tagging Routes: An administrator configures their BGP router to attach specific community values to routes being advertised to BGP peers (e.g., an ISP).
  2. Policy Matching on Receiving Router: The receiving BGP router (e.g., ISP's router) is configured with policies (often using route maps) that look for these community values.
  3. Applying Actions: If a route matches a community value defined in a policy, the receiving router applies a predefined action. This action can modify other BGP attributes or control advertisement of the route.

Common Use Cases for Traffic Influence:

The effectiveness of influencing an ISP's traffic engineering using communities depends entirely on the ISP offering such a service and documenting the community values and their corresponding actions.

Always refer to the latest PCNSE blueprint and study materials from Palo Alto Networks for the most accurate exam topic coverage.

Palo Alto Networks BGP CLI Troubleshooting Commands

Troubleshooting BGP involves checking configuration, neighbor states, route advertisements, received routes, path selection, and underlying connectivity. Palo Alto Networks firewalls provide a range of CLI commands for this. Remember to execute commands within the correct Virtual Router (VR) context if you are not using the default VR.

Common Convention: Replace placeholders like , , , , and with your actual configuration values.

1. Checking BGP Configuration

First, ensure the BGP configuration is correct and loaded.

2. Checking BGP Neighbor Status

Verify if BGP sessions are established and stable.

3. Checking Received and Advertised Routes

Examine the BGP Routing Information Base (RIB) tables.

4. Checking the Main Routing Table

Verify if the best BGP routes are installed in the firewall's main RIB.

5. Testing Connectivity

Ensure basic IP reachability to the BGP neighbor.

6. BGP Debugging (Use with Caution)

Warning: Debugging can significantly impact CPU performance. Use it sparingly in production, only when necessary, and disable it immediately after troubleshooting.

7. Packet Capture (Use with Caution)

Warning: Packet captures can also impact performance, especially with broad filters or high traffic rates. Use specific filters and disable captures promptly.

Used to inspect the raw BGP packets being exchanged (TCP Port 179).

8. Clearing and Resetting BGP Sessions

Used to force route re-advertisement or reset a stuck session.

9. Checking System Resources

High CPU or memory usage can impact routing protocol performance.

Interactive Quiz: BGP Route Selection and Traffic Engineering

1. In the PAN-OS BGP route selection process, which attribute is evaluated immediately after Next-Hop Reachability?

2. Which BGP attribute is used primarily to influence outbound traffic from your AS?

3. A lower value is preferred for which of these BGP attributes?

4. Which well-known BGP community prevents a route from being advertised to any BGP peer (eBGP or iBGP)?

5. AS Path Prepending is a technique used to:

6. What is the correct order for these BGP attributes in the selection process: AS Path Length, Origin Type, MED?

7. In PAN-OS, where would you typically configure BGP Export rules to modify attributes or attach communities?

8. Which BGP attribute is Cisco proprietary but also recognized and configurable on Palo Alto Networks firewalls for local router path preference?

9. If all preceding attributes are equal, BGP prefers eBGP learned routes over iBGP learned routes. True or False?

10. What is the primary purpose of the BGP Origin attribute?

11. The BGP Router ID is used as a tie-breaker in the path selection process. Which Router ID is preferred?

12. To filter incoming BGP routes based on a BGP community value in PAN-OS, you would typically use:

13. Which of the following Origin types is generally most preferred in BGP?

14. The `local-as` (NO_EXPORT_SUBCONFED) community ensures that a route is:

15. If a route is originated by the local Palo Alto Networks firewall (e.g., redistributed static or connected), how does this influence BGP path selection compared to an eBGP learned route, assuming Weight and Local Preference are equal?

16. The BGP Weight attribute is significant:

17. Using MED to influence inbound traffic requires cooperation from which entity?

18. What is the primary function of a BGP Route Map in PAN-OS?

19. If two BGP paths have equal Weight, Local Preference, AS Path Length, Origin type, and MED, what is the next common attribute PAN-OS checks?

20. The "no-export" BGP community primarily affects route advertisement to: