Tuesday, September 18, 2007

BGP - CCIE Notes

  1. Within an AS, bgp peers do not need to be directly connected.
  2. For routers that run ebgp, neighbors are usually directly connected.
  3. ALL bgp speakers within an AS MUST establish a peer relationship unless you use Route
  4. reflectors or confederations.
  5. When a bgp speaker receives an update from other bgp speakers in its own AS, (via ibgp) the
  6. receiving bgp speaker uses ebgp to forward the update to ebgp speakers only.
  7. The BGP synchronization rule states that if an AS provides transit service to another AS, BGP
  8. should not advertise a route until all of the routers within the AS have learned the route via an
  9. IGP.
  10. You can disable synchronization if one of the following is true:
    • 1. Your AS does not pass traffic from one AS to another.
    • 2. ALL the transit routers in your AS run BGP
  11. The only difference between advertising a static and a default route, is that when you redistribute a
  12. static, BGP sets the origin attribute of updates to incomplete.
  13. Redistributing a static route is the best way to advertise a supernet because it stops the route from
  14. flapping.
  15. To ensure a loop free inter-domain topology, BGP does not accept updates that originated from its own AS.
  16. Origin attribute- will be “i” when injected with network command in router configuration mode, “e” when learned through EGP, “?” incomplete when a route is redistributed into bgp.
  17. BGP specifies that the next hop of EBGP learned routes remain unchanged into and through IBGP.
  18. BGP Attributes

    The weight attribute is a special CISCO attribute that is used in the path selection when there is more than one route to the destination. The weight attribute is local to the router on which it is assigned and is NOT propagated in routing updates. (higher more preferred), there are 3 ways to set weight:

    • Access-list
    • Route-map
    • Neighbor weight command

    The local preference attribute indicates the preferred path when there is multiple paths. (higher=better). Unlike the weight attribute, the local preference is carried with route updates and exchanged with routers in the same AS. 2 ways to set local preference:

    • use the bgp default local-preference command
    • route-maps

    The MED attribute is a hint to EBGP peers about the preferred path into an AS when there are multiple. (lower=better). Unlike local preference, the MED is exchanged between AS’s, but a MED that comes into

    an AS does not leave the AS.

    The community attribute provides a way of grouping destinations to which routing decisions can be

    applied. To send the attribute you MUST use the neighbor send-community router config command.

    Other topics:

    BGP Route Reflectors- eliminates full mesh requirement.

    BGP Confederations- makes “mini- AS’s” inside of an AS.

    BGP Peer groups – a group of neighbors that share the same update policies.

    Brief, BGP Path Selection Process:

  19. Is the Next-Hop present for the Route.
  20. Prefer Largest Weight, if Cisco.
  21. Prefer largest local preference, after Weight.
  22. Internally Generated Routes have high preference.
  23. Prefer Shortest AS Path
  24. Prefer Incomplete Origin over IGP and IGP over EGP.
  25. Prefer the lowest MED ( Metric )
  26. Prefer closest route learned through an IGP
  27. If still all stuff is same, make decisions on BGP Router IDs, lowest is always preferred.
  28. Important BGP Commands:

    Aggregate-address

    Configure bgp aggregate entries

    Auto-summary

    Default-metric

    Set metric of redistributed routes

    Distance

    Define admin distance

    Distribute-list

    Filter Networks in routing updates

    Maximum-paths

    Forward Packets on multiple paths

    Synchronization

    Perform IGP Synchronization (IBGP)

    Timers

    Adjust BGP Update Timers

    Traffic-share

    Algorithm for computing traffic share over alternate routes

    Neighbor advertise-map

    Specific route-map for conditional adverstisements

    Neighbor advertisement-interval

    Min. Interval b/w EBGP Routing Updates

    Neighbor distribute-list

    Filter Routes specific to neighbor

    Neighbor Ebgp-multihop

    Allow EBGP Neighbors not on directly connected networks

    Neighbor Filter-list

    Enable BGP Filters

    Neighbor maximum-prefix

    Max. Limit of Routes the neighbor could learn.

    Neighbor next-hop-self

    Disable Next-Hop Calculation for neighbor and advertise itself as the neighbor

    Neighbor peer-group

    Assign a Peer Group to the neighbor

    Neighbor prefix-list

    Filter updates from this neighbor

    Neighbor remote-as

    Define the AS

    Neighbor remove-private-as

    No Private AS #s in outbound updates

    Neighbor route-map

    Apply a route-map

    Neighbor route-reflector-client

    Enable Route-Reflection on this Router

    Neighbor send-community

    Send the Community Attribute to this neighbor

    Neighbor shutdown

    Administratively disable peering with the neighbor

    Neighbor timers

    BGP Neighbor specific timers

    Neighbor unsuppress-map

    Route-Map to selectively allow suppressed routes to that specific neighbor

    Neighbor update-source

    Define Source interface for the neighbor

    Neighbor weight

    Specify neighbor specific weight (Cisco Only)

1 comment:

Zulfi said...

Hi Farhan,

Thanks for a great Summary of BGP.

I noticed a minor error. Under BGP Best path selection, i think point 6 is incorrect. It should be in reverse..
i.e Preference is as:
EBGP > IBGP > Incomplete

Thanks & Regards,
Zulfiquar L.