WO2018228302A1 - 用于虚拟网络链路检测的方法及装置 - Google Patents

用于虚拟网络链路检测的方法及装置 Download PDF

Info

Publication number
WO2018228302A1
WO2018228302A1 PCT/CN2018/090562 CN2018090562W WO2018228302A1 WO 2018228302 A1 WO2018228302 A1 WO 2018228302A1 CN 2018090562 W CN2018090562 W CN 2018090562W WO 2018228302 A1 WO2018228302 A1 WO 2018228302A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual
network
machine
switch
namespace
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2018/090562
Other languages
English (en)
French (fr)
Inventor
袁航
周雍恺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Unionpay Co Ltd
Original Assignee
China Unionpay Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Unionpay Co Ltd filed Critical China Unionpay Co Ltd
Publication of WO2018228302A1 publication Critical patent/WO2018228302A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines

Definitions

  • the present invention relates generally to virtual network technologies and, in particular, to a scheme for virtual network link detection.
  • VM Virtual Machine
  • Virtual machines derived through software simulation typically have complete hardware system functionality and a complete computer system running in a fully isolated environment.
  • Virtual machines can be implemented on physically existing computers.
  • a physical computer may be referred to as a physical machine with respect to a virtual machine.
  • These physical machines provide a hardware environment for virtual machines and are therefore sometimes referred to as "hosts" or "hosts.”
  • hosts or "hosts.”
  • Multiple virtual machines can be implemented simultaneously on a single physical machine, or virtual machines can be implemented across physical machines.
  • virtual switches can be provided to connect virtual networks on the same physical machine and/or different physical machines. Such virtual networks can be used to build cloud platforms in practical applications.
  • the present invention provides a scheme for virtual network link detection that can improve the above problems.
  • the present invention provides a method for virtual network link detection, the virtual network comprising a virtual switch implemented within the same physical machine and one or more virtual machines communicatively coupled to the virtual switch,
  • the method includes: (a) acquiring network information of each of the one or more virtual machines; (b) creating a namespace within the physical machine; (c) creating the namespace in the namespace Establishing a communication connection between the virtual switches; (d) setting network information of the namespace according to network information of the virtual machine to be detected in the one or more virtual machines; (e) passing the virtual space from the namespace
  • the switch sends a detection signal to the virtual machine to be detected; and (f) determining a chain between the virtual machine to be detected and the virtual switch according to the feedback of the detection signal by the virtual machine to be detected. Is the road normal?
  • step (a) comprises obtaining an IP address of each virtual machine, a virtual local area network identifier, and a switch port identifier corresponding to the virtual machine on the virtual switch.
  • step (d) comprises setting an IP address of the namespace to be in the same network segment as the virtual machine to be detected and causing the namespace to be recognized by the virtual switch as The virtual machines that are to be detected have the same virtual local area network identifier.
  • step (c) comprises assigning a switch port to the namespace on the virtual switch.
  • step (d) comprises setting a virtual local area network identifier identical to the virtual machine to be detected in a switch port allocated for the namespace.
  • the detection signal is a PING signal.
  • step (a) comprises obtaining network information of each virtual machine from a database of the cloud platform.
  • the present invention provides an apparatus for virtual network link detection, comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program is executed on the processor
  • the apparatus is caused to perform the method as described above.
  • the present invention also provides a physical machine including a virtual switch and one or more virtual machines communicatively coupled to the virtual switch, wherein the physical machine further includes virtual A device for network link detection.
  • the present invention also provides a computer readable storage medium having stored thereon a computer program executable by a processor to perform the steps of the method of any of the above.
  • FIG. 1 is an implementation scenario of a method for virtual network link detection in accordance with one embodiment of the present invention.
  • FIG. 2 is a flow diagram of a method for virtual network link detection in accordance with one embodiment of the present invention.
  • the present invention is directed to the detection of virtual network links, which may be generally understood by those skilled in the art for transmission of network data within one or more physical machines.
  • the virtual network to which the present invention is directed generally includes a virtual switch implemented within the same physical machine and one or more virtual machines communicatively coupled to the virtual switch.
  • a virtual switch can be a multi-layer virtual switch running on a virtualization platform such as Open vSwitch (OVS), providing the same functions as other physical switches, such as network isolation, QoS configuration, and traffic, for the virtual machines on its physical machines. Monitoring, packet analysis.
  • This type of virtual switch can be extended to automate the configuration, management, and maintenance of large-scale networks and support existing standard management interfaces and protocols.
  • the virtual switch involved in the present invention can be implemented in any form as long as it can provide a network connection for a virtual machine on a physical machine with the same function as the physical switch.
  • An important application form of virtual networks is to provide a cloud platform.
  • the present invention can be applied to detecting virtual network links on a cloud platform.
  • the implementation of the present invention will be described in detail below in conjunction with the application of the cloud platform. However, those skilled in the art will appreciate that the present invention can be applied to any scenario in which a virtual network can be applied.
  • System 100 can be a cloud platform implemented by a virtual machine on which the methods provided by the present invention can be applied.
  • the method provided by the present invention can be applied to the system 100 shown in FIG.
  • system 100 can include a physical switching network 10, which can be a distributed core network of a "spine-leaf" architecture, which can include a spine node 102 and a leaf node 101.
  • the spine node 102 can be used to connect to a physical switch, while the leaf node 101 can be used to connect servers and network devices.
  • the solution provided by the present invention will be further described below with leaf node 101 as the physical machine in which the virtual machine is implemented.
  • leaf node 101 as the physical machine in which the virtual machine is implemented.
  • spine-leaf architecture shown in Figure 1 is not limiting. The invention can be applied to any other network architecture including physical machines.
  • the host node 20 is illustrated with the leaf node 101 as a general configuration of the physical machine.
  • "host” and “physical machine” may be used interchangeably, each of which refers to a body in which a virtual machine can be implemented.
  • virtual machine 203 can be implemented within host 20 and data exchange between virtual machines 203 can be provided by virtual switch 202.
  • Detection means 201 may be further provided in host 20 to perform the various methods provided by the present invention to detect virtual network link status between virtual machines 203.
  • detection device 201 can include a memory, a processor, and a computer program stored on the memory. The detection means can be caused to perform the various methods provided by the present invention when these computer programs are executed on a processor.
  • the detection device 201 is integrated in a physical machine. Accordingly, the detecting means 201 can be implemented by sharing a processor and a memory in the physical machine. In particular, in some examples, detection device 201 can be implemented in a mechanism such as an agent. In other examples, detection device 201 may also be implemented separately, such as a device that is configured to be independent of a physical machine, or implemented in a processing system that is independent of the physical machine.
  • FIG. 2 is a flow diagram of a method for virtual network link detection in accordance with one embodiment of the present invention.
  • the network information of each virtual machine 203 is obtained.
  • the network information of the virtual machine 203 may include an IP address, a virtual local area network identifier vlanID, and a corresponding switch port identifier on the virtual machine and the virtual switch.
  • virtual machine information within each physical machine can be obtained, for example, from cloud platform database 30.
  • the cloud platform database 30 may include information related to all virtual machines on the physical switching network 10, such as which virtual machines are included in each physical machine, network information of each virtual machine (such as an IP address, a vlan ID, and The network port letter corresponding to it, the port mapping relationship between the virtual machine and the virtual switch, and the like).
  • each virtual machine is connected to the bridge through a port on the virtual switch.
  • this information can be stored in a database, such as cloud platform database 30, as well as network information for other virtual machines.
  • obtaining the corresponding switch port identification on the virtual machine and the virtual switch may include two aspects.
  • the network port ID of the virtual machine can be obtained from the cloud platform database, and on the other hand, for example, by calling the control interface of the virtual switch to get all of its ports connected to the virtual machine.
  • the detecting device 201 can further associate the network port data of the virtual machine with the port data of the virtual switch to obtain a mapping relationship between the two for later detection. For example, in order to manage effectively, some virtual switches follow certain rules when port naming. For example, the Openstack cloud platform names the network ports of the virtual switch by using a fixed prefix plus the ID interception information of the virtual machine network port.
  • the port IDf467189c-341f-42fc-8056-065255e14530 of the virtual machine is named qvo-f467189c-34.
  • the detecting device 201 can construct a mapping relationship table for subsequent query use.
  • the detecting device 201 can acquire network information of the virtual machine by directly accessing the cloud platform database 30, especially if the detection for the virtual network is less frequent.
  • an additional virtual network detection platform 40 implemented external to the virtual machine may be provided.
  • the network information of the virtual machine may be collected centrally from the cloud platform database by the virtual network detection platform 40 and stored in its local database. Further, the detection device 201 retrieves the required information from the modified virtual network detection platform 40.
  • Such an implementation would be particularly advantageous for high frequency virtual machine detection (e.g., in the order of seconds or even milliseconds) as this avoids the detection device 201 from accessing the cloud platform database at excessive frequencies.
  • the data collection module on the virtual network detection platform 40 can be configured to update the data in real time, for example, periodically to the cloud platform database for information synchronization. Since the frequency of occurrence of virtual machine network information changes is not too high, the period of information synchronization can be set longer. Since the amount of data of the virtual machine network information is not very large, and the above mentioned period of information synchronization is also long, it does not impose an excessive burden on the network.
  • the detection device 201 will create a namespace within the physical machine in which it resides.
  • the namespace may be the concept of a virtual network body used to isolate network related resources on a virtual machine as understood by those skilled in the art.
  • Each network namespace can have its own network device, IP address, IP routing table, /proc/net directory, port number, and so on.
  • IP address IP address
  • IP routing table IP routing table
  • /proc/net directory /proc/net directory
  • port number and so on.
  • Those skilled in the art will be able to implement such a namespace in any technology known or to be developed in the future.
  • An example of a namespace is the Linux Network Names.
  • the detecting means 201 can be configured to establish a communication connection between the established namespace and the virtual switch. In some examples, this may include assigning a switch port to a namespace on a virtual switch in a physical machine such that the namespace can access the bridge as other virtual machines. Specifically, a network port can be created within the namespace and connected to the virtual switch.
  • the detecting device 201 can further set the network information of the namespace according to the network information of the specific virtual machine 203 to be detected.
  • the IP address of the namespace can be set to be in the same network segment as the virtual machine to be detected and the namespace is identified by the virtual switch as having the same virtual local area network identity as the virtual machine to be detected.
  • the same virtual local area network identifier vlanID as the virtual machine to be detected can be set in the switch port allocated for the namespace.
  • the detecting means 201 can send a detection signal from the established namespace to the virtual machine to be detected through the virtual switch.
  • the transmitted detection signal can be a PING signal.
  • PING Packet Internet Groper
  • PING Packet Internet Groper
  • the data packet determines if the two network machines are connected and the delay is. Therefore, you can use the PING command to check whether the network is smooth or the network connection speed.
  • PING signals any other mechanism that can be used to determine if two network machines are connected can be employed in the context of the present invention.
  • the detecting device 201 can determine whether the link between the virtual machine and the virtual switch is normal according to the feedback of the virtual machine to the detection signal. For example, if the PING is used to communicate with the virtual machine, if the connection is available, the link of the virtual switch is normal, and if the PING is unreachable, the virtual link is faulty.
  • the detecting device 201 can record information of the link, such as a bridge, a port, a virtual machine, and the like, and send the detection result to the detection result processing module in the virtual network detecting platform 40. Since there are usually more than one virtual machine on the physical machine, each virtual machine can be detected by a round robin policy to ensure that the detection range covers each link inside the physical machine. For the detection of each virtual machine, the namespace is reset, such as resetting the IP address and vlanID. The detecting device 201 can feed back the detection result back to the virtual network detecting platform 40 after the loop detection is completed.
  • detection device 201 can also be configured to detect and feed back the detection results for the virtual network in accordance with steps 11-16 in response to the detection instructions of virtual network detection platform 40.
  • the virtual network detecting platform 40 may further normalize the detection result and then send the data to the network monitoring system 50, as shown in FIG. Thereby, the detection of the virtual network can be effectively integrated into the entire network monitoring system, thereby providing more complete and conclusive network detection results, which will include both physical networks and virtual networks.
  • the invention provides a fault detection scheme for a virtual network link inside a physical machine, which solves the problem that the internal software switch and the virtual network of the physical machine cannot be monitored.
  • the method and device provided by the invention can effectively extend the scope of the network monitoring, and extend the monitoring strength from the outside of the physical machine to the inside of the physical machine, so that the monitoring system is more suitable for an environment such as a cloud network.
  • the method and the device of the invention can also greatly enhance the accuracy of the network problem location, thereby improving the automation capability and operation and maintenance efficiency of the operation and maintenance.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明提供了一种用于虚拟网络链路检测的方法,所述虚拟网络包括实现在同一物理机内的虚拟交换机以及与虚拟交换机通信连接的一个或多个虚拟机。该方法包括:获取所述一个或多个虚拟机中的每个虚拟机的网络信息;在所述物理机内创建命名空间;在所述命名空间与所述虚拟交换机之间建立通信连接;根据所述一个或多个虚拟机中待检测的虚拟机的网络信息设置所述命名空间的网络信息;从所述命名空间通过所述虚拟交换机向所述待检测的虚拟机发送检测信号;以及根据待检测的虚拟机对所述检测信号的反馈来判断待检测的虚拟机与所述虚拟交换机之间的链路是否正常。此外,本发明还提供了对应的检测装置以及应用上述虚拟网络链路检测方案的物理机。

