4-58
Configuring BGP on Cisco Routers (BGP) v3.2
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc., for the sole use by Cisco employees for personal study. The files or printed representations may not be used in commercial training, and may not be distributed for purposes other than individual self-study.
© 2005, Cisco Systems, Inc.
Lesson 4
Understanding BGP Multi-Exit Discriminators Overview When connections to multiple providers are required, it is important that Border Gateway Protocol (BGP) select the optimum route for traffic to use. It is equally important that the return path that is selected be the optimum return path into the autonomous system (AS). The optimum, or best, route may not be what the network designer intended based on design criteria, administrative policies, or corporate mandate. Fortunately, BGP provides a tool for administrators to influence route selection, the multi-exit discriminator (MED) attribute. This lesson discusses how to influence BGP route selection by setting the BGP MED attribute of outgoing BGP routes. Two methods that are used to set the MED attribute, the default MED and route-maps, are discussed in this lesson. In addition to basic MED attribute configuration, advanced commands to manipulate MED properties are discussed, as well as how to monitor and troubleshoot the BGP table to verify correct MED configuration and to properly influence path selection.
Objectives Upon completing this lesson, you will be able to use the MED attribute to influence route selection in a customer scenario in which you must support multiple ISP connections. This ability includes being able to meet these objectives:
Describe how the MED can be used to facilitate proper return path selection
Explain how the value of the MED attribute changes inside a BGP AS and between different BGP autonomous systems
Identify the Cisco IOS command that is required to configure changes to the default BGP MED on a Cisco IOS router
Identify the Cisco IOS commands that are required to configure the BGP MED using routemaps
Identify the Cisco IOS commands that are required to configure advanced MED features on Cisco routers
Identify the Cisco IOS commands that are required to monitor the BGP MED
Identify the Cisco IOS commands that are required to troubleshoot the BGP MED configurations
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc., for the sole use by Cisco employees for personal study. The files or printed representations may not be used in commercial training, and may not be distributed for purposes other than individual self-study.
Monitoring the MED This topic lists the Cisco IOS commands that are required to monitor the BGP MED attribute on a Cisco router.
Monitoring the MED • The MED is displayed in show ip bgp [ prefix ] printout as the “metric” field. • The MED after route-map processing is displayed in BGP update debugging. • The MED received from a neighbor is displayed in show ip bgp neighbor received-routes printouts.
© 2005 Cisco Systems, Inc. All rights reserved.
BGP v3.2—4-11
All BGP-related show and debug commands display the value of the MED attribute. If the inbound soft reconfiguration feature is enabled on the router, the original MED attribute that is received by the router is also displayed. The following examples demonstrate command output for Cisco show ip bgp commands.
© 2005, Cisco Systems, Inc. The PDF files and any printed representation for this material are the property of Cisco Systems, Inc., for the sole use by Cisco employees for personal study. The files or printed representations may not be used in commercial training, and may not be distributed for purposes other than individual self-study.
Route Selection Using Attributes
4-69
Example: Monitoring the MED This example illustrates monitoring the BGP table to verify correct MED configurations.
Monitoring the MED (Cont.)
© 2005 Cisco Systems, Inc. All rights reserved.
BGP v3.2—4-12
The same network used in the previous lesson on BGP local preference is used in this topic to produce the sample output that follows. All commands were executed on router RTR-C. Some routing updates from router RTR-B are sent to router RTR-C with a MED of 500. Some updates from RTR-B to RTR-C have the MED set to 0, and some are without a MED attribute. Inbound soft reconfiguration is used on router RTR-C.
4-70
Configuring BGP on Cisco Routers (BGP) v3.2
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc., for the sole use by Cisco employees for personal study. The files or printed representations may not be used in commercial training, and may not be distributed for purposes other than individual self-study.
© 2005, Cisco Systems, Inc.
Monitoring the MED (Cont.) • MED is displayed in show ip bgp printout.
© 2005 Cisco Systems, Inc. All rights reserved.
BGP v3.2—4-13
Both networks that are received from router RTR-B have a MED of 500. Network 10.0.0.0/8, which is received from RTR-A, has no MED attribute, while network 11.0.0.0/8 has a MED value of 0.
© 2005, Cisco Systems, Inc. The PDF files and any printed representation for this material are the property of Cisco Systems, Inc., for the sole use by Cisco employees for personal study. The files or printed representations may not be used in commercial training, and may not be distributed for purposes other than individual self-study.
Route Selection Using Attributes
4-71
Monitoring the MED (Cont.) • MED values are also displayed in show ip bgp prefix printout.
© 2005 Cisco Systems, Inc. All rights reserved.
BGP v3.2—4-14
When looking at detailed information for a specific network, you will see the MED (via the show ip bgp prefix command) only if the attribute exists.
4-72
Configuring BGP on Cisco Routers (BGP) v3.2
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc., for the sole use by Cisco employees for personal study. The files or printed representations may not be used in commercial training, and may not be distributed for purposes other than individual self-study.
© 2005, Cisco Systems, Inc.
Troubleshooting the MED This topic lists the Cisco IOS commands that are required to troubleshoot BGP MED configurations on a Cisco router.
Troubleshooting the MED • MED sent to a neighbor (after the outgoing route-map) is displayed in debugging outputs.
© 2005 Cisco Systems, Inc. All rights reserved.
BGP v3.2—4-15
If debugging is necessary to troubleshoot a problem, the MED, among other attributes, is displayed. This example shows the MED attribute set with an outgoing route-map.
© 2005, Cisco Systems, Inc. The PDF files and any printed representation for this material are the property of Cisco Systems, Inc., for the sole use by Cisco employees for personal study. The files or printed representations may not be used in commercial training, and may not be distributed for purposes other than individual self-study.
Route Selection Using Attributes
4-73
Troubleshooting the MED (Cont.) • MED stored in the BGP table (after the incoming route-map processing) is displayed in debugging outputs.
© 2005 Cisco Systems, Inc. All rights reserved.
BGP v3.2—4-16
This debugging example shows the MED attribute value after the update has been processed by an incoming route-map.
Troubleshooting the MED (Cont.) • Original MED received from a neighbor (before the incoming route-map processing) is displayed in show ip bgp neighbor received.
© 2005 Cisco Systems, Inc. All rights reserved.
BGP v3.2—4-17
To see the original MED, you need to enable soft reconfiguration on the router. The show ip bgp neighbor address received-routes command displays the original updates before any filters or route-maps have filtered or changed them.
4-74
Configuring BGP on Cisco Routers (BGP) v3.2
The PDF files and any printed representation for this material are the property of Cisco Systems, Inc., for the sole use by Cisco employees for personal study. The files or printed representations may not be used in commercial training, and may not be distributed for purposes other than individual self-study.
© 2005, Cisco Systems, Inc.
Troubleshooting the MED (Cont.) • Both original route and modified route are displayed with a route-map when inbound soft reconfiguration is configured.
© 2005 Cisco Systems, Inc. All rights reserved.
BGP v3.2—4-18
If soft reconfiguration is enabled, the original updates to the MED attribute are available by using the show ip bgp prefix command. The original versions are marked with the receivedonly keyword and follow the version that is in the global BGP table. In the figure, the received update had no MED attribute but a value of 1000 was later applied through a route-map.
© 2005, Cisco Systems, Inc. The PDF files and any printed representation for this material are the property of Cisco Systems, Inc., for the sole use by Cisco employees for personal study. The files or printed representations may not be used in commercial training, and may not be distributed for purposes other than individual self-study.
Route Selection Using Attributes
4-75