NOTE: For single regular expressions without any spaces in them, you can use either
show ip bgp regexp or show ip bgp quote-regexp with the same results.
You must enclose all regular expression elements within quotation marks (“ element” )
when the regular expressions contain one or more spaces. To display information about
routes whose AS-path matches the specified regular expression and also has spaces
within the regular expression element:
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
Because the show ip bgp quote-regexp command accepts only one string as an argument
to the regular expression, output filtering is possible. To display information about routes
whose AS-path matches the specified regular expression with output filtering:
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
Meaning Table 45 on page 197 lists the show ip bgp quote-regexp command output fields.
Table 45: show ip bgp quote-regexp Output Fields
Field DescriptionField Name
BGP router ID of the local routerLocal router ID
Local autonomous system numberlocal AS
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.
paths
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.
distinct prefixes
Number of routes in the BGP routing table that have been inserted
into the IP routing table
paths selected for route
table installation
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.
path attribute entries
197Copyright © 2010, Juniper Networks, Inc.
Chapter 2: Monitoring BGP