Practice of Port Mirroring of Flow Network

Assume that the user has key business services running on VM-2, so the user wants to monitor the traffic that flows in and out of VM-2 for analysis. To ensure that the business services are not affected on VM-2, the user decides to create a port mirroring for VM-2 on the Cloud. This way, the created port mirroring will mirror the data traffic of VM-2 NIC and sends the data traffic to the target VM-1 for analysis.
  1. Create an L2 network and attach it to the corresponding cluster.
  2. Create a flow network.
  3. Create a VM instance named as VM-1. Make sure that the VM-1 has at least 2 NICs attached.
  4. Create a port mirroring.
  5. Add a session. Specify VM-2 NIC as the source port and VM-1 NIC as the destination port.
  6. Test whether the port mirroring works properly.
The following table lists the user's environment configuration.
Table 1. Flow Network Configuration
Flow Network Configuration
NIC em02
VLAN ID No VLAN
IP Range 192.168.29.10~192.168.29.20
Netmask 255.255.255.0
Gateway 192.168.29.1

The following section describes the detailed practice steps.

  1. Create an L2 network and attach it to the corresponding cluster.
  2. Create a flow network. For network configuration information, see Flow Network Configuration.
  3. Create a VM instance named as VM-1. Make sure that the VM-1 has at least 2 NICs attached.
    On the Configuration Info tab of the details page of VM-1, attach another NIC to the VM instance.
    Figure 1. Attach NIC to VM Instance


  4. Create a port mirroring.
  5. Add a session.
    Specify VM-2 NIC as the source port and VM-1 NIC as the destination port. On the Session tab of the details page of the port mirroring, click Add Session. On the displayed Add Session page, set the following parameters:
    • Name: Enter a name for the session.
    • Type: Select Bidirection.
    • Source VM: Select VM-2.
    • Source NIC: Select the corresponding NIC.
    • Destination VM: Select VM-1.
    • Destination NIC: Select the corresponding NIC.
    Figure 2. Add Session


  6. Test whether the port mirroring works properly.
    1. Launch the console of the source VM. Use the ping dhcp-server-ip command to send ICMP message to the DHCP server.
      Figure 3. Source VM Sends ICMP Message


    2. Launch the console of the destination VM. Use the tcpdump -eni vnic17.1 icmp command to check whether the ICMP message is copied by the port mirroring.
      Figure 4. Destination VM Receives ICMP Message


    As described above, the destination VM has copied the network message of the source VM through the port mirroring. The port mirroring takes effect as expected, and the user can use the network messages received by VM-1 for monitoring and analysis.

So far, we have introduced the practice of port mirroring of flow network.

Archives

Download Document Archives

Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.