BGP AS-Path

 

L’attribut « AS-PATH » est transmis aux AS voisins BGP qui doivent le prendre ne charge et permet d’influencer le routage entrant

Par défaut, R2 et R3 préférèrent atteindre l’AS 100 (prefix 1.0.0.0 et 11.0.0.0) directement par R1 :

 

R2#show ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
* i1.0.0.0          10.1.14.1                0    100      0 100 i
*>                  10.1.12.1                0             0 100 i
*> 2.0.0.0          0.0.0.0                  0         32768 i
*>i3.0.0.0          10.1.23.3                0    100      0 i
*>i4.0.0.0          10.1.34.4                0    100      0 i
* i11.0.0.0         10.1.14.1                0    100      0 100 i
*>                  10.1.12.1                0             0 100 i
R3#show ip bgp 1.0.0.0
BGP routing table entry for 1.0.0.0/8, version 2
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Not advertised to any peer
  100
    10.1.14.1 (metric 1) from 10.1.34.4 (10.1.34.4)
      Origin IGP, metric 0, localpref 100, valid, internal
  100
    10.1.12.1 (metric 1) from 10.1.23.2 (2.2.2.2)
      Origin IGP, metric 0, localpref 100, valid, internal, best

R1 (AS100) annonce maintenant son prefix 1.0.0.0 avec une valeur « AS-PATH » plus élevée à R2

access-list 1 permit 1.0.0.0 0.255.255.255
!
route-map TEST permit 100
 match ip address 1
 set as-path prepend 100 100 100 100
!
route-map TEST permit 200
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 1.0.0.0
 network 11.0.0.0
 neighbor 10.1.12.2 remote-as 200
 neighbor 10.1.12.2 route-map TEST out
 neighbor 10.1.14.4 remote-as 200
 no auto-summary

Vérifications:
1.0.0.0 est maintenant atteint via R4

R2#show ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
*>i1.0.0.0          10.1.14.1                0    100      0 100 i
*                   10.1.12.1                0             0 100 100 100 100 100 i
*> 2.0.0.0          0.0.0.0                  0         32768 i
*>i3.0.0.0          10.1.23.3                0    100      0 i
*>i4.0.0.0          10.1.34.4                0    100      0 i
* i11.0.0.0         10.1.14.1                0    100      0 100 i
*>                  10.1.12.1                0             0 100 i
R3#show ip bgp 1.0.0.0
BGP routing table entry for 1.0.0.0/8, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
  Not advertised to any peer
  100
    10.1.14.1 (metric 1) from 10.1.34.4 (10.1.34.4)
      Origin IGP, metric 0, localpref 100, valid, internal, best
This entry was posted in BGP. Bookmark the permalink.

Comments are closed.