2.5. Configuring Service Mirroring with CLI

This section provides information about service mirroring.

2.5.1. Mirror Configuration Overview

7210 SAS node mirroring can be organized in the following logical entities:

  1. The mirror source is defined as the location from where the traffic should be mirrored. A mirror source could be ingress of service entity or egress of a service entity. The list of mirror sources supported on a specific platform is listed preceding Mirror Source Port Requirements
  2. A SAP is defined in local mirror services as the mirror destination to where the mirrored packets are sent.

2.5.1.1. Defining Mirrored Traffic

In some scenarios, or when multiple services are configured on the same port, specifying the port does not provide sufficient resolution to separate traffic. In -Nokia’s implementation of mirroring, multiple source mirroring parameters can be specified to further identify traffic.

Mirroring of packets matching specific filter entries in an IP or MAC filter can be applied to refine what traffic is mirrored to flows of traffic within a service. The IP criteria can be combinations of:

  1. Source IP address/mask
  2. Destination IP address/mask
  3. IP Protocol value
  4. Source port value (for example, UDP or TCP port)
  5. Destination port value (for example, UDP or TCP port)
  6. DiffServ Code Point (DSCP) value
  7. ICMP code
  8. ICMP type
  9. IP fragments
  10. TCP ACK set/reset
  11. TCP SYN set/reset

The MAC criteria can be combinations of:

  1. IEEE 802.1p value/mask
  2. Source MAC address/mask
  3. Destination MAC address/mask
  4. Ethernet Type II Ethernet type value
Note:

The list of packet fields that are available to match packets in IP and MAC ACLs for different platforms is different. For more information about the lists of packet fields available on different platforms, see the 7210 SAS-M, T, R6, R12, Mxp, Sx, S Router Configuration Guide.

2.6. Basic Mirroring Configuration

Destination mirroring parameters must include at least:

  1. A mirror destination ID (same as the mirror source service ID).
  2. A mirror destination SAP.

Mirror source parameters must include at least:

  1. A mirror service ID (same as the mirror destination service ID).
  2. At least one source type (port, SAP, IP filter or MAC filter) specified.

The following is a sample local mirrored service (ALA-A) configuration output.

 
*A:ALA-A>config>mirror# info
----------------------------------------------
        mirror-dest 103 create
 
 
            sap 1/1/1 create
 
 
 
            exit
            no shutdown
        exit
----------------------------------------------
*A:ALA-A>config>mirror# 

The following is a sample mirror source configuration output.

*A:ALA-A>debug>mirror-source# show debug mirror
debug
    mirror-source 103
 
        port 1/1/24 egress ingress
no shutdown
    exit
exit
*A:ALA-A>debug>mirror-source# exit

2.6.1. Mirror Classification Rules

-The Nokia implementation of mirroring can be performed by configuring parameters to select network traffic according to any of the entities in this section.

2.6.1.1. Port

The port command associates a port to a mirror source. The port is identified by the port ID. The defined port can be Ethernet or a Link Aggregation Group (LAG) ID. When a LAG ID is specified as the port ID, mirroring is enabled on all ports making up the LAG.

Mirror sources can be ports in either access or network mode. Port mirroring is supported in the combinations described in Table 8.

Table 8:  Mirror Source Port Requirements  

Port Type

Port Mode

Port Encapsulation Type

faste/gige/10gige

access

null, dot1q and QinQ

faste/gige/10gige

access uplink

qinq

faste/gige/10gige

network

null/dot1q

faste/gige/10gige

hybrid

null/dot1q/qinq

CLI Syntax:
debug>mirror-source# port {port-id|lag lag-id} {[egress][ingress]}
Example:
*A:ALA-A>debug>mirror-source# port 1/1/2 ingress egress

2.6.1.2. SAP

More than one SAP can be associated within a single mirror source. Each SAP has its own ingress parameter keyword to define which packets are mirrored to the mirror-dest service ID. A SAP that is defined within a mirror destination cannot be used in a mirror source.

CLI Syntax:
debug>mirror-source# sap sap-id {[ingress]}
Example:
*A:ALA-A>debug>mirror-source# sap 1/1/4:100 ingress

