CN110581800B - Method and device for creating virtual router interface, storage medium and equipment - Google Patents

Method and device for creating virtual router interface, storage medium and equipment Download PDF

Info

Publication number
CN110581800B
CN110581800B CN201910782191.4A CN201910782191A CN110581800B CN 110581800 B CN110581800 B CN 110581800B CN 201910782191 A CN201910782191 A CN 201910782191A CN 110581800 B CN110581800 B CN 110581800B
Authority
CN
China
Prior art keywords
network
interface
gateway
virtual
virtual router
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.)
Active
Application number
CN201910782191.4A
Other languages
Chinese (zh)
Other versions
CN110581800A (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910782191.4A priority Critical patent/CN110581800B/en
Publication of CN110581800A publication Critical patent/CN110581800A/en
Application granted granted Critical
Publication of CN110581800B publication Critical patent/CN110581800B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/58Association of routers
    • H04L45/586Association of routers of virtual routers

Abstract

The embodiment of the application provides a method and a device for creating a virtual router interface, a storage medium and equipment, wherein the method comprises the following steps: when a tenant network is added to a virtual router, a three-layer proxy L3agent selects an unused first Virtual Function (VF) from a plurality of Virtual Functions (VFs) virtualized by a network card of a physical network corresponding to the tenant network to create a tenant network interface for the virtual router; setting the network attribute of the first VF based on the network attribute of the tenant network; when a gateway is set for a virtual router, the L3agent selects an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network to create a gateway interface for the virtual router; the network attributes of the second VF are set based on the network attributes of the gateway network. Therefore, the physical network card equipment can be directly used as a flow forwarding interface during message forwarding, so that a message forwarding path can be shortened, and the L3 network forwarding performance is improved.

Description

Method and device for creating virtual router interface, storage medium and equipment
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to a method and an apparatus for creating a virtual router interface, a storage medium, and a device.
Background
Openstack is an open-source cloud platform management project and can provide extensible and flexible cloud platform management. Since Openstack has many tenants, in order to ensure the security of each tenant, in the cloud data center of Openstack, isolation is required between different tenants.
At present, in a private cloud, Openstack generally uses a Virtual Router (vRouter) to forward east-west traffic and south-north traffic, but because Openstack uses a Virtual network card device as an east-west traffic and south-north traffic forwarding interface, messages that need to be received or sent by a Virtual machine need to be processed by a kernel many times, a forwarding path is too long, and a three-layer (L3) network forwarding performance is low.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for creating a Virtual router interface, a storage medium, and a device, where a tenant network interface and a gateway interface are created through a Virtual Function (VF) in a network card of a physical network based on Single Root I/O Virtualization (SR-IOV), so that the tenant network interface and the gateway interface are both SR-IOV type interfaces, and thus, in a packet forwarding process, a Virtual network card device is not used as an east-west traffic forwarding interface and a south-north traffic forwarding interface, but a physical network card device is directly used as an east-west traffic forwarding interface and a south-north traffic forwarding interface, so that a packet forwarding path can be shortened, and L3 network forwarding performance can be improved.
The embodiment of the application mainly provides the following technical scheme:
in a first aspect, an embodiment of the present application provides a method for creating a virtual router interface, where the method includes: when a tenant network is added to a virtual router, a three-layer proxy L3agent selects an unused first Virtual Function (VF) from a plurality of Virtual Functions (VFs) virtualized by a network card of a physical network corresponding to the tenant network to establish a tenant network interface for the virtual router; setting a network attribute of the first VF based on a network attribute of the tenant network; when a gateway is set for a virtual router, an L3agent selects an unused second VF from a plurality of VFs virtualized by a network card of a physical network corresponding to the gateway network to establish a gateway interface for the virtual router; setting the network attributes of the second VF based on the network attributes of the gateway network.
In a second aspect, an embodiment of the present application provides an apparatus for creating a virtual router interface, where the apparatus includes: the first interface creating unit is used for selecting an unused first Virtual Function (VF) from a plurality of Virtual Functions (VFs) virtualized by a network card of a physical network corresponding to a tenant network by a three-layer proxy L3agent to create a tenant network interface for the virtual router when the tenant network is added to the virtual router; a first setting unit, configured to set a network attribute of the first VF based on a network attribute of the tenant network; the second interface creating unit is used for selecting an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network from the L3agent when the gateway is set for the virtual router to create a gateway interface for the virtual router; and the second setting unit is used for setting the network attribute of the second VF based on the network attribute of the gateway network.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where the storage medium includes a stored program, where the program, when running, controls a computer device in which the storage medium is located to perform the above-mentioned steps of the method for creating a virtual router interface.
In a fourth aspect, an embodiment of the present application provides a computer device, where the computer device includes: at least one processor; and at least one memory, bus connected with the processor; the processor and the memory complete mutual communication through the bus; the processor is configured to call program instructions in the memory to perform the steps of the above-described method of creating a virtual router interface.
First, when a tenant network is added to a virtual router, a third-layer proxy L3agent selects an unused first Virtual Function (VF) from a plurality of virtual VFs virtualized by a network card of a physical network corresponding to the tenant network to create a tenant network interface for the virtual router, and sets a network attribute of the first VF based on a network attribute of the tenant network; then, when a gateway is set for the virtual router, the L3agent selects an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network to create a gateway interface for the virtual router, and sets the network attribute of the second VF based on the network attribute of the gateway network. Therefore, the created virtual router interface is realized, namely, the tenant network interface and the gateway interface are both SR-IOV type interfaces, and the virtual router can support the SR-IOV technology, so that in the message forwarding process, the virtual network card equipment is not used as an east-west flow forwarding interface and a south-north flow forwarding interface, but the physical network card equipment is directly used as the east-west flow forwarding interface and the south-north flow forwarding interface, so that the L3 network forwarding performance of the virtual router is accelerated to reach the network forwarding performance equivalent to that of a physical machine, the message forwarding path can be shortened, and the L3 network forwarding performance is improved.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. Other advantages of the application may be realized and attained by the instrumentalities and combinations particularly pointed out in the specification, claims, and drawings.
Drawings
The accompanying drawings are included to provide an understanding of the present disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the examples serve to explain the principles of the disclosure and not to limit the disclosure.
Fig. 1 is a schematic flowchart of a method for creating a virtual router interface in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an apparatus for creating a virtual router interface in an embodiment of the present application;
fig. 3 is a schematic structural diagram of a computer device in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The embodiment of the application provides a method for creating a virtual router interface. Be applied to Openstack cloud platform, Openstack cloud platform includes: neutron component, network card of physical network.
Wherein, Neutron subassembly includes: computing node, network node, control node, wherein, computing node includes: virtual machine, the network node includes: virtual router, L3 agent.
Here, the network card of the physical network is a network card supporting the SR-IOV function. The network card of the Physical network includes one or more PFs (Physical Functions), wherein each PF virtualizes one or more VFs.
Fig. 1 is a schematic flowchart of a method for creating a virtual router interface in this embodiment, and referring to fig. 1, the method for creating a virtual router interface may include:
s101: when a tenant network is added to a virtual router, an L3agent selects an unused first Virtual Function (VF) from a plurality of Virtual Functions (VFs) virtualized by a network card of a physical network corresponding to the tenant network to establish a tenant network interface for the virtual router;
in practical application, in order to enable the virtual router to support the SR-IOV technology, the VF needs to be added to the virtual router, and then, when a tenant network is added to the virtual router, the L3agent may select an unused first VF from the VFs virtualized by the network card of the physical network corresponding to the tenant network to create a tenant network interface for the virtual router, so that the created tenant network interface is an SR-IOV type interface.
In another embodiment of the present application, the S101 may include: when a tenant network is added to the virtual router, the L3agent obtains a field for indicating the type of the virtual network card bound by the tenant network interface; the L3agent determines whether a field for indicating the virtual network card type bound by the tenant network interface is a field for representing a single-root input/output virtualization (SR-IOV) type; if so, the L3agent selects an unused first Virtual Function (VF) from a plurality of Virtual Functions (VFs) virtualized by a network card of a physical network corresponding to the tenant network to establish a tenant network interface for the virtual router.
In practical application, a field for indicating the virtual network card type bound by the tenant network interface may be a vnic _ type field, where the vnic _ type field may support two types of fields, namely normal and direct, and if the direct field is introduced when the tenant network is added, it indicates that the virtual network card type bound by the tenant network interface is a field for representing an SR-IOV type.
As an example, after creating the virtual router, the tenant network may be added to the virtual router through an interface operation or through a command line or directly calling a neurtron API interface. In order to make the tenant network interface SR-IOV type, when adding the tenant network to the virtual router, the neurtron process in the Neutron component can pass the vnic _ type field to the L3agent through the neuron _ server process deployed in the control node. Next, the L3-agent triggers the router _ interface _ add module, and then the router _ interface _ add module can determine whether the vnic _ type field is a direct field, and if so, obtains the network card of the physical network of the tenant network pair, and selects an unused first VF to create a router interface, i.e., a tenant network interface.
S102: setting the network attribute of the first VF based on the network attribute of the tenant network;
specifically, after the tenant network interface is created according to the first VF, in order to enable the tenant network interface to normally receive and send the packet, the first VF needs to set a corresponding network attribute according to the network attribute of the tenant network.
Here, the network attribute may refer to a network type and a network ID.
In a specific implementation process, if the Network type of the tenant Network is a Virtual Local Area Network (VLAN), the step S102 may include: the VLAN attribute of the first VF is set to the VLAN attribute of the tenant network.
Specifically, the network type of the first VF may be set to the VLAN type and the network ID of the first VF may be set to the VLAN ID of the tenant network.
S103: when a gateway is set for a virtual router, the L3agent selects an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network to establish a gateway interface for the virtual router;
in practical application, in order to enable the virtual router to support the SR-IOV technology, the VF needs to be added to the virtual router, and in order that the virtual machine can be connected to the gateway network and further connected to an external network, when the virtual router sets the gateway, the L3agent can select an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network to create a gateway interface for the virtual router, so that the created gateway interface is an SR-IOV type interface.
In another embodiment of the present application, the S103 may include: when a gateway is set for a virtual router, the L3agent obtains a field for indicating the type of a virtual network card bound by a gateway interface; the L3agent determines whether a field for indicating the type of the virtual network card bound by the gateway interface is a field for representing the SR-IOV type; if so, the L3agent selects an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network to create a gateway interface for the virtual router.
In practical application, a field for indicating the type of the virtual network card bound by the gateway network interface may be a vnic _ type field, where the vnic _ type field may support two types of fields, namely normal and direct, and if the direct field is introduced when the gateway is set, a field for indicating that the type of the virtual network card bound by the gateway interface is a type for representing an SR-IOV is introduced.
As an example, after the virtual router is created, the gateway can be set up for the virtual router through interface operation, or through a command line or directly calling a neurtron API interface. In order to extend the gateway interface to be SR-IOV type, when setting the gateway for the virtual router, the Neutron component may transfer the vnic _ type field to the L3agent through the neuron _ server deployed in the control node. Next, the L3-agent triggers the router-update module, and the router-update module may determine whether the vnic _ type field is a direct field, and if so, obtain a network card of the physical network of the gateway network pair, and select an unused second VF to create a router interface, i.e., a gateway interface.
S104: the network attributes of the second VF are set based on the network attributes of the gateway network.
Specifically, after the gateway interface is created according to the second VF, in order to enable the gateway interface to normally receive and send the packet, the second VF needs to set a corresponding network attribute according to the network attribute of the gateway network.
In a specific implementation process, if the network type of the gateway network is a VLAN, the step S104 may include: the VLAN attribute of the second VF is set to the VLAN attribute of the gateway network.
Specifically, the network type of the second VF may be set to the VLAN type and the network ID of the second VF may be set to the VLAN ID of the gateway network.
At this point, the process of creating a virtual router interface based on SR-IOV is completed.
As can be seen from the above, in the method for creating a virtual router interface provided in the embodiment of the present application, first, when a tenant network is added to a virtual router, a third-layer proxy L3agent selects an unused first VF from a plurality of virtual functions VFs virtualized by a network card of a physical network corresponding to the tenant network to create the tenant network interface for the virtual router, and sets a network attribute of the first VF based on a network attribute of the tenant network; then, when a gateway is set for the virtual router, the L3agent selects an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network to create a gateway interface for the virtual router, and sets the network attribute of the second VF based on the network attribute of the gateway network. Therefore, the created virtual router interface is realized, namely, the tenant network interface and the gateway interface are both SR-IOV type interfaces, the virtual router can support SR-IOV technology, the virtual router can be directly connected with the physical network card, and the L3 network forwarding performance of the virtual router can be accelerated to reach the network forwarding performance equivalent to that of a physical machine, so that when the tenant network interface and the gateway interface are used for forwarding messages, the message forwarding path can be shortened, and the L3 network forwarding performance can be improved.
Based on the same inventive concept, as an implementation of the method, the embodiment of the present application provides a device for creating a virtual router interface. Fig. 2 is a schematic structural diagram of an apparatus for creating a virtual router interface in an embodiment of the present application, and referring to fig. 2, the apparatus 20 for creating a virtual router interface may include: a first interface creating unit 201, configured to select, when a tenant network is added to a virtual router, an unused first VF from multiple virtual functions VF virtualized by a network card of a physical network corresponding to the tenant network by a three-layer proxy L3agent to create a tenant network interface for the virtual router; a first setting unit 202, configured to set a network attribute of the first VF based on a network attribute of the tenant network; a second interface creating unit 203, configured to select, when a gateway is set for the virtual router, an unused second VF from the multiple VFs virtualized by the network card of the physical network corresponding to the gateway network by the L3agent, to create a gateway interface for the virtual router; a second setting unit 204, configured to set a network attribute of the second VF based on the network attribute of the gateway network.
In the embodiment of the application, the first interface creating unit is configured to, when a tenant network is added to the virtual router, obtain, by the L3agent, a field for indicating a virtual network card type to which a tenant network interface is bound; the L3agent determines whether a field for indicating the virtual network card type bound by the tenant network interface is a field for representing a single-root input/output virtualization (SR-IOV) type; if so, the L3agent selects an unused first Virtual Function (VF) from a plurality of Virtual Functions (VFs) virtualized by a network card of a physical network corresponding to the tenant network to establish a tenant network interface for the virtual router.
In the embodiment of the present application, the second interface creating unit is configured to, when a gateway is set for a virtual router, obtain, by an L3agent, a field for indicating a type of a virtual network card bound to an interface of the gateway; the L3agent determines whether a field for indicating the type of the virtual network card bound by the gateway interface is a field for representing the SR-IOV type; if yes, the L3agent selects an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network to establish a gateway interface for the virtual router
In this embodiment of the application, the first setting unit is configured to set the VLAN attribute of the first VF to the VLAN attribute of the tenant network if the network type of the tenant network is a VLAN.
In this embodiment of the present application, the first setting unit is configured to set the VLAN attribute of the second VF to the VLAN attribute of the gateway network if the network type of the gateway network is a virtual local area network VLAN.
Based on the same inventive concept, the embodiment of the application provides computer equipment. Fig. 3 is a schematic structural diagram of a computer device in an embodiment of the present application, and referring to fig. 3, the computer device 30 includes: at least one processor 31; and at least one memory 32, a bus 33, connected to the processor 31; the processor 31 and the memory 32 complete communication with each other through the bus 33; the processor 31 is configured to call program instructions in the memory 32 to perform the steps of the method of creating a virtual router interface in one or more of the embodiments described above.
Accordingly, based on the same inventive concept, embodiments of the present application further provide a processor, where the processor is configured to execute a program, where the program executes the steps of the method for creating a virtual router interface in one or more embodiments described above.
The Processor may be implemented by a Central Processing Unit (CPU), a microprocessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like. The Memory may include volatile Memory in a computer readable medium, Random Access Memory (RAM), and/or nonvolatile Memory such as Read Only Memory (ROM) or Flash Memory (Flash RAM), and the Memory includes at least one Memory chip.
It should be noted that, in the embodiment of the present application, if the method for creating a virtual router interface in one or more embodiments described above is implemented in the form of a software functional module, and is sold or used as a stand-alone product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof that contribute to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods of the embodiments of the present application.
Accordingly, based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and when the program runs, the computer device in which the storage medium is controlled to execute the steps of the method for creating a virtual router interface in one or more embodiments described above.
Here, it should be noted that: the above description of the apparatus, computer device or computer-readable storage medium embodiments is similar to the description of the method embodiments above, with similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus, the computer device or the computer-readable storage medium of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
The present application describes embodiments, but the description is illustrative rather than limiting and it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are possible. Any feature or element of any embodiment may be used in combination with or instead of any other feature or element in any other embodiment, unless expressly limited otherwise.
The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in this application may also be combined with any conventional features or elements to form a unique inventive concept as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive aspects to form yet another unique inventive aspect, as defined by the claims. Thus, it should be understood that any of the features shown and/or discussed in this application may be implemented alone or in any suitable combination. Accordingly, the embodiments are not limited except as by the appended claims and their equivalents. Furthermore, various modifications and changes may be made within the scope of the appended claims.
Further, in describing representative embodiments, the specification may have presented the method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other orders of steps are possible as will be understood by those of ordinary skill in the art. Therefore, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Further, the claims directed to the method and/or process should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the embodiments of the present application.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

Claims (10)

1. A method of creating a virtual router interface, the method comprising:
when a tenant network is added to a virtual router, a three-layer proxy L3agent selects an unused first Virtual Function (VF) from a plurality of Virtual Functions (VFs) virtualized by a network card of a physical network corresponding to the tenant network to create a tenant network interface for the virtual router;
setting a network attribute of the first VF based on a network attribute of the tenant network;
when a gateway is set for a virtual router, the L3agent selects an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network to create a gateway interface for the virtual router;
setting the network attributes of the second VF based on the network attributes of the gateway network.
2. The method according to claim 1, wherein when adding the tenant network to the virtual router, the selecting, by the triple-layer proxy L3agent, an unused first VF from a plurality of virtual functions VFs virtualized by a network card of a physical network corresponding to the tenant network to create a tenant network interface for the virtual router includes:
when a tenant network is added to the virtual router, the L3agent obtains a field for indicating the type of the virtual network card bound by the tenant network interface;
the L3agent determines whether the field for indicating the virtual network card type bound by the tenant network interface is a field for representing a single root input output virtualization (SR-IOV) type;
if yes, the L3agent selects an unused first VF from the multiple virtual functions VFs virtualized by the network card of the physical network corresponding to the tenant network to create a tenant network interface for the virtual router.
3. The method according to claim 1 or 2, wherein when the virtual router is configured with the gateway, the L3agent selects an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network to create the gateway interface for the virtual router, and the method includes:
when a gateway is set for a virtual router, the L3agent obtains a field for indicating the type of a virtual network card bound by a gateway interface;
l3agent determines whether the field for indicating the type of the virtual network card bound by the gateway interface is a field for representing the type of SR-IOV;
if yes, the L3agent selects an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network to create a gateway interface for the virtual router.
4. The method of claim 1, wherein setting the network attributes of the first VF based on the network attributes of the tenant network comprises:
if the network type of the tenant network is a Virtual Local Area Network (VLAN), setting the VLAN attribute of the first VF as the VLAN attribute of the tenant network.
5. The method of claim 1 or 4, wherein setting the network attributes of the second VF based on the network attributes of the gateway network comprises:
and if the network type of the gateway network is a Virtual Local Area Network (VLAN), setting the VLAN attribute of the second VF as the VLAN attribute of the gateway network.
6. An apparatus for creating a virtual router interface, the apparatus comprising:
the first interface creating unit is used for selecting an unused first Virtual Function (VF) from a plurality of Virtual Functions (VFs) virtualized by a network card of a physical network corresponding to a tenant network by a three-layer proxy L3agent to create a tenant network interface for the virtual router when the tenant network is added to the virtual router;
a first setting unit, configured to set a network attribute of the first VF based on a network attribute of the tenant network;
the second interface creating unit is configured to select, when a gateway is set for the virtual router, an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network by the L3agent to create a gateway interface for the virtual router;
and the second setting unit is used for setting the network attribute of the second VF based on the network attribute of the gateway network.
7. The apparatus according to claim 6, wherein the first interface creating unit is configured to, when a tenant network is added to the virtual router, obtain, by the L3agent, a field indicating a type of the virtual network card bound to the tenant network interface; the L3agent determines whether the field for indicating the virtual network card type bound by the tenant network interface is a field for representing a single root input output virtualization (SR-IOV) type; if yes, the L3agent selects an unused first VF from the multiple virtual functions VFs virtualized by the network card of the physical network corresponding to the tenant network to create a tenant network interface for the virtual router.
8. The apparatus according to claim 6 or 7, wherein the second interface creating unit is configured to, when a gateway is set for the virtual router, obtain, by the L3agent, a field indicating a type of the virtual network card bound by the gateway interface; l3agent determines whether the field for indicating the type of the virtual network card bound by the gateway interface is a field for representing the type of SR-IOV; if yes, the L3agent selects an unused second VF from the VFs virtualized by the network card of the physical network corresponding to the gateway network to create a gateway interface for the virtual router.
9. A computer-readable storage medium, characterized in that the storage medium comprises a stored program, wherein the program, when executed, controls a computer device on which the storage medium resides to perform the steps of the method of creating a virtual router interface according to any one of claims 1 to 5.
10. A computer device, characterized in that the computer device comprises:
at least one processor;
and at least one memory, bus connected with the processor;
the processor and the memory complete mutual communication through the bus; the processor is configured to invoke program instructions in the memory to perform the steps of the method of creating a virtual router interface as described in any one of claims 1 to 5.
CN201910782191.4A 2019-08-23 2019-08-23 Method and device for creating virtual router interface, storage medium and equipment Active CN110581800B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910782191.4A CN110581800B (en) 2019-08-23 2019-08-23 Method and device for creating virtual router interface, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910782191.4A CN110581800B (en) 2019-08-23 2019-08-23 Method and device for creating virtual router interface, storage medium and equipment

Publications (2)

Publication Number Publication Date
CN110581800A CN110581800A (en) 2019-12-17
CN110581800B true CN110581800B (en) 2021-07-02

Family

ID=68811897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910782191.4A Active CN110581800B (en) 2019-08-23 2019-08-23 Method and device for creating virtual router interface, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN110581800B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565048B (en) * 2020-11-20 2022-06-07 华云数据控股集团有限公司 Three-layer VPN (virtual private network) network creation method, three-layer VPN network data transmission method, three-layer VPN network creation device, three-layer VPN network data transmission device and electronic equipment
CN113630265B (en) * 2021-06-30 2023-04-07 济南浪潮数据技术有限公司 Virtual network redundancy backup method and device based on intelligent network card

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105284080A (en) * 2014-03-31 2016-01-27 华为技术有限公司 Data center system and virtual network management method of data center
CN106487695A (en) * 2015-08-25 2017-03-08 华为技术有限公司 A kind of data transmission method, virtual network managing device and data transmission system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9419897B2 (en) * 2014-06-30 2016-08-16 Nicira, Inc. Methods and systems for providing multi-tenancy support for Single Root I/O Virtualization

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105284080A (en) * 2014-03-31 2016-01-27 华为技术有限公司 Data center system and virtual network management method of data center
CN106487695A (en) * 2015-08-25 2017-03-08 华为技术有限公司 A kind of data transmission method, virtual network managing device and data transmission system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SR-IOV技术在OpenStack中的应用;张驰等;《计算机***应用》;20170915;第26卷(第9期);246-252 *

Also Published As

Publication number Publication date
CN110581800A (en) 2019-12-17

Similar Documents

Publication Publication Date Title
US10230765B2 (en) Techniques to deliver security and network policies to a virtual network function
US11606254B2 (en) Automatic configuring of VLAN and overlay logical switches for container secondary interfaces
WO2017152633A1 (en) Port binding implementation method and device
US9690605B2 (en) Configuration of an edge switch downlink port with a network policy of a published network configuration service type
EP3226132A1 (en) Virtual machine instance deployment method and apparatus and device
CN111224821B (en) Security service deployment system, method and device
KR101622206B1 (en) Packet processing of data using multiple media access controllers
CN107251486A (en) A kind of method for extending linkage, apparatus and system
CN110581800B (en) Method and device for creating virtual router interface, storage medium and equipment
CN109525515B (en) Management method and device for network card in cloud platform
US20220329495A1 (en) Network resource management method and system, network equipment and readable storage medium
CN111800523A (en) Management method, data processing method and system of virtual machine network
CN110839007B (en) Cloud network security processing method and device and computer storage medium
US10637748B2 (en) Method and apparatus for establishing interface between VNFMS, and system
EP4068708A1 (en) Network operation method, apparatus, and device and storage medium
CN107562650B (en) Method and system for mapping physical host to storage system
CN107294857B (en) Multicast distribution processing method, device and system
CN108768890B (en) Multi-tenant resource multiplexing method and device in SDN network and controller
CN106230740A (en) Message forwarding method in a kind of VXLAN and device
CN108965166A (en) Communication network mapped system/method, division/forwarding/correlating method and terminal
CN111698141B (en) Message forwarding method and device
EP4149062A1 (en) Deployment method and apparatus for virtualized network service
CN109445910B (en) Virtual machine VLAN management method, device, terminal and storage medium
CN108769098B (en) Method, device and system for establishing network connection of distributed storage system
CN116055312A (en) Fusion method, device, equipment and storage medium of virtualization platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant