Configuring SPAN

This document describes the Switched Port Analyzer (SPAN) feature and configuration steps to implement SPAN.

Prerequisites for Configuring SPAN

  • You must enable SPAN globally to support the desired SPAN configuration.

  • NID must have an IP address.

  • You must select a SPAN source from the following options:
    • Interface—one or more source interfaces.

    • VLAN— one or more source VLANs.

    • CPU— to monitor CPU traffic.

Restrictions for Configuring SPAN

  • You cannot configure a port as both a source and destination port.

  • VLAN SPAN monitors only the traffic that leaves or enters Layer 2 ports in the VLAN.

  • SPAN sources interface and VLAN cannot exit together.

Information About SPAN

Switched Port Analyzer (SPAN) feature, sometimes called port mirroring or port monitoring, selects network traffic for analysis by a network analyzer. The SPAN feature is local when the monitored ports are all located on the same switch as the destination port. A local SPAN session is an association of a destination port with source ports. You can monitor incoming or outgoing traffic on a series or range of ports.

SPAN is used to monitor traffic within the switch. Traffic source can be from:
  • Single or multiple ports

  • Single or multiple VLANs

  • Source CPU

Destination can be an interface on the same switch. The following figure shows the topology used for provisioning SPAN on a NID using a UPE NID Controller.
Figure 1. SPAN Topology

How to Provision SPAN

