Port Mirroring

Port mirroring is used to send a copy of network traffics of a VM NIC from a port to another port, and analyze the business packets on the ports. With port mirroring, network data can be monitored and managed. In addition, problems can be quickly located when network failures occur.

Create Port Mirroring

In the navigation pane of the ZStack Private Cloud UI, choose Network Service > Port Mirroring. On the Port Mirroring page, click Create Port Mirroring. On the displayed Create Port Mirroring page, set the following parameters:
  • Name: Enter a name for the port mirroring.
  • Description: Optional. Enter a description for the port mirroring.
  • Flow Network: Select a flow network used by the port mirroring.
    Note:
    • A flow network is a dedicated network for port mirroring, and can be used to mirror the network traffic of a NIC to the remote end.
    • A flow network applies to only port mirroring and cannot be used as other networks.
    • One port mirroring occupies one flow network.
    • Make sure that the VM instances monitored by port mirroring is in the cluster to which the flow network is attached.
  • Enable immediately after creation: Choose whether to enable port mirroring immediately after it is created. Note that enabling the port mirroring might occupy physical network bandwidth. Before you select this checkbox, make sure that the business can work properly.
  • Add session immediately after creation: Choose whether to add sessions immediately after the port mirroring is created. A session is used to create a port mirroring of the network traffics for a VM NIC. Note that one port mirroring can add multiple sessions.
You can create port mirroring, as shown in Figure 1.
Figure 1. Create Port Mirroring


Add Session

A session is used to create a port mirroring of the network traffics for a VM NIC. After a session is added, the session will send a copy of the network traffics on the source port to the destination port. You can select Add session immediately after creation to add sessions directly when you create a port mirroring, or add sessions after you create a port mirroring. If you use the second method, set the following parameters:
  • Name: Enter a name for the session.
  • Type: Select a direction of the network traffic to be copied by the port mirroring. Options: Ingress | Egress | Bidirection.
    • Ingress: Sends a copy of packets received from the source port to the destination port.
    • Egress: Sends a copy packets sent from the source port to the destination port.
    • Bidirection: Sends a copy of packets received and sent by the source port to the destination port.
  • VM Instance and NIC of the source port: Select the VM instance and NIC to be monitored. Packets sent from and received by the source port will be copied to the destination port.
  • VM Instance and NIC of the destination port: Select the VM instance and NIC for receiving the port mirroring. The destination port is used to send the packets copied from the source port to the monitoring device.
    Note:
    • The VM NIC of the destination port cannot be the default network NIC.
    • To ensure the port mirroring work properly, do not set QoS for NICs on the source port and destination port.
You can add a session, as shown in Figure 2.
Figure 2. Add Session


Port Mirroring Operations

You can perform the following operations on a port mirroring:
  • Change name and description: Change the name and description of the port mirroring.
  • Enable: Enable the port mirroring.
  • Disable: Disable the port mirroring.
  • Delete: Delete the port mirroring.
  • Add session: Add a session to the port mirroring.
  • Delete session: Delete a session from the port mirroring.
  • Audit: View related operations supported by the port mirroring.