To configure a local mirror service, the source and destinations must be located on the same router. Note that local mirror source and mirror destination components must be configured under the same service ID context.
The mirror-source commands are used as traffic selection criteria to identify traffic to be mirrored at the source. Each of these criteria are independent. For example, use the debug>mirror-source>port {port-id | lag lag-id} {[egress] [ingress]} command and debug>mirror-source ip-filter ip-filter-id entry entry-id [entry-id…] command to capture (mirror) traffic that matches a specific IP filter entry and traffic ingressing and egressing a specific port. A filter must be applied to the SAP or interface if only specific packets are to be mirrored.
Use the following syntax to configure one or more mirror source parameters.
 debug# mirror-source service-id
         ip-filter ip-filter-id entry entry-id [entry-id …]
         ipv6-filter ip-filter-id entry entry-id [entry-id …]
         mac-filter mac-filter-id entry entry-id [entry-id …]
         port {port-id|lag lag-id} {[egress][ingress]}
         sap sap-id {[ingress]}
         no shutdown
The mirror-dest commands are used to specify where the mirrored traffic is to be sent. Use the following syntax to configure mirror destination parameters.
 config>mirror mirror-dest service-id [type {ether}] [create]
         description string
         sap sap-id [create]
         no shutdown
		The following output displays an example of a local mirrored service using a NULL SAP. On ALA-A, mirror service 103 is mirroring traffic matching IP filter 2, entry 1 as well as egress and ingress traffic on port 1/1/23 and sending the mirrored packets to SAP 1/1/24
*A:ALA-A>config>mirror# info
----------------------------------------------
        mirror-dest 103 create
            sap 1/1/24 create
            exit
            no shutdown
        exit
----------------------------------------------
*A:ALA-A>config>mirror# 
		The following output displays an example of local mirrored service using a dot1q SAP. User needs to configure a front-panel port for use with the mirroring application when the mirror destination is a Dot1q SAP or a Q1.* SAP, as follows.
On the 7210 SAS-D, the loopback-no-svc-port command is not needed. The software uses the resources associated with an internal port for the mirroring application.
On the 7210 SAS-K 2F1C2T, 7210 SAS-K 2F6C4T, and 7210 SAS-K 3SFP+ 8C, the loopback-no-svc-port configuration is not needed.
*A:ALA-A>config>system> 
------------------------------------------------------
     loopback-no-svc-port mirror 1/1/14
-------------------------------------------------------
*A:ALA-A>config>mirror# info
----------------------------------------------
     mirror-dest 103 create
          sap 1/1/10:100 create
          exit
          no shutdown
     exit
----------------------------------------------
*A:ALA-A>config>mirror#
		*A:ALA-A>debug>mirror-source# show debug mirror
debug
    mirror-source 103 
     no shutdown
        port 1/1/23 ingress
     ip-filter 2 entry 1
    exit
exit
*A:ALA-A>debug>mirror-source# exit