Server configuration method and device

By acquiring and generating network card sub-device to obtain device information of servers in virtual LANs, the problem of low configuration efficiency of multiple virtual LANs is solved, batch configuration of multiple servers is realized, and configuration efficiency is improved.

CN119094356APending Publication Date: 2024-12-06XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411009830.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

When configuring servers in multiple virtual LANs, the prior art requires setting the PVID of the switch port of the client control side multiple times, resulting in low configuration efficiency.

Method used

By obtaining the data information of multiple virtual LANs, multiple network card sub-device are generated, and the device information of each virtual LAN is obtained based on these network card sub-device, and batch configuration is carried out to improve configuration efficiency.

Benefits of technology

The batch configuration of servers in multiple virtual LANs is realized, which significantly improves configuration efficiency and reduces configuration steps and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094356A_ABST
    Figure CN119094356A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a server configuration method and equipment, and the method comprises the steps: obtaining the data information of a plurality of virtual local area networks, each virtual local area network comprises at least one server, and the data information is used for representing the configuration information of the virtual local area network; based on the data information of the multiple virtual local area networks, multiple network card sub-devices are generated, and the virtual local area networks correspond to the network card sub-devices; acquiring equipment information of a server in each virtual local area network through the network card sub-equipment corresponding to each virtual local area network; and configuring the server based on the device information of the server in each virtual local area network. According to the embodiment of the invention, the client controller can obtain the data information of the plurality of virtual local area networks at one time, generate the corresponding network card sub-devices, and obtain the device information of the servers in the plurality of virtual local area networks based on the plurality of network card sub-devices, so that the batch configuration of the servers in the plurality of virtual local area networks is realized, and the configuration efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a server configuration method and device. Background Art

[0002] Before being configured, the Internet Protocol (IP) of the baseboard management controller (BMC) of the server usually adopts a unified fixed IP, and the client control end cannot communicate with the server that has not been configured with the BMC IP through the three-layer network IP.

[0003] In order to configure the BMC IP of the server, currently, the port-based VLAN information identifier (PVID) of the switch port of the client control end can be set, and the server can be scanned based on the Simple Service Discovery Protocol (SSDP) to discover the server in the VLAN whose VLAN ID is the same as the PVID. After discovering the server, the BMCIP of the discovered server can be configured to realize the communication between the client control end and the server.

[0004] After the PVID of the switch port at the client control end is set, a scan can find servers in the virtual LAN with the same VLAN ID and PVID. If servers in multiple virtual LANs need to be configured, the PVID of the switch port at the client control end needs to be set multiple times, resulting in low configuration efficiency. Summary of the invention

[0005] A server configuration method and device provided in an embodiment of the present application can improve configuration efficiency.

[0006] The embodiment of the present application adopts the following technical solution:

[0007] A first aspect: An embodiment of the present application provides a server configuration method, comprising: obtaining data information of multiple virtual local area networks, each virtual local area network including at least one server, and the data information is used to represent the configuration information of the virtual local area network; generating multiple network card sub-devices based on the data information of the multiple virtual local area networks, and the virtual local area networks correspond to the network card sub-devices; obtaining device information of the server in each virtual local area network through the network card sub-device corresponding to each virtual local area network; and configuring the server based on the device information of the server in each virtual local area network.

[0008] The method provided in the embodiment of the present application can obtain data information of multiple virtual LANs, generate network card sub-devices of multiple virtual LANs, obtain device information of servers in multiple virtual LANs based on the network card sub-devices of multiple virtual LANs, realize batch configuration of servers in multiple virtual LANs, and improve configuration efficiency.

[0009] In a possible implementation, obtaining data information of multiple virtual local area networks includes: obtaining data frames of a switch port based on a simple service discovery protocol; and reading data information of multiple virtual local area networks from the data frames.

[0010] In a possible implementation, multiple network card sub-devices are generated based on data information of multiple virtual local area networks, including: generating configuration files corresponding to multiple virtual local area networks based on data information of multiple virtual local area networks; generating multiple network card sub-devices based on configuration files corresponding to multiple virtual local area networks. In the embodiment of the present application, multiple network card sub-devices can be generated in batches, so that it is convenient to obtain device information of servers in corresponding virtual local area networks based on each network card sub-device in the subsequent process, realize batch configuration of servers in multiple virtual local area networks, and improve configuration efficiency.

[0011] In a possible implementation, multiple network card sub-devices are generated based on configuration files corresponding to multiple virtual LANs, including: based on the names of the network cards, information identifiers of the virtual LANs, and virtual LAN activation status information contained in the configuration files corresponding to the multiple virtual LANs, multiple network card sub-devices are configured to generate multiple network card sub-devices, so as to facilitate subsequent acquisition of device information of servers in the corresponding virtual LAN based on each network card sub-device, thereby realizing batch configuration of servers in multiple virtual LANs and improving configuration efficiency.

