CN111884904B - Method and device for dynamically managing vxlan tunnel based on equipment configuration - Google Patents

Method and device for dynamically managing vxlan tunnel based on equipment configuration Download PDF

Info

Publication number
CN111884904B
CN111884904B CN202010716098.6A CN202010716098A CN111884904B CN 111884904 B CN111884904 B CN 111884904B CN 202010716098 A CN202010716098 A CN 202010716098A CN 111884904 B CN111884904 B CN 111884904B
Authority
CN
China
Prior art keywords
configuration
equipment
interface
information
vxlan
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
CN202010716098.6A
Other languages
Chinese (zh)
Other versions
CN111884904A (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.)
Unihub China Information Technology Co Ltd
Original Assignee
Unihub China Information 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 Unihub China Information Technology Co Ltd filed Critical Unihub China Information Technology Co Ltd
Priority to CN202010716098.6A priority Critical patent/CN111884904B/en
Publication of CN111884904A publication Critical patent/CN111884904A/en
Application granted granted Critical
Publication of CN111884904B publication Critical patent/CN111884904B/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
    • 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
    • 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/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • 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]
    • H04L12/4675Dynamic sharing of VLAN information amongst network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a method and a device for dynamically managing vxlan tunnels based on equipment configuration, wherein the method comprises the following steps: acquiring a device loopback interface address and a service host interface before and after vxlan related configuration and migration of the device; positioning the configuration of the equipment before migration according to the address of the equipment before migration, and determining bridge-domain; searching for corresponding vni according to bridge-domain, and determining a tunnel relation related to vni; positioning the configuration of the migrated equipment according to the address of the migrated equipment loopback interface, and searching whether the tunnel relation exists and whether the interface has vxlan related configuration; and ensuring that the tunnels before and after the migration of the service host still exist, and adding the tunnels to the vxlan tunnel relationship of the migrated equipment through the configuration of the neighbor equipment loopback address positioning equipment. The method and the device can improve the migration efficiency of the service host and reduce the manual error rate.

Description

