CN113259500A - OVS network DHCP address pool method - Google Patents

OVS network DHCP address pool method Download PDF

Info

Publication number
CN113259500A
CN113259500A CN202110354675.6A CN202110354675A CN113259500A CN 113259500 A CN113259500 A CN 113259500A CN 202110354675 A CN202110354675 A CN 202110354675A CN 113259500 A CN113259500 A CN 113259500A
Authority
CN
China
Prior art keywords
dhcp
vlan
network
processor
interface
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.)
Pending
Application number
CN202110354675.6A
Other languages
Chinese (zh)
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.)
Unicloud Technology Co Ltd
Original Assignee
Unicloud 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 Unicloud Technology Co Ltd filed Critical Unicloud Technology Co Ltd
Priority to CN202110354675.6A priority Critical patent/CN113259500A/en
Publication of CN113259500A publication Critical patent/CN113259500A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5061Pools of addresses

Abstract

The invention provides a method for OVS network DHCP address pool, which provides a method for setting a DHCP service for each VLAN network aiming at the defect that the DHCP service can not sense the existence of VLAN, and is characterized in that: in the OVS network, a bridge interface with the type of internal is utilized, tag is set for the interface to associate messages of different VLANs, and DHCP service is configured on the interface to allocate different address pools. The invention has the beneficial effects that: the OVS network DHCP address pool method allocates different address pools for different VLANs, each VLAN address pool is independent and does not influence each other, and management of DHCP service of the VLAN network is realized through an OVS network internal bridge interface.

Description

