Network Bulls
www.networkbulls.com
Best Institute for CCNA CCNP CCSP CCIP CCIE Training in India
M-44, Old Dlf, Sector-14 Gurgaon, Haryana, India
Call: +91-9654672192
BGP Troubleshooting Issues
Chapter 6, “Introduction to Troubleshooting Routing Protocols,” and Chapter 7, “OSPF
and Route Redistribution Troubleshooting,” focused on interior gateway protocols (IGP).
An IGP is used within an autonomous system (AS), where an autonomous system is defined
as a network under a single administrative control. This chapter, however, focuses on
an exterior gateway protocol (EGP)—specifically BGP.
An EGP, like BGP, is a routing protocol typically used between autonomous systems. For
example, if your enterprise network connects to more than one Internet service provider
(ISP), you might be running BGP between your network (that is, your AS) and each ISP
(each of which is a separate AS).
This section examines BGP data structures, reviews BGP operation, and presents commands
useful for collecting information from the BGP data structures.
BGP Data Structures
Figure 8-1 reviews how the data structures of an IP routing protocol interact with an IP
routing table.
Table 8-2 describes how BGP operates within this framework.
Incoming Route Information Outgoing Route Information
Data
Structure
of IP
Routing
Protocol
IP
Routing
Table
Redistributed Routes
Injected Routes
Route Installation
Figure 8-1 Data Structure and IP Routing Table Interaction
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
Figure 8-2 illustrates BGP’s two data structures, which are described in the list that follows.
■ Neighbor table: The BGP neighbor table contains a listing of all BGP neighbors configured
for a router, including each neighbor’s IP address, AS number, the state of the
neighborship, and several other statistics.
■ BGP table: The BGP table, sometimes referred to as the BGP Routing Information
Base (RIB), contains routes learned from BGP peers and routes locally injected into
the BGP table of a router.
Unlike OSPF and EIGRP, BGP does not consider a link’s bandwidth when making a routing
decision. Instead, BGP uses the following criteria when deciding how to forward a
packet. The criteria are listed in the order in which BGP prioritizes each criterion.
228 CCNP TSHOOT 642-832 Official Certification Guide
Key
Topic
Table 8-2 Interaction Between the Data Structures of a BGP and an IP Routing Table
Component of Routing Process Description
Incoming Route Information A BGP router receives BGP updates from a BGP
neighbor. Unlike OSPF and EIGRP neighbors, BGP
neighbors do not need to be directly connected.
Rather, BGP neighbors can be multiple hops away
from one another. Therefore, BGP neighbors are often
referred to as peers.
Data Structure of IP Routing Protocol BGP maintains two data structures: the neighbor
table and the BGP table. The neighbor table contains
status information about BGP neighbors, whereas the
BGP table contains network prefixes learned from
BGP neighbors.
Injecting and Redistributing Routes Routes can be inserted in the BGP table by advertisements
received from BGP neighbors or by locally injected
routes. For a route to be locally injected (either
through a manual configuration or through a redistribution
configuration), it must be present in the IP
routing table.
Route Installation Similar to OSPF and EIGRP, BGP might have more
than one route to a network prefix in its BGP table.
BGP then selects what it considers to be the best
route to that network prefix; that best route becomes
a candidate to be inserted into the IP routing table.
Outgoing Route Information Routes in a router’s BGP table that are considered the
best routes to their network prefixes are advertised to
the router’s BGP peers. BGP offers several features to
limit routes advertised to BGP peers or received from
BGP peers.
Key
Topic
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
Chapter 8: Troubleshooting BGP and Router Performance Issues 229
Key
Topic
Incoming Route Information Outgoing Route Information
Neighbor
Table
BGP Table
IP
Routing
Table
Redistributed Routes
Injected Routes
Route Installation
Figure 8-2 BGP Data Structures
1. BGP prefers the path with the highest weight. Note that the BGP weight parameter is
a Cisco-specific parameter.
2. BGP prefers the path with the highest local preference value.
3. BGP prefers the path originated by BGP on the local router.
4. BGP prefers the path with the shortest autonomous system.
5. BGP prefers the path with the lowest origin type. (NOTE: IGP < EGP
< INCOMPLETE.)
6. BGP prefers the path with the lowest multi-exit discriminator (MED).
7. BGP prefers eBGP paths over iBGP paths.
8. BGP prefers the path with the lowest IGP metric to the BGP next-hop.
9. BGP prefers the path that points to a BGP router with the lowest BGP router ID.
A BGP router always learns its neighbors through manual configuration of those neighbors
as opposed to dynamically learning about neighbors. This manual configuration requirement
makes sense when you consider that BGP neighbors do not have to be
physically adjacent. When a BGP neighbor is statically configured, the AS number of the
neighbor is specified.
A BGP router attempts to establish a session with its configured neighbors using TCP port
179. After a session has been established, BGP OPEN messages are exchanged to communicate
each neighbor’s BGP characteristics.
The following are reasons why the peering of two BGP routers might fail:
■ The AS numbers must match between the AS number in messages received from a
neighbor and the AS number a router has configured for that neighbor. If the AS numbers
fail to match, the session is reset.
■ TCP establishes a BGP session. Therefore, a lack of IP connectivity between two BGP
routers prevents a peering relationship from forming between those routers.
Key
Topic
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
230 CCNP TSHOOT 642-832 Official Certification Guide
Key
Topic
Table 8-3 BGP Troubleshooting Commands
Command
Routing Component
or Data Structure Description
show ip bgp summary Neighbor table This command displays a router’s BGP router
ID, AS number, information about the BGP’s
memory usage, and summary information
about BGP neighbors.
show ip bgp
neighbors
Neighbor table This command displays the detailed information
about all the BGP neighbors of a router.
show ip bgp BGP table This command displays the network prefixes
present in the BGP table.
debug ip routing IP routing table This command displays updates that occur
in a router’s IP routing table. Therefore, this
command is not specific to BGP.
show ip route bgp IP routing table This command shows routes known to a
router’s IP routing table that were learned via
BGP.
debug ip bgp Exchanging BGP information
with neighbors
Although this command does not show the
contents of BGP updates, the output does
provide real-time information about BGP
events, such as the establishment of a peering
relationship.
■ A BGP router might have multiple active IP addresses configured across its various interfaces.
A router might send a BGP message from one of its IP addresses that does
not match the IP address configured for that router on its peer. If the peer does not
recognize the source IP address of the BGP message, the peering relationship fails.
After initially establishing a peering relationship, two BGP peers exchange information
in their BGP tables. Incremental updates are sent thereafter. If a network prefix is removed
from the BGP table of a router, that router sends a WITHDRAW message to appropriate
peers.
BGP Troubleshooting Commands
With an understanding of BGP’s data structures and path selection criteria, you can now
strategically use Cisco IOS show and debug commands to collect information about specific
steps in the BGP routing process. Table 8-3 shows a collection of such commands,
along with their descriptions, and the step of the routing process or BGP data structure
that each command can be used to investigate.
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
Chapter 8: Troubleshooting BGP and Router Performance Issues 231
Example 8-1 provides sample output from the show ip bgp summary command. Notice
that the output shows that the BGP router ID is 10.2.2.2, and the router is in AS 65001.
You can also determine how much memory is being used by the BGP network entries and
see summary information about the BGP neighbors of this router.
Example 8-1 show ip bgp summary Command Output
R2#show ip bgp summary
BGP router identifier 10.2.2.2, local AS number 65001
BGP table version is 11, main routing table version 11
10 network entries using 1170 bytes of memory
14 path entries using 728 bytes of memory
6/5 BGP path/bestpath attribute entries using 744 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2690 total bytes of memory
BGP activity 10/0 prefixes, 14/0 paths, scan interval 60 secs
Example 8-2 provides sample output from the show ip bgp neighbors command. The output
from this command provides detailed information about each neighbor. The truncated
output shown here is for a neighbor with a BGP router ID of 10.3.3.3. Among the large
number of statistics shown is information about the BGP session with this neighbor. For
example, you can see that the BGP state of the session is Established, and the two TCP
ports being used for the session are 52907 and 179.
Example 8-2 show ip bgp neighbors Command Output
R2#show ip bgp neighbors
BGP neighbor is 172.16.1.1, remote AS 65002, external link
BGP version 4, remote router ID 10.3.3.3
BGP state = Established, up for 00:10:05
Last read 00:00:04, last write 00:00:05, hold time is 180, keepalive interval
Table 8-3 BGP Troubleshooting Commands
Command
Routing Component
or Data Structure Description
debug ip bgp updates Exchanging BGP
information with
neighbors
This command shows real-time information
about BGP updates sent and received by a
BGP router.
(Continued)
Neighbor
172.16.1.1
172.16.2.2
V
4
4
AS
65002
65003
MsgRcvd
11
8
MsgSent
15
12
TblVer
11
11
InQ
0
0
OutQ
0
0
Up/Down
00:07:45
00:03:19
State/PfxRcd
4
4
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
232 CCNP TSHOOT 642-832 Official Certification Guide
is 60 seconds
Neighbor capabilities:
Route refresh: advertised and received(old & new)
Address family IPv4 Unicast: advertised and received
Message statistics:
InQ depth is 0
OutQ depth is 0
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 5 2
Keepalives: 12 12
Route Refresh: 0 0
Total: 18 15
Default minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 11, neighbor version 11/0
Output queue size : 0
Index 1, Offset 0, Mask 0x2
1 update-group member
Sent Rcvd
Prefix activity: ---- ----
Prefixes Current: 10 5 (Consumes 260 bytes)
Prefixes Total: 10 5
Implicit Withdraw: 0 0
Explicit Withdraw: 0 0
Used as bestpath: n/a 3
Used as multipath: n/a 0
Outbound Inbound
Local Policy Denied Prefixes: --------- --------
Total: 0 0
Number of NLRIs in the update sent: max 3, min 1
Connections established 1; dropped 0
Last reset never
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Connection is ECN Disabled, Minimum incoming TTL 0, Outgoing TTL 1
Local host: 172.16.1.2, Local port: 52907
Foreign host: 172.16.1.1, Foreign port: 179
Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
Chapter 8: Troubleshooting BGP and Router Performance Issues 233
Event Timers (current time is 0x1268DC):
Timer Starts Wakeups Next
Retrans 16 0 0x0
TimeWait 0 0 0x0
AckHold 14 12 0x0
SendWnd 0 0 0x0
KeepAlive 0 0 0x0
GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0
iss: 43311306 snduna: 43311857 sndnxt: 43311857 sndwnd: 15834
irs: 2939679566 rcvnxt: 2939679955 rcvwnd: 15996 delrcvwnd: 388
SRTT: 279 ms, RTTO: 504 ms, RTV: 225 ms, KRTT: 0 ms
minRTT: 48 ms, maxRTT: 488 ms, ACK hold: 200 ms
Flags: active open, nagle
IP Precedence value : 6
Datagrams (max data segment is 1460 bytes):
Rcvd: 18 (out of order: 0), with data: 14, total data bytes: 388
Sent: 29 (retransmit: 0, fastretransmit: 0, partialack: 0, Second Congestion: 0),
with data: 15, total data bytes: 550
...OUTPUT OMITTED...
Example 8-3 provides sample output from the show ip bgp command. The output from
this command shows the network prefixes present in the BGP table, along with information
such as the next-hop IP addresses to reach those networks. Notice that some network
prefixes are reachable via more than one path. For example, the 10.1.2.0/24 network is
reachable via a next-hop IP address of 172.16.2.2 or 172.16.1.1. The > sign indicates which
path BGP has selected as the best path. In this case, the path BGP selected as the best path
has a next-hop IP address of 172.16.1.1.
Example 8-3 show ip bgp Command Output
R2#show ip bgp
BGP table version is 11, local router ID is 10.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.1/32 192.168.0.11 11 32768 ?
* 10.1.2.0/24 172.16.2.2 0 0 65003 i
*> 172.16.1.1 0 0 65002 i
* 10.1.3.0/30 172.16.2.2 0 0 65003 i
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
234 CCNP TSHOOT 642-832 Official Certification Guide
*> 172.16.1.1 0 0 65002 i
*> 10.2.2.2/32 0.0.0.0 0 32768 ?
* 10.3.3.3/32 172.16.2.2 0 65003 65002 i
*> 172.16.1.1 0 0 65002 i
* 10.4.4.4/32 172.16.1.1 0 65002 65003 i
*> 172.16.2.2 0 0 65003 i
* 172.16.1.0/30 172.16.1.1 0 0 65002 i
*> 0.0.0.0 0 32768 i
* 172.16.2.0/30 172.16.2.2 0 0 65003 i
*> 0.0.0.0 0 32768 i
*> 192.168.0.0 0.0.0.0 0 32768 ?
*> 192.168.1.0 192.168.0.11 11 32768 ?
Example 8-4 provides sample output from the debug ip routing command. The output
from this command shows updates to a router’s IP routing table. In this example, the
Loopback 0 interface (with an IP address of 10.3.3.3) of a neighboring router was administratively
shut down and then administratively brought back up. As the 10.3.3.3/32 network
became unavailable and then once again became available, you can see that the
10.3.3.3/32 route was deleted and then added to this router’s IP routing table. Notice that
this output is not specific to BGP. Therefore, you can use the debug ip routing command
with routing processes other than BGP.
Example 8-4 debug ip routing Command Output
R2#debug ip routing
IP routing debugging is on
*Mar 1 00:20:55.707: RT: 10.3.3.3/32 gateway changed from 172.16.1.1 to
172.16.2.2
*Mar 1 00:20:55.711: RT: NET-RED 10.3.3.3/32
*Mar 1 00:20:55.735: RT: del 10.3.3.3/32 via 172.16.2.2, bgp metric [20/0]
*Mar 1 00:20:55.739: RT: delete subnet route to 10.3.3.3/32
*Mar 1 00:20:55.743: RT: NET-RED 10.3.3.3/32
*Mar 1 00:21:25.815: RT: SET_LAST_RDB for 10.3.3.3/32
NEW rdb: via 172.16.1.1
*Mar 1 00:21:25.819: RT: add 10.3.3.3/32 via 172.16.1.1, bgp metric [20/0]
*Mar 1 00:21:25.823: RT: NET-RED 10.3.3.3/32
Example 8-5 provides sample output from the show ip route bgp command. This command
displays a subset of a router’s IP routing table. Specifically, only routes in the IP
routing table which have been learned via BGP are displayed.
Example 8-5 show ip route bgp Command Output
R2#show ip route bgp
10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
B 10.1.3.0/30 [20/0] via 172.16.1.1, 00:11:26
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
Chapter 8: Troubleshooting BGP and Router Performance Issues 235
B 10.3.3.3/32 [20/0] via 172.16.1.1, 00:00:34
B 10.1.2.0/24 [20/0] via 172.16.1.1, 00:11:26
B 10.4.4.4/32 [20/0] via 172.16.2.2, 00:07:35
Example 8-6 provides sample output from the debug ip bgp command. The output of this
command does not show the contents of BGP updates; however, this command can be
useful in watching real-time state changes for BGP peering relationships. In this example,
you can see a peering session being closed for the neighbor with an IP address of
172.16.1.1.
Example 8-6 debug ip bgp Command Output
R2#debug ip bgp
BGP debugging is on for address family: IPv4 Unicast
*Mar 1 00:23:26.535: BGP: 172.16.1.1 remote close, state CLOSEWAIT
*Mar 1 00:23:26.535: BGP: 172.16.1.1 -reset the session
*Mar 1 00:23:26.543: BGPNSF state: 172.16.1.1 went from nsf_not_active to
nsf_not_active
*Mar 1 00:23:26.547: BGP: 172.16.1.1 went from Established to Idle
*Mar 1 00:23:26.547: %BGP-5-ADJCHANGE: neighbor 172.16.1.1 Down Peer closed the
session
*Mar 1 00:23:26.547: BGP: 172.16.1.1 closing
*Mar 1 00:23:26.651: BGP: 172.16.1.1 went from Idle to Active
*Mar 1 00:23:26.663: BGP: 172.16.1.1 open active delayed 30162ms (35000ms max,
28% jitter)
Example 8-7 provides sample output from the debug ip bgp updates command. This command
produces more detailed output than the debug ip bgp command. Specifically, you
can see the content of BGP updates. In this example, you see a route of 10.3.3.3/32 being
added to a router’s IP routing table.
Example 8-7 debug ip bgp updates Command Output
R2#debug ip bgp updates
BGP updates debugging is on for address family: IPv4 Unicast
*Mar 1 00:24:27.455: BGP(0): 172.16.1.1 NEXT_HOP part 1 net 10.3.3.3/32, next
172.16.1.1
*Mar 1 00:24:27.455: BGP(0): 172.16.1.1 send UPDATE (format) 10.3.3.3/32, next
172.16.1.1, metric 0, path 65002
*Mar 1 00:24:27.507: BGP(0): 172.16.1.1 rcv UPDATE about 10.3.3.3/32 — withdrawn
*Mar 1 00:24:27.515: BGP(0): Revise route installing 1 of 1 routes for
10.3.3.3/32 -> 172.16.2.2(main) to main IP table
*Mar 1 00:24:27.519: BGP(0): updgrp 1 - 172.16.1.1 updates replicated for
neighbors: 172.16.2.2
*Mar 1 00:24:27.523: BGP(0): 172.16.1.1 send UPDATE (format) 10.3.3.3/32, next
172.16.1.2, metric 0, path 65003 65002
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
236 CCNP TSHOOT 642-832 Official Certification Guide
*Mar 1 00:24:27.547: BGP(0): 172.16.2.2 rcvd UPDATE w/ attr: nexthop 172.16.2.2,
origin i, path 65003 65002
*Mar 1 00:24:27.551: BGP(0): 172.16.2.2 rcvd 10.3.3.3/32...duplicate ignored
*Mar 1 00:24:27.555: BGP(0): updgrp 1 - 172.16.1.1 updates replicated for
neighbors: 172.16.2.2
*Mar 1 00:24:27.675: BGP(0): 172.16.2.2 rcv UPDATE w/ attr: nexthop 172.16.2.2,
origin i, originator 0.0.0.0, path 65003 65001 65002, community , extended
community
*Mar 1 00:24:27.683: BGP(0): 172.16.2.2 rcv UPDATE about 10.3.3.3/32 — DENIED
due to: AS-PATH contains our own AS;
...OUTPUT OMITTED...
Trouble Ticket: BGP
This trouble ticket focuses on BGP. You are presented with baseline data, a trouble ticket,
and information collected while investigating the reported issue. You are then challenged
to identify the underlying issue and create an action plan to resolve that issue.
Trouble Ticket #6
You receive the following trouble ticket:
Company A (that is, routers R1 and R2) has connections to two service providers
(that is, BB1 and BB2). Router R2 is running BGP and is peering with routers BB1 and
BB2. The bandwidth between routers R2 and BB2 is greater than the bandwidth between
routers R2 and BB1. Therefore, company A wants to use the R2-to-BB2 link as
the primary link to the backbone network (that is, a default route). However, company
A noticed that the R2-to-BB1 link is being used.
This trouble ticket references the topology shown in Figure 8-3.
You begin by examining the baseline data collected after company A was dual-homed to
its two ISPs. Example 8-8 shows the output from the show ip route command on router
R1. Notice that router R1 has a default route in its IP routing table. This default route was
learned via OSPF from router R2.
Example 8-8 Baseline Output for Router R1
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
Chapter 8: Troubleshooting BGP and Router Performance Issues 237
S 1/0.2
.1
Lo 0
10.3.3.3/32
S 1/0.2
.1
DLCI = 182
DLCI = 811
S 1/0.1
.1
Lo 0
10.1.1.1/32
Lo 0
10.2.2.2/32
172.16.1.0/30
Fa 0/0
DLCI = 881
.11
FXS
1/0/0
FXS
1/0/1
192.168.1.0/24
192.168.0.0/24
.11
Fa 0/1
172.16.2.0/30
S 1/0.1
.2
DLCI = 882
Fa 0/0
.22
10.1.3.0/30
256 kbps
Gig 0/8 Fa 5/46
Lo 0
10.4.4.4/32
S 1/0.2
.2
DLCI = 821
Gig 0/9 Fa 5/47
Fa 5/45
x3333
Gig 0/10 Fa 5/48
100 Mbps
10 Mbps
R1
BB2
BB1
R2
FRSW
x2222
AS 65002
AS 65001
AS 65003
128 kbps
64 kbps
OSPF Area 0
x1111
SW1 SW2
S 1/0.1
.2
DLCI = 181
Figure 8-3 Trouble Ticket #6 Topology
Gateway of last resort is 192.168.0.22 to network 0.0.0.0
10.0.0.0/32 is subnetted, 2 subnets
O 10.2.2.2 [110/2] via 192.168.0.22, 00:05:33, FastEthernet0/1
C 10.1.1.1 is directly connected, Loopback0
C 192.168.0.0/24 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
O*E2 0.0.0.0/0 [110/1] via 192.168.0.22, 00:05:33, FastEthernet0/1
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
238 CCNP TSHOOT 642-832 Official Certification Guide
Router R2 was configured for both OSPF and BGP, with the BGP-learned default route being
injected into OSPF, and with OSPF-learned routes being redistributed into BGP.
Example 8-9 shows the initial IP routing table for router R2. Notice that the next-hop
router for the default route is 172.16.1.1 (that is, router BB1).
Example 8-9 Baseline IP Routing Table on Router R2
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 172.16.1.1 to network 0.0.0.0
172.16.0.0/30 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, Serial1/0.1
C 172.16.2.0 is directly connected, Serial1/0.2
10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
C 10.2.2.2/32 is directly connected, Loopback0
B 10.1.3.0/30 [20/0] via 172.16.1.1, 00:01:40
B 10.3.3.3/32 [20/0] via 172.16.1.1, 00:01:40
B 10.1.2.0/24 [20/0] via 172.16.1.1, 00:01:40
O 10.1.1.1/32 [110/11] via 192.168.0.11, 00:08:17, FastEthernet0/0
B 10.4.4.4/32 [20/0] via 172.16.2.2, 00:01:40
C 192.168.0.0/24 is directly connected, FastEthernet0/0
O 192.168.1.0/24 [110/11] via 192.168.0.11, 00:08:17, FastEthernet0/0
B* 0.0.0.0/0 [20/0] via 172.16.1.1, 00:01:40
Example 8-10 illustrates the initial OSPF and BGP configuration on router R2.
Example 8-10 Initial Router Configuration on Router R2
R2#show run begin router
router ospf 1
log-adjacency-changes
network 10.2.2.2 0.0.0.0 area 0
network 192.168.0.0 0.0.0.255 area 0
default-information originate
!
router bgp 65001
no synchronization
bgp log-neighbor-changes
network 172.16.1.0 mask 255.255.255.252
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
Chapter 8: Troubleshooting BGP and Router Performance Issues 239
network 172.16.2.0 mask 255.255.255.252
redistribute ospf 1
neighbor 172.16.1.1 remote-as 65002
neighbor 172.16.2.2 remote-as 65003
no auto-summary
Example 8-11 shows the output of the show ip bgp summary command on router R2,
which confirms that router R2 resides in BGP AS 65001. The output also confirms BGP
adjacencies have been formed with routers BB1 and BB2.
Example 8-11 BGP Configuration Summary on Router R2
R2#show ip bgp summary
BGP router identifier 10.2.2.2, local AS number 65001
BGP table version is 18, main routing table version 18
11 network entries using 1287 bytes of memory
20 path entries using 1040 bytes of memory
8/5 BGP path/bestpath attribute entries using 992 bytes of memory
4 BGP AS-PATH entries using 96 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3415 total bytes of memory
BGP activity 38/27 prefixes, 75/55 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
172.16.1.1 4 65002 102 97 18 0 0 00:02:47 7
172.16.2.2 4 65003 100 97 18 0 0 00:02:47 7
Router BB1 is configured for BGP and is sourcing a default route advertisement. Example
8-12 shows the IP routing table of router BB1.
Example 8-12 Initial IP Routing Table on Router BB1
BB1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
172.16.0.0/30 is subnetted, 2 subnets
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
240 CCNP TSHOOT 642-832 Official Certification Guide
C 172.16.1.0 is directly connected, Serial1/0.2
B 172.16.2.0 [20/0] via 10.1.3.2, 00:03:01
10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
B 10.2.2.2/32 [20/0] via 172.16.1.2, 00:01:59
C 10.1.3.0/30 is directly connected, Serial1/0.1
C 10.3.3.3/32 is directly connected, Loopback0
C 10.1.2.0/24 is directly connected, FastEthernet0/0
B 10.1.1.1/32 [20/11] via 172.16.1.2, 00:01:59
B 10.4.4.4/32 [20/0] via 10.1.3.2, 00:40:10
B 192.168.0.0/24 [20/0] via 172.16.1.2, 00:01:59
B 192.168.1.0/24 [20/11] via 172.16.1.2, 00:01:59
S* 0.0.0.0/0 is directly connected, Null0
Router BB2’s IP routing table, as shown in Example 8-13, is similar to router BB1’s IP routing
table. Notice that router BB2 is also sourcing a default route and is advertising it via BGP to
router R2. Therefore, router R2 has two paths to reach a default route in its BGP table.
Example 8-13 Initial IP Routing Table on Router BB2
BB2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
172.16.0.0/30 is subnetted, 2 subnets
B 172.16.1.0 [20/0] via 10.1.3.1, 00:03:11
C 172.16.2.0 is directly connected, Serial1/0.2
10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
B 10.2.2.2/32 [20/0] via 172.16.2.1, 00:02:09
C 10.1.3.0/30 is directly connected, Serial1/0.1
B 10.3.3.3/32 [20/0] via 10.1.3.1, 00:40:10
C 10.1.2.0/24 is directly connected, FastEthernet0/0
B 10.1.1.1/32 [20/11] via 172.16.2.1, 00:02:09
C 10.4.4.4/32 is directly connected, Loopback0
B 192.168.0.0/24 [20/0] via 172.16.2.1, 00:02:09
B 192.168.1.0/24 [20/11] via 172.16.2.1, 00:02:09
S* 0.0.0.0/0 is directly connected, Null0
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
Chapter 8: Troubleshooting BGP and Router Performance Issues 241
As shown earlier, in Example 8-9, router R2 preferred the 64-kbps link to router BB1 to
reach a default route, as opposed to the 128-kbps link to router BB2. Therefore, the outbound
routing from router R2 is suboptimal.
Also, the inbound routing, coming into the enterprise via router R2, is suboptimal. To illustrate
this point, consider Example 8-14, which shows the BGP table on router BB1. Notice
that router BB1 prefers a next-hop router of router R2 to reach the 10.1.1.1/32
network, which resides inside the enterprise network (that is, the network comprised of
routers R1 and R2). Using a next-hop router of R2 would force traffic over the 64-kbps
link rather than sending traffic from router BB1 over the 256-kbps link to router BB2, and
then over the 128-kbps link to router R2, and finally across the FastEthernet connection to
router R1.
Example 8-14 BGP Forwarding Table on Router BB1
BB1#show ip bgp
BGP table version is 130, local router ID is 10.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 10.1.3.2 0 0 65003 i
*> 0.0.0.0 0 32768 i
* 10.1.1.1/32 10.1.3.2 0 65003 65001 ?
*> 172.16.1.2 11 0 65001 ?
* 10.1.2.0/24 10.1.3.2 0 0 65003 i
*> 0.0.0.0 0 32768 i
* 10.1.3.0/30 10.1.3.2 0 0 65003 i
*> 0.0.0.0 0 32768 i
* 10.2.2.2/32 10.1.3.2 0 65003 65001 ?
*> 172.16.1.2 0 0 65001 ?
*> 10.3.3.3/32 0.0.0.0 0 32768 i
* 10.4.4.4/32 172.16.1.2 0 65001 65003 i
*> 10.1.3.2 0 0 65003 i
* 172.16.1.0/30 172.16.1.2 0 0 65001 i
*> 0.0.0.0 0 32768 i
* 172.16.2.0/30 172.16.1.2 0 0 65001 i
*> 10.1.3.2 0 0 65003 i
* 192.168.0.0 10.1.3.2 0 65003 65001 ?
*> 172.16.1.2 0 0 65001 ?
* 192.168.1.0 10.1.3.2 0 65003 65001 ?
*> 172.16.1.2 11 0 65001 ?
As you formulate your solution to correct the inbound and outbound path selection issues,
you should limit your configuration to router R2. The reason for this limitation is
that routers BB1 and BB2 are acting as ISP routers. In a real-world environment, the
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
242 CCNP TSHOOT 642-832 Official Certification Guide
Key
Topic
Table 8-4 Configuring ASPATH and Local Preference BGP Attributes
Command Description
Router(config)# route-map tag [permit |
deny] [seq-num]
Creates a route map
Router(config-route-map)# set localpreference
local-preference
Sets the local preference BGP attribute for routes
matched by a route map
Router(config-route-map)# set as-path
prepend autonomous-system-number-
1 [...autonomous-system-number-n]
Defines an autonomous system path to prepend
to an autonomous system path known by the
BGP forwarding table
Router(config)# router bgp as-number Enables a BGP process for a specific autonomous
system
Router(config-router)# neighbor
ip-address route-map route-map-name
[in | out]
Applies a specified route map to routes received
from or advertised to a specified BGP neighbor
administrator of an enterprise network would probably not have privileges to configure
the ISP routers.
BGP has multiple attributes that can be manipulated to influence path selection. The suggested
solution, however, focuses on how the BGP local preference attribute can influence
the outbound path selection and how the BGP ASPATH attribute can influence the inbound
path selection. You can configure route maps to set these BGP attributes. If you
choose to base your solution on local preference and ASPATH attributes, Table 8-4 provides
a syntax reference that might be helpful.
Take a moment to look through the provided show command output. Then, on a separate
sheet of paper, create a plan for correcting the suboptimal path selection.
Suggested Solution
Local preference values can be applied to routes coming into a router. This can cause that
router to make its outbound routing decisions based on those local preference values.
Higher local preference values are preferred over lower local preference values.
An AS path (that is, a listing of the autonomous systems that must be transited to reach a
specific destination network) advertised to a neighbor can influence the BGP path selection
of that neighbor. Specifically, BGP can make routing decisions based on the smallest
number of autonomous systems that must be crossed to reach a destination network. Using
a route map, you can prepend one or more additional instances of your local AS to the
ASPATH advertised to a router’s neighbor, thereby making that path appear less attractive
to your neighbor.
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
Chapter 8: Troubleshooting BGP and Router Performance Issues 243
Therefore, the suggested solution configures local preference values for routes advertised
into router R2 from routers BB1 and BB2 to prefer routes being advertised via router BB2.
Example 8-15 shows this configuration, which influences outbound path selection.
Example 8-15 Local Preference Configuration on Router R2
R2(config)#route-map LOCALPREF-BB1
R2(config-route-map)#set local-preference 100
R2(config-route-map)#exit
R2(config)#route-map LOCALPREF-BB2
R2(config-route-map)#set local-preference 200
R2(config-route-map)#exit
R2(config)#router bgp 65001
R2(config-router)#neighbor 172.16.1.1 route-map LOCALPREF-BB1 in
R2(config-router)#neighbor 172.16.2.2 route-map LOCALPREF-BB2 in
R2(config-router)#exit
To influence inbound path selection, this suggested solution configured a route map to
prepend two additional instances of AS 65001 to routes being advertised via BGP from
router R2 to router BB1. Example 8-16 shows this configuration, which causes router BB1
to use router BB2 as a next-hop router when sending traffic into the enterprise network. It
does this because the path via router BB2 appears to be fewer AS hops away from the enterprise
networks.
Example 8-16 ASPATH Configuration on Router R2
R2(config)#route-map ASPATH 10
R2(config-route-map)#set as-path prepend 65001 65001
R2(config-route-map)#exit
R2(config)#router bgp 65001
R2(config-router)#neighbor 172.16.1.1 route-map ASPATH out
R2(config-router)#end
Example 8-17 confirms that router R2 now prefers router BB2 (that is, a next-hop IP address
of 172.16.2.2) to reach the default network.
Example 8-17 Preferred Path of Router R2 to Backbone Networks
R2#show ip bgp
BGP table version is 16, local router ID is 10.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 172.16.1.1 0 100 0 65002 i
*> 172.16.2.2 0 200 0 65003 i
*> 10.1.1.1/32 192.168.0.11 11 32768 ?
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
244 CCNP TSHOOT 642-832 Official Certification Guide
* 10.1.2.0/24 172.16.1.1 0 100 0 65002 i
*> 172.16.2.2 0 200 0 65003 i
* 10.1.3.0/30 172.16.1.1 0 100 0 65002 i
*> 172.16.2.2 0 200 0 65003 i
*> 10.2.2.2/32 0.0.0.0 0 32768 ?
* 10.3.3.3/32 172.16.1.1 0 100 0 65002 i
*> 172.16.2.2 200 0 65003 65002 i
* 10.4.4.4/32 172.16.1.1 100 0 65002 65003 i
*> 172.16.2.2 0 200 0 65003 i
*> 172.16.1.0/30 0.0.0.0 0 32768 i
* 172.16.1.1 0 100 0 65002 i
* 172.16.2.2 200 0 65003 65002 i
*> 172.16.2.0/30 0.0.0.0 0 32768 i
* 172.16.1.1 100 0 65002 65003 i
* 172.16.2.2 0 200 0 65003 i
*> 192.168.0.0 0.0.0.0 0 32768 ?
*> 192.168.1.0 192.168.0.11 11 32768 ?
Example 8-18 confirms that router BB1 will not prefer to send traffic to the enterprise network
(that is, to routers R1 and R2) via router R2, but rather via router BB2. Notice from
the output that more AS hops appear to be required to reach enterprise networks via
router R2 (that is, 172.16.1.2) compared to router BB2 (that is, 10.1.3.2). Therefore, router
BB1 prefers to send traffic into the enterprise network via router BB2, as opposed to
router R2.
Example 8-18 Preferred Path of Router BB1 to Enterprise Networks
BB1#show ip bgp
BGP table version is 142, local router ID is 10.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 0.0.0.0 172.16.1.2 0 65001 65001 65001 65003 i
* 10.1.3.2 0 0 65003 i
*> 0.0.0.0 0 32768 i
*> 10.1.1.1/32 10.1.3.2 0 65003 65001 ?
* 172.16.1.2 11 0 65001 65001 65001 ?
* 10.1.2.0/24 172.16.1.2 0 65001 65001 65001 65003 i
* 10.1.3.2 0 0 65003 i
*> 0.0.0.0 0 32768 i
* 10.1.3.0/30 172.16.1.2 0 65001 65001 65001 65003 i
* 10.1.3.2 0 0 65003 i
*> 0.0.0.0 0 32768 i
www.CareerCert.info
www.CareerCert.info
www - CareerCert - info
Chapter 8: Troubleshooting BGP and Router Performance Issues 245
*> 10.2.2.2/32 10.1.3.2 0 65003 65001 ?
* 172.16.1.2 0 0 65001 65001 65001 ?
*> 10.3.3.3/32 0.0.0.0 0 32768 i
* 10.4.4.4/32 172.16.1.2 0 65001 65001 65001 65003 i
*> 10.1.3.2 0 0 65003 i
* 172.16.1.0/30 172.16.1.2 0 0 65001 65001 65001 i
*> 0.0.0.0 0 32768 i
* 172.16.2.0/30 172.16.1.2 0 0 65001 65001 65001 i
*> 10.1.3.2 0 0 65003 i
*> 192.168.0.0 10.1.3.2 0 65003 65001 ?
* 172.16.1.2 0 0 65001 65001 65001 ?
*> 192.168.1.0 10.1.3.2 0 65003 65001 ?
* 172.16.1.2 11 0 65001 65001 65001 ?
No comments:
Post a Comment