766
Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x First Published: 2017-09-15 Last Modified: 2018-03-01 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

Routing Configuration Guide for Cisco ASR 9000 Series ... · RoutingConfigurationGuideforCiscoASR9000SeriesRouters,IOS XRRelease6.3.x FirstPublished:2017-09-15 LastModified:2018-03-01

Embed Size (px)

Citation preview

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOSXR Release 6.3.xFirst Published: 2017-09-15

Last Modified: 2018-03-01

Americas HeadquartersCisco Systems, Inc.170 West Tasman DriveSan Jose, CA 95134-1706USAhttp://www.cisco.comTel: 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 WITHTHE 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 ofthe 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 OFMERCHANTABILITY, 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, WITHOUTLIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERSHAVE 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, networktopology 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 unintentionaland 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.comgo 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 anyother company. (1721R)

20172018 Cisco Systems, Inc. All rights reserved.

www.cisco.com/go/trademarkswww.cisco.com/go/trademarks

C O N T E N T S

Preface xxixP R E F A C EChanges to This Document xxix

Communications, Services, and Additional Information xxix

New and Changed Routing Features 1C H A P T E R 1

New and Changed Routing Features 1

Implementing BGP 3C H A P T E R 2

Prerequisites for Implementing BGP 5

Information About Implementing BGP 5

BGP Functional Overview 5

BGP Router Identifier 6

BGP Maximum Prefix - Discard Extra Paths 7

Restrictions 7

BGP Default Limits 7

BGP Next Hop Tracking 8

Scoped IPv4/VPNv4 Table Walk 10

Reordered Address Family Processing 10

New Thread for Next-Hop Processing 10

show, clear, and debug Commands 10

Autonomous System Number Formats in BGP 11

2-byte Autonomous System Number Format 11

4-byte Autonomous System Number Format 11

as-format Command 11

BGP Configuration 11

Configuration Modes 11

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xiii

Neighbor Submode 16

Configuration Templates 17

Template Inheritance Rules 18

Viewing Inherited Configurations 23

No Default Address Family 28

Neighbor Address Family Combinations 28

Routing Policy Enforcement 28

Table Policy 30

Update Groups 30

BGP Update Generation and Update Groups 31

BGP Update Group 31

BGP Cost Community 31

How BGP Cost Community Influences the Best Path Selection Process 31

Cost Community Support for Aggregate Routes and Multipaths 32

Influencing Route Preference in a Multiexit IGP Network 34

BGP Cost Community Support for EIGRP MPLS VPN PE-CE with Back-door Links 34

Adding Routes to the Routing Information Base 35

BGP DMZ Aggregate Bandwidth 36

Configuring BGP DMZ Aggregate Bandwidth: Example 37

Configuring Policy-based Link Bandwidth: Example 37

64-ECMP Support for BGP 38

BGP Best Path Algorithm 38

Comparing Pairs of Paths 38

Order of Comparisons 40

Best Path Change Suppression 41

Administrative Distance 41

Multiprotocol BGP 43

Route Dampening 45

Minimizing Flapping 45

BGP Routing Domain Confederation 46

BGP Route Reflectors 46

BGP Optimal Route Reflector 49

Use Case 50

RPL - if prefix is-best-path/is-best-multipath 53

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xiv

Contents

Remotely Triggered Blackhole Filtering with RPL Next-hop Discard Configuration 54

Configuring Destination-based RTBH Filtering 54

Verification 56

Default Address Family for show Commands 56

TCP Maximum Segment Size 57

Per Neighbor TCP MSS 57

MPLS VPN Carrier Supporting Carrier 57

BGP Keychains 58

BGP Nonstop Routing 58

BGP Local Label Retention 60

Command Line Interface (CLI) Consistency for BGP Commands 60

BGP Additional Paths 60

iBGP Multipath Load Sharing 60

BGP Selective Multipath 61

Accumulated Interior Gateway Protocol Attribute 63

Per VRF and Per CE Label for IPv6 Provider Edge 63

IPv4 BGP-Policy Accounting on Cisco ASR 9000's A9K-SIP-700 63

IPv6 Unicast Routing on Cisco ASR 9000's A9K-SIP-700 64

IPv6 uRPF Support on Cisco ASR 9000's A9K-SIP-700 64

Remove and Replace Private AS Numbers from AS Path in BGP 64

Selective VRF Download 65

Line Card Roles and Filters in Selective VRF Download 65

Selective VRF Download Disable 66

Calculating Routes Downloaded to Line Card with or without SVD 66

BGP Accept Own 68

BGP DMZ Link Bandwidth for Unequal Cost Recursive Load Balancing 70

BFD Multihop Support for BGP 70

BGP Multi-Instance and Multi-AS 70

BGP Prefix Origin Validation Based on RPKI 71

Configuring RPKI Cache-server 71

Configuring RPKI Prefix Validation 73

Configuring RPKI Bestpath Computation 74

BGP 3107 PIC Updates for Global Prefixes 75

BGP Prefix Independent Convergence for RIB and FIB 76

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xv

Contents

BGP Update Message Error Handling 77

BGP Attribute Filtering 77

BGP Attribute Filter Actions 77

BGP Error Handling and Attribute Filtering Syslog Messages 78

BGP Link-State 78

BGP Permanent Network 79

BGP-RIB Feedback Mechanism for Update Generation 79

BGP VRF Dynamic Route Leaking 80

EVPN Default VRF Route Leaking 80

EVPN Default VRF Route Leaking on the DCI for Internet Connectivity 82

Leaking Routes from Default-VRF to Data Center-VRF 82

Leaking Routes to Default-VRF from Data Center-VRF 84

EVPN Service VRF Route Leaking 87

EVPN Service VRF Route Leaking on the DCI for Service Connectivity 89

Leaking Routes from Service VRF to Data Center VRF 89

Leaking Routes to Service VRF from Data Center VRF 92

User Defined Martian Check 97

Resilient Per-CE Label Mode 98

Implementing Excessive Punt Flow Trap on BGP and OSPF 98

Information About Excessive Punt Flow Trap 99

Restrictions for Implementing EPFT 99

Enable Excessive Punt Flow Trap Processing 99

BGP Multipath Enhancements 100

MVPN with BGP SAFI-2 and SAFI-129 101

Overview of BGP Monitoring Protocol 102

BGPMultiple Cluster IDs 103

Benefit of Multiple Cluster IDs Per Route Reflector 103

How a CLUSTER_LIST Attribute is Used 104

Behaviors When Disabling Client-to-Client Route Reflection 104

Configure a Cluster ID per Neighbor 105

Disable Client-to-Client Reflection for Specified Cluster IDs 107

How to Implement BGP 108

Enabling BGP Routing 108

Configuring Multiple BGP Instances for a Specific Autonomous System 110

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xvi

Contents

Configuring a Routing Domain Confederation for BGP 111

Resetting an eBGP Session Immediately Upon Link Failure 112

Logging Neighbor Changes 112

Adjusting BGP Timers 112

Changing the BGP Default Local Preference Value 113

Configuring the MED Metric for BGP 114

Configuring BGP Weights 115

Tuning the BGP Best-Path Calculation 116

Indicating BGP Back-door Routes 117

Configuring Aggregate Addresses 118

Redistributing iBGP Routes into IGP 119

Configuring Discard Extra Paths 120

Configuring Per Neighbor TCP MSS 121

Disabling Per Neighbor TCP MSS 123

Redistributing Prefixes into Multiprotocol BGP 125

Configuring BGP Route Dampening 127

Applying Policy When Updating the Routing Table 131

Setting BGP Administrative Distance 132

Configuring a BGP Neighbor Group and Neighbors 133

Configuring a Route Reflector for BGP 135

Configuring BGP Route Filtering by Route Policy 136

Configuring BGP Attribute Filtering 138

Configuring BGP Next-Hop Trigger Delay 139

Disabling Next-Hop Processing on BGP Updates 140

Configuring BGP Community and Extended-Community Advertisements 141

Configuring the BGP Cost Community 143

Configuring Software to Store Updates from a Neighbor 146

BGP Persistence 147

BGP Persistence Configuration: Example 148

BGP Graceful Maintenance 148

Restrictions for BGP Graceful Maintenance 148

Graceful Maintenance Operation 149

Inter Autonomous System 150

No Automatic Shutdown 150

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xvii

Contents

When to Shut Down After Graceful Maintenance 150

Activate Graceful Maintenance under BGP Router (All Neighbors) 150

Direct Router to Reduce Route Preference 153

Bring Router or Link Back into Service 155

Show Command Outputs to Verify BGP Graceful Maintenance 155

L3VPN iBGP PE-CE 156

L3VPN iBGP PE-CE Overview 156

Restrictions for L3VPN iBGP PE-CE 157

Configuring L3VPN iBGP PE-CE 157

Flow-tag propagation 160

Restrictions for flow-tag propagation 160

Source and destination-based flow tag 160

Configure Source and Destination-based Flow Tag 160

Configuring a VPN Routing and Forwarding Instance in BGP 162

Defining Virtual Routing and Forwarding Tables in Provider Edge Routers 162

Configuring the Route Distinguisher 164

Configuring PE-PE or PE-RR Interior BGP Sessions 165

Configuring Route Reflector to Hold Routes That Have a Defined Set of RT Communities 168

Configuring BGP as a PE-CE Protocol 169

Redistribution of IGPs to BGP 172

Configuring Keychains for BGP 174

Disabling a BGP Neighbor 175

Neighbor Capability Suppression 176

Configuration: 176

BGP Dynamic Neighbors 176

Configuring BGP Dynamic Neighbors using Address Range 177

Remote AS 178

Maximum-peers and Idle-watch timeout 180

Resetting Neighbors Using BGP Inbound Soft Reset 181

Resetting Neighbors Using BGP Outbound Soft Reset 182