Enabling SPAN Globally to Start a Monitoring Session

     Command or ActionPurpose
    Step 1ConfigureNID


    Example:
    UCS# Configure NID 1
     

    Opens a new session for NID 1.

     
    Step 2span


    Example:
    UCS# span
     
    Enters the SPAN mode.  
    Step 3setSpanGlobalConfReq {enable | disbale}


    Example:
    UCS(SPAN)# setSpanGlobalConf setSpanGlobalConfReq enable
     

    Enters SPAN global configuration mode.

    Sub-command options.
    • enable—Enables SPAN globally.
    • disbale—Disables SPAN globally.
     
    Step 4setSpanGlobalConf review


    Example:
    UCS(SPAN)# setSpanGlobalConf review
     
    (Optional) Displays the configuration.  
    Step 5setSpanGlobalConf commit


    Example:
    UCS(SPAN)# setSpanGlobalConf commit
     
    Sends the configuration to NID.  
    Step 6exit


    Example:
    UCS(SPAN)# exit
     
    Exits the Opens a new session for NID 1. mode.  

    Configuration Example

    • The example shows how to enable SPAN globally:

      UCS# span
      UCS(SPAN)# setSpanGlobalConf setSpanGlobalConfReq enable
      UCS(SPAN)# setSpanGlobalConf review
      UCS(SPAN)# setSpanGlobalConf commit
      UCS(SPAN)# exit

    Configuring SPAN Source Interface

    Before You Begin

    Perform the steps to enable SPAN globally.

       Command or ActionPurpose
      Step 1setSpanSrcConfRequest {source {cpu {rx | tx | both} | {vlan vlan_list} | interface {intf_range | traffic-type {rx | tx | both}}


      Example:
      UCS(SPAN)# setSpanSrcConf commitsetSpanSrcConf setSpanSrcConfRequest source interface intf_range 1-2
       
      Configures SPAN source interface.
      • source—Mirrors source interface or VLAN.
      • cpu—Mirrors source CPU.
      • rx—Mirrors received traffic.
      • tx—Mirrors transmitted traffic.
      • both—Mirrors received and transmitted traffic.
      • vlan—Mirrors source VLAN.
      • vlan_list—Mirrors source VLAN.
      • interface— Mirrors source interface and traffic type.
      • intf_range—Mirrors an interface number or a range from 1 to 6.
      • traffic-type—Mirrors traffic type.
      • rx—Mirrors received traffic.
      • tx—Mirrors transmitted traffic.
      • both—Mirrors received and transmitted traffic.
       
      Step 2setSpanSrcConfRequest {source {cpu {rx | tx | both} | {vlan vlan_list} | interface {intf_range | traffic-type {rx | tx | both}}


      Example:
      UCS(SPAN)# setSpanSrcConf commitsetSpanSrcConf setSpanSrcConfRequest source interface traffic-type both
       
      Configures SPAN source traffic type as both, receive and transmit.
      • source—Mirrors source interface or VLAN.
      • cpu—Mirrors source CPU.
      • rx—Mirrors received traffic.
      • tx—Mirrors transmitted traffic.
      • both—Mirrors received and transmitted traffic.
      • vlan—Mirrors source VLAN.
      • vlan_list—Mirrors source VLAN.
      • interface— Mirrors source interface and traffic type.
      • intf_range—Mirrors an interface number or a range from 1 to 6.
      • traffic-type—Mirrors traffic type.
      • rx—Mirrors received traffic.
      • tx—Mirrors transmitted traffic.
      • both—Mirrors received and transmitted traffic.
       
      Step 3setSpanSrcConf review


      Example:
      UCS(SPAN)# setSpanSrcConf review
       
      (Optional) Displays the configuration.  
      Step 4setSpanGlobalConf commit


      Example:
      UCS(SPAN)# setSpanSrcConf commit
       
      Sends the configuration to NID.  
      Step 5exit


      Example:
      UCS(SPAN)# exit
       
      Exits the SPAN mode.  

      Configuration Example

      • The example shows how to configure SPAN on an interface range:

        UCS# span
        UCS(SPAN)# setSpanGlobalConf setSpanGlobalConfReq enable
        UCS(SPAN)# setSpanGlobalConf review
        UCS(SPAN)# setSpanGlobalConf commit
        UCS(SPAN)# exit
        UCS(SPAN)# setSpanSrcConf commitsetSpanSrcConf setSpanSrcConfRequest source interface intf_range 1-2
        UCS(SPAN)# setSpanSrcConf commitsetSpanSrcConf setSpanSrcConfRequest source interface traffic-type both
        UCS(SPAN)# setSpanSrcConf review
        UCS(SPAN)# setSpanSrcConf commit
        UCS(SPAN)# exit

      Configuring SPAN Source CPU

      Before You Begin

      Perform the steps to enable SPAN globally.

         Command or ActionPurpose
        Step 1setSpanSrcConfRequest {source {cpu {rx | tx | both} | {vlan vlan_list} | interface {intf_range | traffic-type {rx | tx | both}}


        Example:
        UCS(SPAN)# setSpanSrcConf setSpanSrcConfRequest source cpu both
         
        Configures SPAN source CPU.
        • source—Mirrors source interface or VLAN.
        • cpu—Mirrors source CPU.
        • rx—Mirrors received traffic.
        • tx—Mirrors transmitted traffic.
        • both—Mirrors received and transmitted traffic.
        • vlan—Mirrors source VLAN.
        • vlan_list—Mirrors source VLAN.
        • interface— Mirrors source interface and traffic type.
        • intf_range—Mirrors an interface number or a range from 1 to 6.
        • traffic-type—Mirrors traffic type.
        • rx—Mirrors received traffic.
        • tx—Mirrors transmitted traffic.
        • both—Mirrors received and transmitted traffic.
         
        Step 2setSpanSrcConf review


        Example:
        UCS(SPAN)# setSpanSrcConf review
         
        (Optional) Displays the configuration.  
        Step 3setSpanGlobalConf commit


        Example:
        UCS(SPAN)# setSpanSrcConf commit
         
        Sends the configuration to NID.  
        Step 4exit


        Example:
        UCS(SPAN)# exit
         
        Exits the SPAN mode.  
        Configuration Example
        • The example shows how to configure SPAN on an interface range:

          UCS# span
          UCS(SPAN)# setSpanGlobalConf setSpanGlobalConfReq enable
          UCS(SPAN)# setSpanGlobalConf review
          UCS(SPAN)# setSpanGlobalConf commit
          UCS(SPAN)# exit
          UCS(SPAN)# setSpanSrcConf setSpanSrcConfRequest source cpu both
          UCS(SPAN)# setSpanSrcConf review
          UCS(SPAN)# setSpanSrcConf commit
          UCS(SPAN)# exit

        Configuring SPAN Source VLAN

        Before You Begin

        Perform the steps to enable SPAN globally.

           Command or ActionPurpose
          Step 1setSpanSrcConfRequest {source {cpu {rx | tx | both} | {vlan vlan_list} | interface {intf_range | traffic-type {rx | tx | both}}


          Example:
          UCS(SPAN)# setSpanSrcConf setSpanSrcConfRequest source vlan vlan_list 100
           
          Configures SPAN source VLAN.
          • source—Mirrors source interface or VLAN.
          • cpu—Mirrors source CPU.
          • rx—Mirrors received traffic.
          • tx—Mirrors transmitted traffic.
          • both—Mirrors received and transmitted traffic.
          • vlan—Mirrors source VLAN.
          • vlan_list—Mirrors source VLAN.
          • interface— Mirrors source interface and traffic type.
          • intf_range—Mirrors an interface number or a range from 1 to 6.
          • traffic-type—Mirrors traffic type.
          • rx—Mirrors received traffic.
          • tx—Mirrors transmitted traffic.
          • both—Mirrors received and transmitted traffic.
           
          Step 2setSpanSrcConf review


          Example:
          UCS(SPAN)# setSpanSrcConf review
           
          (Optional) Displays the configuration.  
          Step 3setSpanGlobalConf commit


          Example:
          UCS(SPAN)# setSpanSrcConf commit
           
          Sends the configuration to NID.  
          Step 4exit


          Example:
          UCS(SPAN)# exit
           
          Exits the SPAN mode.  
          Configuration Example
          • The example shows how to configure SPAN on an interface range:

            UCS# span
            UCS(SPAN)# setSpanGlobalConf setSpanGlobalConfReq enable
            UCS(SPAN)# setSpanGlobalConf review
            UCS(SPAN)# setSpanGlobalConf commit
            UCS(SPAN)# exit
            UCS(SPAN)# setSpanSrcConf setSpanSrcConfRequest source vlan vlan_list 100
            UCS(SPAN)# setSpanSrcConf review
            UCS(SPAN)# setSpanSrcConf commit
            UCS(SPAN)# exit

          Configuring SPAN Destination

          Before You Begin

          Perform the steps to enable SPAN globally.

             Command or ActionPurpose
            Step 1setSpanDestConfRequest destination intf_id


            Example:
            UCS(SPAN)# setSpanDestConf setSpanDestConfRequest destination intf_id 4
             
            Configures SPAN destination.
            • destination—Mirrors destination interface.
            • intf_id—Specifies single port ID range from 1 to 6.
             
            Step 2setSpanDestConf review


            Example:
            UCS(SPAN)# setSpanDestConf review
             
            (Optional) Displays the configuration.  
            Step 3setSpanDestConf commit


            Example:
            UCS(SPAN)# setSpanDestConf commit
             
            Sends the configuration to NID.  
            Step 4exit


            Example:
            UCS(SPAN)# exit
             
            Exits the SPAN mode.  

            Configuration Example

            • The example shows how to configure SPAN destination:

              UCS# span
              UCS(SPAN)# setSpanGlobalConf setSpanGlobalConfReq enable
              UCS(SPAN)# setSpanGlobalConf review
              UCS(SPAN)# setSpanGlobalConf commit
              UCS(SPAN)# exit
              UCS(SPAN)# setSpanDestConf setSpanDestConfRequest destination intf_id 4
              UCS(SPAN)# setSpanDestConf review
              UCS(SPAN)# setSpanDestConf commit
              UCS(SPAN)# exit

            Deleting SPAN Source Configuration

            Before You Begin

            Perform the steps to enable SPAN globally.

               Command or ActionPurpose
              Step 1delSpanSrcConfRequest {source {cpu {rx | tx | both} | {vlan vlan_list} | interface {intf_range | traffic-type {rx | tx | both}}


              Example:
              UCS(SPAN)# delSpanSrcConf delSpanSrcConfRequest source cpu rx
               
              Deletes SPAN source configuration.
              • source—Removes mirror of source interface or VLAN.
              • cpu—Removes mirror of source CPU.
              • rx—Removes mirror of received traffic.
              • tx—Removes mirror of transmitted traffic.
              • both—Removes mirror of received and transmitted traffic.
              • vlan—Removes mirror of source VLAN.
              • vlan_list—Removes mirror of source VLAN.
              • interface— Removes mirror of source interface and traffic type.
              • intf_range—Removes mirror of interface number or a range from 1 to 6.
              • traffic-type—Removes mirror of traffic type.
              • rx—Removes mirror of received traffic.
              • tx—Removes mirror of transmitted traffic.
              • both—Removes mirror of received and transmitted traffic.
               
              Step 2delSpanSrcConf review


              Example:
              UCS(SPAN)# delSpanSrcConf review
               
              (Optional) Displays the configuration.  
              Step 3 delSpanSrcConf commit


              Example:
              UCS(SPAN)# delSpanSrcConf commit
               
              Sends the configuration to NID.  
              Step 4exit


              Example:
              UCS(SPAN)# exit
               
              Exits the SPAN mode.  

              Configuration Example

              • The example shows how to configure SPAN on an interface range:

                UCS# span
                UCS(SPAN)# setSpanGlobalConf setSpanGlobalConfReq enable
                UCS(SPAN)# setSpanGlobalConf review
                UCS(SPAN)# setSpanGlobalConf commit
                UCS(SPAN)# exit
                UCS(SPAN)# delSpanSrcConf delSpanSrcConfRequest source cpu rx
                UCS(SPAN)# delSpanSrcConf review
                UCS(SPAN)# delSpanSrcConf commit
                UCS(SPAN)# exit

              Deleting SPAN Destination Configuration

              Before You Begin

              Perform the steps to enable SPAN globally.

                 Command or ActionPurpose
                Step 1delSpanDestConfRequest destination intf_id


                Example:
                UCS(SPAN)# delSpanDstConf delSpanDstConfRequest detination intf_id 4
                 
                Deletes SPAN destination configuration.
                • destination—Removes mirror of destination interface.
                • intf_id—Specifies single port ID range from 1 to 6.
                 
                Step 2 delSpanDstConf review


                Example:
                UCS(SPAN)# delSpanDstConf review
                 
                (Optional) Displays the configuration.  
                Step 3delSpanDstConf commit


                Example:
                UCS(SPAN)# delSpanDstConf commit
                 
                Sends the configuration to NID.  
                Step 4exit


                Example:
                UCS(SPAN)# exit
                 
                Exits the SPAN mode.  

                Configuration Example

                • The example shows how to configure SPAN destination:

                  UCS# span
                  UCS(SPAN)# setSpanGlobalConf setSpanGlobalConfReq enable
                  UCS(SPAN)# setSpanGlobalConf review
                  UCS(SPAN)# setSpanGlobalConf commit
                  UCS(SPAN)# exit
                  UCS(SPAN)# delSpanDstConf delSpanDstConfRequest detination intf_id 4
                  UCS(SPAN)# delSpanDstConf review
                  UCS(SPAN)# delSpanDstConf commit
                  UCS(SPAN)# exit

                Verifying Diagnostics POST

                Use the following commands to verify the diagnostics test status.

                • showDiagResults showDiagTestResults

                  The following is a sample output from the command:

                  UCS(Diagnostics)#  showDiagResults showDiagTestResults
                  UCS(Diagnostics)#  showDiagResults review
                  Commands in queue:
                  	                showDiagResults showDiagTestResults 
                  UCS(Diagnostics)#  showDiagResults commit
                  ShowDiagResults_Output.diagTestResults.testresult[0] = 'External Port Loopback Test =>'
                  ShowDiagResults_Output.diagTestResults.testresult[1] = 'Passed'
                  ShowDiagResults_Output.diagTestResults.testresult[2] = 'Sync-E Reference Source Clock Test =>'
                  ShowDiagResults_Output.diagTestResults.testresult[3] = 'Passed'
                  ShowDiagResults_Output.diagTestResults.testresult[4] = 'PTP One PPS Test =>'
                  ShowDiagResults_Output.diagTestResults.testresult[5] = 'Passed'
                   ShowDiagResults Commit Success!!!
                  

                Additional References

                Related Documents

                Related Topic Document Title

                Cisco ME 3800x and ME 3600x Switches Software Configuration Guide, Cisco IOS Release 15.4(1)S

                http:/​/​www.cisco.com/​c/​en/​us/​td/​docs/​switches/​metro/​me3600x_3800x/​software/​release/​15-4_1_S/​configuration/​guide/​3800x3600xscg.html

                MIBs

                MIB MIBs Link

                MIBs Supporting Cisco IOS

                To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

                http:/​/​www.cisco.com/​go/​mibs

                Technical Assistance

                Description Link

                The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies.

                To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds.

                Access to most tools on the Cisco Support website requires a Cisco.com user ID and password.

                http:/​/​www.cisco.com/​support