Advanced Routing Engine - BGP: How to configure outbound route filtering using Route-map with Prefix-list
10093
Created On 07/26/24 08:42 AM - Last Modified 07/07/25 14:52 PM
Objective
- The information is explained with an example.
- In the network below, Filter out 172.16.17.0/24 to 172.16.31.0/24 being sent out the the ISPs
Environment
- Palo Alto Networks Firewalls.
- Supported PAN-OS.
- Advanced Routing Engine.
- BGP Routing configured.
- Route Redistribution.
- Route Filtering.
Procedure
-
Configure the basic redistribution without any filter:
-
Configure the Prefix list:
-
To filter the routes that need to be advertised, navigate to Network > Routing > Routing Profiles > Filters > Filters Prefix List > Add, and in this sample we'll use Name: Filter_outbound_172.16
-
- Click Add as shown above, and configure the following parameters:
- Seq: 10
- Action: Permit
- Prefix: Network
- Network: 172.16.0.0/20
- Less Than Or Equal: 24
- Click OK twice to save
-
Configuring Route Map:
-
Define the name of the route-map redistribution filter by going to Network > Routing > Routing Profiles > Filters > Filters Route Maps Redistribution > Add > Name, in this sample we'll be using the following parameters:
- Name: My_Static_Connect_2_BGP_redist
- Source Protocol: Connected Static
- Destination Protocol: BGP
-
- Assign the Prefix-list to the route-map by clicking Add as highlighted above, and use the following parameters
- Entry (tab):
- Seq: 10
- Description: Filter_outboud_172.16
- Action: Permit
- Entry (tab):
- Match (tab):
- Prefix List: Filter_outboud_172.16
- Click OK to save.
- Result will be as below
- Click OK to save
-
Assigning the Route Map to the Redistribution:
-
Implement the Route map into the Redistribution by navigating to Network > Routing > Routing Profiles > BGP > BGP Redistribution Profiles > My_RP_2_BGP and use the following Parameters:
- Static > Route-Map : My_Static_Connect_2_BGP_redist
- Connected > Route-Map: My_Static_Connect_2_BGP_redist
-
- Click OK then Commit to save.
-
Confirming the results via CLI:
-
Use the command below to view results
-
admin@PA-3250-ENT> show advanced-routing bgp peer advertised-routes peer-name ISP1
Status codes: R removed, d damped, * valid, r ribFailure, S stale, = multipath,
s suppressed, i internal, > best, h history
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes: e egp, i igp, ? incomplete
Peer: ISP1 Logical router: ENT
----------------------------------------------------------------------------------
Network Next Hop Metric LocPrf Weight Path
*> 172.16.0.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.1.0/24 0.0.0.0 0 100 32768 ?
*> 172.16.2.0/24 0.0.0.0 0 100 32768 ?
*> 172.16.3.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.4.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.5.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.6.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.7.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.8.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.9.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.10.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.11.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.12.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.13.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.14.0/24 172.16.1.254 10 100 32768 ?
*> 172.16.15.0/24 172.16.1.254 10 100 32768 ?
----------------------------------------------------------------------------------
Total number of prefixes 16
admin@PA-3250-ENT>