Resetting Neighbors Using BGP Hard Reset 182

Clearing Caches, Tables, and Databases 183

Displaying System and Network Statistics 184

Displaying BGP Process Information 186

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xviii

Contents

Monitoring BGP Update Groups 187

Configuring BGP Nonstop Routing 188

Disable BGP Nonstop Routing 188

Re-enable BGP Nonstop Routing 188

Installing Primary Backup Path for Prefix Independent Convergence (PIC) 189

Retaining Allocated Local Label for Primary Path 190

Configuring BGP Additional Paths 191

Configuring iBGP Multipath Load Sharing 193

Originating Prefixes with AiGP 193

Configuring BGP Accept Own 195

Configuring BGP Link-State 196

Configuring BGP Link-state 196

Configuring Domain Distinguisher 197

Configuring BGP Permanent Network 197

Configuring BGP Permanent Network 197

How to Advertise Permanent Network 199

Enabling BGP Unequal Cost Recursive Load Balancing 200

Configuring VRF Dynamic Route Leaking 202

Enabling Selective VRF Download 203

Disabling Selective VRF Download 205

Configuring Resilient Per-CE Label Mode 207

Configuring Resilient Per-CE Label Mode Under VRF Address Family 207

Configuring Resilient Per-CE Label Mode Using a Route-Policy 209

Configuring BGP Large Communities 210

Configuration Examples for Implementing BGP 215

Enabling BGP: Example 215

Displaying BGP Update Groups: Example 217

BGP Neighbor Configuration: Example 217

BGP Confederation: Example 218

BGP Route Reflector: Example 220

BGP Nonstop Routing Configuration: Example 220

Primary Backup Path Installation: Example 220

Allocated Local Label Retention: Example 220

iBGP Multipath Loadsharing Configuration: Example 221

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xix

Contents

Discard Extra Paths Configuration: Example 221

Displaying Discard Extra Paths Information: Example 221

Configure Per Neighbor TCP MSS: Examples 222

Verify Per Neighbor TCP MSS: Examples 224

Originating Prefixes With AiGP: Example 226

BGP Accept Own Configuration: Example 226

BGP Unequal Cost Recursive Load Balancing: Example 227

VRF Dynamic Route Leaking Configuration: Example 229

Resilient Per-CE Label Mode Configuration: Example 230

Configuring Resilient Per-CE Label Mode Under VRF Address Family: Example 230

Configuring Resilient Per-CE Label Mode Using a Route-Policy: Example 230

Flow-tag propagation 230

Restrictions for Flow-Tag Propagation 231

Where to Go Next 231

Additional References 231

Implementing BGP Flowspec 235C H A P T E R 3

BGP Flow Specification 235

Limitations 236

BGP Flowspec Conceptual Architecture 236

Information About Implementing BGP Flowspec 237

Flow Specifications 237

Supported Matching Criteria and Actions 238

Traffic Filtering Actions 242

BGP Flowspec Client-Server (Controller) Model and Configuration with ePBR 243

Configuring BGP Flowspec with ePBR 244

Enable BGP Flowspec 245

Configure a Class Map 246

Configure a Policy Map 248

Link BGP Flowspec to ePBR Policies 249

Verify BGP Flowspec 253

Preserving Redirect Nexthop 255

Validate BGP Flowspec 256

Disabling BGP Flowspec 257

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xx

Contents

Disable Flowspec Redirect and Validation 258

Configuration Examples for Implementing BGP Flowspec 259

Flowspec Rule Configuration 259

Drop Packet Length 260

Redirect traffic and rate-limit: Example 260

Redirect Traffic from Global to VRF (vrf1) 261

Remark DSCP 261

Additional References for BGP Flowspec 261

Implementing BFD 263C H A P T E R 4

Prerequisites for Implementing BFD 265

Restrictions for Implementing BFD 266

Information About BFD 267

Differences in BFD in Cisco IOS XR Software and Cisco IOS Software 267

BFD Multipath Sessions Support on nV Edge System 268

BFD Modes of Operation 268

BFD Packet Information 269

BFD Source and Destination Ports 269

BFD Packet Intervals and Failure Detection 269

Priority Settings for BFD Packets 273

BFD for IPv4 274

BFD for IPv6 275

BFD on Bundled VLANs 275

BFD Over Member Links on Link Bundles 276

Overview of BFD State Change Behavior on Member Links and Bundle Status 277

BFD Multipath Sessions 278

BFD for MultiHop Paths 279

Setting up BFD Multihop 279

BFD over MPLS Traffic Engineering LSPs 279

Echo Timer configuration for BFD on Bundle Interfaces 280

Bidirectional Forwarding Detection over Logical Bundle 281

Bidirectional Forwarding Detection over Generic Routing Encapsulation 281

Configure Bidirectional Forwarding Detection over Generic Routing Encapsulation 282

Bidirectional Forwarding Detection IPv6 Multihop 285

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxi

Contents

BFD over Pseudowire Headend 285

BFD over Satellite Interfaces 285

BFD over IRB 286

BFD over Bundle Per-Member Link 286

BFD over Bundles CISCO/IETF Mode Support on a Per Bundle Basis 287

BFD Dampening 288

BFD Hardware Offload 288

BFD Object Tracking 289

How to Configure BFD 290

BFD Configuration Guidelines 290

Configuring BFD Under a Dynamic Routing Protocol or Using a Static Route 290

Enabling BFD on a BGP Neighbor 290

Enabling BFD for OSPF on an Interface 292

Enabling BFD for OSPFv3 on an Interface 294

Enabling BFD on a Static Route 295

Enabling BFD on a IPv6 Static Route 296

Configuring BFD on Bundle Member Links 297

Prerequisites for Configuring BFD on Bundle Member Links 297

Specifying the BFD Destination Address on a Bundle 297

Enabling BFD Sessions on Bundle Members 297

Configuring the Minimum Thresholds for Maintaining an Active Bundle 298

Configuring BFD Packet Transmission Intervals and Failure Detection Times on a Bundle 299

Configuring Allowable Delays for BFD State Change Notifications Using Timers on a Bundle300

Configure BFD over Bundles CISCO/IETF Mode Support on a Per Bundle Basis 301

Configuring BFD over Bundle for Hardware Offload 303

Enabling Echo Mode to Test the Forwarding Path to a BFD Peer 306

Overriding the Default Echo Packet Source Address 306

Specifying the Echo Packet Source Address Globally for BFD 307

Specifying the Echo Packet Source Address on an Individual Interface or Bundle 307

Configuring BFD Session Teardown Based on Echo Latency Detection 308

Delaying BFD Session Startup Until Verification of Echo Path and Latency 309

Disabling Echo Mode 310

Disabling Echo Mode on a Router 310

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxii

Contents

Disabling Echo Mode on an Individual Interface or Bundle 311

Minimizing BFD Session Flapping Using BFD Dampening 312

Enabling and Disabling IPv6 Checksum Support 312

Enabling and Disabling IPv6 Checksum Calculations for BFD on a Router 313

Enabling and Disabling IPv6 Checksum Calculations for BFD on an Individual Interface orBundle 313

Clearing and Displaying BFD Counters 314

Configuring Coexistence Between BFD over Bundle (BoB) and BFD over Logical Bundle (BLB)315

BFD IPv6 in Bundle Manager Domain 316

Configuration: 316

Configuring BFD IPv6 Multihop 318

Configuring BFD IPv6 Multihop for eBGP Neighbors 318

Configuring BFD IPv6 Multihop for iBGP Neighbors 318

Configuring BFD over MPLS Traffic Engineering LSPs 319

Enabling BFD Parameters for BFD over TE Tunnels 319

Configuring BFD Bring up Timeout 320

Configuring BFD Dampening for TE Tunnels 321

Configuring Periodic LSP Ping Requests 322

Configuring BFD at the Tail End 323

Configuring BFD over LSP Sessions on Line Cards 324

Configuring BFD Object Tracking: 325

Configuration Examples for Configuring BFD 326

BFD Over BGP: Example 326

BFD Over OSPF: Examples 326

BFD Over Static Routes: Examples 327

BFD on Bundled VLANs: Example 327

BFD Over Bridge Group Virtual Interface: Example 328

BFD on Bundle Member Links: Examples 330

Echo Packet Source Address: Examples 331

Echo Latency Detection: Examples 332

Echo Startup Validation: Examples 332

BFD Echo Mode Disable: Examples 333

BFD Dampening: Examples 333

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxiii

Contents

BFD IPv6 Checksum: Examples 333

BFD Peers on Routers Running Cisco IOS and Cisco IOS XR Software: Example 334

BFD Over Bundle Hardware Offload: Example 334

Configuring BFD IPv6 Multihop: Examples 336

BFD over MPLS TE LSPs: Examples 336

BFD over MPLS TE Tunnel Head-end Configuration: Example 336

BFD over MPLS TE Tunnel Tail-end Configuration: Example 336

Where to Go Next 337

Additional References 337

Related Documents 337

Standards 337

RFCs 338

MIBs 338

Technical Assistance 338

Implementing EIGRP 339C H A P T E R 5

Prerequisites for Implementing EIGRP 340

Restrictions for Implementing EIGRP 340

Information About Implementing EIGRP 340

EIGRP Functional Overview 340

EIGRP Features 341

EIGRP Components 341

EIGRP Configuration Grouping 342

EIGRP Configuration Modes 342

EIGRP Interfaces 343

Redistribution for an EIGRP Process 343

Metric Weights for EIGRP Routing 344

Mismatched K Values 344

Goodbye Message 345

Percentage of Link Bandwidth Used for EIGRP Packets 345

Floating Summary Routes for an EIGRP Process 345

Split Horizon for an EIGRP Process 347

Adjustment of Hello Interval and Hold Time for an EIGRP Process 347

