Wednesday, September 15, 2010

BGP decisionmaking, and a link to the bad science blog about blind prejudice

or "Fucking BGP - how does it work?" context

I'm on a BGP kick because someone was asking me questions about BGP last week and I felt like an idiot when I couldn't remember more than two of the criteria BGP uses to make its routing decisions.

So, here's how BGP makes its routing decisions (and the order in which it evaluates criteria):
  1. Pick the route with the highest "weight" (bgp "weight" is a cisco-specifc thing specified on the local router)
  2. Pick the route with the highest "local pref"
  3. Prefer a route that is locally originated vs remote.
  4. Pick the route with the shortest AS path (You can avoid this by using the "bgp bestpath as-path ignore" command.)
  5. Pick the route with the lowest origin type. (Interior routing protocols such as OSPF are preferred over routes that originate via EBGP)
  6. Pick the route with the lowest "MED", Multi Exit Discriminator.
  7. Prefer EBGP over IBGP.
  8. Prefer the path with the closest (determined by interior routing protocols) next hop.
  9. The router determines if anything MultiPath-related needs to happen.
  10. If we've gotten to this point and still have multiple choices, prefer the oldest route. This helps prevent route flapping.
  11. Prefer the route from the peer with the lowest Router ID. This is sort of like how ospf picks a designated router by "router ID". For BGP, the router ID is the highest IP address on the router, preferably loopback addresses. You can avoid IP address tweaking by manually setting the router ID with the command "bgp router-is".
  12. If you're running an environment with route reflector(s), prefer the shortest cluster list among multiple paths that go to the same originator/router-id.
  13. If not, just pick the path with the lowest neighbor IP address.

Then, RELEASE THE PACKET! (It helps to imagine the TUBEZ of the internet being full of tiny little kraken. Or maybe that's just me.)

...
Meanwhile, over on the unsurprising gender side of things:
On the Internet, no one knows you're a dog. But if you're a woman, what you wear can change people's perception of your skills, at least for musicians.

No comments:

Post a Comment

Followers

About Me

My Photo
Regis has worked as a network engineer since 1994 for small companies and for large companies.