IP Routing: BGP Configuration Guide First Published: 2013-08-12 Last Modified: 2013-08-12 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 527-0883 THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS. THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY. The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California. NOTWITHSTANDING ANY OTHERWARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE. IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental. All printed copies and duplicate soft copies of this document are considered uncontrolled. See the current online version for the latest version. Cisco has more than 200 offices worldwide. Addresses and phone numbers are listed on the Cisco website at www.cisco.com/go/offices. Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com go trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1721R) © 2019 Cisco Systems, Inc. All rights reserved. C O N T E N T S Read Me First 1C H A P T E R 1 Cisco BGP Overview 3C H A P T E R 2 Finding Feature Information 3 Prerequisites for Cisco BGP 3 Restrictions for Cisco BGP 4 Information About Cisco BGP 4 BGP Version 4 4 BGP Version 4 Functional Overview 4 BGP Autonomous Systems 5 BGP Autonomous System Number Formats 6 Classless Interdomain Routing 8 Multiprotocol BGP 9 Benefits of Using Multiprotocol BGP Versus BGP 9 Multiprotocol BGP Extensions for IP Multicast 9 NLRI Configuration CLI 11 Cisco BGP Address Family Model 11 IPv4 Address Family 14 IPv6 Address Family 14 CLNS Address Family 14 VPNv4 Address Family 15 L2VPN Address Family 15 BGP CLI Removal Considerations 16 Additional References 18 Feature Information for Cisco BGP Overview 19 BGP 4 21C H A P T E R 3 Finding Feature Information 21 Information About BGP 4 21 BGP Version 4 Functional Overview 21 BGP Router ID 22 BGP-Speaker and Peer Relationships 22 BGP Peer Session Establishment 23 BGP Session Reset 24 BGP Route Aggregation 24 BGP Route Aggregation Generating AS_SET Information 25 Routing Policy Change Management 25 BGP Peer Groups 26 BGP Backdoor Routes 26 How to Configure BGP 4 27 Configuring a BGP Routing Process 27 Troubleshooting Tips 30 Configuring a BGP Peer 30 Troubleshooting Tips 33 Configuring a BGP Peer for the IPv4 VRF Address Family 34 Troubleshooting Tips 37 Customizing a BGP Peer 37 Removing BGP Configuration Commands Using a Redistribution 42 Monitoring and Maintaining Basic BGP 44 Configuring Inbound Soft Reconfiguration When Route Refresh Capability Is Missing 44 Resetting and Displaying Basic BGP Information 47 Aggregating Route Prefixes Using BGP 48 Redistributing a Static Aggregate Route into BGP 48 Configuring Conditional Aggregate Routes Using BGP 50 Suppressing and Unsuppressing the Advertisement of Aggregated Routes Using BGP 51 Conditionally Advertising BGP Routes 52 Originating BGP Routes 55 Advertising a Default Route Using BGP 55 Originating BGP Routes Using Backdoor Routes 57 Configuring a BGP Peer Group 58 Configuration Examples for BGP 4 60 Example: Configuring a BGP Process and Customizing Peers 60 Examples: Removing BGP Configuration Commands Using a Redistribution Example 61 Examples: BGP Soft Reset 62 Example: Resetting and Displaying Basic BGP Information 62 Examples: Aggregating Prefixes Using BGP 64 Example: Configuring a BGP Peer Group 65 Additional References 65 Feature Information for BGP 4 66 Configuring a Basic BGP Network 69C H A P T E R 4 Finding Feature Information 69 Prerequisites for Configuring a Basic BGP Network 69 Restrictions for Configuring a Basic BGP Network 70 Information About Configuring a Basic BGP Network 70 BGP Version 4 70 BGP Router ID 70 BGP-Speaker and Peer Relationships 70 BGP Autonomous System Number Formats 71 Cisco Implementation of 4-Byte Autonomous System Numbers 73 BGP Peer Session Establishment 74 Cisco Implementation of BGP Global and Address Family Configuration Commands 75 BGP Session Reset 76 BGP Route Aggregation 77 BGP Aggregation Route AS_SET Information Generation 77 Routing Policy Change Management 77 Conditional BGP Route Injection 79 BGP Peer Groups 79 BGP Backdoor Routes 79 Peer Groups and BGP Update Messages 80 BGP Update Group 80 BGP Dynamic Update Group Configuration 81 BGP Peer Templates 81 Inheritance in Peer Templates 82 Peer Session Templates 82 Peer Policy Templates 83 BGP IPv6 Neighbor Activation Under the IPv4 Address Family 85 How to Configure a Basic BGP Network 85 Configuring a BGP Routing Process 85 Troubleshooting Tips 88 Configuring a BGP Peer 88 Troubleshooting Tips 92 What to Do Next 92 Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers 92 Troubleshooting Tips 95 Modifying the Default Output and Regular ExpressionMatch Format for 4-Byte Autonomous System Numbers 95 Configuring a BGP Peer for the IPv4 VRF Address Family 98 Troubleshooting Tips 102 Customizing a BGP Peer 102 Removing BGP Configuration Commands Using a Redistribution 106 Monitoring and Maintaining Basic BGP 108 Configuring Inbound Soft Reconfiguration When Route Refresh Capability Is Missing 108 Resetting and Displaying Basic BGP Information 111 Aggregating Route Prefixes Using BGP 113 Redistributing a Static Aggregate Route into BGP 113 Configuring Conditional Aggregate Routes Using BGP 114 Suppressing and Unsuppressing the Advertisement of Aggregated Routes Using BGP 115 Suppressing Inactive Route Advertisement Using BGP 117 Conditionally Advertising BGP Routes 119 Originating BGP Routes 121 Advertising a Default Route Using BGP 121 Conditionally Injecting BGP Routes 123 Originating BGP Routes Using Backdoor Routes 127 Configuring a BGP Peer Group 128 Configuring Peer Session Templates 130 Configuring a Basic Peer Session Template 130 Configuring Peer Session Template Inheritance with the inherit peer-session Command 132 Configuring Peer Session Template Inheritance with the neighbor inherit peer-session Command 134 Configuring Peer Policy Templates 136 Configuring Basic Peer Policy Templates 136 Configuring Peer Policy Template Inheritance with the inherit peer-policy Command 138 Configuring Peer Policy Template Inheritance with the neighbor inherit peer-policy Command 140 Monitoring and Maintaining BGP Dynamic Update Groups 142 Troubleshooting Tips 143 Configuration Examples for a Basic BGP Network 143 Example: Configuring a BGP Process and Customizing Peers 143 Examples: Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers 144 Examples: Configuring a VRF and Setting an Extended Community Using a BGP 4-Byte Autonomous System Number 147 Example: NLRI to AFI Configuration 148 Examples: Removing BGP Configuration Commands Using a Redistribution Example 150 Examples: BGP Soft Reset 151 Example: Resetting BGP Peers Using 4-Byte Autonomous System Numbers 152 Example: Resetting and Displaying Basic BGP Information 152 Examples: Aggregating Prefixes Using BGP 154 Example: Configuring a BGP Peer Group 155 Example: Configuring Peer Session Templates 155 Examples: Configuring Peer Policy Templates 156 Examples: Monitoring and Maintaining BGP Dynamic Update Peer-Groups 156 Where to Go Next 158 Additional References 158 Feature Information for Configuring a Basic BGP Network 159 BGP 4 Soft Configuration 161C H A P T E R 5 Finding Feature Information 161 Information About BGP 4 Soft Configuration 161 BGP Session Reset 161 How to Configure BGP 4 Soft Configuration 162 Configuring Inbound Soft Reconfiguration When Route Refresh Capability Is Missing 162 Configuration Examples for BGP 4 Soft Configuration 165 Examples: BGP Soft Reset 165 Additional References 166 Feature Information for BGP 4 Soft Configuration 166 BGP Support for 4-byte ASN 169C H A P T E R 6 Finding Feature Information 169 Information About BGP Support for 4-byte ASN 169 BGP Autonomous System Number Formats 169 Cisco Implementation of 4-Byte Autonomous System Numbers 171 How to Configure BGP Support for 4-byte ASN 172 Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers 172 Troubleshooting Tips 175 Modifying the Default Output and Regular ExpressionMatch Format for 4-Byte Autonomous System Numbers 175 Configuration Examples for BGP Support for 4-byte ASN 179 Examples: Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers 179 Examples: Configuring a VRF and Setting an Extended Community Using a BGP 4-Byte Autonomous System Number 182 Additional References for BGP Support for 4-byte ASN 183 Feature Information for BGP Support for 4-byte ASN 184 IPv6 Routing: Multiprotocol BGP Extensions for IPv6 187C H A P T E R 7 Finding Feature Information 187 Information About IPv6 Routing: Multiprotocol BGP Extensions for IPv6 187 Multiprotocol BGP Extensions for IPv6 187 How to Implement Multiprotocol BGP for IPv6 188 Configuring an IPv6 BGP Routing Process and BGP Router ID 188 Configuring IPv6 Multiprotocol BGP Between Two Peers 189 Advertising IPv4 Routes Between IPv6 BGP Peers 190 Clearing External BGP Peers 192 Configuring BGP IPv6 Admin Distance 193 Configuration Examples for Multiprotocol BGP for IPv6 193 Example: Configuring a BGP Process, BGP Router ID, and IPv6 Multiprotocol BGP Peer 193 Example: Configuring an IPv6 Multiprotocol BGP Peer Group 194 Example: Advertising Routes into IPv6 Multiprotocol BGP 194 Example: Configuring a Route Map for IPv6 Multiprotocol BGP Prefixes 194 Example: Redistributing Prefixes into IPv6 Multiprotocol BGP 194 Example: Advertising IPv4 Routes Between IPv6 Peers 194 Additional References 195 Feature Information for IPv6 Routing Multiprotocol BGP Extensions for IPv6 196 IPv6 Routing: Multiprotocol BGP Link-Local Address Peering 197C H A P T E R 8 Finding Feature Information 197 Information About IPv6 Routing: Multiprotocol BGP Link-Local Address Peering 197 IPv6 Multiprotocol BGP Peering Using a Link-Local Address 197 How to Configure IPv6 Routing: Multiprotocol BGP Link-Local Address Peering 198 Configuring an IPv6 Multiprotocol BGP Peer Using a Link-Local Address 198 Configuration Examples for IPv6 Routing: Multiprotocol BGP Link-Local Address Peering 201 Example: Configuring an IPv6 Multiprotocol BGP Peer Using a Link-Local Address 201 Additional References 202 Feature Information for IPv6 Routing Multiprotocol BGP Link-Local Address Peering 203 IPv6 Multicast Address Family Support for Multiprotocol BGP 205C H A P T E R 9 Finding Feature Information 205 Information About IPv6 Multicast Address Family Support for Multiprotocol BGP 205 Multiprotocol BGP for the IPv6 Multicast Address Family 205 How to Implement IPv6 Multicast Address Family Support for Multiprotocol BGP 206 Configuring an IPv6 Peer Group to Perform Multicast BGP Routing 206 Advertising Routes into IPv6 Multiprotocol BGP 207 Redistributing Prefixes into IPv6 Multiprotocol BGP 209 Assigning a BGP Administrative Distance 210 Generating Translate Updates for IPv6 Multicast BGP 211 Resetting IPv6 BGP Sessions 212 Clearing External BGP Peers 213 Clearing IPv6 BGP Route Dampening Information 213 Clearing IPv6 BGP Flap Statistics 214 Configuration Examples for IPv6 Multicast Address Family Support for Multiprotocol BGP 214 Example: Configuring an IPv6 Multiprotocol BGP Peer Group 214 Example: Advertising Routes into IPv6 Multiprotocol BGP 215 Example: Redistributing Prefixes into IPv6 Multiprotocol BGP 215 Example: Generating Translate Updates for IPv6 Multicast BGP 215 Additional References 215 Feature Information for IPv6 Multicast Address Family Support for Multiprotocol BGP 216 Configuring Multiprotocol BGP (MP-BGP) Support for CLNS 217C H A P T E R 1 0 Finding Feature Information 217 Restrictions for Configuring MP-BGP Support for CLNS 217 Information About Configuring MP-BGP Support for CLNS 218 Address Family Routing Information 218 Design Features of MP-BGP Support for CLNS 218 Generic BGP CLNS Network Topology 218 DCN Network Topology 220 Benefits of MP-BGP Support for CLNS 221 How to Configure MP-BGP Support for CLNS 222 Configuring and Activating a BGP Neighbor to Support CLNS 222 Configuring an IS-IS Routing Process 223 Configuring Interfaces That Connect to BGP Neighbors 225 Configuring Interfaces Connected to the Local OSI Routing Domain 226 Advertising Networking Prefixes 227 Redistributing Routes from BGP into IS-IS 229 Redistributing Routes from IS-IS into BGP 231 Configuring BGP Peer Groups and Route Reflectors 232 Filtering Inbound Routes Based on NSAP Prefixes 234 Filtering Outbound BGP Updates Based on NSAP Prefixes 235 Originating Default Routes for a Neighboring Routing Domain 237 Verifying MP-BGP Support for CLNS 239 Troubleshooting MP-BGP Support for CLNS 241 Configuration Examples for MP-BGP Support for CLNS 242 Example: Configuring and Activating a BGP Neighbor to Support CLNS 242 Example: Configuring an IS-IS Routing Process 242 Configuring Interfaces Example 243 Advertising Networking Prefixes Example 243 Example: Redistributing Routes from BGP into IS-IS 243 Example: Redistributing Routes from IS-IS into BGP 244 Configuring BGP Peer Groups and Route Reflectors Example 244 Filtering Inbound Routes Based on NSAP Prefixes Example 244 Example: Filtering Outbound BGP Updates Based on NSAP Prefixes 245 Example: Originating a Default Route and Outbound Route Filtering 245 Implementing MP-BGP Support for CLNS Example 246 Autonomous System AS65101 246 Autonomous System AS65202 247 Autonomous System AS65303 248 Autonomous System AS65404 249 Additional References 251 Feature Information for Configuring MP-BGP Support for CLNS 251 Glossary 254 BGP IPv6 Admin Distance 255C H A P T E R 1 1 Information About BGP IPv6 Admin Distance 255 Benefits of Using BGP IPv6 Admin Distance 255 Configuring BGP IPv6 Admin Distance 255 Verifying BGP Admin Distance Configuration 256 Additional References for BGP IPv6 Admin Distance 257 Feature Information for BGP IPv6 Admin Distance 258 Connecting to a Service Provider Using External BGP 259C H A P T E R 1 2 Finding Feature Information 259 Prerequisites for Connecting to a Service Provider Using External BGP 260 Restrictions for Connecting to a Service Provider Using External BGP 260 Information About Connecting to a Service Provider Using External BGP 260 External BGP Peering 260 BGP Autonomous System Number Formats 261 BGP Attributes 264 Multihoming 266 MED Attribute 266 Transit Versus Nontransit Traffic 266 BGP Policy Configuration 267 BGP COMMUNITIES Attribute 268 Extended Communities 268 Extended Community Lists 269 Administrative Distance 269 BGP Route Map Policy Lists 269 How to Connect to a Service Provider Using External BGP 270 Influencing Inbound Path Selection 270 Influencing Inbound Path Selection by Modifying the AS_PATH Attribute 270 Influencing Inbound Path Selection by Setting the MED Attribute 274 Influencing Outbound Path Selection 278 Influencing Outbound Path Selection Using the Local_Pref Attribute 278 Filtering Outbound BGP Route Prefixes 281 Configuring BGP Peering with ISPs 284 Configuring Multihoming with Two ISPs 284 Multihoming with a Single ISP 288 Configuring Multihoming to Receive the Full Internet Routing Table 295 Configuring BGP Policies 298 Filtering BGP Prefixes with Prefix Lists 298 Filtering BGP Prefixes with AS-Path Filters 302 Filtering BGP Prefixes with AS-path Filters Using 4-Byte Autonomous System Numbers 304 Filtering Traffic Using Community Lists 308 Filtering Traffic Using Extended Community Lists 312 Filtering Traffic Using a BGP Route Map Policy List 316 Filtering Traffic Using Continue Clauses in a BGP Route Map 320 Configuration Examples for Connecting to a Service Provider Using External BGP 323 Example: Influencing Inbound Path Selection 323 Example: Influencing Inbound Path Selection by Modifying the AS-path Attribute Using 4-Byte AS Numbers 324 Example: Filtering BGP Prefixes with Prefix Lists 326 Example: Filtering BGP Prefixes Using a Single Prefix List 326 Example: Filtering BGP Prefixes Using a Group of Prefixes 326 Example: Adding or Deleting Prefix List Entries 327 Example: Filtering Traffic Using COMMUNITIES Attributes 327 Example: Filtering Traffic Using AS-Path Filters 328 Example: Filtering Traffic with AS-path Filters Using 4-Byte Autonomous System Numbers 329 Example: Filtering Traffic Using Extended Community Lists with 4-Byte Autonomous System Numbers 329 Example: Filtering Traffic Using a BGP Route Map 332 Where to Go Next 332 Additional References 332 Feature Information for Connecting to a Service Provider Using External BGP 334 BGP Route-Map Continue 337C H A P T E R 1 3 Finding Feature Information 337 Information About BGP Route Map Continue 337 BGP Route Map with a Continue Clause 337 Route Map Operation Without Continue Clauses 338 Route Map Operation with Continue Clauses 338 Match Operations with Continue Clauses 338 Set Operations with Continue Clauses 338 How to Filter Traffic Using Continue Clauses in a BGP Route Map 339 Filtering Traffic Using Continue Clauses in a BGP Route Map 339 Configuration Examples for BGP Route Map Continue 342 Examples: Filtering Traffic Using Continue Clauses in a BGP Route Map 342 Additional References 344 Feature Information for BGP Route Map Continue 344 BGP Route-Map Continue Support for Outbound Policy 347C H A P T E R 1 4 Finding Feature Information 347 Iinformation About BGP Route-Map Continue Support for Outbound Policy 347 BGP Route Map with a Continue Clause 347 Route Map Operation Without Continue Clauses 348 Route Map Operation with Continue Clauses 348 Match Operations with Continue Clauses 348 Set Operations with Continue Clauses 348 How to Filter Traffic Using Continue Clauses in a BGP Route Map 349 Filtering Traffic Using Continue Clauses in a BGP Route Map 349 Configuration Examples for BGP Route-Map Continue Support for Outbound Policy 353 Examples: Filtering Traffic Using Continue Clauses in a BGP Route Map 353 Additional References 354 Feature Information for BGP Route-Map Continue Support for Outbound Policy 355 Removing Private AS Numbers from the AS Path in BGP 357C H A P T E R 1 5 Finding Feature Information 357 Restrictions on Removing and Replacing Private ASNs from the AS Path 357 Information About Removing and Replacing Private ASNs from the AS Path 358 Public and Private AS Numbers 358 Benefit of Removing and Replacing Private ASNs from the AS Path 358 Former Restrictions to Removing Private ASNs from the AS Path 358 Enhancements to Removing Private ASNs from the AS Path 358 How to Remove and Replace Private ASNs from the AS Path 359 Removing and Replacing Private ASNs from the AS Path (Cisco IOS XE Release 3.1S and Later) 359 Configuration Examples for Removing and Replacing Private ASNs from the AS Path 362 Example Removing Private ASNs (Cisco IOS XE Release 3.1S) 362 Example Removing and Replacing Private ASNs (Cisco IOS XE Release 3.1S) 363 Example Removing Private ASNs (Cisco IOS XE Release 2) 364 Additional References 365 Feature Information for Removing and Replacing Private ASNs from the AS Path 366 Configuring BGP Neighbor Session Options 369C H A P T E R 1 6 Finding Feature Information 369 Information About Configuring BGP Neighbor Session Options 369 BGP Neighbor Sessions 369 BGP Support for Fast Peering Session Deactivation 370 BGP Hold Timer 370 BGP Fast Peering Session Deactivation 370 Selective Address Tracking for BGP Fast Session Deactivation 370 BFD Support of BGP IPv6 Neighbors 370 TTL Security Check for BGP Neighbor Sessions 371 BGP Support for the TTL Security Check 371 TTL Security Check for BGP Neighbor Sessions 371 TTL Security Check Support for Multihop BGP Neighbor Sessions 371 Benefits of the BGP Support for TTL Security Check 372 BGP Support for TCP Path MTU Discovery per Session 372 Path MTU Discovery 372 BGP Neighbor Session TCP PMTUD 372 How to Configure BGP Neighbor Session Options 373 Configuring Fast Session Deactivation 373 Configuring Fast Session Deactivation for a BGP Neighbor 373 Configuring Selective Address Tracking for Fast Session Deactivation 374 Configuring BFD for BGP IPv6 Neighbors 377 Configuring the TTL Security Check for BGP Neighbor Sessions 379 Configuring BGP Support for TCP Path MTU Discovery per Session 383 Disabling TCP Path MTU Discovery Globally for All BGP Sessions 383 Disabling TCP Path MTU Discovery for a Single BGP Neighbor 385 Enabling TCP Path MTU Discovery Globally for All BGP Sessions 388 Enabling TCP Path MTU Discovery for a Single BGP Neighbor 390 Configuration Examples for BGP Neighbor Session Options 392 Example: Configuring Fast Session Deactivation for a BGP Neighbor 392 Example: Configuring Selective Address Tracking for Fast Session Deactivation 392 Example: Configuring BFD for a BGP IPv6 Neighbor 392 Example: Configuring the TTL-Security Check 393 Examples: Configuring BGP Support for TCP Path MTU Discovery per Session 393 Example: Disabling TCP Path MTU Discovery Globally for All BGP Sessions 393 Example: Disabling TCP Path MTU Discovery for a Single BGP Neighbor 393 Example: Enabling TCP Path MTU Discovery Globally for All BGP Sessions 394 Example: Enabling TCP Path MTU Discovery for a Single BGP Neighbor 394 Where to Go Next 394 Additional References 394 Feature Information for Configuring BGP Neighbor Session Options 396 BGP Neighbor Policy 399C H A P T E R 1 7 Finding Feature Information 399 Information About BGP Neighbor Policy 399 Benefit of BGP Neighbor Policy Feature 399 How to Display BGP Neighbor Policy Information 400 Displaying BGP Neighbor Policy Information 400 Additional References 400 Feature Information for BGP Neighbor Policy 401 BGP Dynamic Neighbors 403C H A P T E R 1 8 Finding Feature Information 403 Information About BGP Dynamic Neighbors 403 BGP Dynamic Neighbors 403 How to Configure BGP Dynamic Neighbors 404 Implementing BGP Dynamic Neighbors Using Subnet Ranges 404 Configuring BGP IPv6 Dynamic Neighbor Support with VRF Support 410 Verifying BGP IPv6 Dynamic Neighbor Configuration 412 Configuration Examples for BGP Dynamic Neighbors 413 Example: Implementing BGP Dynamic Neighbors Using Subnet Ranges 413 Example: Configuring BGP IPv6 Dynamic Neighbor Support with VRF Support 415 Additional References 416 Feature Information for BGP Dynamic Neighbors 416 BGP Support for Next-Hop Address Tracking 419C H A P T E R 1 9 Finding Feature Information 419 Information About BGP Support for Next-Hop Address Tracking 419 BGP Next-Hop Address Tracking 419 BGP Next-Hop Dampening Penalties 420 Default BGP Scanner Behavior 420 BGP Next_Hop Attribute 420 Selective BGP Next-Hop Route Filtering 420 BGP Support for Fast Peering Session Deactivation 421 BGP Hold Timer 421 BGP Fast Peering Session Deactivation 421 Selective Address Tracking for BGP Fast Session Deactivation 421 How to Configure BGP Support for Next-Hop Address Tracking 421 Configuring BGP Next-Hop Address Tracking 421 Configuring BGP Selective Next-Hop Route Filtering 422 Adjusting the Delay Interval for BGP Next-Hop Address Tracking 425 Disabling BGP Next-Hop Address Tracking 426 Configuring Fast Session Deactivation 427 Configuring Fast Session Deactivation for a BGP Neighbor 427 Configuring Selective Address Tracking for Fast Session Deactivation 429 Configuration Examples for BGP Support for Next-Hop Address Tracking 431 Example: Enabling and Disabling BGP Next-Hop Address Tracking 431 Example: Adjusting the Delay Interval for BGP Next-Hop Address Tracking 431 Examples: Configuring BGP Selective Next-Hop Route Filtering 431 Example: Configuring Fast Session Deactivation for a BGP Neighbor 432 Example: Configuring Selective Address Tracking for Fast Session Deactivation 432 Additional References 432 Feature Information for BGP Support for Next-Hop Address Tracking 433 BGP Restart Neighbor Session After Max-Prefix Limit Reached 435C H A P T E R 2 0 Finding Feature Information 435 Information About BGP Neighbor Session Restart After Max-Prefix Limit Reached 435 Prefix Limits and BGP Peering Sessions 435 BGP Neighbor Session Restart with the Maximum Prefix Limit 436 Subcodes for BGP Cease Notification 436 How to Configure a Device to Reestablish a Neighbor Session After the Maximum Prefix Limit Has Been Exceeded 437 Configuring a Router to Reestablish a Neighbor Session After theMaximumPrefix Limit Reached 437 Troubleshooting Tips 440 Configuration Example for BGP Restart Neighbor Session After Max-Prefix Limit Reached 441 Example: Configuring a Router to Reestablish a Neighbor Session After the Maximum Prefix Limit Reached 441 Additional References for BGP Restart Neighbor Session After Max-Prefix Limit Reached 441 Feature Information for BGP Restart Neighbor Session after Max-Prefix Limit 442 BGP Support for Dual AS Configuration for Network AS Migrations 443C H A P T E R 2 1 Finding Feature Information 443 Information About BGP Support for Dual AS Configuration for Network AS Migrations 443 Autonomous System Migration for BGP Networks 443 Dual Autonomous System Support for BGP Network Autonomous System Migration 444 BGP Network Migration to 4-Byte Autonomous System Numbers 444 How to Configure BGP Support for Dual AS Configuration for Network AS Migrations 445 Configuring Dual AS Peering for Network Migration 445 Configuration Examples for Dual-AS Peering for Network Migration 447 Example: Dual AS Configuration 447 Example: Dual AS Confederation Configuration 448 Example: Replace an AS with Another AS in Routing Updates 448 Additional References 449 Feature Information for BGP Support for Dual AS Configuration for Network AS Migrations 449 Configuring Internal BGP Features 451C H A P T E R 2 2 Finding Feature Information 451 Information About Internal BGP Features 451 BGP Routing Domain Confederation 451 BGP Route Reflector 452 Route Reflector Mechanisms to Avoid Routing Loops 455 BGP Outbound Route Map on Route Reflector to Set IP Next Hop for iBGP Peer 455 BGP Route Dampening 455 Route Dampening Minimizes Route Flapping 456 BGP Route Dampening Terms 456 BGP Route Map Next Hop Self 457 How to Configure Internal BGP Features 457 Configuring a Routing Domain Confederation 457 Configuring a Route Reflector 458 Configuring a Route Reflector Using a Route Map to a Set Next Hop for an iBGP Peer 458 Adjusting BGP Timers 461 Configuring the Router to Consider a Missing MED as the Worst Path 462 Configuring the Router to Consider theMED to Choose a Path from Subautonomous System Paths 462 Configuring the Router to Use the MED to Choose a Path in a Confederation 463 Enabling and Configuring BGP Route Dampening 463 Monitoring and Maintaining BGP Route Dampening 464 Configuring BGP Route Map next-hop self 466 Configuration Examples for Internal BGP Features 469 Example: BGP Confederation Configurations with Route Maps 469 Example: BGP Confederation 470 Example: Route Reflector Using a Route Map to Set a Next Hop for an iBGP Peer 471 Example: Configuring BGP Route Map next-hop self 471 Additional References for Internal BGP Features 472 Feature Information for Configuring Internal BGP Features 473 BGP VPLS Auto Discovery Support on Route Reflector 475C H A P T E R 2 3 Finding Feature Information 475 Information About BGP VPLS Auto Discovery Support on Route Reflector 475 BGP VPLS Autodiscovery Support on Route Reflector 475 Restrictions for BGP VPLS Auto Discovery Support on Route Reflector 476 Configuration Example for BGP VPLS Auto Discovery Support on Route Reflector 476 Example: BGP VPLS Autodiscovery Support on Route Reflector 476 Additional References 476 Feature Information for BGP VPLS Auto Discovery Support on Route Reflector 477 BGP FlowSpec Route-reflector Support 479C H A P T E R 2 4 Finding Feature Information 479 Restrictions for BGP FlowSpec Route-reflector Support 479 Information About BGP FlowSpec Route-reflector Support 480 Overview of Flowspec 480 Matching Criteria 480 How to Configure BGP FlowSpec Route-reflector Support 481 Configuring BGP FlowSpec Route-reflector Support 481 Disabling BGP FlowSpec Validation 482 Verifying BGP FlowSpec Route-reflector Support 483 Configuration Examples for BGP FlowSpec Route-reflector Support 487 Example: BGP FlowSpec Route-reflector Support 487 Additional References for BGP FlowSpec Route-reflector Support 489 Feature Information for BGP FlowSpec Route-reflector Support 489 BGP Flow Specification Client 491C H A P T E R 2 5 Finding Feature Information 491 Prerequisites for BGP Flow Specification Client 491 Restrictions for BGP Flow Specification Client 492 Information About BGP Flow Specification Client 492 BGP Flow Specification Model 492 Sample Flow Specification Client Configuration 493 Matching Criteria and Actions 493 How to Configure BGP Flow Specification Client 494 Configuring a Device As a Flow Specification Client and Establishing a BGP Peer RelationshipWith Neighbor 494 Configuring a Flow Specification Policy On All Interfaces Of a Device 496 Verifying BGP Flow Specification Client 498 Configuration Examples for BGP Flow Specification Client 499 Example: Configuring a Device As a Flow Specification Client and Establishing a BGP Peer Relationship With Neighbor 499 Example: Configuring a Flow Specification Policy On All Interfaces Of a Device 500 Additional References for BGP Flow Specification Client 500 Feature Information for BGP Flow Specification Client 501 BGP NSF Awareness 503C H A P T E R 2 6 Finding Feature Information 503 Information About BGP NSF Awareness 503 Cisco NSF Routing and Forwarding Operation 503 Cisco Express Forwarding for NSF 504 BGP Graceful Restart for NSF 504 BGP NSF Awareness 505 How to Configure BGP NSF Awareness 505 Configuring BGP Nonstop Forwarding Awareness Using BGP Graceful Restart 505 Enabling BGP Global NSF Awareness Using BGP Graceful Restart 506 Configuring BGP NSF Awareness Timers 507 Verifying the Configuration of BGP Nonstop Forwarding Awareness 509 Configuration Examples for BGP NSF Awareness 511 Example: Enabling BGP Global NSF Awareness Using Graceful Restart 511 Additional References 511 Feature Information for BGP NSF Awareness 512 BGP Graceful Restart per Neighbor 513C H A P T E R 2 7 Finding Feature Information 513 Information About BGP Graceful Restart per Neighbor 513 BGP Graceful Restart per Neighbor 513 BGP Peer Session Templates 514 How to Configure BGP Graceful Restart per Neighbor 514 Enabling BGP Graceful Restart for an Individual BGP Neighbor 514 Enabling and Disabling BGP Graceful Restart Using BGP Peer Session Templates 517 Disabling BGP Graceful Restart for a BGP Peer Group 522 Configuration Examples for BGP Graceful Restart per Neighbor 524 Examples: Enabling and Disabling BGP Graceful Restart per Neighbor 524 Additional References 526 Feature Information for BGP Graceful Restart per Neighbor 527 BGP Support for BFD 529C H A P T E R 2 8 Finding Feature Information 529 Information About BGP Support for BFD 529 BFD for BGP 529 How to Decrease BGP Convergence Time Using BFD 530 Prerequisites 530 Restrictions 530 Decreasing BGP Convergence Time Using BFD 530 Configuring BFD Session Parameters on the Interface 530 Configuring BFD Support for BGP 531 Monitoring and Troubleshooting BFD 533 Additional References 533 Feature Information for BGP Support for BFD 534 IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family 537C H A P T E R 2 9 Finding Feature Information 537 Information About IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family 537 Nonstop Forwarding and Graceful Restart for MP-BGP IPv6 Address Family 537 How to Configure IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family 538 Configuring the IPv6 BGP Graceful Restart Capability 538 Configuration Examples for IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family 539 Example: Configuring the IPv6 BGP Graceful Restart Capability 539 Additional References 539 Feature Information for IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family 540 BGP Link Bandwidth 543C H A P T E R 3 0 Finding Feature Information 543 Prerequisites for BGP Link Bandwidth 543 Restrictions for BGP Link Bandwidth 544 Information About BGP Link Bandwidth 544 BGP Link Bandwidth Overview 544 Link Bandwidth Extended Community Attribute 544 Benefits of the BGP Link Bandwidth Feature 544 How to Configure BGP Link Bandwidth 545 Configuring BGP Link Bandwidth 545 Verifying BGP Link Bandwidth Configuration 546 Configuration Examples for BGP Link Bandwidth 547 BGP Link Bandwidth Configuration Example 547 Verifying BGP Link Bandwidth 549 Additional References 551 Feature Information for BGP Link Bandwidth 552 Border Gateway Protocol Link-State 553C H A P T E R 3 1 Finding Feature Information 553 Information About Border Gateway Protocol Link-State 553 Overview of Link-State Information in Border Gateway Protocol 553 Carrying Link-State Information in Border Gateway Protocol 554 TLV Format 555 Link-State NLRI 555 NLRI Types 555 Node Descriptors 556 Link Descriptors 556 Prefix Descriptors 556 BGP-LS Attribute 557 How to Configure OSPF With Border Gateway Protocol Link-State 557 Configuring Border Gateway Protocol Link-State With OSPF 557 How to Configure IS-IS With Border Gateway Protocol Link-State 558 Configuring IS-IS With Border Gateway Protocol Link-State 558 Configuring BGP 558 Example: Configuring ISIS With Border Gateway Protocol Link-State 559 Verifying Border Gateway Protocol Link-State Configurations 560 Border Gateway Protocol Link-State Debug Commands 563 Additional References for Border Gateway Protocol Link-State 563 Feature Information for Border Gateway Protocol Link-State 564 iBGP Multipath Load Sharing 565C H A P T E R 3 2 Finding Feature Information 565 iBGP Multipath Load Sharing Overview 565 Benefits of iBGP Multipath Load Sharing 567 Restrictions on iBGP Multipath Load Sharing 567 How to Configure iBGP Multipath Load Sharing 568 Configuring iBGP Multipath Load Sharing 568 Verifying iBGP Multipath Load Sharing 568 Monitoring and Maintaining iBGP Multipath Load Sharing 570 Configuration Examples 571 Example: iBGP Multipath Load Sharing in a Non-MPLS Topology 571 Example: iBGP Multipath Load Sharing in an MPLS VPN Topology 571 Additional References 572 Feature Information for iBGP Multipath Load Sharing 573 BGP Multipath Load Sharing for Both eBGP and iBGP in an MPLS-VPN 575C H A P T E R 3 3 Finding Feature Information 575 Prerequisites for BGP Multipath Load Sharing for Both eBGP and iBGP in an MPLS-VPN 576 Restrictions for BGP Multipath Load Sharing for Both eBGP and iBGP in an MPLS-VPN 576 Information About BGP Multipath Load Sharing for Both eBGP and iBGP in an MPLS-VPN 576 Multipath Load Sharing Between eBGP and iBGP 576 eBGP and iBGP Multipath Load Sharing in a BGP MPLS Network 577 eBGP and iBGP Multipath Load Sharing With Route Reflectors 578 Benefits of Multipath Load Sharing for Both eBGP and iBGP 578 HOw to COnfigure BGP Multipath Load Sharing for Both eBGP and iBGP in an MPLS-VPN 578 Configuring Multipath Load Sharing for Both eBGP and iBGP 578 Verifying Multipath Load Sharing for Both eBGP an iBGP 579 Configuration Examples for BGPMultipath Load Sharing for Both eBGP and iBGP in anMPLS-VPN 580 Example: Configuring eBGP and iBGP Multipath Load Sharing 580 Example: Verifying eBGP and iBGP Multipath Load Sharing 581 Where to Go Next 582 Additional References 582 Feature Information for BGP Multipath Load Sharing for Both eBGP and iBGP in an MPLS-VPN 583 Loadsharing IP Packets over More Than Six Parallel Paths 585C H A P T E R 3 4 Finding Feature Information 585 Overview of Loadsharing IP Packets over More Than Six Parallel Paths 585 Additional References 586 Feature Information for Loadsharing IP Packets over More Than Six Parallel Paths 587 BGP Policy Accounting 589C H A P T E R 3 5 Finding Feature Information 589 Prerequisites 589 Information About BGP Policy Accounting 590 BGP Policy Accounting Overview 590 Benefits of BGP Policy Accounting 591 How to Configure BGP Policy Accounting 591 Specifying the Match Criteria for BGP Policy Accounting 591 Classifying the IP Traffic and Enabling BGP Policy Accounting 592 Verifying BGP Policy Accounting 593 Monitoring and Maintaining BGP Policy Accounting 594 Configuration Examples for BGP Policy Accounting 594 Example: Specifying the Match Criteria for BGP Policy Accounting 594 Example: Classifying the IP Traffic and Enabling BGP Policy Accounting 595 Additional References 595 Feature Information for BGP Policy Accounting 596 BGP Policy Accounting Output Interface Accounting 599C H A P T E R 3 6 Finding Feature Information 599 Prerequisites for BGP PA Output Interface Accounting 599 Information About BGP PA Output Interface Accounting 600 BGP PA Output Interface Accounting 600 Benefits of BGP PA Output Interface Accounting 600 How to Configure BGP PA Output Interface Accounting 601 Specifying the Match Criteria for BGP PA 601 Classifying the IP Traffic and Enabling BGP PA 602 Verifying BGP Policy Accounting 604 Configuration Examples for BGP PA Output Interface Accounting 607 Specifying the Match Criteria for BGP Policy Accounting Example 607 Classifying the IP Traffic and Enabling BGP Policy Accounting Example 607 Additional References 608 Feature Information for BGP Policy Accounting Output Interface Accounting 609 Glossary 610 BGP Cost Community 611C H A P T E R 3 7 Finding Feature Information 611 Prerequisites for the BGP Cost Community Feature 611 Restrictions for the BGP Cost Community Feature 612 Information About the BGP Cost Community Feature 612 BGP Cost Community Overview 612 How the BGP Cost Community Influences the Best Path Selection Process 613 Cost Community Support for Aggregate Routes and Multipaths 613 Influencing Route Preference in a Multi-Exit IGP Network 614 BGP Cost Community Support for EIGRP MPLS VPN PE-CE with Backdoor Links 614 How to Configure the BGP Cost Community Feature 615 Configuring the BGP Cost Community 615 Verifying the Configuration of the BGP Cost Community 617 Troubleshooting Tips 617 Configuration Examples for the BGP Cost Community Feature 617 Example: BGP Cost Community Configuration 617 Example: BGP Cost Community Verification 618 Additional References 619 Feature Information for BGP Cost Community 620 BGP Support for IP Prefix Import from Global Table into a VRF Table 623C H A P T E R 3 8 Finding Feature Information 623 Prerequisites for BGP Support for IP Prefix Import from Global Table into a VRF Table 623 Restrictions for BGP Support for IP Prefix Import from Global Table into a VRF Table 624 Information About BGP Support for IP Prefix Import from Global Table into a VRF Table 624 Importing IPv4 Prefixes into a VRF 624 Black Hole Routing 624 Classifying Global Traffic 624 Unicast Reverse Path Forwarding 625 How to Import IP Prefixes from Global Table into a VRF Table 625 Defining IPv4 IP Prefixes to Import 625 Creating the VRF and the Import Route Map 626 Filtering on the Ingress Interface 628 Verifying Global IP Prefix Import 629 Configuration Examples for BGP Support for IP Prefix Import from Global Table into a VRF Table 631 Example: Importing IP Prefixes from Global Table into a VRF Table 631 Example: Verifying IP Prefix Import to a VRF Table 631 Additional References for Internal BGP Features 632 Feature Information for BGP Support for IP Prefix Import from Global Table into a VRF Table 633 BGP Support for IP Prefix Export from a VRF Table into the Global Table 635C H A P T E R 3 9 Finding Feature Information 635 Information About IP Prefix Export from a VRF Table into the Global Table 635 Benefits of IP Prefix Export from a VRF Table into the Global Table 635 How IP Prefix Export from a VRF Table into the Global Table Works 636 How to Export IP Prefixes from a VRF Table into the Global Table 637 Creating the VRF and the Export Route Map for an Address Family 637 Creating the VRF and the Export Route Map for a VRF (IPv4 only) 639 Displaying Information About IP Prefix Export from a VRF into the Global Table 642 Configuration Examples for IP Prefix Export from a VRF Table into the Global Table 643 Example: Exporting IP Prefixes from aVRFTable into the Global Table Using IPv6Address Family 643 Example: Exporting IP Prefixes from aVRFTable into the Global Table Using IPv4Address Family 643 Example: Exporting IP Prefixes from a VRF Table into the Global Table Using IP VRF (IPv4 Only) 643 Additional References 644 Feature Information for IP Prefix Export from a VRF Table into the Global Table 644 BGP per Neighbor SoO Configuration 647C H A P T E R 4 0 Finding Feature Information 647 Prerequisites for BGP per Neighbor SoO Configuration 647 Restrictions for BGP per Neighbor SoO Configuration 647 Information About Configuring BGP per Neighbor SoO 648 Site of Origin BGP Community Attribute 648 Route Distinguisher 648 BGP per Neighbor Site of Origin Configuration 648 Benefits of BGP per Neighbor Site of Origin 649 BGP Peer Policy Templates 649 How to Configure BGP per Neighbor SoO 650 Enabling Cisco Express Forwarding and Configuring VRF Instances 650 Configuring a per Neighbor SoO Value Using a BGP Peer Policy Template 652 Configuring a per Neighbor SoO Value Using a BGP neighbor Command 655 Configuring a per Neighbor SoO Value Using a BGP Peer Group 657 Configuration Examples for BGP per Neighbor SoO Configuration 659 Example: Configuring a per Neighbor SoO Value Using a BGP Peer Policy Template 659 Example: Configuring a per Neighbor SoO Value Using a BGP neighbor Command 660 Example: Configuring a per Neighbor SoO Value Using a BGP Peer Group 660 Where to Go Next 661 Additional References 661 Feature Information for BGP per Neighbor SoO Configuration 662 Per-VRF Assignment of BGP Router ID 663C H A P T E R 4 1 Finding Feature Information 663 Prerequisites for Per-VRF Assignment of BGP Router ID 663 Information About Per-VRF Assignment of BGP Router ID 664 BGP Router ID 664 Per-VRF Router ID Assignment 664 Route Distinguisher 664 How to Configure Per-VRF Assignment of BGP Router ID 664 Configuring VRF Instances 664 Associating VRF Instances with Interfaces 666 Manually Configuring a BGP Router ID per VRF 668 Automatically Assigning a BGP Router ID per VRF 673 Configuration Examples for Per-VRF Assignment of BGP Router ID 680 Manually Configuring a BGP Router ID per VRF Examples 680 Automatically Assigning a BGP Router ID per VRF Examples 682 Globally Automatically Assigned Router ID Using Loopback Interface IP Addresses Example 682 Globally Automatically Assigned Router ID with No Default Router ID Example 684 Per-VRF Automatically Assigned Router ID Example 684 Additional References 686 Feature Information for Per-VRF Assignment of BGP Router ID 687 BGP Next Hop Unchanged 689C H A P T E R 4 2 Finding Feature Information 689 Information About Next Hop Unchanged 689 BGP Next Hop Unchanged 689 How to Configure BGP Next Hop Unchanged 690 Configuring the BGP Next Hop Unchanged for an eBGP Peer 690 Configuring BGP Next Hop Unchanged using Route-Maps 692 Configuration Example for BGP Next Hop Unchanged 693 Example: BGP Next Hop Unchanged for an eBGP Peer 693 Additional References 693 Feature Information for BGP Next Hop Unchanged 694 BGP Support for the L2VPN Address Family 695C H A P T E R 4 3 Finding Feature Information 695 Prerequisites for BGP Support for the L2VPN Address Family 695 Restrictions for BGP Support for the L2VPN Address Family 696 Information About BGP Support for the L2VPN Address Family 696 L2VPN Address Family 696 VPLS ID 697 How to Configure BGP Support for the L2VPN Address Family 697 Configuring VPLS Autodiscovery Using BGP and the L2VPN Address Family 697 What to Do Next 703 Configuration Examples for BGP Support for the L2VPN Address Family 703 Example: Configuring VPLS Autodiscovery Using BGP and the L2VPN Address Family 703 Where to Go Next 706 Additional References 706 Feature Information for BGP Support for the L2VPN Address Family 707 BGP Event-Based VPN Import 709C H A P T E R 4 4 Finding Feature Information 709 Prerequisites for BGP Event-Based VPN Import 709 Information About BGP Event-Based VPN Import 710 BGP Event-Based VPN Import 710 Import Path Selection Policy 710 Import Path Limit 710 How to Configure BGP Event-Based VPN Import 711 Configuring a Multiprotocol VRF 711 Configuring Event-Based VPN Import Processing for BGP Paths 713 Monitoring and Troubleshooting BGP Event-Based VPN Import Processing 715 Configuration Examples for BGP Event-Based VPN Import 717 Example: Configuring Event-Based VPN Import Processing for BGP Paths 717 Additional References 717 Feature Information for BGP Event-Based VPN Import 718 BGP Best External 721C H A P T E R 4 5 Finding Feature Information 721 Prerequisites for BGP Best External 721 Restrictions for BGP Best External 722 Information About BGP Best External 722 BGP Best External Overview 722 What the Best External Route Means 723 How the BGP Best External Feature Works 723 Configuration Modes for Enabling BGP Best External 724 BGP Best External Path on RR for Intercluster 724 CLI Differences for Best External Path on an RR for Intercluster 725 Rules Used to Calculate the BGP Best External Path for Intercluster RRs 725 How to Configure BGP Best External 726 Configuring the BGP Best External Feature 726 Verifying the BGP Best External Feature 728 Configuring Best External Path on an RR for an Intercluster 731 Configuration Examples for BGP Best External 734 Example: Configuring the BGP Best External Feature 734 Example: Configuring a Best External Path on an RR for an Intercluster 735 Additional References 735 Feature Information for BGP Best External 736 BGP PIC Edge for IP and MPLS-VPN 739C H A P T E R 4 6 Finding Feature Information 739 Prerequisites for BGP PIC 739 Restrictions for BGP PIC 740 About BGP PIC 740 Benefits 740 BGP Convergence 741 Improve Convergence 741 BGP Fast Reroute 742 Detect a Failure 743 How BGP PIC Can Achieve Subsecond Convergence 743 How BGP PIC Improves Upon the Functionality of MPLS VPN BGP Local Convergence 744 Enable BGP PIC 744 BGP PIC Scenario 744 IP PE-CE Link and Node Protection on the CE Side (Dual PEs) 744 IP PE-CE Link and Node Protection on the CE Side (Dual CEs and Dual PE Primary and Backup Nodes) 745 IP MPLS PE-CE Link Protection for the Primary or Backup Alternate Path 746 IP MPLS PE-CE Node Protection for Primary or Backup Alternate Path 747 Cisco Express Forwarding Recursion 748 How to Configure BGP PIC 749 Configuring BGP PIC 749 Disabling BGP PIC Core 751 Configuration Examples for BGP PIC 752 Example: Configuring BGP PIC 752 Example: Displaying Backup Alternate Paths for BGP PIC 753 Example: Disabling BGP PIC Core 755 Additional References 755 Feature Information for BGP PIC 757 Detecting and Mitigating a BGP Slow Peer 759C H A P T E R 4 7 Finding Feature Information 759 Information About Detecting and Mitigating a BGP Slow Peer 760 BGP Slow Peer Problem 760 BGP Slow Peer Feature 760 BGP Slow Peer Detection 761 Timestamp on an Update Message 761 Benefit of BGP Slow Peer Detection 761 Benefits of Configuring a Dynamic or Static BGP Slow Peer 761 Static Slow Peer 761 Dynamic Slow Peer 762 How to Detect and Mitigate a BGP Slow Peer 762 Detecting a Slow Peer 762 Detecting Dynamic Slow Peers at the Address-Family Level 762 Detecting Dynamic Slow Peers at the Neighbor Level 764 Detecting Dynamic Slow Peers Using a Peer Policy Template 765 Marking a Peer as a Static Slow Peer 766 Marking a Peer as a Static Slow Peer at the Neighbor Level 766 Marking a Peer as a Static Slow Peer Using a Peer Policy Template 767 Configuring Dynamic Slow Peer Protection 768 Configuring Dynamic Slow Peers at the Address-Family Level 769 Configuring Dynamic Slow Peers at the Neighbor Level 770 Configuring Dynamic Slow Peers Using a Peer Policy Template 772 Displaying Output About Dynamic Slow Peers 774 Restoring Dynamic Slow Peers as Normal Peers 774 Configuration Examples for Detecting and Mitigating a BGP Slow Peer 776 Example: Static Slow Peer 776 Example: Static Slow Peer Using Peer Policy Template 776 Example: Dynamic Slow Peer at the Neighbor Level 776 Example: Dynamic Slow Peers Using Peer Policy Template 777 Example: Dynamic Slow Peers Using Peer Group 777 Additional References 778 Feature Information for BGP—Support for iBGP Local-AS 779 Configuring BGP: RT Constrained Route Distribution 781C H A P T E R 4 8 Finding Feature Information 781 Prerequisites for BGP: RT Constrained Route Distribution 781 Restrictions for BGP: RT Constrained Route Distribution 782 Information About BGP: RT Constrained Route Distribution 782 Problem That BGP: RT Constrained Route Distribution Solves 782 Benefits of BGP: RT Constrained Route Distribution 783 BGP RT-Constrain SAFI 783 BGP: RT Constrained Route Distribution Operation 784 RT Constraint NLRI Prefix 784 RT Constrained Route Distribution Process 785 Default RT Filter 785 How to Configure RT Constrained Route Distribution 786 Configuring Multiprotocol BGP on Provider Edge (PE) Routers and Route Reflectors 786 Troubleshooting Tips 788 Connecting the MPLS VPN Customers 788 Defining VRFs on PE Routers to Enable Customer Connectivity 788 Configuring VRF Interfaces on PE Routers for Each VPN Customer 789 Configuring BGP as the Routing Protocol Between the PE and CE Routers 790 Configuring RT Constraint on the PE 792 Configuring RT Constraint on the RR 793 Configuration Examples for BGP: RT Constrained Route Distribution 795 Example: BGP RT Constrained Route Distribution Between a PE and RR 795 Additional References 797 Feature Information for BGP RT Constrained Route Distribution 799 Configuring a BGP Route Server 801C H A P T E R 4 9 Finding Feature Information 801 Information About BGP Route Server 801 The Problem That a BGP Route Server Solves 801 BGP Route Server Simplifies SP Interconnections 803 Benefits of a BGP Route Server 805 Route Server Context Provides Flexible Routing Policy 806 Three Stages of Filtering on a Route Server Client 806 How to Configure a BGP Route Server 807 Configure a Route Server with Basic Functionality 807 Configure a Route Server Client To Receive Updates 808 Configure a Route Server with Flexible Policy Handling 810 Displaying BGP Route Server Information and Troubleshooting Route Server 813 Configuration Examples for BGP Route Server 814 Example BGP Route Server with Basic Functionality 814 Example BGP Route Server Context for Flexible Policy (IPv4 Addressing) 814 Example Using Show Commands to See That Route Server Context Routes Overwrite Normal Bestpath 815 Example BGP Route Server Context with No Routes Satisfying the Policy 816 Example BGP Route Server Context for Flexible Policy (IPv6 Addressing) 816 Additional References 817 Feature Information for BGP Route Server 818 BGP Diverse Path Using a Diverse-Path Route Reflector 821C H A P T E R 5 0 Finding Feature Information 821 Prerequisites for BGP Diverse Path Using a Diverse-Path Route Reflector 821 Restrictions for BGP Diverse Path Using a Diverse-Path Route Reflector 822 Information About BGP Diverse Path Using a Diverse-Path Reflector 822 Limitation that a BGP Diverse Path Overcomes 822 BGP Diverse Path Using a Diverse-Path Route Reflector 823 Triggers to Compute a BGP Diverse Path 824 IGP Metric Check 824 Route Reflector Determination 825 How to Configure a BGP Diverse-Path Route Reflector 825 Determining Whether You Need to Disable the IGP Metric Check 825 Configuring the Route Reflector for BGP Diverse Path 825 Configuration Examples for BGP Diverse Path Using a Diverse-Path Route Reflector 828 Example: Configuring BGP Diverse Path Where Additional Path Is the Backup Path 828 Example: Configuring BGP Diverse Path Where Additional Path Is the Multipath 829 Example: Configuring BGP Diverse Path Where Both Multipath and Backup Path Calculations Are Triggered 829 Example: Configuring Triggering Computation and Installation of a Backup Path 830 Additional References 830 Feature Information for BGP Diverse Path Using a Diverse-Path Route Reflector 831 BGP Enhanced Route Refresh 833C H A P T E R 5 1 Finding Feature Information 833 Information About BGP Enhanced Route Refresh 833 BGP Enhanced Route Refresh Functionality 833 BGP Enhanced Route Refresh Timers 834 Syslog Messages Generated by the BGP Enhanced Route Refresh 834 How to Set Timers for BGP Enhanced Route Refresh 834 Set Timers for BGP Enhanced Route Refresh 834 Configuration Examples for BGP Enhanced Route Refresh 836 Example: Setting Timers for BGP Enhanced Route Refresh 836 Additional References 836 Feature Information for BGP Enhanced Route Refresh 836 Configuring BGP Consistency Checker 839C H A P T E R 5 2 Finding Feature Information 839 Information About BGP Consistency Checker 839 BGP Consistency Checker 839 How to Configure BGP Consistency Checker 840 Configure BGP Consistency Checker 840 Configuration Examples for BGP Consistency Checker 841 Example: Configuring BGP Consistency Checker 841 Additional References 841 Feature Information for BGP Consistency Checker 843 BGP—Origin AS Validation 845C H A P T E R 5 3 Finding Feature Information 845 Information About BGP Origin AS Validation 845 Benefit of BGP—Origin AS Validation 845 How BGP—Origin AS Validation Works 846 Option to Announce RPKI Validation State to Neighbors 847 Use of the Validation State in BGP Best Path Determination 848 Use of a Route Map to Customize Treatment of Valid and Invalid Prefixes 849 How to Configure BGP Origin AS Validation 849 Enabling BGP—Origin AS Validation 849 Announcing the RPKI State to iBGP Neighbors 850 Disabling the Validation of BGP Prefixes, But Still Downloading RPKI Information 851 Allowing Invalid Prefixes as the Best Path 852 Configuring a Route Map Based on RPKI States 853 Configuration Examples for BGP Origin AS Validation 856 Example: Configuring BGP to Validate Prefixes Based on Origin AS 856 Example: Announcing RPKI State to Neighbors 856 Example: Disabling the Checking of Prefixes 856 Example: Allowing Invalid Prefixes as Best Path 856 Example: Using a Route Map Based on RPKI State 857 Additional References 857 Feature Information for eiBGP Multipath for Non-VRF Interfaces (IPv4/IPv6) 858 BGP MIB Support 859C H A P T E R 5 4 Finding Feature Information 859 Information About BGP MIB Support 859 BGP MIB Support 859 How to Enable BGP MIB Support 861 Enabling BGP MIB Support 861 Configuration Examples for BGP MIB Support 863 Example: Enabling BGP MIB Support 863 Additional References 863 Feature Information for BGP MIB Support 864 BGP 4 MIB Support for Per-Peer Received Routes 865C H A P T E R 5 5 Finding Feature Information 865 Restrictions on BGP 4 MIB Support for Per-Peer Received Routes 865 Information About BGP 4 MIB Support for Per-Peer Received Routes 866 Overview of BGP 4 MIB Support for Per-Peer Received Routes 866 BGP 4 Per-Peer Received Routes Table Elements and Objects 867 MIB Tables and Objects 867 AFIs and SAFIs 867 Network Address Prefix Descriptions for the NLRI Field 868 Benefits of BGP 4 MIB Support for Per-Peer Received Routes 869 Additional References for BGP Restart Neighbor Session After Max-Prefix Limit Reached 869 Feature Information for BGP 4 MIB Support for Per-Peer Received Routes 870 Glossary 870 BGP Support for Nonstop Routing (NSR) with Stateful Switchover (SSO) Using L2VPN VPLS 873C H A P T E R 5 6 Finding Feature Information 873 Prerequisites for BGP Support for NSR with SSO 873 Information About BGP Support for Nonstop Routing (NSR) with Stateful Switchover (SSO) 874 Overview of BGP NSR with SSO 874 Benefits of BGP NSR with SSO 875 How to Configure BGP Support for Nonstop Routing (NSR) with Stateful Switchover (SSO) 875 Configuring a PE Device to Support BGP NSR with SSO 875 Prerequisites 875 Configuring a Peer to Support BGP NSR with SSO 876 Configuring a Peer Group to Support BGP NSR with SSO 877 Configuring Support for BGP NSR with SSO in a Peer Session Template 879 What to Do Next 881 Verifying BGP Support for NSR with SSO 881 Troubleshooting Tips 883 Configuration Examples for BGP Support for Nonstop Routing (NSR)with Stateful Switchover (SSO) 883 Configuring BGP NSR with SSO Example Using L2VPN VPLS 883 Additional References 885 Feature Information for BGP Support for NSR with SSO 886 BGP NSR Auto Sense 889C H A P T E R 5 7 Finding Feature Information 889 Information About BGP NSR Auto Sense 889 Benefits of BGP NSR Auto Sense 889 Consequence of Reverting to NSR Without Auto Sense 890 How to Disable the BGP NSR Auto Sense Feature 890 Disabling the BGP NSR Auto Sense Feature 890 Configuration Example for BGP NSR Auto Sense 891 Example: Disabling the BGP NSR Auto Sense Feature 891 Additional References 892 Feature Information for BGP NSR Auto Sense 892 BGP NSR Support for iBGP Peers 895C H A P T E R 5 8 Finding Feature Information 895 Restrictions on BGP NSR Support for iBGP Peers 895 Information About BGP NSR Support for iBGP Peers 896 Benefit of BGP NSR Support for iBGP Peers 896 How to Configure BGP NSR Support for iBGP Peers 896 Making an iBGP Peer NSR-Capable for the IPv4 Address Family 896 Making an iBGP Peer NSR-Capable for the VPNv4 Address Family 897 Making an iBGP Peer NSR Capable at the Router Level 899 Configuration Examples for BGP NSR Support for an iBGP Peer 900 Example: Configuring an iBGP Peer To Be NSR Capable 900 Additional References 900 Feature Information for BGP NSR Support for iBGP Peers 901 BGP Graceful Shutdown 903C H A P T E R 5 9 Finding Feature Information 903 Information About BGP Graceful Shutdown 903 Purpose and Benefits of BGP Graceful Shutdown 903 GSHUT Community 904 BGP GSHUT Enhancement 904 How to Configure BGP Graceful Shutdown 904 Shutting Down a BGP Link Gracefully 904 Filtering BGP Routes Based on the GSHUT Community 906 Configuring BGP GSHUT Enhancement 908 Configuration Examples for BGP Graceful Shutdown 910 Example: Shutting Down a BGP Link Gracefully 910 Example: Filtering BGP Routes Based on the GSHUT Community 910 Example: BGP GSHUT Enhancement 911 Additional References 912 Feature Information for BGP Graceful Shutdown 913 BGP— mVPN BGP sAFI 129 - IPv4 915C H A P T E R 6 0 Finding Feature Information 915 Information About BGP--mVPN BGP sAFI 129 - IPv4 915 BGP — mVPN BGP sAFI 129 - IPv4 Overview 915 How to Configure BGP -- mVPN BGP sAFI 129 - IPv4 916 Configure BGP — mVPN BGP sAFI 129 - IPv4 916 Configuration Examples for BGP--mVPN BGPsAFI 129 - IPv4 919 Example: Configuring BGP - mVPN BGP sAFI 129 - IPv4 919 Additional References 922 Feature Information for BGP - mVPN BGP sAFI 129 - IPv4 923 BGP-MVPN SAFI 129 IPv6 925C H A P T E R 6 1 Finding Feature Information 925 Prerequisites for BGP-MVPN SAFI 129 IPv6 925 Information About BGP-MVPN SAFI 129 IPv6 926 Overview of BGP-MVPN SAFI 129 IPv6 926 How to Configure BGP-MVPN SAFI 129 IPv6 926 Configuring BGP-MVPN SAFI 129 IPv6 926 Configuration Examples for BGP-MVPN SAFI 129 IPv6 929 Example: Configuring BGP-MVPN SAFI 129 IPv6 929 Additional References 932 Feature Information for BGP-MVPN SAFI 129 IPv6 932 BFD—BGP Multihop Client Support, cBit (IPv4 and IPv6), and Strict Mode 935C H A P T E R 6 2 Finding Feature Information 935 Restrictions for BFD—BGP Multihop Client Support, cBit (IPv4 and IPv6), and Strict Mode 936 Information About BFD - BGP Multihop Client Support, cBit (IPv4 and IPv6), and Strict Mode 936 BFD—BGP Multihop Client Support, cBit (IPv4 and IPv6), and Strict Mode 936 How to Configure BFD - BGP Multihop Client Support, cBit (IPv4 and IPv6), and Strict Mode 937 Configuring BFD—BGP Multihop Client Support, cBit (IPv4 and IPv6), and Strict Mode 937 Configuration Examples for BFD - BGP Multihop Client Support, cBit (IPv4 and IPv6), and Strict Mode 939 Example: Configuring BFD—BGP Multihop Client Support, cBit (IPv4/IPv6), and Strict Mode 939 Verifying BFD—BGP Multihop Client Support, cBit (IPv4 and IPv6), and Strict Mode 940 Additional References 941 Feature Information for BFD—BGP Multihop Client Support, cBit (IPv4/IPv6), and Strict Mode 941 BGP Attribute Filter and Enhanced Attribute Error Handling 943C H A P T E R 6 3 Finding Feature Information 943 Information About BGP Attribute Filtering 943 BGP Attribute Filter and Enhanced Attribute Error Handling 943 How to Filter BGP Path Attributes 945 Treat-as-Withdraw BGP Updates Containing a Specified Path Attribute 945 Discarding Specific Path Attributes from an Update Message 946 Displaying Withdrawn or Discarded Path Attributes 947 Configuration Examples for BGP Attribute Filter 948 Examples: Withdraw Updates Based on Path Attribute 948 Examples: Discard Path Attributes from Updates 948 Additional References 949 Feature Information for BGP Attribute Filter and Enhanced Attribute Error Handling 949 BGP Additional Paths 951C H A P T E R 6 4 Finding Feature Information 951 Information About BGP Additional Paths 951 Problem That Additional Paths Can Solve 951 Benefits of BGP Additional Paths 954 BGP Additional Paths Functionality 954 How to Configure BGP Additional Paths 955 Configuring Additional Paths per Address Family 955 Configuring Additional Paths per Neighbor 957 Configuring Additional Paths Using a Peer Policy Template 959 Filtering and Setting Actions for Additional Paths 961 Displaying Additional Path Information 963 Disabling Additional Paths per Neighbor 963 Configuration Examples for BGP Additional Paths 965 Example: BGP Additional Path Send and Receive Capabilities 965 Example: BGP Additional Paths 965 Example: Neighbor Capabilities Override Address Family Capabilities 967 Example: BGP Additional Paths Using a Peer Policy Template 967 Additional References 967 Feature Information for BGP Additional Paths 968 BGP-Multiple Cluster IDs 971C H A P T E R 6 5 Finding Feature Information 971 Information About BGP-Multiple Cluster IDs 971 Benefit of Multiple Cluster IDs Per Route Reflector 971 How a CLUSTER_LIST Attribute is Used 972 Behaviors When Disabling Client-to-Client Route Reflection 972 How to Use BGP-Multiple Cluster IDs 974 Configuring a Cluster ID per Neighbor 974 Disabling Intracluster and Intercluster Client-to-Client Reflection 976 Disabling Intracluster Client-to-Client Reflection for Any Cluster ID 977 Disabling Intracluster Client-to-Client Reflection for Specified Cluster IDs 978 Configuration Examples for BGP-Multiple Cluster IDs 979 Example: Per-Neighbor Cluster ID 979 Example: Disabling Client-to-Client Reflection 980 Additional References 980 Feature Information for BGP-Multiple Cluster IDs 981 BGP-VPN Distinguisher Attribute 983C H A P T E R 6 6 Finding Feature Information 983 Information About BGP-VPN Distinguisher Attribute 983 Role and Benefit of the VPN Distinguisher Attribute 983 How the VPN Distinguisher Attribute Works 984 How to Configure BGP-VPN Distinguisher Attribute 985 Replacing an RT with a VPN Distinguisher Attribute 985 Replacing a VPN Distingusher Attribute with an RT 988 Configuration Examples for BGP-VPN Distinguisher Attribute 991 Example: Translating RT to VPN Distinguisher to RT 991 Additional References 992 Feature Information for BGP-VPN Distinguisher Attribute 993 BGP-RT and VPN Distinguisher Attribute Rewrite Wildcard 995C H A P T E R 6 7 Finding Feature Information 995 Restrictions for BGP-RT and VPN Distinguisher Attribute Rewrite Wildcard 996 Information About BGP—RT and VPN Distinguisher Attribute Rewrite Wildcard 996 Benefits of RT and VPN Distinguisher Attribute Mapping Range 996 How to Map RTs to RTs Using a Range 996 Replacing an RT with a Range of RTs 996 Replacing a Range of RTs with an RT 999 Configuration Examples for BGP—RT and VPN Distinguisher Attribute Rewrite Wildcard 1002 Example: Replacing an RT with a Range of RTs 1002 Example: Replacing an RT with a Range of VPN Distinguishers 1003 Additional References for BGP-RT and VPN Distinguisher Attribute Rewrite Wildcard 1004 Feature Information for BGP—RT and VPN Distinguisher Attribute Rewrite Wildcard 1005 VPLS BGP Signaling 1007C H A P T E R 6 8 Finding Feature Information 1007 Prerequisites for VPLS BGP Signaling 1007 Information About VPLS BGP Signaling 1008 Overview of VPLS BGP Signaling 1008 How to Configure VPLS BGP Signaling 1009 Configuring VPLS BGP Signaling 1009 Configuration Examples for VPLS BGP Signaling 1011 Example: Configuring and Verifying VPLS BGP Signaling 1011 Additional References for VPLS BGP Signaling 1012 Feature Information for VPLS BGP Signaling 1013 Multicast VPN BGP Dampening 1015C H A P T E R 6 9 Finding Feature Information 1015 Prerequisites for Multicast VPN BGP Dampening 1015 Information About Multicast VPN BGP Dampening 1016 Overview of Multicast VPN BGP Dampening 1016 How to Configure Multicast VPN BGP Dampening 1017 Configuring Multicast VPN BGP Dampening 1017 Monitoring and Maintaining Multicast VPN BGP Dampening 1018 Configuration Examples for Multicast VPN BGP Dampening 1019 Example: Configuring Multicast VPN BGP Dampening 1019 Additional References for Multicast VPN BGP Dampening 1020 Feature Information for Multicast VPN BGP Dampening 1020 BGP—IPv6 NSR 1023C H A P T E R 7 0 Finding Feature Information 1023 Prerequisites for BGP—IPv6 NSR 1023 Information About BGP—IPv6 NSR 1024 Overview of BGP—IPv6 NSR 1024 How to Configure BGP—IPv6 NSR 1024 Configuring BGP—IPv6 NSR 1024 Configuration Examples for BGP—IPv6 NSR 1026 Example: Configuring BGP—IPv6 NSR 1026 Additional References for BGP—IPv6 NSR 1026 Feature Information for BGP—IPv6 NSR 1027 BGP-VRF-Aware Conditional Advertisement 1029C H A P T E R 7 1 Finding Feature Information 1029 Information About BGP VRF-Aware Conditional Advertisement 1029 VRF-Aware Conditional Advertisement 1029 How to Configure BGP VRF-Aware Conditional Advertisement 1031 Configuring BGP VRF-Aware Conditional Advertisement 1031 Configuration Examples for BGP VRF-Aware Conditional Advertisement 1033 Example: Configuring BGP VRF-Aware Conditional Advertisement 1033 Example: Verifying BGP VRF-Aware Conditional Advertisement 1035 Additional References for BGP VRF-Aware Conditional Advertisement 1037 Feature Information for BGP VRF-Aware Conditional Advertisement 1038 BGP—Selective Route Download 1039C H A P T E R 7 2 Finding Feature Information 1039 Information About BGP—Selective Route Download 1039 Dedicated Route Reflector Does Not Need All Routes 1039 Benefits of Selective Route Download 1040 How to Selectively Download BGP Routes 1040 Suppressing the Downloading of All BGP Routes on a Dedicated RR 1040 Selectively Downloading BGP Routes on a Dedicated RR 1042 Configuration Examples for BGP—Selective Route Download 1044 Examples: Selective Route Download 1044 Additional References for Selective Route Download 1045 Feature Information for Selective Route Download 1046 BGP—Support for iBGP Local-AS 1047C H A P T E R 7 3 Finding Feature Information 1047 Restrictions for Support for iBGP Local-AS 1047 Information About Support for iBGP Local-AS 1048 Support for iBGP Local-AS 1048 Benefits of iBGP Local-AS 1049 How to Configure iBGP Local-AS 1049 Configuring iBGP Local-AS 1049 Configuration Examples for iBGP Local-AS 1052 Example: Configuring iBGP Local-AS 1052 Additional References for Support for iBGP Local-AS 1052 Feature Information for BGP—Support for iBGP Local-AS 1053 eiBGP Multipath for Non-VRF Interfaces (IPv4/IPv6) 1055C H A P T E R 7 4 Finding Feature Information 1055 Information About eiBGP Multipath for Non-VRF Interfaces (IPv4/IPv6) 1055 eiBGP Multipath for Non-VRF Interfaces Overview 1055 How to Configure eiBGP Multipath for Non-VRF Interfaces (IPv4/IPv6) 1056 Enabling IPv4/IPv6 Multipaths for Non-VRF Interfaces 1056 Configuration Examples for eiBGP Multipath for Non-VRF Interfaces (IPv4/IPv6) 1057 Example: Enabling IPv4/IPv6 Multipaths in Non-VRF Interfaces 1057 Feature Information for eiBGP Multipath for Non-VRF Interfaces (IPv4/IPv6) 1057 L3VPN iBGP PE-CE 1059C H A P T E R 7 5 Finding Feature Information 1059 Restrictions for L3VPN iBGP PE-CE 1059 Information About L3VPN iBGP PE-CE 1060 L3VPN iBGP PE-CE 1060 How to Configure L3VPN iBGP PE-CE 1060 Configuring L3VPN iBGP PE-CE 1060 Configuration Examples for L3VPN iBGP PE-CE 1061 Example: Configuring L3VPN iBGP PE-CE 1061 Additional References for L3VPN iBGP PE-CE 1061 Feature Information for L3VPN iBGP PE-CE 1062 BGP NSR Support for MPLS VPNv4 and VPNv6 Inter-AS Option B 1063C H A P T E R 7 6 Restrictions for BGP NSR Support for MPLS VPNv4 and VPNv6 Inter-AS Option B 1063 Information About BGP NSR Support for MPLS VPNv4 and VPNv6 Inter-AS Option B 1064 Overview of BGP NSR 1064 Inter-Autonomous Systems 1064 Overview of MPLS VPNv4 and VPNv6 Inter-AS Option B 1065 How to Configure BGP NSR Support for MPLS VPNv4 and VPNv6 Inter-AS Option B 1066 Configuring an ASBR to Enable BGP NSR Support in Inter-AS Option B 1066 Configuration Examples for BGP NSR Support for MPLS VPNv4 and VPNv6 Inter-AS Option B 1067 Example: Configuring an ASBR to Enable BGP NSR Support in Inter-AS Option B 1067 Additional References for BGP NSR Support for MPLS VPNv4 and VPNv6 Inter-AS Option B 1068 Feature Information for BGP NSR Support for MPLS VPNv4 and VPNv6 Inter-AS Option B 1069 BGP-RTC for Legacy PE 1071C H A P T E R 7 7 Finding Feature Information 1071 Prerequisites for BGP-RTC for Legacy PE 1071 Information About BGP-RTC for Legacy PE 1072 Overview of BGP-RTC for Legacy PE 1072 Legacy PE Support-PE Behavior 1072 Legacy PE Support-RR Behavior 1072 How to Configure BGP-RTC for Legacy PE 1072 Configuring BGP-RTC for Legacy PE 1072 Configuration Examples for BGP-RTC for Legacy PE 1074 Example: BGP-RTC for Legacy PE 1074 Additional References for BGP-RTC for Legacy PE 1075 Feature Information for BGP-RTC for Legacy PE 1076 BGP PBB EVPN Route Reflector Support 1077C H A P T E R 7 8 Finding Feature Information 1077 Prerequisites for BGP PBB EVPN Route Reflector Support 1077 Information About BGP PBB EVPN Route Reflector Support 1078 EVPN Overview 1078 BGP EVPN Autodiscovery Support on Route Reflector 1078 EVPN Address Family 1078 How to Configure BGP PBB EVPN Route Reflector Support 1079 Configuring BGP PBB EVPN Route Reflector 1079 Configuration Examples for BGP PBB EVPN Route Reflector Support 1080 Example: Configuring BGP PBB EVPN Route Reflector 1080 Additional References for BGP PBB EVPN Route Reflector Support 1081 Feature Information for BGP PBB EVPN Route Reflector Support 1081 BGP Monitoring Protocol 1083C H A P T E R 7 9 Finding Feature Information 1083 Prerequisites for BGP Monitoring Protocol 1084 Information About BGP Monitoring Protocol 1084 BGP Monitoring Protocol Overview 1084 How to Configure BGP Monitoring Protocol 1085 Configuring a BGP Monitoring Protocol Session 1085 Configuring BGP Monitoring Protocol on BGP Neighbors 1086 Configuring BGP Monitoring Protocol Servers 1087 Verifying BGP Monitoring Protocol 1089 Monitoring BGP Monitoring Protocol 1090 Configuration Examples for BGP Monitoring Protocol 1091 Examples for Configuring, Verifying, and Monitoring BGP Monitoring Protocol 1091 Additional References for BGP Monitoring Protocol 1095 Feature Information for BGP Monitoring Protocol 1096 VRF Aware BGP Translate-Update 1101C H A P T E R 8 0 Finding Feature Information 1101 Prerequisites for VRF Aware BGP Translate-Update 1101 Restrictions for VRF Aware BGP Translate-Update 1102 Information About VRF Aware BGP Translate-Update 1102 VRF Aware BGP Translate-Update Overview 1102 How To Configure VRF Aware BGP Translate-Update 1103 Configuring VRF Aware BGP Translate-Update 1103 Removing the VRF Aware BGP Translate-Update Configuration 1105 Configuration Examples for VRF Aware BGP Translate-Update 1106 Example: Configuring VRF aware BGP Translate-Update 1106 Example: Removing VRF aware BGP Translate-Update Configuration 1109 Additional References for VRF Aware BGP Translate-Update 1110 Feature Information for VRF Aware BGP Translate-Update 1110 BGP Support for MTR 1113C H A P T E R 8 1 Finding Feature Information 1113 Prerequisites for BGP Support for MTR 1113 Restrictions for BGP Support for MTR 1114 Information About BGP Support for MTR 1114 Routing Protocol Support for MTR 1114 BGP Network Scope 1115 MTR CLI Hierarchy Under BGP 1115 BGP Sessions for Class-Specific Topologies 1116 Topology Translation Using BGP 1116 Topology Import Using BGP 1116 How to Configure BGP Support for MTR 1116 Activating an MTR Topology by Using BGP 1116 What to Do Next 1120 Importing Routes from an MTR Topology by Using BGP 1120 Configuration Examples for BGP Support for MTR 1122 Example: BGP Topology Translation Configuration 1122 Example: BGP Global Scope and VRF Configuration 1123 Examples: BGP Topology Verification 1123 Example: Importing Routes from an MTR Topology by Using BGP 1124 Additional References 1125 Feature Information for BGP Support for MTR 1125 BGP Accumulated IGP 1127C H A P T E R 8 2 Finding Feature Information 1127 Information About BGP Accumulated IGP 1127 Overview of BGP Accumulated IGP 1127 Sending and Receiving BGP Accumulated IGP 1128 Originating Prefixes with Accumulated IGP 1128 How to Configure BGP Accumulated IGP 1129 Configuring AIGP Metric Value 1129 Enabling Send and Receive for an AIGP Attribute 1130 Configuring BGP Accumulated IGP 1131 Configuration Examples for BGP Accumulated IGP 1132 Example: Configuring AIGP Metric Value 1132 Example: Enabling Send and Receive for an AIGP Attribute 1133 Example: Configuring BGP Accumulated IGP 1133 Additional References for BGP Accumulated IGP 1133 Feature Information for BGP Accumulated IGP 1134 BGP MVPN Source-AS Extended Community Filtering 1135C H A P T E R 8 3 Finding Feature Information 1135 Information About BGP MVPN Source-AS Extended Community Filtering 1135 Overview of BGP MVPN Source-AS Extended Community Filtering 1135 How to Configure BGP MVPN Source-AS Extended Community Filtering 1136 Configuring BGP MVPN Source-AS Extended Community Filtering 1136 Configuration Examples for BGP MVPN Source-AS Extended Community Filtering 1137 Example: Configuring BGP MVPN Source-AS Extended Community Filtering 1137 Additional References for BGP MVPN Source-AS Extended Community Filtering 1138 Feature Information for BGP MVPN Source-AS Extended Community Filtering 1138 BGP AS-Override Split-Horizon 1141C H A P T E R 8 4 Finding Feature Information 1141 Information About BGP AS-Override Split-Horizon 1141 BGP AS-Override Split-Horizon Overview 1141 How to Configure BGP AS-Override Split-Horizon 1142 Configuring BGP AS-Override Split-Horizon 1142 Verifying BGP AS-Override Split-Horizon 1143 Configuration Examples for BGP AS-Override Split-Horizon 1144 Example: BGP AS-Override Split-Horizon Configuration 1144 Example: Verifying BGP AS-Override Split-Horizon 1144 Additional References for BGP AS-Override Split-Horizon 1146 Feature Information for BGP AS-Override Split-Horizon 1147 BGP Support for Multiple Sourced Paths Per Redistributed Route 1149C H A P T E R 8 5 Finding Feature Information 1149 Restrictions for BGP Support for Multiple Sourced Paths Per Redistributed Route 1149 Information About BGP Support for Multiple Sourced Paths Per Redistributed Route 1150 BGP Support for Multiple Sourced Paths Per Redistributed Route Overview 1150 How to Configure BGP Support for Multiple Sourced Paths Per Redistributed Routes 1150 Configuring Multiple Sourced Paths 1150 Configuration Examples for BGP Multiple Sourced Paths Per Redistributed Route 1152 Example: Configuring Multiple Sourced Paths 1152 Additional References for BGP Support for Multiple Sourced Paths Per Redistributed Route 1154 Feature Information for BGP Support for Multiple Sourced Paths Per Redistributed Route 1154 Maintenance Function: BGP Routing Protocol 1157C H A P T E R 8 6 Finding Feature Information 1157 Information About Maintenance Function: BGP Routing Protocol 1157 Configuring BGP Event Trace in Global Configuration Mode 1158 Configuring BGP Event Trace in EXEC Mode 1159 Verifying the BGP Event Traces 1160 Feature Information for Maintenance Function: BGP Routing Protocol 1160 C H A P T E R 1 Read Me First Important Information about Cisco IOS XE 16 Effective Cisco IOS XE Release 3.7.0E for Catalyst Switching and Cisco IOS XE Release 3.17S (for Access and Edge Routing) the two releases evolve (merge) into a single version of converged release—the Cisco IOS XE 16—providing one release covering the extensive range of access and edge products in the Switching and Routing portfolio. Feature Information Use Cisco Feature Navigator to find information about feature support, platform support, and Cisco software image support. An account on Cisco.com is not required. Related References Cisco IOS Command References, All Releases Obtaining Documentation and Submitting a Service Request To receive timely, relevant information from Cisco, sign up at Cisco Profile Manager. To get the business impact you’re looking for with the technologies that matter, visit Cisco Services. To submit a service request, visit Cisco Support. To discover and browse secure, validated enterprise-class apps, products, solutions and services, visit Cisco Marketplace. To obtain general networking, training, and certification titles, visit Cisco Press. To find warranty information for a specific product or product family, access Cisco Warranty Finder. C H A P T E R 2 Cisco BGP Overview Border Gateway Protocol (BGP) is an interdomain routing protocol designed to provide loop-free routing between separate routing domains that contain independent routing policies (autonomous systems). The Cisco software implementation of BGP version 4 includes support for 4-byte autonomous system numbers and multiprotocol extensions to allow BGP to carry routing information for IP multicast routes and multiple Layer 3 protocol address families including IP Version 4 (IPv4), IP Version 6 (IPv6), Virtual Private Networks Version 4 (VPNv4), Connectionless Network Services (CLNS), and Layer 2 VPN (L2VPN). This module contains conceptual material to help you understand how BGP is implemented in Cisco software. Finding Feature Information, on page 3 Prerequisites for Cisco BGP, on page 3 Restrictions for Cisco BGP, on page 4 Information About Cisco BGP, on page 4 Additional References, on page 18 Feature Information for Cisco BGP Overview, on page 19 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Prerequisites for Cisco BGP This document assumes knowledge of CLNS, IPv4, IPv6, multicast, VPNv4, and Interior Gateway Protocols (IGPs). The amount of knowledge required for each technology is dependent on your deployment. Restrictions for Cisco BGP A router that runs Cisco software can be configured to run only one BGP routing process and to be a member of only one BGP autonomous system. However, a BGP routing process and autonomous system can support multiple concurrent BGP address family and subaddress family configurations. Information About Cisco BGP BGP Version 4 Border Gateway Protocol (BGP) is an interdomain routing protocol designed to provide loop-free routing between separate routing domains that contain independent routing policies (autonomous systems). The Cisco software implementation of BGP version 4 includes multiprotocol extensions to allow BGP to carry routing information for IP multicast routes and multiple Layer 3 protocol address families including IP Version 4 (IPv4), IP Version 6 (IPv6), Virtual Private Networks version 4 (VPNv4), and Connectionless Network Services (CLNS). BGP is mainly used to connect a local network to an external network to gain access to the Internet or to connect to other organizations. When connecting to an external organization, external BGP (eBGP) peering sessions are created. For more details about connecting to external BGP peers, see the “Connecting to a Service Provider Using External BGP” chapter. Although BGP is referred to as an exterior gateway protocol (EGP), many networks within an organization are becoming so complex that BGP can be used to simplify the internal network used within the organization. BGP peers within the same organization exchange routing information through internal BGP (iBGP) peering sessions. For more details about internal BGP peers, see the “Configuring Internal BGP Features” chapter of the Cisco IOS IP Routing Configuration Guide. BGP requires more configuration than other routing protocols and the effects of any configuration changes must be fully understood. Incorrect configuration can create routing loops and negatively impact normal network operation. Note BGP Version 4 Functional Overview BGP is an interdomain routing protocol designed to provide loop-free routing links between organizations. BGP is designed to run over a reliable transport protocol; it uses TCP (port 179) as the transport protocol because TCP is a connection-oriented protocol. The destination TCP port is assigned 179, and the local port is assigned a random port number. Cisco software supports BGP version 4 and it is this version that has been used by Internet service providers (ISPs) to help build the Internet. RFC 1771 introduced and discussed a number of newBGP features to allow the protocol to scale for Internet use. RFC 2858 introducedmultiprotocol extensions to allow BGP to carry routing information for IP multicast routes and multiple Layer 3 protocol address families, including IPv4, IPv6, and CLNS. BGP is mainly used to connect a local network to an external network to gain access to the Internet or to connect to other organizations. When connecting to an external organization, external BGP (eBGP) peering sessions are created. Although BGP is referred to as an exterior gateway protocol (EGP), many networks within an organization are becoming so complex that BGP can be used to simplify the internal network used within the organization. BGP peers within the same organization exchange routing information through internal BGP (iBGP) peering sessions. BGP uses a path-vector routing algorithm to exchange network reachability information with other BGP-speaking networking devices. Network reachability information is exchanged between BGP peers in routing updates. Network reachability information contains the network number, path-specific attributes, and the list of autonomous system numbers that a route must transit to reach a destination network. This list is contained in the AS-path attribute. BGP prevents routing loops by rejecting any routing update that contains the local autonomous system number because this indicates that the route has already traveled through that autonomous system and a loop would therefore be created. The BGP path-vector routing algorithm is a combination of the distance-vector routing algorithm and the AS-path loop detection. BGP selects a single path, by default, as the best path to a destination host or network. The best path selection algorithm analyzes path attributes to determine which route is installed as the best path in the BGP routing table. Each path carries well-known mandatory, well-known discretionary, and optional transitive attributes that are used in BGP best path analysis. Cisco software provides the ability to influence BGP path selection by altering some of these attributes using the command-line interface (CLI.) BGP path selection can also be influenced through standard BGP policy configuration. For more details about using BGP to influence path selection and configuring BGP policies to filter traffic, see the “BGP 4 Prefix Filter and Inbound RouteMaps” module and the “BGP Prefix-Based Outbound Route Filtering” module. BGP uses the best-path selection algorithm to find a set of equally good routes. These routes are the potential multipaths. In Cisco IOS Release 12.2(33)SRD and later releases, when there are more equally goodmultipaths available than the maximum permitted number, the oldest paths are selected as multipaths. BGP can be used to help manage complex internal networks by interfacing with Interior Gateway Protocols (IGPs). Internal BGP can help with issues such as scaling the existing IGPs to match the traffic demands while maintaining network efficiency. BGP requires more configuration than other routing protocols and the effects of any configuration changes must be fully understood. Incorrect configuration can create routing loops and negatively impact normal network operation. Note BGP Autonomous Systems An autonomous system is a network controlled by a single technical administration entity. BGP autonomous systems are used to divide global external networks into individual routing domains where local routing policies are applied. This organization simplifies routing domain administration and simplifies consistent policy configuration. Consistent policy configuration is important to allow BGP to efficiently process routes to destination networks. Each routing domain can support multiple routing protocols. However, each routing protocol is administered separately. Other routing protocols can dynamically exchange routing information with BGP through redistribution. Separate BGP autonomous systems dynamically exchange routing information through eBGP peering sessions. BGP peers within the same autonomous system exchange routing information through iBGP peering sessions. The figure below illustrates two routers in separate autonomous systems that can be connected using BGP. Router A and Router B are ISP routers in separate routing domains that use public autonomous system numbers. These routers carry traffic across the Internet. Router A and Router B are connected through eBGP peering sessions. Figure 1: BGP Topology with Two Autonomous Systems Each public autonomous system that directly connects to the Internet is assigned a unique number that identifies both the BGP routing process and the autonomous system. BGP Autonomous System Number Formats Prior to January 2009, BGP autonomous system numbers that were allocated to companies were two-octet numbers in the range from 1 to 65535 as described in RFC 4271, A Border Gateway Protocol 4 (BGP-4). Due to increased demand for autonomous system numbers, the Internet Assigned Number Authority (IANA) will start in January 2009 to allocate four-octet autonomous system numbers in the range from 65536 to 4294967295. RFC 5396, Textual Representation of Autonomous System (AS) Numbers, documents three methods of representing autonomous system numbers. Cisco has implemented the following two methods: Asplain--Decimal value notation where both 2-byte and 4-byte autonomous system numbers are represented by their decimal value. For example, 65526 is a 2-byte autonomous system number and 234567 is a 4-byte autonomous system number. Asdot--Autonomous system dot notation where 2-byte autonomous system numbers are represented by their decimal value and 4-byte autonomous system numbers are represented by a dot notation. For example, 65526 is a 2-byte autonomous system number and 1.169031 is a 4-byte autonomous system number (this is dot notation for the 234567 decimal number). For details about the third method of representing autonomous system numbers, see RFC 5396. Asdot Only Autonomous System Number Formatting In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and later releases, the 4-octet (4-byte) autonomous system numbers are entered and displayed only in asdot notation, for example, 1.10 or 45000.64000. When using regular expressions to match 4-byte autonomous system numbers the asdot format includes a period which is a special character in regular expressions. A backslash must be entered before the period for example, 1\.14, to ensure the regular expression match does not fail. The table below shows the format in which 2-byte and 4-byte autonomous system numbers are configured, matched in regular expressions, and displayed in show command output in Cisco IOS images where only asdot formatting is available. Table 1: Asdot Only 4-Byte Autonomous System Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 1.0 to 65535.65535 asdot Asplain as Default Autonomous System Number Formatting In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, and later releases, the Cisco implementation of 4-byte autonomous system numbers uses asplain as the default display format for autonomous system numbers, but you can configure 4-byte autonomous system numbers in both the asplain and asdot format. In addition, the default format for matching 4-byte autonomous system numbers in regular expressions is asplain, so you must ensure that any regular expressions to match 4-byte autonomous system numbers are written in the asplain format. If you want to change the default show command output to display 4-byte autonomous system numbers in the asdot format, use the bgp asnotation dot command under router configuration mode. When the asdot format is enabled as the default, any regular expressions to match 4-byte autonomous system numbers must be written using the asdot format, or the regular expression match will fail. The tables below show that although you can configure 4-byte autonomous system numbers in either asplain or asdot format, only one format is used to display show command output and control 4-byte autonomous system number matching for regular expressions, and the default is asplain format. To display 4-byte autonomous system numbers in show command output and to control matching for regular expressions in the asdot format, you must configure the bgp asnotation dot command. After enabling the bgp asnotation dot command, a hard reset must be initiated for all BGP sessions by entering the clear ip bgp * command. If you are upgrading to an image that supports 4-byte autonomous system numbers, you can still use 2-byte autonomous system numbers. The show command output and regular expression match are not changed and remain in asplain (decimal value) format for 2-byte autonomous system numbers regardless of the format configured for 4-byte autonomous system numbers. Note Table 2: Default Asplain 4-Byte Autonomous System Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 65536 to 42949672952-byte: 1 to 65535 4-byte: 65536 to 4294967295 asplain 2-byte: 1 to 65535 4-byte: 65536 to 42949672952-byte: 1 to 65535 4-byte: 1.0 to 65535.65535asdot Table 3: Asdot 4-Byte Autonomous System Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 65536 to 4294967295 asplain 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 1.0 to 65535.65535asdot Reserved and Private Autonomous System Numbers In Cisco IOS Release 12.0(32)S12, 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, 12.4(24)T, and later releases, the Cisco implementation of BGP supports RFC 4893. RFC 4893was developed to allow BGP to support a gradual transition from 2-byte autonomous system numbers to 4-byte autonomous system numbers. A new reserved (private) autonomous system number, 23456, was created by RFC 4893 and this number cannot be configured as an autonomous system number in the Cisco IOS CLI. RFC 5398, Autonomous System (AS) Number Reservation for Documentation Use, describes new reserved autonomous system numbers for documentation purposes. Use of the reserved numbers allow configuration examples to be accurately documented and avoids conflict with production networks if these configurations are literally copied. The reserved numbers are documented in the IANA autonomous system number registry. Reserved 2-byte autonomous system numbers are in the contiguous block, 64496 to 64511 and reserved 4-byte autonomous system numbers are from 65536 to 65551 inclusive. Private 2-byte autonomous system numbers are still valid in the range from 64512 to 65534 with 65535 being reserved for special use. Private autonomous system numbers can be used for internal routing domains but must be translated for traffic that is routed out to the Internet. BGP should not be configured to advertise private autonomous system numbers to external networks. Cisco IOS software does not remove private autonomous system numbers from routing updates by default. We recommend that ISPs filter private autonomous system numbers. Autonomous system number assignment for public and private networks is governed by the IANA. For information about autonomous-system numbers, including reserved number assignment, or to apply to register an autonomous system number, see the following URL: http://www.iana.org/. Note Classless Interdomain Routing BGP version 4 supports classless interdomain routing (CIDR). CIDR eliminates classful network boundaries, providing more efficient usage of the IPv4 address space. CIDR provides a method to reduce the size of routing tables by configuring aggregate routes (or supernets). CIDR processes a prefix as an IP address and bit mask (bits are processed from left to right) to define each network. A prefix can represent a network, subnetwork, supernet, or single host route. For example, using classful IP addressing, the IP address 192.168.2.1 is defined as a single host in the Class C network 192.168.2.0. Using CIDR, the IP address can be shown as 192.168.2.1/16, which defines a network (or supernet) of 192.168.0.0. CIDR is enabled by default for all routing protocols in Cisco software. Enabling CIDR affects how packets are forwarded, but it does not change the operation of BGP. Multiprotocol BGP Cisco software supports multiprotocol BGP extensions as defined in RFC 2858,Multiprotocol Extensions for BGP-4. The extensions introduced in this RFC allow BGP to carry routing information for multiple network-layer protocols, including CLNS, IPv4, IPv6, and VPNv4. These extensions are backward-compatible to enable routers that do not support multiprotocol extensions to communicate with those routers that do support multiprotocol extensions. Multiprotocol BGP carries routing information for multiple network-layer protocols and IPmulticast routes. BGP carries different sets of routes depending on the protocol. For example, BGP can carry one set of routes for IPv4 unicast routing, one set of routes for IPv4 multicast routing, and one set of routes for MPLS VPNv4 routes. Amultiprotocol BGP network is backward-compatible with a BGP network, but BGP peers that do not support multiprotocol extensions cannot forward routing information, such as address family identifier information, that the multiprotocol extensions carry. Note Benefits of Using Multiprotocol BGP Versus BGP In complex networks with multiple network layer protocols, multiprotocol BGPmust be used. In less complex networks we recommend using multiprotocol BGP because it offers the following benefits: All of the BGP commands and routing policy capabilities of BGP can be applied to multiprotocol BGP. A network can carry routing information for multiple network layer protocol address families (for example, IP Version 4 or VPN Version 4) as specified in RFC 1700, Assigned Numbers. A network can support incongruent unicast and multicast topologies. Amultiprotocol BGP network is backward compatible because the routers that support the multiprotocol extensions can interoperate with routers that do not support the extensions. In summary, multiprotocol BGP support for multiple network layer protocol address families provides a flexible and scalable infrastructure that allows you to define independent policy and peering configurations on a per-address family basis. Multiprotocol BGP Extensions for IP Multicast The routes associated with multicast routing are used by the Protocol Independent Multicast (PIM) feature to build data distribution trees. Multiprotocol BGP is useful when you want a link that is dedicated to multicast traffic, perhaps to limit which resources are used for which traffic. For example, you want all multicast traffic exchanged at one network access point (NAP). Multiprotocol BGP allows you to have a unicast routing topology different from a multicast routing topology, which allows you more control over your network and resources. In BGP, the only way to perform interdomain multicast routing is to use the BGP infrastructure that is in place for unicast routing. If the routers are not multicast-capable, or if there are differing policies about where multicast traffic should flow, multicast routing cannot be supported without multiprotocol BGP. A multicast routing protocol, such as PIM, uses both the multicast and unicast BGP database to source the route, perform Reverse Path Forwarding (RPF) lookups for multicast-capable sources, and build a multicast distribution tree (MDT). The multicast table is the primary source for the router, but if the route is not found in the multicast table, the unicast table is searched. Although multicast can be performed with unicast BGP, multicast BGP routes allow an alternative topology to be used for RPF. It is possible to configure BGP peers that exchange both unicast and multicast Network Layer Reachability Information (NLRI) where multiprotocol BGP routes can be redistributed into BGP.Multiprotocol extensions, however, will be ignored by any peers that do not support multiprotocol BGP. When PIM builds a multicast distribution tree through a unicast BGP network (because the route through the unicast network is the most attractive), the RPF check may fail, preventing the MDT from being built. If the unicast network runs multiprotocol BGP, peering can be configured using the appropriate multicast address family. The multicast address family configuration enables multiprotocol BGP to carry the multicast information and the RPF lookup will succeed. The figure below illustrates a simple example of unicast and multicast topologies that are incongruent; these topologies cannot exchange information without implementing multiprotocol BGP. Autonomous systems 100, 200, and 300 are each connected to two NAPs that are FDDI rings. One is used for unicast peering (and therefore the exchanging of unicast traffic). TheMulticast Friendly Interconnect (MFI) ring is used for multicast peering (and therefore the exchanging of multicast traffic). Each router is unicast- and multicast-capable. Figure 2: Incongruent Unicast and Multicast Routes The figure below is a topology of unicast-only routers and multicast-only routers. The two routers on the left are unicast-only routers (that is, they do not support or are not configured to perform multicast routing). The two routers on the right are multicast-only routers. Routers A and B support both unicast and multicast routing. The unicast-only and multicast-only routers are connected to a single NAP. In the figure below, only unicast traffic can travel from Router A to the unicast routers to Router B and back. Multicast traffic could not flow on that path, because multicast routing is not configured on the unicast routers and therefore the BGP routing table does not contain any multicast routes. On the multicast routers, multicast routes are enabled and BGP builds a separate routing table to hold the multicast routes. Multicast traffic uses the path from Router A to the multicast routers to Router B and back. The figure below illustrates a multiprotocol BGP environment with a separate unicast route and multicast route from Router A to Router B. Multiprotocol BGP allows these routes to be noncongruent. Both of the autonomous systems must be configured for internal multiprotocol BGP (labeled “IMBGP” in the figure). Figure 3: Multicast BGP Environment For more information about IP multicast, see the “Configuring IP Multicast” configuration library. NLRI Configuration CLI BGPwas designed to carry only unicast IPv4 routing information. BGP configuration used the Network NLRI format CLI in Cisco software. The NLRI format offers only limited support for multicast routing information and does not support multiple network layer protocols. We do not recommend using NLRI format CLI for BGP configuration. Using the BGP hybrid CLI feature, you can configure commands in the address family VPNv4 format and save these command configurations without modifying an existing NLRI formatted configuration. If you want to use other address family configurations such as IPv4 unicast or multicast, then you must upgrade the configuration using the bgp upgrade-cli command. For more details about using BGP hybrid CLI commands, see the "Configuring a Basic BGPNetwork”module. See the “Multiprotocol BGP” and “Cisco BGP Address Family Model” sections for more information about address family configuration format and the limitations of the NLRI CLI format. Cisco BGP Address Family Model The Cisco BGP address family identifier (AFI) model was introducedwith multiprotocol BGP and is designed to be modular and scalable, and to support multiple AFI and subsequent address family identifier (SAFI) configurations. Networks are increasing in complexity and many companies are now using BGP to connect to many autonomous systems, as shown in the network topology in the figure below. Each of the separate autonomous systems shown in the figure belowmay be running several routing protocols such asMultiprotocol Label Switching (MPLS) and IPv6 and require both unicast and multicast routes to be transported via BGP. Figure 4: BGP Network Topology for Multiple Address Families The Cisco BGP AFI model introduced new command-line interface (CLI) commands supported by a new internal structure. Multiprotocol BGP carries routing information for multiple network layer protocols and IP multicast routes. This routing information is carried in the AFImodel as appended BGP attributes (multiprotocol extensions). Each address family maintains a separate BGP database, which allows you to configure BGP policy on per-address family basis. SAFI configurations are subsets of the parent AFI. SAFIs can be used to refine BGP policy configurations. The AFI model was created because of scalability limitations of the NLRI format. A router that is configured in NLRI format has IPv4 unicast but limited multicast capabilities. Networks that are configured in the NLRI format have the following limitations: No support for AFI and SAFI configuration information. Many new BGP (and other protocols such as MPLS) features are supported only in AFI and SAFI configuration modes and cannot be configured in NLRI configuration modes. No support for IPv6. A router that is configured in the NLRI format cannot establish peering with an IPv6 neighbor. Limited support for multicast interdomain routing and incongruent multicast and unicast topologies. In the NLRI format, not all configuration options are available and there is no support for VPNv4. The NLRI format configurations can be more complex than configurations that support the AFI model. If the routers in the infrastructure do not have multicast capabilities, or if policies differ as to where multicast traffic is configured to flow, multicast routing cannot be supported. The AFI model in multiprotocol BGP supports multiple AFIs and SAFIs, all NLRI-based commands and policy configurations, and is backward compatible with routers that support only the NLRI format. A router that is configured using the AFI model has the following features: AFI and SAFI information and configurations are supported. A router that is configured using the AFI model can carry routing information for multiple network layer protocol address families (for example, IPv4 and IPv6). AFI configuration is similar in all address families, making the CLI syntax easier to use than the NLRI format syntax. All BGP routing policy capabilities and commands are supported. Congruent unicast and multicast topologies that have different policies (BGP filtering configurations) are supported, as are incongruent multicast and unicast topologies. CLNS is supported. Interoperation between routers that support only the NLRI format (AFI-based networks are backward compatible) is supported. This includes both IPv4 unicast and multicast NLRI peers. Virtual Private Networks (VPNs) and VPN routing and forwarding (VRF) instances are supported. Unicast IPv4 for VRFs can be configured from a specific address family IPv4 VRF; this configuration update is integrated into the BGP VPNv4 database. Within a specific address family configuration mode, the question mark (?) online help function can be used to display supported commands. The BGP commands supported in address family configurationmode configure the same functionality as the BGP commands supported in router configuration mode; however, the BGP commands in router configuration mode configure functionality only for the IPv4 unicast address prefix. To configure BGP commands and functionality for other address family prefixes (for example, the IPv4multicast or IPv6 unicast address prefixes), you must enter address family configuration mode for those address prefixes. The BGP address family model consists of four address families in Cisco IOS software; IPv4, IPv6, CLNS, and VPNv4. In Cisco IOS Release 12.2(33)SRB, and later releases, support for the L2VPN address family was introduced, and within the L2VPN address family the VPLS SAFI is supported. Within the IPv4 and IPv6 address families, SAFIs such as Multicast Distribution Tree (MDT), tunnel, and VRF exist. The table below shows the list of SAFIs supported by Cisco IOS software. To ensure compatibility between networks running all types of AFI and SAFI configuration, we recommend configuring BGP on Cisco IOS devices using the multiprotocol BGP address family model. Table 4: SAFIs Supported by Cisco IOS Software ReferenceDescriptionSAFI Field Value RFC 2858NLRI used for unicast forwarding.1 RFC 2858NLRI used for multicast forwarding.2 RFC 2858NLRI used for both unicast and multicast forwarding. 3 RFC 3107NLRI with MPLS labels.4 draft-nalawade-kapoor-tunnel- safi -01.txt Tunnel SAFI.64 —Virtual Private LAN Service (VPLS).65 draft-nalawade-idr-mdt-safi-00.txtBGP MDT SAFI.66 ReferenceDescriptionSAFI Field Value RFC-ietf-l3vpn-rfc2547bis-03.txtMPLS-labeled VPN address.128 IPv4 Address Family The IPv4 address family is used to identify routing sessions for protocols such as BGP that use standard IP version 4 address prefixes. Unicast or multicast address prefixes can be specified within the IPv4 address family. Routing information for address family IPv4 unicast is advertised by default when a BGP peer is configured unless the advertisement of unicast IPv4 information is explicitly turned off. VRF instances can also be associated with IPv4 AFI configuration mode commands. In Cisco IOS Release 12.0(28)S, the tunnel SAFI was introduced to support multipoint tunneling IPv4 routing sessions. The tunnel SAFI is used to advertise the tunnel endpoints and the SAFI specific attributes that contain the tunnel type and tunnel capabilities. Redistribution of tunnel endpoints into the BGP IPv4 tunnel SAFI table occurs automatically when the tunnel address family is configured. However, peers need to be activated under the tunnel address family before the sessions can exchange tunnel information. In Cisco IOS Release 12.0(29)S, the multicast distribution tree (MDT) SAFI was introduced to support multicast VPN architectures. TheMDT SAFI is a transitive multicast capable connector attribute that is defined as an IPv4 address family in BGP. The MDT address family session operates as a SAFI under the IPv4 multicast address family, and is configured on provider edge (PE) routers to establish VPN peering sessions with customer edge (CE) routers that support inter-AS multicast VPN peering sessions. IPv6 Address Family The IPv6 address family is used to identify routing sessions for protocols such as BGP that use standard IPv6 address prefixes. Unicast or multicast address prefixes can be specified within the IPv6 address family. Routing information for address family IPv4 unicast is advertised by default when you configure a BGP peer unless you explicitly turn off the advertisement of unicast IPv4 information. Note CLNS Address Family The CLNS address family is used to identify routing sessions for protocols such as BGP that use standard network service access point (NSAP) address prefixes. Unicast address prefixes are the default when NSAP address prefixes are configured. CLNS routes are used in networks where CLNS addresses are configured. This is typically a telecommunications Data Communications Network (DCN). Peering is established using IP addresses, but update messages contain CLNS routes. For more details about configuring BGP support for CLNS, which provides the ability to scale CLNS networks, see the “Configuring Multiprotocol BGP (MP-BGP) support for CLNS” module. VPNv4 Address Family The VPNv4 multicast address family is used to identify routing sessions for protocols such as BGP that use standard VPN Version 4 address prefixes. Unicast address prefixes are the default when VPNv4 address prefixes are configured. VPNv4 routes are the same as IPv4 routes, but VPNv4 routes have a route descriptor (RD) prepended that allows replication of prefixes. It is possible to associate every different RDwith a different VPN. Each VPN needs its own set of prefixes. Companies use an IP VPN as the foundation for deploying or administering value-added services including applications and data hosting network commerce, and telephony services to business customers. In private LANs, IP-based intranets have fundamentally changed the way companies conduct their business. Companies are moving their business applications to their intranets to extend over a WAN. Companies are also addressing the needs of their customers, suppliers, and partners by using extranets (an intranet that encompasses multiple businesses). With extranets, companies reduce business process costs by facilitating supply-chain automation, electronic data interchange (EDI), and other forms of network commerce. To take advantage of this business opportunity, service providers must have an IP VPN infrastructure that delivers private network services to businesses over a public infrastructure. VPNs, when used with MPLS, allow several sites to transparently interconnect through a service provider's network. One service provider network can support several different IP VPNs. Each of these appears to its users as a private network, separate from all other networks. Within a VPN, each site can send IP packets to any other site in the same VPN. Each VPN is associated with one or more VPN VRFs. VPNv4 routes are a superset of routes from all VRFs, and route injection is done per VRF under the specific VRF address family. The router maintains a separate routing and Cisco Express Forwarding (CEF) table for each VRF. This prevents information from being sent outside the VPN and allows the same subnet to be used in several VPNs without causing duplicate IP address problems. The router using BGP distributes the VPN routing information using the BGP extended communities. The VPN address space is isolated from the global address space by design. BGP distributes reachability information for VPN-IPv4 prefixes for each VPN using the VPNv4 multiprotocol extensions to ensure that the routes for a given VPN are learned only by other members of that VPN, enabling members of the VPN to communicate with each other. RFC 3107 specifies how to add label information to multiprotocol BGP address families using a SAFI. The Cisco IOS implementation of MPLS uses RFC 3107 to provide support for sending IPv4 routes with a label. VPNv4 routes implicitly have a label associated with each route. L2VPN Address Family L2VPN is defined as a secure network that operates inside an unsecured network by using an encryption technology such as IP security (IPsec) or Generic Routing Encapsulation (GRE). The L2VPN address family is configured under BGP routing configuration mode, and within the L2VPN address family the VPLS subsequent address family identifier (SAFI) is supported. BGP support for the L2VPN address family introduces a BGP-based autodiscovery mechanism to distribute L2VPN endpoint provisioning information. BGP uses a separate L2VPN routing information base (RIB) to store endpoint provisioning information, which is updated each time any Layer 2 VFI is configured. Prefix and path information is stored in the L2VPN database, allowing BGP to make best-path decisions.When BGP distributes the endpoint provisioning information in an update message to all its BGP neighbors, the endpoint information is used to set up a pseudowire mesh to support L2VPN-based services. The BGP autodiscovery mechanism facilitates the setting up of L2VPN services, which are an integral part of the Cisco IOS Virtual Private LAN Service (VPLS) feature. VPLS enables flexibility in deploying services by connecting geographically dispersed sites as a large LAN over high-speed Ethernet in a robust and scalable IP MPLS network. For more details about VPLS, see the “VPLS Autodiscovery: BGP Based” feature. Under L2VPN address family the following BGP command-line interface (CLI) commands are supported: bgp scan-time bgp nexthop neighbor activate neighbor advertisement-interval neighbor allowas-in neighbor capability neighbor inherit neighbor peer-group neighbor maximum-prefix neighbor next-hop-self neighbor next-hop-unchanged neighbor remove-private-as neighbor route-map neighbor route-reflector-client neighbor send-community neighbor soft-reconfiguration neighbor soo neighbor weight For route reflectors using L2VPNs, the neighbor next-hop-self and neighbor next-hop-unchanged commands are not supported. Note For route maps used within BGP, all commands related to prefix processing, tag processing, and automated tag processing are ignored when used under L2VPN address family configuration. All other route map commands are supported. BGP multipaths and confederations are not supported under the L2VPN address family. For details on configuring BGP under the L2VPN address family, see the “BGP Support for the L2VPN Address Family” module. BGP CLI Removal Considerations BGP CLI configuration can become quite complex even in smaller BGP networks. If you need to remove any CLI configuration, you must consider all the implications of removing the CLI. Analyze the current running configuration to determine the current BGP neighbor relationships, any address family considerations, and even other routing protocols that are configured. Many BGP CLI commands affect other parts of the CLI configuration. For example, in the following configuration, a route map is used to match a BGP autonomous system number and then set the matched routes with another autonomous system number for EIGRP: route-map bgp-to-eigrp permit 10 match tag 50000 set tag 65000 BGP neighbors in three different autonomous systems are configured and activated: router bgp 45000 bgp log-neighbor-changes address-family ipv4 neighbor 172.16.1.2 remote-as 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.3.2 remote-as 50000 neighbor 172.16.1.2 activate neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate network 172.17.1.0 mask 255.255.255.0 exit-address-family An EIGRP routing process is then configured and BGP routes are redistributed into EIGRP with a route map filtering the routes: router eigrp 100 redistribute bgp 45000 metric 10000 100 255 1 1500 route-map bgp-to-eigrp no auto-summary exit If you later decide to remove the route map, you will use the no form of the route-map command. Almost every configuration command has a no form, and the no form generally disables a function. However, in this configuration example, if you disable only the route map, the route redistribution will continue, but without the filtering or matching from the route map. Redistribution without the route map may cause unexpected behavior in your network. When you remove an access list or route map, you must also review the commands that referenced that access list or route map to consider whether the command will give you the behavior you intended. The following configuration will remove both the route map and the redistribution: configure terminal no route-map bgp-to-eigrp router eigrp 100 no redistribute bgp 45000 end For details on configuring the removal of BGPCLI configuration, see the “Configuring a Basic BGPNetwork” module. Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands Standards TitleStandard MDTSAFIMDTSAFI MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs CISCO-BGP4-MIB RFCs TitleRFC Assigned NumbersRFC1700 Multiprotocol Extensions for BGP-4RFC2858 Carrying Label Information in BGP-4RFC3107 A Border Gateway Protocol 4 (BGP-4)RFC4271 BGP Support for Four-Octet AS Number SpaceRFC4893 Textual Representation of Autonomous System (AS) NumbersRFC5396 Autonomous System (AS) Number Reservation for Documentation UseRFC5398 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for Cisco BGP Overview The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 5: Feature Information for Cisco BGP Overview Feature InformationReleasesFeature Name Cisco IOS software supports multiprotocol BGP extensions as defined in RFC 2858, Multiprotocol Extensions for BGP-4 . The extensions introduced in this RFC allow BGP to carry routing information for multiple network layer protocols including CLNS, IPv4, IPv6, and VPNv4. These extensions are backward compatible to enable routers that do not support multiprotocol extensions to communicate with those routers that do support multiprotocol extensions. Multiprotocol BGP carries routing information for multiple network layer protocols and IP multicast routes. Cisco IOS XE 3.1.0SG Multiprotocol BGP C H A P T E R 3 BGP 4 BGP is an interdomain routing protocol designed to provide loop-free routing between separate routing domains that contain independent routing policies (autonomous systems). Finding Feature Information, on page 21 Information About BGP 4, on page 21 How to Configure BGP 4, on page 27 Configuration Examples for BGP 4, on page 60 Additional References, on page 65 Feature Information for BGP 4, on page 66 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP 4 BGP Version 4 Functional Overview BGP is an interdomain routing protocol designed to provide loop-free routing links between organizations. BGP is designed to run over a reliable transport protocol; it uses TCP (port 179) as the transport protocol because TCP is a connection-oriented protocol. The destination TCP port is assigned 179, and the local port is assigned a random port number. Cisco software supports BGP version 4 and it is this version that has been used by Internet service providers (ISPs) to help build the Internet. RFC 1771 introduced and discussed a number of newBGP features to allow the protocol to scale for Internet use. RFC 2858 introducedmultiprotocol extensions to allow BGP to carry routing information for IP multicast routes and multiple Layer 3 protocol address families, including IPv4, IPv6, and CLNS. BGP is mainly used to connect a local network to an external network to gain access to the Internet or to connect to other organizations. When connecting to an external organization, external BGP (eBGP) peering sessions are created. Although BGP is referred to as an exterior gateway protocol (EGP), many networks within an organization are becoming so complex that BGP can be used to simplify the internal network used within the organization. BGP peers within the same organization exchange routing information through internal BGP (iBGP) peering sessions. BGP uses a path-vector routing algorithm to exchange network reachability information with other BGP-speaking networking devices. Network reachability information is exchanged between BGP peers in routing updates. Network reachability information contains the network number, path-specific attributes, and the list of autonomous system numbers that a route must transit to reach a destination network. This list is contained in the AS-path attribute. BGP prevents routing loops by rejecting any routing update that contains the local autonomous system number because this indicates that the route has already traveled through that autonomous system and a loop would therefore be created. The BGP path-vector routing algorithm is a combination of the distance-vector routing algorithm and the AS-path loop detection. BGP selects a single path, by default, as the best path to a destination host or network. The best path selection algorithm analyzes path attributes to determine which route is installed as the best path in the BGP routing table. Each path carries well-known mandatory, well-known discretionary, and optional transitive attributes that are used in BGP best path analysis. Cisco software provides the ability to influence BGP path selection by altering some of these attributes using the command-line interface (CLI.) BGP path selection can also be influenced through standard BGP policy configuration. For more details about using BGP to influence path selection and configuring BGP policies to filter traffic, see the “BGP 4 Prefix Filter and Inbound RouteMaps” module and the “BGP Prefix-Based Outbound Route Filtering” module. BGP uses the best-path selection algorithm to find a set of equally good routes. These routes are the potential multipaths. In Cisco IOS Release 12.2(33)SRD and later releases, when there are more equally goodmultipaths available than the maximum permitted number, the oldest paths are selected as multipaths. BGP can be used to help manage complex internal networks by interfacing with Interior Gateway Protocols (IGPs). Internal BGP can help with issues such as scaling the existing IGPs to match the traffic demands while maintaining network efficiency. BGP requires more configuration than other routing protocols and the effects of any configuration changes must be fully understood. Incorrect configuration can create routing loops and negatively impact normal network operation. Note BGP Router ID BGP uses a router ID to identify BGP-speaking peers. The BGP router ID is a 32-bit value that is often represented by an IPv4 address. By default, the Cisco software sets the router ID to the IPv4 address of a loopback interface on the router. If no loopback interface is configured on the device, the software chooses the highest IPv4 address configured on a physical interface of the device to represent the BGP router ID. The BGP router ID must be unique to the BGP peers in a network. BGP-Speaker and Peer Relationships ABGP-speaking device does not discover another BGP-speaking device automatically. A network administrator usually manually configures the relationships between BGP-speaking devices. A peer device is a BGP-speaking device that has an active TCP connection to another BGP-speaking device. This relationship between BGP devices is often referred to as a neighbor, but because this can imply the idea that the BGP devices are directly connected with no other device in between, the term neighbor will be avoided whenever possible in this document. A BGP speaker is the local device, and a peer is any other BGP-speaking network device. When a TCP connection is established between peers, each BGP peer initially exchanges all its routes—the complete BGP routing table—with the other peer. After this initial exchange, only incremental updates are sent when there has been a topology change in the network, or when a routing policy has been implemented or modified. In the periods of inactivity between these updates, peers exchange special messages called keepalives. A BGP autonomous system is a network that is controlled by a single technical administration entity. Peer devices are called external peers when they are in different autonomous systems and internal peers when they are in the same autonomous system. Usually, external peers are adjacent and share a subnet; internal peers may be anywhere in the same autonomous system. BGP Peer Session Establishment When a BGP routing process establishes a peering session with a peer, it goes through the following state changes: Idle—The initial state that the BGP routing process enters when the routing process is enabled or when the device is reset. In this state, the device waits for a start event, such as a peering configuration with a remote peer. After the device receives a TCP connection request from a remote peer, the device initiates another start event to wait for a timer before starting a TCP connection to a remote peer. If the device is reset, the peer is reset and the BGP routing process returns to the Idle state. Connect—The BGP routing process detects that a peer is trying to establish a TCP session with the local BGP speaker. Active—In this state, the BGP routing process tries to establish a TCP session with a peer device using the ConnectRetry timer. Start events are ignored while the BGP routing process is in the Active state. If the BGP routing process is reconfigured or if an error occurs, the BGP routing process will release system resources and return to an Idle state. OpenSent—The TCP connection is established, and the BGP routing process sends an OPEN message to the remote peer, and transitions to the OpenSent state. The BGP routing process can receive other OPEN messages in this state. If the connection fails, the BGP routing process transitions to the Active state. OpenReceive—The BGP routing process receives the OPEN message from the remote peer and waits for an initial keepalive message from the remote peer. When a keepalive message is received, the BGP routing process transitions to the Established state. If a notification message is received, the BGP routing process transitions to the Idle state. If an error or configuration change occurs that affects the peering session, the BGP routing process sends a notification message with the Finite State Machine (FSM) error code and then transitions to the Idle state. Established—The initial keepalive is received from the remote peer. Peering is now established with the remote neighbor and the BGP routing process starts exchanging update message with the remote peer. The hold timer restarts when an update or keepalive message is received. If the BGP process receives an error notification, it will transition to the Idle state. BGP Session Reset Whenever the routing policy changes due to a configuration change, BGP peering sessions must be reset by using the clear ip bgp command. Cisco software supports the following three mechanisms to reset BGP peering sessions: Hard reset—A hard reset tears down the specified peering sessions including the TCP connection and deletes routes coming from the specified peer. Soft reset—A soft reset uses stored prefix information to reconfigure and activate BGP routing tables without tearing down existing peering sessions. Soft reconfiguration uses stored update information, at the cost of additional memory for storing the updates, to allow you to apply new BGP policy without disrupting the network. Soft reconfiguration can be configured for inbound or outbound sessions. Dynamic inbound soft reset—The route refresh capability, as defined in RFC 2918, allows the local device to reset inbound routing tables dynamically by exchanging route refresh requests to supporting peers. The route refresh capability does not store update information locally for nondisruptive policy changes. It instead relies on dynamic exchangewith supporting peers. Route refreshmust first be advertised through BGP capability negotiation between peers. All BGP devices must support the route refresh capability. To determine if a BGP device supports this capability, use the show ip bgp neighbors command. The following message is displayed in the output when the device supports the route refresh capability: Received route refresh capability from peer. The bgp soft-reconfig-backup command was introduced to configure BGP to perform inbound soft reconfiguration for peers that do not support the route refresh capability. The configuration of this command allows you to configure BGP to store updates (soft reconfiguration) only as necessary. Peers that support the route refresh capability are unaffected by the configuration of this command. BGP Route Aggregation BGP peers store and exchange routing information and the amount of routing information increases as more BGP speakers are configured. The use of route aggregation reduces the amount of information involved. Aggregation is the process of combining the attributes of several different routes so that only a single route is advertised. Aggregate prefixes use the classless interdomain routing (CIDR) principle to combine contiguous networks into one classless set of IP addresses that can be summarized in routing tables. Fewer routes now need to be advertised. Two methods are available in BGP to implement route aggregation. You can redistribute an aggregated route into BGP or you can use a form of conditional aggregation. Basic route redistribution involves creating an aggregate route and then redistributing the routes into BGP. Conditional aggregation involves creating an aggregate route and then advertising or suppressing the advertising of certain routes on the basis of route maps, autonomous system set path (AS-SET) information, or summary information. The bgp suppress-inactive command configures BGP to not advertise inactive routes to any BGP peer. A BGP routing process can advertise routes that are not installed in the routing information database (RIB) to BGP peers by default. A route that is not installed into the RIB is an inactive route. Inactive route advertisement can occur, for example, when routes are advertised through common route aggregation. Inactive route advertisements can be suppressed to provide more consistent data forwarding. BGP Route Aggregation Generating AS_SET Information AS_SET information can be generatedwhenBGP routes are aggregated using the aggregate-address command. The path advertised for such a route is an AS_SET consisting of all the elements, including the communities, contained in all the paths that are being summarized. If the AS_PATHs to be aggregated are identical, only the AS_PATH is advertised. The ATOMIC-AGGREGATE attribute, set by default for the aggregate-address command, is not added to the AS_SET. Routing Policy Change Management Routing policies for a peer include all the configurations for elements such as a route map, distribute list, prefix list, and filter list that may impact inbound or outbound routing table updates. Whenever there is a change in the routing policy, the BGP session must be soft-cleared, or soft-reset, for the new policy to take effect. Performing inbound reset enables the new inbound policy configured on the device to take effect. Performing outbound reset causes the new local outbound policy configured on the device to take effect without resetting the BGP session. As a new set of updates is sent during outbound policy reset, a new inbound policy of the neighbor can also take effect. This means that after changing inbound policy, you must do an inbound reset on the local device or an outbound reset on the peer device. Outbound policy changes require an outbound reset on the local device or an inbound reset on the peer device. There are two types of reset: hard reset and soft reset. The table below lists their advantages and disadvantages. Table 6: Advantages and Disadvantages of Hard and Soft Resets DisadvantagesAdvantagesType of Reset The prefixes in the BGP, IP, and Forwarding Information Base (FIB) tables provided by the neighbor are lost. A hard reset is not recommended. No memory overhead.Hard reset Does not reset inbound routing table updates.No configuration, and no storing of routing table updates. Outbound soft reset Both BGP devices must support the route refresh capability. Does not reset outbound routing table updates. Note Does not clear the BGP session and cache. Does not require storing of routing table updates, and has no memory overhead. Dynamic inbound soft reset Requires preconfiguration. Stores all received (inbound) routing policy updates without modification; is memory-intensive. Recommended only when absolutely necessary, such as when both BGP devices do not support the automatic route refresh capability. Does not reset outbound routing table updates. Note Can be used when both BGP devices do not support the automatic route refresh capability. The bgp soft-reconfig-backup commandwas introduced to configure inbound soft reconfiguration for peers that do not support the route refresh capability. Configured inbound soft reset (uses the neighbor soft-reconfiguration router configuration command) Once you have defined two devices to be BGP neighbors, they will form a BGP connection and exchange routing information. If you subsequently change a BGP filter, weight, distance, version, or timer, or if you make a similar configuration change, you must reset BGP connections in order for the configuration change to take effect. A soft reset updates the routing table for inbound and outbound routing updates. Cisco software supports soft reset without any prior configuration. This soft reset allows the dynamic exchange of route refresh requests and routing information between BGP devices, and allows the subsequent readvertisement of the respective outbound routing table. There are two types of soft reset: When soft reset is used to generate inbound updates from a neighbor, it is called dynamic inbound soft reset. When soft reset is used to send a new set of updates to a neighbor, it is called outbound soft reset. To use soft reset without preconfiguration, both BGP peers must support the soft route refresh capability, which is advertised in the OPEN message sent when the peers establish a TCP session. BGP Peer Groups Often, in a BGP network, many neighbors are configured with the same update policies (that is, the same outbound route maps, distribute lists, filter lists, update source, and so on). Neighbors with the same update policies can be grouped into BGP peer groups to simplify configuration and, more importantly, to make configuration updates more efficient. When you have many peers, this approach is highly recommended. BGP Backdoor Routes In a BGP network topology with two border devices using eBGP to communicate to a number of different autonomous systems, using eBGP to communicate between the two border devices may not be the most efficient routing method. In the figure below, Router B as a BGP speaker will receive a route to Router D through eBGP, but this route will traverse at least two autonomous systems. Router B and Router D are also connected through an Enhanced Interior Gateway Routing Protocol (EIGRP) network (any IGP can be used here), and this route has a shorter path. EIGRP routes, however, have a default administrative distance of 90, and eBGP routes have a default administrative distance of 20, so BGP will prefer the eBGP route. Changing the default administrative distances is not recommended because changing the administrative distance may lead to routing loops. To cause BGP to prefer the EIGRP route, you can use the network backdoor command. BGP treats the network specified by the network backdoor command as a locally assigned network, except that it does not advertise the specified network in BGP updates. In the figure below, this means that Router B will communicate to Router D using the shorter EIGRP route instead of the longer eBGP route. Figure 5: BGP Backdoor Route Topology How to Configure BGP 4 Configuring a basic BGP network consists of a few required tasks and many optional tasks. A BGP routing process must be configured and BGP peers must be configured, preferably using the address family configuration model. If the BGP peers are part of a VPN network, the BGP peers must be configured using the IPv4 VRF address family task. Configuring a BGP Routing Process Perform this task to configure a BGP routing process. You must perform the required steps at least once to enable BGP. The optional steps here allow you to configure additional features in your BGP network. Several of the features, such as logging neighbor resets and immediate reset of a peer when its link goes down, are enabled by default but are presented here to enhance your understanding of how your BGP network operates. A device that runs Cisco software can be configured to run only one BGP routing process and to be a member of only one BGP autonomous system. However, a BGP routing process and autonomous system can support multiple concurrent BGP address family and subaddress family configurations. Note The configuration in this task is done at Router A in the figure below and would need to be repeated with appropriate changes to the IP addresses (for example, at Router B) to fully achieve a BGP process between the two devices. No address family is configured here for the BGP routing process, so routing information for the IPv4 unicast address family is advertised by default. Figure 6: BGP Topology with Two Autonomous Systems SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. network network-number [mask network-mask] [route-map route-map-name] 5. bgp router-id ip-address 6. timers bgp keepalive holdtime 7. bgp fast-external-fallover 8. bgp log-neighbor-changes 9. end 10. show ip bgp [network] [network-mask] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Configures a BGP routing process, and enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 PurposeCommand or Action Device(config)# router bgp 40000 Use the autonomous-system-number argument to specify an integer, from 0 and 65534, that identifies the device to other BGP speakers. (Optional) Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] [route-map route-map-name] Step 4 Example: For exterior protocols, the network command controls which networks are advertised. Interior protocols use Device(config-router)# network 10.1.1.0 mask 255.255.255.0 the network command to determine where to send updates. (Optional) Configures a fixed 32-bit router ID as the identifier of the local device running BGP. bgp router-id ip-address Example: Step 5 Use the ip-address argument to specify a unique router ID within the network.Device(config-router)# bgp router-id 10.1.1.99 Configuring a router ID using the bgp router-id command resets all active BGP peering sessions. Note (Optional) Sets BGP network timers.timers bgp keepalive holdtimeStep 6 Example: Use the keepalive argument to specify the frequency, in seconds, with which the software sends keepalive Device(config-router)# timers bgp 70 120 messages to its BGP peer. By default, the keepalive timer is set to 60 seconds. Use the holdtime argument to specify the interval, in seconds, after which the software, having not received a keepalive message, declares a BGP peer dead. By default, the holdtime timer is set to 180 seconds. (Optional) Enables the automatic resetting of BGP sessions.bgp fast-external-falloverStep 7 Example: By default, the BGP sessions of any directly adjacent external peers are reset if the link used to reach them goes down.Device(config-router)# bgp fast-external-fallover (Optional) Enables logging of BGP neighbor status changes (up or down) and neighbor resets. bgp log-neighbor-changes Example: Step 8 Use this command for troubleshooting network connectivity problems and measuring networkDevice(config-router)# bgp log-neighbor-changes stability. Unexpected neighbor resets might indicate high error rates or high packet loss in the network and should be investigated. PurposeCommand or Action Exits router configuration mode and enters privileged EXEC mode. end Example: Step 9 Device(config-router)# end (Optional) Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 10 Example: Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Device# show ip bgp Examples The following sample output from the show ip bgp command shows the BGP routing table for Router A in the figure above after this task has been configured on Router A. You can see an entry for the network 10.1.1.0 that is local to this autonomous system. BGP table version is 12, local router ID is 10.1.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 0.0.0.0 0 32768 i Troubleshooting Tips Use the ping command to check basic network connectivity between the BGP routers. Configuring a BGP Peer Perform this task to configure BGP between two IPv4 devices (peers). The address family configured here is the default IPv4 unicast address family, and the configuration is done at Router A in the figure above. Remember to perform this task for any neighboring devices that are to be BGP peers. Before you begin Before you perform this task, perform the “Configuring a BGP Routing Process” task. By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes, neighbors must also be activated using the neighbor activate command in address family configuration mode for the other prefix types, such as IPv6 prefixes. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. address-family ipv4 [unicast |multicast | vrf vrf-name] 6. neighbor ip-address activate 7. end 8. show ip bgp [network] [network-mask] 9. show ip bgp neighbors [neighbor-address] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 40000 Adds the IP address of the neighbor in the specified autonomous system to the IPv4multiprotocol BGP neighbor table of the local device. neighbor ip-address remote-as autonomous-system-number Example: Step 4 Device(config-router)# neighbor 192.168.1.1 remote-as 45000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 5 The unicast keyword specifies the IPv4 unicast address family. By default, the device is placed in configurationDevice(config-router)# address-family ipv4 unicast mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the virtual routing and forwarding (VRF) instance to associate with subsequent IPv4 address family configuration mode commands. PurposeCommand or Action Enables the neighbor to exchange prefixes for the IPv4 unicast address family with the local device. neighbor ip-address activate Example: Step 6 Device(config-router-af)# neighbor 192.168.1.1 activate Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 7 Device(config-router-af)# end (Optional) Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 8 Example: Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Device# show ip bgp (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [neighbor-address] Example: Step 9 Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Device(config-router-af)# show ip bgp neighbors 192.168.2.2 Examples The following sample output from the show ip bgp command shows the BGP routing table for Router A in the figure above after this task has been configured on Router A and Router B. You can now see an entry for the network 172.17.1.0 in autonomous system 45000. BGP table version is 13, local router ID is 10.1.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 0.0.0.0 0 32768 i *> 172.17.1.0/24 192.168.1.1 0 0 45000 i The following sample output from the show ip bgp neighbors command shows information about the TCP and BGP connections to the BGP neighbor 192.168.1.1 of Router A in the figure above after this task has been configured on Router A: BGP neighbor is 192.168.1.1, remote AS 45000, external link BGP version 4, remote router ID 172.17.1.99 BGP state = Established, up for 00:06:55 Last read 00:00:15, last write 00:00:15, hold time is 120, keepalive intervals Configured hold time is 120,keepalive interval is 70 seconds, Minimum holdtims Neighbor capabilities: Route refresh: advertised and received (old & new) Address family IPv4 Unicast: advertised and received Message statistics: InQ depth is 0 OutQ depth is 0 Sent Rcvd Opens: 1 1 Notifications: 0 0 Updates: 1 2 Keepalives: 13 13 Route Refresh: 0 0 Total: 15 16 Default minimum time between advertisement runs is 30 seconds For address family: IPv4 Unicast BGP table version 13, neighbor version 13/0 Output queue size : 0 Index 1, Offset 0, Mask 0x2 1 update-group member Sent Rcvd Prefix activity: ---- ----Prefixes Current: 1 1 (Consumes 52 bytes) Prefixes Total: 1 1 Implicit Withdraw: 0 0 Explicit Withdraw: 0 0 Used as bestpath: n/a 1 Used as multipath: n/a 0 Outbound Inbound Local Policy Denied Prefixes: -------- -------AS_PATH loop: n/a 1 Bestpath from this peer: 1 n/a Total: 1 1 Number of NLRIs in the update sent: max 0, min 0 Connections established 1; dropped 0 Last reset never Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Connection is ECN Disabled Local host: 192.168.1.2, Local port: 179 Foreign host: 192.168.1.1, Foreign port: 37725 Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) Event Timers (current time is 0x12F4F2C): Timer Starts Wakeups Next Retrans 14 0 0x0 TimeWait 0 0 0x0 AckHold 13 8 0x0 SendWnd 0 0 0x0 KeepAlive 0 0 0x0 GiveUp 0 0 0x0 PmtuAger 0 0 0x0 DeadWait 0 0 0x0 iss: 165379618 snduna: 165379963 sndnxt: 165379963 sndwnd: 16040 irs: 3127821601 rcvnxt: 3127821993 rcvwnd: 15993 delrcvwnd: 391 SRTT: 254 ms, RTTO: 619 ms, RTV: 365 ms, KRTT: 0 ms minRTT: 12 ms, maxRTT: 300 ms, ACK hold: 200 ms Flags: passive open, nagle, gen tcbs IP Precedence value : 6 Datagrams (max data segment is 1460 bytes): Rcvd: 20 (out of order: 0), with data: 15, total data bytes: 391 Sent: 22 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 04 Troubleshooting Tips Use the ping command to verify basic network connectivity between the BGP devices. Configuring a BGP Peer for the IPv4 VRF Address Family Perform this optional task to configure BGP between two IPv4 devices (peers) that must exchange IPv4 VRF information because they exist in a VPN. The address family configured here is the IPv4 VRF address family, and the configuration is done at Router B in the figure below with the neighbor 192.168.3.2 at Router E in autonomous system 50000. Remember to perform this task for any neighboring devices that are to be BGP IPv4 VRF address family peers. Figure 7: BGP Topology for IPv4 VRF Address Family Before you begin Before you perform this task, perform the “Configuring a BGP Routing Process” task. SUMMARY STEPS 1. enable 2. configure terminal 3. interface type number 4. vrf forwarding vrf-name 5. ip address ip-address mask [secondary [vrf vrf-name]] 6. exit 7. ip vrf vrf-name 8. rd route-distinguisher 9. route-target {import | export | both} route-target-ext-community 10. exit 11. router bgp autonomous-system-number 12. address-family ipv4 [unicast |multicast | vrf vrf-name] 13. neighbor ip-address remote-as autonomous-system-number 14. neighbor {ip-address | peer-group-name}maximum-prefix maximum [threshold] [restart restart-interval] [warning-only] 15. neighbor ip-address activate 16. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters interface configuration mode.interface type number Example: Step 3 Associates a VPN VRF instance with an interface or subinterface. vrf forwarding vrf-name Example: Step 4 Device(config-if)# vrf forwarding vpn1 Sets an IP address for an interface.ip address ip-address mask [secondary [vrf vrf-name]] Example: Step 5 Device(config-if)# ip address 192.168.3.1 255.255.255.0 Exits interface configuration mode and enters global configuration mode. exit Example: Step 6 Device(config-if)# exit Configures a VRF routing table and enters VRF configuration mode. ip vrf vrf-name Example: Step 7 Use the vrf-name argument to specify a name to be assigned to the VRF.Device(config)# ip vrf vpn1 Creates routing and forwarding tables and specifies the default route distinguisher for a VPN. rd route-distinguisher Example: Step 8 Use the route-distinguisher argument to add an 8-byte value to an IPv4 prefix to create a unique VPN IPv4 prefix. Device(config-vrf)# rd 45000:5 Creates a route target extended community for a VRF.route-target {import | export | both} route-target-ext-community Step 9 Use the import keyword to import routing information from the target VPN extended community. Example: Device(config-vrf)# route-target both 45000:100 PurposeCommand or Action Use the export keyword to export routing information to the target VPN extended community. Use the both keyword to import both import and export routing information to the target VPN extended community. Use the route-target-ext-community argument to add the route target extended community attributes to the VRF's list of import, export, or both (import and export) route target extended communities. Exits VRF configuration mode and enters global configuration mode. exit Example: Step 10 Device(config-vrf)# exit Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 11 Device(config)# router bgp 45000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 12 Use the unicast keyword to specify the IPv4 unicast address family. By default, the device is placed inDevice(config-router)# address-family ipv4 vrf vpn1 configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Use themulticast keyword to specify IPv4 multicast address prefixes. Use the vrf keyword and vrf-name argument to specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Adds the IP address of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor ip-address remote-as autonomous-system-number Example: Step 13 Device(config-router-af)# neighbor 192.168.3.2 remote-as 50000 Controls how many prefixes can be received from a neighbor. neighbor {ip-address | peer-group-name} maximum-prefix maximum [threshold] [restart restart-interval] [warning-only] Step 14 Use themaximum argument to specify the maximum number of prefixes allowed from the specifiedExample: PurposeCommand or Action Device(config-router-af)# neighbor 192.168.3.2 maximum-prefix 10000 warning-only neighbor. The number of prefixes that can be configured is limited only by the available system resources on a device. Use the threshold argument to specify an integer representing a percentage of the maximum prefix limit at which the device starts to generate a warning message. Use the warning-only keyword to allow the device to generate a log message when the maximum prefix limit is exceeded, instead of terminating the peering session. Enables the neighbor to exchange prefixes for the IPv4 VRF address family with the local device. neighbor ip-address activate Example: Step 15 Device(config-router-af)# neighbor 192.168.3.2 activate Exits address family configuration mode and enters privileged EXEC mode. end Example: Step 16 Device(config-router-af)# end Troubleshooting Tips Use the ping vrf command to verify basic network connectivity between the BGP devices, and use the show ip vrf command to verify that the VRF instance has been created. Customizing a BGP Peer Perform this task to customize your BGP peers. Although many of the steps in this task are optional, this task demonstrates how the neighbor and address family configuration command relationships work. Using the example of the IPv4multicast address family, neighbor address family-independent commands are configured before the IPv4 multicast address family is configured. Commands that are address family-dependent are then configured and the exit address-family command is shown. An optional step shows how to disable a neighbor. The configuration in this task is done at Router B in the figure below and would need to be repeated with appropriate changes to the IP addresses, for example, at Router E to fully configure a BGP process between the two devices. Figure 8: BGP Peer Topology By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes, neighbors must also be activated using the neighbor activate command in address family configuration mode for the other prefix types, such as IPv6 prefixes. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. no bgp default ipv4-unicast 5. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 6. neighbor {ip-address | peer-group-name} description text 7. address-family ipv4 [unicast |multicast | vrf vrf-name] 8. network network-number [mask network-mask] [route-map route-map-name] 9. neighbor {ip-address | peer-group-name} activate 10. neighbor {ip-address | peer-group-name} advertisement-interval seconds 11. neighbor {ip-address | peer-group-name} default-originate [route-map map-name] 12. exit-address-family 13. neighbor {ip-address | peer-group-name} shutdown 14. end 15. show ip bgp ipv4 multicast [command] 16. show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | paths regexp | dampened-routes | received prefix-filter] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Disables the IPv4 unicast address family for the BGP routing process. no bgp default ipv4-unicast Example: Step 4 Routing information for the IPv4 unicast address family is advertised by default for each BGP routing session configured with the neighbor remote-as router configuration command unless you configure the no bgp default ipv4-unicast router configuration command before configuring the neighbor remote-as command. Existing neighbor configurations are not affected. Note Device(config-router)# no bgp default ipv4-unicast Adds the IP address of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 5 Device(config-router)# neighbor 192.168.3.2 remote-as 50000 (Optional) Associates a text description with the specified neighbor. neighbor {ip-address | peer-group-name} description text Example: Step 6 Device(config-router)# neighbor 192.168.3.2 description finance Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 7 The unicast keyword specifies the IPv4 unicast address family. By default, the device is placed inDevice(config-router)# address-family ipv4 multicast configuration mode for the IPv4 unicast address PurposeCommand or Action family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. (Optional) Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] [route-map route-map-name] Step 8 Example: For exterior protocols the network command controls which networks are advertised. Interior protocols use Device(config-router-af)# network 172.17.1.0 mask 255.255.255.0 the network command to determine where to send updates. Enables the exchange of information with a BGP neighbor.neighbor {ip-address | peer-group-name} activate Example: Step 9 Device(config-router-af)# neighbor 192.168.3.2 activate (Optional) Sets the minimum interval between the sending of BGP routing updates. neighbor {ip-address | peer-group-name} advertisement-interval seconds Example: Step 10 Device(config-router-af)# neighbor 192.168.3.2 advertisement-interval 25 (Optional) Permits a BGP speaker--the local device--to send the default route 0.0.0.0 to a peer for use as a default route. neighbor {ip-address | peer-group-name} default-originate [route-map map-name] Example: Step 11 Device(config-router-af)# neighbor 192.168.3.2 default-originate Exits address family configuration mode and enters router configuration mode. exit-address-family Example: Step 12 Device(config-router-af)# exit-address-family (Optional) Disables a BGP peer or peer group.neighbor {ip-address | peer-group-name} shutdownStep 13 Example: If you perform this step you will not be able to run either of the subsequent show command steps because you have disabled the neighbor. Note Device(config-router)# neighbor 192.168.3.2 shutdown PurposeCommand or Action Exits router configuration mode and enters privileged EXEC mode. end Example: Step 14 Device(config-router)# end (Optional) Displays IPv4 multicast database-related information. show ip bgp ipv4 multicast [command] Example: Step 15 Use the command argument to specify any multiprotocol BGP command that is supported. ToDevice# show ip bgp ipv4 multicast see the supported commands, use the ? prompt on the CLI. (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | paths regexp | dampened-routes | received prefix-filter] Step 16 Example: Device# show ip bgp neighbors 192.168.3.2 Examples The following sample output from the show ip bgp ipv4 multicast command shows BGP IPv4 multicast information for Router B in the figure above after this task has been configured on Router B and Router E. Note that the networks local to each device that were configured under IPv4multicast address family appear in the output table. BGP table version is 3, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.2.2.0/24 192.168.3.2 0 0 50000 i *> 172.17.1.0/24 0.0.0.0 0 32768 i The following partial sample output from the show ip bgp neighbors command for neighbor 192.168.3.2 shows general BGP information and specific BGP IPv4 multicast address family information about the neighbor. The command was entered on Router B in the figure above after this task had been configured on Router B and Router E. BGP neighbor is 192.168.3.2, remote AS 50000, external link Description: finance BGP version 4, remote router ID 10.2.2.99 BGP state = Established, up for 01:48:27 Last read 00:00:26, last write 00:00:26, hold time is 120, keepalive intervals Configured hold time is 120,keepalive interval is 70 seconds, Minimum holdtims Neighbor capabilities: Route refresh: advertised and received (old & new) Address family IPv4 Unicast: advertised Address family IPv4 Multicast: advertised and received ! For address family: IPv4 Multicast BGP table version 3, neighbor version 3/0 Output queue size : 0 Index 1, Offset 0, Mask 0x2 1 update-group member Uses NEXT_HOP attribute for MBGP NLRIs Sent Rcvd Prefix activity: ---- ----Prefixes Current: 1 1 (Consumes 48 bytes) Prefixes Total: 1 1 Implicit Withdraw: 0 0 Explicit Withdraw: 0 0 Used as bestpath: n/a 1 Used as multipath: n/a 0 Outbound Inbound Local Policy Denied Prefixes: -------- ------- Bestpath from this peer: 1 n/a Total: 1 0 Number of NLRIs in the update sent: max 0, min 0 Minimum time between advertisement runs is 25 seconds Connections established 8; dropped 7 Last reset 01:48:54, due to User reset Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Connection is ECN Disabled Local host: 192.168.3.1, Local port: 13172 Foreign host: 192.168.3.2, Foreign port: 179 ! Removing BGP Configuration Commands Using a Redistribution BGP CLI configuration can become quite complex even in smaller BGP networks. If you need to remove any CLI configuration, you must consider all the implications of removing the CLI. Analyze the current running configuration to determine the current BGP neighbor relationships, any address family considerations, and even other routing protocols that are configured. Many BGP CLI commands affect other parts of the CLI configuration. Perform this task to remove all the BGP configuration commands used in a redistribution of BGP routes into EIGRP. A route map can be used to match and set parameters or to filter the redistributed routes to ensure that routing loops are not created when these routes are subsequently advertised by EIGRP. When removing BGP configuration commands you must remember to remove or disable all the related commands. In this example, if the route-map command is omitted, then the redistribution will still occur and possibly with unexpected results as the route map filtering has been removed. Omitting just the redistribute command wouldmean that the route map is not applied, but it would leave unused commands in the running configuration. For more details on BGP CLI removal, see the “BGP CLI Removal Considerations” concept in the “Cisco BGP Overview” module. To view the redistribution configuration before and after the CLI removal, see the “Examples: Removing BGP Configuration Commands Using a Redistribution Example” section. SUMMARY STEPS 1. enable 2. configure terminal 3. no route-map map-name 4. router eigrp autonomous-system-number 5. no redistribute protocol [as-number] 6. end 7. show running-config DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Removes a route map from the running configuration.no route-map map-nameStep 3 Example: In this example, a route map named bgp-to-eigrp is removed from the configuration. Device(config)# no route-map bgp-to-eigrp Enters router configuration mode for the specified routing process. router eigrp autonomous-system-number Example: Step 4 Device(config)# router eigrp 100 Disables the redistribution of routes from one routing domain into another routing domain. no redistribute protocol [as-number] Example: Step 5 In this example, the configuration of the redistribution of BGP routes into the EIGRP routing process is removed from the running configuration. Device(config-router)# no redistribute bgp 45000 If a route map was included in the original redistribute command configuration, remember to remove the route-map command configuration as in Step 3 in this example task. Note Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Exits router configurationmode and enters privileged EXEC mode. end Example: Step 6 Device(config-router)# end (Optional) Displays the current running configuration on the router. show running-config Example: Step 7 PurposeCommand or Action Device# show running-config Use this command to verify that the redistribute and route-map commands are removed from the router configuration. Monitoring and Maintaining Basic BGP The tasks in this section are concerned with the resetting and display of information about basic BGP processes and peer relationships. Once you have defined two devices to be BGP neighbors, they will form a BGP connection and exchange routing information. If you subsequently change a BGP filter, weight, distance, version, or timer, or make a similar configuration change, you may have to reset BGP connections for the configuration change to take effect. Configuring Inbound Soft Reconfiguration When Route Refresh Capability Is Missing Perform this task to configure inbound soft reconfiguration using the bgp soft-reconfig-backup command for BGP peers that do not support the route refresh capability. BGP peers that support the route refresh capability are unaffected by the configuration of this command. Note that the memory requirements for storing the inbound update information can become quite large. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. bgp log-neighbor-changes 5. bgp soft-reconfig-backup 6. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 7. neighbor {ip-address | peer-group-name} soft-reconfiguration [inbound] 8. neighbor {ip-address | peer-group-name} route-map map-name {in | out} 9. Repeat Steps 6 through 8 for every peer that is to be configured with inbound soft reconfiguration. 10. exit 11. route-map map-name [permit | deny] [sequence-number] 12. set ip next-hop ip-address 13. end 14. show ip bgp neighbors [neighbor-address] 15. show ip bgp [network] [network-mask] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable PurposeCommand or Action Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Enables logging of BGP neighbor resets.bgp log-neighbor-changes Example: Step 4 Device(config-router)# bgp log-neighbor-changes Configures a BGP speaker to perform inbound soft reconfiguration for peers that do not support the route refresh capability. bgp soft-reconfig-backup Example: Device(config-router)# bgp soft-reconfig-backup Step 5 This command is used to configure BGP to perform inbound soft reconfiguration for peers that do not support the route refresh capability. The configuration of this command allows you to configure BGP to store updates (soft reconfiguration) only as necessary. Peers that support the route refresh capability are unaffected by the configuration of this command. Adds the IP address of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 6 Device(config-router)# neighbor 192.168.1.2 remote-as 40000 Configures the Cisco software to start storing updates.neighbor {ip-address | peer-group-name} soft-reconfiguration [inbound] Step 7 All the updates received from this neighbor will be stored unmodified, regardless of the inbound policy.Example: When inbound soft reconfiguration is done later, the Device(config-router)# neighbor 192.168.1.2 soft-reconfiguration inbound stored information will be used to generate a new set of inbound updates. Applies a route map to incoming or outgoing routes.neighbor {ip-address | peer-group-name} route-map map-name {in | out} Step 8 In this example, the route map named LOCAL will be applied to incoming routes.Example: Device(config-router)# neighbor 192.168.1.2 route-map LOCAL in PurposeCommand or Action —Repeat Steps 6 through 8 for every peer that is to be configured with inbound soft reconfiguration. Step 9 Exits router configuration mode and enters global configuration mode. exit Example: Step 10 Device(config-router)# exit Configures a route map and enters route-map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 11 Example: In this example, a route map named LOCAL is created. Device(config)# route-map LOCAL permit 10 Specifies where output packets that pass a match clause of a route map for policy routing. set ip next-hop ip-address Example: Step 12 In this example, the ip address is set to 192.168.1.144. Device(config-route-map)# set ip next-hop 192.168.1.144 Exits route-map configuration mode and enters privileged EXEC mode. end Example: Step 13 Device(config-route-map)# end (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [neighbor-address] Example: Step 14 Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Device# show ip bgp neighbors 192.168.1.2 (Optional) Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 15 Example: Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Device# show ip bgp Examples The following partial output from the show ip bgp neighbors command shows information about the TCP and BGP connections to the BGP neighbor 192.168.2.1. This peer supports route refresh. BGP neighbor is 192.168.1.2, remote AS 40000, external link Neighbor capabilities: Route refresh: advertised and received(new) The following partial output from the show ip bgp neighbors command shows information about the TCP and BGP connections to the BGP neighbor 192.168.3.2. This peer does not support route refresh so the soft-reconfig inbound paths for BGP peer 192.168.3.2 will be stored because there is no other way to update any inbound policy updates. BGP neighbor is 192.168.3.2, remote AS 50000, external link Neighbor capabilities: Route refresh: advertised The following sample output from the show ip bgp command shows the entry for the network 172.17.1.0. Both BGP peers are advertising 172.17.1.0/24, but only the received-only path is stored for 192.168.3.2. BGP routing table entry for 172.17.1.0/24, version 11 Paths: (3 available, best #3, table Default-IP-Routing-Table, RIB-failure(4)) Flag: 0x820 Advertised to update-groups: 1 50000 192.168.3.2 from 192.168.3.2 (172.17.1.0) Origin incomplete, metric 0, localpref 200, valid, external 50000, (received-only) 192.168.3.2 from 192.168.3.2 (172.17.1.0) Origin incomplete, metric 0, localpref 100, valid, external 40000 192.168.1.2 from 192.168.1.2 (172.16.1.0) Origin incomplete, metric 0, localpref 200, valid, external, best Resetting and Displaying Basic BGP Information Perform this task to reset and display information about basic BGP processes and peer relationships. SUMMARY STEPS 1. enable 2. clear ip bgp {* | autonomous-system-number | neighbor-address} [soft [in | out] ] 3. show ip bgp [network-address] [network-mask] [longer-prefixes] [prefix-list prefix-list-name | route-map route-map-name] [shorter prefixes mask-length] 4. show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | paths regexp | dampened-routes | received prefix-filter] 5. show ip bgp paths 6. show ip bgp summary DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Clears and resets BGP neighbor sessions:clear ip bgp {* | autonomous-system-number | neighbor-address} [soft [in | out] ] Step 2 In the example provided, all BGP neighbor sessions are cleared and reset.Example: PurposeCommand or Action Device# clear ip bgp * Displays all the entries in the BGP routing table:show ip bgp [network-address] [network-mask] [longer-prefixes] [prefix-list prefix-list-name | route-map route-map-name] [shorter prefixes mask-length] Step 3 In the example provided, the BGP routing table information for the 10.1.1.0 network is displayed. Example: Device# show ip bgp 10.1.1.0 255.255.255.0 Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | paths regexp | dampened-routes | received prefix-filter] Step 4 In the example provided, the routes advertised from the device to BGP neighbor 192.168.3.2 on another device are displayed. Example: Device# show ip bgp neighbors 192.168.3.2 advertised-routes Displays information about all the BGP paths in the database. show ip bgp paths Example: Step 5 Device# show ip bgp paths Displays information about the status of all BGP connections. show ip bgp summary Example: Step 6 Device# show ip bgp summary Aggregating Route Prefixes Using BGP BGP peers exchange information about local networks, but this can quickly lead to large BGP routing tables. CIDR enables the creation of aggregate routes (or supernets) to minimize the size of routing tables. Smaller BGP routing tables can reduce the convergence time of the network and improve network performance. Aggregated routes can be configured and advertised using BGP. Some aggregations advertise only summary routes and other methods of aggregating routes allow more specific routes to be forwarded. Aggregation applies only to routes that exist in the BGP routing table. An aggregated route is forwarded if at least one more specific route of the aggregation exists in the BGP routing table. Perform one of the following tasks to aggregate routes within BGP: Redistributing a Static Aggregate Route into BGP Use this task to redistribute a static aggregate route into BPG. A static aggregate route is configured and then redistributed into the BGP routing table. The static route must be configured to point to interface null 0 and the prefix should be a superset of known BGP routes. When a device receives a BGP packet, it will use the more specific BGP routes. If the route is not found in the BGP routing table, then the packet will be forwarded to null 0 and discarded. SUMMARY STEPS 1. enable 2. configure terminal 3. ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name] [permanent | track number] [tag tag] 4. router bgp autonomous-system-number 5. redistribute static 6. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Creates a static route.ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name] [permanent | track number] [tag tag] Step 3 Example: Device(config)# ip route 172.0.0.0 255.0.0.0 null 0 Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 4 Device(config)# router bgp 45000 Redistributes routes into the BGP routing table.redistribute static Example: Step 5 Device(config-router)# redistribute static Exits router configuration mode and returns to privileged EXEC mode. end Example: Step 6 Device(config-router)# end Configuring Conditional Aggregate Routes Using BGP Use this task to create an aggregate route entry in the BGP routing table when at least one specific route falls into the specified range. The aggregate route is advertised as originating from your autonomous system. For more information, see the “BGP Route Aggregation Generating AS_SET Information” section. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. aggregate-address address mask [as-set] 5. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Creates an aggregate entry in a BGP routing table.aggregate-address address mask [as-set]Step 4 Example: A specified route must exist in the BGP table. Device(config-router)# aggregate-address 172.0.0.0 255.0.0.0 as-set Use the aggregate-address command with no keywords to create an aggregate entry if any more-specific BGP routes are available that fall in the specified range. Use the as-set keyword to specify that the path advertised for this route is an AS_SET. Do not use the as-set keyword when aggregating many paths because this route is withdrawn and updated every time the reachability information for the aggregated route changes. Only partial syntax is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note PurposeCommand or Action Exits router configurationmode and enters privileged EXEC mode. end Example: Step 5 Device(config-router)# end Suppressing and Unsuppressing the Advertisement of Aggregated Routes Using BGP Use this task to create an aggregate route, suppress the advertisement of routes using BGP, and subsequently unsuppress the advertisement of routes. Routes that are suppressed are not advertised to any neighbors, but it is possible to unsuppress routes that were previously suppressed to specific neighbors. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. Do one of the following: aggregate-address address mask [summary-only] aggregate-address address mask [suppress-map map-name] 6. neighbor {ip-address | peer-group-name} unsuppress-map map-name 7. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Adds the IP address of the neighbor in the specified autonomous system to the IPv4multiprotocol BGP neighbor table of the local device. neighbor ip-address remote-as autonomous-system-number Example: Step 4 PurposeCommand or Action Device(config-router)# neighbor 192.168.1.2 remote-as 40000 Creates an aggregate route.Do one of the following:Step 5 aggregate-address address mask [summary-only] Use the optional summary-only keyword to create the aggregate route (for example, 10.*.*.*) and also• aggregate-address address mask [suppress-map map-name] suppresses advertisements of more-specific routes to all neighbors. Example: Use the optional suppress-map keyword to create the aggregate route but suppress advertisement of specifiedDevice(config-router)# aggregate-address 172.0.0.0 255.0.0.0 summary-only routes. Routes that are suppressed are not advertised to any neighbors. You can use thematch clauses ofExample: route maps to selectively suppress somemore-specific Device(config-router)# aggregate-address 172.0.0.0 255.0.0.0 suppress-map map1 routes of the aggregate and leave others unsuppressed. IP access lists and autonomous system path access lists match clauses are supported. Only partial syntax is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note (Optional) Selectively advertises routes previously suppressed by the aggregate-address command. neighbor {ip-address | peer-group-name} unsuppress-map map-name Step 6 Example: In this example, the routes previously suppressed in Step 5 are advertised to neighbor 192.168.1.2. Device(config-router)# neighbor 192.168.1.2 unsuppress map1 Exits router configurationmode and enters privileged EXEC mode. end Example: Step 7 Device(config-router)# end Conditionally Advertising BGP Routes Perform this task to conditionally advertise selected BGP routes. The routes or prefixes that will be conditionally advertised are defined in two route maps: an advertise map and either an exist map or nonexist map. The route map associated with the exist map or nonexist map specifies the prefix that the BGP speaker will track. The route map associated with the advertise map specifies the prefix that will be advertised to the specified neighbor when the condition is met. If a prefix is found to be present in the exist map by the BGP speaker, the prefix specified by the advertise map is advertised. If a prefix is found not to be present in the nonexist map by the BGP speaker, the prefix specified by the advertise map is advertised. If the condition is not met, the route is withdrawn and conditional advertisement does not occur. All routes that may be dynamically advertised or not advertisedmust exist in the BGP routing table in order for conditional advertisement to occur. These routes are referenced from an access list or an IP prefix list. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. neighbor ip-address advertise-map map-name {exist-mapmap-name | non-exist-mapmap-name} 6. exit 7. route-map map-tag [permit | deny] [sequence-number] 8. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} 9. exit 10. route-map map-tag [permit | deny] [sequence-number] 11. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} 12. exit 13. access-list access-list-number {deny | permit} source [source-wildcard] [log] 14. access-list access-list-number {deny | permit} source [source-wildcard] [log] 15. exit DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Adds the IP address of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 Device(config-router)# neighbor 192.168.1.2 remote-as 40000 PurposeCommand or Action Adds the IP address of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor ip-address advertise-map map-name {exist-map map-name | non-exist-map map-name} Example: Step 5 In this example, the prefix (172.17.0.0) matching the ACL in the advertise map (the route map namedDevice(config-router)# neighbor 192.168.1.2 advertise-map map1 exist-map map2 map1) will be advertised to the neighbor only when a prefix (192.168.50.0) matching the ACL in exist map (the route-map namedmap2) is in the local BGP table. Exits router configuration mode and enters global configuration mode. exit Example: Step 6 Device(config-router)# exit Configures a route map and enters route map configuration mode. route-map map-tag [permit | deny] [sequence-number] Example: Step 7 In this example, a route map named map1 is created. Device(config)# route-map map1 permit 10 Configures the route map tomatch a prefix that is permitted by a standard access list, an extended access list, or a prefix list. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} Step 8 In this example, the route map is configured to match a prefix permitted by access list 1.Example: Device(config-route-map)# match ip address 1 Exits route map configuration mode and enters global configuration mode. exit Example: Step 9 Device(config-route-map)# exit Configures a route map and enters route map configuration mode. route-map map-tag [permit | deny] [sequence-number] Example: Step 10 In this example, a route map named map2 is created. Device(config)# route-map map2 permit 10 Configures the route map tomatch a prefix that is permitted by a standard access list, an extended access list, or a prefix list. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} Step 11 In this example, the route map is configured to match a prefix permitted by access list 2.Example: Device(config-route-map)# match ip address 2 PurposeCommand or Action Exits route map configuration mode and enters global configuration mode. exit Example: Step 12 Device(config-route-map)# exit Configures a standard access list.access-list access-list-number {deny | permit} source [source-wildcard] [log] Step 13 In this example, access list 1 permits advertising of the 172.17.0.0 prefix, depending on other conditions set by the neighbor advertise-map command. Example: Device(config)# access-list 1 permit 172.17.0.0 Configures a standard access list.access-list access-list-number {deny | permit} source [source-wildcard] [log] Step 14 In this example, access list 2 permits the 192.168.50.0 to be the prefix of the exist-map.Example: Device(config)# access-list 2 permit 192.168.50.0 Exits global configuration mode and returns to privileged EXEC mode. exit Example: Step 15 Device(config)# exit Originating BGP Routes Route aggregation is useful to minimize the size of the BGP table, but there are situations when you want to add more specific prefixes to the BGP table. Route aggregation can hide more specific routes. Using the network command as shown in the “Configuring a BGP Routing Process” section originates routes, and the following optional tasks originate BGP routes for the BGP table for different situations. Advertising a Default Route Using BGP Perform this task to advertise a default route to BGP peers. The default route is locally originated. A default route can be useful to simplify configuration or to prevent the device from using too many system resources. If the device is peered with an Internet service provider (ISP), the ISP will carry full routing tables, so configuring a default route into the ISP network saves resources at the local device. SUMMARY STEPS 1. enable 2. configure terminal 3. ip prefix-list list-name [seq seq-value] {deny network / length | permit network / length} [ge ge-value] [le le-value] 4. route-map map-tag [permit | deny] [sequence-number] 5. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} 6. exit 7. router bgp autonomous-system-number 8. neighbor {ip-address | peer-group-name} default-originate [route-map map-name] 9. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Configures an IP prefix list.ip prefix-list list-name [seq seq-value] {deny network / length | permit network / length} [ge ge-value] [le le-value] Step 3 In this example, prefix list DEFAULT permits advertising of the 10.1.1.0/24. prefix depending on a match set by thematch ip address command. Example: Device(config)# ip prefix-list DEFAULT permit 10.1.1.0/24 Configures a route map and enters route map configuration mode. route-map map-tag [permit | deny] [sequence-number] Example: Step 4 In this example, a route map named ROUTE is created. Device(config)# route-map ROUTE Configures the route map to match a prefix that is permitted by a standard access list, an extended access list, or a prefix list. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} Step 5 In this example, the route map is configured to match a prefix permitted by prefix list DEFAULT.Example: Device(config-route-map)# match ip address prefix-list DEFAULT Exits route map configuration mode and enters global configuration mode. exit Example: Step 6 Device(config-route-map)# exit Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 7 Device(config)# router bgp 40000 PurposeCommand or Action (Optional) Permits a BGP speaker--the local device--to send the default route 0.0.0.0 to a peer for use as a default route. neighbor {ip-address | peer-group-name} default-originate [route-map map-name] Example: Step 8 Device(config-router)# neighbor 192.168.3.2 default-originate Exits router configurationmode and enters privileged EXEC mode. end Example: Step 9 Device(config-router)# end Originating BGP Routes Using Backdoor Routes Use this task to indicate to border devices which networks are reachable using a backdoor route. A backdoor network is treated the same as a local network, except that it is not advertised. For more information, see the BGP Backdoor Routes section. Before you begin This task assumes that the IGP (EIGRP, in this example) is already configured for the BGP peers. The configuration is done at Router B in the in the “BGP Backdoor Routes” section, and the BGP peer is Router D. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. network ip-address backdoor 6. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal PurposeCommand or Action Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Adds the IP address of the neighbor in the specified autonomous system to the multiprotocol BGP neighbor table of the local device. neighbor ip-address remote-as autonomous-system-number Example: Step 4 In this example, the peer is an internal peer as the autonomous system number specified for the peer is the same number specified in Step 3. Device(config-router)# neighbor 172.22.1.2 remote-as 45000 Indicates a network that is reachable through a backdoor route. network ip-address backdoor Example: Step 5 Device(config-router)# network 172.21.1.0 backdoor Exits router configuration mode and returns to privileged EXEC mode. end Example: Step 6 Device(config-router)# end Configuring a BGP Peer Group This task explains how to configure a BGP peer group. Often, in a BGP speaker, many neighbors are configured with the same update policies (that is, the same outbound route maps, distribute lists, filter lists, update source, and so on). Neighbors with the same update policies can be grouped into peer groups to simplify configuration and, more importantly, to make updating more efficient. When you have many peers, this approach is highly recommended. The three steps to configure a BGP peer group, described in the following task, are as follows: Creating the peer group Assigning options to the peer group Making neighbors members of the peer group You can disable a BGP peer or peer group without removing all the configuration information using the neighbor shutdown router configuration command. By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes, neighbors must also be activated using the neighbor activate command in address family configuration mode for the other prefix types. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor peer-group-name peer-group 5. neighbor ip-address remote-as autonomous-system-number 6. neighbor ip-address peer-group peer-group-name 7. address-family ipv4 [unicast |multicast | vrf vrf-name] 8. neighbor peer-group-name activate 9. neighbor ip-address peer-group peer-group-name 10. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 40000 Creates a BGP peer group.neighbor peer-group-name peer-group Example: Step 4 Device(config-router)# neighbor fingroup peer-group Adds the IP address of the neighbor in the specified autonomous system to the multiprotocol BGP neighbor table of the local device. neighbor ip-address remote-as autonomous-system-number Example: Step 5 Device(config-router)# neighbor 192.168.1.1 remote-as 45000 Assigns the IP address of a BGP neighbor to a peer group.neighbor ip-address peer-group peer-group-name Example: Step 6 Device(config-router)# neighbor 192.168.1.1 peer-group fingroup PurposeCommand or Action Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 7 The unicast keyword specifies the IPv4 unicast address family. This is the default.Device(config-router)# address-family ipv4 multicast Themulticast keyword specifies that IPv4 multicast address prefixes will be exchanged. The vrf keyword and vrf-name argument specify that IPv4 VRF instance information will be exchanged. Enables the neighbor to exchange prefixes for the IPv4 address family with the local device. neighbor peer-group-name activate Example: Step 8 By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only unicast address prefixes. To allow BGP to exchange other address prefix types, such as multicast that is configured in this example, neighbors must also be activated using the neighbor activate command. Note Device(config-router-af)# neighbor fingroup activate Assigns the IP address of a BGP neighbor to a peer group.neighbor ip-address peer-group peer-group-name Example: Step 9 Device(config-router-af)# neighbor 192.168.1.1 peer-group fingroup Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 10 Device(config-router-af)# end Configuration Examples for BGP 4 Example: Configuring a BGP Process and Customizing Peers The following example shows the configuration for Router B in the above (in the “Customizing a BGP Peer” section) with a BGP process configured with two neighbor peers (at Router A and at Router E) in separate autonomous systems. IPv4 unicast routes are exchangedwith both peers and IPv4multicast routes are exchanged with the BGP peer at Router E. Router B router bgp 45000 bgp router-id 172.17.1.99 no bgp default ipv4-unicast bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.3.2 remote-as 50000 neighbor 192.168.3.2 description finance ! address-family ipv4 neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family ! address-family ipv4 multicast neighbor 192.168.3.2 activate neighbor 192.168.3.2 advertisement-interval 25 no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family Examples: Removing BGP Configuration Commands Using a Redistribution Example The following examples show first the CLI configuration to enable the redistribution of BGP routes into EIGRP using a route map and then the CLI configuration to remove the redistribution and route map. Some BGP configuration commands can affect other CLI commands and this example demonstrates how the removal of one command affects another command. In the first configuration example, a route map is configured to match and set autonomous system numbers. BGP neighbors in three different autonomous systems are configured and activated. An EIGRP routing process is started, and the redistribution of BGP routes into EIGRP using the route map is configured. CLI to Enable BGP Route Redistribution Into EIGRP route-map bgp-to-eigrp permit 10 match tag 50000 set tag 65000 exit router bgp 45000 bgp log-neighbor-changes address-family ipv4 neighbor 172.16.1.2 remote-as 45000 neighbor 172.21.1.2 remote-as 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.3.2 remote-as 50000 neighbor 172.16.1.2 activate neighbor 172.21.1.2 activate neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate network 172.17.1.0 mask 255.255.255.0 exit-address-family exit router eigrp 100 redistribute bgp 45000 metric 10000 100 255 1 1500 route-map bgp-to-eigrp no auto-summary exit In the second configuration example, both the route-map command and the redistribute command are disabled. If only the route-map command is removed, it does not automatically disable the redistribution. The redistribution will now occur without any matching or filtering. To remove the redistribution configuration, the redistribute command must also be disabled. CLI to Remove BGP Route Redistribution Into EIGRP configure terminal no route-map bgp-to-eigrp router eigrp 100 no redistribute bgp 45000 end Examples: BGP Soft Reset The following examples show two ways to reset the connection for BGP peer 192.168.1.1. Example: Dynamic Inbound Soft Reset The following example shows the command used to initiate a dynamic soft reconfiguration in the BGP peer 192.168.1.1. This command requires that the peer support the route refresh capability. clear ip bgp 192.168.1.1 soft in Example: Inbound Soft Reset Using Stored Information The following example shows how to enable inbound soft reconfiguration for the neighbor 192.168.1.1. All the updates received from this neighbor will be stored unmodified, regardless of the inbound policy. When inbound soft reconfiguration is performed later, the stored information will be used to generate a new set of inbound updates. router bgp 100 neighbor 192.168.1.1 remote-as 200 neighbor 192.168.1.1 soft-reconfiguration inbound The following example clears the session with the neighbor 192.168.1.1: clear ip bgp 192.168.1.1 soft in Example: Resetting and Displaying Basic BGP Information The following example shows how to reset and display basic BGP information. The clear ip bgp * command clears and resets all the BGP neighbor sessions. Specific neighbors or all peers in an autonomous system can be cleared by using the neighbor-address and autonomous-system-number arguments. If no argument is specified, this command will clear and reset all BGP neighbor sessions. The clear ip bgp * command also clears all the internal BGP structures, which makes it useful as a troubleshooting tool. Note Device# clear ip bgp * The show ip bgp command is used to display all the entries in the BGP routing table. The following example displays BGP routing table information for the 10.1.1.0 network: Device# show ip bgp 10.1.1.0 255.255.255.0 BGP routing table entry for 10.1.1.0/24, version 2 Paths: (1 available, best #1, table Default-IP-Routing-Table) Advertised to update-groups: 1 40000 192.168.1.2 from 192.168.1.2 (10.1.1.99) Origin IGP, metric 0, localpref 100, valid, external, best The show ip bgp neighbors command is used to display information about the TCP and BGP connections to neighbors. The following example displays the routes that were advertised from Router B in the figure above (in the “Configuring a BGP Peer for the IPv4 VRF Address Family” section) to its BGP neighbor 192.168.3.2 on Router E: Device# show ip bgp neighbors 192.168.3.2 advertised-routes BGP table version is 3, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 192.168.1.2 0 0 40000 i *> 172.17.1.0/24 0.0.0.0 0 32768 i Total number of prefixes 2 The show ip bgp paths command is used to display all the BGP paths in the database. The following example displays BGP path information for Router B in the figure above (in the “Customizing a BGP Peer” section): Device# show ip bgp paths Address Hash Refcount Metric Path 0x2FB5DB0 0 5 0 i 0x2FB5C90 1 4 0 i 0x2FB5C00 1361 2 0 50000 i 0x2FB5D20 2625 2 0 40000 i The show ip bgp summary command is used to display the status of all BGP connections. The following example displays BGP routing table information for Router B in the figure above (in the “Customizing a BGP Peer” section): Device# show ip bgp summary BGP router identifier 172.17.1.99, local AS number 45000 BGP table version is 3, main routing table version 3 2 network entries using 234 bytes of memory 2 path entries using 104 bytes of memory 4/2 BGP path/bestpath attribute entries using 496 bytes of memory 2 BGP AS-PATH entries using 48 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 882 total bytes of memory BGP activity 14/10 prefixes, 16/12 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.1.2 4 40000 667 672 3 0 0 00:03:49 1 192.168.3.2 4 50000 468 467 0 0 0 00:03:49 (NoNeg) Examples: Aggregating Prefixes Using BGP The following examples show how you can use aggregate routes in BGP either by redistributing an aggregate route into BGP or by using the BGP conditional aggregation routing feature. In the following example, the redistribute static router configuration command is used to redistribute aggregate route 10.0.0.0: ip route 10.0.0.0 255.0.0.0 null 0 ! router bgp 100 redistribute static The following configuration shows how to create an aggregate entry in the BGP routing table when at least one specific route falls into the specified range. The aggregate route will be advertised as coming from your autonomous system and has the atomic aggregate attribute set to show that information might be missing. (By default, atomic aggregate is set unless you use the as-set keyword in the aggregate-address router configuration command.) router bgp 100 aggregate-address 10.0.0.0 255.0.0.0 The following example shows how to create an aggregate entry using the same rules as in the previous example, but the path advertised for this route will be an AS_SET consisting of all elements contained in all paths that are being summarized: router bgp 100 aggregate-address 10.0.0.0 255.0.0.0 as-set The following example shows how to create the aggregate route for 10.0.0.0 and also suppress advertisements of more specific routes to all neighbors: router bgp 100 aggregate-address 10.0.0.0 255.0.0.0 summary-only The following example configures BGP to not advertise inactive routes: Device(config)# router bgp 50000 Device(config-router)# address-family ipv4 unicast Device(config-router-af)# bgp suppress-inactive Device(config-router-af)# end The following example configures a maximum route limit in the VRF named RED and configures BGP to not advertise inactive routes through the VRF named RED: Device(config)# ip vrf RED Device(config-vrf)# rd 50000:10 Device(config-vrf)# maximum routes 1000 10 Device(config-vrf)# exit Device(config)# router bgp 50000 Device(config-router)# address-family ipv4 vrf RED Device(config-router-af)# bgp suppress-inactive Device(config-router-af)# end Example: Configuring a BGP Peer Group The following example shows how to use an address family to configure a peer group so that all members of the peer group are both unicast- and multicast-capable: router bgp 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.3.2 remote-as 50000 address-family ipv4 unicast neighbor mygroup peer-group neighbor 192.168.1.2 peer-group mygroup neighbor 192.168.3.2 peer-group mygroup router bgp 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.3.2 remote-as 50000 address-family ipv4 multicast neighbor mygroup peer-group neighbor 192.168.1.2 peer-group mygroup neighbor 192.168.3.2 peer-group mygroup neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IP Routing: BGP Command Reference BGP commands Standards and RFCs TitleStandard/RFC Application of the Border Gateway Protocol in the InternetRFC 1772 Experience with the BGP ProtocolRFC 1773 BGP-4 Protocol AnalysisRFC 1774 Guidelines for Creation, Selection, and Registration on an Autonomous System (AS)RFC 1930 A Framework for Inter-Domain Route AggregationRFC 2519 TitleStandard/RFC Multiprotocol Extensions for BGP-4RFC 2858 Route Refresh Capability for BGP-4RFC 2918 Capabilities Advertisement with BGP-4RFC 3392 A Border Gateway Protocol 4 (BGP-4)RFC 4271 MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs CISCO-BGP4-MIB Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP 4 The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 7: Feature Information for BGP 4 Feature InformationReleasesFeature Name BGP is an interdomain routing protocol designed to provide loop-free routing between separate routing domains that contain independent routing policies (autonomous systems). The Cisco software implementation of BGP Version 4 includes multiprotocol extensions to allow BGP to carry routing information for IPmulticast routes and multiple Layer 3 protocol address families, including IP Version 4 (IPv4), IP Version 6 (IPv6), Virtual Private Networks version 4 (VPNv4), and Connectionless Network Services (CLNS). Cisco IOS XE Release 3.7SBGP 4 C H A P T E R 4 Configuring a Basic BGP Network This module describes the basic tasks to configure a basic Border Gateway Protocol (BGP) network. BGP is an interdomain routing protocol that is designed to provide loop-free routing between organizations. The Cisco IOS implementation of the neighbor and address family commands is explained. This module also contains tasks to configure and customize BGP peers, implement BGP route aggregation, configure BGP route origination, and define BGP backdoor routes. BGP peer group definition is documented, peer session templates are introduced, and update groups are explained, Finding Feature Information, on page 69 Prerequisites for Configuring a Basic BGP Network, on page 69 Restrictions for Configuring a Basic BGP Network, on page 70 Information About Configuring a Basic BGP Network, on page 70 How to Configure a Basic BGP Network, on page 85 Configuration Examples for a Basic BGP Network, on page 143 Where to Go Next, on page 158 Additional References, on page 158 Feature Information for Configuring a Basic BGP Network, on page 159 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Prerequisites for Configuring a Basic BGP Network Before configuring a basic BGP network, you should be familiar with the “Cisco BGP Overview” module. Restrictions for Configuring a Basic BGP Network A device that runs Cisco software can be configured to run only one BGP routing process and to be a member of only one BGP autonomous system. However, a BGP routing process and autonomous system can support multiple address family configurations. Information About Configuring a Basic BGP Network BGP Version 4 Border Gateway Protocol (BGP) is an interdomain routing protocol designed to provide loop-free routing between separate routing domains that contain independent routing policies (autonomous systems). The Cisco software implementation of BGP version 4 includes multiprotocol extensions to allow BGP to carry routing information for IP multicast routes and multiple Layer 3 protocol address families including IP Version 4 (IPv4), IP Version 6 (IPv6), and Virtual Private Networks version 4 (VPNv4). BGP is mainly used to connect a local network to an external network to gain access to the Internet or to connect to other organizations. When connecting to an external organization, external BGP (eBGP) peering sessions are created. Although BGP is referred to as an exterior gateway protocol (EGP) many networks within an organization are becoming so complex that BGP can be used to simplify the internal network used within the organization. BGP peers within the same organization exchange routing information through internal BGP (iBGP) peering sessions. BGP requires more configuration than other routing protocols, and the effects of any configuration changes must be fully understood. Incorrect configuration can create routing loops and negatively impact normal network operation. Note BGP Router ID BGP uses a router ID to identify BGP-speaking peers. The BGP router ID is a 32-bit value that is often represented by an IPv4 address. By default, the Cisco software sets the router ID to the IPv4 address of a loopback interface on the router. If no loopback interface is configured on the device, the software chooses the highest IPv4 address configured on a physical interface of the device to represent the BGP router ID. The BGP router ID must be unique to the BGP peers in a network. BGP-Speaker and Peer Relationships ABGP-speaking device does not discover another BGP-speaking device automatically. A network administrator usually manually configures the relationships between BGP-speaking devices. A peer device is a BGP-speaking device that has an active TCP connection to another BGP-speaking device. This relationship between BGP devices is often referred to as a neighbor, but because this can imply the idea that the BGP devices are directly connected with no other device in between, the term neighbor will be avoided whenever possible in this document. A BGP speaker is the local device, and a peer is any other BGP-speaking network device. When a TCP connection is established between peers, each BGP peer initially exchanges all its routes—the complete BGP routing table—with the other peer. After this initial exchange, only incremental updates are sent when there has been a topology change in the network, or when a routing policy has been implemented or modified. In the periods of inactivity between these updates, peers exchange special messages called keepalives. A BGP autonomous system is a network that is controlled by a single technical administration entity. Peer devices are called external peers when they are in different autonomous systems and internal peers when they are in the same autonomous system. Usually, external peers are adjacent and share a subnet; internal peers may be anywhere in the same autonomous system. BGP Autonomous System Number Formats Prior to January 2009, BGP autonomous system numbers that were allocated to companies were 2-octet numbers in the range from 1 to 65535 as described in RFC 4271, A Border Gateway Protocol 4 (BGP-4) . Due to increased demand for autonomous system numbers, the Internet Assigned Number Authority (IANA) will start in January 2009 to allocate four-octet autonomous system numbers in the range from 65536 to 4294967295. RFC 5396, Textual Representation of Autonomous System (AS) Numbers , documents three methods of representing autonomous system numbers. Cisco has implemented the following two methods: Asplain--Decimal value notation where both 2-byte and 4-byte autonomous system numbers are represented by their decimal value. For example, 65526 is a 2-byte autonomous system number and 234567 is a 4-byte autonomous system number. Asdot--Autonomous system dot notation where 2-byte autonomous system numbers are represented by their decimal value and 4-byte autonomous system numbers are represented by a dot notation. For example, 65526 is a 2-byte autonomous system number and 1.169031 is a 4-byte autonomous system number (this is dot notation for the 234567 decimal number). For details about the third method of representing autonomous system numbers, see RFC 5396. Asdot Only Autonomous System Number Formatting In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and later releases, the 4-octet (4-byte) autonomous system numbers are entered and displayed only in asdot notation, for example, 1.10 or 45000.64000. When using regular expressions to match 4-byte autonomous system numbers the asdot format includes a period which is a special character in regular expressions. A backslash must be entered before the period (for example, 1\.14) to ensure the regular expression match does not fail. The table below shows the format in which 2-byte and 4-byte autonomous system numbers are configured, matched in regular expressions, and displayed in show command output in Cisco IOS images where only asdot formatting is available. Table 8: Asdot Only 4-Byte Autonomous System Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 1.0 to 65535.65535 asdot Asplain as Default Autonomous System Number Formatting In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, and later releases, the Cisco implementation of 4-byte autonomous system numbers uses asplain as the default display format for autonomous system numbers, but you can configure 4-byte autonomous system numbers in both the asplain and asdot format. In addition, the default format for matching 4-byte autonomous system numbers in regular expressions is asplain, so you must ensure that any regular expressions to match 4-byte autonomous system numbers are written in the asplain format. If you want to change the default show command output to display 4-byte autonomous system numbers in the asdot format, use the bgp asnotation dot command under router configuration mode. When the asdot format is enabled as the default, any regular expressions to match 4-byte autonomous system numbers must be written using the asdot format, or the regular expression match will fail. The tables below show that although you can configure 4-byte autonomous system numbers in either asplain or asdot format, only one format is used to display show command output and control 4-byte autonomous system number matching for regular expressions, and the default is asplain format. To display 4-byte autonomous system numbers in show command output and to control matching for regular expressions in the asdot format, you must configure the bgp asnotation dot command. After enabling the bgp asnotation dot command, a hard reset must be initiated for all BGP sessions by entering the clear ip bgp * command. If you are upgrading to an image that supports 4-byte autonomous system numbers, you can still use 2-byte autonomous system numbers. The show command output and regular expression match are not changed and remain in asplain (decimal value) format for 2-byte autonomous system numbers regardless of the format configured for 4-byte autonomous system numbers. Note Table 9: Default Asplain 4-Byte Autonomous System Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 65536 to 42949672952-byte: 1 to 65535 4-byte: 65536 to 4294967295 asplain 2-byte: 1 to 65535 4-byte: 65536 to 42949672952-byte: 1 to 65535 4-byte: 1.0 to 65535.65535asdot Table 10: Asdot 4-Byte Autonomous System Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 65536 to 4294967295 asplain 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 1.0 to 65535.65535asdot Reserved and Private Autonomous System Numbers In Cisco IOS Release 12.0(32)S12, 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, 12.4(24)T, and later releases, the Cisco implementation of BGP supports RFC 4893. RFC 4893was developed to allow BGP to support a gradual transition from 2-byte autonomous system numbers to 4-byte autonomous system numbers. A new reserved (private) autonomous system number, 23456, was created by RFC 4893 and this number cannot be configured as an autonomous system number in the Cisco IOS CLI. RFC 5398, Autonomous System (AS) Number Reservation for Documentation Use , describes new reserved autonomous system numbers for documentation purposes. Use of the reserved numbers allow configuration examples to be accurately documented and avoids conflict with production networks if these configurations are literally copied. The reserved numbers are documented in the IANA autonomous system number registry. Reserved 2-byte autonomous system numbers are in the contiguous block, 64496 to 64511 and reserved 4-byte autonomous system numbers are from 65536 to 65551 inclusive. Private 2-byte autonomous system numbers are still valid in the range from 64512 to 65534 with 65535 being reserved for special use. Private autonomous system numbers can be used for internal routing domains but must be translated for traffic that is routed out to the Internet. BGP should not be configured to advertise private autonomous system numbers to external networks. Cisco IOS software does not remove private autonomous system numbers from routing updates by default. We recommend that ISPs filter private autonomous system numbers. Autonomous system number assignment for public and private networks is governed by the IANA. For information about autonomous-system numbers, including reserved number assignment, or to apply to register an autonomous system number, see the following URL: http://www.iana.org/. Note Cisco Implementation of 4-Byte Autonomous System Numbers In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, 15.1(1)SG, and later releases, the Cisco implementation of 4-byte autonomous system numbers uses asplain (65538, for example) as the default regular expression match and the output display format for AS numbers. However, you can configure 4-byte autonomous system numbers in both the asplain format and the asdot format as described in RFC 5396. To change the default regular expression match and output display of 4-byte autonomous system numbers to asdot format, use the bgp asnotation dot command followed by the clear ip bgp * command to perform a hard reset of all current BGP sessions. In Cisco IOS Release 12.0(32)S12, and 12.4(24)T, the Cisco implementation of 4-byte autonomous system numbers uses asdot (1.2, for example) as the only configuration format, regular expression match, and output display, with no asplain support. For an example of BGP peers in two autonomous systems using 4-byte numbers, see the figure below. To view a configuration example of the configuration between three neighbor peers in separate 4-byte autonomous systems configured using asdot notation, see the Examples: Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers. Cisco also supports RFC 4893, which was developed to allow BGP to support a gradual transition from 2-byte autonomous system numbers to 4-byte autonomous system numbers. To ensure a smooth transition, we recommend that all BGP speakers within an autonomous system that is identified using a 4-byte autonomous system number be upgraded to support 4-byte autonomous system numbers. A new private autonomous system number, 23456, was created by RFC 4893, and this number cannot be configured as an autonomous system number in the Cisco IOS CLI. Note Figure 9: BGP Peers in Two Autonomous Systems Using 4-Byte Numbers BGP Peer Session Establishment When a BGP routing process establishes a peering session with a peer, it goes through the following state changes: Idle—The initial state that the BGP routing process enters when the routing process is enabled or when the device is reset. In this state, the device waits for a start event, such as a peering configuration with a remote peer. After the device receives a TCP connection request from a remote peer, the device initiates another start event to wait for a timer before starting a TCP connection to a remote peer. If the device is reset, the peer is reset and the BGP routing process returns to the Idle state. Connect—The BGP routing process detects that a peer is trying to establish a TCP session with the local BGP speaker. Active—In this state, the BGP routing process tries to establish a TCP session with a peer device using the ConnectRetry timer. Start events are ignored while the BGP routing process is in the Active state. If the BGP routing process is reconfigured or if an error occurs, the BGP routing process will release system resources and return to an Idle state. OpenSent—The TCP connection is established, and the BGP routing process sends an OPEN message to the remote peer, and transitions to the OpenSent state. The BGP routing process can receive other OPEN messages in this state. If the connection fails, the BGP routing process transitions to the Active state. OpenReceive—The BGP routing process receives the OPEN message from the remote peer and waits for an initial keepalive message from the remote peer. When a keepalive message is received, the BGP routing process transitions to the Established state. If a notification message is received, the BGP routing process transitions to the Idle state. If an error or configuration change occurs that affects the peering session, the BGP routing process sends a notification message with the Finite State Machine (FSM) error code and then transitions to the Idle state. Established—The initial keepalive is received from the remote peer. Peering is now established with the remote neighbor and the BGP routing process starts exchanging update message with the remote peer. The hold timer restarts when an update or keepalive message is received. If the BGP process receives an error notification, it will transition to the Idle state. Cisco Implementation of BGP Global and Address Family Configuration Commands The address family model for configuring BGP is based on splitting apart the configuration for each address family. All commands that are independent of the address family are grouped together at the beginning (highest level) of the configuration, and these are followed by separate submodes for commands specific to each address family (with the exception that commands relating to IPv4 unicast can also be entered at the beginning of the configuration). When a network operator configures BGP, the flow of BGP configuration categories is represented by the following bullets in order: Global configuration—Configuration that is applied to BGP in general, rather than to specific neighbors. For example, the network, redistribute, and bgp bestpath commands. Address family-dependent configuration—Configuration that applies to a specific address family such as policy on an individual neighbor. The relationship between BGP global and BGP address family-dependent configuration categories is shown in the table below. Table 11: Relationships Between BGP Configuration Categories Configuration Sets Within CategoryBGP Configuration Category One set of global address family-independent configurationsGlobal address family-independent One set of global address family-dependent configurations per address family Address family-dependent Address family configuration must be entered within the address family submode to which it applies.Note The following is an example of BGP configuration statements showing the grouping of global address family-independent and address family-dependent commands. router bgp ! AF independent part neighbor ! Session config; AF independent address-family ipv4 unicast ! AF dependant part neighbor ! Policy config; AF dependant exit-address-family address-family ipv4 multicast ! AF dependant part neighbor ! Policy config; AF dependant exit-address-family address-family ipv4 unicast vrf ! VRF specific AS independent commands ! VRF specific AS dependant commands neighbor ! Session config; AF independent neighbor ! Policy config; AF dependant exit-address-family The following example shows actual BGP commands that match the BGP configuration statements in the previous example: router bgp 45000 router-id 172.17.1.99 bgp log-neighbor-changes neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.3.2 remote-as 50000 address-family ipv4 unicast neighbor 192.168.1.2 activate network 172.17.1.0 mask 255.255.255.0 exit-address-family address-family ipv4 multicast neighbor 192.168.3.2 activate neighbor 192.168.3.2 advertisement-interval 25 network 172.16.1.0 mask 255.255.255.0 exit-address-family address-family ipv4 vrf vpn1 neighbor 192.168.3.2 activate network 172.21.1.0 mask 255.255.255.0 exit-address-family The bgp upgrade-cli command simplifies the migration of BGP networks and existing configurations from the network layer reachability information (NLRI) format to the address family format. Network operators can configure commands in the address family identifier (AFI) format and save these command configurations to existing NLRI formatted configurations. The BGP hybrid command-line interface (CLI) does not add support for complete AFI and NLRI integration because of the limitations of the NLRI format. For complete support of AFI commands and features, we recommend upgrading existing NLRI configurations with the bgp upgrade-cli command. For an example of migrating BGP configurations from the NLRI format to the address family format, see the “Example: NLFI to AFI Configuration” section later in this module. BGP Session Reset Whenever the routing policy changes due to a configuration change, BGP peering sessions must be reset by using the clear ip bgp command. Cisco software supports the following three mechanisms to reset BGP peering sessions: Hard reset—A hard reset tears down the specified peering sessions including the TCP connection and deletes routes coming from the specified peer. Soft reset—A soft reset uses stored prefix information to reconfigure and activate BGP routing tables without tearing down existing peering sessions. Soft reconfiguration uses stored update information, at the cost of additional memory for storing the updates, to allow you to apply new BGP policy without disrupting the network. Soft reconfiguration can be configured for inbound or outbound sessions. Dynamic inbound soft reset—The route refresh capability, as defined in RFC 2918, allows the local device to reset inbound routing tables dynamically by exchanging route refresh requests to supporting peers. The route refresh capability does not store update information locally for nondisruptive policy changes. It instead relies on dynamic exchangewith supporting peers. Route refreshmust first be advertised through BGP capability negotiation between peers. All BGP devices must support the route refresh capability. To determine if a BGP device supports this capability, use the show ip bgp neighbors command. The following message is displayed in the output when the device supports the route refresh capability: Received route refresh capability from peer. The bgp soft-reconfig-backup command was introduced to configure BGP to perform inbound soft reconfiguration for peers that do not support the route refresh capability. The configuration of this command allows you to configure BGP to store updates (soft reconfiguration) only as necessary. Peers that support the route refresh capability are unaffected by the configuration of this command. BGP Route Aggregation BGP peers store and exchange routing information and the amount of routing information increases as more BGP speakers are configured. The use of route aggregation reduces the amount of information involved. Aggregation is the process of combining the attributes of several different routes so that only a single route is advertised. Aggregate prefixes use the classless interdomain routing (CIDR) principle to combine contiguous networks into one classless set of IP addresses that can be summarized in routing tables. Fewer routes now need to be advertised. Two methods are available in BGP to implement route aggregation. You can redistribute an aggregated route into BGP or you can use a form of conditional aggregation. Basic route redistribution involves creating an aggregate route and then redistributing the routes into BGP. Conditional aggregation involves creating an aggregate route and then advertising or suppressing the advertising of certain routes on the basis of route maps, autonomous system set path (AS-SET) information, or summary information. The bgp suppress-inactive command configures BGP to not advertise inactive routes to any BGP peer. A BGP routing process can advertise routes that are not installed in the routing information database (RIB) to BGP peers by default. A route that is not installed into the RIB is an inactive route. Inactive route advertisement can occur, for example, when routes are advertised through common route aggregation. Inactive route advertisements can be suppressed to provide more consistent data forwarding. BGP Aggregation Route AS_SET Information Generation AS_SET information can be generatedwhenBGP routes are aggregated using the aggregate-address command. The path advertised for such a route is an AS_SET consisting of all the elements, including the communities, contained in all the paths that are being summarized. If the AS_PATHs to be aggregated are identical, only the AS_PATH is advertised. The ATOMIC_AGGREGATE attribute, set by default for the aggregate-address command, is not added to the AS_SET. Routing Policy Change Management Routing policies for a peer include all the configurations for elements such as route map, distribute list, prefix list, and filter list that may impact inbound or outbound routing table updates. The policy changes are automatically updated to peers whenever there is a change in the routing policy. Performing inbound reset enables the new inbound policy configured on the router to take effect. Performing outbound reset causes the new local outbound policy configured on the router to take effect without resetting the BGP session. As a new set of updates is sent during outbound policy reset, a new inbound policy of the neighbor can also take effect. This means that after changing inbound policy you must do an inbound reset on the local router or an outbound reset on the peer router. Outbound policy changes require an outbound reset on the local router or an inbound reset on the peer router. There are two types of reset: hard reset and soft reset. The table below lists their advantages and disadvantages. Table 12: Advantages and Disadvantages of Hard and Soft Resets DisadvantagesAdvantagesType of Reset The prefixes in the BGP, IP, and Forwarding Information Base (FIB) tables provided by the neighbor are lost. Not recommended. No memory overhead.Hard reset Does not reset inbound routing table updates.No configuration, no storing of routing table updates. Outbound soft reset Both BGP routers must support the route refresh capability (in Cisco IOS Release 12.1 and later releases). Does not reset outbound routing table updates. Note Does not clear the BGP session and cache. Does not require storing of routing table updates, and has no memory overhead. Dynamic inbound soft reset Requires preconfiguration. Stores all received (inbound) routing policy updates without modification; is memory-intensive. Recommended only when absolutely necessary, such as when both BGP routers do not support the automatic route refresh capability. Does not reset outbound routing table updates. Note Can be used when both BGP routers do not support the automatic route refresh capability. In Cisco IOS Release 12.3(14)T, the bgp soft-reconfig-backup command was introduced to configure inbound soft reconfiguration for peers that do not support the route refresh capability. Configured inbound soft reset (uses the neighbor soft-reconfiguration router configuration command) Once you have defined two routers to be BGP neighbors, they will form a BGP connection and exchange routing information. If you subsequently change a BGP filter, weight, distance, version, or timer, or make a similar configuration change, you must reset BGP connections for the configuration change to take effect. A soft reset updates the routing table for inbound and outbound routing updates. Cisco IOS Release 12.1 and later releases support soft reset without any prior configuration. This soft reset allows the dynamic exchange of route refresh requests and routing information between BGP routers, and the subsequent readvertisement of the respective outbound routing table. There are two types of soft reset: When soft reset is used to generate inbound updates from a neighbor, it is called dynamic inbound soft reset. When soft reset is used to send a new set of updates to a neighbor, it is called outbound soft reset. To use soft reset without preconfiguration, both BGP peers must support the soft route refresh capability, which is advertised in the OPENmessage sent when the peers establish a TCP session. Routers running Cisco IOS releases prior to Release 12.1 do not support the route refresh capability and must clear the BGP session using the neighbor soft-reconfiguration router configuration command. Clearing the BGP session in this way will have a negative impact upon network operations and should be used only as a last resort. Conditional BGP Route Injection Routes that are advertised through the BGP are commonly aggregated to minimize the number of routes that are used and reduce the size of global routing tables. However, common route aggregation can obscure more specific routing information that is more accurate but not necessary to forward packets to their destinations. Routing accuracy is obscured by common route aggregation because a prefix that represents multiple addresses or hosts over a large topological area cannot be accurately reflected in a single route. Cisco software provides several methods by which you can originate a prefix into BGP. Prior to the BGP conditional route injection feature, the existing methods included redistribution and using the network or aggregate-address command. However, these methods assume the existence of more specific routing information (matching the route to be originated) in either the routing table or the BGP table. BGP conditional route injection allows you to originate a prefix into a BGP routing table without the corresponding match. This feature allows more specific routes to be generated based on administrative policy or traffic engineering information in order to provide more specific control over the forwarding of packets to these more specific routes, which are injected into the BGP routing table only if the configured conditions are met. Enabling this feature will allow you to improve the accuracy of common route aggregation by conditionally injecting or replacing less specific prefixes with more specific prefixes. Only prefixes that are equal to or more specific than the original prefix may be injected. BGP conditional route injection is enabled with the bgp inject-map exist-mapcommand and uses two route maps (inject map and exist map) to install one (or more) more specific prefixes into a BGP routing table. The exist map specifies the prefixes that the BGP speaker will track. The inject map defines the prefixes that will be created and installed into the local BGP table. Inject maps and exist maps will only match a single prefix per route map clause. To inject additional prefixes, you must configure additional route map clauses. If multiple prefixes are used, the first prefix matched will be used. Note BGP Peer Groups Often, in a BGP network, many neighbors are configured with the same update policies (that is, the same outbound route maps, distribute lists, filter lists, update source, and so on). Neighbors with the same update policies can be grouped into BGP peer groups to simplify configuration and, more importantly, to make configuration updates more efficient. When you have many peers, this approach is highly recommended. BGP Backdoor Routes In a BGP network topology with two border devices using eBGP to communicate to a number of different autonomous systems, using eBGP to communicate between the two border devices may not be the most efficient routing method. In the figure below, Router B as a BGP speaker will receive a route to Router D through eBGP, but this route will traverse at least two autonomous systems. Router B and Router D are also connected through an Enhanced Interior Gateway Routing Protocol (EIGRP) network (any IGP can be used here), and this route has a shorter path. EIGRP routes, however, have a default administrative distance of 90, and eBGP routes have a default administrative distance of 20, so BGP will prefer the eBGP route. Changing the default administrative distances is not recommended because changing the administrative distance may lead to routing loops. To cause BGP to prefer the EIGRP route, you can use the network backdoor command. BGP treats the network specified by the network backdoor command as a locally assigned network, except that it does not advertise the specified network in BGP updates. In the figure below, this means that Router B will communicate to Router D using the shorter EIGRP route instead of the longer eBGP route. Figure 10: BGP Backdoor Route Topology Peer Groups and BGP Update Messages In Cisco IOS software releases prior to Release 12.0(24)S, 12.2(18)S, or 12.3(4)T, BGP update messages were grouped based on peer group configurations. This method of grouping neighbors for BGP update message generation reduced the amount of system processing resources needed to scan the routing table. This method, however, had the following limitations: All neighbors that shared peer group configuration also had to share outbound routing policies. All neighbors had to belong to the same peer group and address family. Neighbors configured in different address families could not belong to different peer groups. These limitations existed to balance optimal update generation and replication against peer group configuration. These limitations could cause the network operator to configure smaller peer groups, which reduced the efficiency of update message generation and limited the scalability of neighbor configuration. BGP Update Group The introduction of the BGP (dynamic) update group provides a different type of BGP peer grouping from existing BGP peer groups. Existing peer groups are not affected but peers with the same outbound policy configured that are not members of a current peer group can be grouped into an update group. The members of this update group will use the same update generation engine. When BGP update groups are configured an algorithm dynamically calculates the BGP update group membership based on outbound policies. Optimal BGP update message generation occurs automatically and independently. BGP neighbor configuration is no longer restricted by outbound routing policies, and update groups can belong to different address families. BGP Dynamic Update Group Configuration In Cisco IOS Release 12.0(24)S, 12.2(18)S, 12.3(4)T, 12.2(27)SBC, and later releases, a new algorithm was introduced that dynamically calculates and optimizes update groups of neighbors that share the same outbound policies and can share the same update messages. No configuration is required to enable the BGP dynamic update group and the algorithm runs automatically. When a change to outbound policy occurs, the router automatically recalculates update group memberships and applies the changes by triggering an outbound soft reset after a 1-minute timer expires. This behavior is designed to provide the network operator with time to change the configuration if a mistake is made. You can manually enable an outbound soft reset before the timer expires by entering the clear ip bgp ip-address soft outcommand. In Cisco IOS Release 12.0(22)S, 12.2(14)S, 12.3(2)T, and prior releases, the update group recalculation delay timer is set to 3 minutes. Note For the best optimization of BGP update group generation, we recommend that the network operator keeps outbound routing policy the same for neighbors that have similar outbound policies. BGP Peer Templates To address some of the limitations of peer groups such as configuration management, BGP peer templates were introduced to support the BGP update group configuration. A peer template is a configuration pattern that can be applied to neighbors that share policies. Peer templates are reusable and support inheritance, which allows the network operator to group and apply distinct neighbor configurations for BGP neighbors that share policies. Peer templates also allow the network operator to define very complex configuration patterns through the capability of a peer template to inherit a configuration from another peer template. There are two types of peer templates: Peer session templates are used to group and apply the configuration of general session commands that are common to all address family and NLRI configuration modes. Peer policy templates are used to group and apply the configuration of commands that are applied within specific address families and NLRI configuration modes. Peer templates improve the flexibility and enhance the capability of neighbor configuration. Peer templates also provide an alternative to peer group configuration and overcome some limitations of peer groups. BGP peer routers using peer templates also benefit from automatic update group configuration.With the configuration of the BGP peer templates and the support of the BGP dynamic update peer groups, the network operator no longer needs to configure peer groups in BGP and the network can benefit from improved configuration flexibility and faster convergence. A BGP neighbor cannot be configured to work with both peer groups and peer templates. A BGP neighbor can be configured to belong only to a peer group or to inherit policies from peer templates. Note The following restrictions apply to the peer policy templates: A peer policy template can directly or indirectly inherit up to eight peer policy templates. A BGP neighbor cannot be configured to work with both peer groups and peer templates. A BGP neighbor can be configured to belong only to a peer group or to inherit policies only from peer templates. Inheritance in Peer Templates The inheritance capability is a key component of peer template operation. Inheritance in a peer template is similar to node and tree structures commonly found in general computing, for example, file and directory trees. A peer template can directly or indirectly inherit the configuration from another peer template. The directly inherited peer template represents the tree in the structure. The indirectly inherited peer template represents a node in the tree. Because each node also supports inheritance, branches can be created that apply the configurations of all indirectly inherited peer templates within a chain back to the directly inherited peer template or the source of the tree. This structure eliminates the need to repeat configuration statements that are commonly reapplied to groups of neighbors because common configuration statements can be applied once and then indirectly inherited by peer templates that are applied to neighbor groups with common configurations. Configuration statements that are duplicated separately within a node and a tree are filtered out at the source of the tree by the directly inherited template. A directly inherited template will overwrite any indirectly inherited statements that are duplicated in the directly inherited template. Inheritance expands the scalability and flexibility of neighbor configuration by allowing you to chain together peer templates configurations to create simple configurations that inherit common configuration statements or complex configurations that apply very specific configuration statements along with common inherited configurations. Specific details about configuring inheritance in peer session templates and peer policy templates are provided in the following sections. When BGP neighbors use inherited peer templates it can be difficult to determine which policies are associated with a specific template. The detail keyword was added to the show ip bgp template peer-policy command to display the detailed configuration of local and inherited policies associated with a specific template. Peer Session Templates Peer session templates are used to group and apply the configuration of general session commands to groups of neighbors that share session configuration elements. General session commands that are common for neighbors that are configured in different address families can be configured within the same peer session template. Peer session templates are created and configured in peer session configuration mode. Only general session commands can be configured in a peer session template. The following general session commands are supported by peer session templates: description disable-connected-check ebgp-multihop exit peer-session inherit peer-session local-as password remote-as shutdown timers translate-update update-source version General session commands can be configured once in a peer session template and then applied to many neighbors through the direct application of a peer session template or through indirect inheritance from a peer session template. The configuration of peer session templates simplifies the configuration of general session commands that are commonly applied to all neighbors within an autonomous system. Peer session templates support direct and indirect inheritance. A peer can be configured with only one peer session template at a time, and that peer session template can contain only one indirectly inherited peer session template. If you attempt to configure more than one inherit statement with a single peer session template, an error message will be displayed. Note This behavior allows a BGP neighbor to directly inherit only one session template and indirectly inherit up to seven additional peer session templates. This allows you to apply up to a maximum of eight peer session configurations to a neighbor: the configuration from the directly inherited peer session template and the configurations from up to seven indirectly inherited peer session templates. Inherited peer session configurations are evaluated first and applied starting with the last node in the branch and ending with the directly applied peer session template configuration at the source of the tree. The directly applied peer session template will have priority over inherited peer session template configurations. Any configuration statements that are duplicated in inherited peer session templates will be overwritten by the directly applied peer session template. So, if a general session command is reapplied with a different value, the subsequent value will have priority and overwrite the previous value that was configured in the indirectly inherited template. The following examples illustrate the use of this feature. In the following example, the general session command remote-as 1 is applied in the peer session template named SESSION-TEMPLATE-ONE: template peer-session SESSION-TEMPLATE-ONE remote-as 1 exit peer-session Peer session templates support only general session commands. BGP policy configuration commands that are configured only for a specific address family or NLRI configuration mode are configured with peer policy templates. Peer Policy Templates Peer policy templates are used to group and apply the configuration of commands that are applied within specific address families and NLRI configuration mode. Peer policy templates are created and configured in peer policy configuration mode. BGP policy commands that are configured for specific address families are configured in a peer policy template. The following BGP policy commands are supported by peer policy templates: advertisement-interval allowas-in as-override capability default-originate distribute-list dmzlink-bw exit-peer-policy filter-list inherit peer-policy maximum-prefix next-hop-self next-hop-unchanged prefix-list remove-private-as route-map route-reflector-client send-community send-label soft-reconfiguration unsuppress-map weight Peer policy templates are used to configure BGP policy commands that are configured for neighbors that belong to specific address families. Like peer session templates, peer policy templates are configured once and then applied to many neighbors through the direct application of a peer policy template or through inheritance from peer policy templates. The configuration of peer policy templates simplifies the configuration of BGP policy commands that are applied to all neighbors within an autonomous system. Like a peer session template, a peer policy template supports inheritance. However, there are minor differences. A directly applied peer policy template can directly or indirectly inherit configurations from up to seven peer policy templates. So, a total of eight peer policy templates can be applied to a neighbor or neighbor group. Like route maps, inherited peer policy templates are configured with sequence numbers. Also like a route map, an inherited peer policy template is evaluated starting with the inherit peer-policy statement with the lowest sequence number and ending with the highest sequence number. However, there is a difference; a peer policy template will not collapse like a route map. Every sequence is evaluated, and if a BGP policy command is reapplied with a different value, it will overwrite any previous value from a lower sequence number. The directly applied peer policy template and the inherit peer-policy statement with the highest sequence number will always have priority and be applied last. Commands that are reapplied in subsequent peer templates will always overwrite the previous values. This behavior is designed to allow you to apply common policy configurations to large neighbor groups and specific policy configurations only to certain neighbors and neighbor groups without duplicating individual policy configuration commands. Peer policy templates support only policy configuration commands. BGP policy configuration commands that are configured only for specific address families are configured with peer policy templates. The configuration of peer policy templates simplifies and improves the flexibility of BGP configuration. A specific policy can be configured once and referenced many times. Because a peer policy supports up to eight levels of inheritance, very specific and very complex BGP policies can also be created. BGP IPv6 Neighbor Activation Under the IPv4 Address Family Prior to Cisco IOS Release 12.2(33)SRE4, by default, both IPv6 and IPv4 capability is exchanged with a BGP peer that has an IPv6 address. When an IPv6 peer is configured, that neighbor is automatically activated under the IPv4 unicast address family. Beginning with Cisco IOS Release 12.2(33)SRE4, when a new IPv6 neighbor is being configured, it is no longer automatically activated under the IPv4 address family. You can manually activate the IPv6 neighbor under the IPv4 address family if, for example, you have a dual stack environment and want to send IPv6 and IPv4 prefixes. If you do not want an existing IPv6 peer to be activated under the IPv4 address family, you can manually deactivate the peer with the no neighbor activate command. Until then, existing configurations that activate an IPv6 neighbor under the IPv4 unicast address family will continue to try to establish a session. How to Configure a Basic BGP Network Configuring a basic BGP network consists of a few required tasks and many optional tasks. A BGP routing process must be configured and BGP peers must be configured, preferably using the address family configuration model. If the BGP peers are part of a VPN network, the BGP peers must be configured using the IPv4 VRF address family task. The other tasks in the following list are optional: Configuring a BGP Routing Process Perform this task to configure a BGP routing process. You must perform the required steps at least once to enable BGP. The optional steps here allow you to configure additional features in your BGP network. Several of the features, such as logging neighbor resets and immediate reset of a peer when its link goes down, are enabled by default but are presented here to enhance your understanding of how your BGP network operates. A device that runs Cisco software can be configured to run only one BGP routing process and to be a member of only one BGP autonomous system. However, a BGP routing process and autonomous system can support multiple concurrent BGP address family and subaddress family configurations. Note The configuration in this task is done at Router A in the figure below and would need to be repeated with appropriate changes to the IP addresses (for example, at Router B) to fully achieve a BGP process between the two devices. No address family is configured here for the BGP routing process, so routing information for the IPv4 unicast address family is advertised by default. Figure 11: BGP Topology with Two Autonomous Systems SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. network network-number [mask network-mask] [route-map route-map-name] 5. bgp router-id ip-address 6. timers bgp keepalive holdtime 7. bgp fast-external-fallover 8. bgp log-neighbor-changes 9. end 10. show ip bgp [network] [network-mask] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal PurposeCommand or Action Configures a BGP routing process, and enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Use the autonomous-system-number argument to specify an integer, from 0 and 65534, that identifies the device to other BGP speakers. Device(config)# router bgp 40000 (Optional) Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] [route-map route-map-name] Step 4 Example: For exterior protocols, the network command controls which networks are advertised. Interior protocols use Device(config-router)# network 10.1.1.0 mask 255.255.255.0 the network command to determine where to send updates. (Optional) Configures a fixed 32-bit router ID as the identifier of the local device running BGP. bgp router-id ip-address Example: Step 5 Use the ip-address argument to specify a unique router ID within the network.Device(config-router)# bgp router-id 10.1.1.99 Configuring a router ID using the bgp router-id command resets all active BGP peering sessions. Note (Optional) Sets BGP network timers.timers bgp keepalive holdtimeStep 6 Example: Use the keepalive argument to specify the frequency, in seconds, with which the software sends keepalive Device(config-router)# timers bgp 70 120 messages to its BGP peer. By default, the keepalive timer is set to 60 seconds. Use the holdtime argument to specify the interval, in seconds, after which the software, having not received a keepalive message, declares a BGP peer dead. By default, the holdtime timer is set to 180 seconds. (Optional) Enables the automatic resetting of BGP sessions.bgp fast-external-falloverStep 7 Example: By default, the BGP sessions of any directly adjacent external peers are reset if the link used to reach them goes down.Device(config-router)# bgp fast-external-fallover (Optional) Enables logging of BGP neighbor status changes (up or down) and neighbor resets. bgp log-neighbor-changes Example: Step 8 Use this command for troubleshooting network connectivity problems and measuring networkDevice(config-router)# bgp log-neighbor-changes stability. Unexpected neighbor resets might indicate high error rates or high packet loss in the network and should be investigated. PurposeCommand or Action Exits router configuration mode and enters privileged EXEC mode. end Example: Step 9 Device(config-router)# end (Optional) Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 10 Example: Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Device# show ip bgp Examples The following sample output from the show ip bgp command shows the BGP routing table for Router A in the figure above after this task has been configured on Router A. You can see an entry for the network 10.1.1.0 that is local to this autonomous system. BGP table version is 12, local router ID is 10.1.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 0.0.0.0 0 32768 i Troubleshooting Tips Use the ping command to check basic network connectivity between the BGP routers. Configuring a BGP Peer Perform this task to configure BGP between two IPv4 routers (peers). The address family configured here is the default IPv4 unicast address family and the configuration is done at Router A in the figure above. Remember to perform this task for any neighbor routers that are to be BGP peers. Before you begin Before you perform this task, perform the “Configuring a BGP Routing Process” task shown in the prior section. By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes, neighbors must also be activated using the neighbor activate command in address family configuration mode for the other prefix types, such as IPv6 prefixes. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. address-family ipv4 [unicast |multicast | vrf vrf-name] 6. neighbor ip-address activate 7. end 8. show ip bgp [network] [network-mask] 9. show ip bgp neighbors [neighbor-address] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 40000 Adds the IP address of the neighbor in the specified autonomous system to the IPv4multiprotocol BGP neighbor table of the local router. neighbor ip-address remote-as autonomous-system-number Example: Step 4 Router(config-router)# neighbor 192.168.1.1 remote-as 45000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 5 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed in configurationRouter(config-router)# address-family ipv4 unicast mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. PurposeCommand or Action The vrf keyword and vrf-name argument specify the name of the virtual routing and forwarding (VRF) instance to associate with subsequent IPv4 address family configuration mode commands. Enables the neighbor to exchange prefixes for the IPv4 unicast address family with the local router. neighbor ip-address activate Example: Step 6 Router(config-router-af)# neighbor 192.168.1.1 activate Exits address family configuration mode and enters privileged EXEC mode. end Example: Step 7 Router(config-router-af)# end (Optional) Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 8 Example: Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Router# show ip bgp (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [neighbor-address] Example: Step 9 Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Router(config-router-af)# show ip bgp neighbors 192.168.2.2 Examples The following sample output from the show ip bgp command shows the BGP routing table for Router A in the figure above after this task has been configured on Router A and Router B. You can now see an entry for the network 172.17.1.0 in autonomous system 45000. BGP table version is 13, local router ID is 10.1.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 0.0.0.0 0 32768 i *> 172.17.1.0/24 192.168.1.1 0 0 45000 i The following sample output from the show ip bgp neighbors command shows information about the TCP and BGP connections to the BGP neighbor 192.168.1.1 of Router A in the figure above after this task has been configured on Router A: BGP neighbor is 192.168.1.1, remote AS 45000, external link BGP version 4, remote router ID 172.17.1.99 BGP state = Established, up for 00:06:55 Last read 00:00:15, last write 00:00:15, hold time is 120, keepalive intervals Configured hold time is 120,keepalive interval is 70 seconds, Minimum holdtims Neighbor capabilities: Route refresh: advertised and received (old & new) Address family IPv4 Unicast: advertised and received Message statistics: InQ depth is 0 OutQ depth is 0 Sent Rcvd Opens: 1 1 Notifications: 0 0 Updates: 1 2 Keepalives: 13 13 Route Refresh: 0 0 Total: 15 16 Default minimum time between advertisement runs is 30 seconds For address family: IPv4 Unicast BGP table version 13, neighbor version 13/0 Output queue size : 0 Index 1, Offset 0, Mask 0x2 1 update-group member Sent Rcvd Prefix activity: ---- ----Prefixes Current: 1 1 (Consumes 52 bytes) Prefixes Total: 1 1 Implicit Withdraw: 0 0 Explicit Withdraw: 0 0 Used as bestpath: n/a 1 Used as multipath: n/a 0 Outbound Inbound Local Policy Denied Prefixes: -------- -------AS_PATH loop: n/a 1 Bestpath from this peer: 1 n/a Total: 1 1 Number of NLRIs in the update sent: max 0, min 0 Connections established 1; dropped 0 Last reset never Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Connection is ECN Disabled Local host: 192.168.1.2, Local port: 179 Foreign host: 192.168.1.1, Foreign port: 37725 Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) Event Timers (current time is 0x12F4F2C): Timer Starts Wakeups Next Retrans 14 0 0x0 TimeWait 0 0 0x0 AckHold 13 8 0x0 SendWnd 0 0 0x0 KeepAlive 0 0 0x0 GiveUp 0 0 0x0 PmtuAger 0 0 0x0 DeadWait 0 0 0x0 iss: 165379618 snduna: 165379963 sndnxt: 165379963 sndwnd: 16040 irs: 3127821601 rcvnxt: 3127821993 rcvwnd: 15993 delrcvwnd: 391 SRTT: 254 ms, RTTO: 619 ms, RTV: 365 ms, KRTT: 0 ms minRTT: 12 ms, maxRTT: 300 ms, ACK hold: 200 ms Flags: passive open, nagle, gen tcbs IP Precedence value : 6 Datagrams (max data segment is 1460 bytes): Rcvd: 20 (out of order: 0), with data: 15, total data bytes: 391 Sent: 22 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 04 Troubleshooting Tips Use the ping command to verify basic network connectivity between the BGP routers. What to Do Next If you have BGP peers in a VPN, proceed to the Configuring a BGP Peer for the IPv4 VRF Address Family, on page 98. If you do not have BGP peers in a VPN, proceed to the Customizing a BGP Peer, on page 37. Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers Perform this task to configure a Border Gateway Protocol (BGP) routing process and BGP peers when the BGP peers are located in an autonomous system (AS) that uses 4-byte AS numbers. The address family configured here is the default IPv4 unicast address family, and the configuration is done at Router B in the figure above (in the “Cisco Implementation of 4-Byte Autonomous System Numbers” section). The 4-byte AS numbers in this task are formatted in the default asplain (decimal value) format; for example, Router B is in AS number 65538 in the figure above. Remember to perform this task for any neighbor routers that are to be BGP peers. Before you begin By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes, neighbors must also be activated using the neighbor activate command in address family configuration mode for the other prefix types. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. Repeat Step 4 to define other BGP neighbors, as required. 6. address-family ipv4 [unicast |multicast | vrf vrf-name] 7. neighbor ip-address activate 8. Repeat Step 7 to activate other BGP neighbors, as required. 9. network network-number [mask network-mask] [route-map route-map-name] 10. end 11. show ip bgp [network] [network-mask] 12. show ip bgp summary DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 PurposeCommand or Action Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 In this example, the 4-byte AS number, 65538, is defined in asplain notation.Device(config)# router bgp 65538 Adds the IP address of the neighbor in the specified AS to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor ip-address remote-as autonomous-system-number Example: Step 4 In this example, the 4-byte AS number, 65536, is defined in asplain notation.Device(config-router)# neighbor 192.168.1.2 remote-as 65536 --Repeat Step 4 to define other BGP neighbors, as required.Step 5 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 6 The unicast keyword specifies the IPv4 unicast address family. By default, the device is placed inDevice(config-router)# address-family ipv4 unicast configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the virtual routing and forwarding (VRF) instance to associate with subsequent IPv4 address family configuration mode commands. Enables the neighbor to exchange prefixes for the IPv4 unicast address family with the local device. neighbor ip-address activate Example: Step 7 Device(config-router-af)# neighbor 192.168.1.2 activate --Repeat Step 7 to activate other BGP neighbors, as required.Step 8 (Optional) Specifies a network as local to this AS and adds it to the BGP routing table. network network-number [mask network-mask] [route-map route-map-name] Step 9 PurposeCommand or Action Example: For exterior protocols the network command controls which networks are advertised. Interior protocols use Device(config-router-af)# network 172.17.1.0 mask 255.255.255.0 the network command to determine where to send updates. Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 10 Device(config-router-af)# end (Optional) Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 11 Example: Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Device# show ip bgp 10.1.1.0 (Optional) Displays the status of all BGP connections.show ip bgp summary Example: Step 12 Device# show ip bgp summary Examples The following output from the show ip bgp command at Router B shows the BGP routing table entry for network 10.1.1.0 learned from the BGP neighbor at 192.168.1.2 in Router A in the figure above with its 4-byte AS number of 65536 displayed in the default asplain format. RouterB# show ip bgp 10.1.1.0 BGP routing table entry for 10.1.1.0/24, version 2 Paths: (1 available, best #1) Advertised to update-groups: 2 65536 192.168.1.2 from 192.168.1.2 (10.1.1.99) Origin IGP, metric 0, localpref 100, valid, external, best The following output from the show ip bgp summary command shows the 4-byte AS number 65536 for the BGP neighbor 192.168.1.2 of Router A in the figure above after this task has been configured on Router B: RouterB# show ip bgp summary BGP router identifier 172.17.1.99, local AS number 65538 BGP table version is 3, main routing table version 3 2 network entries using 234 bytes of memory 2 path entries using 104 bytes of memory 3/2 BGP path/bestpath attribute entries using 444 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 806 total bytes of memory BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Stated 192.168.1.2 4 65536 6 6 3 0 0 00:01:33 1 Troubleshooting Tips Use the ping command to verify basic network connectivity between the BGP routers. Modifying the Default Output and Regular Expression Match Format for 4-Byte Autonomous System Numbers Perform this task to modify the default output format for 4-byte autonomous system (AS) numbers from asplain format to asdot notation format. The show ip bgp summary command is used to display the changes in output format for the 4-byte AS numbers. SUMMARY STEPS 1. enable 2. show ip bgp summary 3. configure terminal 4. router bgp autonomous-system-number 5. bgp asnotation dot 6. end 7. clear ip bgp * 8. show ip bgp summary 9. show ip bgp regexp regexp 10. configure terminal 11. router bgp autonomous-system-number 12. no bgp asnotation dot 13. end 14. clear ip bgp * DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Displays the status of all Border Gateway Protocol (BGP) connections. show ip bgp summary Example: Step 2 Device# show ip bgp summary Enters global configuration mode.configure terminal Example: Step 3 PurposeCommand or Action Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 4 In this example, the 4-byte AS number, 65538, is defined in asplain notation.Device(config)# router bgp 65538 Changes the default output format of BGP 4-byte AS numbers from asplain (decimal values) to dot notation. bgp asnotation dot Example: Step 5 4-byte AS numbers can be configured using either asplain format or asdot format. This command affects only the output displayed for show commands or the matching of regular expressions. Note Device(config-router)# bgp asnotation dot Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 6 Device(config-router)# end Clears and resets all current BGP sessions.clear ip bgp *Step 7 Example: In this example, a hard reset is performed to ensure that the 4-byte AS number format change is reflected in all BGP sessions.Device# clear ip bgp * Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Displays the status of all BGP connections.show ip bgp summary Example: Step 8 Device# show ip bgp summary Displays routes that match the AS path regular expression.show ip bgp regexp regexpStep 9 Example: In this example, a regular expression to match a 4-byte AS path is configured using asdot format. Device# show ip bgp regexp ^1\.0$ Enters global configuration mode.configure terminal Example: Step 10 Device# configure terminal PurposeCommand or Action Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 11 In this example, the 4-byte AS number, 65538, is defined in asplain notation.Device(config)# router bgp 65538 Resets the default output format of BGP 4-byte AS numbers back to asplain (decimal values). no bgp asnotation dot Example: Step 12 4-byte AS numbers can be configured using either asplain format or asdot format. This command affects only the output displayed for show commands or the matching of regular expressions. Note Device(config-router)# no bgp asnotation dot Exits router configuration mode and returns to privileged EXEC mode. end Example: Step 13 Device(config-router)# end Clears and resets all current BGP sessions.clear ip bgp *Step 14 Example: In this example, a hard reset is performed to ensure that the 4-byte AS number format change is reflected in all BGP sessions.Device# clear ip bgp * Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Examples The following output from the show ip bgp summary command shows the default asplain format of the 4-byte AS numbers. Note the asplain format of the 4-byte AS numbers, 65536 and 65550. Router# show ip bgp summary BGP router identifier 172.17.1.99, local AS number 65538 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Statd 192.168.1.2 4 65536 7 7 1 0 0 00:03:04 0 192.168.3.2 4 65550 4 4 1 0 0 00:00:15 0 After the bgp asnotation dot command is configured (followed by the clear ip bgp * command to perform a hard reset of all current BGP sessions), the output is converted to asdot notation format as shown in the following output from the show ip bgp summary command. Note the asdot format of the 4-byte AS numbers, 1.0 and 1.14 (these are the asdot conversions of the 65536 and 65550 AS numbers. Router# show ip bgp summary BGP router identifier 172.17.1.99, local AS number 1.2 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Statd 192.168.1.2 4 1.0 9 9 1 0 0 00:04:13 0 192.168.3.2 4 1.14 6 6 1 0 0 00:01:24 0 After the bgp asnotation dot command is configured (followed by the clear ip bgp * command to perform a hard reset of all current BGP sessions), the regular expression match format for 4-byte AS paths is changed to asdot notation format. Although a 4-byte AS number can be configured in a regular expression using either asplain format or asdot format, only 4-byte AS numbers configured using the current default format are matched. In the first example below, the show ip bgp regexp command is configured with a 4-byte AS number in asplain format. The match fails because the default format is currently asdot format and there is no output. In the second example using asdot format, the match passes and the information about the 4-byte AS path is shown using the asdot notation. The asdot notation uses a period, which is a special character in Cisco regular expressions. To remove the special meaning, use a backslash before the period. Note Router# show ip bgp regexp ^65536$ Router# show ip bgp regexp ^1\.0$ BGP table version is 2, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 192.168.1.2 0 0 1.0 i Configuring a BGP Peer for the IPv4 VRF Address Family Perform this optional task to configure BGP between two IPv4 routers (peers) that must exchange IPv4 VRF information because they exist in a VPN. The address family configured here is the IPv4 VRF address family and the configuration is done at Router B in the figure below with the neighbor 192.168.3.2 at Router E in autonomous system 50000. Remember to perform this task for any neighbor routers that are to be BGP IPv4 VRF address family peers. This task does not show the complete configuration required for VPN routing. For some complete example configurations and an example configuration showing how to create a VRF with a route-target that uses a 4-byte autonomous system number, see . Figure 12: BGP Topology for IPv4 VRF Address Family Before you begin Before you perform this task, perform the Configuring a BGP Routing Process, on page 27 task. SUMMARY STEPS 1. enable 2. configure terminal 3. ip vrf vrf-name 4. rd route-distinguisher 5. route-target {import | export | both} route-target-ext-community 6. exit 7. router bgp autonomous-system-number 8. address-family ipv4 [unicast |multicast | vrf vrf-name] 9. neighbor ip-address remote-as autonomous-system-number 10. neighbor {ip-address | peer-group-name}maximum-prefix maximum [threshold] [restart restart-interval] [warning-only] 11. neighbor ip-address activate 12. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable PurposeCommand or Action Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Configures a VRF routing table and enters VRF configuration mode. ip vrf vrf-name Example: Step 3 Use the vrf-name argument to specify a name to be assigned to the VRF.Router(config)# ip vrf vpn1 Creates routing and forwarding tables and specifies the default route distinguisher for a VPN. rd route-distinguisher Example: Step 4 Use the route-distinguisher argument to add an 8-byte value to an IPv4 prefix to create a unique VPN IPv4 prefix. Router(config-vrf)# rd 45000:5 Creates a route target extended community for a VRF.route-target {import | export | both} route-target-ext-community Step 5 Use the import keyword to import routing information from the target VPN extended community. Example: Router(config-vrf)# route-target both 45000:100 Use the export keyword to export routing information to the target VPN extended community. Use the both keyword to import both import and export routing information to the target VPN extended community. Use the route-target-ext-community argument to add the route target extended community attributes to the VRF's list of import, export, or both (import and export) route target extended communities. Exits VRF configuration mode and enters global configuration mode. exit Example: Step 6 Router(config-vrf)# exit Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 7 Router(config)# router bgp 45000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 8 Use the unicast keyword to specify the IPv4 unicast address family. By default, the router is placed in PurposeCommand or Action Router(config-router)# address-family ipv4 vrf vpn1 configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Use themulticast keyword to specify IPv4 multicast address prefixes. Use the vrf keyword and vrf-name argument to specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Adds the IP address of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor ip-address remote-as autonomous-system-number Example: Step 9 Router(config-router-af)# neighbor 192.168.3.2 remote-as 45000 Controls how many prefixes can be received from a neighbor. neighbor {ip-address | peer-group-name} maximum-prefix maximum [threshold] [restart restart-interval] [warning-only] Step 10 Use themaximum argument to specify the maximum number of prefixes allowed from the specifiedExample: neighbor. The number of prefixes that can be Router(config-router-af)# neighbor 192.168.3.2 maximum-prefix 10000 warning-only configured is limited only by the available system resources on a router. Use the threshold argument to specify an integer representing a percentage of the maximum prefix limit at which the router starts to generate a warning message. Use the warning-only keyword to allow the router to generate a log message when the maximum prefix limit is exceeded, instead of terminating the peering session. Enables the neighbor to exchange prefixes for the IPv4 VRF address family with the local router. neighbor ip-address activate Example: Step 11 Router(config-router-af)# neighbor 192.168.3.2 activate Exits address family configuration mode and enters privileged EXEC mode. end Example: Step 12 Router(config-router-af)# end Troubleshooting Tips Use the ping command to verify basic network connectivity between the BGP routers, and use the show ip vrf command to verify that the VRF instance has been created. Customizing a BGP Peer Perform this task to customize your BGP peers. Although many of the steps in this task are optional, this task demonstrates how the neighbor and address family configuration command relationships work. Using the example of the IPv4multicast address family, neighbor address family-independent commands are configured before the IPv4 multicast address family is configured. Commands that are address family-dependent are then configured and the exit address-family command is shown. An optional step shows how to disable a neighbor. The configuration in this task is done at Router B in the figure below and would need to be repeated with appropriate changes to the IP addresses, for example, at Router E to fully configure a BGP process between the two devices. Figure 13: BGP Peer Topology By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes, neighbors must also be activated using the neighbor activate command in address family configuration mode for the other prefix types, such as IPv6 prefixes. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. no bgp default ipv4-unicast 5. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 6. neighbor {ip-address | peer-group-name} description text 7. address-family ipv4 [unicast |multicast | vrf vrf-name] 8. network network-number [mask network-mask] [route-map route-map-name] 9. neighbor {ip-address | peer-group-name} activate 10. neighbor {ip-address | peer-group-name} advertisement-interval seconds 11. neighbor {ip-address | peer-group-name} default-originate [route-map map-name] 12. exit-address-family 13. neighbor {ip-address | peer-group-name} shutdown 14. end 15. show ip bgp ipv4 multicast [command] 16. show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | paths regexp | dampened-routes | received prefix-filter] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Disables the IPv4 unicast address family for the BGP routing process. no bgp default ipv4-unicast Example: Step 4 Routing information for the IPv4 unicast address family is advertised by default for each BGP routing session configured with the neighbor remote-as router configuration command unless you configure the no bgp default ipv4-unicast router configuration command before configuring the neighbor remote-as command. Existing neighbor configurations are not affected. Note Device(config-router)# no bgp default ipv4-unicast Adds the IP address of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 5 PurposeCommand or Action Device(config-router)# neighbor 192.168.3.2 remote-as 50000 (Optional) Associates a text description with the specified neighbor. neighbor {ip-address | peer-group-name} description text Example: Step 6 Device(config-router)# neighbor 192.168.3.2 description finance Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 7 The unicast keyword specifies the IPv4 unicast address family. By default, the device is placed inDevice(config-router)# address-family ipv4 multicast configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. (Optional) Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] [route-map route-map-name] Step 8 Example: For exterior protocols the network command controls which networks are advertised. Interior protocols use Device(config-router-af)# network 172.17.1.0 mask 255.255.255.0 the network command to determine where to send updates. Enables the exchange of information with a BGP neighbor.neighbor {ip-address | peer-group-name} activate Example: Step 9 Device(config-router-af)# neighbor 192.168.3.2 activate (Optional) Sets the minimum interval between the sending of BGP routing updates. neighbor {ip-address | peer-group-name} advertisement-interval seconds Example: Step 10 Device(config-router-af)# neighbor 192.168.3.2 advertisement-interval 25 PurposeCommand or Action (Optional) Permits a BGP speaker--the local device--to send the default route 0.0.0.0 to a peer for use as a default route. neighbor {ip-address | peer-group-name} default-originate [route-map map-name] Example: Step 11 Device(config-router-af)# neighbor 192.168.3.2 default-originate Exits address family configuration mode and enters router configuration mode. exit-address-family Example: Step 12 Device(config-router-af)# exit-address-family (Optional) Disables a BGP peer or peer group.neighbor {ip-address | peer-group-name} shutdownStep 13 Example: If you perform this step you will not be able to run either of the subsequent show command steps because you have disabled the neighbor. Note Device(config-router)# neighbor 192.168.3.2 shutdown Exits router configuration mode and enters privileged EXEC mode. end Example: Step 14 Device(config-router)# end (Optional) Displays IPv4 multicast database-related information. show ip bgp ipv4 multicast [command] Example: Step 15 Use the command argument to specify any multiprotocol BGP command that is supported. ToDevice# show ip bgp ipv4 multicast see the supported commands, use the ? prompt on the CLI. (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | paths regexp | dampened-routes | received prefix-filter] Step 16 Example: Device# show ip bgp neighbors 192.168.3.2 Examples The following sample output from the show ip bgp ipv4 multicast command shows BGP IPv4 multicast information for Router B in the figure above after this task has been configured on Router B and Router E. Note that the networks local to each device that were configured under IPv4multicast address family appear in the output table. BGP table version is 3, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.2.2.0/24 192.168.3.2 0 0 50000 i *> 172.17.1.0/24 0.0.0.0 0 32768 i The following partial sample output from the show ip bgp neighbors command for neighbor 192.168.3.2 shows general BGP information and specific BGP IPv4 multicast address family information about the neighbor. The command was entered on Router B in the figure above after this task had been configured on Router B and Router E. BGP neighbor is 192.168.3.2, remote AS 50000, external link Description: finance BGP version 4, remote router ID 10.2.2.99 BGP state = Established, up for 01:48:27 Last read 00:00:26, last write 00:00:26, hold time is 120, keepalive intervals Configured hold time is 120,keepalive interval is 70 seconds, Minimum holdtims Neighbor capabilities: Route refresh: advertised and received (old & new) Address family IPv4 Unicast: advertised Address family IPv4 Multicast: advertised and received ! For address family: IPv4 Multicast BGP table version 3, neighbor version 3/0 Output queue size : 0 Index 1, Offset 0, Mask 0x2 1 update-group member Uses NEXT_HOP attribute for MBGP NLRIs Sent Rcvd Prefix activity: ---- ----Prefixes Current: 1 1 (Consumes 48 bytes) Prefixes Total: 1 1 Implicit Withdraw: 0 0 Explicit Withdraw: 0 0 Used as bestpath: n/a 1 Used as multipath: n/a 0 Outbound Inbound Local Policy Denied Prefixes: -------- ------- Bestpath from this peer: 1 n/a Total: 1 0 Number of NLRIs in the update sent: max 0, min 0 Minimum time between advertisement runs is 25 seconds Connections established 8; dropped 7 Last reset 01:48:54, due to User reset Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Connection is ECN Disabled Local host: 192.168.3.1, Local port: 13172 Foreign host: 192.168.3.2, Foreign port: 179 ! Removing BGP Configuration Commands Using a Redistribution BGP CLI configuration can become quite complex even in smaller BGP networks. If you need to remove any CLI configuration, you must consider all the implications of removing the CLI. Analyze the current running configuration to determine the current BGP neighbor relationships, any address family considerations, and even other routing protocols that are configured. Many BGP CLI commands affect other parts of the CLI configuration. Perform this task to remove all the BGP configuration commands used in a redistribution of BGP routes into EIGRP. A route map can be used to match and set parameters or to filter the redistributed routes to ensure that routing loops are not created when these routes are subsequently advertised by EIGRP. When removing BGP configuration commands you must remember to remove or disable all the related commands. In this example, if the route-map command is omitted, then the redistribution will still occur and possibly with unexpected results as the route map filtering has been removed. Omitting just the redistribute command wouldmean that the route map is not applied, but it would leave unused commands in the running configuration. For more details on BGP CLI removal, see the “BGP CLI Removal Considerations” concept in the “Cisco BGP Overview” module. To view the redistribution configuration before and after the CLI removal, see the “Examples: Removing BGP Configuration Commands Using a Redistribution Example” section. SUMMARY STEPS 1. enable 2. configure terminal 3. no route-map map-name 4. router eigrp autonomous-system-number 5. no redistribute protocol [as-number] 6. end 7. show running-config DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Removes a route map from the running configuration.no route-map map-nameStep 3 Example: In this example, a route map named bgp-to-eigrp is removed from the configuration. Device(config)# no route-map bgp-to-eigrp Enters router configuration mode for the specified routing process. router eigrp autonomous-system-number Example: Step 4 Device(config)# router eigrp 100 Disables the redistribution of routes from one routing domain into another routing domain. no redistribute protocol [as-number] Example: Step 5 In this example, the configuration of the redistribution of BGP routes into the EIGRP routing process is removed from the running configuration. Device(config-router)# no redistribute bgp 45000 PurposeCommand or Action If a route map was included in the original redistribute command configuration, remember to remove the route-map command configuration as in Step 3 in this example task. Note Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Exits router configurationmode and enters privileged EXEC mode. end Example: Step 6 Device(config-router)# end (Optional) Displays the current running configuration on the router. show running-config Example: Step 7 Use this command to verify that the redistribute and route-map commands are removed from the router configuration. Device# show running-config Monitoring and Maintaining Basic BGP The tasks in this section are concerned with the resetting and display of information about basic BGP processes and peer relationships. Once you have defined two routers to be BGP neighbors, they will form a BGP connection and exchange routing information. If you subsequently change a BGP filter, weight, distance, version, or timer, or make a similar configuration change, you may have to reset BGP connections for the configuration change to take effect. Configuring Inbound Soft Reconfiguration When Route Refresh Capability Is Missing Perform this task to configure inbound soft reconfiguration using the bgp soft-reconfig-backup command for BGP peers that do not support the route refresh capability. BGP peers that support the route refresh capability are unaffected by the configuration of this command. Note that the memory requirements for storing the inbound update information can become quite large. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. bgp log-neighbor-changes 5. bgp soft-reconfig-backup 6. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 7. neighbor {ip-address | peer-group-name} soft-reconfiguration [inbound] 8. neighbor {ip-address | peer-group-name} route-map map-name {in | out} 9. Repeat Steps 6 through 8 for every peer that is to be configured with inbound soft reconfiguration. 10. exit 11. route-map map-name [permit | deny] [sequence-number] 12. set ip next-hop ip-address 13. end 14. show ip bgp neighbors [neighbor-address] 15. show ip bgp [network] [network-mask] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Enables logging of BGP neighbor resets.bgp log-neighbor-changes Example: Step 4 Device(config-router)# bgp log-neighbor-changes Configures a BGP speaker to perform inbound soft reconfiguration for peers that do not support the route refresh capability. bgp soft-reconfig-backup Example: Device(config-router)# bgp soft-reconfig-backup Step 5 This command is used to configure BGP to perform inbound soft reconfiguration for peers that do not support the route refresh capability. The configuration of this command allows you to configure BGP to store updates (soft reconfiguration) only as necessary. Peers that support the route refresh capability are unaffected by the configuration of this command. Adds the IP address of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 6 Device(config-router)# neighbor 192.168.1.2 remote-as 40000 PurposeCommand or Action Configures the Cisco software to start storing updates.neighbor {ip-address | peer-group-name} soft-reconfiguration [inbound] Step 7 All the updates received from this neighbor will be stored unmodified, regardless of the inbound policy.Example: When inbound soft reconfiguration is done later, the Device(config-router)# neighbor 192.168.1.2 soft-reconfiguration inbound stored information will be used to generate a new set of inbound updates. Applies a route map to incoming or outgoing routes.neighbor {ip-address | peer-group-name} route-map map-name {in | out} Step 8 In this example, the route map named LOCAL will be applied to incoming routes.Example: Device(config-router)# neighbor 192.168.1.2 route-map LOCAL in —Repeat Steps 6 through 8 for every peer that is to be configured with inbound soft reconfiguration. Step 9 Exits router configuration mode and enters global configuration mode. exit Example: Step 10 Device(config-router)# exit Configures a route map and enters route-map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 11 Example: In this example, a route map named LOCAL is created. Device(config)# route-map LOCAL permit 10 Specifies where output packets that pass a match clause of a route map for policy routing. set ip next-hop ip-address Example: Step 12 In this example, the ip address is set to 192.168.1.144. Device(config-route-map)# set ip next-hop 192.168.1.144 Exits route-map configuration mode and enters privileged EXEC mode. end Example: Step 13 Device(config-route-map)# end (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [neighbor-address] Example: Step 14 Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Device# show ip bgp neighbors 192.168.1.2 (Optional) Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 15 Example: PurposeCommand or Action Device# show ip bgp Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Examples The following partial output from the show ip bgp neighbors command shows information about the TCP and BGP connections to the BGP neighbor 192.168.2.1. This peer supports route refresh. BGP neighbor is 192.168.1.2, remote AS 40000, external link Neighbor capabilities: Route refresh: advertised and received(new) The following partial output from the show ip bgp neighbors command shows information about the TCP and BGP connections to the BGP neighbor 192.168.3.2. This peer does not support route refresh so the soft-reconfig inbound paths for BGP peer 192.168.3.2 will be stored because there is no other way to update any inbound policy updates. BGP neighbor is 192.168.3.2, remote AS 50000, external link Neighbor capabilities: Route refresh: advertised The following sample output from the show ip bgp command shows the entry for the network 172.17.1.0. Both BGP peers are advertising 172.17.1.0/24, but only the received-only path is stored for 192.168.3.2. BGP routing table entry for 172.17.1.0/24, version 11 Paths: (3 available, best #3, table Default-IP-Routing-Table, RIB-failure(4)) Flag: 0x820 Advertised to update-groups: 1 50000 192.168.3.2 from 192.168.3.2 (172.17.1.0) Origin incomplete, metric 0, localpref 200, valid, external 50000, (received-only) 192.168.3.2 from 192.168.3.2 (172.17.1.0) Origin incomplete, metric 0, localpref 100, valid, external 40000 192.168.1.2 from 192.168.1.2 (172.16.1.0) Origin incomplete, metric 0, localpref 200, valid, external, best Resetting and Displaying Basic BGP Information Perform this task to reset and display information about basic BGP processes and peer relationships. SUMMARY STEPS 1. enable 2. clear ip bgp {* | autonomous-system-number | neighbor-address} [soft [in | out] ] 3. show ip bgp [network-address] [network-mask] [longer-prefixes] [prefix-list prefix-list-name | route-map route-map-name] [shorter prefixes mask-length] 4. show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | paths regexp | dampened-routes | received prefix-filter] 5. show ip bgp paths 6. show ip bgp summary DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Clears and resets BGP neighbor sessions:clear ip bgp {* | autonomous-system-number | neighbor-address} [soft [in | out] ] Step 2 In the example provided, all BGP neighbor sessions are cleared and reset.Example: Device# clear ip bgp * Displays all the entries in the BGP routing table:show ip bgp [network-address] [network-mask] [longer-prefixes] [prefix-list prefix-list-name | route-map route-map-name] [shorter prefixes mask-length] Step 3 In the example provided, the BGP routing table information for the 10.1.1.0 network is displayed. Example: Device# show ip bgp 10.1.1.0 255.255.255.0 Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | paths regexp | dampened-routes | received prefix-filter] Step 4 In the example provided, the routes advertised from the device to BGP neighbor 192.168.3.2 on another device are displayed. Example: Device# show ip bgp neighbors 192.168.3.2 advertised-routes Displays information about all the BGP paths in the database. show ip bgp paths Example: Step 5 Device# show ip bgp paths Displays information about the status of all BGP connections. show ip bgp summary Example: Step 6 Device# show ip bgp summary Aggregating Route Prefixes Using BGP BGP peers exchange information about local networks, but this can quickly lead to large BGP routing tables. CIDR enables the creation of aggregate routes (or supernets) to minimize the size of routing tables. Smaller BGP routing tables can reduce the convergence time of the network and improve network performance. Aggregated routes can be configured and advertised using BGP. Some aggregations advertise only summary routes and other methods of aggregating routes allow more specific routes to be forwarded. Aggregation applies only to routes that exist in the BGP routing table. An aggregated route is forwarded if at least one more specific route of the aggregation exists in the BGP routing table. Perform one of the following tasks to aggregate routes within BGP: Redistributing a Static Aggregate Route into BGP Use this task to redistribute a static aggregate route into BPG. A static aggregate route is configured and then redistributed into the BGP routing table. The static route must be configured to point to interface null 0 and the prefix should be a superset of known BGP routes. When a device receives a BGP packet, it will use the more specific BGP routes. If the route is not found in the BGP routing table, then the packet will be forwarded to null 0 and discarded. SUMMARY STEPS 1. enable 2. configure terminal 3. ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name] [permanent | track number] [tag tag] 4. router bgp autonomous-system-number 5. redistribute static 6. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Creates a static route.ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name] [permanent | track number] [tag tag] Step 3 Example: Device(config)# ip route 172.0.0.0 255.0.0.0 null 0 PurposeCommand or Action Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 4 Device(config)# router bgp 45000 Redistributes routes into the BGP routing table.redistribute static Example: Step 5 Device(config-router)# redistribute static Exits router configuration mode and returns to privileged EXEC mode. end Example: Step 6 Device(config-router)# end Configuring Conditional Aggregate Routes Using BGP Use this task to create an aggregate route entry in the BGP routing table when at least one specific route falls into the specified range. The aggregate route is advertised as originating from your autonomous system. For more information, see the “BGP Route Aggregation Generating AS_SET Information” section. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. aggregate-address address mask [as-set] 5. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 PurposeCommand or Action Creates an aggregate entry in a BGP routing table.aggregate-address address mask [as-set]Step 4 Example: A specified route must exist in the BGP table. Device(config-router)# aggregate-address 172.0.0.0 255.0.0.0 as-set Use the aggregate-address command with no keywords to create an aggregate entry if any more-specific BGP routes are available that fall in the specified range. Use the as-set keyword to specify that the path advertised for this route is an AS_SET. Do not use the as-set keyword when aggregating many paths because this route is withdrawn and updated every time the reachability information for the aggregated route changes. Only partial syntax is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Exits router configurationmode and enters privileged EXEC mode. end Example: Step 5 Device(config-router)# end Suppressing and Unsuppressing the Advertisement of Aggregated Routes Using BGP Use this task to create an aggregate route, suppress the advertisement of routes using BGP, and subsequently unsuppress the advertisement of routes. Routes that are suppressed are not advertised to any neighbors, but it is possible to unsuppress routes that were previously suppressed to specific neighbors. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. Do one of the following: aggregate-address address mask [summary-only] aggregate-address address mask [suppress-map map-name] 6. neighbor {ip-address | peer-group-name} unsuppress-map map-name 7. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 PurposeCommand or Action Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Adds the IP address of the neighbor in the specified autonomous system to the IPv4multiprotocol BGP neighbor table of the local device. neighbor ip-address remote-as autonomous-system-number Example: Step 4 Device(config-router)# neighbor 192.168.1.2 remote-as 40000 Creates an aggregate route.Do one of the following:Step 5 aggregate-address address mask [summary-only] Use the optional summary-only keyword to create the aggregate route (for example, 10.*.*.*) and also• aggregate-address address mask [suppress-map map-name] suppresses advertisements of more-specific routes to all neighbors. Example: Use the optional suppress-map keyword to create the aggregate route but suppress advertisement of specifiedDevice(config-router)# aggregate-address 172.0.0.0 255.0.0.0 summary-only routes. Routes that are suppressed are not advertised to any neighbors. You can use thematch clauses ofExample: route maps to selectively suppress somemore-specific Device(config-router)# aggregate-address 172.0.0.0 255.0.0.0 suppress-map map1 routes of the aggregate and leave others unsuppressed. IP access lists and autonomous system path access lists match clauses are supported. Only partial syntax is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note (Optional) Selectively advertises routes previously suppressed by the aggregate-address command. neighbor {ip-address | peer-group-name} unsuppress-map map-name Step 6 Example: In this example, the routes previously suppressed in Step 5 are advertised to neighbor 192.168.1.2. Device(config-router)# neighbor 192.168.1.2 unsuppress map1 PurposeCommand or Action Exits router configurationmode and enters privileged EXEC mode. end Example: Step 7 Device(config-router)# end Suppressing Inactive Route Advertisement Using BGP Perform this task to suppress the advertisement of inactive routes by BGP. In Cisco IOS Release 12.2(25)S, 12.2(33)SXH, and 15.0(1)M, the bgp suppress-inactive command was introduced to configure BGP to not advertise inactive routes to any BGP peer. A BGP routing process can advertise routes that are not installed in the RIB to BGP peers by default. A route that is not installed into the RIB is an inactive route. Inactive route advertisement can occur, for example, when routes are advertised through common route aggregation. Inactive route advertisements can be suppressed to provide more consistent data forwarding. This feature can be configured on a per IPv4 address family basis. For example, when specifying the maximum number of routes that can be configured in a VRF with themaximum routes global configuration command, you also suppress inactive route advertisement to prevent inactive routes from being accepted into the VRF after route limit has been exceeded. Before you begin This task assumes that BGP is enabled and that peering has been established. Inactive route suppression can be configured only under the IPv4 address family or under a default IPv4 general session. > Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. address-family {ipv4 [mdt |multicast | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast]} 5. bgp suppress-inactive 6. end 7. show ip bgp rib-failure DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable PurposeCommand or Action Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configurationmode and creates a BGP routing process. router bgp as-number Example: Step 3 Router(config)# router bgp 45000 Enter address family configuration mode to configure BGP peers to accept address family specific configurations. address-family {ipv4 [mdt |multicast | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast]} Step 4 Example: The example creates an IPv4 unicast address family session. Router(config-router)# address-family ipv4 unicast Suppresses BGP advertising of inactive routes.bgp suppress-inactiveStep 5 Example: BGP advertises inactive routes by default. Router(config-router-af)# bgp suppress-inactive • Entering the no form of this command reenables the advertisement of inactive routes. Exits address family configuration mode and enters privileged EXEC mode. end Example: Step 6 Router(config-router-af)# end (Optional) Displays BGP routes that are not installed in the RIB. show ip bgp rib-failure Example: Step 7 Router# show ip bgp rib-failure Examples The following example shows output from the show ip bgp rib-failure command displaying routes that are not installed in the RIB. The output shows that the displayed routes were not installed because a route or routes with a better administrative distance already exist in the RIB. Router# show ip bgp rib-failure Network Next Hop RIB-failure RIB-NH Matches 10.1.15.0/24 10.1.35.5 Higher admin distance n/a 10.1.16.0/24 10.1.15.1 Higher admin distance n/a Conditionally Advertising BGP Routes Perform this task to conditionally advertise selected BGP routes. The routes or prefixes that will be conditionally advertised are defined in two route maps: an advertise map and either an exist map or nonexist map. The route map associated with the exist map or nonexist map specifies the prefix that the BGP speaker will track. The route map associated with the advertise map specifies the prefix that will be advertised to the specified neighbor when the condition is met. If a prefix is found to be present in the exist map by the BGP speaker, the prefix specified by the advertise map is advertised. If a prefix is found not to be present in the nonexist map by the BGP speaker, the prefix specified by the advertise map is advertised. If the condition is not met, the route is withdrawn and conditional advertisement does not occur. All routes that may be dynamically advertised or not advertisedmust exist in the BGP routing table in order for conditional advertisement to occur. These routes are referenced from an access list or an IP prefix list. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. neighbor ip-address advertise-map map-name {exist-mapmap-name | non-exist-mapmap-name} 6. exit 7. route-map map-tag [permit | deny] [sequence-number] 8. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} 9. exit 10. route-map map-tag [permit | deny] [sequence-number] 11. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} 12. exit 13. access-list access-list-number {deny | permit} source [source-wildcard] [log] 14. access-list access-list-number {deny | permit} source [source-wildcard] [log] 15. exit DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 PurposeCommand or Action Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Adds the IP address of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 Device(config-router)# neighbor 192.168.1.2 remote-as 40000 Adds the IP address of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor ip-address advertise-map map-name {exist-map map-name | non-exist-map map-name} Example: Step 5 In this example, the prefix (172.17.0.0) matching the ACL in the advertise map (the route map namedDevice(config-router)# neighbor 192.168.1.2 advertise-map map1 exist-map map2 map1) will be advertised to the neighbor only when a prefix (192.168.50.0) matching the ACL in exist map (the route-map namedmap2) is in the local BGP table. Exits router configuration mode and enters global configuration mode. exit Example: Step 6 Device(config-router)# exit Configures a route map and enters route map configuration mode. route-map map-tag [permit | deny] [sequence-number] Example: Step 7 In this example, a route map named map1 is created. Device(config)# route-map map1 permit 10 Configures the route map tomatch a prefix that is permitted by a standard access list, an extended access list, or a prefix list. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} Step 8 In this example, the route map is configured to match a prefix permitted by access list 1.Example: Device(config-route-map)# match ip address 1 Exits route map configuration mode and enters global configuration mode. exit Example: Step 9 Device(config-route-map)# exit PurposeCommand or Action Configures a route map and enters route map configuration mode. route-map map-tag [permit | deny] [sequence-number] Example: Step 10 In this example, a route map named map2 is created. Device(config)# route-map map2 permit 10 Configures the route map tomatch a prefix that is permitted by a standard access list, an extended access list, or a prefix list. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} Step 11 In this example, the route map is configured to match a prefix permitted by access list 2.Example: Device(config-route-map)# match ip address 2 Exits route map configuration mode and enters global configuration mode. exit Example: Step 12 Device(config-route-map)# exit Configures a standard access list.access-list access-list-number {deny | permit} source [source-wildcard] [log] Step 13 In this example, access list 1 permits advertising of the 172.17.0.0 prefix, depending on other conditions set by the neighbor advertise-map command. Example: Device(config)# access-list 1 permit 172.17.0.0 Configures a standard access list.access-list access-list-number {deny | permit} source [source-wildcard] [log] Step 14 In this example, access list 2 permits the 192.168.50.0 to be the prefix of the exist-map.Example: Device(config)# access-list 2 permit 192.168.50.0 Exits global configuration mode and returns to privileged EXEC mode. exit Example: Step 15 Device(config)# exit Originating BGP Routes Route aggregation is useful to minimize the size of the BGP table, but there are situations when you want to add more specific prefixes to the BGP table. Route aggregation can hide more specific routes. Using the network command as shown in the “Configuring a BGP Routing Process” section originates routes, and the following optional tasks originate BGP routes for the BGP table for different situations. Advertising a Default Route Using BGP Perform this task to advertise a default route to BGP peers. The default route is locally originated. A default route can be useful to simplify configuration or to prevent the device from using too many system resources. If the device is peered with an Internet service provider (ISP), the ISP will carry full routing tables, so configuring a default route into the ISP network saves resources at the local device. SUMMARY STEPS 1. enable 2. configure terminal 3. ip prefix-list list-name [seq seq-value] {deny network / length | permit network / length} [ge ge-value] [le le-value] 4. route-map map-tag [permit | deny] [sequence-number] 5. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} 6. exit 7. router bgp autonomous-system-number 8. neighbor {ip-address | peer-group-name} default-originate [route-map map-name] 9. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Configures an IP prefix list.ip prefix-list list-name [seq seq-value] {deny network / length | permit network / length} [ge ge-value] [le le-value] Step 3 In this example, prefix list DEFAULT permits advertising of the 10.1.1.0/24. prefix depending on a match set by thematch ip address command. Example: Device(config)# ip prefix-list DEFAULT permit 10.1.1.0/24 Configures a route map and enters route map configuration mode. route-map map-tag [permit | deny] [sequence-number] Example: Step 4 In this example, a route map named ROUTE is created. Device(config)# route-map ROUTE Configures the route map to match a prefix that is permitted by a standard access list, an extended access list, or a prefix list. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} Step 5 In this example, the route map is configured to match a prefix permitted by prefix list DEFAULT.Example: PurposeCommand or Action Device(config-route-map)# match ip address prefix-list DEFAULT Exits route map configuration mode and enters global configuration mode. exit Example: Step 6 Device(config-route-map)# exit Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 7 Device(config)# router bgp 40000 (Optional) Permits a BGP speaker--the local device--to send the default route 0.0.0.0 to a peer for use as a default route. neighbor {ip-address | peer-group-name} default-originate [route-map map-name] Example: Step 8 Device(config-router)# neighbor 192.168.3.2 default-originate Exits router configurationmode and enters privileged EXEC mode. end Example: Step 9 Device(config-router)# end Troubleshooting Tips Use the show ip route command on the receiving BGP peer (not on the local router) to verify that the default route has been set. In the output, verify that a line similar to the following showing the default route 0.0.0.0 is present: B* 0.0.0.0/0 [20/0] via 192.168.1.2, 00:03:10 Conditionally Injecting BGP Routes Use this task to inject more specific prefixes into a BGP routing table over less specific prefixes that were selected through normal route aggregation. These more specific prefixes can be used to provide a finer granularity of traffic engineering or administrative control than is possible with aggregated routes. For more information, see the “Conditional BGP Route Injection” section. Before you begin This task assumes that the IGP is already configured for the BGP peers. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. bgp inject-map inject-map-name exist-map exist-map-name [copy-attributes] 5. exit 6. route-map map-tag [permit | deny] [sequence-number] 7. match ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} 8. match ip route-source {access-list-number | access-list-name} [access-list-number...| access-list-name...] 9. exit 10. route-map map-tag [permit | deny] [sequence-number] 11. set ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} 12. set community {community-number [additive] [well-known-community] | none} 13. exit 14. ip prefix-list list-name [seq seq-value] {deny network/length | permit network/length} [ge ge-value] [le le-value] 15. Repeat Step 14 for every prefix list to be created. 16. exit 17. show ip bgp injected-paths DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 40000 Specifies the inject map and the exist map for conditional route injection. bgp inject-map inject-map-name exist-map exist-map-name [copy-attributes] Step 4 Example: Use the copy-attributes keyword to specify that the injected route inherit the attributes of the aggregate route.Router(config-router)# bgp inject-map ORIGINATE exist-map LEARNED_PATH Exits router configuration mode and enters global configuration mode. exit Example: Step 5 Router(config-router)# exit PurposeCommand or Action Configures a route map and enters route map configuration mode. route-map map-tag [permit | deny] [sequence-number] Example: Step 6 Router(config)# route-map LEARNED_PATH permit 10 Specifies the aggregate route to which a more specific route will be injected. match ip address {access-list-number [access-list-number... | access-list-name...] | Step 7 access-list-name [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} In this example, the prefix list named SOURCE is used to redistribute the source of the route. Example: Router(config-route-map)# match ip address prefix-list SOURCE Specifies the match conditions for redistributing the source of the route. match ip route-source {access-list-number | access-list-name} [access-list-number...| access-list-name...] Step 8 In this example, the prefix list named ROUTE_SOURCE is used to redistribute the source of the route. Example: Router(config-route-map)# match ip route-source prefix-list ROUTE_SOURCE The route source is the neighbor address that is configured with the neighbor remote-as command. The tracked prefix must come from this neighbor in order for conditional route injection to occur. Note Exits route map configuration mode and enters global configuration mode. exit Example: Step 9 Router(config-route-map)# exit Configures a route map and enters route map configuration mode. route-map map-tag [permit | deny] [sequence-number] Example: Step 10 Router(config)# route-map ORIGINATE permit 10 Specifies the routes to be injected.set ip address {access-list-number [access-list-number... | access-list-name...] | access-list-name Step 11 In this example, the prefix list named originated_routes is used to redistribute the source of the route. [access-list-number... | access-list-name] | prefix-list prefix-list-name [prefix-list-name...]} Example: Router(config-route-map)# set ip address prefix-list ORIGINATED_ROUTES Sets the BGP community attribute of the injected route.set community {community-number [additive] [well-known-community] | none} Step 12 PurposeCommand or Action Example: Router(config-route-map)# set community 14616:555 additive Exits route map configuration mode and enters global configuration mode. exit Example: Step 13 Router(config-route-map)# exit Configures a prefix list.ip prefix-list list-name [seq seq-value] {deny network/length | permit network/length} [ge ge-value] [le le-value] Step 14 In this example, the prefix list named SOURCE is configured to permit routes from network 10.1.1.0/24. Example: Router(config)# ip prefix-list SOURCE permit 10.1.1.0/24 --Repeat Step 14 for every prefix list to be created.Step 15 Exits global configuration mode and returns to privileged EXEC mode. exit Example: Step 16 Router(config)# exit (Optional) Displays information about injected paths.show ip bgp injected-paths Example: Step 17 Router# show ip bgp injected-paths Examples The following sample output is similar to the output that will be displayed when the show ip bgp injected-pathscommand is entered: Router# show ip bgp injected-paths BGP table version is 11, local router ID is 10.0.0.1 Status codes:s suppressed, d damped, h history, * valid, > best, i -internal Origin codes:i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 172.16.0.0 10.0.0.2 0 ? *> 172.17.0.0/16 10.0.0.2 0 ? Troubleshooting Tips BGP conditional route injection is based on the injection of a more specific prefix into the BGP routing table when a less specific prefix is present. If conditional route injection is not working properly, verify the following: If conditional route injection is configured but does not occur, verify the existence of the aggregate prefix in the BGP routing table. The existence (or not) of the tracked prefix in the BGP routing table can be verified with the show ip bgpcommand. If the aggregate prefix exists but conditional route injection does not occur, verify that the aggregate prefix is being received from the correct neighbor and the prefix list identifying that neighbor is a /32 match. Verify the injection (or not) of the more specific prefix using the show ip bgp injected-pathscommand. Verify that the prefix that is being injected is not outside of the scope of the aggregate prefix. Ensure that the inject route map is configured with the set ip address command and not thematch ip address command. Originating BGP Routes Using Backdoor Routes Use this task to indicate to border devices which networks are reachable using a backdoor route. A backdoor network is treated the same as a local network, except that it is not advertised. For more information, see the BGP Backdoor Routes section. Before you begin This task assumes that the IGP (EIGRP, in this example) is already configured for the BGP peers. The configuration is done at Router B in the in the “BGP Backdoor Routes” section, and the BGP peer is Router D. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. network ip-address backdoor 6. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 PurposeCommand or Action Device(config)# router bgp 45000 Adds the IP address of the neighbor in the specified autonomous system to the multiprotocol BGP neighbor table of the local device. neighbor ip-address remote-as autonomous-system-number Example: Step 4 In this example, the peer is an internal peer as the autonomous system number specified for the peer is the same number specified in Step 3. Device(config-router)# neighbor 172.22.1.2 remote-as 45000 Indicates a network that is reachable through a backdoor route. network ip-address backdoor Example: Step 5 Device(config-router)# network 172.21.1.0 backdoor Exits router configuration mode and returns to privileged EXEC mode. end Example: Step 6 Device(config-router)# end Configuring a BGP Peer Group This task explains how to configure a BGP peer group. Often, in a BGP speaker, many neighbors are configured with the same update policies (that is, the same outbound route maps, distribute lists, filter lists, update source, and so on). Neighbors with the same update policies can be grouped into peer groups to simplify configuration and, more importantly, to make updating more efficient. When you have many peers, this approach is highly recommended. The three steps to configure a BGP peer group, described in the following task, are as follows: Creating the peer group Assigning options to the peer group Making neighbors members of the peer group You can disable a BGP peer or peer group without removing all the configuration information using the neighbor shutdown router configuration command. By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes, neighbors must also be activated using the neighbor activate command in address family configuration mode for the other prefix types. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor peer-group-name peer-group 5. neighbor ip-address remote-as autonomous-system-number 6. neighbor ip-address peer-group peer-group-name 7. address-family ipv4 [unicast |multicast | vrf vrf-name] 8. neighbor peer-group-name activate 9. neighbor ip-address peer-group peer-group-name 10. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 40000 Creates a BGP peer group.neighbor peer-group-name peer-group Example: Step 4 Device(config-router)# neighbor fingroup peer-group Adds the IP address of the neighbor in the specified autonomous system to the multiprotocol BGP neighbor table of the local device. neighbor ip-address remote-as autonomous-system-number Example: Step 5 Device(config-router)# neighbor 192.168.1.1 remote-as 45000 Assigns the IP address of a BGP neighbor to a peer group.neighbor ip-address peer-group peer-group-name Example: Step 6 Device(config-router)# neighbor 192.168.1.1 peer-group fingroup PurposeCommand or Action Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 7 The unicast keyword specifies the IPv4 unicast address family. This is the default.Device(config-router)# address-family ipv4 multicast Themulticast keyword specifies that IPv4 multicast address prefixes will be exchanged. The vrf keyword and vrf-name argument specify that IPv4 VRF instance information will be exchanged. Enables the neighbor to exchange prefixes for the IPv4 address family with the local device. neighbor peer-group-name activate Example: Step 8 By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only unicast address prefixes. To allow BGP to exchange other address prefix types, such as multicast that is configured in this example, neighbors must also be activated using the neighbor activate command. Note Device(config-router-af)# neighbor fingroup activate Assigns the IP address of a BGP neighbor to a peer group.neighbor ip-address peer-group peer-group-name Example: Step 9 Device(config-router-af)# neighbor 192.168.1.1 peer-group fingroup Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 10 Device(config-router-af)# end Configuring Peer Session Templates The following tasks create and configure a peer session template: Configuring a Basic Peer Session Template Perform this task to create a basic peer session template with general BGP routing session commands that can be applied to many neighbors using one of the next two tasks. The commands in Step 5 and 6 are optional and could be replaced with any supported general session commands. Note The following restrictions apply to the peer session templates: A peer session template can directly inherit only one session template, and each inherited session template can also contain one indirectly inherited session template. So, a neighbor or neighbor group can be configured with only one directly applied peer session template and seven additional indirectly inherited peer session templates. A BGP neighbor cannot be configured to work with both peer groups and peer templates. A BGP neighbor can be configured to belong only to a peer group or to inherit policies only from peer templates. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. template peer-session session-template-name 5. remote-as autonomous-system-number 6. timers keepalive-interval hold-time 7. end 8. show ip bgp template peer-session [session-template-name] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configurationmode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 101 Enters session-template configuration mode and creates a peer session template. template peer-session session-template-name Example: Step 4 Router(config-router)# template peer-session INTERNAL-BGP (Optional) Configures peering with a remote neighbor in the specified autonomous system. remote-as autonomous-system-number Example: Step 5 PurposeCommand or Action Router(config-router-stmp)# remote-as 202 Any supported general session command can be used here. For a list of the supported commands, see the “Restrictions” section. Note (Optional) Configures BGP keepalive and hold timers.timers keepalive-interval hold-timeStep 6 Example: The hold timemust be at least twice the keepalive time. Router(config-router-stmp)# timers 30 300 Any supported general session command can be used here. For a list of the supported commands, see the “Restrictions” section. Note Exits session-template configuration mode and returns to privileged EXEC mode. end Example: Step 7 Router(config-router)# end Displays locally configured peer session templates.show ip bgp template peer-session [session-template-name] Step 8 The output can be filtered to display a single peer policy template with the session-template-nameExample: argument. This command also supports all standard output modifiers.Router# show ip bgp template peer-session What to Do Next After the peer session template is created, the configuration of the peer session template can be inherited or applied by another peer session template with the inherit peer-session or neighbor inherit peer-session command. Configuring Peer Session Template Inheritance with the inherit peer-session Command This task configures peer session template inheritance with the inherit peer-session command. It creates and configures a peer session template and allows it to inherit a configuration from another peer session template. The commands in Steps 5 and 6 are optional and could be replaced with any supported general session commands. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. template peer-session session-template-name 5. description text-string 6. update-source interface-type interface-number 7. inherit peer-session session-template-name 8. end 9. show ip bgp template peer-session [session-template-name] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configurationmode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 101 Enter session-template configuration mode and creates a peer session template. template peer-session session-template-name Example: Step 4 Router(config-router)# template peer-session CORE1 (Optional) Configures a description.description text-stringStep 5 Example: The text string can be up to 80 characters. Router(config-router-stmp)# description CORE-123 Any supported general session command can be used here. For a list of the supported commands, see the “Restrictions” section. Note (Optional) Configures a router to select a specific source or interface to receive routing table updates. update-source interface-type interface-number Example: Step 6 The example uses a loopback interface. The advantage to this configuration is that the loopback interface is not as susceptible to the effects of a flapping interface. Router(config-router-stmp)# update-source loopback 1 Any supported general session command can be used here. For a list of the supported commands, see the “Restrictions” section. Note Configures this peer session template to inherit the configuration of another peer session template. inherit peer-session session-template-name Example: Step 7 PurposeCommand or Action Router(config-router-stmp)# inherit peer-session INTERNAL-BGP The example configures this peer session template to inherit the configuration from INTERNAL-BGP. This template can be applied to a neighbor, and the configuration INTERNAL-BGP will be applied indirectly. No additional peer session templates can be directly applied. However, the directly inherited template can contain up to seven indirectly inherited peer session templates. Exits session-template configuration mode and enters privileged EXEC mode. end Example: Step 8 Router(config-router)# end Displays locally configured peer session templates.show ip bgp template peer-session [session-template-name] Step 9 The output can be filtered to display a single peer policy template with the optionalExample: session-template-name argument. This command also supports all standard output modifiers.Router# show ip bgp template peer-session What to Do Next After the peer session template is created, the configuration of the peer session template can be inherited or applied by another peer session template with the inherit peer-session or neighbor inherit peer-session command. Configuring Peer Session Template Inheritance with the neighbor inherit peer-session Command This task configures a router to send a peer session template to a neighbor to inherit the configuration from the specified peer session template with the neighbor inherit peer-session command. Use the following steps to send a peer session template configuration to a neighbor to inherit. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. neighbor ip-address inherit peer-session session-template-name 6. end 7. show ip bgp template peer-session [session-template-name] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 PurposeCommand or Action Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configurationmode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 101 Configures a peering session with the specified neighbor.neighbor ip-address remote-as autonomous-system-number Step 4 The explicit remote-as statement is required for the neighbor inherit statement in Step 5 to work. If aExample: peering is not configured, the specified neighbor in Step 5 will not accept the session template.Router(config-router)# neighbor 172.16.0.1 remote-as 202 Sends a peer session template to a neighbor so that the neighbor can inherit the configuration. neighbor ip-address inherit peer-session session-template-name Step 5 Example: The example configures a router to send the peer session template named CORE1 to the 172.16.0.1 Router(config-router)# neighbor 172.16.0.1 inherit peer-session CORE1 neighbor to inherit. This template can be applied to a neighbor, and if another peer session template is indirectly inherited in CORE1, the indirectly inherited configuration will also be applied. No additional peer session templates can be directly applied. However, the directly inherited template can also inherit up to seven additional indirectly inherited peer session templates. Exits router configurationmode and enters privileged EXEC mode. end Example: Step 6 Router(config-router)# end Displays locally configured peer session templates.show ip bgp template peer-session [session-template-name] Step 7 The output can be filtered to display a single peer policy template with the optionalExample: session-template-name argument. This command also supports all standard output modifiers.Router# show ip bgp template peer-session What to Do Next To create a peer policy template, go to the Configuring Peer Policy Templates, on page 136. Configuring Peer Policy Templates Configuring Basic Peer Policy Templates Perform this task to create a basic peer policy template with BGP policy configuration commands that can be applied to many neighbors using one of the next two tasks. The commands in Steps 5 through 7 are optional and could be replaced with any supported BGP policy configuration commands. Note The following restrictions apply to the peer policy templates: A peer policy template can directly or indirectly inherit up to eight peer policy templates. A BGP neighbor cannot be configured to work with both peer groups and peer templates. A BGP neighbor can be configured to belong only to a peer group or to inherit policies only from peer templates. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. template peer-policy policy-template-name 5. maximum-prefix prefix-limit [threshold] [restart restart-interval | warning-only] 6. weight weight-value 7. prefix-list prefix-list-name {in | out} 8. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal PurposeCommand or Action Enters router configurationmode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Enters policy-template configuration mode and creates a peer policy template. template peer-policy policy-template-name Example: Step 4 Device(config-router)# template peer-policy GLOBAL (Optional) Configures the maximum number of prefixes that a neighbor will accept from this peer. maximum-prefix prefix-limit [threshold] [restart restart-interval | warning-only] Step 5 Example: Any supported BGP policy configuration command can be used here. For a list of the supported commands, see the “Peer Policy Templates” section. Note Device(config-router-ptmp)# maximum-prefix 10000 (Optional) Sets the default weight for routes that are sent from this neighbor. weight weight-value Example: Step 6 Any supported BGP policy configuration command can be used here. For a list of the supported commands, see the “Peer Policy Templates” section. Note Device(config-router-ptmp)# weight 300 (Optional) Filters prefixes that are received by the router or sent from the router. prefix-list prefix-list-name {in | out} Example: Step 7 The prefix list in the example filters inbound internal addresses.Device(config-router-ptmp)# prefix-list NO-MARKETING in Any supported BGP policy configuration command can be used here. For a list of the supported commands, see the “Peer Policy Templates” section. Note Exits policy-template configuration mode and returns to privileged EXEC mode. end Example: Step 8 Device(config-router-ptmp)# end What to Do Next After the peer policy template is created, the configuration of the peer policy template can be inherited or applied by another peer policy template. For details about peer policy inheritance, see the “Configuring Peer Policy Template Inheritance with the inherit peer-policy Command” section or the “Configuring Peer Policy Template Inheritance with the neighbor inherit peer-policy Command” section. Configuring Peer Policy Template Inheritance with the inherit peer-policy Command This task configures peer policy template inheritance using the inherit peer-policycommand. It creates and configure a peer policy template and allows it to inherit a configuration from another peer policy template. When BGP neighbors use inherited peer templates, it can be difficult to determine which policies are associated with a specific template. In Cisco IOS Release 12.0(25)S, 12.4(11)T, 12.2(33)SRB, 12.2(33)SB, and later releases, the detail keyword was added to the show ip bgp template peer-policy command to display the detailed configuration of local and inherited policies associated with a specific template. The commands in Steps 5 and 6 are optional and could be replacedwith any supported BGP policy configuration commands. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. template peer-policy policy-template-name 5. route-map map-name {in| out} 6. inherit peer-policy policy-template-name sequence-number 7. end 8. show ip bgp template peer-policy [policy-template-name[detail]] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configurationmode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 45000 Enter policy-template configuration mode and creates a peer policy template. template peer-policy policy-template-name Example: Step 4 Router(config-router)# template peer-policy NETWORK1 PurposeCommand or Action (Optional) Applies the specified route map to inbound or outbound routes. route-map map-name {in| out} Example: Step 5 Any supported BGP policy configuration command can be used here. For a list of the supported commands, see the Peer Policy Templates, on page 83. Note Router(config-router-ptmp)# route-map ROUTE in Configures the peer policy template to inherit the configuration of another peer policy template. inherit peer-policy policy-template-name sequence-number Step 6 Example: The sequence-number argument sets the order in which the peer policy template is evaluated. Like a route map Router(config-router-ptmp)# inherit peer-policy GLOBAL 10 sequence number, the lowest sequence number is evaluated first. The example configures this peer policy template to inherit the configuration from GLOBAL. If the template created in these steps is applied to a neighbor, the configuration GLOBAL will also be inherited and applied indirectly. Up to six additional peer policy templates can be indirectly inherited from GLOBAL for a total of eight directly applied and indirectly inherited peer policy templates. This template in the example will be evaluated first if no other templates are configured with a lower sequence number. Exits policy-template configuration mode and returns to privileged EXEC mode. end Example: Step 7 Router(config-router-ptmp)# end Displays locally configured peer policy templates.show ip bgp template peer-policy [policy-template-name[detail]] Step 8 The output can be filtered to display a single peer policy template with the policy-template-nameExample: argument. This command also supports all standard output modifiers.Router# show ip bgp template peer-policy NETWORK1 detail Use the detail keyword to display detailed policy information. The detail keyword is supported only in Cisco IOSRelease 12.0(25)S, 12.4(11)T, 12.2(33)SRB, 12.2(33)SB, and later releases. Note Examples The following sample output of the show ip bgp template peer-policy command with the detail keyword displays details of the policy named NETWORK1. The output in this example shows that the GLOBAL template was inherited. Details of route map and prefix list configurations are also displayed. Router# show ip bgp template peer-policy NETWORK1 detail Template:NETWORK1, index:2. Local policies:0x1, Inherited polices:0x80840 This template inherits: GLOBAL, index:1, seq_no:10, flags:0x1 Locally configured policies: route-map ROUTE in Inherited policies: prefix-list NO-MARKETING in weight 300 maximum-prefix 10000 Template:NETWORK1 Locally configured policies: route-map ROUTE in route-map ROUTE, permit, sequence 10 Match clauses: ip address prefix-lists: DEFAULT ip prefix-list DEFAULT: 1 entries seq 5 permit 10.1.1.0/24 Set clauses: Policy routing matches: 0 packets, 0 bytes Inherited policies: prefix-list NO-MARKETING in ip prefix-list NO-MARKETING: 1 entries seq 5 deny 10.2.2.0/24 Configuring Peer Policy Template Inheritance with the neighbor inherit peer-policy Command This task configures a router to send a peer policy template to a neighbor to inherit using the neighbor inherit peer-policy command. Perform the following steps to send a peer policy template configuration to a neighbor to inherit. When BGP neighbors use multiple levels of peer templates, it can be difficult to determine which policies are applied to the neighbor. In Cisco IOS Release 12.0(25)S, 12.4(11)T, 12.2(33)SRB, 12.2(33)SB, and later releases, the policy and detail keywords were added to the show ip bgp neighbors command to display the inherited policies and policies configured directly on the specified neighbor. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. address-family ipv4 [multicast | unicast | vrf vrf-name] 6. neighbor ip-address inherit peer-policy policy-template-name 7. end 8. show ip bgp neighbors [ip-address[policy [detail]]] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configurationmode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 45000 Configures a peering session with the specified neighbor.neighbor ip-address remote-as autonomous-system-number Step 4 The explicit remote-as statement is required for the neighbor inherit statement in Step 6 to work. If aExample: peering is not configured, the specified neighbor in Step 6 will not accept the session template.Router(config-router)# neighbor 192.168.1.2 remote-as 40000 Enters address family configuration mode to configure a neighbor to accept address family-specific command configurations. address-family ipv4 [multicast | unicast | vrf vrf-name] Example: Router(config-router)# address-family ipv4 unicast Step 5 Sends a peer policy template to a neighbor so that the neighbor can inherit the configuration. neighbor ip-address inherit peer-policy policy-template-name Step 6 Example: The example configures a router to send the peer policy template namedGLOBAL to the 192.168.1.2 neighbor Router(config-router-af)# neighbor 192.168.1.2 inherit peer-policy GLOBAL to inherit. This template can be applied to a neighbor, and if another peer policy template is indirectly inherited from GLOBAL, the indirectly inherited configuration will also be applied. Up to seven additional peer policy templates can be indirectly inherited from GLOBAL. Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 7 Router(config-router-af)# end Displays locally configured peer policy templates.show ip bgp neighbors [ip-address[policy [detail]]]Step 8 Example: PurposeCommand or Action Router# show ip bgp neighbors 192.168.1.2 policy The output can be filtered to display a single peer policy template with the policy-template-name argument. This command also supports all standard output modifiers. Use the policy keyword to display the policies applied to this neighbor per address family. Use the detail keyword to display detailed policy information. The policy and detail keywords are supported only in Cisco IOSRelease 12.0(25)S, 12.4(11)T, 12.2(33)SRB, 12.2(33)SB, and later releases. Only the syntax required for this task is shown. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Examples The following sample output shows the policies applied to the neighbor at 192.168.1.2. The output displays both inherited policies and policies configured on the neighbor device. Inherited polices are policies that the neighbor inherits from a peer-group or a peer-policy template. Router# show ip bgp neighbors 192.168.1.2 policy Neighbor: 192.168.1.2, Address-Family: IPv4 Unicast Locally configured policies: route-map ROUTE in Inherited polices: prefix-list NO-MARKETING in route-map ROUTE in weight 300 maximum-prefix 10000 Monitoring and Maintaining BGP Dynamic Update Groups Use this task to clear and display information about the processing of dynamic BGP update groups. The performance of BGP update message generation is improved with the use of BGP update groups. With the configuration of the BGP peer templates and the support of the dynamic BGP update groups, the network operator no longer needs to configure peer groups in BGP and can benefit from improved configuration flexibility and system performance. For information about using BGP peer templates, see the “Configuring Peer Session Templates” and “Configuring Peer Policy Templates” sections. SUMMARY STEPS 1. enable 2. clear ip bgp update-group [index-group | ip-address] 3. show ip bgp replication [index-group | ip-address] 4. show ip bgp update-group [index-group | ip-address] [summary] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Clears BGP update groupmembership and recalculate BGP update groups. clear ip bgp update-group [index-group | ip-address] Example: Step 2 In the example provided, the membership of neighbor 192.168.2.2 is cleared from an update group.Device# clear ip bgp update-group 192.168.2.2 Displays update replication statistics for BGP update groups.show ip bgp replication [index-group | ip-address] Example: Step 3 Device# show ip bgp replication Displays information about BGP update groups.show ip bgp update-group [index-group | ip-address] [summary] Step 4 Example: Device# show ip bgp update-group Troubleshooting Tips Use the debug ip bgp groups command to display information about the processing of BGP update groups. Information can be displayed for all update groups, an individual update group, or a specific BGP neighbor. The output of this command can be very verbose. This command should not be deployed in a production network unless your are troubleshooting a problem. Configuration Examples for a Basic BGP Network Example: Configuring a BGP Process and Customizing Peers The following example shows the configuration for Router B in the above (in the “Customizing a BGP Peer” section) with a BGP process configured with two neighbor peers (at Router A and at Router E) in separate autonomous systems. IPv4 unicast routes are exchangedwith both peers and IPv4multicast routes are exchanged with the BGP peer at Router E. Router B router bgp 45000 bgp router-id 172.17.1.99 no bgp default ipv4-unicast bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.3.2 remote-as 50000 neighbor 192.168.3.2 description finance ! address-family ipv4 neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family ! address-family ipv4 multicast neighbor 192.168.3.2 activate neighbor 192.168.3.2 advertisement-interval 25 no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family Examples: Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers Asplain Format The following example shows the configuration for Router A, Router B, and Router E in the figure below with a Border Gateway Protocol (BGP) process configured between three neighbor peers (at Router A, at Router B, and at Router E) in separate 4-byte autonomous systems configured using asplain notation. IPv4 unicast routes are exchanged with all peers. Figure 14: BGP Peers Using 4-Byte Autonomous System Numbers in Asplain Format Router A router bgp 65536 bgp router-id 10.1.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.1 remote-as 65538 ! address-family ipv4 neighbor 192.168.1.1 activate no auto-summary no synchronization network 10.1.1.0 mask 255.255.255.0 exit-address-family Router B router bgp 65538 bgp router-id 172.17.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.2 remote-as 65536 neighbor 192.168.3.2 remote-as 65550 neighbor 192.168.3.2 description finance ! address-family ipv4 neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family Router E router bgp 65550 bgp router-id 10.2.2.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.3.1 remote-as 65538 ! address-family ipv4 neighbor 192.168.3.1 activate no auto-summary no synchronization network 10.2.2.0 mask 255.255.255.0 exit-address-family Asdot Format The following example shows how to create the configuration for Router A, Router B, and Router E in the figure below with a BGP process configured between three neighbor peers (at Router A, at Router B, and at Router E) in separate 4-byte autonomous systems configured using the default asdot format. IPv4 unicast routes are exchanged with all peers. Figure 15: BGP Peers Using 4-Byte Autonomous System Numbers in Asdot Format Router A router bgp 1.0 bgp router-id 10.1.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.1 remote-as 1.2 ! address-family ipv4 neighbor 192.168.1.1 activate no auto-summary no synchronization network 10.1.1.0 mask 255.255.255.0 exit-address-family Router B router bgp 1.2 bgp router-id 172.17.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.2 remote-as 1.0 neighbor 192.168.3.2 remote-as 1.14 neighbor 192.168.3.2 description finance ! address-family ipv4 neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family Router E router bgp 1.14 bgp router-id 10.2.2.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.3.1 remote-as 1.2 ! address-family ipv4 neighbor 192.168.3.1 activate no auto-summary no synchronization network 10.2.2.0 mask 255.255.255.0 exit-address-family Examples: Configuring a VRF and Setting an Extended Community Using a BGP 4-Byte Autonomous System Number Asplain Default Format in Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)SXI1, and Later Releases The following example is available in Cisco IOSRelease 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, and later releases and shows how to create a VRF with a route target that uses a 4-byte autonomous system number, 65537, and how to set the route target to extended community value 65537:100 for routes that are permitted by the route map: ip vrf vpn_red rd 64500:100 route-target both 65537:100 exit route-map red_map permit 10 set extcommunity rt 65537:100 end After the configuration is completed, use the show route-map command to verify that the extended community is set to the route target that contains the 4-byte autonomous system number of 65537: RouterB# show route-map red_map route-map red_map, permit, sequence 10 Match clauses: Set clauses: extended community RT:65537:100 Policy routing matches: 0 packets, 0 bytes 4-Byte Autonomous System Number RD Support The following example shows how to create a VRFwith a route distinguisher that contains a 4-byte AS number 65536, and a route target that contains a 4-byte autonomous system number, 65537: ip vrf vpn_red rd 65536:100 route-target both 65537:100 exit After the configuration is completed, use the show vrf command to verify that the 4-byte AS number route distinguisher is set to 65536:100: RouterB# show vrf vpn_red Current configuration : 36 bytes vrf definition x rd 65536:100 ! Asdot Default Format in Cisco IOS Release 12.0(32)S12, and 12.4(24)T The following example is available in Cisco IOS Release 12.0(32)S12, and 12.4(24)T and shows how to create a VRF with a route target that uses a 4-byte autonomous system number, 1.1, and how to set the route target to the extended community value 1.1:100 for routes that are permitted by the route map. In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SXI1, and later releases, this example works if you have configured asdot as the default display format using the bgp asnotation dot command. Note ip vrf vpn_red rd 64500:100 route-target both 1.1:100 exit route-map red_map permit 10 set extcommunity rt 1.1:100 end After the configuration is completed, use the show route-map command to verify that the extended community is set to the route target that contains the 4-byte autonomous system number of 1.1. RouterB# show route-map red_map route-map red_map, permit, sequence 10 Match clauses: Set clauses: extended community RT:1.1:100 Policy routing matches: 0 packets, 0 bytes Asdot Default Format for 4-Byte Autonomous System Number RD Support The following example works if you have configured asdot as the default display format using the bgp asnotation dot command: ip vrf vpn_red rd 1.0:100 route-target both 1.1:100 exit Example: NLRI to AFI Configuration The following example upgrades an existing router configuration file in the NLRI format to the AFI format and set the router CLI to use only commands in the AFI format: router bgp 60000 bgp upgrade-cli The show running-config command can be used in privileged EXEC mode to verify that an existing router configuration file has been upgraded from the NLRI format to the AFI format. The following sections provide sample output from a router configuration file in the NLRI format, and the same router configuration file after it has been upgraded to the AFI format with the bgp upgrade-cli command in router configuration mode. After a router has been upgraded from the AFI format to the NLRI format with the bgp upgrade-clicommand, NLRI commands will no longer be accessible or configurable. Note Router Configuration File in NLRI Format Before Upgrading The following sample output is from the show running-config command in privileged EXEC mode. The sample output shows a router configuration file, in the NLRI format, prior to upgrading to the AFI format with the bgp upgrade-cli command. The sample output is filtered to show only the affected portion of the router configuration. Router# show running-config | begin bgp router bgp 101 no synchronization bgp log-neighbor-changes neighbor 10.1.1.1 remote-as 505 nlri unicast multicast no auto-summary ! ip default-gateway 10.4.9.1 ip classless ! ! route-map REDISTRIBUTE-MULTICAST permit 10 match ip address prefix-list MULTICAST-PREFIXES set nlri multicast ! route-map MULTICAST-PREFIXES permit 10 ! route-map REDISTRIBUTE-UNICAST permit 20 match ip address prefix-list UNICAST-PREFIXES set nlri unicast ! ! ! line con 0 line aux 0 line vty 0 4 password PASSWORD login ! end Router Configuration File in AFI Format After Upgrading The following sample output shows the router configuration file after it has been upgraded to the AFI format. The sample output is filtered to show only the affected portion of the router configuration file. Router# show running-config | begin bgp router bgp 101 bgp log-neighbor-changes neighbor 10.1.1.1 remote-as 505 no auto-summary ! address-family ipv4 multicast neighbor 10.1.1.1 activate no auto-summary no synchronization exit-address-family ! address-family ipv4 neighbor 10.1.1.1 activate no auto-summary no synchronization exit-address-family ! ip default-gateway 10.4.9.1 ip classless ! ! route-map REDISTRIBUTE-MULTICAST_mcast permit 10 match ip address prefix-list MULTICAST-PREFIXES ! route-map REDISTRIBUTE-MULTICAST permit 10 match ip address prefix-list MULTICAST-PREFIXES ! route-map MULTICAST-PREFIXES permit 10 ! route-map REDISTRIBUTE-UNICAST permit 20 match ip address prefix-list UNICAST-PREFIXES ! ! ! line con 0 line aux 0 line vty 0 4 password PASSWORD login ! end Examples: Removing BGP Configuration Commands Using a Redistribution Example The following examples show first the CLI configuration to enable the redistribution of BGP routes into EIGRP using a route map and then the CLI configuration to remove the redistribution and route map. Some BGP configuration commands can affect other CLI commands and this example demonstrates how the removal of one command affects another command. In the first configuration example, a route map is configured to match and set autonomous system numbers. BGP neighbors in three different autonomous systems are configured and activated. An EIGRP routing process is started, and the redistribution of BGP routes into EIGRP using the route map is configured. CLI to Enable BGP Route Redistribution Into EIGRP route-map bgp-to-eigrp permit 10 match tag 50000 set tag 65000 exit router bgp 45000 bgp log-neighbor-changes address-family ipv4 neighbor 172.16.1.2 remote-as 45000 neighbor 172.21.1.2 remote-as 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.3.2 remote-as 50000 neighbor 172.16.1.2 activate neighbor 172.21.1.2 activate neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate network 172.17.1.0 mask 255.255.255.0 exit-address-family exit router eigrp 100 redistribute bgp 45000 metric 10000 100 255 1 1500 route-map bgp-to-eigrp no auto-summary exit In the second configuration example, both the route-map command and the redistribute command are disabled. If only the route-map command is removed, it does not automatically disable the redistribution. The redistribution will now occur without any matching or filtering. To remove the redistribution configuration, the redistribute command must also be disabled. CLI to Remove BGP Route Redistribution Into EIGRP configure terminal no route-map bgp-to-eigrp router eigrp 100 no redistribute bgp 45000 end Examples: BGP Soft Reset The following examples show two ways to reset the connection for BGP peer 192.168.1.1. Example: Dynamic Inbound Soft Reset The following example shows the command used to initiate a dynamic soft reconfiguration in the BGP peer 192.168.1.1. This command requires that the peer support the route refresh capability. clear ip bgp 192.168.1.1 soft in Example: Inbound Soft Reset Using Stored Information The following example shows how to enable inbound soft reconfiguration for the neighbor 192.168.1.1. All the updates received from this neighbor will be stored unmodified, regardless of the inbound policy. When inbound soft reconfiguration is performed later, the stored information will be used to generate a new set of inbound updates. router bgp 100 neighbor 192.168.1.1 remote-as 200 neighbor 192.168.1.1 soft-reconfiguration inbound The following example clears the session with the neighbor 192.168.1.1: clear ip bgp 192.168.1.1 soft in Example: Resetting BGP Peers Using 4-Byte Autonomous System Numbers The following examples show how to clear BGP peers belonging to an autonomous system that uses 4-byte autonomous system numbers. The initial state of the BGP routing table is shown using the show ip bgp command, and peers in 4-byte autonomous systems 65536 and 65550 are displayed. RouterB# show ip bgp BGP table version is 4, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 192.168.1.2 0 0 65536 i *> 10.2.2.0/24 192.168.3.2 0 0 65550 i *> 172.17.1.0/24 0.0.0.0 0 32768 i The clear ip bgp 65550 command is entered to remove all BGP peers in the 4-byte autonomous system 65550. The ADJCHANGE message shows that the BGP peer at 192.168.3.2 is being reset. RouterB# clear ip bgp 65550 RouterB# *Nov 30 23:25:27.043: %BGP-5-ADJCHANGE: neighbor 192.168.3.2 Down User reset The show ip bgp command is entered again, and only the peer in 4-byte autonomous systems 65536 is now displayed. RouterB# show ip bgp BGP table version is 5, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 192.168.1.2 0 0 65536 i *> 172.17.1.0/24 0.0.0.0 0 32768 i Almost immediately, the next ADJCHANGE message shows that the BGP peer at 192.168.3.2 (in the 4-byte autonomous system 65550) is now back up. RouterB# *Nov 30 23:25:55.995: %BGP-5-ADJCHANGE: neighbor 192.168.3.2 Up Example: Resetting and Displaying Basic BGP Information The following example shows how to reset and display basic BGP information. The clear ip bgp * command clears and resets all the BGP neighbor sessions. In Cisco IOS Release 12.2(25)S and later releases, the syntax is clear ip bgp all. Specific neighbors or all peers in an autonomous system can be cleared by using the neighbor-address and autonomous-system-number arguments. If no argument is specified, this command will clear and reset all BGP neighbor sessions. The clear ip bgp * command also clears all the internal BGP structures which makes it useful as a troubleshooting tool. Note Router# clear ip bgp * The show ip bgp command is used to display all the entries in the BGP routing table. The following example displays BGP routing table information for the 10.1.1.0 network: Router# show ip bgp 10.1.1.0 255.255.255.0 BGP routing table entry for 10.1.1.0/24, version 2 Paths: (1 available, best #1, table Default-IP-Routing-Table) Advertised to update-groups: 1 40000 192.168.1.2 from 192.168.1.2 (10.1.1.99) Origin IGP, metric 0, localpref 100, valid, external, best The show ip bgp neighbors command is used to display information about the TCP and BGP connections to neighbors. The following example displays the routes that were advertised from Router B in the figure above (in the “Configuring a BGP Peer for the IPv4 VRF Address Family” section) to its BGP neighbor 192.168.3.2 on Router E: Router# show ip bgp neighbors 192.168.3.2 advertised-routes BGP table version is 3, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 192.168.1.2 0 0 40000 i *> 172.17.1.0/24 0.0.0.0 0 32768 i Total number of prefixes 2 The show ip bgp pathscommand is used to display all the BGP paths in the database. The following example displays BGP path information for Router B in the figure above (in the “Customizing a BGP Peer” section): Router# show ip bgp paths Address Hash Refcount Metric Path 0x2FB5DB0 0 5 0 i 0x2FB5C90 1 4 0 i 0x2FB5C00 1361 2 0 50000 i 0x2FB5D20 2625 2 0 40000 i The show ip bgp summarycommand is used to display the status of all BGP connections. The following example displays BGP routing table information for Router B in the figure above (in the “Customizing a BGP Peer” section: Router# show ip bgp summary BGP router identifier 172.17.1.99, local AS number 45000 BGP table version is 3, main routing table version 3 2 network entries using 234 bytes of memory 2 path entries using 104 bytes of memory 4/2 BGP path/bestpath attribute entries using 496 bytes of memory 2 BGP AS-PATH entries using 48 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 882 total bytes of memory BGP activity 14/10 prefixes, 16/12 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.1.2 4 40000 667 672 3 0 0 00:03:49 1 192.168.3.2 4 50000 468 467 0 0 0 00:03:49 (NoNeg) Examples: Aggregating Prefixes Using BGP The following examples show how you can use aggregate routes in BGP either by redistributing an aggregate route into BGP or by using the BGP conditional aggregation routing feature. In the following example, the redistribute static router configuration command is used to redistribute aggregate route 10.0.0.0: ip route 10.0.0.0 255.0.0.0 null 0 ! router bgp 100 redistribute static The following configuration shows how to create an aggregate entry in the BGP routing table when at least one specific route falls into the specified range. The aggregate route will be advertised as coming from your autonomous system and has the atomic aggregate attribute set to show that information might be missing. (By default, atomic aggregate is set unless you use the as-set keyword in the aggregate-address router configuration command.) router bgp 100 aggregate-address 10.0.0.0 255.0.0.0 The following example shows how to create an aggregate entry using the same rules as in the previous example, but the path advertised for this route will be an AS_SET consisting of all elements contained in all paths that are being summarized: router bgp 100 aggregate-address 10.0.0.0 255.0.0.0 as-set The following example shows how to create the aggregate route for 10.0.0.0 and also suppress advertisements of more specific routes to all neighbors: router bgp 100 aggregate-address 10.0.0.0 255.0.0.0 summary-only The following example configures BGP to not advertise inactive routes: Device(config)# router bgp 50000 Device(config-router)# address-family ipv4 unicast Device(config-router-af)# bgp suppress-inactive Device(config-router-af)# end The following example configures a maximum route limit in the VRF named RED and configures BGP to not advertise inactive routes through the VRF named RED: Device(config)# ip vrf RED Device(config-vrf)# rd 50000:10 Device(config-vrf)# maximum routes 1000 10 Device(config-vrf)# exit Device(config)# router bgp 50000 Device(config-router)# address-family ipv4 vrf RED Device(config-router-af)# bgp suppress-inactive Device(config-router-af)# end Example: Configuring a BGP Peer Group The following example shows how to use an address family to configure a peer group so that all members of the peer group are both unicast- and multicast-capable: router bgp 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.3.2 remote-as 50000 address-family ipv4 unicast neighbor mygroup peer-group neighbor 192.168.1.2 peer-group mygroup neighbor 192.168.3.2 peer-group mygroup router bgp 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.3.2 remote-as 50000 address-family ipv4 multicast neighbor mygroup peer-group neighbor 192.168.1.2 peer-group mygroup neighbor 192.168.3.2 peer-group mygroup neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate Example: Configuring Peer Session Templates The following example creates a peer session template named INTERNAL-BGP in session-template configuration mode: router bgp 45000 template peer-session INTERNAL-BGP remote-as 50000 timers 30 300 exit-peer-session The following example creates a peer session template named CORE1. This example inherits the configuration of the peer session template named INTERNAL-BGP. router bgp 45000 template peer-session CORE1 description CORE-123 update-source loopback 1 inherit peer-session INTERNAL-BGP exit-peer-session The following example configures the 192.168.3.2 neighbor to inherit the CORE1 peer session template. The 192.168.3.2 neighbor will also indirectly inherit the configuration from the peer session template named INTERNAL-BGP. The explicit remote-as statement is required for the neighbor inherit statement to work. If a peering is not configured, the specified neighbor will not accept the session template. router bgp 45000 neighbor 192.168.3.2 remote-as 50000 neighbor 192.168.3.2 inherit peer-session CORE1 Examples: Configuring Peer Policy Templates The following example creates a peer policy template namedGLOBAL and enters policy-template configuration mode: router bgp 45000 template peer-policy GLOBAL weight 1000 maximum-prefix 5000 prefix-list NO_SALES in exit-peer-policy The following example creates a peer policy template named PRIMARY-IN and enters policy-template configuration mode: router bgp 45000 template peer-policy PRIMARY-IN prefix-list ALLOW-PRIMARY-A in route-map SET-LOCAL in weight 2345 default-originate exit-peer-policy The following example creates a peer policy template named CUSTOMER-A. This peer policy template is configured to inherit the configuration from the peer policy templates named PRIMARY-IN and GLOBAL. router bgp 45000 template peer-policy CUSTOMER-A route-map SET-COMMUNITY in filter-list 20 in inherit peer-policy PRIMARY-IN 20 inherit peer-policy GLOBAL 10 exit-peer-policy The following example configures the 192.168.2.2 neighbor in address family mode to inherit the peer policy template named CUSTOMER-A. Assuming this example is a continuation of the example above, because the peer policy template named CUSTOMER-A above inherited the configuration from the templates named PRIMARY-IN and GLOBAL, the 192.168.2.2 neighbor will also indirectly inherit the peer policy templates named PRIMARY-IN and GLOBAL. router bgp 45000 neighbor 192.168.2.2 remote-as 50000 address-family ipv4 unicast neighbor 192.168.2.2 inherit peer-policy CUSTOMER-A end Examples: Monitoring and Maintaining BGP Dynamic Update Peer-Groups No configuration is required to enable the BGP dynamic update of peer groups and the algorithm runs automatically. The following examples show how BGP update group information can be cleared or displayed. clear ip bgp update-group Example The following example clears the membership of neighbor 10.0.0.1 from an update group: Router# clear ip bgp update-group 10.0.0.1 debug ip bgp groups Example The following example output from the debug ip bgp groups command shows the recalculation of update groups after the clear ip bgp groups command was issued: Router# debug ip bgp groups 5w4d: %BGP-5-ADJCHANGE: neighbor 10.4.9.5 Down User reset 5w4d: BGP-DYN(0): Comparing neighbor 10.4.9.5 flags 0x0 cap 0x0 and updgrp 2 fl0 5w4d: BGP-DYN(0): Update-group 2 flags 0x0 cap 0x0 policies same as 10.4.9.5 fl0 5w4d: %BGP-5-ADJCHANGE: neighbor 10.4.9.8 Down User reset 5w4d: BGP-DYN(0): Comparing neighbor 10.4.9.8 flags 0x0 cap 0x0 and updgrp 2 fl0 5w4d: BGP-DYN(0): Update-group 2 flags 0x0 cap 0x0 policies same as 10.4.9.8 fl0 5w4d: %BGP-5-ADJCHANGE: neighbor 10.4.9.21 Down User reset 5w4d: BGP-DYN(0): Comparing neighbor 10.4.9.21 flags 0x0 cap 0x0 and updgrp 1 f0 5w4d: BGP-DYN(0): Update-group 1 flags 0x0 cap 0x0 policies same as 10.4.9.21 f0 5w4d: %BGP-5-ADJCHANGE: neighbor 10.4.9.5 Up 5w4d: %BGP-5-ADJCHANGE: neighbor 10.4.9.21 Up 5w4d: %BGP-5-ADJCHANGE: neighbor 10.4.9.8 Up show ip bgp replication Example The following sample output from the show ip bgp replication command shows update group replication information for all for neighbors: Router# show ip bgp replication BGP Total Messages Formatted/Enqueued : 0/0 Index Type Members Leader MsgFmt MsgRepl Csize Qsize 1 internal 1 10.4.9.21 0 0 0 0 2 internal 2 10.4.9.5 0 0 0 0 show ip bgp update-group Example The following sample output from the show ip bgp update-group command shows update group information for all neighbors: Router# show ip bgp update-group BGP version 4 update-group 1, internal, Address Family: IPv4 Unicast BGP Update version : 0, messages 0/0 Route map for outgoing advertisements is COST1 Update messages formatted 0, replicated 0 Number of NLRIs in the update sent: max 0, min 0 Minimum time between advertisement runs is 5 seconds Has 1 member: 10.4.9.21 BGP version 4 update-group 2, internal, Address Family: IPv4 Unicast BGP Update version : 0, messages 0/0 Update messages formatted 0, replicated 0 Number of NLRIs in the update sent: max 0, min 0 Minimum time between advertisement runs is 5 seconds Has 2 members: 10.4.9.5 10.4.9.8 Where to Go Next If you want to connect to an external service provider, see the “Connecting to a Service Provider Using External BGP” module. To configure BGP neighbor session options, proceed to the “Configuring BGPNeighbor Session Options” module. If you want to configure some iBGP features, see the “Configuring Internal BGP Features” module. Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands Cisco IOS IPv6 Command ReferenceIPv6 commands: complete command syntax, command mode, defaults, usage guidelines, and examples “Cisco BGP Overview” module in the IP Routing: BGP Configuration Guide Overview of Cisco BGP conceptual information with links to all the individual BGP modules “MPLSVPN Inter-ASwith ASBRs Exchanging IPv4 Routes and MPLS Labels” module in theMPLS: Layer 3 VPNs: Inter-AS and CSC Configuration Guide Multiprotocol Label Switching (MPLS) and BGP configuration example using the IPv4 VRF address family Standards TitleStandard MDTSAFIMDTSAFI MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs CISCO-BGP4-MIB RFCs TitleRFC Application of the Border Gateway Protocol in the InternetRFC1772 Experience with the BGP ProtocolRFC1773 BGP-4 Protocol AnalysisRFC1774 Guidelines for Creation, Selection, and Registration of an Autonomous System (AS)RFC1930 A Framework for Inter-Domain Route AggregationRFC2519 Multiprotocol Extensions for BGP-4RFC2858 Route Refresh Capability for BGP-4RFC2918 Capabilities Advertisement with BGP-4RFC3392 A Border Gateway Protocol 4 (BGP-4)RFC4271 BGP Support for Four-octet AS Number SpaceRFC4893 Textual Representation of Autonomous system (AS) NumbersRFC5396 Autonomous System (AS) Number Reservation for Documentation UseRFC5398 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for Configuring a Basic BGP Network The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 13: Feature Information for Configuring a Basic BGP Network Feature Configuration InformationReleasesFeature Name The BGPConditional Route Injection feature allows you to inject more specific prefixes into a BGP routing table over less specific prefixes that were selected through normal route aggregation. These more specific prefixes can be used to provide a finer granularity of traffic engineering or administrative control than is possible with aggregated routes. 12.0(22)S 12.2(4)T 12.2(14)S 15.0(1)S Cisco IOS XE 3.1.0SG BGP Conditional Route Injection The BGPConfiguration Using Peer Templates feature introduces a new mechanism that groups distinct neighbor configurations for BGP neighbors that share policies. This type of policy configuration has been traditionally configured with BGP peer groups. However, peer groups have certain limitations because peer group configuration is bound to update grouping and specific session characteristics. Configuration templates provide an alternative to peer group configuration and overcome some of the limitations of peer groups. 12.0(24)S 12.2(18)S 12.2(27)SBC 12.3(4)T 15.0(1)S BGP Configuration Using Peer Templates The BGPDynamic Update Peer Groups feature introduces a new algorithm that dynamically calculates and optimizes update groups of neighbors that share the same outbound policies and can share the same update messages. In previous versions of Cisco IOS software, BGP update messages were grouped based on peer-group configurations. This method of grouping updates limited outbound policies and specific-session configurations. The BGP Dynamic Update Peer Group feature separates update group replication from peer group configuration, which improves convergence time and flexibility of neighbor configuration. 12.0(24)S 12.2(18)S 12.2(27)SBC 12.3(4)T 15.0(1)S Cisco IOS XE 3.1.0SG BGP Dynamic Update Peer Groups The BGP Hybrid CLI feature simplifies the migration of BGP networks and existing configurations from the NLRI format to the AFI format. This new functionality allows the network operator to configure commands in the AFI format and save these command configurations to existing NLRI formatted configurations. The feature provides the network operator with the capability to take advantage of new features and provides support for migration from the NLRI format to the AFI format. 12.0(22)S 12.2(15)T 15.0(1)S BGP Hybrid CLI The Suppress BGP Advertisements for Inactive Routes feature allows you to configure the suppression of advertisements for routes that are not installed in the Routing Information Base (RIB). Configuring this feature allows Border Gateway Protocol (BGP) updates to be more consistent with data used for traffic forwarding. 12.2(25)S 12.2(33)SXH 15.0(1)M 15.0(1)S Suppress BGP Advertisement for Inactive Routes C H A P T E R 5 BGP 4 Soft Configuration BGP4 soft configuration allows BGP4 policies to be configured and activated without clearing the BGP session, hence without invalidating the forwarding cache. Finding Feature Information, on page 161 Information About BGP 4 Soft Configuration, on page 161 How to Configure BGP 4 Soft Configuration, on page 162 Configuration Examples for BGP 4 Soft Configuration, on page 165 Additional References, on page 166 Feature Information for BGP 4 Soft Configuration, on page 166 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP 4 Soft Configuration BGP Session Reset Whenever the routing policy changes due to a configuration change, BGP peering sessions must be reset by using the clear ip bgp command. Cisco software supports the following three mechanisms to reset BGP peering sessions: Hard reset—A hard reset tears down the specified peering sessions including the TCP connection and deletes routes coming from the specified peer. Soft reset—A soft reset uses stored prefix information to reconfigure and activate BGP routing tables without tearing down existing peering sessions. Soft reconfiguration uses stored update information, at the cost of additional memory for storing the updates, to allow you to apply new BGP policy without disrupting the network. Soft reconfiguration can be configured for inbound or outbound sessions. Dynamic inbound soft reset—The route refresh capability, as defined in RFC 2918, allows the local device to reset inbound routing tables dynamically by exchanging route refresh requests to supporting peers. The route refresh capability does not store update information locally for nondisruptive policy changes. It instead relies on dynamic exchangewith supporting peers. Route refreshmust first be advertised through BGP capability negotiation between peers. All BGP devices must support the route refresh capability. To determine if a BGP device supports this capability, use the show ip bgp neighbors command. The following message is displayed in the output when the device supports the route refresh capability: Received route refresh capability from peer. The bgp soft-reconfig-backup command was introduced to configure BGP to perform inbound soft reconfiguration for peers that do not support the route refresh capability. The configuration of this command allows you to configure BGP to store updates (soft reconfiguration) only as necessary. Peers that support the route refresh capability are unaffected by the configuration of this command. How to Configure BGP 4 Soft Configuration Configuring Inbound Soft Reconfiguration When Route Refresh Capability Is Missing Perform this task to configure inbound soft reconfiguration using the bgp soft-reconfig-backup command for BGP peers that do not support the route refresh capability. BGP peers that support the route refresh capability are unaffected by the configuration of this command. Note that the memory requirements for storing the inbound update information can become quite large. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. bgp log-neighbor-changes 5. bgp soft-reconfig-backup 6. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 7. neighbor {ip-address | peer-group-name} soft-reconfiguration [inbound] 8. neighbor {ip-address | peer-group-name} route-map map-name {in | out} 9. Repeat Steps 6 through 8 for every peer that is to be configured with inbound soft reconfiguration. 10. exit 11. route-map map-name [permit | deny] [sequence-number] 12. set ip next-hop ip-address 13. end 14. show ip bgp neighbors [neighbor-address] 15. show ip bgp [network] [network-mask] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Enables logging of BGP neighbor resets.bgp log-neighbor-changes Example: Step 4 Device(config-router)# bgp log-neighbor-changes Configures a BGP speaker to perform inbound soft reconfiguration for peers that do not support the route refresh capability. bgp soft-reconfig-backup Example: Device(config-router)# bgp soft-reconfig-backup Step 5 This command is used to configure BGP to perform inbound soft reconfiguration for peers that do not support the route refresh capability. The configuration of this command allows you to configure BGP to store updates (soft reconfiguration) only as necessary. Peers that support the route refresh capability are unaffected by the configuration of this command. Adds the IP address of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 6 Device(config-router)# neighbor 192.168.1.2 remote-as 40000 Configures the Cisco software to start storing updates.neighbor {ip-address | peer-group-name} soft-reconfiguration [inbound] Step 7 All the updates received from this neighbor will be stored unmodified, regardless of the inbound policy.Example: When inbound soft reconfiguration is done later, the Device(config-router)# neighbor 192.168.1.2 soft-reconfiguration inbound stored information will be used to generate a new set of inbound updates. PurposeCommand or Action Applies a route map to incoming or outgoing routes.neighbor {ip-address | peer-group-name} route-map map-name {in | out} Step 8 In this example, the route map named LOCAL will be applied to incoming routes.Example: Device(config-router)# neighbor 192.168.1.2 route-map LOCAL in —Repeat Steps 6 through 8 for every peer that is to be configured with inbound soft reconfiguration. Step 9 Exits router configuration mode and enters global configuration mode. exit Example: Step 10 Device(config-router)# exit Configures a route map and enters route-map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 11 Example: In this example, a route map named LOCAL is created. Device(config)# route-map LOCAL permit 10 Specifies where output packets that pass a match clause of a route map for policy routing. set ip next-hop ip-address Example: Step 12 In this example, the ip address is set to 192.168.1.144. Device(config-route-map)# set ip next-hop 192.168.1.144 Exits route-map configuration mode and enters privileged EXEC mode. end Example: Step 13 Device(config-route-map)# end (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [neighbor-address] Example: Step 14 Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Device# show ip bgp neighbors 192.168.1.2 (Optional) Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 15 Example: Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Device# show ip bgp Examples The following partial output from the show ip bgp neighbors command shows information about the TCP and BGP connections to the BGP neighbor 192.168.2.1. This peer supports route refresh. BGP neighbor is 192.168.1.2, remote AS 40000, external link Neighbor capabilities: Route refresh: advertised and received(new) The following partial output from the show ip bgp neighbors command shows information about the TCP and BGP connections to the BGP neighbor 192.168.3.2. This peer does not support route refresh so the soft-reconfig inbound paths for BGP peer 192.168.3.2 will be stored because there is no other way to update any inbound policy updates. BGP neighbor is 192.168.3.2, remote AS 50000, external link Neighbor capabilities: Route refresh: advertised The following sample output from the show ip bgp command shows the entry for the network 172.17.1.0. Both BGP peers are advertising 172.17.1.0/24, but only the received-only path is stored for 192.168.3.2. BGP routing table entry for 172.17.1.0/24, version 11 Paths: (3 available, best #3, table Default-IP-Routing-Table, RIB-failure(4)) Flag: 0x820 Advertised to update-groups: 1 50000 192.168.3.2 from 192.168.3.2 (172.17.1.0) Origin incomplete, metric 0, localpref 200, valid, external 50000, (received-only) 192.168.3.2 from 192.168.3.2 (172.17.1.0) Origin incomplete, metric 0, localpref 100, valid, external 40000 192.168.1.2 from 192.168.1.2 (172.16.1.0) Origin incomplete, metric 0, localpref 200, valid, external, best Configuration Examples for BGP 4 Soft Configuration Examples: BGP Soft Reset The following examples show two ways to reset the connection for BGP peer 192.168.1.1. Example: Dynamic Inbound Soft Reset The following example shows the command used to initiate a dynamic soft reconfiguration in the BGP peer 192.168.1.1. This command requires that the peer support the route refresh capability. clear ip bgp 192.168.1.1 soft in Example: Inbound Soft Reset Using Stored Information The following example shows how to enable inbound soft reconfiguration for the neighbor 192.168.1.1. All the updates received from this neighbor will be stored unmodified, regardless of the inbound policy. When inbound soft reconfiguration is performed later, the stored information will be used to generate a new set of inbound updates. router bgp 100 neighbor 192.168.1.1 remote-as 200 neighbor 192.168.1.1 soft-reconfiguration inbound The following example clears the session with the neighbor 192.168.1.1: clear ip bgp 192.168.1.1 soft in Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands Standards and RFCs TitleStandard/RFC Route Refresh Capability for BGP-4RFC 2918 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP 4 Soft Configuration The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 14: Feature Information for BGP 4 Soft Configuration Feature InformationReleasesFeature Name BGP 4 Soft Configuration allows BGP4 policies to be configured and activated without clearing the BGP session, hence without invalidating the forwarding cache. This feature was introduced on the Cisco ASR 1000 Series Routers. Cisco IOS XE Release 2.1BGP 4 Soft Configuration C H A P T E R 6 BGP Support for 4-byte ASN The Cisco implementation of 4-byte autonomous system (AS) numbers uses asplain (65538, for example) as the default regular expressionmatch and the output display format for AS numbers. However, you can configure 4-byte AS numbers in both the asplain format and the asdot format as described in RFC 5396. In addition, 4-byte ASN route distinguisher (RD) and route target (RT) BGP support for 4-byte autonomous numbers is added. Finding Feature Information, on page 169 Information About BGP Support for 4-byte ASN, on page 169 How to Configure BGP Support for 4-byte ASN, on page 172 Configuration Examples for BGP Support for 4-byte ASN, on page 179 Additional References for BGP Support for 4-byte ASN, on page 183 Feature Information for BGP Support for 4-byte ASN, on page 184 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP Support for 4-byte ASN BGP Autonomous System Number Formats Prior to January 2009, BGP autonomous system (AS) numbers that were allocated to companies were 2-octet numbers in the range from 1 to 65535 as described in RFC 4271, A Border Gateway Protocol 4 (BGP-4). Due to increased demand for AS numbers, the Internet Assigned Number Authority (IANA) started to allocate four-octet AS numbers in the range from 65536 to 4294967295. RFC 5396, Textual Representation of Autonomous System (AS) Numbers, documents three methods of representing AS numbers. Cisco has implemented the following two methods: Asplain—Decimal value notation where both 2-byte and 4-byte AS numbers are represented by their decimal value. For example, 65526 is a 2-byte AS number and 234567 is a 4-byte AS number. Asdot—Autonomous system dot notation where 2-byte AS numbers are represented by their decimal value and 4-byte AS numbers are represented by a dot notation. For example, 65526 is a 2-byte AS number and 1.169031 is a 4-byte AS number (this is dot notation for the 234567 decimal number). For details about the third method of representing autonomous system numbers, see RFC 5396. Asdot Only Autonomous System Number Formatting In Cisco IOSXERelease 2.3, the 4-octet (4-byte) AS numbers are entered and displayed only in asdot notation, for example, 1.10 or 45000.64000. When using regular expressions to match 4-byte AS numbers the asdot format includes a period, which is a special character in regular expressions. A backslash must be entered before the period (for example, 1\.14) to ensure the regular expression match does not fail. The table below shows the format in which 2-byte and 4-byte AS numbers are configured, matched in regular expressions, and displayed in show command output in Cisco IOS images where only asdot formatting is available. Table 15: Asdot Only 4-Byte AS Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 1.0 to 65535.65535 asdot Asplain as Default AS Number Formatting In Cisco IOS XE Release 2.4 and later releases, the Cisco implementation of 4-byte AS numbers uses asplain as the default display format for AS numbers, but you can configure 4-byte AS numbers in both the asplain and asdot format. In addition, the default format for matching 4-byte AS numbers in regular expressions is asplain, so youmust ensure that any regular expressions to match 4-byte AS numbers are written in the asplain format. If you want to change the default show command output to display 4-byte autonomous system numbers in the asdot format, use the bgp asnotation dot command under router configuration mode. When the asdot format is enabled as the default, any regular expressions to match 4-byte AS numbers must be written using the asdot format, or the regular expression match will fail. The tables below show that although you can configure 4-byte AS numbers in either asplain or asdot format, only one format is used to display show command output and control 4-byte AS number matching for regular expressions, and the default is asplain format. To display 4-byte AS numbers in show command output and to control matching for regular expressions in the asdot format, you must configure the bgp asnotation dot command. After enabling the bgp asnotation dot command, a hard reset must be initiated for all BGP sessions by entering the clear ip bgp * command. If you are upgrading to an image that supports 4-byte AS numbers, you can still use 2-byte AS numbers. The show command output and regular expression match are not changed and remain in asplain (decimal value) format for 2-byte AS numbers regardless of the format configured for 4-byte AS numbers. Note Table 16: Default Asplain 4-Byte AS Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 65536 to 42949672952-byte: 1 to 65535 4-byte: 65536 to 4294967295 asplain 2-byte: 1 to 65535 4-byte: 65536 to 42949672952-byte: 1 to 65535 4-byte: 1.0 to 65535.65535asdot Table 17: Asdot 4-Byte AS Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 65536 to 4294967295 asplain 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 1.0 to 65535.65535asdot Reserved and Private AS Numbers In Cisco IOS XE Release 2.3 and later releases, the Cisco implementation of BGP supports RFC 4893. RFC 4893 was developed to allow BGP to support a gradual transition from 2-byte AS numbers to 4-byte AS numbers. A new reserved (private) AS number, 23456, was created by RFC 4893 and this number cannot be configured as an AS number in the Cisco IOS CLI. RFC 5398, Autonomous System (AS) Number Reservation for Documentation Use, describes new reserved AS numbers for documentation purposes. Use of the reserved numbers allow configuration examples to be accurately documented and avoids conflict with production networks if these configurations are literally copied. The reserved numbers are documented in the IANAAS number registry. Reserved 2-byte AS numbers are in the contiguous block, 64496 to 64511 and reserved 4-byte AS numbers are from 65536 to 65551 inclusive. Private 2-byte AS numbers are still valid in the range from 64512 to 65534 with 65535 being reserved for special use. Private AS numbers can be used for internal routing domains but must be translated for traffic that is routed out to the Internet. BGP should not be configured to advertise private AS numbers to external networks. Cisco IOS software does not remove private AS numbers from routing updates by default. We recommend that ISPs filter private AS numbers. AS number assignment for public and private networks is governed by the IANA. For information about AS numbers, including reserved number assignment, or to apply to register an AS number, see the following URL: http://www.iana.org/. Note Cisco Implementation of 4-Byte Autonomous System Numbers In Cisco IOS XE Release 2.4 and later releases, the Cisco implementation of 4-byte autonomous system (AS) numbers uses asplain—65538, for example—as the default regular expressionmatch and output display format for AS numbers, but you can configure 4-byte AS numbers in both the asplain format and the asdot format as described in RFC 5396. To change the default regular expression match and output display of 4-byte AS numbers to asdot format, use the bgp asnotation dot command followed by the clear ip bgp * command to perform a hard reset of all current BGP sessions. For more details about 4-byte AS number formats, see the “BGP Autonomous System Number Formats” section. In Cisco IOSXERelease 2.3, the Cisco implementation of 4-byte AS numbers uses asdot—1.2, for example—as the only configuration format, regular expression match, and output display, with no asplain support. For an example of BGP peers in two autonomous systems using 4-byte numbers, see the figure below. To view a configuration example of the configuration between three neighbor peers in separate 4-byte autonomous systems configured using asdot notation, see the “Example: Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers” section. Cisco also supports RFC 4893, which was developed to allow BGP to support a gradual transition from 2-byte AS numbers to 4-byte AS numbers. To ensure a smooth transition, we recommend that all BGP speakers within an AS that is identified using a 4-byte AS number be upgraded to support 4-byte AS numbers. A new private AS number, 23456, was created by RFC 4893, and this number cannot be configured as an AS number in the Cisco IOS CLI. Note Figure 16: BGP Peers in Two Autonomous Systems Using 4-Byte Numbers How to Configure BGP Support for 4-byte ASN Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers Perform this task to configure a Border Gateway Protocol (BGP) routing process and BGP peers when the BGP peers are located in an autonomous system (AS) that uses 4-byte AS numbers. The address family configured here is the default IPv4 unicast address family, and the configuration is done at Router B in the figure above (in the “Cisco Implementation of 4-Byte Autonomous System Numbers” section). The 4-byte AS numbers in this task are formatted in the default asplain (decimal value) format; for example, Router B is in AS number 65538 in the figure above. Remember to perform this task for any neighbor routers that are to be BGP peers. Before you begin By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes, neighbors must also be activated using the neighbor activate command in address family configuration mode for the other prefix types. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. Repeat Step 4 to define other BGP neighbors, as required. 6. address-family ipv4 [unicast |multicast | vrf vrf-name] 7. neighbor ip-address activate 8. Repeat Step 7 to activate other BGP neighbors, as required. 9. network network-number [mask network-mask] [route-map route-map-name] 10. end 11. show ip bgp [network] [network-mask] 12. show ip bgp summary DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 In this example, the 4-byte AS number, 65538, is defined in asplain notation.Device(config)# router bgp 65538 Adds the IP address of the neighbor in the specified AS to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor ip-address remote-as autonomous-system-number Example: Step 4 In this example, the 4-byte AS number, 65536, is defined in asplain notation. PurposeCommand or Action Device(config-router)# neighbor 192.168.1.2 remote-as 65536 --Repeat Step 4 to define other BGP neighbors, as required.Step 5 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 6 The unicast keyword specifies the IPv4 unicast address family. By default, the device is placed inDevice(config-router)# address-family ipv4 unicast configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the virtual routing and forwarding (VRF) instance to associate with subsequent IPv4 address family configuration mode commands. Enables the neighbor to exchange prefixes for the IPv4 unicast address family with the local device. neighbor ip-address activate Example: Step 7 Device(config-router-af)# neighbor 192.168.1.2 activate --Repeat Step 7 to activate other BGP neighbors, as required.Step 8 (Optional) Specifies a network as local to this AS and adds it to the BGP routing table. network network-number [mask network-mask] [route-map route-map-name] Step 9 Example: For exterior protocols the network command controls which networks are advertised. Interior protocols use Device(config-router-af)# network 172.17.1.0 mask 255.255.255.0 the network command to determine where to send updates. Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 10 Device(config-router-af)# end (Optional) Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 11 Example: Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Device# show ip bgp 10.1.1.0 PurposeCommand or Action (Optional) Displays the status of all BGP connections.show ip bgp summary Example: Step 12 Device# show ip bgp summary Examples The following output from the show ip bgp command at Router B shows the BGP routing table entry for network 10.1.1.0 learned from the BGP neighbor at 192.168.1.2 in Router A in the figure above with its 4-byte AS number of 65536 displayed in the default asplain format. RouterB# show ip bgp 10.1.1.0 BGP routing table entry for 10.1.1.0/24, version 2 Paths: (1 available, best #1) Advertised to update-groups: 2 65536 192.168.1.2 from 192.168.1.2 (10.1.1.99) Origin IGP, metric 0, localpref 100, valid, external, best The following output from the show ip bgp summary command shows the 4-byte AS number 65536 for the BGP neighbor 192.168.1.2 of Router A in the figure above after this task has been configured on Router B: RouterB# show ip bgp summary BGP router identifier 172.17.1.99, local AS number 65538 BGP table version is 3, main routing table version 3 2 network entries using 234 bytes of memory 2 path entries using 104 bytes of memory 3/2 BGP path/bestpath attribute entries using 444 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 806 total bytes of memory BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Stated 192.168.1.2 4 65536 6 6 3 0 0 00:01:33 1 Troubleshooting Tips Use the ping command to verify basic network connectivity between the BGP devices. Modifying the Default Output and Regular Expression Match Format for 4-Byte Autonomous System Numbers Perform this task to modify the default output format for 4-byte autonomous system (AS) numbers from asplain format to asdot notation format. The show ip bgp summary command is used to display the changes in output format for the 4-byte AS numbers. SUMMARY STEPS 1. enable 2. show ip bgp summary 3. configure terminal 4. router bgp autonomous-system-number 5. bgp asnotation dot 6. end 7. clear ip bgp * 8. show ip bgp summary 9. show ip bgp regexp regexp 10. configure terminal 11. router bgp autonomous-system-number 12. no bgp asnotation dot 13. end 14. clear ip bgp * DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Displays the status of all Border Gateway Protocol (BGP) connections. show ip bgp summary Example: Step 2 Device# show ip bgp summary Enters global configuration mode.configure terminal Example: Step 3 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 4 In this example, the 4-byte AS number, 65538, is defined in asplain notation.Device(config)# router bgp 65538 Changes the default output format of BGP 4-byte AS numbers from asplain (decimal values) to dot notation. bgp asnotation dot Example: Step 5 4-byte AS numbers can be configured using either asplain format or asdot format. This command affects only the output displayed for show commands or the matching of regular expressions. Note Device(config-router)# bgp asnotation dot PurposeCommand or Action Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 6 Device(config-router)# end Clears and resets all current BGP sessions.clear ip bgp *Step 7 Example: In this example, a hard reset is performed to ensure that the 4-byte AS number format change is reflected in all BGP sessions.Device# clear ip bgp * Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Displays the status of all BGP connections.show ip bgp summary Example: Step 8 Device# show ip bgp summary Displays routes that match the AS path regular expression.show ip bgp regexp regexpStep 9 Example: In this example, a regular expression to match a 4-byte AS path is configured using asdot format. Device# show ip bgp regexp ^1\.0$ Enters global configuration mode.configure terminal Example: Step 10 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 11 In this example, the 4-byte AS number, 65538, is defined in asplain notation.Device(config)# router bgp 65538 Resets the default output format of BGP 4-byte AS numbers back to asplain (decimal values). no bgp asnotation dot Example: Step 12 4-byte AS numbers can be configured using either asplain format or asdot format. This command affects only the output displayed for show commands or the matching of regular expressions. Note Device(config-router)# no bgp asnotation dot Exits router configuration mode and returns to privileged EXEC mode. end Example: Step 13 Device(config-router)# end PurposeCommand or Action Clears and resets all current BGP sessions.clear ip bgp *Step 14 Example: In this example, a hard reset is performed to ensure that the 4-byte AS number format change is reflected in all BGP sessions.Device# clear ip bgp * Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Examples The following output from the show ip bgp summary command shows the default asplain format of the 4-byte AS numbers. Note the asplain format of the 4-byte AS numbers, 65536 and 65550. Router# show ip bgp summary BGP router identifier 172.17.1.99, local AS number 65538 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Statd 192.168.1.2 4 65536 7 7 1 0 0 00:03:04 0 192.168.3.2 4 65550 4 4 1 0 0 00:00:15 0 After the bgp asnotation dot command is configured (followed by the clear ip bgp * command to perform a hard reset of all current BGP sessions), the output is converted to asdot notation format as shown in the following output from the show ip bgp summary command. Note the asdot format of the 4-byte AS numbers, 1.0 and 1.14 (these are the asdot conversions of the 65536 and 65550 AS numbers. Router# show ip bgp summary BGP router identifier 172.17.1.99, local AS number 1.2 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Statd 192.168.1.2 4 1.0 9 9 1 0 0 00:04:13 0 192.168.3.2 4 1.14 6 6 1 0 0 00:01:24 0 After the bgp asnotation dot command is configured (followed by the clear ip bgp * command to perform a hard reset of all current BGP sessions), the regular expression match format for 4-byte AS paths is changed to asdot notation format. Although a 4-byte AS number can be configured in a regular expression using either asplain format or asdot format, only 4-byte AS numbers configured using the current default format are matched. In the first example below, the show ip bgp regexp command is configured with a 4-byte AS number in asplain format. The match fails because the default format is currently asdot format and there is no output. In the second example using asdot format, the match passes and the information about the 4-byte AS path is shown using the asdot notation. The asdot notation uses a period, which is a special character in Cisco regular expressions. To remove the special meaning, use a backslash before the period. Note Router# show ip bgp regexp ^65536$ Router# show ip bgp regexp ^1\.0$ BGP table version is 2, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 192.168.1.2 0 0 1.0 i Configuration Examples for BGP Support for 4-byte ASN Examples: Configuring a BGP Routing Process and Peers Using 4-Byte Autonomous System Numbers Asplain Format The following example shows the configuration for Router A, Router B, and Router E in the figure below with a Border Gateway Protocol (BGP) process configured between three neighbor peers (at Router A, at Router B, and at Router E) in separate 4-byte autonomous systems configured using asplain notation. IPv4 unicast routes are exchanged with all peers. Figure 17: BGP Peers Using 4-Byte Autonomous System Numbers in Asplain Format Router A router bgp 65536 bgp router-id 10.1.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.1 remote-as 65538 ! address-family ipv4 neighbor 192.168.1.1 activate no auto-summary no synchronization network 10.1.1.0 mask 255.255.255.0 exit-address-family Router B router bgp 65538 bgp router-id 172.17.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.2 remote-as 65536 neighbor 192.168.3.2 remote-as 65550 neighbor 192.168.3.2 description finance ! address-family ipv4 neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family Router E router bgp 65550 bgp router-id 10.2.2.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.3.1 remote-as 65538 ! address-family ipv4 neighbor 192.168.3.1 activate no auto-summary no synchronization network 10.2.2.0 mask 255.255.255.0 exit-address-family Asdot Format The following example shows how to create the configuration for Router A, Router B, and Router E in the figure below with a BGP process configured between three neighbor peers (at Router A, at Router B, and at Router E) in separate 4-byte autonomous systems configured using the default asdot format. IPv4 unicast routes are exchanged with all peers. Figure 18: BGP Peers Using 4-Byte Autonomous System Numbers in Asdot Format Router A router bgp 1.0 bgp router-id 10.1.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.1 remote-as 1.2 ! address-family ipv4 neighbor 192.168.1.1 activate no auto-summary no synchronization network 10.1.1.0 mask 255.255.255.0 exit-address-family Router B router bgp 1.2 bgp router-id 172.17.1.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.1.2 remote-as 1.0 neighbor 192.168.3.2 remote-as 1.14 neighbor 192.168.3.2 description finance ! address-family ipv4 neighbor 192.168.1.2 activate neighbor 192.168.3.2 activate no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family Router E router bgp 1.14 bgp router-id 10.2.2.99 no bgp default ipv4-unicast bgp fast-external-fallover bgp log-neighbor-changes timers bgp 70 120 neighbor 192.168.3.1 remote-as 1.2 ! address-family ipv4 neighbor 192.168.3.1 activate no auto-summary no synchronization network 10.2.2.0 mask 255.255.255.0 exit-address-family Examples: Configuring a VRF and Setting an Extended Community Using a BGP 4-Byte Autonomous System Number Asplain Default Format in Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)SXI1, and Later Releases The following example is available in Cisco IOSRelease 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, and later releases and shows how to create a VRF with a route target that uses a 4-byte autonomous system number, 65537, and how to set the route target to extended community value 65537:100 for routes that are permitted by the route map: ip vrf vpn_red rd 64500:100 route-target both 65537:100 exit route-map red_map permit 10 set extcommunity rt 65537:100 end After the configuration is completed, use the show route-map command to verify that the extended community is set to the route target that contains the 4-byte autonomous system number of 65537: RouterB# show route-map red_map route-map red_map, permit, sequence 10 Match clauses: Set clauses: extended community RT:65537:100 Policy routing matches: 0 packets, 0 bytes 4-Byte Autonomous System Number RD Support The following example shows how to create a VRFwith a route distinguisher that contains a 4-byte AS number 65536, and a route target that contains a 4-byte autonomous system number, 65537: ip vrf vpn_red rd 65536:100 route-target both 65537:100 exit After the configuration is completed, use the show vrf command to verify that the 4-byte AS number route distinguisher is set to 65536:100: RouterB# show vrf vpn_red Current configuration : 36 bytes vrf definition x rd 65536:100 ! Asdot Default Format in Cisco IOS Release 12.0(32)S12, and 12.4(24)T The following example is available in Cisco IOS Release 12.0(32)S12, and 12.4(24)T and shows how to create a VRF with a route target that uses a 4-byte autonomous system number, 1.1, and how to set the route target to the extended community value 1.1:100 for routes that are permitted by the route map. In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SXI1, and later releases, this example works if you have configured asdot as the default display format using the bgp asnotation dot command. Note ip vrf vpn_red rd 64500:100 route-target both 1.1:100 exit route-map red_map permit 10 set extcommunity rt 1.1:100 end After the configuration is completed, use the show route-map command to verify that the extended community is set to the route target that contains the 4-byte autonomous system number of 1.1. RouterB# show route-map red_map route-map red_map, permit, sequence 10 Match clauses: Set clauses: extended community RT:1.1:100 Policy routing matches: 0 packets, 0 bytes Asdot Default Format for 4-Byte Autonomous System Number RD Support The following example works if you have configured asdot as the default display format using the bgp asnotation dot command: ip vrf vpn_red rd 1.0:100 route-target both 1.1:100 exit Additional References for BGP Support for 4-byte ASN Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Document TitleRelated Topic Cisco IOS IP Routing: BGP Command ReferenceBGP commands Standards and RFCs TitleStandard/RFC BGP Support for Four-octet AS Number SpaceRFC 4893 Textual Representation of Autonomous System (AS) NumbersRFC 5396 Autonomous System (AS) Number Reservation for Documentation UseRFC 5398 4-Octet AS Specific BGP Extended CommunityRFC 5668 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP Support for 4-byte ASN The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 18: Feature Information for BGP Support for 4-byte ASN Feature InformationReleasesFeature Name The BGP Support for 4-Byte ASN feature introduced support for 4-byte autonomous system numbers. In Cisco IOS XE Release 2.4 and later releases, the Cisco implementation of 4-byte autonomous system numbers uses asplain as the default regular expression match and output display format for autonomous system numbers, but you can configure 4-byte autonomous system numbers in both the asplain format and the asdot format as described in RFC 5396. To change the default regular expression match and output display of 4-byte autonomous system numbers to asdot format, use the bgp asnotation dot command. The following commands were introduced or modified: bgp asnotation dot, bgp confederation identifier, bgp confederation peers, all clear ip bgpcommands that configure an autonomous system number, ip as-path access-list, ip extcommunity-list, match source-protocol, neighbor local-as, neighbor remote-as, redistribute (IP), router bgp, route-target, set as-path, set extcommunity, set origin, all show ip bgp commands that display an autonomous system number, and show ip extcommunity-list. Cisco IOS XE Release 2.3 Cisco IOS XE Release 2.4 Cisco IOS XE Release 3.9S BGP Support for 4-byte ASN The BGP Support for 4-Byte ASN RD and RT support for 4-byte autonomous system numbers was added. Cisco IOS XE Release 3.13SBGP—4-Byte ASN RD and RT Support C H A P T E R 7 IPv6 Routing: Multiprotocol BGP Extensions for IPv6 Finding Feature Information, on page 187 Information About IPv6 Routing: Multiprotocol BGP Extensions for IPv6, on page 187 How to Implement Multiprotocol BGP for IPv6, on page 188 Configuration Examples for Multiprotocol BGP for IPv6, on page 193 Additional References, on page 195 Feature Information for IPv6 Routing Multiprotocol BGP Extensions for IPv6, on page 196 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About IPv6 Routing: Multiprotocol BGP Extensions for IPv6 Multiprotocol BGP Extensions for IPv6 Multiprotocol BGP is the supported Exterior Gateway Protocol (EGP) for IPv6. Multiprotocol BGP extensions for IPv6 supports many of the same features and functionality as IPv4 BGP. IPv6 enhancements to multiprotocol BGP include support for an IPv6 address family and Network Layer Reachability Information (NLRI) and next hop (the next device in the path to the destination) attributes that use IPv6 addresses. How to Implement Multiprotocol BGP for IPv6 Configuring an IPv6 BGP Routing Process and BGP Router ID Perform this task to configure an IPv6 BGP routing process and an optional BGP router ID for a BGP-speaking device. BGP uses a router ID to identify BGP-speaking peers. The BGP router ID is 32-bit value that is often represented by an IPv4 address. By default, the router ID is set to the IPv4 address of a loopback interface on the device. If no loopback interface is configured on the device, then the software chooses the highest IPv4 address configured to a physical interface on the device to represent the BGP router ID. When configuring BGP on a device that is enabled only for IPv6 (that is, the device does not have an IPv4 address), you must manually configure the BGP router ID for the device. The BGP router ID, which is represented as a 32-bit value using an IPv4 address syntax, must be unique to the BGP peers of the device. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. no bgp default ipv4-unicast 5. bgp router-id ip-address DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Configures a BGP routing process, and enters router configuration mode for the specified routing process. router bgp as-number Example: Step 3 Device(config)# router bgp 65000 Disables the IPv4 unicast address family for the BGP routing process specified in the previous step. no bgp default ipv4-unicast Example: Step 4 PurposeCommand or Action Device(config-router)# no bgp default ipv4-unicast Routing information for the IPv4 unicast address family is advertised by default for each BGP routing session configured with the neighbor remote-as command unless you configure the no bgp default ipv4-unicast command before configuring the neighbor remote-as command. Note (Optional) Configures a fixed 32-bit router ID as the identifier of the local device running BGP. bgp router-id ip-address Example: Step 5 Configuring a router ID using the bgp router-id command resets all active BGP peering sessions. Note Device(config-router)# bgp router-id 192.168.99.70 Configuring IPv6 Multiprotocol BGP Between Two Peers By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes, neighbors must also be activated using the neighbor activate command in address family configuration mode for the other prefix types, as shown for IPv6 prefixes. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. neighbor {ip-address | ipv6-address [%] | peer-group-name} remote-as autonomous-system-number [alternate-as autonomous-system-number ...] 5. address-family ipv6 [unicast |multicast] 6. neighbor {ip-address | peer-group-name | ipv6-address%} activate DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp as-number Example: Step 3 Device(config)# router bgp 65000 PurposeCommand or Action Adds the IPv6 address of the neighbor in the specified autonomous system to the IPv6multiprotocol BGP neighbor table of the local device. neighbor {ip-address | ipv6-address [%] | peer-group-name} remote-as autonomous-system-number [alternate-as autonomous-system-number ...] Example: Step 4 Device(config-router)# neighbor 2001:DB8:0:CC00::1 remote-as 64600 Specifies the IPv6 address family and enters address family configuration mode. address-family ipv6 [unicast |multicast] Example: Step 5 The unicast keyword specifies the IPv6 unicast address family. By default, the device is placed in configurationDevice(config-router)# address-family ipv6 mode for the IPv6 unicast address family if a keyword is not specified with the address-family ipv6 command. Themulticast keyword specifies IPv6 multicast address prefixes. Enables the neighbor to exchange prefixes for the IPv6 address family with the local device. neighbor {ip-address | peer-group-name | ipv6-address %} activate Example: Step 6 Device(config-router-af)# neighbor 2001:DB8:0:CC00::1 activate Advertising IPv4 Routes Between IPv6 BGP Peers If an IPv6 network is connecting two separate IPv4 networks, IPv6 can be used to advertise the IPv4 routes. Configure the peering using the IPv6 addresses within the IPv4 address family. Set the next hop with a static route or with an inbound route map because the advertised next hop will usually be unreachable. Advertising IPv6 routes between two IPv4 peers is also possible using the same model. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. neighbor peer-group-name peer-group 5. neighbor {ip-address | ipv6-address[%] | peer-group-name} remote-as autonomous-system-number [alternate-as autonomous-system-number ...] 6. address-family ipv4 [mdt |multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name] 7. neighbor ipv6-address peer-group peer-group-name 8. neighbor {ip-address | peer-group-name | ipv6-address [%]} route-map map-name {in | out} 9. exit 10. exit 11. route-map map-tag [permit | deny] [sequence-number] 12. set ip next-hop ip-address [... ip-address] [peer-address] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp as-number Example: Step 3 Device(config)# router bgp 65000 Creates a multiprotocol BGP peer group.neighbor peer-group-name peer-group Example: Step 4 Device(config-router)# neighbor 6peers peer-group Adds the IPv6 address of the neighbor in the specified autonomous system to the IPv6 multiprotocol BGP neighbor table of the local device. neighbor {ip-address | ipv6-address[%] | peer-group-name} remote-as autonomous-system-number [alternate-as autonomous-system-number ...] Example: Step 5 Device(config-router)# neighbor 6peers remote-as 65002 Enters address family configuration mode to configure a routing session using standard IPv4 address prefixes. address-family ipv4 [mdt |multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name] Example: Step 6 Device(config-router)# address-family ipv4 Assigns the IPv6 address of a BGP neighbor to a peer group. neighbor ipv6-address peer-group peer-group-name Example: Step 7 Device(config-router-af)# neighbor 2001:DB8:1234::2 peer-group 6peers Applies a route map to incoming or outgoing routes.neighbor {ip-address | peer-group-name | ipv6-address [%]} route-map map-name {in | out} Step 8 Changes to the route map will not take effect for existing peers until the peering is reset or a soft resetExample: is performed. Using the clear bgp ipv6 command PurposeCommand or Action Device(config-router-af)# neighbor 6peers route-map rmap out with the soft and in keywords will perform a soft reset. Exits address family configuration mode, and returns the device to router configuration mode. exit Example: Step 9 Device(config-router-af)# exit Exits router configuration mode, and returns the device to global configuration mode. exit Example: Step 10 Device(config-router)# exit Defines a route map and enters route-map configuration mode. route-map map-tag [permit | deny] [sequence-number] Example: Step 11 Device(config)# route-map rmap permit 10 Overrides the next hop advertised to the peer for IPv4 packets. set ip next-hop ip-address [... ip-address] [peer-address] Example: Step 12 Device(config-route-map)# set ip next-hop 10.21.8.10 Clearing External BGP Peers SUMMARY STEPS 1. enable 2. clear bgp ipv6 {unicast |multicast} external [soft] [in | out] 3. clear bgp ipv6 {unicast |multicast} peer-group name DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Clears external IPv6 BGP peers.clear bgp ipv6 {unicast |multicast} external [soft] [in | out] Step 2 Example: Device# clear bgp ipv6 unicast external soft in PurposeCommand or Action Clears all members of an IPv6 BGP peer group.clear bgp ipv6 {unicast |multicast} peer-group name Example: Step 3 Device# clear bgp ipv6 unicast peer-group marketing Configuring BGP IPv6 Admin Distance Before you begin SUMMARY STEPS 1. DETAILED STEPS PurposeCommand or Action Example:Step 1 Example What to do next Configuration Examples for Multiprotocol BGP for IPv6 Example: Configuring a BGP Process, BGP Router ID, and IPv6 Multiprotocol BGP Peer The following example enables IPv6 globally, configures a BGP process, and establishes a BGP router ID. Also, the IPv6 multiprotocol BGP peer 2001:DB8:0:CC00::1 is configured and activated. ipv6 unicast-routing ! router bgp 65000 no bgp default ipv4-unicast bgp router-id 192.168.99.70 neighbor 2001:DB8:0:CC00::1 remote-as 64600 address-family ipv6 unicast neighbor 2001:DB8:0:CC00::1 activate Example: Configuring an IPv6 Multiprotocol BGP Peer Group The following example configures the IPv6 multiprotocol BGP peer group named group1: router bgp 65000 no bgp default ipv4-unicast neighbor group1 peer-group neighbor 2001:DB8:0:CC00::1 remote-as 64600 address-family ipv6 unicast neighbor group1 activate neighbor 2001:DB8:0:CC00::1 peer-group group1 Example: Advertising Routes into IPv6 Multiprotocol BGP The following example injects the IPv6 network 2001:DB8::/24 into the IPv6 unicast database of the local device. (BGP checks that a route for the network exists in the IPv6 unicast database of the local device before advertising the network.) router bgp 65000 no bgp default ipv4-unicast address-family ipv6 unicast network 2001:DB8::/24 Example: Configuring a Route Map for IPv6 Multiprotocol BGP Prefixes The following example configures the route map named rtp to permit IPv6 unicast routes from network 2001:DB8::/24 if they match the prefix list named cisco: router bgp 64900 no bgp default ipv4-unicast neighbor 2001:DB8:0:CC00::1 remote-as 64700 address-family ipv6 unicast neighbor 2001:DB8:0:CC00::1 activate neighbor 2001:DB8:0:CC00::1 route-map rtp in ipv6 prefix-list cisco seq 10 permit 2001:DB8::/24 route-map rtp permit 10 match ipv6 address prefix-list cisco Example: Redistributing Prefixes into IPv6 Multiprotocol BGP The following example redistributes RIP routes into the IPv6 unicast database of the local device: router bgp 64900 no bgp default ipv4-unicast address-family ipv6 unicast redistribute rip Example: Advertising IPv4 Routes Between IPv6 Peers The following example advertises IPv4 routes between IPv6 peers when the IPv6 network is connecting two separate IPv4 networks. Peering is configured using IPv6 addresses in the IPv4 address family configuration mode. The inbound route map named rmap sets the next hop because the advertised next hop is likely to be unreachable. router bgp 65000 ! neighbor 6peers peer-group neighbor 2001:DB8:1234::2 remote-as 65002 address-family ipv4 neighbor 6peers activate neighbor 6peers soft-reconfiguration inbound neighbor 2001:DB8:1234::2 peer-group 6peers neighbor 2001:DB8:1234::2 route-map rmap in ! route-map rmap permit 10 set ip next-hop 10.21.8.10 Additional References Related Documents Document TitleRelated Topic IPv6 Configuration GuideIPv6 addressing and connectivity Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IPv6 Command Reference IPv6 commands Cisco IOS IPv6 Feature MappingCisco IOS IPv6 features Standards and RFCs TitleStandard/RFC IPv6 RFCs RFCs for IPv6 MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs — Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for IPv6 Routing Multiprotocol BGP Extensions for IPv6 The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 19: Feature Information for IPv6 Routing Multiprotocol BGP Extensions for IPv6 Feature InformationReleasesFeature Name Multiprotocol BGP extensions for IPv6 supports the same features and functionality as IPv4 BGP. Cisco IOS XE Release 2.1IPv6 Routing: Multiprotocol BGP Extensions for IPv6 C H A P T E R 8 IPv6 Routing: Multiprotocol BGP Link-Local Address Peering Finding Feature Information, on page 197 Information About IPv6 Routing: Multiprotocol BGP Link-Local Address Peering, on page 197 How to Configure IPv6 Routing: Multiprotocol BGP Link-Local Address Peering, on page 198 Configuration Examples for IPv6 Routing:Multiprotocol BGPLink-Local Address Peering, on page 201 Additional References, on page 202 Feature Information for IPv6 Routing Multiprotocol BGP Link-Local Address Peering, on page 203 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About IPv6 Routing: Multiprotocol BGP Link-Local Address Peering IPv6 Multiprotocol BGP Peering Using a Link-Local Address The IPv6 multiprotocol BGP can be configured between two IPv6 devices (peers) using link-local addresses. For this function to work, youmust identify the interface for the neighbor by using the neighbor update-source command, and you must configure a route map to set an IPv6 global next hop. Boarder Gateway Protocol (BGP) uses third-party next hops for peering withmultiple peers over IPv6 link-local addresses on the same interface. Peering over link-local addresses on different interfaces cannot use third party next hops. The neighbors peering using link-local addresses are split into one update group per interface. BGP splits update group membership for neighbors with link-local addresses based on the interface used to communicate with that neighbor. How to Configure IPv6 Routing: Multiprotocol BGP Link-Local Address Peering Configuring an IPv6 Multiprotocol BGP Peer Using a Link-Local Address Configuring IPv6 multiprotocol BGP between two IPv6 routers (peers) using link-local addresses requires that the interface for the neighbor be identified by using the update-source command and that a route map be configured to set an IPv6 global next hop. By default, neighbors that are defined using the neighbor remote-as command in router configuration mode exchange only IPv4 unicast address prefixes. To exchange other address prefix types, such as IPv6 prefixes, neighbors must also be activated using the neighbor activate command in address family configuration mode for the other prefix types, as shown for IPv6 prefixes. By default, route maps that are applied in router configuration mode using the neighbor route-map command are applied to only IPv4 unicast address prefixes. Route maps for other address families must be applied in address family configuration mode using the neighbor route-map command, as shown for the IPv6 address family. The route maps are applied either as the inbound or outbound routing policy for neighbors under the specified address family. Configuring separate route maps under each address family type simplifies managing complicated or different policies for each address family. The route-map used to modify the next hop needs to be applied outbound only. Inbound route-map to modify next-hop ipv6 address is not supported. Inbound route-map is supported only for IPV4 address family. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | ipv6-address[%] | peer-group-name} remote-as autonomous-system-number [alternate-as autonomous-system-number ...] 5. neighbor {ip-address | ipv6-address[%] | peer-group-name} update-source interface-type interface-number 6. address-family ipv6 [vrf vrf-name] [unicast |multicast | vpnv6 7. neighbor {ip-address | peer-group-name | ipv6-address%} activate 8. neighbor {ip-address | peer-group-name | ipv6-address[%]} route-map map-name {in | out 9. exit 10. Repeat Step 9. 11. route-map map-tag [permit | deny] [sequence-number] 12. match ipv6 address {prefix-list prefix-list-name | access-list-name 13. set ipv6 next-hop ipv6-address [link-local-address] [peer-address DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 65000 Adds the link-local IPv6 address of the neighbor in the specified remote autonomous system to the IPv6 multiprotocol BGP neighbor table of the local router. neighbor {ip-address | ipv6-address[%] | peer-group-name} remote-as autonomous-system-number [alternate-as autonomous-system-number ...] Step 4 Example: The optional% keyword is the IPv6 link-local address identifier. This keyword needs to be added Device(config-router)# neighbor FE80::1234:BFF:FE0E:A471% remote-as 64600 whenever a link-local IPv6 address is used outside the context of its interface. Specifies the link-local address over which the peering is to occur. neighbor {ip-address | ipv6-address[%] | peer-group-name} update-source interface-type interface-number Step 5 The optional% keyword is the IPv6 link-local address identifier. This keyword needs to be addedExample: whenever a link-local IPv6 address is used outside the context of its interface.Device(config-router)# neighbor FE80::1234:BFF:FE0E:A471% update-source gigabitethernet0/0/0 • If there are multiple connections to the neighbor and you do not specify the neighbor interface by using the interface-type and interface-numberarguments in the neighbor update-source command, a TCP connection cannot be established with the neighbor using link-local addresses. Specifies the IPv6 address family, and enters address family configuration mode. address-family ipv6 [vrf vrf-name] [unicast |multicast | vpnv6 Step 6 Example: The unicast keyword specifies the IPv6 unicast address family. By default, the router is placed in Device(config-router)# address-family ipv6 configuration mode for the IPv6 unicast address family if the unicast keyword is not specified with the address-family ipv6 command. PurposeCommand or Action Themulticast keyword specifies IPv6 multicast address prefixes. Enables the neighbor to exchange prefixes for the IPv6 address family with the local router using the specified link-local addresses. neighbor {ip-address | peer-group-name | ipv6-address %} activate Example: Step 7 The optional% keyword is the IPv6 link-local address identifier. This keyword needs to be addedDevice(config-router-af)# neighbor FE80::1234:BFF:FE0E:A471% activate whenever a link-local IPv6 address is used outside the context of its interface. Applies a route map to incoming or outgoing routes.neighbor {ip-address | peer-group-name | ipv6-address[%]} route-map map-name {in | out Step 8 The optional% keyword is the IPv6 link-local address identifier. This keyword needs to be addedExample: whenever a link-local IPv6 address is used outside the context of its interface.Device(config-router-af)# neighbor FE80::1234:BFF:FE0E:A471% route-map nh6 out Exits address family configuration mode, and returns the device to router configuration mode. exit Example: Step 9 Device(config-router-af)# exit Exits router configuration mode, and returns the device to global configuration mode. Repeat Step 9. Example: Step 10 Device(config-router)# exit Defines a route map and enters route-map configuration mode. route-map map-tag [permit | deny] [sequence-number] Example: Step 11 Device(config)# route-map nh6 permit 10 Distributes any routes that have a destination IPv6 network number address permitted by a prefix list, or performs policy routing on packets. match ipv6 address {prefix-list prefix-list-name | access-list-name Example: Step 12 Device(config-route-map)# match ipv6 address prefix-list cisco Overrides the next hop advertised to the peer for IPv6 packets that pass a match clause of a route map for policy routing. set ipv6 next-hop ipv6-address [link-local-address] [peer-address Example: Step 13 The ipv6-address argument specifies the IPv6 global address of the next hop. It need not be an adjacent router. Device(config-route-map)# set ipv6 next-hop 2001:DB8::1 PurposeCommand or Action The link-local-addressargument specifies the IPv6 link-local address of the next hop. It must be an adjacent router. The route map sets the IPv6 next-hop addresses (global and link-local) in BGP updates. If the route map is not configured, the next-hop address in the BGP updates defaults to the unspecified IPv6 address (::), which is rejected by the peer. If you specify only the global IPv6 next-hop address (the ipv6-address argument) with the set ipv6 next-hopcommand after specifying the neighbor interface (the interface-type argument) with the neighbor update-source command in Step 5, the link-local address of the interface specified with the interface-type argument is included as the next-hop in the BGP updates. Therefore, only one route map that sets the global IPv6 next-hop address in BGP updates is required for multiple BGP peers that use link-local addresses. Note Configuration Examples for IPv6 Routing: Multiprotocol BGP Link-Local Address Peering Example: Configuring an IPv6 Multiprotocol BGP Peer Using a Link-Local Address The following example configures the IPv6 multiprotocol BGP peer FE80::1234:BFF:FE0E:A471 over Gigabitethernet interface 0/0 and sets the route map named nh6 to include the IPv6 next-hop global address of Gigabitethernet interface 0/0 in BGP updates. The IPv6 next-hop link-local address can be set by the nh6 route map (not shown in the following example) or from the interface specified by the neighbor update-source command (as shown in this example). Device> enable Device# configure terminal Device(config)# router bgp 5 Device(config-router)# neighbor internal peer-group Device(config-router)# neighbor FE80::1234:BFF:FE0E:A471% peer-group Device(config-router)# neighbor internal remote-as 100 Device(config-router)# neighbor FE80::1234:BFF:FE0E:A471% remote-as 64600 Device(config-router)# neighbor FE80::1234:BFF:FE0E:A471% update-source Gigabitethernet 0/0 Device(config-router)# address-family ipv6 Device(config-router-af)# neighbor FE80::1234:BFF:FE0E:A471% activate Device(config-router-af)# neighbor FE80::1234:BFF:FE0E:A471% route-map nh6 out Device(config-router-af)# exit Device(config-router)# exit Device(config)# route-map nh6permit 10 Device(config-router-map)# match ipv6 address prefix-list cisco Device(config-router-map)# set ipv6 next-hop 2001:DB8:526::1 Device(config-router-map)# exit Device(config)# ipv6 prefix-list cisco permit 2001:DB8:2F22::/48 le 128 Device(config)# ipv6 prefix-list cisco deny ::/0 Device(config)# end If you specify only the global IPv6 next-hop address (the ipv6-address argument) with the set ipv6 next-hop command after specifying the neighbor interface (the interface-type argument) with the neighbor update-source command, the link-local address of the interface specified with the interface-type argument is included as the next hop in the BGP updates. Therefore, only one route map that sets the global IPv6 next-hop address in BGP updates is required for multiple BGP peers that use link-local addresses. Note Additional References Related Documents Document TitleRelated Topic IPv6 Configuration GuideIPv6 addressing and connectivity Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IPv6 Command Reference IPv6 commands Cisco IOS IPv6 Feature MappingCisco IOS IPv6 features Standards and RFCs TitleStandard/RFC IPv6 RFCs RFCs for IPv6 MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs — Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for IPv6 Routing Multiprotocol BGP Link-Local Address Peering The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 20: Feature Information for IPv6 Routing: Multiprotocol BGP Link-Local Address Peering Feature InformationReleasesFeature Name This feature is supported.Cisco IOS XE Release 2.1IPv6 Routing: Multiprotocol BGP Link-Local Address Peering C H A P T E R 9 IPv6 Multicast Address Family Support for Multiprotocol BGP Finding Feature Information, on page 205 Information About IPv6 Multicast Address Family Support for Multiprotocol BGP, on page 205 How to Implement IPv6 Multicast Address Family Support for Multiprotocol BGP, on page 206 Configuration Examples for IPv6 Multicast Address Family Support for Multiprotocol BGP, on page 214 Additional References, on page 215 Feature Information for IPv6 Multicast Address Family Support for Multiprotocol BGP, on page 216 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About IPv6 Multicast Address Family Support for Multiprotocol BGP Multiprotocol BGP for the IPv6 Multicast Address Family The multiprotocol BGP for the IPv6 multicast address family feature provides multicast BGP extensions for IPv6 and supports the same features and functionality as IPv4 BGP. IPv6 enhancements to multicast BGP include support for an IPv6 multicast address family and network layer reachability information (NLRI) and next hop (the next router in the path to the destination) attributes that use IPv6 addresses. Multicast BGP is an enhanced BGP that allows the deployment of interdomain IPv6 multicast. Multiprotocol BGP carries routing information for multiple network layer protocol address families; for example, IPv6 address family and for IPv6 multicast routes. The IPv6 multicast address family contains routes used for RPF lookup by the IPv6 PIM protocol, and multicast BGP IPv6 provides for interdomain transport of the same. Users must use multiprotocol BGP for IPv6multicast when using IPv6multicast with BGP because the unicast BGP learned routes will not be used for IPv6 multicast. Multicast BGP functionality is provided through a separate address family context. A subsequent address family identifier (SAFI) provides information about the type of the network layer reachability information that is carried in the attribute. Multiprotocol BGP unicast uses SAFI 1 messages, and multiprotocol BGP multicast uses SAFI 2 messages. SAFI 1 messages indicate that the routes are usable only for IP unicast, not IP multicast. Because of this functionality, BGP routes in the IPv6 unicast RIB must be ignored in the IPv6 multicast RPF lookup. A separate BGP routing table is maintained to configure incongruent policies and topologies (for example, IPv6 unicast and multicast) by using IPv6 multicast RPF lookup. Multicast RPF lookup is very similar to the IP unicast route lookup. No MRIB is associated with the IPv6 multicast BGP table. However, IPv6 multicast BGP operates on the unicast IPv6 RIB when needed. Multicast BGP does not insert or update routes into the IPv6 unicast RIB. How to Implement IPv6 Multicast Address Family Support for Multiprotocol BGP Configuring an IPv6 Peer Group to Perform Multicast BGP Routing SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. neighbor peer-group-name peer-group 5. neighbor {ip-address | ipv6-address | peer-group-name} remote-as as-number 6. address-family ipv6 [unicast |multicast] 7. neighbor {ip-address | peer-group-name | ipv6-address} activate 8. neighbor {ip-address | ipv6-address} peer-group peer-group-name DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal PurposeCommand or Action Enters router configuration mode for the specified BGP routing process. router bgp as-number Example: Step 3 Device(config)# router bgp 65000 Creates a BGP peer group.neighbor peer-group-name peer-group Example: Step 4 Device(config-router)# neighbor group1 peer-group Adds the IPv6 address of the neighbor in the specified autonomous system to the IPv6 multicast BGP neighbor table of the local router. neighbor {ip-address | ipv6-address | peer-group-name} remote-as as-number Example: Step 5 The ipv6-address argument in the neighbor remote-as command must be in the form documented in RFCDevice(config-router)# neighbor 2001:DB8:0:CC00::1 remote-as 64600 2373 where the address is specified in hexadecimal using 16-bit values between colons. Specifies the IPv6 address family, and enters address family configuration mode. address-family ipv6 [unicast |multicast] Example: Step 6 The unicast keyword specifies the IPv6 unicast address family. By default, the router is placed in configurationDevice(config-router)# address-family ipv6 multicast mode for the IPv6 unicast address family if a keyword is not specified in the address-family ipv6 command. Themulticast keyword specifies IPv6 multicast address prefixes. Enables the neighbor to exchange prefixes for the specified family type with the neighbor and the local router. neighbor {ip-address | peer-group-name | ipv6-address} activate Step 7 Example: To avoid extra configuration steps for each neighbor, use the neighbor activate command with the Device(config-router-af)# neighbor 2001:DB8:0:CC00::1 activate peer-group-name argument as an alternative in this step. Assigns the IPv6 address of a BGP neighbor to a peer group.neighbor {ip-address | ipv6-address} peer-group peer-group-name Step 8 Example: Device(config-router-af)# neighbor 2001:DB8:0:CC00::1 peer-group group1 Advertising Routes into IPv6 Multiprotocol BGP By default, networks that are defined in router configuration mode using the network command are injected into the IPv4 unicast database. To inject a network into another database, such as the IPv6 BGP database, you must define the network using the network command in address family configuration mode for the other database, as shown for the IPv6 BGP database. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. address-family ipv6 [vrf vrf-name] [unicast |multicast | vpnv6] 5. network {network-number [mask network-mask] | nsap-prefix} [route-map map-tag] 6. exit DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified BGP routing process. router bgp as-number Example: Step 3 Device(config)# router bgp 65000 Specifies the IPv6 address family, and enters address family configuration mode. address-family ipv6 [vrf vrf-name] [unicast |multicast | vpnv6] Step 4 Example: The unicast keyword specifies the IPv6 unicast address family. By default, the device is placed in configuration Device(config-router)# address-family ipv6 unicast mode for the IPv6 unicast address family if a keyword is not specified with the address-family ipv6 command. Themulticast keyword specifies IPv6 multicast address prefixes. Advertises (injects) the specified prefix into the IPv6 BGP database (the routes must first be found in the IPv6 unicast routing table). network {network-number [mask network-mask] | nsap-prefix} [route-map map-tag] Example: Step 5 The prefix is injected into the database for the address family specified in the previous step.Device(config-router-af)# network 2001:DB8::/24 Routes are tagged from the specified prefix as “local origin.” The ipv6-prefix argument in the network command must be in the form documented in RFC 2373 where PurposeCommand or Action the address is specified in hexadecimal using 16-bit values between colons. The prefix-length argument is a decimal value that indicates how many of the high-order contiguous bits of the address comprise the prefix (the network portion of the address). A slash markmust precede the decimal value. Exits address family configuration mode, and returns the device to router configuration mode. exit Example: Step 6 Repeat this step to exit router configuration mode and return the device to global configuration mode.Device(config-router-af)# exit Redistributing Prefixes into IPv6 Multiprotocol BGP Redistribution is the process of redistributing, or injecting, prefixes from one routing protocol into another routing protocol. This task explains how to inject prefixes from a routing protocol into IPv6 multiprotocol BGP. Specifically, prefixes that are redistributed into IPv6 multiprotocol BGP using the redistribute router configuration command are injected into the IPv6 unicast database. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. address-family ipv6 [vrf vrf-name] [unicast |multicast | vpnv6] 5. redistribute bgp [process-id] [metricmetric-value] [route-mapmap-name] [source-protocol-options] 6. exit DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified BGP routing process. router bgp as-number Example: Step 3 PurposeCommand or Action Device(config)# router bgp 65000 Specifies the IPv6 address family, and enters address family configuration mode. address-family ipv6 [vrf vrf-name] [unicast |multicast | vpnv6] Step 4 Example: The unicast keyword specifies the IPv6 unicast address family. By default, the device is placed in configuration Device(config-router)# address-family ipv6 mode for the IPv6 unicast address family if a keyword is not specified with the address-family ipv6 command. Themulticast keyword specifies IPv6 multicast address prefixes. Redistributes IPv6 routes from one routing domain into another routing domain. redistribute bgp [process-id] [metric metric-value] [route-map map-name] [source-protocol-options] Example: Step 5 Device(config-router-af)# redistribute bgp 64500 metric 5 Exits address family configuration mode, and returns the device to router configuration mode. exit Example: Step 6 Repeat this step to exit router configuration mode and return the device to global configuration mode.Device(config-router-af)# exit Assigning a BGP Administrative Distance Changing the administrative distance of BGP internal routes is not recommended. One problem that can occur is the accumulation of routing table inconsistencies, which can break routing. Caution SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. address-family ipv6 [unicast |multicast} 5. distance bgp external-distance internal-distance local-distance DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. PurposeCommand or Action Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp as-number Example: Step 3 Device(config)# router bgp 100 Enters address family configuration mode for configuring routing sessions such as BGP that use standard IPv6 address prefixes. address-family ipv6 [unicast |multicast} Example: Device(config-router)# address-family ipv6 multicast Step 4 Assigns a BGP administrative distance.distance bgp external-distance internal-distance local-distance Step 5 Example: Device(config-router)# distance bgp 20 20 200 Generating Translate Updates for IPv6 Multicast BGP The multicast BGP translate-update feature generally is used in a multicast BGP-capable router that peers with a customer site that has only a BGP-capable router; the customer site has not or cannot upgrade its router to a multicast BGP-capable image. Because the customer site cannot originate multicast BGP advertisements, the router with which it peers will translate the BGP prefixes into multicast BGP prefixes, which are used for multicast-source RPF lookup. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. address-family ipv6 [unicast |multicast} 5. neighbor ipv6-address translate-update ipv6 multicast [unicast] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. PurposeCommand or Action Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp as-number Example: Step 3 Device(config)# router bgp 100 Enters address family configuration mode for configuring routing sessions such as BGP that use standard IPv6 address prefixes. address-family ipv6 [unicast |multicast} Example: Device(config-router)# address-family ipv6 multicast Step 4 Generates multiprotocol IPv6 BGP updates that correspond to unicast IPv6 updates received from a peer. neighbor ipv6-address translate-update ipv6multicast [unicast] Example: Step 5 Device(config-router)# neighbor 2001:DB8:7000::2 translate-update ipv6 multicast Resetting IPv6 BGP Sessions SUMMARY STEPS 1. enable 2. clear bgp ipv6 {unicast |multicast} {* | autonomous-system-number | ip-address | ipv6-address | peer-group peer-group-name} [soft] [in | out] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Resets IPv6 BGP sessions.clear bgp ipv6 {unicast |multicast} {* | autonomous-system-number | ip-address | ipv6-address | peer-group peer-group-name} [soft] [in | out] Step 2 Example: PurposeCommand or Action Device# clear bgp ipv6 unicast peer-group marketing soft out Clearing External BGP Peers SUMMARY STEPS 1. enable 2. clear bgp ipv6 {unicast |multicast} external [soft] [in | out] 3. clear bgp ipv6 {unicast |multicast} peer-group name DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Clears external IPv6 BGP peers.clear bgp ipv6 {unicast |multicast} external [soft] [in | out] Step 2 Example: Device# clear bgp ipv6 unicast external soft in Clears all members of an IPv6 BGP peer group.clear bgp ipv6 {unicast |multicast} peer-group name Example: Step 3 Device# clear bgp ipv6 unicast peer-group marketing Clearing IPv6 BGP Route Dampening Information SUMMARY STEPS 1. enable 2. clear bgp ipv6 {unicast |multicast} dampening [ipv6-prefix/prefix-length] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. PurposeCommand or Action Device> enable Clears IPv6 BGP route dampening information and unsuppresses the suppressed routes. clear bgp ipv6 {unicast |multicast} dampening [ipv6-prefix/prefix-length] Example: Step 2 Device# clear bgp ipv6 unicast dampening 2001:DB8::/64 Clearing IPv6 BGP Flap Statistics SUMMARY STEPS 1. enable 2. clear bgp ipv6 {unicast |multicast} flap-statistics [ipv6-prefix/prefix-length | regexp regexp | filter-list list] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Clears IPv6 BGP flap statistics.clear bgp ipv6 {unicast |multicast} flap-statistics [ipv6-prefix/prefix-length | regexp regexp | filter-list list] Step 2 Example: Device# clear bgp ipv6 unicast flap-statistics filter-list 3 Configuration Examples for IPv6 Multicast Address Family Support for Multiprotocol BGP Example: Configuring an IPv6 Multiprotocol BGP Peer Group The following example configures the IPv6 multiprotocol BGP peer group named group1: router bgp 65000 no bgp default ipv4-unicast neighbor group1 peer-group neighbor 2001:DB8:0:CC00::1 remote-as 64600 address-family ipv6 unicast neighbor group1 activate neighbor 2001:DB8:0:CC00::1 peer-group group1 Example: Advertising Routes into IPv6 Multiprotocol BGP The following example injects the IPv6 network 2001:DB8::/24 into the IPv6 unicast database of the local device. (BGP checks that a route for the network exists in the IPv6 unicast database of the local device before advertising the network.) router bgp 65000 no bgp default ipv4-unicast address-family ipv6 unicast network 2001:DB8::/24 Example: Redistributing Prefixes into IPv6 Multiprotocol BGP The following example redistributes RIP routes into the IPv6 unicast database of the local device: router bgp 64900 no bgp default ipv4-unicast address-family ipv6 unicast redistribute rip Example: Generating Translate Updates for IPv6 Multicast BGP The following example shows how to generate IPv6 multicast BGP updates that correspond to unicast IPv6 updates: router bgp 64900 no bgp default ipv4-unicast address-family ipv6 multicast neighbor 2001:DB8:7000::2 translate-update ipv6 multicast Additional References Related Documents Document TitleRelated Topic IPv6 Configuration GuideIPv6 addressing and connectivity Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IPv6 Command Reference IPv6 commands Cisco IOS IPv6 Feature MappingCisco IOS IPv6 features Standards and RFCs TitleStandard/RFC IPv6 RFCs RFCs for IPv6 MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs — Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for IPv6 Multicast Address Family Support for Multiprotocol BGP The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 21: Feature Information for IPv6 Multicast: Address Family Support for Multiprotocol BGP Feature InformationReleasesFeature Name This feature provides multicast BGP extensions for IPv6 and supports the same features and functionality as IPv4 BGP. Cisco IOS XE Release 2.1IPv6 Multicast: Address Family Support for Multiprotocol BGP C H A P T E R 10 Configuring Multiprotocol BGP (MP-BGP) Support for CLNS This module describes configuration tasks to configure multiprotocol BGP (MP-BGP) support for CLNS, which provides the ability to scale Connectionless Network Service (CLNS) networks. The multiprotocol extensions of Border Gateway Protocol (BGP) add the ability to interconnect separate Open System Interconnection (OSI) routing domains without merging the routing domains, thus providing the capability to build very large OSI networks. Finding Feature Information, on page 217 Restrictions for Configuring MP-BGP Support for CLNS, on page 217 Information About Configuring MP-BGP Support for CLNS, on page 218 How to Configure MP-BGP Support for CLNS, on page 222 Configuration Examples for MP-BGP Support for CLNS, on page 242 Additional References, on page 251 Feature Information for Configuring MP-BGP Support for CLNS, on page 251 Glossary, on page 254 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Restrictions for Configuring MP-BGP Support for CLNS The configuration ofMP-BGP support for CLNS does not support the creation and use of BGP confederations within the CLNS network. We recommend the use of route reflectors to address the issue of a large internal BGP mesh. BGP extended communities are not supported by the MP-BGP Support for CLNS feature. The following BGP commands are not supported by the MP-BGP Support for CLNS feature: auto-summary neighbor advertise-map neighbor distribute-list neighbor soft-reconfiguration neighbor unsuppress-map Information About Configuring MP-BGP Support for CLNS Address Family Routing Information By default, commands entered under the router bgp command apply to the IPv4 address family. This will continue to be the case unless you enter the no bgp default ipv4-unicast command as the first command under the router bgp command. The no bgp default ipv4-unicast command is configured on the router to disable the default behavior of the BGP routing process exchanging IPv4 addressing information with BGP neighbor routers. Design Features of MP-BGP Support for CLNS The configuration of MP-BGP support for CLNS allows BGP to be used as an interdomain routing protocol in networks that use CLNS as the network-layer protocol. This feature was developed to solve a scaling issue with a data communications network (DCN) where large numbers of network elements are managed remotely. For details about the DCN issues and how to implement this feature in a DCN topology, see the DCNNetwork Topology, on page 220. BGP, as an Exterior Gateway Protocol, was designed to handle the volume of routing information generated by the Internet. Network administrators can control the BGP routing information because BGP neighbor relationships (peering) are manually configured and routing updates use incremental broadcasts. Some interior routing protocols such as Intermediate System-to-Intermediate System (IS-IS), in contrast, use a form of automatic neighbor discovery and broadcast updates at regular intervals. CLNS uses network service access point (NSAP) addresses to identify all its network elements. Using the BGP address-family support, NSAP address prefixes can be transported using BGP. In CLNS, BGP prefixes are inserted into the CLNS Level 2 prefix table. This functionality allows BGP to be used as an interdomain routing protocol between separate CLNS routing domains. Implementing BGP in routers at the edge of each internal network means that the existing interior protocols need not be changed, minimizing disruption in the network. Generic BGP CLNS Network Topology The figure below shows a generic BGP CLNS network containing nine routers that are grouped into four different autonomous systems (in BGP terminology) or routing domains (in OSI terminology). To avoid confusion, we will use the BGP terminology of autonomous systems because each autonomous system is numbered and therefore more easily identified in the diagram and in the configuration discussion. Figure 19: Components in a Generic BGP CLNS Network Within each autonomous system, IS-IS is used as the intradomain routing protocol. Between autonomous systems, BGP and its multiprotocol extensions are used as the interdomain routing protocol. Each router is running either a BGP or Level 2 IS-IS routing process. To facilitate this feature, the BGP routers are also running a Level 2 IS-IS process. Although the links are not shown in the figure, each Level 2 IS-IS router is connected to multiple Level 1 IS-IS routers that are, in turn, connected to multiple CLNS networks. Each autonomous system in this example is configured to demonstrate various BGP features and how these features work with CLNS to provide a scalable interdomain routing solution. In the figure above, the autonomous system AS65101 has a single Level 2 IS-IS router, R1, and is connected to just one other autonomous system, AS65202. Connectivity to the rest of the network is provided by R2, and a default route is generated for R1 to send to R2 all packets with destination NSAP addresses outside of AS65101. In AS65202 there are two routers, R2 and R3, both with different external BGP (eBGP) neighbors. Routers R2 and R3 are configured to run internal BGP (iBGP) over the internal connection between them. AS65303 shows how the use of BGP peer groups and route reflection can minimize the need for TCP connections between routers. Fewer connections between routers simplifies the network design and the amount of traffic in the network. AS65404 shows how to use redistribution to communicate network reachability information to a Level 2 IS-IS router that is not running BGP. The configuration tasks and examples are based on the generic network design shown in the figure above. Configurations for all the routers in the figure are listed in the Implementing MP-BGP Support for CLNS Example, on page 246. DCN Network Topology The Multiprotocol BGP (MP-BGP) Support for CLNS feature can benefit a DCN managing a large number of remote SONET rings. SONET is typically used by telecommunications companies to send data over fiber-optic networks. The figure below shows some components of a DCN network. To be consistent with the BGP terminology, the figure contains labels to indicate three autonomous systems instead of routing domains. The network elements--designated by NE in Figure 2--of a SONET ring are managed by OSI protocols such as File Transfer, Access, and Management (FTAM) and Common Management Information Protocol (CMIP). FTAM and CMIP run over the CLNS network-layer protocol, which means that the routers providing connectivity must run an OSI routing protocol. Figure 20: Components in a DCN Network IS-IS is a link-state protocol used in this example to route CLNS. Each routing node (networking device) is called an intermediate system (IS). The network is divided into areas defined as a collection of routing nodes. Routing within an area is referred to as Level 1 routing. Routing between areas involves Level 2 routing. Routers that link a Level 1 area with a Level 2 area are defined as Level 1-2 routers. A network element that connects to the Level 2 routers that provide a path to the DCN core is represented by a gateway network element--GNE in Figure 2. The network topology here is a point-to-point link between each network element router. In this example, a Level 1 IS-IS router is called an NE router. Smaller Cisco routers such as the Cisco 2600 series were selected to run as the Level 1-2 routers because shelf space in the central office (CO) of a service provider is very expensive. A Cisco 2600 series router has limited processing power if it is acting as the Level 1 router for four or five different Level 1 areas. The number of Level 1 areas under this configuration is limited to about 200. The entire Level 2 network is also limited by the speed of the slowest Level 2 router. To provide connectivity between NE routers, in-band signaling is used. The in-band signaling is carried in the SONET/Synchronous Digital Hierarchy (SDH) frame on the data communications channel (DCC). The DCC is a 192-KB channel, which is a very limited amount of bandwidth for the management traffic. Due to the limited signaling bandwidth between network elements and the limited amount of processing power and memory in the NE routers running IS-IS, each area is restricted to a maximum number of 30 to 40 routers. On average, each SONET ring consists of 10 to 15 network elements. With a maximum of 200 areas containing 10 to 15 network elements per area, the total number of network element routers in a single autonomous system must be fewer than 3000. Service providers are looking to implement over 10,000 network elements as their networks grow, but the potential number of network elements in an area is limited. The current solution is to break down the DCN into a number of smaller autonomous systems and connect them using static routes or ISO Interior Gateway Routing Protocol (IGRP). ISO IGRP is a proprietary protocol that can limit future equipment implementation options. Static routing does not scale because the growth in the network can exceed the ability of a network administrator to maintain the static routes. BGP has been shown to scale to over 100,000 routes. To implement the Multiprotocol BGP (MP-BGP) Support for CLNS feature in this example, configure BGP to run on each router in the DCN core network--AS64800 in Figure 2--to exchange routing information between all the autonomous systems. In the autonomous systems AS64600 and AS64700, only the Level 2 routers will run BGP. BGP uses TCP to communicate with BGP-speaking neighbor routers, which means that both an IP-addressed network and an NSAP-addressed network must be configured to cover all the Level 2 IS-IS routers in the autonomous systems AS64600 and AS64700 and all the routers in the DCN core network. Assuming that each autonomous system--for example, AS64600 and AS64700 in Figure 2--remains the same size with up to 3000 nodes, we can demonstrate how large DCN networks can be supported with this feature. Each autonomous system advertises one address prefix to the core autonomous system. Each address prefix can have two paths associated with it to provide redundancy because there are two links between each autonomous system and the core autonomous system. BGP has been shown to support 100,000 routes, so the core autonomous system can support many other directly linked autonomous systems because each autonomous system generates only a few routes. We can assume that the core autonomous system can support about 2000 directly linked autonomous systems.With the hub-and-spoke design where each autonomous system is directly linked to the core autonomous system, and not acting as a transit autonomous system, the core autonomous system can generate a default route to each linked autonomous system. Using the default routes, the Level 2 routers in the linked autonomous systems process only a small amount of additional routing information. Multiplying the 2000 linked autonomous systems by the 3000 nodes within each autonomous system could allow up to 6 million network elements. Benefits of MP-BGP Support for CLNS The Multiprotocol BGP (MP-BGP) Support for CLNS feature adds the ability to interconnect separate OSI routing domains without merging the routing domains, which provides the capability to build very large OSI networks. The benefits of using this feature are not confined to DCN networks, and can be implemented to help scale any network using OSI routing protocols with CLNS. How to Configure MP-BGP Support for CLNS Configuring and Activating a BGP Neighbor to Support CLNS To configure and activate a BGP routing process and an associated BGP neighbor (peer) to support CLNS, perform the steps in this procedure. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. no bgp default ipv4-unicast 5. neighbor {ip-address | peer-group-name} remote-as as-number 6. address-family nsap [unicast] 7. neighbor ip-address activate 8. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Configures a BGP routing process and enters router configuration mode. router bgp as-number Example: Step 3 The as-number argument identifies the autonomous system in which the router resides. Valid values areRouter(config)# router bgp 65101 from 0 to 65535. Private autonomous system numbers that can be used in internal networks range from 64512 to 65535. Disables the default behavior of the BGP routing process exchanging IPv4 addressing informationwith BGP neighbor routers. no bgp default ipv4-unicast Example: Router(config-router)# no bgp default ipv4-unicast Step 4 PurposeCommand or Action Adds an IP address or peer group name of the BGP neighbor in the specified autonomous system to the BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as as-number Example: Step 5 Router(config-router)# neighbor 10.1.2.2 remote-as 64202 Specifies the NSAP address family and enters address family configuration mode. address-family nsap [unicast] Example: Step 6 The optional unicast keyword specifies the NSAP unicast address prefixes. By default, the router isRouter(config-router)# address-family nsap placed in configuration mode for the unicast NSAP address family if the unicast keyword is not specified with the address-family nsap command. Enables the BGP neighbor to exchange prefixes for the NSAP address family with the local router. neighbor ip-address activate Example: Step 7 If you have configured a peer group as a BGP neighbor, you do not use this command because peer groups are automatically activated when any peer group parameter is configured. Note Router(config-router-af)# neighbor 10.1.2.2 activate Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 8 Router(config-router-af)# end Configuring an IS-IS Routing Process When an integrated IS-IS routing process is configured, the first instance of the IS-IS routing process configured is by default a Level 1-2 (intra-area and interarea) router. All subsequent IS-IS routing processes on a network running CLNS are configured as Level 1. All subsequent IS-IS routing processes on a network running IP are configured as Level-1-2. To use the Multiprotocol BGP (MP-BGP) Support for CLNS feature, configure a Level 2 routing process. To configure an IS-IS routing process and assign it as a Level-2-only process, perform the steps in this procedure. SUMMARY STEPS 1. enable 2. configure terminal 3. router isis area-tag 4. net network-entity-title 5. is-type [level-1 | level-1-2 | level-2-only] 6. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Configures an IS-IS routing process and enters router configuration mode for the specified routing process. router isis area-tag Example: Step 3 The area-tag argument is a meaningful name for a routing process. It must be unique among all IP and CLNS routing processes for a given router. Router(config)# router isis osi-as-101 Configures a network entity title (NET) for the routing process. net network-entity-title Example: Step 4 If you are configuring multiarea IS-IS, you must specify a NET for each routing process.Router(config-router)# net 49.0101.1111.1111.1111.1111.00 Configures the router to act as a Level 1 (intra-area) router, as both a Level 1 router and a Level 2 (interarea) router, or as an interarea router only. is-type [level-1 | level-1-2 | level-2-only] Example: Router(config-router)# is-type level-1 Step 5 In multiarea IS-IS configurations, the first instance of the IS-IS routing process configured is by default a Level 1-2 (intra-area and interarea) router. All subsequent IS-IS routing processes on a network running CLNS are configured as Level 1. All subsequent IS-IS routing processes on a network running IP are configured as Level 1-2. Exits router configuration mode and returns to privileged EXEC mode. end Example: Step 6 Router(config-router)# end Configuring Interfaces That Connect to BGP Neighbors When a router running IS-IS is directly connected to an eBGP neighbor, the interface between the two eBGP neighbors is activated using the clns enable command, which allows CLNS packets to be forwarded across the interface. The clns enable command activates the End System-to-Intermediate System (ES-IS) protocol to search for neighboring OSI systems. Running IS-IS across the same interface that is connected to an eBGP neighbor can lead to undesirable results if the two OSI routing domains merge into a single domain. Note When a neighboring OSI system is found, BGP checks that it is also an eBGP neighbor configured for the NSAP address family. If both the preceding conditions are met, BGP creates a special BGP neighbor route in the CLNS Level 2 prefix routing table. The special BGP neighbor route is automatically redistributed in to the Level 2 routing updates so that all other Level 2 IS-IS routers in the local OSI routing domain know how to reach this eBGP neighbor. To configure interfaces that are being used to connect with eBGP neighbors, perform the steps in this procedure. These interfaces will normally be directly connected to their eBGP neighbor. SUMMARY STEPS 1. enable 2. configure terminal 3. interface type number 4. ip address ip-address mask 5. clns enable 6. no shutdown 7. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Specifies the interface type and number and enters interface configuration mode. interface type number Example: Step 3 Router(config)# interface serial 2/0/0 PurposeCommand or Action Configures the interface with an IP address.ip address ip-address mask Example: Step 4 Router(config-if)# ip address 10.1.2.2 255.255.255.0 Specifies that CLNS packets can be forwarded across this interface. clns enable Example: Step 5 The ES-IS protocol is activated and starts to search for adjacent OSI systems.Router(config-if)# clns enable Turns on the interface.no shutdown Example: Step 6 Router(config-if)# no shutdown Exits interface configuration mode and returns to privileged EXEC mode. end Example: Step 7 Router(config-if)# end Configuring Interfaces Connected to the Local OSI Routing Domain To configure interfaces that are connected to the local OSI routing domain, perform the steps in this procedure. SUMMARY STEPS 1. enable 2. configure terminal 3. interface type number 4. ip address ip-address mask 5. clns router isis area-tag 6. ip router isis area-tag 7. no shutdown 8. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable PurposeCommand or Action Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Specifies the interface type and number and enters interface configuration mode. interface type number Example: Step 3 Router(config)# interface gigabitethernet 0/1/1 Configures the interface with an IP address.ip address ip-address maskStep 4 Example: This step is required only when the interface needs to communicate with an iBGP neighbor. Note Router(config-if)# ip address 10.2.3.1 255.255.255.0 Specifies that the interface is actively routing IS-IS when the network protocol is ISO CLNS and identifies the area associated with this routing process. clns router isis area-tag Example: Router(config-if)# Step 5 clns router isis osi-as-202 Specifies that the interface is actively routing IS-IS when the network protocol is IP and identifies the area associated with this routing process. ip router isis area-tag Example: Router(config-if)# Step 6 This step is required only when the interface needs to communicate with an iBGP neighbor, and the IGP is IS-IS. Note ip router isis osi-as-202 Turns on the interface.no shutdown Example: Step 7 Router(config-if)# no shutdown Exits interface configuration mode and returns to privileged EXEC mode. end Example: Step 8 Router(config-if)# end Advertising Networking Prefixes Advertising NSAP address prefix forces the prefixes to be added to the BGP routing table. To configure advertisement of networking prefixes, perform the steps in this procedure. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. no bgp default ipv4-unicast 5. neighbor {ip-address | peer-group-name} remote-as as-number 6. address-family nsap [unicast] 7. network nsap-prefix [route-map map-tag] 8. neighbor ip-address activate 9. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Configures a BGP routing process and enters router configuration mode for the specified routing process. router bgp as-number Example: Step 3 Router(config)# router bgp 65101 Disables the default behavior of the BGP routing process exchanging IPv4 addressing informationwith BGP neighbor routers. no bgp default ipv4-unicast Example: Router(config-router)# no bgp default ipv4-unicast Step 4 Adds an IP address or peer group name of the BGP neighbor in the specified autonomous system to the BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as as-number Example: Step 5 Router(config-router)# neighbor 10.1.2.2 remote-as 64202 Specifies the NSAP address family and enters address family configuration mode. address-family nsap [unicast] Example: Step 6 The optional unicast keyword specifies the NSAP unicast address prefixes. By default, the router isRouter(config-router)# address-family nsap placed in unicast NSAP address family configuration PurposeCommand or Action mode if the unicast keyword is not specified with the address-family nsap command. Advertises a single prefix of the local OSI routing domain and enters it in the BGP routing table. network nsap-prefix [route-map map-tag] Example: Step 7 It is possible to advertise a single prefix, in which case this prefix could be the unique NSAP address prefix of the local OSI routing domain. Alternatively, multiple longer prefixes, each covering a small portion of the OSI routing domain, can be used to selectively advertise different areas. Note Router(config-router-af)# network 49.0101.1111.1111.1111.1111.00 The advertising of NSAP address prefixes can be controlled by using the optional route-map keyword. If no route map is specified, all NSAP address prefixes are redistributed. Specifies that NSAP routing information will be sent to the specified BGP neighbor. neighbor ip-address activate Example: Step 8 See the description of the neighbor command in the documents listed in the "Additional References" for more details on the use of this command. Note Router(config-router-af) neighbor 10.1.2.2 activate Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 9 Router(config-router-af)# end Redistributing Routes from BGP into IS-IS Route redistribution must be approached with caution. We do not recommend injecting the full set of BGP routes into IS-IS because excessive routing traffic will be added to IS-IS. Route maps can be used to control which dynamic routes are redistributed. To configure route redistribution from BGP into IS-IS, perform the steps in this procedure. SUMMARY STEPS 1. enable 2. configure terminal 3. router isis area-tag 4. net network-entity-title 5. redistribute protocol as-number [route-type] [route-map map-tag] 6. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Configures an IS-IS routing process and enters router configuration mode for the specified routing process. router isis area-tag Example: Step 3 You cannot redistribute BGP routes into a Level 1-only IS-IS routing process. Note Router(config)# router isis osi-as-404 Configures a NET for the routing process.net network-entity-titleStep 4 Example: If you are configuring multiarea IS-IS, you must specify a NET for each routing process. Router(config-router)# net 49.0404.7777.7777.7777.7777.00 Redistributes NSAP prefix routes fromBGP into the CLNS Level 2 routing table associated with the IS-IS routing redistribute protocol as-number [route-type] [route-map map-tag] Step 5 process when the protocol argument is set to bgpand the route-type argument is set to clns.Example: Router(config-router)# redistribute bgp 65404 clns • The as-number argument is defined as the autonomous system number of the BGP routing process to be redistributed into CLNS. The redistribution of routes can be controlled by using the optional route-map keyword. If no route map is specified, all BGP routes are redistributed. Exits router configuration mode and returns to privileged EXEC mode. end Example: Step 6 Router(config-router)# end Redistributing Routes from IS-IS into BGP Route redistribution must be approached with caution because redistributed route information is stored in the routing tables. Large routing tables may make the routing process slower. Route maps can be used to control which dynamic routes are redistributed. To configure route redistribution from IS-IS into BGP, perform the steps in this procedure. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. no bgp default ipv4-unicast 5. address-family nsap [unicast] 6. redistribute protocol [process-id] [route-type] [route-map map-tag] 7. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Configures a BGP routing process and enters router configuration mode for the specified routing process. router bgp as-number Example: Step 3 Router(config)# router bgp 65202 Disables the default behavior of the BGP routing process exchanging IPv4 addressing informationwith BGP neighbor routers. no bgp default ipv4-unicast Example: Router(config-router)# no bgp default ipv4-unicast Step 4 Specifies the NSAP address family and enters address family configuration mode. address-family nsap [unicast] Example: Step 5 Router(config-router)# address-family nsap Redistributes routes from the CLNS Level 2 routing table associated with the IS-IS routing process into BGP as NSAP redistribute protocol [process-id] [route-type] [route-map map-tag] Step 6 PurposeCommand or Action prefixes when the protocol argument is set to isisand the route-type argument is set to clns. Example: Router(config-router-af)# redistribute isis osi-as-202 clns route-map internal-routes-only • The process-id argument is defined as the area name for the relevant IS-IS routing process to be redistributed. The redistribution of routes can be controlled by using the optional route-map keyword. If no route map is specified, all Level 2 routes are redistributed. Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 7 Router(config-router-af)# end Configuring BGP Peer Groups and Route Reflectors BGP peer groups reduce the number of configuration commands by applying a BGP neighbor command to multiple neighbors. Using a BGP peer group with a local router configured as a BGP route reflector allows BGP routing information received from one member of the group to be replicated to all other group members. Without a peer group, each route reflector client must be specified by IP address. To create a BGP peer group and use the group as a BGP route reflector client, perform the steps in this procedure. This is an optional task and is used with internal BGP neighbors. In this task, some of the BGP syntax is shown with the peer-group-name argument only and only one neighbor is configured as a member of the peer group. Repeat Step 9 to configure other BGP neighbors as members of the peer group. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. no bgp default ipv4-unicast 5. neighbor peer-group-name peer-group 6. neighbor peer-group-name remote-as as-number 7. address-family nsap [unicast] 8. neighbor peer-group-name route-reflector-client 9. neighbor ip-address peer-group peer-group 10. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 PurposeCommand or Action Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Configures a BGP routing process and enters router configuration mode for the specified routing process. router bgp as-number Example: Step 3 Router(config)# router bgp 65303 Disables the default behavior of the BGP routing process exchanging IPv4 addressing information with BGP neighbor routers. no bgp default ipv4-unicast Example: Router(config-router)# no bgp default ipv4-unicast Step 4 Creates a BGP peer group.neighbor peer-group-name peer-group Example: Step 5 Router(config-router)# neighbor ibgp-peers peer-group Adds the peer group name of the BGP neighbor in the specified autonomous system to the BGP neighbor table of the local router. neighbor peer-group-name remote-as as-number Example: Router(config-router)# neighbor ibgp-peers remote-as 65303 Step 6 Specifies the NSAP address family and enters address family configuration mode. address-family nsap [unicast] Example: Step 7 Router(config-router)# address-family nsap Configures the router as a BGP route reflector and configures the specified peer group as its client. neighbor peer-group-name route-reflector-client Example: Step 8 Router(config-router-af)# neighbor ibgp-peers route-reflector-client Assigns a BGP neighbor to a BGP peer group.neighbor ip-address peer-group peer-group Example: Step 9 Router(config-router-af)# PurposeCommand or Action neighbor 10.4.5.4 peer-group ibgp-peers Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 10 Router(config-router-af)# end Filtering Inbound Routes Based on NSAP Prefixes Perform this task to filter inbound BGP routes based on NSAP prefixes. The neighbor prefix-list in command is configured in address family configuration mode to filter inbound routes. Before you begin You must specify either a CLNS filter set or a CLNS filter expression before configuring the neighbor command. See descriptions for the clns filter-expr and clns filter-set commands for more information. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. no bgp default ipv4-unicast 5. address-family nsap [unicast] 6. neighbor {ip-address| peer-group-name}prefix-list {clns-filter-expr-name| clns-filter-set-name} in 7. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Configures a BGP routing process and enters router configuration mode for the specified routing process. router bgp as-number Example: Step 3 Router(config)# router bgp 65200 PurposeCommand or Action Disables the default behavior of the BGP routing process exchanging IPv4 addressing informationwith BGP neighbor routers. no bgp default ipv4-unicast Example: Router(config-router)# no bgp default ipv4-unicast Step 4 Specifies the address family and enters address family configuration mode. address-family nsap [unicast] Example: Step 5 Router(config-router)# address-family nsap Specifies a CLNS filter set or CLNS filter expression to be used to filter inbound BGP routes. neighbor {ip-address| peer-group-name}prefix-list {clns-filter-expr-name| clns-filter-set-name} in Step 6 Example: The clns-filter-expr-name argument is defined with the clns filter-expr configuration command. Router(config-router-af)# neighbor 10.23.4.1 prefix-list abc in • The clns-filter-set-name argument is defined with the clns filter-set configuration command. Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 7 Router(config-router-af)# end Filtering Outbound BGP Updates Based on NSAP Prefixes Perform this task to filter outbound BGP updates based on NSAP prefixes, use the neighbor prefix-list out command in address family configuration mode. This task is configured at Router 7 in the figure above (in the "Generic BGP CLNS Network Topology" section). In this task, a CLNS filter is created with two entries to deny NSAP prefixes starting with 49.0404 and to permit all other NSAP prefixes starting with 49. A BGP peer group is created and the filter is applied to outbound BGP updates for the neighbor that is a member of the peer group. SUMMARY STEPS 1. enable 2. configure terminal 3. clns filter-set name [deny] template 4. clns filter-set name [permit] template 5. router bgp as-number 6. no bgp default ipv4-unicast 7. neighbor peer-group-name peer-group 8. neighbor {ip-address | peer-group-name} remote-as as-number 9. address-family nsap [unicast] 10. neighbor {ip-address | peer-group-name} prefix-list {clns-filter-expr-name | clns-filter-set-name} out 11. neighbor ip-address peer-group peer-group 12. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Defines a NSAP prefix match for a deny condition for use in CLNS filter expressions. clns filter-set name [deny] template Example: Step 3 In this example, a deny action is returned if an address starts with 49.0404.Router(config)# clns filter-set routes0404 deny 49.0404... Defines a NSAP prefix match for a permit condition for use in CLNS filter expressions. clns filter-set name [permit] template Example: Step 4 In this example, a permit action is returned if an address starts with 49.Router(config)# clns filter-set routes0404 permit 49... Although the permit example in this step allows all NSAP addresses starting with 49, the match condition in Step 3 is processed first so the NSAP addresses starting with 49.0404 are still denied. Note Configures a BGP routing process and enters router configuration mode for the specified routing process. router bgp as-number Example: Step 5 Router(config)# router bgp 65404 Disables the default behavior of the BGP routing process exchanging IPv4 addressing information with BGP neighbor routers. no bgp default ipv4-unicast Example: Router(config-router)# no bgp default ipv4-unicast Step 6 Creates a BGP peer group.neighbor peer-group-name peer-groupStep 7 Example: In this example, the BGP peer group named ebgp-peers is created. PurposeCommand or Action Router(config-router)# neighbor ebgp-peers peer-group Adds an IP address or peer group name of the BGP neighbor in the specified autonomous system to the BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as as-number Example: Step 8 In this example, the peer group named ebgp-peers is added to the BGP neighbor table.Router(config-router)# neighbor ebgp-peers remote-as 65303 Specifies the NSAP address family and enters address family configuration mode. address-family nsap [unicast] Example: Step 9 Router(config-router)# address-family nsap Specifies a CLNS filter set or CLNS filter expression to be used to filter outbound BGP updates. neighbor {ip-address | peer-group-name} prefix-list {clns-filter-expr-name | clns-filter-set-name} out Step 10 Example: The clns-filter-expr-name argument is defined with the clns filter-expr configuration command. Router(config-router-af)# neighbor ebgp-peers prefix-list routes0404 out • The clns-filter-set-name argument is defined with the clns filter-set configuration command. In this example, the filter set named routes0404 was created in Step3 and Step 4. Assigns a BGP neighbor to a BGP peer group.neighbor ip-address peer-group peer-group Example: Step 11 Router(config-router-af)# neighbor 10.6.7.8 peer-group ebgp-peers Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 12 Router(config-router-af)# end Originating Default Routes for a Neighboring Routing Domain To create a default CLNS route that points to the local router on behalf of a neighboring OSI routing domain, perform the steps in this procedure. This is an optional task and is normally used only with external BGP neighbors. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. no bgp default ipv4-unicast 5. address-family nsap [unicast] 6. neighbor {ip-address | peer-group-name} default-originate [route-map map-tag] 7. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Configures a BGP routing process and enters router configuration mode for the specified routing process. router bgp as-number Example: Step 3 Router(config)# router bgp 64803 Disables the default behavior of the BGP routing process exchanging IPv4 addressing informationwith BGP neighbor routers. no bgp default ipv4-unicast Example: Router(config-router)# no bgp default ipv4-unicast Step 4 Specifies the NSAP address family and enters address family configuration mode. address-family nsap [unicast] Example: Step 5 Router(config-router)# address-family nsap Generates a default CLNS route that points to the local router and that will be advertised to the neighboring OSI routing domain. neighbor {ip-address | peer-group-name} default-originate [route-map map-tag] Example: Step 6 Router(config-router-af)# neighbor 172.16.2.3 default-originate Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 7 PurposeCommand or Action Router(config-router-af)# end Verifying MP-BGP Support for CLNS To verify the configuration, use the show running-config EXEC command. Sample output is located in the Implementing MP-BGP Support for CLNS Example, on page 246. To verify that the Multiprotocol BGP (MP-BGP) Support for CLNS feature is working, perform the following steps. SUMMARY STEPS 1. show clns neighbors 2. show clns route 3. show bgp nsap unicast summary 4. show bgp nsap unicast DETAILED STEPS Step 1 show clns neighbors Use this command to confirm that the local router has formed all the necessary IS-IS adjacencies with other Level 2 IS-IS routers in the local OSI routing domain. If the local router has any directly connected external BGP peers, the output from this command will show that the external neighbors have been discovered, in the form of ES-IS adjacencies. In the following example, the output is displayed for router R2, shown in the figure above (in the "Generic BGP CLNS Network Topology" section). R2 has three CLNS neighbors. R1 and R4 are ES-IS neighbors because these nodes are in different autonomous systems from R2. R3 is an IS-IS neighbor because it is in the same autonomous system as R2. Note that the system ID is replaced by CLNS hostnames (r1, r3, and r4) that are defined at the start of each configuration file. Specifying the CLNS hostname means that you need not remember which system ID corresponds to which hostname. Example: Router# show clns neighbors Tag osi-as-202: System Id Interface SNPA State Holdtime Type Protocol r1 Se2/0 *HDLC* Up 274 IS ES-IS r3 Et0/1 0002.16de.8481 Up 9 L2 IS-IS r4 Se2/2 *HDLC* Up 275 IS ES-IS Step 2 show clns route Use this command to confirm that the local router has calculated routes to other areas in the local OSI routing domain. In the following example of output from router R2, shown in the figure above (in the "Generic BGP CLNS Network Topology" section), the routing table entry--i 49.0202.3333 [110/10] via R3--shows that router R2 knows about other local IS-IS areas within the local OSI routing domain. Example: Router# show clns route Codes: C - connected, S - static, d - DecnetIV I - ISO-IGRP, i - IS-IS, e - ES-IS B - BGP, b - eBGP-neighbor C 49.0202.2222 [2/0], Local IS-IS Area C 49.0202.2222.2222.2222.2222.00 [1/0], Local IS-IS NET b 49.0101.1111.1111.1111.1111.00 [15/10] via r1, Serial2/0 i 49.0202.3333 [110/10] via r3, GigabitEthernet0/1/1 b 49.0303.4444.4444.4444.4444.00 [15/10] via r4, Serial2/2 B 49.0101 [20/1] via r1, Serial2/0 B 49.0303 [20/1] via r4, Serial2/2 B 49.0404 [200/1] via r9 i 49.0404.9999.9999.9999.9999.00 [110/10] via r3, GigabitEthernet0/1/1 Step 3 show bgp nsap unicast summary Use this command to verify that the TCP connection to a particular neighbor is active. In the following example output, search the appropriate row based on the IP address of the neighbor. If the State/PfxRcd column entry is a number, including zero, the TCP connection for that neighbor is active. Example: Router# show bgp nsap unicast summary BGP router identifier 10.1.57.11, local AS number 65202 BGP table version is 6, main routing table version 6 5 network entries and 8 paths using 1141 bytes of memory 6 BGP path attribute entries using 360 bytes of memory 4 BGP AS-PATH entries using 96 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP activity 5/0 prefixes, 8/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.1.2.1 4 65101 34 34 6 0 0 00:29:11 1 10.2.3.3 4 65202 35 36 6 0 0 00:29:16 3 Step 4 show bgp nsap unicast Enter the show bgp nsap unicast command to display all the NSAP prefix routes that the local router has discovered. In the following example of output from router R2, shown in the figure above (in the "Generic BGP CLNS Network Topology" section), a single valid route to prefix 49.0101 is shown. Two valid routes--marked by a *--are shown for the prefix 49.0404. The second route is marked with a *>i sequence, representing the best route to this prefix. Example: Router# show bgp nsap unicast BGP table version is 3, local router ID is 192.168.3.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 49.0101 49.0101.1111.1111.1111.1111.00 0 65101 i * i49.0202.2222 49.0202.3333.3333.3333.3333.00 100 0 ? *> 49.0202.2222.2222.2222.2222.00 32768 ? * i49.0202.3333 49.0202.3333.3333.3333.3333.00 100 0 ? *> 49.0202.2222.2222.2222.2222.00 32768 ? *> 49.0303 49.0303.4444.4444.4444.4444.00 0 65303 i * 49.0404 49.0303.4444.4444.4444.4444.00 0 65303 65404 i *>i 49.0404.9999.9999.9999.9999.00 100 0 65404 i Troubleshooting MP-BGP Support for CLNS The debug bgp nsap unicastcommands enable diagnostic output concerning various events relating to the operation of the CLNS packets in the BGP routing protocol to be displayed on a console. These commands are intended only for troubleshooting purposes because the volume of output generated by the software when they are used can result in severe performance degradation on the router. See the Cisco IOS Debug Command Reference for more information about using these debug commands. To troubleshoot problems with the configuration of MP-BGP support for CLNS and to minimize the impact of the debugcommands used in this procedure, perform the following steps. SUMMARY STEPS 1. Attach a console directly to a router running the Cisco software release that includes the Multiprotocol BGP (MP-BGP) Support for CLNS feature. 2. no logging console 3. Use Telnet to access a router port. 4. enable 5. terminal monitor 6. debug bgp nsap unicast [neighbor-address | dampening | keepalives | updates] 7. no terminal monitor 8. no debug bgp nsap unicast [neighbor-address | dampening | keepalives | updates] 9. logging console DETAILED STEPS Step 1 Attach a console directly to a router running the Cisco software release that includes the Multiprotocol BGP (MP-BGP) Support for CLNS feature. This procedure will minimize the load on the router created by the debug bgp nsap unicast commands because the console port will no longer be generating character-by-character processor interrupts. If you cannot connect to a console directly, you can run this procedure via a terminal server. If you must break the Telnet connection, however, you may not be able to reconnect because the router may be unable to respond due to the processor load of generating the debug bgp nsap unicast output. Note Step 2 no logging console This command disables all logging to the console terminal. Step 3 Use Telnet to access a router port. Step 4 enable Enter this command to access privileged EXEC mode. Step 5 terminal monitor This command enables logging on the virtual terminal. Step 6 debug bgp nsap unicast [neighbor-address | dampening | keepalives | updates] Enter only specific debug bgp nsap unicastcommands to isolate the output to a certain subcomponent and minimize the load on the processor. Use appropriate arguments and keywords to generate more detailed debug information on specified subcomponents. Step 7 no terminal monitor This command disables logging on the virtual terminal. Step 8 no debug bgp nsap unicast [neighbor-address | dampening | keepalives | updates] Enter the specific no debug bgp nsap unicastcommand when you are finished. Step 9 logging console This command reenables logging to the console. Configuration Examples for MP-BGP Support for CLNS Example: Configuring and Activating a BGP Neighbor to Support CLNS In the following example, the router R1, shown in the figure below, in the autonomous system AS65101 is configured to run BGP and activated to support CLNS. Router R1 is the only Level 2 IS-IS router in autonomous system AS65101, and it has only one connection to another autonomous system via router R2 in AS65202. The no bgp default ipv4-unicast command is configured on the router to disable the default behavior of the BGP routing process exchanging IPv4 addressing information with BGP neighbor routers. After the NSAP address family configurationmode is enabled with the address-family nsap command, the router is configured to advertise the NSAP prefix of 49.0101 to its BGP neighbors and to send NSAP routing information to the BGP neighbor at 10.1.2.2. router bgp 65101 no bgp default ipv4-unicast address-family nsap network 49.0101... neighbor 10.1.2.2 activate exit-address-family Example: Configuring an IS-IS Routing Process In the following example, R1, shown in the figure below, is configured to run an IS-IS process: router isis osi-as-101 net 49.0101.1111.1111.1111.1111.00 The default IS-IS routing process level is used. Configuring Interfaces Example In the following example, two of the interfaces of the router R2, shown in the figure below, in the autonomous system AS65202 are configured to run CLNS. GigabitEthernet interface 0/1/1 is connected to the local OSI routing domain and is configured to run IS-IS when the network protocol is CLNS using the clns router isis command. The serial interface 2/0 with the local IP address of 10.1.2.2 is connected with an eBGP neighbor and is configured to run CLNS through the clns enable command: interface serial 2/0 ip address 10.1.2.2 255.255.255.0 clns enable no shutdown ! interface gigabitethernet 0/1/1 ip address 10.2.3.1 255.255.255.0 clns router isis osi-as-202 no shutdown Advertising Networking Prefixes Example In the following example, the router R1, shown in the figure below, is configured to advertise the NSAP prefix of 49.0101 to other routers. The NSAP prefix unique to autonomous system AS65101 is advertised to allow the other autonomous systems to discover the existence of autonomous system AS65101 in the network. router bgp 65101 no bgp default ipv4-unicast neighbor 10.1.2.2 remote-as 64202 address-family nsap network 49.0101... neighbor 10.1.2.2 activate Example: Redistributing Routes from BGP into IS-IS In the following example, the routers R7 and R9, shown in the figure below, in the autonomous system AS65404 are configured to redistribute BGP routes into the IS-IS routing process called osi-as-404. Redistributing the BGP routes allows the Level 2 IS-IS router, R8, to advertise routes to destinations outside the autonomous system AS65404. Without a route map being specified, all BGP routes are redistributed. Router R7 router isis osi-as-404 net 49.0404.7777.7777.7777.7777.00 redistribute bgp 65404 clns Router R9 router isis osi-as-404 net 49.0404.9999.9999.9999.9999.00 redistribute bgp 65404 clns Example: Redistributing Routes from IS-IS into BGP In the following example, the router R2, shown in the figure below, in the autonomous system AS65202 is configured to redistribute Level 2 CLNS NSAP routes into BGP. A route map is used to permit only routes from within the local autonomous system to be redistributed into BGP. Without a route map being specified, every NSAP route from the CLNS level 2 prefix table is redistributed. The no bgp default ipv4-unicast command is configured on the router to disable the default behavior of the BGP routing process exchanging IPv4 addressing information with BGP neighbor routers. clns filter-set internal-routes permit 49.0202... ! route-map internal-routes-only permit 10 match clns address internal-routes ! router isis osi-as-202 net 49.0202.2222.2222.2222.2222.00 ! router bgp 65202 no bgp default ipv4-unicast address-family nsap redistribute isis osi-as-202 clns route-map internal-routes-only Configuring BGP Peer Groups and Route Reflectors Example Router R5, shown in the figure above (in the "Generic BGP CLNS Network Topology" section), has only iBGP neighbors and runs IS-IS on both interfaces. To reduce the number of configuration commands, configure R5 as a member of a BGP peer group called ibgp-peers. The peer group is automatically activated under the address-family nsap command by configuring the peer group as a route reflector client allowing it to exchange NSAP routing information between group members. The BGP peer group is also configured as a BGP route reflector client to reduce the need for every iBGP router to be linked to each other. In the following example, the router R5 in the autonomous system AS65303 is configured as a member of a BGP peer group and a BGP route reflector client: router bgp 65303 no bgp default ipv4-unicast neighbor ibgp-peers peer-group neighbor ibgp-peers remote-as 65303 address-family nsap neighbor ibgp-peers route-reflector-client neighbor 10.4.5.4 peer-group ibgp-peers neighbor 10.5.6.6 peer-group ibgp-peers exit-address-family Filtering Inbound Routes Based on NSAP Prefixes Example In the following example, the router R1, shown in the figure below, in the autonomous system AS65101 is configured to filter inbound routes specified by the default-prefix-only prefix list: clns filter-set default-prefix-only deny 49... clns filter-set default-prefix-only permit default ! router isis osi-as-101 net 49.0101.1111.1111.1111.1111.00 ! router bgp 65101 no bgp default ipv4-unicast neighbor 10.1.2.2 remote-as 64202 address-family nsap network 49.0101.1111.1111.1111.1111.00 neighbor 10.1.2.2 activate neighbor 10.1.2.2 prefix-list default-prefix-only in Example: Filtering Outbound BGP Updates Based on NSAP Prefixes In the following example, outbound BGP updates are filtered based on NSAP prefixes. This example is configured at Router 7 in the figure below. In this task, a CLNS filter is created with two entries to deny NSAP prefixes starting with 49.0404 and to permit all other NSAP prefixes starting with 49. A BGP peer group is created and the filter is applied to outbound BGP updates for the neighbor that is a member of the peer group. clns filter-set routes0404 deny 49.0404... clns filter-set routes0404 permit 49... ! router bgp 65404 no bgp default ipv4-unicast neighbor ebgp-peers remote-as 65303 address-family nsap neighbor ebgp-peers prefix-list routes0404 out neighbor 10.6.7.8 peer-group ebgp-peers Example: Originating a Default Route and Outbound Route Filtering In the figure below, autonomous systemAS65101 is connected to only one other autonomous system, AS65202. Router R2 in AS65202 provides the connectivity to the rest of the network for autonomous system AS65101 by sending a default route to R1. Any packets from Level 1 routers within autonomous system AS65101 with destination NSAP addresses outside the local Level 1 network are sent to R1, the nearest Level 2 router. Router R1 forwards the packets to router R2 using the default route. In the following example, the router R2, shown in the figure below, in the autonomous system AS65202 is configured to generate a default route for router R1 in the autonomous system AS65101, and an outbound filter is created to send only the default route NSAP addressing information in the BGP update messages to router R1. clns filter-set default-prefix-only deny 49... clns filter-set default-prefix-only permit default ! router bgp 65202 no bgp default ipv4-unicast neighbor 10.1.2.1 remote-as 64101 address-family nsap network 49.0202... neighbor 10.1.2.1 activate neighbor 10.1.2.1 default-originate neighbor 10.1.2.1 prefix-list default-prefix-only out Implementing MP-BGP Support for CLNS Example The figure below shows a generic BGP CLNS network containing nine routers that are grouped into four different autonomous systems (in BGP terminology) or routing domains (in OSI terminology). This section contains complete configurations for all routers shown in the figure below. Figure 21: Components in a Generic BGP CLNS Network If you need more details about commands used in the following examples, see the configuration tasks earlier in this document and the documents listed in the Additional References, on page 251. Autonomous System AS65101 Router 1 clns filter-set default-prefix-only deny 49... clns filter-set default-prefix-only permit default ! router isis osi-as-101 net 49.0101.1111.1111.1111.1111.00 ! router bgp 65101 no bgp default ipv4-unicast neighbor 10.1.2.2 remote-as 65202 address-family nsap neighbor 10.1.2.2 activate neighbor 10.1.2.2 prefix-list default-prefix-only in network 49.0101... exit-address-family ! interface serial 2/0 ip address 10.1.2.1 255.255.255.0 clns enable no shutdown Autonomous System AS65202 Router 2 clns filter-set default-prefix-only deny 49... clns filter-set default-prefix-only permit default ! clns filter-set internal-routes permit 49.0202... ! route-map internal-routes-only permit 10 match clns address internal-routes ! router isis osi-as-202 net 49.0202.2222.2222.2222.2222.00 ! router bgp 65202 no bgp default ipv4-unicast neighbor 10.1.2.1 remote-as 65101 neighbor 10.2.3.3 remote-as 65202 neighbor 10.2.4.4 remote-as 65303 address-family nsap neighbor 10.1.2.1 activate neighbor 10.2.3.3 activate neighbor 10.2.4.4 activate redistribute isis osi-as-202 clns route-map internal-routes-only neighbor 10.1.2.1 default-originate neighbor 10.1.2.1 prefix-list default-prefix-only out exit-address-family ! interface gigabitethernet 0/1/1 ip address 10.2.3.2 255.255.255.0 clns router isis osi-as-202 no shutdown ! interface serial 2/0 ip address 10.1.2.2 255.255.255.0 clns enable no shutdown ! interface serial 2/2 ip address 10.2.4.2 255.255.255.0 clns enable no shutdown Router 3 clns filter-set internal-routes permit 49.0202... ! route-map internal-routes-only permit 10 match clns address internal-routes ! router isis osi-as-202 net 49.0202.3333.3333.3333.3333.00 ! router bgp 65202 no bgp default ipv4-unicast neighbor 10.2.3.2 remote-as 65202 neighbor 10.3.9.9 remote-as 65404 address-family nsap neighbor 10.2.3.2 activate neighbor 10.3.9.9 activate redistribute isis osi-as-202 clns route-map internal-routes-only exit-address-family ! interface gigabitethernet 0/1/1 ip address 10.2.3.3 255.255.255.0 clns router isis osi-as-202 no shutdown ! interface serial 2/2 ip address 10.3.9.3 255.255.255.0 clns enable no shutdown Autonomous System AS65303 Router 4 router isis osi-as-303 net 49.0303.4444.4444.4444.4444.00 ! router bgp 65303 no bgp default ipv4-unicast neighbor 10.2.4.2 remote-as 65202 neighbor 10.4.5.5 remote-as 65303 address-family nsap no synchronization neighbor 10.2.4.2 activate neighbor 10.4.5.5 activate network 49.0303... exit-address-family ! interface gigabitethernet 0/2/1 ip address 10.4.5.4 255.255.255.0 clns router isis osi-as-303 no shutdown ! interface serial 2/3 ip address 10.2.4.4 255.255.255.0 clns enable no shutdown Router 5 router isis osi-as-303 net 49.0303.5555.5555.5555.5555.00 ! router bgp 65303 no bgp default ipv4-unicast neighbor ibgp-peers peer-group neighbor ibgp-peers remote-as 65303 address-family nsap no synchronization neighbor ibgp-peers route-reflector-client neighbor 10.4.5.4 peer-group ibgp-peers neighbor 10.5.6.6 peer-group ibgp-peers exit-address-family ! interface gigabitethernet 0/2/1 ip address 10.4.5.5 255.255.255.0 clns router isis osi-as-303 no shutdown ! interface gigabitethernet 0/3/1 ip address 10.5.6.5 255.255.255.0 clns router isis osi-as-303 no shutdown Router 6 router isis osi-as-303 net 49.0303.6666.6666.6666.6666.00 ! router bgp 65303 no bgp default ipv4-unicast neighbor 10.5.6.5 remote-as 65303 neighbor 10.6.7.7 remote-as 65404 address-family nsap no synchronization neighbor 10.5.6.5 activate neighbor 10.6.7.7 activate network 49.0303... ! interface gigabitethernet 0/3/1 ip address 10.5.6.6 255.255.255.0 clns router isis osi-as-303 no shutdown ! interface serial 2/2 ip address 10.6.7.6 255.255.255.0 clns enable no shutdown Autonomous System AS65404 Router 7 clns filter-set external-routes deny 49.0404... clns filter-set external-routes permit 49... ! route-map noexport permit 10 match clns address external-routes set community noexport ! router isis osi-as-404 net 49.0404.7777.7777.7777.7777.00 redistribute bgp 404 clns ! router bgp 65404 no bgp default ipv4-unicast neighbor 10.6.7.6 remote-as 65303 neighbor 10.8.9.9 remote-as 65404 address-family nsap neighbor 10.6.7.6 activate neighbor 10.8.9.9 activate neighbor 10.8.9.9 send-community neighbor 10.8.9.9 route-map noexport out network 49.0404... ! interface gigabitethernet 1/0/1 ip address 10.7.8.7 255.255.255.0 clns router isis osi-as-404 ip router isis osi-as-404 no shutdown ! interface serial 2/3 ip address 10.6.7.7 255.255.255.0 clns enable no shutdown Router 8 router isis osi-as-404 net 49.0404.8888.8888.8888.8888.00 ! interface gigabitethernet 1/0/1 ip address 10.7.8.8 255.255.255.0 clns router isis osi-as-404 ip router isis osi-as-404 no shutdown ! interface gigabitethernet 1/1/1 ip address 10.8.9.8 255.255.255.0 clns router isis osi-as-404 ip router isis osi-as-404 no shutdown Router 9 clns filter-set external-routes deny 49.0404... clns filter-set external-routes permit 49... ! route-map noexport permit 10 match clns address external-routes set community noexport ! router isis osi-as-404 net 49.0404.9999.9999.9999.9999.00 redistribute bgp 404 clns ! router bgp 65404 no bgp default ipv4-unicast neighbor 10.3.9.3 remote-as 65202 neighbor 10.7.8.7 remote-as 65404 address-family nsap network 49.0404... neighbor 10.3.9.3 activate neighbor 10.7.8.7 activate neighbor 10.7.8.7 send-community neighbor 10.7.8.7 route-map noexport out ! interface serial 2/3 ip address 10.3.9.9 255.255.255.0 clns enable no shutdown ! interface gigabitethernet 1/1/1 ip address 10.8.9.9 255.255.255.0 clns router isis osi-as-404 ip router isis osi-as-404 no shutdown Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for Configuring MP-BGP Support for CLNS The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 22: Feature Information for MP-BGP Support for CLNS Feature InformationReleasesFeature Name Cisco IOS XE Release 2.6 Multiprotocol BGP (MP-BGP) Support for CLNS Feature InformationReleasesFeature Name The Multiprotocol BGP (MP-BGP) Support for CLNS feature provides the ability to scale Connectionless Network Service (CLNS) networks. The multiprotocol extensions of Border Gateway Protocol (BGP) add the ability to interconnect separate Open System Interconnection (OSI) routing domains without merging the routing domains, thus providing the capability to build very large OSI networks. The following commands were introduced or modified by this feature: address-family nsap clear bgp nsap clear bgp nsap dampening clear bgp nsap external clear bgp nsap flap-statistics clear bgp nsap peer-group debug bgp nsap debug bgp nsap dampening debug bgp nsap updates neighbor prefix-list network (BGP and multiprotocol BGP) redistribute (BGP to ISO ISIS) redistribute (ISO ISIS to BGP) show bgp nsap show bgp nsap community show bgp nsap community-list show bgp nsap dampened-paths show bgp nsap filter-list show bgp nsap flap-statistics show bgp nsap inconsistent-as show bgp nsap neighbors show bgp nsap paths show bgp nsap quote-regexp show bgp nsap regexp show bgp nsap summary Glossary address family --A group of network protocols that share a common format of network address. Address families are defined by RFC 1700. AS --autonomous system. An IP term to describe a routing domain that has its own independent routing policy and is administered by a single authority. Equivalent to the OSI term "routing domain." BGP --Border Gateway Protocol. Interdomain routing protocol that exchanges reachability information with other BGP systems. CLNS --Connectionless Network Service . An OSI network-layer protocol. CMIP --Common Management Information Protocol. In OSI, a network management protocol created and standardized by ISO for the monitoring and control of heterogeneous networks. DCC --data communications channel. DCN --data communications network. ES-IS --End System-to-Intermediate System. OSI protocol that defines how end systems (hosts) announce themselves to intermediate systems (routers). FTAM --File Transfer, Access, andManagement. In OSI, an application-layer protocol developed for network file exchange and management between diverse types of computers. IGP --Interior Gateway Protocol. Internet protocol used to exchange routing information within an autonomous system. IGRP --Interior Gateway Routing Protocol. A proprietary Cisco protocol developed to address the issues associated with routing in large, heterogeneous networks. IS --intermediate system. Routing node in an OSI network. IS-IS --Intermediate System-to-Intermediate System. OSI link-state hierarchical routing protocol based on DECnet Phase V routing, where routers exchange routing information based on a single metric, to determine network topology. ISO --International Organization for Standardization. International organization that is responsible for a wide range of standards, including those relevant to networking. ISO developed the Open System Interconnection (OSI) reference model, a popular networking reference model. NSAP address --network service access point address. The network address format used by OSI networks. OSI --Open System Interconnection. International standardization program created by ISO and ITU-T to develop standards for data networking that facilitate multivendor equipment interoperability. routing domain --The OSI term that is equivalent to autonomous system for BGP. SDH --Synchronous Digital Hierarchy. Standard that defines a set of rate and format standards that are sent using optical signals over fiber. SONET --Synchronous Optical Network. High-speed synchronous network specification designed to run on optical fiber. C H A P T E R 11 BGP IPv6 Admin Distance The BGP IPv6 Admin Distance feature lets you prioritize the BGP IPv6 routes in your network by enabling you to configure the source specific distance of a route and associate a prefix-list with the route. The RIB uses the distance from the source to determine the priority of the BGP IPv6 route in the network. Information About BGP IPv6 Admin Distance, on page 255 Configuring BGP IPv6 Admin Distance, on page 255 Additional References for BGP IPv6 Admin Distance, on page 257 Feature Information for BGP IPv6 Admin Distance, on page 258 Information About BGP IPv6 Admin Distance The BGP IPv6 Admin Distance feature supports selection of route path for a set prefix by prioritizing the BGP routes in the RIB. The BGP routes provided in the RIB are prioritized based on the distance they are configured from a source. With BGP IPv6 Admin Distance feature you can configure the distance from a source and can associate the route with a prefix-list. The route with the source specific distance and the prefix-list is then utilized by the RIB to prioritize the BGP IPv6 routes. Benefits of Using BGP IPv6 Admin Distance The BGP IPv6 Admin Distance feature can be used to prioritize or de-prioritize the BGP IPv6 routes in your network. Configuring BGP IPv6 Admin Distance SUMMARY STEPS 1. enable 2. configure terminal 3. ipv6 unicast-routing 4. router bgpautonomous-system-number 5. address-family ipv6 unicast 6. distance admin-distance ipv6-address/prefix prelengthinterface nameprefix-list 7. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enables the forwarding of IPv6 unicast datagramsipv6 unicast-routing Example: Step 3 Device(config)# ipv6 unicast-routing Specifies the number of an autonomous system that identifies the router to other BGP routers and tags the routing information that is passed along. router bgpautonomous-system-number Example: Device(config)# router bgp 5 Step 4 The range is from 1 to 65535. Enters the address family configuration mode for configuring routing sessions. address-family ipv6 unicast Example: Step 5 Device(config-router)# address-family ipv6 unicast Specifies the administrative distance, IPv6 address, prefix length and prefix list name for configuring the source specific distance for BGP routes. distance admin-distance ipv6-address/prefix prelengthinterface nameprefix-list Example: Step 6 Interface name is optional and is required only if the neighbor address is a link local address.Device(config-router-af)# distance 12 2001:DB8:0:CC00::1/128 list1 Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 7 Device(config-router-af)# end Verifying BGP Admin Distance Configuration Use the show run sec bgp command to verify the BGP configuration: Device(config-device-af)# show run | sec bgp router bgp 200 bgp log-neighbor-changes neighbor FE80::A8BB:CCFF:FE02:BE01%Ethernet0/0 remote-as 200 neighbor FE80::A8BB:CCFF:FE02:BE01%Ethernet0/0 update-source Ethernet0/0 ! address-family ipv4 no neighbor FE80::A8BB:CCFF:FE02:BE01%Ethernet0/0 activate exit-address-family ! address-family ipv6 distance 90 FE80::A8BB:CCFF:FE02:BE01/128 interface Ethernet0/0 network 1:1:1:1::/120 neighbor FE80::A8BB:CCFF:FE02:BE01%Ethernet0/0 activate exit-address-family Use the do show ipv6 route command to verify the IPv6 route configuration: Device(config-device-af)# show ipv6 route IPv6 Routing Table - default - 4 entries Codes: C - Connected, L - Local, S - Static, U - Per-user Static route B - BGP, R - RIP, H - NHRP, I1 - ISIS L1 I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination NDr - Redirect, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1 OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid lA - LISP away, a - Application C 1:1:1:1::/120 [0/0] via Ethernet0/0, directly connected L 1:1:1:1::2/128 [0/0] via Ethernet0/0, receive B 3:4:5:6::1/128 [90/0] via FE80::A8BB:CCFF:FE02:BF01, Ethernet0/0 L FF00::/8 [0/0] via Null0, receive Additional References for BGP IPv6 Admin Distance Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceCisco IOS IP Routing: BGP commands Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP IPv6 Admin Distance The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 23: Feature Information for ASR1K NPTv6 Feature Configuration Information ReleasesFeature Name The BGP IPv6 Admin Distance feature lets you prioritize the BGP IPv6 routes in your network by enabling you to configure the source specific distance of a route and associate a prefix-list with the route. The RIB uses the distance from the source to determine the priority of the BGP IPv6 route in the network. The following commands were modified: distance Cisco IOS XE Denali 16.3.1BGP IPv6 Admin Distance C H A P T E R 12 Connecting to a Service Provider Using External BGP This module describes configuration tasks that will enable your Border Gateway Protocol (BGP) network to access peer devices in external networks such as those from Internet service providers (ISPs). BGP is an interdomain routing protocol that is designed to provide loop-free routing between organizations. External BGP (eBGP) peering sessions are configured to allow peers from different autonomous systems to exchange routing updates. Tasks to help manage the traffic that is flowing inbound and outbound are described, as are tasks to configure BGP policies to filter the traffic. Multihoming techniques that provide redundancy for connections to a service provider are also described. Finding Feature Information, on page 259 Prerequisites for Connecting to a Service Provider Using External BGP, on page 260 Restrictions for Connecting to a Service Provider Using External BGP, on page 260 Information About Connecting to a Service Provider Using External BGP, on page 260 How to Connect to a Service Provider Using External BGP, on page 270 Configuration Examples for Connecting to a Service Provider Using External BGP, on page 323 Where to Go Next, on page 332 Additional References, on page 332 Feature Information for Connecting to a Service Provider Using External BGP, on page 334 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Prerequisites for Connecting to a Service Provider Using External BGP Before connecting to a service provider you need to understand how to configure the basic BGP process and peers. See the “Cisco BGP Overview” and “Configuring a Basic BGP Network” modules for more details. The tasks and concepts in this chapter will help you configure BGP features that would be useful if you are connecting your network to a service provider. For each connection to the Internet, you must have an assigned autonomous system number from the Internet Assigned Numbers Authority (IANA). Restrictions forConnectingtoaServiceProviderUsingExternal BGP A router that runs Cisco IOS software can be configured to run only one BGP routing process and to be a member of only one BGP autonomous system. However, a BGP routing process and autonomous system can support multiple address family configurations. Policy lists are not supported in versions of Cisco IOS software prior to Cisco IOS Release 12.0(22)S and 12.2(15)T. Reloading a router that is running an older version of Cisco IOS software may cause some routing policy configurations to be lost. Information About Connecting to a Service Provider Using External BGP External BGP Peering BGP is an interdomain routing protocol designed to provide loop-free routing links between organizations. BGP is designed to run over a reliable transport protocol and it uses TCP (port 179) as the transport protocol. The destination TCP port is assigned 179, and the local port is assigned a random port number. Cisco IOS software supports BGP version 4, which has been used by ISPs to help build the Internet. RFC 1771 introduced and discussed a number of new BGP features to allow the protocol to scale for Internet use. External BGP peering sessions are configured to allow BGP peers from different autonomous systems to exchange routing updates. By design, a BGP routing process expects eBGP peers to be directly connected, for example, over a WAN connection. However, there are many real-world scenarios where this rule would prevent routing from occurring. Peering sessions for multihop neighbors are configured with the neighbor ebgp-multihop command. The figure below shows simple eBGP peering between three routers. Router B peers with Router A and Router E. In the figure below, the neighbor ebgp-multihop command could be used to establish peering between Router A and Router E although this is a very simple network design. BGP forwards information about the next hop in the network using the NEXT_HOP attribute, which is set to the IP address of the interface that advertises a route in an eBGP peering session by default. The source interface can be a physical interface or a loopback interface. Figure 22: BGP Peers in Different Autonomous Systems Loopback interfaces are preferred for establishing eBGP peering sessions because loopback interfaces are less susceptible to interface flapping. Interfaces on networking devices can fail, and they can also be taken out of service for maintenance. When an interface is administratively brought up or down, due to failure or maintenance, it is referred to as a flap. Loopback interfaces provide a stable source interface to ensure that the IP address assigned to the interface is always reachable as long as the IP routing protocols continue to advertise the subnet assigned to the loopback interface. Loopback interfaces allow you to conserve address space by configuring a single address with /32 bit mask. Before a loopback interface is configured for an eBGP peering session, you must configure the neighbor update-source command and specify the loopback interface. With this configuration, the loopback interface becomes the source interface and its IP address is advertised as the next hop for routes that are advertised through this loopback. If loopback interfaces are used to connect single-hop eBGP peers, you must configure the neighbor disable-connected-check command before you can establish the eBGP peering session. Connecting to external networks enables traffic from your network to be forwarded to other networks and across the Internet. Traffic will also be flowing into, and possibly through, your network. BGP contains various techniques to influence how the traffic flows into and out of your network, and to create BGP policies that filter the traffic, inbound and outbound. To influence the traffic flow, BGP uses certain BGP attributes that can be included in update messages or used by the BGP routing algorithm. BGP policies to filter traffic also use some of the BGP attributes with route maps, access lists including AS-path access lists, filter lists, policy lists, and distribute lists. Managing your external connections may involve multihoming techniques where there is more than one connection to an ISP or connections to more than one ISP for backup or performance purposes. Tagging BGP routes with different community attributes across autonomous system or physical boundaries can prevent the need to configure long lists of individual permit or deny statements. BGP Autonomous System Number Formats Prior to January 2009, BGP autonomous system numbers that were allocated to companies were 2-octet numbers in the range from 1 to 65535 as described in RFC 4271, A Border Gateway Protocol 4 (BGP-4). Due to increased demand for autonomous system numbers, the Internet Assigned Number Authority (IANA) will start in January 2009 to allocate four-octet autonomous system numbers in the range from 65536 to 4294967295. RFC 5396, Textual Representation of Autonomous System (AS) Numbers , documents three methods of representing autonomous system numbers. Cisco has implemented the following two methods: Asplain--Decimal value notation where both 2-byte and 4-byte autonomous system numbers are represented by their decimal value. For example, 65526 is a 2-byte autonomous system number and 234567 is a 4-byte autonomous system number. Asdot--Autonomous system dot notation where 2-byte autonomous system numbers are represented by their decimal value and 4-byte autonomous system numbers are represented by a dot notation. For example, 65526 is a 2-byte autonomous system number and 1.169031 is a 4-byte autonomous system number (this is dot notation for the 234567 decimal number). For details about the third method of representing autonomous system numbers, see RFC 5396. Asdot Only Autonomous System Number Formatting In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and later releases, the 4-octet (4-byte) autonomous system numbers are entered and displayed only in asdot notation, for example, 1.10 or 45000.64000. When using regular expressions to match 4-byte autonomous system numbers the asdot format includes a period which is a special character in regular expressions. A backslash must be entered before the period for example, 1\.14, to ensure the regular expression match does not fail. The table below shows the format in which 2-byte and 4-byte autonomous system numbers are configured, matched in regular expressions, and displayed in show command output in Cisco IOS images where only asdot formatting is available. Table 24: Asdot Only 4-Byte Autonomous System Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 1.0 to 65535.65535 asdot Asplain as Default Autonomous System Number Formatting In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, and later releases, the Cisco implementation of 4-byte autonomous system numbers uses asplain as the default display format for autonomous system numbers, but you can configure 4-byte autonomous system numbers in both the asplain and asdot format. In addition, the default format for matching 4-byte autonomous system numbers in regular expressions is asplain, so you must ensure that any regular expressions to match 4-byte autonomous system numbers are written in the asplain format. If you want to change the default show command output to display 4-byte autonomous system numbers in the asdot format, use the bgp asnotation dot command under router configuration mode. When the asdot format is enabled as the default, any regular expressions to match 4-byte autonomous system numbers must be written using the asdot format, or the regular expression match will fail. The tables below show that although you can configure 4-byte autonomous system numbers in either asplain or asdot format, only one format is used to display show command output and control 4-byte autonomous system number matching for regular expressions, and the default is asplain format. To display 4-byte autonomous system numbers in show command output and to control matching for regular expressions in the asdot format, you must configure the bgp asnotation dot command. After enabling the bgp asnotation dot command, a hard reset must be initiated for all BGP sessions by entering the clear ip bgp * command. If you are upgrading to an image that supports 4-byte autonomous system numbers, you can still use 2-byte autonomous system numbers. The show command output and regular expression match are not changed and remain in asplain (decimal value) format for 2-byte autonomous system numbers regardless of the format configured for 4-byte autonomous system numbers. Note Table 25: Default Asplain 4-Byte Autonomous System Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 65536 to 42949672952-byte: 1 to 65535 4-byte: 65536 to 4294967295 asplain 2-byte: 1 to 65535 4-byte: 65536 to 42949672952-byte: 1 to 65535 4-byte: 1.0 to 65535.65535asdot Table 26: Asdot 4-Byte Autonomous System Number Format Show Command Output and Regular Expression Match Format Configuration FormatFormat 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 65536 to 4294967295 asplain 2-byte: 1 to 65535 4-byte: 1.0 to 65535.655352-byte: 1 to 65535 4-byte: 1.0 to 65535.65535asdot Reserved and Private Autonomous System Numbers In Cisco IOS Release 12.0(32)S12, 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, 12.4(24)T, and later releases, the Cisco implementation of BGP supports RFC 4893. RFC 4893was developed to allow BGP to support a gradual transition from 2-byte autonomous system numbers to 4-byte autonomous system numbers. A new reserved (private) autonomous system number, 23456, was created by RFC 4893 and this number cannot be configured as an autonomous system number in the Cisco IOS CLI. RFC 5398, Autonomous System (AS) Number Reservation for Documentation Use, describes new reserved autonomous system numbers for documentation purposes. Use of the reserved numbers allow configuration examples to be accurately documented and avoids conflict with production networks if these configurations are literally copied. The reserved numbers are documented in the IANA autonomous system number registry. Reserved 2-byte autonomous system numbers are in the contiguous block, 64496 to 64511 and reserved 4-byte autonomous system numbers are from 65536 to 65551 inclusive. Private 2-byte autonomous system numbers are still valid in the range from 64512 to 65534 with 65535 being reserved for special use. Private autonomous system numbers can be used for internal routing domains but must be translated for traffic that is routed out to the Internet. BGP should not be configured to advertise private autonomous system numbers to external networks. Cisco IOS software does not remove private autonomous system numbers from routing updates by default. We recommend that ISPs filter private autonomous system numbers. Autonomous system number assignment for public and private networks is governed by the IANA. For information about autonomous-system numbers, including reserved number assignment, or to apply to register an autonomous system number, see the following URL: http://www.iana.org/. Note BGP Attributes BGP selects a single path, by default, as the best path to a destination host or network. The best-path selection algorithm analyzes path attributes to determine which route is installed as the best path in the BGP routing table. Each path carries various attributes that are used in BGP best-path analysis. Cisco IOS software provides the ability to influence BGP path selection by altering these attributes via the command-line interface (CLI). BGP path selection can also be influenced through standard BGP policy configuration. BGP uses the best-path selection algorithm to find a set of equally good routes. These routes are the potential multipaths. In Cisco IOS Release 12.2(33)SRD and later releases, when there are more equally goodmultipaths available than the maximum permitted number, then the oldest paths are selected as multipaths. BGP can include path attribute information in update messages. BGP attributes describe the characteristic of the route, and the software uses these attributes to help make decisions about which routes to advertise. Some of this attribute information can be configured at a BGP-speaking networking device. There are somemandatory attributes that are always included in the update message and some discretionary attributes. The following BGP attributes can be configured: AS_Path Community Local_Pref Multi_Exit_Discriminator (MED) Next_Hop Origin AS_Path This attribute contains a list or set of the autonomous system numbers through which routing information has passed. The BGP speaker adds its own autonomous system number to the list when it forwards the update message to external peers. Community BGP communities are used to group networking devices that share common properties, regardless of network, autonomous system, or any physical boundaries. In large networks applying a common routing policy through prefix lists or access lists requires individual peer statements on each networking device. Using the BGP community attribute BGP neighbors, with common routing policies, can implement inbound or outbound route filters based on the community tag rather than consult large lists of individual permit or deny statements. Local_Pref Within an autonomous system, the Local_Pref attribute is included in all update messages between BGP peers. If there are several paths to the same destination, the local preference attribute with the highest value indicates the preferred outbound path from the local autonomous system. The highest ranking route is advertised to internal peers. The Local_Pref value is not forwarded to external peers. Multi_Exit_Discriminator The MED attribute indicates (to an external peer) a preferred path into an autonomous system. If there are multiple entry points into an autonomous system, the MED can be used to influence another autonomous system to choose one particular entry point. A metric is assigned where a lower MED metric is preferred by the software over a higher MED metric. The MED metric is exchanged between autonomous systems, but after a MED is forwarded into an autonomous system, the MEDmetric is reset to the default value of 0. When an update is sent to an internal BGP (iBGP) peer, the MED is passed along without any change, allowing all the peers in the same autonomous system to make a consistent path selection. By default, a router will compare the MED attribute for paths only from BGP peers that reside in the same autonomous system. The bgp always-compare-med command can be configured to allow the router to compare metrics from peers in different autonomous systems. The Internet Engineering Task Force (IETF) decision regarding BGP MED assigns a value of infinity to the missing MED, making the route that lacks the MED variable the least preferred. The default behavior of BGP routers that run Cisco software is to treat routes without the MED attribute as having a MED of 0, making the route that lacks the MED variable the most preferred. To configure the router to conform to the IETF standard, use the bgp bestpath med missing-as-worst router configuration command. Note Next_Hop The Next_Hop attribute identifies the next-hop IP address to be used as the BGP next hop to the destination. The router makes a recursive lookup to find the BGP next hop in the routing table. In external BGP (eBGP), the next hop is the IP address of the peer that sent the update. Internal BGP (iBGP) sets the next-hop address to the IP address of the peer that advertised the prefix for routes that originate internally. When any routes to iBGP that are learned from eBGP are advertised, the Next_Hop attribute is unchanged. A BGP next-hop IP address must be reachable in order for the router to use a BGP route. Reachability information is usually provided by the IGP, and changes in the IGP can influence the forwarding of the next-hop address over a network backbone. Origin This attribute indicates how the route was included in a BGP routing table. In Cisco software, a route defined using the BGP network command is given an origin code of Interior Gateway Protocol (IGP). Routes distributed from an Exterior Gateway Protocol (EGP) are coded with an origin of EGP, and routes redistributed from other protocols are defined as Incomplete. BGP decision policy for origin prefers IGP over EGP, and then EGP over Incomplete. Multihoming Multihoming is defined as connecting an autonomous system with more than one service provider. If you have any reliability issues with one service provider, then you have a backup connection. Performance issues can also be addressed by multihoming because better paths to the destination network can be utilized. Unless you are a service provider, you must plan your routing configuration carefully to avoid Internet traffic traveling through your autonomous system and consuming all your bandwidth. The figure below shows that autonomous system 45000 is multihomed to autonomous system 40000 and autonomous system 50000. Assuming autonomous system 45000 is not a service provider, then several techniques such as load balancing or some form of routing policy must be configured to allow traffic from autonomous system 45000 to reach either autonomous system 40000 or autonomous system 50000 but not allow much, if any, transit traffic. Figure 23: Multihoming Topology MED Attribute Configuring the MED attribute is another method that BGP can use to influence the choice of paths into another autonomous system. The MED attribute indicates (to an external peer) a preferred path into an autonomous system. If there are multiple entry points into an autonomous system, the MED can be used to influence another autonomous system to choose one particular entry point. A metric is assigned using route maps where a lower MED metric is preferred by the software over a higher MED metric. Transit Versus Nontransit Traffic Most of the traffic within an autonomous system contains a source or destination IP address residing within the autonomous system, and this traffic is referred to as nontransit (or local) traffic. Other traffic is defined as transit traffic. As traffic across the Internet increases, controlling transit traffic becomes more important. A service provider is considered to be a transit autonomous system and must provide connectivity to all other transit providers. In reality, few service providers actually have enough bandwidth to allow all transit traffic, and most service providers have to purchase such connectivity from Tier 1 service providers. An autonomous system that does not usually allow transit traffic is called a stub autonomous system and will link to the Internet through one service provider. BGP Policy Configuration BGP policy configuration is used to control prefix processing by the BGP routing process and to filter routes from inbound and outbound advertisements. Prefix processing can be controlled by adjusting BGP timers, altering how BGP handles path attributes, limiting the number of prefixes that the routing process will accept, and configuring BGP prefix dampening. Prefixes in inbound and outbound advertisements are filtered using route maps, filter lists, IP prefix lists, autonomous-system-path access lists, IP policy lists, and distribute lists. The table below shows the processing order of BGP policy filters. Table 27: BGP Policy Processing Order OutboundInbound Distribute listRoute map IP prefix listFilter list, AS-path access list, or IP policy Filter list, AS-path access list, or IP policyIP prefix list Route mapDistribute list In Cisco IOSReleases 12.0(22)S, 12.2(15)T, 12.2(18)S, and later releases, themaximumnumber of autonomous system access lists that can be configured with the ip as-path access-list command is increased from 199 to 500. Note Whenever there is a change in the routing policy due to a configuration change, BGP peering sessions must be reset using the clear ip bgp command. Cisco IOS software supports the following three mechanisms to reset BGP peering sessions: Hard reset--A hard reset tears down the specified peering sessions, including the TCP connection, and deletes routes coming from the specified peer. Soft reset--A soft reset uses stored prefix information to reconfigure and activate BGP routing tables without tearing down existing peering sessions. Soft reset uses stored update information, at the cost of additional memory for storing the updates, to allow you to apply a new BGP policy without disrupting the network. Soft reset can be configured for inbound or outbound sessions. Dynamic inbound soft reset--The route refresh capability, as defined in RFC 2918, allows the local router to reset inbound routing tables dynamically by exchanging route refresh requests to supporting peers. The route refresh capability does not store update information locally for nondisruptive policy changes. It instead relies on dynamic exchange with supporting peers. Route refresh must first be advertised through BGP capability negotiation between peers. All BGP routers must support the route refresh capability. To determine if a BGP router supports this capability, use the show ip bgp neighborscommand. The following message is displayed in the output when the router supports the route refresh capability: Received route refresh capability from peer. BGP COMMUNITIES Attribute ABGP community is a group of routes that share a common property, regardless of their network, autonomous system, or any physical boundaries. In large networks, applying a common routing policy by using prefix lists or access lists requires individual peer statements on each networking device. Using the BGPCOMMUNITIES attribute, BGP speakers with common routing policies can implement inbound or outbound route filters based on the community tag, rather than consult long lists of individual permit or deny statements. A COMMUNITIES attribute can contain multiple communities. A route can belong to multiple communities. The network administrator defines the communities to which a route belongs. By default, all routes belong to the general Internet community. In addition to numbered communities, there are several predefined (well-known) communities: no-export—Do not advertise this route to external BGP peers. no-advertise—Do not advertise this route to any peer. internet—Advertise this route to the Internet community. All BGP-speaking networking devices belong to this community. local-as—Do not send this route outside the local autonomous system. gshut—Community of routes gracefully shut down. The COMMUNITIES attribute is optional, which means that it will not be passed on by networking devices that do not understand communities. Networking devices that understand communities must be configured to handle the communities or else the COMMUNITIES attribute will be discarded. By default, no COMMUNITIES attribute is sent to a neighbor. In order for a COMMUNITIES attribute to be sent to a neighbor, use the neighbor send-community command. Extended Communities Extended community attributes are used to configure, filter, and identify routes for virtual routing and forwarding (VRF) instances and Multiprotocol Label Switching (MPLS) Virtual Private Networks (VPNs). All of the standard rules of access lists apply to the configuration of extended community lists. Regular expressions are supported by the expanded range of extended community list numbers. All regular expression configuration options are supported. The route target (RT) and site of origin (SoO) extended community attributes are supported by the standard range of extended community lists. Route Target Extended Community Attribute The RT extended community attribute is configured with the rt keyword of the ip extcommunity-list command. This attribute is used to identify a set of sites and VRFs that may receive routes that are tagged with the configured route target. Configuring the route target extended community attribute with a route allows that route to be placed in the per-site forwarding tables that are used for routing traffic that is received from corresponding sites. Site of Origin Extended Community Attribute The SoO extended community attribute is configured with the soo keyword of the ip extcommunity-list command. This attribute uniquely identifies the site from which the provider edge (PE) router learned the route. All routes learned from a particular site must be assigned the same SoO extended community attribute, regardless if a site is connected to a single PE router or multiple PE routers. Configuring this attribute prevents routing loops from occurring when a site is multihomed. The SoO extended community attribute is configured on the interface and is propagated into BGP through redistribution. The SoO extended community attribute can be applied to routes that are learned from VRFs. The SoO extended community attribute should not be configured for stub sites or sites that are not multihomed. IP Extended Community-List Configuration Mode Named and numbered extended community lists can be configured in IP extended community-list configuration mode. The IP extended community-list configuration mode supports all of the functions that are available in global configuration mode. In addition, the following operations can be performed: Configure sequence numbers for extended community list entries. Resequence existing sequence numbers for extended community list entries. Configure an extended community list to use default values. Default Sequence Numbering Extended community list entries start with the number 10 and increment by 10 for each subsequent entry when no sequence number is specified, when default behavior is configured, and when an extended community list is resequenced without specifying the first entry number or the increment range for subsequent entries. Resequencing Extended Community Lists Extended community-list entries are sequenced and resequenced on a per-extended community list basis. The resequence command can be used without any arguments to set all entries in a list to default sequence numbering. The resequence command also allows the sequence number of the first entry and increment range to be set for each subsequent entry. The range of configurable sequence numbers is from 1 to 2147483647. Extended Community Lists Extended community attributes are used to configure, filter, and identify routes for VRF instances and MPLS VPNs. The ip extcommunity-list command is used to configure named or numbered extended community lists. All of the standard rules of access lists apply to the configuration of extended community lists. Regular expressions are supported by the expanded range of extended community list numbers. Administrative Distance Administrative distance is a measure of the preference of different routing protocols. BGP has a distance bgp command that allows you to set different administrative distances for three route types: external, internal, and local. BGP, like other protocols, prefers the route with the lowest administrative distance. BGP Route Map Policy Lists BGP route map policy lists allow a network operator to group route map match clauses into named lists called policy lists. A policy list functions like a macro. When a policy list is referenced in a route map, all of the match clauses are evaluated and processed as if they had been configured directly in the route map. This enhancement simplifies the configuration of BGP routing policy in medium-size and large networks because a network operator can preconfigure policy lists with groups of match clauses and then reference these policy lists within different route maps. The network operator no longer needs to manually reconfigure each recurring group of match clauses that occur in multiple route map entries. A policy lists functions like a macro when it is configured in a route map and has the following capabilities and characteristics: When a policy list is referenced within a route map, all the match statements within the policy list are evaluated and processed. Two or more policy lists can be configured with a route map. Policy lists can be configured within a route map to be evaluated with AND or OR semantics. Policy lists can coexist with any other preexisting match and set statements that are configured within the same route map but outside of the policy lists. When multiple policy lists perform matching within a route map entry, all policy lists match on the incoming attribute only. Policy lists support only match clauses and do not support set clauses. Policy lists can be configured for all applications of route maps, including redistribution, and can also coexist, within the same route map entry, with match and set clauses that are configured separately from the policy lists. Policy lists are supported only by BGP and are not supported by other IP routing protocols.Note How to Connect to a Service Provider Using External BGP Influencing Inbound Path Selection BGP can be used to influence the choice of paths in another autonomous system. There may be several reasons for wanting BGP to choose a path that is not the obvious best route, for example, to avoid some types of transit traffic passing through an autonomous system or perhaps to avoid a very slow or congested link. BGP can influence inbound path selection using one of the following BGP attributes: AS-path Multi-Exit Discriminator (MED) Perform one of the following tasks to influence inbound path selection: Influencing Inbound Path Selection by Modifying the AS_PATH Attribute Perform this task to influence the inbound path selection for traffic destined for the 172.17.1.0 network by modifying the AS_PATH attribute. The configuration is performed at Router A in the figure below. For a configuration example of this task using 4-byte autonomous system numbers in asplain format, see the “Example: Influencing Inbound Path Selection by Modifying the AS_PATH Attribute Using 4-Byte AS Numbers”. One of the methods that BGP can use to influence the choice of paths in another autonomous system is to modify the AS_PATH attribute. For example, in the figure below, Router A advertises its own network, 172.17.1.0, to its BGP peers in autonomous system 45000 and autonomous system 60000. When the routing information is propagated to autonomous system 50000, the routers in autonomous system 50000 have network reachability information about network 172.17.1.0 from two different routes. The first route is from autonomous system 45000 with an AS_PATH consisting of 45000, 40000, the second route is through autonomous system 55000 with an AS-path of 55000, 60000, 40000. If all other BGP attribute values are the same, Router C in autonomous system 50000 would choose the route through autonomous system 45000 for traffic destined for network 172.17.1.0 because it is the shortest route in terms of autonomous systems traversed. Autonomous system 40000 now receives all traffic from autonomous system 50000 for the 172.17.1.0 network through autonomous system 45000. If, however, the link between autonomous system 45000 and autonomous system 40000 is a really slow and congested link, the set as-path prepend command can be used at Router A to influence inbound path selection for the 172.17.1.0 network by making the route through autonomous system 45000 appear to be longer than the path through autonomous system 60000. The configuration is done at Router A in the figure below by applying a route map to the outbound BGP updates to Router B. Using the set as-path prepend command, all the outbound BGP updates from Router A to Router B will have their AS_PATH attribute modified to add the local autonomous system number 40000 twice. After the configuration, autonomous system 50000 receives updates about the 172.17.1.0 network through autonomous system 45000. The new AS_PATH is 45000, 40000, 40000, and 40000, which is now longer than the AS-path from autonomous system 55000 (unchanged at a value of 55000, 60000, 40000). Networking devices in autonomous system 50000will now prefer the route through autonomous system 55000 to forward packets with a destination address in the 172.17.1.0 network. Figure 24: Network Topology for Modifying the AS_PATH Attribute SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. address-family ipv4 [unicast |multicast | vrf vrf-name] 6. network network-number [mask network-mask] [route-map route-map-name] 7. neighbor {ip-address | peer-group-name} activate 8. neighbor {ip-address | peer-group-name} route-map map-name {in | out} 9. exit-address-family 10. exit 11. route-map map-name [permit | deny] [sequence-number] 12. set as-path {tag | prepend as-path-string} 13. end 14. show running-config DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 40000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 In this example, the BGP peer on Router B at 192.168.1.2 is added to the IPv4 multiprotocol BGP neighbor table and will receive BGP updates. Device(config-router)# neighbor 192.168.1.2 remote-as 45000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 5 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inDevice(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. PurposeCommand or Action Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] [route-map route-map-name] Step 6 Example: For exterior protocols the network command controls which networks are advertised. Interior protocols use Device(config-router-af)# network 172.17.1.0 mask 255.255.255.0 the network command to determine where to send updates. Enables address exchange for address family IPv4 unicast for the BGP neighbor at 192.168.1.2 on Router B. neighbor {ip-address | peer-group-name} activate Example: Step 7 Device(config-router-af)# neighbor 192.168.1.2 activate Applies a route map to incoming or outgoing routes.neighbor {ip-address | peer-group-name} route-map map-name {in | out} Step 8 In this example, the route map named PREPEND is applied to outbound routes to Router B.Example: Device(config-router-af)# neighbor 192.168.1.2 route-map PREPEND out Exits address family configuration mode and enters router configuration mode. exit-address-family Example: Step 9 Device(config-router-af)# exit Exits router configuration mode and enters global configuration mode. exit Example: Step 10 Device(config-router)# exit Configures a route map and enters route map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 11 Example: In this example, a route map named PREPEND is created with a permit clause. Device(config)# route-map PREPEND permit 10 Modifies an autonomous system path for BGP routes.set as-path {tag | prepend as-path-string}Step 12 Example: Use the prepend keyword to prepend an arbitrary autonomous system path string to BGP routes. Device(config-route-map)# set as-path prepend 40000 40000 Usually the local autonomous system number is prependedmultiple times, increasing the autonomous system path length. In this example, two additional autonomous system entries are added to the autonomous system path for outbound routes to Router B. PurposeCommand or Action Exits route map configuration mode and returns to privileged EXEC mode. end Example: Step 13 Device(config-route-map)# end Displays the running configuration file.show running-config Example: Step 14 Device# show running-config Examples Router A The following partial output of the show running-config command shows the configuration from this task. Device# show running-config . . . router bgp 40000 neighbor 192.168.1.2 remote-as 45000 ! address-family ipv4 neighbor 192.168.1.2 activate neighbor 192.168.1.2 route-map PREPEND out no auto-summary no synchronization network 172.17.1.0 mask 255.255.255.0 exit-address-family ! route-map PREPEND permit 10 set as-path prepend 40000 40000 . . . Influencing Inbound Path Selection by Setting the MED Attribute One of the methods that BGP can use to influence the choice of paths into another autonomous system is to set theMulti-Exit Discriminator (MED) attribute. TheMED attribute indicates (to an external peer) a preferred path to an autonomous system. If there are multiple entry points to an autonomous system, the MED can be used to influence another autonomous system to choose one particular entry point. A metric is assigned using route maps where a lower MED metric is preferred by the software over a higher MED metric. Perform this task to influence inbound path selection by setting the MED metric attribute. The configuration is performed at Router B and Router D in the figure below. Router B advertises the network 172.16.1.0. to its BGP peer, Router E in autonomous system 50000. Using a simple route map Router B sets theMEDmetric to 50 for outbound updates. The task is repeated at Router D but the MED metric is set to 120. When Router E receives the updates from both Router B and Router D the MED metric is stored in the BGP routing table. Before forwarding packets to network 172.16.1.0, Router E compares the attributes from peers in the same autonomous system (both Router B and Router D are in autonomous system 45000). The MED metric for Router B is less than the MED for Router D, so Router E will forward the packets through Router B. Figure 25: Network Topology for Setting the MED Attribute Use the bgp always-compare-med command to compare MED attributes from peers in other autonomous systems. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. address-family ipv4 [unicast |multicast | vrf vrf-name] 6. network network-number [mask network-mask] [route-map route-map-name] 7. neighbor {ip-address | peer-group-name} route-map map-name {in | out} 8. exit 9. exit 10. route-map map-name [permit | deny] [sequence-number] 11. set metric value 12. end 13. Repeat Step 1 through Step 12 at Router D. 14. show ip bgp [network] [network-mask] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 PurposeCommand or Action Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 Device(config-router)# neighbor 192.168.3.2 remote-as 50000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 5 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inDevice(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] [route-map route-map-name] Step 6 Example: For exterior protocols the network command controls which networks are advertised. Interior protocols use Device(config-router-af)# network 172.16.1.0 mask 255.255.255.0 the network command to determine where to send updates. Applies a route map to incoming or outgoing routes.neighbor {ip-address | peer-group-name} route-map map-name {in | out} Step 7 In this example, the route map namedMED is applied to outbound routes to the BGP peer at Router E.Example: PurposeCommand or Action Device(config-router-af)# neighbor 192.168.3.2 route-map MED out Exits address family configuration mode and enters router configuration mode. exit Example: Step 8 Device(config-router-af)# exit Exits router configuration mode and enters global configuration mode. exit Example: Step 9 Device(config-router)# exit Configures a route map and enters route map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 10 Example: In this example, a route map named MED is created. Device(config)# route-map MED permit 10 Sets the MED metric value.set metric value Example: Step 11 Device(config-route-map)# set metric 50 Exits route map configuration mode and enters privileged EXEC mode. end Example: Step 12 Device(config-route-map)# end —Repeat Step 1 through Step 12 at Router D.Step 13 (Optional) Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 14 Example: Use this command at Router E in the figure above when both Router B and Router D have configured the MED attribute.Device# show ip bgp 172.17.1.0 255.255.255.0 Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Examples The following output is from Router E in the figure above after this task has been performed at both Router B and Router D. Note the metric (MED) values for the two routes to network 172.16.1.0. The peer 192.168.2.1 at Router D has a metric of 120 for the path to network 172.16.1.0, whereas the peer 192.168.3.1 at Router B has a metric of 50. The entry for the peer 192.168.3.1 at Router B has the word best at the end of the entry to show that Router E will choose to send packets destined for network 172.16.1.0 via Router B because the MED metric is lower. Device# show ip bgp 172.16.1.0 BGP routing table entry for 172.16.1.0/24, version 10 Paths: (2 available, best #2, table Default-IP-Routing-Table) Advertised to update-groups: 1 45000 192.168.2.1 from 192.168.2.1 (192.168.2.1) Origin IGP, metric 120, localpref 100, valid, external 45000 192.168.3.1 from 192.168.3.1 (172.17.1.99) Origin IGP, metric 50, localpref 100, valid, external, best Influencing Outbound Path Selection BGP can be used to influence the choice of paths for outbound traffic from the local autonomous system. This section contains two methods that BGP can use to influence outbound path selection: Using the Local_Pref attribute Using the BGP outbound route filter (ORF) capability Perform one of the following tasks to influence outbound path selection: Influencing Outbound Path Selection Using the Local_Pref Attribute One of the methods to influence outbound path selection is to use the BGP Local-Pref attribute. Perform this task using the local preference attribute to influence outbound path selection. If there are several paths to the same destination the local preference attribute with the highest value indicates the preferred path. Refer to the figure below for the network topology used in this task. Both Router B and Router C are configured. autonomous system 45000 receives updates for network 192.168.3.0 via autonomous system 40000 and autonomous system 50000. Router B is configured to set the local preference value to 150 for all updates to autonomous system 40000. Router C is configured to set the local preference value for all updates to autonomous system 50000 to 200. After the configuration, local preference information is exchanged within autonomous system 45000. Router B and Router C now see that updates for network 192.168.3.0 have a higher preference value from autonomous system 50000 so all traffic in autonomous system 45000 with a destination network of 192.168.3.0 is sent out via Router C. Figure 26: Network Topology for Outbound Path Selection SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number 5. bgp default local-preference value 6. address-family ipv4 [unicast |multicast| vrf vrf-name] 7. network network-number [mask network-mask][route-map route-map-name] 8. neighbor {ip-address| peer-group-name} activate 9. end 10. Repeat Step 1 through Step 9 at Router C but change the IP address of the peer, the autonomous system number, and set the local preference value to 200. 11. show ip bgp [network] [network-mask] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal PurposeCommand or Action Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 45000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number Example: Step 4 Router(config-router)# neighbor 192.168.1.2 remote-as 40000 Changes the default local preference value.bgp default local-preference valueStep 5 Example: In this example, the local preference is changed to 150 for all updates from autonomous system 40000 to autonomous system 45000.Router(config-router)# bgp default local-preference 150 By default, the local preference value is 100. Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast| vrf vrf-name] Example: Step 6 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inRouter(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask][route-map route-map-name] Step 7 Example: For exterior protocols the network command controls which networks are advertised. Interior protocols use Router(config-router-af)# network 172.17.1.0 mask 255.255.255.0 the network command to determine where to send updates. Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address| peer-group-name} activate Example: Router(config-router-af)# neighbor 192.168.1.2 activate Step 8 PurposeCommand or Action Exits route map configuration mode and enters privileged EXEC mode. end Example: Step 9 Router(config-router-af)# end --Repeat Step 1 through Step 9 at Router C but change the IP address of the peer, the autonomous system number, and set the local preference value to 200. Step 10 Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 11 Example: Enter this command at both Router B and Router C and note the Local_Pref value. The route with the Router# show ip bgp 192.168.3.0 255.255.255.0 highest preference value will be the preferred route to network 192.168.3.0. Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Filtering Outbound BGP Route Prefixes Perform this task to use BGP prefix-based outbound route filtering to influence outbound path selection. Before you begin BGP peering sessions must be established, and BGP ORF capabilities must be enabled on each participating router before prefix-based ORF announcements can be received. BGP prefix-based outbound route filtering does not support multicast. IP addresses that are used for outbound route filtering must be defined in an IP prefix list. BGP distribute lists and IP access lists are not supported. Outbound route filtering is configured on only a per-address family basis and cannot be configured under the general session or BGP routing process. Outbound route filtering is configured for external peering sessions only. Note SUMMARY STEPS 1. enable 2. configure terminal 3. ip prefix-list list-name [seq seq-value] {deny network/length | permit network/length} [ge ge-value] [le le-value] 4. router bgp autonomous-system-number 5. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 6. neighbor ip-address ebgp-multihop [hop-count] 7. address-family ipv4 [unicast |multicast | vrf vrf-name] 8. neighbor ip-address capability orf prefix-list [send | receive | both] 9. neighbor {ip-address | peer-group-name} prefix-list prefix-list-name {in | out} 10. end 11. clear ip bgp {ip-address | *} in prefix-filter DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Creates a prefix list for prefix-based outbound route filtering. ip prefix-list list-name [seq seq-value] {deny network/length | permit network/length} [ge ge-value] [le le-value] Step 3 Outbound route filtering supports prefix length matching, wildcard-based prefix matching, and exact address prefix matching on a per address-family basis. Example: Router(config)# ip prefix-list FILTER seq 10 permit 192.168.1.0/24 • The prefix list is created to define the outbound route filter. The filter must be created when the outbound route filtering capability is configured to be advertised in send mode or both mode. It is not required when a peer is configured to advertise receive mode only. The example creates a prefix list named FILTER that defines the 192.168.1.0/24 subnet for outbound route filtering. Enters router configuration mode, and creates a BGP routing process. router bgp autonomous-system-number Example: Step 4 Router(config)# router bgp 100 Establishes peering with the specified neighbor or peer group. BGP peering must be established before ORF capabilities can be exchanged. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 5 The example establishes peering with the 10.1.1.1 neighbor.Router(config-router)# neighbor 10.1.1.1 remote-as 200 Accepts or initiates BGP connections to external peers residing on networks that are not directly connected. neighbor ip-address ebgp-multihop [hop-count] Example: Step 6 PurposeCommand or Action Router(config-router)# neighbor 10.1.1.1 ebgp-multihop Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 7 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inRouter(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Outbound route filtering is configured on a per-address family basis. Note Enables the ORF capability on the local router, and enables ORF capability advertisement to the BGP peer specified with the ip-address argument. neighbor ip-address capability orf prefix-list [send | receive | both] Example: Step 8 The send keyword configures a router to advertise ORF send capabilities.Router(config-router-af)# neighbor 10.1.1.1 capability orf prefix-list both The receive keyword configures a router to advertise ORF receive capabilities. The both keyword configures a router to advertise send and receive capabilities. The remote peer must be configured to either send or receive ORF capabilities before outbound route filtering is enabled. The example configures the router to advertise send and receive capabilities to the 10.1.1.1 neighbor. Applies an inbound prefix-list filter to prevent distribution of BGP neighbor information. neighbor {ip-address | peer-group-name} prefix-list prefix-list-name {in | out} Step 9 Example: In this example, the prefix list named FILTER is applied to incoming advertisements from the 10.1.1.1 Router(config-router-af)# neighbor 10.1.1.1 prefix-list FILTER in neighbor, which prevents distribution of the 192.168.1.0/24 subnet. PurposeCommand or Action Exits address family configuration mode, and enters privileged EXEC mode. end Example: Step 10 Router(config-router-af)# end Clears BGP outbound route filters and initiates an inbound soft reset. clear ip bgp {ip-address | *} in prefix-filter Example: Step 11 A single neighbor or all neighbors can be specified. Router# clear ip bgp 10.1.1.1 in prefix-filter The inbound soft refresh must be initiated with the clear ip bgp command in order for this feature to function. Note Configuring BGP Peering with ISPs BGP was developed as an interdomain routing protocol and connecting to ISPs is one of the main functions of BGP. Depending on the size of your network and the purpose of your business, there are many different ways to connect to your ISP. Multihoming to one or more ISPs provides redundancy in case an external link to an ISP fails. This section introduces some optional tasks that can be used to connect to a service provider using multihoming techniques. Smaller companies may use just one ISP but require a backup route to the ISP. Larger companies may have access to two ISPs, using one of the connections as a backup, or may need to configure a transit autonomous system. Perform one of the following optional tasks to connect to one or more ISPs: Configuring Multihoming with Two ISPs Perform this task to configure your network to access two ISPs where one ISP is the preferred route and the second ISP is a backup route. In the figure below Router B in autonomous system 45000 has BGP peers in two ISPs, autonomous system 40000 and autonomous system 50000. Using this task, Router B will be configured to prefer the route to the BGP peer at Router A in autonomous system 40000. All routes learned from this neighbor will have an assigned weight. The route with the highest weight will be chosen as the preferred route when multiple routes are available to a particular network. The weights assigned with the set weight route-map configuration command override the weights assigned using the neighbor weight command. Note Figure 27: Multihoming with Two ISPs SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. address-family ipv4 [unicast |multicast | vrf vrf-name] 6. network network-number [mask network-mask] 7. neighbor {ip-address | peer-group-name} weight number 8. exit 9. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 10. address-family ipv4 [unicast |multicast | vrf vrf-name] 11. neighbor {ip-address | peer-group-name} weight number 12. end 13. clear ip bgp {* | ip-address | peer-group-name} [soft [in | out]] 14. show ip bgp [network] [network-mask] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal PurposeCommand or Action Enters router configuration mode, and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 45000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 Router(config-router)# neighbor 192.168.1.2 remote-as 40000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 5 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inRouter(config-router)# address-family ipv4 unicast configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] Example: Step 6 For exterior protocols the network command controls which networks are advertised. Interior protocols useRouter(config-router-af)# network 172.17.1.0 mask 255.255.255.0 the network command to determine where to send updates. Assigns a weight to a BGP peer connection.neighbor {ip-address | peer-group-name}weight numberStep 7 Example: In this example, the weight attribute for routes received from the BGP peer 192.168.1.2 is set to 150. Router(config-router-af)# neighbor 192.168.1.2 weight 150 Exits address family configuration mode and enters router configuration mode. exit Example: Step 8 Router(config-router-af)# exit PurposeCommand or Action Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 9 Router(config-router)# neighbor 192.168.3.2 remote-as 50000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 10 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inRouter(config-router)# address-family ipv4 unicast configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Assigns a weight to a BGP peer connection.neighbor {ip-address | peer-group-name}weight numberStep 11 Example: In this example, the weight attribute for routes received from the BGP peer 192.168.3.2 is set to 100. Router(config-router-af)# neighbor 192.168.3.2 weight 100 Exits address family configuration mode and enters privileged EXEC mode. end Example: Step 12 Router(config-router-af)# end (Optional) Clears BGP outbound route filters and initiates an outbound soft reset. A single neighbor or all neighbors can be specified. clear ip bgp {* | ip-address | peer-group-name} [soft [in | out]] Example: Step 13 Router# clear ip bgp * Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 14 Example: Enter this command at Router B to see the weight attribute for each route to a BGP peer. The route with Router# show ip bgp the highest weight attribute will be the preferred route to network 172.17.1.0. Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Examples The following example shows the BGP routing table at Router B with the weight attributes assigned to routes. The route through 192.168.1.2 (Router A in the figure above) has the highest weight attribute and will be the preferred route to network 10.3.0.0, wherein the network 10.3.0.0 is accessible through Router A and Router E. If this route (through Router B) fails for some reason, the route through 192.168.3.2 (Router E) will be used to reach network 10.3.0.0. This way, redundancy is provided for reaching Router B. BGP table version is 8, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 192.168.1.2 0 150 40000 i *> 10.2.2.0/24 192.168.3.2 0 100 50000 i *> 10.3.0.0/16 192.168.1.2 0 150 40000 i * 192.168.3.2 0 100 50000 i *> 172.17.1.0/24 0.0.0.0 0 32768 i Multihoming with a Single ISP Perform this task to configure your network to access one of two connections to a single ISP, where one of the connections is the preferred route and the second connection is a backup route. In the figure above Router E in autonomous system 50000 has two BGP peers in a single autonomous system, autonomous system 45000. Using this task, autonomous system 50000 does not learn any routes from autonomous system 45000 and is sending its own routes using BGP. This task is configured at Router E in the figure above and covers three features about multihoming to a single ISP: Outbound traffic—Router E will forward default routes and traffic to autonomous system 45000 with Router B as the primary link and Router D as the backup link. Static routes are configured to both Router B and Router D with a lower distance configured for the link to Router B. Inbound traffic—Inbound traffic from autonomous system 45000 is configured to be sent from Router B unless the link fails when the backup route is to send traffic from Router D. To achieve this, outbound filters are set using the MED metric. Prevention of transit traffic—A route map is configured at Router E in autonomous system 50000 to block all incoming BGP routing updates to prevent autonomous system 50000 from receiving transit traffic from the ISP in autonomous system 45000. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. address-family ipv4 [unicast |multicast | vrf vrf-name] 6. network network-number [mask network-mask] [route-map route-map-name] 7. neighbor {ip-address | peer-group-name} route-map map-name {in | out} 8. Repeat Step 7 to apply another route map to the neighbor specified in Step 7. 9. exit 10. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 11. address-family ipv4 [unicast |multicast | vrf vrf-name] 12. neighbor {ip-address | peer-group-name} route-map map-name {in | out} 13. Repeat Step 10 to apply another route map to the neighbor specified in Step 10. 14. exit 15. exit 16. ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name] [permanent | track number] [tag tag] 17. Repeat Step 14 to establish another static route. 18. route-map map-name [permit | deny] [sequence-number] 19. set metric value 20. exit 21. route-map map-name [permit | deny] [sequence-number] 22. set metric value 23. exit 24. route-map map-name [permit | deny] [sequence-number] 25. end 26. show ip route [ip-address] [mask] [longer-prefixes] 27. show ip bgp [network] [network-mask] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 45000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 PurposeCommand or Action Router(config-router)# neighbor 192.168.2.1 remote-as 45000 In this example, the BGP peer at Router D is added to the BGP routing table. Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 5 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inRouter(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] [route-map route-map-name] Step 6 Example: For exterior protocols the network command controls which networks are advertised. Interior protocols use Router(config-router-af)# network 10.2.2.0 mask 255.255.255.0 the network command to determine where to send updates. Applies a route map to incoming or outgoing routes.neighbor {ip-address | peer-group-name} route-map map-name {in | out} Step 7 In the first example, the route map named BLOCK is applied to inbound routes at Router E.Example: Router(config-router-af)# neighbor 192.168.2.1 route-map BLOCK in In the second example, the route map named SETMETRIC1 is applied to outbound routes to Router D. Example: Router(config-router-af)# neighbor 192.168.2.1 route-map SETMETRIC1 out Two examples are shown here because the task example requires both these statements to be configured. Note --Repeat Step 7 to apply another route map to the neighbor specified in Step 7. Step 8 Exits address family configuration mode and enters router configuration mode. exit Example: Step 9 Router(config-router-af)# exit PurposeCommand or Action Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 10 In this example, the BGP peer at Router D is added to the BGP routing table.Router(config-router)# neighbor 192.168.3.1 remote-as 45000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 11 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inRouter(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Applies a route map to incoming or outgoing routes.neighbor {ip-address | peer-group-name} route-map map-name {in | out} Step 12 In the first example, the route map named BLOCK is applied to inbound routes at Router E.Example: Router(config-router-af)# neighbor 192.168.3.1 route-map BLOCK in In the second example, the route map named SETMETRIC2 is applied to outbound routes to Router D. Example: Router(config-router-af)# neighbor 192.168.3.1 route-map SETMETRIC2 out Two examples are shown here because the task example requires both these statements to be configured. Note --Repeat Step 10 to apply another route map to the neighbor specified in Step 10. Step 13 Exits address family configuration mode and enters router configuration mode. exit Example: Step 14 Router(config-router-af)# exit Exits router configuration mode and enters global configuration mode. exit Example: Step 15 Router(config-router)# exit PurposeCommand or Action Establishes a static route.ip route prefix mask {ip-address | interface-type interface-number [ip-address]} [distance] [name] [permanent | track number] [tag tag] Step 16 In the first example, a static route to BGP peer 192.168.2.1 is established and given an administrative distance of 50.Example: Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.2.1 50 In the second example, a static route to BGP peer 192.168.3.1 is established and given an administrative distance of 40. The lower administrative distance makes this route via Router B the preferred route.Example: Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.2.1 50 Two examples are shown here because the task example requires both these statements to be configured. Note Example: and Example: Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.3.1 40 --Repeat Step 14 to establish another static route.Step 17 Configures a route map and enters route map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 18 Example: In this example, a route map named SETMETRIC1 is created. Router(config)# route-map SETMETRIC1 permit 10 Sets the MED metric value.set metric value Example: Step 19 Router(config-route-map)# set metric 100 Exits route map configuration mode and enters global configuration mode. exit Example: Step 20 Router(config-route-map)# exit Configures a route map and enters route map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 21 Example: In this example, a route map named SETMETRIC2 is created. Router(config)# route-map SETMETRIC2 permit 10 Sets the MED metric value.set metric value Example: Step 22 Router(config-route-map)# set metric 50 PurposeCommand or Action Exits route map configuration mode and enters global configuration mode. exit Example: Step 23 Router(config-route-map)# exit Configures a route map and enters route map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 24 Example: In this example, a route map named BLOCK is created to block all incoming routes from autonomous system 45000.Router(config)# route-map BLOCK deny 10 Exits route map configuration mode and enters privileged EXEC mode. end Example: Step 25 Router(config-route-map)# end (Optional) Displays route information from the routing tables. show ip route [ip-address] [mask] [longer-prefixes] Example: Step 26 Use this command at Router E in the figure above after Router B and Router D have received updateRouter# show ip route information containing the MEDmetric from Router E. Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. (Optional) Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 27 Example: Use this command at Router E in the figure above after Router B and Router D have received update Router# show ip bgp 172.17.1.0 255.255.255.0 information containing the MEDmetric from Router E. Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Examples The following example shows output from the show ip route command entered at Router E after this task has been configured and Router B and Router D have received update information containing theMEDmetric. Note that the gateway of last resort is set as 192.168.3.1, which is the route to Router B. Router# show ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is 192.168.3.1 to network 0.0.0.0 10.0.0.0/24 is subnetted, 1 subnets C 10.2.2.0 is directly connected, Ethernet0/0 C 192.168.2.0/24 is directly connected, Serial3/0 C 192.168.3.0/24 is directly connected, Serial2/0 S* 0.0.0.0/0 [40/0] via 192.168.3.1 The following example shows output from the show ip bgp command entered at Router E after this task has been configured and Router B and Router D have received routing updates. The route map BLOCK has denied all routes coming in from autonomous system 45000 so the only network shown is the local network. Router# show ip bgp BGP table version is 2, local router ID is 10.2.2.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.2.2.0/24 0.0.0.0 0 32768 i The following example shows output from the show ip bgp command entered at Router B after this task has been configured at Router E and Router B has received routing updates. Note the metric of 50 for network 10.2.2.0. Router# show ip bgp BGP table version is 7, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 192.168.1.2 0 0 40000 i *> 10.2.2.0/24 192.168.3.2 50 0 50000 i *> 172.16.1.0/24 0.0.0.0 0 32768 i *> 172.17.1.0/24 0.0.0.0 0 32768 i The following example shows output from the show ip bgp command entered at Router D after this task has been configured at Router E and Router D has received routing updates. Note the metric of 100 for network 10.2.2.0. Router# show ip bgp BGP table version is 3, local router ID is 192.168.2.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.2.2.0/24 192.168.2.2 100 0 50000 i *> 172.16.1.0/24 0.0.0.0 0 32768 i Configuring Multihoming to Receive the Full Internet Routing Table Perform this task to configure your network to build neighbor relationships with other routers in other autonomous systems while filtering outbound routes. In this task the full Internet routing table will be received from the service providers in the neighboring autonomous systems but only locally originated routes will be advertised to the service providers. This task is configured at Router B in the figure above and uses an access list to permit only locally originated routes and a route map to ensure that only the locally originated routes are advertised outbound to other autonomous systems. Be aware that receiving the full Internet routing table from two ISPs may use all the memory in smaller routers.Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. address-family ipv4 [unicast |multicast | vrf vrf-name] 6. network network-number [mask network-mask] 7. neighbor {ip-address | peer-group-name} route-map map-name {in | out} 8. exit 9. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 10. address-family ipv4 [unicast |multicast| vrf vrf-name] 11. neighbor {ip-address | peer-group-name} route-map map-name {in | out} 12. exit 13. exit 14. ip as-path access-list access-list-number {deny | permit} as-regular-expression 15. route-map map-name [permit | deny] [sequence-number] 16. match as-path path-list-number 17. end 18. show ip bgp [network] [network-mask] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal PurposeCommand or Action Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 45000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 Router(config-router)# neighbor 192.168.1.2 remote-as 40000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 5 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inRouter(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] Example: Step 6 For exterior protocols the network command controls which networks are advertised. Interior protocols useRouter(config-router-af)# network 172.17.1.0 mask 255.255.255.0 the network command to determine where to send updates. Applies a route map to incoming or outgoing routes.neighbor {ip-address | peer-group-name} route-map map-name {in | out} Step 7 In this example, the route map named localonly is applied to outbound routes to Router A.Example: Router(config-router-af)# neighbor 192.168.1.2 route-map localonly out Exits address family configuration mode and enters router configuration mode. exit Example: Step 8 Router(config-router-af)# exit PurposeCommand or Action Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 9 Router(config-router)# neighbor 192.168.3.2 remote-as 50000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast| vrf vrf-name] Example: Step 10 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inRouter(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Applies a route map to incoming or outgoing routes.neighbor {ip-address | peer-group-name} route-map map-name {in | out} Step 11 In this example, the route map named localonly is applied to outbound routes to Router E.Example: Router(config-router-af)# neighbor 192.168.3.2 route-map localonly out Exits address family configuration mode and enters router configuration mode. exit Example: Step 12 Router(config-router-af)# exit Exits router configuration mode and enters global configuration mode. exit Example: Step 13 Router(config-router)# exit Defines a BGP-related access list.ip as-path access-list access-list-number {deny | permit} as-regular-expression Step 14 In this example, the access list number 10 is defined to permit only locally originated BGP routes.Example: Router(config)# ip as-path access-list 10 permit ^$ Configures a route map and enters route map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 15 PurposeCommand or Action Example: In this example, a route map named localonly is created. Router(config)# route-map localonly permit 10 Matches a BGP autonomous system path access list.match as-path path-list-numberStep 16 Example: In this example, the BGP autonomous system path access list created in Step 12 is used for the match clause.Router(config-route-map)# match as-path 10 Exits route map configuration mode and enters privileged EXEC mode. end Example: Step 17 Router(config-route-map)# end Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 18 Example: Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Router# show ip bgp Examples The following example shows the BGP routing table for Router B in the figure above after this task has been configured. Note that the routing table contains the information about the networks in the autonomous systems 40000 and 50000. BGP table version is 5, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.1.1.0/24 192.168.1.2 0 0 40000 i *> 10.2.2.0/24 192.168.3.2 0 0 50000 i *> 172.17.1.0/24 0.0.0.0 0 32768 i Configuring BGP Policies The tasks in this section help you configure BGP policies that filter the traffic in your BGP network. The following optional tasks demonstrate some of the various methods by which traffic can be filtered in your BGP network: Filtering BGP Prefixes with Prefix Lists Perform this task to use prefix lists to filter BGP route information. The task is configured at Router B in the figure below where both Router A and Router E are set up as BGP peers. A prefix list is configured to permit only routes from the network 10.2.2.0/24 to be outbound. In effect, this will restrict the information that is received from Router E to be forwarded to Router A. Optional steps are included to display the prefix list information and to reset the hit count. Figure 28: BGP Topology for Configuring BGP Policies Tasks The neighbor prefix-list and the neighbor distribute-list commands are mutually exclusive for a BGP peer.Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. Repeat Step 5 for all BGP peers. 6. address-family ipv4 [unicast |multicast | vrf vrf-name] 7. network network-number [mask network-mask] 8. aggregate-address address mask [as-set] 9. neighbor ip-address prefix-list list-name {in | out} 10. exit 11. exit 12. ip prefix-list list-name [seq seq-number] {deny network/length | permit network/length} [ge ge-value] [le le-value] [eq eq-value] 13. end 14. show ip prefix-list [detail | summary] [prefix-list-name [seq seq-number | network/length [longer | first-match]]] 15. clear ip prefix-list {* | ip-address | peer-group-name} out DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 PurposeCommand or Action Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 45000 Adds the IP address of the neighbor in the specified autonomous system to the BGP neighbor table of the local router. neighbor ip-address remote-as autonomous-system-number Example: Step 4 Router(config-router)# neighbor 192.168.1.2 remote-as 40000 --Repeat Step 5 for all BGP peers.Step 5 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 6 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inRouter(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. (Optional) Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] Example: Step 7 For exterior protocols the network command controls which networks are advertised. Interior protocols useRouter(config-router-af)# network 172.17.1.0 mask 255.255.255.0 the network command to determine where to send updates. Creates an aggregate entry in a BGP routing table.aggregate-address address mask [as-set]Step 8 Example: A specified route must exist in the BGP table. PurposeCommand or Action Router(config-router-af)# aggregate-address 172.0.0.0 255.0.0.0 Use the aggregate-address command with no keywords to create an aggregate entry if any more-specific BGP routes are available that fall in the specified range. Only partial syntax is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Distributes BGP neighbor information as specified in a prefix list. neighbor ip-address prefix-list list-name {in | out} Example: Step 9 In this example, a prefix list called super172 is set for outgoing routes to Router A.Router(config-router-af)# neighbor 192.168.1.2 prefix-list super172 out Exits address family configuration mode and enters router configuration mode. exit Example: Step 10 Router(config-router-af)# exit Exits router configuration mode and enters global configuration mode. exit Example: Step 11 Router(config-router) exit Defines a BGP-related prefix list and enters access list configuration mode. ip prefix-list list-name [seq seq-number] {deny network/length | permit network/length} [ge ge-value] [le le-value] [eq eq-value] Step 12 In this example, the prefix list called super172 is defined to permit only route 172.0.0.0/8 to be forwarded. Example: Router(config)# ip prefix-list super172 permit 172.0.0.0/8 • All other routes will be denied because there is an implicit deny at the end of all prefix lists. Exits access list configuration mode and enters privileged EXEC mode. end Example: Step 13 Router(config-access-list)# end Displays information about prefix lists.show ip prefix-list [detail | summary] [prefix-list-name [seq seq-number | network/length [longer | first-match]]] Step 14 In this example, details of the prefix list named super172 will be displayed, including the hit count.Example: Hit count is the number of times the entry has matched a route.Router# show ip prefix-list detail super172 Resets the hit count of the prefix list entries.clear ip prefix-list {* | ip-address | peer-group-name} out Step 15 PurposeCommand or Action Example: In this example, the hit count for the prefix list called super172 will be reset. Router# clear ip prefix-list super172 out Examples The following output from the show ip prefix-list command shows details of the prefix list named super172, including the hit count. The clear ip prefix-list command is entered to reset the hit count and the show ip prefix-list command is entered again to show the hit count reset to 0. Router# show ip prefix-list detail super172 ip prefix-list super172: count: 1, range entries: 0, sequences: 5 - 5, refcount: 4 seq 5 permit 172.0.0.0/8 (hit count: 1, refcount: 1) Router# clear ip prefix-list super172 Router# show ip prefix-list detail super172 ip prefix-list super172: count: 1, range entries: 0, sequences: 5 - 5, refcount: 4 seq 5 permit 172.0.0.0/8 (hit count: 0, refcount: 1) Filtering BGP Prefixes with AS-Path Filters Perform this task to filter BGP prefixes using AS-path filters with an access list based on the value of the AS-path attribute to filter route information. An AS-path access list is configured at Router B in the figure above. The first line of the access list denies all matches to AS-path 50000, and the second line allows all other paths. The router uses the neighbor filter-list command to specify the AS-path access list as an outbound filter. After the filter is enabled, traffic can be received from both Router A and Router C, but updates originating from autonomous system 50000 (Router C) are not forwarded by Router B to Router A. If any updates from Router C originated from another autonomous system, they would be forwarded because they would contain both autonomous system 50000 and another autonomous system number, and that would not match the AS-path access list. SUMMARY STEPS 1. enable 2. configure terminal 3. ip as-path access-list access-list-number {deny | permit} as-regular-expression 4. Repeat Step 3 for all entries required in the AS-path access list. 5. router bgp autonomous-system-number 6. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 7. Repeat Step 6 for all BGP peers. 8. address-family ipv4 [unicast |multicast | vrf vrf-name] 9. neighbor {ip-address | peer-group-name} filter-list access-list-number {in | out} 10. end 11. show ip bgp regexp as-regular-expression DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Defines a BGP-related access list and enters access list configuration mode. ip as-path access-list access-list-number {deny | permit} as-regular-expression Step 3 Example: In the first example, access list number 100 is defined to deny any AS-path that starts and ends with 50000. Device(config)# ip as-path access-list 100 deny ^50000$ • In the second example, all routes that do not match the criteria in the first example of the AS-path access Example: list will be permitted. The period and asterisk symbols Device(config)# ip as-path access-list 100 permit .* imply that all characters in the AS-path will match, so Router B will forward those updates to Router A. Two examples are shown here because the task example requires both these statements to be configured. Note —Repeat Step 3 for all entries required in the AS-path access list. Step 4 Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 5 Device(config)# router bgp 45000 Adds the IP address or peer group name of the neighbor in the specified autonomous system BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 6 Device(config-router)# neighbor 192.168.1.2 remote-as 40000 —Repeat Step 6 for all BGP peers.Step 7 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 8 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inDevice(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 PurposeCommand or Action unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Distributes BGP neighbor information as specified in a prefix list. neighbor {ip-address | peer-group-name} filter-list access-list-number {in | out} Step 9 Example: In this example, an access list number 100 is set for outgoing routes to Router A. Device(config-router-af)# neighbor 192.168.1.2 filter-list 100 out Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 10 Device(config-router-af)# end Displays routes that match the regular expression.show ip bgp regexp as-regular-expressionStep 11 Example: To verify the regular expression, you can use this command. Device# show ip bgp regexp ^50000$ In this example, all paths that match the expression “starts and ends with 50000” will be displayed. Examples The following output from the show ip bgp regexp command shows the autonomous system paths that match the regular expression—start and end with AS-path 50000: Device# show ip bgp regexp ^50000$ BGP table version is 9, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.2.2.0/24 192.168.3.2 0 150 50000 i Filtering BGP Prefixes with AS-path Filters Using 4-Byte Autonomous System Numbers In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)SXI1, and later releases, BGP support for 4-octet (4-byte) autonomous system numbers was introduced. The 4-byte autonomous system numbers in this task are formatted in the default asplain (decimal value) format, for example, Router B is in autonomous system number 65538 in the figure below. For more details about the introduction of 4-byte autonomous system numbers, see the “BGP Autonomous System Number Formats” section. Perform this task to filter BGP prefixes with AS-path filters using 4-byte autonomous system numbers with an access list based on the value of the AS-path attribute to filter route information. An AS-path access list is configured at Router B in the figure below. The first line of the access list denies all matches to the AS-path 65550 and the second line allows all other paths. The router uses the neighbor filter-list command to specify the AS-path access list as an outbound filter. After the filtering is enabled, traffic can be received from both Router A and Router E but updates originating from autonomous system 65550 (Router E) are not forwarded by Router B to Router A. If any updates from Router E originated from another autonomous system, they would be forwarded because they would contain both autonomous system 65550 plus another autonomous system number, and that would not match the AS-path access list. In Cisco IOSReleases 12.0(22)S, 12.2(15)T, 12.2(18)S, and later releases, themaximumnumber of autonomous system access lists that can be configured with the ip as-path access-list command is increased from 199 to 500. Note Figure 29: BGP Topology for Filtering BGP Prefixes with AS-path Filters Using 4-Byte Autonomous System Numbers SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. Repeat Step 4 for all BGP peers. 6. address-family ipv4 [unicast |multicast| vrf vrf-name] 7. network network-number [mask network-mask] 8. neighbor {ip-address | peer-group-name} filter-list access-list-number{in | out} 9. exit 10. exit 11. ip as-path access-list access-list-number {deny | permit} as-regular-expression 12. Repeat Step 11 for all entries required in the AS-path access list. 13. end 14. show ip bgp regexp as-regular-expression DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 65538 Adds the IP address or peer group name of the neighbor in the specified autonomous system BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 In this example, the IP address for the neighbor at Router A is added.Router(config-router-af)# neighbor 192.168.1.2 remote-as 65536 --Repeat Step 4 for all BGP peers.Step 5 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast| vrf vrf-name] Example: Step 6 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inRouter(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. PurposeCommand or Action (Optional) Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] Example: Step 7 For exterior protocols the network command controls which networks are advertised. Interior protocols useRouter(config-router-af)# network 172.17.1.0 mask 255.255.255.0 the network command to determine where to send updates. Only partial syntax is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Distributes BGP neighbor information as specified in a prefix list. neighbor {ip-address | peer-group-name} filter-list access-list-number{in | out} Step 8 Example: In this example, an access list number 99 is set for outgoing routes to Router A. Router(config-router-af)# neighbor 192.168.1.2 filter-list 99 out Exits address family configuration mode and returns to router configuration mode. exit Example: Step 9 Router(config-router-af)# exit Exits router configuration mode and returns to global configuration mode. exit Example: Step 10 Router(config-router)# exit Defines a BGP-related access list and enters access list configuration mode. ip as-path access-list access-list-number {deny | permit} as-regular-expression Step 11 Example: In the first example, access list number 99 is defined to deny any AS-path that starts and ends with 65550. Router(config)# ip as-path access-list 99 deny ^65550$ • In the second example, all routes that do not match the criteria in the first example of the AS-path access Example: list will be permitted. The period and asterisk symbols and imply that all characters in the AS-path will match, so Router B will forward those updates to Router A. Example: Two examples are shown here because the task example requires both these statements to be configured. Note Router(config)# ip as-path access-list 99 permit .* --Repeat Step 11 for all entries required in the AS-path access list. Step 12 Exits access list configuration mode and returns to privileged EXEC mode. end Example: Step 13 PurposeCommand or Action Router(config-access-list)# end Displays routes that match the regular expression.show ip bgp regexp as-regular-expressionStep 14 Example: To verify the regular expression, you can use this command. Router# show ip bgp regexp ^65550$ In this example, all paths that match the expression "starts and ends with 65550" will be displayed. Examples The following output from the show ip bgp regexp command shows the autonomous system paths that match the regular expression--start and end with AS-path 65550: RouterB# show ip bgp regexp ^65550$ BGP table version is 4, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 10.2.2.0/24 192.168.3.2 0 0 65550 i Filtering Traffic Using Community Lists Perform this task to filter traffic by creating a BGP community list, referencing the community list within a route map, and then applying the route map to a neighbor. In this task, Router B in the figure below is configured with route maps and a community list to control incoming routes. Figure 30: Topology for Which a Community List Is Configured SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. address-family ipv4 [unicast |multicast | vrf vrf-name] 6. neighbor {ip-address | peer-group-name} route-map route-map-name {in | out} 7. exit 8. exit 9. route-map map-name [permit | deny] [sequence-number] 10. match community {standard-list-number | expanded-list-number | community-list-name [exact]} 11. set weight weight 12. exit 13. route-map map-name [permit | deny] [sequence-number] 14. match community {standard-list-number | expanded-list-number | community-list-name [exact]} 15. set community community-number 16. exit 17. ip community-list {standard-list-number | standard list-name {deny | permit} [community-number] [AA:NN] [internet] [local-AS] [no-advertise] [no-export]} | {expanded-list-number | expanded list-name {deny | permit} regular-expression} 18. Repeat Step 17 to create all the required community lists. 19. exit 20. show ip community-list [standard-list-number | expanded-list-number | community-list-name] [exact-match] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Adds the IP address or peer group name of the neighbor to the specified autonomous system BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 PurposeCommand or Action Device(config-router)# neighbor 192.168.3.2 remote-as 50000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 5 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inDevice(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Applies a route map to inbound or outbound routes.neighbor {ip-address | peer-group-name} route-map route-map-name {in | out} Step 6 In this example, the route map called 2000 is applied to inbound routes from the BGP peer at 192.168.3.2.Example: Device(config-router-af)# neighbor 192.168.3.2 route-map 2000 in Exits address family configuration mode and enters router configuration mode. exit Example: Step 7 Device(config-router-af)# exit Exits router configuration mode and enters global configuration mode. exit Example: Step 8 Device(config-router)# exit Creates a route map and enters route map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 9 Example: In this example, the route map called 2000 is defined. Device(config)# route-map 2000 permit 10 Matches on the communities in a BGP community list.match community {standard-list-number | expanded-list-number | community-list-name [exact]} Step 10 In this example, the route's community attribute is matched to communities in community list 1.Example: Device(config-route-map)# match community 1 PurposeCommand or Action Sets the weight of BGP routes that match the community list. set weight weight Example: Step 11 In this example, any route that matches community list 1 will have its weight set to 30.Device(config-route-map)# set weight 30 Exits route map configuration mode and enters global configuration mode. exit Example: Step 12 Device(config-route-map)# exit Creates a route map and enters route map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 13 Example: In this example, the route map called 3000 is defined. Device(config)# route-map 3000 permit 10 Matches on the communities in a BGP community list.match community {standard-list-number | expanded-list-number | community-list-name [exact]} Step 14 In this example, the route's COMMUNITIES attribute is matched to communities in community list 2.Example: Device(config-route-map)# match community 2 Sets the BGP communities attribute.set community community-numberStep 15 Example: In this example, any route that matches community list 2 will have the COMMUNITIES attribute set to 99.Device(config-route-map)# set community 99 Exits route map configuration mode and enters global configuration mode. exit Example: Step 16 Device(config-route-map)# exit Creates a community list for BGP and controls access to it. ip community-list {standard-list-number | standard list-name {deny | permit} [community-number] [AA:NN] Step 17 [internet] [local-AS] [no-advertise] [no-export]} | • In the first example, community list 1 permits routes with a COMMUNITIES attribute of 100. Router E{expanded-list-number | expanded list-name {deny | permit} regular-expression} routes all have a COMMUNITIES attribute of 100, so their weight will be set to 30.Example: Device(config)# ip community-list 1 permit 100 In the second example, community list 2 effectively permits all routes by specifying the internet Example: community. Any routes that did not match community list 1 are checked against community list 2. All routes Device(config)# ip community-list 2 permit internet are permitted, but no changes are made to the route attributes. PurposeCommand or Action Two examples are shown here because the task example requires both of these statements to be configured. Note —Repeat Step 17 to create all the required community lists.Step 18 Exits global configuration mode and enters privileged EXEC mode. exit Example: Step 19 Device(config)# exit Displays configured BGP community list entries.show ip community-list [standard-list-number | expanded-list-number | community-list-name] [exact-match] Step 20 Example: Device# show ip community-list 1 Examples The following sample output verifies that community list 1 has been created and it permits routes that have a community attribute of 100: Device# show ip community-list 1 Community standard list 1 permit 100 The following sample output verifies that community list 2 has been created and it effectively permits all routes by specifying the internet community: Device# show ip community-list 2 Community standard list 2 permit internet Filtering Traffic Using Extended Community Lists Perform this task to filter traffic by creating an extended BGP community list to control outbound routes. Figure 31: Topology for Which a Community List Is Configured In this task, Router B in the figure above is configured with an extended named community list to specify that the BGP peer at 192.168.1.2 is not sent advertisements about any path through or from autonomous system 50000. The IP extended community-list configuration mode is used and the ability to resequence entries is shown. A sequence number is applied to all extended community list entries by default, regardless of the configuration mode. Explicit sequencing and resequencing of extended community list entries can be configured only in IP extended community-list configuration mode, not in global configuration mode. Note SUMMARY STEPS 1. enable 2. configure terminal 3. ip extcommunity-list {expanded-list-number | expanded list-name | standard-list-number | standard list-name} 4. [sequence-number] {deny [regular-expression] | exit | permit [regular-expression]} 5. Repeat Step 4 for all the required permit or deny entries in the extended community list. 6. resequence [starting-sequence] [sequence-increment] 7. exit 8. router bgp autonomous-system-number 9. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 10. Repeat the prior step for all of the required BGP peers. 11. address-family ipv4 [unicast |multicast | vrf vrf-name] 12. network network-number [mask network-mask] 13. end 14. show ip extcommunity-list [list-name] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters IP extended community-list configuration mode to create or configure an extended community list. ip extcommunity-list {expanded-list-number | expanded list-name | standard-list-number | standard list-name} Step 3 Example: In this example, the expanded community list DENY50000 is created. Device(config)# ip extcommunity-list expanded DENY50000 Configures an expanded community list entry.[sequence-number] {deny [regular-expression] | exit | permit [regular-expression]} Step 4 In the first example, an expanded community list entry with the sequence number 10 is configured to denyExample: advertisements about paths from autonomous system 50000.Device(config-extcomm-list)# 10 deny _50000_ Example: In the second example, an expanded community list entry with the sequence number 20 is configured to Device(config-extcomm-list)# 20 deny ^50000 .* deny advertisements about paths through autonomous system 50000. Two examples are shown here because the task example requires both these statements to be configured. Note Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note —Repeat Step 4 for all the required permit or deny entries in the extended community list. Step 5 Resequences expanded community list entries.resequence [starting-sequence] [sequence-increment]Step 6 Example: In this example, the sequence number of the first expanded community list entry is set to 50 and Device(config-extcomm-list)# resequence 50 100 subsequent entries are set to increment by 100. The second expanded community list entry is therefore set to 150. PurposeCommand or Action Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Exits expanded community-list configuration mode and enters global configuration mode. exit Example: Step 7 Device(config-extcomm-list)# exit Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 8 Device(config)# router bgp 45000 Adds the IP address or peer group name of the neighbor to the specified autonomous system BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 9 Device(config-router)# neighbor 192.168.3.2 remote-as 50000 —Repeat the prior step for all of the required BGP peers.Step 10 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 11 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inDevice(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified in the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Note (Optional) Specifies a network as local to this autonomous system and adds it to the BGP routing table. network network-number [mask network-mask] Example: Step 12 For exterior protocols, the network command controls which networks are advertised. Interior protocols useDevice(config-router-af)# network 172.17.1.0 mask 255.255.255.0 the network command to determine where to send updates. PurposeCommand or Action Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Exits address family configuration mode and enters privileged EXEC mode. end Example: Step 13 Device(config-router-af)# end Displays configured BGP expanded community list entries.show ip extcommunity-list [list-name] Example: Step 14 Device# show ip extcommunity-list DENY50000 Examples The following sample output verifies that the BGP expanded community list DENY50000 has been created, with the output showing that the entries to deny advertisements about autonomous system 50000 have been resequenced from 10 and 20 to 50 and 150: Device# show ip extcommunity-list DENY50000 Expanded extended community-list DENY50000 50 deny _50000_ 150 deny ^50000 .* Filtering Traffic Using a BGP Route Map Policy List Perform this task to create a BGP policy list and then reference it within a route map. A policy list is like a route map that contains only match clauses. With policy lists there are no changes to match clause semantics and route map functions. The match clauses are configured in policy lists with permit and deny statements and the route map evaluates and processes each match clause to permit or deny routes based on the configuration. AND and OR semantics in the route map function the same way for policy lists as they do for match clauses. Policy lists simplify the configuration of BGP routing policy in medium-size and large networks. The network operator can reference preconfigured policy lists with groups of match clauses in route maps and easily apply general changes to BGP routing policy. The network operator no longer needs to manually reconfigure each recurring group of match clauses that occur in multiple route map entries. Perform this task to create a BGP policy list to filter traffic that matches the autonomous system path and MED of a router and then create a route map to reference the policy list. Before you begin BGP routing must be configured in your network and BGP neighbors must be established. BGP route map policy lists do not support the configuration of IPv6 match clauses in policy lists. Policy lists are not supported in versions of Cisco IOS software prior to Cisco IOS Releases 12.0(22)S and 12.2(15)T. Reloading a router that is running an older version of Cisco IOS software may cause some routing policy configurations to be lost. Policy lists support only match clauses and do not support set clauses. However, policy lists can coexist, within the same route map entry, with match and set clauses that are configured separately from the policy lists. Policy lists are supported only by BGP. They are not supported by other IP routing protocols. This limitation does not interfere with normal operations of a route map, including redistribution, because policy list functions operate transparently within BGP and are not visible to other IP routing protocols. Policy lists support only match clauses and do not support set clauses. However, policy lists can coexist, within the same route map entry, with match and set clauses that are configured separately from the policy lists. The first route map example configures AND semantics, and the second route map configuration example configures semantics. Both examples in this section show sample route map configurations that reference policy lists and separate match and set clauses in the same configuration. Note SUMMARY STEPS 1. enable 2. configure terminal 3. ip policy-list policy-list-name {permit | deny} 4. match as-path as-number 5. match metric metric 6. exit 7. route-map map-name [permit | deny] [sequence-number] 8. match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] 9. match policy-list policy-list-name 10. set community community-number [additive] [well-known-community] | none} 11. set local-preference preference-value 12. end 13. show ip policy-list [policy-list-name] 14. show route-map [route-map-name] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal PurposeCommand or Action Enters policy list configuration mode and creates a BGP policy list that will permit routes that are allowed by the match clauses that follow. ip policy-list policy-list-name {permit | deny} Example: Router(config)# ip policy-list POLICY-LIST-NAME-1 permit Step 3 Creates a match clause to permit routes from the specified autonomous system path. match as-path as-number Example: Step 4 Router(config-policy-list)# match as-path 500 Creates a match clause to permit routes with the specified metric. match metric metric Example: Step 5 Router(config-policy-list)# match metric 10 Exits policy list configuration mode and enters global configuration mode. exit Example: Step 6 Router(config-policy-list)# exit Creates a route map and enters route map configuration mode. route-map map-name [permit | deny] [sequence-number] Example: Step 7 Router(config)# route-map MAP-NAME-1 permit 10 Creates a match clause to permit routes that match the specified access-list-numberor access-list-nameargument. match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] Example: Step 8 Router(config-route-map)# match ip address 1 Creates a clause that will match the specified policy list.match policy-list policy-list-nameStep 9 Example: All match clauses within the policy list will be evaluated and processed. Multiple policy lists can referenced with this command.Router(config-route-map)# match policy-list POLICY-LIST-NAME-1 This command also supports AND or OR semantics like a standard match clause. Creates a clause to set or remove the specified community.set community community-number [additive] [well-known-community] | none} Step 10 Example: Router(config-route-map)# set community 10:1 PurposeCommand or Action Creates a clause to set the specified local preference value.set local-preference preference-value Example: Step 11 Router(config-route-map)# set local-preference 140 Exits route map configuration mode and enters privileged EXEC mode. end Example: Step 12 Router(config-route-map)# end Display information about configured policy lists and policy list entries. show ip policy-list [policy-list-name] Example: Step 13 Router# show ip policy-list POLICY-LIST-NAME-1 Displays locally configured route maps and route map entries. show route-map [route-map-name] Example: Step 14 Router# show route-map Examples The following sample output verifies that a policy list has been created, with the output displaying the policy list name and configured match clauses: Router# show ip policy-list POLICY-LIST-NAME-1 policy-list POLICY-LIST-NAME-1 permit Match clauses: metric 20 as-path (as-path filter): 1 A policy list name can be specified when the show ip policy-list command is entered. This option can be useful for filtering the output of this command and verifying a single policy list. Note The following sample output from the show route-map command verifies that a route map has been created and a policy list is referenced. The output of this command displays the route map name and policy lists that are referenced by the configured route maps. Router# show route-map route-map ROUTE-MAP-NAME-1, deny, sequence 10 Match clauses: Set clauses: Policy routing matches: 0 packets, 0 bytes route-map ROUTE-MAP-NAME-1, permit, sequence 10 Match clauses: IP Policy lists: POLICY-LIST-NAME-1 Set clauses: Policy routing matches: 0 packets, 0 bytes Filtering Traffic Using Continue Clauses in a BGP Route Map SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. address-family ipv4 [unicast |multicast | vrf vrf-name] 6. neighbor {ip-address | peer-group-name} route-map map-name {in | out} 7. exit 8. exit 9. route-map map-name {permit | deny} [sequence-number] 10. match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] 11. set community { { [community-number] [well-known-community] [additive]} | none} 12. continue [sequence-number] 13. end 14. show route-map [map-name] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode, and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 50000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 PurposeCommand or Action Device(config-router)# neighbor 10.0.0.1 remote-as 50000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 5 The unicast keyword specifies the IPv4 unicast address family. By default, the device is placed inDevice(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Applies the inbound route map to routes received from the specified neighbor, or applies an outbound route map to routes advertised to the specified neighbor. neighbor {ip-address | peer-group-name} route-map map-name {in | out} Example: Step 6 Device(config-router-af)# neighbor 10.0.0.1 route-map ROUTE-MAP-NAME in Exits address family configuration mode and enters router configuration mode. exit Example: Step 7 Device(config-router-af)# exit Exits router configuration mode and enters global configuration mode. exit Example: Step 8 Device(config-router)# exit Enters route-map configurationmode to create or configure a route map. route-map map-name {permit | deny} [sequence-number] Example: Step 9 Device(config)# route-map ROUTE-MAP-NAME permit 10 Configures amatch command that specifies the conditions under which policy routing and route filtering occur. match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] Step 10 Example: Multiplematch commands can be configured. If a match command is configured, a match must occur Device(config-route-map)# match ip address 1 in order for the continue statement to be executed. If PurposeCommand or Action amatch command is not configured, set and continue clauses will be executed. Thematch and set commands used in this task are examples that are used to help describe the operation of the continue command. For a list of specificmatch and set commands, see the continue command in the Cisco IOS IP Routing: BGP Command Reference. Note Configures a set command that specifies the routing action to perform if the criteria enforced by thematch commands are met. set community { { [community-number] [well-known-community] [additive]} | none} Example: Step 11 Multiple set commands can be configured. Device(config-route-map)# set community 10:1 In this example, a clause is created to set the specified community number in aa:nn format. Configures a route map to continue to evaluate and execute match statements after a successful match occurs. continue [sequence-number] Example: Step 12 If a sequence number is configured, the continue clause will go to the route map with the specified sequence number. Device(config-route-map)# continue If no sequence number is specified, the continue clause will go to the route map with the next sequence number. This behavior is called an “implied continue.” Exits route-map configuration mode and enters privileged EXEC mode. end Example: Step 13 Device(config-route-map)# end (Optional) Displays locally configured route maps. The name of the route map can be specified in the syntax of this command to filter the output. show route-map [map-name] Example: Device# show route-map Step 14 Examples The following sample output shows how to verify the configuration of continue clauses using the show route-map command. The output displays configured route maps including the match, set, and continue clauses. Device# show route-map route-map MARKETING, permit, sequence 10 Match clauses: ip address (access-lists): 1 metric 10 Continue: sequence 40 Set clauses: as-path prepend 10 Policy routing matches: 0 packets, 0 bytes route-map MARKETING, permit, sequence 20 Match clauses: ip address (access-lists): 2 metric 20 Set clauses: as-path prepend 10 10 Policy routing matches: 0 packets, 0 bytes route-map MARKETING, permit, sequence 30 Match clauses: Continue: to next entry 40 Set clauses: as-path prepend 10 10 10 Policy routing matches: 0 packets, 0 bytes route-map MARKETING, permit, sequence 40 Match clauses: community (community-list filter): 10:1 Set clauses: local-preference 104 Policy routing matches: 0 packets, 0 bytes route-map MKTG-POLICY-MAP, permit, sequence 10 Match clauses: Set clauses: community 655370 Policy routing matches: 0 packets, 0 bytes Configuration Examples for Connecting to a Service Provider Using External BGP Example: Influencing Inbound Path Selection The following example shows how you can use route maps to modify incoming data from a neighbor. Any route received from 10.222.1.1 that matches the filter parameters set in autonomous system access list 200 will have its weight set to 200 and its local preference set to 250, and it will be accepted. router bgp 100 ! neighbor 10.222.1.1 route-map FIX-WEIGHT in neighbor 10.222.1.1 remote-as 1 ! ip as-path access-list 200 permit ^690$ ip as-path access-list 200 permit ^1800 ! route-map FIX-WEIGHT permit 10 match as-path 200 set local-preference 250 set weight 200 In the following example, the route map named FINANCE marks all paths originating from autonomous system 690 with an MED metric attribute of 127. The second permit clause is required so that routes not matching autonomous system path list 1 will still be sent to neighbor 10.1.1.1. router bgp 65000 neighbor 10.1.1.1 route-map FINANCE out ! ip as-path access-list 1 permit ^690_ ip as-path access-list 2 permit .* ! route-map FINANCE permit 10 match as-path 1 set metric 127 ! route-map FINANCE permit 20 match as-path 2 Inbound route maps could perform prefix-based matching and set various parameters of the update. Inbound prefix matching is available in addition to autonomous system path and community list matching. The following example shows how the route map named SET-LOCAL-PREF sets the local preference of the inbound prefix 172.20.0.0/16 to 120: ! router bgp 65100 network 10.108.0.0 neighbor 10.108.1.1 remote-as 65200 neighbor 10.108.1.1 route-map SET-LOCAL-PREF in ! route-map SET-LOCAL-PREF permit 10 match ip address 2 set local-preference 120 ! route-map SET-LOCAL-PREF permit 20 ! access-list 2 permit 172.20.0.0 0.0.255.255 access-list 2 deny any Example: Influencing Inbound Path Selection by Modifying the AS-path Attribute Using 4-Byte AS Numbers This example shows how to configure BGP to influence the inbound path selection for traffic destined for the 172.17.1.0 network by modifying the AS-path attribute. In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SXI1, and later releases, BGP support for 4-octet (4-byte) autonomous system numbers was introduced. The 4-byte autonomous system numbers in this example are formatted in the default asplain (decimal value) format; for example, Router B is in autonomous system number 65538 in the figure below. For more details about the introduction of 4-byte autonomous system numbers, see the “BGP Autonomous System Number Formats” section. One of the methods that BGP can use to influence the choice of paths in another autonomous system is to modify the AS-path attribute. For example, in the figure below, Router A advertises its own network, 172.17.1.0, to its BGP peers in autonomous system 65538 and autonomous system 65550. When the routing information is propagated to autonomous system 65545, the routers in autonomous system 65545 have network reachability information about network 172.17.1.0 from two different routes. The first route is from autonomous system 65538 with an AS-path consisting of 65538, 65536. The second route is through autonomous system 65547 with an AS-path of 65547, 65550, 65536. If all other BGP attribute values are the same, Router C in autonomous system 65545 would choose the route through autonomous system 65538 for traffic destined for network 172.17.1.0 because it is the shortest route in terms of autonomous systems traversed. Autonomous system 65536 now receives all traffic from autonomous system 65545 for the 172.17.1.0 network through Router B in autonomous system 65538. If, however, the link between autonomous system 65538 and autonomous system 65536 is a really slow and congested link, the set as-path prependcommand can be used at Router A to influence inbound path selection for the 172.17.1.0 network by making the route through autonomous system 65538 appear to be longer than the path through autonomous system 65550. The configuration is done at Router A in the figure below by applying a route map to the outbound BGP updates to Router B. Using the set as-path prependcommand, all the outbound BGP updates from Router A to Router B will have their AS-path attribute modified to add the local autonomous system number 65536 twice. After the configuration, autonomous system 65545 receives updates about the 172.17.1.0 network through autonomous system 65538. The new AS-path is 65538, 65536, 65536, 65536, which is now longer than the AS-path from autonomous system 65547 (unchanged at a value of 65547, 65550, 65536). Networking devices in autonomous system 65545will now prefer the route through autonomous system 65547 to forward packets with a destination address in the 172.17.1.0 network. Figure 32: Network Topology for Modifying the AS-path Attribute The configuration for this example is performed at Router A in the figure above. router bgp 65536 address-family ipv4 unicast network 172.17.1.0 mask 255.255.255.0 neighbor 192.168.1.2 remote-as 65538 neighbor 192.168.1.2 activate neighbor 192.168.1.2 route-map PREPEND out exit-address-family exit route-map PREPEND permit 10 set as-path prepend 65536 65536 Example: Filtering BGP Prefixes with Prefix Lists This section contains the following examples: Example: Filtering BGP Prefixes Using a Single Prefix List The following example shows how a prefix list denies the default route 0.0.0.0/0: ip prefix-list abc deny 0.0.0.0/0 The following example shows how a prefix list permits a route that matches the prefix 10.0.0.0/8: ip prefix-list abc permit 10.0.0.0/8 The following example shows how to configure the BGP process so that it accepts only prefixes with a prefix length of /8 to /24: router bgp 40000 network 10.20.20.0 distribute-list prefix max24 in ! ip prefix-list max24 seq 5 permit 0.0.0.0/0 ge 8 le 24 The following example configuration shows how to conditionally originate a default route (0.0.0.0/0) in RIP when a prefix 10.1.1.0/24 exists in the routing table: ip prefix-list cond permit 10.1.1.0/24 ! route-map default-condition permit 10 match ip address prefix-list cond ! router rip default-information originate route-map default-condition The following example shows how to configure BGP to accept routing updates from 192.168.1.1 only, besides filtering on the prefix length: router bgp 40000 distribute-list prefix max24 gateway allowlist in ! ip prefix-list allowlist seq 5 permit 192.168.1.1/32 ! The following example shows how to direct the BGP process to filter incoming updates to the prefix using name1, and match the gateway (next hop) of the prefix being updated to the prefix list name2, on Gigabit Ethernet interface 0/0/0: router bgp 103 distribute-list prefix name1 gateway name2 in gigabitethernet 0/0/0 Example: Filtering BGP Prefixes Using a Group of Prefixes The following example shows how to configure BGP to permit routes with a prefix length up to 24 in network 192/8: ip prefix-list abc permit 192.0.0.0/8 le 24 The following example shows how to configure BGP to deny routes with a prefix length greater than 25 in 192/8: ip prefix-list abc deny 192.0.0.0/8 ge 25 The following example shows how to configure BGP to permit routes with a prefix length greater than 8 and less than 24 in all address space: ip prefix-list abc permit 0.0.0.0/0 ge 8 le 24 The following example shows how to configure BGP to deny routes with a prefix length greater than 25 in all address space: ip prefix-list abc deny 0.0.0.0/0 ge 25 The following example shows how to configure BGP to deny all routes in network 10/8, because any route in the Class A network 10.0.0.0/8 is denied if its mask is less than or equal to 32 bits: ip prefix-list abc deny 10.0.0.0/8 le 32 The following example shows how to configure BGP to deny routes with a mask greater than 25 in 192.168.1.0/24: ip prefix-list abc deny 192.168.1.0/24 ge 25 The following example shows how to configure BGP to permit all routes: ip prefix-list abc permit 0.0.0.0/0 le 32 Example: Adding or Deleting Prefix List Entries You can add or delete individual entries in a prefix list if a prefix list has the following initial configuration: ip prefix-list abc deny 0.0.0.0/0 le 7 ip prefix-list abc deny 0.0.0.0/0 ge 25 ip prefix-list abc permit 192.168.0.0/15 The following example shows how to delete an entry from the prefix list so that 192.168.0.0 is not permitted, and add a new entry that permits 10.0.0.0/8: no ip prefix-list abc permit 192.168.0.0/15 ip prefix-list abc permit 10.0.0.0/8 The new configuration is as follows: ip prefix-list abc deny 0.0.0.0/0 le 7 ip prefix-list abc deny 0.0.0.0/0 ge 25 ip prefix-list abc permit 10.0.0.0/8 Example: Filtering Traffic Using COMMUNITIES Attributes This section contains two examples of the use of BGP COMMUNITIES attributes with route maps. The first example configures a route map named set-community, which is applied to the outbound updates to the neighbor 172.16.232.50. The routes that pass access list 1 are given the well-known COMMUNITIES attribute value no-export. The remaining routes are advertised normally. The no-export community value automatically prevents the advertisement of those routes by the BGP speakers in autonomous system 200. router bgp 100 neighbor 172.16.232.50 remote-as 200 neighbor 172.16.232.50 send-community neighbor 172.16.232.50 route-map set-community out ! route-map set-community permit 10 match address 1 set community no-export ! route-map set-community permit 20 match address 2 The second example configures a route map named set-community, which is applied to the outbound updates to neighbor 172.16.232.90. All the routes that originate from autonomous system 70 have the COMMUNITIES attribute values 200 200 added to their already existing communities. All other routes are advertised as normal. route-map bgp 200 neighbor 172.16.232.90 remote-as 100 neighbor 172.16.232.90 send-community neighbor 172.16.232.90 route-map set-community out ! route-map set-community permit 10 match as-path 1 set community 200 200 additive ! route-map set-community permit 20 ! ip as-path access-list 1 permit 70$ ip as-path access-list 2 permit .* Example: Filtering Traffic Using AS-Path Filters The following example shows BGP path filtering by neighbor. Only the routes that pass autonomous system path access list 2 will be sent to 192.168.12.10. Similarly, only routes passing access list 3 will be accepted from 192.168.12.10. router bgp 200 neighbor 192.168.12.10 remote-as 100 neighbor 192.168.12.10 filter-list 1 out neighbor 192.168.12.10 filter-list 2 in exit ip as-path access-list 1 permit _109_ ip as-path access-list 2 permit _200$ ip as-path access-list 2 permit ^100$ ip as-path access-list 3 deny _690$ ip as-path access-list 3 permit .* Example: Filtering Traffic with AS-path Filters Using 4-Byte Autonomous System Numbers Asplain Default Format in Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)SXI1, and Later Releases The following example is available in Cisco IOSRelease 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, and later releases and shows BGP path filtering by neighbor using 4-byte autonomous system numbers in asplain format. Only the routes that pass autonomous system path access list 2 will be sent to 192.168.3.2. ip as-path access-list 2 permit ^65536$ router bgp 65538 address-family ipv4 unicast neighbor 192.168.3.2 remote-as 65550 neighbor 192.168.3.2 activate neighbor 192.168.3.2 filter-list 2 in end Asdot Default Format in Cisco IOS Release 12.0(32)S12, and 12.4(24)T The following example available in Cisco IOS Release 12.0(32)S12, 12.4(24)T, and later releases shows BGP path filtering by neighbor using 4-byte autonomous system numbers in asdot format. Only the routes that pass autonomous system path access list 2 will be sent to 192.168.3.2. In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, and later releases, this example works if you have configured asdot as the default display format using the bgp asnotation dot command. Note ip as-path access-list 2 permit ^1\.0$ router bgp 1.2 address-family ipv4 unicast neighbor 192.168.3.2 remote-as 1.14 neighbor 192.168.3.2 filter-list 2 in end Example: Filtering Traffic Using Extended Community Lists with 4-Byte Autonomous System Numbers Asplain Default Format in Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)SXI1, and Later Releases The following example shows how to filter traffic by creating an extended BGP community list to control outbound routes. In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SRE, 12.2(33)XNE, 12.2(33)SXI1, and later releases, extended BGP communities support 4-byte autonomous system numbers in the regular expressions in asplain by default. Extended community attributes are used to configure, filter, and identify routes for VRF instances and MPLS VPNs. The ip extcommunity-listcommand is used to configure named or numbered extended community lists. All of the standard rules of access lists apply to the configuration of extended community lists. Regular expressions are supported by the expanded range of extended community list numbers. Figure 33: BGP Topology for Filtering Traffic Using Extended Community Lists with 4-Byte Autonomous System Numbers in Asplain Format A sequence number is applied to all extended community list entries by default regardless of the configuration mode. Explicit sequencing and resequencing of extended community list entries can be configured only in IP extended community-list configuration mode and not in global configuration mode. Note In this exam the figure above is configured with an extended named community list to specify that the BGP peer at 192.1681.2 is not sent advertisements about any path through or from the 4-byte autonomous system 65550. The IP extended community-list configuration mode is used, and the ability to resequence entries is shown. ip extcommunity-list expanded DENY65550 10 deny _65550_ 20 deny ^65550 .* resequence 50 100 exit router bgp 65538 network 172.17.1.0 mask 255.255.255.0 address-family ipv4 unicast neighbor 192.168.3.2 remote-as 65550 neighbor 192.168.1.2 remote-as 65536 neighbor 192.168.3.2 activate neighbor 192.168.1.2 activate end show ip extcommunity-list DENY65550 Asdot Default Format in Cisco IOS Release 12.0(32)S12, and 12.4(24)T The following example shows how to filter traffic by creating an extended BGP community list to control outbound routes. In Cisco IOS Release 12.0(32)S12, 12.4(24)T, and later releases, extended BGP communities support 4-byte autonomous system numbers in the regular expressions in asdot format only. Extended community attributes are used to configure, filter, and identify routes for VRF instances and MPLS VPNs. The ip extcommunity-listcommand is used to configure named or numbered extended community lists. All of the standard rules of access lists apply to the configuration of extended community lists. Regular expressions are supported by the expanded range of extended community list numbers. In Cisco IOS Release 12.0(32)SY8, 12.0(33)S3, 12.2(33)SXI1, and later releases, this example works if you have configured asdot as the default display format using the bgp asnotation dot command. Note Figure 34: BGP Topology for Filtering Traffic Using Extended Community Lists with 4-Byte Autonomous System Numbers in Asdot Format A sequence number is applied to all extended community list entries by default regardless of the configuration mode. Explicit sequencing and resequencing of extended community list entries can be configured only in IP extended community-list configuration mode and not in global configuration mode. Note In this exam the figure above is configured with an extended named community list to specify that the BGP peer at 192.1681.2 is not sent advertisements about any path through or from the 4-byte autonomous system 65550. The IP extended community-list configuration mode is used, and the ability to resequence entries is shown. ip extcommunity-list expanded DENY114 10 deny _1\.14_ 20 deny ^1\.14 .* resequence 50 100 exit router bgp 1.2 network 172.17.1.0 mask 255.255.255.0 address-family ipv4 unicast neighbor 192.168.3.2 remote-as 1.14 neighbor 192.168.1.2 remote-as 1.0 neighbor 192.168.3.2 activate neighbor 192.168.1.2 activate end show ip extcommunity-list DENY114 Example: Filtering Traffic Using a BGP Route Map The following example shows how to use an address family to configure BGP so that any unicast and multicast routes from neighbor 10.1.1.1 are accepted if they match access list 1: route-map filter-some-multicast match ip address 1 exit router bgp 65538 neighbor 10.1.1.1 remote-as 65537 address-family ipv4 unicast neighbor 10.1.1.1 activate neighbor 10.1.1.1 route-map filter-some-multicast in exit exit router bgp 65538 neighbor 10.1.1.1 remote-as 65537 address-family ipv4 multicast neighbor 10.1.1.1 activate neighbor 10.1.1.1 route-map filter-some-multicast in end Where to Go Next To configure advanced BGP feature tasks, proceed to the “Configuring Advanced BGP Features” module. To configure BGP neighbor session options, proceed to the “Configuring BGPNeighbor Session Options” module. To configure internal BGP tasks, proceed to the “Configuring Internal BGP Features” module. Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands: complete command syntax, commandmode, defaults, command history, usage guidelines, and examples “Cisco BGP Overview” moduleBGP overview “Configuring a Basic BGP Network” moduleConfiguring basic BGP tasks Large-Scale IP Network Solutions, Khalid Raza andMark Turner, Cisco Press, 2000 BGP fundamentals and description Document TitleRelated Topic Building Scalable Cisco Networks, Catherine Paquet and Diane Teare, Cisco Press, 2001 Implementing and controlling BGP in scalable networks Internet Routing Architectures, Bassam Halabi, Cisco Press, 1997 Interdomain routing basics Standards TitleStandard MDTSAFIMDTSAFI MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs CISCO-BGP4-MIB RFCs TitleRFC Application of the Border Gateway Protocol in the InternetRFC1772 Experience with the BGP ProtocolRFC1773 BGP-4 Protocol AnalysisRFC1774 Guidelines for Creation, Selection, and Registration of an Autonomous System (AS)RFC1930 A Framework for Inter-Domain Route AggregationRFC2519 Multiprotocol Extensions for BGP-4RFC2858 Route Refresh Capability for BGP-4RFC2918 Capabilities Advertisement with BGP-4RFC3392 A Border Gateway Protocol 4 (BGP-4)RFC4271 Constrained Route Distribution for Border Gateway Protocol/MultiProtocol Label Switching (BGP/MPLS) Internet Protocol (IP) Virtual Private Networks (VPNs) RFC4684 BGP Support for Four-Octet AS Number SpaceRFC4893 Outbound Route Filtering Capability for BGP-4RFC5291 Textual Representation of Autonomous system (AS) NumbersRFC5396 TitleRFC Autonomous System (AS) Number Reservation for Documentation UseRFC5398 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for Connecting to a Service Provider Using External BGP The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 28: Feature Information for Connecting to a Service Provider Using External BGP Feature Configuration InformationReleasesFeature Name The BGP Increased Support of Numbered AS-Path Access Lists to 500 feature increases the maximum number of autonomous systems access lists that can be configured using the ip as-path access-list command from 199 to 500. 12.0(22)S 12.2(15)T 12.2(18)S 12.2(18)SXD 12.2(27)SBC 15.0(1)S BGP Increased Support of Numbered AS-Path Access Lists to 500 Feature Configuration InformationReleasesFeature Name The BGPNamed Community Lists feature introduces a new type of community list called the named community list. The BGP Named Community Lists feature allows the network operator to assign meaningful names to community lists and increases the number of community lists that can be configured. A named community list can be configured with regular expressions and with numbered community lists. All rules of numbered communities apply to named community lists except that there is no limitation on the number of community attributes that can be configured for a named community list. 12.2(8)T 12.2(14)S 15.0(1)S BGP Named Community Lists The BGP Route-Map Policy List Support feature introduces new functionality to BGP route maps. This feature adds the capability for a network operator to group route map match clauses into named lists called policy lists. A policy list functions like a macro. When a policy list is referenced in a route map, all of the match clauses are evaluated and processed as if they had been configured directly in the route map. This enhancement simplifies the configuration of BGP routing policy in medium-size and large networks because a network operator can preconfigure policy lists with groups of match clauses and then reference these policy lists within different route maps. The network operator no longer needs to manually reconfigure each recurring group of match clauses that occur in multiple route map entries. 12.0(22)S 12.2(15)T 12.2(18)S 12.2(18)SXD 12.2(27)SBC 15.0(1)S BGP Route-Map Policy List Support The BGP Support for Named Extended Community Lists feature introduces the ability to configure extended community lists using names in addition to the existing numbered format. 12.2(25)S 12.2(27)SBC 12.2(33)SRA 12.2(33)SXH 12.3(11)T 15.0(1)S BGP Support for Named Extended Community Lists The BGP Support for Sequenced Entries in Extended Community Lists feature introduces automatic sequencing of individual entries in BGP extended community lists. This feature also introduces the ability to remove or resequence extended community list entries without deleting the entire existing extended community list. 12.2(25)S 12.2(27)SBC 12.2(33)SRA 12.2(33)SXH 12.3(11)T 15.0(1)S BGP Support for Sequenced Entries in Extended Community Lists Cisco IOS XE 3.1.0SGBGP 4 Prefix Filter and Inbound Route Maps C H A P T E R 13 BGP Route-Map Continue The BGP Route-Map Continue feature introduces the continue clause to BGP route-map configuration. The continue clause allows for more programmable policy configuration and route filtering and introduces the capability to execute additional entries in a route map after an entry is executed with successful match and set clauses. Continue clauses allow the network operator to configure and organize more modular policy definitions so that specific policy configuration need not be repeated within the same route map. Finding Feature Information, on page 337 Information About BGP Route Map Continue, on page 337 How to Filter Traffic Using Continue Clauses in a BGP Route Map, on page 339 Configuration Examples for BGP Route Map Continue, on page 342 Additional References, on page 344 Feature Information for BGP Route Map Continue, on page 344 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP Route Map Continue BGP Route Map with a Continue Clause In BGP route-map configuration, the continue clause allows for more programmable policy configuration and route filtering and introduced the capability to execute additional entries in a route map after an entry is executed with successful match and set clauses. Continue clauses allow you to configure and organize more modular policy definitions so that specific policy configurations need not be repeated within the same route map. Before the continue clause was introduced, route-map configuration was linear and did not allow any control over the flow of a route map. Route Map Operation Without Continue Clauses A route map evaluates match clauses until a successful match occurs. After the match occurs, the route map stops evaluating match clauses and starts executing set clauses, in the order in which they were configured. If a successful match does not occur, the route map “falls through” and evaluates the next sequence number of the route map until all configured route map entries have been evaluated or a successful match occurs. Each route map sequence is tagged with a sequence number to identify the entry. Route map entries are evaluated in order starting with the lowest sequence number and ending with the highest sequence number. If the route map contains only set clauses, the set clauses will be executed automatically, and the route map will not evaluate any other route map entries. Route Map Operation with Continue Clauses When a continue clause is configured, the route map will continue to evaluate and execute match clauses in the specified route map entry after a successful match occurs. The continue clause can be configured to go to (jump to) a specific route map entry by specifying the sequence number, or if a sequence number is not specified, the continue clause will go to the next sequence number. This behavior is called an “implied continue.” If a match clause exists, the continue clause is executed only if a match occurs. If no successful matches occur, the continue clause is ignored. Match Operations with Continue Clauses If a match clause does not exist in the route map entry but a continue clause does, the continue clause will be automatically executed and go to the specified route map entry. If a match clause exists in a route map entry, the continue clause is executed only when a successful match occurs. When a successful match occurs and a continue clause exists, the route map executes the set clauses and then goes to the specified route map entry. If the next route map entry contains a continue clause, the route map will execute the continue clause if a successful match occurs. If a continue clause does not exist in the next route map entry, the route map will be evaluated normally. If a continue clause exists in the next route map entry but a match does not occur, the route map will not continue and will “fall through” to the next sequence number if one exists. If the number of community lists in a match community clause within a route map exceed 256 characters in a line, you must nvgen multiple match community statements in a new line. Note Set Operations with Continue Clauses Set clauses are saved during thematch clause evaluation process and are executed after the route-map evaluation is completed. The set clauses are evaluated and executed in the order in which they were configured. Set clauses are executed only after a successful match occurs, unless the route map does not contain a match clause. The continue statement proceeds to the specified route map entry only after configured set actions are performed. If a set action occurs in the first route map and then the same set action occurs again, with a different value, in a subsequent route map entry, the last set action may override any previous set actions that were configured with the same set command unless the set command permits more than one value. For example, the set as-path prepend command permits more than one autonomous system number to be configured. A continue clause can be executed, without a successful match, if a route map entry does not contain a match clause. Note Route maps have a linear behavior, not a nested behavior. Once a route is matched in a route map permit entry with a continue command clause, it will not be processed by the implicit deny at the end of the route-map. For an example, see the “Examples: Filtering Traffic Using Continue Clauses in a BGP Route Map” section. Note How to Filter Traffic Using Continue Clauses in a BGP Route Map Filtering Traffic Using Continue Clauses in a BGP Route Map Perform this task to filter traffic using continue clauses in a BGP route map. Continue clauses can go only to a higher route map entry (a route map entry with a higher sequence number) and cannot go to a lower route map entry. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number 5. neighbor {ip-address| peer-group-name} route-map map-name {in | out} 6. exit 7. route-map map-name {permit | deny} [sequence-number] 8. match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] 9. set community community-number [additive] [well-known-community] | none} 10. continue [sequence-number] 11. end 12. show route-map [map-name] DETAILED STEPS PurposeCommand or Action Enables higher privilege levels, such as privileged EXEC mode. enable Example: Step 1 Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 PurposeCommand or Action Device# configure terminal Enters router configuration mode, and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 50000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number Example: Step 4 Device(config-router)# neighbor 10.0.0.1 remote-as 50000 Applies the inbound route map to routes received from the specified neighbor, or applies an outbound route map to routes advertised to the specified neighbor. neighbor {ip-address| peer-group-name} route-map map-name {in | out} Example: Step 5 Device(config-router)# neighbor 10.0.0.1 route-map ROUTE-MAP-NAME in Exits router configuration mode and enters global configuration mode. exit Example: Step 6 Device(config-router)# exit Enters route-map configurationmode to create or configure a route map. route-map map-name {permit | deny} [sequence-number] Example: Step 7 Device(config)# route-map ROUTE-MAP-NAME permit 10 Configures amatch command that specifies the conditions under which policy routing and route filtering occur. match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] Step 8 Example: Multiplematch commands can be configured. If a match command is configured, a match must occur Device(config-route-map)# match ip address 1 in order for the continue statement to be executed. If amatch command is not configured, set and continue clauses will be executed. Thematch and set commands used in this task are examples that are used to help describe the operation of the continue command. For a list of specificmatch and set commands, see the continue command in the Cisco IOS IP Routing: BGP Command Reference. Note PurposeCommand or Action Configures a set command that specifies the routing action to perform if the criteria enforced by thematch commands are met. set community community-number [additive] [well-known-community] | none} Example: Step 9 Multiple set commands can be configured. Device(config-route-map)# set community 10:1 In this example, a clause is created to set the specified community. Configures a route map to continue to evaluate and execute match statements after a successful match occurs. continue [sequence-number] Example: Step 10 If a sequence number is configured, the continue clause will go to the route map with the specified sequence number. Device(config-route-map)# continue If no sequence number is specified, the continue clause will go to the route map with the next sequence number. This behavior is called an “implied continue.” Continue clauses in outbound route maps are supported in Cisco IOS XE Release 2.1 and later releases. Note Exits route-map configuration mode and enters privileged EXEC mode. end Example: Step 11 Device(config-route-map)# end (Optional) Displays locally configured route maps. The name of the route map can be specified in the syntax of this command to filter the output. show route-map [map-name] Example: Device# show route-map Step 12 Examples The following sample output shows how to verify the configuration of continue clauses using the show route-map command. The output displays configured route maps including the match, set, and continue clauses. Device# show route-map route-map MARKETING, permit, sequence 10 Match clauses: ip address (access-lists): 1 metric 10 Continue: sequence 40 Set clauses: as-path prepend 10 Policy routing matches: 0 packets, 0 bytes route-map MARKETING, permit, sequence 20 Match clauses: ip address (access-lists): 2 metric 20 Set clauses: as-path prepend 10 10 Policy routing matches: 0 packets, 0 bytes route-map MARKETING, permit, sequence 30 Match clauses: Continue: to next entry 40 Set clauses: as-path prepend 10 10 10 Policy routing matches: 0 packets, 0 bytes route-map MARKETING, permit, sequence 40 Match clauses: community (community-list filter): 10:1 Set clauses: local-preference 104 Policy routing matches: 0 packets, 0 bytes route-map MKTG-POLICY-MAP, permit, sequence 10 Match clauses: Set clauses: community 655370 Policy routing matches: 0 packets, 0 bytes Configuration Examples for BGP Route Map Continue Examples: Filtering Traffic Using Continue Clauses in a BGP Route Map The following example shows continue clause configuration in a route map sequence. Continue clauses in outbound route maps are supported only in Cisco IOS Release 12.0(31)S, 12.2(33)SB, 12.2(33)SRB, 12.2(33)SXI, 12.4(4)T, and later releases. Note The first continue clause in route map entry 10 indicates that the route map will go to route map entry 30 if a successful matches occurs. If a match does not occur, the route map will “fall through” to route map entry 20. If a successful match occurs in route map entry 20, the set action will be executed and the route map will not evaluate any additional route map entries. Only the first successfulmatch ip address clause is supported. If a successful match does not occur in route map entry 20, the route map will fall through to route map entry 30. This sequence does not contain a match clause, so the set clause will be automatically executed and the continue clause will go to the next route map entry because a sequence number is not specified. If there are no successful matches, the route map will fall through to route map entry 30 and execute the set clause. A sequence number is not specified for the continue clause, so route map entry 40 will be evaluated. There are two behaviors that can occur when the same set command is repeated in subsequent continue clause entries. For set commands that configure an additive or accumulative value (for example, set community additive, set extended community additive, and set as-path prepend), subsequent values are added by subsequent entries. The following example illustrates this behavior. After each set of match clauses, a set as-path prepend command is configured to add an autonomous system number to the as-path. After a match occurs, the route map stops evaluating match clauses and starts executing the set clauses, in the order in which they were configured. Depending on how many successful match clauses occur, the as-path is prepended by one, two, or three autonomous system numbers. route-map ROUTE-MAP-NAME permit 10 match ip address 1 match metric 10 set as-path prepend 10 continue 30 ! route-map ROUTE-MAP-NAME permit 20 match ip address 2 match metric 20 set as-path prepend 10 10 ! route-map ROUTE-MAP-NAME permit 30 set as-path prepend 10 10 10 continue ! route-map ROUTE-MAP-NAME permit 40 match community 10:1 set local-preference 104 In this example, the same set command is repeated in subsequent continue clause entries, but the behavior is different from the first example. For set commands that configure an absolute value, the value from the last instance will overwrite the previous value(s). The following example illustrates this behavior. The set clause value in sequence 20 overwrites the set clause value from sequence 10. The next hop for prefixes from the 172.16/16 network is set to 10.2.2.2, not 10.1.1.1. ip prefix-list 1 permit 172.16.0.0/16 ip prefix-list 2 permit 192.168.1.0/24 route-map RED permit 10 match ip address prefix-list 1 set ip next hop 10.1.1.1 continue 20 exit route-map RED permit 20 match ip address prefix-list 2 set ip next hop 10.2.2.2 end Route maps have a linear behavior and not a nested behavior. Once a route is matched in a route map permit entry with a continue command clause, it will not be processed by the implicit deny at the end of the route-map. The following example illustrates this case. Note In the following example, when routes match an as-path of 10, 20, or 30, the routes are permitted and the continue clause jumps over the explicit deny clause to process the match ip address prefix list. If a match occurs here, the route metric is set to 100. Only routes that do not match an as-path of 10, 20, or 30 and do match a community number of 30 are denied. To deny other routes, you must configure an explicit deny statement. route-map test permit 10 match as-path 10 20 30 continue 30 exit route-map test deny 20 match community 30 exit route-map test permit 30 match ip address prefix-list 1 set metric 100 exit Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IP Routing: BGP Command Reference BGP commands Standards and RFCs TitleStandard/RFC Route Refresh Capability for BGP-4RFC 2918 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP Route Map Continue The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 29: Feature Information for BGP Route Map Continue Feature InformationReleasesFeature Name The BGP Route Map Continue feature introduces the continue clause to BGP route map configuration. The continue clause allows for more programmable policy configuration and route filtering and introduces the capability to execute additional entries in a route map after an entry is executed with successful match and set clauses. Continue clauses allow the network operator to configure and organize more modular policy definitions so that specific policy configuration need not be repeated within the same route map. This feature was introduced on the Cisco ASR 1000 Series Routers. 12.2(27)SBC Cisco IOS XE Release 2.1 BGP Route Map Continue C H A P T E R 14 BGP Route-Map Continue Support for Outbound Policy The BGPRoute-Map Continue Support for an Outbound Policy feature introduces support for continue clauses to be applied to outbound route maps. Finding Feature Information, on page 347 Iinformation About BGP Route-Map Continue Support for Outbound Policy, on page 347 How to Filter Traffic Using Continue Clauses in a BGP Route Map, on page 349 Configuration Examples for BGP Route-Map Continue Support for Outbound Policy, on page 353 Additional References, on page 354 Feature Information for BGP Route-Map Continue Support for Outbound Policy, on page 355 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Iinformation About BGP Route-Map Continue Support for Outbound Policy BGP Route Map with a Continue Clause Subsequent to the Cisco implementation of route maps, the continue clause was introduced into BGP route map configuration. The continue clause allows for more programmable policy configuration and route filtering. The continue clause introduces the ability to execute additional entries in a route map after an entry is executed with successful match and set clauses. Continue clauses allow you to configure and organize more modular policy definitions so that specific policy configurations need not be repeated within the same route map. Before the continue clause was introduced, route map configuration was linear and did not allow any control over the flow of a route map. Route Map Operation Without Continue Clauses A route map evaluates match clauses until a successful match occurs. After the match occurs, the route map stops evaluating match clauses and starts executing set clauses, in the order in which they were configured. If a successful match does not occur, the route map “falls through” and evaluates the next sequence number of the route map until all configured route map entries have been evaluated or a successful match occurs. Each route map sequence is tagged with a sequence number to identify the entry. Route map entries are evaluated in order starting with the lowest sequence number and ending with the highest sequence number. If the route map contains only set clauses, the set clauses will be executed automatically, and the route map will not evaluate any other route map entries. Route Map Operation with Continue Clauses When a continue clause is configured, the route map will continue to evaluate and execute match clauses in the specified route map entry after a successful match occurs. The continue clause can be configured to go to (jump to) a specific route map entry by specifying the sequence number, or if a sequence number is not specified, the continue clause will go to the next sequence number. This behavior is called an “implied continue.” If a match clause exists, the continue clause is executed only if a match occurs. If no successful matches occur, the continue clause is ignored. Match Operations with Continue Clauses If a match clause does not exist in the route map entry but a continue clause does, the continue clause will be automatically executed and go to the specified route map entry. If a match clause exists in a route map entry, the continue clause is executed only when a successful match occurs. When a successful match occurs and a continue clause exists, the route map executes the set clauses and then goes to the specified route map entry. If the next route map entry contains a continue clause, the route map will execute the continue clause if a successful match occurs. If a continue clause does not exist in the next route map entry, the route map will be evaluated normally. If a continue clause exists in the next route map entry but a match does not occur, the route map will not continue and will “fall through” to the next sequence number if one exists. If the number of community lists in a match community clause within a route map exceed 256 characters in a line, you must nvgen multiple match community statements in a new line. Note Set Operations with Continue Clauses Set clauses are saved during thematch clause evaluation process and are executed after the route-map evaluation is completed. The set clauses are evaluated and executed in the order in which they were configured. Set clauses are executed only after a successful match occurs, unless the route map does not contain a match clause. The continue statement proceeds to the specified route map entry only after configured set actions are performed. If a set action occurs in the first route map and then the same set action occurs again, with a different value, in a subsequent route map entry, the last set action may override any previous set actions that were configured with the same set command unless the set command permits more than one value. For example, the set as-path prepend command permits more than one autonomous system number to be configured. A continue clause can be executed, without a successful match, if a route map entry does not contain a match clause. Note Route maps have a linear behavior, not a nested behavior. Once a route is matched in a route map permit entry with a continue command clause, it will not be processed by the implicit deny at the end of the route-map. For an example, see the “Examples: Filtering Traffic Using Continue Clauses in a BGP Route Map” section. Note How to Filter Traffic Using Continue Clauses in a BGP Route Map Filtering Traffic Using Continue Clauses in a BGP Route Map SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. address-family ipv4 [unicast |multicast | vrf vrf-name] 6. neighbor {ip-address | peer-group-name} route-map map-name {in | out} 7. exit 8. exit 9. route-map map-name {permit | deny} [sequence-number] 10. match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] 11. set community { { [community-number] [well-known-community] [additive]} | none} 12. continue [sequence-number] 13. end 14. show route-map [map-name] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 PurposeCommand or Action Device# configure terminal Enters router configuration mode, and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 50000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local device. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 Device(config-router)# neighbor 10.0.0.1 remote-as 50000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 5 The unicast keyword specifies the IPv4 unicast address family. By default, the device is placed inDevice(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Applies the inbound route map to routes received from the specified neighbor, or applies an outbound route map to routes advertised to the specified neighbor. neighbor {ip-address | peer-group-name} route-map map-name {in | out} Example: Step 6 Device(config-router-af)# neighbor 10.0.0.1 route-map ROUTE-MAP-NAME in Exits address family configuration mode and enters router configuration mode. exit Example: Step 7 Device(config-router-af)# exit Exits router configuration mode and enters global configuration mode. exit Example: Step 8 Device(config-router)# exit PurposeCommand or Action Enters route-map configurationmode to create or configure a route map. route-map map-name {permit | deny} [sequence-number] Example: Step 9 Device(config)# route-map ROUTE-MAP-NAME permit 10 Configures amatch command that specifies the conditions under which policy routing and route filtering occur. match ip address {access-list-number | access-list-name} [... access-list-number | ... access-list-name] Step 10 Example: Multiplematch commands can be configured. If a match command is configured, a match must occur Device(config-route-map)# match ip address 1 in order for the continue statement to be executed. If amatch command is not configured, set and continue clauses will be executed. Thematch and set commands used in this task are examples that are used to help describe the operation of the continue command. For a list of specificmatch and set commands, see the continue command in the Cisco IOS IP Routing: BGP Command Reference. Note Configures a set command that specifies the routing action to perform if the criteria enforced by thematch commands are met. set community { { [community-number] [well-known-community] [additive]} | none} Example: Step 11 Multiple set commands can be configured. Device(config-route-map)# set community 10:1 In this example, a clause is created to set the specified community number in aa:nn format. Configures a route map to continue to evaluate and execute match statements after a successful match occurs. continue [sequence-number] Example: Step 12 If a sequence number is configured, the continue clause will go to the route map with the specified sequence number. Device(config-route-map)# continue If no sequence number is specified, the continue clause will go to the route map with the next sequence number. This behavior is called an “implied continue.” Exits route-map configuration mode and enters privileged EXEC mode. end Example: Step 13 Device(config-route-map)# end PurposeCommand or Action (Optional) Displays locally configured route maps. The name of the route map can be specified in the syntax of this command to filter the output. show route-map [map-name] Example: Device# show route-map Step 14 Examples The following sample output shows how to verify the configuration of continue clauses using the show route-map command. The output displays configured route maps including the match, set, and continue clauses. Device# show route-map route-map MARKETING, permit, sequence 10 Match clauses: ip address (access-lists): 1 metric 10 Continue: sequence 40 Set clauses: as-path prepend 10 Policy routing matches: 0 packets, 0 bytes route-map MARKETING, permit, sequence 20 Match clauses: ip address (access-lists): 2 metric 20 Set clauses: as-path prepend 10 10 Policy routing matches: 0 packets, 0 bytes route-map MARKETING, permit, sequence 30 Match clauses: Continue: to next entry 40 Set clauses: as-path prepend 10 10 10 Policy routing matches: 0 packets, 0 bytes route-map MARKETING, permit, sequence 40 Match clauses: community (community-list filter): 10:1 Set clauses: local-preference 104 Policy routing matches: 0 packets, 0 bytes route-map MKTG-POLICY-MAP, permit, sequence 10 Match clauses: Set clauses: community 655370 Policy routing matches: 0 packets, 0 bytes Configuration Examples for BGP Route-Map Continue Support for Outbound Policy Examples: Filtering Traffic Using Continue Clauses in a BGP Route Map The following example shows continue clause configuration in a route map sequence. The first continue clause in route map entry 10 indicates that the route map will go to route map entry 30 if a successful matches occurs. If a match does not occur, the route map will “fall through” to route map entry 20. If a successful match occurs in route map entry 20, the set action will be executed and the route map will not evaluate any additional route map entries. Only the first successful match ip address clause is supported. If a successful match does not occur in route map entry 20, the route map will fall through to route map entry 30. This sequence does not contain a match clause, so the set clause will be automatically executed and the continue clause will go to the next route map entry because a sequence number is not specified. If there are no successful matches, the route map will fall through to route map entry 30 and execute the set clause. A sequence number is not specified for the continue clause, so route map entry 40 will be evaluated. There are two behaviors that can occur when the same set command is repeated in subsequent continue clause entries. For set commands that configure an additive or accumulative value (for example, set community additive, set extended community additive, and set as-path prepend), subsequent values are added by subsequent entries. The following example illustrates this behavior. After each set of match clauses, a set as-path prepend command is configured to add an autonomous system number to the as-path. After a match occurs, the route map stops evaluating match clauses and starts executing the set clauses, in the order in which they were configured. Depending on the number of successful match clauses, the as-path is prepended by one, two, or three autonomous system numbers. route-map ROUTE-MAP-NAME permit 10 match ip address 1 match metric 10 set as-path prepend 10 continue 30 ! route-map ROUTE-MAP-NAME permit 20 match ip address 2 match metric 20 set as-path prepend 10 10 ! route-map ROUTE-MAP-NAME permit 30 set as-path prepend 10 10 10 continue ! route-map ROUTE-MAP-NAME permit 40 match community 10:1 set local-preference 104 In this example, the same set command is repeated in subsequent continue clause entries but the behavior is different from the first example. For set commands that configure an absolute value, the value from the last instance will overwrite the previous value(s). The following example illustrates this behavior. The set clause value in sequence 20 overwrites the set clause value from sequence 10. The next hop for prefixes from the 172.16/16 network is set to 10.2.2.2 and not 10.1.1.1. ip prefix-list 1 permit 172.16.0.0/16 ip prefix-list 2 permit 192.168.1.0/24 route-map RED permit 10 match ip address prefix-list 1 set ip next hop 10.1.1.1 continue 20 exit route-map RED permit 20 match ip address prefix-list 2 set ip next hop 10.2.2.2 end Route maps have a linear behavior, not a nested behavior. Once a route is matched in a route map permit entry with a continue command clause, it will not be processed by the implicit deny at the end of the route map. The following example illustrates this case. Note In the following example, when routes match an AS-path of 10, 20, or 30, the routes are permitted and the continue clause jumps over the explicit deny clause to process the match ip address prefix-list command. If a match occurs here, the route metric is set to 100. Only routes that do not match an AS-path of 10, 20, or 30 and do match a community number of 30 are denied. To deny other routes, you must configure an explicit deny statement. route-map test permit 10 match as-path 10 20 30 continue 30 exit route-map test deny 20 match community 30 exit route-map test permit 30 match ip address prefix-list 1 set metric 100 exit Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IP Routing: BGP Command Reference BGP commands Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP Route-Map Continue Support for Outbound Policy The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 30: Feature Information for BGP Route-Map Continue Support for Outbound Policy Feature InformationReleasesFeature Name The BGP Route-Map Continue Support for an Outbound Policy feature introduces support for continue clauses to be applied to outbound route maps. This feature was introduced on the Cisco ASR 1000 Series Routers. 12.2(33)SB 12.2(33)SRB Cisco IOS XE Release 2.1 BGPRoute-Map Continue Support for Outbound Policy C H A P T E R 15 Removing Private AS Numbers from the AS Path in BGP Private autonomous system numbers (ASNs) are used by ISPs and customer networks to conserve globally unique AS numbers. Private AS numbers cannot be used to access the global Internet because they are not unique. AS numbers appear in eBGP AS paths in routing updates. Removing private ASNs from the AS path is necessary if you have been using private ASNs and you want to access the global Internet. Finding Feature Information, on page 357 Restrictions on Removing and Replacing Private ASNs from the AS Path, on page 357 Information About Removing and Replacing Private ASNs from the AS Path, on page 358 How to Remove and Replace Private ASNs from the AS Path, on page 359 Configuration Examples for Removing and Replacing Private ASNs from the AS Path, on page 362 Additional References, on page 365 Feature Information for Removing and Replacing Private ASNs from the AS Path, on page 366 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Restrictions on Removing and Replacing Private ASNs from the AS Path The feature applies to eBGP neighbors only. The feature applies to routers in a public AS only. The workaround to this restriction would be to apply the neighbor local-as command on a per-neighbor basis, with the local AS number being a public AS number. Information About Removing and Replacing Private ASNs from the AS Path Public and Private AS Numbers Public AS numbers are assigned by InterNIC and are globally unique. They range from 1 to 64511. Private AS numbers are used to conserve globally unique AS numbers, and they range from 64512 to 65535. Private AS numbers cannot be leaked to a global BGP routing table because they are not unique, and BGP best path calculations require unique AS numbers. Therefore, it might be necessary to remove private AS numbers from an AS path before the routes are propagated to a BGP peer. Benefit of Removing and Replacing Private ASNs from the AS Path External BGP requires that globally unique AS numbers be used when routing to the global Internet. Using private AS numbers (which are not unique) would prevent access to the global Internet. This feature allows routers that belong to a private AS to access the global Internet. A network administrator configures the routers to remove private AS numbers from the AS path contained in outgoing update messages and optionally, to replace those numbers with the ASN of the local router, so that the AS Path length remains unchanged. Former Restrictions to Removing Private ASNs from the AS Path The ability to remove private AS numbers from the AS path has been available for a long time. Prior to Cisco IOS XE Release 3.1S, this feature had the following restrictions: If the AS path included both private and public AS numbers, using the neighbor remove-private-as command would not remove the private AS numbers. If the AS path contained confederation segments, using the neighbor remove-private-as command would remove private AS numbers only if the private AS numbers followed the confederation portion of the autonomous path. If the AS path contained the AS number of the eBGP neighbor, the private AS numbers would not be removed. Enhancements to Removing Private ASNs from the AS Path The ability to remove and replace private AS numbers from the AS path is enhanced in the following ways: The neighbor remove-private-as command will remove private AS numbers from the AS path even if the path contains both public and private ASNs. The neighbor remove-private-as commandwill remove private AS numbers even if the AS path contains only private AS numbers. There is no likelihood of a 0-length AS path because this command can be applied to eBGP peers only, in which case the AS number of the local router is appended to the AS path. The neighbor remove-private-as command will remove private AS numbers even if the private ASNs appear before the confederation segments in the AS path. The replace-as keyword is available to replace the private AS numbers being removed from the path with the local AS number, thereby retaining the same AS path length. The feature can be applied to neighbors per address family (address family configurationmode). Therefore, you can apply the feature for a neighbor in one address family and not on another, affecting update messages on the outbound side for only the address family for which the feature is configured. The feature can be applied in peer group template mode. When the feature is configured, output from the show ip bgp update-group and show ip bgp neighbor commands indicates that private AS numbers were removed or replaced. How to Remove and Replace Private ASNs from the AS Path Removing and Replacing Private ASNs from the AS Path (Cisco IOS XE Release 3.1S and Later) To remove private AS numbers from the AS path on the outbound side of an eBGP neighbor, perform the following task. To also replace private AS numbers with the local router’s AS number, include the all replace-as keywords in Step 17. The examples in this task reflect the configuration for Router 2 in the scenario in the figure below. SUMMARY STEPS 1. enable 2. configure terminal 3. interface type number 4. ip address ip-address mask 5. exit 6. interface type number 7. ip address ip-address mask 8. exit 9. interface type number 10. ip address ip-address mask 11. exit 12. router bgp autonomous-system-number 13. network network-number 14. network network-number 15. neighbor {ip-address | ipv6-address[%]| peer-group-name} remote-as autonomous-system-number 16. neighbor {ip-address | ipv6-address[%]| peer-group-name} remote-as autonomous-system-number 17. neighbor {ip-address | peer-group-name} remove-private-as [all [replace-as]] 18. end 19. show ip bgp update-group 20. show ip bgp neighbors DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Configures an interface.interface type number Example: Step 3 Router(config)# interface gigabitethernet 0/0 Sets a primary or secondary IP address for an interface.ip address ip-address mask Example: Step 4 Router(config-if)# ip address 172.30.1.1 255.255.0.0 Returns to the next highest configuration mode.exit Example: Step 5 Router(config-if)# exit Configures an interface.interface type number Example: Step 6 Router(config)# interface serial 0/0 Sets a primary or secondary IP address for an interface.ip address ip-address mask Example: Step 7 Router(config-if)# ip address 172.16.0.2 255.255.255.0 Returns to the next highest configuration mode.exit Example: Step 8 Router(config-if)# exit Configures an interface.interface type number Example: Step 9 Router(config)# interface serial 1/0 PurposeCommand or Action Sets a primary or secondary IP address for an interface.ip address ip-address mask Example: Step 10 Router(config-if)# ip address 192.168.0.1 255.255.255.0 Returns to the next highest configuration mode.exit Example: Step 11 Router(config-if)# exit Specifies a BGP instance.router bgp autonomous-system-number Example: Step 12 Router(config)# router bgp 5 Specifies a network to be advertised by BGP.network network-number Example: Step 13 Router(config-router)# network 172.30.0.0 Specifies a network to be advertised by BGP.network network-number Example: Step 14 Router(config-router)# network 192.168.0.0 Adds an entry to the routing table.neighbor {ip-address | ipv6-address[%]| peer-group-name} remote-as autonomous-system-number Step 15 This example configures Router 3 as an eBGP neighbor in private AS 65000.Example: Router(config-router)# neighbor 172.16.0.1 remote-as 65000 Adds an entry to the routing table.neighbor {ip-address | ipv6-address[%]| peer-group-name} remote-as autonomous-system-number Step 16 This example configures Router 1 as an eBGP neighbor in public AS 1.Example: Router(config-router)# neighbor 192.168.0.2 remote-as 1 Removes private AS numbers from the AS Path in outgoing updates. neighbor {ip-address | peer-group-name} remove-private-as [all [replace-as]] Step 17 Example: This example removes the private AS numbers from the AS path in outgoing eBGP updates and replaces Router(config-router)# neighbor 192.168.0.2 remove-private-as all replace-as them with 5, which is the public AS number of the local router. PurposeCommand or Action Ends the current configuration mode and returns to privileged EXEC mode. end Example: Step 18 Router(config-router)# end (Optional) Displays information about BGP update groups.show ip bgp update-group Example: Step 19 Router# show ip bgp update-group (Optional) Displays information about BGP neighbors.show ip bgp neighbors Example: Step 20 Router# show ip bgp neighbors Configuration Examples for Removing and Replacing Private ASNs from the AS Path Example Removing Private ASNs (Cisco IOS XE Release 3.1S) In the example below, Router A has the neighbor remove-private-as command configured, which removes private AS numbers in updates sent to the neighbor at 172.30.0.7. The subsequent show command asks for information about the route to host 1.1.1.1. The output includes private AS numbers 65200, 65201, 65201 in the AS path of 1001 65200 65201 65201 1002 1003 1003. To prove that the private AS numbers were removed from the AS path, the show command on Router B also asks for information about the route to host 1.1.1.1. The output indicates a shorter AS path of 100 1001 1002 1003 1003, which excludes private AS numbers 65200, 65201, and 65201. The 100 prepended in the path is Router B’s own AS number. Router A router bgp 100 bgp log-neighbor-changes neighbor 19.0.101.1 remote-as 1001 neighbor 172.30.0.7 remote-as 200 neighbor 172.30.0.7 remove-private-as all no auto-summary RouterA# show ip bgp 1.1.1.1 BGP routing table entry for 1.1.1.1/32, version 2 Paths: (1 available, best #1, table default) Advertised to update-groups: 1 2 1001 65200 65201 65201 1002 1003 1003 19.0.101.1 from 19.0.101.1 (19.0.101.1) Origin IGP, localpref 100, valid, external, best RouterA# Router B (All Private ASNs Have Been Removed) RouterB# show ip bgp 1.1.1.1 BGP routing table entry for 1.1.1.1/32, version 3 Paths: (1 available, best #1, table default) Not advertised to any peer 100 1001 1002 1003 1003 172.30.0.6 from 172.30.0.6 (19.1.0.1) Origin IGP, localpref 100, valid, external, best RouterB# Example Removing and Replacing Private ASNs (Cisco IOS XE Release 3.1S) In the following example, when Router A sends prefixes to the peer 172.30.0.7, all private ASNs in the AS path are replaced with the router’s own ASN, which is 100. Router A router bgp 100 bgp log-neighbor-changes neighbor 172.16.101.1 remote-as 1001 neighbor 172.16.101.1 update-source Loopback0 neighbor 172.30.0.7 remote-as 200 neighbor 172.30.0.7 remove-private-as all replace-as no auto-summary Router A receives 1.1.1.1 from peer 172.16.101.1 which has some private ASNs (65200, 65201, and 65201) in the AS path list, as shown in the following output: RouterA# show ip bgp 1.1.1.1 BGP routing table entry for 1.1.1.1/32, version 2 Paths: (1 available, best #1, table default) Advertised to update-groups: 1 2 1001 65200 65201 65201 1002 1003 1003 172.16.101.1 from 172.16.101.1 (172.16.101.1) Origin IGP, localpref 100, valid, external, best RouterA# Because Router A is configured with neighbor 172.30.0.7 remove-private-as all replace-as, Router A sends prefix 1.1.1.1 with all private ASNs replaced with 100: Router B RouterB# show ip bgp 1.1.1.1 BGP routing table entry for 1.1.1.1/32, version 3 Paths: (1 available, best #1, table default) Not advertised to any peer 100 1001 100 100 100 1002 1003 1003 172.30.0.6 from 172.30.0.6 (192.168.1.2) Origin IGP, localpref 100, valid, external, best RouterB# Router B router bgp 200 bgp log-neighbor-changes neighbor 172.30.0.6 remote-as 100 no auto-summary Example Removing Private ASNs (Cisco IOS XE Release 2) In this example, Router 3 uses private ASN 65000. Router 1 and Router 2 use public ASNs AS 1 and AS 5 respectively. The figure below illustrates Router 2 belonging to a service provider, with Router 1 and Router 3 as its clients. Figure 35: Removing Private AS Numbers In this example, Router 2, belonging to the Service Provider, removes private AS numbers as follows. 1. Router 3 advertises the network 10.0.0.0/24 with the AS path attribute 65000 to Router 2. 2. Router 2 receives the update from Router 3 and makes an entry for the network 10.0.0.0/24 in its routing table with the next hop as 172.16.0.1 (serial interface S0 on Router 3). 3. Router 2 (service provider device), when configured with the neighbor 192.168.0.2 remove-private-as command, strips off the private AS number and constructs a new update packet with its own AS number as the AS path attribute for the 10.0.0.0/24 network and sends the packet to Router 1. 4. Router 1 receives the eBGP update for network 10.0.0.0/24 and makes an entry in its routing table with the next hop as 192.168.0.1 (serial interface S1 on Router 2). The AS path attribute for this network as seen on Router 1 is AS 5 (Router 2). Thus, the private AS numbers are prevented from entering the BGP tables of the Internet. The configurations of Router 3, Router 2, and Router 1 follow. Router 3 interface gigabitethernet 0/0 ip address 10.0.0.1 255.255.255.0 ! interface Serial 0 ip address 172.16.0.1 255.255.255.0 ! router bgp 65000 network 10.0.0.0 mask 255.255.255.0 neighbor 172.16.0.2 remote-as 5 !---Configures Router 2 as an eBGP neighbor in public AS 5. ! end Router 2 interface gigabitethernet 0/0 ip address 172.30.1.1 255.255.0.0 ! interface Serial 0 ip address 172.16.0.2 255.255.255.0 ! interface Serial 1 ip address 192.168.0.1 255.255.255.0 ! router bgp 5 network 172.30.0.0 network 192.168.0.0 neighbor 172.16.0.1 remote-as 65000 !---Configures Router 3 as an eBGP neighbor in private AS 65000. neighbor 192.168.0.2 remote-as 1 !---Configures Router 1 as an eBGP neighbor in public AS 1. neighbor 192.168.0.2 remove-private-as !---Removes the private AS numbers from outgoing eBGP updates. ! end Router 1 version 12.2 ! ! interface Serial 0 ip address 192.168.0.2 255.255.255.0 ! router bgp 1 neighbor 192.168.0.1 remote-as 5 !---Configures Router 2 as an eBGP neighbor in public AS 5. ! end Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Commands List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands Standards TitleStandard --None MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs None Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlThe Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies. To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds. Access to most tools on the Cisco Support website requires a Cisco.com user ID and password. Feature Information for Removing and Replacing Private ASNs from the AS Path The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 31: Feature Information for BGP--Remove/Replace Private AS Feature InformationReleasesFeature Name Private autonomous system (AS) numbers are used by ISPs and customer networks to conserve globally unique AS numbers. Private AS numbers cannot be used to access the globalInternet because they are not unique. AS numbers appear in eBGP AS paths in routing tables. Removing private AS numbers from the AS path is necessary if you have been using private AS numbers and you want to access the global Internet. The following command is modified: neighbor remove-private-as Cisco IOS XE Release 3.1S BGP--Remove/Replace Private AS Filter C H A P T E R 16 Configuring BGP Neighbor Session Options This module describes configuration tasks to configure various options involving Border Gateway Protocol (BGP) neighbor peer sessions. BGP is an interdomain routing protocol designed to provide loop-free routing between organizations. This module contains tasks that use BGP neighbor session commands to configure: Options to help an autonomous system migration TTL Security Check, a lightweight securitymechanism to protect External BGP (eBGP) peering sessions from CPU-utilization-based attacks Finding Feature Information, on page 369 Information About Configuring BGP Neighbor Session Options, on page 369 How to Configure BGP Neighbor Session Options, on page 373 Configuration Examples for BGP Neighbor Session Options, on page 392 Where to Go Next, on page 394 Additional References, on page 394 Feature Information for Configuring BGP Neighbor Session Options, on page 396 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About Configuring BGP Neighbor Session Options BGP Neighbor Sessions BGP is mainly used to connect a local network to an external network to gain access to the Internet or to connect to other organizations. A BGP-speaking router does not discover another BGP-speaking device automatically. A network administrator usually manually configures the relationships between BGP-speaking routers. A BGP neighbor device is a BGP-speaking router that has an active TCP connection to another BGP-speaking device. This relationship between BGP devices is often referred to as a peer instead of neighbor because a neighbor may imply the idea that the BGP devices are directly connected with no other router in between. Configuring BGP neighbor or peer sessions uses BGP neighbor session commands so this module uses the term “neighbor” over “peer.” BGP Support for Fast Peering Session Deactivation BGP Hold Timer By default, the BGP hold timer is set to run every 180 seconds in Cisco software. This timer value is set as the default to protect the BGP routing process from instability that can be caused by peering sessions with other routing protocols. BGP devices typically carry large routing tables, so frequent session resets are not desirable. BGP Fast Peering Session Deactivation BGP fast peering session deactivation improves BGP convergence and response time to adjacency changes with BGP neighbors. This feature is event driven and configured on a per-neighbor basis. When this feature is enabled, BGP will monitor the peering session with the specified neighbor. Adjacency changes are detected and terminated peering sessions are deactivated in between the default or configured BGP scanning interval. Selective Address Tracking for BGP Fast Session Deactivation In Cisco IOS Release 12.4(4)T, 12.2(31)SB, 12.2(33)SRB, and later releases, the BGP Selective Address Tracking feature introduced the use of a route map with BGP fast session deactivation. The route-map keyword and map-name argument are used with the neighbor fall-over BGP neighbor session command to determine if a peering session with a BGP neighbor should be reset when a route to the BGP peer changes. The route map is evaluated against the new route, and if a deny statement is returned, the peer session is reset. The route map is not used for session establishment. The neighbor fall-over command is not supported in Cisco IOS Release 15.0(1)SY. The route-map and map-name keyword-argument pair in the bgp nexthop command are not supported in Cisco IOS Release 15.0(1)SY. Note Onlymatch ip address andmatch source-protocol commands are supported in the route map. No set commands or othermatch commands are supported. Note BFD Support of BGP IPv6 Neighbors In Cisco IOS Release 15.1(2)S and later releases, Bidirectional Forwarding Detection (BFD) can be used to track fast forwarding path failure of BGP neighbors that have an IPv6 address. BFD is a detection protocol that is designed to provide fast forwarding path failure detection times for all media types, encapsulations, topologies, and routing protocols. BFD provides faster reconvergence time for BGP after a forwarding path failure. TTL Security Check for BGP Neighbor Sessions BGP Support for the TTL Security Check When implemented for BGP, the TTL Security Check feature introduces a lightweight security mechanism to protect eBGP neighbor sessions from CPU utilization-based attacks. These types of attacks are typically brute force Denial of Service (DoS) attacks that attempt to disable the network by flooding the network with IP packets that contain forged source and destination IP addresses. The TTL Security Check feature protects the eBGP neighbor session by comparing the value in the TTL field of received IP packets against a hop count that is configured locally for each eBGP neighbor session. If the value in the TTL field of the incoming IP packet is greater than or equal to the locally configured value, the IP packet is accepted and processed normally. If the TTL value in the IP packet is less than the locally configured value, the packet is silently discarded and no Internet Control Message Protocol (ICMP) message is generated. This is designed behavior; a response to a forged packet is unnecessary. Although it is possible to forge the TTL field in an IP packet header, accurately forging the TTL count to match the TTL count from a trusted peer is impossible unless the network to which the trusted peer belongs has been compromised. The TTL Security Check feature supports both directly connected neighbor sessions and multihop eBGP neighbor sessions. The BGP neighbor session is not affected by incoming packets that contain invalid TTL values. The BGP neighbor session will remain open, and the router will silently discard the invalid packet. The BGP session, however, can still expire if keepalive packets are not received before the session timer expires. TTL Security Check for BGP Neighbor Sessions The BGP Support for TTL Security Check feature is configured with the neighbor ttl-security command in router configuration mode or address family configuration mode. When this feature is enabled, BGP will establish or maintain a session only if the TTL value in the IP packet header is equal to or greater than the TTL value configured for the peering session. Enabling this feature secures the eBGP session in the incoming direction only and has no effect on outgoing IP packets or the remote router. The hop-count argument is used to configure the maximum number of hops that separate the two peers. The TTL value is determined by the router from the configured hop count. The value for this argument is a number from 1 to 254. TTL Security Check Support for Multihop BGP Neighbor Sessions The BGP Support for TTL Security Check feature supports both directly connected neighbor sessions and multihop neighbor sessions. When this feature is configured for a multihop neighbor session, the neighbor ebgp-multihop router configuration command cannot be configured and is not needed to establish the neighbor session. These commands are mutually exclusive, and only one command is required to establish a multihop neighbor session. If you attempt to configure both commands for the same peering session, an error message will be displayed in the console. To configure this feature for an existing multihop session, you must first disable the existing neighbor session with the no neighbor ebgp-multihop command. The multihop neighbor session will be restored when you enable this feature with the neighbor ttl-security command. This feature should be configured on each participating router. To maximize the effectiveness of this feature, the hop-count argument should be strictly configured to match the number of hops between the local and external network. However, you should also consider path variation when configuring this feature for a multihop neighbor session. Benefits of the BGP Support for TTL Security Check The BGP Support for TTL Security Check feature provides an effective and easy-to-deploy solution to protect eBGP neighbor sessions from CPU utilization-based attacks.When this feature is enabled, a host cannot attack a BGP session if the host is not a member of the local or remote BGP network or if the host is not directly connected to a network segment between the local and remote BGP networks. This solution greatly reduces the effectiveness of DoS attacks against a BGP autonomous system. BGP Support for TCP Path MTU Discovery per Session Path MTU Discovery The IP protocol family was designed to use a wide variety of transmission links. The maximum IP packet length is 65000 bytes. Most transmission links enforce a smaller maximum packet length limit, called the maximum transmission unit (MTU), which varies with the type of the transmission link. The design of IP accommodates link packet length limits by allowing intermediate routers to fragment IP packets as necessary for their outgoing links. The final destination of an IP packet is responsible for reassembling its fragments as necessary. All TCP sessions are bounded by a limit on the number of bytes that can be transported in a single packet, and this limit is known as the maximum segment size (MSS). TCP breaks up packets into chunks in a transmit queue before passing packets down to the IP layer. A smaller MSS may not be fragmented at an IP device along the path to the destination device, but smaller packets increase the amount of bandwidth needed to transport the packets. The maximum TCP packet length is determined by both the MTU of the outbound interface on the source device and theMSS announced by the destination device during the TCP setup process. PathMTU discovery (PMTUD) was developed as a solution to the problem of finding the optimal TCP packet length. PMTUD is an optimization (detailed in RFC 1191) wherein a TCP connection attempts to send the longest packets that will not be fragmented along the path from source to destination. It does this by using a flag, don’t fragment (DF), in the IP packet. This flag is supposed to alter the behavior of an intermediate router that cannot send the packet across a link because it is too long. Normally the flag is off, and the router should fragment the packet and send the fragments. If a router tries to forward an IP datagram, with the DF bit set, to a link that has a lower MTU than the size of the packet, the router will drop the packet and return an ICMP Destination Unreachable message to the source of this IP datagram, with the code indicating "fragmentation needed and DF set." When the source device receives the ICMP message, it will lower the send MSS, and when TCP retransmits the segment, it will use the smaller segment size. BGP Neighbor Session TCP PMTUD TCP path MTU discovery is enabled by default for all BGP neighbor sessions, but there are situations when you may want to disable TCP path MTU discovery for one or all BGP neighbor sessions. Although PMTUD works well for larger transmission links (for example, Packet over Sonet links), a badly configured TCP implementation or a firewall may slow or stop the TCP connections from forwarding any packets. In this type of situation, you may need to disable TCP path MTU discovery. In Cisco software, configuration options were introduced to permit TCP path MTU discovery to be disabled, or subsequently reenabled, either for a single BGP neighbor session or for all BGP sessions. To disable the TCP path MTU discovery globally for all BGP neighbors, use the no bgp transport path-mtu-discovery command in router configuration mode. To disable the TCP path MTU discovery for a single neighbor, use the no neighbor transport path-mtu-discovery command in router configuration mode or address family configuration mode. For more details, see the “Disabling TCP Path MTU Discovery Globally for All BGP Sessions” section or the “Disabling TCP Path MTU Discovery for a Single BGP Neighbor” section. How to Configure BGP Neighbor Session Options Configuring Fast Session Deactivation The tasks in this section show how to configure BGP next-hop address tracking. BGP next-hop address tracking significantly improves the response time of BGP to next-hop changes in the RIB. However, unstable Interior Gateway Protocol (IGP) peers can introduce instability to BGP neighbor sessions. We recommend that you aggressively dampen unstable IGP peering sessions to reduce the possible impact to BGP. For more details about route dampening, see the "Configuring Internal BGP Features" module. Configuring Fast Session Deactivation for a BGP Neighbor Perform this task to establish a peering session with a BGP neighbor and then configure the peering session for fast session deactivation to improve the network convergence time if the peering session is deactivated. Enabling fast session deactivation for a BGP neighbor can significantly improve BGP convergence time. However, unstable IGP peers can still introduce instability to BGP neighbor sessions. We recommend that you aggressively dampen unstable IGP peering sessions to reduce the possible impact to BGP. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. Enter one of the following commands: address-family ipv4 [unicast [vrf vrf-name] | vrf vrf-name] address-family ipv6 [unicast [vrf vrf-name] | vrf vrf-name] 5. neighbor ip-address remote-as autonomous-system-number 6. neighbor ip-address fall-over 7. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable PurposeCommand or Action Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode to create or configure a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 50000 Enters address family configuration mode and enables IPv4 or IPv6 addressing. Perform this step when configuring fast session deactivation for a VRF address-family. Enter one of the following commands:Step 4 address-family ipv4 [unicast [vrf vrf-name] | vrf vrf-name] Step 4 is only required if you are configuring fast session deactivation on a VRF. If you are not configuring fast session deactivation on a VRF, skip this step and perform the following commands under router BGP mode (config-router) rather than address family configuration mode (config-router-af). Note• address-family ipv6 [unicast [vrf vrf-name] | vrf vrf-name] Example: Device(config-router)# address-family ipv4 unicast vrf blue Establishes a peering session with a BGP neighbor.neighbor ip-address remote-as autonomous-system-number Example: Step 5 Device(config-router-af)# neighbor 10.0.0.1 remote-as 50000 Configures the BGP peering to use fast session deactivation.neighbor ip-address fall-overStep 6 Example: BGP will remove all routes learned through this peer if the session is deactivated. Device(config-router-af)# neighbor 10.0.0.1 fall-over Exits address family configuration mode and enters privileged EXEC mode. end Example: Step 7 Device(config-router-af)# end Configuring Selective Address Tracking for Fast Session Deactivation Perform this task to configure selective address tracking for fast session deactivation. The optional route-map keyword and map-name argument of the neighbor fall-over command are used to determine if a peering session with a BGP neighbor should be deactivated (reset) when a route to the BGP peer changes. The route map is evaluated against the new route, and if a deny statement is returned, the peer session is reset. Onlymatch ip address andmatch source-protocol commands are supported in the route map. No set commands or othermatch commands are supported. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number 5. neighbor ip-address fall-over [route-map map-name] 6. exit 7. ip prefix-list list-name [seq seq-value ]{deny network / length | permit network / length} [ge ge-value] [le le-value] 8. route-map map-name [permit | deny] [sequence-number] 9. match ip address prefix-list prefix-list-name [prefix-list-name...] 10. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address | peer-group-name} remote-as autonomous-system-number Example: Step 4 Device(config-router)# neighbor 192.168.1.2 remote-as 40000 Applies a route map when a route to the BGP changes.neighbor ip-address fall-over [route-map map-name]Step 5 Example: PurposeCommand or Action Device(config-router)# neighbor 192.168.1.2 fall-over route-map CHECK-NBR In this example, the route map named CHECK-NBR is applied when the route to neighbor 192.168.1.2 changes. Exits router configuration mode and enters global configuration mode. exit Example: Step 6 Device(config-router)# exit Creates a prefix list for BGP next-hop route filtering.ip prefix-list list-name [seq seq-value ]{deny network / length | permit network / length} [ge ge-value] [le le-value] Step 7 Selective next-hop route filtering supports prefix-length matching or source-protocol matching on a per-address family basis.Example: Device(config)# ip prefix-list FILTER28 seq 5 permit 0.0.0.0/0 ge 28 The example creates a prefix list named FILTER28 that permits routes only if the mask length is greater than or equal to 28. Configures a route map and enters route-map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 8 Example: In this example, a route map named CHECK-NBR is created. If there is an IP address match in the Device(config)# route-map CHECK-NBR permit 10 followingmatch command, the IP address will be permitted. Matches the IP addresses in the specified prefix list.match ip address prefix-list prefix-list-name [prefix-list-name...] Step 9 Use the prefix-list-name argument to specify the name of a prefix list. The ellipsis means that more than one prefix list can be specified. Example: Device(config-route-map)# match ip address prefix-list FILTER28 Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Exits route-map configuration mode and enters privileged EXEC mode. end Example: Step 10 Device(config-route-map)# end What to Do Next After the peer policy template is created, the configuration of the peer policy template can be inherited or applied by another peer policy template. For details about peer policy inheritance, see the “Configuring Peer Policy Template Inheritance with the inherit peer-policy Command” section or the “Configuring Peer Policy Template Inheritance with the neighbor inherit peer-policy Command” section. Configuring BFD for BGP IPv6 Neighbors In Cisco IOS Release 15.1(2)S and later releases, Bidirectional Forwarding Detection (BFD) can be used for BGP neighbors that have an IPv6 address. Once it has been verified that BFD neighbors are up, the show bgp ipv6 unicast neighbors command will indicate that BFD is being used to detect fast fallover on the specified neighbor. SUMMARY STEPS 1. enable 2. configure terminal 3. ipv6 unicast-routing 4. ipv6 cef 5. interface type number 6. ipv6 address ipv6-address / prefix-length 7. bfd interval milliseconds min_rx milliseconds multiplier multiplier-value 8. no shutdown 9. exit 10. router bgp autonomous-system-number 11. no bgp default ipv4-unicast 12. address-family ipv6 [vrf vrf-name] [unicast |multicast | vpnv6] 13. neighbor ipv6-address remote-as autonomous-system-number 14. neighbor ipv6-address fall-over bfd 15. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enables the forwarding of IPv6 unicast datagrams.ipv6 unicast-routing Example: Step 3 Device(config)# ipv6 unicast-routing Enables Cisco Express Forwarding for IPv6.ipv6 cef Example: Step 4 Device(config)# ipv6 cef PurposeCommand or Action Configures an interface type and number.interface type number Example: Step 5 Device(config)# interface fastethernet 0/1 Configures an IPv6 address and enables IPv6 processing on an interface. ipv6 address ipv6-address / prefix-length Example: Step 6 Device(config-if)# ipv6 address 2001:DB8:1:1::1/64 Sets the baseline BFD session parameters on an interface.bfd interval milliseconds min_rx milliseconds multiplier multiplier-value Step 7 Example: Device(config-if)# bfd interval 500 min_rx 500 multiplier 3 Restarts an interface.no shutdown Example: Step 8 Device(config-if)# no shutdown Exits interface configuration mode and enters global configuration mode. exit Example: Step 9 Device(config-if)# exit Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 10 Device(config)# router bgp 40000 Disables the default IPv4 unicast address family for establishing peering sessions. no bgp default ipv4-unicast Example: Step 11 We recommend configuring this command in the global scope.Device(config-router)# no bgp default ipv4-unicast Enters address family configuration mode and enables IPv6 addressing. address-family ipv6 [vrf vrf-name] [unicast |multicast | vpnv6] Example: Step 12 Device(config-router)# address-family ipv6 Adds the IP address of the neighbor in the specified autonomous system to the IPv6 BGP neighbor table of the local router. neighbor ipv6-address remote-as autonomous-system-number Example: Step 13 PurposeCommand or Action Device(config-router-af)# neighbor 2001:DB8:2:1::4 remote-as 45000 Enables BGP to monitor the peering session of an IPv6 neighbor using BFD. neighbor ipv6-address fall-over bfd Example: Step 14 Device(config-router-af)# neighbor 2001:DB8:2:1::4 fall-over bfd Exits address family configuration mode and enters privileged EXEC mode. end Example: Step 15 Device(config-router-af)# end Configuring the TTL Security Check for BGP Neighbor Sessions Perform this task to allow BGP to establish or maintain a session only if the TTL value in the IP packet header is equal to or greater than the TTL value configured for the BGP neighbor session. Before you begin To maximize the effectiveness of the BGP Support for TTL Security Check feature, we recommend that you configure it on each participating router. Enabling this feature secures the eBGP session in the incoming direction only and has no effect on outgoing IP packets or the remote router. The neighbor ebgp-multihop command is not needed when the BGP Support for TTL Security Check feature is configured for a multihop neighbor session and should be disabled before configuring this feature. The effectiveness of the BGP Support for TTL Security Check feature is reduced in large-diameter multihop peerings. In the event of a CPU utilization-based attack against a BGP router that is configured for large-diameter peering, you may still need to shut down the affected neighbor sessions to handle the attack. This feature is not effective against attacks from a peer that has been compromised inside of the local and remote network. This restriction also includes peers that are on the network segment between the local and remote network. Note SUMMARY STEPS 1. enable 2. trace [protocol] destination 3. configure terminal 4. router bgp autonomous-system-number 5. neighbor ip-address ttl-security hops hop-count 6. end 7. show running-config 8. show ip bgp neighbors [ip-address] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Discovers the routes of the specified protocol that packets will actually take when traveling to their destination. trace [protocol] destination Example: Step 2 Enter the trace command to determine the number of hops to the specified peer.Device# trace ip 10.1.1.1 Enters global configuration mode.configure terminal Example: Step 3 Device# configure terminal Enters router configurationmode, and creates a BGP routing process. router bgp autonomous-system-number Example: Step 4 Device(config)# router bgp 65000 Configures the maximum number of hops that separate two peers. neighbor ip-address ttl-security hops hop-count Example: Step 5 The hop-count argument is set to the number of hops that separate the local and remote peer. If the expectedDevice(config-router)# neighbor 10.1.1.1 ttl-security hops 2 TTL value in the IP packet header is 254, then the number 1 should be configured for the hop-count argument. The range of values is a number from 1 to 254. When the BGP Support for TTL Security Check feature is enabled, BGP will accept incoming IP packets with a TTL value that is equal to or greater than the expected TTL value. Packets that are not accepted are discarded. The example configuration sets the expected incoming TTL value to at least 253, which is 255 minus the TTL value of 2, and this is the minimum TTL value expected from the BGP peer. The local router will accept the peering session from the 10.1.1.1 neighbor only if it is one or two hops away. PurposeCommand or Action Exits router configurationmode and enters privileged EXEC mode. end Example: Step 6 Device(config-router)# end (Optional) Displays the contents of the currently running configuration file. show running-config Example: Step 7 The output of this command displays the configuration of the neighbor ttl-security command for each peerDevice# show running-config | begin bgp under the BGP configuration section of output. That section includes the neighbor address and the configured hop count. Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [ip-address] Example: Step 8 This command displays "External BGP neighbor may be up to number hops away" when the BGP SupportDevice# show ip bgp neighbors 10.4.9.5 for TTL Security Check feature is enabled. The number value represents the hop count. It is a number from 1 to 254. Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Examples The configuration of the BGP Support for TTL Security Check feature can be verified with the show running-config and show ip bgp neighbors commands. This feature is configured locally on each peer, so there is no remote configuration to verify. The following is sample output from the show running-config command. The output shows that neighbor 10.1.1.1 is configured to establish or maintain the neighbor session only if the expected TTL count in the incoming IP packet is 253 or 254. Router# show running-config | begin bgp router bgp 65000 no synchronization bgp log-neighbor-changes neighbor 10.1.1.1 remote-as 55000 neighbor 10.1.1.1 ttl-security hops 2 no auto-summary . . . The following is sample output from the show ip bgp neighbors command. The output shows that the local router will accept packets from the 10.1.1.1 neighbor if it is no more than 2 hops away. The configuration of this feature is displayed in the address family section of the output. The relevant line is shown in bold in the output. Router# show ip bgp neighbors 10.1.1.1 BGP neighbor is 10.1.1.1, remote AS 55000, external link BGP version 4, remote router ID 10.2.2.22 BGP state = Established, up for 00:59:21 Last read 00:00:21, hold time is 180, keepalive interval is 60 seconds Neighbor capabilities: Route refresh: advertised and received(new) Address family IPv4 Unicast: advertised and received Message statistics: InQ depth is 0 OutQ depth is 0 Sent Rcvd Opens: 2 2 Notifications: 0 0 Updates: 0 0 Keepalives: 226 227 Route Refresh: 0 0 Total: 228 229 Default minimum time between advertisement runs is 5 seconds For address family: IPv4 Unicast BGP table version 1, neighbor version 1/0 Output queue sizes : 0 self, 0 replicated Index 1, Offset 0, Mask 0x2 Member of update-group 1 Sent Rcvd Prefix activity: ---- ---- Prefixes Current: 0 0 Prefixes Total: 0 0 Implicit Withdraw: 0 0 Explicit Withdraw: 0 0 Used as bestpath: n/a 0 Used as multipath: n/a 0 Outbound Inbound Local Policy Denied Prefixes: -------- ------- Total: 0 0 Number of NLRIs in the update sent: max 0, min 0 Connections established 2; dropped 1 Last reset 00:59:50, due to User reset External BGP neighbor may be up to 2 hops away. Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Local host: 10.2.2.22, Local port: 179 Foreign host: 10.1.1.1, Foreign port: 11001 Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) Event Timers (current time is 0xCC28EC): Timer Starts Wakeups Next Retrans 63 0 0x0 TimeWait 0 0 0x0 AckHold 62 50 0x0 SendWnd 0 0 0x0 KeepAlive 0 0 0x0 GiveUp 0 0 0x0 PmtuAger 0 0 0x0 DeadWait 0 0 0x0 iss: 712702676 snduna: 712703881 sndnxt: 712703881 sndwnd: 15180 irs: 2255946817 rcvnxt: 2255948041 rcvwnd: 15161 delrcvwnd: 1223 SRTT: 300 ms, RTTO: 607 ms, RTV: 3 ms, KRTT: 0 ms minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 200 ms Flags: passive open, nagle, gen tcbs Datagrams (max data segment is 1460 bytes): Rcvd: 76 (out of order: 0), with data: 63, total data bytes: 1223 Sent: 113 (retransmit: 0, fastretransmit: 0), with data: 62, total data bytes: 4 Configuring BGP Support for TCP Path MTU Discovery per Session This section contains the following tasks: Disabling TCP Path MTU Discovery Globally for All BGP Sessions Perform this task to disable TCP path MTU discovery for all BGP sessions. TCP path MTU discovery is enabled by default when you configure BGP sessions, but we recommend that you enter the show ip bgp neighbors command to ensure that TCP path MTU discovery is enabled. Before you begin This task assumes that you have previously configured BGP neighbors with active TCP connections. SUMMARY STEPS 1. enable 2. show ip bgp neighbors [ip-address] 3. configure terminal 4. router bgp autonomous-system-number 5. no bgp transport path-mtu-discovery 6. end 7. show ip bgp neighbors [ip-address] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [ip-address] Example: Step 2 Use this command to determine whether BGP neighbors have TCP path MTU discovery enabled.Device# show ip bgp neighbors Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note PurposeCommand or Action Enters global configuration mode.configure terminal Example: Step 3 Device# configure terminal Enters router configuration mode to create or configure a BGP routing process. router bgp autonomous-system-number Example: Step 4 Device(config)# router bgp 50000 Disables TCP path MTU discovery for all BGP sessions.no bgp transport path-mtu-discovery Example: Step 5 Device(config-router)# no bgp transport path-mtu-discovery Exits router configuration mode and returns to privileged EXEC mode. end Example: Step 6 Device(config-router)# end (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [ip-address] Example: Step 7 In this example, the output from this command will not display that any neighbors have TCP path MTU enabled. Device# show ip bgp neighbors Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Examples The following sample output from the show ip bgp neighbors command shows that TCP path MTU discovery is enabled for BGP neighbors. Two entries in the output—Transport(tcp) path-mtu-discovery is enabled and path mtu capable—show that TCP path MTU discovery is enabled. Router# show ip bgp neighbors BGP neighbor is 172.16.1.2, remote AS 45000, internal link BGP version 4, remote router ID 172.16.1.99 . . . For address family: IPv4 Unicast BGP table version 5, neighbor version 5/0 . . . Address tracking is enabled, the RIB does have a route to 172.16.1.2 Address tracking requires at least a /24 route to the peer Connections established 3; dropped 2 Last reset 00:00:35, due to Router ID changed Transport(tcp) path-mtu-discovery is enabled . . . SRTT: 146 ms, RTTO: 1283 ms, RTV: 1137 ms, KRTT: 0 ms minRTT: 8 ms, maxRTT: 300 ms, ACK hold: 200 ms Flags: higher precedence, retransmission timeout, nagle, path mtu capable The following is sample output from the show ip bgp neighbors command after the no bgp transport path-mtu-discovery command has been entered. Note that the path mtu entries are missing. Router# show ip bgp neighbors BGP neighbor is 172.16.1.2, remote AS 45000, internal link BGP version 4, remote router ID 172.16.1.99 . . . For address family: IPv4 Unicast BGP table version 5, neighbor version 5/0 . . . Address tracking is enabled, the RIB does have a route to 172.16.1.2 Address tracking requires at least a /24 route to the peer Connections established 3; dropped 2 Last reset 00:00:35, due to Router ID changed . . . SRTT: 146 ms, RTTO: 1283 ms, RTV: 1137 ms, KRTT: 0 ms minRTT: 8 ms, maxRTT: 300 ms, ACK hold: 200 ms Flags: higher precedence, retransmission timeout, nagle Disabling TCP Path MTU Discovery for a Single BGP Neighbor Perform this task to establish a peering session with an internal BGP (iBGP) neighbor and then disable TCP path MTU discovery for the BGP neighbor session. The neighbor transport command can be used in router configuration mode or address family configuration mode. Before you begin This task assumes that you know that TCP path MTU discovery is enabled by default for all your BGP neighbors. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. address-family {ipv4 [mdt |multicast | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast]} 5. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number 6. neighbor {ip-address| peer-group-name} activate 7. no neighbor {ip-address| peer-group-name} transport{connection-mode | path-mtu-discovery} 8. end 9. show ip bgp neighbors DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Enters address family configurationmode to configure BGP peers to accept address-family-specific configurations. address-family {ipv4 [mdt |multicast | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast]} Step 4 Example: The example creates an IPv4 unicast address family session. Device(config-router)# address-family ipv4 unicast Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number Example: Step 5 Device(config-router-af)# neighbor 192.168.1.1 remote-as 45000 Activates the neighbor under the IPv4 address family.neighbor {ip-address| peer-group-name} activate Example: Step 6 Device(config-router-af)# neighbor 172.16.1.1 activate Disables TCP path MTU discovery for a single BGP neighbor. no neighbor {ip-address| peer-group-name} transport{connection-mode | path-mtu-discovery} Step 7 Example: In this example, TCP path MTU discovery is disabled for the neighbor at 172.16.1.1. Device(config-router-af)# no neighbor 172.16.1.1 transport path-mtu-discovery PurposeCommand or Action Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 8 Device(config-router-af)# end (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors Example: Step 9 In this example, the output from this command will not display that the neighbor has TCP path MTU discovery enabled. Device# show ip bgp neighbors Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Examples The following sample output shows that TCP path MTU discovery has been disabled for BGP neighbor 172.16.1.1 but that it is still enabled for BGP neighbor 192.168.2.2. Two entries in the output—Transport(tcp) path-mtu-discovery is enabled and path mtu capable—show that TCP path MTU discovery is enabled. Router# show ip bgp neighbors BGP neighbor is 172.16.1.1, remote AS 45000, internal link BGP version 4, remote router ID 172.17.1.99 . . . Address tracking is enabled, the RIB does have a route to 172.16.1.1 Address tracking requires at least a /24 route to the peer Connections established 1; dropped 0 Last reset never . . . SRTT: 165 ms, RTTO: 1172 ms, RTV: 1007 ms, KRTT: 0 ms minRTT: 20 ms, maxRTT: 300 ms, ACK hold: 200 ms Flags: higher precedence, retransmission timeout, nagle . . . BGP neighbor is 192.168.2.2, remote AS 50000, external link BGP version 4, remote router ID 10.2.2.99 . . . For address family: IPv4 Unicast BGP table version 4, neighbor version 4/0 . . . Address tracking is enabled, the RIB does have a route to 192.168.2.2 Address tracking requires at least a /24 route to the peer Connections established 2; dropped 1 Last reset 00:05:11, due to User reset Transport(tcp) path-mtu-discovery is enabled . . . SRTT: 210 ms, RTTO: 904 ms, RTV: 694 ms, KRTT: 0 ms minRTT: 20 ms, maxRTT: 300 ms, ACK hold: 200 ms Flags: higher precedence, retransmission timeout, nagle, path mtu capable Enabling TCP Path MTU Discovery Globally for All BGP Sessions Perform this task to enable TCP path MTU discovery for all BGP sessions. TCP path MTU discovery is enabled by default when you configure BGP sessions, but if the BGP Support for TCP Path MTU Discovery per Session feature has been disabled, you can use this task to reenable it. To verify that TCP path MTU discovery is enabled, use the show ip bgp neighbors command. Before you begin This task assumes that you have previously configured BGP neighbors with active TCP connections. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. bgp transport path-mtu-discovery 5. end 6. show ip bgp neighbors DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode to create or configure a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Enables TCP path MTU discovery for all BGP sessions.bgp transport path-mtu-discovery Example: Step 4 PurposeCommand or Action Device(config-router)# bgp transport path-mtu-discovery Exits router configuration mode and returns to privileged EXEC mode. end Example: Step 5 Device(config-router)# end (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors Example: Step 6 In this example, the output from this command will show that all neighbors have TCP pathMTU discovery enabled. Device# show ip bgp neighbors Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Examples The following sample output from the show ip bgp neighbors command shows that TCP path MTU discovery is enabled for BGP neighbors. Two entries in the output—Transport(tcp) path-mtu-discovery is enabled and path mtu capable—show that TCP path MTU discovery is enabled. Router# show ip bgp neighbors BGP neighbor is 172.16.1.2, remote AS 45000, internal link BGP version 4, remote router ID 172.16.1.99 . . . For address family: IPv4 Unicast BGP table version 5, neighbor version 5/0 . . . Address tracking is enabled, the RIB does have a route to 172.16.1.2 Address tracking requires at least a /24 route to the peer Connections established 3; dropped 2 Last reset 00:00:35, due to Router ID changed Transport(tcp) path-mtu-discovery is enabled . . . SRTT: 146 ms, RTTO: 1283 ms, RTV: 1137 ms, KRTT: 0 ms minRTT: 8 ms, maxRTT: 300 ms, ACK hold: 200 ms Flags: higher precedence, retransmission timeout, nagle, path mtu capable Enabling TCP Path MTU Discovery for a Single BGP Neighbor Perform this task to establish a peering session with an eBGP neighbor and then enable TCP path MTU discovery for the BGP neighbor session. The neighbor transport command can be used in router configuration mode or address family configuration mode. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. address-family {ipv4 [mdt |multicast | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast]} 5. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number 6. neighbor {ip-address| peer-group-name} activate 7. neighbor {ip-address| peer-group-name} transport{connection-mode | path-mtu-discovery} 8. end 9. show ip bgp neighbors [ip-address] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Enters address family configurationmode to configure BGP peers to accept address-family-specific configurations. address-family {ipv4 [mdt |multicast | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast]} Step 4 Example: The example creates an IPv4 unicast address family session. Device(config-router)# address-family ipv4 unicast Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number Example: Step 5 Device(config-router-af)# neighbor 192.168.2.2 remote-as 50000 PurposeCommand or Action Activates the neighbor under the IPv4 address family.neighbor {ip-address| peer-group-name} activate Example: Step 6 Device(config-router-af)# neighbor 192.168.2.2 activate Enables TCP path MTU discovery for a single BGP neighbor. neighbor {ip-address| peer-group-name} transport{connection-mode | path-mtu-discovery} Example: Step 7 Device(config-router-af)# neighbor 192.168.2.2 transport path-mtu-discovery Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 8 Device(config-router-af)# end (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors [ip-address] Example: Step 9 Only the syntax applicable to this task is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Device# show ip bgp neighbors 192.168.2.2 Examples The following sample output from the show ip bgp neighbors command shows that TCP path MTU discovery is enabled for the BGP neighbor at 192.168.2.2. Two entries in the output—Transport(tcp) path-mtu-discovery is enabled and path-mtu capable—show that TCP pathMTU discovery is enabled. Router# show ip bgp neighbors 192.168.2.2 BGP neighbor is 192.168.2.2, remote AS 50000, external link BGP version 4, remote router ID 10.2.2.99 . . . For address family: IPv4 Unicast BGP table version 4, neighbor version 4/0 . . . Address tracking is enabled, the RIB does have a route to 192.168.2.2 Address tracking requires at least a /24 route to the peer Connections established 2; dropped 1 Last reset 00:05:11, due to User reset Transport(tcp) path-mtu-discovery is enabled . . . SRTT: 210 ms, RTTO: 904 ms, RTV: 694 ms, KRTT: 0 ms minRTT: 20 ms, maxRTT: 300 ms, ACK hold: 200 ms Flags: higher precedence, retransmission timeout, nagle, path mtu capable Configuration Examples for BGP Neighbor Session Options Example: Configuring Fast Session Deactivation for a BGP Neighbor In the following example, the BGP routing process is configured on device A and device B to monitor and use fast peering session deactivation for the neighbor session between the two devices. Although fast peering session deactivation is not required at both devices in the neighbor session, it will help the BGP networks in both autonomous systems to converge faster if the neighbor session is deactivated. Device A router bgp 40000 neighbor 192.168.1.1 remote-as 45000 neighbor 192.168.1.1 fall-over end Device B router bgp 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.1.2 fall-over end Example:ConfiguringSelectiveAddressTrackingforFastSessionDeactivation The following example shows how to configure the BGP peering session to be reset if a route with a prefix of /28 or a more specific route to a peer destination is no longer available: router bgp 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.1.2 fall-over route-map CHECK-NBR exit ip prefix-list FILTER28 seq 5 permit 0.0.0.0/0 ge 28 route-map CHECK-NBR permit 10 match ip address prefix-list FILTER28 end Example: Configuring BFD for a BGP IPv6 Neighbor The following example configures FastEthernet interface 0/1 with the IPv6 address 2001:DB8:4:1::1. Bidirectional Forwarding Detection (BFD) is configured for the BGP neighbor at 2001:DB8:5:1::2. BFD will track forwarding path failure of the BGP neighbor and provide faster reconvergence time for BGP after a forwarding path failure. ipv6 unicast-routing ipv6 cef interface fastethernet 0/1 ipv6 address 2001:DB8:4:1::1/64 bfd interval 500 min_rx 500 multiplier 3 no shutdown exit router bgp 65000 no bgp default ipv4-unicast address-family ipv6 unicast neighbor 2001:DB8:5:1::2 remote-as 65001 neighbor 2001:DB8:5:1::2 fall-over bfd end Example: Configuring the TTL-Security Check The example configurations in this section show how to configure the BGP Support for TTL Security Check feature. The following example uses the trace command to determine the hop count to an eBGP peer. The hop count number is displayed in the output for each networking device that IP packets traverse to reach the specified neighbor. In the following example, the hop count for the 10.1.1.1 neighbor is 1. Router# trace ip 10.1.1.1 Type escape sequence to abort. Tracing the route to 10.1.1.1 1 10.1.1.1 0 msec * 0 msec The following example sets the hop count to 2 for the 10.1.1.1 neighbor. Because the hop-count argument is set to 2, BGP will accept only IP packets with a TTL count in the header that is equal to or greater than 253. Router(config-router)# neighbor 10.1.1.1 ttl-security hops 2 Examples: Configuring BGP Support for TCP Path MTU Discovery per Session This section contains the following configuration examples: Example: Disabling TCP Path MTU Discovery Globally for All BGP Sessions The following example shows how to disable TCP path MTU discovery for all BGP neighbor sessions. Use the show ip bgp neighbors command to verify that TCP path MTU discovery has been disabled. enable configure terminal router bgp 45000 no bgp transport path-mtu-discovery end show ip bgp neighbors Example: Disabling TCP Path MTU Discovery for a Single BGP Neighbor The following example shows how to disable TCP pathMTU discovery for an eBGP neighbor at 192.168.2.2: enable configure terminal router bgp 45000 neighbor 192.168.2.2 remote-as 50000 neighbor 192.168.2.2 activate no neighbor 192.168.2.2 transport path-mtu-discovery end show ip bgp neighbors 192.168.2.2 Example: Enabling TCP Path MTU Discovery Globally for All BGP Sessions The following example shows how to enable TCP path MTU discovery for all BGP neighbor sessions. Use the show ip bgp neighbors command to verify that TCP path MTU discovery has been enabled. enable configure terminal router bgp 45000 bgp transport path-mtu-discovery end show ip bgp neighbors Example: Enabling TCP Path MTU Discovery for a Single BGP Neighbor The following example shows how to enable TCP path MTU discovery for an eBGP neighbor at 192.168.2.2. Use the show ip bgp neighbors command to verify that TCP path MTU discovery has been enabled. enable configure terminal router bgp 45000 neighbor 192.168.2.2 remote-as 50000 neighbor 192.168.2.2 activate neighbor 192.168.2.2 transport path-mtu-discovery end show ip bgp neighbors 192.168.2.2 Where to Go Next For information about advertising the bandwidth of an autonomous system exit link as an extended community, refer to the “BGP Link Bandwidth” module. Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command Reference BGP commands: complete command syntax, command mode, defaults, command history, usage guidelines, and examples “Cisco BGP Overview” moduleOverview of Cisco BGP conceptual information with links to all the individual BGP modules “Configuring a Basic BGP Network” moduleConceptual and configuration details for basic BGP tasks Document TitleRelated Topic “Configuring Advanced BGP Features” moduleConceptual and configuration details for advanced BGP tasks IP Routing: BFD Configuration GuideBidirectional Forwarding Detection configuration tasks Standards TitleStandard MDTSAFIMDTSAFI MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco IOS XE software releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs CISCO-BGP4-MIB RFCs TitleRFC Path MTU DiscoveryRFC 1191 A Border Gateway Protocol 4 (BGP-4)RFC1771 Application of the Border Gateway Protocol in the InternetRFC1772 Experience with the BGP ProtocolRFC1773 BGP-4 Protocol AnalysisRFC1774 Guidelines for Creation, Selection, and Registration of an Autonomous System (AS)RFC1930 Multiprotocol Extensions for BGP-4RFC2858 Route Refresh Capability for BGP-4RFC2918 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for Configuring BGP Neighbor Session Options The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 32: Feature Information for Configuring BGP Neighbor Session Options Features Feature InformationReleasesFeature Name BGP support for TCP path maximum transmission unit (MTU) discovery introduced the ability for BGP to automatically discover the best TCP path MTU for each BGP session. The TCP path MTU is enabled by default for all BGP neighbor sessions, but you can disable, and subsequently enable, the TCP path MTU globally for all BGP sessions or for an individual BGP neighbor session. The following commands were introduced or modified by this feature: bgp transport, neighbor transport, show ip bgp neighbors. 12.2(33)SRA 12.2(31)SB 12.2(33)SXH 12.4(20)T 15.0(1)S BGP Support for TCP Path MTU Discovery per Session The BGP Support for TTL Security Check feature introduced a lightweight security mechanism to protect external Border Gateway Protocol (eBGP) peering sessions from CPU utilization-based attacks using forged IP packets. Enabling this feature prevents attempts to hijack the eBGP peering session by a host on a network segment that is not part of either BGP network or by a host on a network segment that is not between the eBGP peers. The following commands were introduced or modified by this feature: neighbor ttl-security, show ip bgp neighbors. 12.0(27)S 12.3(7)T 12.2(25)S 12.2(18)SXE 15.0(1)S BGP Support for TTL Security Check Feature InformationReleasesFeature Name Bidirectional Forwarding Detection (BFD) can be used to track fast forwarding path failure of BGP neighbors that use an IPv6 address. The following command was modified by this feature: neighbor fall-over. In Cisco IOS Release 15.2(4)S, support was added for the Cisco 7200 series router. 15.1(2)S 15.2(3)T 15.2(4)S BGP IPv6 Client for Single-Hop BFD C H A P T E R 17 BGP Neighbor Policy The BGPNeighbor Policy feature introduces new keywords to two existing commands to display information about local and inherited policies.When BGP neighbors use multiple levels of peer templates, it can be difficult to determine which policies are applied to the neighbor. Inherited policies are policies that the neighbor inherits from a peer group or a peer policy template. Finding Feature Information, on page 399 Information About BGP Neighbor Policy, on page 399 How to Display BGP Neighbor Policy Information, on page 400 Additional References, on page 400 Feature Information for BGP Neighbor Policy, on page 401 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP Neighbor Policy Benefit of BGP Neighbor Policy Feature The BGP Neighbor Policy feature introduces new keywords to the show ip bgp neighbors policy command and the show ip bgp template peer-policy command to display information about local and inherited policies. When BGP neighbors use multiple levels of peer templates, it can be difficult to determine which policies are applied to the neighbor. Inherited policies are policies that the neighbor inherits from a peer group or a peer policy template. How to Display BGP Neighbor Policy Information Displaying BGP Neighbor Policy Information SUMMARY STEPS 1. enable 2. show ip bgp neighbors { ip-address | ipv6-address } policy [ detail] 3. show ip bgp template peer-policy [ policy-template-name [ detail] ] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Displays the policies applied to the specified neighbor.show ip bgp neighbors { ip-address | ipv6-address } policy [ detail] Step 2 Example: Device# show ip bgp neighbors 192.168.2.3 policy detail Displays the locally configured peer policy templates.show ip bgp template peer-policy [ policy-template-name [ detail] ] Step 3 Example: Device# show ip bgp template peer-policy Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IP Routing: BGP Command Reference BGP commands Standards and RFCs TitleStandard/RFC Route Refresh Capability for BGP-4RFC 2918 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP Neighbor Policy The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 33: Feature Information for BGP Neighbor Policy Feature InformationReleasesFeature Name The BGP Neighbor Policy feature introduces new keywords to two existing commands to display information about local and inherited policies. When BGP neighbors use multiple levels of peer templates, it can be difficult to determine which policies are applied to the neighbor. Inherited policies are policies that the neighbor inherits from a peer-group or a peer-policy template. The following commands were modified: show ip bgp neighbors, and show ip bgp template peer-policy. 12.2(33)SB 12.2(33)SRB BGP Neighbor Policy C H A P T E R 18 BGP Dynamic Neighbors BGP dynamic neighbor support allows BGP peering to a group of remote neighbors that are defined by a range of IP addresses. Each range can be configured as a subnet IP address. BGP dynamic neighbors are configured using a range of IP addresses and BGP peer groups. Finding Feature Information, on page 403 Information About BGP Dynamic Neighbors, on page 403 How to Configure BGP Dynamic Neighbors, on page 404 Configuration Examples for BGP Dynamic Neighbors, on page 413 Additional References, on page 416 Feature Information for BGP Dynamic Neighbors, on page 416 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP Dynamic Neighbors BGP Dynamic Neighbors Support for the BGP Dynamic Neighbors feature was introduced in Cisco IOS Release 12.2(33)SXH on the Cisco Catalyst 6500 series switches. BGP dynamic neighbor support allows BGP peering to a group of remote neighbors that are defined by a range of IP addresses. Each range can be configured as a subnet IP address. BGP dynamic neighbors are configured using a range of IP addresses and BGP peer groups. In Cisco IOS XE Denali 16.3 release, support for BGP dynamic neighbors was extended to IPv6 BGP peering with VRF support. After a subnet range is configured for a BGP peer group and a TCP session is initiated by another router for an IP address in the subnet range, a new BGP neighbor is dynamically created as a member of that group. After the initial configuration of subnet ranges and activation of the peer group (referred to as a listen range group ), dynamic BGP neighbor creation does not require any further CLI configuration on the initial router. Other routers can establish a BGP session with the initial router, but the initial router need not establish a BGP session to other routers if the IP address of the remote peer used for the BGP session is not within the configured range. To support the BGP Dynamic Neighbors feature, the output for the show ip bgp neighbors, show ip bgp peer-group, and show ip bgp summary commands was updated to display information about dynamic neighbors. A dynamic BGP neighbor will inherit any configuration for the peer group. In larger BGP networks, implementing BGP dynamic neighbors can reduce the amount and complexity of CLI configuration and save CPU and memory usage. Only IPv4 peering is supported. How to Configure BGP Dynamic Neighbors Implementing BGP Dynamic Neighbors Using Subnet Ranges In Cisco IOS Release 12.2(33)SXH, support for BGP dynamic neighbors was introduced. Perform this task to implement the dynamic creation of BGP neighbors using subnet ranges. In this task, a BGP peer group is created on Router B in the figure below, a global limit is set on the number of dynamic BGP neighbors, and a subnet range is associated with a peer group. Configuring the subnet range enables the dynamic BGP neighbor process. The peer group is added to the BGP neighbor table of the local router, and an alternate autonomous system number is also configured. The peer group is activated under the IPv4 address family. The next step is to move to another router—Router E in the figure below—where a BGP session is started and the neighbor router, Router B, is configured as a remote BGP peer. The peering configuration opens a TCP session and triggers Router B to create a dynamic BGP neighbor because the IP address that starts the TCP session (192.168.3.2) is within the configured subnet range for dynamic BGP peers. The task moves back to the first router, Router B, to run three show commands that have been modified to display dynamic BGP peer information. Figure 36: BGP Dynamic Neighbor Topology Before you begin This task requires Cisco IOS Release 12.2(33)SXH, or a later release, to be running. This task supports only IPv4 BGP peering.Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. bgp log-neighbor-changes 5. neighbor peer-group-name peer-group 6. bgp listen [limit max-number] 7. bgp listen [limit max-number | range network / length peer-group peer-group-name] 8. neighbor {ip-address | ipv6-address | peer-group-name} ebgp-multihop [ttl] 9. neighbor peer-group-name remote-as autonomous-system-number [alternate-as autonomous-system-number...] 10. address-family ipv4 [mdt |multicast | unicast [vrf vrf-name]] 11. neighbor {ip-address | peer-group-name} activate 12. end 13. Move to another router that has an interface within the subnet range for the BGP peer group configured in this task. 14. enable 15. configure terminal 16. router bgp autonomous-system-number 17. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number [alternate-as autonomous-system-number...] 18. Return to the first router. 19. show ip bgp summary 20. show ip bgp peer-group [peer-group-name] [summary] 21. show ip bgp neighbors [ip-address] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. DeviceB> enable • The configuration is entered on router B. Enters global configuration mode.configure terminal Example: Step 2 DeviceB# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 DeviceB(config)# router bgp 45000 (Optional) Enables logging of BGP neighbor status changes (up or down) and neighbor resets. bgp log-neighbor-changes Example: Step 4 Use this command for troubleshooting network connectivity problems and measuring networkDeviceB(config-router)# bgp log-neighbor-changes stability. Unexpected neighbor resets might indicate high error rates or high packet loss in the network and should be investigated. Creates a BGP peer group.neighbor peer-group-name peer-groupStep 5 Example: In this example, a peer group named group192 is created. This group will be used as a listen range group.DeviceB(config-router)# neighbor group192 peer-group Sets a global limit of BGP dynamic subnet range neighbors.bgp listen [limit max-number]Step 6 Example: Use the optional limit keyword and max-number argument to define the maximum number of BGP dynamic subnet range neighbors that can be created.DeviceB(config-router)# bgp listen limit 200 Only the syntax applicable to this task is used in this example. For the complete syntax, see Step 7. Note PurposeCommand or Action Associates a subnet range with a BGP peer group and activates the BGP dynamic neighbors feature. bgp listen [limit max-number | range network / length peer-group peer-group-name] Step 7 Example: Use the optional limit keyword and max-number argument to define the maximum number of BGP dynamic neighbors that can be created.DeviceB(config-router)# bgp listen range 192.168.0.0/16 peer-group group192 Use the optional range keyword and network / length argument to define a prefix range to be associated with the specified peer group. In this example, the prefix range 192.168.0.0/16 is associated with the listen range group named group192. Accepts and attempts BGP connections to external peers residing on networks that are not directly connected. neighbor {ip-address | ipv6-address | peer-group-name} ebgp-multihop [ttl] Example: Step 8 DeviceB(config-router)# neighbor group192 ebgp-multihop 255 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor peer-group-name remote-as autonomous-system-number [alternate-as autonomous-system-number...] Step 9 Example: Use the optional alternate-as keyword and autonomous-system-number argument to identify up DeviceB(config-router)# neighbor group192 remote-as 40000 alternate-as 50000 to five alternate autonomous system numbers for listen range neighbors. In this example, the peer group named group192 is configured with two possible autonomous system numbers. The alternate-as keyword is used only with the listen range peer groups, not with individual BGP neighbors. Note Enters address family configuration mode to configure BGP peers to accept address-family-specific configurations. address-family ipv4 [mdt |multicast | unicast [vrf vrf-name]] Example: Step 10 DeviceB(config-router)# address-family ipv4 unicast Activates the neighbor or listen range peer group for the configured address family. neighbor {ip-address | peer-group-name} activate Example: Step 11 In this example, the neighbor 172.16.1.1 is activated for the IPv4 address family.DeviceB(config-router-af)# neighbor group192 activate PurposeCommand or Action Usually BGP peer groups cannot be activated using this command, but the listen range peer groups are a special case. Note Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 12 DeviceB(config-router-af)# end —Move to another router that has an interface within the subnet range for the BGP peer group configured in this task. Step 13 Enables privileged EXEC mode.enableStep 14 Example: Enter your password if prompted. DeviceE> enable • The configuration is entered on Router E. Enters global configuration mode.configure terminal Example: Step 15 DeviceE# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 16 DeviceE(config)# router bgp 50000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number [alternate-as autonomous-system-number...] Step 17 Example: In this example, the interface (192.168.3.2 in the figure above) at Router E is with the subnet range set DeviceE(config-router)# neighbor 192.168.3.1 remote-as 45000 for the BGP listen range group, group192.When TCP opens a session to peer to Router B, Router B creates this peer dynamically. —Return to the first router.Step 18 (Optional) Displays the BGP path, prefix, and attribute information for all connections to BGP neighbors. show ip bgp summary Example: Step 19 In this step, the configuration has returned to Router B.DeviceB# show ip bgp summary (Optional) Displays information about BGP peer groups.show ip bgp peer-group [peer-group-name] [summary] Example: Step 20 PurposeCommand or Action DeviceB# show ip bgp peer-group group192 (Optional) Displays information about BGP and TCP connections to neighbors. show ip bgp neighbors [ip-address] Example: Step 21 In this example, information is displayed about the dynamically created neighbor at 192.168.3.2. The IPDeviceB# show ip bgp neighbors 192.168.3.2 address of this BGP neighbor can be found in the output of either the show ip bgp summary or the show ip bgp peer-group command. Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Examples The following output examples were taken from Router B in the figure above after the appropriate configuration steps in this task were completed on both Router B and Router E. The following output from the show ip bgp summary command shows that the BGP neighbor 192.168.3.2 was dynamically created and is a member of the listen range group, group192. The output also shows that the IP prefix range of 192.168.0.0/16 is defined for the listen range named group192. Router# show ip bgp summary BGP router identifier 192.168.3.1, local AS number 45000 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd *192.168.3.2 4 50000 2 2 0 0 0 00:00:37 0 * Dynamically created based on a listen range command Dynamically created neighbors: 1/(200 max), Subnet ranges: 1 BGP peergroup group192 listen range group members: 192.168.0.0/16 The following output from the show ip bgp peer-group command shows information about the listen range group, group192 that was configured in this task: Router# show ip bgp peer-group group192 BGP peer-group is group192, remote AS 40000 BGP peergroup group192 listen range group members: 192.168.0.0/16 BGP version 4 Default minimum time between advertisement runs is 30 seconds For address family: IPv4 Unicast BGP neighbor is group192, peer-group external, members: *192.168.3.2 Index 0, Offset 0, Mask 0x0 Update messages formatted 0, replicated 0 Number of NLRIs in the update sent: max 0, min 0 The following sample output from the show ip bgp neighbors command shows that the neighbor 192.168.3.2 is a member of the peer group, group192, and belongs to the subnet range group 192.168.0.0/16, which shows that this peer was dynamically created: Router# show ip bgp neighbors 192.168.3.2 BGP neighbor is *192.168.3.2, remote AS 50000, external link Member of peer-group group192 for session parameters Belongs to the subnet range group: 192.168.0.0/16 BGP version 4, remote router ID 192.168.3.2 BGP state = Established, up for 00:06:35 Last read 00:00:33, last write 00:00:25, hold time is 180, keepalive intervals Neighbor capabilities: Route refresh: advertised and received(new) Address family IPv4 Unicast: advertised and received Message statistics: InQ depth is 0 OutQ depth is 0 Sent Rcvd Opens: 1 1 Notifications: 0 0 Updates: 0 0 Keepalives: 7 7 Route Refresh: 0 0 Total: 8 8 Default minimum time between advertisement runs is 30 seconds For address family: IPv4 Unicast BGP table version 1, neighbor version 1/0 Output queue size : 0 Index 1, Offset 0, Mask 0x2 1 update-group member group192 peer-group member . . . Configuring BGP IPv6 Dynamic Neighbor Support with VRF Support In Cisco IOSXEDenali 16.3 release, support for BGP dynamic neighbors was extended to IPv6 BGP peering. You can also configure BGP IPv6 dynamic neighbors without VRF support.Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. bgp listen [limit max-number | range network / length peer-group peer-group-name] 5. address-family [ipv4 | ipv6] [mdt |multicast | unicast [vrf vrf-name]] 6. bgp listen [limit max-number] 7. neighbor peer-group-name peer-group 8. neighbor peer-group-name remote-as autonomous-system-number [alternate-as autonomous-system-number...] 9. address-family [ipv4 | ipv6] [mdt |multicast | unicast [vrf vrf-name]] 10. neighbor {ip-address | peer-group-name} activate 11. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable • The configuration is entered on router B. Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Associates a subnet range with a BGP peer group and activates the BGP dynamic neighbors feature. bgp listen [limit max-number | range network / length peer-group peer-group-name] Step 4 Example: Use the optional limit keyword and max-number argument to define the maximum number of BGP dynamic neighbors that can be created.Device(config-router)# bgp listen range 2001::0/64 peer-group group192 Use the optional range keyword and network / length argument to define a prefix range to be associated with the specified peer group. In this example, the prefix range 2001::0/64 is associated with the listen range group named group192. Enters address family configuration mode to configure BGP peers to accept address-family-specific configurations. address-family [ipv4 | ipv6] [mdt |multicast | unicast [vrf vrf-name]] Example: Step 5 Device(config-router-af)# address-family ipv6 unicast vrf vrf1 Specifies themaximum number of prefixes in VRF address family. bgp listen [limit max-number] Example: Step 6 Device(config-router)# bgp listen limit 500 Creates a BGP peer group.neighbor peer-group-name peer-groupStep 7 PurposeCommand or Action Example: In this example, a peer group named group192 is created. This group will be used as a listen range group.Device(config-router)# neighbor group192 peer-group Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv6 BGP neighbor table. neighbor peer-group-name remote-as autonomous-system-number [alternate-as autonomous-system-number...] Step 8 Example: Use the optional alternate-as keyword and autonomous-system-number argument to identify up Device(config-router)# neighbor group192 remote-as 101 alternate-as 102 to five alternate autonomous system numbers for listen range neighbors. In this example, the peer group named group192 is configured with two possible autonomous system numbers. The alternate-as keyword is used only with the listen range peer groups, not with individual BGP neighbors. Note Enable IPv4 address family for this peer-group.address-family [ipv4 | ipv6] [mdt |multicast | unicast [vrf vrf-name]] Step 9 Example: Device(config-router-af)# address-family ipv4 unicast vrf vrf1 Activates the neighbor or listen range peer group for the configured address family. neighbor {ip-address | peer-group-name} activate Example: Step 10 Device(config-router-af)# neighbor group192 activate Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 11 Device(config-router-af)# end Verifying BGP IPv6 Dynamic Neighbor Configuration Use the show bgp ipv6 unicast summary command to verify the BGP IPv6 unicast address family configuration in global routing table: Device# show bgp ipv6 unicast summary BGP router identifier 192.168.3.1, local AS number 45000 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd *2001::1 4 50000 2 2 0 0 0 00:00:37 0 * Dynamically created based on a listen range command Dynamically created neighbors: 1/(200 max), Subnet ranges: 1 BGP peergroup group192 listen range group members: 2001::0/64 Use the show bgp { ipv4 | ipv6 } unicast peer-group< name> command to verify the IPv6 dynamic neighbors configuration in global routing table: Device# show bgp ipv6 unicast peer-group group192 BGP peer-group is group192, remote AS 40000 BGP peergroup group192 listen range group members: 2001::0/64 BGP version 4 Default minimum time between advertisement runs is 30 seconds For address family: IPv6 Unicast BGP neighbor is group192, peer-group external, members: *2001::1 Index 0, Offset 0, Mask 0x0 Update messages formatted 0, replicated 0 Number of NLRIs in the update sent: max 0, min 0 You can use the following commands to verify the BGP IPv6 dynamic neighbors configuration in the VRF routing table: show bgp vpnv6 unicast vrf neighbors show bgp vpnv6 unicast vrf summary show bgp vpnv6 unicast vrf peer-group debug bgp [ipv6 | vpnv6 ] unicast range Configuration Examples for BGP Dynamic Neighbors Example: Implementing BGP Dynamic Neighbors Using Subnet Ranges In the following example, two BGP peer groups are created on Router B in the figure below, a global limit is set on the number of dynamic BGP neighbors, and a subnet range is associated with a peer group. Configuring the subnet range enables the dynamic BGP neighbor process. The peer groups are added to the BGP neighbor table of the local router, and an alternate autonomous system number is also configured for one of the peer groups, group192. The subnet range peer groups and a standard BGP peer are then activated under the IPv4 address family. The configuration moves to another router—Router A in the figure below—where a BGP session is started and the neighbor router, Router B, is configured as a remote BGP peer. The peering configuration opens a TCP session and triggers Router B to create a dynamic BGP neighbor because the IP address that starts the TCP session (192.168.1.2) is within the configured subnet range for dynamic BGP peers. A third router—Router E in the figure below—also starts a BGP peering session with Router B. Router E is in the autonomous system 50000, which is the configured alternate autonomous system. Router B responds to the resulting TCP session by creating another dynamic BGP peer. This example concludes with the output of the show ip bgp summary command entered on Router B. Figure 37: BGP Dynamic Neighbor Topology Router B enable configure terminal router bgp 45000 bgp log-neighbor-changes bgp listen limit 200 bgp listen range 172.21.0.0/16 peer-group group172 bgp listen range 192.168.0.0/16 peer-group group192 neighbor group172 peer-group neighbor group172 remote-as 45000 neighbor group192 peer-group neighbor group192 remote-as 40000 alternate-as 50000 neighbor 172.16.1.2 remote-as 45000 address-family ipv4 unicast neighbor group172 activate neighbor group192 activate neighbor 172.16.1.2 activate end Router A enable configure terminal router bgp 40000 neighbor 192.168.1.1 remote-as 45000 exit Router E enable configure terminal router bgp 50000 neighbor 192.168.3.1 remote-as 45000 exit After both Router A and Router E are configured, the show ip bgp summary command is run on Router B. The output displays the regular BGP neighbor, 172.16.1.2, and the two BGP neighbors that were created dynamically when Router A and Router E initiated TCP sessions for BGP peering to Router B. The output also shows information about the configured listen range subnet groups. BGP router identifier 192.168.3.1, local AS number 45000 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 172.16.1.2 4 45000 15 15 1 0 0 00:12:20 0 *192.168.1.2 4 40000 3 3 1 0 0 00:00:37 0 *192.168.3.2 4 50000 6 6 1 0 0 00:04:36 0 * Dynamically created based on a listen range command Dynamically created neighbors: 2/(200 max), Subnet ranges: 2 BGP peergroup group172 listen range group members: 172.21.0.0/16 BGP peergroup group192 listen range group members: 192.168.0.0/16 Example: Configuring BGP IPv6 Dynamic Neighbor Support with VRF Support Configuring BGP IPv6 Dynamic Neighbor Support with VRF Support enable configure terminal router bgp 55000 bgp listen range 2001::0/64 peer-group group182 address-family ipv6 unicast vrf vrf2 bgp listen limit 600 neighbor group182 peer-group neighbor group182 remote-as 103 alternate-as 104 address-family ipv4 unicast vrf vrf2 neighbor group182 activate end Configuring BGP IPv6 Dynamic Neighbor Support without VRF Support enable configure terminal router bgp 100 bgp listen range 2001::0/64 peer-group group192 bgp listen limit 500 neighbor group192 peer-group neighbor group192 remote-as 101 alternate-as 102 address family ipv6 unicast neighbor group192 activate address family ipv4 unicast neighbor group192 activate end Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IP Routing: BGP Command Reference BGP commands Standards and RFCs TitleStandard/RFC Route Refresh Capability for BGP-4RFC 2918 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP Dynamic Neighbors The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 34: Feature Information for BGP Dynamic Neighbors Feature InformationReleasesFeature Name BGP dynamic neighbor support allows BGP peering to a group of remote neighbors that are defined by a range of IP addresses. Each range can be configured as a subnet IP address. BGP dynamic neighbors are configured using a range of IP addresses and BGP peer groups. After a subnet range is configured for a BGP peer group and a TCP session is initiated for an IP address in the subnet range, a new BGP neighbor is dynamically created as a member of that group. The new BGP neighbor will inherit any configuration for the peer group. The following commands were introduced or modified by this feature: bgp listen, debug ip bgp range, neighbor remote-as, show ip bgp neighbors, show ip bgp peer-group, and show ip bgp summary. Cisco IOS XE Release 3.1SBGP Dynamic Neighbors In Cisco IOS XE Denali 16.3 release, support for BGP dynamic neighbors was extended to IPv6 BGP peering with support for VRF. The following commands were introduced or modified by this feature: bgp listen, debug ip bgp range, neighbor remote-as, show bgp neighbors, show bgp summary, show bgp vpnv6 unicast vrf neighbors, show bgp vpnv6 unicast vrf peer-group , show bgp vpnv6 unicast vrf summary. Cisco IOS XE Denali 16.3.1BGP IPv6 Dynamic Neighbor Support and VRF Support C H A P T E R 19 BGP Support for Next-Hop Address Tracking The BGP Support for Next-Hop Address Tracking feature is enabled by default when a supporting Cisco software image is installed. BGP next-hop address tracking is event driven. BGP prefixes are automatically tracked as peering sessions are established. Next-hop changes are rapidly reported to the BGP routing process as they are updated in the RIB. This optimization improves overall BGP convergence by reducing the response time to next-hop changes for routes installed in the RIB. When a bestpath calculation is run in between BGP scanner cycles, only next-hop changes are tracked and processed. Finding Feature Information, on page 419 Information About BGP Support for Next-Hop Address Tracking, on page 419 How to Configure BGP Support for Next-Hop Address Tracking, on page 421 Configuration Examples for BGP Support for Next-Hop Address Tracking, on page 431 Additional References, on page 432 Feature Information for BGP Support for Next-Hop Address Tracking, on page 433 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP Support for Next-Hop Address Tracking BGP Next-Hop Address Tracking The BGP next-hop address tracking feature is enabled by default when a supporting Cisco software image is installed. BGP next-hop address tracking is event driven. BGP prefixes are automatically tracked as peering sessions are established. Next-hop changes are rapidly reported to the BGP routing process as they are updated in the RIB. This optimization improves overall BGP convergence by reducing the response time to next-hop changes for routes installed in the RIB. When a best-path calculation is run in between BGP scanner cycles, only next-hop changes are tracked and processed. BGP Next-Hop Dampening Penalties If the penalty threshold value is higher than 950, then the delay is calculated as the reuse time using the dampening calculations. The dampening calculations use the following parameters: Penalty Half-life time Reuse time max-suppress-time The values for the dampening parameters used are a max-suppress-time of 60 seconds, the half-life of 8 seconds, and the reuse-limit of 100. For example, if the original penalty of 1600 is added, then after 16 seconds it becomes 800, and after 40 seconds, the penalty becomes 100. Hence, for the route update penalty of 1600, a delay of 40 seconds is used to schedule the BGP scanner. These parameters (penalty threshold and any of the dampening parameters) cannot be modified. Default BGP Scanner Behavior BGPmonitors the next hop of installed routes to verify next-hop reachability and to select, install, and validate the BGP best path. By default, the BGP scanner is used to poll the RIB for this information every 60 seconds. During the 60 second time period between scan cycles, Interior Gateway Protocol (IGP) instability or other network failures can cause black holes and routing loops to temporarily form. BGP Next_Hop Attribute The Next_Hop attribute identifies the next-hop IP address to be used as the BGP next hop to the destination. The device makes a recursive lookup to find the BGP next hop in the routing table. In external BGP (eBGP), the next hop is the IP address of the peer that sent the update. Internal BGP (iBGP) sets the next-hop address to the IP address of the peer that advertised the prefix for routes that originate internally. When any routes to iBGP that are learned from eBGP are advertised, the Next_Hop attribute is unchanged. A BGP next-hop IP address must be reachable in order for the device to use a BGP route. Reachability information is usually provided by the IGP, and changes in the IGP can influence the forwarding of the next-hop address over a network backbone. Selective BGP Next-Hop Route Filtering BGP selective next-hop route filtering was implemented as part of the BGP Selective Address Tracking feature to support BGP next-hop address tracking. Selective next-hop route filtering uses a route map to selectively define routes to help resolve the BGP next hop. The ability to use a route map with the bgp nexthop command allows the configuration of the length of a prefix that applies to the BGP Next_Hop attribute. The route map is used during the BGP bestpath calculation and is applied to the route in the routing table that covers the next-hop attribute for BGP prefixes. If the next-hop route fails the route map evaluation, the next-hop route is marked as unreachable. This command is per address family, so different route maps can be applied for next-hop routes in different address families. Use route map on ASR series devices to set the next hop as BGP peer for the route and apply that route map in outbound direction towards the peer. Note Onlymatch ip address andmatch source-protocol commands are supported in the route map. No set commands or othermatch commands are supported. Note BGP Support for Fast Peering Session Deactivation BGP Hold Timer By default, the BGP hold timer is set to run every 180 seconds in Cisco software. This timer value is set as the default to protect the BGP routing process from instability that can be caused by peering sessions with other routing protocols. BGP devices typically carry large routing tables, so frequent session resets are not desirable. BGP Fast Peering Session Deactivation BGP fast peering session deactivation improves BGP convergence and response time to adjacency changes with BGP neighbors. This feature is event driven and configured on a per-neighbor basis. When this feature is enabled, BGP will monitor the peering session with the specified neighbor. Adjacency changes are detected and terminated peering sessions are deactivated in between the default or configured BGP scanning interval. Selective Address Tracking for BGP Fast Session Deactivation In Cisco IOS XE Release 2.1 and later releases, the BGP Selective Address Tracking feature introduced the use of a route map with BGP fast session deactivation. The route-map keyword andmap-name argument are used with the neighbor fall-over BGP neighbor session command to determine if a peering session with a BGP neighbor should be reset when a route to the BGP peer changes. The route map is evaluated against the new route, and if a deny statement is returned, the peer session is reset. The route map is not used for session establishment. Onlymatch ip address andmatch source-protocol commands are supported in the route map. No set commands or othermatch commands are supported. Note How to Configure BGP Support for Next-Hop Address Tracking Configuring BGP Next-Hop Address Tracking The tasks in this section show how configure BGP next-hop address tracking. BGP next-hop address tracking significantly improves the response time of BGP to next-hop changes in the RIB. However, unstable Interior Gateway Protocol (IGP) peers can introduce instability to BGP neighbor sessions. We recommend that you aggressively dampen unstable IGP peering sessions to reduce the possible impact to BGP. For more details about configuring route dampening, see “Configuring BGP Route Dampening.” Configuring BGP Selective Next-Hop Route Filtering Perform this task to configure selective next-hop route filtering using a route map to filter potential next-hop routes. This task uses prefix lists and route maps to match IP addresses or source protocols and can be used to avoid aggregate addresses and BGP prefixes being considered as next-hop routes. Onlymatch ip address andmatch source-protocol commands are supported in the route map. No set commands or othermatch commands are supported. For more examples of how to use the bgp nexthop command, see the “Examples: Configuring BGP Selective Next-Hop Route Filtering” section in this module. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. address-family ipv4 [unicast |multicast| vrf vrf-name] 5. bgp nexthop route-map map-name 6. exit 7. exit 8. ip prefix-list list-name [seq seq-value] {deny network / length | permit network/length} [ge ge-value] [le le-value] 9. route-map map-name [permit | deny] [sequence-number] 10. match ip address prefix-list prefix-list-name [prefix-list-name...] 11. exit 12. route-map map-name [permit | deny] [sequence-number] 13. end 14. show ip bgp [network] [network-mask] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 PurposeCommand or Action Device(config)# router bgp 45000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast| vrf vrf-name] Example: Step 4 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inDevice(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Permits a route map to selectively define routes to help resolve the BGP next hop. bgp nexthop route-map map-name Example: Step 5 In this example the route map named CHECK-NEXTHOP is created.Device(config-router-af)# bgp nexthop route-map CHECK-NEXTHOP Exits address family configuration mode and enters router configuration mode. exit Example: Step 6 Device(config-router-af)# exit Exits router configuration mode and enters global configuration mode. exit Example: Step 7 Device(config-router)# exit Creates a prefix list for BGP next-hop route filtering.ip prefix-list list-name [seq seq-value] {deny network / length | permit network/length} [ge ge-value] [le le-value] Step 8 Selective next-hop route filtering supports prefix length matching or source protocol matching on a per address-family basis.Example: Device(config)# ip prefix-list FILTER25 seq 5 permit 0.0.0.0/0 le 25 The example creates a prefix list named FILTER25 that permits routes only if the mask length is more than 25; this will avoid aggregate routes being considered as the next-hop route. Configures a route map and enters route map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 9 Example: In this example, a route map named CHECK-NEXTHOP is created. If there is an IP PurposeCommand or Action Device(config)# route-map CHECK-NEXTHOP deny 10 address match in the followingmatch command, the IP address will be denied. Matches the IP addresses in the specified prefix list.match ip address prefix-list prefix-list-name [prefix-list-name...] Step 10 Use the prefix-list-name argument to specify the name of a prefix list. The ellipsis means that more than one prefix list can be specified. Example: Device(config-route-map)# match ip address prefix-list FILTER25 Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Exits route map configuration mode and enters global configuration mode. exit Example: Step 11 Device(config-route-map)# exit Configures a route map and enters route map configuration mode. route-map map-name [permit | deny] [sequence-number] Step 12 Example: In this example, all other IP addresses are permitted by route map CHECK-NEXTHOP. Device(config)# route-map CHECK-NEXTHOP permit 20 Exits route map configuration mode and enters privileged EXEC mode. end Example: Step 13 Device(config-route-map)# end Displays the entries in the BGP routing table.show ip bgp [network] [network-mask]Step 14 Example: Enter this command to view the next-hop addresses for each route. Device# show ip bgp Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Example The following example from the show ip bgp command shows the next-hop addresses for each route: BGP table version is 7, local router ID is 172.17.1.99 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path * 10.1.1.0/24 192.168.1.2 0 0 40000 i * 10.2.2.0/24 192.168.3.2 0 0 50000 i *> 172.16.1.0/24 0.0.0.0 0 32768 i *> 172.17.1.0/24 0.0.0.0 0 32768 Adjusting the Delay Interval for BGP Next-Hop Address Tracking Perform this task to adjust the delay interval between routing table walks for BGP next-hop address tracking. You can increase the performance of this feature by tuning the delay interval between full routing table walks to match the tuning parameters for the Interior Gateway protocol (IGP). The default delay interval is 5 seconds. This value is optimal for a fast-tuned IGP. In the case of an IGP that converges more slowly, you can change the delay interval to 20 seconds or more, depending on the IGP convergence time. BGP next-hop address tracking significantly improves the response time of BGP to next-hop changes in the RIB. However, unstable Interior Gateway Protocol (IGP) peers can introduce instability to BGP neighbor sessions. We recommend that you aggressively dampen unstable IGP peering sessions to reduce the possible impact to BGP. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. address-family ipv4 [[mdt |multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast]] 5. bgp nexthop trigger delay delay-timer 6. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode to create or configure a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 64512 Enter address family configuration mode to configure BGP peers to accept address family-specific configurations. address-family ipv4 [[mdt |multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast]] Step 4 Example: The example creates an IPv4 unicast address family session. Device(config-router)# address-family ipv4 unicast PurposeCommand or Action Configures the delay interval between routing table walks for next-hop address tracking. bgp nexthop trigger delay delay-timer Example: Step 5 The time period determines how long BGP will wait before starting a full routing table walk after notification is received. Device(config-router-af)# bgp nexthop trigger delay 20 The value for the delay-timer argument is a number from 1 to 100 seconds. The default value is 5 seconds. The example configures a delay interval of 20 seconds. Exits address-family configuration mode, and enters privileged EXEC mode. end Example: Step 6 Device(config-router-af)# end Disabling BGP Next-Hop Address Tracking Perform this task to disable BGP next-hop address tracking. BGP next-hop address tracking is enabled by default under the IPv4 and VPNv4 address families. Beginning with Cisco IOS Release 12.2(33)SB6, BGP next-hop address tracking is also enabled by default under the VPNv6 address family whenever the next hop is an IPv4 address mapped to an IPv6 next-hop address. Disabling next hop address tracking may be useful if you the network has unstable IGP peers and route dampening is not resolving the stability issues. To reenable BGP next-hop address tracking, use the bgp nexthopcommand with the trigger and enable keywords. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. address-family ipv4 [[mdt |multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast] | vpnv6 [unicast]] 5. no bgp nexthop trigger enable 6. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 PurposeCommand or Action Device# configure terminal Enters router configuration mod to create or configure a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 64512 Enter address family configuration mode to configure BGP peers to accept address family-specific configurations. address-family ipv4 [[mdt |multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast] | vpnv6 [unicast]] Step 4 The example creates an IPv4 unicast address family session.Example: Device(config-router)# address-family ipv4 unicast Disables BGP next-hop address tracking.no bgp nexthop trigger enableStep 5 Example: Next-hop address tracking is enabled by default for IPv4 and VPNv4 address family sessions. Device(config-router-af)# no bgp nexthop trigger enable • The example disables next-hop address tracking. Exits address-family configuration mode, and enters Privileged EXEC mode. end Example: Step 6 Device(config-router-af)# end Configuring Fast Session Deactivation The tasks in this section show how to configure BGP next-hop address tracking. BGP next-hop address tracking significantly improves the response time of BGP to next-hop changes in the RIB. However, unstable Interior Gateway Protocol (IGP) peers can introduce instability to BGP neighbor sessions. We recommend that you aggressively dampen unstable IGP peering sessions to reduce the possible impact to BGP. For more details about route dampening, see the "Configuring Internal BGP Features" module. Configuring Fast Session Deactivation for a BGP Neighbor Perform this task to establish a peering session with a BGP neighbor and then configure the peering session for fast session deactivation to improve the network convergence time if the peering session is deactivated. Enabling fast session deactivation for a BGP neighbor can significantly improve BGP convergence time. However, unstable IGP peers can still introduce instability to BGP neighbor sessions. We recommend that you aggressively dampen unstable IGP peering sessions to reduce the possible impact to BGP. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. address-family ipv4 [mdt |multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name] 5. neighbor ip-address remote-as autonomous-system-number 6. neighbor ip-address fall-over 7. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode to create or configure a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 50000 Enters address family configurationmode to configure BGP peers to accept address family-specific configurations. address-family ipv4 [mdt |multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name] Step 4 Example: The example creates an IPv4 unicast address family session. Device(config-router)# address-family ipv4 unicast Establishes a peering session with a BGP neighbor.neighbor ip-address remote-as autonomous-system-number Step 5 Example: Device(config-router-af)# neighbor 10.0.0.1 remote-as 50000 Configures the BGP peering to use fast session deactivation.neighbor ip-address fall-overStep 6 Example: BGP will remove all routes learned through this peer if the session is deactivated. Device(config-router-af)# neighbor 10.0.0.1 fall-over Exits configuration mode and returns to privileged EXEC mode. end Example: Step 7 Device(config-router-af)# end Configuring Selective Address Tracking for Fast Session Deactivation Perform this task to configure selective address tracking for fast session deactivation. The optional route-map keyword and map-name argument of the neighbor fall-over command are used to determine if a peering session with a BGP neighbor should be deactivated (reset) when a route to the BGP peer changes. The route map is evaluated against the new route, and if a deny statement is returned, the peer session is reset. Onlymatch ip address andmatch source-protocol commands are supported in the route map. No set commands or othermatch commands are supported. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number 5. neighbor ip-address fall-over [route-map map-name] 6. exit 7. ip prefix-list list-name [seq seq-value]{deny network / length | permit network / length}[ge ge-value] [le le-value] 8. route-map map-name [permit | deny][sequence-number] 9. match ip address prefix-list prefix-list-name [prefix-list-name...] 10. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Adds the IP address or peer group name of the neighbor in the specified autonomous system to the IPv4 multiprotocol BGP neighbor table of the local router. neighbor {ip-address| peer-group-name} remote-as autonomous-system-number Example: Step 4 PurposeCommand or Action Device(config-router)# neighbor 192.168.1.2 remote-as 40000 Applies a route map when a route to the BGP changes.neighbor ip-address fall-over [route-map map-name]Step 5 Example: In this example, the route map named CHECK-NBR is applied when the route to neighbor 192.168.1.2 changes.Device(config-router)# neighbor 192.168.1.2 fall-over route-map CHECK-NBR Exits router configuration mode and enters global configuration mode. exit Example: Step 6 Device(config-router)# exit Creates a prefix list for BGP next-hop route filtering.ip prefix-list list-name [seq seq-value]{deny network / length | permit network / length}[ge ge-value] [le le-value] Step 7 Selective next-hop route filtering supports prefix length matching or source protocol matching on a per-address-family basis.Example: Device(config)# ip prefix-list FILTER28 seq 5 permit 0.0.0.0/0 ge 28 The example creates a prefix list named FILTER28 that permits routes only if the mask length is greater than or equal to 28. Configures a route map and enters route-map configuration mode. route-map map-name [permit | deny][sequence-number] Example: Step 8 In this example, a route map named CHECK-NBR is created. If there is an IP address match in theDevice(config)# route-map CHECK-NBR permit 10 followingmatch command, the IP address will be permitted. Matches the IP addresses in the specified prefix list.match ip address prefix-list prefix-list-name [prefix-list-name...] Step 9 Use the prefix-list-name argument to specify the name of a prefix list. The ellipsis means that more than one prefix list can be specified. Example: Device(config-route-map)# match ip address prefix-list FILTER28 Only the syntax applicable to this task is used in this example. For more details, see the Cisco IOS IP Routing: BGP Command Reference. Note Exits configuration mode and returns to privileged EXEC mode. end Example: Step 10 Device(config-route-map)# end Configuration Examples for BGP Support for Next-Hop Address Tracking Example: Enabling and Disabling BGP Next-Hop Address Tracking In the following example, next-hop address tracking is disabled under the IPv4 address family session: router bgp 50000 address-family ipv4 unicast no bgp nexthop trigger enable Example: Adjusting the Delay Interval for BGP Next-Hop Address Tracking In the following example, the delay interval for next-hop tracking is configured to occur every 20 seconds under the IPv4 address family session: router bgp 50000 address-family ipv4 unicast bgp nexthop trigger delay 20 Examples: Configuring BGP Selective Next-Hop Route Filtering The following example shows how to configure BGP selective next-hop route filtering to avoid using a BGP prefix as the next-hop route. If the most specific route that covers the next hop is a BGP route, then the BGP route will be marked as unreachable. The next hop must be an IGP or static route. router bgp 45000 address-family ipv4 unicast bgp nexthop route-map CHECK-BGP exit exit route-map CHECK-BGP deny 10 match source-protocol bgp 1 exit route-map CHECK-BGP permit 20 end The following example shows how to configure BGP selective next-hop route filtering to avoid using a BGP prefix as the next-hop route and to ensure that the prefix is more specific than /25. router bgp 45000 address-family ipv4 unicast bgp nexthop route-map CHECK-BGP25 exit exit ip prefix-list FILTER25 seq 5 permit 0.0.0.0/0 le 25 route-map CHECK-BGP25 deny 10 match ip address prefix-list FILTER25 exit route-map CHECK-BGP25 deny 20 match source-protocol bgp 1 exit route-map CHECK-BGP25 permit 30 end Example: Configuring Fast Session Deactivation for a BGP Neighbor In the following example, the BGP routing process is configured on device A and device B to monitor and use fast peering session deactivation for the neighbor session between the two devices. Although fast peering session deactivation is not required at both devices in the neighbor session, it will help the BGP networks in both autonomous systems to converge faster if the neighbor session is deactivated. Device A router bgp 40000 neighbor 192.168.1.1 remote-as 45000 neighbor 192.168.1.1 fall-over end Device B router bgp 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.1.2 fall-over end Example:ConfiguringSelectiveAddressTrackingforFastSessionDeactivation The following example shows how to configure the BGP peering session to be reset if a route with a prefix of /28 or a more specific route to a peer destination is no longer available: router bgp 45000 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.1.2 fall-over route-map CHECK-NBR exit ip prefix-list FILTER28 seq 5 permit 0.0.0.0/0 ge 28 route-map CHECK-NBR permit 10 match ip address prefix-list FILTER28 end Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IP Routing: BGP Command Reference BGP commands Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP Support for Next-Hop Address Tracking Table 35: Feature Information for BGP Support for Next-Hop Address Tracking Feature InformationReleasesFeature Name The BGP Support for Next-Hop Address Tracking feature is enabled by default when a supporting Cisco IOS software image is installed. BGP next-hop address tracking is event driven. BGP prefixes are automatically tracked as peering sessions are established. Next-hop changes are rapidly reported to the BGP routing process as they are updated in the RIB. This optimization improves overall BGP convergence by reducing the response time to next-hop changes for routes installed in the RIB. When a bestpath calculation is run in between BGP scanner cycles, only next-hop changes are tracked and processed. This feature was introduced on the Cisco ASR 1000 Series Routers. The following command was introduced in this feature: bgp nexthop. Cisco IOS XE Release 2.1BGP Support for Next-Hop Address Tracking Feature InformationReleasesFeature Name The BGP Selective Address Tracking feature introduces the use of a route map for next-hop route filtering and fast session deactivation. Selective next-hop filtering uses a route map to selectively define routes to help resolve the BGP next hop, or a route map can be used to determine if a peering session with a BGP neighbor should be reset when a route to the BGP peer changes. This feature was introduced on the Cisco ASR 1000 Series Routers. The following commands were modified by this feature: bgp nexthop, neighbor fall-over. 12.2(31)SB 12.2(33)SRB Cisco IOS XE Release 2.1 BGP Selective Address Tracking The BGP Support for Fast Peering Session Deactivation feature introduced an event-driven notification system that allows a Border Gateway Protocol (BGP) process to monitor BGP peering sessions on a per-neighbor basis. This feature improves the response time of BGP to adjacency changes by allowing BGP to detect an adjacency change and deactivate the terminated session in between standard BGP scanning intervals. Enabling this feature improves overall BGP convergence. This feature was introduced on the Cisco ASR 1000 Series Routers. The following command was modified by this feature: neighbor fall-over. 12.2(33)SRA 12.2(31)SB Cisco IOS XE Release 2.1 BGP Support for Fast Peering Session Deactivation C H A P T E R 20 BGP Restart Neighbor Session After Max-Prefix Limit Reached The BGP Restart Session After Max-Prefix Limit Reached feature adds the restart keyword to the neighbor maximum-prefix command. This allows a network operator to configure the time interval at which a peering session is reestablished by a device when the number of prefixes that have been received from a peer has exceeded the maximum prefix limit. Finding Feature Information, on page 435 Information About BGP Neighbor Session Restart After Max-Prefix Limit Reached, on page 435 How to Configure a Device to Reestablish a Neighbor Session After the Maximum Prefix Limit Has Been Exceeded, on page 437 Configuration Example for BGP Restart Neighbor Session After Max-Prefix Limit Reached, on page 441 Additional References for BGP Restart Neighbor Session After Max-Prefix Limit Reached, on page 441 Feature Information for BGP Restart Neighbor Session after Max-Prefix Limit, on page 442 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP Neighbor Session Restart After Max-Prefix Limit Reached Prefix Limits and BGP Peering Sessions Use the neighbormaximum-prefix command to limit the maximum number of prefixes that a device running BGP can receive from a peer.When the device receives too many prefixes from a peer and the maximum-prefix limit is exceeded, the peering session is disabled or brought down. The session stays down until the network operator manually brings the session back up by entering the clear ip bgp command, which clears stored prefixes. BGP Neighbor Session Restart with the Maximum Prefix Limit The restart keyword was added to the neighbor maximum-prefix command so that a network operator can configure a device to automatically reestablish a BGP neighbor peering session when the peering session has been disabled or brought down. The time interval at which peering can be reestablished automatically is configurable. The restart-interval for the restart keyword is specified in minutes; range is from 1 to 65,535 minutes. Subcodes for BGP Cease Notification Border Gateway Protocol (BGP) imposes maximum limits on the maximum number of prefixes that are accepted from a peer for a given address family. This limitation safeguards the device from resource depletion caused by misconfiguration, either locally or on the remote neighbor. To prevent a peer from flooding BGP with advertisements, a limit is placed on the number of prefixes that are accepted from a peer for each supported address family. The default limits can be overridden through configuration of the maximum-prefix limit command for the peer for the appropriate address family. The following subcodes are supported for the BGP cease notification message: Maximum number of prefixes reached Administrative shutdown Peer de-configured Administrative reset A cease notification message is sent to the neighbor and the peering with the neighbor is terminated when the number of prefixes received from the peer for a given address family exceeds the maximum limit (either set by default or configured by the user) for that address family. It is possible that the maximum number of prefixes for a neighbor for a given address family has been configured after the peering with the neighbor has been established and a certain number of prefixes have already been received from the neighbor for that address family. A cease notificationmessage is sent to the neighbor and peering with the neighbor is terminated immediately after the configuration if the configured maximum number of prefixes is fewer than the number of prefixes that have already been received from the neighbor for the address family. How to Configure a Device to Reestablish a Neighbor Session After the Maximum Prefix Limit Has Been Exceeded Configuring a Router to Reestablish a Neighbor Session After the Maximum Prefix Limit Reached Perform this task to configure the time interval at which a BGP neighbor session is reestablished by a device when the number of prefixes that have been received from a BGP peer has exceeded the maximum prefix limit. The network operator can configure a device running BGP to automatically reestablish a neighbor session that has been brought down because the configuredmaximum-prefix limit has been exceeded. No intervention from the network operator is required when this feature is enabled. This task attempts to reestablish a disabled BGP neighbor session at the configured time interval that is specified by the network operator. However, the configuration of the restart timer alone cannot change or correct a peer that is sending an excessive number of prefixes. The network operator will need to reconfigure the maximum-prefix limit or reduce the number of prefixes that are sent from the peer. A peer that is configured to send too many prefixes can cause instability in the network, where an excessive number of prefixes are rapidly advertised and withdrawn. In this case, thewarning-only keyword of the neighbormaximum-prefix command can be configured to disable the restart capability while the network operator corrects the underlying problem. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor {ip-address | ipv6-address | peer-group-name} peer-group 5. neighbor {ip-address | ipv6-address% | peer-group-name} peer-group peer-group-name 6. neighbor {ip-address | ipv6-address% | peer-group-name} remote-as autonomous-system-number [ alternate-as autonomous-system-number...] 7. neighbor {ip-address | ipv6-address% | peer-group-name} remote-as autonomous-system-number [ alternate-as autonomous-system-number...] 8. neighbor {ip-address | ipv6-address% | }maximum-prefix maximum [threshold] [restart minutes] [warning-only] 9. end 10. show ip bgp neighbors ip-address DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 PurposeCommand or Action Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 101 Creates a BGP or multiprotocol BGP peer group.neighbor {ip-address | ipv6-address | peer-group-name} peer-group Step 4 Example: Device(config-router)# neighbor internal peer-group Configures a BGP neighbor to member of a peer group.neighbor {ip-address | ipv6-address% | peer-group-name} peer-group peer-group-name Step 5 % keyword is the IPv6 link-local address identifier. This keyword needs to be addedwhenever a link-localExample: IPv6 address is used outside the context of its interface.Device(config-router)# neighbor 10.4.9.5 peer-group internal Adds a peer group to the BGP or multiprotocol BGP neighbor table. neighbor {ip-address | ipv6-address% | peer-group-name} remote-as autonomous-system-number [ alternate-as autonomous-system-number...] Step 6 Example: Device(config-router)# neighbor internal remote-as 100 Adds an entry to the BGP or multiprotocol BGP neighbor table. neighbor {ip-address | ipv6-address% | peer-group-name} remote-as autonomous-system-number [ alternate-as autonomous-system-number...] Step 7 Example: Device(config-router)# neighbor 10.4.9.5 remote-as 100 Configures the maximum-prefix limit on a router that is running BGP. neighbor {ip-address | ipv6-address% | } maximum-prefixmaximum [threshold] [restartminutes] [warning-only] Step 8 Use the restart keyword and minutes argument to configure the router to automatically reestablish aExample: neighbor session that has been disabled because the PurposeCommand or Action Device(config-router)# neighbor 10.4.9.5 maximum-prefix 1000 90 restart 60 maximum-prefix limit has been exceeded. The configurable range of minutes is from 1 to 65535 minutes. Use the warning-only keyword to configure the device to disable the restart capability to allow you to adjust a peer that is sending too many prefixes. If the minutes argument is not configured, the disabled session will stay down after the maximum-prefix limit is exceeded. This is the default behavior. Note Exits router configuration mode and enters privileged EXEC mode. end Example: Step 9 Device(config-router)# end (Optional) Displays information about the TCP and BGP connections to neighbors. show ip bgp neighbors ip-address Example: Step 10 In this example, the output from this command will display the maximum prefix limit for the specified neighbor and the configured restart timer value. Device# show ip bgp neighbors 10.4.9.5 Examples The following sample output from the show ip bgp neighbors command verifies that a device has been configured to automatically reestablish disabled neighbor sessions. The output shows that the maximum prefix limit for neighbor 10.4.9.5 is set to 1000 prefixes, the restart threshold is set to 90 percent, and the restart interval is set at 60 minutes. Device# show ip bgp neighbors 10.4.9.5 BGP neighbor is 10.4.9.5, remote AS 101, internal link BGP version 4, remote router ID 10.4.9.5 BGP state = Established, up for 2w2d Last read 00:00:14, hold time is 180, keepalive interval is 60 seconds Neighbor capabilities: Route refresh: advertised and received(new) Address family IPv4 Unicast: advertised and received Message statistics: InQ depth is 0 OutQ depth is 0 Sent Rcvd Opens: 1 1 Notifications: 0 0 Updates: 0 0 Keepalives: 23095 23095 Route Refresh: 0 0 Total: 23096 23096 Default minimum time between advertisement runs is 5 seconds For address family: IPv4 Unicast BGP table version 1, neighbor versions 1/0 1/0 Output queue sizes : 0 self, 0 replicated Index 2, Offset 0, Mask 0x4 Member of update-group 2 Sent Rcvd Prefix activity: ---- ---- Prefixes Current: 0 0 Prefixes Total: 0 0 Implicit Withdraw: 0 0 Explicit Withdraw: 0 0 Used as bestpath: n/a 0 Used as multipath: n/a 0 Outbound Inbound Local Policy Denied Prefixes: -------- ------- Total: 0 0 !Configured maximum number of prefixes and restart interval information! Maximum prefixes allowed 1000 Threshold for warning message 90%, restart interval 60 min Number of NLRIs in the update sent: max 0, min 0 Connections established 1; dropped 0 Last reset never Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Local host: 10.4.9.21, Local port: 179 Foreign host: 10.4.9.5, Foreign port: 11871 Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) Event Timers (current time is 0x5296BD2C): Timer Starts Wakeups Next Retrans 23098 0 0x0 TimeWait 0 0 0x0 AckHold 23096 22692 0x0 SendWnd 0 0 0x0 KeepAlive 0 0 0x0 GiveUp 0 0 0x0 PmtuAger 0 0 0x0 DeadWait 0 0 0x0 iss: 1900546793 snduna: 1900985663 sndnxt: 1900985663 sndwnd: 14959 irs: 2894590641 rcvnxt: 2895029492 rcvwnd: 14978 delrcvwnd: 1406 SRTT: 300 ms, RTTO: 607 ms, RTV: 3 ms, KRTT: 0 ms minRTT: 0 ms, maxRTT: 316 ms, ACK hold: 200 ms Flags: passive open, nagle, gen tcbs Datagrams (max data segment is 1460 bytes): Rcvd: 46021 (out of order: 0), with data: 23096, total data bytes: 438850 Sent: 46095 (retransmit: 0, fastretransmit: 0), with data: 23097, total data by9 Troubleshooting Tips Use the clear ip bgp command to reset a BGP connection using BGP soft reconfiguration. This command can be used to clear stored prefixes to prevent a device that is running BGP from exceeding themaximum-prefix limit. Display of the following error messages can indicate an underlying problem that is causing the neighbor session to become disabled. You should check the values configured for the neighbor maximum-prefix command and the configuration of any peers that are sending an excessive number of prefixes. The following sample error messages are similar to the error messages that may be displayed: 00:01:14:%BGP-5-ADJCHANGE:neighbor 10.10.10.2 Up 00:01:14:%BGP-4-MAXPFX:No. of unicast prefix received from 10.10.10.2 reaches 5, max 6 00:01:14:%BGP-3-MAXPFXEXCEED:No.of unicast prefix received from 10.10.10.2:7 exceed limit6 00:01:14:%BGP-5-ADJCHANGE:neighbor 10.10.10.2 Down - BGP Notification sent 00:01:14:%BGP-3-NOTIFICATION:sent to neighbor 10.10.10.2 3/1 (update malformed) 0 byte The bgp dampening command can be used to configure the dampening of a flapping route or interface when a peer is sending too many prefixes and causing network instability. Use this command only when troubleshooting or tuning a device that is sending an excessive number of prefixes. For more details about BGP route dampening, see the “Configuring Advanced BGP Features” module. Configuration Example for BGP Restart Neighbor Session After Max-Prefix Limit Reached Example: Configuring a Router to Reestablish a Neighbor Session After the Maximum Prefix Limit Reached The following example sets the maximum number of prefixes allowed from the neighbor at 192.168.6.6 to 2000 and configures the device to reestablish a peering session after 30 minutes if one has been disabled: Device(config)# router bgp 101 Device(config-router)# neighbor internal peer-group Device(config-router)# neighbor 10.4.9.5 peer-group internal Device(config-router)# neighbor internal remote-as 100 Device(config-router)# neighbor 10.4.9.5 remote-as 100 Device(config-router)# neighbor 10.4.9.5 maximum-prefix 2000 90 restart 30 Device(config-router)# end Additional References for BGP Restart Neighbor Session After Max-Prefix Limit Reached Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IP Routing: BGP Command Reference BGP commands Standards and RFCs TitleStandard/RFC Route Refresh Capability for BGP-4RFC 2918 Subcodes for BGPCease NotificationMessageRFC 4486 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP Restart Neighbor Session after Max-Prefix Limit The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 36: Feature Information for BGP Restart Session After Max-Prefix Limit Feature InformationReleasesFeature Name The BGP Restart Session After Max-Prefix Limit Reached feature adds the restart keyword to the neighbor maximum-prefix command. This allows a network operator to configure the time interval at which a peering session is reestablished by a device when the number of prefixes that have been received from a peer has exceeded the maximum prefix limit. This feature was introduced on the Cisco ASR 1000 Series Aggregation Services Routers. The following commands were modified: neighbor maximum-prefix and show ip bgp neighbors. Cisco IOS XE Release 2.1BGP Restart Session After Max-Prefix Limit Support for subcodes for BGP cease notification has been added. Cisco IOS XE Release 3.13SBGP—Subcodes for BGP Cease Notification C H A P T E R 21 BGP Support for Dual AS Configuration for Network AS Migrations The BGP Support for Dual AS Configuration for Network AS Migrations feature extended the functionality of the BGP Local-AS feature by providing additional autonomous system path customization configuration options. The configuration of this feature is transparent to customer peering sessions, allowing the provider to merge two autonomous systems without interrupting customer peering arrangements. Customer peering sessions can later be updated during a maintenance window or during other scheduled downtime. Finding Feature Information, on page 443 Information About BGP Support for Dual AS Configuration for Network AS Migrations, on page 443 How to Configure BGP Support for Dual AS Configuration for Network AS Migrations, on page 445 Configuration Examples for Dual-AS Peering for Network Migration, on page 447 Additional References, on page 449 Feature Information for BGP Support for Dual AS Configuration for Network AS Migrations, on page 449 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP Support for Dual AS Configuration for Network AS Migrations Autonomous System Migration for BGP Networks Autonomous system migration can be necessary when a telecommunications or Internet service provider purchases another network. It is desirable for the provider to be able to integrate the second autonomous system without disrupting existing customer peering arrangements. The amount of configuration required in the customer networks canmake this a cumbersome task that is difficult to complete without disrupting service. Dual Autonomous System Support for BGP Network Autonomous System Migration In Cisco IOS Release 12.0(29)S, 12.3(14)T, 12.2(33)SXH, and later releases, support was added for dual BGP autonomous system configuration to allow a secondary autonomous system to merge under a primary autonomous system, without disrupting customer peering sessions. The configuration of this feature is transparent to customer networks. Dual BGP autonomous system configuration allows a router to appear, to external peers, as a member of secondary autonomous system during the autonomous system migration. This feature allows the network operator to merge the autonomous systems and then later migrate customers to new configurations during normal service windows without disrupting existing peering arrangements. The neighbor local-as command is used to customize the AS_PATH attribute by adding and removing autonomous system numbers for routes received from eBGP neighbors. This feature allows a router to appear to external peers as a member of another autonomous system for the purpose of autonomous system number migration. This feature simplifies this process of changing the autonomous system number in a BGP network by allowing the network operator to merge a secondary autonomous system into a primary autonomous system and then later update the customer configurations during normal service windows without disrupting existing peering arrangements. BGP Autonomous System Migration Support for Confederations, Individual Peering Sessions, and Peer Groupings This feature supports confederations, individual peering sessions, and configurations applied through peer groups and peer templates. If this feature is applied to group peers, the individual peers cannot be customized. Ingress Filtering During BGP Autonomous System Migration Autonomous system path customization increases the possibility that routing loops can be created if such customization is misconfigured. The larger the number of customer peerings, the greater the risk. You can minimize this possibility by applying policies on the ingress interfaces to block the autonomous system number that is in transition or routes that have no local-as configuration. BGP prepends the autonomous system number from each BGP network that a route traverses to maintain network reachability information and to prevent routing loops. This feature should be configured only for autonomous system migration and should be deconfigured after the transition has been completed. This procedure should be attempted only by an experienced network operator, as routing loops can be created with improper configuration. Caution BGP Network Migration to 4-Byte Autonomous System Numbers The BGP Support for 4-Byte ASN feature introduced support for 4-byte autonomous system numbers. Because of increased demand for autonomous system numbers, in January 2009 the IANA started to allocate 4-byte autonomous system numbers in the range from 65536 to 4294967295. The Cisco implementation of 4-byte autonomous system numbers supports RFC 4893. RFC 4893was developed to allow BGP to support a gradual transition from 2-byte autonomous system numbers to 4-byte autonomous system numbers. A new reserved (private) autonomous system number, 23456, was created by RFC 4893 and this number cannot be configured as an autonomous system number in the Cisco IOS CLI. Migrating your BGP network to 4-byte autonomous system numbers requires some planning. If you are upgrading to an image that supports 4-byte autonomous system numbers, you can still use 2-byte autonomous system numbers. The show command output and regular expression match are not changed and remain in asplain (decimal value) format for 2-byte autonomous system numbers regardless of the format configured for 4-byte autonomous system numbers. To ensure a smooth transition, we recommend that all BGP speakers within an autonomous system that is identified using a 4-byte autonomous system number be upgraded to support 4-byte autonomous system numbers. For details about steps to perform to upgrade a BGP network to full 4-byte autonomous system support, see the Migration Guide for Explaining 4-Byte Autonomous System white paper. How to Configure BGP Support for Dual AS Configuration for Network AS Migrations Configuring Dual AS Peering for Network Migration Perform this task to configure a BGP peer router to appear to external peers as a member of another autonomous system for the purpose of autonomous system number migration. When the BGP peer is configured with dual autonomous system numbers then the network operator can merge a secondary autonomous system into a primary autonomous system and update the customer configuration during a future service window without disrupting existing peering arrangements. The show ip bgp and show ip bgp neighbors commands can be used to verify autonomous system number for entries in the routing table and the status of this feature. The BGP Support for Dual AS Configuration for Network AS Migrations feature can be configured for only true eBGP peering sessions. This feature cannot be configured for two peers in different subautonomous systems of a confederation. The BGP Support for Dual AS Configuration for Network AS Migrations feature can be configured for individual peering sessions and configurations applied through peer groups and peer templates. If this command is applied to a peer group, the peers cannot be individually customized. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. neighbor ip-address local-as [autonomous-system-number [no-prepend [replace-as [dual-as]]]] 6. neighbor ip-address remove-private-as 7. end 8. show ip bgp [network] [network-mask] [longer-prefixes] [prefix-list prefix-list-name | route-map route-map-name] [shorter-prefixes mask-length] 9. show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | paths regexp | dampened-routes | received prefix-filter] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configurationmode, and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 40000 Establishes a peering session with a BGP neighbor.neighbor ip-address remote-as autonomous-system-number Step 4 Example: Router(config-router)# neighbor 10.0.0.1 remote-as 45000 Customizes the AS_PATH attribute for routes received from an eBGP neighbor. neighbor ip-address local-as [autonomous-system-number [no-prepend [replace-as [dual-as]]]] Step 5 The replace-as keyword is used to prepend only the local autonomous system number (as configured withExample: the ip-address argument) to the AS_PATH attribute. Router(config-router)# neighbor 10.0.0.1 local-as 50000 no-prepend replace-as dual-as The autonomous system number from the local BGP routing process is not prepended. The dual-as keyword is used to configure the eBGP neighbor to establish a peering session using the real autonomous-system number (from the local BGP routing process) or by using the autonomous system number configured with the ip-address argument (local-as). The example configures the peering session with the 10.0.0.1 neighbor to accept the real autonomous system number and the local-as number. PurposeCommand or Action (Optional) Removes private autonomous system numbers from outbound routing updates. neighbor ip-address remove-private-as Example: Step 6 This command can be used with the replace-as functionality to remove the private autonomous systemRouter(config-router)# neighbor 10.0.0.1 remove-private-as number and replace it with an external autonomous system number. Private autonomous system numbers (64512 to 65535) are automatically removed from the AS_PATH attribute when this command is configured. Exits router configurationmode and enters privileged EXEC mode. end Example: Step 7 Router(config-router)# end Displays entries in the BGP routing table.show ip bgp [network] [network-mask] [longer-prefixes] [prefix-list prefix-list-name | route-map route-map-name] [shorter-prefixes mask-length] Step 8 The output can be used to verify if the real autonomous system number or local-as number is configured. Example: Router# show ip bgp Displays information about TCP and BGP connections to neighbors. show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | paths regexp | dampened-routes | received prefix-filter] Step 9 The output will display local AS, no-prepend, replace-as, and dual-as with the correspondingExample: autonomous system number when these options are configured.Router# show ip bgp neighbors Configuration Examples for Dual-AS Peering for Network Migration Example: Dual AS Configuration The following examples shows how this feature is used to merge two autonomous systems without interrupting peering arrangements with the customer network. The neighbor local-as command is configured to allow Router 1 to maintain peering sessions through autonomous system 40000 and autonomous system 45000. Router 2 is a customer router that runs a BGP routing process in autonomous system 50000 and is configured to peer with autonomous-system 45000. Router 1 in Autonomous System 40000 (Provider Network) interface Serial3/0 ip address 10.3.3.11 255.255.255.0 ! router bgp 40000 no synchronization bgp router-id 10.0.0.11 neighbor 10.3.3.33 remote-as 50000 neighbor 10.3.3.33 local-as 45000 no-prepend replace-as dual-as Router 1 in Autonomous System 45000 (Provider Network) interface Serial3/0 ip address 10.3.3.11 255.255.255.0 ! router bgp 45000 bgp router-id 10.0.0.11 neighbor 10.3.3.33 remote-as 50000 Router 2 in Autonomous System 50000 (Customer Network) interface Serial3/0 ip address 10.3.3.33 255.255.255.0 ! router bgp 50000 bgp router-id 10.0.0.3 neighbor 10.3.3.11 remote-as 45000 After the transition is complete, the configuration on router 50000 can be updated to peer with autonomous system 40000 during a normal maintenance window or during other scheduled downtime: neighbor 10.3.3.11 remote-as 100 Example: Dual AS Confederation Configuration The following example can be used in place of the Router 1 configuration in the "Example: Dual AS Configuration" example. The only difference between these configurations is that Router 1 is configured to be part of a confederation. interface Serial3/0/0 ip address 10.3.3.11 255.255.255.0 ! router bgp 65534 no synchronization bgp confederation identifier 100 bgp router-id 10.0.0.11 neighbor 10.3.3.33 remote-as 50000 neighbor 10.3.3.33 local-as 45000 no-prepend replace-as dual-as Example: Replace an AS with Another AS in Routing Updates The following example strips private autonomous system 64512 from outbound routing updates for the 10.3.3.33 neighbor and replaces it with autonomous system 50000: router bgp 64512 neighbor 10.3.3.33 local-as 50000 no-prepend replace-as Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP Support for Dual AS Configuration for Network AS Migrations The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 37: Feature Information for BGP Support for Dual AS Configuration for Network AS Migrations Feature InformationReleasesFeature Name The BGP Support for Dual AS Configuration for Network AS Migrations feature extended the functionality of the BGP Local-AS feature by providing additional autonomous system path customization configuration options. The configuration of this feature is transparent to customer peering sessions, allowing the provider to merge two autonomous systems without interrupting customer peering arrangements. Customer peering sessions can later be updated during a maintenance window or during other scheduled downtime. This feature was introduced on the Cisco ASR 1000 Series Routers. The following command was modified by this feature: neighbor local-as. 12.2(33)SRA Cisco IOS XE Release 2.1 BGP Support for Dual AS Configuration for Network AS Migrations C H A P T E R 22 Configuring Internal BGP Features This module describes how to configure internal Border Gateway Protocol (BGP) features. Internal BGP (iBGP) refers to running BGP on networking devices within one autonomous system. BGP is an interdomain routing protocol designed to provide loop-free routing between separate routing domains (autonomous systems) that contain independent routing policies. Many companies now have large internal networks, and there are many issues involved in scaling the existing internal routing protocols to match the increasing traffic demands while maintaining network efficiency. Finding Feature Information, on page 451 Information About Internal BGP Features, on page 451 How to Configure Internal BGP Features, on page 457 Configuration Examples for Internal BGP Features, on page 469 Additional References for Internal BGP Features, on page 472 Feature Information for Configuring Internal BGP Features, on page 473 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About Internal BGP Features BGP Routing Domain Confederation One way to reduce the internal BGP (iBGP) mesh is to divide an autonomous system into multiple subautonomous systems and group them into a single confederation. To the outside world, the confederation looks like a single autonomous system. Each autonomous system is fully meshed within itself and has a few connections to other autonomous systems in the same confederation. Even though the peers in different autonomous systems have external BGP (eBGP) sessions, they exchange routing information as if they were iBGP peers. Specifically, the next hop, Multi Exit Discriminator (MED) attribute, and local preference information are preserved. This feature allows the you to retain a single Interior Gateway Protocol (IGP) for all of the autonomous systems. To configure a BGP confederation, you must specify a confederation identifier. To the outside world, the group of autonomous systems will look like a single autonomous system with the confederation identifier as the autonomous system number. BGP Route Reflector BGP requires that all iBGP speakers be fully meshed. However, this requirement does not scale well when there are many iBGP speakers. Instead of configuring a confederation, another way to reduce the iBGP mesh is to configure a route reflector. The figure below illustrates a simple iBGP configuration with three iBGP speakers (Routers A, B, and C). Without route reflectors, when Router A receives a route from an external neighbor, it must advertise it to both routers B and C. Routers B and C do not readvertise the iBGP learned route to other iBGP speakers because the routers do not pass on routes learned from internal neighbors to other internal neighbors, thus preventing a routing information loop. Figure 38: Three Fully Meshed iBGP Speakers With route reflectors, all iBGP speakers need not be fully meshed because there is a method to pass learned routes to neighbors. In this model, an iBGP peer is configured to be a route reflector responsible for passing iBGP learned routes to a set of iBGP neighbors. In the figure below, Router B is configured as a route reflector. When the route reflector receives routes advertised from Router A, it advertises them to Router C, and vice versa. This scheme eliminates the need for the iBGP session between Routers A and C. Figure 39: Simple BGP Model with a Route Reflector The internal peers of the route reflector are divided into two groups: client peers and all the other routers in the autonomous system (nonclient peers). A route reflector reflects routes between these two groups. The route reflector and its client peers form a cluster. The nonclient peers must be fully meshed with each other, but the client peers need not be fully meshed. The clients in the cluster do not communicate with iBGP speakers outside their cluster. The figure below illustrates a more complex route reflector scheme. Router A is the route reflector in a cluster with routers B, C, and D. Routers E, F, and G are fully meshed, nonclient routers. Figure 40: More Complex BGP Route Reflector Model When the route reflector receives an advertised route, depending on the neighbor, it takes the following actions: A route from an external BGP speaker is advertised to all clients and nonclient peers. A route from a nonclient peer is advertised to all clients. A route from a client is advertised to all clients and nonclient peers. Hence, the clients need not be fully meshed. Along with route reflector-aware BGP speakers, it is possible to have BGP speakers that do not understand the concept of route reflectors. They can be members of either client or nonclient groups allowing an easy and gradual migration from the old BGPmodel to the route reflector model. Initially, you could create a single cluster with a route reflector and a few clients. All the other iBGP speakers could be nonclient peers to the route reflector and then more clusters could be created gradually. An autonomous system can have multiple route reflectors. A route reflector treats other route reflectors just like other iBGP speakers. A route reflector can be configured to have other route reflectors in a client group or nonclient group. In a simple configuration, the backbone could be divided into many clusters. Each route reflector would be configured with other route reflectors as nonclient peers (thus, all the route reflectors will be fully meshed). The clients are configured to maintain iBGP sessions with only the route reflector in their cluster. Usually a cluster of clients will have a single route reflector. In that case, the cluster is identified by the router ID of the route reflector. To increase redundancy and avoid a single point of failure, a cluster might have more than one route reflector. In this case, all route reflectors in the cluster must be configured with the 4-byte cluster ID so that a route reflector can recognize updates from route reflectors in the same cluster. All the route reflectors serving a cluster should be fully meshed and all of them should have identical sets of client and nonclient peers. Route Reflector Mechanisms to Avoid Routing Loops As the iBGP learned routes are reflected, routing information may loop. The route reflector model has the following mechanisms to avoid routing loops: Originator ID is an optional, nontransitive BGP attribute. It is a 4-byte attribute created by a route reflector. The attribute carries the router ID of the originator of the route in the local autonomous system. Therefore, if a misconfiguration causes routing information to come back to the originator, the information is ignored. Cluster-list is an optional, nontransitive BGP attribute. It is a sequence of cluster IDs that the route has passed.When a route reflector reflects a route from its clients to nonclient peers, and vice versa, it appends the local cluster ID to the cluster list. If the cluster list is empty, a new cluster list is created. Using this attribute, a route reflector can identify if routing information is looped back to the same cluster due to misconfiguration. If the local cluster ID is found in the cluster list, the advertisement is ignored. The use of set clauses in outbound route maps can modify attributes and possibly create routing loops. To avoid this behavior, most set clauses of outbound route maps are ignored for routes reflected to iBGP peers. The only set clause of an outbound route map that is acted upon is the set ip next-hop clause. BGP Outbound Route Map on Route Reflector to Set IP Next Hop for iBGP Peer The BGP Outbound Route Map on Route Reflector to Set IP Next Hop feature allows a route reflector to modify the next hop attribute for a reflected route. The use of set clauses in outbound route maps can modify attributes and possibly create routing loops. To avoid this behavior, most set clauses of outbound route maps are ignored for routes reflected to iBGP peers. The only set clause of an outbound route map on a route reflector (RR) that is acted upon is the set ip next-hop clause. The set ip next-hop clause is applied to reflected routes. Configuring an RRwith an outbound route map allows a network administrator to modify the next hop attribute for a reflected route. By configuring a route map with the set ip next-hop clause, the administrator puts the RR into the forwarding path, and can configure iBGP multipath load sharing to achieve load balancing. That is, the RR can distribute outgoing packets amongmultiple egress points. See the “Configuring iBGPMultipath Load Sharing” module. Incorrectly setting BGP attributes for reflected routes can cause inconsistent routing, routing loops, or a loss of connectivity. Setting BGP attributes for reflected routes should be attempted only by someone who has a good understanding of the design implications. Caution BGP Route Dampening Route dampening is a BGP feature designed to minimize the propagation of flapping routes across an internetwork. A route is considered to be flapping when its availability alternates repeatedly. For example, consider a network with three BGP autonomous systems: autonomous system 1, autonomous system 2, and autonomous system 3. Suppose the route to network A in autonomous system 1 flaps (it becomes unavailable). Under circumstances without route dampening, the eBGP neighbor of autonomous system 1 to autonomous system 2 sends a withdraw message to autonomous system 2. The border router in autonomous system 2, in turn, propagates the withdraw message to autonomous system 3. When the route to network A reappears, autonomous system 1 sends an advertisement message to autonomous system 2, which sends it to autonomous system 3. If the route to network A repeatedly becomes unavailable, then available, many withdrawal and advertisement messages are sent. This is a problem in an internetwork connected to the Internet because a route flap in the Internet backbone usually involves many routes. No penalty is applied to a BGP peer reset when route dampening is enabled. Although the reset withdraws the route, no penalty is applied in this instance, even if route flap dampening is enabled. Note Route Dampening Minimizes Route Flapping The route dampening feature minimizes the flapping problem as follows. Suppose again that the route to network A flaps. The router in autonomous system 2 (where route dampening is enabled) assigns network A a penalty of 1000 and moves it to history state. The router in autonomous system 2 continues to advertise the status of the route to neighbors. The penalties are cumulative. When the route flaps so often that the penalty exceeds a configurable suppress limit, the router stops advertising the route to network A, regardless of how many times it flaps. Thus, the route is dampened. The penalty placed on network A is decayed until the reuse limit is reached, upon which the route is once again advertised. At half of the reuse limit, the dampening information for the route to network A is removed. BGP Route Dampening Terms The following terms are used when describing route dampening: Flap—A route whose availability alternates repeatedly. History state—After a route flaps once, it is assigned a penalty and put into history state, meaning the router does not have the best path, based on historical information. Penalty—Each time a route flaps, the router configured for route dampening in another autonomous system assigns the route a penalty of 1000. Penalties are cumulative. The penalty for the route is stored in the BGP routing table until the penalty exceeds the suppress limit. At that point, the route state changes from history to damp. Damp state—In this state, the route has flapped so often that the router will not advertise this route to BGP neighbors. Suppress limit—A route is suppressed when its penalty exceeds this limit. The default value is 2000. Half-life—Once the route has been assigned a penalty, the penalty is decreased by half after the half-life period (which is 15 minutes by default). The process of reducing the penalty happens every 5 seconds. Reuse limit—As the penalty for a flapping route decreases and falls below this reuse limit, the route is unsuppressed. That is, the route is added back to the BGP table and once again used for forwarding. The default reuse limit is 750. The process of unsuppressing routes occurs at 10-second increments. Every 10 seconds, the router finds out which routes are now unsuppressed and advertises them to the world. Maximum suppress limit—This value is the maximum amount of time a route can be suppressed. The default value is four times the half-life. The routes external to an autonomous system learned via iBGP are not dampened. This policy prevent the iBGP peers from having a higher penalty for routes external to the autonomous system. BGP Route Map Next Hop Self The BGPRouteMapNext Hop Self feature provides a way to override the settings for bgp next-hop unchanged and bgp next-hop unchanged allpath selectively. These settings are global for an address family. For some routes this may not be appropriate. For example, static routes may need to be redistributed with a next hop of self, but connected routes and routes learned via Interior Border Gateway Protocol (IBGP) or Exterior Border Gateway Protocol (EBGP) may continue to be redistributed with an unchanged next hop. The BGP route map next hop self functionality modifies the existing route map infrastructure to configure a new ip next-hop self setting, which overrides the bgp next-hop unchanged and bgp next-hop unchanged allpaths settings. The ip next-hop self setting is applicable only to VPNv4 and VPNv6 address families. Routes distributed by protocols other than BGP are not affected. You configure a new bgp route-map priority setting to inform BGP that the route map will take priority over the settings for bgp next-hop unchanged and bgp next-hop unchanged allpath. The bgp route-map priority setting only impacts BGP. The bgp route-map priority setting has no impact unless you configure the bgp next-hop unchanged or bgp next-hop unchanged allpaths settings. How to Configure Internal BGP Features Configuring a Routing Domain Confederation To configure a BGP confederation, you must specify a confederation identifier. To the outside world, the group of autonomous systems will look like a single autonomous system with the confederation identifier as the autonomous system number. To configure a BGP confederation identifier, use the following command in router configuration mode: PurposeCommand Configures a BGP confederation. Router(config-router)# bgp confederation identifier as-number In order to treat the neighbors from other autonomous systems within the confederation as special eBGP peers, use the following command in router configuration mode: PurposeCommand Specifies the autonomous systems that belong to the confederation.Router(config-router)# bgp confederation peers as-number [as-number] For an alternative way to reduce the iBGP mesh, see "Configuring a Route Reflector, on page 458." Configuring a Route Reflector To configure a route reflector and its clients, use the following command in router configuration mode: PurposeCommand Configures the local router as a BGP route reflector and the specified neighbor as a client.Router(config-router)# neighbor {ip-address | peer-group-name} route-reflector-client If the cluster has more than one route reflector, configure the cluster ID by using the following command in router configuration mode: PurposeCommand Configures the cluster ID. Router(config-router)# bgp cluster-id cluster-id Use the show ip bgp command to display the originator ID and the cluster-list attributes. By default, the clients of a route reflector are not required to be fully meshed and the routes from a client are reflected to other clients. However, if the clients are fully meshed, the route reflector need not reflect routes to clients. To disable client-to-client route reflection, use the no bgp client-to-client reflection command in router configuration mode: PurposeCommand Disables client-to-client route reflection. Router(config-router)# no bgp client-to-client reflection Configuring a Route Reflector Using a Route Map to a Set Next Hop for an iBGP Peer Perform this task on an RR to set a next hop for an iBGP peer. One reason to perform this task is when you want to make the RR the next hop for routes, so that you can configure iBGP load sharing. Create a route map that sets the next hop to be the RR’s address, which will be advertised to the RR clients. The route map is applied only to outbound routes from the router to which the route map is applied. Incorrectly setting BGP attributes for reflected routes can cause inconsistent routing, routing loops, or a loss of connectivity. Setting BGP attributes for reflected routes should only be attempted by someone who has a good understanding of the design implications. Caution Do not use the neighbor next-hop-self command to modify the next hop attribute for an RR. Using the neighbor next-hop-self command on the RR will modify next hop attributes only for non-reflected routes and not the intended routes that are being reflected from the RR clients. To modify the next hop attribute when reflecting a route, use an outbound route map. Note This task configures the RR (Router 2) in the scenario illustrated in the figure below. In this case, Router 1 is the iBGP peer whose routes’ next hop is being set. Without a route map, outbound routes from Router 1 would go to next hop Router 3. Instead, setting the next hop to the RR’s address will cause routes from Router 1 to go to the RR, and thus allow the RR to perform load balancing among Routers 3, 4, and 5. Figure 41: Route Reflector Using a Route Map to a Set Next Hop for an iBGP Peer SUMMARY STEPS 1. enable 2. configure terminal 3. route-map map-tag 4. set ip next-hop ip-address 5. exit 6. router bgp as-number 7. address-family ipv4 8. maximum-paths ibgp number 9. neighbor ip-address remote-as as-number 10. neighbor ip-address activate 11. neighbor ip-address route-reflector-client 12. neighbor ip-address route-map map-name out 13. Repeat Steps 12 through 14 for the other RR clients. 14. end 15. show ip bgp neighbors DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters route map configuration mode to configure a route map. route-map map-tag Example: Step 3 The route map is created to set the next hop for the route reflector client.Router(config)# route-map rr-out Specifies that for routes that are advertised where this route map is applied, the next-hop attribute is set to this IPv4 address. set ip next-hop ip-address Example: Router(config-route-map)# set ip next-hop 10.2.0.1 Step 4 For this task, we want to set the next hop to be the address of the RR. Exits route-map configuration mode and enters global configuration mode. exit Example: Step 5 Router(config-route-map)# exit Enters router configuration mode and creates a BGP routing process. router bgp as-number Example: Step 6 Router(config)# router bgp 100 Enters address family configuration mode to configure BGP peers to accept address family specific configurations. address-family ipv4 Example: Step 7 Router(config-router-af)# address-family ipv4 Controls the maximum number of parallel iBGP routes that can be installed in the routing table. maximum-paths ibgp number Example: Step 8 Router(config-router)# maximum-paths ibgp 5 Adds an entry to the BGP neighbor table.neighbor ip-address remote-as as-number Example: Step 9 PurposeCommand or Action Router(config-router-af)# neighbor 10.1.0.1 remote-as 100 Enables the exchange of information with the peer.neighbor ip-address activate Example: Step 10 Router(config-router-af)# neighbor 10.1.0.1 activate Configures the local router as a BGP route reflector, and configures the specified neighbor as a route-reflector client. neighbor ip-address route-reflector-client Example: Step 11 Router(config-router-af)# neighbor 10.1.0.1 route-reflector-client Applies the route map to outgoing routes from this neighbor. neighbor ip-address route-map map-name out Example: Step 12 Reference the route map you created in Step 3. Router(config-router-af)# neighbor 10.1.0.1 route-map rr-out out You will not be applying a route map to the other RR clients. Repeat Steps 12 through 14 for the other RR clients.Step 13 Exits address family configuration mode and enters privileged EXEC mode. end Example: Step 14 Router(config-router-af)# end (Optional) Displays information about the BGP neighbors, including their status as RR clients, and information about the route map configured. show ip bgp neighbors Example: Router# show ip bgp neighbors Step 15 Adjusting BGP Timers BGP uses certain timers to control periodic activities such as the sending of keepalive messages and the interval after not receiving a keepalive message after which the Cisco software declares a peer dead. By default, the keepalive timer is 60 seconds, and the hold-time timer is 180 seconds. You can adjust these timers. When a connection is started, BGP will negotiate the hold time with the neighbor. The smaller of the two hold times will be chosen. The keepalive timer is then set based on the negotiated hold time and the configured keepalive time. To adjust BGP timers for all neighbors, use the following command in router configuration mode: PurposeCommand Adjusts BGP timers for all neighbors. Device(config-router)# timers bgp keepalive holdtime To adjust BGP keepalive and hold-time timers for a specific neighbor, use the following command in router configuration mode: PurposeCommand Sets the keepalive and hold-time timers (in seconds) for the specified peer or peer group.Device(config-router)# neighbor [ip-address | peer-group-name] timers keepalive holdtime The timers configured for a specific neighbor or peer group override the timers configured for all BGP neighbors using the timers bgp router configuration command. Note To clear the timers for a BGP neighbor or peer group, use the no form of the neighbor timers command. Configuring the Router to Consider a Missing MED as the Worst Path To configure the router to consider a path with a missing MED attribute as the worst path, use the following command in router configuration mode: PurposeCommand Configures the router to consider a missing MED as having a value of infinity, making the path without a MED value the least desirable path. Router(config-router)# bgp bestpath med missing-as-worst Configuring the Router to Consider the MED to Choose a Path from Subautonomous System Paths To configure the router to consider the MED value in choosing a path, use the following command in router configuration mode: PurposeCommand Configures the router to consider theMED in choosing a path from among those advertised by different subautonomous systemswithin a confederation. Router(config-router)# bgp bestpath med confed The comparison between MEDs is made only if there are no external autonomous systems in the path (an external autonomous system is an autonomous system that is not within the confederation). If there is an external autonomous system in the path, then the external MED is passed transparently through the confederation, and the comparison is not made. The following example compares route A with these paths: path= 65000 65004, med=2 path= 65001 65004, med=3 path= 65002 65004, med=4 path= 65003 1, med=1 In this case, path 1 would be chosen if the bgp bestpath med confed router configuration command is enabled. The fourth path has a lower MED, but it is not involved in the MED comparison because there is an external autonomous system is in this path. Configuring the Router to Use the MED to Choose a Path in a Confederation To configure the router to use the MED to choose the best path from among paths advertised by a single subautonomous system within a confederation, use the following command in router configuration mode: PurposeCommand Configures the router to compare theMEDvariable when choosing among routes advertised by different peers in the same autonomous system. Router(config-router)# bgp deterministic med If the bgp always-compare-med router configuration command is enabled, all paths are fully comparable, including those from other autonomous systems in the confederation, even if the bgp deterministic med command is also enabled. Note Enabling and Configuring BGP Route Dampening Perform this task to enable and configure BGP route dampening. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. address-family ipv4 [unicast |multicast | vrf vrf-name] 5. bgp dampening [half-life reuse suppress max-suppress-time] [route-map map-name] 6. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal PurposeCommand or Action Enters router configurationmode and creates a BGP routing process. router bgp as-number Example: Step 3 Router(config)# router bgp 45000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 4 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed in addressRouter(config-router)# address-family ipv4 unicast family configurationmode for the IPv4 unicast address family if the unicast keyword is not specified with the address-family ipv4 command. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Enables BGP route dampening and changes the default values of route dampening factors. bgp dampening [half-life reuse suppress max-suppress-time] [route-map map-name] Step 5 Example: The half-life, reuse, suppress, and max-suppress-time arguments are all position dependent; if one argument is entered then all the arguments must be entered.Router(config-router-af)# bgp dampening 30 1500 10000 120 Use the route-map keyword andmap-name argument to control where BGP route dampening is enabled. Exits address family configuration mode and enters privileged EXEC mode. end Example: Step 6 Router(config-router-af)# end Monitoring and Maintaining BGP Route Dampening You can monitor the flaps of all the paths that are flapping. The statistics will be deleted once the route is not suppressed and is stable for at least one half-life. To display flap statistics, use the following commands as needed: PurposeCommand Displays BGP flap statistics for all paths.Router# show ip bgp dampening flap-statistics Displays BGP flap statistics for all paths that match the regular expression. Router# show ip bgp dampening flap-statistics regexp regexp PurposeCommand Displays BGP flap statistics for all paths that pass the filter.Router# show ip bgp dampening flap-statistics filter-list access- list Displays BGP flap statistics for a single entry.Router# show ip bgp dampening flap-statistics ip-address mask Displays BGP flap statistics for more specific entries.Router# show ip bgp dampening flap-statistics ip-address mask longer-prefix To clear BGP flap statistics (thus making it less likely that the route will be dampened), use the following commands as needed: PurposeCommand Clears BGP flap statistics for all routes.Router# clear ip bgp flap-statistics Clears BGP flap statistics for all paths that match the regular expression. Router# clear ip bgp flap-statistics regexp regexp Clears BGP flap statistics for all paths that pass the filter.Router# clear ip bgp flap-statistics filter-list list Clears BGP flap statistics for a single entry.Router# clear ip bgp flap-statistics ip-address mask Clears BGP flap statistics for all paths from a neighbor.Router# clear ip bgp ip-address flap-statistics The flap statistics for a route are also cleared when a BGP peer is reset. Although the reset withdraws the route, there is no penalty applied in this instance, even if route flap dampening is enabled. Note Once a route is dampened, you can display BGP route dampening information, including the time remaining before the dampened routes will be unsuppressed. To display the information, use the following command: PurposeCommand Displays the dampened routes, including the time remaining before they will be unsuppressed. Router# show ip bgp dampening dampened-paths You can clear BGP route dampening information and unsuppress any suppressed routes by using the following command: PurposeCommand Clears route dampening information and unsuppresses the suppressed routes. Router# clear ip bgp dampened-paths [ip-address network-mask] Configuring BGP Route Map next-hop self Perform this task to modify the existing route map by adding the ip next-hop self setting and overriding the bgp next-hop unchanged and bgp next-hop unchanged allpaths settings. SUMMARY STEPS 1. enable 2. configure terminal 3. route-map map-tag permit sequence-number 4. match source-protocol source-protocol 5. set ip next-hop self 6. exit 7. route-map map-tag permit sequence-number 8. match route-type internal 9. match route-type external 10. match source-protocol source-protocol 11. exit 12. router bgp autonomous-system-number 13. neighbor ip-address remote-as autonomous-system-number 14. address-family vpnv4 15. neighbor ip-address activate 16. neighbor ip-address next-hop unchanged allpaths 17. neighbor ip-address route-map map-name out 18. exit 19. address-family ipv4 [unicast |multicast| vrf vrf-name] 20. bgp route-map priority 21. redistribute protocol 22. redistribute protocol 23. exit-address-family 24. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable PurposeCommand or Action Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Defines conditions for redistributing routes from one routing protocol to another routing protocol and enters route-map configuration mode. route-map map-tag permit sequence-number Example: Device(config)# route-map static-nexthop-rewrite permit 10 Step 3 Matches Enhanced Interior Gateway Routing Protocol (EIGRP) external routes based on a source protocol. match source-protocol source-protocol Example: Step 4 Device(config-route-map)# match source-protocol static Configure local routes (for BGP only) with next hop of self. set ip next-hop self Example: Step 5 Device(config-route-map)# set ip next-hop self Exits route-map configuration mode and enters global configuration mode. exit Example: Step 6 Device(config-route-map)# exit Defines conditions for redistributing routes from one routing protocol to another routing protocol and enters route-map configuration mode. route-map map-tag permit sequence-number Example: Device(config)# route-map static-nexthop-rewrite permit 20 Step 7 Redistributes routes of the specified type.match route-type internal Example: Step 8 Device(config-route-map)# match route-type internal Redistributes routes of the specified type.match route-type external Example: Step 9 Device(config-route-map)# match route-type external Matches Enhanced Interior Gateway Routing Protocol (EIGRP) external routes based on a source protocol. match source-protocol source-protocol Example: Step 10 PurposeCommand or Action Device(config-route-map)# match source-protocol connected Exits route-map configuration mode and enters global configuration mode. exit Example: Step 11 Device(config-route-map)# exit Enters router configuration mode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 12 Device(config)# router bgp 45000 Adds an entry to the BGP or multiprotocol BGP neighbor table. neighbor ip-address remote-as autonomous-system-number Example: Step 13 Device(config-router)# neighbor 172.16.232.50 remote-as 65001 Specifies the VPNv4 address family and enters address family configuration mode. address-family vpnv4 Example: Step 14 Device(config-router)# address-family vpnv4 Enables the exchange of information with a Border Gateway Protocol (BGP) neighbor. neighbor ip-address activate Example: Step 15 Device(config-router-af)# neighbor 172.16.232.50 activate Enables an external EBGP peer that is configured as multihop to propagate the next hop unchanged. neighbor ip-address next-hop unchanged allpaths Example: Step 16 Device(config-router-af)# neighbor 172.16.232.50 next-hop unchanged allpaths Applies a route map to an outgoing route.neighbor ip-address route-map map-name out Example: Step 17 Device(config-router-af)# neighbor 172.16.232.50 route-map static-nexthop-rewrite out Exits address family configuration mode and enters router configuration mode. exit Example: Step 18 Device(config-router-af)# exit PurposeCommand or Action Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast| vrf vrf-name] Example: Step 19 Device(config-router)# address-family ipv4 unicast vrf inside Configures the route map priority for the local BGP routing process bgp route-map priority Example: Step 20 Device(config-router-af)# bgp route-map priority Redistributes routes from one routing domain into another routing domain. redistribute protocol Example: Step 21 Device(config-router-af)# redistribute static Redistributes routes from one routing domain into another routing domain. redistribute protocol Example: Step 22 Device(config-router-af)# redistribute connected Exits address family configuration mode and enters router configuration mode . exit-address-family Example: Step 23 Device(config-router-af)# exit address-family Exits router configuration mode and enters privileged EXEC mode. end Example: Step 24 Device(config-router)# end Configuration Examples for Internal BGP Features Example: BGP Confederation Configurations with Route Maps This section contains an example of the use of a BGP confederation configuration that includes BGP communities and route maps. For more examples of how to configure a BGP confederation, see the “Example: BGP Confederation” section in this module This example shows howBGP community attributes are used with a BGP confederation configuration to filter routes. In this example, the route map named set-community is applied to the outbound updates to neighbor 172.16.232.50 and the local-as community attribute is used to filter the routes. The routes that pass access list 1 have the special community attribute value local-as. The remaining routes are advertised normally. This special community value automatically prevents the advertisement of those routes by the BGP speakers outside autonomous system 200. router bgp 65000 network 10.0.1.0 route-map set-community bgp confederation identifier 200 bgp confederation peers 65001 neighbor 172.16.232.50 remote-as 100 neighbor 172.16.233.2 remote-as 65001 ! route-map set-community permit 10 match ip address 1 set community local-as ! Example: BGP Confederation The following is a sample configuration that shows several peers in a confederation. The confederation consists of three internal autonomous systems with autonomous system numbers 6001, 6002, and 6003. To the BGP speakers outside the confederation, the confederation looks like a normal autonomous systemwith autonomous system number 500 (specified via the bgp confederation identifier router configuration command). In a BGP speaker in autonomous system 6001, the bgp confederation peers router configuration command marks the peers from autonomous systems 6002 and 6003 as special eBGP peers. Hence peers 172.16.232.55 and 172.16.232.56 will get the local preference, next hop, and MED unmodified in the updates. The router at 10.16.69.1 is a normal eBGP speaker and the updates received by it from this peer will be just like a normal eBGP update from a peer in autonomous system 6001. router bgp 6001 bgp confederation identifier 500 bgp confederation peers 6002 6003 neighbor 172.16.232.55 remote-as 6002 neighbor 172.16.232.56 remote-as 6003 neighbor 10.16.69.1 remote-as 777 In a BGP speaker in autonomous system 6002, the peers from autonomous systems 6001 and 6003 are configured as special eBGP peers. 10.70.70.1 is a normal iBGP peer and 10.99.99.2 is a normal eBGP peer from autonomous system 700. router bgp 6002 bgp confederation identifier 500 bgp confederation peers 6001 6003 neighbor 10.70.70.1 remote-as 6002 neighbor 172.16.232.57 remote-as 6001 neighbor 172.16.232.56 remote-as 6003 neighbor 10.99.99.2 remote-as 700 In a BGP speaker in autonomous system 6003, the peers from autonomous systems 6001 and 6002 are configured as special eBGP peers. 10.200.200.200 is a normal eBGP peer from autonomous system 701. router bgp 6003 bgp confederation identifier 500 bgp confederation peers 6001 6002 neighbor 172.16.232.57 remote-as 6001 neighbor 172.16.232.55 remote-as 6002 neighbor 10.200.200.200 remote-as 701 The following is a part of the configuration from the BGP speaker 10.200.200.205 from autonomous system 701 in the same example. Neighbor 172.16.232.56 is configured as a normal eBGP speaker from autonomous system 500. The internal division of the autonomous system into multiple autonomous systems is not known to the peers external to the confederation. router bgp 701 neighbor 172.16.232.56 remote-as 500 neighbor 10.200.200.205 remote-as 701 Example: Route Reflector Using a Route Map to Set a Next Hop for an iBGP Peer The following example is based on the figure above. Router 2 is the route reflector for the clients: Routers 1, 3, 4, and 5. Router 1 is connected to Router 3, but you don’t want Router 1 to forward traffic destined to AS 200 to use Router 3 as the next hop (and therefore use the direct link with Router 3); you want to direct the traffic to the RR, which can load share among Routers 3, 4, and 5. This example configures the RR, Router 2. A route map named rr-out is applied to Router 1; the route map sets the next hop to be the RR at 10.2.0.1. When Router 1 sees that the next hop is the RR address, Router 1 forwards the routes to the RR.When the RR receives packets, it will automatically load share among the iBGP paths. A maximum of five iBGP paths are allowed. Router 2 route-map rr-out set ip next-hop 10.2.0.1 ! interface gigabitethernet 0/0 ip address 10.2.0.1 255.255.0.0 router bgp 100 address-family ipv4 unicast maximum-paths ibgp 5 neighbor 10.1.0.1 remote-as 100 neighbor 10.1.0.1 activate neighbor 10.1.0.1 route-reflector-client neighbor 10.1.0.1 route-map rr-out out ! neighbor 10.3.0.1 remote-as 100 neighbor 10.3.0.1 activate neighbor 10.3.0.1 route-reflector-client ! neighbor 10.4.0.1 remote-as 100 neighbor 10.4.0.1 activate neighbor 10.4.0.1 route-reflector-client ! neighbor 10.5.0.1 remote-as 100 neighbor 10.5.0.1 activate neighbor 10.5.0.1 route-reflector-client end Example: Configuring BGP Route Map next-hop self This section contains an example of how to configure BGP Route Map next-hop self. In this example, a route map is configured that matches the networks where you wish to override settings for bgp next-hop unchanged and bgp next-hop unchanged allpath. Subsequently, next-hop self is configured. After this, the bgp route map priority is configured for the specified address family so that the previously specified route map takes priority over the settings for bgp next-hop unchanged and bgp next-hop unchanged allpath. This configuration results in static routes being redistributed with a next hop of self, but connected routes and routes learned via IBGP or EBGP continue to be redistributed with an unchanged next hop. route-map static-nexthop-rewrite permit 10 match source-protocol static set ip next-hop self route-map static-nexthop-rewrite permit 20 match route-type internal match route-type external match source-protocol connected ! router bgp 65000 neighbor 172.16.232.50 remote-as 65001 address-family vpnv4 neighbor 172.16.232.50 activate neighbor 172.16.232.50 next-hop unchanged allpaths neighbor 172.16.232.50 route-map static-nexthop-rewrite out exit-address-family address-family ipv4 unicast vrf inside bgp route-map priority redistribute static redistribute connected exit-address-family end Additional References for Internal BGP Features Related Documents Document TitleRelated Topic Cisco IOS Master Commands List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands “Cisco BGP Overview” moduleBGP overview “Configuring a Basic BGP Network” moduleBasic BGP configuration tasks “iBGP Multipath Load Sharing” moduleiBGP multipath load sharing “Connecting to a Service Provider Using External BGP” module Connecting to a service provider IP Routing: Protocol-Independent Configuration GuideConfiguring features that apply to multiple IP routing protocols RFCs TitleRFC Application of the Border Gateway Protocol in the InternetRFC1772 Experience with the BGP ProtocolRFC1773 BGP-4 Protocol AnalysisRFC1774 Guidelines for Creation, Selection, and Registration of an Autonomous System (AS)RFC1930 A Framework for Inter-Domain Route AggregationRFC2519 Multiprotocol Extensions for BGP-4RFC2858 Route Refresh Capability for BGP-4RFC2918 Capabilities Advertisement with BGP-4RFC3392 A Border Gateway Protocol 4 (BGP-4)RFC4271 BGP Support for Four-octet AS Number SpaceRFC4893 Textual Representation of Autonomous system (AS) NumbersRFC5396 Autonomous System (AS) Number Reservation for Documentation UseRFC5398 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for Configuring Internal BGP Features The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 38: Feature Information for Configuring Internal BGP Features Feature Configuration InformationReleasesFeature Name All the features contained in this module are considered to be legacy features and will work in all trains release images. The following commands were introduced or modified by these features: bgp always-compare-med bgp bestpath med confed bgp bestpath med missing-as-worst bgp client-to-client reflection bgp cluster-id bgp confederation identifier bgp confederation peers bgp dampening bgp deterministic med clear ip bgp dampening clear ip bgp flap-statistics neighbor route-reflector-client neighbor timers show ip bgp show ip bgp dampening dampened-paths show ip bgp dampening flap-statistics timers bgp 10.3 12.0(7)T 12.0(32)S12 12.2(33)SRA 12.2(33)SXH Configuring internal BGP features The BGP Outbound Route Map on Route Reflector to Set IP Next Hop feature allows a route reflector to modify the next hop attribute for a reflected route. 12.0(16)ST 12.0(22)S 12.2 12.2(14)S 15.0(1)S BGP Outbound Route Map on Route Reflector to Set IP Next Hop C H A P T E R 23 BGP VPLS Auto Discovery Support on Route Reflector BGP Route Reflector was enhanced to be able to reflect BGP VPLS prefixes without having VPLS explicitly configured on the route reflector. Finding Feature Information, on page 475 Information About BGP VPLS Auto Discovery Support on Route Reflector, on page 475 Configuration Example for BGP VPLS Auto Discovery Support on Route Reflector, on page 476 Additional References, on page 476 Feature Information for BGP VPLS Auto Discovery Support on Route Reflector, on page 477 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP VPLS Auto Discovery Support on Route Reflector BGP VPLS Autodiscovery Support on Route Reflector In Cisco IOS Release 12.2(33)SRE, BGP VPLS Autodiscovery Support on Route Reflector was introduced. On the Cisco 7600 and Cisco 7200 series routers, BGP Route Reflector was enhanced to be able to reflect BGP VPLS prefixes without having VPLS explicitly configured on the route reflector. The route reflector reflects the VPLS prefixes to other provider edge (PE) routers so that the PEs do not need to have a full mesh of BGP sessions. The network administrator configures only the BGP VPLS address family on the route reflector. For an example of a route reflector configuration that can reflect VPLS prefixes, see the “Example: BGP VPLSAutodiscovery Support on Route Reflector” section. For more information about VPLSAutodiscovery, see the “VPLS Autodiscovery BGP Based” module in theMPLS Layer 2 VPNs Configuration Guide . Restrictions for BGP VPLS Auto Discovery Support on Route Reflector VPLS BGP Auto Discovery with BGP Signaling in inter-AS Option C is not supported in IOS XE for route reflector. Configuration Example for BGP VPLS Auto Discovery Support on Route Reflector Example: BGP VPLS Autodiscovery Support on Route Reflector In the following example, a host named PE-RR (indicating Provider Edge Route Reflector) is configured as a route reflector capable of reflectingVPLS prefixes. TheVPLS address family is configured by address-family l2vpn vpls command. hostname PE-RR ! router bgp 1 bgp router-id 1.1.1.3 no bgp default route-target filter bgp log-neighbor-changes neighbor iBGP_PEERS peer-group neighbor iBGP_PEERS remote-as 1 neighbor iBGP_PEERS update-source Loopback1 neighbor 1.1.1.1 peer-group iBGP_PEERS neighbor 1.1.1.2 peer-group iBGP_PEERS ! address-family l2vpn vpls neighbor iBGP_PEERS send-community extended neighbor iBGP_PEERS route-reflector-client neighbor 1.1.1.1 peer-group iBGP_PEERS neighbor 1.1.1.2 peer-group iBGP_PEERS exit-address-family ! Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands Standards and RFCs TitleStandard/RFC Route Refresh Capability for BGP-4RFC 2918 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP VPLS Auto Discovery Support on Route Reflector The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 39: Feature Information for BGP VPLS Auto Discovery Support on Route Reflector Feature InformationReleasesFeature Name BGPRoute Reflector was enhanced to be able to reflect BGP VPLS prefixes without having VPLS explicitly configured on the route reflector. This feature was introduced on the Cisco 7600 and Cisco 7200 series routers. 12.2(33)SRE Cisco IOS XE Release 2.5 BGP VPLS Auto Discovery Support on Route Reflector C H A P T E R 24 BGP FlowSpec Route-reflector Support The BGP (Border Gateway Protocol) Flowspec (Flow Specification) Route Reflector feature enables service providers to control traffic flows in their network. This helps in filtering traffic and helps in taking action against distributed denial of service (DDoS) mitigation by dropping the DDoS traffic or diverting it to an analyzer. BGP flow specification provides a mechanism to encode flow specification rules for traffic flows that can be distributed as BGP Network Layer Reachability Information (NLRI). Finding Feature Information, on page 479 Restrictions for BGP FlowSpec Route-reflector Support, on page 479 Information About BGP FlowSpec Route-reflector Support, on page 480 How to Configure BGP FlowSpec Route-reflector Support, on page 481 Configuration Examples for BGP FlowSpec Route-reflector Support, on page 487 Additional References for BGP FlowSpec Route-reflector Support, on page 489 Feature Information for BGP FlowSpec Route-reflector Support, on page 489 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Restrictions for BGP FlowSpec Route-reflector Support In Cisco IOS 15.5(S) release, BGP flow specification is supported only on a route reflector. Mixing of address family matches and actions is not supported in flow spec rules. For example, IPv4 matches cannot be combined with IPv6 actions and vice versa. Information About BGP FlowSpec Route-reflector Support Overview of Flowspec Flowspec specifies procedures for the distribution of flow specification rules as Border Gateway Protocol Network Layer Reachability Information (BGP NLRI) that can be used in any application. It also defines application for the purpose of packet filtering in order to mitigate distributed denial of service attacks. A flow specification rule consists of a matching part encoded in the BGPNLRI field and an action part encoded as BGP extended community as defined in the RFC 5575. A flow specification rule is a set of data (represented in an n-tuple) consisting of several matching criteria that can be applied to IP packet data. BGP flow specification rules are internally converted to equivalent Cisco Common Classification Policy Language (C3PL) representing corresponding match and action parameters. In Cisco IOS 15.5(S) release, Flowspec supports following functions for the BGP route reflector: Flowspec rules defined in RFC 5575 IPv6 extensions Redirect IP extensions BGP flowspec validation Matching Criteria The following table lists the various Flowspec tuples that are supported for BGP. Input ValueQoS Matching Field (IPv4)QoS Matching Field (IPv6)BGP Flowspec NLRI Type Prefix lengthIPv4 destination addressIPv6 destination addressType 1 Prefix lengthIPv4 source addressIPv6 source addressType 2 Multi-value rangeIPv4 protocolIPv6 next headerType 3 Multi-value rangeIPv4 source or destination port IPv6 source or destination port Type 4 Multi-value rangeIPv4 destination portIPv6 destination portType 5 Multi-value rangeIPv4 source portIPv6 source portType 6 Multi-value rangeIPv4 ICMP typeIPv6 ICMP typeType 7 Multi-value rangeIPv4 ICMP codeIPv6 ICMP codeType 8 Bit maskIPv4 TCP flags (2 bytes include reserved bits) IPv6 TCP flagsType 9 Multi-value rangeIPv4 packet lengthIPv6 packet lengthType 10 Multi-value rangeIPv4 DSCPIPv6 traffic classType 11 Input ValueQoS Matching Field (IPv4)QoS Matching Field (IPv6)BGP Flowspec NLRI Type Bit maskIPv4 fragment bitsReservedType 12 Multi-value range—IPv6 flow labelType 13 How to Configure BGP FlowSpec Route-reflector Support Configuring BGP FlowSpec Route-reflector Support Perform this task to configure BGP FlowSpec on a route reflector. This task specifies only the IPv4 address family but, other address families are also supported for BGP flow specifications. Before you begin Configure a BGP route reflector. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address remote-as autonomous-system-number 5. address-family {ipv4 | ipv6 | vpnv4 | vpnv6} flowspec 6. neighbor ip-address activate 7. neighbor ip-address route-reflector-client 8. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 1 PurposeCommand or Action Adds an entry to the BGP or multiprotocol BGP neighbor table. neighbor ip-address remote-as autonomous-system-number Example: Step 4 Device(config-router)# neighbor 10.1.1.1 remote-as 1 Specifies the address family and enters address family configuration mode. address-family {ipv4 | ipv6 | vpnv4 | vpnv6} flowspec Example: Step 5 Flowspec is supported on IPv4, IPv6, VPNv4 and VPNv6 address families. Device(config-router)# address-family ipv4 flowspec Enables the exchange of information with a BGP neighbor.neighbor ip-address activate Example: Step 6 Device(config-router-af)# neighbor 10.1.1.1 activate Configures the router as a BGP route reflector and configures the specified neighbor as its client. neighbor ip-address route-reflector-client Example: Step 7 Device(config-router-af)# neighbor 10.1.1.1 route-reflector-client (Optional) Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 8 Device(config-router-af)# end Disabling BGP FlowSpec Validation Perform this task if you want to disable the BGP flow specification validations for eBGP peers. The validations are enabled by default. To know more about BGP flow specification validations, see RFC 5575 (draft-ietf-idr-bgp-flowspec-oid-01-Revised Validation Procedure for BGP Flow Specifications). SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. address-family {ipv4 | ipv6 | vpnv4 | vpnv6} flowspec 5. neighbor ip-address validation off DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 PurposeCommand or Action Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 1 Specifies the address family and enters address family configuration mode. address-family {ipv4 | ipv6 | vpnv4 | vpnv6} flowspec Example: Step 4 Flowspec is supported on IPv4, IPv6, VPNv4 and VPNv6 address families. Device(config-router)# address-family ipv4 flowspec Disables validation of flow specification for eBGP peers.neighbor ip-address validation off Example: Step 5 Device(config-router-af)# neighbor 10.1.1.1 validation off Verifying BGP FlowSpec Route-reflector Support The show commands can be entered in any order. Before you begin Configure BGP FlowSec on a route reflector. SUMMARY STEPS 1. show bgp ipv4 flowspec 2. show bgp ipv4 flowspec detail 3. show bgp ipv4 flowspec summary 4. show bgp ipv6 flowspec 5. show bgp ipv6 flowspec detail 6. show bgp ipv6 flowspec summary 7. show bgp vpnv4 flowspec 8. show bgp vpnv4 flowspec all detail 9. show bgp vpnv6 flowspec 10. show bgp vpnv6 flowspec all detail DETAILED STEPS Step 1 show bgp ipv4 flowspec This command displays the IPv4 flowspec routes. Example: Device# show bgp ipv4 flowspec BGP table version is 3, local router ID is 10.10.10.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *>i Dest:2.2.2.0/24 10.0.101.1 100 0 i *>i Dest:3.3.3.0/24 10.0.101.1 100 0 i Step 2 show bgp ipv4 flowspec detail This command displays the detailed information about IPv4 flowspec routes. Example: Device# show bgp ipv4 flowspec detail BGP routing table entry for Dest:2.2.2.0/24, version 2 Paths: (1 available, best #1, table IPv4-Flowspec-BGP-Table) Advertised to update-groups: 1 Refresh Epoch 1 Local, (Received from a RR-client) 10.0.101.1 from 10.0.101.1 (10.0.101.1) Origin IGP, localpref 100, valid, internal, best Extended Community: FLOWSPEC Redirect-IP:0x000000000001 rx pathid: 0, tx pathid: 0x0 BGP routing table entry for Dest:3.3.3.0/24, version 3 Paths: (1 available, best #1, table IPv4-Flowspec-BGP-Table) Advertised to update-groups: 1 Refresh Epoch 1 Local, (Received from a RR-client) 10.0.101.1 from 10.0.101.1 (10.0.101.1) Origin IGP, localpref 100, valid, internal, best rx pathid: 0, tx pathid: 0x0 Step 3 show bgp ipv4 flowspec summary This command displays the IPv4 flowspec neighbors. Example: Device# show bgp ipv4 flowspec summary BGP router identifier 10.10.10.2, local AS number 239 BGP table version is 3, main routing table version 3 2 network entries using 16608 bytes of memory 2 path entries using 152 bytes of memory 2/2 BGP path/bestpath attribute entries using 304 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 2 BGP extended community entries using 48 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 17136 total bytes of memory BGP activity 18/0 prefixes, 18/0 paths, scan interval 15 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.101.1 4 239 70 24 3 0 0 00:10:58 2 10.0.101.2 4 239 0 0 1 0 0 never Idle 10.0.101.3 4 240 0 0 1 0 0 never Idle 10.10.10.1 4 239 19 23 3 0 0 00:10:53 Step 4 show bgp ipv6 flowspec This command displays the IPv6 flowspec routes. Example: Device# show bgp ipv6 flowspec BGP table version is 2, local router ID is 10.10.10.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *>i Dest:3::/0-24,Source:4::/0-24 FEC0::1001 100 0 i Step 5 show bgp ipv6 flowspec detail This command displays the detailed information about IPv6 flowspec routes. Example: Device# show bgp ipv6 flowspec detail BGP routing table entry for Dest:3::/0-24,Source:4::/0-24, version 2 Paths: (1 available, best #1, table Global-Flowspecv6-Table) Advertised to update-groups: 2 Refresh Epoch 1 Local FEC0::1001 from FEC0::1001 (10.0.101.2) Origin IGP, localpref 100, valid, internal, best rx pathid: 0, tx pathid: 0x0 Step 6 show bgp ipv6 flowspec summary This command displays the IPv6 flowspec neighbors. Example: Device# show bgp ipv6 flowspec summary BGP router identifier 10.10.10.2, local AS number 239 BGP table version is 3, main routing table version 3 2 network entries using 16608 bytes of memory 2 path entries using 152 bytes of memory 2/2 BGP path/bestpath attribute entries using 304 bytes of memory 1 BGP AS-PATH entries using 24 bytes of memory 2 BGP extended community entries using 48 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 17136 total bytes of memory BGP activity 18/0 prefixes, 18/0 paths, scan interval 15 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.0.101.1 4 239 70 24 3 0 0 00:10:58 2 10.0.101.2 4 239 0 0 1 0 0 never Idle 10.0.101.3 4 240 0 0 1 0 0 never Idle 10.10.10.1 4 239 19 23 3 0 0 00:10:53 Step 7 show bgp vpnv4 flowspec This command displays the VPNv4 flowspec neighbors. Example: Device# show bgp vpnv4 flowspec BGP table version is 2, local router ID is 10.10.10.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 200:200 *>i Dest:10.0.1.0/24 10.0.101.1 100 0 i Step 8 show bgp vpnv4 flowspec all detail This command displays the VPNv4 flowspec details. Example: Device# show bgp vpnv4 flowspec all detail Route Distinguisher: 200:200 BGP routing table entry for 200:200:Dest:10.0.1.0/24, version 2 Paths: (1 available, best #1, table VPNv4-Flowspec-BGP-Table) Advertised to update-groups: 3 Refresh Epoch 1 Local 10.0.101.1 (via default) from 10.0.101.1 (10.0.101.1) Origin IGP, localpref 100, valid, internal, best Extended Community: RT:100:100 rx pathid: 0, tx pathid: 0x0 Step 9 show bgp vpnv6 flowspec This command displays the VPNv6 flowspec neighbors. Example: Device# show bgp vpnv6 flowspec BGP table version is 2, local router ID is 10.10.10.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, x best-external, a additional-path, c RIB-compressed, Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 200:200 *>i SPort:=20640 FEC0::1001 100 0 i Step 10 show bgp vpnv6 flowspec all detail This command displays the VPNv6 flowspec details. Example: Device# show bgp vpnv6 flowspec all detail Route Distinguisher: 200:200 BGP routing table entry for 200:200:SPort:=20640, version 2 Paths: (1 available, best #1, table VPNv6-Flowspec-BGP-Table) Advertised to update-groups: 3 Refresh Epoch 1 Local FEC0::1001 (via default) from FEC0::1001 (10.0.101.2) Origin IGP, localpref 100, valid, internal, best Extended Community: RT:100:100 rx pathid: 0, tx pathid: 0x0 Configuration Examples for BGP FlowSpec Route-reflector Support Example: BGP FlowSpec Route-reflector Support Example: Configuring BGP FlowSpec on Route Reflector Configure BGP route reflector and inject flowspec in the route reflector. Figure 42: BGP Route Reflector Topology ! Configure the topology !Configure the interfaces on RR RR> enable RR# configure terminal RR(config)# interface E0/0 RR(config-if)# ip address 10.0.0.1 255.224.0.0 RR(config-if)# no shutdown RR(config-if)# exit RR(config)# interface S2/0 RR(config-if)# ip address 10.32.0.1 255.224.0.0 RR(config-if)# no shutdown RR(config-if)# exit RR(config)# interface S3/0 RR(config-if)# ip address 10.64.0.1 255.224.0.0 RR(config-if)# no shutdown !Configure RR as the route reflector with S2/0(R1) and S2/0 (R2) as the neighbors RR(config)# router bgp 333 RR(config-router)# no synchronization RR(config-router)# network 10.0.0.0 mask 255.224.0.0 RR(config-router)# network 10.64.0.0 mask 255.224.0.0 RR(config-router)# network 10.32.0.0 mask 255.224.0.0 RR(config-router)# neighbor 10.64.0.2 remote-as 333 RR(config-router)# neighbor 10.32.0.2 remote-as 333 !Configure flowspec on route reflector RR(config-router)# address-family ipv4 flowspec RR(configure-router-af)# neighbor 10.64.0.2 activate RR(config-router)# neighbor 10.64.0.2 route-reflector-client RR(configure-router-af)# neighbor 10.32.0.2 activate RR(config-router)# neighbor 10.32.0.2 route-reflector-client !Verify the configuration RR> show bgp ipv4 flowspec Additional References for BGP FlowSpec Route-reflector Support Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands Standards and RFCs TitleStandard/RFC Dissemination of Flow Specification RulesRFC 5575 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlThe Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies. To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds. Access to most tools on the Cisco Support website requires a Cisco.com user ID and password. Feature Information for BGP FlowSpec Route-reflector Support The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 40: Feature Information for BGP FlowSpec Route-reflector Support Feature InformationReleasesFeature Name The BGP FlowSpec Route-reflector Support feature enables services providers to control traffic flows in their network and mitigate DDoS attack. The following command was introduced by this feature: address-family {ipv4 | ipv6 | vpnv4 | vpnv6} flowspec. 15.5(1)SBGP FlowSpec Route-reflector Support The BGP FlowSpec Route-reflector Support feature enables services providers to control traffic flows in their network and mitigate DDoS attack. This feature was introduced on the Cisco ASR 1000 Series Routers. The following command was introduced by this feature: address-family {ipv4 | ipv6 | vpnv4 | vpnv6} flowspec. Cisco IOS XE Release 3.14 BGP FlowSpec Route-reflector Support C H A P T E R 25 BGP Flow Specification Client The Border Gateway Protocol (BGP) flow specification client feature enables a device to perform the role of a BGP flow specification client and receive flow specification rules from a BGP flow specification controller. Flow specification rules contain a set of match criteria and actions (also called flows). The flows are configured on a controller (device), which advertises the flows to the client device, or specific interfaces on the client. IOS XE software supports BGP flow specification client function and does not support BGP flow specification controller function. Attention Finding Feature Information, on page 491 Prerequisites for BGP Flow Specification Client, on page 491 Restrictions for BGP Flow Specification Client, on page 492 Information About BGP Flow Specification Client, on page 492 How to Configure BGP Flow Specification Client, on page 494 Configuration Examples for BGP Flow Specification Client, on page 499 Additional References for BGP Flow Specification Client, on page 500 Feature Information for BGP Flow Specification Client, on page 501 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Prerequisites for BGP Flow Specification Client Identify and configure flow specification rules on the controller. When the flow specification client is enabled, the matching criteria and corresponding actions in the controller’s flows are remotely injected into the client device, and the flows are programmed into the platform hardware of the client device. Note Restrictions for BGP Flow Specification Client In Cisco IOS 15.5(S) release, BGP flow specification is supported only on a BGP flow specification client and route reflector. Mixing of address family matches and actions is not supported in flow specification rules. For example, IPv4 matches cannot be combined with IPv6 actions and vice versa. Information About BGP Flow Specification Client BGP Flow Specification Model The BGP protocol is used for flow specifications due to unique advantages it offers. The three elements that are used to route flow specifications through BGP enabled devices are: controller, client, and route-reflector (which is optional). This document is specific to the client element function. Though devices with the IOSXE software (such as ASR 1000, and so on) can performBGP flow specification client role and not the controller role, a brief outline of the BGP flow specification process is given below for better understanding. The BGP flow specification functionality allows you to rapidly deploy and propagate filtering and policing functionality among a large number of BGP peer devices to mitigate the effects of a distributed denial-of-service (DDoS) attack over your network. The BGP flow specification model comprises of a client and a controller (route-reflector usage is optional). The controller is responsible for sending or injecting the flow specification NRLI entry. The client (acting as a BGP speaker) receives the NRLI and programs the hardware forwarding to act on the instruction from the controller. An illustration of this model is provided below. Figure 43: BGP Flow Specification Model In the above topology, the controller on the left-hand side injects the flow specification NRLI into the client on the right-hand side. The client receives the information, sends it to the flow specificationmanager component, configures the ePBR (Enhanced Policy Based Routing) infrastructure, which in turn programs the platform hardware of the device. This way, you can create rules to handle DDoS attacks on your network. Sample Flow Specification Client Configuration First, associate the device to a BGP autonomous system and enable flow specification policymapping capability for various address families. Then, identify a neighbor (through its IP address) as a BGP peer and enable the capability to exchange information between the devices through theneighbor activate command. This way, flow specification information can be exchanged between the client, controller, and any other flow specification client device. ! router bgp 100 address-family ipv4 flowspec neighbor 10.1.1.1 activate ! Matching Criteria and Actions The flow specification NLRI type consists of several optional sub-components. A specific packet is considered to match the flow specification when it matches the intersection (AND) of all the components present in the specification. The following are the supported component types or tuples that you can define: Input ValueQoS Matching Field (IPv4)QoS Matching Field (IPv6)BGP Flowspec NLRI Type Prefix lengthIPv4 destination addressIPv6 destination addressType 1 Prefix lengthIPv4 source addressIPv6 source addressType 2 Multi-value rangeIPv4 protocolIPv6 next headerType 3 Input ValueQoS Matching Field (IPv4)QoS Matching Field (IPv6)BGP Flowspec NLRI Type Multi-value rangeIPv4 source or destination port IPv6 source or destination port Type 4 Multi-value rangeIPv4 destination portIPv6 destination portType 5 Multi-value rangeIPv4 source portIPv6 source portType 6 Multi-value rangeIPv4 ICMP typeIPv6 ICMP typeType 7 Multi-value rangeIPv4 ICMP codeIPv6 ICMP codeType 8 Bit maskIPv4 TCP flags (2 bytes include reserved bits) IPv6 TCP flagsType 9 Multi-value rangeIPv4 packet lengthIPv6 packet lengthType 10 Multi-value rangeIPv4 DSCPIPv6 traffic classType 11 Bit maskIPv4 fragment bitsReservedType 12 How to Configure BGP Flow Specification Client Configuring a Device As a Flow Specification Client and Establishing a BGP Peer Relationship With Neighbor The following task explains configuration of a device as a BGP flow specification client. A device interface within a VRF instance can also perform the role of a BGP flow specification client. Before you begin Before configuring a device as a flow specification client, it is a good practice to identify and configure the flow specification controller device (and a route reflector, if required). When flow specification rules are configured on the controller, the rules are remotely injected into the client and the matching criteria and corresponding actions are programmed into the platform hardware of the client. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. address-family {ipv4 | ipv6} flowspec 5. neighbor ip-address activate 6. exit 7. address-family {ipv4 | ipv6} flowspec vrf vrf-name 8. neighbor ip-address remote-as as-number 9. neighbor ip-address activate 10. exit DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration modeconfigure terminal Example: Step 2 Device# configure terminal Specifies the autonomous system number and enters the BGP configuration mode, allowing you to configure the BGP routing process. router bgp as-number Example: Device(config)# router bgp 100 Step 3 Specifies either the IPv4 or IPv6 address family and enters BGP address family configuration mode, and initializes address-family {ipv4 | ipv6} flowspec Example: Step 4 the global address family for flow specification policy mapping.Device(config-bgp)# address-family ipv4 flowspec Places the device in neighbor configuration mode for BGP routing and configures the neighbor IP address as a BGP neighbor ip-address activate Example: Step 5 peer. Enables the device to advertise (and receive information), including its IP address, to its BGP neighbor.Device(config-bgp-af)# neighbor 10.1.1.1 activate Exits BGP address family configuration mode and enters BGP configuration mode. exit Example: Step 6 Device(config-bgp-af)# exit Specifies either the IPv4 or IPv6 address family for the VRF, enters BGP address family configuration mode, and address-family {ipv4 | ipv6} flowspec vrf vrf-name Example: Step 7 initializes the global address family for flow specification policy mapping.Device(config-bgp)# address-family ipv4 flowspec vrf vrf1 Places the device in neighbor configuration mode for BGP routing and configures the neighbor (IP address) as a BGP neighbor ip-address remote-as as-number Example: Step 8 peer. The remote-as keyword assigns the specified remote autonomous system number to the neighbor.Device(config-bgp-af)# neighbor 2001:DB8:1::1 remote-as 100 Enables the device to advertise (and receive information), including its IP address, to its BGP neighbor. neighbor ip-address activate Example: Step 9 Device(config-bgp-af)# neighbor 2001:DB8:1::1 activate Exits BGP address family configuration mode and enters BGP configuration mode. exit Example: Step 10 PurposeCommand or Action Device(config-bgp-af)# exit Configuring a Flow Specification Policy On All Interfaces Of a Device The following configuration task explains flow specification policy configuration on all interfaces of a device for the IPv4 and IPv6 address families, and on interfaces within a VRF instance. SUMMARY STEPS 1. enable 2. configure terminal 3. flowspec 4. address-family ipv4 5. local-install interface-all 6. exit 7. address-family ipv6 8. local-install interface-all 9. exit 10. vrf vrf-name 11. address-family ipv4 12. local-install interface-all 13. exit 14. address-family ipv6 15. local-install interface-all 16. exit DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration modeconfigure terminal Example: Step 2 Device# configure terminal Enters flowspec configuration mode.flowspec Example: Step 3 Device(config)# flowspec Specifies the IPv4 address family and enters flow specification address family configuration mode. address-family ipv4 Example: Step 4 Device(config-flowspec)# address-family ipv4 PurposeCommand or Action Installs the flowspec policy on all interfaces.local-install interface-all Example: Step 5 Device(config-flowspec-af)# local-install interface-all Exits flow specification address family configurationmode and enters flowspec configuration mode. exit Example: Step 6 Device(config-flowspec-af)# exit Specifies the IPv6 address family and enters flow specification address family configuration mode. address-family ipv6 Example: Step 7 Device(config-flowspec)# address-family ipv6 Installs the flowspec policy on all interfaces.local-install interface-all Example: Step 8 Device(config-flowspec-af)# local-install interface-all Exits flow specification address family configurationmode and enters flowspec configuration mode. exit Example: Step 9 Device(config-flowspec-af)# exit Configures a VRF instance and enters flow specification VRF configuration mode. vrf vrf-name Example: Step 10 Device(config-flowspec)# vrf vrf10 Specifies the IPv4 address family and enters VRF flow specification address family configuration mode. address-family ipv4 Example: Step 11 Device(config-flowspec-vrf)# address-family ipv4 Installs the flowspec policy on all interfaces.local-install interface-all Example: Step 12 Device(config-flowspec-vrf-af)# local-install interface-all Exits VRF flow specification address family configuration mode and enters VRF flow specification configuration mode. exit Example: Device(config-flowspec-vrf-af)# exit Step 13 Specifies the IPv6 address family and enters VRF flow specification address family configuration mode. address-family ipv6 Example: Step 14 Device(config-flowspec-vrf)# address-family ipv6 PurposeCommand or Action Installs the flowspec policy on all interfaces.local-install interface-all Example: Step 15 Device(config-flowspec-vrf-af)# local-install interface-all Exits VRF flow specification address family configuration mode and enters VRF flow specification configuration mode. exit Example: Device(config-flowspec-vrf-af)# exit Step 16 Verifying BGP Flow Specification Client These commands display flow specification configuration details: SUMMARY STEPS 1. show flowspec summary 2. show bgp ipv4 flowspec 3. show flowspec vrf vrf-name afi-all DETAILED STEPS Step 1 show flowspec summary Example: Device # show flowspec summary FlowSpec Manager Summary: Tables: 2 Flows: 1 Provides a summary of the flow specification rules present on the node. In this example, the Tables field indicates that the flow specification policy mapping capability is enabled for IPv4 and IPv6 address families. The Flows field indicates that a single flow has been defined across the entire table. Step 2 show bgp ipv4 flowspec Example: Device # show bgp ipv4 flowspec Dest:192.0.2.0/24, Source:10.1.1.0/24, DPort:>=120&<=130,SPort:>=25&<=30,DSCP:=30/208 BGP routing table entry for Dest:192.0.2.0/24, Source:10.1.1.0/24,Proto:=47,DPort:>=120&<=130,SPort:>=25&<=30,DSCP:=30/208 Paths: (1 available, best #1) Advertised to update-groups (with more than one peer): 0.3 Path #1: Received by speaker 0 Advertised to update-groups (with more than one peer): 0.3 Local 0.0.0.0 from 0.0.0.0 (3.3.3.3) Origin IGP, localpref 100, valid, redistributed, best, group-best Received Path ID 0, Local Path ID 1, version 42 Extended community: FLOWSPEC Traffic-rate:100,0 Use this command to verify if a flow specification rule configured on the flow specification controller (device) is available on the BGP side. In this example, redistributed indicates that the flow specification rule is not internally originated, but one that has been redistributed from the flow specification process to BGP. The extended community (the BGP attribute used to send the match and action criteria to peer devices) that is configured is also displayed. In this example, the action defined is to rate limit the traffic. Step 3 show flowspec vrf vrf-name afi-all Example: Device # show flowspec vrf vrf100 afi-all VRF: vrf100 AFI: IPv4 Flow :DPort:=101,SPort:=101,TCPFlags:~0xFF,Length:>=100&<=1500,DSCP:=63 Actions :Redirect: VRF vrf200 Route-target: ASN2-200:2 (bgp.1) Flow :DPort:=102,SPort:=102,TCPFlags:~0xFF,Length:>=100&<=1500,DSCP:=63 Actions :Redirect: VRF vrf200 Route-target: ASN2-200:2 (bgp.1) Use this command to verify if a flow specification rule is in a specific VRF associated with the flow specification client (device). Configuration Examples for BGP Flow Specification Client Example: Configuring a Device As a Flow Specification Client and Establishing a BGP Peer Relationship With Neighbor Device> enable Device# configure terminal Device (config)# router bgp 100 Device (config-bgp)# address-family ipv4 flowspec Device (config-bgp-af)# neighbor 10.1.1.1 activate Device (config-bgp-af)# exit Device (config-bgp)# address-family ipv4 flowspec vrf vrf1 Device (config-bgp-af)# neighbor 2001:DB8:1::1 remote as 100 Device (config-bgp-af)# neighbor 2001:DB8:1::1 activate Device (config-bgp-af)# exit Example: Configuring a Flow Specification Policy On All Interfaces Of a Device Device> enable Device# configure terminal Device(config)# flowspec Device(config-flowspec)# address-family ipv4 Device(config-flowspec-af)# local-install interface-all Device(config-flowspec-af)# exit Device(config-flowspec)# address-family ipv6 Device(config-flowspec-af)# local-install interface-all Device(config-flowspec-af)# exit Device(config-flowspec)# vrf vrf10 Device(config-flowspec-vrf)# address-family ipv4 Device(config-flowspec-vrf-af)# local-install interface-all Device(config-flowspec-vrf-af)# exit Device(config-flowspec-vrf)# address-family ipv6 Device(config-flowspec-vrf-af)# local-install interface-all Device(config-flowspec-vrf-af)# exit Additional References for BGP Flow Specification Client Related Documents Document TitleRelated Topic Cisco IOS Master Commands List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands IP Routing: BGP Configuration GuideBGP Flow Specification Route-reflector Support Standards and RFCs TitleStandard/RFC Dissemination of Flow Specification RulesRFC 5575 MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs CISCO-MIB Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlThe Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies. To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds. Access to most tools on the Cisco Support website requires a Cisco.com user ID and password. Feature Information for BGP Flow Specification Client The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 41: Feature Information for BGP Flow Specification Client Feature InformationReleasesFeature Name The BGP flow specification client feature enables a device to perform the role of a BGP flow specification client and receive flow specification rules from a BGP flow specification controller. The following command was introduced or modified: flowspec, local-install interface-all. Cisco IOS XE 3.15S BGPFlowSpecification Client C H A P T E R 26 BGP NSF Awareness Nonstop Forwarding (NSF) awareness allows a router to assist NSF-capable neighbors to continue forwarding packets during a Stateful Switchover (SSO) operation. The BGP Nonstop Forwarding Awareness feature allows an NSF-aware router that is running BGP to forward packets along routes that are already known for a router that is performing an SSO operation. This capability allows the BGP peers of the failing router to retain the routing information that is advertised by the failing router and continue to use this information until the failed router has returned to normal operating behavior and is able to exchange routing information. The peering session is maintained throughout the entire NSF operation. Finding Feature Information, on page 503 Information About BGP NSF Awareness, on page 503 How to Configure BGP NSF Awareness, on page 505 Configuration Examples for BGP NSF Awareness, on page 511 Additional References, on page 511 Feature Information for BGP NSF Awareness, on page 512 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP NSF Awareness Cisco NSF Routing and Forwarding Operation Cisco NSF is supported by the BGP, EIGRP, OSPF, and IS-IS protocols for routing and by Cisco Express Forwarding (CEF) for forwarding. Of the routing protocols, BGP, EIGRP, OSPF, and IS-IS have been enhanced with NSF capability and awareness, which means that devices running these protocols can detect a switchover and take the necessary actions to continue forwarding network traffic and to recover route information from the peer devices. In this module, a networking device is said to be NSF-aware if it is running NSF-compatible software. A device is said to be NSF-capable if it has been configured to support NSF; therefore, it rebuilds routing information from NSF-aware or NSF-capable neighbors. Each protocol depends on CEF to continue forwarding packets during switchover while the routing protocols rebuild the Routing Information Base (RIB) tables. Once the routing protocols have converged, CEF updates the Forwarding Information Base (FIB) table and removes stale route entries. CEF then updates the line cards with the new FIB information. Cisco Express Forwarding for NSF A key element of NSF is packet forwarding. In a Cisco networking device, packet forwarding is provided by CEF. CEF maintains the FIB and uses the FIB information that was current at the time of the switchover to continue forwarding packets during a switchover. This feature reduces traffic interruption during the switchover. During normal NSF operation, CEF on the active RP synchronizes its current FIB and adjacency databases with the FIB and adjacency databases on the standby RP. Upon switchover of the active RP, the standby RP initially has FIB and adjacency databases that are mirror images of those that were current on the active RP. For platforms with intelligent line cards, the line cards will maintain the current forwarding information over a switchover; for platforms with forwarding engines, CEF will keep the forwarding engine on the standby RP current with changes that are sent to it by CEF on the active RP. In this way, the line cards or forwarding engines will be able to continue forwarding after a switchover as soon as the interfaces and a data path are available. As the routing protocols start to repopulate the RIB on a prefix-by-prefix basis, the updates in turn cause prefix-by-prefix updates for CEF, which it uses to update the FIB and adjacency databases. Existing and new entries will receive the new version (epoch) number, indicating that they have been refreshed. The forwarding information is updated on the line cards or forwarding engine during convergence. The RP signals when the RIB has converged. The software removes all FIB and adjacency entries that have an epoch older than the current switchover epoch. The FIB now represents the newest routing protocol forwarding information. The routing protocols run only on the active RP, and they receive routing updates from their neighbor routers. Routing protocols do not run on the standby RP. After a switchover, the routing protocols request that the NSF-aware neighbor devices send state information to help rebuild the routing tables. For NSF operation, the routing protocols depend on CEF to continue forwarding packets while the routing protocols rebuild the routing information. Note BGP Graceful Restart for NSF When an NSF-capable router begins a BGP session with a BGP peer, it sends an OPEN message to the peer. Included in the message is a declaration that the NSF-capable or NSF-aware router has graceful restart capability. Graceful restart is themechanism bywhich BGP routing peers avoid a routing flap after a switchover. If the BGP peer has received this capability, it is aware that the device sending the message is NSF-capable. Both the NSF-capable router and its BGP peer(s) (NSF-aware peers) need to exchange the graceful restart capability in their OPEN messages, at the time of session establishment. If both peers do not exchange the graceful restart capability, the session will not be graceful restart capable. If the BGP session is lost during the RP switchover, the NSF-aware BGP peer marks all the routes associated with the NSF-capable router as stale; however, it continues to use these routes to make forwarding decisions for a set period of time. This functionality means that no packets are lost while the newly active RP is waiting for convergence of the routing information with the BGP peers. After an RP switchover occurs, the NSF-capable router reestablishes the session with the BGP peer. In establishing the new session, it sends a new graceful restart message that identifies the NSF-capable router as having restarted. At this point, the routing information is exchanged between the two BGP peers. Once this exchange is complete, the NSF-capable device uses the routing information to update the RIB and the FIB with the new forwarding information. The NSF-aware device uses the network information to remove stale routes from its BGP table. Following that, the BGP protocol is fully converged. If a BGP peer does not support the graceful restart capability, it will ignore the graceful restart capability in an OPENmessage but will establish a BGP session with the NSF-capable device. This functionality will allow interoperability with non-NSF-aware BGP peers (and without NSF functionality), but the BGP session with non-NSF-aware BGP peers will not be graceful restart capable. BGP NSF Awareness BGP support for NSF requires that neighbor routers are NSF-aware or NSF-capable. NSF awareness in BGP is also enabled by the graceful restart mechanism. A router that is NSF-aware functions like a router that is NSF-capable with one exception: an NSF-aware router is incapable of performing an SSO operation. However, a router that is NSF-aware is capable of maintaining a peering relationship with an NSF-capable neighbor during an NSF SSO operation, as well as holding routes for this neighbor during the SSO operation. The BGP Nonstop Forwarding Awareness feature provides an NSF-aware router with the capability to detect a neighbor that is undergoing an SSO operation, maintain the peering session with this neighbor, retain known routes, and continue to forward packets for these routes. The deployment of BGPNSF awareness canminimize the effects of Route Processor (RP) failure conditions and improve the overall network stability by reducing the amount of resources that are normally required for reestablishing peering with a failed router. NSF awareness for BGP is not enabled by default. The bgp graceful-restart command is used to globally enable NSF awareness on a router that is running BGP. NSF-aware operations are also transparent to the network operator and to BGP peers that do not support NSF capabilities. NSF awareness is enabled automatically in supported software images for Interior Gateway Protocols, such as EIGRP, IS-IS, and OSPF. In BGP, global NSF awareness is not enabled automatically and must be started by issuing the bgp graceful-restart command in router configuration mode. Note How to Configure BGP NSF Awareness Configuring BGP Nonstop Forwarding Awareness Using BGP Graceful Restart The tasks in this section show how configure BGP Nonstop Forwarding (NSF) awareness using the BGP graceful restart capability. The first task enables BGP NSF globally for all BGP neighbors and suggests a few troubleshooting options. The second task describes how to adjust the BGP graceful restart timers, although the default settings are optimal for most network deployments. The next three tasks demonstrate how to enable or disable BGP graceful restart for individual BGP neighbors, including peer session templates and peer groups. The final task verifies the local and peer router configurations of BGP NSF. Enabling BGP Global NSF Awareness Using BGP Graceful Restart Perform this task to enable BGP NSF awareness globally for all BGP neighbors. BGP NSF awareness is part of the graceful restart mechanism and BGP NSF awareness is enabled by issuing the bgp graceful-restart command in router configurationmode. BGPNSF awareness allowsNSF-aware routers to support NSF-capable routers during an SSO operation. NSF-awareness is not enabled by default and should be configured on all neighbors that participate in BGP NSF. The configuration of the restart and stale-path timers is not required to enable the BGP graceful restart capability. The default values are optimal for most network deployments, and these values should be adjusted only by an experienced network operator. Note Configuring both Bidirectional Forwarding Detection (BFD) and BGP graceful restart for NSF on a device running BGP may result in suboptimal routing. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. bgp graceful-restart [restart-time seconds] [stalepath-time seconds] 5. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal PurposeCommand or Action Enters router configurationmode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Enables the BGP graceful restart capability and BGP NSF awareness. bgp graceful-restart [restart-time seconds] [stalepath-time seconds] Step 4 Example: If you enter this command after the BGP session has been established, you must restart the session for the capability to be exchanged with the BGP neighbor.Device(config-router)# bgp graceful-restart Use this command on the restarting router and all of its peers (NSF-capable and NSF-aware). Exits router configurationmode and enters privileged EXEC mode. end Example: Step 5 Device(config-router)# end Troubleshooting Tips To troubleshoot the NSF feature, use the following commands in privileged EXEC mode, as needed: debug ip bgp—Displays open messages that advertise the graceful restart capability. debug ip bgp event—Displays graceful restart timer events, such as the restart timer and the stalepath timer. debug ip bgp updates—Displays sent and received EOR messages. The EOR message is used by the NSF-aware router to start the stalepath timer, if configured. show ip bgp—Displays entries in the BGP routing table. The output from this command displays routes that are marked as stale by displaying the letter “S” next to each stale route. show ip bgp neighbor—Displays information about the TCP and BGP connections to neighbor devices. When enabled, the graceful restart capability is displayed in the output of this command. What to Do Next If the bgp graceful-restart command has been issued after the BGP session has been established, you must reset by issuing the clear ip bgp * command or by reloading the router before graceful restart capabilities will be exchanged. For more information about resetting BGP sessions and using the clear ip bgp command, see the “Configuring a Basic BGP Network” module. Configuring BGP NSF Awareness Timers Perform this task to adjust the BGP graceful restart timers. There are two BGP graceful restart timers that can be configured. The optional restart-time keyword and seconds argument determine how long peer routers will wait to delete stale routes before a BGP open message is received. The default value is 120 seconds. The optional stalepath-time keyword and seconds argument determine how long a router will wait before deleting stale routes after an end of record (EOR) message is received from the restarting router. The default value is 360 seconds. The configuration of the restart and stale-path timers is not required to enable the BGP graceful restart capability. The default values are optimal for most network deployments, and these values should be adjusted only by an experienced network operator. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. bgp graceful-restart [restart-time seconds] 5. bgp graceful-restart [stalepath-time seconds] 6. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configurationmode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Enables the BGP graceful restart capability and BGP NSF awareness. bgp graceful-restart [restart-time seconds] Example: Step 4 The restart-time argument determines how long peer routers will wait to delete stale routes before a BGP open message is received. Device(config-router)# bgp graceful-restart restart-time 130 The default value is 120 seconds. The range is from 1 to 3600 seconds. Only the syntax applicable to this step is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note PurposeCommand or Action Enables the BGP graceful restart capability and BGP NSF awareness. bgp graceful-restart [stalepath-time seconds] Example: Step 5 The stalepath-time argument determines how long a router will wait before deleting stale routes after anDevice(config-router)# bgp graceful-restart stalepath-time 350 end of record (EOR) message is received from the restarting router. The default value is 360 seconds. The range is from 1 to 3600 seconds. Only the syntax applicable to this step is used in this example. For more details, see theCisco IOS IP Routing: BGP Command Reference. Note Exits router configurationmode and enters privileged EXEC mode. end Example: Step 6 Device(config-router)# end What to Do Next If the bgp graceful-restart command has been issued after the BGP session has been established, you must reset the peer sessions by issuing the clear ip bgp * command or by reloading the router before graceful restart capabilities will be exchanged. For more information about resetting BGP sessions and using the clear ip bgp command, see the “Configuring a Basic BGP Network” module. Verifying the Configuration of BGP Nonstop Forwarding Awareness Use the following steps to verify the local configuration of BGP NSF awareness on a router and to verify the configuration of NSF awareness on peer routers in a BGP network. SUMMARY STEPS 1. enable 2. show running-config [options] 3. show ip bgp neighbors [ip-address [received-routes | routes | advertised-routes | paths [regexp] | dampened-routes | flap-statistics | received prefix-filter | policy [detail]]] DETAILED STEPS Step 1 enable Enables privileged EXEC mode. Enter your password if prompted. Example: Router> enable Step 2 show running-config [options] Displays the running configuration on the local router. The output will display the configuration of the bgp graceful-restart command in the BGP section. Repeat this command on all BGP neighbor routers to verify that all BGP peers are configured for BGPNSF awareness. In this example, BGP graceful restart is enabled globally and the external neighbor at 192.168.1.2 is configured to be a BGP peer and will have the BGP graceful restart capability enabled. Example: Router# show running-config . . . router bgp 45000 bgp router-id 172.17.1.99 bgp log-neighbor-changes bgp graceful-restart restart-time 130 bgp graceful-restart stalepath-time 350 bgp graceful-restart timers bgp 70 120 neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.1.2 activate . . . Step 3 show ip bgp neighbors [ip-address [received-routes | routes | advertised-routes | paths [regexp] | dampened-routes | flap-statistics | received prefix-filter | policy [detail]]] Displays information about TCP and BGP connections to neighbors. “Graceful Restart Capability: advertised” will be displayed for each neighbor that has exchanged graceful restart capabilities with this router. In Cisco IOS Releases 12.2(33)SRC, 12.2(33)SB, or later releases, the ability to enable or disable the BGP graceful restart capability for an individual BGP neighbor, peer group or peer session template was introduced and output was added to this command to show the BGP graceful restart status. The following partial output example using a Cisco IOS Release 12.2(33)SRC image, displays the graceful restart information for internal BGP neighbor 172.21.1.2 at Router C in the figure above. Note the “Graceful-Restart is enabled” message. Example: Router# show ip bgp neighbors 172.21.1.2 BGP neighbor is 172.21.1.2, remote AS 45000, internal link BGP version 4, remote router ID 172.22.1.1 BGP state = Established, up for 00:01:01 Last read 00:00:02, last write 00:00:07, hold time is 180, keepalive intervals Neighbor sessions: 1 active, is multisession capable Neighbor capabilities: Route refresh: advertised and received(new) Address family IPv4 Unicast: advertised and received Graceful Restart Capability: advertised Multisession Capability: advertised and received ! Address tracking is enabled, the RIB does have a route to 172.21.1.2 Connections established 1; dropped 0 Last reset never Transport(tcp) path-mtu-discovery is enabled Graceful-Restart is enabled, restart-time 120 seconds, stalepath-time 360 secs Configuration Examples for BGP NSF Awareness Example: Enabling BGP Global NSF Awareness Using Graceful Restart The following example enables BGP NSF awareness globally on all BGP neighbors. The restart time is set to 130 seconds, and the stale path time is set to 350 seconds. The configuration of these timers is optional, and the preconfigured default values are optimal for most network deployments. configure terminal router bgp 45000 bgp graceful-restart bgp graceful-restart restart-time 130 bgp graceful-restart stalepath-time 350 end Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs None Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP NSF Awareness The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 42: Feature Information for BGP NSF Awareness Feature InformationReleasesFeature Name Nonstop Forwarding (NSF) awareness allows a device to assist NSF-capable neighbors to continue forwarding packets during a Stateful Switchover (SSO) operation. The BGP Nonstop Forwarding Awareness feature allows an NSF-aware device that is running BGP to forward packets along routes that are already known for a device that is performing an SSO operation. This capability allows the BGP peers of the failing device to retain the routing information that is advertised by the failing device and continue to use this information until the failed device has returned to normal operating behavior and is able to exchange routing information. The peering session is maintained throughout the entire NSF operation. The following commands were introduced or modified: bgp graceful-restart, show ip bgp, show ip bgp neighbors. Cisco IOS XE Release 2.1BGP NSF Awareness C H A P T E R 27 BGP Graceful Restart per Neighbor The BGP graceful restart feature is already available on a global basis. The BGPGraceful Restart per Neighbor feature allows BGP graceful restart to be enabled or disable for an individual neighbor, providing greater network flexibility and service. Finding Feature Information, on page 513 Information About BGP Graceful Restart per Neighbor, on page 513 How to Configure BGP Graceful Restart per Neighbor, on page 514 Configuration Examples for BGP Graceful Restart per Neighbor, on page 524 Additional References, on page 526 Feature Information for BGP Graceful Restart per Neighbor, on page 527 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP Graceful Restart per Neighbor BGP Graceful Restart per Neighbor The ability to enable or disable BGP graceful restart for every individual BGP neighbor was introduced. Three new methods of configuring BGP graceful restart for BGP peers, in addition to the existing global BGP graceful restart configuration, are now available. Graceful restart can be enabled or disabled for a BGP peer or a BGP peer group using the neighbor ha-mode graceful-restart command, or a BGP peer can inherit a graceful restart configuration from a BGP peer-session template using the ha-mode graceful-restart command. Although BGP graceful restart is disabled by default, the existing global command enables graceful restart for all BGP neighbors regardless of their capabilities. The ability to enable or disable BGP graceful restart for individual BGP neighbors provides a greater level of control for a network administrator. When the BGP graceful restart capability is configured for an individual neighbor, each method of configuring graceful restart has the same priority, and the last configuration instance is applied to the neighbor. For example, if global graceful restart is enabled for all BGP neighbors but an individual neighbor is subsequently configured as a member of a peer group for which the graceful restart is disabled, graceful restart is disabled for that neighbor. The configuration of the restart and stale-path timers is available only with the global bgp graceful-restart command, but the default values are set when the neighbor ha-mode graceful-restart or ha-mode graceful-restart commands are configured. The default values are optimal for most network deployments, and these values should be adjusted only by an experienced network operator. BGP Peer Session Templates Peer session templates are used to group and apply the configuration of general BGP session commands to groups of neighbors that share session configuration elements. General session commands that are common for neighbors that are configured in different address families can be configured within the same peer session template. Peer session templates are created and configured in peer session configuration mode. Only general session commands can be configured in a peer session template. General session commands can be configured once in a peer session template and then applied to many neighbors through the direct application of a peer session template or through indirect inheritance from a peer session template. The configuration of peer session templates simplifies the configuration of general session commands that are commonly applied to all neighbors within an autonomous system. Peer session templates support direct and indirect inheritance. A BGP neighbor can be configured with only one peer session template at a time, and that peer session template can contain only one indirectly inherited peer session template. A BGP neighbor can directly inherit only one session template and can indirectly inherit up to seven additional peer session templates. Peer session templates support inheritance. A directly applied peer session template can directly or indirectly inherit configurations from up to seven peer session templates. So, a total of eight peer session templates can be applied to a neighbor or neighbor group. Peer session templates support only general session commands. BGP policy configuration commands that are configured only for a specific address family or NLRI configuration mode are configured with peer policy templates. To use a BGP peer session template to enable or disable BGP graceful restart, see the “Enabling and Disabling BGP Graceful Restart Using BGP Peer Session Templates” section. How to Configure BGP Graceful Restart per Neighbor Enabling BGP Graceful Restart for an Individual BGP Neighbor Perform this task on Router B in the figure above to enable BGP graceful restart on the internal BGP peer at Router C in the figure above. Under the IPv4 address family, the neighbor at Router C is identified, and BGP graceful restart is enabled for the neighbor at Router C with the IP address 172.21.1.2. To verify that BGP graceful restart is enabled, the optional show ip bgp neighbors command is used. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. address-family ipv4 [unicast |multicast | vrf vrf-name] 5. neighbor ip-address remote-as autonomous-system-number 6. neighbor ip-address activate 7. neighbor ip-address ha-mode graceful-restart [disable] 8. end 9. show ip bgp neighbors [ip-address [received-routes | routes | advertised-routes | paths [regexp] | dampened-routes | flap-statistics | received prefix-filter | policy [detail]]] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configurationmode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 4 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed in addressDevice(config-router)# address-family ipv4 unicast family configurationmode for the IPv4 unicast address family if the unicast keyword is not specified. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Configures peering with a BGP neighbor in the specified autonomous system. neighbor ip-address remote-as autonomous-system-number Step 5 Example: In this example, the BGP peer at 172.21.1.2 is an internal BGP peer because it has the same autonomous PurposeCommand or Action Device(config-router-af)# neighbor 172.21.1.2 remote-as 45000 system number as the router where the BGP configuration is being entered (see Step 3). Enables the neighbor to exchange prefixes for the IPv4 address family with the local router. neighbor ip-address activate Example: Step 6 In this example, the internal BGP peer at 172.21.1.2 is activated.Device(config-router-af)# neighbor 172.21.1.2 activate Enables the BGP graceful restart capability for a BGP neighbor. neighbor ip-address ha-mode graceful-restart [disable] Example: Step 7 Use the disable keyword to disable BGP graceful restart capability.Device(config-router-af)# neighbor 172.21.1.2 ha-mode graceful-restart If you enter this command after the BGP session has been established, you must restart the session in order for the capability to be exchanged with the BGP neighbor. In this example, the BGP graceful restart capability is enabled for the neighbor at 172.21.1.2. Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 8 Device(config-router-af)# end (Optional) Displays information about TCP and BGP connections to neighbors. show ip bgp neighbors [ip-address [received-routes | routes | advertised-routes | paths [regexp] | Step 9 dampened-routes | flap-statistics | received prefix-filter | policy [detail]]] “Graceful Restart Capability: advertised” will be displayed for each neighbor that has exchanged graceful restart capabilities with this router.Example: Device# show ip bgp neighbors 172.21.1.2 • In this example, the output is filtered to display information about the BGP peer at 172.21.1.2. Examples The following example shows partial output from the show ip bgp neighbors command for the BGP peer at 172.21.1.2. Graceful restart is shown as enabled. Note the default values for the restart and stale-path timers. These timers can be set using only the global bgp graceful-restart command. Device# show ip bgp neighbors 172.21.1.2 BGP neighbor is 172.21.1.2, remote AS 45000, internal link BGP version 4, remote router ID 172.22.1.1 BGP state = Established, up for 00:01:01 Last read 00:00:02, last write 00:00:07, hold time is 180, keepalive intervals Neighbor sessions: 1 active, is multisession capable Neighbor capabilities: Route refresh: advertised and received(new) Address family IPv4 Unicast: advertised and received Graceful Restart Capability: advertised Multisession Capability: advertised and received ! Address tracking is enabled, the RIB does have a route to 172.21.1.2 Connections established 1; dropped 0 Last reset never Transport(tcp) path-mtu-discovery is enabled Graceful-Restart is enabled, restart-time 120 seconds, stalepath-time 360 secs Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Enabling and Disabling BGP Graceful Restart Using BGP Peer Session Templates Perform this task to enable and disable BGP graceful restart for BGP neighbors using peer session templates. In this task, a BGP peer session template is created, and BGP graceful restart is enabled. A second peer session template is created, and this template is configured to disable BGP graceful restart. In this example, the configuration is performed at Router B in the figure below, and two external BGP neighbors—Router A and Router E—are identified. The first BGP peer at Router A is configured to inherit the first peer session template, which enables BGP graceful restart, whereas the second BGP peer at Router E inherits the second template, which disables BGP graceful restart. Using the optional show ip bgp neighbors command, the status of the BGP graceful restart capability is verified for each BGP neighbor configured in this task. Figure 44: Network Topology Showing BGP Neighbors The restart and stale-path timers can be modified only using the global bgp graceful-restart command. The restart and stale-path timers are set to the default values when BGP graceful restart is enabled for BGP neighbors using peer session templates. A BGP peer cannot inherit from a peer policy or session template and be configured as a peer group member at the same. BGP templates and BGP peer groups are mutually exclusive. Note SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. template peer-session session-template-name 5. ha-mode graceful-restart [disable] 6. exit-peer-session 7. template peer-session session-template-name 8. ha-mode graceful-restart [disable] 9. exit-peer-session 10. bgp log-neighbor-changes 11. neighbor ip-address remote-as autonomous-system-number 12. neighbor ip-address inherit peer-session session-template-number 13. neighbor ip-address remote-as autonomous-system-number 14. neighbor ip-address inherit peer-session session-template-number 15. end 16. show ip bgp template peer-session [session-template-number] 17. show ip bgp neighbors [ip-address [received-routes | routes | advertised-routes | paths [regexp] | dampened-routes | flap-statistics | received prefix-filter | policy [detail]]] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Enters session-template configuration mode and creates a peer session template. template peer-session session-template-name Example: Step 4 PurposeCommand or Action Device(config-router)# template peer-session S1 In this example, a peer session template named S1 is created. Enables the BGP graceful restart capability and BGP NSF awareness. ha-mode graceful-restart [disable] Example: Step 5 Use the disable keyword to disable BGP graceful restart capability.Device(config-router-stmp)# ha-mode graceful-restart If you enter this command after the BGP session has been established, you must restart the session in order for the capability to be exchanged with the BGP neighbor. In this example, the BGP graceful restart capability is enabled for the peer session template named S1. Exits session-template configuration mode and returns to router configuration mode. exit-peer-session Example: Step 6 Device(config-router-stmp)# exit-peer-session Enters session-template configuration mode and creates a peer session template. template peer-session session-template-name Example: Step 7 In this example, a peer session template named S2 is created.Device(config-router)# template peer-session S2 Enables the BGP graceful restart capability and BGP NSF awareness. ha-mode graceful-restart [disable] Example: Step 8 Use the disable keyword to disable BGP graceful restart capability.Device(config-router-stmp)# ha-mode graceful-restart disable If you enter this command after the BGP session has been established, you must restart the session in order for the capability to be exchanged with the BGP neighbor. In this example, the BGP graceful restart capability is disabled for the peer session template named S2. Exits session-template configuration mode and returns to router configuration mode. exit-peer-session Example: Step 9 Device(config-router-stmp)# exit-peer-session Enables logging of BGP neighbor status changes (up or down) and neighbor resets. bgp log-neighbor-changes Example: Step 10 Use this command for troubleshooting network connectivity problems and measuring networkDevice(config-router)# bgp log-neighbor-changes PurposeCommand or Action stability. Unexpected neighbor resets might indicate high error rates or high packet loss in the network and should be investigated. Configures peering with a BGP neighbor in the specified autonomous system. neighbor ip-address remote-as autonomous-system-number Step 11 Example: In this example, the BGP peer at 192.168.1.2 is an external BGP peer because it has a different Device(config-router)# neighbor 192.168.1.2 remote-as 40000 autonomous system number from the router where the BGP configuration is being entered (see Step 3). Inherits a peer session template.neighbor ip-address inherit peer-session session-template-number Step 12 In this example, the peer session template named S1 is inherited, and the neighbor inherits the enabling of BGP graceful restart. Example: Device(config-router)# neighbor 192.168.1.2 inherit peer-session S1 Configures peering with a BGP neighbor in the specified autonomous system. neighbor ip-address remote-as autonomous-system-number Step 13 Example: In this example, the BGP peer at 192.168.3.2 is an external BGP peer because it has a different Device(config-router)# neighbor 192.168.3.2 remote-as 50000 autonomous system number from the router where the BGP configuration is being entered (see Step 3). Inherits a peer session-template.neighbor ip-address inherit peer-session session-template-number Step 14 In this example, the peer session template named S2 is inherited, and the neighbor inherits the disabling of BGP graceful restart. Example: Device(config-router)# neighbor 192.168.3.2 inherit peer-session S2 Exits router configuration mode and enters privileged EXEC mode. end Example: Step 15 Device(config-router)# end (Optional) Displays locally configured peer session templates. show ip bgp template peer-session [session-template-number] Step 16 Example: The output can be filtered to display a single peer policy template by using the session-template-name Device# show ip bgp template peer-session argument. This command also supports all standard output modifiers. (Optional) Displays information about TCP and BGP connections to neighbors. show ip bgp neighbors [ip-address [received-routes | routes | advertised-routes | paths [regexp] | Step 17 PurposeCommand or Action dampened-routes | flap-statistics | received prefix-filter | policy [detail]]] “Graceful Restart Capability: advertised” will be displayed for each neighbor that has exchanged graceful restart capabilities with this router. Example: In this example, the output is filtered to display information about the BGP peer at 192.168.1.2.Device# show ip bgp neighbors 192.168.1.2 Examples The following example shows partial output from the show ip bgp neighbors command for the BGP peer at 192.168.1.2 (Router A in the figure above). Graceful restart is shown as enabled. Note the default values for the restart and stale-path timers. These timers can be set only by using the bgp graceful-restart command. Device# show ip bgp neighbors 192.168.1.2 BGP neighbor is 192.168.1.2, remote AS 40000, external link Inherits from template S1 for session parameters BGP version 4, remote router ID 192.168.1.2 BGP state = Established, up for 00:02:11 Last read 00:00:23, last write 00:00:27, hold time is 180, keepalive intervals Neighbor sessions: 1 active, is multisession capable Neighbor capabilities: Route refresh: advertised and received(new) Address family IPv4 Unicast: advertised and received Graceful Restart Capability: advertised Multisession Capability: advertised and received ! Address tracking is enabled, the RIB does have a route to 192.168.1.2 Connections established 1; dropped 0 Last reset never Transport(tcp) path-mtu-discovery is enabled Graceful-Restart is enabled, restart-time 120 seconds, stalepath-time 360 secs Connection state is ESTAB, I/O status: 1, unread input bytes: 0 The following example shows partial output from the show ip bgp neighbors command for the BGP peer at 192.168.3.2 (Router E in the figure above). Graceful restart is shown as disabled. Device# show ip bgp neighbors 192.168.3.2 BGP neighbor is 192.168.3.2, remote AS 50000, external link Inherits from template S2 for session parameters BGP version 4, remote router ID 192.168.3.2 BGP state = Established, up for 00:01:41 Last read 00:00:45, last write 00:00:45, hold time is 180, keepalive intervals Neighbor sessions: 1 active, is multisession capable Neighbor capabilities: Route refresh: advertised and received(new) Address family IPv4 Unicast: advertised and received ! Address tracking is enabled, the RIB does have a route to 192.168.3.2 Connections established 1; dropped 0 Last reset never Transport(tcp) path-mtu-discovery is enabled Graceful-Restart is disabled Connection state is ESTAB, I/O status: 1, unread input bytes: 0 Disabling BGP Graceful Restart for a BGP Peer Group Perform this task to disable BGP graceful restart for a BGP peer group. In this task, a BGP peer group is created and graceful restart is disabled for the peer group. A BGP neighbor, Router D at 172.16.1.2 in the figure above, is then identified and added as a peer group member. It inherits the configuration associated with the peer group, which, in this example, disables BGP graceful restart. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. address-family ipv4 [unicast |multicast | vrf vrf-name] 5. neighbor peer-group-name peer-group 6. neighbor peer-group-name remote-as autonomous-system-number 7. neighbor peer-group-name ha-mode graceful-restart [disable] 8. neighbor ip-address peer-group peer-group-name 9. end 10. show ip bgp neighbors [ip-address [received-routes | routes | advertised-routes | paths [regexp] | dampened-routes | flap-statistics | received prefix-filter | policy [ detail]]] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode and creates a BGP routing process. router bgp autonomous-system-number Example: Step 3 Device(config)# router bgp 45000 Specifies the IPv4 address family and enters address family configuration mode. address-family ipv4 [unicast |multicast | vrf vrf-name] Example: Step 4 The unicast keyword specifies the IPv4 unicast address family. By default, the router is placed inDevice(config-router)# address-family ipv4 unicast address family configuration mode for the IPv4 PurposeCommand or Action unicast address family if the unicast keyword is not specified. Themulticast keyword specifies IPv4 multicast address prefixes. The vrf keyword and vrf-name argument specify the name of the VRF instance to associate with subsequent IPv4 address family configuration mode commands. Creates a BGP peer group.neighbor peer-group-name peer-groupStep 5 Example: In this example, the peer group named PG1 is created. Device(config-router-af)# neighbor PG1 peer-group Configures peering with a BGP peer group in the specified autonomous system. neighbor peer-group-name remote-as autonomous-system-number Step 6 Example: In this example, the BGP peer group named PG1 is added to the IPv4 multiprotocol BGP neighbor table of the local router.Device(config-router-af)# neighbor PG1 remote-as 45000 Enables the BGP graceful restart capability for a BGP neighbor. neighbor peer-group-name ha-mode graceful-restart [disable] Step 7 Example: Use the disable keyword to disable BGP graceful restart capability. Device(config-router-af)# neighbor PG1 ha-mode graceful-restart disable • If you enter this command after the BGP session has been established, you must restart the session for the capability to be exchanged with the BGP neighbor. In this example, the BGP graceful restart capability is disabled for the BGP peer group named PG1. Assigns the IP address of a BGP neighbor to a peer group.neighbor ip-address peer-group peer-group-nameStep 8 Example: In this example, the BGP neighbor peer at 172.16.1.2 is configured as a member of the peer group named PG1.Device(config-router-af)# neighbor 172.16.1.2 peer-group PG1 Exits address family configuration mode and returns to privileged EXEC mode. end Example: Step 9 Device(config-router-af)# end (Optional) Displays information about TCP and BGP connections to neighbors. show ip bgp neighbors [ip-address [received-routes | routes | advertised-routes | paths [regexp] | Step 10 dampened-routes | flap-statistics | received prefix-filter | policy [ detail]]] PurposeCommand or Action Example: In this example, the output is filtered to display information about the BGP peer at 172.16.1.2 and the Device# show ip bgp neighbors 172.16.1.2 “Graceful-Restart is disabled” line shows that the graceful restart capability is disabled for this neighbor. Examples The following example shows partial output from the show ip bgp neighbors command for the BGP peer at 172.16.1.2. Graceful restart is shown as disabled. Note the default values for the restart and stale-path timers. These timers can be set using only the global bgp graceful-restart command. Device# show ip bgp neighbors 172.16.1.2 BGP neighbor is 172.16.1.2, remote AS 45000, internal link Member of peer-group PG1 for session parameters BGP version 4, remote router ID 0.0.0.0 BGP state = Idle Neighbor sessions: 0 active, is multisession capable ! Address tracking is enabled, the RIB does have a route to 172.16.1.2 Connections established 0; dropped 0 Last reset never Transport(tcp) path-mtu-discovery is enabled Graceful-Restart is disabled Configuration Examples for BGP Graceful Restart per Neighbor Examples: Enabling and Disabling BGP Graceful Restart per Neighbor The ability to enable or disable the BGP graceful restart capability for an individual BGP neighbor, peer group, or peer session template was introduced. The following example is configured on Router B in the figure below and enables the BGP graceful restart capability for the BGP peer session template named S1 and disables the BGP graceful restart capability for the BGP peer session template named S2. The external BGP neighbor at Router A (192.168.1.2) inherits peer session template S1, and the BGP graceful restart capability is enabled for this neighbor. Another external BGP neighbor at Router E (192.168.3.2) is configured with the BGP graceful restart capability disabled after inheriting peer session template S2. Figure 45: Network Topology Showing BGP Neighbors for BGP Graceful Restart The BGP graceful restart capability is enabled for an individual internal BGP neighbor, Router C at 172.21.1.2, whereas the BGP graceful restart is disabled for the BGP neighbor at Router D, 172.16.1.2, because it is a member of the peer group PG1. The disabling of BGP graceful restart is configured for all members of the peer group, PG1. The restart and stale-path timers are modified, and the BGP sessions are reset. router bgp 45000 template peer-session S1 remote-as 40000 ha-mode graceful-restart exit-peer-session template peer-session S2 remote-as 50000 ha-mode graceful-restart disable exit-peer-session bgp log-neighbor-changes bgp graceful-restart restart-time 150 bgp graceful-restart stalepath-time 400 address-family ipv4 unicast neighbor PG1 peer-group neighbor PG1 remote-as 45000 neighbor PG1 ha-mode graceful-restart disable neighbor 172.16.1.2 peer-group PG1 neighbor 172.21.1.2 remote-as 45000 neighbor 172.21.1.2 activate neighbor 172.21.1.2 ha-mode graceful-restart neighbor 192.168.1.2 remote-as 40000 neighbor 192.168.1.2 inherit peer-session S1 neighbor 192.168.3.2 remote-as 50000 neighbor 192.168.3.2 inherit peer-session S2 end clear ip bgp * To demonstrate how the last configuration instance of the BGP graceful restart capability is applied, the following example initially enables the BGP graceful restart capability globally for all BGP neighbors. A BGP peer group, PG2, is configured with the BGP graceful restart capability disabled. An individual external BGP neighbor, Router A at 192.168.1.2 in the figure above, is then configured to be a member of the peer group, PG2. The last graceful restart configuration instance is applied, and, in this case, the neighbor, 192.168.1.2, inherits the configuration instance from the peer group PG2, and the BGP graceful restart capability is disabled for this neighbor. router bgp 45000 bgp log-neighbor-changes bgp graceful-restart address-family ipv4 unicast neighbor PG2 peer-group neighbor PG2 remote-as 40000 neighbor PG2 ha-mode graceful-restart disable neighbor 192.168.1.2 peer-group PG2 end clear ip bgp * Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IP Routing: BGP Command Reference BGP commands Standards and RFCs TitleStandard/RFC Graceful Restart Mechanism for BGPRFC 4724 Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP Graceful Restart per Neighbor The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 43: Feature Information for BGP Graceful Restart per Neighbor Feature InformationReleasesFeature Name The BGP Graceful Restart per Neighbor feature enables or disables the BGP graceful restart capability for an individual BGP neighbor, including using peer session templates and BGP peer groups. In Cisco IOS Release 12.2(33)SB, platform support includes the Cisco 10000 series routers. The following commands were introduced by this feature: ha-mode graceful-restart, andneighbor ha-mode graceful-restart. The following command was modified by this feature: show ip bgp neighbors. 12.2(33)SRC 12.2(33)SB Cisco IOS XE 3.8S BGPGraceful Restart per Neighbor C H A P T E R 28 BGP Support for BFD Bidirectional Forwarding Detection (BFD) is a detection protocol designed to provide fast forwarding path failure detection times for all media types, encapsulations, topologies, and routing protocols. In addition to fast forwarding path failure detection, BFD provides a consistent failure detection method for network administrators. Because the network administrator can use BFD to detect forwarding path failures at a uniform rate, rather than the variable rates for different routing protocol hello mechanisms, network profiling and planning will be easier, and reconvergence time will be consistent and predictable. The main benefit of implementing BFD for BGP is a significantly faster reconvergence time. Finding Feature Information, on page 529 Information About BGP Support for BFD, on page 529 How to Decrease BGP Convergence Time Using BFD, on page 530 Additional References, on page 533 Feature Information for BGP Support for BFD, on page 534 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About BGP Support for BFD BFD for BGP Bidirectional Forwarding Detection (BFD) is a detection protocol designed to provide fast forwarding path failure detection times for all media types, encapsulations, topologies, and routing protocols. In addition to fast forwarding path failure detection, BFD provides a consistent failure detection method for network administrators. Because the network administrator can use BFD to detect forwarding path failures at a uniform rate, rather than the variable rates for different routing protocol hello mechanisms, network profiling and planning will be easier, and reconvergence time will be consistent and predictable. The main benefit of implementing BFD for BGP is a marked decrease in reconvergence time. See also the “Configuring BGP Neighbor Session Options” chapter, the section “Configuring BFD for BGP IPv6 Neighbors.” For more details about BFD, see the Cisco IOS IP Routing: BFD Configuration Guide. How to Decrease BGP Convergence Time Using BFD Prerequisites Cisco Express Forwarding (CEF) and IP routing must be enabled on all participating routers. BGPmust be configured on the routers before BFD is deployed. You should implement fast convergence for the routing protocol that you are using. See the IP routing documentation for your version of Cisco IOS software for information on configuring fast convergence. Restrictions For the Cisco implementation of BFDSupport for BGP in Cisco IOSRelease15.1(1)SG, only asynchronous mode is supported. In asynchronous mode, either BFD peer can initiate a BFD session. IPv6 encapsulation is supported. BFD multihop is supported. Decreasing BGP Convergence Time Using BFD You start a BFD process by configuring BFD on the interface. When the BFD process is started, no entries are created in the adjacency database, in other words, no BFD control packets are sent or received. The adjacency creation takes places once you have configured BFD support for the applicable routing protocols. The first two tasks must be configured to implement BFD support for BGP to reduce the BGP convergence time. The third task is an optional task to help monitor or troubleshoot BFD. See also the “Configuring BFD for BGP IPv6 Neighbors” section in the “Configuring BGP Neighbor Session Options” module. Configuring BFD Session Parameters on the Interface The steps in this procedure show how to configure BFD on the interface by setting the baseline BFD session parameters on an interface. Repeat the steps in this procedure for each interface over which you want to run BFD sessions to BFD neighbors. SUMMARY STEPS 1. enable 2. configure terminal 3. interface type number 4. bfd interval milliseconds min_rx milliseconds multiplier interval-multiplier 5. end DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters interface configuration mode.interface type number Example: Step 3 Router(config)# interface FastEthernet 6/0 Enables BFD on the interface.bfd interval milliseconds min_rx milliseconds multiplier interval-multiplier Step 4 Example: Router(config-if)# bfd interval 50 min_rx 50 multiplier 5 Exits interface configuration mode.end Example: Step 5 Router(config-if)# end Configuring BFD Support for BGP Perform this task to configure BFD support for BGP, so that BGP is a registered protocol with BFD and will receive forwarding path detection failure messages from BFD. Before you begin BGP must be running on all participating routers. The baseline parameters for BFD sessions on the interfaces over which you want to run BFD sessions to BFD neighbors must be configured. See "Configuring BFD Session Parameters on the Interface" for more information. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. neighbor ip-address fall-over bfd 5. end 6. show bfd neighbors [details] 7. show ip bgp neighbors [ip-address [received-routes | routes | advertised-routes | paths [regexp] | dampened-routes | flap-statistics | received prefix-filter | policy [detail]]] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Specifies a BGP process and enters router configuration mode. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp tag1 Enables BFD support for fallover.neighbor ip-address fall-over bfd Example: Step 4 Router(config-router)# neighbor 172.16.10.2 fall-over bfd Returns the router to privileged EXEC mode.end Example: Step 5 Router(config-router)# end Verifies that the BFD neighbor is active and displays the routing protocols that BFD has registered. show bfd neighbors [details] Example: Step 6 Router# show bfd neighbors detail Displays information about BGP and TCP connections to neighbors. show ip bgp neighbors [ip-address [received-routes | routes | advertised-routes | paths [regexp] | dampened-routes | flap-statistics | received prefix-filter | policy [detail]]] Step 7 PurposeCommand or Action Example: Router# show ip bgp neighbors Monitoring and Troubleshooting BFD To monitor or troubleshoot BFD, perform one or more of the steps in this section. SUMMARY STEPS 1. enable 2. show bfd neighbors [details] 3. debug bfd [event | packet | ipc-error | ipc-event | oir-error | oir-event] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Router> enable (Optional) Displays the BFD adjacency database.show bfd neighbors [details]Step 2 Example: The details keyword shows all BFD protocol parameters and timers per neighbor. Router# show bfd neighbors details (Optional) Displays debugging information about BFD packets. debug bfd [event | packet | ipc-error | ipc-event | oir-error | oir-event] Example: Step 3 Router# debug bfd packet Additional References Related Documents Document TitleRelated Topic Cisco IOS Master Command List, All ReleasesCisco IOS commands Cisco IOS IP Routing: BGP Command ReferenceBGP commands Cisco IOS IP Routing: Protocol Independent Command Reference BFD commands Document TitleRelated Topic IP Routing: BFD Configuration GuideConfiguring BFD support for another routing protocol Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for BGP Support for BFD The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 44: Feature Information for BGP Support for BFD Feature InformationReleasesFeature Name Bidirectional ForwardingDetection (BFD) is a detection protocol designed to provide fast forwarding path failure detection times for all media types, encapsulations, topologies, and routing protocols. In addition to fast forwarding path failure detection, BFD provides a consistent failure detection method for network administrators. Because the network administrator can use BFD to detect forwarding path failures at a uniform rate, rather than the variable rates for different routing protocol hello mechanisms, network profiling and planning will be easier, and reconvergence time will be consistent and predictable. The main benefit of implementing BFD for BGP is a significantly faster reconvergence time. The following commands were introduced or modified by this feature: bfd, neighbor fall-over, show bfd neighbors, and show ip bgp neighbors. 12.2(33)SRA 12.2(33)SB 15.1(1)SG Cisco IOS XE Release 2.1 Cisco IOS XE Release 3.5S BGP Support for BFD C H A P T E R 29 IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family Finding Feature Information, on page 537 Information About IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family, on page 537 How to Configure IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family, on page 538 Configuration Examples for IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family, on page 539 Additional References, on page 539 Feature Information for IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family, on page 540 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family Nonstop Forwarding and Graceful Restart for MP-BGP IPv6 Address Family The graceful restart capability is supported for IPv6 BGP unicast, multicast, and VPNv6 address families, enabling Cisco nonstop forwarding (NSF) functionality for BGP IPv6. The BGP graceful restart capability allows the BGP routing table to be recovered from peers without keeping the TCP state. NSF continues forwarding packets while routing protocols converge, therefore avoiding a route flap on switchover. Forwarding is maintained by synchronizing the FIB between the active and standby RP. On switchover, forwarding is maintained using the FIB. The RIB is not kept synchronized; therefore, the RIB is empty on switchover. The RIB is repopulated by the routing protocols and subsequently informs FIB about RIB convergence by using the NSF_RIB_CONVERGED registry call. The FIB tables are updated from the RIB, removing any stale entries. The RIB starts a failsafe timer during RP switchover, in case the routing protocols fail to notify the RIB of convergence. The Cisco BGP address family identifier (AFI) model is designed to be modular and scalable, and to support multiple AFI and subsequent address family identifier (SAFI) configurations. How to Configure IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family Configuring the IPv6 BGP Graceful Restart Capability SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp as-number 4. address-family ipv6 [ vrf vrf-name ] [unicast |multicast | vpnv6] 5. bgp graceful-restart [restart-time seconds | stalepath-time seconds] [all] DETAILED STEPS PurposeCommand or Action Enables privileged EXEC mode.enableStep 1 Example: Enter your password if prompted. Device> enable Enters global configuration mode.configure terminal Example: Step 2 Device# configure terminal Enters router configuration mode for the specified routing process. router bgp as-number Example: Step 3 Device(config)# router bgp 65000 Specifies the IPv6 address family.address-family ipv6 [ vrf vrf-name ] [unicast |multicast | vpnv6] Step 4 Example: Device(config-router)# address-family ipv6 Enables the BGP graceful restart capability.bgp graceful-restart [restart-time seconds | stalepath-time seconds] [all] Step 5 PurposeCommand or Action Example: Device(config-router-af)# bgp graceful-restart Configuration Examples for IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family Example: Configuring the IPv6 BGP Graceful Restart Capability In the following example, the BGP graceful restart capability is enabled: Device# configure terminal Device(config)# router bgp 65000 Device(config-router)# address-family ipv6 Device(config-router-af)# bgp graceful-restart In the following example, the restart timer is set to 130 seconds: Device# configure terminal Device(config)# router bgp 65000 Device(config-router)# address-family ipv6 Device(config-router-af)# bgp graceful-restart restart-time 130 In the following example, the stalepath timer is set to 350 seconds: Device# configure terminal Device(config)# router bgp 65000 Device(config-router)# address-family ipv6 Device(config-router-af)# bgp graceful-restart stalepath-time 350 Additional References Related Documents Document TitleRelated Topic IPv6 Configuration GuideIPv6 addressing and connectivity Cisco IOS Master Command List, All Releases Cisco IOS commands Cisco IOS IPv6 Command Reference IPv6 commands Cisco IOS IPv6 Feature MappingCisco IOS IPv6 features Standards and RFCs TitleStandard/RFC IPv6 RFCs RFCs for IPv6 MIBs MIBs LinkMIB To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs — Technical Assistance LinkDescription http://www.cisco.com/cisco/web/support/index.htmlTheCisco Support andDocumentationwebsite provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. Feature Information for IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 45: Feature Information for IPv6: NSF and Graceful Restart for MP-BGP IPv6 Address Family Feature InformationReleasesFeature Name The graceful restart capability is supported for IPv6 BGP unicast, multicast, and VPNv6 address families, enabling Cisco NSF functionality for BGP IPv6. The BGP graceful restart capability allows the BGP routing table to be recovered from peers without keeping the TCP state. Cisco IOS XE Release 3.1IPv6: NSF and Graceful Restart for MP-BGP IPv6 Address Family C H A P T E R 30 BGP Link Bandwidth The Border Gateway Protocol (BGP) Link Bandwidth feature is used to advertise the bandwidth of an autonomous system exit link as an extended community. This feature is configured for links between directly connected external BGP (eBGP) neighbors. The link bandwidth extended community attribute is propagated to iBGP peers when extended community exchange is enabled. This feature is used with BGP multipath features to configure load balancing over links with unequal bandwidth. Finding Feature Information, on page 543 Prerequisites for BGP Link Bandwidth, on page 543 Restrictions for BGP Link Bandwidth, on page 544 Information About BGP Link Bandwidth, on page 544 How to Configure BGP Link Bandwidth, on page 545 Configuration Examples for BGP Link Bandwidth, on page 547 Additional References, on page 551 Feature Information for BGP Link Bandwidth, on page 552 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Prerequisites for BGP Link Bandwidth BGP load balancing or multipath load balancingmust be configured before BGP Link Bandwidth feature is enabled. BGP extended community exchangemust be enabled between iBGP neighbors to which the link bandwidth attribute is to be advertised. Cisco Express Forwarding or distributed Cisco Express Forwarding must be enabled on all participating routers. Restrictions for BGP Link Bandwidth The BGP Link Bandwidth feature can be configured only under IPv4 and VPNv4 address family sessions. BGP can originate the link bandwidth community only for directly connected links to eBGP neighbors. Both iBGP and eBGP load balancing are supported in IPv4 and VPNv4 address families. However, eiBGP load balancing is supported only in VPNv4 address families. Information About BGP Link Bandwidth BGP Link Bandwidth Overview The BGP Link Bandwidth feature is used to enable multipath load balancing for external links with unequal bandwidth capacity. This feature is enabled under an IPv4 or VPNv4 address family session by entering the bgp dmzlink-bw command. This feature supports iBGP, eBGPmultipath load balancing, and eiBGPmultipath load balancing in Multiprotocol Label Switching (MPLS) VPNs. When this feature is enabled, routes learned from directly connected external neighbor are propagated through the internal BGP (iBGP) network with the bandwidth of the source external link. The link bandwidth extended community indicates the preference of an autonomous system exit link in terms of bandwidth. This extended community is applied to external links between directly connected eBGP peers by entering the neighbor dmzlink-bw command. The link bandwidth extended community attribute is propagated to iBGP peers when extended community exchange is enabled with the neighbor send-community command. Link Bandwidth Extended Community Attribute The link bandwidth extended community attribute is a 4-byte value that is configured for a link on the demilitarized zone (DMZ) interface that connects two single hop eBGP peers. The link bandwidth extended community attribute is used as a traffic sharing value relative to other paths while traffic is being forwarded. Two paths are designated as equal for load balancing if the weight, local-pref, as-path length, Multi Exit Discriminator (MED), and Interior Gateway Protocol (IGP) costs are the same. Benefits of the BGP Link Bandwidth Feature The BGP Link Bandwidth feature allows BGP to be configured to send traffic over multiple iBGP or eBGP learned paths where the traffic that is sent is proportional to the bandwidth of the links that are used to exit the autonomous system. The configuration of this feature can be used with eBGP and iBGPmultipath features to enable unequal cost load balancing over multiple links. Unequal cost load balancing over links with unequal bandwidth was not possible in BGP before the BGP Link Bandwidth feature was introduced. How to Configure BGP Link Bandwidth Configuring BGP Link Bandwidth To configure the BGP Link Bandwidth feature, perform the steps in this section. SUMMARY STEPS 1. enable 2. configure terminal 3. router bgp autonomous-system-number 4. address-family ipv4 [mdt |multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast] 5. bgp dmzlink-bw 6. neighbor ip-address dmzlink-bw 7. neighbor ip-address send-community [both | extended | standard] 8. end DETAILED STEPS PurposeCommand or Action Enables higher privilege levels, such as privileged EXEC mode. enable Example: Step 1 Enter your password if prompted. Router> enable Enters global configuration mode.configure terminal Example: Step 2 Router# configure terminal Enters router configuration mode to create or configure a BGP routing process. router bgp autonomous-system-number Example: Step 3 Router(config)# router bgp 50000 Enters address family configuration mode.address-family ipv4 [mdt |multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name] | vpnv4 [unicast] Step 4 The BGP Link Bandwidth feature is supported only under the IPv4 and VPNv4 address families.Example: Router(config-router)# address-family ipv4 Configures BGP to distribute traffic proportionally to the bandwidth of the link. bgp dmzlink-bw Example: Step 5 This command must be entered on each router that contains an external interface that is to be used for multipath load balancing. Router(config-router-af)# bgp dmzlink-bw PurposeCommand or Action Configures BGP to include the link bandwidth attribute for routes learned from the external interface specified IP address. neighbor ip-address dmzlink-bw Example: Router(config-router-af)# neighbor 172.16.1.1 dmzlink-bw Step 6 This commandmust be configured for each eBGP link that is to be configured as a multipath. Enabling this command allows the bandwidth of the external link to be propagated through the link bandwidth extended community. (Optional) Enables community and/or extended community exchange with the specified neighbor. neighbor ip-address send-community [both | extended | standard] Step 7 Example: This command must be configured for iBGP peers to which the link bandwidth extended community attribute is to be propagated.Router(config-router-af)# neighbor 10.10.10.1 send-community extended Exits address family configuration mode, and enters Privileged EXEC mode. end Example: Step 8 Router(config-router-af)# end Verifying BGP Link Bandwidth Configuration To verify the BGP Link Bandwidth feature, perform the steps in this section. SUMMARY STEPS 1. enable 2. show ip bgp ip-address [longer-prefixes [injected] | shorter-prefixes [mask-length]] 3. show ip route [[ip-address [mask] [longer-prefixes]] | [protocol [process-id]] | [list access-list-number | access-list-name] | [static download]] DETAILED STEPS PurposeCommand or Action Enables higher privilege levels, such as privileged EXEC mode. enable Example: Step 1 Enter your password if prompted. Router> enable Displays information about the TCP and BGP connections to neighbors. show ip bgp ip-address [longer-prefixes [injected] | shorter-prefixes [mask-length]] Step 2 Example: The output displays the status of the link bandwidth configuration. The bandwidth of the link is shown in kilobytes.Router# show ip bgp 10.0.0.0 PurposeCommand or Action Displays the current state of the routing table.show ip route [[ip-address [mask] [longer-prefixes]] | [protocol [process-id]] | [list access-list-number | access-list-name] | [static download]] Step 3 The output displays traffic share values, including the weights of the links that are used to direct traffic proportionally to the bandwidth of each link.Example: Router# show ip route 10.0.0.0 Configuration Examples for BGP Link Bandwidth BGP Link Bandwidth Configuration Example In the following examples, the BGP Link Bandwidth feature is configured so BGP will distribute traffic proportionally to the bandwidth of each external link. The figure below shows two external autonomous systems connected by three links that each carry a different amount of bandwidth (unequal cost links). Multipath load balancing is enabled and traffic is balanced proportionally. Figure 46: BGP Link Bandwidth Configuration Router A Configuration In the following example, Router A is configured to support iBGP multipath load balancing and to exchange the BGP extended community attribute with iBGP neighbors: Router A(config)# router bgp 100 Router A(config-router)# neighbor 10.10.10.2 remote-as 100 Router A(config-router)# neighbor 10.10.10.2 update-source Loopback 0 Router A(config-router)# neighbor 10.10.10.3 remote-as 100 Router A(config-router)# neighbor 10.10.10.3 update-source Loopback 0 Router A(config-router)# address-family ipv4 Router A(config-router)# bgp dmzlink-bw Router A(config-router-af)# neighbor 10.10.10.2 activate Router A(config-router-af)# neighbor 10.10.10.2 send-community both Router A(config-router-af)# neighbor 10.10.10.3 activate Router A(config-router-af)# neighbor 10.10.10.3 send-community both Router A(config-router-af)# maximum-paths ibgp 6 Router B Configuration In the following example, Router B is configured to support multipath load balancing, to distribute Router D and Router E link traffic proportionally to the bandwidth of each link, and to advertise the bandwidth of these links to iBGP neighbors as an extended community: Router B(config)# router bgp 100 Router B(config-router)# neighbor 10.10.10.1 remote-as 100 Router B(config-router)# neighbor 10.10.10.1 update-source Loopback 0 Router B(config-router)# neighbor 10.10.10.3 remote-as 100 Router B(config-router)# neighbor 10.10.10.3 update-source Loopback 0 Router B(config-router)# neighbor 172.16.1.1 remote-as 200 Router B(config-router)# neighbor 172.16.1.1 ebgp-multihop 1 Router B(config-router)# neighbor 172.16.2.2 remote-as 200 Router B(config-router)# neighbor 172.16.2.2 ebgp-multihop 1 Router B(config-router)# address-family ipv4 Router B(config-router-af)# bgp dmzlink-bw Router B(config-router-af)# neighbor 10.10.10.1 activate Router B(config-router-af)# neighbor 10.10.10.1 next-hop-self Router B(config-router-af)# neighbor 10.10.10.1 send-community both Router B(config-router-af)# neighbor 10.10.10.3 activate Router B(config-router-af)# neighbor 10.10.10.3 next-hop-self Router B(config-router-af)# neighbor 10.10.10.3 send-community both Router B(config-router-af)# neighbor 172.16.1.1 activate Router B(config-router-af)# neighbor 172.16.1.1 dmzlink-bw Router B(config-router-af)# neighbor 172.16.2.2 activate Router B(config-router-af)# neighbor 172.16.2.2 dmzlink-bw Router B(config-router-af)# maximum-paths ibgp 6 Router B(config-router-af)# maximum-paths 6 Router C Configuration In the following example, Router C is configured to support multipath load balancing and to advertise the bandwidth of the link with Router E to iBGP neighbors as an extended community: Router C(config)# router bgp 100 Router C(config-router)# neighbor 10.10.10.1 remote-as 100 Router C(config-router)# neighbor 10.10.10.1 update-source Loopback 0 Router C(config-router)# neighbor 10.10.10.2 remote-as 100 Router C(config-router)# neighbor 10.10.10.2 update-source Loopback 0 Router C(config-router)# neighbor 172.16.3.30 remote-as 200 Router C(config-router)# neighbor 172.16.3.30 ebgp-multihop 1 Router C(config-router)# address-family ipv4 Router C(config-router-af)# bgp dmzlink-bw Router C(config-router-af)# neighbor 10.10.10.1 activate Router C(config-router-af)# neighbor 10.10.10.1 send-community both Router C(config-router-af)# neighbor 10.10.10.1 next-hop-self Router C(config-router-af)# neighbor 10.10.10.2 activate Router C(config-router-af)# neighbor 10.10.10.2 send-community both Router C(config-router-af)# neighbor 10.10.10.2 next-hop-self Router C(config-router-af)# neighbor 172.16.3.3 activate Router C(config-router-af)# neighbor 172.16.3.3 dmzlink-bw Router C(config-router-af)# maximum-paths ibgp 6 Router C(config-router-af)# maximum-paths 6 Verifying BGP Link Bandwidth The examples in this section show the verification of this feature on Router A and Router B. Router B In the following example, the show ip bgp command is entered on Router B to verify that two unequal cost best paths have been installed into the BGP routing table. The bandwidth for each link is displayed with each route. Router B# show ip bgp 192.168.1.0 BGP routing table entry for 192.168.1.0/24, version 48 Paths: (2 available, best #2) Multipath: eBGP Advertised to update-groups: 1 2 200 172.16.1.1 from 172.16.1.2 (192.168.1.1) Origin incomplete, metric 0, localpref 100, valid, external, multipath, best Extended Community: 0x0:0:0 DMZ-Link Bw 278 kbytes 200 172.16.2.2 from 172.16.2.2 (192.168.1.1) Origin incomplete, metric 0, localpref 100, valid, external, multipath, best Extended Community: 0x0:0:0 DMZ-Link Bw 625 kbytes Router A In the following example, the show ip bgp command is entered on Router A to verify that the link bandwidth extended community has been propagated through the iBGP network to Router A. The output shows that a route for each exit link (on Router B and Router C) to autonomous system 200 has been installed as a best path in the BGP routing table. Router A# show ip bgp 192.168.1.0 BGP routing table entry for 192.168.1.0/24, version 48 Paths: (3 available, best #3) Multipath: eBGP Advertised to update-groups: 1 2 200 172.16.1.1 from 172.16.1.2 (192.168.1.1) Origin incomplete, metric 0, localpref 100, valid, external, multipath Extended Community: 0x0:0:0 DMZ-Link Bw 278 kbytes 200 172.16.2.2 from 172.16.2.2 (192.168.1.1) Origin incomplete, metric 0, localpref 100, valid, external, multipath, best Extended Community: 0x0:0:0 DMZ-Link Bw 625 kbytes 200 172.16.3.3 from 172.16.3.3 (192.168.1.1) Origin incomplete, metric 0, localpref 100, valid, external, multipath, best Extended Community: 0x0:0:0 DMZ-Link Bw 2500 kbytes Router A In the following example, the show ip route command is entered on Router A to verify the multipath routes that are advertised and the associated traffic share values: Router A# show ip route 192.168.1.0 Routing entry for 192.168.1.0/24 Known via "bgp 100", distance 200, metric 0 Tag 200, type internal Last update from 172.168.1.1 00:01:43 ago Routing Descriptor Blocks: * 172.168.1.1, from 172.168.1.1, 00:01:43 ago Route metric is 0, traffic share count is 13 AS Hops 1, BGP network version 0 Route tag 200 172.168.2.2, from 172.168.2.2, 00:01:43 ago Route metric is 0, traffic share count is 30 AS Hops 1, BGP network version 0 Route tag 200 172.168.3.3, from 172.168.3.3, 00:01:43 ago Route metric is 0, traffic share count is 120 AS Hops 1, BGP network version 0 Route tag 200 Additional References The following sections provide references related to the BGP Link Bandwidth feature. Related Documents Document TitleRelated Topic Cisco IOS IP Routing: BGP Command ReferenceBGP commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples " BGPMultipath Load Sharing for Both eBGP and iBGP in an MPLS-VPN" BGP multipath load sharing for both eBGP and iBGP in an MPLS-VPN "iBGP Multipath Load Sharing"iBGP multipath load sharing Cisco IOS Master Command List, All ReleasesCisco IOS master command list, all releases Standards TitleStandard --No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. MIBs MIBs LinkMIB To locate and downloadMIBs for selected platforms, Cisco IOS XE software releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs No new or modifiedMIBs are supported by this feature, and support for existing MIBs has not been modified by this feature. Technical Assistance LinkDescription http://www.cisco.com/techsupportThe Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies. To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds. Access to most tools on the Cisco Support website requires a Cisco.com user ID and password. Feature Information for BGP Link Bandwidth The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Table 46: Feature Information for BGP Link Bandwidth Feature InformationReleasesFeature Name This feature was introduced on the Cisco ASR 1000 Series Aggregation Services Routers. The following commands were added or modified by this feature: bgp dmzlink-bw, neighbor dmzlink-bw. Cisco IOS XE Release 2.1 BGP Link Bandwidth C H A P T E R 31 Border Gateway Protocol Link-State Border Gateway Protocol Link-State (BGP-LS) is an Address Family Identifier (AFI) and Sub-address Family Identifier (SAFI) defined to carry interior gateway protocol (IGP) link-state database through BGP routing protocol. BGP-LS delivers network topology information to topology servers and Application Layer Traffic Optimization (ALTO) servers. BGP-LS allows policy-based control to aggregation, information-hiding, and abstraction. BGP-LS supports IS-IS and OSPFv2. Finding Feature Information, on page 553 Information About Border Gateway Protocol Link-State, on page 553 How to Configure OSPF With Border Gateway Protocol Link-State, on page 557 How to Configure IS-IS With Border Gateway Protocol Link-State , on page 558 Verifying Border Gateway Protocol Link-State Configurations, on page 560 Border Gateway Protocol Link-State Debug Commands, on page 563 Additional References for Border Gateway Protocol Link-State, on page 563 Feature Information for Border Gateway Protocol Link-State, on page 564 Finding Feature Information Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Information About Border Gateway Protocol Link-State Overview of Link-State Information in Border Gateway Protocol In a number of environments, a component external to a network is called upon to perform computations based on the network topology and current state of the connections within the network, including Traffic Engineering (TE) information. This information is typically distributed by interior gateway protocol (IGP) routing protocols within the network. This module describes a mechanism by which link-state (LS) and Traffic Engineering (TE) information from IGPs are collected from networks and shared with external components using the BGP routing protocol, which uses a new BGP Network Layer Reachability Information (NLRI) encoding format. This mechanism is applicable to both physical and virtual links. Applications of this technique include Application-Layer Traffic Optimization (ALTO) servers and Path Computation Elements (PCEs), which are outside the network, but requires real-time information of the state of the network. For example, the link-state database information of each IGP node (OSPF or IS-IS) from the entire network. In order to address the need for applications that require topological visibility across IGP areas, or even across Autonomous Systems (AS), the BGP-LS address-family or a sub-address-family have been defined to allow BGP to carry link-state information. The identifying key of each link-state object, for example, a node, link, or prefix, is encoded in the NLRI and the properties of the object are encoded in the BGP-LS attribute. The below figure describes a typical deployment scenario of a network that utilizes BGP-LS. In each IGP area, one or more nodes are configured with BGP-LS. These BGP speakers form an IBGPmesh by connecting to one or more route- reflectors. This way, all BGP speakers (specifically the route- reflectors (RR)) obtain link-state information from all IGP areas (and from other ASes from EBGP peers). An external component connects to the route-reflector to obtain this information (perhaps moderated by a policy regarding what information is or is not advertised to the external component). An external component (for example, a controller) then can collect these information in the "northbound" direction across IGP areas or ASes and construct the end-to-end path (with its associated SIDs) that are applied to an incoming packet for end-to-end forwarding. Figure 47: Relation between IGP nodes and BGP Carrying Link-State Information in Border Gateway Protocol Carrying link-state information contains two parts: Definition of a new BGP NLRI that describes links, nodes, and prefixes comprises of IGP link-state information. Definition of a new BGP-LS attribute that carries link, node, and prefix properties and attributes, such as the link and prefix metric or auxiliary Router IDs of nodes, and so on. TLV Format Information in the new Link-State NLRIs and attributes is encoded in Type/Length/Value (TLV) triplets. The TLV format is shown in the below figure. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Value (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Length field defines the length of the value portion in octets (thus, a TLV with no value portion would have a length of zero). Link-State NLRI The MP_REACH_NLRI and MP_UNREACH_NLRI attributes are BGP's containers for carrying opaque information. Each Link-State Network Layer Reachability Information (NLRI) describes either a node, a link, or a prefix. NLRI body is a set of Type/Length/Value triplets (TLV) and contains the data that identifies an object. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NLRI Type | Total NLRI Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | // Link-State NLRI (variable) // | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ NLRI Types The Total NLRI length field contains the cumulative length, in octets, of the rest of the NLRI, not including the NLRI Type field or itself. Figure 48: The NLRI Types +------+---------------------------+ | Type | NLRI Type | +------+---------------------------+ | 1 | Node NLRI | | 2 | Link NLRI | | 3 | IPv4 Topology Prefix NLRI | | 4 | IPv6 Topology Prefix NLRI | +------+---------------------------+ The NLRI Types are shown in the following figures: Figure 49: The Node NLRI Format 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+ | Protocol-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identifier | | (64 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Local Node Descriptors (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 50: The Link NLRI Format 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+ | Protocol-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identifier | | (64 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Local Node Descriptors (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Remote Node Descriptors (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Link Descriptors (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The IPv4 and IPv6 Prefix NLRIs (NLRI Type = 3 and Type = 4) use the same format, as shown in the following figure. Figure 51: The IPv4/IPv6 Topology Prefix NLRI Format 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+ | Protocol-ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identifier | | (64 bits) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Local Node Descriptors (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Prefix Descriptors (variable) // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Node Descriptors Each link is anchored by a pair of Router-IDs that are used by the underlying IGP, namely, a 48-bit ISO System-ID for IS-IS and a 32-bit Router-ID for OSPFv2 and OSPFv3. An IGPmay use one or more additional auxiliary Router-IDs, mainly for traffic engineering purposes. For example, IS-IS may have one or more IPv4 and IPv6 TE Router-IDs. These auxiliary Router-IDs must be included in the link attribute. Link Descriptors The Link Descriptor field is a set of Type/Length/Value (TLV) triplets. The link descriptor TLVs uniquely identify a link among multiple parallel links between a pair of anchor routers. A link described by the link descriptor TLVs actually is a "half-link", a unidirectional representation of a logical link. In order to fully describe a single logical link, two originating routers advertise a half-link each, that is, two Link NLRIs are advertised for a given point-to-point link. Prefix Descriptors The Prefix Descriptor field is a set of Type/Length/Value (TLV) triplets. Prefix Descriptor TLVs uniquely identify an IPv4 or IPv6 prefix originated by a node. BGP-LS Attribute The BGP-LS attribute is an optional, non-transitive BGP attribute that is used to carry link, node, and prefix parameters and attributes. It is defined as a set of Type/Length/Value (TLV) triplets. This attribute should only be included with Link-State NLRIs. This attribute must be ignored for all other address families. How to Configure OSPF With Border Gateway Protocol Link-State OSPF is one of the IGP protocols that feeds its topology into BGP into the LS cache. Link state information can be passed to BGP in two ways: When new communications betweenOSPF and BGP has been established, or when BGP-LS functionality has been initially enabled under OSPF, then all LSA information is downloaded to BGP via the LS library. As new LSA information is being processed or received from remote OSPF nodes, this information is added or updated in BGP. Configuring Border Gateway Protocol Link-State With OSPF Perform the following steps to configure OSPF with BGP-LS: 1. Enable the OSPF routing protocol and enter router configuration mode. router ospf For example, Device(config-router)# router ospf 10 2. Distribute BGP link-state. distribute link-state For example, Device(config-router)# distribute link-state instance-id Device(config-router)# distribute link-state throttle