Show ip bgp
To display entries in the BGP routing table, use the show ip bgp command in EXEC mode. show ip bgp [network] [network-mask] [longer-prefixes]
Syntax Description network (Optional) Network number, entered to display a particular network in the BGP routing table.
network-mask longer-prefixes
(Optional) Displays all BGP routes matching the address/mask pair. (Optional) Displays route and more specific routes.
Command Modes
EXEC
Command History Release
10.0
12.0
Modification
This command was introduced.
The display of prefix advertisement statistics was added.
Examples The following is sample output from the show ip bgp command:
Router# show ip bgp
|
Origin |
codes: i - |
- IGP, e - EGP, ? - |
- incomplete |
|||||||||
|
Network |
Next Hop |
Metric LocPrf |
Weight |
Path |
||||||||
|
* i3.0. |
0 |
.0 |
193. |
0.22. |
1 |
0 |
100 |
0 |
1800 |
1239 |
? |
|
|
*>i |
193. |
0.16. |
1 |
0 |
100 |
0 |
1800 |
1239 |
? |
|||
|
* i6.0. |
0 |
.0 |
193. |
0.22. |
1 |
0 |
100 |
0 |
1800 |
690 |
568 |
? |
|
*>i |
193. |
0.16. |
1 |
0 |
100 |
0 |
1800 |
690 |
568 |
? |
||
|
* i7.0. |
0 |
.0 |
193. |
0.22. |
1 |
0 |
100 |
0 |
1800 |
701 |
35 ? |
|
|
*>i |
193. |
0.16. |
1 |
0 |
100 |
0 |
1800 |
701 |
35 ? |
|||
|
* |
172. |
16.72 |
.24 |
0 |
1878 |
704 |
701 |
35 |
||||
|
* i8.0. |
0 |
.0 |
193. |
0.22. |
1 |
0 |
100 |
0 |
1800 |
690 |
560 |
? |
|
*>i |
193. |
0.16. |
1 |
0 |
100 |
0 |
1800 |
690 |
560 |
? |
||
|
* |
172. |
16.72 |
.24 |
0 |
1878 |
704 |
701 |
560 |
||||
|
* i13.0 |
0.0 |
193. |
0.22. |
1 |
0 |
100 |
0 |
1800 |
690 |
200 |
? |
|
|
*>i |
193. |
0.16. |
1 |
0 |
100 |
0 |
1800 |
690 |
200 |
? |
||
|
* |
172. |
16.72 |
.24 |
0 |
1878 |
704 |
701 |
200 |
||||
|
* i15.0 |
0.0 |
193. |
0.22. |
1 |
0 |
100 |
0 |
1800 |
174 |
? |
||
|
*>i |
193. |
0.16. |
1 |
0 |
100 |
0 |
1800 |
174 |
? |
|||
|
* i16.0 |
0.0 |
193. |
0.22. |
1 |
0 |
100 |
0 |
1800 |
701 |
i |
||
|
*>i |
193. |
0.16. |
1 |
0 |
100 |
0 |
1800 |
701 |
i |
|||
|
* |
172. |
16.72 |
.24 |
0 |
1878 |
704 |
701 |
i |
||||
Table 39 describes significant fields shown in the display.
Table 39 describes significant fields shown in the display.
_BGP Commands |
I show ip bgp
|
Field |
Description |
|
BGP table version |
Internal version number of the table. This number is incremented whenever the table changes. |
|
local router ID |
IP address of the router. |
|
Status codes |
Status of the table entry. The status is displayed at the beginning of each line in the table. It can be one of the following values: s—The table entry is suppressed. >—The table entry is the best entry to use for that network. i—The table entry was learned via an internal BGP session. |
|
Indicates the origin of the entry. The origin code is placed at the end of each line in the table. It can be one of the following values: i—Entry originated from IGP and was advertised with a network router configuration command. e—Entry originated from EGP. ?—Origin of the path is not clear Usually, this is a router that is redistributed into BGP from an IGP. |
|
|
Network |
IP address of a network entity. |
|
Next Hop |
IP address of the next system that is used when forwarding a packet to the destination network. An entry of 0.0.0.0 indicates that the router has some non-BGP routes to this network. |
|
Metric |
If shown, this is the value of the interautonomous system metric. This field is frequently not used. |
|
LocPrf |
Local preference value as set with the set local-preference route-map configuration command. The default value is 100. |
|
Weight |
Weight of the route as set via autonomous system filters. |
|
Path |
Autonomous system paths to the destination network. There can be one entry in this field for each autonomous system in the path. |
show ip bgp H
The following is sample output from the show ip bgp command when you specify longer-prefixes:
Router# show ip bgp 172.16.0.0 255.255.0.0 longer-prefixes
BGP table version is 1738, local router ID is 172.16.72.24 Status codes: s suppressed, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete
|
Network |
Next |
. Hop |
Metric |
LocPrf Weight |
Path |
||||||||
|
*> |
172. |
.16. |
0. |
0 |
172. |
16. |
.72. |
.30 |
8896 |
32768 |
? |
||
|
* |
172. |
16. |
.72. |
.30 |
0 |
109 |
108 |
? |
|||||
|
*> |
172. |
.16. |
1. |
0 |
172. |
16. |
.72. |
.30 |
8796 |
32768 |
? |
||
|
* |
172. |
16. |
.72. |
.30 |
0 |
109 |
108 |
? |
|||||
|
*> |
172. |
.16. |
11 |
.0 |
172. |
16. |
.72. |
.30 |
42482 |
32768 |
? |
||
|
* |
172. |
16. |
.72. |
30 |
0 |
109 |
108 |
? |
|||||
|
*> |
172. |
.16. |
14 |
.0 |
172. |
16. |
.72. |
30 |
8796 |
32768 |
? |
||
|
* |
172. |
16. |
.72. |
30 |
0 |
109 |
108 |
? |
|||||
|
*> |
172. |
.16. |
15 |
.0 |
172. |
16. |
.72. |
30 |
8696 |
32768 |
? |
||
|
* |
172. |
16. |
.72. |
30 |
0 |
109 |
108 |
? |
|||||
|
*> |
172. |
.16. |
16 |
.0 |
172. |
16. |
.72. |
30 |
1400 |
32768 |
? |
||
|
* |
172. |
16. |
.72. |
30 |
0 |
109 |
108 |
? |
|||||
|
*> |
172. |
.16. |
17 |
.0 |
172. |
16. |
.72. |
30 |
1400 |
32768 |
? |
||
|
* |
172. |
16. |
.72. |
30 |
0 |
109 |
108 |
? |
|||||
|
*> |
172. |
.16. |
18 |
.0 |
172. |
16. |
.72. |
30 |
8876 |
32768 |
? |
||
|
* |
172. |
16. |
.72. |
30 |
0 |
109 |
108 |
? |
|||||
|
*> |
172. |
.16. |
19 |
.0 |
172. |
16. |
.72. |
30 |
8876 |
32768 |
? |
||
|
* |
172. |
16. |
.72. |
30 |
0 |
109 |
108 |
? |
|||||
The following is sample output from the show ip bgp command, showing information for prefix 3.0.0.0: show ip bgp 3.0.0.0
BGP routing table entry for 3.0.0.0/8, version 628 Paths: (1 available, best #1) Advertised to peer-groups: ebgp
Advertised to non peer-group peers:
172.16.232.162 109 65000 297 701 80 172.16.233.56 from 172.16.233.56 (172.19.185.32)
Origin incomplete, localpref 100, valid, external, best, ref 2 _
Note If a prefix has not been advertised to any peer, the display shows "Not advertised to any peer."
_BGP Commands |
I show ip bgp cidr-only
Continue reading here: Show ip bgp neighbors
Was this article helpful?