[0012] In a possible implementation, the device information of the server in each virtual LAN is obtained through the network card sub-device corresponding to each virtual LAN, including: obtaining the message information of the virtual LAN corresponding to each network card sub-device through the network card sub-device corresponding to each virtual LAN; reading the device information of the server in the message information of the virtual LAN corresponding to each network card sub-device.

[0013] In a possible implementation, obtaining the message information of the virtual local area network corresponding to each network card sub-device through the network card sub-device corresponding to each virtual local area network includes: obtaining multiple message information of the virtual local area network corresponding to each network card sub-device through the network card sub-device corresponding to each virtual local area network, wherein each message information includes the device information of a server. In the embodiment of the present application, when the virtual local area network includes multiple servers, multiple message information can be obtained to read the device information of each server from the multiple message information, so as to realize batch configuration of servers in multiple virtual local area networks and improve configuration efficiency.

[0014] In a possible implementation, before obtaining data information of multiple virtual LANs, it also includes: based on the information identifier of the virtual LAN, configuring the port-based virtual LAN information identifier PVID of the client control terminal and the switch port, so that the PVID is different from any virtual LAN information identifier in the virtual LAN information identifier, so that any VLAN ID can pass through the switch port.

[0015] In a possible implementation, configuring the server based on the device information of the server in each virtual local area network includes: based on the device information of the server in each virtual local area network, sending an Internet Protocol configuration request of a baseboard management controller to the server corresponding to the device information, and configuring the server corresponding to the device information, wherein the Internet Protocol configuration request of the baseboard management controller includes the Internet Protocol address of the baseboard management controller of the server. In the embodiment of the present application, communication with the server can be achieved based on the device information of the server, and on this basis, batch configuration of servers in multiple virtual local area networks can be achieved to improve configuration efficiency.

[0016] In a possible implementation, based on the device information of the server in each virtual local area network, an Internet Protocol configuration request of a baseboard management controller is sent to the server corresponding to the device information, and the server corresponding to the device information is configured, including: based on the address information and serial number in the device information of the server in each virtual local area network, the server corresponding to the address information and serial number is determined; the Internet Protocol configuration request of the baseboard management controller is sent to the server corresponding to the address information and serial number to configure the server. In the embodiment of the present application, the corresponding server can be determined based on the address information and serial number in the device information of the server, and communication with the server can be achieved. Batch configuration of servers in multiple virtual local area networks can be achieved, thereby improving configuration efficiency.

[0017] A second aspect: The embodiment of the present application provides a server configuration device, including:

[0018] A first acquisition unit, a generation unit, a second acquisition unit, and a configuration unit;

[0019] The first acquisition unit is used to acquire data information of a plurality of virtual local area networks, each of the virtual local area networks includes at least one server, and the data information is used to represent configuration information of the virtual local area network;

[0020] The generating unit is used to generate a plurality of network card sub-devices based on the data information of the plurality of virtual local area networks, wherein the virtual local area networks correspond to the network card sub-devices;

[0021] The second acquisition unit is used to acquire device information of the server in each virtual local area network through the network card sub-device corresponding to each virtual local area network;

[0022] The configuration unit is used to configure the server based on the device information of each server in the virtual local area network.

[0023] A third aspect: An embodiment of the present application provides a computing device, the computing device comprising: a processor and a memory;

[0024] The memory is used to store the program code and transmit the program code to the processor;

[0025] The processor is used to execute the steps of the above server configuration method according to the instructions in the program code. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram of a large-scale server scenario provided for an embodiment of the present application;

[0027] Figure 2 A schematic diagram of an application scenario of a server configuration method provided in an embodiment of the present application;

[0028] Figure 3 A flow chart of a server configuration method provided in an embodiment of the present application;

[0029] Figure 4 A schematic diagram of a data frame format provided in an embodiment of the present application;

[0030] Figure 5 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects rather than to limit a specific order.

[0032] 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.

[0033] To facilitate understanding, the basic concepts involved in the embodiments of the present application are introduced below.

[0034] The Simple Service Discovery Protocol (SSDP) is an application layer protocol based on the Hypertext Transfer Protocol (HTTP over UDP, HTTP) over the User Datagram Protocol, which can be used to discover network services and devices in a virtual local area network. For example, it can be used to discover devices that support Universal Plug and Play (UPnP), including printers, media servers, routers, etc.

[0035] Virtual Local Area Network (VLAN) is a technology that implements a logical virtual network based on a physical network. Based on a VLAN, a physical LAN can be divided into multiple logical LANs, thereby achieving isolation and secure communication between different servers.

[0036] In scenarios where large-scale servers are running, such as data centers or server rooms, each server can be divided into different virtual LANs according to needs to facilitate server management. For example, different types of servers may correspond to different security levels and isolation levels, and then the servers can be divided into corresponding virtual LANs based on the server type to isolate the traffic between different types of servers and reduce security risks.

