BGP Cost Community

L’attribut « community » est enrichi par « extcommunity » (BGP extended community attribute)
L’attribut « extcommunity » permet de spécifier un cout afin d’influencer les préférences de routage

set extcommunity cost igp « community id <0-255> » « cost value <0-4294967295> »

R4#show ip bgp
   Network          Next Hop            Metric LocPrf Weight Path
*>i100.1.1.0/24     2.2.2.2                  0    100      0 100 i
* i                 3.3.3.3                  0    100      0 100 i
*>i200.1.1.0        2.2.2.2                  0    100      0 100 i
* i                 3.3.3.3                  0    100      0 100 i
R4
access-list 1 permit 100.1.1.0 0.0.0.255
!
route-map TEST permit 10
 match ip address 1
 set extcommunity cost igp 1 1
!
router bgp 200
 no synchronization
 bgp router-id 4.4.4.4
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 200
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 3.3.3.3 remote-as 200
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 route-map TEST in
 no auto-summary

 

Vérifications:

R4#show ip bgp

   Network          Next Hop            Metric LocPrf Weight Path
*>i100.1.1.0/24     3.3.3.3                  0    100      0 100 i
* i                 2.2.2.2                  0    100      0 100 i
*>i200.1.1.0        2.2.2.2                  0    100      0 100 i
R4#show ip bgp 100.1.1.0
BGP routing table entry for 100.1.1.0/24, version 2
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
  Not advertised to any peer
  100
    3.3.3.3 (metric 1) from 3.3.3.3 (3.3.3.3)
      Origin IGP, metric 0, localpref 100, valid, internal, best
      Extended Community: Cost:igp:1:1
  100
    2.2.2.2 (metric 1) from 2.2.2.2 (2.2.2.2)
      Origin IGP, metric 0, localpref 100, valid, internal
This entry was posted in BGP. Bookmark the permalink.

Comments are closed.