Method and device for dynamically managing vxlan tunnel based on equipment configuration
Technical Field
The invention relates to the field of service host migration configured with a vxlan tunnel, in particular to a method and a device for dynamically managing the vxlan tunnel based on equipment configuration.
Background
When migrating a service host configured with a vxlan (hereinafter, vxlan refers to static manually configured vxlan) tunnel, a network engineer must check or recreate corresponding vxlan information on a device after migration because tunnel (neighbor) relationships between the service host and other devices need to be maintained, but manual tunnel (neighbor) establishment after migration is too inefficient because tunnel (neighbor) information before migration is too much. Now the general procedure for manually checking or re-creating tunnels (neighbors) after migration of a service host is: firstly, collecting vxlan related configuration information of equipment, manually positioning bridge-domain information bound to an interconnection interface of the equipment where a service host is located, then searching corresponding vni information according to global bridge-domain configuration information, further determining that the equipment uses the vni and which equipment to establish a tunnel (neighbor) relationship, then manually comparing the equipment configuration after migration, determining whether the tunnel (neighbor) relationship corresponding to the vni before migration exists in the configuration after migration and whether related vxlan information exists in the interface after migration, if the tunnel (neighbor) relationship and the interface vxlan related information exist, directly migrating the service host, if the tunnel (neighbor) relationship or the interface vxlan related information does not exist, configuring according to information inquired before migration, and one vni can correspond to a plurality of tunnel (neighbor) relationships, in a network environment with complex services, there are often many vxlan tunnels (neighbors), and considering the problem of resource number limitation or resource utilization, it is impossible to synchronize vxlan tunnel (neighbor) relationship information of all devices, and deployment can only be performed according to the needs of the services, so that efficiency of establishing vxlan tunnels (neighbors) by hand is too low.
Disclosure of Invention
In order to solve the problem of low efficiency caused by manual operation, the invention provides a method and a device for dynamically managing a vxlan tunnel based on equipment configuration.
In order to achieve the purpose, the invention adopts the following technical scheme:
in an embodiment of the present invention, a method for dynamically managing a vxlan tunnel based on device configuration is provided, where the method includes:
acquiring vxlan related configuration information of all equipment, a loopback interface address of the equipment before migration, interface information of equipment connected with a service host, and a loopback interface address of the equipment after migration and interface information of the equipment connected with the service host;
positioning the configuration of the equipment before migration according to the Loopback interface address of the equipment before migration, and determining bridge-domain information bound by the interface of the equipment before migration and the host;
searching corresponding vni information according to global bridge-domain configuration information, further determining the vni used by the equipment and which equipment establish a tunnel relation, reorganizing the information and storing the information into a list;
positioning the configuration of the migrated equipment according to the loopback interface address of the migrated equipment, and searching whether the tunnel relation exists and whether the vxlan related configuration exists in the corresponding interface;
and configuring according to the situation to ensure that all tunnels before and after the migration of the service host still exist, and further positioning corresponding equipment configuration through the loopback address of the neighbor equipment and adding the equipment configuration to the vxlan tunnel relationship of the migrated equipment.
Further, acquiring vxlan related configuration information of all devices, the loopback interface address of the device before migration, the interface information of the device connection service host, the loopback interface address of the device after migration, and the interface information of the device connection service host, includes:
acquiring the configuration of all required metropolitan area networks or IDC equipment and storing the configuration into a specified text file;
manually giving the Loopback interface address of the device where the service host is located before migration for establishing a tunnel with other devices, and the interface for connecting the service host, the Loopback interface address of the tunnel established by the device and other devices, and the interface after migration of the service host, and storing the information in the list1 after sorting.
Further, determining bridge-domain information bound to the interface of the device before migration and connected to the host according to positioning to the configuration of the device before migration according to the loopback interface address of the device before migration, including:
the first entry of the list1 is extracted, and the bridge-domain configuration associated with the interface to the service host is found by configuration.
Further, according to the global bridge-domain configuration information, searching for corresponding vni information, further determining which devices use the vni to establish a tunnel relationship with, and reorganizing and storing the information into a list, including:
further finding the vni configuration associated with the bridge-domain, further finding the tunnel configuration related to the vni, and storing the information after sorting into the list 2.
Further, positioning to the configuration of the migrated device according to the loopback interface address of the migrated device, and searching whether such a tunnel relationship exists and whether a vxlan-related configuration exists in a corresponding interface, including:
positioning the configuration of the migrated equipment according to the peer-list address of the list1, and judging whether the migrated equipment node has the tunnel relation and whether the local interface X has the configuration information related to the vni according to the list2 list content output in the last step;
further, configuring according to the situation to ensure that all tunnels before and after the migration of the service host still exist, and further positioning corresponding device configuration through the loopback address of the neighbor device, and adding the device configuration to the vxlan tunnel relationship of the migrated device, including:
according to the output result of the previous step, tunnel relation or interface configuration information is arranged on the migrated equipment;
according to the list2, positioning the equipment configuration where the address is located through the peer-list address, and adding related vxlan configuration information;
and outputting the final configuration, and issuing the configuration to the equipment by the control center to complete the dynamic management of the vxlan tunnel.
Further, the text file is a txt format file.
In an embodiment of the present invention, an apparatus for dynamically managing a vxlan tunnel based on device configuration is further provided, where the apparatus includes:
the information acquisition module is used for acquiring vxlan related configuration information of all the equipment, a loopback interface address of the equipment before migration, interface information of the equipment connected with the service host, and a loopback interface address of the equipment after migration and interface information of the equipment connected with the service host;
the bridge-domain information determining module is used for positioning the configuration of the equipment before migration according to the loopback interface address of the equipment before migration and determining bridge-domain information bound by the interface of the equipment before migration and the host;
the vni and tunnel relation determining module is used for searching corresponding vni information according to global bridge-domain configuration information, further determining the equipment which establishes a tunnel relation with the vni and the equipment, reorganizing the information and storing the information into a list;
the tunnel relation and vxlan related configuration searching module is used for positioning the configuration of the migrated equipment according to the loopback interface address of the migrated equipment and searching whether the tunnel relation exists and whether vxlan related configuration exists in the corresponding interface;
and the vxlan tunnel dynamic management module is used for configuring according to conditions, ensuring that all tunnels before and after the migration of the service host still exist, further positioning corresponding equipment configuration through a loopback address of the neighbor equipment, and adding the corresponding equipment configuration to the vxlan tunnel relationship of the migrated equipment.
In an embodiment of the present invention, a computer device is further provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the aforementioned method for dynamically managing a vxlan tunnel based on device configuration.
In an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program for executing the method for dynamically managing a vxlan tunnel based on device configuration is stored.
Has the advantages that:
according to the method and the device for dynamically managing the VXLAN tunnel based on equipment configuration, the Vxlan tunnel after the business host is migrated is dynamically established by using the VXLAN configuration information on the equipment in the migration process of the business host, so that the migration efficiency of the business host is improved, and the manual error rate is reduced.
Drawings
Fig. 1 is a flowchart illustrating a method for dynamically managing a vxlan tunnel based on device configuration according to an embodiment of the present invention;
FIG. 2 is a topological diagram of the relationship of three service hosts according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for dynamically managing a vxlan tunnel based on device configuration according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The principles and spirit of the present invention will be described below with reference to several exemplary embodiments, which should be understood to be presented only to enable those skilled in the art to better understand and implement the present invention, and not to limit the scope of the present invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to the embodiment of the invention, the vxlan related configuration information of the equipment and the powerful and quick processing capacity of a computer are utilized, the vxlan related tunnel (neighbor) and the interface information of the equipment before the migration of the service host are automatically positioned through a program, whether the tunnel (neighbor) and the interface information of the equipment after the migration of the service host need to be rebuilt or not is determined, if the rebuilding is needed, the establishment of the corresponding vxlan tunnel (neighbor) and the interface vxlan related configuration are automatically completed, the whole process can be controlled within one minute under normal conditions, a large amount of time can be saved, the migration efficiency of the service host can be improved, and the error rate can be reduced.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the invention.
Fig. 1 is a flowchart illustrating a method for dynamically managing a vxlan tunnel based on device configuration according to an embodiment of the present invention. As shown in fig. 1, the method includes:
step S101-step S102, obtaining vxlan related configuration information of all equipment, a Loopback interface address of the equipment before migration, interface information of the equipment connected with a service host, a Loopback interface address of the equipment after migration and interface information of the equipment connected with the service host;
specifically, step S101, obtaining all required configurations of the metro network or the IDC device, and storing the configurations in a specified txt file;
step S102, manually giving the Loopback interface address of the device where the service host is located before migration and used for establishing a tunnel with other devices, the interface for connecting the service host, the Loopback interface address of the device and other devices for establishing the tunnel, and the interface after migration of the service host, and storing the information in a list1 after sorting.
Step S103, positioning to the configuration of the equipment before migration according to the loopback interface address of the equipment before migration, determining bridge-domain information bound to the interface of the equipment before migration and the host, searching for corresponding vni information according to the global bridge-domain configuration information, further determining the equipment which establishes a tunnel (neighbor) relationship with the vni and which equipment, reorganizing and storing the information into a list;
specifically, the first item of the list1 is extracted, the bridge-domain configuration related to the interface connected to the service host is found through configuration, the vni configuration related to the bridge-domain is further found, the tunnel configuration related to the vni is further found, and the information is sorted and stored in the list 2.
Step S104, positioning the configuration of the migrated equipment according to the loopback interface address of the migrated equipment, and searching whether the tunnel (neighbor) relationship exists and whether the vxlan related configuration exists in the corresponding interface;
specifically, the configuration of the device after migration is located according to the peer-list address 4.4.4.4 of the list1 in S102, and then whether the tunnel (neighbor) relationship exists on the device node after migration (the source address and the peer-list address cannot be the same) and whether the configuration information related to the vni exists on the local interface X are judged according to the list2 list content output in S103;
S105-S107, configuring according to the situation to ensure that all tunnels (neighbors) before and after the migration of the service host still exist, further positioning corresponding equipment configuration through a loopback address of neighbor equipment, and adding the equipment configuration to a vxlan tunnel (neighbor) relationship of the migrated equipment;
specifically, step S105, according to the output result of step S104, tunnel relationship or interface configuration information is set on the migrated device;
step S106, according to the list2 in the step S103, positioning the equipment configuration where the address is located through the peer-list address, and adding related vxlan configuration information;
and S107, outputting the final configuration, and issuing the configuration to the equipment by the control center to complete the dynamic management of the vxlan tunnel.
It should be noted that although the operations of the method of the present invention have been described in the above embodiments and the accompanying drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the operations shown must be performed, to achieve the desired results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
For a clearer explanation of the above method for dynamically managing the vxlan tunnel based on the device configuration, a specific embodiment is described below, but it should be noted that the embodiment is only for better explaining the present invention and is not to be construed as an inappropriate limitation to the present invention.
As the topology diagram of fig. 2, in which the service host has the example that the 10GE1/0/2.1 interface of Device1(loopback interface address 2.2.2.2) migrates to the X interface of Device3(loopback interface address 4.4.4.4), the whole process is described in more detail:
step S101: firstly, acquiring the configuration of all required metropolitan area networks or IDC equipment, and storing the configuration into a specified txt file; the configuration of the three devices is as follows:
device1 configuration file
#
sysname Device1
bridge-domain 10
vxlan vni 5010
#
bridge-domain 20
vxlan vni 5020
#
interface 10GE1/0/2.1 mode l2
bridge-domain 10
#
interface 10GE1/0/3.1 mode l2
bridge-domain 20
#
interface 10GE1/0/4.1 mode l2
bridge-domain 10
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
interface Nve1
source 2.2.2.2
vni 5010head-end peer-list 3.3.3.3
vni 5020head-end peer-list 3.3.3.3
vni 5020head-end peer-list 4.4.4.4
#
Device2 configuration file
sysname Device2
#
bridge-domain 10
vxlan vni 5010
#
bridge-domain 20
vxlan vni 5020
#
interface Vbdif10
ip address 192.168.10.10 255.255.255.0
#
interface Vbdif20
ip address 192.168.20.10 255.255.255.0
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
interface Nve1
source 3.3.3.3
vni 5010head-end peer-list 2.2.2.2
vni 5020head-end peer-list 2.2.2.2
vni 5020head-end peer-list 4.4.4.4
#
Device3 configuration file
sysname Device3
#
bridge-domain 20
vxlan vni 5020
#
interface 10GE1/0/2.1 mode l2
bridge-domain 20
#
interface X
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
interface Nve1
source 4.4.4.4
vni 5020head-end peer-list 2.2.2.2
vni 5020head-end peer-list 3.3.3.3
#
Step S102: manually giving the loopback interface address of the Device where the service host is located before migration for establishing a tunnel (neighbor) with other devices, and the interface connecting the service host, for example, the loopback interface address of Device1 is 2.2.2.2, the interface connecting the service host is 10GE1/0/2.1, the loopback address of the Device and other devices establishing a tunnel (neighbor), and the interface after migration of the service host, for example, Device3, the loopback address is 4.4.4.4, the interface after migration of Device3 of the service host, assuming X, sorting the above information and storing in the list 1:
[2.2.2.2|10GE1/0/2.1,4.4.4.4|X]
step S103: extracting the first item of the list1, finding the bridge-domain configuration related to the 10GE1/0/2.1 interface through configuration, further finding the nvi configuration related to the bridge-domain, such as vxlan vni5010, and further finding the tunnel (neighbor) configuration related to vni:
device1 configuration file
#
sysname Device1
bridge-domain 10
vxlan vni 5010// and bridge-domain associated nvi configuration
#
bridge-domain 20
vxlan vni 5020
#
interface 10GE1/0/2.1 mode l2
bridge-domain 10// and 10GE1/0/2.1 interface related bridge-domain configuration
#
interface 10GE1/0/3.1 mode l2
bridge-domain 20
#
interface 10GE1/0/4.1 mode l2
bridge-domain 10
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
interface Nve1
source 2.2.2.2
VNI5010 head-end peer-list 3.3.3.3// tunnel (neighbor) configuration related to VNI5010
vni 5020head-end peer-list 3.3.3.3
vni 5020head-end peer-list 4.4.4.4
#
The tunnel (neighbor) relations are stored in a list 2:
[2.2.2.2|5010|3.3.3.3]// where the source address indicating the own device is 2.2.2.2, the peer-list address of the tunnel (neighbor) is 3.3.3.3.
Step S104: according to the list address 4.4.4.4 of the list1 in S102, the configuration of the migrated Device is located, and then whether the migrated Device node has such a tunnel (neighbor) relationship (source address and peer-list address cannot be the same) or not is judged according to the list content of the list2 output in S103, and whether the local interface X has configuration information related to the VNI or not, the Device3 related configuration does not have the tunnel (neighbor) relationship information related to 5010|3.3.3, and the interface X does not have the related vxlan configuration information.
sysname Device3
....
interface Nve1// there is no neighbor configuration for 5010|3.3.3.3
source 4.4.4.4
vni 5020head-end peer-list 2.2.2.2
vni 5020head-end peer-list 3.3.3.3
#
interface X// without VXLAN configuration information related to vni5010
#
Step S105: according to the output result of S104, the neighbor relation or interface configuration information on the migrated device:
device3 configuration file
sysname Device3
#
bridge-domain 10
Vxlan VNI 5010// associating VNI5010 under bridge-domain
#
bridge-domain 20
vxlan vni 5020
#
interface 10GE1/0/2.1 mode l2
bridge-domain 20
#
interface X mode l2// interface lower binding bridge-domain 10
bridge-domain 10
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
interface Nve1
source 4.4.4.4
VNI5010 head-end peer-list 3.3.3.3// adding tunnel (neighbor) configuration related to VNI5010
vni 5020head-end peer-list 2.2.2.2
vni 5020head-end peer-list 3.3.3.3
#
Step S106: according to the list2 in S103, the device configuration where the peer-list address is located through the list2, if the list2 content is [2.2.2 |5010|3.3.3.3], the configuration of the device located to 3.3.3.3 through 3.3.3.3 is added with vxlan configuration information that vni is 5010 and the neighbor is 4.4.4.4:
device2 configuration file
sysname Device2
#
bridge-domain 10
vxlan vni 5010
#
bridge-domain 20
vxlan vni 5020
#
interface Vbdif10
ip address 192.168.10.10 255.255.255.0
#
interface Vbdif20
ip address 192.168.20.10 255.255.255.0
#
interface LoopBack1
ipaddress 3.3.3.3 255.255.255.255
#
interface Nve1
source 3.3.3.3
vni 5010head-end peer-list 2.2.2.2
vni5010 head-end peer-list 4.4.4.4// newly-added tunnel (neighbor) configuration
vni 5020head-end peer-list 2.2.2.2
vni 5020head-end peer-list 4.4.4.4
#
Step S107: outputting the final configuration, issuing the configuration to the equipment by the control center, and completing the dynamic management of the vxlan tunnel, wherein the final configuration is as follows:
device1 configuration file
#
sysname Device1
bridge-domain 10
vxlan vni 5010
#
bridge-domain 20
vxlan vni 5020
#
interface 10GE1/0/2.1 mode l2
bridge-domain 10
#
interface 10GE1/0/3.1 mode l2
bridge-domain 20
#
interface 10GE1/0/4.1mode l2
bridge-domain 10
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255#
interface Nve1
source 2.2.2.2
vni 5010head-end peer-list 3.3.3.3
vni 5020head-end peer-list 3.3.3.3
vni 5020head-end peer-list 4.4.4.4
#
Device2 configuration file
sysname Device2
#
bridge-domain 10
vxlan vni 5010
#
bridge-domain 20
vxlan vni 5020
#
interface Vbdif10
ip address 192.168.10.10 255.255.255.0
#
interface Vbdif20
ip address 192.168.20.10 255.255.255.0
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
interface Nve1
source 3.3.3.3
vni 5010head-end peer-list 2.2.2.2
vni 5010head-end peer-list 4.4.4.4
vni 5020head-end peer-list 2.2.2.2
vni 5020head-end peer-list 4.4.4.4
#
Device3 configuration file
sysname Device3
#
bridge-domain 10
vxlan vni 5010
#
bridge-domain 20
vxlan vni 5020
#
interface 10GE1/0/2.1 mode l2
bridge-domain 20
#
interface X
bridge-domain 10
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
interface Nve1
source 4.4.4.4
vni 5010head-end peer-list 3.3.3.3
vni 5020head-end peer-list 2.2.2.2
vni 5020head-end peer-list 3.3.3.3
#
Based on the same inventive concept, the invention also provides a device for dynamically managing the vxlan tunnel based on equipment configuration. The implementation of the device can be referred to the implementation of the method, and repeated details are not repeated. The term "module," as used below, may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 3 is a schematic structural diagram of an apparatus for dynamically managing a vxlan tunnel based on device configuration according to an embodiment of the present invention. As shown in fig. 3, the apparatus includes:
an information obtaining module 201, configured to obtain vxlan related configuration information of all devices, a loopback interface address of a device before migration, interface information of a device connection service host, and a loopback interface address of a device after migration and interface information of a device connection service host;
the bridge-domain information determining module 202 is configured to locate the configuration of the device before migration according to the loopback interface address of the device before migration, and determine bridge-domain information bound to an interface of the device before migration, the interface being connected to the host;
a vni and tunnel relationship determining module 203, configured to search for corresponding vni information according to the global bridge-domain configuration information, further determine which devices and the vni are used by the device to establish a tunnel relationship, reorganize and store the information in a list;
a tunnel relation and vxlan related configuration searching module 204, configured to locate the configuration of the migrated device according to the loopback interface address of the migrated device, and search whether such a tunnel relation exists and whether a vxlan related configuration exists in a corresponding interface;
the vxlan tunnel dynamic management module 205 is configured according to a situation, and is configured to ensure that all tunnels before and after migration of the service host still exist, and further locate corresponding device configuration through a loopback address of a neighboring device, and add the device configuration to the vxlan tunnel relationship of the device after migration.
It should be noted that although several modules of the apparatus for dynamically managing a vxlan tunnel based on device configuration are mentioned in the above detailed description, such partitioning is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the modules described above may be embodied in one module according to embodiments of the invention. Conversely, the features and functions of one module described above may be further divided into embodiments by a plurality of modules.
Based on the aforementioned inventive concept, as shown in fig. 4, the present invention further provides a computer apparatus 300, which includes a memory 310, a processor 320, and a computer program 330 stored in the memory 310 and operable on the processor 320, wherein the processor 320 executes the computer program 330 to implement the aforementioned method for dynamically managing a vxlan tunnel based on device configuration.
Based on the foregoing inventive concept, the present invention also provides a computer-readable storage medium storing a computer program for executing the foregoing method for dynamically managing a vxlan tunnel based on device configuration.
The VXLAN tunnel dynamic management method and device based on equipment configuration provided by the invention utilize the configuration information of the VXLAN on the equipment to dynamically establish the VXLAN tunnel after the service host is migrated, thereby improving the migration efficiency of the service host and reducing the manual error rate.
While the spirit and principles of the invention have been described with reference to several particular embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, nor is the division of aspects, which is for convenience only as the features in such aspects may not be combined to benefit. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
The limitation of the protection scope of the present invention is understood by those skilled in the art, and various modifications or changes which can be made by those skilled in the art without inventive efforts based on the technical solution of the present invention are still within the protection scope of the present invention.

