Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

How to configure port mirroring on SRX high-end devices

0

0

Article ID: KB21842 KB Last Updated: 22 Feb 2020Version: 5.0
Summary:

This article explains how port mirroring can be configured on a high-end SRX device. This feature is supported from Junos version 11.1.

Symptoms:

Sometimes you may need to analyze the traffic on an interface. On high end SRX devices, this can be accomplished by mirroring the interface.

Solution:

Step 1: Configure an instance of port-mirroring

[edit forwarding-options]

port-mirroring {
    instance {
        instance1 {
            input {
                rate 1;
                run-length 10;
            }
            family any {
                output {
                    interface ge-1/0/1.0;
                }
            }
        }
    }
}

Step 2: Apply the instance on the port that is to be mirrored.
[edit interfaces]

ge-1/0/0 {
    port-mirror-instance instance1;
    unit 0 {
        family inet {
            address 1.1.1.1/24;
        }
    }
}

 
The following is a sample configuration. The traffic which comes into or goes out of ge-1/0/0 can be captured on ge-1/0/1.

version 11.1R1.14;
system {
    root-authentication {
        encrypted-password "$ABC123"; ## SECRET-DATA
    }
    services {
        ftp;
    }
}
interfaces {
    ge-1/0/0 {
        port-mirror-instance instance1;
        unit 0 {
           family inet {
               address 1.1.1.1/24;
           }
        }
    }
    ge-1/0/1 {
        unit 0 {
           family inet {
               address 2.2.2.1/24;
           }
        }
    }
}
forwarding-options {
    port-mirroring {
        instance {
            instance1 {
                input {
                    rate 1;
                    run-length 10;
                }
                family any {
                    output {
                        interface ge-1/0/1.0;
                    }
                }
            }
        }
    }
}
security {
    policies {
        default-policy {
            permit-all;
         }
    }
    zones {
        security-zone trust {
            host-inbound-traffic {
                system-services {
                    all;
                }
                protocols {
                    all;
                }
           }
           interfaces {
               all;
           }
        }
    }
}

Caveats and Limitations
  1. This document is applicable only to SRX-1k/3k IOC and SRX5000 FIOC.

  2. Both the mirrored port and mirror-to port must be physical ports

  3. The device will insert a 4-byte VLAN tag (0x0001) in the egress mirrored packets.
     
    • Side-effect: when the switch exists between the MTP and packet analyzer, it may drop the egress packets before forwarding to packet analyzer.

    • Work-around: direct the connect packet analyzer to MTP.

  4. The mirror-to port:
     
    • Layer 3 needs a IP address configured.

    • Layer 2 needs a interface-mode. For example:

        - The MTP should not participate in any protocol configuration.

        - The MTP should not be the mirrored port at the same time.

  5. The instance is a character string and does not have state or status to show.

  6. The input arguments under forwarding-options comply with MX-series port-mirroring config requirement; but will not take effect on SRX. However, the rate and run-length are required to be filled in.

  7. A reboot is necessary when the configuration is swapped between the L2 and L3 config.

  8. Port mirroring works only if the mirrored and the mirroring ports are on the same FPC and PIC.

    Example: It works for ports xe-7/0/0 and 7/0/1. However, it will not work for ports xe-8/0/0 and xe-8/1/0, as the PICs are different.

 

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search