Network configuration method and device
In the hierarchical port binding scenario of OpenStack Neutron, the switching device receives and processes LLDP messages containing host name information, which solves the problem of missing host name information in the LLDP messages sent by the network card, and realizes the correct VLAN-VXLAN mapping configuration and hierarchical port binding, simplifies the configuration process and saves costs.
Patent Information
- Application Number
- CN202510399492.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-05-13
AI Technical Summary
In the hierarchical port binding scenario of OpenStack Neutron, the LLDP packets sent by some network cards only carry network card information and do not carry host name information, which makes the controller unable to issue VLAN-VXLAN mapping configuration, affecting the implementation of hierarchical port binding.
The switching device receives the LLDP message sent by the first server through the operating system, generates or updates the LLDP table entry containing the host name information, and sends it to the controller, so that the controller can generate a VLAN-VXLAN mapping configuration and send it to the target network interface.
Through LLDP packets containing host name information, the impact of hierarchical port binding services caused by LLDP packets without host name is avoided, and the network card configuration is simplified and labor costs are saved.
Smart Images

Figure CN119996179A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a network configuration method and device. Background Art
[0002] Hierarchical port binding is an important feature in OpenStack Neutron. This feature plays an important role in achieving network isolation, load balancing, and fault recovery of virtual machines (VMs).
[0003] In the hierarchical port binding scenario, the switch requires the LLDP (Link Layer Discovery Protocol) message sent by the server to carry the host name. Some network cards support the LLDP function and this function is enabled by default. However, the LLDP messages sent by some network cards only carry the network card information but not the host name information, which makes it impossible for the controller to send the VLAN-VXLAN mapping configuration to the network interface of the switching device connected to the server, affecting the implementation of hierarchical port binding. The current solution is to manually turn off the LLDP function of the network card. However, different types of network cards have different operating methods, and the configuration work is more cumbersome. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present application provides a network configuration method and device.
[0005] According to a first aspect of an embodiment of the present application, a network configuration method is provided, the method being applied to a switching device, the method comprising:
[0006] Receiving an LLDP message sent by a first server through an operating system, wherein the LLDP message is generated by the first server and the LLDP message includes host name information of the first server;
[0007] Generate or update an LLDP table entry including host name information of the first server according to the LLDP message;
[0008] The LLDP table entry is sent to the controller, so that the controller generates a VLAN-VXLAN mapping configuration according to the LLDP table entry and sends it to the target network interface of the switching device.
[0009] According to a second aspect of an embodiment of the present application, a network configuration method is provided, the method being applied to a first server, the method comprising:
[0010] Generate an LLDP message, wherein the LLDP message includes host name information of the first server;
[0011] The LLDP message is sent to the switching device through the operating system, so that the switching device generates an LLDP table entry containing the host name information of the first server according to the LLDP message and sends it to the controller, and the controller is used to generate a VLAN-VXLAN mapping configuration according to the LLDP table entry and send it to the target network interface of the switching device.
[0012] According to a third aspect of an embodiment of the present application, a network configuration device is provided, the device being applied to a switching device, the device comprising:
[0013] A receiving module, configured to receive an LLDP message sent by the first server through the operating system, wherein the LLDP message is generated by the first server and includes host name information of the first server;
[0014] An updating module, configured to generate or update an LLDP table entry including the host name information of the first server according to the LLDP message;
[0015] The sending module is used to send the LLDP table entry to the controller, so that the controller generates a VLAN-VXLAN mapping configuration according to the LLDP table entry and sends it to the target network interface of the switching device.
[0016] According to a fourth aspect of an embodiment of the present application, a network configuration device is provided, the device being applied to a first server, the device comprising:
[0017] A generating module, configured to generate an LLDP message, wherein the LLDP message includes host name information of the first server;
[0018] A sending module is used to send the LLDP message to the switching device through the operating system, so that the switching device generates an LLDP table entry containing the host name information of the first server according to the LLDP message and sends it to the controller, and the controller is used to generate a VLAN-VXLAN mapping configuration according to the LLDP table entry and send it to the target network interface of the switching device.
[0019] According to a fifth aspect of an embodiment of the present application, there is provided an electronic device, including:
[0020] A memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described above.
[0021] According to a sixth aspect of an embodiment of the present application, there is provided a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute the method described above.
[0022] According to a seventh aspect of an embodiment of the present application, a computer program product is provided. When the computer program product is run on a computer, the computer is enabled to execute the method described above.
[0023] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0024] In the embodiment of the present application, the switching device can receive the LLDP message sent by the first server through the operating system. Since the LLDP message is generated by the first server and the LLDP message contains the host name information of the first server, the switching device can generate or update the LLDP table entry containing the host name information of the first server according to the LLDP message, and then send the generated LLDP table entry to the controller, so that the controller generates the VLAN-VXLAN mapping configuration and sends it to the target network interface of the switching device. Based on this, it is avoided that the LLDP message reported by some network cards does not contain the host name, thereby affecting the hierarchical port binding service, and there is no need to perform complicated configuration work on different types of network cards, saving labor costs.
[0025] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which are incorporated in the specification and constitute a part of this application, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
[0027] Figure 1 Schematic diagram of a flow chart of a network configuration method applied to a switching device provided in an embodiment of the present application Figure 1 ;
[0028] Figure 2 Schematic diagram of the implementation process of the network configuration method provided in the embodiment of the present application Figure 1 ;
[0029] Figure 3 Schematic diagram of the implementation process of the network configuration method provided in the embodiment of the present application Figure 2 ;
[0030] Figure 4 A schematic diagram of LLDP messages in the network configuration method provided in an embodiment of the present application;
[0031] Figure 5Schematic diagram of a flow chart of a network configuration method applied to a switching device provided in an embodiment of the present application Figure 2 ;
[0032] Figure 6 A schematic diagram of a flow chart of a network configuration method applied to a first server provided in an embodiment of the present application;
[0033] Figure 7 A schematic diagram of a network configuration device applied to a switching device provided in an embodiment of the present application;
[0034] Figure 8 A schematic diagram of a network configuration device applied to a first server provided in an embodiment of the present application;
[0035] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The technical solutions in the embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application.
[0037] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0038] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0039] Next, the embodiments of the present application are described in detail.
[0040] The present application embodiment provides a network configuration method, which is applied to a switching device, such as Figure 1 As shown, the method may include the following steps:
[0041] Step 110: receiving an LLDP message sent by the first server through the operating system, wherein the LLDP message is generated by the first server and the LLDP message includes host name information of the first server;
[0042] Step 120: Generate or update an LLDP table entry including host name information of the first server according to the LLDP message;
[0043] Step 130: Send the LLDP entry to the controller so that the controller generates a VLAN-VXLAN mapping configuration according to the LLDP entry.
[0044] The embodiment of the present application is applied to the OpenStack hierarchical port binding scenario. In the embodiment of the present application, Figure 2 As shown, when the LLDP service is turned on on the first server, the first server generates an LLDP message containing the host name information of the first server, and sends the LLDP message to the switching device serving as a VTEP (VXLAN Tunnel Endpoint) through the operating system; thereafter, the switching device generates or updates an LLDP table entry containing the host name information of the first server according to the received LLDP message, and sends the LLDP table entry to the controller; the controller then generates a VLAN-VXLAN mapping configuration according to the LLDP table entry and sends it to the target network interface of the switching device (i.e., the network interface of the switching device connected to the first server).
[0045] Specifically, the controller can learn the correspondence between the first server (i.e., computing node) and the network port of the switching device based on the LLDP table entry. When the first server starts the virtual machine, the virtual port of the virtual machine will carry the host name information of the first server, which enables the controller to accurately know which network port of the switching device the virtual machine goes online from. Based on this information (i.e., the correspondence between the virtual machine and the network port of the switching device), the controller can generate the correct VLAN-VXLAN mapping configuration and send it to the network interface of the switching device. In this way, the controller can accurately manage the network configuration of the virtual machine and ensure that the traffic of the virtual machine is correctly mapped to the corresponding VLAN and VXLAN.
[0046] In the embodiment of the present application, the first server refers to a server obtained by technically improving a conventional server. The improved first server can cooperate with the switching device, so that the switching device can achieve the following Figure 1 Specifically, the first server can send an LLDP message through the operating system, and the LLDP message includes the host name information of the first server.
[0047] It is worth mentioning that the first server may be installed with a physical network card with LLDP function, but the LLDP message containing the host name information of the first server in the embodiment of the present application is not sent through the physical network card, but through the operating system of the first server itself.
[0048] It is understandable that, in addition to receiving the LLDP message sent by the first server, the switching device may also receive LLDP messages sent by other servers. Figure 3 As shown, in the embodiment of the present application, the server other than the first server is referred to as the second server. The LLDP message sent by the first server is sent through the operating system and contains the host name information of the server. The LLDP message sent by the second server is generally sent through the network card and often does not contain the host name information of the server.
[0049] Based on the above considerations, as a specific implementation method, in an embodiment of the present application, the switching device specifically determines whether the LLDP message received by itself is an LLDP message sent by the first server through the operating system in the following manner: receiving an LLDP message sent by a server, wherein the LLDP message is generated by a server, and the server includes but is not limited to the first server; determining whether the LLDP message contains a tag type field; when the LLDP message contains the tag type field, determining that the LLDP message is sent by the first server through the operating system and that the LLDP message contains the host name information of the first server.
[0050] Correspondingly, when the LLDP message does not contain the tag type field, it can be determined that the LLDP message is sent by the second server, but it cannot be determined whether the LLDP message contains the host name information of the second server. In this case, the switching device executes the processing operation defined by the preset configuration policy according to the LLDP message, that is, enters the default LLDP message processing process.
[0051] On this basis, considering that in some scenarios, the user may not want the switching device to update the corresponding LLDP table entry according to the LLDP message sent by the first server. As a preferred implementation, the embodiment of the present application sets the value space of the tag type field to include but not limited to a first value and a second value, wherein the first value represents that the switching device is expected to update the corresponding LLDP table entry according to the LLDP message, and the second value represents that the switching device is expected to perform the processing operation defined by the preset configuration policy according to the LLDP message, that is, enter the default LLDP message processing flow.
[0052] Therefore, in an embodiment of the present application, the switching device generates or updates an LLDP table entry containing the host name information of the first server according to the LLDP message in the following manner: when the value of the tag type field in the LLDP message is a first value, generating or updating an LLDP table entry containing the host name information of the first server according to the LLDP message; when the value of the tag type field in the LLDP message is a second value, executing the processing operation defined by the preset configuration policy according to the LLDP message.
[0053] Further, when the value of the tag type field in the LLDP message is a first numerical value, after generating or updating an LLDP table entry containing host name information of the first server according to the LLDP message, the LLDP table entry can be further marked as a first type, wherein the first type corresponds to the first numerical value.
[0054] On this basis, as described above, when the value of the tag type field in the LLDP message is the second value or the LLDP message does not contain the tag type field, the switching device can specifically perform the processing operation defined by the preset configuration policy according to the LLDP message in the following manner: determine whether an LLDP table entry corresponding to the MAC address of the first server is recorded locally and whether the type of the LLDP table entry is the first type; if both judgment results are yes, no processing is performed; if either judgment result is no, the processing operation defined by the preset configuration policy is performed according to the LLDP message.
[0055] As a specific implementation method, the switching device of the embodiment of the present application generates or updates an LLDP table entry containing the host name information of the first server according to the LLDP message in the following manner: determining whether an LLDP table entry corresponding to the MAC address of the first server is recorded locally; if the determination result is yes, updating the LLDP table entry containing the host name information of the first server according to the LLDP message; if the determination result is no, generating an LLDP table entry containing the host name information of the first server according to the LLDP message.
[0056] In the embodiment of the present application, the first server sends an LLDP message containing the host name information of the first server to the switching device through the operating system. After the switching device receives the LLDP message, it can update / create an LLDP table entry according to the LLDP message and send it to the controller, so that the controller generates a VLAN-VXLAN mapping configuration and sends it to the network interface of the switching device connected to the first server. It can be seen that the embodiment of the present application can avoid the complicated configuration work caused by the different operation modes of different types of network cards, and avoid the impact of different network card types on hierarchical port binding services.
[0057] The following uses actual applications as an example to describe in detail the network configuration method applied to a switching device in an embodiment of the present application.
[0058] In the LLDP frame encapsulated in Ethernet II format, LLDPDU (Link Layer Discovery Protocol Data Unit) is the effective load of the LLDP message, which is used to carry the message to be sent. The format of LLDPDU is as follows: Figure 4 As shown in the figure, LLDPDU adopts the TLV format, that is, the format of type+length+value, where type indicates the type of TLV, length is the length of the TLV in bytes, and value is the value of the TLV. Chassis ID TLV, Port ID TLV, Time To Live TLV and End Of LLDPDU TLV are required parts. In addition, 0 to multiple optional other TLVs can be included between TLV Time To Live TLV and End Of LLDPDU TLV.
[0059] Based on the above, Figure 4 As shown, in the embodiment of the present application, a tag type field is added to the LLDP PDU of the LLDP message generated by the first server to implement high priority effectiveness of the LLDP message.
[0060] The newly added tag type field information is as follows:
[0061]
[0062] As shown in the table above, the value of the tag type field includes the first value 01, and the corresponding first type F is the mandatory type; the value of the tag type field also includes the second value 00, and the corresponding second type U is the universal type. The mandatory type means that the corresponding LLDP table entry is refreshed according to the LLDP message, and the universal type means that the corresponding processing operation is performed according to the normal LLDP message processing flow.
[0063] In summary, the LLDP message sent by the first server to the switching device includes the host name information of the first server and also includes a tag type field.
[0064] After receiving the LLDP message reported by the server (including but not limited to the first server), the switching device will perform a series of processing according to the information in the LLDP message to implement hierarchical port configuration. Figure 5 As shown in the figure, after receiving the LLDP message, the switching device checks whether the LLDP message has a tag type field. If there is an LLDP message, it further checks the value of the tag type field. Different operation processes are entered according to different situations, as follows:
[0065] Scenario 1: The LLDP message has a tag type field, and the value of the tag type field is 01. The switching device checks whether the device already has an LLDP entry corresponding to the server MAC address. If so, the LLDP entry is updated to take effect with the current LLDP message, and the tag type of the LLDP entry is recorded as F. If not, a new LLDP entry is added to take effect with the current LLDP message, and the tag type of the LLDP entry is recorded as F.
[0066] Scenario 2: The LLDP message has a tag type field, and the value of the tag type field is 00. The switching device checks whether the switching device already has an LLDP entry with a tag type of F corresponding to the server MAC address. If so, the LLDP entry is not updated. If not, the normal LLDP processing flow is followed.
[0067] Scenario 3: The LLDP message does not have a tag type field. The switching device checks whether the switching device has an LLDP entry with a tag type of F corresponding to the server MAC address. If so, the LLDP entry is not updated. If not, the switching device follows the normal LLDP processing flow.
[0068] Specifically, after receiving the LLDP message reported by the server, the switching device will parse the LLDP message and extract the TLV (Type / Length / Value) information in the message, which includes the device identification (Chassis ID), port identification (Port ID), etc. After that, the switching device will update the parsed information to the local LLDP MIB (Management Information Base), which will be stored in the LLDP Remote System MIB. The information in the MIB library can be queried and managed by the controller through the SNMP protocol.
[0069] Afterwards, the switching device reports the parsed LLDP information to the controller. Based on this information, the controller establishes a mapping relationship between the server and the switch port. Later, when the first server starts the virtual machine, the virtual port of the virtual machine will carry the host name. At this time, the controller knows which port of the switching device the virtual machine goes online from.
[0070] The embodiment of the present application also provides a network configuration method, which is applied to a first server, such as Figure 6 As shown, the method may include the following steps:
[0071] Step 610: Generate an LLDP message, where the LLDP message includes host name information of the first server;
[0072] Step 620: Send the LLDP message to the switching device through the operating system, so that the switching device generates an LLDP table entry containing the host name information of the first server according to the LLDP message and sends it to the controller. The controller is used to generate a VLAN-VXLAN mapping configuration according to the LLDP table entry and send it to the target network interface of the switching device.
[0073] As a specific implementation manner, the LLDP message further includes a tag type field, and the tag type field indicates that the LLDP message is sent by the first server through an operating system and that the LLDP message includes host name information of the first server.
[0074] As a specific implementation, the value of the tag type field in the LLDP message is a first numerical value or a second numerical value, the first numerical value indicates that the switching device generates or updates an LLDP table entry containing the host name information of the first server according to the LLDP message, and the second numerical value indicates that the switching device executes a processing operation defined by a preset configuration policy according to the LLDP message.
[0075] Based on the same inventive concept, the present application also provides a network configuration device, which is applied to a switching device, and its structural diagram is as follows: Figure 7 As shown, the device comprises:
[0076] A receiving module 710 is configured to receive an LLDP message sent by a first server through an operating system, wherein the LLDP message is generated by the first server and includes host name information of the first server;
[0077] An updating module 720, configured to generate or update an LLDP table entry including the host name information of the first server according to the LLDP message;
[0078] The sending module 730 is used to send the LLDP table entry to the controller, so that the controller generates a VLAN-VXLAN mapping configuration according to the LLDP table entry and sends it to the target network interface of the switching device.
[0079] As a specific implementation, the receiving module 710 specifically includes:
[0080] A receiving unit, configured to receive an LLDP message sent by a server, wherein the LLDP message is generated by the server, and the server includes a first server;
[0081] A field determination unit is used to determine, when the LLDP message includes a tag type field, that the LLDP message is sent by the first server through an operating system and that the LLDP message includes host name information of the first server.
[0082] As a specific implementation, the update module 720 includes:
[0083] a forced updating unit, configured to generate or update an LLDP table entry including the host name information of the first server according to the LLDP message when the value of the tag type field in the LLDP message is a first value;
[0084] The conventional updating unit is configured to execute, according to the LLDP message, a processing operation defined by a preset configuration policy when the value of the tag type field in the LLDP message is a second value.
[0085] As a specific implementation, the device further includes:
[0086] The field determination module is used to determine that the LLDP message is sent by the second server when the LLDP message does not contain the tag type field, and perform a processing operation defined by a preset configuration policy according to the LLDP message.
[0087] As a specific implementation, the device further includes:
[0088] A marking module is used to mark the LLDP table entry as a first type, wherein the first type corresponds to the first value.
[0089] As a specific implementation, the conventional update unit or the field determination module specifically performs the processing operation defined by the preset configuration policy according to the LLDP message in the following manner:
[0090] Determine whether an LLDP entry corresponding to the MAC address of the first server is recorded locally and whether the type of the LLDP entry is the first type; if both judgment results are yes, no processing is performed; if either judgment result is no, perform a processing operation defined by a preset configuration policy according to the LLDP message.
[0091] As a specific implementation manner, the updating module 720 generates or updates the LLDP table entry including the host name information of the first server according to the LLDP message in the following manner:
[0092] Determine whether an LLDP table entry corresponding to the MAC address of the first server is recorded locally; if the judgment result is yes, update the LLDP table entry containing the host name information of the first server according to the LLDP message; if the judgment result is no, generate an LLDP table entry containing the host name information of the first server according to the LLDP message.
[0093] The present application also provides a network configuration device, which is applied to a first server, and its structural diagram is as follows: Figure 8 As shown, the device comprises:
[0094] A generating module 810, configured to generate an LLDP message, wherein the LLDP message includes host name information of the first server;
[0095] The sending module 820 is used to send the LLDP message to the switching device through the operating system, so that the switching device generates an LLDP table entry containing the host name information of the first server according to the LLDP message and sends it to the controller. The controller is used to generate and configure the VLAN-VXLAN mapping according to the LLDP table entry and send it to the target network interface of the switching device.
[0096] An embodiment of the present application provides an electronic device, which may include: a memory and one or more processors. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device may perform various functions or steps of the above method embodiment.
[0097] The structure of the electronic device can refer to Fig. 9 The structure of the electronic device 100 is shown.
[0098] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0099] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes each function or step of the above method embodiment.
[0100] The computer-readable storage medium includes but is not limited to any one of the following: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0101] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to perform each function or step of the above method embodiment.
[0102] Among them, the electronic device, computer-readable storage medium, and computer program product provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0103] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0104] In the several embodiments provided in the present application, it should be understood that the disclosed method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of modules or units, which can be electrical, mechanical or other forms.
[0105] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0106] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A network configuration method, characterized in that: The method is applied to a switching device, and the method comprises: Receiving an LLDP message sent by a first server through an operating system, wherein the LLDP message is generated by the first server and the LLDP message includes host name information of the first server; Generate or update an LLDP table entry including host name information of the first server according to the LLDP message; The LLDP table entry is sent to the controller, so that the controller generates a VLAN-VXLAN mapping configuration according to the LLDP table entry and sends it to the target network interface of the switching device.
2. The method according to claim 1, characterized in that The method specifically receives the LLDP message sent by the first server through the operating system in the following manner: Receiving an LLDP message sent by a server, wherein the LLDP message is generated by the server, and the server includes a first server; When the LLDP message includes a tag type field, it is determined that the LLDP message is sent by the first server through the operating system and that the LLDP message includes host name information of the first server.
3. The method according to claim 2, characterized in that The method specifically generates or updates an LLDP table entry including the host name information of the first server according to the LLDP message in the following manner: When the value of the tag type field in the LLDP message is a first value, generating or updating an LLDP table entry including the host name information of the first server according to the LLDP message; When the value of the tag type field in the LLDP message is a second value, a processing operation defined by a preset configuration policy is performed according to the LLDP message.
4. The method according to claim 2, characterized in that: The method further comprises: When the LLDP message does not include the tag type field, it is determined that the LLDP message is sent by the second server, and a processing operation defined by a preset configuration policy is performed according to the LLDP message.
5. The method according to claim 3, characterized in that: The method further comprises: The LLDP entry is marked as a first type, wherein the first type corresponds to the first value.
6. The method according to claim 5, characterized in that The method specifically performs the processing operation defined by the preset configuration policy according to the LLDP message in the following manner: Determine whether an LLDP entry corresponding to the MAC address of the first server is recorded locally and whether the type of the LLDP entry is the first type; If both judgment results are yes, no processing will be done; If any judgment result is no, a processing operation defined by a preset configuration policy is executed according to the LLDP message.
7. The method according to claim 1, characterized in that The method specifically generates or updates an LLDP table entry including the host name information of the first server according to the LLDP message in the following manner: Determine whether an LLDP entry corresponding to the MAC address of the first server is recorded locally; If the judgment result is yes, updating the LLDP table entry containing the host name information of the first server according to the LLDP message; If the judgment result is no, an LLDP table entry including the host name information of the first server is generated according to the LLDP message.
8. A network configuration method, characterized in that: The method is applied to a first server, and the method includes: Generate an LLDP message, wherein the LLDP message includes host name information of the first server; The LLDP message is sent to the switching device through the operating system, so that the switching device generates an LLDP table entry containing the host name information of the first server according to the LLDP message and sends it to the controller, and the controller is used to generate a VLAN-VXLAN mapping configuration according to the LLDP table entry and send it to the target network interface of the switching device.
9. The method according to claim 8, characterized in that The LLDP message further includes a tag type field, where the tag type field indicates that the LLDP message is sent by the first server through an operating system and that the LLDP message includes host name information of the first server.
10. The method according to claim 9, characterized in that The value of the tag type field in the LLDP message is a first value or a second value, the first value indicates that the switching device generates or updates an LLDP table entry containing the host name information of the first server according to the LLDP message, and the second value indicates that the switching device performs a processing operation defined by a preset configuration policy according to the LLDP message.
11. A network configuration device, characterized in that: The device is applied to a switching device, and comprises: A receiving module, configured to receive an LLDP message sent by the first server through the operating system, wherein the LLDP message is generated by the first server and includes host name information of the first server; An updating module, configured to generate or update an LLDP table entry including the host name information of the first server according to the LLDP message; The sending module is used to send the LLDP table entry to the controller, so that the controller generates a VLAN-VXLAN mapping configuration according to the LLDP table entry and sends it to the target network interface of the switching device.
12. A network configuration device, characterized in that: The device is applied to a first server, and includes: A generating module, configured to generate an LLDP message, wherein the LLDP message includes host name information of the first server; A sending module is used to send the LLDP message to the switching device through the operating system, so that the switching device generates an LLDP table entry containing the host name information of the first server according to the LLDP message and sends it to the controller, and the controller is used to generate a VLAN-VXLAN mapping configuration according to the LLDP table entry and send it to the target network interface of the switching device.
13. An electronic device, characterized in that: include: A memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-10.
14. A computer-readable storage medium comprising computer instructions, characterized in that: When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 10.
15. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 10.