Posted by: Sulaiman Syed
Attribute, CCNP, Cisco, eBGP, iBGP, NEXT_HOP, Path, route, router, routing, weight
Since, i started studying for CCIE, i would start writing technical topics that are either difficult or interesting, and present them in easy way.
BGP is one of the most interesting routing protocols out there. The interesting part lies in the way routes can be manipulated. There are many Path Attributes (PA) that play part in the way BGP build the routing table from the route updates.
Routes can be manipulated by omitting or filters routes based on prefixes or AS_PATH segments (this will be discussed in next entry)
The main Path Attributes (PAs) are
- Weight (Cisco proprietary)
- Local Pref
- Locally injected routes
- Autonomous System (AS) Path
- Origin PA
- Multi-Exit Discriminator (MED)
- Neighbor Type
- IGP metric for reaching NEXT_HOP
These are the main PAs that can be manipulated to change the way the routing table is built. The Decision of BGP to include a route into a routing table takes the following process.
0- Add the route, if the NEXT_HOP is reachable. so if there is no route to NEXT_HOP address, the route will be automatically rejected. Although this is not a PA, but it is the first and most important factor for a route to be added to Routing Table.
1-Highest administrative weight, the higher the value the better the route is. This can only be modified locally (on router) and cant be communicated to other routers.
2-Highest local pref, it can be distributed insight the AS. the higher the value the better.
3-Locally injected routes, this will cause BGP to use routes that were injected locally through Network, redistribution or route summarization.
4-Shortest AS_PATH length. the shorter the path, the better the route. It will treat AS_SET as one ASN regardless of the number of ASNs in the variable.
5-ORIGIN PA, IGP (I)> EGP (E) > incomplete (?)
6- Smallest MED. This allows the ISP to let the costumer know which exit to choose in multi-homing designs for reaching particulate Network.
7- Neighbor type, it would prefer eBGP routes over iBGP.
8- IGP metric for reaching the NEXT_HOP, the smaller the value the better the route is.
If all of those fail to decide which route to add in the routing table. then the following tiebreakers will be used.
9- Keep oldest eBGP route. This will give more stability and stop route flops.
10-choose the smallest neighbor RID.
11 smallest neighbor ID. the local router will have to neighbor relationships with a single router (one router, to another router with two links and two neighbor commands) . the lower ID is the better.
One last point to know, with maximum-path BGP will allow more than one route to be added to routing table. BUT, it will always use one BEST route when advertising to neighbors.