User Tools

Site Tools


informatique:cisco:bgp

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
informatique:cisco:bgp [2012/06/19 06:37] pteuinformatique:cisco:bgp [2013/10/14 20:44] (current) – external edit 127.0.0.1
Line 75: Line 75:
   network 10.10.10.0 mask 255.255.255.0   network 10.10.10.0 mask 255.255.255.0
  
 +=====Détermination du meilleur chemin=====
 +cf : BGP Best Path Selection Algorithm
  
 +  * highest WEIGHT : c'est un paramètre propriétaire Cisco, pas toujours/souvent utilisé
 +  * highest LOCAL_PREF : par défaut = 100
 +  * locally originated via a //network// or //aggregate// BGP subcommand or through redistribution from an IGP
 +  * shortest AS_PATH
 +  * lowest origin type (IGP < EGP < INCOMPLETE)
 +  * lowest multi-exit discriminator (MED) : uniquement si les next-hop appartiennent au même AS
 +  * prefer eBGP over iBGP paths
 +  * path with the lowest IGP metric to the BGP next hop
 +  * When both paths are external, prefer the path that was received first (the oldest one)
 +  * Prefer the route that comes from the BGP router with the lowest router ID
 +  * Prefer the path that comes from the lowest neighbor address.
 =====Configuration avancée===== =====Configuration avancée=====
  
Line 113: Line 126:
 ====Load Sharing==== ====Load Sharing====
  
-Le load sharing permet de faire de la répartition de charge sur 2 liens WANs différents (vers un ou plusieurs opérateurs).+Le load sharing permet d'utiliser plusieurs liaisons WAN de façon statique (sans répartition de charge à la différence du load-balancing), ainsi que du fail-over en cas de panne d'une liaison.
  
 ===Double raccordement au même ISP=== ===Double raccordement au même ISP===
Line 123: Line 136:
                      R1                      R1
                    /                    /
-AS=100  Router_WAN         AS=200      +AS=100  Router_WAN         AS=200
                    \                    \
                      R2                      R2
Line 147: Line 160:
  maximum-paths 2  maximum-paths 2
 </code> </code>
 +
 +===as-path prepend===
 +
 +L'AS-path prepend permet à un routeur BGP d'alourdir l'AS-path de certaines routes afin de déterminer quel routeur sera privilégier pour tel ou tel réseau.
 +
 +
 +Dans ce cas on a cette architecture : 2 routeurs WAN locaux vers 2 routeurs d'un même ISP ; avec des adjacences BGP "en carré" :
 +<code>
 +               R1--------------R3
 +AS10 (local)                     AS11 (ISP)
 +               R2--------------R4
 +</code>
 +
 +J'ai 2 réseaux locaux 10.0.1.0/24 et 10.0.2.0/24 ; mon n° d'AS est 10. Je veux que le premier réseau soit routé par mon ISP (AS=11) vers R1, et le second vers R2.
 +
 +Sur R1 :
 +<code bash>
 +router bgp 1
 + network 10.0.1.0 mask 255.255.255.0
 + network 10.0.2.0 mask 255.255.255.0
 + neighbor 192.168.0.1 remote-as 10
 + neighbor 192.168.0.1 route-map rm_R1 out
 +!
 +access-list 1 permit 10.0.1.0
 +access-list 2 permit 10.0.2.0
 +!
 +route-map rm_R1 permit 10
 + match ip address 1
 +!         
 +route-map R101-103-MAP permit 20
 + match ip address 2
 + ! on "alourdi" l'AS-path vers le réseau qui doit passer par R2
 + set as-path prepend 11 11
 +</code>
 +
 +On "alourdi" l'AS-path (on ajoute dans l'entête 2 numéros d'AS = 2 "sauts") des routes annoncées en BGP au routeur de l'ISP, afin que celui-ci préfère R2. R2 aura la conf inverse, c'est-à-dire qu'il va alourdir l'AS-path du réseau 10.0.1.0/24 afin que le routeur de l'ISP envoie la trafic vers R1.
 +
 +===Liens===
 +
 +  * [[http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00800945bf.shtml|Load Sharing with BGP in Single and Multihomed Environments: Sample Configurations]]
 +
 =====Vérifications===== =====Vérifications=====
  
Line 179: Line 233:
   * [[http://www.cisco.com/en/US/docs/ios/12_2/ip/configuration/guide/1cfbgp.html|Configuring BGP (cisco.com)]]   * [[http://www.cisco.com/en/US/docs/ios/12_2/ip/configuration/guide/1cfbgp.html|Configuring BGP (cisco.com)]]
   * [[http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00800945bf.shtml|Load Sharing with BGP in Single and Multihomed Environments: Sample Configurations]]   * [[http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00800945bf.shtml|Load Sharing with BGP in Single and Multihomed Environments: Sample Configurations]]
 +  * [[http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800c95bb.shtml|BGP case studies]]
informatique/cisco/bgp.1340087841.txt.gz · Last modified: 2013/10/14 20:51 (external edit)