Configure RSPAN with VMware

A Remote Switched Port Analyzer (RSPAN) enables you to monitor traffic on one switch through a device on another switch, and then send the monitored traffic to one or more destinations. The following procedures explain how to configure RSPAN in a VMware environment for a virtual ExtraHop Discover appliance.

Before you begin

  • You must have experience with basic VMware ESX and ESXi administration through the VMware vSphere Web Client to complete these procedures.
  • This configuration requires an uplink port (or hardware NIC) to be attached to the switch (preferably one that is not designated for general network traffic).

For information about configuring the VMware vSphere server, see the Working with Port Mirroring section in the ESXi and vCenter documentation for your version of VMware.

For information about configuring VMware with a Discover appliance, see Deploy the ExtraHop Discover Appliance with VMware.

The following steps outline the key procedures that are required to configure RSPAN with VMware for an ExtraHop Discover appliance. Note that procedures in these steps might vary between versions of VMware.
  1. Create a virtual distributed switch (VDS)
  2. Add port groups to the VDS
  3. Add a host to the VDS
  4. Add uplink ports to the VDS
  5. Configure a port mirror on the VDS
  6. Associate a physical NIC to the uplink port
Note:While these steps are required for RSPAN configuration, most deployments have completed the first four steps prior to installing the ExtraHop Discover appliance.

Create a virtual distributed switch

Complete the following steps to create a virtual distributed switch (VDS). The VDS carries traffic from your virtual machines (VM) to your physical network and to other VMs.
  1. Log into the vSphere Web Client.
  2. In the left panel, click Distributed Switches.
  3. Above the list of switches, click the Create a new distributed switch icon.
  4. In the New Distributed Switch window, type a name for the switch, select the destination server, and then click Next.
  5. Select the distributed switch version and click Next.
  6. Edit the following settings:
    1. Set the Number of uplinks to two or more if your SPAN traffic is on a dedicated NIC, which is the recommended configuration. Otherwise, set this value to 1.
    2. Click the Network I/O Control drop-down list and select one of the following options.
      If your SPAN traffic on a dedicated NIC. (Recommended)
      If your SPAN traffic is on the same NIC as your monitored traffic.

Add port groups to the VDS

Complete the following steps to add port groups when you deploy a new virtual machine or add a new ESX host into your VDS environment. Port groups enable you to properly associate the new machine or host to the port group immediately.

  1. Click the Create a new distributed port group icon.
  2. In the New Distributed Port Group window, type a name for the port group and click Next.
  3. Configure the following settings:
    1. Click the Port binding drop-down list and select Static binding.
    2. Click the Port allocation drop-down list and select Fixed.
    3. In the Number of ports field, type the number of ports you want to connect.
    4. Leave the default settings for the remaining items.
    5. Click Next.
  4. Verify your settings and click Finish.

    The new port group appears on the Manage tab.

  5. Repeat these steps for any additional port groups.

Add a host to the VDS

Complete the following steps to add a host to the VDS. Skip this procedure if all hosts have already been added to the cluster. We recommend that you dedicate one uplink for management and one uplink for spanning.

  1. In the left panel tree control, click the switch.
  2. Click the Manage tab.
  3. Click Settings.
  4. Click the Add Hosts icon.
  5. In the Add and Manage Hosts dialog box, click the Add Hosts radio button and click Next.
  6. Click the green + icon to add a host.
  7. In the list of available hosts, select the checkbox next to the host and click OK.
  8. Select the host from the list and click Next.
  9. Select the checkboxes next to the network adapters you want to add to the host and click Next.
  10. Assign one of the NICs to the management port group.
    1. Select the network adapter from the list and click the Assign Port Group icon.
    2. In the Select Network pop-up window, select the port group to assign to the network adapter for management.
    3. Assign one NIC to the monitoring port group.
  11. Select the network adapter from the list and click the Assign Port Group icon.
  12. In the Select Network pop-up window, select the port group to assign to the network adapter for monitoring.
  13. After you have assigned each adapter to a Destination Port Group (in the far right column), click Next.
  14. On the Validate Changes screen, verify that the status has passed and click Next.
  15. Select the Migrate Virtual Machine Networking checkbox.
    The list of virtual machines appears.

  16. Click the Assign Port Group icon and assign a network adapter for management and a network adapter for monitoring, and click Next.
  17. Verify your settings and click Finish.
  18. View the progress bar in the right panel and wait for the system to add the host.

    The following figure shows an example configuration.

Complete the following steps to add an uplink port to the VDS. You must assign one uplink port to the VDS for each associated host.

  1. Browse to a host in the vSphere Web Client.
  2. Click the Manage tab, and then select Networking Virtual > Switches.
  3. From the list, select the distributed switch you want to add an uplink port to.
  4. Click Manage the physical network adapters.
  5. Click Add.
  6. From the list, select a network adapter and then select the uplink port from the drop-down menu that you want to assign to the network adapter.
  7. Click OK.