Claims (10)

1. A method for dynamically managing vxlan tunnels based on device configuration is characterized by comprising the following steps:
acquiring vxlan related configuration information of all equipment, a loopback interface address of the equipment before migration, interface information of equipment connected with a service host, and a loopback interface address of the equipment after migration and interface information of the equipment connected with the service host;
positioning the configuration of the equipment before migration according to the Loopback interface address of the equipment before migration, and determining bridge-domain information bound by the interface of the equipment before migration and the host;
searching corresponding vni information according to global bridge-domain configuration information, further determining the vni used by the equipment and which equipment establish a tunnel relation, reorganizing the information and storing the information into a list;
positioning the configuration of the migrated equipment according to the loopback interface address of the migrated equipment, and searching whether the tunnel relation exists and whether the vxlan related configuration exists in the corresponding interface;
and configuring according to the situation to ensure that all tunnels before and after the migration of the service host still exist, and further positioning corresponding equipment configuration through the loopback address of the neighbor equipment and adding the equipment configuration to the vxlan tunnel relationship of the migrated equipment.
2. The method for dynamically managing a vxlan tunnel based on device configuration according to claim 1, wherein the obtaining of vxlan-related configuration information of all devices, the loopback interface address of the device before migration, the interface information of the device connection service host, the loopback interface address of the device after migration, and the interface information of the device connection service host includes:
acquiring the configuration of all required metropolitan area networks or IDC equipment and storing the configuration into a specified text file;
manually giving a loopback interface address used for establishing a tunnel with other equipment by the equipment before the migration of the service host and an interface for connecting the service host;
manually giving out a loopback interface address of the equipment where the service host is located after migration and used for establishing a tunnel with other equipment, and an interface after migration of the service host;
the above information is sorted and stored in the list 1.
3. The method for dynamically managing a vxlan tunnel based on device configuration according to claim 2, wherein the determining bridge-domain information bound by the interface of the device before migration to the host according to positioning the loopback interface address of the device before migration to the configuration of the device before migration comprises:
the data of the list1 is extracted, and the bridge-domain configuration related to the interface connected with the service host is found through configuration.
4. The method for dynamically managing a vxlan tunnel based on device configuration according to claim 1, wherein the step of searching for corresponding vni information according to global bridge-domain configuration information, further determining which devices the device uses to establish a tunnel relationship with, reorganizing and storing the information into a list comprises:
further finding the vni configuration associated with the bridge-domain, further finding the tunnel configuration related to the vni, and storing the information after sorting into the list 2.
5. The method for dynamically managing a vxlan tunnel based on device configuration according to claim 4, wherein the positioning to the configuration of the migrated device according to the loopback interface address of the migrated device, and searching whether such a tunnel relationship exists and whether a vxlan related configuration exists in a corresponding interface, comprises:
and positioning the configuration of the migrated equipment according to the peer-list address of the list1, and judging whether the tunnel relationship exists on the migrated equipment node and whether the configuration information related to the vni exists on the local interface X according to the list2 list content output in the last step.
6. The method for dynamically managing the vxlan tunnel based on the device configuration according to claim 4, wherein the configuration is performed according to the situation, so as to ensure that all tunnels before and after the migration of the service host still exist, and further locate the corresponding device configuration through the loopback address of the neighbor device, and add the device configuration to the vxlan tunnel relationship of the migrated device, the method comprises:
according to the output result of the previous step, tunnel relation or interface configuration information is arranged on the migrated equipment;
according to the list2, positioning the equipment configuration where the address is located through the peer-list address, and adding related vxlan configuration information;
and outputting the final configuration, and issuing the configuration to the equipment by the control center to complete the dynamic management of the vxlan tunnel.
7. The method for dynamically managing a vxlan tunnel based on device configuration as claimed in claim 2, wherein said text file is a txt format file.
8. An apparatus for dynamically managing a vxlan tunnel based on device configuration, the apparatus comprising:
the information acquisition module is used for acquiring vxlan related configuration information of all the equipment, a loopback interface address of the equipment before migration, interface information of the equipment connected with the service host, and a loopback interface address of the equipment after migration and interface information of the equipment connected with the service host;
the bridge-domain information determining module is used for positioning the configuration of the equipment before migration according to the loopback interface address of the equipment before migration and determining bridge-domain information bound by the interface of the equipment before migration and the host;
the vni and tunnel relation determining module is used for searching corresponding vni information according to global bridge-domain configuration information, further determining the equipment which establishes a tunnel relation with the vni and the equipment, reorganizing the information and storing the information into a list;
the tunnel relation and vxlan related configuration searching module is used for positioning the configuration of the migrated equipment according to the loopback interface address of the migrated equipment and searching whether the tunnel relation exists and whether vxlan related configuration exists in the corresponding interface;
and the vxlan tunnel dynamic management module is used for configuring according to conditions, ensuring that all tunnels before and after the migration of the service host still exist, further positioning corresponding equipment configuration through a loopback address of the neighbor equipment, and adding the corresponding equipment configuration to the vxlan tunnel relationship of the migrated equipment.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1-7.
CN202010716098.6A 2020-07-23 2020-07-23 Method and device for dynamically managing vxlan tunnel based on equipment configuration Active CN111884904B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010716098.6A CN111884904B (en) 2020-07-23 2020-07-23 Method and device for dynamically managing vxlan tunnel based on equipment configuration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010716098.6A CN111884904B (en) 2020-07-23 2020-07-23 Method and device for dynamically managing vxlan tunnel based on equipment configuration

