Access method of a baseboard management controller and electronic device
By creating virtual network interfaces and dynamically configuring network addresses on the server side, the problem of cumbersome access when the BMC network is down is solved, enabling convenient access when the BMC network is completely down, thus improving operational efficiency and system reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2026-01-27
- Publication Date
- 2026-04-17
AI Technical Summary
When the BMC network is down, the process of accessing the BMC in the existing technology is cumbersome, resulting in low operation and maintenance efficiency, especially in cross-regional data center and industrial edge node scenarios where the fault handling cycle is extended.
By creating a first virtual network interface on the server side, the network address request from the operation and maintenance client is received. The target BMC is determined based on the identity identifier to be matched, and the target network address is dynamically configured from the idle network address range. The configuration information is fed back to the operation and maintenance client to enable access.
Without relying on the normal operation of the server operating system or physical access to the data center, it can allocate available network addresses to the operation and maintenance clients when the BMC network is completely unavailable, thereby improving operation and maintenance efficiency and system reliability, and ensuring the convenience and efficiency of fault handling.
Smart Images

Figure CN121585478B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of server technology, and in particular to an access method and electronic device for a baseboard management controller. Background Technology
[0002] In remote operation and maintenance scenarios for hardware such as servers and industrial equipment, the Baseboard Management Controller (BMC) is the core unit for realizing remote monitoring, power on / off, and troubleshooting of equipment. Its network connection with the operation and maintenance client is the foundation for ensuring the normal operation and maintenance.
[0003] However, in actual operation and maintenance, the problem of "BMC network downtime" is frequently encountered. Currently, when dealing with "BMC network downtime," operation and maintenance personnel mainly use the following two methods to access the network: either first ensure that the server operating system is running normally, and then log in to the operating system to query the BMC's IP address and network status through the intelligent platform management interface (ipmitool); or, if the server operating system fails or cannot be logged in, it is necessary to physically enter the equipment deployment room and directly connect to the BMC via a serial cable for troubleshooting. Both of these methods are limited by environmental conditions (such as the operating system needing to be running normally and the need for data center access), and the process is cumbersome and time-consuming. Especially in scenarios such as cross-regional data centers and industrial edge nodes, this will significantly extend the fault handling cycle and seriously affect operation and maintenance efficiency.
[0004] Therefore, how to improve the convenience and efficiency of accessing the BMC when the BMC network is down has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a method and electronic device for accessing a baseboard management controller (BMC), which at least solves the problem of the cumbersome process of client accessing the BMC when the BMC network is down in the related art.
[0006] In a first aspect, this application provides a method for accessing a baseboard management controller, applied to a server, comprising:
[0007] When a first virtual network interface is created and a network address request is received from the operation and maintenance client through the first virtual network interface, the identity identifier of the baseboard management controller to be matched carried in the network address request is obtained.
[0008] Based on the identity identifier to be matched, the target baseboard management controller is determined from multiple baseboard management controllers, and the target network address is determined from at least one network address range that is in an idle state, and the target network address is configured on the first virtual network interface;
[0009] The network configuration completion information is sent from the first virtual network interface to the second virtual network interface of the operation and maintenance client, instructing the operation and maintenance client to access the target baseboard management controller through the target network address in the network configuration completion information.
[0010] Secondly, this application provides a method for accessing a baseboard management controller, applied to an operation and maintenance client, including:
[0011] Create a second virtual network interface; the second virtual network interface is used to communicate with the server's first virtual network interface;
[0012] Obtain multiple preset network address ranges from the pre-stored server, and send network address requests to the multiple preset network address ranges through the second virtual network interface; the network address request includes the identity identifier of the target baseboard management controller, which is used to match the target baseboard management controller among the multiple baseboard management controllers;
[0013] Receive network configuration completion information sent by the server through the second virtual network interface;
[0014] The network configuration completion information is parsed to extract the target network address, so as to access the target baseboard management controller through the target network address.
[0015] Thirdly, this application provides an access device for a substrate management controller, comprising:
[0016] A creation unit is used to create a first virtual network interface, and when a network address request is received from an operation and maintenance client through the first virtual network interface, to obtain the identity identifier of the baseboard management controller carried in the network address request.
[0017] The determining unit is configured to determine a target baseboard management controller from multiple baseboard management controllers based on the identity identifier to be matched, determine a target network address from at least one network address range in an idle state, and configure the target network address onto the first virtual network interface;
[0018] The sending unit is configured to send network configuration completion information to the second virtual network interface of the operation and maintenance client through the first virtual network interface, so as to instruct the operation and maintenance client to access the target baseboard management controller through the target network address in the network configuration completion information.
[0019] Fourthly, this application provides another access device for a substrate management controller, comprising:
[0020] A creation unit is used to create a second virtual network interface; the second virtual network interface is used to communicate with the first virtual network interface of the server.
[0021] The acquisition unit is used to acquire multiple preset network address ranges of the pre-stored server, and send network address requests to the multiple preset network address ranges through the second virtual network interface; the network address request includes the identity identifier of the target baseboard management controller, which is used to match the target baseboard management controller among the multiple baseboard management controllers;
[0022] The receiving unit is configured to receive network configuration completion information sent by the server through the second virtual network interface;
[0023] The parsing unit is used to parse the network configuration completion information and extract the target network address so as to access the target baseboard management controller through the target network address.
[0024] Fifthly, this application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the access method of any of the aforementioned baseboard management controllers when executing the computer program.
[0025] Sixthly, this application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of the access method of any of the above-described baseboard management controllers.
[0026] In a seventh aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described access methods for a baseboard management controller.
[0027] This application creates a first virtual network interface for the target baseboard management controller (i.e., the server) and actively obtains free network address ranges in the network environment. Upon receiving a network address request from an operations and maintenance client, it first verifies the consistency between the identity identifier to be matched carried in the request and its own identity identifier. Only after a successful match is the target network address allocated from the free address range and configured to the virtual network interface. Finally, it sends configuration completion information back to the client to guide access. Furthermore, the baseboard management controller creates a virtual network interface and actively probes for free address ranges in the network environment. When it receives an address request from an operations and maintenance client, it matches the server and the client through identity matching. If a match is successful, it dynamically selects a target network address from the free address range, configures it to the virtual network interface, and returns the address information to the client.
[0028] Furthermore, this application does not rely on the normal operation of the server operating system or physical access to the data center. Instead, the target baseboard management controller, i.e. the server, actively creates a virtual network interface and obtains an idle network address segment. Even when the BMC network is completely unavailable, it can still allocate an available target network address to the operation and maintenance client. It does not rely on the pre-configuration information of a specific network segment, nor does it require operation and maintenance personnel to enter the data center for physical contact or apply for high-level permissions. It can complete the secure acquisition of network addresses and connection establishment without interrupting business operations, which significantly improves operation and maintenance efficiency and system reliability. Attached Figure Description
[0029] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0030] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 One of the flowcharts illustrating an access method for a baseboard management controller provided in an embodiment of this application;
[0032] Figure 2 A second schematic flowchart illustrating a method for accessing a baseboard management controller, provided in an embodiment of this application;
[0033] Figure 3 A third schematic flowchart illustrating an access method for a baseboard management controller provided in an embodiment of this application;
[0034] Figure 4 A fourth schematic flowchart illustrating an access method for a baseboard management controller provided in an embodiment of this application;
[0035] Figure 5 Fifth schematic flowchart of a method for accessing a baseboard management controller provided in an embodiment of this application;
[0036] Figure 6 A schematic diagram of the structure of an access device for a baseboard management controller provided in an embodiment of this application;
[0037] Figure 7 This is a schematic diagram of the structure of an access device for another baseboard management controller provided in an embodiment of this application. Detailed Implementation
[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0039] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0040] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0041] In some embodiments, such as Figure 1 As shown, a method for accessing a baseboard management controller is provided, applied to a server, specifically including the following steps S11-S13:
[0042] S11. Create a first virtual network interface, and when a network address request is received from the operation and maintenance client through the first virtual network interface, obtain the identity identifier of the baseboard management controller to be matched carried in the network address request.
[0043] It should be noted that the embodiments of this application are for scenarios where multiple baseboard management controllers (BMCs) coexist. They enable the operation and maintenance client to access the target baseboard management controller through a unified virtual network interface, precise identity identification and positioning, and dynamic address configuration.
[0044] Specifically, a "first virtual network interface" is created by an entity with multi-BMC management capabilities (such as an independent network management node or core control device). This first virtual network interface can be an Ethernet virtual interface ethv, which is a software-defined logical communication channel that does not rely on an independent physical network card but shares the underlying physical Ethernet resources (such as the Ethernet controller integrated in the server).
[0045] This first virtual network interface serves as a common communication entry point for multiple BMCs, avoiding the resource waste caused by creating a separate virtual interface for each BMC. It also isolates operation and maintenance management traffic from device service traffic, carrying management messages such as address requests and configuration feedback, but not transmitting server service data, thus ensuring the stability of operation and maintenance. The creation process can be completed via network protocol stack commands (such as the Linux system's `iplink add` command) or a dedicated firmware interface. The interface has an independent virtual MAC address and link layer parameters, adapting to mainstream scenarios such as Ethernet and industrial Ethernet.
[0046] By creating a virtual network interface, all network communications related to this IP detection method (such as listening and configuring temporary IPs) are restricted to this virtual interface, thereby ensuring zero interference with the BMC's original business network. That is, any software operation and network configuration on the physical management interface are unaffected.
[0047] It should also be noted that in the operation and maintenance scenario where multiple baseboard management controllers coexist, when the BMC network is down, i.e. the operation and maintenance client cannot obtain the address, the operation and maintenance client in this embodiment can send the network address request to the first virtual network interface on the server with multiple BMC management capabilities through its own pre-created second virtual network interface, and then transmit the key information of the target BMC to the server, i.e., carry the identity identifier to be matched, such as the unique serial number and UUID of the BMC in the network address request.
[0048] S12. Based on the identity identifier to be matched, determine the target baseboard management controller from multiple baseboard management controllers, determine the target network address from at least one network address range in an idle state, and configure the target network address onto the first virtual network interface.
[0049] In this embodiment of the application, the target baseboard management controller can be determined from multiple baseboard management controllers managed by the server based on the identity identifier to be matched.
[0050] Specifically, the server pre-maintains a mapping table between BMC identities and BMC devices. This table records information such as the identity, physical location, and hardware model of all manageable BMCs within the current network. When a matching identity is found, the server iterates through this mapping table. If a BMC's pre-stored identity completely matches the matching identity, that BMC is identified as the target baseboard management controller. For example, in a multi-rack data center scenario, the BMC of a specific server in a particular rack can be directly located via the serial number (SN), avoiding address conflicts caused by false responses from non-target BMCs.
[0051] It should be noted that the server also monitors idle network address ranges in real time. It can periodically scan the network (e.g., using ARP probes) to mark unused address ranges that conform to the management network segment plan. Then, after determining the target BMC, it selects an idle network address from the idle network address range. Subsequently, it binds the target network address to the first virtual network interface, and configures parameters such as subnet mask and gateway to enable the first virtual interface to have the network layer conditions for communication with the operation and maintenance client.
[0052] Furthermore, it enables dynamic temporary binding of network addresses, and after the operation and maintenance client finishes accessing the network, the address is restored to an idle state, thereby improving address utilization.
[0053] S13. Send network configuration completion information to the second virtual network interface of the operation and maintenance client through the first virtual network interface, so as to instruct the operation and maintenance client to access the target baseboard management controller through the target network address in the network configuration completion information.
[0054] Subsequently, after configuring the network address of the first virtual network interface in step S12 above, a network configuration completion message is sent to the second virtual network interface of the operation and maintenance client. This network configuration completion message includes the target network address (the IP bound to the first virtual interface), the identity matching result (confirming the target BMC identity), and communication parameters (such as the port number).
[0055] After receiving network configuration completion information, the maintenance client initiates a connection request for the target network address through the second virtual network interface. This request is forwarded to the target BMC via the first virtual network interface, ultimately forming a dedicated access link between the maintenance client, the second virtual network interface, the first virtual interface, and the target BMC. The maintenance client can then perform remote maintenance (such as hardware monitoring, power control, and troubleshooting) through this link. Even in scenarios where the original BMC network is completely down, the client can still access the target baseboard management controller on the server through the dedicated communication link between the first and second virtual network interfaces. This allows for real-time collection of hardware data associated with the target BMC, such as CPU temperature, fan speed, and power supply voltage, accurately pinpointing whether the network outage is caused by hardware anomalies (such as power module failure or network card damage). The client can also remotely perform operations such as power restarts and hardware resets to attempt to repair basic network faults. Furthermore, it can read the system event logs stored locally on the BMC to trace abnormal records prior to network interruption (such as IP conflict alarms and link interruption logs), providing crucial evidence for root cause analysis.
[0056] Furthermore, this application does not rely on the normal operation of the server operating system or physical access to the data center. Instead, the target baseboard management controller, i.e. the server, actively creates a virtual network interface and obtains an idle network address segment. Even when the BMC network is completely unavailable, it can still allocate an available target network address to the operation and maintenance client. It does not rely on the pre-configuration information of a specific network segment, nor does it require operation and maintenance personnel to enter the data center for physical contact or apply for high-level permissions. It can complete the secure acquisition of network addresses and connection establishment without interrupting business operations, which significantly improves operation and maintenance efficiency and system reliability.
[0057] As an extension and refinement of the above embodiments, refer to Figure 2 As shown in the embodiment of this application, an access method for a baseboard management controller further includes the following steps:
[0058] S21. Obtain multiple preset network address ranges from the network segment usage status list.
[0059] The preset network address range is an internal network address range pre-defined in the network environment where the server is located.
[0060] Specifically, the preset network address ranges are based on the network architecture of multiple BMCs and the internal network address ranges pre-planned by the server (such as the internal management network of a data center or the local area network of equipment in an industrial scenario). The operation and maintenance client also obtains multiple preset network address ranges from the network segment usage status list in advance. This is because the multiple BMCs managed by the server may be deployed in different preset network segments. After obtaining these preset network segments in advance, the operation and maintenance client can broadcast requests to all potential network segments in a targeted manner when initiating network address requests (such as sending a message carrying the identity of the target BMC to each preset network segment). This ensures that even if it is unclear which network segment the target BMC is located in, it can still match and connect to the target BMC through a full-coverage request, avoiding request failure due to network segment omissions.
[0061] Furthermore, the network segment usage status list records all pre-planned preset network address ranges, such as 100 internal network segments from 192.168.1.* to 192.168.100.*, and may also include basic information such as the network area to which they belong and their purpose (e.g., "BMC dedicated", "backup extension"). This step, by reading this list, extracts multiple preset network address ranges that need to be probed. Essentially, this clarifies the specific target range for subsequent status initialization and periodic probing, avoiding resource waste caused by indiscriminate probing.
[0062] S22. Initialize the usage status of multiple preset network address segments in the network segment usage status list to the occupied status.
[0063] In this embodiment of the application, initializing the usage status of multiple preset network address segments in the network segment usage status list to the occupied status is a key preprocessing operation to ensure the accuracy of free network segment screening.
[0064] This is because before conducting actual network probing on the preset network segments, it's impossible to determine whether these segments are already occupied by other devices (such as temporarily accessed terminals or hidden DHCP servers). If the network segments are directly marked as "free," address conflicts may occur during subsequent allocation (e.g., a network segment that is already occupied is allocated to the BMC). Therefore, initializing all preset network segments as "occupied" can be understood as locking and protecting these network segments to prevent them from being mistakenly allocated before the probing is complete.
[0065] Then, through subsequent steps (such as receiving network address provision messages and identifying unresponsive network segments), a reverse update will be performed based on the "initial occupied" state. That is, responsive network segments remain "occupied" and unresponsive network segments are updated to "idle". Through the above logic, it is ensured that the selection of idle network segments is based on real network detection results, rather than subjective assumptions, thereby providing a reliable resource pool for BMC to dynamically allocate addresses.
[0066] S23. Periodically send network address discovery messages to the multiple preset network address ranges.
[0067] Specifically, in the network environment where the server is located (such as a data center intranet or an industrial equipment LAN), dynamic changes such as device access / disconnection and address pool updates in network address allocation servers (such as DHCP servers) are frequent. If only a single probe is performed, it is easy for idle network segments during the probe to be subsequently occupied or network segments occupied during the probe to be subsequently released, resulting in a disconnect between the network segment status and the actual situation.
[0068] Therefore, probe messages can be repeatedly sent at a preset period (e.g., 2 seconds / time, which can be adjusted according to network dynamics). The period can be implemented through the timer module built into the server (e.g., the timerfd mechanism of the Linux system, or a dedicated hardware timer). When the timer expires, the message sending process is triggered to ensure the real-time status of the network segment.
[0069] Taking a DHCP server as an example, the "network address discovery message" sent in this step can specifically be a DHCP Discovery message, and the server must initiate the request as a "DHCP client." Specifically, the DHCP Discovery message is a broadcast message in the DHCP protocol used by the client to "discover all available DHCP servers in the network." Its core function is to trigger a DHCP server to reply with a response containing information about the network segment it manages, namely a network address offer message (DHCP Offer message). The server sends this message not to "obtain an IP address for itself," but to use the DHCP server's response to determine which preset network segments are already managed (i.e., occupied) by the DHCP server.
[0070] It's important to note that the server can send DHCP Discovery messages to multiple preset network address ranges (e.g., 192.168.1 to 192.168.100) one by one. For each preset network range, broadcast the message according to the IP address range within the range (e.g., 192.168.5.1-192.168.5.254) to ensure coverage of all possible DHCP server listening addresses within the network range. During the transmission process, the server's client identifier (e.g., the server's physical network card MAC address) must be encapsulated to ensure compliance with DHCP protocol specifications and avoid being deemed invalid by the DHCP server.
[0071] S24. Receive a network address provision message, and based on the first network address segment carried in the network address provision message, obtain at least one network address segment that is in an idle state.
[0072] The network address provision message is a reply from the network address allocation server corresponding to the preset network address range.
[0073] Specifically, the network address offer message is a response message sent by the network address allocation server (such as a DHCP server) corresponding to the preset network segment after receiving the DHCP Discovery message; specifically, it is a DHCP Offer message. This message mainly includes: the IP address that the server intends to allocate (such as 192.168.5.123); the network segment information to which this IP belongs; and the server's address pool range (such as 192.168.5.10-192.168.5.200), etc. This information directly identifies the network segment managed by the DHCP server.
[0074] Furthermore, by parsing the message to extract the first network address segment, the server can extract the IP address and subnet mask from the DHCP Offer message, and calculate the first network address segment (e.g., 192.168.5.0 / 24) by bitwise AND operation of the IP address and subnet mask. This network segment is marked as "occupied," indicating that the network segment is managed by the DHCP server, suggesting that the network address segment is occupied and there is a risk of address allocation conflict, so it needs to be excluded from the free network segment. Then, based on all the preset network address segments and the first network address segment, that is, the network address segment that received the network address offer message, the network address segment in the free state is obtained.
[0075] This application embodiment initializes a preset address range to an occupied state and periodically sends network address discovery messages to trigger a response from the network address allocation server, thereby dynamically identifying active address ranges that have been managed by the server, and finally accurately filtering out address ranges that are truly idle in the network.
[0076] Furthermore, the real-time and proactive perception of network address resource occupancy can effectively adapt to dynamic changes in the network environment, fundamentally avoiding the problem of BMC virtual interfaces being unable to communicate due to address conflicts, and ensuring the availability and connection success rate of temporary addresses subsequently allocated to BMC.
[0077] Furthermore, the implementation process of S24 (receiving a network address provision message and obtaining at least one network address segment in an idle state based on the first network address segment carried in the network address provision message) can be refined into the following steps 1-3:
[0078] Step 1: Receive the network address message within a preset time period.
[0079] Specifically, after sending a network address discovery message, a preset time (e.g., 60 seconds) is set, and network address offer messages (such as DHCP Offer messages) from the network address allocation server are only received within this time. The purpose of this setting is to avoid indefinite waiting, ensure the timeliness of the process, and filter out responsive network segments by time dimension.
[0080] Step 2: Obtain the first network address segment corresponding to the network address providing message, and maintain the usage status of the first network address segment in the network segment usage status list as the occupied status.
[0081] Specifically, when a network address provision message is received within a preset time period, the corresponding first network address segment (i.e., a network segment with a DHCP server response and an available IP address) is extracted from it. Subsequently, in the network segment usage status list, the usage status of this first network address segment is maintained as occupied.
[0082] If a network address allocation server responds to the network segment, it means that the network segment has been occupied by an address allocation system in the network (such as DHCP service), so it needs to be marked as "occupied" to prevent it from being assigned to the BMC in the future, which would cause an address conflict.
[0083] It should be noted that the implementation process of step 2 (obtaining the first network address segment corresponding to the network address providing message) may include the following steps 21 and 22:
[0084] Step 21: Extract Internet Protocol address and network address information from the network address provision message.
[0085] In some embodiments, the network address offer message is typically a response message (such as a DHCP Offer message) replied by a network address allocation server (such as a DHCP server), which encapsulates Internet Protocol address (IP address) and network address information related to address allocation.
[0086] The Internet Protocol address is the specific IP address (such as "192.168.5.123"). This address is an address resource managed by the server and is directly associated with its network segment.
[0087] Network address information refers to the subnet mask (such as "255.255.255.0") that accompanies an IP address, and may also include auxiliary information such as the gateway address and address pool range. The subnet mask determines the division between network and host bits in the IP address, directly affecting the determination of the network segment range.
[0088] Furthermore, the network address provision message structure can be broken down: first, locate the "IP address allocation field" (such as the "Your IP Address" field in a DHCP message) to extract the specific IP address; then locate the "subnet mask field" (such as the "Subnet Mask" option field in a DHCP message, code 1) to extract the subnet mask. If the message carries address pool range information (such as the address pool associated with the "IP Address Lease Time" in a DHCP message), it can serve as an auxiliary verification basis for subsequent network segment calculations, ensuring the accuracy of the extracted information.
[0089] Step 22: Calculate the first network address segment based on the extracted Internet Protocol address and network address information.
[0090] Furthermore, the calculation of the first network address segment can be based on the bitwise AND operation of the IP address and subnet mask obtained in step 21 above. The network bits (binary all 1s) of the subnet mask are used to lock the network segment prefix of the IP address, and the host bits (binary all 0s) are used to identify the host range within the network segment.
[0091] By performing a bitwise AND operation, any IP address can be converted into the "network address" (the starting address of the network segment) of its network segment. Then, by combining this with the number of host bits determined by the subnet mask, the broadcast address (the ending address of the network segment) can be calculated, thus clarifying the range of the entire first network address segment.
[0092] Step 3: Obtain a second network address segment that has not received a network address provision message within the preset time period, and update the usage status of the second network address segment in the network segment usage status list from the occupied status to the idle status, so as to obtain at least one network address segment in the idle status.
[0093] In this embodiment of the application, if a network segment (i.e., the second network address segment) does not receive a network address provision message within a preset time period, it means that the network segment is not managed by a network address allocation server (e.g., no DHCP server covers the network segment), and is therefore determined to be idle.
[0094] At this point, the usage status of the second network address segment in the network segment usage status list is updated from "occupied" to "idle". The resulting idle network segment will serve as a resource pool for the subsequent dynamic allocation of network addresses to the BMC, ensuring that the allocated addresses have no conflict risk in the current network environment.
[0095] Furthermore, it accurately identifies truly idle network segments in the network environment, preparing for the subsequent determination of the target network address from at least one idle network address segment, thus providing reliable resource guarantees for BMC's dynamic address allocation when the network is unavailable.
[0096] This application embodiment clearly defines the boundaries by receiving network address provision messages within a preset time period, accurately locking the first network address segment that has a response from the network address allocation server and maintaining its occupied state. At the same time, it updates the occupied second network address segment from occupied to idle. This avoids misjudging network segments already managed by the server as idle and can promptly identify truly idle network segments, ensuring that the network segment status is completely synchronized with the actual network situation. In addition, it keeps the network segment usage status list up-to-date, which can avoid idle resources due to static management and quickly block newly added occupied network segments, adapting to dynamic changes in the network environment.
[0097] It should also be noted that the specific implementation process of S12 (determining the target baseboard management controller from multiple baseboard management controllers based on the identity identifier to be matched, and determining the target network address from at least one network address segment in an idle state) in the above embodiment can be as follows: according to the latest usage status of multiple preset network address segments in the network segment usage status list, the first preset network address segment with an idle usage status is selected from the network segment usage status list as the network address segment used to determine the target network address.
[0098] In this embodiment, the first free network segment in the latest network segment usage status list is used as the network address segment for determining the target network address. That is, the first free network segment among multiple free network segments is used as a target network address segment, and the target network address is further determined from this target network address segment. This eliminates the need for complex priority calculations or multi-dimensional comparisons, greatly simplifies the address segment selection process, reduces server-side computational overhead, enables rapid response to address requests from maintenance clients, and further reduces the complexity of operation and maintenance management.
[0099] As an extension and refinement of the above embodiments, refer to Figure 3 As shown, after S24 (sending network configuration completion information to the second virtual network interface of the operation and maintenance client through the first virtual network interface to instruct the operation and maintenance client to access the target baseboard management controller through the target network address in the network configuration completion information) in the above embodiment, this application embodiment further includes S31 and S32:
[0100] S31. Receive the address clearing request sent by the operation and maintenance client through the first virtual network interface.
[0101] Specifically, the first virtual network interface on the server will continuously listen to whether the operation and maintenance client broadcasts an address clearing request through the second virtual network interface. When the operation and maintenance client broadcasts the corresponding message of the address clearing request through the second virtual network interface, the first virtual network interface will capture the incoming event corresponding to the message in real time, parse the address clearing request, and then confirm that the request is an address clearing request, and obtain the object to be cleared, that is, the target network address configured on the first virtual network interface.
[0102] S32. In response to the address clearing request, clear the target network address configured on the first virtual network interface and send a clearing confirmation message to the client.
[0103] Then, the server immediately responds to the address clearing request and performs the clearing operation of the target network address. After clearing the target network address of the first virtual network interface, the server also needs to update the network segment usage status list, update the sub-status of the network address in the preset network segment to which the target network address belongs from allocated to idle, and record information such as address release time and operation subject (server identifier) to ensure that the list status is consistent with the actual network.
[0104] Finally, after the address clearing is completed, the server sends a clearing confirmation message to the client's second virtual network interface through the first virtual network interface. The clearing confirmation message contains the cleared target network address and the clearing time, which facilitates the operation and maintenance client to verify the clearing result.
[0105] It is important to note that the confirmation message is sent using a reliable transmission method (such as the TCP protocol) to ensure that the client can receive it stably. If the client does not receive the confirmation message within a preset time (such as 5 seconds), it will resend the address clearing request.
[0106] Furthermore, this application can promptly release idle target network addresses and return them to the "idle network segment resource pool" for subsequent allocation of other BMC addresses, thereby improving address resource utilization and ensuring the accuracy of its own address configuration and network status, thus providing support for the long-term stable operation of the entire BMC remote operation and maintenance system.
[0107] As an extension and refinement of the above embodiments, refer to Figure 4 As shown, this application embodiment also provides a method for accessing a baseboard management controller, applied to an operation and maintenance client, with specific steps including the following S41-S44:
[0108] S41. Create a second virtual network interface.
[0109] The second virtual network interface is used to communicate with the first virtual network interface of the server.
[0110] In this embodiment of the application, the second virtual network interface corresponds to the first virtual network interface and is also an Ethernet virtual interface ethv. It can be a logical network interface generated by the operation and maintenance client through software definition. It does not depend on an independent physical network card, but relies on the underlying transmission resources of the client's local physical network port (such as eth0).
[0111] This enables management communication with the server's first virtual network interface (such as address requests and configuration feedback messages) to achieve physical isolation between operation and maintenance management traffic and the client's own business traffic (such as office data and data accessed by other devices), preventing management messages from being blocked during peak business traffic and ensuring the stability of subsequent address requests and communication.
[0112] S42. Obtain multiple preset network address ranges stored in the server, and send network address requests to the multiple preset network address ranges through the second virtual network interface.
[0113] The network address request includes the identity identifier of the target baseboard management controller, which is used to match the target baseboard management controller among multiple baseboard management controllers.
[0114] In this embodiment, the operation and maintenance client pre-stores "multiple preset network address ranges" (such as the internal network ranges from 192.168.1.* to 192.168.100.* detected by the server). These network ranges can be obtained by operation and maintenance personnel manually inputting the preset network ranges through the client's interface. Furthermore, by obtaining the network range list, the scope of request sending is clearly defined, avoiding sending requests to irrelevant areas such as the public network or non-BMC-managed network ranges, reducing network resource waste, and ensuring that requests can be received by the server's first virtual interface (which only listens for requests from the preset network ranges).
[0115] Furthermore, the client broadcasts (or sends) network address request messages to multiple pre-stored preset network address ranges through the second virtual network interface. These messages include the identity identifier of the target BMC.
[0116] S43. Receive network configuration completion information sent by the server through the second virtual network interface.
[0117] After the server completes the target BMC identity matching, idle network segment filtering, and target network address configuration, it will send a network configuration completion message to the client's second virtual network interface through its first virtual network interface.
[0118] Furthermore, the second virtual network interface of the operations and maintenance client continuously listens to the communication port agreed upon with the server. When a packet is detected coming into this port, a local packet reception event is triggered, and the packet is temporarily stored in the buffer for subsequent parsing. Since the second virtual network interface only transmits management packets and forms a dedicated link with the server's first virtual interface, it can effectively prevent configuration information from being interfered with by other traffic, ensuring the reliability of reception.
[0119] S44. Parse the network configuration completion information and extract the target network address to access the target baseboard management controller through the target network address.
[0120] Then, the operations and maintenance client calls the built-in message parsing module to parse the network configuration completion information message according to the protocol format agreed upon with the server. This message typically includes: the target network address, i.e., the IP address assigned by the server to the target BMC (such as 192.168.5.15), the identity verification result, indicating that the target BMC's identity has been successfully matched, and communication parameters such as the communication port and timeout (such as 30 seconds).
[0121] After the operations and maintenance client obtains the target network address, it initiates a connection request to that address through the second virtual network interface. Since the server has bound the target network address to the first virtual interface and established a forwarding link between the first virtual interface and the target BMC, the client's connection request will be forwarded to the target BMC through the server's first virtual interface, ultimately forming a dedicated access link of "operations and maintenance client - second virtual network interface - server's first virtual interface - target BMC".
[0122] This embodiment of the application ensures that only the target BMC responds to the request and is assigned a dedicated address, even if multiple BMCs exist on the server, by carrying the unique identifier of the target baseboard management controller in the network address request. This completely avoids response conflicts or address allocation errors between multiple BMCs, enabling precise location and communication with a specific BMC. Simultaneously, a second virtual network interface is created specifically for communication with the server's first virtual interface, completely isolating maintenance management traffic from the client's own business traffic. This prevents peak business traffic from interfering with management requests and avoids the impact of management operations on the business network, ensuring the communication stability and independence of remote BMC maintenance.
[0123] It should be noted that, since there are multiple baseboard management controllers on the server side, the network address requests broadcast by the operation and maintenance client will carry the unique identification of the target BMC (such as SN code, UUID). After receiving the broadcast request, each BMC will first check whether the identification in the request matches its own. If they do not match, the BMC will ignore the request and not respond. If they match, it will confirm that the current network segment is its deployment network segment, and then select an available IP address from the idle network segment, configure it to its own network interface, and send the response information back to the client.
[0124] Furthermore, even if there are multiple BMCs on the server side, which may be located in the same or different network segments, the client can filter by identity identifier to ensure that only the target BMC responds to the request, avoiding response conflicts or address allocation errors caused by multiple BMCs responding at the same time, and ultimately achieving accurate access to a specific BMC.
[0125] Therefore, in this embodiment of the application, the network address request will be broadcast to each of the plurality of preset network address segments through the second virtual network interface; if no response information from the server is received within a preset response time, the network address request will continue to be broadcast to the next preset network address segment; if the response information from the server is received, the broadcasting of the network address request to the next preset network address segment will stop.
[0126] Then, the client sends a broadcast request with the BMC's identity identifier (such as an SN code) to the first preset network address segment through the second virtual network interface. If no response is received from the server (which can be understood as the management node where the BMC is located or the BMC itself) within a preset time, it means that there is no matching BMC in the current network segment, so the client continues to broadcast the request to the next preset network segment. Once a response is received from the server, it proves that the network segment being broadcast is the network segment where the BMC is located, and the client immediately stops broadcasting to subsequent network segments. This avoids wasting resources by sending unnecessary requests to irrelevant network segments and accurately locates the network segment where the BMC is located, laying the foundation for the BMC to be allocated a dedicated address from an idle network segment and for the client to access the BMC through that address.
[0127] As an extension and refinement of the above embodiments, refer to Figure 5 As shown in the embodiments of this application, the access method for a baseboard management controller applied to a maintenance client further includes the following steps S51-S52:
[0128] S51. After the access to the server ends, an address clearing request is sent to the first virtual network interface of the server through the second virtual network interface to instruct the server to clear the target network address configured in the first virtual network interface.
[0129] When the operations and maintenance client confirms the end of the access (e.g., the user manually clicks the "End Operations and Maintenance" button, or the preset operations and maintenance session times out), it will immediately send an address clearing request message to the server's first virtual network interface through the second virtual network interface. This proactively informs the server that the currently allocated target network address is no longer needed and should be released back to the idle network segment resource pool. This prevents the target network address from being permanently bound to the first virtual interface, which would prevent other BMCs from reusing the address and thus waste address resources.
[0130] S52. Receive the clear confirmation message from the server. After confirming that the target network address has been cleared, delete the second virtual network interface.
[0131] After the server clears the target network address configured on the first virtual network interface, the server will send a clear confirmation message to the operation and maintenance client. Then, the second virtual network interface of the operation and maintenance client will continuously listen to the feedback port of the server. When the clear confirmation message is received, it can be confirmed that the target network address has been successfully cleared and the address resources of the server have been reclaimed.
[0132] After confirming that the target network address has been cleared, the operation and maintenance client will also perform the operation of deleting the second virtual network interface. This is because although the second virtual network interface is a logical interface, it will occupy the client's network namespace, port resources and system memory. Furthermore, after deleting the old second virtual network interface, the client can recreate the new second virtual network interface when it performs operation and maintenance on other BMCs next time, so as to avoid the residual configuration of the old interface (such as historical communication parameters) affecting the new address requests and communication.
[0133] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0134] In some embodiments, refer to Figure 6 As shown, embodiments of this application also provide an access device 600 for a baseboard management controller, comprising:
[0135] The creation unit 610 is used to create a first virtual network interface, and when a network address request is received from the operation and maintenance client through the first virtual network interface, it obtains the identity identifier of the baseboard management controller carried in the network address request.
[0136] The determining unit 620 is configured to determine a target baseboard management controller from a plurality of baseboard management controllers based on the identity identifier to be matched, determine a target network address from at least one network address range in an idle state, and configure the target network address onto the first virtual network interface;
[0137] The sending unit 630 is configured to send network configuration completion information to the second virtual network interface of the operation and maintenance client through the first virtual network interface, so as to instruct the operation and maintenance client to access the target baseboard management controller through the target network address in the network configuration completion information.
[0138] As an optional implementation of this application, the determining unit 620 is further configured to obtain multiple preset network address segments from the network segment usage status list; the preset network address segments are internal network address segments pre-set in the network environment where the baseboard management controller is located; initialize the usage status of the multiple preset network address segments in the network segment usage status list to an occupied state; periodically send network address discovery messages to the multiple preset network address segments; receive network address provision messages, and based on the first network address segment carried in the network address provision message, obtain at least one network address segment in an idle state; the network address provision message is a reply from the network address allocation server corresponding to the preset network address segment.
[0139] As an optional implementation of this application, the determining unit 620 is further configured to receive the network address providing message within a preset time period; obtain the first network address segment corresponding to the network address providing message, and maintain the usage status of the first network address segment in the network segment usage status list as the occupied state; obtain the second network address segment for which the network address providing message has not been received within the preset time period, and update the usage status of the second network address segment in the network segment usage status list from the occupied state to the idle state, so as to obtain at least one network address segment in the idle state.
[0140] As an optional implementation of this application, the determining unit 620 is further configured to extract Internet Protocol address and network address information from the network address providing message; and calculate the first network address segment based on the extracted Internet Protocol address and network address information.
[0141] As an optional implementation of this application, the access device 600 of the baseboard management controller further includes a receiving unit, specifically configured to receive an address clearing request sent by the maintenance client through the first virtual network interface; in response to the address clearing request, clear the target network address configured on the first virtual network interface, and send a clearing confirmation message to the client.
[0142] As an optional implementation of this application, the determining unit 620 is further configured to select the first preset network address segment whose usage status is idle from the network segment usage status list based on the latest usage status of multiple preset network address segments in the network segment usage status list, and use it as the network address segment for determining the target network address.
[0143] In some embodiments, refer to Figure 7 As shown, embodiments of this application also provide another access device 700 for a substrate management controller, comprising:
[0144] Creation unit 710 is used to create a second virtual network interface; the second virtual network interface is used to communicate with the first virtual network interface of the server.
[0145] The acquisition unit 720 is used to acquire multiple preset network address ranges of the pre-stored server, and send network address requests to the multiple preset network address ranges through the second virtual network interface; the network address request includes the identity identifier of the target baseboard management controller, which is used to match the target baseboard management controller among the multiple baseboard management controllers;
[0146] The receiving unit 730 is configured to receive network configuration completion information sent by the server through the second virtual network interface;
[0147] The parsing unit 740 is used to parse the network configuration completion information and extract the target network address so as to access the target baseboard management controller through the target network address.
[0148] As an optional implementation of this application, the receiving unit 730 is further configured to, after the access to the server ends, send an address clearing request to the first virtual network interface of the server through the second virtual network interface to instruct the server to clear the target network address configured in the first virtual network interface; receive a clearing confirmation message from the server, and after confirming that the target network address has been cleared, delete the second virtual network interface.
[0149] As an optional implementation of this application, the acquisition unit 720 is specifically used to broadcast the network address request to each of the plurality of preset network address segments through the second virtual network interface; if no response information from the server is received within a preset response time, the network address request is broadcast to the next preset network address segment; if the response information from the server is received, the broadcasting of the network address request to the next preset network address segment is stopped.
[0150] For a description of the features in the embodiment corresponding to the access device of the substrate management controller, please refer to the relevant description of the embodiment corresponding to the access method of the substrate management controller, which will not be repeated here.
[0151] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above-described embodiments of the access method for a baseboard management controller.
[0152] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute, when running, the steps of any of the above-described embodiments of the access method of the baseboard management controller or the steps of any of the above-described access methods of the baseboard management controller.
[0153] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0154] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described embodiments of the access method for a baseboard management controller or the steps in any of the above-described access methods for a baseboard management controller.
[0155] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-described embodiments of the access method for a baseboard management controller or the steps in any of the above-described access methods for a baseboard management controller.
[0156] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0157] The foregoing has provided a detailed description of a method for accessing a baseboard management controller. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for accessing a baseboard management controller, characterized in that, Applied to the server side, including: When a first virtual network interface is created and a network address request is received from the operation and maintenance client through the first virtual network interface, the identity identifier of the baseboard management controller to be matched carried in the network address request is obtained. Based on the identity identifier to be matched, the target baseboard management controller is determined from multiple baseboard management controllers, and the target network address is determined from at least one network address range that is in an idle state, and the target network address is configured on the first virtual network interface; The network configuration completion information is sent from the first virtual network interface to the second virtual network interface of the operation and maintenance client, instructing the operation and maintenance client to access the target baseboard management controller through the target network address in the network configuration completion information; Before determining the target baseboard management controller from multiple baseboard management controllers based on the identity to be matched, and determining the target network address from at least one network address range in an idle state, the method further includes: Obtain multiple preset network address ranges from the network segment usage status list; the preset network address ranges are internal network address ranges pre-set in the network environment where the baseboard management controller is located. Initialize the usage status of multiple preset network address segments in the network segment usage status list to an occupied status; Periodically send network address discovery messages to the multiple preset network address ranges; The system receives a network address provision message and, based on the first network address segment carried in the network address provision message, obtains at least one network address segment that is in an idle state; the network address provision message is a reply from the network address allocation server corresponding to the preset network address segment.
2. The method according to claim 1, characterized in that, The process of receiving a network address provision message and obtaining at least one idle network address segment based on the first network address segment carried in the network address provision message includes: Receive the network address within a preset time period; Obtain the first network address segment corresponding to the network address providing message, and maintain the usage status of the first network address segment in the network segment usage status list as the occupied status; Obtain a second network address segment that has not received a network address provision message within the preset time period, and update the usage status of the second network address segment in the network segment usage status list from the occupied status to the idle status, so as to obtain at least one network address segment in the idle status.
3. The method according to claim 2, characterized in that, The step of obtaining the first network address segment corresponding to the network address provision message includes: Extract Internet Protocol address and network address information from the network address provision message; The first network address segment is calculated based on the extracted Internet Protocol address and network address information.
4. The method according to claim 1, characterized in that, The method further includes: Receive the address clearing request sent by the operation and maintenance client through the first virtual network interface; In response to the address clearing request, the target network address configured on the first virtual network interface is cleared, and a clearing confirmation message is sent to the client.
5. The method according to any one of claims 1-2, characterized in that, The method further includes: Based on the latest usage status of multiple preset network address segments in the network segment usage status list, the first preset network address segment with an idle usage status is selected from the network segment usage status list as the network address segment used to determine the target network address.
6. A method for accessing a baseboard management controller, characterized in that, Applied to operation and maintenance clients, including: Create a second virtual network interface; the second virtual network interface is used to communicate with the server's first virtual network interface; Obtain multiple preset network address ranges from the pre-stored server, and send network address requests to the multiple preset network address ranges through the second virtual network interface; the network address request includes the identity identifier of the target baseboard management controller, which is used to match the target baseboard management controller among the multiple baseboard management controllers; Receive network configuration completion information sent by the server through the second virtual network interface; The network configuration completion information is parsed to extract the target network address, so as to access the target baseboard management controller through the target network address; The method further includes: The network address request is broadcast to each of the plurality of preset network address ranges through the second virtual network interface; If no response is received from the server within the preset response time, the network address request will continue to be broadcast to the next preset network address range. If a response is received from the server, the broadcasting of the network address request to the next preset network address range is stopped.
7. The method according to claim 6, characterized in that, The method further includes: After the access to the server ends, an address clearing request is sent to the first virtual network interface of the server through the second virtual network interface to instruct the server to clear the target network address configured in the first virtual network interface; After receiving the clear confirmation message from the server and confirming that the target network address has been cleared, the second virtual network interface is deleted.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the access method of the baseboard management controller as described in any one of claims 1 to 5 and 6 to 7.
Citation Information
Patent Citations
BMC (Baseboard Management Controller) system with multistage user remote authentication mechanism
CN119109700A
Communication method, device and system and electronic equipment
CN120455435A