[Contents] [Prev] [Next] [Index] [Report an Error]

Monitoring BGP

Use the show commands in this section to monitor BGP activity.

Note: The E120 router and E320 router output for monitor and show commands is identical to output from other E-series routers, except that the E120 and E320 router output also includes information about the adapter identifier in the interface specifier (slot/adapter/port).

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. See JUNOSe System Basics Configuration Guide, for details.

Use the debug ip bgp command to get information about problems with BGP or the network.

baseline ip bgp

debug ip bgp

default-fields peer

default-fields route

show ip as-path-access-list

show ip bgp

show bgp ipv6

show ip bgp advertised-routes

show bgp ipv6 advertised-routes

show ip bgp aggregate-address

show bgp ipv6 aggregate-address

show ip bgp cidr-only

show ip bgp community

show bgp ipv6 community

show ip bgp community-list

show bgp ipv6 community-list

show ip bgp dampened-paths

show bgp ipv6 dampened-paths

show ip bgp filter-list

show bgp ipv6 filter-list

show ip bgp flap-statistics

show bgp ipv6 flap-statistics

show ip bgp inconsistent-as

show bgp ipv6 inconsistent-as

show ip bgp

show bgp ipv6

show ip bgp neighbors

show bgp ipv6 neighbors

show ip bgp neighbors dampened-routes

show bgp ipv6 neighbors dampened-routes

show ip bgp neighbors paths

show bgp ipv6 neighbors paths

show ip bgp neighbors received prefix-filter

show ip bgp neighbors received-routes

show bgp ipv6 neighbors received-routes

show ip bgp neighbors routes

show bgp ipv6 neighbors routes

show ip bgp network

show bgp ipv6 network

show ip bgp next-hops

show bgp ipv6 next-hops

show ip bgp paths

show bgp ipv6 paths

show ip bgp peer-group

show bgp ipv6 peer-group

show ip bgp quote-regexp

show bgp ipv6 quote-regexp

show ip bgp regexp

show bgp ipv6 regexp

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 regexp ^200
Local router ID 192.168.1.232, local AS 100
  6 paths, 3 distinct prefixes (324 bytes used)
  3 paths selected for route table installation
  7 path attribute entries (872 bytes used)

Prefix        Next-hop  MED  CalPrf  Weight  AS-path
10.99.1.2/32  10.1.1.2       100     100     200
10.99.1.3/32  10.1.1.2       100     100     200 10
10.99.1.4/32  10.1.1.2       100     100     200 10 20

host1#show ip bgp quote-regexp ^200
Local router ID 192.168.1.232, local AS 100
  6 paths, 3 distinct prefixes (324 bytes used)
  3 paths selected for route table installation
  7 path attribute entries (872 bytes used)

Prefix        Next-hop  MED  CalPrf  Weight  AS-path
10.99.1.2/32  10.1.1.2       100     100     200
10.99.1.3/32  10.1.1.2       100     100     200 10
10.99.1.4/32  10.1.1.2       100     100     200 10 20

If 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 20
Local router ID 192.168.1.232, local AS 100
  6 paths, 3 distinct prefixes (324 bytes used)
  3 paths selected for route table installation
  7 path attribute entries (872 bytes used)

Prefix         Next-hop   MED   CalPrf  Weight  AS-path
10.99.1.4/32   10.1.1.2         100     100     200 10 20

host1#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 100
  6 paths, 3 distinct prefixes (324 bytes used)
  3 paths selected for route table installation
  7 path attribute entries (872 bytes used)

Prefix         Next-hop   MED  CalPrf  Weight  AS-path
10.99.1.4/32   10.1.1.2        100     100     200 10 20

The 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 expression

Because 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 Prefix
Prefix         Next-hop   MED  CalPrf  Weight  AS-path
10.99.1.2/32   10.1.1.2        100     100     200
10.99.1.3/32   10.1.1.2        100     100     200 10
10.99.1.4/32   10.1.1.2        100     100     200 10 20


show ip bgp summary

show bgp ipv6 summary

show ip community-list

undebug ip bgp

 


[Contents] [Prev] [Next] [Index] [Report an Error]