show ip bgp regexp
Displays information about BGP routes whose AS path matches the specified regular expression. Regular expressions match numbers for which the specified path is a substringfor 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_. You can use output filtering on the display.
show ip bgp [ ipv4 unicast | ipv4 multicast | vpnv4 all | vpnv4 vrf vrfName |
l2vpn all | l2vpn vpls vplsName | l2vpn vpws vpwsName | route-target signaling ]
regexp pathExpression [ fields fieldOptions ] [ filter ]
- ipv4 unicastSpecifies the IPv4 unicast address family and routing table; the default option
- ipv4 multicastSpecifies the IPv4 multicast address family and routing table
- vpnv4 allSpecifies the IPv4 VPN address family and all IPv4 VPN routing and forwarding instances
- vpvn4 vrf vrfNameSpecifies the IPv4 VPN address family and only the IPv4 VPN routing and forwarding instance with the name vrfName
- l2vpn allSpecifies all VPLS instances in the L2VPN address family
- l2vpn vpls vplsNameSpecifies the VPLS instance with the name vplsName
- l2vpn vpws vpwsNameSpecifies the L2VPN (VPWS) instance with the name vpwsName
- route-target signalingDisplays information for only the route-target address family
- regexpIndicates that multiple elements can be matched
- pathExpressionRegular expression string describing the AS paths to be matched. You do not have to enclose elements containing a space within quotation marks ("one element").
Each element is either an AS number, a metacharacter, or a combination:
^ Matches the beginning of the path unless appearing as the first character within brackets; see below
[^ ] Matches any AS number except the ones specified within the brackets
{ Matches the beginning of an AS_SET
} Matches the end of an AS_SET
( Matches the start of an AS_CONFED_SET or AS_CONFED_SEQ
) Matches the end of an AS_CONFED_SET or AS_CONFED_SEQ
. Matches any single character
* Matches zero or more occurrences of the preceding character
+ Matches one or more occurrences of the preceding character
? Matches zero or one occurrence of the preceding character. To use the ? metacharacter in a regular expression, you must enter the following key sequence: Ctrl-v-?. Otherwise, the CLI considers this to be a request for assistance in completing the command, rather than understanding it as a metacharacter.
() Used with a multiplier metacharacter (*, +, ?) to specify patterns for multiple use. You can specify that a parenthesis be construed as a literal token instead of a metacharacter by immediately preceding it with a backslash:
\( matches the beginning of an AS_CONFED_SET or AS_CONFED_SEQ
\) matches the end of an AS_CONFED_SET or AS_CONFED_SEQ.
[ ] Matches any enclosed character; specifies a range of single characters
Used within brackets to specify a range of AS numbers
_ Matches a ^, a $, a comma, a space, a {, or a }. Placed on either side of a string to specify a literal and disallow substring matching. Numerals enclosed by underscores can be preceded or followed by any of the characters listed above.
| Matches characters on either side of the metacharacter; logical OR
- fieldsDisplays only the specified fields; the display order of the fields is hard-coded and not affected by the order in which you enter them
- fieldOptionsFields to be displayed, in the format
all | [ afi | aggregator | as-path | atomic-aggregate | best | clusters | communities | extended-communities | imported | intro | in-label | loc-pref | med | next-hop | next-hop-cost | origin | originator-id | out-label | peer | peer-type | rd | safi | stale | unknown-types | weight ]*
- allAll available information; not recommended, because this information for each network does not fit on a single line and is difficult to read
- afiAddress family identifier
- aggregatorAS number and IP address of aggregator
- as-pathAS path through which this route bas been advertised
- atomic-aggregateWhether the atomic aggregate attribute is present
- bestWhether this is the best route for the prefix
- clustersList of cluster IDs through which the route has been advertised
- communitiesCommunity number associated with the route
- extended-communitiesExtended community
- importedWhether the route was imported
- introIntroductory information about the state of various BGP attributes; this information is displayed only if you specify this keyword
- in-labelMPLS label for the route; the label received with incoming MPLS frames; typically, but not always, this is the label advertised to MP-BGP peers
- loc-prefLocal preference for the route
- medMultiexit discriminator for the route
- next-hopIP address of the next router that is used when forwarding a packet to the destination network
- next-hop-costWhether the indirect next hop of the route is unreachable, if not, displays IGP cost to the indirect next hop
- originOrigin of the route
- originator-idRouter ID of the router in the local AS that originated the route
- out-labelMPLS label for the route; the label sent with outgoing MPLS frames; also the label received from MP-BGP peer; typically, but not always, this is the label received from MP-BGP peers
- peerIP address of BGP peer from which route was learned
- peer-typeType of BGP peer: internal, external, or confederation
- rdRoute distinguisher
- safiSubsequent address family identifier
- staleRoute that has gone stale due to peer restart
- unknown-typesAttribute codes for unknown path attributes
- weightWeight of the route
- *Indicates that one or more parameters can be repeated multiple times in a list in the command line
- filterSee Filtering show Commands in About This Guide
Privileged Exec, User Exec
Command introduced before JUNOSe Release 7.1.0.
l2vpn and all keywords added in JUNOSe Release 7.1.0.
vpls keyword and vplsName variable added in JUNOSe Release 7.1.0.
vpws keyword and vpwsName variable added in JUNOSe Release 8.1.0.
route-target signaling keywords added in JUNOSe Release 8.2.0.