Stub Routing for an EIGRP Process 348

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxiv

Contents

Route Policy Options for an EIGRP Process 349

EIGRP Layer 3 VPN PE-CE Site-of-Origin 350

Router Interoperation with the Site-of-Origin Extended Community 350

Route Manipulation using SoO match condition 350

EIGRP v4/v6 Authentication Using Keychain 352

EIGRP Wide Metric Computation 352

EIGRP Multi-Instance 353

EIGRP Support for BFD 353

How to Implement EIGRP 353

Enabling EIGRP Routing 353

Configuring Route Summarization for an EIGRP Process 355

Redistributing Routes for EIGRP 356

Creating a Route Policy and Attaching It to an EIGRP Process 358

Configuring Stub Routing for an EIGRP Process 359

Configuring EIGRP as a PE-CE Protocol 360

Redistributing BGP Routes into EIGRP 362

Monitoring EIGRP Routing 363

Configuring an EIGRP Authentication Keychain 366

Configuring an Authentication Keychain for an IPv4/IPv6 Interface on a Default VRF 366

Configuring an Authentication Keychain for an IPv4/IPv6 Interface on a Nondefault VRF 367

Configuring unicast neighbors 368

Remote Neighbor Session Policy 368

Understanding Neighbor Terms 369

Remote Unicast-Listen (Point-to-Point) Neighbors 370

Restrictions for remote neighbors 370

Inheritance and precedence of the remote neighbor configurations 370

How to configure remote unicast neighbors 371

Configuration Examples for Implementing EIGRP 372

Configuring a Basic EIGRP Configuration: Example 372

Configuring an EIGRP Stub Operation: Example 373

Configuring an EIGRP PE-CE Configuration with Prefix-Limits: Example 373

Configuring an EIGRP Authentication Keychain: Example 373

Additional References 374

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxv

Contents

Implementing IS-IS 377C H A P T E R 6

Prerequisites for Implementing IS-IS 377

Restrictions for Implementing IS-IS 377

Information About Implementing IS-IS 378

IS-IS Functional Overview 378

Key Features Supported in the Cisco IOS XR IS-IS Implementation 378

IS-IS Configuration Grouping 379

IS-IS Configuration Modes 379

Router Configuration Mode 379

Router Address Family Configuration Mode 379

Interface Configuration Mode 379

Interface Address Family Configuration Mode 379

IS-IS Interfaces 380

Multitopology Configuration 380

IPv6 Routing and Configuring IPv6 Addressing 380

Limit LSP Flooding 380

Flood Blocking on Specific Interfaces 381

Mesh Group Configuration 381

Maximum LSP Lifetime and Refresh Interval 381

Single-Topology IPv6 Support 381

Multitopology IPv6 for IS-IS 382

IS-IS Authentication 382

Nonstop Forwarding 383

ISIS NSR 384

Configuring IS-IS Adjacency Stagger 384

Multi-Instance IS-IS 385

Multiprotocol Label Switching Traffic Engineering 385

Overload Bit on Router 385

Overload Bit Configuration During Multitopology Operation 386

IS-IS Overload Bit Avoidance 386

Default Routes 386

Attached Bit on an IS-IS Instance 386

IS-IS Support for Route Tags 387

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxvi

Contents

Multicast-Intact Feature 387

Multicast Topology Support Using IS-IS 387

MPLS Label Distribution Protocol IGP Synchronization 388

MPLS LDP-IGP Synchronization Compatibility with LDP Graceful Restart 388

MPLS LDP-IGP Synchronization Compatibility with IGP Nonstop Forwarding 388

Label Distribution Protocol IGP Auto-configuration 388

MPLS TE Forwarding Adjacency 389

MPLS TE Interarea Tunnels 389

IP Fast Reroute 389

Unequal Cost Multipath Load-balancing for IS-IS 389

Enabling IS-IS and Configuring Level 1 or Level 2 Routing 390

Configuring Single Topology for IS-IS 392

Configuring Multitopology Routing 396

Restrictions for Configuring Multitopology Routing 396

Information About Multitopology Routing 396

Configuring a Global Topology and Associating It with an Interface 396

Enabling an IS-IS Topology 398

Placing an Interface in a Topology in IS-IS 398

Configuring a Routing Policy 399

Configuring Multitopology for IS-IS 400

Controlling LSP Flooding for IS-IS 400

Configuring Nonstop Forwarding for IS-IS 404

Configuring ISIS-NSR 405

Configuring Authentication for IS-IS 407

Configuring Keychains for IS-IS 409

Configuring MPLS Traffic Engineering for IS-IS 410

Tuning Adjacencies for IS-IS 412

Setting SPF Interval for a Single-Topology IPv4 and IPv6 Configuration 414

Customizing Routes for IS-IS 416

Configuring MPLS LDP IS-IS Synchronization 418

Enabling Multicast-Intact 419

Tagging IS-IS Interface Routes 420

Setting the Priority for Adding Prefixes to the RIB 422

Configuring IP Fast Reroute Loop-free Alternate 422

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxvii

Contents

Configuring IS-IS Overload Bit Avoidance 424

ISIS Link Group 425

Configure Link Group Profile 425

Configure Link Group Interface 427

Configuration Examples for Implementing IS-IS 429

Configuring Single-Topology IS-IS for IPv6: Example 429

Configuring Multitopology IS-IS for IPv6: Example 429

Redistributing IS-IS Routes Between Multiple Instances: Example 430

Tagging Routes: Example 430

Configuring IS-IS Overload Bit Avoidance: Example 431

Example: Configuring IS-IS To Handle Router Overload 431

Where to Go Next 436

Additional References 436

Implementing OSPF 439C H A P T E R 7

Prerequisites for Implementing OSPF 440

Information About Implementing OSPF 441

OSPF Functional Overview 441

Key Features Supported in the Cisco IOS XR Software OSPF Implementation 442

Comparison of Cisco IOS XR Software OSPFv3 and OSPFv2 443

OSPF Hierarchical CLI and CLI Inheritance 443

OSPF Routing Components 444

Autonomous Systems 444

Areas 444

Routers 445

OSPF Process and Router ID 446

Supported OSPF Network Types 447

Route Authentication Methods for OSPF 447

Plain Text Authentication 447

MD5 Authentication 447

Authentication Strategies 447

Key Rollover 448

Neighbors and Adjacency for OSPF 448

OSPF strict-mode Support for BFD Dampening 448

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxviii

Contents

Enabling strict-mode 448

BFD strict-mode: Example 449

OSPF FIB Download Notification 450

Designated Router (DR) for OSPF 451

Default Route for OSPF 451

Link-State Advertisement Types for OSPF Version 2 451

Link-State Advertisement Types for OSPFv3 452

Virtual Link and Transit Area for OSPF 453

Passive Interface 454

OSPFv2 Sham Link Support for MPLS VPN 454

OSPFv3 Sham Link Support for MPLS VPN 456

Graceful Restart Procedure over the Sham-link 456

ECMP and OSPFv3 Sham-link 457

OSPF SPF Prefix Prioritization 457

Route Redistribution for OSPF 458

OSPF Shortest Path First Throttling 458

Nonstop Forwarding for OSPF Version 2 459

Graceful Shutdown for OSPFv3 460

Modes of Graceful Restart Operation 460

Graceful Restart Requirements and Restrictions 462

Warm Standby and Nonstop Routing for OSPF Version 2 463

Warm Standby for OSPF Version 3 463

Multicast-Intact Support for OSPF 464

Load Balancing in OSPF Version 2 and OSPFv3 464

Configure Prefix Suppression for OSPF 464

Configure Prefix Suppression for OSPFv3 469

Multi-Area Adjacency for OSPF Version 2 474

Label Distribution Protocol IGP Auto-configuration for OSPF 474

OSPF Authentication Message Digest Management 475

GTSM TTL Security Mechanism for OSPF 475

Path Computation Element for OSPFv2 475

OSPF IP Fast Reroute Loop Free Alternate 476

Management Information Base (MIB) for OSPFv3 476

VRF-lite Support for OSPFv2 476

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxix

Contents

OSPFv3 Timers Link-state Advertisements and Shortest Path First Throttle Default Values Update477

Unequal Cost Multipath Load-balancing for OSPF 477

How to Implement OSPF 478

Enabling OSPF 478

Configuring Stub and Not-So-Stubby Area Types 479

Configuring Neighbors for Nonbroadcast Networks 481

Configuring Authentication at Different Hierarchical Levels for OSPF Version 2 484

Controlling the Frequency That the Same LSA Is Originated or Accepted for OSPF 487

Creating a Virtual Link with MD5 Authentication to Area 0 for OSPF 489

Examples 492

Summarizing Subnetwork LSAs on an OSPF ABR 492

Redistribute Routes into OSPF 494

Configuring OSPF Shortest Path First Throttling 496

Examples 498

Configuring Nonstop Forwarding Specific to Cisco for OSPF Version 2 498

Configuring OSPF Version 2 for MPLS Traffic Engineering 500

Examples 502

Configuring OSPFv3 Graceful Restart 504

Displaying Information About Graceful Restart 505

Configuring an OSPFv2 Sham Link 506

Configuring OSPF SPF Prefix Prioritization 508

Enabling Multicast-intact for OSPFv2 510

Associating Interfaces to a VRF 511

Configuring OSPF as a Provider Edge to Customer Edge (PE-CE) Protocol 512

Creating Multiple OSPF Instances (OSPF Process and a VRF) 514

Configuring Multi-area Adjacency 515

Configuring Label Distribution Protocol IGP Auto-configuration for OSPF 516

Configuring LDP IGP Synchronization: OSPF 517

Configuring Authentication Message Digest Management for OSPF 518

Examples 519

Configuring Generalized TTL Security Mechanism (GTSM) for OSPF 520

Examples 522

Verifying OSPF Configuration and Operation 523

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxx

Contents

Configuring IP Fast Reroute Loop-free Alternate 525

Enabling IPFRR LFA 525

Excluding an Interface From IP Fast Reroute Per-link Computation 526

Enabling OSPF Interaction with SRMS Server 526

Configuration Examples for Implementing OSPF 528

Cisco IOS XR Software for OSPF Version 2 Configuration: Example 528

CLI Inheritance and Precedence for OSPF Version 2: Example 529

MPLS TE for OSPF Version 2: Example 530

ABR with Summarization for OSPFv3: Example 530

ABR Stub Area for OSPFv3: Example 531

ABR Totally Stub Area for OSPFv3: Example 531

Configuring OSPF SPF Prefix Prioritization: Example 531

Route Redistribution for OSPFv3: Example 532

Virtual Link Configured Through Area 1 for OSPFv3: Example 533

Virtual Link Configured with MD5 Authentication for OSPF Version 2: Example 533

VPN Backbone and Sham Link Configured for OSPF Version 2: Example 534

Where to Go Next 537

Additional References 537

Implementing IP Fast Reroute Loop-Free Alternate 541C H A P T E R 8

Prerequisites for IPv4/IPv6 Loop-Free Alternate Fast Reroute 541

Restrictions for Loop-Free Alternate Fast Reroute 541

IS-IS and IP FRR 542

Repair Paths 542

LFA Overview 543

LFA Calculation 543

Interaction Between RIB and Routing Protocols 543

Configuring Fast Reroute Support 544

Configuring IPv4 Loop-Free Alternate Fast Reroute Support: Example 546

Additional References 546

Implementing and Monitoring RIB 549C H A P T E R 9

Prerequisites for Implementing RIB 550

Information About RIB Configuration 550

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxxi

Contents

Overview of RIB 550

RIB Data Structures in BGP and Other Protocols 550

RIB Administrative Distance 550

RIB Support for IPv4 and IPv6 551

RIB Statistics 551

IPv6 Provider Edge IPv6 and IPv6 VPN Provider Edge Transport over MPLS 552

RIB Quarantining 552

Route and Label Consistency Checker 553

How to Deploy and Monitor RIB 553

Verifying RIB Configuration Using the Routing Table 554

Verifying Networking and Routing Problems 554

Disabling RIB Next-hop Dampening 556

Configuring RCC and LCC 557

Enabling RCC and LCC On-demand Scan 557

Enabling RCC and LCC Background Scan 558

BGP-RIB Feedback Mechanism for Update Generation 559

Configuration Examples for RIB Monitoring 559

Output of show route Command: Example 559

Output of show route backup Command: Example 560

Output of show route best-local Command: Example 560

Output of show route connected Command: Example 560

Output of show route local Command: Example 561

Output of show route longer-prefixes Command: Example 561

Output of show route next-hop Command: Example 561

Enabling RCC and LCC: Example 562

Where to Go Next 562

Additional References 563

Implementing RIP 565C H A P T E R 1 0

Prerequisites for Implementing RIP 566

Information About Implementing RIP 566

RIP Functional Overview 566

Split Horizon for RIP 567

Route Timers for RIP 567

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxxii

Contents

Route Redistribution for RIP 567

Default Administrative Distances for RIP 568

Routing Policy Options for RIP 569

Authentication Using Keychain in RIP 569

In-bound RIP Traffic on an Interface 570

Out-bound RIP Traffic on an Interface 571

How to Implement RIP 571

Enabling RIP 571

Customizing RIP 573

Control Routing Information 574

Creating a Route Policy for RIP 576

Configuring RIP Authentication Keychain 577

Configuring RIP Authentication Keychain for IPv4 Interface on a Non-default VRF 577

Configuring RIP Authentication Keychain for IPv4 Interface on Default VRF 579

Configuration Examples for Implementing RIP 580

Configuring a Basic RIP Configuration: Example 580

Configuring RIP on the Provider Edge: Example 580

Adjusting RIP Timers for each VRF Instance: Example 580

Configuring Redistribution for RIP: Example 581

Configuring Route Policies for RIP: Example 582

Configuring Passive Interfaces and Explicit Neighbors for RIP: Example 582

Controlling RIP Routes: Example 583

Configuring RIP Authentication Keychain: Example 583

Additional References 583

Implementing Routing Policy 585C H A P T E R 1 1

Prerequisites for Implementing Routing Policy 586

Restrictions for Implementing Routing Policy 586

Information About Implementing Routing Policy 587

Routing Policy Language 587

Routing Policy Language Overview 587

Routing Policy Language Structure 588

Routing Policy Language Components 597

Routing Policy Language Usage 598

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxxiii

Contents

Routing Policy Configuration Basics 600

Policy Definitions 600

Parameterization 601

Parameterization at Attach Points 602

Global Parameterization 602

Semantics of Policy Application 603

Boolean Operator Precedence 603

Multiple Modifications of the Same Attribute 603

When Attributes Are Modified 604

Default Drop Disposition 605

Control Flow 605

Policy Verification 606

Policy Statements 607

Remark 607

Disposition 608

Action 610

If 610

Boolean Conditions 611

apply 612

Attach Points 612

BGP Policy Attach Points 613

OSPF Policy Attach Points 638

OSPFv3 Policy Attach Points 642

IS-IS Policy Attach Points 644

EIGRP Policy Attach Points 646

RIP Policy Attach Points 650

PIM Policy Attach Points 652

Nondestructive Editing of Routing Policy 652

Attached Policy Modification 652

Nonattached Policy Modification 653

Editing Routing Policy Configuration Elements 653

Hierarchical Policy Conditions 655

Apply Condition Policies 655

Nested Wildcard Apply Policy 658

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxxiv

Contents

Wildcards for Route Policy Sets 659

Use Wildcards For Routing Policy Sets 659

VRF Import Policy Enhancement 663

Flexible L3VPN Label Allocation Mode 663

Match Aggregated Route 664

Remove Private AS in Inbound Policy 664

Set Administrative Distance 664

How to Implement Routing Policy 664

Defining a Route Policy 664

Attaching a Routing Policy to a BGP Neighbor 665

Modifying a Routing Policy Using a Text Editor 666

Configuration Examples for Implementing Routing Policy 667

Routing Policy Definition: Example 667

Simple Inbound Policy: Example 668

Modular Inbound Policy: Example 669

Use Wildcards For Routing Policy Sets 670

VRF Import Policy Configuration: Example 674

Additional References 674

Implementing Static Routes 677C H A P T E R 1 2

Prerequisites for Implementing Static Routes 677

Restrictions for Implementing Static Routes 678

Information About Implementing Static Routes 678

Static Route Functional Overview 678

Default Administrative Distance 678

Directly Connected Routes 679

Recursive Static Routes 679

Fully Specified Static Routes 680

Floating Static Routes 680

Default VRF 680

IPv4 and IPv6 Static VRF Routes 680

Dynamic ECMP 681

How to Implement Static Routes 681

Configure Static Route 681

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxxv

Contents

Configure Floating Static Route 682

Configure Static Routes Between PE-CE Routers 684

Change Maximum Number of Allowable Static Routes 685

Associate VRF with a Static Route 686

Configuration Examples 687

Configuring Traffic Discard: Example 687

Configuring a Fixed Default Route: Example 688

Configuring a Floating Static Route: Example 688

Configure Native UCMP for Static Routing 688

Configuring a Static Route Between PE-CE Routers: Example 689

Additional References 690

Implementing RCMD 691C H A P T E R 1 3

Route Convergence Monitoring and Diagnostics 691

Configuring Route Convergence Monitoring and Diagnostics 692

Route Convergence Monitoring and Diagnostics Prefix Monitoring 694

Route Convergence Monitoring and Diagnostics OSPF Type 3/5/7 Link-state AdvertisementsMonitoring 695

Enabling RCMD Monitoring for IS-IS Prefixes 695

Enable RCMD Monitoring for OSPF Prefixes 696

Enabling RCMD Monitoring for Type 3/5/7 OSPF LSAs 697

Enabling RCMD Monitoring for IS-IS Prefixes: Example 698

Enabling RCMD Monitoring for OSPF Prefixes: Example 698

Enabling RCMD Monitoring for Type 3/5/7 OSPF LSAs: Example 698

Implementing UCMP 701C H A P T E R 1 4

ECMP vs. UCMP Load Balancing 702

UCMP Minimum Integer Ratio 702

Configuring IS-IS With Weight 703

Configuring IS-IS With Metric 704

Configuring BGP With Weights 705

Configuring TE Tunnel With Weights 706

Policy-Based Tunnel Selection 707

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxxvi

Contents

Implementing Data Plane Security 721C H A P T E R 1 5

Information about Data Plane Security 721

Source RLOC Decapsulation Filtering 721

EID Instance Membership Distribution 722

Map-Server Membership Gleaning and Distribution 723

Decapsulation Filtering on (P)xTRs 725

TCP-based Reliable Transport Sessions 726

How to Implement Data Plane Security 726

Enable Source RLOC-based Decapsulation Filtering 726

Create, Maintain and Distribute Decapsulation Filter Lists 730

Add or Override Decapsulation Filter List 731

Reset LISP TCP Reliable Transport Session 732

Verify Data Plane Security Configurations 732

Additional References 736

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxxvii

Contents

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxxviii

Contents

Preface

From Release 6.1.2 onwards, Cisco introduces support for the 64-bit Linux-based IOS XR operating system.Extensive feature parity is maintained between the 32-bit and 64-bit environments. Unless explicitly markedotherwise, the contents of this document are applicable for both the environments. For more details on CiscoIOS XR 64 bit, refer to the Release Notes for Cisco ASR 9000 Series Routers, Release 6.1.2 document.

The Routing Configuration Guide for Cisco ASR 9000 Series Routers preface contains these sections:

Changes to This Document, on page xxix Communications, Services, and Additional Information, on page xxix

Changes to This DocumentThis table lists the technical changes made to this document since it was first released.

Table 1: Changes to This Document

SummaryDate

Initial release of this document.September 2017

Republished for Release 6.3.2.March 2018

Communications, Services, and Additional Information To receive timely, relevant information from Cisco, sign up at Cisco Profile Manager.

To get the business impact youre 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, visitCisco 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.

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxxix

http://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xr-software/products-release-notes-list.htmlhttps://www.cisco.com/offer/subscribehttps://www.cisco.com/go/serviceshttps://www.cisco.com/c/en/us/support/index.htmlhttps://www.cisco.com/go/marketplace/https://www.cisco.com/go/marketplace/http://www.ciscopress.comhttp://www.cisco-warrantyfinder.com

Cisco Bug Search Tool

Cisco Bug Search Tool (BST) is a web-based tool that acts as a gateway to the Cisco bug tracking systemthat maintains a comprehensive list of defects and vulnerabilities in Cisco products and software. BST providesyou with detailed defect information about your products and software.

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.xxxx

PrefacePreface

https://www.cisco.com/c/en/us/support/web/tools/bst/bsthelp/index.html

C H A P T E R 1New and Changed Routing Features

This table summarizes the new and changed feature information for the Routing Configuration Guide forCisco ASR 9000 Series Routers, and tells you where they are documented.

New and Changed Routing Features, on page 1

New and Changed Routing FeaturesTable 2: Routing Features Added or Modified in IOS XR Release 6.3.x

Where DocumentedChanged in ReleaseDescriptionFeature

Implementing BGPchapter

Release 6.3.2This feature wasintroduced.

BGP Large Community

Implementing UCMPchapter

Release 6.3.2This feature wasintroduced.

UCMP Minimum IntegerRatio

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x1

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x2

New and Changed Routing FeaturesNew and Changed Routing Features

C H A P T E R 2Implementing BGP

Border Gateway Protocol (BGP) is an Exterior Gateway Protocol (EGP) that allows you to create loop-freeinterdomain routing between autonomous systems. An autonomous system is a set of routers under a singletechnical administration. Routers in an autonomous system can use multiple Interior Gateway Protocols (IGPs)to exchange routing information inside the autonomous system and an EGP to route packets outside theautonomous system.

This module provides the conceptual and configuration information for BGP on Cisco IOS XR software.

For more information about BGP and complete descriptions of the BGP commands listed in this module, seeRelated Documents, on page 231 section of this module. To locate documentation for other commands thatmight appear while performing a configuration task, search online in the Cisco ASR 9000 Series Routersoftware master command index.

Note

Feature History for Implementing BGP

ModificationRelease

This feature was introduced.Release 3.7.2

The following features were supported:

BGP Prefix Independent Convergence Unipath Primary Backup

BGP Local Label Retention

Asplain notation for 4-byte Autonomous System Number

BGP Nonstop Routing

Command Line Interface (CLI) consistency for BGP commands

L2VPN Address Family Configuration Mode

Release 3.9.0

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x3

ModificationRelease

The following features were supported:

BGP Add Path Advertisement

Accumulated iGP (AiGP)

Pre-route

IPv4 BGP-Policy Accounting

IPv6 uRPF

Release 4.0.0

Support for 5000 BGP NSR sessions was addedRelease 4.1.0

The following features were added:

BGP Accept Own

BGP DMZ Link Bandwidth for Unequal Cost Recursive Load Balancing

Release 4.1.1

The following features were supported:

Selective VRF Download

BGP Multi-Instance/Multi-AS

BFD Multihop Support for BGP

BGP Error Handling

Support for Distributed BGP (bgp distributed speaker) configuration was removed.

Release 4.2.0

The following features were supported:

BGP 3107 PIC Updates for Global Prefixes

BGP Prefix Independent Convergence for RIB and FIB

BGP Prefix Origin Validation Based on RPKI

Release 4.2.1

The BGP Attribute Filtering feature was added.Release 4.2.3

The BGP-RIB Feedback Mechanism for Update Generation feature was addedRelease 4.3.0

The following features were supported

BGP VRF Dynamic Route Leaking

The label-allocation-mode command is renamed the label mode command.

Release 4.3.1

The following features were supported:

Per-neighbor Link Bandwidth

Release 4.3.2

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x4

Implementing BGP

ModificationRelease

The following features were supported:

L3VPN iBGP-PE-CE configuration

Source-based flow tag

Discard extra paths

Release 5.3.1

The following features were supported:

Graceful Maintenance

Per Neighbor TCP MSS

BGP DMZ Aggregate Bandwidth

Release 5.3.2

The following features were supported:

Excessive Punt Flow Trap Processing

64-ECMP for BGP

Release 6.0.1

Prerequisites for Implementing BGP, on page 5 Information About Implementing BGP, on page 5 Overview of BGP Monitoring Protocol, on page 102 BGPMultiple Cluster IDs, on page 103 How to Implement BGP, on page 108 Configuration Examples for Implementing BGP, on page 215 Flow-tag propagation, on page 230 Where to Go Next, on page 231 Additional References, on page 231

Prerequisites for Implementing BGPYou must be in a user group associated with a task group that includes the proper task IDs. The commandreference guides include the task IDs required for each command. If you suspect user group assignment ispreventing you from using a command, contact your AAA administrator for assistance.

Information About Implementing BGPTo implement BGP, you need to understand the following concepts:

BGP Functional OverviewBGP uses TCP as its transport protocol. Two BGP routers form a TCP connection between one another (peerrouters) and exchange messages to open and confirm the connection parameters.

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x5

Implementing BGPPrerequisites for Implementing BGP

BGP routers exchange network reachability information. This information is mainly an indication of the fullpaths (BGP autonomous system numbers) that a route should take to reach the destination network. Thisinformation helps construct a graph that shows which autonomous systems are loop free and where routingpolicies can be applied to enforce restrictions on routing behavior.

Any two routers forming a TCP connection to exchange BGP routing information are called peers or neighbors.BGP peers initially exchange their full BGP routing tables. After this exchange, incremental updates are sentas the routing table changes. BGP keeps a version number of the BGP table, which is the same for all of itsBGP peers. The version number changes whenever BGP updates the table due to routing information changes.Keepalive packets are sent to ensure that the connection is alive between the BGP peers and notificationpackets are sent in response to error or special conditions.

For information on configuring BGP to distribute Multiprotocol Label Switching (MPLS) Layer 3 virtualprivate network (VPN) information, see the Cisco ASR 9000 Series Aggregation Services Router MPLSConfiguration Guide

For information on BGP support for Bidirectional Forwarding Detection (BFD), see theCisco ASR 9000 SeriesAggregation Services Router Interface and Hardware Configuration Guide and the Cisco ASR 9000 SeriesAggregation Services Router Interface and Hardware Command Reference.

Note

BGP Router IdentifierFor BGP sessions between neighbors to be established, BGP must be assigned a router ID. The router ID issent to BGP peers in the OPEN message when a BGP session is established.

BGP attempts to obtain a router ID in the following ways (in order of preference):

By means of the address configured using the bgp router-id command in router configuration mode.

By using the highest IPv4 address on a loopback interface in the system if the router is booted with savedloopback address configuration.

By using the primary IPv4 address of the first loopback address that gets configured if there are not anyin the saved configuration.

If none of these methods for obtaining a router ID succeeds, BGP does not have a router ID and cannot establishany peering sessions with BGP neighbors. In such an instance, an error message is entered in the system log,and the show bgp summary command displays a router ID of 0.0.0.0.

After BGP has obtained a router ID, it continues to use it even if a better router ID becomes available. Thisusage avoids unnecessary flapping for all BGP sessions. However, if the router ID currently in use becomesinvalid (because the interface goes down or its configuration is changed), BGP selects a new router ID (usingthe rules described) and all established peering sessions are reset.

We strongly recommend that the bgp router-id command is configured to prevent unnecessary changes tothe router ID (and consequent flapping of BGP sessions).

Note

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x6

Implementing BGPBGP Router Identifier

BGP Maximum Prefix - Discard Extra PathsIOS XR BGP maximum-prefix feature imposes a maximum limit on the number of prefixes that are receivedfrom a neighbor for a given address family. Whenever the number of prefixes received exceeds the maximumnumber configured, the BGP session is terminated, which is the default behavior, after sending a ceasenotification to the neighbor. The session is down until a manual clear is performed by the user. The sessioncan be resumed by using the clear bgp command. It is possible to configure a period after which the sessioncan be automatically brought up by using themaximum-prefix command with the restart keyword. Themaximum prefix limit can be configured by the user. Default limits are used if the user does not configurethe maximum number of prefixes for the address family. For default limits, refer to BGP Default Limits, onpage 7.

Discard Extra Paths

An option to discard extra paths is added to the maximum-prefix configuration. Configuring the discard extrapaths option drops all excess prefixes received from the neighbor when the prefixes exceed the configuredmaximum value. This drop does not, however, result in session flap.

The benefits of discard extra paths option are:

Limits the memory footstamp of BGP.

Stops the flapping of the peer if the paths exceed the set limit.

When the discard extra paths configuration is removed, BGP sends a route-refresh message to the neighborif it supports the refresh capability; otherwise the session is flapped.

On the same lines, the following describes the actions when the maximum prefix value is changed:

If the maximum value alone is changed, a route-refresh message is sourced, if applicable.

If the new maximum value is greater than the current prefix count state, the new prefix states are saved.

If the new maximum value is less than the current prefix count state, then some existing prefixes aredeleted to match the new configured state value.

There is currently no way to control which prefixes are deleted.

For detailed configuration steps, see Configuring Discard Extra Paths, on page 120.

RestrictionsThese restrictions apply to the discard extra paths feature:

When the router drops prefixes, it is inconsistent with the rest of the network, resulting in possible routingloops.

If prefixes are dropped, the standby and active BGP sessions may drop different prefixes. Consequently,an NSR switchover results in inconsistent BGP tables.

The discard extra paths configuration cannot co-exist with the soft reconfig configuration.

BGP Default LimitsCisco IOS XRBGP imposes maximum limits on the number of neighbors that can be configured on the routerand on the maximum number of prefixes that are accepted from a peer for a given address family. This

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x7

Implementing BGPBGP Maximum Prefix - Discard Extra Paths

limitation safeguards the router from resource depletion caused by misconfiguration, either locally or on theremote neighbor. The following limits apply to BGP configurations:

The default maximum number of peers that can be configured is 4000. The default can be changed usingthe bgp maximum neighbor command. The limit range is 1 to 15000. Any attempt to configureadditional peers beyond the maximum limit or set the maximum limit to a number that is less than thenumber of peers currently configured will fail.

To prevent a peer from flooding BGP with advertisements, a limit is placed on the number of prefixesthat are accepted from a peer for each supported address family. The default limits can be overriddenthrough configuration of the maximum-prefix limit command for the peer for the appropriate addressfamily. The following default limits are used if the user does not configure the maximum number ofprefixes for the address family:

IPv4 Unicast: 1048576

IPv4 Labeled-unicast: 131072

IPv4 Tunnel: 1048576

IPv6 Unicast: 524288

IPv6 Labeled-unicast: 131072

IPv4 Multicast: 131072

IPv6 Multicast: 131072

IPv4 MVPN: 2097152

VPNv4 Unicast: 2097152

IPv4 MDT: 131072

VPNv6 Unicast: 1048576

L2VPN EVPN: 2097152

A cease notificationmessage is sent to the neighbor and the peering with the neighbor is terminated whenthe 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 beenconfigured after the peering with the neighbor has been established and a certain number of prefixeshave already been received from the neighbor for that address family. A cease notification message issent to the neighbor and peering with the neighbor is terminated immediately after the configuration ifthe configured maximum number of prefixes is fewer than the number of prefixes that have already beenreceived from the neighbor for the address family.

BGP Next Hop TrackingBGP receives notifications from the Routing Information Base (RIB) when next-hop information changes(event-driven notifications). BGP obtains next-hop information from the RIB to:

Determine whether a next hop is reachable.

Find the fully recursed IGP metric to the next hop (used in the best-path calculation).

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x8

Implementing BGPBGP Next Hop Tracking

Validate the received next hops.

Calculate the outgoing next hops.

Verify the reachability and connectedness of neighbors.

BGP is notified when any of the following events occurs:

Next hop becomes unreachable

Next hop becomes reachable

Fully recursed IGP metric to the next hop changes

First hop IP address or first hop interface change

Next hop becomes connected

Next hop becomes unconnected

Next hop becomes a local address

Next hop becomes a nonlocal address

Reachability and recursed metric events trigger a best-path recalculation.Note

Event notifications from the RIB are classified as critical and noncritical. Notifications for critical and noncriticalevents are sent in separate batches. However, a noncritical event is sent along with the critical events if thenoncritical event is pending and there is a request to read the critical events.

Critical events are related to the reachability (reachable and unreachable), connectivity (connected andunconnected), and locality (local and nonlocal) of the next hops. Notifications for these events are notdelayed.

Noncritical events include only the IGPmetric changes. These events are sent at an interval of 3 seconds.A metric change event is batched and sent 3 seconds after the last one was sent.

The next-hop trigger delay for critical and noncritical events can be configured to specify a minimum batchinginterval for critical and noncritical events using the nexthop trigger-delay command. The trigger delay isaddress family dependent.

The BGP next-hop tracking feature allows you to specify that BGP routes are resolved using only next hopswhose routes have the following characteristics:

To avoid the aggregate routes, the prefix length must be greater than a specified value.

The source protocol must be from a selected list, ensuring that BGP routes are not used to resolve nexthops that could lead to oscillation.

This route policy filtering is possible because RIB identifies the source protocol of route that resolved a nexthop as well as the mask length associated with the route. The nexthop route-policy command is used tospecify the route-policy.

For information on route policy filtering for next hops using the next-hop attach point, see the ImplementingRouting Policy Language on Cisco ASR 9000 Series Router module of Cisco ASR 9000 SeriesAggregation Services Router Routing Configuration Guide (this publication).

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x9

Implementing BGPBGP Next Hop Tracking

Scoped IPv4/VPNv4 Table WalkTo determine which address family to process, a next-hop notification is received by first de-referencing thegateway context associated with the next hop, then looking into the gateway context to determine whichaddress families are using the gateway context. The IPv4 unicast and VPNv4 unicast address families sharethe same gateway context, because they are registered with the IPv4 unicast table in the RIB. As a result, boththe global IPv4 unicast table and the VPNv4 table are is processed when an IPv4 unicast next-hop notificationis received from the RIB. A mask is maintained in the next hop, indicating if whether the next hop belongsto IPv4 unicast or VPNv4 unicast, or both. This scoped table walk localizes the processing in the appropriateaddress family table.

Reordered Address Family ProcessingThe Cisco IOS XR software walks address family tables based on the numeric value of the address family.When a next-hop notification batch is received, the order of address family processing is reordered to thefollowing order:

IPv4 tunnel

VPNv4 unicast

IPv4 labeled unicast

IPv4 unicast

IPv4 multicast

IPv6 unicast

New Thread for Next-Hop ProcessingThe critical-event thread in the spkr process handles only next-hop, Bidirectional Forwarding Detection (BFD),and fast-external-failover (FEF) notifications. This critical-event thread ensures that BGP convergence is notadversely impacted by other events that may take a significant amount of time.

show, clear, and debug CommandsThe show bgp nexthops command provides statistical information about next-hop notifications, the amountof time spent in processing those notifications, and details about each next hop registered with the RIB. Theclear bgp nexthop performance-statistics command ensures that the cumulative statistics associated withthe processing part of the next-hop show command can be cleared to help in monitoring. The clear bgpnexthop registration command performs an asynchronous registration of the next hop with the RIB. See theBGP Commands on Cisco ASR 9000 Series Router module of Routing Command Reference for Cisco ASR9000 Series Routersfor information on the next-hop show and clear commands.

The debug bgp nexthop command displays information on next-hop processing. The out keyword providesdebug information only about BGP registration of next hops with RIB. The in keyword displays debuginformation about next-hop notifications received from RIB. The out keyword displays debug informationabout next-hop notifications sent to the RIB. See the BGP Debug Commands on Cisco ASR 9000 SeriesAggregation Services Router module of Cisco ASR 9000 Series Aggregation Services Router Routing DebugCommand Reference.

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x10

Implementing BGPScoped IPv4/VPNv4 Table Walk

Autonomous System Number Formats in BGPAutonomous system numbers (ASNs) are globally unique identifiers used to identify autonomous systems(ASs) and enable ASs to exchange exterior routing information between neighboring ASs. A unique ASN isallocated to each AS for use in BGP routing. ASNs are encoded as 2-byte numbers and 4-byte numbers inBGP.

2-byte Autonomous System Number FormatThe 2-byte ASNs are represented in asplain notation. The 2-byte range is 1 to 65535.

4-byte Autonomous System Number FormatTo prepare for the eventual exhaustion of 2-byte Autonomous SystemNumbers (ASNs), BGP has the capabilityto support 4-byte ASNs. The 4-byte ASNs are represented both in asplain and asdot notations.

The byte range for 4-byte ASNs in asplain notation is 1-4294967295. The AS is represented as a 4-bytedecimal number. The 4-byte ASN asplain representation is defined in draft-ietf-idr-as-representation-01.txt.

For 4-byte ASNs in asdot format, the 4-byte range is 1.0 to 65535.65535 and the format is:

high-order-16-bit-value-in-decimal . low-order-16-bit-value-in-decimal

The BGP 4-byte ASN capability is used to propagate 4-byte-based AS path information across BGP speakersthat do not support 4-byte AS numbers. See draft-ietf-idr-as4bytes-12.txt for information on increasing thesize of an ASN from 2 bytes to 4 bytes. AS is represented as a 4-byte decimal number

as-format CommandThe as-format command configures the ASN notation to asdot. The default value, if the as-format commandis not configured, is asplain.

BGP ConfigurationBGP in Cisco IOS XR software follows a neighbor-based configuration model that requires that allconfigurations for a particular neighbor be grouped in one place under the neighbor configuration. Peer groupsare not supported for either sharing configuration between neighbors or for sharing update messages. Theconcept of peer group has been replaced by a set of configuration groups to be used as templates in BGPconfiguration and automatically generated update groups to share update messages between neighbors.

Configuration ModesBGP configurations are grouped into modes. The following sections show how to enter some of the BGPconfiguration modes. From a mode, you can enter the ? command to display the commands available in thatmode.

Router Configuration Mode

The following example shows how to enter router configuration mode:

RP/0/RSP0/CPU0:router# configurationRP/0/RSP0/CPU0:router(config)# router bgp 140RP/0/RSP0/CPU0:router(config-bgp)#

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x11

Implementing BGPAutonomous System Number Formats in BGP

https://tools.ietf.org/html/draft-ietf-idr-as-representation-01https://tools.ietf.org/html/draft-ietf-idr-as4bytes-12

Router Address Family Configuration Mode

The following example shows how to enter router address family configuration mode:

RP/0/RSP0/CPU0:router(config)# router bgp 112RP/0/RSP0/CPU0:router(config-bgp)# address-family ipv4 unicastRP/0/RSP0/CPU0:router(config-bgp-af)#

Neighbor Configuration Mode

The following example shows how to enter neighbor configuration mode:

RP/0/RSP0/CPU0:router(config)# router bgp 140RP/0/RSP0/CPU0:router(config-bgp)# neighbor 10.0.0.1RP/0/RSP0/CPU0:router(config-bgp-nbr)#

Neighbor Address Family Configuration Mode

The following example shows how to enter neighbor address family configuration mode:

RP/0/RSP0/CPU0:router(config)# router bgp 112RP/0/RSP0/CPU0:router(config-bgp)# neighbor 10.0.0.1RP/0/RSP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicastRP/0/RSP0/CPU0:router(config-bgp-nbr-af)#

VRF Configuration Mode

The following example shows how to enter VPN routing and forwarding (VRF) configuration mode:

RP/0/RSP0/CPU0:router(config)# router bgp 140RP/0/RSP0/CPU0:router(config-bgp)# vrf vrf_ARP/0/RSP0/CPU0:router(config-bgp-vrf)#

VRF Address Family Configuration Mode

The following example shows how to enter VRF address family configuration mode:

RP/0/RSP0/CPU0:router(config)# router bgp 112RP/0/RSP0/CPU0:router(config-bgp)# vrf vrf_ARP/0/RSP0/CPU0:router(config-bgp-vrf)# address-family ipv4 unicastRP/0/RSP0/CPU0:router(config-bgp-vrf-af)#

Configuring Resilient Per-CE Label Mode Under VRF Address Family

Perform this task to configure resilient per-ce label mode under VRF address family.

Resilient per-CE 6PE label allocation is not supported on CRS-1 and CRS-3 routers, but supported only onASR 9000 routers.

Note

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x12

Implementing BGPRouter Address Family Configuration Mode

SUMMARY STEPS

1. configure2. router bgpas-number3. vrfvrf-instance4. address-family {ipv4 | ipv6} unicast5. label mode per-ce6. Do one of the following:

end commit

DETAILED STEPS

Step 1 configure

Example:

RP/0/RSP0/CPU0:router# configureRP/0/RSP0/CPU0:router(config)#

Enters global configuration mode.

Step 2 router bgpas-number

Example:

RP/0/RSP0/CPU0:router(config)# router bgp 666RP/0/RSP0/CPU0:router(config-bgp)#

Specifies the autonomous system number and enters the BGP configuration mode, allowing you to configure the BGProuting process.

Step 3 vrfvrf-instance

Example:

RP/0/RSP0/CPU0:router(config-bgp)# vrf vrf-peRP/0/RSP0/CPU0:router(config-bgp-vrf)#

Configures a VRF instance.

Step 4 address-family {ipv4 | ipv6} unicast

Example:

RP/0/RSP0/CPU0:router(config-bgp-vrf)# address-family ipv4 unicastRP/0/RSP0/CPU0:router(config-bgp-vrf-af)#

Specifies either an IPv4 or IPv6 address family unicast and enters address family configuration submode.

Step 5 label mode per-ce

Example:

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x13

Implementing BGPConfiguring Resilient Per-CE Label Mode Under VRF Address Family

RP/0/RSP0/CPU0:router(config-bgp-vrf-af)# label mode per-ceRP/0/RSP0/CPU0:router(config-bgp-vrf-af)#

Configures resilient per-ce label mode.

Step 6 Do one of the following:

end commit

Example:

RP/0/RSP0/CPU0:router(config-bgp-vrf-af)# end

or

RP/0/RSP0/CPU0:router(config-bgp-vrf-af)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before exiting(yes/no/cancel)?[cancel]:

Entering yes saves configuration changes to the running configuration file, exits the configuration session, andreturns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing theconfiguration changes.

Entering cancel leaves the router in the current configuration session without exiting or committing theconfiguration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within theconfiguration session.

Configuring Resilient Per-CE Label Mode Using a Route-Policy

Perform this task to configure resilient per-ce label mode using a route-policy.

Resilient per-CE 6PE label allocation is not supported on CRS-1 and CRS-3 routers, but supported only onASR 9000 routers.

Note

SUMMARY STEPS

1. configure2. route-policypolicy-name3. set label mode per-ce4. Do one of the following:

end

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x14

Implementing BGPConfiguring Resilient Per-CE Label Mode Using a Route-Policy

commit

DETAILED STEPS

Step 1 configure

Example:

RP/0/RSP0/CPU0:router# configureRP/0/RSP0/CPU0:router(config)#

Enters global configuration mode.

Step 2 route-policypolicy-name

Example:

RP/0/RSP0/CPU0:router(config)# route-policy route1RP/0/RSP0/CPU0:router(config-rpl)#

Creates a route policy and enters route policy configuration mode.

Step 3 set label mode per-ce

Example:

RP/0/RSP0/CPU0:router(config-rpl)# set label mode per-ceRP/0/RSP0/CPU0:router(config-rpl)#

Configures resilient per-ce label mode.

Step 4 Do one of the following:

end commit

Example:

RP/0/RSP0/CPU0:router(config-rpl)# end

or

RP/0/RSP0/CPU0:router(config-rpl)# commit

Saves configuration changes.

When you issue the end command, the system prompts you to commit changes:

Uncommitted changes found, commit them before exiting(yes/no/cancel)?[cancel]:

Entering yes saves configuration changes to the running configuration file, exits the configuration session, andreturns the router to EXEC mode.

Entering no exits the configuration session and returns the router to EXEC mode without committing theconfiguration changes.

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x15

Implementing BGPConfiguring Resilient Per-CE Label Mode Using a Route-Policy

Entering cancel leaves the router in the current configuration session without exiting or committing theconfiguration changes.

Use the commit command to save the configuration changes to the running configuration file and remain within theconfiguration session.

VRF Neighbor Configuration Mode

The following example shows how to enter VRF neighbor configuration mode:

RP/0/RSP0/CPU0:router(config)# router bgp 140RP/0/RSP0/CPU0:router(config-bgp)# vrf vrf_ARP/0/RSP0/CPU0:router(config-bgp-vrf)# neighbor 11.0.1.2RP/0/RSP0/CPU0:router(config-bgp-vrf-nbr)#

VRF Neighbor Address Family Configuration Mode

The following example shows how to enter VRF neighbor address family configuration mode:

RP/0/RSP0/CPU0:router(config)# router bgp 112RP/0/RSP0/CPU0:router(config-bgp)# vrf vrf_ARP/0/RSP0/CPU0:router(config-bgp-vrf)# neighbor 11.0.1.2RP/0/RSP0/CPU0:router(config-bgp-vrf-nbr)# address-family ipv4 unicastRP/0/RSP0/CPU0:router(config-bgp-vrf-nbr-af)#

VPNv4 Address Family Configuration Mode

The following example shows how to enter VPNv4 address family configuration mode:

RP/0/RSP0/CPU0:router(config)# router bgp 152RP/0/RSP0/CPU0:router(config-bgp)# address-family vpnv4 unicastRP/0/RSP0/CPU0:router(config-bgp-af)#

L2VPN Address Family Configuration Mode

The following example shows how to enter L2VPN address family configuration mode:

RP/0/RSP0/CPU0:router(config)# router bgp 100RP/0/RSP0/CPU0:router(config-bgp)# address-family l2vpn vpls-vpwsRP/0/RSP0/CPU0:router(config-bgp-af)#

Neighbor SubmodeCisco IOS XR BGP uses a neighbor submode to make it possible to enter configurations without having toprefix every configuration with the neighbor keyword and the neighbor address:

Cisco IOS XR software has a submode available for neighbors in which it is not necessary for everycommand to have a neighbor x.x.x.x prefix:

In Cisco IOS XR software, the configuration is as follows:

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x16

Implementing BGPVRF Neighbor Configuration Mode

RP/0/RSP0/CPU0:router(config-bgp)# neighbor 192.23.1.2RP/0/RSP0/CPU0:router(config-bgp-nbr)# remote-as 2002RP/0/RSP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicast

An address family configuration submode inside the neighbor configuration submode is available forentering address family-specific neighbor configurations. In Cisco IOS XR software, the configurationis as follows:

RP/0/RSP0/CPU0:router(config-bgp)# neighbor 2002::2RP/0/RSP0/CPU0:router(config-bgp-nbr)# remote-as 2023RP/0/RSP0/CPU0:router(config-bgp-nbr)# address-family ipv6 unicastRP/0/RSP0/CPU0:router(config-bgp-nbr-af)# next-hop-selfRP/0/RSP0/CPU0:router(config-bgp-nbr-af)# route-policy one in

You must enter neighbor-specific IPv4, IPv6, VPNv4, or VPNv6 commands in neighbor address-familyconfiguration submode. In Cisco IOS XR software, the configuration is as follows:

RP/0/RSP0/CPU0:router(config)# router bgp 109RP/0/RSP0/CPU0:router(config-bgp)# neighbor 192.168.40.24RP/0/RSP0/CPU0:router(config-bgp-nbr)# remote-as 1RP/0/RSP0/CPU0:router(config-bgp-nbr)# address-family ipv4 unicastRP/0/RSP0/CPU0:router(config-bgp-nbr-af)# maximum-prefix 1000

Youmust enter neighbor-specific IPv4 and IPv6 commands in VRF neighbor address-family configurationsubmode. In Cisco IOS XR software, the configuration is as follows:

RP/0/RSP0/CPU0:router(config)# router bgp 110RP/0/RSP0/CPU0:router(config-bgp)# vrf vrf_ARP/0/RSP0/CPU0:router(config-bgp-vrf)# neighbor 11.0.1.2RP/0/RSP0/CPU0:router(config-bgp-vrf-nbr)# address-family ipv4 unicastRP/0/RSP0/CPU0:router(config-bgp-vrf-nbr-af)# route-policy pass all in

Configuration TemplatesThe af-group, session-group, and neighbor-group configuration commands provide template support forthe neighbor configuration in Cisco IOS XR software.