OVS network DHCP address pool method
Technical Field
The invention belongs to the technical field of information, and particularly relates to an OVS network DHCP address pool method.
Background
VLAN is used as a virtual machine lan technology to isolate traffic of different tenants, and network services of a cloud computing platform are important in switch networking. Different VLANs correspond to different address pools and are used for isolating the flow in the address pools. How to assign different IP addresses in different VLAN networks. Usually, the DHCP server can allocate different address pools according to an option extension field of the DHCP protocol, and since the VLAN belongs to a two-layer network, the DHCP upper layer application cannot sense the existence of the VLAN.
Disclosure of Invention
In view of the above, the present invention is directed to an OVS network DHCP address pool method to solve the above-mentioned disadvantages.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method for setting a DHCP service for each VLAN network is provided aiming at the defect that the DHCP service can not sense the existence of the VLAN, a bridge interface with the type of internal is utilized in the OVS network, tag is set for the interface to associate messages of different VLANs, and the DHCP service is configured on the interface to allocate different address pools.
Further, an OVS network DHCP address pool method includes the following steps:
s1, adding physical ports eth1 and eth2 into the OVS;
s2, creating bridge ports of dhcp service, namely dhcp1 and dhcp2, wherein the dhcp1 and the dhcp2 are internal type bridge ports of tag1 and 2 respectively;
and S3, respectively associating the bridge interfaces with the corresponding TAPs, setting a dhcp address pool after successful association, and starting the dhcp service.
Furthermore, different VLANs are bound by using a bridge interface with the type of internal in the OVS network, different VLAN messages are processed by setting TAP on the interface, each TAP corresponds to one VLAN network, different address pools are distributed by starting the DHCP service on the interface, and meanwhile, based on the VLAN processing realized by the Linux virtual interface, if the equipment interfaces are more and the VLAN subnets are more, a plurality of VLAN virtual interfaces are created to process different VLAN messages of different interfaces.
In a second aspect, the present disclosure discloses an electronic device, which includes a processor and a memory, wherein the memory is communicatively connected to the processor and is configured to store executable instructions of the processor, and the processor is configured to execute the OVS network DHCP address pool method according to the first aspect.
In a third aspect, the present disclosure provides a server, including at least one processor, and a memory communicatively connected to the processor, where the memory stores instructions executable by the at least one processor, and the instructions are executable by the processor to cause the at least one processor to perform an OVS network DHCP address pool method as described in the first aspect.
In a fourth aspect, the present disclosure discloses a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the method for implementing the OVS network DHCP address pool according to the first aspect is implemented.
Compared with the prior art, the OVS network DHCP address pool method has the following beneficial effects:
the OVS network DHCP address pool method allocates different address pools for different VLANs, each VLAN address pool is independent and does not influence each other, and management of DHCP service of the VLAN network is realized through an OVS network internal bridge interface.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic diagram of an OVS network DHCP address pool method according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
VLAN is used as a virtual machine lan technology to isolate traffic of different tenants, and network services of a cloud computing platform are important in switch networking. Different VLANs correspond to different address pools and are used for isolating the flow in the address pools. How to assign different IP addresses in different VLAN networks. Usually, the DHCP server can allocate different address pools according to an option extension field of the DHCP protocol, and since the VLAN belongs to a two-layer network, the DHCP upper layer application cannot sense the existence of the VLAN.
Aiming at the defect that the DHCP service cannot sense the existence of the VLAN, a scheme of setting one DHCP service for each VLAN network is provided. In the OVS network, there is a type of bridge interface, which is internal, and different VLANs are bound with different DHCP services. The TAP is set on the interface to process different VLAN messages, each TAP corresponds to a VLAN network, a DHCP service is started on the interface to allocate different address pools, and VLAN processing is implemented based on Linux virtual interfaces, if there are more device interfaces and more VLAN subnets, a plurality of VLAN virtual interfaces need to be created to process different VLAN messages of different interfaces, for example, there are two eth0 and eth1 interfaces, which need to process messages of VLAN1 and VLAN2, so that four virtual interfaces of eth0.1, eth0.2, eth1.1 and eth1.2 need to be created, and this multiplication relationship is relatively complicated in a scenario where there are more network interfaces and VLAN subnets.
In an OVS network, there is a bridge interface of the type internal, which can associate packets of different VLANs by setting a tag for the interface, and configure a DHCP service on the interface to allocate different address pools, which is specifically implemented as shown in fig. 1.
As shown in fig. 1, an OVS network DHCP address pool method provides a method for setting a DHCP service for each VLAN network, aiming at the defect that the DHCP service cannot sense the existence of a VLAN, in the OVS network, a bridge interface of the type internal is used, tag is set for the interface to associate messages of different VLANs, and the DHCP service is configured on the interface to allocate different address pools.
An OVS network DHCP address pool method includes the following steps:
s1, adding physical ports eth1 and eth2 into the OVS;
s2, creating bridge ports of dhcp service, namely dhcp1 and dhcp2, wherein the dhcp1 and the dhcp2 are internal type bridge ports of tag1 and 2 respectively;
and S3, respectively associating the bridge interfaces with the corresponding TAPs, setting a dhcp address pool after successful association, and starting the dhcp service.
The method comprises the steps of utilizing a bridge interface with the type of internal in an OVS network to realize different VLANs to bind different DHCP services, setting TAP (test access point) on the interface to process different VLAN messages, enabling each TAP to correspond to one VLAN network, starting the DHCP service on the interface to distribute different address pools, and simultaneously creating a plurality of VLAN virtual interfaces to process different VLAN messages of different interfaces on the basis of VLAN processing realized by a Linux virtual interface under the condition that equipment interfaces are more and VLAN subnets are more.
In a second aspect, the present disclosure discloses an electronic device, which includes a processor and a memory, wherein the memory is communicatively connected to the processor and is configured to store executable instructions of the processor, and the processor is configured to execute the OVS network DHCP address pool method according to the first aspect.
In a third aspect, the present disclosure provides a server, including at least one processor, and a memory communicatively connected to the processor, where the memory stores instructions executable by the at least one processor, and the instructions are executable by the processor to cause the at least one processor to perform an OVS network DHCP address pool method as described in the first aspect.
In a fourth aspect, the present disclosure discloses a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the method for implementing the OVS network DHCP address pool according to the first aspect is implemented.
Those of ordinary skill in the art will appreciate that the elements and method steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of clearly illustrating the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided in the present application, it should be understood that the disclosed method and system may be implemented in other ways. For example, the above described division of elements is merely a logical division, and other divisions may be realized, for example, multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not executed. The units may or may not be physically separate, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A method for OVS network DHCP address pool, aiming at the defect that DHCP service can not sense VLAN, provides a method for setting a DHCP service for each VLAN network, which is characterized in that: in the OVS network, a bridge interface with the type of internal is utilized, tag is set for the interface to associate messages of different VLANs, and DHCP service is configured on the interface to allocate different address pools.
2. The OVS network DHCP address pool method according to claim 1, comprising the steps of:
s1, adding physical ports eth1 and eth2 into the OVS;
s2, creating bridge ports of dhcp service, namely dhcp1 and dhcp2, wherein the dhcp1 and the dhcp2 are internal type bridge ports of tag1 and 2 respectively;
and S3, respectively associating the bridge interfaces with the corresponding TAPs, setting a dhcp address pool after successful association, and starting the dhcp service.
3. The OVS network DHCP address pool method of claim 1, wherein: the method comprises the steps of utilizing a bridge interface with the type of internal in an OVS network to realize different VLANs to bind different DHCP services, setting TAP (test access point) on the interface to process different VLAN messages, enabling each TAP to correspond to one VLAN network, starting the DHCP service on the interface to distribute different address pools, and simultaneously creating a plurality of VLAN virtual interfaces to process different VLAN messages of different interfaces on the basis of VLAN processing realized by a Linux virtual interface under the condition that equipment interfaces are more and VLAN subnets are more.
4. An electronic device comprising a processor and a memory communicatively coupled to the processor and configured to store processor-executable instructions, wherein: the processor is configured to perform an OVS network DHCP address pool method as claimed in any one of the preceding claims 1-3.
5. A server, characterized by: comprising at least one processor, and a memory communicatively coupled to the processor, the memory storing instructions executable by the at least one processor to cause the at least one processor to perform an OVS network DHCP address pool method according to any one of claims 1-3.
6. A computer-readable storage medium storing a computer program, characterized in that: the computer program when executed by a processor implements an OVS network DHCP address pool method as claimed in any one of claims 1 to 3.
CN202110354675.6A 2021-03-30 2021-03-30 OVS network DHCP address pool method Pending CN113259500A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110354675.6A CN113259500A (en) 2021-03-30 2021-03-30 OVS network DHCP address pool method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110354675.6A CN113259500A (en) 2021-03-30 2021-03-30 OVS network DHCP address pool method

