CN115865654A - Method for communicating with server, electronic device and storage medium - Google Patents

Method for communicating with server, electronic device and storage medium Download PDF

Info

Publication number
CN115865654A
CN115865654A CN202211557888.XA CN202211557888A CN115865654A CN 115865654 A CN115865654 A CN 115865654A CN 202211557888 A CN202211557888 A CN 202211557888A CN 115865654 A CN115865654 A CN 115865654A
Authority
CN
China
Prior art keywords
switch
port
link aggregation
aggregation group
target server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211557888.XA
Other languages
Chinese (zh)
Inventor
林宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN202211557888.XA priority Critical patent/CN115865654A/en
Publication of CN115865654A publication Critical patent/CN115865654A/en
Priority to PCT/CN2023/106269 priority patent/WO2024119820A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a method for communicating with a server, electronic equipment and a storage medium, belongs to the field of switch communication, and is used for guaranteeing the stability of a communication network with the server. The method comprises the following steps: under the condition that a target server does not finish the configuration of an operating system, a port of a switch is correspondingly connected with a port of the target server in a communication mode, wherein the port of the switch is at least one of a plurality of ports of a link aggregation group of the switch, and the ports of the switch are in one-to-one correspondence with the ports of the target server.

Description

Method for communicating with server, electronic device and storage medium
Technical Field
The application belongs to the field of switch communication, and particularly relates to a method for communicating with a server, electronic equipment and a storage medium.
Background
Typically, the server is a bare machine when the Operating System (OS) and configuration are not downloaded.
The switch side interfaces to the bare metal server using either a dynamic link aggregation group or a static link aggregation group. Due to the fact that the server side is in communication connection with the link aggregation group of the switch through only one port, communication abnormality can exist in communication connection between the switch and the server side.
Disclosure of Invention
The embodiment of the application provides a method for communicating with a server, an electronic device and a storage medium, which can solve the problem that communication abnormity exists in communication connection between a switch and a server side.
In a first aspect, an embodiment of the present application provides a method for communicating with a server, where the method includes: under the condition that a target server does not finish the configuration of an operating system, a port of a switch is correspondingly connected with a port of the target server in a communication mode, wherein the port of the switch is at least one of a plurality of ports of a link aggregation group of the switch, and the ports of the switch are in one-to-one correspondence with the ports of the target server.
In a second aspect, an embodiment of the present application provides an apparatus for communicating with a service, where the apparatus includes: the communication module is used for correspondingly connecting a port of a switch and a port of a target server in a communication mode under the condition that the target server does not finish the configuration of an operating system, wherein the port of the switch is at least one of a plurality of ports of a link aggregation group of the switch, and the ports of the switch and the ports of the target server are in one-to-one correspondence.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor, implement the steps of the method according to the first aspect.
In the embodiment of the application, under the condition that the configuration of the operating system is not completed by the target server, the port of the switch corresponds to the port of the target server in communication connection, wherein the port of the switch is at least one port of a plurality of ports of a link aggregation group of the switch, and the port of the switch corresponds to the port of the target server one to one.
Drawings
Fig. 1 is a schematic flowchart of a method for communicating with a server according to an embodiment of the present application;
fig. 2 is a schematic diagram of a switch and a target server communication connection provided in an embodiment of the present application;
fig. 3 is a schematic diagram illustrating a switching of communication modes of a switch according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus for communicating with a server according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The method, the electronic device, and the storage medium for communicating with the server according to the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a method for communicating with a server according to an embodiment of the present invention, which may be performed by a switch, and the method includes the following steps:
step 102: and under the condition that the target server does not finish the configuration of the operating system, the port of the switch is correspondingly connected with the port of the target server in a communication mode.
Specifically, the target server is a bare machine when an Operating System (OS) is not loaded and/or the configuration of the OS is not completed, and the target server randomly finds a port to communicate with the switch side if the target server needs to remotely download the OS and configure in the bare machine state. At this time, on the switch side, in order to improve the stability of the network, link aggregation or cross-device link aggregation is generally adopted in networking to interface with the target server, that is, the target server is usually communicated with through a link aggregation mode. At this time, if the target server randomly selects a port to interface with the link aggregation group on the switch side, some problems may occur, such as:
1. if the switch side uses dynamic link aggregation to interface a single port of the target server, communication may not be possible because the target server is a bare machine and no communication protocol related to link control is configured.
2. If the switch side uses static link aggregation to interface a single port of the target server, at this time, if the target server downloads OS and configuration through the switch side network, the switch side link aggregation group needs to send data traffic to other ports, and the target server side cannot provide other ports for receiving data traffic because only one port is provided for interfacing.
Therefore, in the related art, no matter whether the switch side uses a dynamic link aggregation group or a static link aggregation group to interface the bare metal target server, since the target server side interfaces with the link aggregation group of the switch through only one port, there is a problem that communication between the switch and the target server side is abnormal.
In the embodiment of the present application, in order to solve the above problem, when configuring a switch in advance, all ports on the switch for performing communication connection with a target server have been configured as a link aggregation group, the switch may communicate with the target server in a link aggregation group mode through the link aggregation group, and for the link aggregation group of the switch, an automatic break-up attribute is further configured, that is, each member port of the link aggregation group of the switch is allowed to automatically switch between a single-port mode and a link aggregation group mode, where the single-port mode, that is, each member port of the link aggregation group may individually perform communication connection with a port of a corresponding target server.
In a case that it is determined that the target server does not load the operating system and/or does not complete the operating system configuration, the switch may be communicatively connected to the target server in a single-port mode, that is, a port of the switch may be communicatively connected to a port of the target server correspondingly, where the port of the switch may be at least one port of a plurality of ports of a switch link aggregation group, and the port of the switch and the port of the target server are in a one-to-one correspondence at this time.
As an example, for example, in a case where the target server does not load the operating system and/or does not complete the operating system configuration, the switch may be communicatively connected to the switch through the port P, and in a case where it is determined that the target server does not load the operating system and/or does not complete the operating system configuration, the switch may be communicatively connected to the port P of the target server through the port M, and it should be noted that the port M of the switch and the port P of the target server have a one-to-one correspondence relationship.
In the embodiment of the application, under the condition that the configuration of the operating system is not completed by the target server, the port of the switch corresponds to the port of the target server in communication connection, wherein the port of the switch is at least one port of a plurality of ports of a link aggregation group of the switch, and the port of the switch corresponds to the port of the target server one to one.
In one implementation, it is determined that the target server does not complete an operating system configuration in a target case, wherein the target case comprises: the condition that all ports in the link aggregation group of the switch do not receive the target protocol message sent by the target server; or a condition where all ports in a link aggregation group of the switch are down. The incomplete operating system configuration comprises: no operating system is loaded; or the operating system has been loaded but the configuration of the operating system has not been completed.
Specifically, if the target server finishes loading the operating system and finishes configuration of the operating system, a target Protocol packet may be sent to the switch, where the target Protocol packet may be a Link Aggregation Control Protocol (LACP) packet, and therefore, if all ports in a Link Aggregation group of the switch do not receive the target Protocol packet sent by the target server, it is indicated that the target server does not load the operating system and/or does not finish configuration of the operating system, and at this time, the ports in the Link Aggregation group of the switch need to be in communication connection with the ports of the target server through a single-port mode.
When all ports in the link aggregation group of the switch are in communication connection with the target server, if all ports in the link aggregation group of the switch are down, the target server may have unexpected situations such as restart, and at this time, the ports in the link aggregation group of the switch also need to be converted into a single-port mode.
Thus, by determining that the target server does not load the operating system and/or does not complete the operating system configuration in a target situation, wherein the target situation comprises: the condition that all ports in the link aggregation group of the switch do not receive the target protocol message sent by the target server; or when all ports in the link aggregation group of the switch are down, whether the operating system is loaded by the target server or not and whether the operating system configuration is completed or not can be determined, and further whether the switch is in communication connection with the target server through a single-port mode or not can be determined.
In one implementation, after the corresponding communication connection with the port of the target server through the port of the switch, the method further includes:
and under the condition that the target server loads an operating system and completes the configuration of the operating system, the link aggregation group of the switch is in communication connection with the link aggregation group of the target server.
Specifically, if the port of the switch receives a target protocol packet sent by the target server, it may be determined that the target server loads the operating system and completes configuration of the operating system, and the port of the switch may be in communication connection with the target server through a link aggregation mode, that is, a link aggregation group of the switch is in communication connection with a link aggregation group of the target server.
Therefore, under the condition that the target server loads the operating system and completes the configuration of the operating system, the link aggregation group of the switch is in communication connection with the link aggregation group of the target server, so that the communication effect of the link aggregation group of the switch is realized, the butt joint accuracy of the switch and the target server is improved, the oscillation and abnormity in the communication process of the switch and the target server are avoided, and the stability and the fault tolerance of a communication network of the switch and the target server are improved.
In one implementation, communicatively connecting, through the link aggregation group of the switch, with the link aggregation group of the target server includes:
acquiring a negotiation result of the link aggregation group of the switch and the link aggregation group of the target server; and under the condition that the negotiation result indicates that the negotiation of at least one port in the link aggregation group of the switch is successful, the link aggregation group of the switch is connected with the link aggregation group of the target server in a communication mode.
Specifically, after the switch receives a target protocol packet sent by the target server, the link aggregation group of the switch needs to enter a negotiation state to perform bidirectional negotiation with the link aggregation group of the target server, where the bidirectional negotiation is to determine which ports are active ports in the link aggregation group of the switch, that is, ports capable of performing communication connection normally, so that if a negotiation result of the link aggregation group of the switch and the link aggregation group of the target server is that at least one port has successfully negotiated, all ports of the switch enter a link aggregation group mode, and the link aggregation group of the switch can be in communication connection with the link aggregation group of the target server.
Thus, the negotiation result of the link aggregation group of the switch and the link aggregation group of the target server is obtained; under the condition that the negotiation result indicates that the negotiation of at least one port in the link aggregation group of the switch is successful, the link aggregation group of the switch is in communication connection with the link aggregation group of the target server through the link aggregation group of the switch, and under the condition that the negotiation of at least one port in the link aggregation group of the switch is successful, the link aggregation group of the switch is only in communication connection with the link aggregation group of the target server, so that the correctness of the communication connection between the switch and the target server is ensured, the oscillation and the abnormity in the communication process between the switch and the target server are avoided, and the stability and the fault tolerance of a communication network between the switch and the target server are improved.
In one implementation, after obtaining a negotiation result of the link aggregation group of the switch and the link aggregation group of the target server, the method further includes:
and under the condition that the negotiation result indicates that at least one port in the link aggregation group of the switch fails to negotiate, receiving a target protocol message sent by the target server through a port in a blocking state in the link aggregation group of the switch, wherein the port in the blocking state is the port in the link aggregation group of the switch which fails to negotiate.
Specifically, when the negotiation result of the link aggregation group of the switch and the link aggregation group of the target server includes that at least one port fails in negotiation, that is, the port that fails in negotiation is in an inactive (inactive) state, the port that does not active may be set in a spanning tree blocking (block) state, that is, the port that fails in negotiation is set in a blocking state according to a state machine of a spanning tree protocol, and through the port in the blocking state, only the target protocol packet sent by the target server may be received, and the port in the blocking state does not forward data traffic and does not participate in communication connection any more.
Therefore, under the condition that the negotiation result indicates that at least one port in the link aggregation group of the switch fails to negotiate, the port in the blocking state in the link aggregation group of the switch receives the target protocol message sent by the target server, wherein the port in the blocking state is the port in the link aggregation group of the switch which fails to negotiate, the port in the blocking state can be determined, and the port in the blocking state only receives the target protocol message, so that the correctness of the communication connection between the switch and the target server is ensured, the oscillation and the abnormity in the communication process between the switch and the target server are avoided, and the stability and the fault tolerance of the communication network between the switch and the target server are improved.
In one implementation, the negotiating at least one port in the link aggregation group of the switch is successful, including:
under the condition that the communication between a first port in the link aggregation group of the switch and a port in the link aggregation group of the target server is successful, determining that the negotiation of the first port is successful; at least one port in a link aggregation group of the switch fails negotiation, including: and determining that the negotiation of the second port fails when the communication between the second port in the link aggregation group of the switch and the port in the link aggregation group of the target server fails.
Specifically, the purpose of negotiating the port of the link aggregation group of the switch with the port of the link aggregation group of the target server is to determine which ports in the link aggregation group of the switch can be in normal communication connection, and therefore, when negotiating the link aggregation group of the switch with the link aggregation group of the target server, if a first port in the link aggregation group of the switch is in successful communication with a port in the link aggregation group of the target server, it may be determined that the first port is in successful negotiation, where the first port may be one port or multiple ports in the link aggregation group of the switch, and the first port in the link aggregation group of the switch is not limited herein.
Similarly, when the link aggregation group of the switch negotiates with the link aggregation group of the target server, if a second port in the link aggregation group of the switch fails to communicate with a port in the link aggregation group of the target server, it may be determined that the negotiation of the second port fails, where the second port may be one port or multiple ports in the link aggregation group of the switch, and the second port of the link aggregation group of the switch is not limited here.
In this way, under the condition that the communication between the first port in the link aggregation group of the switch and the port in the link aggregation group of the target server is successful, the first port is determined to be successfully negotiated; at least one port in a link aggregation group of a switch fails negotiation, comprising: and under the condition that the second port in the link aggregation group of the switch fails to communicate with the port in the link aggregation group of the target server, determining that the negotiation of the second port fails, and determining the port with successful negotiation and the port with failed negotiation in the link aggregation group of the switch.
In one implementation, the method further comprises:
and under the condition that the negotiation of the port in the blocking state is successful, forwarding data traffic through the port in the blocking state which is successfully negotiated.
Specifically, if the subsequent negotiation between the port in the blocking state and the port in the link aggregation group of the target server is successful, which indicates that the port in the blocking state subsequently recovers to the active state, the port in the blocking state may be set to a spanning tree forwarding (forward) state, and the port may normally forward the data traffic.
Therefore, under the condition that the negotiation of the port in the blocking state is successful, the data flow is forwarded through the port in the blocking state which is successfully negotiated, so that the blocking port which recovers the active state can participate in the communication of the target server, the stability of the communication with the target server is improved, and the utilization efficiency of the port of the switch is improved.
In one implementation, the method further comprises:
and deleting the control information corresponding to the target server, which is acquired by the switch, before the communication connection between the switch and the target server is converted.
Specifically, no matter the switch is in communication connection with the target server in the single port mode or the link aggregation group mode, the switch acquires Control information corresponding to the target server as forwarding information of the switch, such as a Media Access Control Address (MAC) of the target server, address Resolution Protocol (ARP) information, routing information, and the like.
In this embodiment, before the switch is switched in communication connection with the target server, control information corresponding to the target server acquired by the switch before the communication connection is switched may be deleted, for example, if the communication connection between the switch and the target server needs to be switched from a single-port mode to a link aggregation group mode, before the switching, the control information of the target server acquired by the switch in the single-port mode needs to be deleted, and if the communication connection between the switch and the target server needs to be switched from the link aggregation group mode to the single-port mode, before the switching, the control information of the target server acquired by the switch in the link aggregation group mode needs to be deleted.
Therefore, before the communication connection between the switch and the target server is converted, the control information corresponding to the target server acquired by the switch is deleted, and the problem that the control information of the target server acquired in different communication modes is inconsistent and is abnormal is solved.
To illustrate the present application in further detail, the present application provides the following examples:
example one:
configuring ports A1 and A2 at the exchange side as a link aggregation group A, configuring the link aggregation group with a break-up attribute, and butting the ports B1 and B2 of a target server, wherein the MAC address of the server is 00: 22, and the IP address is 10.0.0.1.
(1) The target server is initially in a state without any OS and configuration, and communicates with the switch using B1 by default.
(2) Ports A1 and A2 of the switch are configured as a link aggregation group a and have a break-up attribute, and the switch side listens to the LACP message at the ports A1 and A2.
(3) And if the port of the switch does not intercept the LACP message, the A1 and A2 ports of the switch are in a single-port mode, the configuration information of the A1 and A2 ports is obtained, and the configuration information is written into a port configuration register of the switch.
(4) The switch is connected with the B1 port of the target server through the A1 port in communication, and learns that the MAC address 00 of the target server.
Example two:
configuring ports A1 and A2 at the exchange side as a link aggregation group A, configuring the link aggregation group with a break-up attribute, and butting the ports B1 and B2 of a target server, wherein the MAC address of the server is 00: 22, and the IP address is 10.0.0.1.
(1) The target server completes the loading of the OS and configuration, discovers that B1 and B2 are link aggregation groups, and therefore the server starts LACP negotiation with the switch.
(2) Any one of the ports A1 and A2 of the switch receives the LACP message, namely the port is intercepted and found, and the ports A1 and A2 enter an LACP negotiation state.
(3) If both A1 and A2 negotiate successfully, A1 and A2 enter a link aggregation group mode, perform communication connection with a link aggregation group composed of servers B1 and B2, delete the entries of ARP, MAC, route, and the like learned by original A1 or A2, learn the entry of ARP, MAC, and the like again through the link aggregation group a formed by A1 and A2, and learn that the MAC address 00 of the target server is.
(4) If only A1 in A1 and A2 is successfully negotiated, A2 enters a spanning tree block state, and if neither A1 nor A2 is successfully negotiated, A1 and A2 all enter the spanning tree block state.
Example three:
the ports A1 and A2 configured on the exchange side are a link aggregation group A and are configured to have a scatter attribute, and the ports B1 and B2 of the target server are butted.
After the negotiation of the ports A1 and/or A2 is successful, if the target server is restarted, all the ports in the link aggregation group of the switch will be down, at this time, the ports A1 and A2 of the switch are switched from the link aggregation group mode to the single-port mode, the entries of ARP, MAC, route and the like learned by the link aggregation group a of the switch are deleted, and the ports A1 or A2 of the switch and the randomly selected ports B1 or B2 of the target server prepare for single-port communication.
Fig. 2 is a schematic diagram illustrating a communication connection between a switch and a target server according to an embodiment of the present application, where as shown in fig. 2, when a port of a switch 210 is connected to a port of a target server 220, if the target server 220 does not load an operating system and/or does not complete an operating system configuration, the target server 220 directly selects a port to perform communication connection with the switch 210, and on the switch 210 side, under a condition that it is determined that the target server 220 does not load an operating system and/or does not complete an operating system configuration, a port is also selected to perform communication connection with the port selected by the target server 220, as shown in fig. 2, the target server 220 may select a port B1, and the switch 210 may select a port A1 to perform communication connection with a port B1 of the target server 220.
If the target server 220 loads the operating system and completes the configuration of the operating system, the A1 port and the A2 port of the switch 210 may enter a link aggregation group mode to negotiate with the port of the target server 220, and if the negotiation is successful, the link aggregation group of the switch 210 may be in communication connection with a link aggregation group formed by the B1 port and the B2 port of the target server 220.
Fig. 3 is a schematic diagram illustrating a switching of a communication mode of a switch according to an embodiment of the present application. As shown in fig. 3, in a case that it is determined that the target server does not load the operating system and/or does not complete the operating system configuration, the switch may be communicatively connected to the target server through a single-port mode, that is, a port of the switch may be communicatively connected to a port of the target server correspondingly, where the port of the switch may be at least one port of a plurality of ports of a switch link aggregation group, and the port of the switch and the port of the target server correspond to each other one to one at this time.
If a port of the switch receives a target protocol message (LACP message) sent by a target server, it may be determined that the target server loads an operating system and completes configuration of the operating system, the port of the switch may be converted into a link aggregation group mode, after the switch receives the target protocol message sent by the target server, a link aggregation group of the switch needs to enter a negotiation state to perform bidirectional negotiation with the link aggregation group of the target server, where the negotiation may be LACP negotiation, and the purpose of the bidirectional negotiation is to determine which ports are ports in an active state in the link aggregation group of the switch, that is, ports that can perform communication connection normally, and set a port that fails in negotiation as a blocking state, and if a negotiation result of the link aggregation group of the switch and the link aggregation group of the target server is that at least one port has successfully negotiated, all ports of the switch enter the link aggregation group mode, and the link aggregation group of the switch may be in communication connection with the link aggregation group of the target server.
Before the communication connection between the switch and the target server end is converted into the link aggregation mode from the single-port mode, the entries of the MAC, ARP, routing and the like of the target server, which are learned by the switch through the single-port mode, need to be deleted, when the target server is restarted, the port of the switch will be down, at this time, the passing mode of the switch needs to be converted into the single-port mode from the link aggregation group mode, and the entries of the MAC, ARP, routing and the like of the target server, which are learned by the switch through the link aggregation group mode, also need to be cleared before the conversion.
In the above process, the configuration information of the port of the switch and the configuration information of the LACP message of the target server do not interfere with each other, and respective effective effects can be presented, and in implementation, two sets of configuration information can be used to take effect at different levels, and configuration information conflicting with each other in two sets of configurations, such as Virtual Local Area Network (VLAN), can be used to perform coverage switching according to an effective mode.
In the method for communicating with the server provided by the embodiment of the present application, the executing body may be a device for communicating with the server, or a control module in the device for communicating with the server for executing the method for communicating with the server. In the embodiment of the present application, a method for a device communicating with a server to perform communication with the server is taken as an example, and the device communicating with the server provided in the embodiment of the present application is described.
Fig. 4 is a schematic structural diagram of a device communicating with a server according to an embodiment of the present invention. As shown in fig. 4, the apparatus 400 for communicating with a server includes: a communication module 410.
The communication module 410 is configured to, when a target server does not load an operating system and/or does not complete configuration of the operating system, correspondingly connect, through a port of a switch, a port of the switch to a port of the target server in a communication manner, where the port of the switch is at least one port of a plurality of ports of a link aggregation group of the switch, and the ports of the switch correspond to the ports of the target server one to one.
In one implementation, the communication module 410 is further configured to determine that the target server does not load the operating system and/or does not complete the operating system configuration in a target situation, where the target situation includes: the condition that all ports in the link aggregation group of the switch do not receive the target protocol message sent by the target server; or a condition where all ports in a link aggregation group of the switch are down.
In one implementation, the communication module 410 is further configured to communicatively connect with the link aggregation group of the target server through the link aggregation group of the switch when the target server loads the operating system and completes the operating system configuration.
In an implementation manner, the communication module 410 is configured to obtain a negotiation result of the link aggregation group of the switch and the link aggregation group of the target server; and under the condition that the negotiation result indicates that the negotiation of at least one port in the link aggregation group of the switch is successful, the link aggregation group of the switch is connected with the link aggregation group of the target server in a communication mode.
In an implementation manner, the communication module 410 is further configured to receive, through a port in a blocking state in the link aggregation group of the switch, a target protocol packet sent by the target server when the negotiation result indicates that at least one port in the link aggregation group of the switch fails to negotiate, where the port in the blocking state is a port in the link aggregation group of the switch that fails to negotiate.
In one implementation, the communication module 410 is configured to determine that negotiation of a first port in a link aggregation group of the switch is successful if the first port is successfully communicated with a port in a link aggregation group of the target server; at least one port in the link aggregation group of the switch fails to negotiate, including: and determining that the negotiation of the second port fails when the communication between the second port in the link aggregation group of the switch and the port in the link aggregation group of the target server fails.
In an implementation manner, the communication module 410 is further configured to, in a case that the negotiation of the port in the blocking state is successful, forward data traffic through the port in the blocking state, where the negotiation is successful.
In an implementation manner, the communication module 410 is further configured to delete the control information corresponding to the target server, which is acquired by the switch, before the communication connection between the switch and the target server is switched.
The device communicating with the server in the embodiment of the present application may be a device, and may also be a component, an integrated circuit, or a chip in the terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiment of the present application is not particularly limited.
The device communicating with the server in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The device communicating with the server according to the embodiment of the present application can implement each process implemented by the method embodiments in fig. 1 to fig. 3, and is not described herein again to avoid repetition.
Optionally, as shown in fig. 5, an electronic device 500 according to an embodiment of the present application is further provided, and includes a processor 501 and a memory 502, where the memory 502 stores a program or an instruction that is executable on the processor 501, and when the program or the instruction is executed by the processor 501, the program or the instruction implements: under the condition that an operating system is not loaded and/or the configuration of the operating system is not completed on a target server, a port of a switch is correspondingly connected with a port of the target server in a communication mode, wherein the port of the switch is at least one of a plurality of ports of a link aggregation group of the switch, and the ports of the switch are in one-to-one correspondence with the ports of the target server.
In one implementation, the method further comprises: determining that the target server does not load an operating system and/or does not complete an operating system configuration under a target condition, wherein the target condition comprises: the condition that all ports in the link aggregation group of the switch do not receive the target protocol message sent by the target server; or a condition where all ports in a link aggregation group of the switch are down.
In one implementation, after the port of the switch is correspondingly connected with the port of the target server in a communication mode, the link aggregation group of the switch is connected with the link aggregation group of the target server in a communication mode under the condition that the target server loads an operating system and completes the configuration of the operating system.
In one implementation, a negotiation result of a link aggregation group of the switch and a link aggregation group of the target server is obtained; and under the condition that the negotiation result indicates that the negotiation of at least one port in the link aggregation group of the switch is successful, the link aggregation group of the switch is connected with the link aggregation group of the target server in a communication mode.
In an implementation manner, after a negotiation result of a link aggregation group of the switch and a link aggregation group of the target server is obtained, and when the negotiation result indicates that at least one port in the link aggregation group of the switch fails to negotiate, a target protocol packet sent by the target server is received through a port in a blocking state in the link aggregation group of the switch, where the port in the blocking state is a port in the link aggregation group of the switch that fails to negotiate.
In one implementation, when a first port in a link aggregation group of the switch and a port in a link aggregation group of the target server successfully communicate, it is determined that negotiation of the first port is successful; at least one port in the link aggregation group of the switch fails to negotiate, including: and determining that the negotiation of the second port fails when the communication between the second port in the link aggregation group of the switch and the port in the link aggregation group of the target server fails.
In one implementation, in a case that the negotiation of the port in the blocking state is successful, forwarding data traffic through the port in the blocking state, where the negotiation is successful.
In one implementation manner, before the switch is switched in communication connection with the target server, the control information corresponding to the target server, which is acquired by the switch, is deleted.
For specific execution steps, reference may be made to each step of the above method embodiment for communicating with the server, and the same technical effect may be achieved, and for avoiding repetition, details are not described here again.
It should be noted that the electronic device in the embodiment of the present application includes: a server, a terminal, or other device besides a terminal.
The above electronic device structure does not constitute a limitation of the electronic device, the electronic device may include more or less components than those shown in the drawings, or some components may be combined, or different component arrangements, for example, the input Unit may include a Graphics Processing Unit (GPU) and a microphone, and the display Unit may configure the display panel in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit includes at least one of a touch panel and other input devices. The touch panel is also referred to as a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
The memory may be used to store software programs as well as various data. The memory may mainly include a first storage area storing a program or an instruction and a second storage area storing data, wherein the first storage area may store an operating system, an application program or an instruction (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory may include volatile memory or nonvolatile memory, or the memory may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous Link DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM).
A processor may include one or more processing units; optionally, the processor integrates an application processor, which mainly handles operations related to the operating system, user interface, application programs, etc., and a modem processor, which mainly handles wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above method for communicating with a server, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a ROM, a RAM, a magnetic or optical disk, and the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for communicating with a server, applied to a switch, comprising:
under the condition that a target server does not finish the configuration of an operating system, a port of a switch is correspondingly connected with a port of the target server in a communication mode, wherein the port of the switch is at least one of a plurality of ports of a link aggregation group of the switch, and the ports of the switch are in one-to-one correspondence with the ports of the target server.
2. The method of claim 1, further comprising:
determining that the target server does not complete operating system configuration in a target case, wherein the target case comprises:
the condition that all ports in the link aggregation group of the switch do not receive the target protocol message sent by the target server; or
A condition that all ports in a link aggregation group of the switch are down;
the incomplete operating system configuration comprises:
no operating system is loaded; or
The operating system has been loaded but the configuration of the operating system has not been completed.
3. The method of claim 1, wherein after the corresponding communication connection with the port of the target server through the port of the switch, the method further comprises:
and under the condition that the target server loads an operating system and completes the configuration of the operating system, the link aggregation group of the switch is in communication connection with the link aggregation group of the target server.
4. The method of claim 3, wherein communicatively connecting with the link aggregation group of the target server through the link aggregation group of the switch comprises:
acquiring a negotiation result of the link aggregation group of the switch and the link aggregation group of the target server;
and under the condition that the negotiation result indicates that the negotiation of at least one port in the link aggregation group of the switch is successful, the link aggregation group of the switch is connected with the link aggregation group of the target server in a communication mode.
5. The method of claim 4, wherein after obtaining the negotiation result of the link aggregation group of the switch and the link aggregation group of the target server, the method further comprises:
and under the condition that the negotiation result indicates that at least one port in the link aggregation group of the switch fails in negotiation, receiving a target protocol message sent by the target server through a port in a blocking state in the link aggregation group of the switch, wherein the port in the blocking state is the port in the link aggregation group of the switch which fails in negotiation.
6. The method of claim 5, wherein negotiating successfully for at least one port in the link aggregation group of the switch comprises:
under the condition that the first port in the link aggregation group of the switch and the port in the link aggregation group of the target server are successfully communicated, determining that the first port is successfully negotiated;
at least one port in the link aggregation group of the switch fails to negotiate, including:
and determining that the negotiation of the second port fails when the communication between the second port in the link aggregation group of the switch and the port in the link aggregation group of the target server fails.
7. The method of claim 5, further comprising:
and under the condition that the negotiation of the port in the blocking state is successful, forwarding data traffic through the port in the blocking state which is successfully negotiated.
8. The method of claim 1, further comprising:
and deleting the control information corresponding to the target server acquired by the switch before the communication connection between the switch and the target server is converted.
9. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the method of communicating with a server according to any one of claims 1-8.
10. A readable storage medium, on which a program or instructions are stored, which when executed by a processor, carry out the steps of the method of communicating with a server according to any one of claims 1-8.
CN202211557888.XA 2022-12-06 2022-12-06 Method for communicating with server, electronic device and storage medium Pending CN115865654A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211557888.XA CN115865654A (en) 2022-12-06 2022-12-06 Method for communicating with server, electronic device and storage medium
PCT/CN2023/106269 WO2024119820A1 (en) 2022-12-06 2023-07-07 Method for communicating with server, and electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211557888.XA CN115865654A (en) 2022-12-06 2022-12-06 Method for communicating with server, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115865654A true CN115865654A (en) 2023-03-28