Description

用于虚拟网络链路检测的方法及装置 技术领域
本发明一般地涉及虚拟网络技术,并且具体地,涉及用于虚拟网络链路检测的方案。
背景技术
虚拟化技术中一个重要的概念就是虚拟机(VM:Virtual Machine),简单来说就是模拟出来的一台虚拟的计算机,或者说是逻辑上的一台计算机。通过软件模拟得到的虚拟机通常具有完整的硬件系统功能的以及运行在一个完全隔离环境中的完整计算机系统。
可以在物理存在的计算机上实现虚拟机。相对于虚拟机,实体计算机可以被称为物理机。这些物理机为虚拟机提供硬件环境,因此有时也被称为“寄主”或“宿主”。可以在一台物理机上同时实现多台虚拟机,也可以跨物理机实现虚拟机。此外,还可以提供虚拟交换机从而将同一物理机和/或不同物理机上的虚拟网络,这样的虚拟网络在实际应用中可以被用来构建云平台。
当前的数据中心监控系统大都是针对业务系统的流量进行监控。在传统的数据中心里,业务系统部署在物理机中,只有物理链路会影响当前业务数据。然而,在虚拟化环境下,网络将渗透到物理机内部。当检测到业务数据中断时,并不能断定问题是出现在物理机外部的物理链路上还是物理机内部的虚拟链路上。
当前业界已经有了针对物理交换机以及相关物理链路的监控检测方法,但是仍然缺少对虚拟交换机和相关虚拟网络链路的检测。因此,所期望的是设计一种用于虚拟网络链路的监控检测方案。
发明内容
有鉴于此,本发明提供了一种用于虚拟网络链路检测的方案,可改善上述问题。
一方面,本发明提供了一种用于虚拟网络链路检测的方法,所述虚拟网络包括实现在同一物理机内的虚拟交换机以及与所述虚拟交换机通信连接的一个或多个虚拟机,所述方法包括:(a)获取所述一个或多个虚拟机中的每个虚拟机的网络信息;(b)在所述物理机内创建命名空间;(c)在所述命名空间与所述虚拟交换机之间建立通信连接;(d)根据所述一个或多个虚拟机中待检测的虚拟机的网络信息设置所述命名空间的网络信息;(e)从所述命名空间通过所述虚拟交换机向所述待检测的虚拟机发送检测信号;以及(f)根据所述待检测的虚拟机对所述检测信号的反馈来判断所述待检测的虚拟机与所述虚拟交换机之间的链路是否正常。
如上所述的方法,其中,步骤(a)包括获取每个虚拟机的IP地址、虚拟局域网标识以及所述虚拟交换机上与该虚拟机上对应的交换机端口标识。
如上所述的方法,其中,步骤(d)包括将所述命名空间的IP地址设置为与所述待检测的虚拟机处于同一网段以及使所述命名空间被所述虚拟交换机识别为与所述待检测的虚拟机具有相同的虚拟局域网标识。
如上所述的方法,其中,步骤(c)包括在所述虚拟交换机上为所述命名空间分配交换机端口。
如上所述的方法,其中,步骤(d)包括在为所述命名空间分配的交换机端口中设置与所述待检测的虚拟机相同的虚拟局域网标识。
如上所述的方法,其中,所述检测信号为PING信号。
如上所述的方法,其还包括针对所述一个或多个虚拟机中的每个虚拟机执行步骤(d)-(f)。
如上所述的方法,其中,所述虚拟网络构成云平台,并且,步骤(a)包括从所述云平台的数据库中获取每个虚拟机的网络信息。
另一方面,本发明还提供了一种用于虚拟网络链路检测的装置,其包括存储器、处理器以及存储在存储器上的计算机程序,其中,当在所述处理器上执行所述计算机程序时使所述装置执行如上所述的方法。
此外,本发明还提供了一种物理机,所述物理机包括虚拟交换机以及与所述虚拟交换机通信连接的一个或多个虚拟机,其中,所述物理机还包括如上所述的用于虚拟网络链路检测的装置。
此外,本发明还提供一种计算机可读存储介质,其上存储有计算机程序,该程序可被处理器执行以实现如上任一项所述方法的步骤。
附图说明
本发明的前述和其他目标、特征和优点根据下面对本发明的实施例的更具体的说明将是显而易见的,这些实施例在附图中被示意。
图1是根据本发明的一个实施例的用于虚拟网络链路检测的方法的实施场景。
图2是根据本发明的一个实施例的用于虚拟网络链路检测的方法的流程图。
具体实施方式
现在参照附图描述本发明的示意性示例,相同的附图标号表示相同的元件。下文描述的各示例有助于本领域技术人员透彻理解本发明,且各示例意在示例而非限制。图中各元件、部件、模块、装置及设备本体的图示仅示意性表明存在这些元件、部件、模块、装置及设备本体同时亦表明它们之间的相对关系,但并不用以限定它们的具体形状;流程图中各步骤的关系也不以所给出的顺序为限,可根据实际应用进行调整但不脱离本申请的保护范围。
如在背景技术中所描述的那样,本发明针对虚拟网络链路的检测,其中虚拟网络链路可以是本领域技术人员通常所理解的用于网络数据在一个或多个物理机内部进行传输的链路的概念。本发明所针对的虚拟网络通常包括实现在同一物理机内的虚拟交换机以及与该虚拟交换机通信连接的一个或多个虚拟机。
虚拟交换机可以是诸如Open vSwitch(OVS)那样的运行在虚拟化平台上的多层虚拟交换机,为其所在物理机上的虚拟机提供了和其他物理交换机一样的功能,如网络隔离、QoS配置、流量监控、数据包分析。可以通过对这样的虚拟交换机进行编程扩展,从而实现大规模网络的自动化配置、管理、维护,并且支持现有标准管理接口和协议。本领域技术人员能够理解,本发明所涉及的虚拟交换机可以任何形式来实现,只要其能够以与物理交换机同样的功能为物理机上的虚拟机提供网络连接。
目前虚拟网络的一种重要应用形态是提供云平台。因此,本发明能够被应用于对云平台上的虚拟网络链接进行检测。下面将结合云平台的应用来详细描述本发明的实现。然而,本领域技术人员能够理解本发明可以适用于任何能够应用虚拟网络的场景。
图1是根据本发明的一个实施例的用于虚拟网络链路检测的方法的实施场景。系统100可以是由虚拟机实现的云平台,在该平台上能够应用本发明所提供的方法。在图1所示的系统100中能够应用本发明所提供的方法。一般地,系统100可以包括物理交换网络10,该物理交换网络可以是“脊-叶”(spine-leaf)架构的分布式核心网络,其可以包括脊节点102以及叶节点101。
通常,脊节点102可以被用于连接物理交换机,而叶节点101可以被用于连接服务器和网络设备。下面将以叶节点101作为在其中实现虚拟机的物理机来进一步描述本发明所提供的方案。然而,本领域技术人员能够理解图1所示的“脊-叶”(spine-leaf)架构并不是限定性的。本发明可以适用于任何其他包含物理机的网络架构。
以主机20示意了叶节点101作为物理机的大体构造。在本文中,“主机”和“物理机”可以相互替换地使用,均表示能够在其中实现虚拟机的主体。如图1所示,可以在主机20内实现虚拟机203,并且通过虚拟交换机202来提供虚拟机203之间的数据交换。
可以进一步地在主机20中设置检测装置201来执行本发明所提供的各种方法,从而检测虚拟机203之间的虚拟网络链路状态。在一些示例中,检测装置201能够包括存储器、处理器以及存储在存储器上的计算机程序。当在处理器上执行这些计算机程序时可以使检测装置执行本发明所提供的各种方法。
在图1所示的实施例中,检测装置201被集成在物理机中。相应地,可以通过共用物理机中的处理器和存储器来实现检测装置201。具体而言,在一些示例中,检测装置201能够以诸如代理(Agent)的机制来实现。在另一些示例中,检测装置201也可以单独地被实现,例如被构造为独立于物理机的装置,或在独立于物理机的处理系统中实现。
下面将结合图2来描述检测装置201的操作。图2是根据本发明的一个实施例的用于虚拟网络链路检测的方法的流程图。
在步骤11中,获取每个虚拟机203的网络信息。举例来说,虚拟机203的网络信息可以包括IP地址、虚拟局域网标识vlanID以及该虚拟机与虚拟交换机上对应的交换机端口标识。
在系统100为云平台的背景下,可以例如从云平台数据库30获得每台物理机内部的虚拟机信息。在实践中,云平台数据库30可以包括与物理交换网络10上所有的虚拟机相关的信息,例如每一台物理机内包括哪些虚拟机、每台虚拟机的网络信息(如IP地址、vlanID以及其所对应的网络端口信、虚拟机与虚拟交换机的端口映射关系及诸如此类的信息)。
类似于一般的物理交换机,在物理机内部的虚拟网络构建中,每个虚拟机都会通过虚拟交换机上的一个端口连接到网桥上。为了实现本发明所提供的虚拟网络检测方法,需要获得虚拟机与虚拟交换机的端口映射关系。在一些示例中,该信息能够与其他虚拟机的网络信息一样已经被存储在例如云平台数据库30的数据库中。
在另一些示例中,获得虚拟机与虚拟交换机上对应的交换机端口标识可以包括两个方面。一方面,可以从云平台数据库获得虚拟机的网络端口ID,而另一方面例如通过调用虚拟交换机的控制接口来得到其所有连接虚拟机的端口。检测装置201可以进而将虚拟机的网络端口数据与虚拟交换机的端口数据进行对应,得到两者的映射关系,以供后续进行检测时使用。举例来说,为了有效管理,有些虚拟交换机在进行端口命名的时候遵循一定规则。例如Openstack云平台是通过固定前缀加上虚拟机网络端口的ID截取信息来对该虚拟交换机的网络端口进行命名。如虚拟机的port IDf467189c-341f-42fc-8056-065255e14530,那么该虚拟机对应的OpenvSwitch虚拟交换机端口的命名就是qvo-f467189c-34。检测装置201在获得两方面的信息之后可以自行构建一个映射关系表以便后续查询使用。
在一些示例中,检测装置201能够通过直接访问云平台数据库30来获取虚拟机的网络信息,尤其是在针对虚拟网络的检测不那么频繁的情况下。
在另一些示例中,除了实现在物理机内部的检测装置201之外,还可以提供实现在虚拟机外部的另外的虚拟网络检测平台40。可以首先由虚拟网络 检测平台40集中地从云平台数据库采集虚拟机的网络信息,并且将这些信息存储在其本地的数据库中。进一步地,再由检测装置201从改虚拟网络检测平台40上取得所需要的信息。这样的实现对于高频率的虚拟机检测(例如秒级甚至是毫秒级)将是尤其有利的,因为这避免了检测装置201对云平台数据库过高频率的访问。
为了防止虚拟机信息发生变化,虚拟网络检测平台40上的数据采集模块可以被配置为对数据进行实时更新,例如周期性地去云平台数据库中进行信息同步。由于虚拟机网络信息发生改变这一事件的发生频率不会太高,所以信息同步的周期可以设置的较长一些。由于虚拟机网络信息的数据量并不是很大,而且上面也提到信息同步的周期也比较长,所以不会对网络产生过重的负担。
在步骤12中,检测装置201将在其所在的物理机内创建命名空间。命名空间可以是本领域技术人员所理解的在虚拟机上用于隔离网络相关资源的虚拟网络主体的概念。每个网络命名空间可以有其自己的网络设备、IP地址、IP路由表、/proc/net目录、端口号等等。本领技术人员能够以任何已知或将来待开发的技术来实现这样的命名空间。命名空间的一个例子是Linux网络命名控件(Network namespaces)。
在步骤13中,检测装置201可以被配置为使所建立的命名空间与虚拟交换机之间建立通信连接。在一些示例中,这可以包括在物理机中的虚拟交换机上为命名空间分配交换机端口,从而使得该命名空间能够与其他虚拟机一样接入网桥。具体地,可以在命名空间内创建一个网络端口,并且将该网络端口连接到虚拟交换机上。
在步骤14中,检测装置201可以根据具体某一个待检测的虚拟机203的网络信息来进一步设置命名空间的网络信息。在一些示例中,可以将命名空间的IP地址设置为与待检测的虚拟机处于同一网段并且使该命名空间被虚拟交换机识别为与待检测的虚拟机具有相同的虚拟局域网标识。举例来说,可以在为命名空间分配的交换机端口中设置与待检测的虚拟机相同的虚拟局域网标识vlanID。
在步骤15中,检测装置201可以从所建立的命名空间通过虚拟交换机向待检测的虚拟机发送检测信号。举例来说,所发送的检测信号可以是PING 信号。PING(Packet Internet Groper:分组因特网探测器)是常被用于测试网络连接量的程序,其利用网络上机器IP地址的唯一性,给目标IP地址发送一个数据包,再要求对方返回一个同样大小的数据包来确定两台网络机器是否连接相通以及时延是多少。因此,利用PING命令就可以来检查网络是否通畅或者网络连接速度。然而,本领域技术人员能够理解本发明不限于PING信号的使用,其他任何能够用于确定两台网络机器是否连接的机制均可以在本发明的背景下采用。
在步骤16中,检测装置201可以根据待检测的虚拟机对检测信号的反馈来判断该虚拟机与虚拟交换机之间的链路是否正常。例如,在用PING的方式与虚拟机进行通讯的情况下,如果可以连通,则说明虚拟交换机的这个链路是正常的,而如果PING不通,则说明该虚拟链路有故障出现。
在实践中,检测装置201可以记录该条链路的信息,如网桥、端口、虚拟机等信息,并将检测结果上送到虚拟网络检测平台40中的检测结果处理模块。由于物理机上通常设置有多于一台的虚拟机,因此还可以采用循环策略对每台虚拟机进行检测,保证检测范围覆盖物理机内部的每条链路。针对每个虚拟机的检测,都要对命名空间中进行重新设置,例如重新设置IP地址和vlanID。检测装置201可以在循环检测完毕后,将检测结果一起反馈回虚拟网络检测平台40。
在一些示例中,检测装置201还可以被配置为响应于虚拟网络检测平台40的检测指令来根据步骤11-16来针对虚拟网络进行检测并且反馈检测结果。
在一些情况下,虚拟网络检测平台40在接收到从检测装置201发来的检测结果后,可以进一步对检测结果进行标准化封装,然后将数据发送至网络监控系统50,如图1所示。由此,可以将虚拟网络的检测有效地集成到整个网络监控体系中,从而提供更完整确凿的网络检测结果,这将既包括物理网络也包括虚拟网络。
本发明提出了一种用于物理机内部虚拟网络链路的故障检测方案,其解决了无法对物理机内部软件交换机和虚拟网络进行监控的问题。采用本发明所提供的方法和设备能够有效地延伸网络监控的范围,将监控力度从物理机外部延伸到物理机内部,使监控系统更加适用于诸如云网络的环境。通过本 发明的方法和装置还可以大大增强网络问题定位的精确度,从而提升运维的自动化能力以及运维效率。
应当说明的是,以上具体实施方式仅用以说明本发明的技术方案而非对其进行限制。尽管参照上述具体实施方式对本发明进行了详细的说明,本领域的普通技术人员应当理解,依然可以对本发明的具体实施方式进行修改或对部分技术特征进行等同替换而不脱离本发明的实质,其均涵盖在本发明请求保护的范围中。