Publications (1)

Publication Number Publication Date
CN113259500A true CN113259500A (en) 2021-08-13

Family

ID=77181289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110354675.6A Pending CN113259500A (en) 2021-03-30 2021-03-30 OVS network DHCP address pool method

Country Status (1)

Country Link
CN (1) CN113259500A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394130A (en) * 2014-11-12 2015-03-04 国云科技股份有限公司 A multi-tenant virtual network isolating method
CN104468746A (en) * 2014-11-23 2015-03-25 国云科技股份有限公司 Method for realizing distributed virtual networks applicable to cloud platform
CN106101301A (en) * 2016-08-05 2016-11-09 汉柏科技有限公司 Distributed virtual DHCP service provides system and method
US20160344687A1 (en) * 2015-05-22 2016-11-24 International Business Machines Corporation Multi-tenant aware dynamic host configuration protocol (dhcp) mechanism for cloud networking
CN107592216A (en) * 2017-09-01 2018-01-16 湖南合天智汇信息技术有限公司 A kind of actual situation network integration emulation mode for supporting more scene experiment isolation
CN109617720A (en) * 2018-12-11 2019-04-12 郑州云海信息技术有限公司 A kind of distribution method and device of Internet resources
CN109861899A (en) * 2019-01-30 2019-06-07 烽火通信科技股份有限公司 Virtual home gateway and implementation method, home network center and data processing method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394130A (en) * 2014-11-12 2015-03-04 国云科技股份有限公司 A multi-tenant virtual network isolating method
CN104468746A (en) * 2014-11-23 2015-03-25 国云科技股份有限公司 Method for realizing distributed virtual networks applicable to cloud platform
US20160344687A1 (en) * 2015-05-22 2016-11-24 International Business Machines Corporation Multi-tenant aware dynamic host configuration protocol (dhcp) mechanism for cloud networking
CN106101301A (en) * 2016-08-05 2016-11-09 汉柏科技有限公司 Distributed virtual DHCP service provides system and method
CN107592216A (en) * 2017-09-01 2018-01-16 湖南合天智汇信息技术有限公司 A kind of actual situation network integration emulation mode for supporting more scene experiment isolation
CN109617720A (en) * 2018-12-11 2019-04-12 郑州云海信息技术有限公司 A kind of distribution method and device of Internet resources
CN109861899A (en) * 2019-01-30 2019-06-07 烽火通信科技股份有限公司 Virtual home gateway and implementation method, home network center and data processing method

Similar Documents

Publication Publication Date Title
US10601705B2 (en) Failover of centralized routers in public cloud logical networks
US10491516B2 (en) Packet communication between logical networks and public cloud service providers native networks using a single network interface and a single routing table
CN109462534B (en) Local interconnect controller, local interconnect control method, and computer storage medium
US9363207B2 (en) Private virtual local area network isolation
US20190173757A1 (en) High availability for stateful services in public cloud logical networks
US8989187B2 (en) Method and system of scaling a cloud computing network
DE112013000775B4 (en) Connect data centers for virtual machine migration
EP2847969B1 (en) Method and apparatus for supporting access control lists in a multi-tenant environment
US11012408B2 (en) Configuring virtual machine instances using one-to-one mappings
US20150281047A1 (en) Using different tcp/ip stacks for different hypervisor services
CN114070723B (en) Virtual network configuration method and system of bare metal server and intelligent network card
WO2019112704A1 (en) High availability for stateful services in public cloud logical networks
CN111095209A (en) Accessing endpoints in logical networks and public cloud service provider native networks using a single network interface and a single routing table
US20150281407A1 (en) Using different tcp/ip stacks for different tenants on a multi-tenant host
US10091125B2 (en) Using different TCP/IP stacks with separately allocated resources
CN101133612A (en) IP addressing in joined private networks
CN110932907B (en) Linux container network configuration method and network system
CN104506403B (en) A kind of virtual network management method for supporting multi-stage isolation
US9407459B2 (en) Communication apparatus, communication system, and communication method to transmit and receive Ethernet frames
CN109150638A (en) A kind of route management method and device
CA2753747A1 (en) Method for operating a node cluster system in a network and node cluster system
CN105939267B (en) Outband management method and device
CN108390809B (en) Bridging method and system based on VF promiscuous mode
CN106453690A (en) IP address allocation method and apparatus
US20150277995A1 (en) Using loopback interfaces of multiple tcp/ip stacks for communication between processes

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210813

RJ01 Rejection of invention patent application after publication