Updated on 2024-12-02 GMT+08:00

Creating a Mirror Session

Scenarios

To use Traffic Mirroring, you need to create a mirror session, associate a mirror filter, multiple mirror sources, and a mirror target with the mirror session. A mirror session mirrors traffic from a mirror source to a mirror target that meets the mirror filter.

For details about mirror sessions, see Traffic Mirroring.

Procedure

  1. Go to the mirror session list page.
  2. In the upper right corner of the mirror session list, click Create Mirror Session.

    The Create Mirror Session page is displayed.

  3. Set basic information about the mirror session as prompted.
    Table 1 Parameters for configuring basic information about a mirror session

    Parameter

    Description

    Example Value

    Name

    Mandatory

    Enter the name of the mirror session. The name:
    • Must contain 1 to 64 characters.
    • Can contain letters, digits, underscores (_), hyphens (-), and periods (.).

    mirror-session-01

    Priority

    Mandatory

    Priority of the mirror session.
    • A priority value can be from 1 to 32766. A smaller value indicates a higher priority.
    • Priorities must be unique for each mirror session of the same account in a region.

    A mirror source can be associated with multiple mirror sessions at the same time. The mirror sessions are matched from the lowest value to the highest value.

    For details, see the matching process of mirror sessions.

    1

    VNI

    Optional

    VXLAN Network Identifiers (VNIs) are used to distinguish different mirror sessions for a mirror target. A VNI can be from 0 to 16777215.

    If not specified, the default value is 1.

    1

    Packet Length

    Optional

    The number of bytes that meet the mirror filter and will be mirrored. The value can be from 1 to 1460.

    If not specified, the default value is 96.

    96

    Mirror Session

    Optional

    • If the mirror session is disabled, traffic of mirror sources cannot be monitored.
    • If the mirror session is enabled, traffic of mirror sources can be monitored.

    Enable

    Description

    Optional

    Enter the description of the mirror session in the text box as required.

    -

  4. Click Next.

    The Associate Mirror Filter page is displayed.

  5. In the mirror filter list, select a mirror filter.

    Each mirror session can be associated with only one mirror filter.

    If there is no mirror filter you want, create one by referring to Creating a Mirror Filter.

  6. Click Next.

    The Associate Mirror Sources page is displayed.

  7. In the mirror source list, select mirror sources.

    When associating mirror sources with a mirror session, learn about the constraints on mirror sources in Table 5.

  8. Click Next.

    The Associate Mirror Target page is displayed.

  9. In the mirror target list, select a mirror target.
    • A mirror target is a network interface of an ECS or a load balancer, which is used to receive mirrored traffic.
    • Each mirror session can be associated with only one mirror target.

      For details about the constraints on mirror targets, see Table 6.

  1. Click Next.

    The Confirm page is displayed.

  2. After confirming that the configuration is correct, click Create Now.

    You can view the created mirror session in the mirror session list.