Family

ID=85670407

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211557888.XA Pending CN115865654A (en) 2022-12-06 2022-12-06 Method for communicating with server, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN115865654A (en)
WO (1) WO2024119820A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117812026A (en) * 2024-02-28 2024-04-02 苏州元脑智能科技有限公司 Aggregation link configuration method, device, system, switch equipment and storage medium
WO2024119820A1 (en) * 2022-12-06 2024-06-13 中兴通讯股份有限公司 Method for communicating with server, and electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401707A (en) * 2013-07-26 2013-11-20 杭州华三通信技术有限公司 Link aggregation method and access equipment
CN107547341A (en) * 2017-06-23 2018-01-05 新华三技术有限公司 Virtual extended LAN VXLAN cut-in method and device
CN107948063A (en) * 2017-12-07 2018-04-20 锐捷网络股份有限公司 A kind of method and access device for establishing aggregated links
EP3955530A1 (en) * 2020-08-11 2022-02-16 F5, Inc. Managing network ports in a virtualization environment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9998359B2 (en) * 2013-12-18 2018-06-12 Mellanox Technologies, Ltd. Simultaneous operation of remote management and link aggregation
CN109450788B (en) * 2018-10-31 2021-08-06 新华三云计算技术有限公司 Virtual server initialization method and device and electronic equipment
US11431652B2 (en) * 2020-07-10 2022-08-30 Dell Products L.P. Automated multi-fabric link aggregation system
CN115865654A (en) * 2022-12-06 2023-03-28 中兴通讯股份有限公司 Method for communicating with server, electronic device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401707A (en) * 2013-07-26 2013-11-20 杭州华三通信技术有限公司 Link aggregation method and access equipment
CN107547341A (en) * 2017-06-23 2018-01-05 新华三技术有限公司 Virtual extended LAN VXLAN cut-in method and device
CN107948063A (en) * 2017-12-07 2018-04-20 锐捷网络股份有限公司 A kind of method and access device for establishing aggregated links
EP3955530A1 (en) * 2020-08-11 2022-02-16 F5, Inc. Managing network ports in a virtualization environment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CASSIANO RISTA ET AL.: "Evalution, estimating, and improving network performance in container-based clouds", IEEE, 18 November 2018 (2018-11-18) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024119820A1 (en) * 2022-12-06 2024-06-13 中兴通讯股份有限公司 Method for communicating with server, and electronic device and storage medium
CN117812026A (en) * 2024-02-28 2024-04-02 苏州元脑智能科技有限公司 Aggregation link configuration method, device, system, switch equipment and storage medium
CN117812026B (en) * 2024-02-28 2024-04-30 苏州元脑智能科技有限公司 Aggregation link configuration method, device, system, switch equipment and storage medium