Claims (11)

  1. 一种用于虚拟网络链路检测的方法,所述虚拟网络包括实现在同一物理机内的虚拟交换机以及与所述虚拟交换机通信连接的一个或多个虚拟机,所述方法包括:
    (a)获取所述一个或多个虚拟机中的每个虚拟机的网络信息;
    (b)在所述物理机内创建命名空间;
    (c)在所述命名空间与所述虚拟交换机之间建立通信连接;
    (d)根据所述一个或多个虚拟机中待检测的虚拟机的网络信息设置所述命名空间的网络信息;
    (e)从所述命名空间通过所述虚拟交换机向所述待检测的虚拟机发送检测信号;以及
    (f)根据所述待检测的虚拟机对所述检测信号的反馈来判断所述待检测的虚拟机与所述虚拟交换机之间的链路是否正常。
  2. 如权利要求1所述的方法,其中,步骤(a)包括获取每个虚拟机的IP地址、虚拟局域网标识以及所述虚拟交换机上与该虚拟机上对应的交换机端口标识。
  3. 如权利要求2所述的方法,其中,步骤(d)包括将所述命名空间的IP地址设置为与所述待检测的虚拟机处于同一网段以及使所述命名空间被所述虚拟交换机识别为与所述待检测的虚拟机具有相同的虚拟局域网标识。
  4. 如权利要求3所述的方法,其中,步骤(c)包括在所述虚拟交换机上为所述命名空间分配交换机端口。
  5. 如权利要求4所述的方法,其中,步骤(d)包括在为所述命名空间分配的交换机端口中设置与所述待检测的虚拟机相同的虚拟局域网标识。
  6. 如权利要求1所述的方法,其中,所述检测信号为PING信号。
  7. 如权利要求1所述的方法,其还包括针对所述一个或多个虚拟机中的每个虚拟机执行步骤(d)-(f)。
  8. 如权利要求1所述的方法,其中,所述虚拟网络构成云平台,并且,步骤(a)包括从所述云平台的数据库中获取每个虚拟机的网络信息。
  9. 一种用于虚拟网络链路检测的装置,其包括存储器、处理器以及存储在存储器上的计算机程序,其中,当在所述处理器上执行所述计算机程序时使所述装置执行如权利要求1-8中任一项所述的方法。
  10. 一种物理机,所述物理机包括虚拟交换机以及与所述虚拟交换机通信连接的一个或多个虚拟机,其中,所述物理机还包括如权利要求9所述的用于虚拟网络链路检测的装置。
  11. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序可被处理器执行以实现如权利要求1-8中任一项所述方法的步骤。
