Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Chapter 7:
BGP Implementation
Cisco Public
Chapter 7 topics
BGP Terminology, Concepts, and Operation
Implementing Basic BGP
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
Cisco Public
Cisco Public
Cisco Public
BGP Characteristics
BGP uses the Transmission Control Protocol (TCP) as its
transport protocol. Port number 179.
Cisco Public
BGP Tables
BGP keeps a neighbor table containing a list of neighbors
with which it has a BGP connection.
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 reserved.
Cisco Public
10
BGP Tables
The router offers the best routes from the BGP table to the
IP routing table.
They can be configured to share information between the
two tables (by redistribution).
For BGP to establish an adjacency, you must configure it
explicitly for each neighbor.
BGP sends BGP/TCP keepalives by default every 60
seconds.
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
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.
Each path learned is associated with BGP attributes.
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 reserved.
Cisco Public
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.
Cisco Public
13
Notification
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
14
Cisco Public
15
Cisco Public
16
Update Messages
An update message has information on one path only. multiple
paths require multiple messages.
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.
Network layer reachability information (NLRI): A list of networks (IP
address prefixes and their prefix lengths) that can be reached by this
path.
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
17
Notification Messages
A BGP router sends a notification message when it detects
an error condition.
The BGP router closes the BGP connection immediately
after sending the notification message.
Notification messages include an error code, an error
subcode, and data related to the error.
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
18
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
19
You have a limited understanding of route filtering and the BGP pathselection process.
If the routing policy that will be implemented in an autonomous system
is consistent with the policy implemented in the ISP autonomous
system.
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
20
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
21
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
22
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
23
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
24
Cisco Public
25
Cisco Public
26
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
27
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
28
Cisco Public
29
Cisco Public
30
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
31
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
32
Cisco Public
33
Cisco Public
34
R3?
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
35
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
36
Do R1 and R2 need a
static route?
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
37
R2 configuration?
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
38
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
39
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 reserved.
Cisco Public
40
Cisco Public
41
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.
Cisco Public
42
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
43
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
44
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
45
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
46
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
47
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
48
Cisco Public
49
Cisco Public
50
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
51
A row with an asterisk (*) in the first column means that the
next-hop address is valid.
A greater-than sign (>) in the second column indicates the
best path for a route selected by BGP. This route is offered
to the IP routing table.
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
52
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
53
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
54
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
55
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
56
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
57
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
58
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
59
What happened?
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
60
Cisco Public
61
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
62
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
63
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
64
Cisco Public
65
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
66
One common cause of this is when the neighbor does not have a
return route to the source IP address.
Another common problem associated with the active state is
when a BGP router attempts to peer with another BGP router that
does not have a neighbor statement peering back at the first
router (or has it wrong).
Cisco Public
67
Cisco Public
68
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
69
What changed?
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
70
Cisco Public
71
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
72
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
73
Cisco Public
74
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
75
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
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 allows the router to accept and attempt BGP
connections to external peers residing on networks that are not
directly connected.
This command increases the default of one hop for eBGP peers
by changing the default Time To Live (TTL) value of 1 (with the ttl
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 reserved.
Cisco Public
77
eBGP Multihop
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
78
Cisco Public
79
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
80
Instead, the router creates a new update and sends the whole table to
the specified neighbors.
This update includes withdrawal commands for networks that the
neighbor will not see anymore, based on the new outbound policy.
This command is highly recommended when you are changing an
outbound policy, but does not help if you are changing an inbound
policy.
The clear ip bgp soft command performs a soft reconfiguration of both
inbound and outbound updates.
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
81
Cisco Public
82
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
83
Cisco Public
84
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
85
Cisco Public
86
BGP Attributes
BGP uses the path attributes to determine the best path to the
networks.
The following are some terms defining how these attributes are
implemented:
An attribute is either well-known or optional, mandatory or discretionary,
and transitive or nontransitive. An attribute might also be partial.
Well-known mandatory
Well-known discretionary
Optional transitive
Optional nontransitive
Cisco Public
87
Well-Known Attributes
A well-known attribute is one that all BGP implementations
must recognize and propagate to BGP neighbors.
There are two types of well-known attributes:
Well-known mandatory attribute: A well-known mandatory attribute
must appear in all BGP update messages.
Well-known discretionary attribute: it is recognized by all BGP
implementations but does not have to be in every update message.
Cisco Public
88
Optional Attributes
BGP routers that implement an optional attribute might
propagate it to other BGP neighbors, depending on its
meaning.
Optional transitive: BGP routers that do not implement an optional
transitive attribute should pass it to other BGP routers untouched and
mark the attribute as partial.
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
89
Routes has
been
aggregated
Router that
performed
aggregation
Aggregator
Community
Cisco Public
90
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
91
Cisco Public
92
Cisco Public
93
Cisco Public
94
EGP:
The route is learned via EGP (not longer supported).
This is indicated with an e in the BGP table.
Incomplete:
The routes origin is unknown or is learned via some other means.
This usually occurs when a route is redistributed into BGP.
An incomplete origin is indicated with a ? in the BGP table.
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
95
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
96
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
97
Cisco Public
98
Cisco Public
99
Cisco Public
100
Cisco Public
101
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
102
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
103
Cisco Public
104
Router R1 has two ways to reach 209.165.201.0 and must decide which
way to go.
Router R1 is configured to set the weight of updates coming from router
R2 to 200 and the weight of those coming from router R3 to 150.
Because the weight for router R2s 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 reserved.
Cisco Public
105
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
106
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
107
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
108
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
109
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
110
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
111
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
112
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
113
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
114
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
115
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
116
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
117
Cisco Public
118
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
119
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
120
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
121
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
122
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
123
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
124
The receiver of this update is less likely to select the path as the best
because its AS-path attribute appears to be longer.
This feature is called AS-path prepending.
You can configure prepending on a router for all routing updates that you
send to a neighbor or only on a subset of them.
Cisco Public
125
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
126
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
127
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
128
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
129
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
130
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
131
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
132
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
133
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
134
What this
commands do?
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
135
Cisco Public
136
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
137
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
138
Cisco Public
139
Origin
Next hop
Community
Local preference
MED
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
140
Origin
Next hop
Community
Local preference
MED
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
141
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
142
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
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.
Similarly, outgoing routes must pass the outgoing filter list,
route map, and prefix list (or distribute list) (in this order)
before they will be sent to the neighbor.
Note: The order in which BGP filtering mechanisms are
processed may differ in different IOS versions.
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
144
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
145
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
146
The actual TCP transmission still has to be done on a perneighbor basis because of the connection-oriented
characteristics of BGP sessions.
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
147
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
148
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
149
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
150
Implementing
BGP for IPv6
Internet
Connectivity
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
151
Cisco Public
152
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
153
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
154
Cisco Public
155
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
156
Cisco Public
157
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
158
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
159
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
160
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
161
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
162
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
163
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
164
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
165
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
166
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
167
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
168
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
169
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
170
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
171
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
172
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
173
Cisco Public
174
Chapter 7
Cisco Public
175
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
176
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
177
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
178
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
179
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
180
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
181
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.
Exchange of IPv4 and IPv6 routes is completely independent; neighbor
configuration and handling is duplicated.
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
182
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
183
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
184
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
185
Chapter 7
2007 2010, Cisco Systems, Inc. All rights reserved.
Cisco Public
186