[0037] The embodiment of the present application provides a server configuration method, which can obtain data information of multiple virtual local area networks, and the data information is used to represent the configuration information of the virtual local area network. For each virtual local area network in the multiple virtual local area networks, a network card sub-device of the virtual local area network is generated based on the data information. Based on the network card sub-device of each virtual local area network, the device information of the server in the virtual local area network corresponding to each network card sub-device can be obtained. After obtaining the device information of multiple servers, each server corresponding to each device information can be configured. The method provided by the embodiment of the present application can obtain data information of multiple virtual local area networks at one time, generate network card sub-devices of multiple virtual local area networks, so as to obtain the device information of servers in multiple virtual local area networks based on the network card sub-devices of multiple virtual local area networks, thereby realizing batch configuration of servers in multiple virtual local area networks and improving configuration efficiency.

[0038] Combine the following Figure 1-Figure 2 , the application scenario of the server configuration method provided in the embodiment of the present application is introduced, such as Figure 1 As shown, the figure is a schematic diagram of a large-scale server scenario provided in an embodiment of the present application.

[0039] In large-scale server scenarios, such as data centers or server rooms, there are multiple server cabinets running, such as Figure 1 The first server cabinet, the second server cabinet, ..., the Nth server cabinet in the embodiment, wherein N is a positive integer. Each server cabinet includes at least one cabinet switch and at least one server.

[0040] Each server cabinet can communicate with each other through the cabinet switch, and each cabinet switch can communicate with each other through the switch port. Among them, the cabinet switch is a layer 2 switch, which can be used to identify the media access control frame (MAC) address information in the data frame and send and receive data based on the MAC address; the switch port can use a port aggregation (Trunk) port.

[0041] A Trunk port is a port on a cabinet switch that is used to connect to other cabinet switches. The functions of a Trunk port include but are not limited to: transmitting data information of multiple VLANs, extending VLANs, and realizing cross-cabinet switch transmission between virtual LANs.

[0042] The Trunk port's function of transmitting data information of multiple VLANs means that the Trunk port can distinguish data information of different VLANs based on VLAN tags, and on this basis, transmit data information of corresponding VLANs between cabinet switches. VLAN tags are used to indicate the virtual LAN to which the data information belongs; the extended VLAN function means that different VLANs on different cabinet switches can be connected together through the Trunk port to form an extended VLAN network, thereby increasing the flexibility and scalability of the network; the cross-cabinet switch transmission function between virtual LANs means that when data needs to be transmitted from one cabinet switch to another, the Trunk port can add VLAN tags to the data information and transmit it to the corresponding cabinet switch.

[0043] A control-end server may be deployed in one of the multiple server cabinets, such as Figure 1 What is different from other server cabinets shown in the figure is that the first server cabinet includes a control end server, multiple servers, and a cabinet switch.

[0044] In a possible implementation, the client control end may be a virtual machine on the control end server, in which case the virtual LAN may be configured in a relay mode, wherein the relay mode allows the cabinet switch port to transmit data information of multiple virtual LANs simultaneously, rather than being limited to data information of only one virtual LAN.

[0045] In another possible implementation, the client control end may be directly deployed on the control end server.

[0046] The server configuration method provided in the embodiment of the present application can batch discover and configure servers in multiple virtual LANs based on the client control end without having to set the PVID of the switch port of the client control end multiple times, thereby improving the configuration efficiency of the server.

[0047] like Figure 2 As shown, the figure is a schematic diagram of an application scenario of a server configuration method provided in an embodiment of the present application.

[0048] The client controller in the embodiment of the present application can interact with servers in multiple virtual local area networks through each cabinet switch. Figure 2 In the example, each cabinet switch is connected through a Trunk port, and the cabinet switch is connected to the server through a switch port. For example, the first cabinet switch is connected to the first server group through the first switch port; the second cabinet switch is connected to the second server group and the third server group through the second switch port and the third switch port respectively; the Nth cabinet switch is connected to the Nth server group through the Nth switch port. Each server group includes at least one server, and the switch port between each cabinet switch and the server group can be an access port.

[0049] Access port is a type of port on the switch. Unlike Trunk port, Access port does not support the transmission of data information of multiple virtual LANs at the same time. One Access port corresponds to one virtual LAN. The functions of Access port include but are not limited to: connecting terminal devices, providing access to a single virtual LAN, and realizing isolation between virtual LANs.

[0050] The terminal device connection function of the Access port means that the Access port can connect the terminal device to the switch via Ethernet, so that the terminal device can access the LAN and communicate with other devices; the access function of providing a single virtual LAN means configuring the Access port to belong to a specific virtual LAN so that the data information transmitted by the Access port belongs only to the virtual LAN and will not cross to other virtual LANs; the isolation function between virtual LANs means that by configuring the Access port to different virtual LANs, isolation between virtual LANs can be achieved, thereby enhancing network security.

