Configuring BGP

The Cisco BGP Implementation

BGP Version 4 supports classless interdomain routing (CIDR), which lets you reduce the size of your routing tables by creating aggregate routes, resulting in supernets. CIDR eliminates the concept of network classes within BGP and supports the advertising of IP prefixes. CIDR routes can be carried by Open Shortest Path First (OSPF), Enhanced IGRP (EIGRP), and Intermediate System-to-Intermediate System (ISIS)-IP, and Routing Information Protocol (RIP).

See the “BGP Route Map Examples” section at the end of this chapter for examples of how to use route maps to redistribute BGP Version 4 routes.

How BGP Selects Paths

A router running Cisco IOS Release 12.0 or later does not select or use an iBGP route unless both of the following conditions are true:

The router has a route available to the next hop router:

The router has received synchronization via an IGP (unless IGP synchronization has been disabled).

BGP bases its decision process on the attribute values. When faced with multiple routes to the same destination, BGP chooses the best route for routing traffic toward the destination. The following process summarizes how BGP chooses the best route.

1.If the next hop is inaccessible, do not consider it.

This decision is why it is important to have an IGP route to the next hop.

2.If the path is internal, synchronization is enabled, and the route is not in the IGP, do not consider the route.

3.Prefer the path with the largest weight (weight is a Cisco proprietary parameter).

4.If the routes have the same weight, prefer the route with the largest local preference.

5.If the routes have the same local preference, prefer the route that was originated by the local router.

For example, a route might be originated by the local router using the network bgp router configuration command, or through redistribution from an IGP.

6.If the local preference is the same, or if no route was originated by the local router, prefer the route with the shortest autonomous system path.

7.If the autonomous system path length is the same, prefer the route with the lowest origin code (IGP < EGP < INCOMPLETE).

8.If the origin codes are the same, prefer the route with the lowest MED metric attribute.

This comparison is only made if the neighboring autonomous system is the same for all routes considered, unless the bgp always-compare-medrouter configuration command is enabled.

Note The most recent Internet Engineering Task Force (IETF) decision regarding BGP MED assigns a value of infinity to the missing MED, making the route lacking the MED variable the least preferred. The default behavior of BGP routers running Cisco IOS software is to treat routes without the MED attribute as having a MED of 0, making the route lacking the MED variable the most preferred. To configure the router to conform to the IETF standard, use the bgp bestpath med missing-as-worstrouter configuration command.

9.Prefer the external BGP (eBGP) path over the iBGP path. All confederation paths are considered internal paths.

Cisco IOS IP Configuration Guide

IPC-294

Page 340
Image 340
Cisco Systems 78-11741-02 manual How BGP Selects Paths, IPC-294