# Order of operation to filtrate BGP inbound/outbound trafic

**URL:** https://forum.networklessons.com/t/order-of-operation-to-filtrate-bgp-inbound-outbound-trafic/3949
**Category:** BGP
**Created:** [May 24, 2018, 6:58pm UTC](https://forum.networklessons.com/t/order-of-operation-to-filtrate-bgp-inbound-outbound-trafic/3949 "2018-05-24T18:58:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kongawilly](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/k/ecae2f/32.png) [@kongawilly](https://forum.networklessons.com/u/kongawilly)
#### Post date: [May 24, 2018, 6:58pm UTC](https://forum.networklessons.com/t/order-of-operation-to-filtrate-bgp-inbound-outbound-trafic/3949/1 "2018-05-24T18:58:06Z")

</div>

Hello, I want to understand what is the order of analysis of a router when applying to a BGP peer (inbound or outbound ), a route-map, a filter-list and a prefix-list.

---

<div class="post-metadata">

### Author: ![ReneMolenaar](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/renemolenaar/32/488_2.png) [@ReneMolenaar](https://forum.networklessons.com/u/ReneMolenaar)
#### Post date: [May 29, 2018, 8:55pm UTC](https://forum.networklessons.com/t/order-of-operation-to-filtrate-bgp-inbound-outbound-trafic/3949/2 "2018-05-29T20:55:20Z")

</div>

Hello Willy,

According to this document:

> **[irg-prefix-filter.pdf](https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/xe-3se/3850/irg-xe-3se-3850-book/irg-prefix-filter.pdf)**
>
> 1485.67 KB

BGP uses the following order:

| Inbound | Outbound |
| --- | --- |
| Route map | Distribute list |
| Filter list, AS-path ACL, or IP policy | IP prefix list |
| IP prefix list | Filter list, AS-path ACL, or IP policy |
| Distribute list | Route map |

Depending on the platform and/or IOS version, this can sometimes be different though. Also, in production networks, there’s not really a need to mix these as it’s usually easier to use the route-map for everything.

Rene

---

<div class="post-metadata">

### Author: ![CWLLIMSG](https://cdn-forum.networklessons.com/letter_avatar_proxy/v4/letter/c/f9ae1b/32.png) [@CWLLIMSG](https://forum.networklessons.com/u/CWLLIMSG)
#### Post date: [January 11, 2021, 2:50am UTC](https://forum.networklessons.com/t/order-of-operation-to-filtrate-bgp-inbound-outbound-trafic/3949/3 "2021-01-11T02:50:45Z")

</div>

Can I check. This order of operation is only applicable to filtering of IPv6 prefixes. How about for IPv4? Thanks.

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [January 12, 2021, 6:53am UTC](https://forum.networklessons.com/t/order-of-operation-to-filtrate-bgp-inbound-outbound-trafic/3949/4 "2021-01-12T06:53:41Z")

</div>

Hello Leon

This order of operations is not protocol-specific. In the documentation presented above, it refers to IPv4, however, the same order applies for IPv6 as well.

I hope this has been helpful!

Laz
