Show, Clear, and Debug Command Reference

Command Hierarchies

Show Commands

show
— router router-name
policy [name | damping | prefix-list name | as-path name | community name | admin]
policy [name | sub-policy entry entry-id name subpol_name
policy [name | sub-policy entry entry-id name subpol_name entry-2 entry-id name-2 subpol_name
policy [name | sub-policy entry entry-id name subpol_name entry-2 entry-id name-2 subpol_name entry-3 entry-id name-3 subpol_name
show
— router router-name
— bgp
policy-test plcy-or-long-expr [plcy-or-expr [plcy-or-expr .. (up to 14 max)]] [family family] [rd rd] [prefix ip-prefix/ip-prefix-length] [longer] [neighbor ip-address] [display-rejects] [{detail | brief}]

Command Descriptions

Show Commands

The command outputs in the following section are examples only; actual displays may differ depending on supported functionality and user configuration.

policy

Syntax 
policy [name | prefix-list name | admin]
policy [name | damping name| prefix-list name | as-path name | as-path-group name | community name | admin] | exclusive-access
policy [name | sub-policy entry entry-id name subpol_name
policy [name | sub-policy entry entry-id name subpol_name entry-2 entry-id name-2 subpol_name
policy [name | sub-policy entry entry-id name subpol_name entry-2 entry-id name-2 subpol_name entry-3 entry-id name-3 subpol_name
Context 
show>router
Description 

This command displays configured policy statement information.

Parameters 
admin —
If the keyword admin is included, the entire policy option configuration is displayed, including any uncommitted configuration changes. This command is similar to the info command.
as-path —
If this keyword is included, the command displays configured as-path regular expressions (optionally filtered by name).
as-path-group —
If this keyword is included, the command displays configured as-path-groups, optionally filtered by name.
community —
If this keyword is included, the command displays configured community lists, optionally filtered by name.
damping —
If this keyword is included, the information about the route policy damping configurations is displayed.
entry entry-id
Displays the configuration (with parameter value substitution) of the subroutine policy called by the entry with entry-id.
exclusive-access —
Keyword.
prefix-list name
Displays the prefix lists configured in the route policy.
policy name
Displays information similar to the info command for a specific policy-statement. If a name is provided, the matching policy-statement displays. If no statement name is specified, a list of all policies statements and descriptions display.
sub-policy —
If this keyword is included, the configuration of a subroutine policy is displayed.
subpol_name
specifies the policy name (up to 64 characters long).
entry-id
Specifies the entry identifier (numeric) of the policy.
Values—
1 to 4294967295
Output 

Route Policy Output

The following table describes route policy output fields.

Table 65:  Route Policy Output Fields  

Label

Description

Policy

Displays a list of route policy names.

Description

Displays the description of each route policy.

Policies

The total number of policies configured.

The following route policy commands are displayed with different command parameter options:

  1. show router policy
  2. show router policy admin
  3. show router policy “BGP to RIP”
  4. show router policy damping
  5. show router policy “pol1” sub-pol entry 10 name “pol2”
Sample Output

The show router policy command displays all configured route policies.

A:ALA-1# show router policy 
===============================================================================
Route Policies
===============================================================================
Policy                           Description                                    
-------------------------------------------------------------------------------
Direct And Aggregate             Policy Statement ABC
-------------------------------------------------------------------------------
Policies : 
===============================================================================
A:ALA-1# 

The show router policy admin command is similar to the info command which displays information about the route policies and parameters.

A:ALA-1# show router policy admin 
    prefix-list "All-Routes"
            prefix 0.0.0.0/0 longer
            prefix 2.0.0.0/8 longer
            prefix 3.0.0.0/8 longer
            prefix 4.0.0.0/8 longer
            prefix 5.0.0.0/8 longer
            prefix 6.0.0.0/8 exact
            prefix 224.0.0.0/24 longer
    exit
...
A:ALA-1#

The show router policy name command displays information about a specific route policy.

show router policy “BGP To RIP”

description "Policy Statement For 'BGP To RIP'"
    entry 10
        description "Entry For Policy 'BGP To RIP"
        from
            protocol bgp
        exit
        to
            protocol rip
        exit
        action accept
            metric set 1
            next-hop 10.0.18.200
            tag 805
        exit
    exit
    default-action reject
A:ALA-1#

The show router policy damping command displays information about the route policy damping configurations.

A:ALA-1# show router policy damping

=============================================
Route Damping Profiles
=============================================
    damping "TEST-LOW"
        half-life 22
        max-suppress 720
        reuse 10000
        suppress 15000
    exit
    damping "TEST-HIGH"
        half-life 22
        max-suppress 720
        reuse 1000
        suppress 5000
    exit
    damping "TEST-MEDIUM"
        half-life 22
        max-suppress 720
        reuse 5000
        suppress 11000
    exit
=============================================
A:ALA-1#

The show router policy name sub-policy entry entry-id name subpol_name command displays information about the subroutine called by an entry of the route policy. In the following sample output, the term “telenet” is the value of a variable.

show router policy “BGP To RIP”

*A:Dut-B#  show router policy "pol1" sub-policy entry 10 name "pol2"
===============================================================================
pol1 entry 10 sub-policies
===============================================================================
-------------------------------------------------------------------------------
Level1 Sub-policy : pol2    Parent-policy : pol1, Parent-entry 10
-------------------------------------------------------------------------------
    entry 20
        from
            community "telenet"
        exit
    exit
===============================================================================

policy-test

Syntax 
policy-test plcy-or-long-expr [plcy-or-expr [plcy-or-expr .. (up to 14 max)]] [family family] [rd rd] [prefix ip-prefix/ip-prefix-length] [longer] [neighbor ip-address] [display-rejects] [{detail | brief}]
Context 
show>router>bgp
Description 

This command allows an operator to evaluate an existing policy or chain or policies (possibly including a logical expression) against received BGP routes to identify the routes accepted or rejected by the full evaluation of the policy, policy chain, or logical expression.

Parameters 
plcy-or-long-expr—
The name of a policy (up to 64 characters) or a policy logical expression (up to 255 characters).
plcy-or-expr—
The name of a policy (up to 64 characters) or a policy logical expression (up to 64 characters).
family—
The BGP address family.
Values—
ipv4, ipv6, vpn-ipv4, vpn-ipv6, label-ipv4, label-ipv6
rd—
The route distinguisher value in one of the following formats:
  1. ip-addr:comm-val
  2. 2byte-asnumber:ext-comm-val
  3. 4byte-asnumber:comm-val
ip-prefix/ip-prefix-length—
The IPv4 or IPv6 prefix to be evaluated.
longer—
Keyword to match prefixes with a longer prefix-length.
ip-address—
The neighbor IP address.
display-rejects—
Keyword to display routes rejected by the policy test as opposed to routes that are accepted.
detail—
Keyword to display detailed information.
brief—
Keyword to display abridged information.