Guest

Cisco ASR 1000 Series Aggregation Services Routers

Troubleshooting Guide, Cisco IOS XE Release 3S (Cisco ASR 1000)

  • Viewing Options

  • PDF (1.3 MB)
  • Feedback
Conditional Debugging

Conditional Debugging

The Conditional Debugging feature allows you to selectively enable debugging and logging for the specific features based on the set of conditions you define.

This module provides information about how to use the Conditional Debugging feature on a Cisco ASR 1000 platform.


Note


Do not perform the conditional debugging for your feature without the support of the Cisco Technical Assistance Center (TAC).

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.

Information About Conditional Debugging

The Conditional Debugging feature allows you to filter out the debug information displayed based on the interface and conditions you specify. This feature is useful in systems where a large number of features are supported, and operates simultaneously across layered stacks spanning from control plane to data plane. The control plane deals with the configurations defined, and the data plane deals with the packet flow. Depending on where you want to see the logs, you can either enable control plane or data plane.

The Conditional Debugging feature reduces the performance impact caused by a given feature's debug output. It allows the feature to be more consistent in how they configure and present the debug output.

Restrictions for Conditional Debugging

When troubleshooting a problem, you have to provide a specific debug statement rather than a broad debug command. Providing a broad debug command consumes a lot of system resources and impacts the system performance.

Configuring Conditional Debugging

Before You Begin

You need to understand these sequence of steps before you start conditional debugging on your system:

  • First, define a set of conditions. The common conditions examples are, interface, access list, IP address, and so on.
  • Secondly, enable conditional debugging for the specific set of features.
  • Finally, start the conditional debug on your system.

To configure the Conditional Debugging feature, perform the following procedure.

SUMMARY STEPS

    1.    debug platform condition [interface interface ]{[ mpls | layer2 | access-list access-list name ] | [ipv4 ipv4-address/subnet-mask | ipv6 ipv6-address/subnet-mask] | [ingress | egress ] }

    2.    debug platform condition feature feature name [ control plane | data plane ] [ submode ] [ level {error | info | verbose | warning}]

    3.    debug platform condition [ start | stop ]


DETAILED STEPS
     Command or ActionPurpose
    Step 1 debug platform condition [interface interface ]{[ mpls | layer2 | access-list access-list name ] | [ipv4 ipv4-address/subnet-mask | ipv6 ipv6-address/subnet-mask] | [ingress | egress ] }


    Example:
    Router# debug platform condition interface gigabitEthernet 0/0/1 ipv4 2.2.2.2/24 ingress
     

    Defines the conditions applied to the specific features.

    The access list and IP address are mutually exclusive. If neither access list nor IP address is specified, all the packets are marked for debugging or packet trace.

    If you do not know what is causing the problem, use the packet trace feature to inspect and narrow down to the specific condition.

    You cannot modify an applied debug condition. Undo the command by using its no form.

     
    Step 2 debug platform condition feature feature name [ control plane | data plane ] [ submode ] [ level {error | info | verbose | warning}]


    Example:
    Router# debug platform condition feature ipsec dataplane submode cce level verbose
     

    Enables conditional debug for the feature you specify.

    If you do not specify either control plane or data plane, the feature debug is applied to both.

    (Optional) You can specify the submodes in any order. A submode allows you to drill down and debug a specific feature functionality or event.

    The level keyword specifies the debug information level. If you do not specify the level, it defaults to info.

    Note   

    The options available will vary according to the feature and keyword you select.

     
    Step 3 debug platform condition [ start | stop ]


    Example:
    Router# debug platform condition start
     

    Starts conditional debugging on your system.

     

    Configuration Examples for Conditional Debugging

    Example: Configuring Conditional Debugging

    The following example shows how to enable debug for packets matching access list 100 and destination IPv4 address 10.1.1.1 on interface Gi0/0/1, and to enable conditional debug for the CEF-MPLS feature:

    Router# access-list 100 permit ip any 10.1.1.1
    Router# debug platform condition interface Gi0/0/1 access-list 100
    Router# debug platform condition feature cef-mpls datapath level info
    Router# debug platform condition start 
    		

    The following example shows how to enable debug for packets matching access list 2700, matching mpls packets with a label of 16, on interface Gi0/0/1, and to enable conditional debug for the CEF-MPLS feature:

    Router# access-list 2700 permit any 16 any any
    Router# debug platform condition interface Gi0/0/1 access-list 2700
    Router# debug platform condition feature cef-mpls datapath
    Router# debug platform condition start 
    		

    The following example shows how to enable debug for packets matching access list 700 that matches the specified MAC address on interface Gi0/0/1 efp-id 100, and to enable conditional debug for the EVC feature:

    Router# access-list 700 permit 0000.0001.0002 0000.0000.0000
    Router# debug platform condition interface Gi0/0/1 efp-id 100 access-list 700
    Router# debug platform feature evc datapath
    Router# debug platform condition start 
    		

    Example: Verifying Conditional Debugging Information

    The following is a sample configuration of the show platform condition command :

    Router# show platform condition
     
    Conditional Debug Global State: Start
     
    Conditions                                                          Direction
    ----------------------------------------------------------------------|---------
    VoIP-Null0                               & IPV4 [2.2.2.2/24]         both
    LI-Null0                                 & IPV4 [2.2.2.2/24]         both
    GigabitEthernet0                         & IPV4 [2.2.2.2/24]         both
    LIIN0                                    & IPV4 [2.2.2.2/24]         both
    GigabitEthernet0/0/0                     & IPV4 [2.2.2.2/24]         both
    GigabitEthernet0/0/1                     & IPV4 [2.2.2.2/24]         both
    GigabitEthernet0/1/0                     & IPV4 [2.2.2.2/24]         both
    GigabitEthernet0/1/1                     & IPV4 [2.2.2.2/24]         both
    GigabitEthernet0/3/0                     & IPV4 [2.2.2.2/24]         both
    GigabitEthernet0/3/1                     & IPV4 [2.2.2.2/24]         both
    GigabitEthernet0/3/6                     & IPV4 [2.2.2.2/24]         both
    GigabitEthernet0/3/7                     & IPV4 [2.2.2.2/24]         both
    Loopback1                                & IPV4 [2.2.2.2/24]         both
    Overlay10                                & IPV4 [2.2.2.2/24]         both
    Overlay30                                & IPV4 [2.2.2.2/24]         both
    GigabitEthernet0/0/4.20                  & IPV4 [2.2.2.2/24]         both
    Internal-RP                              & IPV4 [2.2.2.2/24]         both
    Internal-Recycle                         & IPV4 [2.2.2.2/24]         both
    GigabitEthernet0/0/2.EFP100              & IPV4 [2.2.2.2/24]         both
    
    


    Note


    Use the clear debug platform condition all command to remove the debug conditions applied to the platform.


    Additional References

    Related Documents

    Related Topic

    Document Title

    Cisco IOS commands

    Cisco IOS Master Commands List, All Releases

    QoS commands

    Cisco IOS QoS Command Reference

    Technical Assistance

    Description

    Link

    The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

    http:/​/​www.cisco.com/​cisco/​web/​support/​index.html

    Feature Information for Conditional Debugging

    The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

    Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/​go/​cfn. An account on Cisco.com is not required.

    Table 1 Feature Information for Conditional Debugging

    Feature Name

    Releases

    Feature Information

    Conditional Debugging

    Cisco IOS XE 3.13.0 S

    The Conditional Debugging feature allows you to selectively enable debugging and logging for the specifc features based on the set of conditions you define.