Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Defining a Named Instance of Layer 2 Port Mirroring

    On an MX Series router, you can define a set of Layer 2 port-mirroring properties that you can bind to a particular Packet Forwarding Engine (at the PIC level of the router chassis) or to group of Packet Forwarding Engines (at the DPC or FPC level of the route chassis).

    To define a named instance of Layer 2 port mirroring on an MX Series router:

    1. Enable configuration of a named instance of Layer 2 port mirroring :

      [edit]
      user@host# edit forwarding-options port-mirroring instance pm-instance-name
    2. Enable configuration of the packet-sampling properties:

      [edit forwarding-options port-mirroring instance pm-instance-name]
      user@host# edit input
    3. Specify packet-selection properties:

      1. Specify the number of packets to select:

        [edit forwarding-options port-mirroring instance pm-instance-name input]
        user@host# set rate number
        The valid range is 1 through 65535.
      2. Specify the number of packets to mirror from each selection:

        [edit forwarding-options port-mirroring instance pm-named-instance input]
        user@host# set run-length number
        The valid range is 0 through 20. The default value is 0.

        Note: The run-length statement is not supported on MX80 routers.

      3. Specify the length to which mirrored packets are to be truncated:

        [edit forwarding-options port-mirroring instance pm-instance-name input]
        user@host# set maximum-packet-length number
        For MX-Series devices with Modular Port Concentrators (MPCs), port-mirrored or sampled packets can be truncated (or clipped) to any length in the range of 1 to 255 bytes. Only 1 to 255 are valid values for packet truncation on these devices. For other devices, the range is from 0 to 9216. A maximum-packet-length value of zero represents that truncation is disabled, and the entire packet is mirrored or sampled.

        Note: The maximum-packet-length statement is not supported on MX80 routers.

    4. Enable configuration of the mirror destination properties for Layer 2 packets that are part of bridging domain, Layer 2 switching cross-connects, or virtual private LAN service (VPLS):

      1. Specify the Layer 2 address family type of traffic to be mirrored:

        [edit forwarding-options port-mirroring instance pm-instance-name input]
        user@host# up
        [edit forwarding-options port-mirroring instance pm-instance-name]
        user@host# edit family family
        The value of the family option can be bridge, ccc, or vpls.

        Note: Under the [edit forwarding-options port-mirroring] hierarchy level, the protocol family statement family bridge is an alias for family vpls. The command-line interface (CLI) displays Layer 2 port-mirroring configurations as family vpls, even for Layer 2 port-mirroring configured as family bridge. Use family bridge when the physical interface is configured with encapsulation ethernet-bridge.

      2. Enable configuration of the mirror destination properties:

        [edit forwarding-options port-mirroring instance pm-instance-name family family]
        user@host# edit output
    5. Specify mirror destination properties.

      1. Specify the physical interface on which to send the mirrored packets:

        [edit forwarding-options port-mirroring instance pm-instance-name family family output]
        user@host# set interface interface-name
      2. (Optional) Allow configuration of filters on the destination interface for the global port-mirroring instance:

        [edit forwarding-options port-mirroring instance pm-instance-name family family output]
        user@host# set no-filter-check

        Note: You cannot configure port-mirroring instances on MX80 routers. You can only configure port mirroring at the global level on MX80 routers.

    6. (Optional) Specify that any packets selected for mirroring are to be mirrored only once to any mirroring destination:

      [edit forwarding-options port-mirroring instance pm-instance-name family family output]
      user@host# up 3
      [edit forwarding-options port-mirroring]
      user@host# set mirror-once

      Tip: Enable the global mirror-once option when an MX Series router is configured to perform Layer 2 port mirroring at both ingress and egress interfaces, which could result in sending duplicate packets to the same destination (which in turn would complicate the analysis of the mirrored traffic).

    7. To configure a mirroring destination for a different packet family type, repeat steps 4 through 6.
    8. Verify the minimum configuration of the named instances of Layer 2 port mirroring:

      [edit forwarding-options ... ]
      user@host# top
      [edit]
      user@host# show forwarding-options
       
      forwarding-options {
      port-mirroring {
      ... optional-global-port-mirroring-configuration ...
      instance {
      pm-instance-name ( # A named instance of port mirroring
      input { # Packet-selection properties
      maximum-packet-length number; # Default is 0.
      rate number;
      run-length number;
      }
      family (ccc | vpls) { # Address- type ’bridge’ displays as ’vpls’.
      output { # Mirror destination properties
      interface interface-name;
      no-filter-check; # Optional. Allow filters on interface.
      }
      }
      }
      }
      mirror-once; # Optional. Mirror destinations do not receive duplicate packets.
      }
      }

    Modified: 2017-09-13