show policy
Syntax
show policy <logical-system (all | logical-system-name)> <policy-name> <statistics >
Syntax (EX Series Switches)
show policy <policy-name>
Description
Display information about configured routing policies.
Options
| none | List the names of all configured routing policies. |
| logical-system (all | logical-system-name) | (Optional) Perform this operation on all logical systems or on a particular logical system. |
| policy-name | (Optional) Show the contents of the specified policy. |
| statistics | (Optional) Use in conjunction with the |
Required Privilege Level
view
Output Fields
Table 1 lists the output fields for the show policy command. Output fields are listed in the approximate order in which they appear.
Field Name |
Field Description |
|---|---|
policy-name |
Name of the policy listed. |
term |
Name of the user-defined policy term. The term name |
from |
Match condition for the policy. |
then |
Action for the policy. |
Sample Output
show policy
user@host> show policy Configured policies: __vrf-export-red-internal__ __vrf-import-red-internal__ red-export rf-test-policy multicast-scoping
show policy policy-name
user@host> show policy vrf-import-red-internal
Policy vrf-import-red-internal:
from
203.0.113.0/28 accept
203.0.113.32/28 accept
then reject
show policy statistics policy-name
user@host> show policy statistics iBGP-v4-RR-Import
Policy iBGP-v4-RR-Import:
[1243328] Term Lab-Infra:
from [1243328 0] proto BGP
[28 0] route filter:
10.11.0.0/8 orlonger
10.13.0.0/8 orlonger
then [28 0] accept
[1243300] Term External:
from [1243300 1] proto BGP
[1243296 0] community Ext-Com1 [64496:1515 ]
[1243296 0] prefix-list-filter Customer-Routes
[1243296 0] aspath AS6221
[1243296 1] route filter:
172.16.49.0/12 orlonger
172.16.50.0/12 orlonger
172.16.51.0/12 orlonger
172.16.52.0/12 orlonger
172.16.56.0/12 orlonger
172.16.60.0/12 orlonger
then [1243296 2] community + Ext-Com2 [64496:2000 ] [1243296 0] accept
[4] Term Final:
then [4 0] reject
The numbers within the brackets refer to:
-
match-count— Number of times the specific term or condition matched. -
time— Total time elapsed during evaluation of policy object.
For example [1243296 1] route filter means the route filter
matched 1243296 times. A total of 1 microsecond was spent evaluating the route
filter across all matches.
Release Information
Command introduced before Junos OS Release 7.4.
statistics option introduced in Junos OS Release 16.1 for MX Series routers.