PCT/CN2018/090562 2017-06-13 2018-06-11 用于虚拟网络链路检测的方法及装置 Ceased WO2018228302A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710441855.1 2017-06-13
CN201710441855.1A CN107566152B (zh) 2017-06-13 2017-06-13 用于虚拟网络链路检测的方法及装置

Publications (1)

Publication Number Publication Date
WO2018228302A1 true WO2018228302A1 (zh) 2018-12-20

Family

ID=60972771

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/090562 Ceased WO2018228302A1 (zh) 2017-06-13 2018-06-11 用于虚拟网络链路检测的方法及装置

Country Status (3)

Country Link
CN (1) CN107566152B (zh)
TW (1) TWI732125B (zh)
WO (1) WO2018228302A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112152998A (zh) * 2020-08-20 2020-12-29 唐山钢铁集团有限责任公司 一种跨越多层网络设备进行数据包监听和捕捉的方法
CN112235300A (zh) * 2020-10-14 2021-01-15 腾讯科技(深圳)有限公司 云虚拟网络漏洞检测方法、系统、装置及电子设备
CN114363226A (zh) * 2021-12-27 2022-04-15 北京安博通科技股份有限公司 一种基于虚拟化复杂网络场景中设备自动测试方法和系统
CN114422296A (zh) * 2022-01-05 2022-04-29 北京天一恩华科技股份有限公司 一种多场景虚拟网络构建系统、方法、终端及存储介质
CN117014341A (zh) * 2023-04-07 2023-11-07 北京勤慕数据科技有限公司 虚拟交换机的测试方法、系统

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107566152B (zh) * 2017-06-13 2020-03-31 中国银联股份有限公司 用于虚拟网络链路检测的方法及装置
CN108632378B (zh) * 2018-05-11 2021-04-27 国云科技股份有限公司 一种面向云平台业务的监控方法
CN110505110B (zh) * 2018-05-18 2021-07-20 杭州海康威视数字技术股份有限公司 网络接口的测试方法、装置及多网口主机
CN108712308B (zh) * 2018-06-06 2021-11-26 郑州云海信息技术有限公司 虚拟网络中检测网络设备的方法和装置
CN110875854B (zh) * 2018-08-29 2023-04-07 阿里巴巴集团控股有限公司 检测虚拟专用网络中虚拟机联通性的方法和装置及存储介质
US10742686B2 (en) 2018-08-29 2020-08-11 Cisco Technology, Inc. Enforcing network endpoint policies in a cloud-based environment using a covert namespace
CN110011984B (zh) * 2019-03-19 2021-07-06 西安微电子技术研究所 一种基于rest和rpc的分布式集群系统及方法
CN111756629B (zh) * 2019-03-26 2022-06-03 中移(苏州)软件技术有限公司 设备接入overlay网络及通信的方法、装置、设备、网络及介质
CN110753093B (zh) * 2019-09-29 2022-11-29 苏州浪潮智能科技有限公司 云计算系统中设备的管理方法和装置
CN112887163B (zh) * 2019-11-29 2022-08-05 北京金山云网络技术有限公司 一种连通性测试方法、装置、电子设备及存储介质
CN111193643A (zh) * 2019-12-31 2020-05-22 苏州浪潮智能科技有限公司 一种云服务器状态监控系统及方法
CN113973327A (zh) * 2020-07-22 2022-01-25 中国移动通信集团广东有限公司 一种域域网的物理链路调测方法、装置及电子设备
CN115225589A (zh) * 2022-07-17 2022-10-21 奕德(广州)科技有限公司 一种基于虚拟分组交换的CrossPoint交换方法
CN115242688B (zh) * 2022-07-27 2024-06-14 郑州浪潮数据技术有限公司 一种网络故障检测方法、装置以及介质
CN115955689B (zh) * 2022-11-30 2025-12-05 工业和信息化部电子第五研究所 一种无人机虚实互联的方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130036416A1 (en) * 2011-08-05 2013-02-07 Vmware, Inc. Detecting and correcting network interruptions using network address translation
CN106487633A (zh) * 2016-10-11 2017-03-08 中国银联股份有限公司 一种虚拟机异常的监测方法和装置
CN106603330A (zh) * 2016-12-07 2017-04-26 国云科技股份有限公司 一种云平台检查虚拟机连接状态的方法
CN107566152A (zh) * 2017-06-13 2018-01-09 中国银联股份有限公司 用于虚拟网络链路检测的方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201512990A (zh) * 2013-09-25 2015-04-01 Hope Bay Technologies Inc 虛擬機器的拓樸架構管理方法及其系統
CN106789407A (zh) * 2016-12-05 2017-05-31 国云科技股份有限公司 一种云平台检查虚拟机连接状态的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130036416A1 (en) * 2011-08-05 2013-02-07 Vmware, Inc. Detecting and correcting network interruptions using network address translation
CN106487633A (zh) * 2016-10-11 2017-03-08 中国银联股份有限公司 一种虚拟机异常的监测方法和装置
CN106603330A (zh) * 2016-12-07 2017-04-26 国云科技股份有限公司 一种云平台检查虚拟机连接状态的方法
CN107566152A (zh) * 2017-06-13 2018-01-09 中国银联股份有限公司 用于虚拟网络链路检测的方法及装置

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112152998A (zh) * 2020-08-20 2020-12-29 唐山钢铁集团有限责任公司 一种跨越多层网络设备进行数据包监听和捕捉的方法
CN112152998B (zh) * 2020-08-20 2022-11-15 唐山钢铁集团有限责任公司 一种跨越多层网络设备进行数据包监听和捕捉的方法
CN112235300A (zh) * 2020-10-14 2021-01-15 腾讯科技(深圳)有限公司 云虚拟网络漏洞检测方法、系统、装置及电子设备
CN112235300B (zh) * 2020-10-14 2023-10-24 腾讯科技(深圳)有限公司 云虚拟网络漏洞检测方法、系统、装置及电子设备
CN114363226A (zh) * 2021-12-27 2022-04-15 北京安博通科技股份有限公司 一种基于虚拟化复杂网络场景中设备自动测试方法和系统
CN114363226B (zh) * 2021-12-27 2024-03-01 北京安博通科技股份有限公司 一种基于虚拟化复杂网络场景中设备自动测试方法和系统
CN114422296A (zh) * 2022-01-05 2022-04-29 北京天一恩华科技股份有限公司 一种多场景虚拟网络构建系统、方法、终端及存储介质
CN114422296B (zh) * 2022-01-05 2024-02-20 北京天一恩华科技股份有限公司 一种多场景虚拟网络构建系统、方法、终端及存储介质
CN117014341A (zh) * 2023-04-07 2023-11-07 北京勤慕数据科技有限公司 虚拟交换机的测试方法、系统
CN117014341B (zh) * 2023-04-07 2024-05-10 北京勤慕数据科技有限公司 虚拟交换机的测试方法、系统

