Information configuration method and device, data center and computer equipment
By remotely configuring account passwords using Link Layer Discovery Protocol (LLDP) between network devices in the data center, the problem of efficient configuration after accidentally deletion of account passwords in network devices is solved, and efficient and low-cost reconfiguration of account passwords is achieved.
Patent Information
- Application Number
- CN202510382560.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-07-01
AI Technical Summary
In the data center, after the account password of the network device is deleted by mistake, it is difficult for administrators to reconfigure efficiently, resulting in high cost and long time to solve the problem.
By using the Link Layer Discovery Protocol (LLDP) between the first network device and the second network device in the data center, LLDP packets containing account information and password information are generated and sent, thereby remotely configuring the account password of the second network device.
It realizes that when the account password of the network device is accidentally deleted, the administrator can remotely and efficiently reconfigure the account password, reducing labor costs and improving configuration efficiency.
Smart Images

Figure CN120238437A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of network device maintenance, and particularly to an information configuration method, apparatus, data center, and computer device. Background Art
[0002] Currently, whether it is the data center computer room of an operator or the data center computer room of an enterprise park network, there are many network devices. Each network device has an account password. An administrator can use the account password corresponding to the device to access the network device through an SSH tool, and then complete the remote management and maintenance of the network device.
[0003] In related technologies, if the account password in the network device is deleted due to improper operation by the management personnel, it is only possible to reconfigure the account password for the device by manually running to the location of the device and directly connecting with a serial cable or adding a serial server. Moreover, there are cases where the data centers of operators are built across cities and regions, and the cost and time for problem-solving are high. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide an information configuration method, information configuration apparatus, data center, computer device, and computer-readable storage medium that can improve the efficiency of configuring account passwords for deleted network devices.
[0005] In a first aspect, the present application provides an information configuration method, which is applied to a first network device in a data center. The data center further includes a second network device. The first network device and the second network device are respectively configured with a Link Layer Discovery Protocol (LLDP), and the first network device and the second network device are connected to each other. The method includes:
[0006] Receiving an information configuration instruction for the second network device sent by a user terminal;
[0007] Generating a Link Layer Discovery Protocol (LLDP) packet according to the information configuration instruction; wherein, the Link Layer Discovery Protocol (LLDP) packet includes the account information and password information of the second network device;
[0008] Sending the Link Layer Discovery Protocol (LLDP) packet to the second network device to instruct the second network device to configure the account information and the password information; the account information and the password information are used for the user terminal to log in to the second network device.
[0009] In one of the embodiments, the generating a Link Layer Discovery Protocol (LLDP) packet according to the information configuration instruction includes:
[0010] Configure an instruction according to the information, and configure a Link Layer Discovery Protocol data unit in a Type-Length-Value format; the Link Layer Discovery Protocol data unit includes the account information of the second network device and the password information of the second network device;
[0011] Generate a Link Layer Discovery Protocol message according to the Link Layer Discovery Protocol data unit.
[0012] In one embodiment, the configuring the Link Layer Discovery Protocol data unit in a Type-Length-Value format according to the information configuration instruction includes:
[0013] According to the information configuration instruction, encapsulate the account information in a first preset type in the Type-Length-Value format to generate an account information unit;
[0014] According to the information configuration instruction, encapsulate the password information in a second preset type in the Type-Length-Value format to generate a password information unit;
[0015] Encapsulate the account information unit and the password information unit to generate a Link Layer Discovery Protocol data unit.
[0016] In one embodiment, the first network device is configured with a first physical interface, and the second network device is configured with a second physical interface, and the first physical interface is connected to the second physical interface; wherein, the sending the Link Layer Discovery Protocol message to the second network device includes:
[0017] According to the information configuration instruction, enable the Type-Length-Value function based on the Link Layer Discovery Protocol of the first physical interface;
[0018] Send the Link Layer Discovery Protocol message to the second physical interface through the first physical interface; the second physical interface is configured with a Type-Length-Value function based on the Link Layer Discovery Protocol.
[0019] In a second aspect, the present application provides an information configuration method, which is applied to a second network device in a data center. The data center further includes a first network device. The first network device and the second network device are respectively configured with a Link Layer Discovery Protocol, and the first network device and the second network device are connected to each other; the method includes:
[0020] Receive the Link Layer Discovery Protocol message sent by the first network device; the Link Layer Discovery Protocol message includes the account information of the second network device and the password information of the second network device;
[0021] Configure account information and password information according to the Link Layer Discovery Protocol (LLDP) packet; the account information and the password information are used for the client to log in to the second network device.
[0022] In one embodiment, the configuring of the account information and the password information according to the LLDP packet includes:
[0023] Parse the LLDP packet to obtain the Link Layer Discovery Protocol Data Unit (LLDPDU).
[0024] Read the account information stored in the Type-Length-Value (TLV) format of the first preset type in the LLDPDU.
[0025] Read the password information stored in the TLV format of the second preset type in the LLDPDU.
[0026] Configure the account information and the password information.
[0027] In a third aspect, the present application provides a data center, which includes a first network device and a second network device connected to each other. The first network device and the second network device are respectively configured with the Link Layer Discovery Protocol. Among them, the first network device performs information configuration by using the information configuration method for the first network device in any of the above embodiments; the second network device performs information configuration by using the information configuration method for the second network device in any of the above embodiments.
[0028] In a fourth aspect, the present application provides an information configuration device, which is applied to the first network device of the data center; the device includes:
[0029] A first receiving module, configured to receive an information configuration instruction for the second network device sent by the client.
[0030] A packet generating module, configured to generate an LLDP packet according to the information configuration instruction; wherein, the LLDP packet includes the account information of the second network device and the password information of the second network device.
[0031] A packet sending module, configured to send the LLDP packet to the second network device to instruct the second network device to configure the account information and the password information; the account information and the password information are used for the client to log in to the second network device.
[0032] Fifth aspect, the present application provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the information configuration method applied to the first network device in any one of the above embodiments, and / or implements the steps of the information configuration method applied to the second network device in any one of the above embodiments.
[0033] Sixth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the information configuration method applied to the first network device in any one of the above embodiments, and / or implements the steps of the information configuration method applied to the second network device in any one of the above embodiments.
[0034] The above information configuration method, information configuration device, data center, computer device and computer-readable storage medium are applied to a data center. When the account password of the second network device in the data center is accidentally deleted, the administrator can remotely send an information configuration instruction for the second network device to the first network device through a computer. Then, the first network device generates a link layer discovery protocol message including the account information and password information of the second network device according to the information configuration instruction. After that, the first network device sends the link layer discovery protocol message to the second network device through a physical interface connected to the second network device. After receiving the link layer discovery protocol message, the second network device can configure the account information and password information. Thus, the administrator can log in to, manage and maintain the second network device through the newly configured account and password. The information configuration method of the present application can remotely configure the account password of a network device, improving the efficiency of configuring the account password. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required to be used in the description of the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0036] Figure 1 It is a schematic flowchart of an information configuration method applied to a first network device in an embodiment;
[0037] Figure 2 It is a schematic diagram of a data center in an embodiment;
[0038] Figure 3 It is a schematic flowchart of step S102 in an embodiment;
[0039] Figure 4 It is a schematic flowchart of step S301 in an embodiment;
[0040] Figure 5 It is a schematic flowchart of step S103 in an embodiment;
[0041] Figure 6 It is a schematic flowchart of an information configuration method applied to a second network device in an embodiment;
[0042] Figure 7 It is a schematic flowchart of step S602 in an embodiment;
[0043] Figure 8 It is a structural block diagram of an information configuration device applied to a first network device in an embodiment;
[0044] Figure 9 It is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
[0046] In an exemplary embodiment, please refer to Figure 1 , the present application provides an information configuration method, which is applied to a first network device in a data center. The data center further includes a second network device. The first network device and the second network device are respectively configured with a Link Layer Discovery Protocol (LLDP), and the first network device and the second network device are connected to each other. The method includes steps S101 to S102.
[0047] S101: Receive an information configuration instruction for the second network device sent by the user terminal.
[0048] In an example, please refer to Figure 2 , Figure 2Schematic diagram of a data center in an example. As can be seen from the figure, there are many network devices in the data center. These network devices can include devices such as repeaters, bridges, routers, gateways, firewalls, switches, etc. These network devices can be connected through physical interfaces. For example, the data center includes network device A, network device B, network device C, network device D, and network device E. Among them, network device A is respectively connected to network device C, network device D, and network device E, and network device B is also respectively connected to network device C, network device D, and network device E. The administrator can log in to and access these network devices through the account passwords and out-of-band management addresses of each network device. In the data center provided in this application, these network devices all adopt LLDP (Link Layer Discovery Protocol), so the LLDP neighbor information of network device B, network device C, network device D, and network device E can be seen on network device A and network device B, and the LLDP neighbor information of network device A and network device B can also be seen on network device B, network device C, network device D, and network device E.
[0049] When the account password of a certain network device in the data center is accidentally deleted, the administrator can connect through other network devices that are connected to the network device with the accidentally deleted account password and whose account passwords have not been accidentally deleted, and reconfigure the account password of the network device with the accidentally deleted account password. Among them, the network device with the accidentally deleted account password is the second network device, and the network device that is connected to the second network device and whose account password has not been accidentally deleted is the first network device. Exemplarily, if only the account password of network device C in the data center is accidentally deleted and the account passwords of other network devices have not been accidentally deleted, then network device C is the second network device, and network device A and network device B can be the first network devices.
[0050] In the application, when the administrator discovers that the account password of the second network device has been accidentally deleted, the administrator can no longer access the second network device through the previous account password of the first network device. However, since the physical connection between the first network device and the second network device is normal and the account password of the first network device has not been accidentally deleted, the administrator can send an information configuration instruction for the second network device to the first network device. The information configuration instruction includes the new account information and new password information that the administrator wants to configure for the second network device.
[0051] S102: Generate a Link Layer Discovery Protocol packet according to the information configuration instruction, where the Link Layer Discovery Protocol packet includes the account information of the second network device and the password information of the second network device.
[0052] After receiving the information configuration instruction, the first network device can generate a Link Layer Discovery Protocol (LLDP) packet based on the new account information and new password information that the administrator wants to configure for the second network device included in the information configuration instruction.
[0053] S103: Send the Link Layer Discovery Protocol packet to the second network device to instruct the second network device to configure the account information and password information; the account information and password information are used for the client to log in to the second network device.
[0054] Since all network devices in the data center use the LLDP protocol, the first network device can send the Link Layer Discovery Protocol packet to the second network device. After receiving the Link Layer Discovery Protocol packet, the second network device can parse the Link Layer Discovery Protocol packet to obtain the carried account information and password information, and set the received account information and password information as the account password of this network device and save the configuration. In this way, the administrator does not need to go to the location of the second network device to configure the account password in the way of directly connecting with a serial cable or adding a serial server. By remotely controlling the first network device to send the Link Layer Discovery Protocol packet to the second network device, the configuration of the account password of the second network device is completed. This not only saves labor costs but also improves the efficiency of configuring the account password.
[0055] The above information configuration method is applied to the data center. When the account password of the second network device in the data center is accidentally deleted, the administrator can remotely send an information configuration instruction for the second network device to the first network device through a computer. Then, the first network device generates a Link Layer Discovery Protocol packet including the account information of the second network device and the password information of the second network device according to the information configuration instruction. After that, the first network device sends the Link Layer Discovery Protocol packet to the second network device through the physical interface connected to the second network device. After receiving the Link Layer Discovery Protocol packet, the second network device can configure the account information and password information. Thus, the administrator can log in to, manage, and maintain the second network device through the newly configured account and password. The information configuration method of this application can remotely configure the account password of the network device and improve the efficiency of configuring the account password.
[0056] In an exemplary embodiment, please refer to Figure 3 , step S102, generating a Link Layer Discovery Protocol packet according to the information configuration instruction includes step S301 and step S302.
[0057] S301: Configure the Link Layer Discovery Protocol data unit in the Type-Length-Value format according to the information configuration instruction. The Link Layer Discovery Protocol data unit includes the account information of the second network device and the password information of the second network device.
[0058] It can be understood that the data frame for sending and receiving information in the LLDP protocol includes the destination MAC address DA of the LLDP data frame, the source MAC address SA of the LLDP data frame, the Ethertype of the LLDP data frame, the LLDP data unit LLDPDU, and the frame check sequence FCS of the data frame. Among them, the LLDPPDU is the payload of the LLDP, which is used to carry the message to be sent. The data unit LLDPPDU adopts the TLV format, that is, the type + length + value format. The type represents the type of the TLV, the length is the length of the TLV in bytes, and the value is the value of the TLV. In the data unit LLDPPDU, the Chassis ID TLV, PortID TLV, Time To Live TLV, and End Of LLDPDU TLV are mandatory and are the parts that the data unit LLDPPDU must contain. In addition, the data unit LLDPPDU can also contain other optional TLVs. Each TLV in the data unit LLDPPDU represents an information. Currently, the TLVs with types 0 to 8 in the LLDP protocol have been used, and the TLVs with types 9 to 126 are reserved TLVs and can be customized by users. Therefore, in this application, two reserved TLVs can be selected to respectively carry the new account information and new password information that the administrator wants to configure for the second network device. After writing the account information and password information into the two selected reserved TLVs respectively, they can be configured together with the Chassis ID TLV, PortID TLV, Time To Live TLV, and End Of LLDPDU TLV to generate the link layer discovery protocol data unit.
[0059] S302: Generate a link layer discovery protocol message according to the link layer discovery protocol data unit.
[0060] Furthermore, the link layer discovery protocol data unit can be encapsulated together with the destination MAC address DA of the LLDP data frame, the source MAC address SA of the LLDP data frame, the Ethertype of the LLDP data frame, the LLDP data unit LLDPDU, and the frame check sequence FCS of the data frame to generate the link layer discovery protocol message. Among them, the destination MAC address is the MAC address of the second network device, and the source MAC address is the MAC address of the first network device. Figure 2In the data center shown, only the account password of network device C was accidentally deleted, and the account passwords of other network devices were not accidentally deleted. If the administrator chooses to configure the account password for network device C through network device A, network device C is the second network device, network device A is the first network device, the destination MAC address is the MAC address of network device C, and the source MAC address is the MAC address of network device A.
[0061] In an exemplary embodiment, refer to Figure 4 , step S301, configure the Link Layer Discovery Protocol Data Unit in Type-Length-Value format according to the information configuration instruction, including step S401 and step S403.
[0062] S401: According to the information configuration instruction, encapsulate the account information in the first preset type in the Type-Length-Value format to generate an account information unit.
[0063] In the application, it can be predefined which type of TLV in the received LLDP protocol packet configures the information carried by which network device as the account of this network device, and which type of TLV configures the information carried by which network device as the password of this network device. Subsequently, in the process of generating the Link Layer Discovery Protocol packet by the first network device, the account information and password information can be encapsulated into the corresponding TLVs respectively, so that the second network device can correctly configure the account and password.
[0064] S402: According to the information configuration instruction, encapsulate the password information in the second preset type in the Type-Length-Value format to generate a password information unit.
[0065] In one example, the TLVs of type 11 and type 12 in the reserved type can be used to implement the information advertisement of the account and password respectively. Refer to Table 1. Table 1 is the format of the account information unit and password information unit generated by encapsulating the account information with the TLV of type 11 and the password information with the TLV of type 12 in one example.
[0066] Table 1 Account Information Unit and Password Information Unit
[0067] Type Length Value 11 5 admin 12 11 password123
[0068] Among them, Type represents the type of TLV, Length represents the length of TLV, and Value represents the information carried by TLV. In this example, the type of the account information unit is 11, the length is 5, and it carries the account information "admin" that the administrator wants to configure for the second network device. The type of the password information unit is 12, the length is 11, and it carries the password information "password123" that the administrator wants to configure for the second network device.
[0069] S403: Encapsulate the account information unit and the password information unit to generate a Link Layer Discovery Protocol data unit.
[0070] After that, encapsulate the account information unit and the password information unit together with Chassis ID TLV, Port ID TLV, TimeTo Live TLV, and End Of LLDPDU TLV, etc., to generate a Link Layer Discovery Protocol data unit.
[0071] In an exemplary embodiment, the first network device is configured with a first physical interface, the second network device is configured with a second physical interface, and the first physical interface is connected to the second physical interface; please refer to Figure 5 , step S103, send a Link Layer Discovery Protocol message to the second network device, including step S501 and step S502.
[0072] S501: Enable the type-length-value function based on the Link Layer Discovery Protocol for the first physical interface according to the information configuration instruction.
[0073] S502: Send a Link Layer Discovery Protocol message through the first physical interface to the second physical interface; the second physical interface is configured with the type-length-value function based on the Link Layer Discovery Protocol.
[0074] In this application, both the first network device and the second network device support the LLDP protocol. Therefore, the type-length-value function based on the Link Layer Discovery Protocol can be enabled on the first physical interface where the first network device is connected to the second network device, so that the first network device can send a Link Layer Discovery Protocol message to the second network device through the first physical interface and the second physical interface that is pre-configured with the type-length-value function based on the Link Layer Discovery Protocol.
[0075] In an exemplary embodiment, this application provides an information configuration method, which is applied to the second network device in a data center. The data center further includes a first network device. Both the first network device and the second network device support the Link Layer Discovery Protocol, and the first network device and the second network device are connected to each other; please refer to Figure 6 , this method includes: step S601 and step S602.
[0076] S601: Receive the Link Layer Discovery Protocol message sent by the first network device.
[0077] Since all network devices in the data center use the LLDP protocol, the first network device can send Link Layer Discovery Protocol (LLDP) packets to the second network device, and the second network device can successfully receive and parse the LLDP packets sent by the first network device. The LLDP packets include the account information and password information of the second network device.
[0078] S602: Configure the account information and password information according to the LLDP packets. The account information and password information are used for the client to log in to the second network device.
[0079] After receiving the LLDP packets, the second network device can parse the LLDP packets to obtain the carried account information and password information, set the received account information and password information as the account password of this network device, and save the configuration. In this way, the administrator does not need to go to the location of the second network device to configure the account password by directly connecting with a serial cable or adding a serial server. By remotely controlling the first network device to send LLDP packets to the second network device, the configuration of the account password of the second network device is completed, which not only saves labor costs but also improves the efficiency of configuring the account password.
[0080] In an exemplary embodiment, please refer to Figure 7 , step S602, configuring the account information and password information according to the LLDP packets, including steps S701 to S704.
[0081] S701: Parse the LLDP packets to obtain the Link Layer Discovery Protocol Data Unit (LLDPDU).
[0082] After receiving the LLDP packets, the second network device first parses the LLDP packets to obtain the LLDPDU that carries the information.
[0083] S702: Read the account information stored in the Type-Length-Value (TLV) format of the first preset type in the LLDPDU.
[0084] After obtaining the Link Layer Discovery Protocol data unit, since the second network device has been pre-set to configure the information in a TLV of a certain type received as the account information of this network device, the second network device can directly read the account information stored in the type-length-value format of the first preset type in the Link Layer Discovery Protocol data unit and configure it as the account of this network device. Exemplarily, the first network device encapsulates the account information "admin" using a TLV of type 11. Therefore, after the second network device obtains the Link Layer Discovery Protocol data unit, it can directly configure the account information "admin" encapsulated in the TLV of type 11 as the account of this network device.
[0085] S703: Read the password information stored in the type-length-value format of the second preset type in the Link Layer Discovery Protocol data unit.
[0086] After obtaining the Link Layer Discovery Protocol data unit, since the second network device has been pre-set to configure the information in a TLV of a certain type received as the account information of this network device, the second network device can directly read the account information stored in the type-length-value format of the second preset type in the Link Layer Discovery Protocol data unit and configure it as the account of this network device. Exemplarily, the first network device encapsulates the password information "password123" using a TLV of type 12. Therefore, after the second network device obtains the Link Layer Discovery Protocol data unit, it can directly configure the account information "password123" encapsulated in the TLV of type 12 as the password of this network device.
[0087] S704: Configure the account information and password information.
[0088] After obtaining the account information and password information, the second network device can mark the obtained account information and password information as the account and password of this network device. Furthermore, the administrator can remotely log in to, manage, and maintain the second network device using this account and password.
[0089] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least some of the steps or stages in other steps or other steps.
[0090] In an exemplary embodiment, the present application provides a data center, which includes a first network device and a second network device connected to each other. The first network device and the second network device are respectively configured with a Link Layer Discovery Protocol (LLDP). Among them, the first network device performs information configuration by using the information configuration method applied to the first network device in any of the above embodiments; the second network device performs information configuration by using the information configuration method applied to the second network device in any of the above embodiments.
[0091] Based on the same inventive concept, the embodiments of the present application further provide an information configuration device for implementing the information configuration method applied to the first network device involved above, and an information configuration device for implementing the information configuration method applied to the second network device involved above. The implementation solutions provided by the information configuration device for solving problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more of the following information configuration device embodiments can refer to the limitations on the information configuration method in the above text, and will not be repeated here.
[0092] In an exemplary embodiment, please refer to Figure 8 , the present application provides an information configuration device, which is applied to the first network device of the data center; the information configuration device includes a first receiving module 801, a message generating module 802, and a message sending module 803.
[0093] The first receiving module 801 is configured to receive an information configuration instruction for the second network device sent by the user terminal.
[0094] The message generating module 802 is configured to generate a Link Layer Discovery Protocol (LLDP) message according to the information configuration instruction; wherein, the LLDP message includes the account information of the second network device and the password information of the second network device.
[0095] The message sending module 803 is configured to send the LLDP message to the second network device to instruct the second network device to configure the account information and the password information; the account information and the password information are used for the user terminal to log in to the second network device.
[0096] In one of the embodiments, the message generating module 802 includes a first execution sub-module and a second execution sub-module.
[0097] The first execution sub-module is configured to configure a Link Layer Discovery Protocol data unit in a Type-Length-Value (TLV) format according to the information configuration instruction; the Link Layer Discovery Protocol data unit includes the account information of the second network device and the password information of the second network device;
[0098] The second execution sub-module is configured to generate an LLDP message according to the Link Layer Discovery Protocol data unit.
[0099] In an exemplary embodiment, the first execution sub-module includes a first execution unit, a second execution unit, and a third execution unit.
[0100] The first execution unit is configured to encapsulate the account information by using a first preset type in the type-length-value format according to the information configuration instruction, so as to generate an account information unit.
[0101] The second execution unit is configured to encapsulate the password information by using a second preset type in the type-length-value format according to the information configuration instruction, so as to generate a password information unit.
[0102] The third execution unit is configured to encapsulate the account information unit and the password information unit to generate a link layer discovery protocol data unit.
[0103] In an exemplary embodiment, the first network device is configured with a first physical interface, the second network device is configured with a second physical interface, and the first physical interface is connected to the second physical interface; the packet sending module 803 includes: a third execution sub-module and a fourth execution sub-module.
[0104] The third execution sub-module is configured to enable the type-length-value function based on the link layer discovery protocol of the first physical interface according to the information configuration instruction.
[0105] The fourth execution sub-module is configured to send a link layer discovery protocol packet to the second physical interface through the first physical interface; the second physical interface is configured with the type-length-value function based on the link layer discovery protocol.
[0106] In an exemplary embodiment, the present application provides an information configuration device, which is applied to a second network device in a data center. The data center further includes a first network device. The first network device and the second network device are respectively configured with a link layer discovery protocol, and the first network device and the second network device are connected to each other; the information configuration device includes a packet receiving module and an information configuration module.
[0107] The packet receiving module is configured to receive a link layer discovery protocol packet sent by the first network device, where the link layer discovery protocol packet includes the account information of the second network device and the password information of the second network device.
[0108] The information configuration module is configured to configure the account information and the password information according to the link layer discovery protocol packet, and the account information and the password information are used for a user terminal to log in to the second network device.
[0109] In an exemplary embodiment, the information configuration module includes a fifth execution sub-module, a sixth execution sub-module, a seventh execution sub-module, and an eighth execution sub-module.
[0110] The fifth execution sub-module is used to parse Link Layer Discovery Protocol (LLDP) packets and obtain Link Layer Discovery Protocol Data Units (LLDPDUs).
[0111] The sixth execution sub-module is used to read the account information stored in the Type-Length-Value (TLV) format of the first preset type in the Link Layer Discovery Protocol Data Unit.
[0112] The seventh execution sub-module is used to read the password information stored in the TLV format of the second preset type in the Link Layer Discovery Protocol Data Unit.
[0113] The eighth execution sub-module is used to configure the account information and the password information.
[0114] Each module in the above information configuration device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0115] In an exemplary embodiment, the present application provides a computer device, including a memory and a processor. When the processor executes the computer program, it implements the steps of the information configuration method applied to the first network device in any one of the above embodiments, and / or implements the steps of the information configuration method applied to the second network device in any one of the above embodiments.
[0116] The computer device can be a terminal, and its internal structure diagram can be as Figure 9As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it is used to implement the information configuration method applied to the first network device in any of the above embodiments, and / or implement the information configuration method applied to the second network device in any of the above embodiments. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse, etc.
[0117] Those skilled in the art can understand that Figure 9 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0118] In an exemplary embodiment, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the information configuration method applied to the first network device in any of the above embodiments, and / or implements the steps of the information configuration method applied to the second network device in any of the above embodiments.
[0119] In an exemplary embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, it implements the steps of the information configuration method applied to the first network device in any of the above embodiments, and / or implements the steps of the information configuration method applied to the second network device in any of the above embodiments.
[0120] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0121] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., and are not limited thereto.
[0122] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.
[0123] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of this application shall be subject to the appended claims.
Claims
1. An information configuration method, characterized in that: A first network device applied to a data center, the data center further comprising a second network device, the first network device and the second network device are respectively configured with a link layer discovery protocol, and the first network device and the second network device are connected to each other; the method comprising: Receiving an information configuration instruction for the second network device sent by the user terminal; Generate a link layer discovery protocol message according to the information configuration instruction; wherein the link layer discovery protocol message includes the account information of the second network device and the password information of the second network device; The link layer discovery protocol message is sent to the second network device to instruct the second network device to configure the account information and the password information; the account information and the password information are used by the user terminal to log in to the second network device.
2. The method according to claim 1, characterized in that The generating a link layer discovery protocol message according to the information configuration instruction includes: According to the information configuration instruction, a link layer discovery protocol data unit is configured in a type-length-value format; the link layer discovery protocol data unit includes the account information of the second network device and the password information of the second network device; Generate a link layer discovery protocol message according to the link layer discovery protocol data unit.
3. The method according to claim 2, characterized in that The configuring the link layer discovery protocol data unit in a type-length-value format according to the information configuration instruction includes: According to the information configuration instruction, the account information is encapsulated using a first preset type in a type-length-value format to generate an account information unit; According to the information configuration instruction, the password information is encapsulated using a second preset type in a type-length-value format to generate a password information unit; The account information unit and the password information unit are encapsulated to generate a link layer discovery protocol data unit.
4. The method according to claim 3, characterized in that: The first network device is configured with a first physical interface, the second network device is configured with a second physical interface, and the first physical interface and the second physical interface are connected to each other; wherein the sending the link layer discovery protocol message to the second network device includes: According to the information configuration instruction, enable a type-length-value function based on a link layer discovery protocol of the first physical interface; The link layer discovery protocol message is sent to the second physical interface through the first physical interface; the second physical interface is configured with a type-length-value function based on the link layer discovery protocol.
5. An information configuration method, characterized in that: A second network device applied to a data center, the data center further comprising a first network device, the first network device and the second network device are respectively configured with a link layer discovery protocol, and the first network device and the second network device are connected to each other; the method comprising: receiving a link layer discovery protocol message sent by the first network device; the link layer discovery protocol message includes account information of the second network device and password information of the second network device; The account information and password information are configured according to the link layer discovery protocol message; the account information and the password information are used by the user to log in to the second network device.
6. The method according to claim 5, characterized in that The configuring the account information and password information according to the link layer discovery protocol message includes: Parsing the link layer discovery protocol message to obtain a link layer discovery protocol data unit; Reading the account information stored in the type-length-value format of a first preset type in the link layer discovery protocol data unit; Reading the cryptographic information stored in the type-length-value format of a second preset type in the link layer discovery protocol data unit; Configure the account information and the password information.
7. A data center, characterized in that: The data center includes a first network device and a second network device that are interconnected, and the first network device and the second network device are respectively configured with a link layer discovery protocol; wherein the first network device adopts the method described in any one of claims 1 to 4 to perform information configuration; and the second network device adopts the method described in claim 5 or 6 to perform information configuration.
8. An information configuration device, characterized in that: A first network device applied to a data center; the device comprises: A first receiving module, used for receiving an information configuration instruction for a second network device sent by a user terminal; A message generation module, used to generate a link layer discovery protocol message according to the information configuration instruction; wherein the link layer discovery protocol message includes the account information of the second network device and the password information of the second network device; A message sending module is used to send the link layer discovery protocol message to the second network device to instruct the second network device to configure the account information and password information; the account information and the password information are used by the user terminal to log in to the second network device.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the information configuration method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the information configuration method according to any one of claims 1 to 6 are implemented.