Monitoring BGP
Use the show commands in this section to monitor BGP activity. Use the baseline ip bgp command to set the baseline on all BGP statistics.
You can use the output filtering feature of the show command to include or exclude lines of output based on a text string you specify. Refer to ERX System Basics Configuration Guide, Chapter 2, Command Line Interface, for details.
Use the debug ip bgp command to get information on problems with BGP or the network.
baseline ip bgp
- Use to set the baseline on all BGP statistics as the current values.
- For example, if you issue the baseline ip bgp command, all the current values of BGP statistics become the baseline values. If the current value of the Total message sent parameter is 105, and the value goes up to 120 messages, the new value is displayed as 15.
- Example
host1#baseline ip bgpdebug ip bgp
host1#debug ip bgp
- There is no no version, but you can use the undebug ip bgp command to disable display of information previously enabled with the debug ip bgp command.
default-fields peer
- Use to specify fields that are displayed by default by a subsequently issued show ip bgp summary command.
- Use the intro keyword to enable the display of introductory information about BGP attributes.
- The order in which you specify the fields has no effect on the order in which they are displayed.
- Example
host1:pe2(config-router)#default-fields peer remote-as state messages-received messages-sent up-down-timehost1:pe2#show ip bgp summaryMessages MessagesNeighbor AS State Up/down time Sent Received1.1.1.1 100 Established 00:07:55 94 92default-fields route
- Use to specify fields that are displayed by default by any subsequently issued show ip bgp command that displays BGP routes.
- Use the intro keyword to enable the display of introductory information about BGP attributes.
- This command does not affect the output of the show ip bgp summary command.
- The order in which you specify the fields has no effect on the order in which they are displayed.
- Example
host1:pe2(config-router)#default-fields route intro next-hop med loc-pref weight as-pathhost1:pe2#show ip bgp vpnv4 allLocal BGP identifier 2.2.2.2, local AS 1006 routes (388 bytes)7 destinations (560 bytes) of which 0 have a route0 routes selected for route table installation6 path attribute entries (936 bytes)Local-RIB version 74. FIB version 74.Prefix Next-hop MED LocPrf Weight AS-path99.99.99.11/32 1.1.1.1 1 100 0 6501199.99.99.12/32 1.1.1.1 0 100 0 empty99.99.99.13/32 1.1.1.1 2 100 0 empty99.99.99.21/32 21.21.21.2 1 0 6502199.99.99.22/32 22.22.22.2 0 32768 empty99.99.99.23/32 23.23.23.2 2 32768 emptyshow ip as-path-access-list
host1#show ip as-path-access-listAS Path Access List 10:permit [200-220]permit ^114permit ^117.*225$AS Path Access List 11:deny .*AS Path Access List 20:deny [1100-1250]permit .*show ip bgp
- Use to display the BGP routing table.
- If you specify an IP address, displays the route that best matches the specified IP address.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- Field descriptions
- Learned from peer - peer from which route was learned
- Next hop IP address - IP address of the next router that is used when a packet is forwarded to the destination network
- AS path - AS path through which this route has been advertised
- Aggregator AS number - AS number of the AS that aggregated this route
- Aggregate IP address - IP address of the router that aggregated this route
- Origin - origin of the route
- MED - multiexit discriminator for the route
- LocPrf - local preference for the route
- Weight - weight of the route
- Communities - community number associated with the route
- Originator ID - router ID of the router in the local AS that originated the route
- Cluster ID list - list of cluster IDs through which the route has been advertised
host1:pe1#show ip bgpLocal BGP identifier 1.1.1.1, local AS 1002 routes (104 bytes), 3 distinct destinations (216 bytes)1 route selected for route table installation11 path attribute entries (1364 bytes)Local-RIB version 2. Processed 2 changes (0 pending)Status codes: > best, * invalid, s suppressed, d dampened, r rejected, a auto-summarizedPrefix Peer Next-hop MED LocPrf Weight Origin> 10.88.88.1/32 0.0.0.0 0.0.0.0 1 32768 IGP> 10.88.88.2/32 10.2.2.2 10.2.2.2 1 100 0 IGPhost1:pe1#show ip bgp 10.88.88.1BGP route information for prefix 10.88.88.1/32Network route (best routeAdvertised to both internal and external peersAddress Family Identifier (AFI) is ip-v4Subsequent Address Family Identifier (SAFI) is unicastNext hop IP address is 0.0.0.0 (metric 2)Multi-exit discriminator is 1Local preference is not presentWeight is 32768Origin is IGPAS path is emptyExtended communities emptyhost1:5#show ip bgp 10.66.66.66BGP route information for prefix 10.66.66.66/32Received route learned from peer 10.6.6.6Route placed in IP forwarding tableNot advertised to any peersAddress Family Identifier (AFI) is ip-v4Subsequent Address Family Identifier (SAFI) is unicastNext hop IP address is 10.6.6.6 (not reachable)Multi-exit discriminator is 1Local preference is 100Weight is 0Origin is IGPAS path is empty
- You can use the field options to display filtered information about a specified network or all networks in the BGP routing table. Only the fields that you specify are displayed, except that the Prefix field is always displayed. If you filter the display with field options, the usual introductory information about BGP attributes is displayed only if you issue the intro fields option.
- You can use the default-fields route command to specify default fields to be displayed by subsequently issued show ip bgp commands.
- Example
host1#show ip bgp fields intro peer as-pathLocal router ID 192.168.1.232, local AS 2004 paths, 4 distinct prefixes (272 bytes used)4 paths selected for route table installation1 path attribute entry (129 bytes used)Prefix Peer AS-path10.6.128.0/17 192.168.1.158 10010.15.1.1/32 192.168.1.158 10010.15.1.1/32 192.168.1.232 not present172.25.2.2/32 192.168.1.158 100172.25.2.2/32 192.168.1.232 not present172.16.1.1/32 192.168.1.232 not present172.16.2.2/32 192.168.1.232 not present192.168.1.0/24 192.168.1.158 100192.168.1.0/24 192.168.1.232 not presenthost1:5#show ip bgp fields peer next-hop next-hop-costPrefix Peer Next-hop Next-hop-cost11.11.11.11/32 3.3.3.3 3.3.3.3 Unreachable11.11.11.11/32 4.4.4.4 4.4.4.4 Unreachable22.22.22.22/32 3.3.3.3 3.3.3.3 Unreachable22.22.22.22/32 4.4.4.4 4.4.4.4 Unreachable33.33.33.33/32 3.3.3.3 3.3.3.3 Unreachable44.44.44.44/32 4.4.4.4 4.4.4.4 Unreachable55.55.55.55/32 0.0.0.0 0.0.0.0 066.66.66.66/32 6.6.6.6 6.6.6.6 Unreachable77.77.77.77/32 57.57.57.7 57.57.57.7 188.88.88.88/32 57.57.57.7 57.57.57.7 1show ip bgp advertised-routes
- Use to display the routes in the specified neighbor's or peer group's Adj-RIBs-Out table.
- For peers, the attributes displayed are those associated with the route before the application of any outbound policy.
- For peer groups, the attributes displayed are those associated with the route after the application of any outbound policy; that is, the actual advertised attributes.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- You must first enable storage of routes to the Adj-RIBs-Out tables via the no rib-out disable command or the no neighbor rib-out disable command. Otherwise, this command returns an error message.
- Field descriptions
- Local BGP identifier - BGP router ID of the local router
- routes - total number of routes stored in the BGP routing table. If several peers have advertised a route to the same prefix, all routes are included in this count.
- distinct destinations - number of routes to unique prefixes stored in the BGP routing table. If several peers have advertised a route to the same prefix, only the best route is included in this count.
- routes selected for route table installation - number of routes in the BGP routing table that have been inserted into the IP routing table
- path attribute entries - number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
- Prefix - prefix for the routing table entry
- Peer - IP address of BGP peer
- Next-hop - IP address of the next hop
- MED - multiexit discriminator for the route
- LocPrf - local preference for the route
- Weight - assigned path weight
- Origin - origin of the route
host1#show ip bgp neighbors 5.72.116.1 advertised-routesLocal BGP identifier 2.2.2.2, local AS 22220 routes (0 bytes used), 0 distinct destinations (0 bytes used)0 routes selected for route table installation0 path attribute entries (0 bytes used)Status codes: > best, * invalid, s suppressed, d dampened, r rejectedPrefix Peer Next-hop MED LocPrf Weight Origin> 0.0.0.0/0 5.72.116.1 5.72.1.1 0 IGP> 10.10.0.87/32 5.72.116.1 5.72.1.1 0 inc.> 13.13.13.13/32 5.72.116.1 5.72.1.1 0 IGP> 33.0.0.0/16 0.0.0.0 5.72.1.1 1 32768 inc.> 33.0.0.0/24 0.0.0.0 5.72.1.1 1 32768 inc.> 44.44.0.0/16 5.72.116.1 5.72.1.1 0 inc.show ip bgp aggregate-address
- Prefix - prefix of the aggregate address
- AS set - ASs in the AS-set path
- Summary only - displays a summary of aggregate address information
- Attribute map - displays the attribute maps for aggregate addresses
- Advertise map - displays the advertise maps for aggregate addresses
host1#show ip bgp aggregate-addressPrefix AS set Summary only Attribute map Advertise map12.0.0.0/8 No Yes None None158.101.0.0/16 No No None Noneshow ip bgp cidr-only
- Use to display information about routes that have nonnatural network masks.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- Field descriptions
- Local BGP identifier - BGP router ID of the local router
- routes - total number of routes stored in the BGP routing table. If several peers have advertised a route to the same prefix, all routes are included in this count.
- distinct destinations - number of routes to unique prefixes stored in the BGP routing table. If several peers have advertised a route to the same prefix, only the best route is included in this count.
- routes selected for route table installation - number of routes in the BGP routing table that have been inserted into the IP routing table
- path attribute entries - number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
- Prefix - prefix for the routing table entry
- Peer - IP address of BGP peer
- Next-hop - IP address of the next hop
- MED - multiexit discriminator for the route
- LocPrf - local preference for the route
- Weight - assigned path weight
- Origin - origin of the route
host1#show ip bgp cidr-onlyLocal BGP identifier 111.111.111.111, local AS 4440 routes (0 bytes used), 0 distinct destinations (0 bytes used)0 routes selected for route table installation0 path attribute entries (0 bytes used)Status codes: > best, * invalid, s suppressed, d dampened, r rejectedPrefix Peer Next-hop MED LocPrf Weight Origin33.0.0.0/24 5.72.1.1 5.72.1.1 1 0 inc.> 44.44.0.0/24 0.0.0.0 192.168.1.1 1 32768 inc.show ip bgp community
- Use to display all routes that are members of the specified BGP community. Does not accept regular expressions.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- Specify the community number in AA:NN format:
- AA - number that identifies the autonomous system
- NN - number that identifies the community within the autonomous system
- Local router ID - BGP router ID of the local router
- local AS - local autonomous system number
- paths - total number of routes stored in the BGP routing table. If several peers have advertised a route to the same prefix, all routes are included in this count.
- distinct prefixes - number of routes to unique prefixes stored in the BGP routing table. If several peers have advertised a route to the same prefix, only the best route is included in this count.
- paths selected for route table installation - number of routes in the BGP routing table that have been inserted into the IP routing table
- path attribute entries - number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
- Prefix - prefix for the route table entry
- Peer - IP address of BGP peer
- Next-hop - IP address of the next hop
- MED - multiexit discriminator
- CalPrf - calculated preference
- Weight - assigned path weight
- Origin - origin of the route
host1#show ip bgp community 999:999Local router ID 192.168.1.153, local AS 10040845 paths, 40845 distinct prefixes (2940840 bytes used)40845 paths selected for route table installation13651 path attribute entries (1864908 bytes used)Prefix Peer Next-hop MED CalPrf Weight Origin> 24.0.0.0/12 10.5.0.48 10.5.0.48 100 100 IGP> 24.4.252.0/22 10.5.0.48 10.5.0.48 100 100 IGP> 24.6.0.0/23 10.5.0.48 10.5.0.48 100 100 IGP> 24.6.11.0/24 10.5.0.48 10.5.0.48 100 100 IGPshow ip bgp community-list
- Use to display all routes that are members of communities on the specified BGP community list.
- Accepts regular expressions.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- Field descriptions
- Local router ID - BGP router ID of the local router
- local AS - local autonomous system number
- paths - total number of routes stored in the BGP routing table. If several peers have advertised a route to the same prefix, all routes are included in this count.
- distinct prefixes - number of routes to unique prefixes stored in the BGP routing table. If several peers have advertised a route to the same prefix, only the best route is included in this count.
- paths selected for route table installation - number of routes in the BGP routing table that have been inserted into the IP routing table
- path attribute entries - number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
- Prefix - prefix for the routing table entry
- Peer - IP address of BGP peer
- Communities - community number in AA:NN format:
- AA - number that identifies the autonomous system
- NN - number that identifies the community within the autonomous system
host1#show ip bgp community-list 1 fields peer communitiesLocal router ID 192.168.1.153, local AS 10072077 paths, 72077 distinct prefixes (5189544 bytes used)72077 paths selected for route table installation21627 path attribute entries (2957324 bytes used)Prefix Peer Communities3.0.0.0/8 10.5.0.48 777:777 888:8884.0.0.0/8 10.5.0.48 777:777 888:8884.17.106.0/24 10.5.0.48 777:777 888:8884.17.115.0/24 10.5.0.48 777:777 888:8886.0.0.0/8 10.5.0.48 777:777 888:8889.2.0.0/16 10.5.0.48 777:777 888:8889.20.0.0/17 10.5.0.48 777:777 888:88812.0.0.0/8 10.5.0.48 777:777 888:888show ip bgp dampened-paths
- Use to display information on dampened routes.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- Field descriptions
- Local router ID - IP address of the local router
- local AS - number of the local AS
- Route flap dampening - status of route flap dampening (enabled or disabled)
- Decay half-life - time (in minutes) after which a penalty is decreased. Once the route has been assigned a penalty, the penalty is decreased by half after the half-life period (which is 15 minutes by default).
- Cutoff threshold - value of the penalty for a flapping route below which the route is unsuppressed
- Reuse threshold - time (in hours:minutes:seconds) after which the path will be made available
- Maximum hold-down time - interval, in seconds, after not receiving a keepalive message that the software declares a peer dead
- route flap history - status of route flap history for route paths
- Prefix - the prefix for the IP address
- Peer - IP address of the BGP peer
- Status - status of route dampening of the route path
- Figure of Merit - a measure of the route's stability. Higher values indicate more recent route flap activity or less stability.
- Time until Reuse/Remove - time until the route is either reused (if currently suppressed) or its history entry is removed (if currently available)
host1#show ip bgp dampened-pathsLocal router ID 192.168.1.218, local AS 100Route flap dampening is enabledDecay half-life is 10 minutes while reachable, 20 minutes while unreachableCuttoff threshold is 2000, reuse threshold is 750Maximum hold-down time is 20 minutes60 paths have active route flap histories (4560 bytes used)11 paths are suppressedFigure Time untilPrefix Peer Status of Merit Reuse/Remove24.31.128.0/19 10.2.1.48 Suppressed/Reachable 2681 00:17:0024.93.128.0/19 10.2.1.48 Suppressed/Reachable 2681 00:17:0024.95.0.0/19 10.2.1.48 Suppressed/Reachable 2681 00:17:00128.192.0.0/16 10.2.1.48 Available 1997 00:15:08148.161.0.0/16 10.2.1.48 Available 1997 00:15:10164.81.0.0/16 10.2.1.48 Available 1997 00:15:11192.29.60.0/24 10.2.1.48 Available 1997 00:15:12192.58.228.0/24 10.2.1.48 Available 1997 00:15:15192.88.8.0/24 10.2.1.48 Available 1997 00:15:17192.107.253.0/24 10.2.1.48 Suppressed/Unreachable 4331 00:19:42192.195.44.0/24 10.2.1.48 Suppressed/Reachable 2923 00:19:15192.195.49.0/24 10.2.1.48 Suppressed/Reachable 2923 00:19:15192.195.50.0/24 10.2.1.48 Suppressed/Reachable 2923 00:19:15192.197.150.0/24 10.2.1.48 Available 1997 00:15:25192.222.89.0/24 10.2.1.48 Suppressed/Unreachable 2788 00:19:42204.17.195.0/24 10.2.1.48 Suppressed/Reachable 2923 00:17:20204.52.186.0/24 10.2.1.48 Available 1997 00:15:26204.68.178.0/24 10.2.1.48 Available 1000 00:19:38204.101.0.0/16 10.2.1.48 Available 1997 00:15:29204.128.227.0/24 10.2.1.48 Suppressed/Reachable 2923 00:17:16204.146.24.0/22 10.2.1.48 Available 1997 00:15:30204.146.24.0/24 10.2.1.48 Available 1997 00:15:30show ip bgp filter-list
- Use to display all routes whose AS-path matches the specified AS-path access list.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- Field descriptions
- Local router ID - BGP router ID of the local router
- local AS - local autonomous system number
- paths - total number of routes stored in the BGP routing table. If several peers have advertised a route to the same prefix, all routes are included in this count.
- distinct prefixes - number of routes to unique prefixes stored in the BGP routing table. If several peers have advertised a route to the same prefix, only the best route is included in this count.
- paths selected for route table installation - number of routes in the BGP routing table that have been inserted into the IP routing table
- path attribute entries - number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
- Prefix - prefix for the routing table entry
- Next-hop - IP address of the next hop
- MED - multiexit discriminator
- CalPrf - calculated preference
- Weight - assigned path weight
- AS path - autonomous system path
host1#show ip bgp filter-list 1Local router ID 192.168.1.153, local AS 10072080 paths, 72080 distinct prefixes (5189760 bytes used)72080 paths selected for route table installation21667 path attribute entries (2962828 bytes used)Prefix Next-hop MED CalPrf Weight AS-path> 6.0.0.0/8 10.5.0.48 100 100 11488 701 7018 7170> 12.0.0.0/8 10.5.0.48 100 100 11488 701 1740 7018> 12.1.248.0/24 10.5.0.48 100 100 11488 701 7018 13391> 12.2.6.0/24 10.5.0.48 100 100 11488 701 7018 11101> 12.2.7.0/24 10.5.0.48 100 100 11488 701 7018 11101> 12.2.76.0/24 10.5.0.48 100 100 11488 701 7018 11812> 12.2.99.0/24 10.5.0.48 100 100 11488 701 7018 10656> 12.2.109.0/24 10.5.0.48 100 100 11488 701 7018 10656> 12.2.169.0/24 10.5.0.48 100 100 11488 701 7018 11806> 12.4.114.0/24 10.5.0.48 100 100 11488 701 7018 14065> 12.4.119.0/24 10.5.0.48 100 100 11488 701 7018 14065> 12.4.175.0/24 10.5.0.48 100 100 11488 701 7018 11895> 12.4.196.0/22 10.5.0.48 100 100 11488 701 7018 12163> 12.5.48.0/21 10.5.0.48 100 100 11488 701 7018 12163> 12.5.164.0/24 10.5.0.48 100 100 11488 701 7018 11134> 12.6.42.0/23 10.5.0.48 100 100 11488 701 7018 11090show ip bgp flap-statistics
- Local BGP identifier - BGP router ID of the local router where route flap dampening is enabled
- local AS - local autonomous system number
- Route flap dampening - status of route flap dampening (enabled or disabled)
- Default decay half-life - time (in minutes) after which a penalty is decreased. Once the route has been assigned a penalty, the penalty is decreased by half after the half-life period (which is 15 minutes by default).
- Default cutoff threshold - value of the penalty for a flapping route below which the route is unsuppressed
- Default reuse threshold - time in minutes after which the path will be made available
- Default maximum hold-down time - interval, in seconds, after not receiving a keepalive message that the software declares a peer dead
- route flap history - status of route flap history for route paths
- Prefix - prefix for the routing table entry
- Peer - IP address of BGP peer
- Status - status of route dampening of the route path
- Figure of Merit - measure of the route's stability. Higher values indicate more recent route flap activity or less stability.
- Time until Reuse/Remove - time in hours:minutes:seconds until the route is either reused (if currently suppressed) or its history entry is removed (if currently available)
host1#show ip bgp flap-statisticsLocal BGP identifier 192.168.1.232, local AS 100Route flap dampening is enabledDefault decay half-life is 15 minutesDefault cutoff threshold is 2000, default reuse threshold is 750Default maximum hold-down time is 60 minutes307 paths have active route flap histories (27016 bytes used)5 paths are suppressedFigure Time untilPrefix Peer Status of Merit Reuse/Remove24.201.0.0/18 192.168.1.158 Available 925 00:58:2324.201.64.0/18 192.168.1.158 Available 925 00:58:2352.128.224.0/19 192.168.1.158 Available 750 00:54:1261.8.0.0/19 192.168.1.158 Available 993 00:59:5361.8.30.0/24 192.168.1.158 Available 993 00:59:5362.229.73.0/24 192.168.1.158 Unreachable 925 00:58:2363.69.150.0/24 192.168.1.158 Available 750 00:54:12show ip bgp inconsistent-as
- Use to display information about routes that have inconsistent AS-paths.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- Field descriptions
- Local BGP identifier - BGP router ID of the local router
- local AS - local autonomous system number
- routes - total number of routes stored in the BGP routing table. If several peers have advertised a route to the same prefix, all routes are included in this count.
- distinct destinations - number of routes to unique prefixes stored in the BGP routing table. If several peers have advertised a route to the same prefix, only the best route is included in this count.
- routes selected for route table installation - number of routes in the BGP routing table that have been inserted into the IP routing table
- path attribute entries - number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
- Prefix - prefix for the routing table entry
- Next-hop - IP address of the next hop
- MED - multiexit discriminator for the route
- LocPrf - local preference for the route
- Weight - assigned path weight
- Origin - origin of the route
- AS-path - AS-path through which this route bas been advertised
host1#show ip bgp inconsistent-asLocal BGP identifier 192.168.1.10, local AS 1230 routes (0 bytes used), 0 distinct destinations (0 bytes used)0 routes selected for route table installation0 path attribute entries (0 bytes used)Status codes: > best, * invalid, s suppressed, d dampened, r rejectedPrefix Next-hop MED LocPrf Weight AS-path> 4.0.0.0/8 0.0.0.0 1 32768 empty4.0.0.0/8 192.168.1.1 0 11488 701 1show ip bgp longer-prefixes
- Use the longer-prefixes option to display all routes with a prefix that is equal to or more specific than the specified prefix.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- Field descriptions
- Local router ID - BGP router ID of the local router
- local AS - local autonomous system number
- paths - total number of routes stored in the BGP routing table. If several peers have advertised a route to the same prefix, all routes are included in this count.
- distinct prefixes - number of routes to unique prefixes stored in the BGP routing table. If several peers have advertised a route to the same prefix, only the best route is included in this count.
- paths selected for route table installation - number of routes in the BGP routing table that have been inserted into the IP routing table
- path attribute entries - number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
- Prefix - prefix for the routing table entry
- Peer - IP address of BGP peer
- Next-hop - IP address of the next hop
- MED - multiexit discriminator
- CalPrf - calculated preference
- Weight - assigned path weight
- Origin - origin of the route
host1#show ip bgp 12.2.0.0 255.255.0.0 longer-prefixesLocal router ID 192.168.1.153, local AS 10072074 paths, 72074 distinct prefixes (5189328 bytes used)72074 paths selected for route table installation21685 path attribute entries (2965327 bytes used)Prefix Peer Next-hop MED CalPrf Weight Origin> 12.2.6.0/24 10.5.0.48 10.5.0.48 100 100 IGP> 12.2.7.0/24 10.5.0.48 10.5.0.48 100 100 IGP> 12.2.76.0/24 10.5.0.48 10.5.0.48 100 100 IGP> 12.2.88.0/22 10.5.0.48 10.5.0.48 100 100 IGP> 12.2.97.0/24 10.5.0.48 10.5.0.48 100 100 IGP> 12.2.99.0/24 10.5.0.48 10.5.0.48 100 100 IGP> 12.2.109.0/24 10.5.0.48 10.5.0.48 100 100 IGP> 12.2.169.0/24 10.5.0.48 10.5.0.48 100 100 IGPshow ip bgp neighbors
- BGP neighbor ID - BGP identifier of the BGP neighbor
- remote AS - remote AS of the BGP neighbor
- Description - textual description of the BGP neighbor
- Member of peer group - name of the peer group of which this BGP neighbor is a member
- Remote router ID - router ID of the remote router
- negotiated BGP version - BGP version being used to communicate with the neighbor
- Administrative status - desired state of the peer connection
- Connection state - current state of the BGP connection
- Connection has been established - time that TCP connection was established
- Reason for last reset - reason for last reset of the BGP session
- TCP error code - TCP connection error type
- Default originate - status of default originate (enabled or disabled)
- EBGP multi-hop - status of EBGP multihop (enabled or disabled)
- Next hop self - status of next-hop self (enabled or disabled)
- Route reflector status - identifies the neighbor as a route-reflector client
- Neighbor weight - weight of routes from the BGP neighbor
- Incoming update distribute list - distribute list for incoming routes, if configured
- Outgoing update distribute list - distribute list for outgoing routes, if configured
- Incoming update filter list - update filter list for incoming routes, if configured
- Outgoing update filter list - update filter list for outgoing route, if configured
- Weight filter list - weight filter list for routes, if configured
- Incoming route map - incoming route map, if configured
- Outgoing route map - outgoing route map, if configured
- Connect retry interval - time between a BGP peer's attempts to reestablish a connection to the neighbor
- Minimum route advertisement interval - minimum time between route advertisements
- Minimum AS origination interval - minimum time between advertisement of changes within the speaker's AS
- Configured keep-alive interval - frequency of keep-alive messages generated
- Negotiated keepalive interval - negotiated frequency of keep-alive messages generated
- Configured hold time - configured maximum time allowed between received messages
- Negotiated hold time - negotiated maximum time allowed between received messages
- Configured update source IP address - IP address used when sending update messages
- Local IP address - local IP address used for TCP communication to this peer
- Local port - local TCP port number used for TCP communication to this peer
- Remote IP address - remote IP address used for TCP communication to this peer
- Remote port - remote IP address used for TCP communication to this peer
- Total messages sent - total BGP messages sent to this neighbor
- Total messages received - total BGP messages received from this neighbor
- Total update messages sent - total BGP update messages sent to this neighbor
- Total update messages received - total BGP update messages received from this neighbor
- Time since last update message was received - time since last BGP update message was received from this neighbor
- Address Family dependent capabilities - lists type of ORF send and receive capability per address family and whether it is advertised (configured) or received
- Maximum number of ORF entries - limit of ORF entries that will be accepted from the neighbor
host1#show ip bgp neighborsBGP neighbor ID 10.2.1.48, remote AS 11488 (external peer)Remote router ID is 172.31.1.48, negotiated BGP version is 4Administrative status is Start, connection state is EstablishedReason for last reset was tcp connection errorTCP error code 60 (Connection timed out)Connection has been established 1 time, up for 0 17:42:31Options:Default originate is disabledEBGP multi-hop is enabledNext hop self is disabledsecondsPolicy:Neighbor weight is 100Timers:Connect retry interval is 120 secondsMinimum route advertisement interval is 30 secondsMinimum AS origination interval is 10 secondsConfigured keep-alive interval is 30 seconds, negotiated 30secondsConfigured hold time is 90 seconds, negotiated 90TCP connection:Local IP address is 192.168.1.218, local port is 1024Remote IP address is 10.2.1.48, remote port is 179Statistics:Total of 4100 messages sent, 44913 messages received2053 update messages sent, 42785 update messages received0 00:00:17 since last update message was receivedshow ip bgp neighbors dampened-routes
- Use to display information about routes with a dampening history for the specified BGP neighbor.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- Field descriptions
- Local BGP identifier - BGP router ID of the local router
- routes - total number of routes stored in the BGP routing table. If several peers have advertised a route to the same prefix, all routes are included in this count.
- distinct destinations - number of routes to unique prefixes stored in the BGP routing table. If several peers have advertised a route to the same prefix, only the best route is included in this count.
- routes selected for route table installation - number of routes in the BGP routing table that have been inserted into the IP routing table
- path attribute entries - number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
- Prefix - prefix for the routing table entry
- Peer - IP address of BGP peer
- Next-hop - IP address of the next hop
- MED - multiexit discriminator for the route
- LocPrf - local preference for the route
- Weight - assigned path weight
- Origin - origin of the route
host1#show ip bgp neighbors 192.168.1.158 dampened-routesLocal BGP identifier 192.168.1.232, local AS 100120 routes (5760 bytes used), 94 distinct destinations (9024 bytes used)67 routes selected for route table installation23 path attribute entries (3450 bytes used)Status codes: > best, * invalid, s suppressed, d dampened, r rejectedPrefix Peer Next-hop MED LocPrf Weight Origind12.8.12.0/24 192.168.1.158 192.168.1.1 0 IGPd24.48.12.0/24 192.168.1.158 192.168.1.1 0 IGPd24.72.12.0/24 192.168.1.158 192.168.1.1 0 inc.d24.116.12.0/23 192.168.1.158 192.168.1.1 0 IGPd24.143.12.0/24 192.168.1.158 192.168.1.1 0 IGPd24.154.12.0/24 192.168.1.158 192.168.1.1 0 inc.d24.216.12.0/24 192.168.1.158 192.168.1.1 0 IGPd24.240.12.0/24 192.168.1.158 192.168.1.1 0 IGPd24.244.12.0/22 192.168.1.158 192.168.1.1 0 IGPd24.246.12.0/22 192.168.1.158 192.168.1.1 0 IGPd61.0.12.0/24 192.168.1.158 192.168.1.1 0 IGPd61.11.12.0/24 192.168.1.158 192.168.1.1 0 IGPd62.74.12.0/22 192.168.1.158 192.168.1.1 0 IGPd62.76.12.0/22 192.168.1.158 192.168.1.1 0 IGPd63.65.12.0/24 192.168.1.158 192.168.1.1 0 inc.d63.73.12.0/24 192.168.1.158 192.168.1.1 0 IGPshow ip bgp neighbors paths
- Use to display path information for the specified BGP neighbor.
- This command displays only the most common path attributes. BGP internally maintains additional attributes that are not displayed—for example, the MED, local preference, and communities attributes.
- Field descriptions
- Address - hexadecimal number that uniquely identifies the path attributes
- Refcount - number of routes that share the path attributes
- Origin - value of the origin path attribute
- Next-hop - value of the next-hop path attribute
- AS-path - value of the AS-path attribute
host1#show ip bgp neighbors 1.02.3.4 pathsAddress Refcount Origin Next-hop AS-path0xC384BD0 1 IGP 192.168.1.1 11488 701 2853 5515 7640xC384C40 1 IGP 192.168.1.1 11488 701 41830xC384CB0 1 IGP 192.168.1.1 11488 701 1239 1833 1833 1833 1299 83080xC384D20 1 IGP 192.168.1.1 11488 701 6453 7860xC384D90 1 IGP 192.168.1.1 11488 701 6453 1103 11030xC384E00 1 IGP 192.168.1.1 11488 701 6762 9116 9116 9116 6888 68880xC384E70 1 IGP 192.168.1.1 11488 701 6453 8297 67580xC384EE0 1 IGP 192.168.1.1 11488 701 5511 32150xC384F50 1 IGP 192.168.1.1 11488 701 3561 5683 55510xC384FC0 1 IGP 192.168.1.1 11488 701 1239 1755 1273 8793 8793 87930xC385030 1 IGP 192.168.1.1 11488 701 5705 5693show ip bgp neighbors received prefix-filter
- seq - sequence number of the entry in the prefix list
- permit, deny - condition statement for addresses matching the listed address
host1#show ip bgp neighbors 192.168.1.158 received prefix-filterip prefix-list filter 192.168.1.158 for address family ipv4:unicastseq 5 permit 10.1.1.1/32seq 10 permit 10.1.1.2/32seq 15 permit 10.1.1.3/32show ip bgp neighbors received-routes
- Use to display routes originating from the specified BGP neighbor before inbound policy is applied.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- Field descriptions
- Prefix - prefix for the routing table entry
- Peer - IP address of BGP peer
- Next-hop - IP address of the next hop
- MED - multiexit discriminator for the route
- LocPrf - local preference for the route
- Weight - assigned path weight
- Origin - origin of the route
host1#show ip bgp neighbor 192.168.1.158 received-routesLocal BGP identifier 111.111.111.111, local AS 4440 routes (0 bytes used), 0 distinct destinations (0 bytes used)0 routes selected for route table installation0 path attribute entries (0 bytes used)Status codes: > best, * invalid, s suppressed, d dampened, r rejectedPrefix Peer Next-hop MED LocPrf Weight Origin>0.0.0.0/0 192.168.1.158 192.168.1.158 0 IGP>13.13.13.13/32 192.168.1.158 192.168.1.158 0 0 IGPshow ip bgp neighbors routes
- Use to display, after inbound policy is applied, all routes that originate from the specified neighbor.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
- Field descriptions
- Local router ID - BGP router ID of the local router
- local AS - local autonomous system number
- paths - total number of routes stored in the BGP routing table. If several peers have advertised a route to the same prefix, all routes are included in this count.`
- distinct prefixes - number of routes to unique prefixes stored in the BGP routing table. If several peers have advertised a route to the same prefix, only the best route is included in this count.
- paths selected for route table installation - number of routes in the BGP routing table that have been inserted into the IP routing table
- path attribute entries - number of distinct path attributes stored in BGP's internal path attributes table. If BGP receives two routes for different prefixes but with identical path attributes, BGP will create only one entry in its internal path attribute table and share it between the two routes to conserve memory.
- Prefix - prefix for the routing table entry
- Peer - IP address of BGP peer
- Next-hop - IP address of the next hop
- MED - multiexit discriminator
- CalPrf - calculated preference
- Weight - assigned path weight
- Origin - origin of the route
host1#show ip bgp neighbors 10.5.0.48 routesLocal router ID 192.168.1.153, local AS 10072082 paths, 72082 distinct prefixes (5189904 bytes used)72082 paths selected for route table installation21695 path attribute entries (2966686 bytes used)Prefix Peer Next-hop MED CalPrf Weight Origin> 3.0.0.0/8 10.5.0.48 10.5.0.48 100 100 IGP> 4.0.0.0/8 10.5.0.48 10.5.0.48 100 100 IGP> 4.17.106.0/24 10.5.0.48 10.5.0.48 100 100 IGP> 4.17.115.0/24 10.5.0.48 10.5.0.48 100 100 IGP> 6.0.0.0/8 10.5.0.48 10.5.0.48 100 100 IGP> 9.2.0.0/16 10.5.0.48 10.5.0.48 100 100 IGP> 9.20.0.0/17 10.5.0.48 10.5.0.48 100 100 IGP> 12.0.0.0/8 10.5.0.48 10.5.0.48 100 100 IGP> 12.0.48.0/20 10.5.0.48 10.5.0.48 100 100 IGP> 12.1.248.0/24 10.5.0.48 10.5.0.48 100 100 IGP> 12.2.6.0/24 10.5.0.48 10.5.0.48 100 100 IGP> 12.2.7.0/24 10.5.0.48 10.5.0.48 100 100 IGP> 12.2.76.0/24 10.5.0.48 10.5.0.48 100 100 IGPshow ip bgp network
host1#show ip bgp network192.168.1.0/24192.168.2.0/24192.168.10.0/24show ip bgp next-hops
- Use to display information about BGP next hops.
- Specify all indirect next hops or a particular indirect next hop.
- Example
host1:3#show ip bgp next-hopsIndirect next-hop 4.4.4.4Reachable (metric 2)Direct next-hop atm2/0.34 (34.34.34.4)Reference count is 3Indirect next-hop 5.5.5.5Reachable (metric 2)Direct next-hop atm2/0.35 (35.35.35.5)Reference count is 3Indirect next-hop 6.6.6.6Reachable (metric 3)Direct next-hop atm2/0.34 (34.34.34.4)atm2/0.35 (35.35.35.5)Reference count is 3Indirect next-hop 13.13.13.1Not reachableReference count is 2show ip bgp paths
- Use to display information about BGP paths.
- This command displays only the most common path attributes. BGP internally maintains additional attributes that are not displayed—for example, the MED, local preference, and communities attributes.
- Field descriptions
- Address - hexadecimal number that uniquely identifies the path attributes
- Refcount - number of routes that share the path attributes
- Origin - value of the origin path attribute
- Next-hop - value of the next-hop path attribute
- AS-path - value of the AS-path attribute
host1#show ip bgp pathsAddress Refcount Origin Next-hop AS-path0xC384BD0 1 IGP 192.168.1.1 11488 701 2853 5515 7640xC384C40 1 IGP 192.168.1.1 11488 701 41830xC384CB0 1 IGP 192.168.1.1 11488 701 1239 1833 1833 1833 1299 83080xC384D20 1 IGP 192.168.1.1 11488 701 6453 7860xC384D90 1 IGP 192.168.1.1 11488 701 6453 1103 11030xC384E00 1 IGP 192.168.1.1 11488 701 6762 9116 9116 9116 6888 68880xC384E70 1 IGP 192.168.1.1 11488 701 6453 8297 67580xC384EE0 1 IGP 192.168.1.1 11488 701 5511 32150xC384F50 1 IGP 192.168.1.1 11488 701 3561 5683 55510xC384FC0 1 IGP 192.168.1.1 11488 701 1239 1755 1273 8793 8793 87930xC385030 1 IGP 192.168.1.1 11488 701 5705 5693show ip bgp peer-group
- BGP peer group - name of a BGP peer group
- remote AS - number of the remote AS
- Description - textual description of the BGP peer group
- Members - IP addresses of the members of the BGP peer group
- Default originate - status of default origination of the BGP peer group
- EBGP multi-hop - status of EBGP multihop for the peer group
- Next hop self - status of next-hop self information for the peer group
- Peers are route reflector clients - BGP peer group is configured as a route reflector. This field does not appear when route reflectors are not configured.
- weight - neighbor weights assigned to BGP peer groups
- Incoming update distribute list - distribute lists for incoming routes, if configured
- Outgoing update distribute list - distribute list for outgoing routes, if configured
- Incoming update filter list - filter list for incoming routes, if configured
- Outgoing update filter list - filter list for outgoing routes, if configured
- Weight filter list - weight filter list for routes, if configured
- Incoming route map - incoming route map, if configured
- Outgoing route map - outgoing route map, if configured
- Minimum route advertisement interval - minimum time between route advertisements
- Configured update source IP address - IP address used when sending update messages
host1#show ip bgp peer-groupBGP peer group leftcoastMembers: 10.1.1.2 10.2.2.2 10.3.3.2Options:Default originate is disabledEBGP multi-hop is disabledNext hop self is disabledSend community is disabledPrivate AS number stripping is disabledMaximum update message size is 1024 octetsPolicy:Neighbor weight is 500Timers:Minimum route advertisement interval is 30 secondsshow ip bgp quote-regexp
- Use to display information about BGP routes whose AS-path matches the specified regular expression.
- Use with only a single regular expression element.
- You can use output filtering.
- You must enclose any elements containing a space within quotation marks ("element").
- Regular expressions match numbers for which the specified path is a substring—for example, if you specify 20, 200 matches because 20 is a substring of 200. You can disallow substring matching by using the underscore (_) metacharacter to constrain matching to the specified pattern, for example, _20_.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
show ip bgp regexp
- Use to display information about BGP routes whose AS-path matches the specified regular expression.
- Use with one or more regular expression elements.
- You cannot use output filtering.
- You do not have to enclose elements containing a space within quotation marks.
- Regular expressions match numbers for which the specified path is a substring—for example, if you specify 20, 200 matches because 20 is a substring of 200. You can disallow substring matching by using the underscore (_) metacharacter to constrain matching to the specified pattern, for example, _20_.
- Reports whether the indirect next hop of a route is unreachable; if not, displays the IGP cost to the indirect next hop.
Examples for regexp and quote-regexp
In many cases, you can use either show ip bgp regexp or show ip bgp quote-regexp with the same results. For example, to show all routes whose AS-path starts with 200 you can use either command as follows:
host1#show ip bgp reg ^200Local router ID 192.168.1.232, local AS 1006 paths, 3 distinct prefixes (324 bytes used)3 paths selected for route table installation7 path attribute entries (872 bytes used)Prefix Next-hop MED CalPrf Weight AS-path10.99.1.2/32 10.1.1.2 100 100 20010.99.1.3/32 10.1.1.2 100 100 200 1010.99.1.4/32 10.1.1.2 100 100 200 10 20host1#show ip bgp quote-regexp ^200Local router ID 192.168.1.232, local AS 1006 paths, 3 distinct prefixes (324 bytes used)3 paths selected for route table installation7 path attribute entries (872 bytes used)Prefix Next-hop MED CalPrf Weight AS-path10.99.1.2/32 10.1.1.2 100 100 20010.99.1.3/32 10.1.1.2 100 100 200 1010.99.1.4/32 10.1.1.2 100 100 200 10 20If the regular expression contains one or more spaces, you must place quotation marks around the expression in the show ip bgp quote-regexp command but not in the show ip bgp regexp command. For example, to show all routes whose AS-path contains AS number 10 followed immediately by AS number 20:
host1#show ip bgp regexp 10 20Local router ID 192.168.1.232, local AS 1006 paths, 3 distinct prefixes (324 bytes used)3 paths selected for route table installation7 path attribute entries (872 bytes used)Prefix Next-hop MED CalPrf Weight AS-path10.99.1.4/32 10.1.1.2 100 100 200 10 20host1#show ip bgp quote-regexp 10 20^% Invalid input detected at '^' marker.host1#show ip bgp quote-regexp "10 20"Local router ID 192.168.1.232, local AS 1006 paths, 3 distinct prefixes (324 bytes used)3 paths selected for route table installation7 path attribute entries (872 bytes used)Prefix Next-hop MED CalPrf Weight AS-path10.99.1.4/32 10.1.1.2 100 100 200 10 20The show ip bgp regexp command accepts multiple strings as arguments. If you try to apply output filtering, the command interprets the filter information as a regular expression and fails:
host1#show ip bgp regexp ^200 | begin Prefix% invalid regular expressionBecause the show ip bgp quote-regexp command accepts only one string as an argument to the regular expression, output filtering is possible:
host1#show ip bgp quote-regexp ^200 | begin PrefixPrefix Next-hop MED CalPrf Weight AS-path10.99.1.2/32 10.1.1.2 100 100 20010.99.1.3/32 10.1.1.2 100 100 200 1010.99.1.4/32 10.1.1.2 100 100 200 10 20show ip bgp summary
- Use to summarize the status of all BGP neighbors.
- You can use the field options to display filtered information about BGP neighbors. If you filter the display with field options, the usual introductory information about BGP attributes is displayed only if you issue the intro fields option.
- You can use the default-fields peer command to specify default fields to be displayed by subsequently issued show ip bgp summary commands.
- Field descriptions
- Local router ID - router ID of the local router
- Local AS - AS number of local router
- Default local preference - default value for local preference
- IGP synchronization - indicates whether synchronization is enabled or disabled
- Default originate - indicates whether network 0.0.0.0 is redistributed into BGP
- Always compare MED - status of always compare MED
- Route dampening - status of route dampening
- Router is a route reflector - indicates whether the router has been configured as a route reflector
- Cluster ID - cluster IDs
- Client-to-client reflection - whether client-to-client reflection is configured
- Confederation ID - confederation ID
- Confederation peers - confederation peers
- Neighbor - BGP neighbors
- AS - AS number of the peer
- Ver. - negotiated BGP version number
- State - state of the connection
- Up/down time - time the connection has been up or down
- Messages sent - number of messages sent to peer
- Messages received - number of messages received from peer
host1#show ip bgp summaryLocal router ID 192.168.1.218, local AS 100Default local preference is 100IGP synchronization is enabledDefault originate is disabledAlways compare MED is disabledRoute dampening is disabledMessages MessagesNeighbor AS Ver. State Up/down time Sent Received10.2.1.48 11488 4 Established 0 17:42:57 4102 44926192.168.1.106 200 4 Established 0 17:42:03 2364 2127show ip community-list
host1#show ip community-listCommunity List 1:permit 752877569 (11488:1)permit 752877570 (11488:2)permit 752877571 (11488:3)permit 752877572 (11488:4)Community List 2:permit 4294967043 (local-as)undebug ip bgp
- Use to disable the display of information on BGP logs that was previously enabled with the debug ip bgp command.
- Example
host1#undebug ip bgp