This is an overview of applying policy with BGP. In general, organizations will tend to have particular non-technical routing policies. An example is a particular circuit may be cheaper or may have more bandwidth and the organization would prefer to use that circuit. Alternatively they might have restrictions on traffic having to stay within particular jurisdictions, so that traffic cannot flow over particular links. BGP in this case is used as more of a policy tool than your traditional routing protocol. And it will implement the decisions of where you want your traffic to flow as opposed to simply just picking what it believes is the best or the fastest route. And the way you can do this is split into different ways. Firstly, you can accept a prefix itself and that will attract traffic towards that destination to whoever announced the prefix to you. You can also reject a prefix announcement and that means that any traffic to that destination will not flow to whoever was trying to announce that prefix towards you. Similarly for routes that you announce outwards, if the person on the other side accepts the prefix, then traffic towards that particular destination will flow towards you. If they reject the prefix then traffic towards a destination will not flow towards you, it will flow to wherever they prefer. In addition to the prefix itself, you can make similar filtering decisions based on the AS path attribute as well as any BGP Communities that may have been tagged to that particular prefix. Once you have decided to accept a prefix that has been announced, you can optionally set other BGP attributes. And the reason to do this is to affect how preferred that particular route will be when it is propagated through your network. And this can be complex or it can be simple and, the goal is to influence the BGP path selection algorithm or not just the router that receives the prefix, but all other routers on your network. And there are a number of tools to do this. To filter prefixes Cisco has a "prefix-list" and Juniper has, the Juniper equivalent, is the "route-filter". Huawei and other vendors also have particular tools that they will use to filter BGP prefixes. Now if you want to filter based on AS path, which means you want to choose whether to accept or reject a prefix based on which Autonomous System either announced it or where it passed through. The Cisco tool for this is a filter list. Juniper does this within their policy tool which we shall look at later on in this series. And other vendors have something similar. Lastly, you can have a route-map which is Cisco's complicated policy tool. And in Junos, unfortunately, all policy is applied using a policy filter, which is complicated to implement, but each individual piece we shall look at rather than try to attack the entire policy tool.

© Produced by Philip Smith and the Network Startup Resource Center, through the University of Oregon.

Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
This is a human-readable summary of (and not a substitute for) the license. Disclaimer. You are free to: Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material The licensor cannot revoke these freedoms as long as you follow the license terms. Under the following terms: Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. NonCommercial — You may not use the material for commercial purposes. No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.