[0051] It is understandable that the same cabinet switch can be connected to server groups in the same virtual local area network through different switch ports, and can also be connected to server groups in different virtual local area networks through different switch ports. For example, the second server group and the third server group connected to the second cabinet switch can be in the same virtual local area network or in different virtual local area networks.

[0052] Different cabinet switches can be connected to server groups in the same virtual LAN or in different virtual LANs. For example, the first server group connected to the first cabinet switch and the second server group connected to the second cabinet switch can be in the same virtual LAN; the first server group connected to the first cabinet switch and the third server group connected to the second cabinet switch can be in different virtual LANs.

[0053] Figure 2 In the example, only server groups connected to different switch ports are in different virtual local area networks. As shown in the figure, the first server group is in a virtual local area network with a VLAN ID of 101, the second server group is in a virtual local area network with a VLAN ID of 102, the third server group is in a virtual local area network with a VLAN ID of 103, and the Nth server group is in a virtual local area network with a VLAN ID of 104.

[0054] The first cabinet switch is connected to the client controller through the switch port of the client control end, wherein the switch port of the client control end can be a Trunk port; and the PVID of the switch port of the client control end can be configured to be a value different from any VLAN ID, so that any VLAN ID can pass through the switch port of the client control end.

[0055] In the embodiment of the present application, the PVID of the switch port of the client control end needs to be different from any VLAN ID for the following reasons:

[0056] Typically, the first cabinet switch can perform a tag operation and an untag operation.

[0057] Exemplarily, when the first cabinet switch performs a tagging operation, if the data information entering the switch port of the customer control end includes a VLAN ID, the data information can enter the first cabinet switch; if the data information entering the switch port of the customer control end does not include a VLAN ID, the PVID of the switch port of the customer control end is used as the VLAN ID, so that the data information with the VLAN ID equal to the PVID enters the first cabinet switch.

[0058] When the first cabinet switch performs the untagging operation, if the VLAN ID included in the data information sent from the switch port of the customer control end is different from the PVID of the switch port of the customer control end, the data information can be sent directly; if the VLAN ID included in the data information is the same as the PVID of the switch port of the customer control end, the first cabinet switch will delete the VLAN ID and send out the data information that does not include the VLAN ID.

[0059] In the embodiment of the present application, the client controller can generate the network card sub-device of the virtual local area network based on the data information of the virtual local area network, so as to obtain the address information of the server in the virtual local area network corresponding to each network card sub-device, and configure the server corresponding to each address information. Among them, the data information includes but is not limited to the information identifier of the local area network.

[0060] When the first cabinet switch deletes the VLAN ID in the data information, the client controller cannot generate the network card sub-device of the virtual LAN based on the VLAN ID, and thus cannot obtain the address information of the server in the virtual LAN, making it difficult to configure the server.

[0061] In the embodiment of the present application, the PVID of the switch port of the client control end is set to a value different from any VLAN ID, so that the switch port of the client control end can allow all VLAN IDs to pass. For example, if the value range of the VLAN ID is 101-4094, the PVID can be configured to any value outside the range of 101-4094.

[0062] It is understandable that the value of PVID is not specifically limited in the embodiments of the present application. Figure 2 The example of setting the PVID to 1 is shown in the figure.

[0063] In the case where the PVID of the switch port at the client control end is different from any VLAN ID, the switch port of the client controller will not perform tag and untag operations. On this basis, the client controller can obtain data information of multiple virtual LANs based on the simple service discovery protocol, and then, for each virtual LAN in the multiple virtual LANs, generate a network card sub-device of the virtual LAN based on the data information of the virtual LAN in the data information, wherein the configuration file of each network card sub-device includes the VLAN ID of the corresponding virtual LAN. Based on the network card sub-device of each virtual LAN, the address information of the server sent by the virtual LAN corresponding to each network card sub-device can be obtained; based on the address information of multiple servers, each server corresponding to each address information is configured.

[0064] In an embodiment of the present application, the client controller can dynamically generate multiple network sub-devices with VLAN IDs based on the virtual LANs existing in the current Layer 2 network, and based on each network sub-device, send and receive messages from different virtual LANs, communicate with multiple servers in each virtual LAN, thereby realizing batch configuration of servers in multiple virtual LANs and improving configuration efficiency.

[0065] Combine the following Figure 3 A server configuration method provided in an embodiment of the present application is introduced. The figure is a flow chart of a server configuration method provided in an embodiment of the present application.

[0066] S101. The client control terminal obtains data information of multiple virtual local area networks based on a simple service discovery protocol.

[0067] Each virtual local area network includes at least one server.

