Network port switching method and apparatus, and computing device
By detecting the connectivity of the management network and switching the extended network port, the problem of the baseboard management controller's function being unavailable after a dedicated network port failure is solved, and users can manage computing devices normally.
Patent Information
- Application Number
- PCT/CN2025/084384
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-03
- Filing Date
- 2025-03-24
- Publication Date
- 2025-10-09
AI Technical Summary
In the prior art, a baseboard management controller cannot effectively switch to an extended network port after a dedicated network port fails, resulting in isolation of the management network from the business network and inability to ensure normal user access to the baseboard management controller functions.
The baseboard management controller detects connectivity with the management network and uses the Address Resolution Protocol (ARP) list or broadcast ARP requests to determine whether the current extended network port is available. If it is not connected, it switches to another extended network port until it is successfully connected to the management network.
The success rate of network port switching is improved, ensuring that users can normally access the baseboard management controller and manage computing devices, avoiding function unavailability caused by network isolation.
Smart Images

Figure CN2025084384_09102025_PF_FP_ABST
Abstract
Description
Network port switching method, device and computing equipment
[0001] This application claims priority to Chinese patent application No. 202410405341.0 filed on April 3, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The embodiments of the present application relate to the technical field of computing devices, and in particular to a network port switching method, device, and computing device. Background Art
[0003] A baseboard management controller (BMC) is a small operating system independent of a computing device that supports the management of the computing device. The BMC is physically integrated into the motherboard as a chip and is connected to a network port (e.g., a dedicated network port) on the computing device, such as a standard RJ45 port. By connecting this dedicated network port to a computer network, users can access the BMC through devices such as terminals on the computer network to remotely manage the computing device. Because this computer network and the devices therein are primarily used to manage computing devices, this computer network can be referred to as a management network.
[0004] When a dedicated network port fails, the BMC can proactively switch it to the expansion network port on the server's network interface card, allowing it to continue providing services. However, in real-world scenarios, expansion network ports are typically used to connect to business networks. When users manage computing devices through a management network, the management and business networks are typically isolated for network security reasons. Therefore, current solutions cannot guarantee that users can use BMC functions normally. Summary of the Invention
[0005] The embodiments of the present application provide a network port switching method, apparatus, and computing device, which can ensure that the availability of the management function of the baseboard management controller is improved after the network port switching is performed.
[0006] In a first aspect, an embodiment of the present application provides a network port switching method, which is applied to a first computing device, wherein the first computing device includes a baseboard management controller and a network card, and the network card is provided with multiple extended network ports; the method includes: the baseboard management controller detects whether it is connected to the first network; wherein the baseboard management controller is connected to the first network through the first extended network port; the first network is a network for managing the first computing device; when the baseboard management controller is not connected to the first network, the baseboard management controller switches to the second extended network port to connect to the first network.
[0007] In the network port switching method provided in the embodiment of the present application, the baseboard management controller connects to the first network through the first extended network port and detects whether it is connected to the first network. If it is determined that it is not connected, the baseboard management controller switches the second extended network port to connect to the first network. The embodiment of the present application adds a step of detecting connectivity with the first network during the process of performing network port switching to determine whether the extended network port currently used by the baseboard management controller can be connected to the management network, thereby avoiding the situation where the functions of the baseboard management controller are unavailable due to network isolation problems, and ensuring that users can normally access the baseboard management controller and manage the computing device.
[0008] In one possible implementation, when the baseboard management controller is disconnected from the first network, the baseboard management controller switches to a second extended network port to connect to the first network, including: when the baseboard management controller is disconnected from the first network, the baseboard management controller switches to another extended network port on the network card to connect to the first network until the baseboard management controller is connected to the first network. It should be understood that by repeatedly performing the above-mentioned network port switching and connectivity testing process, the success rate of network port switching can be effectively improved, ensuring that users can use the functions of the baseboard management controller normally.
[0009] In another possible implementation, a first computing device is connected to multiple second computing devices in a first network, and an address resolution protocol ARP list is stored in a baseboard management controller; the baseboard management controller detects whether it is connected to the first network, including: querying whether the media access control MAC addresses of multiple second computing devices in the ARP list are updated successfully; if the MAC addresses of all queried second computing devices are not updated successfully, it is determined that the baseboard management controller is not connected to the first network.
[0010] In another possible implementation, an ARP request is broadcast to a computing device in the first network; the ARP request is used to request the MAC address of the computing device in the first network; and based on the received response information from the computing device in the first network to the ARP request, the MAC address of the computing device in the first network in the ARP list is updated. It should be understood that ARP is an inherent and basic protocol in the management network. The embodiment of the present application applies this protocol to the scenario of network port switching to determine whether the currently used network port is available in the management network based on the update status of the ARP list. This eliminates the need for performing other additional connectivity detection steps, consumes fewer resources, and is more efficient.
[0011] In another possible implementation, ARP requests are sent to multiple second computing devices respectively; the ARP requests are used to request the MAC addresses of the second computing devices; if no response information to the ARP requests is received from all the second computing devices among the multiple second computing devices, the baseboard management controller determines that it is not connected to the first network.
[0012] In another possible implementation, before the baseboard management controller detects whether it is connected to the first network, the method also includes: under preset conditions, the baseboard management controller determines that the first extended network port is connected to the first network from multiple extended network ports; the preset conditions include at least one of the following: the baseboard management controller detects a failure of the dedicated network port; the baseboard management controller receives an instruction to switch the network port.
[0013] In another possible implementation, the method further includes: when the baseboard management controller is connected to the first network, continuing to connect to the first network through the first extended network port. It should be understood that confirming connectivity indicates that the first extended network port is available in the first network, and the baseboard management controller can continue to use the first extended network port to ensure that the user can normally use the functions of the baseboard management controller.
[0014] In another possible implementation, the method further includes: when the baseboard management controller is connected to the first network, the baseboard management controller outputting a prompt message, wherein the prompt message is used to indicate that the first expansion network port is available on the first network. It should be understood that the baseboard management controller outputting the prompt message can facilitate a user to promptly understand the switching status of the network port, allowing the user to maintain the computing device based on the occupancy of the network port.
[0015] In a second aspect, the present application provides a network port switching device, which is applied to a first computing device, and the device includes a detection module and a switching module; the detection module is used to detect whether the device is connected to the first network; the device is connected to the first network through the first network; the first extended network port is used to manage the network of the first computing device; the switching module is used to switch to the second extended network port to connect to the first network when the device is not connected to the first network.
[0016] In a possible implementation, the switching module is specifically configured to, when the baseboard management controller is not connected to the first network, switch to the second extended network port to connect to the first network until the baseboard management controller is connected to the first network.
[0017] In another possible implementation, the first computing device is connected to a plurality of second computing devices in the first network, and an Address Resolution Protocol (ARP) list is stored in the baseboard management controller;
[0018] The detection module is specifically used to query whether the media access control MAC addresses of multiple second computing devices in the ARP list are updated successfully; if the MAC addresses of all second computing devices in the ARP list are not updated successfully, determine that the first network with the second computing device is not connected.
[0019] In another possible implementation, the apparatus further includes: a sending module and an updating module. The sending module is configured to broadcast an ARP request to a computing device in the first network; the ARP request is configured to request a MAC address of the computing device in the first network; and the updating module is configured to update the MAC address of the computing device in the first network in the ARP list based on a received response from the computing device in the first network to the ARP request.
[0020] In another possible implementation, the first computing device is connected to multiple second computing devices in the first network, and the detection module is specifically used to send ARP requests to the multiple second computing devices respectively; the ARP request is used to request the MAC address of the second computing device; if no response information of any second computing device in the multiple second computing devices is received to the ARP request, the baseboard management controller determines that it is not connected to the first network.
[0021] In another possible implementation, the device also includes: a determination module; the determination module is used to, under preset conditions, determine that the first extended network port is connected to the first network from multiple extended network ports; the preset conditions include at least one of the following: detecting a dedicated network port failure; receiving an instruction to switch the network port.
[0022] In another possible implementation, the switching module is further configured to, when the baseboard management controller is connected to the first network, continue to connect to the first network through the first extended network port.
[0023] In another possible implementation, the device further includes: an output module; the output module is configured to, when the baseboard management controller is connected to the first network, cause the baseboard management controller to output prompt information; the prompt information is configured to prompt that the first extended network port is available in the first network.
[0024] In a third aspect, an embodiment of the present application provides a computing device, comprising a processor, a memory, a management controller, and multiple extended network ports; a computer program is stored on the memory, and the baseboard management controller is used to implement the following steps by executing the computer program: the baseboard management controller detects whether it is connected to a first network; wherein, the baseboard management controller is connected to the first network through a first extended network port; the first network is a network for managing a first computing device; when the baseboard management controller is not connected to the first extended network port, the baseboard management controller switches to the second extended network port to connect to the first network.
[0025] In a fourth aspect, an embodiment of the present application provides a chip comprising a chip processor and a chip memory; executable instructions are stored in the chip memory; when the chip processor is configured to execute instructions, the chip implements the method of the first aspect above.
[0026] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes: computer software instructions; when the computer software instructions are executed in a computing device, the computing device implements the method of the first aspect above.
[0027] In a sixth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a computing device, the computing device executes the steps of the related method described in the first aspect above to implement the method of the first aspect above.
[0028] The beneficial effects of the second to sixth aspects mentioned above can be referred to the corresponding description of the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] FIG1 is a schematic diagram of a system architecture of a computing device provided in an embodiment of the present application;
[0030] FIG2 is a flow chart of a network port switching method provided in an embodiment of the present application;
[0031] FIG3 is a flow chart of another network port switching method provided in an embodiment of the present application;
[0032] FIG4 is a flow chart of another network port switching method provided in an embodiment of the present application;
[0033] FIG5 is a flow chart of another network port switching method provided in an embodiment of the present application;
[0034] FIG6 is a flow chart of another network port switching method provided in an embodiment of the present application;
[0035] FIG7 is a flow chart of another network port switching method provided in an embodiment of the present application;
[0036] FIG8 is a schematic diagram of a network port switching process provided in an embodiment of the present application;
[0037] FIG9 is a schematic diagram of another network port switching process provided in an embodiment of the present application;
[0038] FIG10 is a schematic diagram showing the composition of a network port switching device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0040] It should be noted that in the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described in the embodiments of this application as "exemplarily" or "for example" should not be interpreted as being more preferred or advantageous than other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.
[0041] In order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order.
[0042] 1. Management network: This refers to the computer network within an organization or enterprise. This computer network is isolated from external networks through security measures such as firewalls, allowing access only to users or devices within the organization or enterprise. Therefore, the management network is also called a closed network environment, intranet, Ethernet working environment, etc. In the embodiments of this application, the management network is also referred to as the first network.
[0043] 2. Business network: This generally refers to a global computer network, typically composed of multiple networks, that allows various devices and systems to communicate and exchange information. Devices in this computer network can use the business services provided by any other device in the network, and can also provide their own business services to any other device in the network. Business networks are also known as open network environments, extranets, and global computer networks.
[0044] 3. Dedicated network port: This port is integrated directly into the baseboard management controller (BMC) chip on the motherboard of a computing device. This port typically conforms to the standard RJ45 connector. This dedicated network port connects the BMC to a management network, allowing users to access the BMC through a terminal or other device over the management network.
[0045] 4. Extended network port: A network port integrated into the network card of a computing device. Through an extended network port, a computing device can connect to a computer network, providing services to other devices on the computer network or requesting services from other devices.
[0046] 5. Address Resolution Protocol (ARP): This protocol is used in management networks to obtain a device's Media Access Control Address (MAC) based on its Internet Protocol (IP) address. Each device in the management network maintains an ARP cache to store an ARP list of other devices' IP addresses and their corresponding MAC addresses for later communication.
[0047] As described in the background technology, the baseboard management controller has an independent IP address. The baseboard management controller can be connected to the computer network through a dedicated network port, so that the devices in the computer network can access the baseboard management controller through the IP address to manage the computing device where the baseboard management controller is located. To ensure normal access to the baseboard management controller, when the dedicated network port of the baseboard management controller fails, the baseboard management controller can select other network ports that are in a connected state (link up, i.e., plugged with a network cable) to connect to the computer network to continue to provide services to the outside world. To ensure that there are more network ports for the baseboard management controller to choose from, a network card with a network controller sideband interface (NC-SI) function can be configured on the computing device. NC-SI is a protocol for communication between a host system and a network controller (i.e., a network card). It defines message formats, communication methods, etc., and provides a standardized solution for the management and monitoring of network controllers. If the network card has the NC-SI function, the baseboard management controller can communicate with the network card to select an extended network port from the extended network ports on the network card to connect to the network to continue to provide services to the outside world.
[0048] In real-world scenarios, the extended network port on a network card is typically used to connect to a business network, allowing computing devices to provide business services to other devices on the business network. Furthermore, to ensure the security of computing devices, they are typically managed within a management network, which is isolated from the business network. Therefore, if the baseboard management controller determines that a dedicated network port has failed and selects an extended network port for switching, once the extended network port connecting to the business network is selected, users on the management network will still be unable to access the baseboard management controller, potentially preventing the baseboard management controller from resuming functionality after the network port switch.
[0049] In summary, the current method for handling a dedicated network port failure cannot guarantee that users can use the baseboard management controller functions normally.
[0050] Based on this, an embodiment of the present application provides a network port switching method, in which the baseboard management controller connects to the first network through the first extended network port and detects whether it is connected to the first network. If it is determined that it is not connected, the baseboard management controller switches the second extended network port to connect to the first network. The embodiment of the present application adds a step of detecting connectivity with the first network during the process of performing network port switching to determine whether the network port currently used by the baseboard management controller can be connected to the management network, thereby avoiding the situation where the functions of the baseboard management controller are unavailable due to network isolation problems, and ensuring that users can normally access the baseboard management controller and manage the computing device.
[0051] The embodiments provided in this application are described in detail below with reference to the accompanying drawings.
[0052] The technical solutions provided in the embodiments of the present application can be applied to computing devices, which can be servers. Specifically, in terms of form, the server can be a blade server, a high-density server, a rack server, or a whole cabinet server; in terms of function, the server can be a general-purpose server, a graphics processing unit (GPU) server, an artificial intelligence (AI) server, etc. Figure 1 is a schematic diagram of the system architecture of a computing device. As shown in Figure 1, the hardware of the computing device includes a processor, a baseboard management controller, a network card, and a memory. The software includes an out-of-band management module and an operating system (OS).
[0053] The processor, memory, network interface card, and baseboard management controller are each connected to a system bus, which can be an Extended Industry Standard Architecture (EISA) bus, for example. A system bus can include an address bus, a data bus, a control bus, and the like. For ease of illustration, Figure 1 uses only one thick line, but this does not imply that there is only one bus or only one type of bus.
[0054] Among them, the baseboard management controller is integrated with a dedicated network port, the out-of-band management module runs in the baseboard management controller, and the OS runs on the processor (as shown in Figure 1).
[0055] The out-of-band management module can be a management unit for non-business modules. For example, the out-of-band management module can remotely maintain and manage the computing device through a dedicated data channel. The out-of-band management module is completely independent of the computing device's operating system and can communicate with the OS through the computing device's out-of-band management interface.
[0056] Exemplarily, the out-of-band management module may include a management unit for the computing device's operating status, a management system in a management chip outside the processor, a computing device baseboard management controller (BMC), a system management module (SMM), etc. In the following embodiments, only the BMC is used as an example for description.
[0057] The BMC is an independent system that doesn't rely on other hardware (such as the CPU, memory, etc.) or the operating system. However, it can interact with the operating system to manage the computing device. Furthermore, the BMC provides remote operation capabilities, allowing users to access the BMC's user interface over the network, monitor the device's operating status, and issue commands to the device.
[0058] It should be noted that different manufacturers have different names for BMC in their servers. For example, some manufacturers call it BMC, some manufacturers call it iLO, and another manufacturer calls it iDRAC. Regardless of whether it is called BMC, iLO or iDRAC, it can be understood as the BMC in the embodiments of the present invention.
[0059] A network card (NIC) is a piece of hardware used to allow computing devices to communicate within a computer network. It is equipped with multiple expansion network ports that conform to specific standards (such as standard RJ45). These expansion network ports accept network cables or cables, allowing computing devices within the computer network to connect to each other. If the NIC supports the Network Controller Sideband Interface (NC-SI) function, the expansion network ports on the NIC can be used by the BMC, allowing the BMC to connect to the computer network through the NIC's network ports.
[0060] The memory can be the internal memory of the computing device, such as the RAM, or the external memory, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, a USB flash drive, etc.
[0061] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0062] Figure 2 is a flow chart illustrating a method for switching a network port provided in an embodiment of the present application. For example, the method for switching a network port provided in an embodiment of the present application can be applied to the computing device of Figure 1. For ease of distinction, in this embodiment of the present application, the computing device to which the method for switching a network port is applied is referred to as the first computing device, and the computing device connected to the first computing device in the management network is referred to as the second computing device.
[0063] The network port switching method provided in the embodiment of the present application can be specifically executed by a baseboard management controller. Of course, in other possible embodiments, the network port switching method provided in the embodiment of the present application can also be executed by other hardware on the computing device. As shown in Figure 2, the network port switching method provided in the embodiment of the present application can specifically include the following steps:
[0064] S201: A baseboard management controller detects whether it is connected to a first network.
[0065] The baseboard management controller is connected to the first network through the first extended network port. The first network is a network for managing the first computing device. The first network is hereinafter referred to as the management network.
[0066] In the embodiment of the present application, some of the multiple extended network ports on the network card are used to connect to the business network, while others are used to connect to the management network. Currently, the baseboard management controller cannot determine whether the extended network port used after switching is available on the management network. Therefore, when the baseboard management controller connects to the management network through the first extended network port, it can detect whether it is connected to the management network to determine whether the first extended network port is available on the management network.
[0067] The baseboard management controller can detect connectivity with the management network in the following ways:
[0068] In one implementation, a first computing device is connected to multiple second computing devices in a first network, and a baseboard management controller in the first computing device stores an ARP list for recording the MAC addresses of the computing devices in the first network. As shown in FIG4 , the above S201 can be implemented as follows:
[0069] First, the baseboard management controller queries whether the MAC addresses of multiple second computing devices (which may be some of the second computing devices whose number exceeds a certain threshold, or all of the second computing devices) in the ARP list are updated successfully.
[0070] Secondly, when the MAC addresses of all the queried second computing devices are not updated successfully, the baseboard management controller determines that the first network is not connected.
[0071] Otherwise, the baseboard management controller determines that the system is connected to the first network.
[0072] As mentioned above, ARP is a way to obtain the MAC address of a device in a management network. In an embodiment of the present application, the baseboard management controller can broadcast an ARP request to the computing device in the first network after switching the network port, or periodically through the first extended network port. The ARP request is used to request the MAC address of the computing device in the first network. The baseboard management controller updates the MAC address of the computing device in the first network in the ARP list based on the response information received from the computing device in the first network to the ARP request. Therefore, when the baseboard management controller needs to determine the connectivity with the second computing device, it can query whether the MAC addresses of all second computing devices in the ARP list stored in itself have been updated successfully. If the MAC addresses of all second computing devices in the ARP list are missing (for example, the word "incomplete" is displayed), it means that the baseboard management controller cannot access any second computing device in the management network, which means that the baseboard management controller is not connected to the management network. If the ARP list is updated successfully, it means that the ARP request of the baseboard management controller can be sent to all second computing devices (or most second computing devices) in the management network, and the response information of the second computing device can be received, which proves that the baseboard management controller is connected to the management network, that is, the first extended network port is available in the management network.
[0073] It should be understood that ARP is an inherent and basic protocol in management networks. By storing the ARP list, computing devices do not need to send a request to obtain the MAC address before communication, reducing resource consumption. The embodiment of the present application applies this protocol to the scenario of network port switching. Based on the update of the ARP list, it can determine whether the baseboard management controller is connected to the management network. There is no need to perform additional steps to send requests to check connectivity, which consumes fewer resources and is more efficient.
[0074] In another implementation, as shown in FIG5 , the first computing device is connected to multiple second computing devices in the first network, and the above S201 may be implemented as follows:
[0075] First, the baseboard management controller sends an ARP request to multiple second computing devices (which may be some of the second computing devices whose number exceeds a certain threshold, or all the second computing devices) respectively, and the ARP request is used to request the MAC address of the second computing device.
[0076] Secondly, when no response information to the ARP request is received from all the second computing devices among the plurality of second computing devices, the baseboard management controller determines that the first network is not connected;
[0077] Otherwise, the baseboard management controller determines that the system is connected to the first network.
[0078] For example, after switching to the first extended network port, the baseboard management controller can send ARP requests to multiple second computing devices through the first extended network port respectively, and the ARP request includes an ARP request for the IP address of the second computing device. If the baseboard management controller is not connected to the management network, all second computing devices cannot receive the ARP request, and will not reply to the baseboard management controller. Correspondingly, if the baseboard management controller can receive response information from multiple second computing devices (which can be all second computing devices, or some second computing devices whose number exceeds a certain threshold), it means that the baseboard management controller is connected to the management network. It can be seen that this implementation method judges connectivity based on the content of information interaction. The baseboard management controller does not need to store the ARP list, which can reduce the storage cost of the baseboard manager.
[0079] Optionally, the baseboard management controller may also use other methods, such as pinging, to determine whether it can successfully exchange data packets with the second computing device in the management network, so as to achieve the purpose of detecting connectivity with the management network.
[0080] It should be understood that in the above implementation method, connectivity is determined by the interaction between the baseboard management controller and multiple second computing devices in the management network. In specific scenarios, based on cost control factors, the baseboard management controller can detect whether it is connected to the management network based on the interaction with a second computing device in the management network (provided that the second computing device is online).
[0081] In some scenarios, the baseboard management controller can switch from the dedicated network port to the first extended network port under preset conditions and connect to the management network through the first extended network port. As shown in Figure 3, before S201, the method provided in the embodiment of the present application further includes:
[0082] S200: Under a preset condition, the baseboard management controller determines a first extended network port from a plurality of extended network ports to connect to the first network.
[0083] The preset condition includes at least one of the following: the baseboard management controller detects a failure of the dedicated network port; the baseboard management controller receives an instruction to switch the network port.
[0084] It should be understood that the baseboard management controller has a network port fault detection function. When it detects that the dedicated network port is not plugged into the network cable, or the dedicated network port is unavailable due to a fault, the baseboard management controller can actively determine the first extended network port from the multiple extended network ports set on the network card to achieve network port switching. Alternatively, the baseboard management controller can switch the network port upon receiving an instruction. The instruction can be an instruction issued to the baseboard management controller by the user accessing the baseboard management controller through a device in the management network, or it can be an instruction automatically sent to the baseboard management controller by the processor during the operation of the first computing device when certain logical functions require network port switching. This method of actively switching under preset conditions gives the baseboard management controller a certain degree of operational stability, ensuring that users can access the baseboard management controller at any time to manage computing devices.
[0085] For example, the baseboard management controller can connect to the management network through the first extended network port by binding its own IP address to the first extended network port. As mentioned above, the baseboard management controller has an independent IP address. When network port switching is required, the baseboard management controller can modify its own network configuration and bind the IP address to the identifier of the determined first extended network port. After the binding is completed, the network port switching is realized. The baseboard management controller can access the management network through the switched first extended network port, and the devices in the management network can also access the baseboard management controller through the switched first extended network port.
[0086] As an example, the baseboard management controller can sort the identifiers of multiple expansion network ports on the network card and select the first expansion network port in order. Alternatively, the first expansion network port is determined based on the priority level according to a preconfigured priority. The embodiments of the present application do not limit the specific selection criteria for selecting the first expansion network port from the multiple expansion network ports.
[0087] In one implementation, before the above S200, the baseboard management controller can obtain information about multiple extended network ports from the network card to facilitate subsequent network port switching. As mentioned above, the network card is hardware used to manage communication functions in a computing device, and multiple extended network ports are deployed on it. When the computing device starts running, the network card with NC-SI function can determine which network ports of its own setting have been plugged into network cables. Furthermore, the network card sends indication information of the multiple extended network ports that have been plugged into the network cables to the baseboard management controller. When network port switching is required under preset conditions, the baseboard management controller can select the first extended network port from the multiple extended network ports to connect to the management network based on the indication information.
[0088] As an example, the indication information can specifically be a list of extended network ports. The baseboard management controller can save the list of extended network ports in its own storage space and use it when needed. In addition, the network card can send indication information to the baseboard management controller in real time based on the connection status of the network port, so that the baseboard management controller can promptly update the list of extended network ports to ensure the success rate of subsequent network port switching.
[0089] S202: When the baseboard management controller is not connected to the first network, the baseboard management controller switches to the second extended network port to connect to the first network.
[0090] In an embodiment of the present application, if, based on the judgment of S201, the baseboard management controller determines that it is not connected to the management network, it means that the first extended network port currently in use is not available in the management network. The baseboard management controller can then re-determine the second extended network port from multiple extended network ports and connect to the management network through the second extended network port.
[0091] In one possible implementation, to ensure that the baseboard management controller functions are available, the baseboard management controller may repeatedly execute S201-S202 above until the baseboard management controller is connected to the first network. It should be understood that by repeatedly executing the above network port switching and connectivity testing process, the success rate of network port switching can be effectively improved, ensuring that the user can normally use the functions of the baseboard management controller.
[0092] It should be understood that the above embodiment is described by taking the case where the baseboard management controller determines that the baseboard management controller is not connected to the management network as an example. The following description is based on the case where the baseboard management controller determines that the baseboard management controller is connected to the management network. As shown in FIG6 , after the above S201 , the following further includes:
[0093] S203 : When the baseboard management controller is connected to the first network, the baseboard management controller continues to connect to the first network through the first extended network port.
[0094] In an embodiment of the present application, based on the judgment of S201 above, the baseboard management controller determines that it is connected to the management network, indicating that the first extended network port is available in the management network. The baseboard management controller then continues to connect to the management network through the first extended network port to ensure that the user can use the functions of the baseboard management controller normally.
[0095] In some scenarios, after the network port is successfully switched, the baseboard management controller can also notify the user of the switching result. Therefore, optionally, as shown in Figure 7, after S203, the method provided by the embodiment of the present application further includes:
[0096] S204 : When the baseboard management controller is connected to the first network, output prompt information, where the prompt information is used to prompt that the first extended network port is available in the first network.
[0097] For example, if the baseboard management controller determines that it is connected to the management network, the baseboard management controller can send a prompt message to the user's user-side device via the management network. Alternatively, if the first computing device is connected to a display, the baseboard management controller can send a prompt message to the processor of the first computing device, which then controls the first computing device to display the prompt message on the display. By outputting prompt messages, the baseboard management controller can help users promptly understand the switching status of network ports, allowing users to promptly maintain the computing device based on the occupancy of the network ports.
[0098] Figure 8 is a schematic diagram of a network port switching process provided by an embodiment of the present application. As shown in Figure 8, if the dedicated network port fails, the baseboard management controller triggers the network port switching, and can select an extended network port 1 from the network card that supports the NC-SI function (corresponding to the aforementioned S200), and then the baseboard management controller queries the update status of the ARP list (corresponding to step 1 in the aforementioned Figure 4). If the ARP list is not updated, it means that the extended network port 1 is not available in the management network (corresponding to step 2 in the aforementioned Figure 4), then the next extended network port 2 is selected from the network card that supports the NS-SI function to connect to the management network through the extended network port 2 (corresponding to the aforementioned S202).
[0099] FIG9 is a schematic diagram of another network port switching process provided by an embodiment of the present application. As shown in FIG9 , taking the cyclic switching process as an example, if the dedicated network port fails, the baseboard management controller triggers the network port switching (corresponding to the aforementioned S200), and an extended network port can be selected from the network card that supports the NC-SI function, and the update of the ARP list is queried (corresponding to step 1 in the aforementioned FIG4 ). If the ARP list has been updated, a prompt message is output (corresponding to the aforementioned S204). If the ARP list has not been updated, the step of selecting another network port and querying the update of the ARP list is repeated until the ARP list is updated successfully (corresponding to the aforementioned process of repeating S201-S202).
[0100] The embodiment of the present application provides a network port switching method, in which the baseboard management controller is connected to the first network through the first extended network port and detects whether it is connected to the first network. If it is determined that it is not connected, the baseboard management controller switches the second extended network port to connect to the first network. The embodiment of the present application adds a step of detecting connectivity with the first network during the process of performing network port switching to determine whether the extended network port currently used by the baseboard management controller can be connected to the management network, thereby avoiding the situation where the functions of the baseboard management controller are unavailable due to network isolation problems, and ensuring that users can normally access the baseboard management controller and manage the computing device.
[0101] Furthermore, the embodiment of the present application determines whether the baseboard management controller is connected to the second computing device by querying whether the ARP list is updated. This method consumes fewer resources and is more efficient. In addition, by repeatedly performing the steps of network port switching and connectivity detection, the success rate of network port switching can be effectively improved, ensuring that the user can use the functions of the baseboard management controller normally.
[0102] It can be seen that the above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. In order to achieve the above functions, the embodiment of the present application provides hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the modules and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0103] In an exemplary embodiment, the present application further provides a network port switching device. The network port switching device may be the aforementioned baseboard management controller. The network port switching device may include one or more functional modules for implementing the network port switching method of the above method embodiment.
[0104] For example, FIG10 is a schematic diagram of the composition of a network port switching device provided in an embodiment of the present application. As shown in FIG10 , the network port switching device includes: a detection module 1001 and a switching module 1002 .
[0105] The detection module 1001 is used to detect whether the device is connected to the first network; the device is connected to the first network through the first network; the first network is the network for managing the first computing device; the switching module 1002 is used to switch to the second extended network port to connect to the first network when the device is not connected to the first network.
[0106] In a possible implementation, the switching module 1002 is specifically configured to, when the baseboard management controller is not connected to the first network, switch to the second extended network port to connect to the first network until the baseboard management controller is connected to the first network.
[0107] In another possible implementation, the first computing device is connected to a plurality of second computing devices in the first network, and an Address Resolution Protocol (ARP) list is stored in the baseboard management controller;
[0108] The detection module 1001 is specifically used to query whether the media access control MAC addresses of multiple second computing devices in the ARP list are updated successfully; if the MAC addresses of all queried second computing devices are not updated successfully, determine that the first network is not connected to the second computing device.
[0109] In another possible implementation, the apparatus further includes: a sending module 1003 and an updating module 1004. The sending module 1003 is configured to broadcast an ARP request to a computing device in the first network; the ARP request is used to request a MAC address of the computing device in the first network; and the updating module 1004 is configured to update the MAC address of the computing device in the first network in the ARP list based on received response information from the computing device in the first network to the ARP request.
[0110] In another possible implementation, the first computing device is connected to multiple second computing devices in the first network, and the detection module 1001 is specifically used to send ARP requests to the multiple second computing devices respectively; the ARP request is used to request the MAC address of the second computing device; if no response information of all the second computing devices in the multiple second computing devices to the ARP request is received, the baseboard management controller determines that it is not connected to the first network.
[0111] In another possible implementation, the device also includes: a determination module 1005; the determination module 1005 is used to, under preset conditions, determine that the first extended network port is connected to the first network from multiple extended network ports; the preset conditions include at least one of the following: the baseboard management controller detects a failure of the dedicated network port; the baseboard management controller receives an instruction to switch the network port.
[0112] In another possible implementation, the switching module 1002 is further configured to, when the baseboard management controller is connected to the first network, continue to connect to the first network through the first extended network port.
[0113] In another possible implementation, the device further includes: an output module 1006; the output module 1006 is configured to, when the baseboard management controller is connected to the first network, cause the baseboard management controller to output prompt information; the prompt information is configured to prompt that the first extended network port is available in the first network.
[0114] In an exemplary embodiment, the present application also provides a chip. The chip may include: a chip processor and a chip memory; the chip memory stores executable instructions; and when the chip processor is configured to execute the instructions, the chip implements the method described in the aforementioned embodiment.
[0115] In an exemplary embodiment, an embodiment of the present application provides a computing device, including a central processing unit, a memory, a management controller, and multiple extended network ports on a network card; a computer program is stored on the memory, and the baseboard management controller is used to implement the following steps by executing the computer program: the baseboard management controller detects whether it is connected to a first network; wherein, the baseboard management controller is connected to the first network through a first extended network port; the first network is a network for managing the first computing device; when the baseboard management controller is not connected to the first network, the baseboard management controller switches to the second extended network port to connect to the first network.
[0116] The embodiment of the present application also provides a computer-readable storage medium. All or part of the processes in the above-mentioned method embodiment can be completed by computer instructions to instruct the relevant hardware, and the program can be stored in the above-mentioned computer-readable storage medium. When the program is executed, it may include the processes of the above-mentioned method embodiments. The computer-readable storage medium can be the memory of any of the above-mentioned embodiments. The above-mentioned computer-readable storage medium can also be an external storage device of the above-mentioned network port switching device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the above-mentioned network port switching device. Furthermore, the above-mentioned computer-readable storage medium can also include both the internal storage unit of the above-mentioned network port switching device and an external storage device. The above-mentioned computer-readable storage medium is used to store the above-mentioned computer program and other programs and data required by the above-mentioned network port switching device. The above-mentioned computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
[0117] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program product runs on a computer, it enables the computer to execute any one of the network port switching methods provided in the above embodiments.
[0118] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple components. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0119] Although the present application has been described with reference to specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely illustrative of the present application as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, the present application is intended to include such modifications and variations as fall within the scope of the claims of the present application and their equivalents.
[0120] The above are only specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A network port switching method, characterized in that: Applied to a first computing device, the first computing device includes a baseboard management controller and a network card, and the network card is provided with multiple expansion network ports; the method includes: The baseboard management controller detects whether it is connected to a first network; wherein the baseboard management controller is connected to the first network through a first extended network port; the first network is a network for managing the first computing device; When the baseboard management controller is not connected to the first network, the baseboard management controller switches to the second extended network port to connect to the first network.
2. The method according to claim 1, characterized in that When the baseboard management controller is not connected to the first network, the baseboard management controller switches to the second extended network port to connect to the first network, including: When the baseboard management controller is not connected to the first network, the baseboard management controller switches to another extended network port of the network card to connect to the first network until the baseboard management controller is connected to the first network.
3. The method according to claim 1 or 2, characterized in that The first computing device is connected to a plurality of second computing devices in the first network, and the baseboard management controller stores an address resolution protocol ARP list; The baseboard management controller detects whether it is connected to the first network, including: querying whether the media access control MAC addresses of the plurality of second computing devices in the ARP list are updated successfully; If the MAC addresses of all the queried second computing devices are not updated successfully, the baseboard management controller determines that the first network is not connected.
4. The method according to claim 3, characterized in that The method further comprises: The baseboard management controller broadcasts an ARP request to the computing device in the first network; the ARP request is used to request the MAC address of the computing device in the first network; The baseboard management controller updates the MAC address of the computing device in the first network in the ARP list according to the received response information of the computing device in the first network to the ARP request.
5. The method according to claim 1 or 2, characterized in that The first computing device is connected to a plurality of second computing devices in the first network, and the baseboard management controller detects whether the first computing device is connected to the first network, including: Sending ARP requests to the plurality of second computing devices respectively; the ARP requests are used to request the MAC addresses of the second computing devices; In a case where response information to the ARP request is not received from all the second computing devices in the plurality of second computing devices, the baseboard management controller determines that the first network is not connected.
6. The method according to any one of claims 1 to 5, characterized in that Before the baseboard management controller detects whether it is connected to the first network, the method further includes: Under a preset condition, the baseboard management controller determines that a first extended network port is connected to the first network from the plurality of extended network ports; The preset condition includes at least one of the following: the baseboard management controller detects a failure of the dedicated network port; the baseboard management controller receives an instruction to switch the network port.
7. The method according to claim 1, characterized in that The method further comprises: When the baseboard management controller is connected to the first network, the baseboard management controller continues to connect to the first network through the first extended network port.
8. The method according to claim 1, characterized in that The method further comprises: When the baseboard management controller is connected to the first network, the baseboard management controller outputs prompt information; the prompt information is used to prompt that the first extended network port is available in the first network.
9. A network port switching device, characterized in that: Applied to a first computing device, the apparatus includes a detection module and a switching module; The detection module is used to detect whether the device is connected to a first network; the device is connected to the first network through a first extended network port; the first network is a network for managing the first computing device; The switching module is configured to switch to the second extended network port to connect to the first network when the network is not connected to the first network.
10. A computing device, characterized in that including a processor, a memory, a baseboard management controller, a computer program stored on the memory, and a network card; The baseboard management controller is used to execute the computer program to implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Server system and switching method thereof
CN102253686A
Server system with mainboards
CN102340517A
Server with selective switch management network connection function
CN104536514A
Server system with function of automatic switching of shared network
CN105703935A
NCSI shared network port switching method and apparatus
CN107743076A