Configure a port mirror

Complete the following steps to configure a port mirror to view traffic on the VDS, to configure the local switch to view external traffic, and to configure the ExtraHop virtual Discover appliance to do a combination of both. The ExtraHop virtual Discover appliance can be deployed in environments with multiple ESX servers connected with a virtual distributed switch (VDS).

The ExtraHop Discover appliance must be deployed on an ESX host managed by vCenter with a VDS already configured. For more information about virtual distributed switches, see the following VMware documentation:

Port mirroring with VMware requires the source port and destination port to be on the same ESX host, therefore the virtual Discover appliance must be on each host that has mirrored ports. The following diagram describes which traffic type is mirrored based on the mirror's destination port's host location.

  1. Access the virtual distributed switch.
    1. Open vSphere and log into vCenter.
    2. Under Inventory, click Networking, and select the VDS you want to monitor.
  2. Optional: Create a new port group. We recommend that you collect all ports for monitoring in one port group.
    1. Right-click the name of the VDS and select New Port Group.
    2. Give the VDS a name and choose the number of ports you want to make available. The default number of ports is 128, but we recommend that you set this number lower to reflect the likely number of traffic mirroring ports.
  3. Assign the ExtraHop VM to the port group.
    1. Change the Inventory setting to Hosts and Clusters.
    2. Right-click the ExtraHop VM on the ESX host and select Edit Settings.
    3. Change the Ethernet 2 (capture port) setting to the new port group and click OK.
  4. Verify the VM and port group assignment.
    1. Return to the Networking section and select Monitor Port Group.
    2. Click the Ports tab. The ExtraHop monitor interface is displayed and assigned to a port.
    3. Note the port ID for a later step (such as 282 in the example below). This ID will be the destination for the port mirror configuration.
  5. Find the set of source ports. The source ports can be a continuous range of ports or a specific port, but the ports cannot be uplink ports. Ports can be unassigned, but they have to exist. To find the ports you want to assign, select the VDS in the tree control and click the Ports tab. If you only want to send ports from specific port groups, you can view the ports associated with each port group.)

    The ports in the figure below are sorted by name to show all the uplink ports and to ensure that these ports are not in range. Note the range.

  6. Configure the port mirror.
    1. Right-click the name of the VDS and select Edit Setting.
    2. In the Settings dialog box, click the Port Mirroring tab.
    3. Click Add, type a name, and then complete the Port Mirror Wizard.
    4. Choose the source ports.
    5. Select the destination port, which is the port associated with the Discover appliance.
    6. Review the results and click Finish.
    7. Click OK to push the changes to the ESX servers.
      All ports in the source list that are on the same physical ESX host as the destination port will be monitored. Traffic on ESX hosts remote to the destination port will not be monitored unless the ESX hosts communicate with ports mirrored on the destination's host.

      The ExtraHop virtual appliance will now monitor all data going in and out of each port on the active ports you have defined. Check for errors in the status pane at the bottom of the screen, and if necessary, repeat the setup in the Port Mirror Wizard.

      The following cases might cause errors during setup:

      • Non-instantiated ports in the range.
      • Ports that are Uplink ports for the source.
      • Source or destination ports that have the promiscuous flag enabled.
      • Destination assignments to an already-assigned destination.
      • More than 4000 ports in your source list. (In this case, the Port Mirror Wizard errors out and you will need to recreate the mirror setup with a smaller range.)

        To send more ports, edit the current port mirror. If the port count for that port mirror is over 4000, we recommend that you associate another interface from the VM to the monitor port group with an EDA 2000v and create a separate mirror for that interface. Sending different ports to different capture ports is not recommended because traffic between the mirrored source ports might not be complete or might result in multiple devices.

Complete the following steps for each host to associate the physical VMNIC with the new uplink port for port mirroring.

  1. Browse to the vCenter hosts tree control and select Hosts.
  2. Select the host you want to configure.
  3. Select the Manage tab and click Networking.
  4. In the left pull-out tree control, select Virtual Switches and select your VDS from the list.
  5. Click the Add host networking icon.
  6. In the Add Networking pop-up window, select the Physical Network Adapter radio button, and click Next.
  7. On the Select target device screen, click Browse.
  8. In the Select Switch pop-up window, select the VDS, and click OK.
  9. Click Next.
  10. Select the uplink port and click the green + icon.
  11. From the Uplink port drop-down list, select Span Out, select the VMNIC, and then click OK.
  12. Click Next.
  13. Verify your settings and click Finish.
  14. Repeat these steps for each host in your VDS.

    The following figure shows an example configuration of uplink ports associated with physical NICs.

Published 2019-10-11 14:52