[0068] For example, in Figure 2 In the scenario shown, the client control end can simultaneously obtain data information of virtual local area networks with VLAN IDs 101 and 102 based on the simple service discovery protocol.

[0069] It can be understood that the embodiment of the present application does not specifically limit the amount of data information of virtual LANs that the client controller can obtain at one time. Here, only the example of the client controller obtaining data information of two virtual LANs at one time is used to introduce it, that is, the client controller obtains data information of virtual LANs with VLAN IDs 101 and 102 at one time.

[0070] The BMC of the server usually includes the default Internet Protocol version 6 (IPV6) address information and supports the simple service discovery protocol, wherein the transport layer of the simple service discovery protocol can use the User Datagram Protocol (UDP), and the protocol port can use port 1900.

[0071] In this case, the client control end deployed with the simple service discovery protocol software can obtain data information from each virtual LAN in real time by monitoring the 1900 port based on the simple service discovery protocol.

[0072] In a possible implementation, the client control end can obtain a data frame passing through the switch port of the client control end based on the simple service discovery protocol, and can read data information of multiple virtual local area networks from the data frame.

[0073] Exemplarily, the data frame is a MAC frame, and its format is as follows: Figure 4As shown, this figure is a schematic diagram of a data frame format provided in an embodiment of the present application. Figure 4 In the MAC frame, the 1st to 6th byte data are used to represent the address information of the target MAC frame; the 7th to 12th byte data are used to represent the address information of the source MAC frame; the 13th to 16th byte data are used to represent the VLANID of multiple virtual LANs; the 17th to 18th byte data are used to represent the types of multiple virtual LANs; the 19th to 1455th byte data are used to represent the received data content; the 1456th to 1459th byte data are used to represent the frame check sequence (FCS).

[0074] The client controller can obtain the VLAN IDs of multiple virtual local area networks by reading the 13th to 16th bytes of data in the MAC frame, and can obtain the type of each virtual local area network by reading the 17th to 18th bytes of data in the MAC frame.

[0075] S102: The client controller generates a network card sub-device of each virtual local area network in the multiple virtual local area networks based on the information identifier of the virtual local area network in the data information.

[0076] Based on the simple service discovery protocol, the client controller can generate a network card sub-device of the virtual local area network according to the information identifier of the virtual local area network in the data information.

[0077] Exemplarily, the name of the network card in the client controller is eht0, and the data information of the virtual LANs with VLAN IDs 101 and 102 is obtained. The client controller can dynamically generate network card sub-devices of the virtual LANs with VLAN IDs 101 and 102 based on the VLAN ID, name and type in the data information of the virtual LAN.

[0078] Among them, the network card sub-device of the virtual local area network with VLAN ID 101 can be named vlan101@eth0; the network card sub-device of the virtual local area network with VLAN ID 102 can be named vlan102@eth0.

[0079] In a possible implementation, the client controller may generate configuration files of network card sub-devices corresponding to each virtual LAN based on data information of each virtual LAN, and generate network card sub-devices corresponding to each configuration file based on the configuration files of network card sub-devices corresponding to each virtual LAN.

[0080] The configuration file is used to indicate the configuration information of the network card sub-device. The network card sub-device can be configured based on the configuration information to generate the network card sub-device corresponding to each configuration file.

[0081] In the embodiment of the present application, the configuration file of the network card sub-device includes but is not limited to the name of the network card in the client controller, the VLAN ID of the virtual LAN, the naming rule of the virtual LAN corresponding to the VLAN ID, and the virtual LAN activation status information.

[0082] Among them, the name of the network card in the client controller is used to indicate the network card corresponding to the network card sub-device; the VLAN ID of the virtual local area network is used to instruct the network card sub-device to obtain the device information of the server in the virtual local area network corresponding to the VLAN ID; the virtual local area network activation status information is used to indicate whether the VLAN is in an enabled state.

[0083] Exemplarily, taking the network card sub-device of the virtual LAN with VLAN ID 101 as an example, in its configuration file, "PHYSDEV=eth0" can be configured to indicate that the name of the network card in the client controller is eth0; configure "NAME=vlan101" to instruct the network card sub-device to obtain the device information of the server in the virtual LAN with VLAN ID 101; configure "VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD" to indicate that the naming rule of the virtual LAN is that the name of the virtual LAN is directly composed of "VLAN_" and the VLAN ID, and the VLAN ID will not be filled in any form when converted to a string, such as no leading zeros will be added; configure "VLAN=yes" to indicate whether the virtual LAN is enabled.

[0084] In one embodiment, the difference between the configuration files of different network card sub-devices lies in the different VLAN IDs of the virtual LANs in the configuration files. In this case, the client controller can generate configuration files of the network card sub-devices corresponding to each virtual LAN based on the VLAN IDs contained in the data information of each virtual LAN.

[0085] On this basis, the client controller can generate the network card sub-device corresponding to each configuration file based on the configuration files of the network card sub-device corresponding to each virtual local area network.