Publications (2)

Publication Number Publication Date
CN111884904A CN111884904A (en) 2020-11-03
CN111884904B true CN111884904B (en) 2021-09-24

Family

ID=73156228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010716098.6A Active CN111884904B (en) 2020-07-23 2020-07-23 Method and device for dynamically managing vxlan tunnel based on equipment configuration

Country Status (1)

Country Link
CN (1) CN111884904B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103795650B (en) * 2014-01-27 2018-02-06 新华三技术有限公司 A kind of moving method of configuration information, method to set up and its equipment
CN105099748A (en) * 2014-05-23 2015-11-25 中兴通讯股份有限公司 Method and system for migrating business tunnel
CN104798342B (en) * 2014-11-17 2017-11-24 华为技术有限公司 The business migration method, apparatus and system of data center
CN106713100B (en) * 2015-11-17 2019-11-29 华为数字技术(苏州)有限公司 A kind of method, CPE and convergence device for establishing tunnel automatically
CN107733764B (en) * 2016-08-11 2020-10-09 中国电信股份有限公司 Method, system and related equipment for establishing virtual extensible local area network tunnel
CN106998297B (en) * 2017-03-22 2019-11-08 新华三技术有限公司 A kind of virtual machine migration method and device
CN109995654B (en) * 2017-12-29 2022-05-20 中兴通讯股份有限公司 Method and device for transmitting data based on tunnel
CN108718278B (en) * 2018-04-13 2021-04-27 新华三技术有限公司 Message transmission method and device

