wikiroute

networking recipes

User Tools

Site Tools


bgp_communities_in_practice

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
bgp_communities_in_practice [2014/01/12 00:07] – created samerbgp_communities_in_practice [2020/04/28 21:29] (current) samer
Line 1: Line 1:
 ====== BGP Communities in Practice ====== ====== BGP Communities in Practice ======
  
-BGP communities enable to label prefixes announced by BGP in order to apply specific policies. Two good examples of using BGP communities in real networks are provided for [[https://www.sprint.net/index.php?p=policy_bgp | Sprint]] and [[https://services.renater.fr/connectivite/routage_d_adresses | RENATER]].+BGP communities enable to label prefixes announced by BGP in order to apply specific policies. Two good examples of using BGP communities in real networks are provided for [[https://www.sprint.net/index.php?p=policy_bgp | Sprint]] and [[https://services.renater.fr/services_ip/routage_d_adresses | RENATER]].
  
-Let us analyze the illustration above provided by RENATER to explain how to use communities on its network. A dual-connected client network identifies a primary link and a secondary or backup link toward RENATER. In the BGP prefix announcements, this network can use the community ''2200:610'' on the primary link, and the community ''2200:590'' on the backup link. RENATER applies specific policies in order to implement the primary/backup behavior. A simple way to do this is described in the following:+Let us analyze the illustration below provided by RENATER to explain how to use communities on its network. A dual-connected client network identifies a primary link and a secondary or backup link toward RENATER. In the BGP prefix announcements, this network can use the community ''2200:610'' on the primary link, and the community ''2200:590'' on the backup link. RENATER applies specific policies in order to implement the primary/backup behavior. A simple way to do this is described in the following:
  
-[{{ :commbgp-1.png?direct&500 | Figure 1. BGP Community illustration}}]+[{{ :commbgp-1.png?direct&500 | Figure 1. BGP community illustration}}]
  
-  The client announces the prefix 10.1.2.0/24 with eBGP on the primary link toward NR-1 with a community attribute ''2200:610''+  The client announces the prefix 10.1.2.0/24 with eBGP on the primary link toward NR-1 with a community attribute ''2200:610''
-  The client announces 10.1.2.0/24 on the backup link toward NR-2 with a community attribute ''2200:590''+  The client announces 10.1.2.0/24 on the backup link toward NR-2 with a community attribute ''2200:590''
-  RENATER receives the same prefix (with eBGP) with two different communities and applies the following policy when announcing the prefix inside its network with iBGP :  +  RENATER receives the same prefix (with eBGP) with two different communities and applies the following policy when announcing the prefix inside its network with iBGP :  
-    If the community attribute matches 2200:610, the local preference attribute in the iBGP announcement is fixed to ''p''+    If the community attribute matches 2200:610, the local preference attribute in the iBGP announcement is fixed to ''p''
-    If the community attribute matches 2200:590, the local preference attribute in the iBGP announcement is fixed to ''p'''+    If the community attribute matches 2200:590, the local preference attribute in the iBGP announcement is fixed to ''p'''
-  Therefore, NR-1 announces 10.1.2.0/24 in iBGP with a local preference p whereas NR-2 announces the same prefix with a local preference ''p'''+  Therefore, NR-1 announces 10.1.2.0/24 in iBGP with a local preference p whereas NR-2 announces the same prefix with a local preference ''p'''
-  By choosing p' (we can assume that ''p = 610'' and ''p' = 590''), RENATER ensures that all its iBGP routers prefer the exit NR-1 to reach the client network and implement this information in their routing table.+  By choosing p' (we can assume that ''p = 610'' and ''p' = 590''), RENATER ensures that all its iBGP routers prefer the exit NR-1 to reach the client network and implement this information in their routing table.
 With this configuration, all the traffic going to the client network is forwarded by RENATER on the primary link. Note that whenever this link goes down, the BGP selection process chooses the next best announcement (lower local preference) and forwards the traffic on the backup link. With this configuration, all the traffic going to the client network is forwarded by RENATER on the primary link. Note that whenever this link goes down, the BGP selection process chooses the next best announcement (lower local preference) and forwards the traffic on the backup link.
bgp_communities_in_practice.1389481635.txt.gz · Last modified: 2014/01/12 00:07 by samer