The af-group command is used to group address family-specific neighbor commands within an IPv4, IPv6,or VPNv4, address family. Neighbors that have the same address family configuration are able to use theaddress family group (af-group) name for their address family-specific configuration. A neighbor inherits theconfiguration from an address family group by way of the use command. If a neighbor is configured to usean address family group, the neighbor (by default) inherits the entire configuration from the address familygroup. However, a neighbor does not inherit all of the configuration from the address family group if itemsare explicitly configured for the neighbor. The address family group configuration is entered under the BGProuter configuration mode. The following example shows how to enter address family group configurationmode.

RP/0/RSP0/CPU0:router(config)# router bgp 140RP/0/RSP0/CPU0:router(config-bgp)# af-group afmcast1 address-family ipv4 unicastRP/0/RSP0/CPU0:router(config-bgp-afgrp)#

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x17

Implementing BGPConfiguration Templates

The session-group command allows you to create a session group from which neighbors can inherit addressfamily-independent configuration. A neighbor inherits the configuration from a session group by way of theuse command. If a neighbor is configured to use a session group, the neighbor (by default) inherits the entireconfiguration of the session group. A neighbor does not inherit all of the configuration from a session groupif a configuration is done directly on that neighbor. The following example shows how to enter session groupconfiguration mode:

RP/0/RSP0/CPU0:router# router bgp 140RP/0/RSP0/CPU0:router(config-bgp)# session-group session1RP/0/RSP0/CPU0:router(config-bgp-sngrp)#

The neighbor-group command helps you apply the same configuration to one or more neighbors. Neighborgroups can include session groups and address family groups and can comprise the complete configurationfor a neighbor. After a neighbor group is configured, a neighbor can inherit the configuration of the groupusing the use command. If a neighbor is configured to use a neighbor group, the neighbor inherits the entireBGP configuration of the neighbor group.

The following example shows how to enter neighbor group configuration mode:

RP/0/RSP0/CPU0:router(config)# router bgp 123RP/0/RSP0/CPU0:router(config-bgp)# neighbor-group nbrgroup1RP/0/RSP0/CPU0:router(config-bgp-nbrgrp)#

The following example shows how to enter neighbor group address family configuration mode:

RP/0/RSP0/CPU0:router(config)# router bgp 140RP/0/RSP0/CPU0:router(config-bgp)# neighbor-group nbrgroup1RP/0/RSP0/CPU0:router(config-bgp-nbrgrp)# address-family ipv4 unicastRP/0/RSP0/CPU0:router(config-bgp-nbrgrp-af)#

However, a neighbor does not inherit all of the configuration from the neighbor group if items areexplicitly configured for the neighbor. In addition, some part of the configuration of the neighbor groupcould be hidden if a session group or address family group was also being used.

Configuration grouping has the following effects in Cisco IOS XR software:

Commands entered at the session group level define address family-independent commands (the samecommands as in the neighbor submode).

Commands entered at the address family group level define address family-dependent commands for aspecified address family (the same commands as in the neighbor-address family configuration submode).

Commands entered at the neighbor group level define address family-independent commands and addressfamily-dependent commands for each address family (the same as all available neighbor commands),and define the use command for the address family group and session group commands.

Template Inheritance RulesIn Cisco IOS XR software, BGP neighbors or groups inherit configuration from other configuration groups.

For address family-independent configurations:

Neighbors can inherit from session groups and neighbor groups.

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x18

Implementing BGPTemplate Inheritance Rules

Neighbor groups can inherit from session groups and other neighbor groups.

Session groups can inherit from other session groups.

If a neighbor uses a session group and a neighbor group, the configurations in the session group arepreferred over the global address family configurations in the neighbor group.

For address family-dependent configurations:

Address family groups can inherit from other address family groups.

Neighbor groups can inherit from address family groups and other neighbor groups.

Neighbors can inherit from address family groups and neighbor groups.

Configuration group inheritance rules are numbered in order of precedence as follows:

1. If the item is configured directly on the neighbor, that value is used. In the example that follows, theadvertisement interval is configured both on the neighbor group and neighbor configuration and theadvertisement interval being used is from the neighbor configuration:

RP/0/RSP0/CPU0:router(config)# router bgp 140RP/0/RSP0/CPU0:router(config-bgp)# neighbor-group AS_1RP/0/RSP0/CPU0:router(config-bgp-nbrgrp)# advertisement-interval 15RP/0/RSP0/CPU0:router(config-bgp-nbrgrp)# exitRP/0/RSP0/CPU0:router(config-bgp)# neighbor 10.1.1.1RP/0/RSP0/CPU0:router(config-bgp-nbr)# remote-as 1RP/0/RSP0/CPU0:router(config-bgp-nbr)# use neighbor-group AS_1RP/0/RSP0/CPU0:router(config-bgp-nbr)# advertisement-interval 20

The following output from the show bgp neighbors command shows that the advertisement interval usedis 20 seconds:

RP/0/RSP0/CPU0:router# show bgp neighbors 10.1.1.1

BGP neighbor is 10.1.1.1, remote AS 1, local AS 140, external linkRemote router ID 0.0.0.0BGP state = IdleLast read 00:00:00, hold time is 180, keepalive interval is 60 secondsReceived 0 messages, 0 notifications, 0 in queueSent 0 messages, 0 notifications, 0 in queueMinimum time between advertisement runs is 20 seconds

For Address Family: IPv4 UnicastBGP neighbor version 0Update group: 0.1eBGP neighbor with no inbound or outbound policy; defaults to 'drop'Route refresh request: received 0, sent 00 accepted prefixesPrefix advertised 0, suppressed 0, withdrawn 0, maximum limit 524288Threshold for warning message 75%

Connections established 0; dropped 0Last reset 00:00:14, due to BGP neighbor initializedExternal BGP neighbor not directly connected.

2. Otherwise, if an item is configured to be inherited from a session-group or neighbor-group and on theneighbor directly, then the configuration on the neighbor is used. If a neighbor is configured to be inherited

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x19

Implementing BGPTemplate Inheritance Rules

from session-group or af-group, but no directly configured value, then the value in the session-group oraf-group is used. In the example that follows, the advertisement interval is configured on a neighbor groupand a session group and the advertisement interval value being used is from the session group:

RP/0/RSP0/CPU0:router(config)# router bgp 140RP/0/RSP0/CPU0:router(config-bgp)# session-group AS_2RP/0/RSP0/CPU0:router(config-bgp-sngrp)# advertisement-interval 15RP/0/RSP0/CPU0:router(config-bgp-sngrp)# exitRP/0/RSP0/CPU0:router(config-bgp)# neighbor-group AS_1RP/0/RSP0/CPU0:router(config-bgp-nbrgrp)# advertisement-interval 20RP/0/RSP0/CPU0:router(config-bgp-nbrgrp)# exitRP/0/RSP0/CPU0:router(config-bgp)# neighbor 192.168.0.1RP/0/RSP0/CPU0:router(config-bgp-nbr)# remote-as 1RP/0/RSP0/CPU0:router(config-bgp-nbr)# use session-group AS_2RP/0/RSP0/CPU0:router(config-bgp-nbr)# use neighbor-group AS_1

The following output from the show bgp neighbors command shows that the advertisement interval usedis 15 seconds:

RP/0/RSP0/CPU0:router# show bgp neighbors 192.168.0.1

BGP neighbor is 192.168.0.1, remote AS 1, local AS 140, external linkRemote router ID 0.0.0.0BGP state = IdleLast read 00:00:00, hold time is 180, keepalive interval is 60 secondsReceived 0 messages, 0 notifications, 0 in queueSent 0 messages, 0 notifications, 0 in queueMinimum time between advertisement runs is 15 seconds

For Address Family: IPv4 UnicastBGP neighbor version 0Update group: 0.1eBGP neighbor with no inbound or outbound policy; defaults to 'drop'Route refresh request: received 0, sent 00 accepted prefixesPrefix advertised 0, suppressed 0, withdrawn 0, maximum limit 524288Threshold for warning message 75%

Connections established 0; dropped 0Last reset 00:03:23, due to BGP neighbor initializedExternal BGP neighbor not directly connected.

3. Otherwise, if the neighbor uses a neighbor group and does not use a session group or address family group,the configuration value can be obtained from the neighbor group either directly or through inheritance.In the example that follows, the advertisement interval from the neighbor group is used because it is notconfigured directly on the neighbor and no session group is used:

RP/0/RSP0/CPU0:router(config)# router bgp 150RP/0/RSP0/CPU0:router(config-bgp)# session-group AS_2RP/0/RSP0/CPU0:router(config-bgp-sngrp)# advertisement-interval 20RP/0/RSP0/CPU0:router(config-bgp-sngrp)# exitRP/0/RSP0/CPU0:router(config-bgp)# neighbor-group AS_1RP/0/RSP0/CPU0:router(config-bgp-nbrgrp)# advertisement-interval 15RP/0/RSP0/CPU0:router(config-bgp-nbrgrp)# exitRP/0/RSP0/CPU0:router(config-bgp)# neighbor 192.168.1.1RP/0/RSP0/CPU0:router(config-bgp-nbr)# remote-as 1RP/0/RSP0/CPU0:router(config-bgp-nbr)# use neighbor-group AS_1

Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 6.3.x20

Implementing BGPTemplate Inheritance Rules

The following output from the show bgp neighbors command shows that the advertisement interval usedis 15 seconds:

RP/0/RSP0/CPU0:router# show bgp neighbors 192.168.1.1

BGP neighbor is 192.168.2.2, remote AS 1, local AS 140, external linkRemote router ID 0.0.0.0BGP state = IdleLast read 00:00:00, hold time is 180, keepalive interval is 60 secondsReceived 0 messages, 0 notifications, 0 in queueSent 0 messages, 0 n