Académique Documents
Professionnel Documents
Culture Documents
Configuring BGP on
Cisco Routers
Volume 1
Version 3.2
Student Guide
Text Part Number: 97-2305-01
Copyright 2005, Cisco Systems, Inc. All rights reserved.
Cisco Systems has more than 200 offices in the following countries and regions. Addresses, phone numbers, and fax
numbers are listed on the Cisco Website at www.cisco.com/go/offices.
Argentina Australia Austria Belgium Brazil Bulgaria Canada Chile China PRC Colombia Costa Rica
Croatia Cyprus Czech Republic Denmark Dubai, UAE Finland France Germany Greece
Hong Kong SAR Hungary India Indonesia Ireland Israel Italy Japan Korea Luxembourg Malaysia
Mexico The Netherlands New Zealand Norway Peru Philippines Poland Portugal Puerto Rico Romania
Russia Saudi Arabia Scotland Singapore Slovakia Slovenia South Africa Spain Sweden Switzerland
Taiwan Thailand Turkey Ukraine United Kingdom United States Venezuela Vietnam Zimbabwe
Copyright 2005 Cisco Systems, Inc. All rights reserved. CCSP, the Cisco Square Bridge logo, Follow
Me Browsing, and StackWise are trademarks of Cisco Systems, Inc.; Changing the Way We Work, Live,
Play, and Learn, and iQuick Study are service marks of Cisco Systems, Inc.; and Access Registrar, Aironet, ASIST,
BPX, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, Cisco, the Cisco Certified Internetwork Expert logo,
Cisco IOS, Cisco Press, Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Cisco Unity, Empowering
the Internet Generation, Enterprise/Solver, EtherChannel, EtherFast, EtherSwitch, Fast Step, FormShare, GigaDrive,
GigaStack, HomeLink, Internet Quotient, IOS, IP/TV, iQ Expertise, the iQ logo, iQ Net Readiness Scorecard,
LightStream, Linksys, MeetingPlace, MGX, the Networkers logo, Networking Academy, Network Registrar,
Packet, PIX, Post-Routing, Pre-Routing, ProConnect, RateMUX, ScriptShare, SlideCast, SMARTnet, StrataView
Plus, SwitchProbe, TeleRouter, The Fastest Way to Increase Your Internet Quotient, TransPath, and VCO are
registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.
All other trademarks mentioned in this document or Website 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. (0501R)
DISCLAIMER WARRANTY: THIS CONTENT IS BEING PROVIDED AS IS. CISCO MAKES AND YOU RECEIVE NO
WARRANTIES IN CONNECTION WITH THE CONTENT PROVIDED HEREUNDER, EXPRESS, IMPLIED, STATUTORY
OR IN ANY OTHER PROVISION OF THIS CONTENT OR COMMUNICATION BETWEEN CISCO AND YOU. CISCO
SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING WARRANTIES OF MERCHANTABILITY,
NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING,
USAGE OR TRADE PRACTICE. This learning product may contain early release content, and while Cisco believes it to be
accurate, it falls subject to the disclaimer above.
Students, this letter describes important
course evaluation access information!
Welcome to Cisco Systems Learning. Through the Cisco Learning Partner Program,
Cisco Systems is committed to bringing you the highest-quality training in the industry.
Cisco learning products are designed to advance your professional goals and give you the
expertise you need to build and maintain strategic networks.
Cisco relies on customer feedback to guide business decisions; therefore, your valuable
input will help shape future Cisco course curricula, products, and training offerings.
We would appreciate a few minutes of your time to complete a brief Cisco online course
evaluation of your instructor and the course materials in this student kit. On the final day
of class, your instructor will provide you with a URL directing you to a short post-course
evaluation. If there is no Internet access in the classroom, please complete the evaluation
within the next 48 hours or as soon as you can access the web.
On behalf of Cisco, thank you for choosing Cisco Learning Partners for your Internet
technology training.
Sincerely,
Cisco Systems Learning
Table of Contents
Volume 1
Course Introduction 1
Overview 1
Learner Skills and Knowledge 2
Course Goal and Objectives 3
Course Flow 4
Additional References 5
Cisco Glossary of Terms 5
Your Training Curriculum 6
BGP Overview 1-1
Overview 1-1
Module Objectives 1-1
Introducing BGP 1-3
Overview 1-3
Objectives 1-3
Interdomain Routing 1-4
Example: Why External Routing Protocols? 1-6
BGP Characteristics 1-8
Single-Homed Customers 1-12
Multihomed Customers 1-14
Transit Autonomous Systems 1-16
BGP Limitations 1-17
Summary 1-18
Understanding BGP Path Attributes 1-19
Overview 1-19
Objectives 1-19
BGP Path Attributes 1-20
Well-Known BGP Attributes 1-21
Optional BGP Attributes 1-24
AS-Path Attribute 1-26
Example: AS-Path Attribute 1-27
Next-Hop Attribute 1-28
Example: Next-Hop Attribute 1-29
Summary 1-32
Establishing BGP Sessions 1-33
Overview 1-33
Objectives 1-33
BGP Neighbor Discovery 1-34
Example: BGP Neighbor Discovery 1-35
Establishing a BGP Session 1-37
BGP Keepalives 1-40
Example: Keepalive Value 1-41
MD5 Authentication 1-42
Summary 1-43
Processing BGP Routes 1-45
Overview 1-45
Objectives 1-45
Receiving Routing Updates 1-46
Building the BGP Table 1-48
BGP Route Selection Criteria 1-49
Example: BGP Route Selection Criteria 1-51
BGP Route Propagation 1-52
ii Configuring BGP on Cisco Routers (BGP) v3.2 2005, Cisco Systems, Inc.
Building the IP Routing Table 1-53
Advertising Local Networks 1-54
Example: Advertising Local Networks 1-55
Automatic Summarization 1-57
Example: Automatic Summarization 1-58
Summary 1-60
Configuring Basic BGP 1-61
Overview 1-61
Objectives 1-61
BGP Routing Process 1-62
router bgp 1-62
Configuring External Neighbors 1-63
neighbor remote-as 1-63
neighbor description 1-64
neighbor shutdown 1-65
Configuring BGP Timers 1-66
timers bgp 1-66
neighbor timers 1-67
Configuring MD5 Authentication 1-68
neighbor password 1-68
Announcing Networks in BGP 1-69
Example: Announcing Networks in BGP 1-72
Redistributing Routes into BGP 1-73
redistribute (IP) 1-74
distribute-list out (IP) 1-76
Configuring Classless BGP 1-78
network (BGP) 1-79
Example: Configuring Classless BGP 1-80
Aggregating BGP Networks 1-81
aggregate-address 1-82
Example: Aggregation 1-84
BGP Conditional Route Injection 1-87
bgp inject-map exist-map 1-88
BGP Support for TTL Security Check 1-89
neighbor ttl-security 1-90
Multihomed Customer Problem 1-91
Summary 1-93
Monitoring and Troubleshooting BGP 1-95
Overview 1-95
Objectives 1-95
Monitoring Overall BGP Routing 1-96
show ip bgp summary 1-97
Monitoring BGP Neighbors 1-98
show ip bgp neighbors 1-98
Monitoring the BGP Table 1-100
show ip bgp 1-100
Debugging BGP 1-103
BGP Session Startup Problems 1-106
BGP Neighbor Not Reachable 1-107
Example: BGP Neighbor Not Reachable 1-109
BGP Neighbor Not Configured 1-110
Example: BGP Neighbor Not Configured 1-111
BGP AS Number Mismatch 1-112
Example: BGP AS Number Mismatch 1-113
Summary 1-114
2005, Cisco Systems, Inc. Configuring BGP on Cisco Routers (BGP) v3.2 iii
Module Summary 1-115
References 1-116
Module Self-Check 1-117
Module Self-Check Answer Key 1-126
BGP Transit Autonomous Systems 2-1
Overview 2-1
Module Objectives 2-1
Working with a Transit AS 2-3
Overview 2-3
Objectives 2-3
Transit AS Tasks 2-4
External Route Propagation 2-5
Internal Route Propagation 2-6
Packet Forwarding in an AS 2-7
Core Router IBGP Requirements in a Transit AS 2-8
Summary 2-9
Interacting with IBGP and EBGP in a Transit AS 2-11
Overview 2-11
Objectives 2-11
AS-Path Processing in IBGP 2-12
Multipath Load Sharing in BGP 2-13
maximum-paths ibgp 2-14
BGP Split Horizon 2-16
IBGP Full Mesh 2-17
Example: IBGP Full Mesh 2-18
IBGP Neighbors 2-19
IBGP Next-Hop Processing 2-21
Transit Network Using External Next Hops 2-23
Transit Network Using Edge Routers as Next Hops 2-25
neighbor next-hop-self 2-26
Example: Transit Network Using Edge Routers as Next Hops 2-27
Differences Between EBGP and IBGP Sessions 2-28
Example: Differences Between EBGP and IBGP Sessions 2-29
Summary 2-30
Forwarding Packets in a Transit AS 2-33
Overview 2-33
Objectives 2-33
Packet Forwarding in a Transit AS 2-34
Recursive Lookup in Cisco IOS Software 2-36
Routing Protocols in a Transit AS 2-38
BGP and IGP Interaction 2-40
Problems with BGP and IGP Interaction 2-42
Summary 2-43
Configuring a Transit AS 2-45
Overview 2-45
Objectives 2-45
Configuring IBGP Neighbors 2-46
neighbor remote-as 2-46
neighbor description 2-47
Configuring IBGP Sessions Between Loopback Interfaces 2-48
neighbor update-source 2-49
Configuring BGP Synchronization 2-50
synchronization 2-50
iv Configuring BGP on Cisco Routers (BGP) v3.2 2005, Cisco Systems, Inc.
Changing the Administrative Distance of BGP Routes 2-51
distance bgp 2-51
Scalability Limitations of IBGP-Based Transit Backbones 2-53
Summary 2-54
Monitoring and Troubleshooting IBGP in a Transit AS 2-55
Overview 2-55
Objectives 2-55
Monitoring IBGP 2-56
show ip bgp neighbors 2-56
show ip bgp 2-57
Example: Monitoring IBGP 2-58
Common IBGP Problems 2-60
Troubleshooting IBGP Session Startup Issues 2-61
Troubleshooting IBGP Route Selection Issues 2-64
Troubleshooting IBGP Synchronization Issues 2-65
Summary 2-66
Module Summary 2-67
References 2-68
Module Self-Check 2-69
Module Self-Check Answer Key 2-75
Route Selection Using Policy Controls 3-1
Overview 3-1
Module Objectives 3-2
Using Multihomed BGP Networks 3-3
Overview 3-3
Objectives 3-3
Business Requirements for Multihomed BGP Networks 3-4
Technical Requirements for Multihomed BGP Networks 3-5
BGP Route Selection Without BGP Policies 3-6
Example: BGP Route Selection Without BGP Policies 3-7
Multihomed Customer Routing Policies 3-8
Influencing BGP Route Selection 3-9
BGP Filters 3-11
Summary 3-14
Employing AS-Path Filters 3-15
Overview 3-15
Objectives 3-15
AS-Path Filtering Scenarios 3-16
AS-Path Regular Expressions 3-18
String Matching 3-19
Example: String Matching 3-26
Applying AS-Path Filters 3-29
Configuring BGP AS-Path Filters 3-30
ip as-path access-list 3-30
neighbor filter-list 3-31
Monitoring AS-Path Filters 3-33
show ip bgp regexp 3-35
show ip bgp filter-list 3-36
Summary 3-37
2005, Cisco Systems, Inc. Configuring BGP on Cisco Routers (BGP) v3.2 v
Filtering with Prefix-Lists 3-39
Overview 3-39
Objectives 3-39
Requirements for Prefix-Based Filters 3-40
Prefix-Lists vs. IP Access-Lists 3-41
Configuring Prefix-Lists 3-44
ip prefix-list 3-44
Example: Configuring Prefix-Lists 3-48
BGP Filters Implementation 3-49
Implementing Prefix-Lists in the BGP Process 3-50
neighbor prefix-list 3-51
distribute-list out 3-52
Example: Filtering Customer Prefixes 3-53
Example: Filtering Peer Prefixes 3-54
Modifying Prefix-Lists 3-55
Monitoring Prefix-Lists 3-56
show ip prefix-list 3-56
Summary 3-60
Using Outbound Route Filtering 3-61
Overview 3-61
Objectives 3-61
Outbound Route Filtering 3-62
Example: Inbound vs. Outbound Filtering 3-63
BGP Prefix-Based Outbound Route Filtering 3-64
Example: BGP Prefix-Based Outbound Route Filtering 3-65
Outbound Route Filter Message 3-66
Configuring Outbound Route Filtering 3-69
neighbor orf prefix-list 3-69
Using Outbound Route Filtering 3-72
Monitoring Outbound Route Filtering 3-73
Summary 3-74
Applying Route-Maps as BGP Filters 3-75
Overview 3-75
Objectives 3-75
Route-Map Overview 3-76
BGP Route-Map Policy List Support 3-80
ip policy-list 3-81
match policy-list 3-81
show ip policy-list 3-82
Configuring Policy-List Examples 3-82
Configuring Route-Maps to Reference Policy-List Examples 3-83
Verifying BGP Route-Map Policy List Support 3-83
BGP Route-Map Continue 3-85
Route-Map Operation Without Continue Clauses 3-85
Route-Map Operation with Continue Clauses 3-86
continue 3-87
show route-map 3-87
BGP Route-Map Continue Clause Example Configuration 3-88
BGP Route-Map Continue Clause Verification Example 3-89
Prefix-List Use in Route-Maps 3-90
match ip address 3-90
match ip next-hop 3-91
match ip route-source 3-91
BGP Filters 3-93
Using Route-Maps as BGP Filters 3-94
Monitoring Route-Maps 3-96
Summary 3-100
vi Configuring BGP on Cisco Routers (BGP) v3.2 2005, Cisco Systems, Inc.
Implementing Changes in BGP Policy 3-101
Overview 3-101
Objectives 3-102
Traditional Filtering Limitations 3-103
BGP Soft Reconfiguration 3-105
Example: Soft Reconfiguration and Memory Use 3-106
Cisco IOS Commands for Soft Reconfiguration 3-107
neighbor soft-reconfiguration 3-107
clear ip bgp 3-108
Monitoring Soft Reconfiguration 3-110
BGP Soft Reset Enhancement 3-111
Route Refresh 3-113
Example: Route Refresh 3-116
Using Route Refresh 3-117
clear ip bgp 3-117
Monitoring Route Refresh 3-118
Why Use Route-Maps as BGP Filters? 3-121
Summary 3-122
Module Summary 3-125
References 3-126
Module Self-Check 3-127
Module Self-Check Answer Key 3-135
BGP
Course Introduction
Overview
Configuring BGP on Cisco Routers (BGP) v3.2 provides students with in-depth knowledge of
Border Gateway Protocol (BGP), the routing protocol that is one of the underlying foundations
of the Internet and New World technologies such as Multiprotocol Label Switching (MPLS).
This curriculum covers the theory of BGP, configuration of BGP on Cisco IOS routers, detailed
troubleshooting information, and hands-on exercises that provide learners with the skills that
they need to configure and troubleshoot BGP networks in customer environments. Different
service solutions in the curriculum cover BGP network design issues and usage rules for
various BGP features, preparing learners to design and implement efficient, optimal, and
trouble-free BGP networks.
2 Configuring BGP on Cisco Routers (BGP) v3.2 2005, Cisco Systems, Inc.
Learner Skills and Knowledge
This subtopic lists the skills and knowledge that learners must possess to benefit fully from the
course. The subtopic also includes recommended Cisco learning offerings that learners should
complete in order to benefit fully from this course.
2005 Cisco Systems, Inc. All rights reserved. BGP v3.23
Learner Skills and Knowledge
Building Scalable Cisco Internetworks (BSCI) course or
equivalent
2005, Cisco Systems, Inc. Course Introduction 3
Course Goal and Objectives
This topic describes the course goal and objectives.
2005 Cisco Systems, Inc. All rights reserved. BGP v3.24
To provide learners with in-depth
knowledge of BGP
Configuring BGP on Cisco Routers (BGP) v3.2
Course Goal
Upon completing this course, you will be able to meet these objectives:
Configure, monitor, and troubleshoot basic BGP to enable interdomain routing in a network
scenario with multiple domains
Use BGP policy controls to influence the route selection process with minimal impact on
BGP route processing in a network scenario where you must support connections to
multiple ISPs
Use BGP attributes to influence the route selection process in a network scenario where
you must support multiple connections
Implement the correct BGP configuration to successfully connect the customer network to
the Internet in a network scenario where you must support multiple connections
Enable the provider network to behave as a transit AS in a typical service provider network
with multiple BGP connections to other autonomous systems
Identify common BGP scaling issues and enable route reflection and confederations as
possible solutions to these issues in a typical service provider network with multiple BGP
connections to other autonomous systems
Use available BGP tools and features to optimize the scalability of the BGP routing
protocol in a typical BGP network
4 Configuring BGP on Cisco Routers (BGP) v3.2 2005, Cisco Systems, Inc.
Course Flow
This topic presents the suggested flow of the course materials.
2005 Cisco Systems, Inc. All rights reserved. BGP v3.25
Course Flow
Course
Introduction
Module 1:
BGP Overview
Module 1:
BGP Overview
Labs
Module 2: BGP
Transit
Autonomous
Systems
Lunch
Module 3:
Route Selection
Using Policy
Controls
Module 5:
Customer-to-
Provider
Connectivity
with BGP (Cont.)
Module 6:
Scaling Service
Provider
Networks
A
M
P
M
Module 4:
Route Selection
Using Attributes
Module 7:
Optimizing
BGP Scalability
Day 1 Day 2 Day 3 Day 4 Day 5
Module 3:
Route Selection
Using Policy
Controls Labs
Module 4:
Route Selection
Using Attributes
Labs
Module 2:
BGP Transit
Autonomous
Systems Lab
Module 6:
Scaling Service
Provider
Networks Labs
Module 7:
Optimizing
BGP Scalability
Labs
Module 5:
Customer-to-
Provider
Connectivity
with BGP
Module 1:
BGP Overview
(Cont.)
The schedule reflects the recommended structure for this course. This structure allows enough
time for the instructor to present the course information and for you to work through the lab
activities. The exact timing of the subject materials and labs depends on the pace of your
specific class.
2005, Cisco Systems, Inc. Course Introduction 5
Additional References
This topic presents the Cisco icons and symbols used in this course, as well as information on
where to find additional technical references.
2005 Cisco Systems, Inc. All rights reserved. BGP v3.26
Cisco Icons and Symbols
Router
Terminal
Server
100BASE-TX
Hub
Workgroup
Switch:
Color/Subdued
Network
Cloud,
White
PC
Network
Cloud,
Standard
Color
PIX Firewall
Cisco Glossary of Terms
For additional information on Cisco terminology, refer to the Cisco Internetworking Terms and
Acronyms glossary of terms at http://www.cisco.com/univercd/cc/td/doc/cisintwk/ita/index.htm.
6 Configuring BGP on Cisco Routers (BGP) v3.2 2005, Cisco Systems, Inc.
Your Training Curriculum
This topic presents the training curriculum for this course.
2005 Cisco Systems, Inc. All rights reserved. BGP v3.27
Cisco Certifications
You are encouraged to join the Cisco Certification Community, a discussion forum open to
anyone holding a valid Cisco Career Certification (such as Cisco CCIE
, CCNA
, CCDA
,
CCNP
, CCDP
, CCIP, or CCSP