Also Published As

Publication number Publication date
CN111884904A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
CN112003961A (en) Resource exposure method, system, equipment and medium in kubernets
CN110266761B (en) Load balancing application creation method and device, computer equipment and storage medium
CN111045708B (en) Software upgrading method, electronic device and computer readable storage medium
CN108199962B (en) Address migration method and device, network equipment and readable storage medium
CN111597061A (en) Method and device for remote procedure call of client or server
EP3786802A1 (en) Method and device for failover in hbase system
CN111405590B (en) Method, device and storage medium for exporting data traffic of virtualized network element
CN113810230A (en) Method, device and system for carrying out network configuration on containers in container cluster
CN108140035B (en) Database replication method and device for distributed system
CN112035062B (en) Migration method of local storage of cloud computing, computer equipment and storage medium
CN111884904B (en) Method and device for dynamically managing vxlan tunnel based on equipment configuration
CN107623705B (en) Storage mode upgrading method, device and system based on video cloud storage system
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN107609197A (en) A kind of method of data synchronization, data synchronization unit and mobile terminal
CN109358813B (en) Capacity expansion method and device for distributed storage system
CN104683243A (en) Data processing method, device and system
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN107493181B (en) Indication method and device of virtual expansion port
CN111431951B (en) Data processing method, node equipment, system and storage medium
CN111669358B (en) Method and device for processing vrouter network isolation spaces in batch
CN110045930B (en) Method, device, equipment and medium for virtual platform to manage storage equipment volume
CN117389713B (en) Storage system application service data migration method, device, equipment and medium
CN112003731B (en) Configuration method and device
CN113014409B (en) Networking equipment configuration method, device, equipment and storage medium
CN109542588B (en) Method and device for managing virtual equipment in cloud environment

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
CP02 Change in the address of a patent holder

Address after: 200000 room 702-2, No. 4811 Cao'an Road, Jiading District, Shanghai

Patentee after: CHINA UNITECHS

Address before: Room 1004-4, 10 / F, 1112 Hanggui Road, Anting Town, Jiading District, Shanghai

Patentee before: CHINA UNITECHS

CP02 Change in the address of a patent holder