[0086] S103: The client controller obtains device information of a server in the virtual local area network corresponding to the network card sub-device based on the network card sub-device of each virtual local area network.

[0087] The device information includes but is not limited to the address information and serial number of the server.

[0088] In an embodiment of the present application, for a network card sub-device among multiple virtual LANs, the client controller can send a message to all virtual LANs in the current Layer 2 network based on the network card sub-device of the virtual LAN to obtain device information of the server in the virtual LAN corresponding to the network card sub-device.

[0089] Exemplarily, the client controller can send a message to all virtual LANs in the current layer 2 network based on the network card sub-device of the virtual LAN with VLAN ID 101. Among them, the server in the virtual LAN with VLAN ID 101 can return the device information including the address information and serial number of the server to the client controller, while the server in the virtual LAN with VLAN ID 102 will not return the device information of the server to the client controller.

[0090] In a possible implementation, the client controller may obtain the message information of the virtual local area network corresponding to the network card sub-device based on the network card sub-device of each virtual local area network, so as to read the device information of the server from the message information.

[0091] The device information includes but is not limited to the address information and serial number of the server. The address information and serial number are unique. A server can be uniquely identified based on the address information and serial number in each device information.

[0092] Exemplarily, the address information of the server can be expressed as: "location":"https: / / fe80::3673:79ff:fe11:449b / redfish / v1 / "; wherein, location represents an address, and is used to indicate that the field after the colon is the address information of the server; in the address information, "https: / / " is used to specify the use of Hypertext Transfer Protocol Secure (HTTPS) for communication, and HTTPS is a secure version of the Hypertext Transfer Protocol (HTTP); "fe80::3673:79ff:fe11:449b" is an IPv6 address, and IPv6, as the sixth version of the Internet Protocol, can replace IPv4 to solve problems such as Internet Protocol (IP) address exhaustion; " / redfish / v1 / " is used to indicate the path of the Uniform Resource Locator (URL), indicating the specific location of the resource or service to be accessed, wherein the / redfish / field indicates that the URL is related to the Redfish interface, which is a protocol developed by the Distributed Management Task Force (DMTF). A standard application programming interface designed by the Data Center Management Task Force (DMTF) for managing and monitoring hardware devices in data centers, such as servers, storage, and network devices.

[0093] / v1 / : indicates that the first version of the Redfish interface is being accessed.

[0094] The serial number of the server can be expressed as: "usn":"uuid:E1C5D866-0018-A889-B211-D21D82BA0A24::urn:dmtf-org:service:redfish-rest:1". Among them, usn stands for serial number, which is used to indicate that the field after the colon is the serial number of the server; the "uuid:E1C5D866-0018-A889-B211-D21D82BA0A24" field is a standard Universally Unique Identifier (UUID) format, which is used to identify a unique information unit; in the "urn:dmtf-org:service:redfish-rest:1" field, urn is used to uniquely identify the name of the resource, "dmtf-org" indicates that the resource is maintained or defined by the Distributed Management Task Force, and "service:redfish-rest:1" indicates that this is a RESTful service based on the Redfish interface, with a version number of 1. The RESTful service is a network service based on the Representational State Transfer (REST) ​​architectural style.

[0095] It should be noted that the embodiments of the present application do not specifically limit the formats of the server address information and serial number, and the above are only examples.

[0096] In the embodiment of the present application, each server may correspond to one message information. For example, if the virtual local area network with VLAN ID 101 includes one hundred servers, the client controller can obtain one hundred message information from the virtual local area network based on the network card sub-device of the virtual local area network with VLAN ID 101, and the device information of one server can be read from each message information.

[0097] S104: The client controller configures the multiple servers based on the device information of the multiple servers.

[0098] In an embodiment of the present application, the client controller can identify the server based on the address information and serial number in the device information of each server. On this basis, the client controller can send a baseboard management controller Internet interconnection protocol (BMC IP) configuration request to the multiple servers based on the address information and serial number of each server to implement configuration of the server.

[0099] The BMC IP configuration request may include an Internet Protocol version 4 (IPV4) address of a baseboard management controller of the server.

[0100] After the BMC IP is configured for the server, the client controller can communicate with the configured server. For example, the client controller can perform operation and maintenance operations such as batch installation of operating systems and configuration of firewalls on multiple configured servers.

[0101] To sum up, the method provided in the embodiment of the present application can obtain data information of multiple virtual LANs at one time and generate network card sub-devices of multiple virtual LANs, so as to obtain address information and serial numbers of servers in multiple virtual LANs based on the network card sub-devices of multiple virtual LANs, thereby realizing batch configuration of servers in multiple virtual LANs and improving configuration efficiency.

