How BGP attributes are applied


  1. Weight: It is applied to neighbor/route-map IN with an eBGP neighbor to influence which interface to use to go out. This affects this router only.
  2. Local preference: It is applied with a route-map IN to influence outbound traffic, affects the whole AS eBGP.
  3. As-path prepend: It is applied with a route-map OUT with an eBGP neighbor to influence inbound traffic.
  4. MED: It is applied with:
    • route-map OUT with an eBGP neighbor to influence which router to use to come in.
    • route-map IN with an eBGP neighbor to influence which router to use to come in.
  5. Distribute-list/route-filters: They are applied with a route-map IN/OUT to control which routes come in or go out.
  6. Communities: They are applied with a:
    • Soft-reconfiguration: neighbor x.x.x.x soft-reconfiguration with an INBOUND eBGP neighbor
    • IP access-lists & IP distribute-lists: ONLY use route-map OUT
    • IP AS-PATH: It is applied with a route-map IN.

TRY USING IP AS-PATH AS MUCH AS POSSIBLE INSTEAD OF IP ACCESS-LIST.