Академический Документы
Профессиональный Документы
Культура Документы
Chapter 7:
BGP Implementation
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 2
BGP Terminology, Concepts,
and Operation
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 3
Using BGP between autonomous systems
Comparing BGP with other scalable routing protocols
BGP path vector characteristics
BGP characteristics
BGP tables
BGP message types
When to use BGP
When not to use BGP
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 4
BGP Use Between Autonomous Systems
BGP’s interdomain routing enables connectivity between
autonomous systems.
Chapter 7
5
Comparison with Other Scalable Routing
Protocols
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 7
BGP Path Vector Characteristics
A router running BGP also keeps its own table for storing
BGP information received from and sent to other routers.
Also called:
• BGP table
• BGP topology table
• BGP topology database
• BGP routing table
• BGP forwarding database.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 10
BGP Tables
The router offers the best routes from the BGP table to the
IP routing table.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 11
BGP Tables
After establishing an adjacency, the neighbors exchange
their best BGP routes.
All routes that have been learned from each neighbor are
placed in the BGP table.
The single best route for each network is selected from the
BGP table using these attributes in the BGP route-selection
process and then offered to the IP routing table.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 12
BGP Tables
Each router compares the offered BGP routes to any other
possible paths to those networks in its IP routing table, and the
best route, based on administrative distance, is installed in the IP
routing table.
external
distance autonomous
of 20. system) have a default administrative
Internal BGP (iBGP) routes (BGP routes learned from within the
autonomous system) have a default administrative distance of
200.
Note: A route does not have to be in the IP routing table for BGP
to advertise it. BGP advertises the best route from the BGP table.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 13
BGP Message Types
• Open
• Keepalive
• Update
• Notification
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 14
Open and Keepalive Messages
After a TCP connection is established, the first message
sent by each side is an open message.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 15
Open and Keepalive Messages
An open message includes the following information:
• Version: This 8-bit field indicates the message’s BGP version number.
(BGP-4).
• Hold time: This 16-bit field indicates the maximum number of seconds
that can elapse between the successive keepalive or update messages
from the sender.
• BGP router identifier (router ID): This 32-bit field indicates the sender’s
BGP identifier. Chosen the same way as OSPF ID.
All the attributes in the update message refer to that path, and
the networks are those that can be reached through that path.
An update message might include the following fields:
• Withdrawn routes: A list of IP address prefixes for routes that are being
withdrawn from service, if any.
• Path attributes: The attribute type consists of the attribute flags, followed
by the attribute type code.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 18
When to Use BGP
BGP use in an autonomous system is most appropriate
when the effects of BGP are well understood and at least
one of the following conditions exists:
• Routing policy and route selection for traffic entering and leaving the
autonomous system must be manipulated.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 19
When Not to Use BGP
Do not use BGP if one or more of the following conditions
exist:
• You have a limited understanding of route filtering and the BGP path-
selection process.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 20
Implementing Basic BGP
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 21
BGP neighbor relationships
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 22
BGP Nei ghbor Relationships
A BGP peer, also known as a BGP neighbor, is a BGP
speaker that is configured to form a neighbor relationship
with another BGP speaker for the purpose of directly
exchanging BGP routing information with one another.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 23
External BGP Neighbors
When BGP is running between routers in different
autonomous systems, it is called external BGP.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 24
External BGP Neighbors
An eBGP neighbor is a router running in a different
autonomous system.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 25
Internal BGP Neighbors
When BGP is running between routers within the same
autonomous system, it is called internal BGP.
• Define neighbors
• Reachability (An IGP typically runs inside the autonomous system, and
provides this reachability).
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 26
iBGP in a Transit Autonomous System
All routers in a transit autonomous system must have complete knowledge of
external routes.
Theoretically, one way to achieve this goal is to redistribute BGP routes into an IGP
at the edge routers.
Because the current Internet routing table is very large, redistributing all the BGP
routes into an IGP is not a scalable way for the interior routers.
Another method that you can use is to run iBGP on all routers within the
autonomous system.
Chapter 7
27
iBGP in a Nontransit Autonomous System
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 28
TCP and Full Mesh
TCP was selected as the transport layer for BGP because
TCP can move a large volume of data reliably.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 30
BGP Partial-Mesh and Full-Mesh Examples
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 31
Basic BGP Configuration Requirements
Basic BGP configuration requires the following main steps:
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 32
Entering BGP Configuration Mode
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 33
Defining BGP Neighbors and Activating BGP
Sessions
Use the neighbor ip-address remote-as autonomous-
system router configuration command
• to activate a BGP session for external and internal neighbors and
• to identify a peer router with which the local router will establish a
session.
R3?
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 35
Basic BGP Configuration and Verification
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 36
Basic BGP Configuration and Verification
Do R1 and R2 need a
static route?
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 37
Basic BGP Configuration and Verification
R2 configuration?
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 38
Basic BGP Configuration and Verification
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 39
Basic BGP Configuration and Verification
The first part of the show ip bgp summary command output
describes the local router:
• BGP router identifier: The IP address that all other BGP speakers
recognize as representing this router.
The next part of this command output describes the BGP table:
• BGP table version: This is the version number of the local BGP table; it
increases when the BGP table changes.
• Main routing table version: This is the last version of BGP database
that was injected into the main routing table.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 40
Basic BGP Configuration and Verification
The rest of this command output describes the current
neighbor status, one for each configured neighbor:
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 41
Basic BGP Configuration and Verification
• In queue (InQ): The number of messages from this neighbor that are
waiting to be processed.
• Up/down: The length of time this neighbor has been in the current BGP
state (established, active, or idle).
• State: The current state of the BGP session: active, idle, open sent, open
confirm, or idle (admin).
• Note that if the session is in the established state, a state is not displayed.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 42
Basic BGP Configuration and Verification
Chapter 7
© 2007 – 2010, Cisco S stems, Inc. All ri hts reserved.
CiscoPublic 43
Basic BGP Configuration and Verification
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 44
Basic BGP Configuration and Verification
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 45
Configuring and Verifying an iBGP Session
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 46
Configuring and Verifying an iBGP Session
C
hapter7 47
Configuring and Verifying an iBGP Session
Chapter 7
48
Advertising Networks in BGP and Verifying That
They Are Propagated
Use the network network-number [mask network-mask] router
configuration command to inject routes that are present in the
IPv4 routing table into the BGP table so that they can be
advertised in BGP.
Unlike for IGPs, the network command does not start BGP on
specific interfaces.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 50
Advertising Networks in BGP and Verifying That
They Are Propagated
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 51
Advertising Networks in BGP and Verifying That
They Are Propagated
A row with an asterisk (*) in the first column means that the
next-hop address is valid.
C
hapter7 53
Advertising Networks in BGP and Verifying That
They Are Propagated
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 54
Advertising Networks in BGP and Verifying That
They Are Propagated
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 55
Advertising Networks in BGP and Verifying That
They Are Propagated
Chapter 7
56
Advertising Networks in BGP and Verifying That
They Are Propagated
Chap
ter7
Advertising Networks in BGP and Verifying That
They Are Propagated
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 58
Advertising Networks in BGP and Verifying That
They Are Propagated
Chapter 7
c 59
Advertising Networks in BGP and Verifying That
They Are Propagated
What happened?
Chapter 7
scoPublic 60
–
Using the Next-Hop-Self Feature
How BGP establishes an iBGP relationship differs
significantly from the way that IGPs behave.
As such, for BGP the next hop is the IP address that is used
to reach the next autonomous system.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 61
Using the Next-Hop-Self Feature
For iBGP, however, the next hop advertised by eBGP is
carried into iBGP, by default.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 62
Using the Next-Hop-Self Feature
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 63
Using the Next-Hop-Self Feature
Chap
ter7
64
Understanding and Troubleshooting BGP Neighbor
States
After the TCP handshake is complete, the BGP application tries to set
up a session with the neighbor.
BGP is a state machine that takes a router through the following states
with its neighbors:
• reach
Idle: The
the router is searching the routing table to see whether a route exists to
neighbor.
• Connect: The router found a route to the neighbor and has completed the
threeway TCP handshake.
• Open sent: An open message was sent, with the parameters for the BGP
session.
• Open confirm: The router received agreement on the parameters for establishing
a session.
• Alternatively, the router goes into the active state if there is no response to the open
message.
• Ensure that the neighbor announces the route in its local routing
protocol (IGP) (for iBGP neighbors).
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 66
Active State Troubleshooting
This state means the router has found the IP address in the
neighbor statement and has created and sent out a BGP open
packet but has not received a response (an open confirm packet)
back from the neighbor.
One common cause of this is when the neighbor does not have a
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 67
BGP Session Resilience
If the interface to which the IP address used in the neighbor
command goes down, the BGP neighbor relationship would be
lost.
interface address.
This peering arrangement adds resiliency to the iBGP sessions
because they are not tied into a physical interface, which might
go down for any number of reasons.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 68
BGP Session Resilience
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 69
BGP Session Resilience
What changed?
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 70
BGP Session Resilience
The BGP neighbor statement tells the BGP process the
destination IP address of each update packet.
For BGP packets, this source IP address must match the address
in the corresponding neighbor statement on the other router.
• In other words, the other router must have a BGP relationship with the
packet’s source IP address.)
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 72
Sourcing BGP from Loopback Address
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 73
Sourcing BGP from Loopback Address
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 74
Sourcing BGP from Loopback Address
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 75
Sourcing BGP from Loopback Address
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 76
eBGP Multihop
To fix this issue, you must also enable multihop eBGP, with the
neighbor ip-address ebgp-multihop [ttl] router configuration
command.
This command increases the default of one hop for eBGP peers
by changing the default Time To Live (TTL) value of 1 (with thettl
parameter) and therefore allowing routes to the eBGP loopback
address.
• By default, the TTL is set to 255 with this command.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 77
eBGP Multihop
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 78
Resetting BGP Sessions
BGP can potentially handle huge volumes of routing information.
To avoid such a problem, the Cisco IOS Software applies
changes on only those updates received or sent after the BGP
policy configuration change has been performed.
There are two ways to trigger an update: a hard reset, and a soft
reset.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 79
Hard Reset of BGP Sessions
Resetting a session is a method of informing the neighbor or
neighbors of a policy change.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 80
Soft Reset or Route Refresh
Use the clear ip bgp {* | neighbor-address} out privileged EXEC
command to cause BGP to do a soft reset for outbound updates.
The router on which this command is issued does not reset the BGP
session.
Instead, the router creates a new update and sends the whole table to
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 81
Soft Reset or Route Refresh
When a BGP session is reset
using soft reconfiguration, the
following commands can be
useful for monitoring the BGP
routes received, sent, or filtered:
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 83
BGP Path Selection
A router running BGP may receive updates about destinations
from multiple neighbors, some in different autonomous systems,
and therefore multiple paths might exist to reach a given network.
BGP chooses only a single best path to reach a specific
destination.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 85
The Path-Selection Decision Process with a
Multihomed Connection
An autonomous system rarely implements BGP with only one
eBGP connection, so generally multiple paths exist for each
network in the BGP forwarding database.
The following are some terms defining how these attributes are
implemented:
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 89
Defined BGP Attributes
Well-known mandatory attributes: Routes has
been
• AS-path aggregated
• Next-hop
• Origin
Well-known discretio nary attributes:
• Local preference
• Atomic aggregate
Optional transitive attributes: Router that
performed
• Aggregator aggregation
• Community
Optional nontransitive attribute:
• MED
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 90
Defined BGP Attributes
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 91
The AS-Path Attribute
The AS-path attribute is the list of autonomous system
numbers that a route has traversed to reach a destination.
If a BGP router receives a route in which its own autonomous system is part
of the AS-path attribute, it does not accept the route.
• IGP:
• The route is interior to the srcinating autonomous system.
• This normally happens when anetwork command is used to advertise the
• EGP:
• The route is learned via EGP (not longer supported).
• This is indicated with ane in the BGP table.
• Incomplete:
• The route’s srcin is unknown or is learned via some other means.
• This usually occurs when a route is redistributed into BGP.
• An incomplete srcin is indicated with a ? in the BGP table.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 95
The Origin Attribute
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 96
The Local-Preference Attribute
Local preference is a well-known discretionary attribute that
indicates to routers in the autonomous system which path is
preferred to exit the autonomous system.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 97
The Local-Preference Attribute
Any BGP router can filter routes in incoming or outgoing updates or can
select preferred routes based on communities (the tag).
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 99
The MED Attribute
The MED attribute, also called the metric, is an optional
nontransitive attribute.
• In the output of the show ip bgp command for example, the MED is
displayed in the metric column.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 101
The MED Attribute
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 102
The MED Attribute
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 103
The Weight Attribute (Cisco Only)
The weight attribute is configured locally and provides local
routing policy only; it is not propagated to any BGP neighbors.
The weight can have a value from 0 to 65535. Paths that the
router srcinates have a weight of 32768 by default, and other
paths have a weight of 0 by default.
The weight attribute applies when using one router with multiple
exit points out of an autonomous system.
Router R1 has two ways to reach 209.165.201.0 and must decide which
way to go.
Because the weight for router R2’s updates is higher, router R1 uses
router R2 as a next hop to reach 209.165.201.0.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 105
Changing the Weight for All Updates from a
Neighbor
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 106
Changing the Weight Using Route Maps
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 107
Influencing BGP Path Selection
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 108
Influencing BGP Path Selection
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 109
Influencing BGP Path Selection
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 110
Influencing BGP Path Selection
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 111
Influencing BGP Path Selection
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 112
Influencing BGP Path Selection
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 113
Influencing BGP Path Selection
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 114
Influencing BGP Path Selection
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 115
Influencing BGP Path Selection
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 116
Influencing BGP Path Selection
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 117
Changing the Weight
We first change the default weight on GW2 for all updates
received from GW1 to a nonzero value.
• This will cause the prefixes received via iBGP to be preferred.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 119
Changing the Weight
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 120
Changing Loc al Preference
Local-preference settings are shared within an autonomous
system, so this will affect both GW1 and GW2.
All BGP routes that are advertised would include this local
preference value.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 121
Changing Loc al Preference
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 122
Changing Loc al Preference
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 123
Changing Loc al Preference
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 124
Setting the AS-Path
One way that an autonomous system can attempt to influence incoming
traffic flow is by sending out eBGP updates with an extended AS-path
attribute for unde sired paths.
The receiver of this update is less likely to select the path as the best
because its AS-path attribute appears to be longer.
You can configure prepending on a router for all routing updates that you
send to a neighbor or only on a subset of them.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 125
Setting the AS-Path
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 126
Setting the AS-Path
Chap
ter7
–
Setting the AS-Path
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 128
Setting the AS-Path
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 129
Setting the AS-Path
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 130
Setting the AS-Path
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 131
Controlling BGP Routing
Updates
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 132
Filtering BGP Routing Updates
BGP allows you to filter updates that are received from a
neighbor or that are sent to a neighbor.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 133
BGP Filtering Using Prefix Lists
The neighbor ip-address prefix-list prefix-list-name {in |
out} router configuration command is used to apply a prefix
list to routes from or to a neighbor.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 134
BGP Filtering Using Prefix Lists
What this
commands do?
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 135
BGP Filtering Using AS-Path Access Lists
When a BGP route is sourced as a result of anetwork
command in a BGP process or redistribution into a BGP
process, the AS-path attribute is created and is empty.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 137
BGP Filtering Using AS-Path Access Lists
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 138
BGP Filtering Using AS-Path Access Lists
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 139
BGP Filtering Using Route Maps
A route map can match and set several different BGP attributes,
including the following:
• Origin
• Next hop
• Community
• Local preference
• MED
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 140
BGP Filtering Using Route Maps
A route map can match and set several different BGP attributes,
including the following:
• Origin
• Next hop
• Community
• Local preference
• MED
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 141
BGP Filtering Using Route Maps
When used for BGP filtering, a deny means that the route is
ignored and a permit means that the route is processed
further and the set clauses are applied.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 142
BGP Filtering Using Route Maps
AS6500 only accepts a default route and uses AS 65100 as their primary link
Chapter 7
stems, Inc. All rights reserved. CiscoP ublic 143
Filtering Order
The incoming filter list, prefix list (or distribute list) and route
map (in this order) must all permit the routes that are
received from a neighbor before they will be accepted into
the BGP table.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 144
Clearing the BGP Session
Recall from the earlier “Resetting BGP Sessions” section
that if you want a policy change, such as a BGP filter, to be
applied, you must trigger an update.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 145
BGP Peer Groups
In BGP, many neighbors are often configured with the same
update policies.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 146
Peer Group Operation
The policies of the peer group are similar to a template; the
template is then applied to the individual members of the
peer group.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 148
Peer Group Configuration Example
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 149
Peer Group Configuration Example
Chapter 7
CiscoPublic 150
Implementing
BGP for IPv6
Internet
Connectivity
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 151
MP-BGP is capable of carrying a rich set of routed protocols,
including IPv4 and IPv6, over a transport protocol, such as IPv4
or IPv6.This section covers the following topics:
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 152
MP-BGP Support for IPv6
Multiprotocol extensions are defined as new attributes.
Chapter 7
CiscoPublic 153
MP-BGP Support for IPv6
Protocols other than IPv4, including IPv6, also need to advertise
reachability information.
MP-BGP extensions allow these other protocols to be carried
using BGP.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 154
Exchanging IPv6 Routes over an IPv4 Session
Existing IPv4 TCP sessions can carry IPv6 routing information
when adding IPv6 support to a network.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 156
Exchanging IPv6 Routes over an IPv6 Session
MP-BGP also supports exchanging IPv6 routes over an IPv6
session.
If a router running BGP over IPv6 transport has no IPv4
addresses configured, you need to manually specify BGP router
ID.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 157
Exchanging IPv6 Routes over an IPv6 Session
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 158
BGP for IPv6 Configuration and Verification
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 159
BGP for IPv6 Configuration and Verification
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic
Initial State of Routers
Chapter 7
© 2007 – 20
Initial State of Routers
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 162
Initial State of Routers
Cha
pter 7 63
Initial State of Routers
C
hapter7 164
Initial State of Routers
Chapter
7 165
Initial State of Routers
Chapte
r7
Initial State of Routers
Chap
ter7
© 2007 – 2010 CiscoS stems Inc. All ri htsre served. CiscoPu blic 167
Initial State of Routers
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 168
Initial State of Routers
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 169
Initial State of Routers
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 170
Enable eBGP IPv6 Route Exchange
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 171
Enable eBGP IPv6 Route Exchange
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 172
Enable eBGP IPv6 Route Exchange
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 173
Enable eBGP IPv6 Route Exchange
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 174
Enable eBGP IPv6 Route Exchange
Chapter 7
sco Systems, Inc. All rights reserved. CiscoPu blic 176
Enable eBGP IPv6 Route Exchange
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 177
Enable eBGP IPv6 Route Exchange
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 178
Enable iBGP IPv6 Route Exchange
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 179
Enable iBGP IPv6 Route Exchange
Chapter7
Enable iBGP IPv6 Route Exchange
When IPv6 routes are exchanged over an IPv6 BGP session, the next-
hop parameter is correctly configured automatically and there is no
need for a route map to modify it.
Chapter
7 181
© 2007 – 2010 CiscoS stems Inc. All ri hts reserved. CiscoP ublic
Comparing IPv4 to Dual (IPv4/IPv6) BGP
Transport
Both IPv4 and IPv6 address families can use a single IPv4 neighbor or
two separate sessions can be established, one for each address family.
In contrast, when using two separate sessions for IPv4 and IPv6, there
is no need to implement route maps to overwrite the next-hop
parameter.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 182
BGP Filtering Mechanisms for IPv6
MP-BGP offers the same set of IPv6 filtering and route
manipulation capabilities that exist for IPv4.
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 183
IPv6 Prefix List Filtering
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 184
IPv6 Path Selection with BGP Local Preference
Chapter 7
185
Chapter 7
© 2007 – 2010, Cisco Systems, Inc. All rights re served. CiscoPu blic 186