Border Gateway Protocol

·

The Border Gateway Protocol (BGP) is an interautonomous system routing protocol. An autonomous system is a network or group of networks under a common administration and with common routing policies. BGP is used to exchange routing information for the Internet and is the protocol used between Internet service providers (ISP).Customer networks, such as universities and corporations, usually employ an Interior Gateway Protocol (IGP) such as RIP or OSPF for the exchange of routing information within their networks. Customers connect to ISPs, and ISPs use BGP to exchange customer and ISP routes. When BGP is used between autonomous systems (AS), the protocol is referred to as External BGP (EBGP). If a service provider is using BGP to exchange routes within an AS, then the protocol is referred to as Interior BGP (IBGP). Figure illustrates this distinction.























BGP Attributes:

the attributes that BGP uses in the route selection process:

•Weight

•Local preference

•Multi-exit discriminator

•Origin

•AS_path

•Next hop

•Community

The weight attribute
is not advertised to neighboring routers. If the router learns about more than one route to the same destination, the route with the highest weight will be preferred.

The local preference attribute is used to prefer an exit point from the local autonomous system (AS). Unlike the weight attribute, the local preference attribute is propagated throughout the local AS. If there are multiple exit points from the AS, the local preference attribute is used to select the exit point for a specific route.

The multi-exit discriminator (MED) or metric attribute is used as a suggestion to an external AS regarding the preferred route into the AS that is advertising the metric.
The term suggestion is used because the external AS that is receiving the MEDs may be using other BGP attributes for route selection.

The origin attribute indicates how BGP learned about a particular route. The origin attribute can have one of three possible values:

•IGP—The route is interior to the originating AS. This value is set when the network router configuration command is used to inject the route into BGP.

•EGP—The route is learned via the Exterior Border Gateway Protocol (EBGP).

•Incomplete—The origin of the route is unknown or learned in some other way. An origin of incomplete occurs when a route is redistributed into BGP.

When a route advertisement passes through an autonomous system, the AS number is added to an ordered list of AS numbers that the route advertisement has traversed.

The EBGP next-hop attribute is the IP address that is used to reach the advertising router. For EBGP peers, the next-hop address is the IP address of the connection between the peers.

The community attribute provides a way of grouping destinations, called communities, to which routing decisions (such as acceptance, preference, and redistribution) can be applied. Route maps are used to set the community attribute. Predefined community attributes are listed here:

•no-export—Do not advertise this route to EBGP peers.

•no-advertise—Do not advertise this route to any peer.

•internet—Advertise this route to the Internet community; all routers in the network belong to it.

BGP Path Selection

BGP could possibly receive multiple advertisements for the same route from multiple sources. BGP selects only one path as the best path. When the path is selected, BGP puts the selected path in the IP routing table and propagates the path to its neighbors. BGP uses the following criteria, in the order presented, to select a path for a destination:

•If the path specifies a next hop that is inaccessible, drop the update.

•Prefer the path with the largest weight.

•If the weights are the same, prefer the path with the largest local preference.

•If the local preferences are the same, prefer the path that was originated by BGP running on this router.

•If no route was originated, prefer the route that has the shortest AS_path.

•If all paths have the same AS_path length, prefer the path with the lowest origin type (where IGP is lower than EGP, and EGP is lower than incomplete).

•If the origin codes are the same, prefer the path with the lowest MED attribute.

•If the paths have the same MED, prefer the external path over the internal path.

•If the paths are still the same, prefer the path through the closest IGP neighbor.

•Prefer the path with the lowest IP address, as specified by the BGP router ID.

About Me

Blog Archive