2.6.1.3. MAC filter

MAC filters are configured in the config>filter>mac-filter context. The mac-filter command causes all the packets matching the explicitly defined list of entry IDs to be mirrored to the mirror destination specified by the service-id of the mirror source.

CLI Syntax:
debug>mirror-source# mac-filter mac-filter-id entry entry-id [entry-id]
Example:
*A:ALA-2>debug>mirror-source# mac-filter 12 entry 15 20 25

2.6.1.4. IP filter

IP filters are configured in the config>filter>ip-filter context. The ip-filter command causes all the packets matching the explicitly defined list of entry IDs to be mirrored to the mirror destination specified by the service-id of the mirror source.

Ingress mirrored packets are mirrored to the mirror destination before any ingress packet modifications.

CLI Syntax:
debug>mirror-source# ip-filter ip-filter-id entry entry-id [entry-id]
Example:
*A:ALA-A>debug>mirror-source# ip-filter 1 entry 20
Note:

An IP filter cannot be applied to a mirror destination SAP.

2.7. Common Configuration Tasks

This section provides a brief overview of the tasks that must be performed to configure local mirror services and provides CLI command syntax. Note that the local mirror source and mirror destination components must be configured under the same service ID context.

Each local mirrored service (Figure 5) (within the same router) requires the following configurations:

  1. Specify mirror destination (SAP).
  2. Specify mirror source (port, SAP, IP filter, MAC filter).
    Figure 5:  Local Mirrored Service Tasks 

2.7.1. Configuring a Local Mirror Service

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.

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.

CLI Syntax:
config>mirror mirror-dest service-id [type {ether}] [create]
description string
sap sap-id [create]
no shutdown
CLI Syntax:
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 following is a sample local mirrored service using a NULL SAP configuration output. 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 is a sample local mirrored service using a dot1q SAP configuration output. 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.

*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#

The following is sample debug mirroring information.

*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

2.7.2. Configuring a Remote Mirror Service

The source and destination are configured on different routers for remote mirroring. Note that mirror source and mirror destination parameters must be configured under the same service ID context.

Note:

Remote mirroring using MPLS SDP is supported on all 7210 SAS platforms as described in this document, except those operating in access-uplink mode.

The mirror-source commands are used as traffic selection criteria to identify traffic to be mirrored at the source. For example, use the port port-id [lag-id] {[egress] [ingress]} and mac-filter mac-filter-id entry entry-id [entry-id …] commands.

Use the syntax to configure one or more mirror source parameters.

CLI Syntax:
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, the forwarding class, and the size of the packet. Use the following syntax to configure mirror destination parameters.

CLI Syntax:
config>mirror#
mirror-dest service-id
[create] [type <mirror-type>] [mirror-source-type <mirror-source-type>]
description string
fc fc-name [profile <profile>]
remote-source
far-end ip-address [vc-id vc-id] [ing-svc-label ingress-vc-label|tldp]
sap sap-id create
no shutdown

Figure 6 shows the mirror destination, which is on ALA-A, configuration for mirror service 1216. This configuration specifies that the mirrored traffic coming from the mirror source (10.10.0.91) is to be directed to SAP /1/58 and states that the service only accepts traffic from far end 10.10.0.92 (ALA-B) with an ingress service label of 5678. When a forwarding class is specified, then all mirrored packets transmitted to the destination SAP or SDP override the default (be) forwarding class.

Figure 6:  Remote Mirrored Service Tasks 

The following example displays the CLI output showing the configuration of remote mirrored service 1216. The traffic ingressing and egressing port 1/1/60 on 10.10.0.92 (ALA-B) will be mirrored to the destination SAP 1/1/58:0 on ALA-A.

The following is a sample remote mirror destination configuring the front panel port with mirroring application.

*A:7210SAS>config>mirror# info 
----------------------------------------------
        mirror-dest 23 mirror-source-type remote create
            description "Added by createMirrorDestination 23" 
            fc be 
            remote-source
                far-end 2.2.2.2 ing-svc-label 14000
            exit 
            sap 1/1/4 create 
            exit 
            no shutdown
        exit 
        mirror-dest 1000 create
            fc be 
            spoke-sdp 200:1000 create
                egress
                    vc-label 15000
                exit
                no shutdown
            exit
            no shutdown
        exit 
