Professional Documents
Culture Documents
Contents
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
General Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
3
7
8
Purpose
This application note provides procedures on monitoring and troubleshooting BGP neighbor
sessions. It is intended to help network operations monitor and troubleshoot BGP neighbor
sessions using Juniper Networks router tools.
Procedure
The following are procedures to monitor and troubleshoot BGP neighbor sessions. These
procedures include and explain output from the Juniper Networks router.
1. To display information about BGP and its neighbors, use the show bgp summary
command:
user@router> show bgp summary
Groups: 9
Peers: 11 Down Peers: 4
Table
Tot Paths Act Paths Suppressed
History Damp State
Pending
inet.0
153860
76382
0
0
0
0
inet.2
21982
10991
0
0
0
0
Peer
AS
InPkt
OutPkt
OutQ
Flaps Last Up/Dwn State|Active/ Received/Damped
192.168.0.79
333
22529860
206760
0
0
10w1d13h 76365/76896/0
10991/10991/0
192.168.0.80
333
22837563
206765
0
1
1w5d13h 1/76896/0
0/10991/0
192.168.34.30
55555
0
0
0
0
10w1d13h Idle
192.168.35.90
65444
39041
230925
0
263
1w6d14h 5/7/0
0/0/0
192.168.36.106
4444
203712
6880118
0
23
2w4d22h 7/56/0
0/0/0
192.168.254.38
6666
0
0
0
0
10w1d13h Idle
192.168.254.50 65315
206038
6890696
0
2
1w0d6h 1/1/0
0/0/0
192.168.254.54 65099
0
0
0
0
10w1d13h Idle
192.168.254.66 65339
206039
6768468
0
1
2w6d23h 1/1/0
0/0/0
192.168.254.254 65333
22254
827665
0
7 5d 20:14:18 2/3/0
0/0/0
10.233.157.127 65333
0
0
0
0
1w0d18h
Idle
For the status of the BGP neighbor session, look at the State|#Active/Received/Damped
column for the BGP neighbor session in question (far right). If the BGP neighbor session is in
the Established state, the column lists the number of paths received from the BGP neighbor, the
number of paths received that are active and used for forwarding traffic, and the number of
damped paths.
If the BGP neighbor session is in a state other than Established, use the ping and show route
commands to verify network connectivity to the BGP neighbor.
2. If there is network connectivity to the BGP neighbor but the BGP neighbor session is still
not established, check the BGP neighbor configuration on the local and remote router.
To check the BGP neighbor configuration on the local Juniper router, use the show bgp
neighbor <address> command.
3. To display the paths received from the BGP neighbor, use the show route
receive-protocol bgp <address> terse command.
user@router> show route receive-protocol bgp 192.168.35.90 terse
inet.0:77045 destinations,77045 routes(77007 active, 0 holddown, 53 hidden)
Prefix
Nexthop
MED
Lclpref AS path
* 10.24.176.0/24
192.168.35.90
65444 I
* 10.72.190.0/24
192.168.35.90
65444 I
192.168.178.0/24
192.168.35.90
65444 I
* 192.168.4.0/24
192.168.35.90
65444 I
* 192.168.5.0/24
192.168.35.90
65444 I
192.168.36.0/22
192.168.35.90
65444 I
* 192.168.166.0/24
192.168.35.90
65444 I
inet.2:10995 destinations, 10995 routes (10995 active, 0 holddown, 0 hidden)
Prefix
Nexthop
MED
Lclpref AS path
The entries that have a + or * in front of them are paths received that are active and used for
forwarding traffic.
If the number of paths received from the BGP neighbor is not correct, check the BGP
neighbor configuration on the remote router.
4. If you want to determine why a route entry received from the BGP neighbor is not
active, use the show route <destination prefix> detail command to display
detailed
route information.
5. If a path from a BGP neighbor is not active because of routing policy, you can view the
policy by typing show policy <policy-name> . The import and export policies
applied to a BGP neighbor session is displayed in the show bgp neighbor
<address> command output.
7. Confirm: When you have resolved a BGP neighbor session problem, you can confirm that
you are advertising and receiving the correct BGP routing information by using the show
route advertising protocol bgp <address> command and the show route
receive-protocol bgp <address> command.
General Tips
The following are two useful commands for troubleshooting BGP in general.
1. Type show route aspath-regex <regular-expression> to display entries in
the routing table that match the specified BGP AS path regular expression. The following
command displays any routes that has AS 8888 in the AS-PATH attribute. See the JUNOS
Internet Software Configuration Guide for more information about AS path regular
expression.
References
JUNOS Internet Software Configuration Guide
Copyright 2002, Juniper Networks, Inc. All rights reserved. Juniper Networks is registered in the U.S. Patent and Trademark Office and in other countries
as a trademark of Juniper Networks, Inc. Broadband Cable Processor, G10, Internet Processor, JUNOS, JUNOScript, M5, M10, M20, M40, M40e, M160,
M-series, T640, and T-series, are trademarks of Juniper Networks, Inc. All other trademarks, service marks, registered trademarks, or registered service marks
are the property of their respective owners. All specifications are subject to change without notice.
Juniper Networks assumes no responsibility for any inaccuracies in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise
revise this publication without notice.