1. Technical Field
The present disclosure relates to server virtualizations in general, and in particular to distributed virtual switches. More particularly, the present disclosure relates to a method for providing location independent dynamic port mirroring on distributed virtual switches.
2. Description of Related Art
Generally speaking, server virtualization describes a software abstraction that separates a physical resource and its use from the underlying physical machine. Most physical resources, such as processors, storage devices, and network adaptors, can be abstracted and provisioned as virtualized entities.
Virtual machines (VMs) play a central role in server virtualization. A VM is a virtualization of a physical machine and its hardware components. A VM typically includes a virtual processor, a virtual system memory, and various virtual devices. A single physical machine can host multiple VMs. Guest operating systems can be executed on VMs and function as though executing on actual hardware of a physical machine.
A hypervisor or virtual machine manager provides an interface between VMs and the underlying hardware of a physical machine. By multiplexing all accesses to the underlying hardware among various VMs, a hypervisor guarantees various VM the usage of the actual hardware, such as processors, system memory, etc., of the physical machine.
A typical server virtualization implementation generally requires multiple VMs to share a network adapter or network interface card (NIC) of a physical machine for performing external network input/output operations. A hypervisor typically provides a virtual switch (vswitch) that provides interconnectivity among the VMs on the physical machine. With each VM having one or more virtual NICs (vNICs), the vswitch interfaces between the NIC of the physical machine and the vNICs of the associated VMs. In general, each vNIC operates like a physical NIC, being assigned a media access control (MAC) address that is typically different from that of the physical NIC. The vswitch performs the routing of packets between the various vNICs and the physical NIC.
The present disclosure provides an improved method for providing port mirroring on distributed vswitches.
In accordance with a preferred embodiment of the present disclosure, a controller is provided to configure one or more virtual switches within a group of physical machines to appear as a set of distributed virtual switches. In response to the receipt of a data packet at a port of a physical machine, a determination is made whether or not the port has a monitor port located on the physical machine. If the port has a monitor port located on the same physical machine, a copy of the data packet is sent to the monitor port of the physical machine. If the port has a monitor port located on a different physical machine, a copy of the data packet along with an identification (ID) of the port and an ID of the monitor port are encapsulated, and the encapsulated information are sent to a controller.
All features and advantages of the present disclosure will become apparent in the following detailed written description.
The disclosure itself, as well as a preferred mode of use, further objects, and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
Referring now to the drawings and in particular to
Each of physical machines 12a-12n may include hardware such as processors, memories, input/output (I/O) devices, network interface cards (NICs) or converged network adapters (CNAs), etc. Physical machines 12a-12n can reside alone or be stacked together within a chassis such as in a rack server or in a blade server, and network switch 19 can reside alone or be stacked within the same chassis as one or more of physical machines 12a-12n.
Each of physical machines 12a-12n may host one or more end-nodes. In
Network switch 19 includes multiple physical downlink ports 15a-15n and multiple physical uplink ports 16a-16n. Network switch 19 performs switching of data packets between physical downlink ports 15a-15n and physical uplink ports 16a-16n. Each of physical machines 12a-12n is directly connected to one of physical downlink ports 15a-15n via a corresponding one of physical links 13a-13n. Physical uplink ports 16a-16n serve to connect network switch 19 to network 14 via physical uplinks 17a-17n.
Network switch 19 may include a management module 11 by which network switch 19 is configured to perform switching of data packets based on virtual ports (v-ports). An Ethernet switch is an exemplary implementation of network switch 19.
With reference now
End-nodes 28a-28n are computing or traffic-handling entities operating on physical machines 12a-12n connected to a physical port of v-port switch 19. Such entities can be physical entities, such as a network interface card (NIC), or virtual entities, such as a virtual NIC of a virtual machine.
The generation of a v-port for v-port switch 29 can occur statically through administrator configurations or dynamically (i.e., in real-time) through end-node discovery and automatic v-port assignments. V-port switch 29 uses v-ports 25a-25n in similar fashions to those of physical ports. Because full physical port functionality can be extended to v-ports 25a-25n, each one of v-ports 25a-25n is treated as having at least the same capabilities as a physical port.
The associations of v-ports 25a-25n to end-nodes 23a-23n are one-to-one. Examples of end-node associations of v-ports include, but are not limited to, an association with a virtual NIC or a subset thereof of a virtual machine operating on a physical machine, associations with different queues of a multi-queue NIC or a subset thereof on a physical machine, associations with different network queues or a subset thereof of a CNA, and associations with different types of traffic on a CNA, such as Fibre Channel over Ethernet (FCoE) traffic.
V-port switch 29 also defines uplink v-ports 26a-26n that are logically connected to physical uplink ports 16a-16n (from
Referring now to
Each one of VMs 31a-31c has one or more associated virtual interfaces (VIF), such as a virtual NIC, with each VIF having its own unique virtual MAC address (vMAC). In
Each one of VIFs 34a-34d is an example of a virtual end-node. A given one of VIFs 34a-34d can be configured to handle data networking or storage communications. VIFs that process data networking communications are examples of virtual network end-nodes, and VIFs that process storage communications are examples of virtual storage end-nodes.
Hypervisor 30 is in communication with a NIC 60 that handles the I/Os to and from v-port switch 29. Through hypervisor 30, VIFs 34a-34d are logically connected to NEC 60 via virtual links 38.
NIC 60 is connected to a physical port 32a by a physical link 39a. Logically associated with physical port 32a, as signified by virtual links 36a-36d, are four downlink v-ports 25a-25d. Each one of downlink v-ports 25a-25d is uniquely assigned to one of virtual end-nodes VIF 34a-34d. For example, v-port 25a can be assigned to VIF 34a; v-port 25b to VIF 34b; v-port 25c to VIF 34c; and v-port 25d to VIF 34d. These four downlink v-ports 25a-25d can also be considered logically associated with physical link 39a; that is, each one of downlink v-ports 25a-25d is a subdivided part of physical link 39a.
With reference now to
Each one of kernel-mode modules 42a-42n and each one of user-mode module 43a-43n interact with one another using operation system specific mechanisms. On the other hand, each one of user-mode modules 43a-43n communicates with controller 41 via sockets. The present invention utilizes the communication paths among kernel-mode modules 42a-42n, user-mode modules 43a-43n and controller 41 to encapsulate and to send data packets from a kernel-mode module on one of physical machines 12a-12n to a kernel-mode module on a different one of physical machines 12a-12n.
The multiplexing of the (mirrored) data packet destination is performed by controller 41. To accomplish this, controller 41 must be able to know the (socket) location of the user-mode module at each physical machine, and the user-mode module at the source port (end of the port mirror) must encapsulate sufficient information in the encapsulated data packets so that controller 41 can decide which one of physical machines 12a-12n the encapsulated packet should be directed to.
In order for a VM to come alive on a v-port, the v-port needs to report to controller 41 initially. For example, in
A user can assign and configures a monitor port of a (mirrored) port on a distributed switch by using a management tool. For example, VIF 34a can have a monitor port VIF 34a′.
Referring now to
If the port has a monitor port (e.g., monitor port VIF 34a′), another determination is made whether or not the monitor port is located on the same physical machine (e.g., physical machine 12a), as depicted in block 52. If the monitor port is not located on the same physical machine, then a copy of the data packet, the source port ID (i.e., port ID of VIF 34a) and the monitor port ID (i.e., port ID of VIF 34a′) are encapsulated and sent to the controller (e.g., controller 41), as shown in block 53. The controller then determines whether or not the monitor port ID is stored in its database, as depicted in block 54. If the monitor port ID is stored in the controller database, then the controller sends the data packet to the location of the monitor port ID based on the information stored in the controller database, as shown in block 55. Otherwise, if the monitor port ID is not stored in the controller database, the data packet is dropped, as depicted in block 56.
Otherwise, if the monitor port is located on the same physical machine, then a full copy of the incoming data packet is sent to the monitor port (i.e., monitor port VIF 34a′), as shown in block 57.
As has been described, the present disclosure provides a method for providing location independent dynamic port mirroring on distributed virtual switches.
It is also important to note that although the present invention has been described in the context of a fully functional computer system, those skilled in the art will appreciate that the mechanisms of the present invention are capable of being distributed as a program product in a variety of recordable type media such as compact discs and digital video discs.
While the disclosure has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the disclosure.