----------------------------------------------
*A:7210SAS>config>mirror# /show system internal-loopback-ports 
 
===============================================================================
Internal Loopback Port Status
===============================================================================
Port                Loopback            Application         Service
Id                  Type                                    Enabled
-------------------------------------------------------------------------------
1/1/9               Physical            Dot1q-Mirror        No
===============================================================================

The following is a sample mirror destination configuration output for mirror service 1216 on ALA-A.

*A:ALA-A>config>mirror# info
----------------------------------------------
        mirror-dest 1000 type ether mirror-source-type remote create
            description "Receiving mirror traffic from .91"
            remote-source
                far-end 2.2.2.2 tldp
            exit
            sap 1/1/21:21 create
                egress
                    qos 1
                exit
            exit
            no shutdown
        exit
----------------------------------------------
*A:ALA-A>config>mirror#

The following is a sample remote mirror destination output configured on ALA-B.

*A:ALA-B>config>mirror# info
----------------------------------------------
mirror-dest 2000 type ether mirror-source-type local create
            no description
            no service-name
            fc be
            no remote-source
            spoke-sdp 200:2000 create
                egress
                    no vc-label
                exit
                no shutdown
            exit
            no shutdown
        exit
----------------------------------------------
*A:ALA-B>config>mirror#

The following is a sample mirror source configuration output for ALA-B.

*A:ALA-B# show debug mirror
debug
    mirror-source 1000
        no shutdown
    exit
    mirror-source 2000
        no shutdown
    exit
exit
*A:ALA-B#

The following is a sample SDP configuration output from ALA-A to ALA-B (SDP 2) and the SDP configuration output from ALA-B to ALA-A (SDP 4).

*A:ALA-A>config>service>sdp# info
---------------------------------------------
description "MPLS-10.10.0.91"
far-end 10.10.0.01
signalling tldp
no shutdown
---------------------------------------------
*A:ALA-A>config>service>sdp#
 
 
*A:ALA-B>config>service>sdp# info
----------------------------------------------
description "MPLS-10.10.20.92"
far-end 10.10.10.103
signalling tldp
no shutdown
----------------------------------------------
*A:ALA-B>config>service>sdp#

2.8. Service Management Tasks

This section describes the service management tasks.

The following shows the command usage to modify an existing mirrored service.

CLI Syntax:
config>mirror#
mirror-dest service-id [type {ether}]
description description-string
no description
sap sap-id
no sap
[no] shutdown
CLI Syntax:
debug
[no] mirror-source service-id
ip-filter ip-filter-id entry entry-id [entry-id...]
no ip-filter ip-filter-id
no ip-filter entry entry-id [entry-id...]
ipv6-filter ip-filter-id entry entry-id [entry-id...]
no ipv6-filter ip-filter-id
no ipv6-filter entry entry-id [entry-id...]
mac-filter mac-filter-id entry entry-id [entry-id...]
no mac-filter mac-filter-id
no mac-filter mac-filter-id entry entry-id [entry-id...]
[no] port {port-id|lag lag-id} {[egress][ingress]}
[no] sap sap-id {[ingress]}
[no] shutdown

2.8.1. Modifying a Local Mirrored Service

Existing mirroring parameters can be modified in the CLI. The changes are applied immediately. The service must be shut down if changes to the SAP are made.

The following shows the command usage to modify parameters for a basic local mirroring service.

Example:
config>mirror# mirror-dest 103
config>mirror>mirror-dest# shutdown
config>mirror>mirror-dest# no sap
config>mirror>mirror-dest# sap 1/1/5 create
config>mirror>mirror-dest>sap$ exit
config>mirror>mirror-dest# no shutdown
debug# mirror-source 103
debug>mirror-source# no port 1/1/23
debug>mirror-source# port 1/1/7 ingress egress

The following is a sample of the local mirrored service modifications.

*A:ALA-A>config>mirror# info
----------------------------------------------
mirror-dest 103 create
            no shutdown
            sap 1/1/5 create
        exit
 
*A:ALA-A>debug>mirror-source# show debug mirror
debug
    mirror-source 103
        no shutdown
        port 1/1/7 egress ingress
    exit
*A:ALA-A>debug>mirror-source#

2.8.2. Deleting a Local Mirrored Service

Existing mirroring parameters can be deleted in the CLI. A shutdown must be issued on a service level to delete the service. It is not necessary to shut down or remove SAP or port references to delete a local mirrored service.

The following shows the command usage to delete a local mirrored service.

Example:
ALA-A>config>mirror# mirror-dest 103
config>mirror>mirror-dest# shutdown
config>mirror>mirror-dest# exit
config>mirror# no mirror-dest 103
config>mirror# exit

2.8.3. Modifying a Remote Mirrored Service

Existing mirroring parameters can be modified in the CLI. The changes are applied immediately. The service must be shut down if changes to the SAP are made.

In the following example, the mirror destination is changed from 10.10.10.2 (ALA-B) to 10.10.10.3 (SR3). Note that the mirror-dest service ID on ALA-B must be shut down first before it can be deleted.

The following shows the command usage to modify parameters for a remote mirrored service.

Example:
*A:ALA-A>config>mirror# mirror-dest 104
config>mirror>mirror-dest# remote-source
config>mirror>mirror-dest>remote-source# no far-end 10.10.10.2
remote-source# far-end 10.10.10.3 ing-svc-label 3500
*A:ALA-B>config>mirror# mirror-dest 104
config>mirror>mirror-dest# shutdown
config>mirror>mirror-dest# exit
config>mirror# no mirror-dest 104
SR3>config>mirror# mirror-dest 104 create
config>mirror>mirror-dest# sdp 4 egr-svc-label 3500
config>mirror>mirror-dest# no shutdown
config>mirror>mirror-dest# exit all
SR3># debug
debug# mirror-source 104
debug>mirror-source# port 551/1/2 ingress egress
debug>mirror-source# no shutdown
*A:ALA-A>config>mirror# info
----------------------------------------------
mirror-dest 104 create
            remote-source
                far-end 2.2.2.2 tldp
            exit
 sap 1/1/21:21 create
 
 
                egress
                    qos 1
                exit
            exit
            no shutdown
exit
 
A:SR3>config>mirror# info
----------------------------------------------
        mirror-dest 104 create
spoke-sdp 200:2000 create
            no shutdown
        exit
----------------------------------------------
A:SR3>config>mirror#
 
A:SR3# show debug mirror
debug
    mirror-source 104
        no shutdown

2.8.4. Deleting a Remote Mirrored Service

Existing mirroring parameters can be deleted in the CLI. A shut down must be issued on a service level to delete the service. It is not necessary to shut down or remove SAP, or far-end references to delete a remote mirrored service.

To delete a mirror service, the spoke-SDP service has to be deleted from the service. Mirror destinations must be shut down first before they are deleted.

Example:
*A:ALA-A>config>mirror# mirror-dest 105
config>mirror>mirror-dest# shutdown
config>mirror>mirror-dest# exit
config>mirror# no mirror-dest 105
config>mirror# exit
*A:ALA-B>config>mirror# mirror-dest 105
config>mirror>mirror-dest# shutdown
config>mirror>mirror-dest# exit
config>mirror# no mirror-dest 105
config>mirror# exit

The mirror-destination service ID 105 was removed from the configuration on ALA-A and ALA-B, therefore, does not appear in the info command output.

*A:ALA-A>config>mirror# info
----------------------------------------------
 
----------------------------------------------
*A:ALA-A>config>mirror# exit
 
 
*A:ALA-B>config>mirror# info
----------------------------------------------
 
----------------------------------------------
*A:ALA-B>config>mirror# exit
 

Since the mirror destination was removed from the configuration on ALA-B, the port information was automatically removed from the debug mirror-source configuration.

*A:ALA-B# show debug mirror
debug
exit
*A:ALA-B#