[0102] At the same time, the method provided in the embodiment of the present application is based on the simple service discovery protocol supported by the server, and can be implemented by improving the receiving end of the simple service discovery protocol and deploying it on the client controller, without the need for additional settings on the server side. The method provided in the embodiment of the present application can improve the configuration efficiency while being relatively simple to deploy.

[0103] The embodiment of the present application also provides a server configuration device, and its specific implementation method is consistent with the implementation method and technical effects recorded in the embodiment of the above method, and some contents will not be repeated here.

[0104] An embodiment of the present application provides a server configuration device, comprising:

[0105] A first acquisition unit, a generation unit, a second acquisition unit, and a configuration unit;

[0106] The first acquisition unit is used to acquire data information of a plurality of virtual local area networks, each of the virtual local area networks includes at least one server, and the data information is used to represent configuration information of the virtual local area network;

[0107] The generating unit is used to generate a plurality of network card sub-devices based on the data information of the plurality of virtual local area networks, wherein the virtual local area networks correspond to the network card sub-devices;

[0108] The second acquisition unit is used to acquire device information of the server in each virtual local area network through the network card sub-device corresponding to each virtual local area network;

[0109] The configuration unit is used to configure the server based on the device information of each server in the virtual local area network.

[0110] In a possible implementation, the first acquisition unit includes: a first sub-acquisition unit and a first reading unit;

[0111] The first acquisition subunit is used to acquire data frames of the switch port based on the simple service discovery protocol;

[0112] The first reading unit is used to read the data information of the multiple virtual local area networks from the data frame.

[0113] In a possible implementation, the generating unit includes:

[0114] a first sub-generation unit and a second sub-generation unit;

[0115] The first sub-generating unit is used to generate configuration files corresponding to a plurality of virtual local area networks based on data information of the plurality of virtual local area networks;

[0116] The second sub-generating unit is used to generate the multiple network card sub-devices based on the configuration files corresponding to the multiple virtual local area networks.

[0117] In a possible implementation manner, the second sub-generation unit is specifically configured to:

[0118] Based on the names of the network cards, the information identifiers of the virtual local area networks, and the virtual local area network activation status information contained in the configuration files corresponding to the multiple virtual local area networks, multiple network card sub-devices are configured to generate the multiple network card sub-devices.

[0119] In a possible implementation, the second acquiring unit includes:

[0120] a second sub-acquisition unit and a second reading unit;

[0121] The second sub-acquisition unit is used to acquire the message information of the virtual local area network corresponding to each network card sub-device through the network card sub-device corresponding to each virtual local area network;

[0122] The second reading unit is used to read the device information of the server in the message information of the virtual local area network corresponding to each of the network card sub-devices.

[0123] In a possible implementation manner, the second sub-acquisition unit is specifically configured to:

[0124] Through the network card sub-device corresponding to each of the virtual local area networks, multiple message information of the virtual local area network corresponding to each of the network card sub-devices is obtained, and each of the message information contains device information of a server.

[0125] In a possible implementation, the device further includes: an information identification configuration unit;

[0126] The information identifier configuration unit is used to configure the port-based virtual LAN information identifier PVID of the client control terminal and the switch port based on the virtual LAN information identifier, so that the PVID is different from any virtual LAN information identifier in the virtual LAN information identifier.

[0127] In a possible implementation, the configuration unit is specifically configured to:

[0128] Based on the device information of each server in the virtual local area network, an Internet Protocol configuration request of a baseboard management controller is sent to the server corresponding to the device information to configure the server corresponding to the device information. The Internet Protocol configuration request of the baseboard management controller includes the Internet Protocol address of the baseboard management controller of the server.

[0129] In a possible implementation, the configuration unit includes: a determination unit and a configuration subunit;

[0130] The determining unit is used to determine the server corresponding to the address information and the serial number based on the address information and the serial number in the device information of each server in the virtual local area network;

[0131] The configuration subunit is used to send an Internet protocol configuration request of a baseboard management controller to the server corresponding to the address information and the serial number, so as to configure the server.

[0132] To summarize, the device provided in the embodiment of the present application can be based on the simple service discovery protocol supported by the server. By improving the receiving end of the simple service discovery protocol and deploying it on the client controller, the client controller can obtain data information of multiple virtual LANs at one time, generate network card sub-devices of multiple virtual LANs, and obtain address information and serial numbers of servers in multiple virtual LANs based on the network card sub-devices of multiple virtual LANs, thereby realizing batch configuration of servers in multiple virtual LANs and improving configuration efficiency.

[0133] like Figure 5 As shown, this figure is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. In this embodiment, the computing device can be a cabinet server, a rack server, a blade server, etc., or the computing device can be a general-purpose server, a GPU server, a DPU server, etc., which is not limited here.

[0134] The computing device includes a memory 1200, a processor 1201 and a communication interface 1202; wherein the memory 1200 stores computer instructions, and the processor 1201 is used to execute the computer instructions, so that the computing device executes a server configuration method shown above.