Also Published As

Publication number Publication date
WO2024119820A1 (en) 2024-06-13

Similar Documents

Publication Publication Date Title
CN115865654A (en) Method for communicating with server, electronic device and storage medium
CN110808857B (en) Network intercommunication method, device, equipment and storage medium for realizing Kubernetes cluster
US11403319B2 (en) High-availability network device database synchronization
CN103631652A (en) Method and system for achieving virtual machine migration
CN109067784A (en) The method and apparatus of anti-fraud in a kind of VXLAN
CN111030980A (en) Linux transparent network equipment platform implementation method, device and storage medium
CN110311861B (en) Method and device for guiding data flow
CN114025000B (en) Method, device, equipment and storage medium for establishing network access relationship
WO2022217786A1 (en) Cross-network communicaton method, apparatus, and system for multi-bus network, and storage medium
CN105959226A (en) Method and device for establishing forwarding table item
CN103401708B (en) A kind of port configuration method and device
CN105306228A (en) Virtual content sharing method
CN115174603B (en) NAS service system, implementation method, electronic equipment and storage medium
CN107528788A (en) Realize the method and apparatus stacked automatically between the network equipment
CN114157606B (en) Virtual network element device switching method, device and storage medium
CN114172841B (en) Message forwarding method and device, electronic equipment and read storage medium
EP4307631A1 (en) User access processing method and related device
CN113783768B (en) Group control method, group control device and communication system
CN110545240B (en) Method for establishing label forwarding table and forwarding message based on distributed aggregation system
JP4399014B2 (en) Telephone system and its terminal device
CN101005421A (en) Telnet control method for realizing multiple network system by single network port
CN109981365A (en) Data decryptor method, apparatus, user equipment and storage medium
EP2979428B1 (en) Efficient socket transfer
WO2024119915A1 (en) Data transmission method and system, electronic device, and storage medium
JP2009152965A (en) Electronic conference system, communication terminal, data communication method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination