Você está na página 1de 5

BASIC BGP - Monitoring and Maintaining

BGP is mainly used to connect a local network to an external network to gain access to the
Internet or to connect to other organizations. When connecting to an external organization,
external BGP (eBGP) peering sessions are created. Although BGP is referred to as an exterior
gateway protocol (EGP) many networks within an organization are becoming so complex that
BGP can be used to simplify the internal network used within the organization. BGP peers within
the same organization exchange routing information through internal BGP (iBGP) peering
sessions.

Configuration
BGP requires more configuration than other routing protocols and the effects of any
configuration changes must be fully understood. Incorrect configuration can create routing loops
and negatively impact normal network operation.
Routing policies for a peer include all the configurations for elements such as route map,
distribute list, prefix list, and filter list that may impact inbound or outbound routing table
updates. Whenever there is a change in the routing policy, the BGP session must be soft cleared,
or soft reset, for the new policy to take effect. Performing inbound reset enables the new inbound
policy configured on the router to take effect. Performing outbound reset causes the new local
outbound policy configured on the router to take effect without resetting the BGP session. As a
new set of updates is sent during outbound policy reset, a new inbound policy of the neighbor
can also take effect. This means that after changing inbound policy you must do an inbound reset
on the local router or an outbound reset on the peer router. Outbound policy changes require an
outbound reset on the local router or an inbound reset on the peer router.
Once you have defined two routers to be BGP neighbors, they will form a BGP connection and
exchange routing information. If you subsequently change a BGP filter, weight, distance,
version, or timer, or make a similar configuration change, you must reset BGP connections for
the configuration change to take effect.
A soft reset updates the routing table for inbound and outbound routing updates. This soft reset
allows the dynamic exchange of route refresh requests and routing information between BGP
routers, and the subsequent readvertisement of the respective outbound routing table. There are
two types of soft reset:

http://networkingstepbystep.com/

When soft reset is used to generate inbound updates from a neighbor, it is called dynamic
inbound soft reset.
When soft reset is used to send a new set of updates to a neighbor, it is called outbound
soft reset.
To use soft reset without preconfiguration, both BGP peers must support the soft route refresh
capability, which is advertised in the OPEN message sent when the peers establish a TCP
session. Routers running Cisco IOS releases prior to Release 12.1 do not support the route
refresh capability and must clear the BGP session using the neighbor soft-reconfiguration router
configuration command. Clearing the BGP session in this way will have a negative impact upon
network operations and should be used only as a last resort.

Monitoring and Maintaining Basic BGP


NetStepByStep-R2# show ip bgp summary

Use to display the status of all Border Gateway Protocol (BGP) connections.
Use this command in EXEC mode.
This command has no arguments or keywords.
A prefix is an IP address and network mask. It can represent an entire network, a subset
of a network, or a single host route. A path is a route to a given destination.
By default, BGP will install only a single path for each destination. If multipath routes
are configured, BGP will install a path entry for each multipath route, and only one
multipath route will be marked as the bestpath.
NetStepByStep-R2# sh ip bgp summary
BGP router identifier 2.2.2.2, local AS number 1
BGP table version is 104, main routing table version 104
13 network entries using 1521 bytes of memory
13 path entries using 676 bytes of memory
5/4 BGP path/bestpath attribute entries using 620 bytes of memory
3 BGP rrinfo entries using 72 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 2937 total bytes of memory
BGP activity 30/17 prefixes, 79/66 paths, scan interval 60 secs
Neighbor
State/PfxRcd
4.4.4.4
12.12.12.1

V
4
4

AS MsgRcvd MsgSent
1
2

1401
1427

1377
1425

TblVer
104
104

InQ OutQ Up/Down


0
0

http://networkingstepbystep.com/

0 00:16:06
0 00:17:27

10
2

NetStepByStep-R2# show ip bgp

Use to display entries in the Border Gateway Protocol (BGP) routing table.
Use this command in EXEC mode.
The output can be filtered to display entries for a specific prefix, prefix length, and
prefixes injected through a prefix list, route map, or conditional advertisement.
BGP prefixes that are monitored and controlled by Optimized Edge Routing (OER) are
displayed by entering the show ip bgp command with the oer-paths keyword.
NetStepByStep-R2# sh ip bgp
BGP table version is 104, local router ID is 2.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
*>i0.0.0.0
*>i7.7.7.0/24
*> 11.11.11.0/25
*> 11.11.11.128/25
*>i17.17.17.0/24
*> 22.22.22.0/24
*>i33.33.33.0/24
*>i44.44.44.0/24
r>i47.47.47.0/24
*>i55.55.55.0/24
*>i66.66.66.0/24
*>i67.67.67.0/24
*>i77.77.77.0/24

Next Hop
6.6.6.6
47.47.47.7
12.12.12.1
12.12.12.1
47.47.47.7
0.0.0.0
3.3.3.3
4.4.4.4
47.47.47.7
5.5.5.5
6.6.6.6
47.47.47.7
47.47.47.7

Metric LocPrf Weight Path


0
100
0 i
0
100
0 3 ?
0
0 2 i
0
0 2 i
0
100
0 3 ?
0
32768 i
0
100
0 i
0
100
0 i
0
100
0 3 ?
0
100
0 i
0
100
0 i
0
100
0 3 ?
0
100
0 3 ?

NetStepByStep-R2# show ip bgp X.X.X.X

Use to display entries in the Border Gateway Protocol (BGP) routing table.
Use this command in EXEC mode.
The output can be filtered to display entries for a specific prefix, prefix length, and
prefixes injected through a prefix list, route map, or conditional advertisement.
BGP prefixes that are monitored and controlled by Optimized Edge Routing (OER) are
displayed by entering the show ip bgp command with the oer-paths keyword.
The X.X.X.X stands for the IP address entered to filter the output to display only a
particular host or network in the BGP routing table.
NetStepByStep-R2#show ip bgp 7.7.7.7
BGP routing table entry for 7.7.7.0/24, version 102
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1
3, (received & used)
47.47.47.7 (metric 20) from 4.4.4.4 (4.4.4.4)
Origin incomplete, metric 0, localpref 100, valid, internal, best

http://networkingstepbystep.com/

NetStepByStep-R2# show ip bgp neighbors X.X.X.X

Use to display information about the TCP and Border Gateway Protocol (BGP)
connections to neighbors.
Use this command in EXEC mode.
The X.X.X.X stands for IP address of a neighbor. If this argument is omitted, all
neighbors are displayed.
This command displays information only about IPv4 address-family sessions unless the
all keyword is entered.
Prefix activity is displayed based on the number of prefixes that are advertised and
withdrawn.
Policy denials display the number of routes that were advertised but then ignored based
the function or attribute that is displayed in the output.
NetStepByStep-R2# show ip bgp neighbors 4.4.4.4
BGP neighbor is 4.4.4.4, remote AS 1, internal link
Description: PEER WITH ROUTE REFLECTOR - R4
BGP version 4, remote router ID 4.4.4.4
BGP state = Established, up for 00:17:26
Last read 00:00:26, last write 00:00:26, hold time is 180, keepalive
interval 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:
4
4
Notifications:
0
0
Updates:
23
47
Keepalives:
1350
1350
Route Refresh:
1
2
Total:
1378
1402
Default minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 104, neighbor version 104/0
--More--

NetStepByStep-R2# clear ip bgp *

Use to reset all current BGP sessions.


Use this command in privileged EXEC mode at the system prompt.
You can reset inbound routing table updates dynamically or by generating new updates
using stored update information.
Using stored update information required additional memory for storing the updates.

http://networkingstepbystep.com/

To reset inbound routing table updates dynamically, all BGP routers must support the
route refresh capability.
NetStepByStep-R2# clear ip bgp X.X.X.X

Use to specify that only the identified BGP neighbor will be reset.
Use this command in privileged EXEC mode at the system prompt.
The X.X.X.X. stands for the neighbor-address.

Verification
N/A

Troubleshoot
N/A

Video Cheat Sheet


R2
show
show
show
show
show
show

ip
ip
ip
ip
ip
ip

bgp
bgp
bgp
bgp
bgp
bgp

summary
7.7.7.7
neighbors
neighbors 12.12.12.1
neighbors 4.4.4.4

clear ip bgp
clear ip bgp 12.12.12.1

http://networkingstepbystep.com/