How to filter routes being exported to BGP neighbor?

How to filter routes being exported to BGP neighbor?

49009
Created On 10/02/19 03:11 AM - Last Modified 03/25/24 15:30 PM


Objective


  • Limit sending BGP routes to a downstream Peer by keeping the routes locally in the routing table.
  • In the example below the Firewall FW is sending routes of 180.10.x.x and 190.10.x.x to the neighbor R3. The export filter configured on Firewall FW will only allow 180.10.x.x routes to be advertised to neighbor R3.
  • The local route table of Firewall FW is not affected, both 180.10.x.x and 190.10.x.x routes remain in the route table.
User-added image


Environment


  • PAN-OS 7.1, 8.0, 8.1 and 9.0.
  • Any Palo Alto Firewall.
  • BGP configured.


Procedure


  1. From the WebGUI of Firewall FW, select  Network > Virtual Routers > Default  => Replace the virtual router to the appropriate configured one
  2. Select BGP > Export and  click Add to create Export rule.
  3. In the General Tab, type in a name and click Add under Used by window. Select the neighbor to which routes need to be filtered  Make sure Enable is checked. In this example Export filter is filtering routes that are being sent to PEER-IBGP which is R3.
User-added image
  1. Click on Match and add the prefix which need to be advertised in the Address Prefix window. In this example 180.10.0.0/16 is selected to only send 180.10.x.x routes.
User-added image
 
  1. Click on the Action Column and select Allow under Action and click OK.
User-added image
  1. Click on OK and Commit the configuration. Only 180.10.x.x routes are now advertised to the neighbor PEER-IBGP.


Additional Information


To verify check the rib-out on the local Firewall FW using GUI: Network > Virtual Routers > Default > More Runtime Stats > Bgp > RIB Out. Only 180.10.x.x routes are being seen in the local RIB out.
 
User-added image
 
Similarly the Local RIB of the peer router (PEER-IBGP / R3 ) displays only 180.10.x.x networks.
 
User-added image
 
The route table of the peer router (PEER-IBGP / R3 ) has only 180.10.x.x networks.
 
User-added image''

This is the RIB out table on Firewall FW prior configuring filter which displays both 180.10.x.x and 190.10.x.x network in the table.

User-added image



 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/kcSArticleDetail?id=kA10g000000HAIu&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FkcSArticleDetail