Also Published As

Publication number Publication date
TWI732125B (zh) 2021-07-01
TW201904234A (zh) 2019-01-16
CN107566152A (zh) 2018-01-09
CN107566152B (zh) 2020-03-31

Similar Documents

Publication Publication Date Title
WO2018228302A1 (zh) 用于虚拟网络链路检测的方法及装置
US8423639B2 (en) Switching API
US9992086B1 (en) External health checking of virtual private cloud network environments
US11743325B1 (en) Centralized load balancing of resources in cloud edge locations embedded in telecommunications networks
US8774055B2 (en) Switching method
CN105099779B (zh) 多租户云平台架构
US11652717B2 (en) Simulation-based cross-cloud connectivity checks
US20070260721A1 (en) Physical server discovery and correlation
EP4042642B1 (en) Dynamic discovery of service nodes in a network
CN106982244B (zh) 在云网络环境下实现动态流量的报文镜像的方法和装置
US9882784B1 (en) Holistic validation of a network via native communications across a mirrored emulation of the network
WO2018107382A1 (zh) 分布式负载均衡系统、健康检查方法和服务节点
JP2018522471A (ja) ソフトウェアディファインドデータセンタ及びそこにおけるサービスクラスタの配置方法
US10999178B2 (en) Information processing apparatus and information processing system
WO2018035804A1 (zh) 拨测方法、拨测系统和计算节点
US10944633B2 (en) Methods and apparatus to configure virtual and physical networks for hosts in a physical rack
CN115314336A (zh) vBRAS的用户上线方法及相关设备
CN109639488A (zh) 一种多外网分流加速方法及系统
CN120528842B (zh) 一种虚拟机网络连通性测试方法、设备、介质及产品
CN110519147A (zh) 数据帧传输方法、装置、设备和计算机可读存储介质
US12088493B2 (en) Multi-VRF and multi-service insertion on edge gateway virtual machines
US10924397B2 (en) Multi-VRF and multi-service insertion on edge gateway virtual machines
CN116530130A (zh) 用于虚拟化服务的主动保证
HK1244972B (zh) 用於虚拟网络链路检测的方法及装置
HK1244972A1 (zh) 用於虚拟网络链路检测的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18818817

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18818817

Country of ref document: EP

Kind code of ref document: A1