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.
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 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. To display information about routes whose AS-path matches the specified
regular expression with output filtering:
host1#show ip bgp regexp ^200 | begin Prefix
% invalid regular expression
Meaning Table 46 on page 199 lists the show ip bgp regexp command output fields.
Table 46: show ip bgp 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
Prefix for the routing table entryPrefix
IP address of the next router that is used when a packet is forwarded
to the destination network
Next hop IP address
199Copyright © 2010, Juniper Networks, Inc.
Chapter 2: Monitoring BGP