BSCI: BGP Attributes III
Posted by Aragoen Celtdra on 19th December 2008
Local Preference Attribute
- Local preference is a well-known discretionary attribute that tells the routers in an AS which path is the preferred path to exit the AS.
- If an internal BGP speaker receives a multiple routes to a destination, the router compares the LOCAL_PREF attribute of the routes.
- The path with the higher local preference is chosen.
- Local preference is exchanged only among routers in the same AS, among internal BGP neighbors; it is not passed to other autonomous system (ie other EBGP peers).
- In the figure above, AS100 receives advertisement for network 172.16.1.0/24 from two different points.
- As Router A receives the advertisement from Router C, Router A sets the LOCAL_PREF to 50.
- Likewise, when Router B receives the advertisement to the same network (172.16.1.0/24), Router B sets the LOCAL_PREF to 100.
- These local preference values will be exchanged between IBGP neighbors, Routers A and B.
- Based on the higher value LOCAL_PREF for Router B, Router B will be use as the exit point for AS 100 to reach network 172.16.1.0 in AS 200.
Multi-exit Discriminator (MED) Attribute
- Whereas the local preference attribute affects traffic leaving the AS, The MED attribute influences incoming traffic.
- Also called the metric. A lower metric is preferred. As is true with most “metrics”, the lowest metrics means the shortest distance, and thus the preferred one.
- MED is set to 0 (zero) by default.
- This attribute is carried in EBGP updates and allows an AS to indicate to another AS its preferred incoming points.
- By default, a router compares the MED attribute only for paths from the neighbors in the same AS.
- The MED is exchanged between two directly connected autonomous systems only.
- MEDs are not passed beyond the receiving AS.
- In the Figure above, a subscriber in AS 200 is dual-homed to a single ISP (AS 100).
- Within AS 100, IBGP is being used between the routers. The MEDs from AS 200 are exchanged between these internal peers so that they both know which route to prefer.
- MEDs also do not go past beyond the receiving AS. IF AS 100 advertises 172.16.1.0/24 to another AS, for instance, it does not pass along the MED set by the originating AS; AS 200 in this case.
- Additionally, MEDs are not compared if two routes to the same destination are received from two different autonomous systems.
- For example, 172.16.1.0/24 is advertised from AS 200 and another AS, the MEDs are not compared.
- MEDs are meant only for a single AS (with multiple entry point) in order to compare which entry point to prefer.
Community Attribute
- Communities are optional transitive attributes that is designed to simplify policy enforcement. It is one way to filter incoming or outgoing routes.
- BGP communities allow routers to tag routes with a community indicator and allow other routers to make decisions based on that tag.
- It Identifies a route as a member of some community of routes that share some common properties.
- An example might be an ISP that assigns a particular COMMUNITY attribute to all of its customers’ routes. The ISP may then set its LOCAL_PREF attribute based on the COMMUNITY value instead of basing it on each inidividual route.
- The community attribute was originally a Cisco-speficific attribute. But now a RFC standard through RFC 1997.
Weight Attribute (Cisco Only)
- The weight attribute is a Cisco-specific attribute.
- It is configured locally on the router and is not communicated or propagated to other routers.
- The weight ha a value between 0 to 65,535.
- By default, all routes generated by the local router have a weight of 32,768.
- All routes learned from a peer have a weight of 0.
- The higher the weight, the more preferable the route.
- The weight attribute applies when using one router with multiple exit points out of an AS.
- Contrast it with the local preference attribute where it is used when two or more routers provide multiple exit points.
- In the figure above, Router A receives an advertisement for network 172.16.1.0/24 from Routers B and C.
- Router A knows about more than one route to the same destination.
- The route coming from Router B has an associated weight of 50.
- The route coming from Router C has an associated weight of 100.
- Both paths for network 172.16.1.0 will be in the BGP routing table, with their respective weights.
- The route with a higher weight will be installed in the IP routing table.
Resources:
- Border Gateway Protocol – Internetworking Technology Handbook – Cisco Systems
- RFC 4451 – BGP MULTI_EXIT_DISC (MED) Considerations
- RFC 1997 – BGP Communities Attribute
- RFC 1998 -An Application of the BGP Community Attribute in Multi-home Routing
This entry is not an authoritative guide. These are merely notes and rehash of the primary text materials and resources that I use. For a thorough guide of the BSCI course, consider purchasing Building Scalable Cisco Internetworks (BSCI) (Authorized Self-Study Guide) (3rd Edition) by Diane Teare and Catherine Paquet; Routing TCP/IP, Volume 1 (2nd Edition) (CCIE Professional Development) by Jeff Doyle and Jennifer Carroll; as well as following the links on the resources section of this entry.
Posted in BGP, BSCI Exam Prep, CCNP, Routing Protocols | No Comments » |