[0135] In some embodiments, the processor 1201 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor.

[0136] In some embodiments, the memory 1200 may be a volatile memory or a non-volatile memory, such as a register. Specifically, a volatile memory refers to a memory in which the data stored inside will be lost when the power supply is interrupted. Among them, the volatile memory is mainly a random access memory (RAM), including a static random access memory (SRAM) and a dynamic random access memory (DRAM). A non-volatile memory refers to a memory in which the data stored inside will not be lost even if the power supply is interrupted. Common non-volatile memories include read-only memory (ROM), optical disks, magnetic disks, solid-state hard disks, and various memory cards based on flash memory technology.

[0137] In some embodiments, the memory 1200 has executable codes, and the processor 1201 executes the codes. The communication interface 1202 can be used to implement communication between the client control end and the server.

[0138] The bus can be a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of understanding, Figure 5 It is represented by only one thick line, but it does not mean that there is only one bus or one type of bus.

[0139] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. The above is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto, and any changes or replacements 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 shall be based on the protection scope of the claims.

Claims

1. A server configuration method, characterized in that: include: Acquire data information of a plurality of virtual local area networks, each of the virtual local area networks including at least one server, the data information being used to represent configuration information of the virtual local area network; Based on the data information of the plurality of virtual local area networks, a plurality of network card sub-devices are generated, wherein the virtual local area networks correspond to the network card sub-devices; Obtaining device information of a server in each virtual local area network through a network card sub-device corresponding to each virtual local area network; The server is configured based on the device information of each server in the virtual local area network.

2. The method according to claim 1, characterized in that The step of obtaining data information of multiple virtual local area networks includes: Based on the simple service discovery protocol, obtain the data frame of the switch port; The data information of the multiple virtual local area networks is read from the data frame.

3. The method according to claim 1, characterized in that The generating of a plurality of network card sub-devices based on the data information of the plurality of virtual local area networks comprises: Based on the data information of the plurality of virtual local area networks, generating configuration files corresponding to the plurality of virtual local area networks; The multiple network card sub-devices are generated based on the configuration files corresponding to the multiple virtual local area networks.

4. The method according to claim 3, characterized in that The generating the plurality of network card sub-devices based on the configuration files corresponding to the plurality of virtual local area networks comprises: Based on the names of the network cards, the information identifiers of the virtual local area networks, and the virtual local area network activation status information contained in the configuration files corresponding to the multiple virtual local area networks, multiple network card sub-devices are configured to generate the multiple network card sub-devices.

5. The method according to claim 1, characterized in that The acquiring device information of the server in each virtual local area network through the network card sub-device corresponding to each virtual local area network includes: Acquire the message information of the virtual local area network corresponding to each of the network card sub-devices through the network card sub-device corresponding to each of the virtual local area networks; Read the device information of the server in the message information of the virtual local area network corresponding to each of the network card sub-devices.

6. The method according to claim 5, characterized in that The acquiring, through the network card sub-device corresponding to each of the virtual local area networks, the message information of the virtual local area network corresponding to each of the network card sub-devices includes: Through the network card sub-device corresponding to each of the virtual local area networks, multiple message information of the virtual local area network corresponding to each of the network card sub-devices is obtained, and each of the message information contains device information of a server.

7. The method according to claim 1, characterized in that Before acquiring data information of multiple virtual local area networks, the method further includes: Based on the information identifier of the virtual local area network, the port-based virtual local area network information identifier PVID of the client control terminal and the switch port is configured so that the PVID is different from any virtual local area network information identifier in the information identifiers of the virtual local area network.

8. The method according to claim 1, characterized in that The configuring the server based on the device information of each server in the virtual local area network includes: Based on the device information of each server in the virtual local area network, an Internet Protocol configuration request of a baseboard management controller is sent to the server corresponding to the device information to configure the server corresponding to the device information. The Internet Protocol configuration request of the baseboard management controller includes the Internet Protocol address of the baseboard management controller of the server.

9. The method according to claim 8, characterized in that The sending of an Internet protocol configuration request of a baseboard management controller to a server corresponding to the device information based on the device information of each server in the virtual local area network, and configuring the server corresponding to the device information, comprises: Based on the address information and the serial number in the device information of each server in the virtual local area network, determining the server corresponding to the address information and the serial number; An Internet protocol configuration request of a baseboard management controller is sent to a server corresponding to the address information and the serial number to configure the server.

10. A computing device, characterized in that: The computing device includes: a processor and a memory; The memory is used to store program codes and transmit the program codes to the processor; The processor is used to execute the steps of a server configuration method as described in any one of claims 1-9 according to the instructions in the program code.

Citation Information

Cited By

  • Implementation method of large-scale information issuing system

    CN121690908A

  • Implementation method of large information publishing system

    CN121690908B