Updated on 2024-04-22 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 Overview.

Procedure

  1. Log in to the management console.
  1. Click in the upper left corner and select the desired region and project.
  2. Click in the upper left corner and choose Networking > Virtual Private Cloud.

    The Virtual Private Cloud page is displayed.

  3. In the navigation pane on the left, choose Traffic Mirroring > Mirror Sessions.

    The Mirror Sessions page is displayed.

  4. In the upper right corner of the mirror session list, click Create Mirror Session.

    The Create Mirror Session page is displayed.

  5. 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.

    -

  6. Click Next.

    The Associate Mirror Filter page is displayed.

  7. 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.

  8. Click Next.

    The Associate Mirror Sources page is displayed.

  9. In the mirror source list, select mirror sources.
    • A mirror source is an elastic network interface and traffic of this network interface needs to be mirrored.
    • Each mirror session can be associated with multiple mirror sources.
    • An elastic network interface needs to be attached to an ECS. Currently, only network interfaces of c7t ECSs can be used as mirror sources.
  10. Click Next.

    The Associate Mirror Target page is displayed.

  11. 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.
  12. Click Next.

    The Confirm page is displayed.

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

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