CN112737945B - Server connection control method and device - Google Patents

Server connection control method and device Download PDF

Info

Publication number
CN112737945B
CN112737945B CN202011613583.7A CN202011613583A CN112737945B CN 112737945 B CN112737945 B CN 112737945B CN 202011613583 A CN202011613583 A CN 202011613583A CN 112737945 B CN112737945 B CN 112737945B
Authority
CN
China
Prior art keywords
server
physical port
message
aggregation link
static aggregation
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.)
Active
Application number
CN202011613583.7A
Other languages
Chinese (zh)
Other versions
CN112737945A (en
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.)
Hangzhou DPtech Information Technology Co Ltd
Original Assignee
Hangzhou DPtech Information Technology Co Ltd
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 Hangzhou DPtech Information Technology Co Ltd filed Critical Hangzhou DPtech Information Technology Co Ltd
Priority to CN202011613583.7A priority Critical patent/CN112737945B/en
Publication of CN112737945A publication Critical patent/CN112737945A/en
Application granted granted Critical
Publication of CN112737945B publication Critical patent/CN112737945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • 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
    • H04L45/245Link aggregation, e.g. trunking

Abstract

The present specification provides a server connection control method and apparatus, the method including: the method comprises the steps of detecting whether each server can normally respond or not by sending a detection message, determining a physical port connected with the server which cannot respond by searching ARP table entries under the condition that the server cannot normally respond, and eliminating the physical port connected with the server in a static aggregation link. Therefore, the exchanger only sends the message to the server through the static aggregation link, and the message can not be sent through the eliminated port, so that the server with the fault is shielded, and the probability of message packet loss is reduced.

Description

Server connection control method and device
Technical Field
The present disclosure relates to the field of computer application technologies, and in particular, to a server connection control method and apparatus.
Background
After receiving a message, the switch often needs to share load through an aggregation link, and distribute the received message to a plurality of servers with different service processing functions, so as to perform processing such as traffic analysis, behavior detection, attack protection and the like on the message.
In the process of processing the server, the server may lose packets due to excessive pressure or failure, or the efficiency of processing the packets may be low, that is, the server may not respond normally. In order to reduce the packet loss probability, the switch needs to dynamically adjust the connection between the switch and different servers, and shield the server with the current fault or high pressure, so that the message processing is not affected by the server with the fault. In the related art, there is no effective method for shielding a failed server.
Disclosure of Invention
In order to overcome the problem that a failed server cannot be effectively shielded in the related art, the specification provides a server connection control method and device.
According to a first aspect of embodiments of the present specification, a server connection control method is provided, where a message forwarding device is applied, the message forwarding device is configured with a static aggregation link, each physical port of the static aggregation link is connected to a server, servers connected to different physical ports are different, and the message forwarding device sends a message to be processed to a server cluster through the static aggregation link; adding variables for recording physical ports in a message structure body and an Address Resolution Protocol (ARP) table item structure body of the message forwarding equipment in advance so as to record the corresponding relation between the Internet Protocol (IP) address of the server and the physical ports in the ARP table item; the method comprises the following steps:
under the appointed condition, sending a detection message to each server, wherein the detection message is used for detecting whether the server can normally respond to a message to be processed sent by the switch;
in the case that the server incapable of normally responding is determined to exist, the following steps are executed for each server incapable of normally responding:
searching a physical port corresponding to the server through the IP address and the ARP table entry of the server;
and deleting the physical port from the static aggregation link under the condition that the physical port corresponding to the server is determined to be the physical port of the static aggregation link.
According to a second aspect of the embodiments of the present specification, a server connection control apparatus is provided, where a message forwarding device is applied, where the message forwarding device is configured with a static aggregation link, each physical port of the static aggregation link is connected to a server, servers connected to different physical ports are different, and the message forwarding device sends a message to be processed to a server cluster through the static aggregation link; adding variables for recording physical ports in a message structure body and an Address Resolution Protocol (ARP) table item structure body of the message forwarding equipment in advance so as to record the corresponding relation between the Internet Protocol (IP) address of the server and the physical ports in the ARP table item; the device comprises:
the server detection unit is used for sending a detection message to each server under the specified condition, wherein the detection message is used for detecting whether the server can normally respond to a message to be processed sent by the switch;
a physical port deleting unit, configured to, when it is determined that there is a server that cannot normally respond, execute the following steps for each server that cannot normally respond: searching a physical port corresponding to the server through the IP address and the ARP table entry of the server; and deleting the physical port from the static aggregation link under the condition that the physical port corresponding to the server is determined to be the physical port of the static aggregation link.
According to a third aspect of embodiments herein, there is provided a computer apparatus comprising:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the server connection control method according to the first aspect of the embodiments of the present specification.
According to a fourth aspect of embodiments of the present specification, there is provided a computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the server connection control method according to the first aspect of the embodiments of the present specification.
In one or more embodiments of the present description, it is detected whether each server can respond normally by sending a detection message, and when the server cannot respond normally, a physical port connected to the server that cannot respond is determined by searching for an ARP entry, and the physical port connected to the server is removed in a static aggregation link. Therefore, the switch only sends the message to the server through the static aggregation link, and the message cannot be sent through the eliminated port, so that the server with the fault is shielded, and the probability of packet loss of the message is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
Fig. 1 is a schematic diagram of networking of a server and a switch connection in accordance with a related art shown in the present specification.
Fig. 2 is a schematic diagram illustrating networking of a server and a switch connection in a server connection control method according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating a server connection control method according to an exemplary embodiment of the present disclosure.
Fig. 4 is a flow chart illustrating another server connection control method according to an example embodiment of the present disclosure.
Fig. 5 is a block diagram of a server connection control device shown in the present specification according to an exemplary embodiment.
Fig. 6 is a hardware configuration diagram of a computer device in which a server connection control apparatus according to an embodiment of the present disclosure is located.
Detailed Description
After receiving the message to be processed, the switch needs to forward the message to different service processing servers to perform different processing, and if a server with higher processing pressure exists in the servers or a link connected to the server fails, the server may fail to respond to the message sent to the server normally, which may cause situations such as packet loss and processing efficiency reduction. The service processing server may be different attack protection servers, different message auditing servers, or different message processing servers. In order to avoid the occurrence of packet loss, the switch needs to temporarily shield the server that cannot respond normally, in other words, the switch will not distribute the packet to the server until the connection with the server returns to normal, or the server returns to normal.
In the related art, in order to dynamically adjust the connection with the server, the switch shields the server that cannot normally respond, as shown in fig. 1, the switch is connected with the server in a dynamic aggregation link manner, and the dynamic aggregation link is used as a port for the switch to send a message. The dynamic Aggregation Link is a Link Aggregation Control Protocol (LACP) that automatically adjusts an active state (active or inactive) of a port of the dynamic Aggregation Link according to a current port state, so that a message can be transmitted through the active port; in other words, active ports in the dynamic aggregation link are all ports capable of normally transmitting messages, ports incapable of normally transmitting messages are set as the active ports, and the active ports are not used as ports for transmitting messages.
However, in the process of negotiating active ports, the devices at the two ends of the dynamic aggregation link need to determine that the ports of the two ends participating in the aggregation link are the same, so that the limitation is that the devices at the two ends of the dynamic aggregation link are only one, that is, the switch dynamically adjusts the connection between the switch and the server through the dynamic aggregation link, and the limitation is that the switch can only connect to one server.
The switch is connected with a server through a dynamic aggregation link, and sends a received message to be processed to the server, so that the server performs a service processing process on the message, which is often: different resources are distributed to different service processing modules of the server, and the different resources of the server execute the different service processing modules; the server distributes the message to different service processing modules according to different physical interfaces for receiving the message; under the condition that a certain service processing module cannot normally respond to a message to be processed, the dynamic aggregation link sets a physical port corresponding to the module as an inactive port, so that a new message is not distributed to the service processing module any more, and the message packet loss caused by the fact that the module cannot process the message sent to the module is prevented.
However, to implement this solution, there are more restrictions on a server connected to the switch: first, in order to enable the server to be connected to the switch through the dynamic aggregation link, the server is required to support LACP, and the server often does not support LACP. Secondly, a general server cannot process a plurality of messages, in order to enable the server to process different message services, the server capable of processing different message services is often required to be customized, the general processing effect of the customized server is not as good as that of a server specially used for processing a certain service, and the cost of the customized server is higher than that of a plurality of independent service processing servers. In addition, only one server processes all messages, which requires higher performance of the server, and the cost for increasing the performance of one server is higher than the cost for purchasing a plurality of servers with general performance.
In order to solve the above problem, in the present application, a networking structure as shown in fig. 2 is formed, where a static aggregation link is used as a port for sending a packet, each physical port of the static aggregation link is connected to an independent server, the server has a specific service processing function, the service processing functions of different servers are different, and the servers connected to the static aggregation link belong to the same server cluster. The switch deletes the port from the static aggregation link by detecting whether each server of the server cluster can normally respond to the sent message or not under the condition that the server cluster cannot normally respond to the sent message, so as to shield the server which cannot normally respond to the port. Therefore, the exchanger only sends the message to the server through the static aggregation link, and the message can not be sent through the deleted physical port, so that the server which can not respond normally is shielded, and the probability of packet loss of the message is reduced. One server is connected with the switch only through one port, the server does not need to be configured with an aggregation link, and a server supporting the LACP does not need to be purchased; the server does not need to be customized, and the server with stronger performance does not need to be purchased, so that the cost is reduced.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The following provides a detailed description of examples of the present specification.
A first aspect of the present specification discloses a server connection control method, which applies a message forwarding device, where the message forwarding device is configured with a static aggregation link, each physical port of the static aggregation link is connected to a server, servers connected to different physical ports are different, and the message forwarding device sends a message to be processed to a server cluster through the static aggregation link; in the message structure and the ARP table structure of the message forwarding equipment, a variable for recording a physical port is added in advance, so that the corresponding relation between the IP address of the server Internet interconnection protocol and the physical port is recorded in the ARP table.
The message forwarding device may be a switch. The static aggregation link may be a static aggregation link based on an LACP protocol, or may be a manual aggregation link, and when the static aggregation link is a static aggregation link based on an LACP protocol, the switch is required to support the LACP protocol. Each physical port of the message forwarding equipment is connected with a server, static aggregation does not need to be configured on the server, and the server does not need to support an LACP (local area network access control protocol). After receiving the message to be processed, the message forwarding device needs to forward the message to a server through an aggregation link, so that the server can process the message. The switch determines a physical port of the aggregation link through load sharing of the aggregation link, and the physical port is used as an outlet of the message. The message forwarding equipment sends a message to be processed to the server cluster through the static aggregation link, and after one physical port is deleted from the aggregation link, the message forwarding equipment does not forward the message through the port any more.
In order to limit the broadcast range, a server connected to a switch needs to be added to the same virtual local area network (vlan), a vlan-if three-layer port IP address needs to be configured for a static aggregation link, and the IP address of the server needs to be satisfied, and the IP address of the vlan-if three-layer port are in the same network segment, so that communication is normal.
In order to know which physical port needs to be deleted when deleting the physical port of the static aggregation link, the physical port in charge of managing the static aggregation group is not authorized to read the connection corresponding relationship between the local IP address and the physical port, so the physical port corresponding to the server and the server IP address needs to be recorded in the ARP entry, so that the physical port connected with the server IP address and incapable of normally responding can be searched. Specifically, by using the static aggregation link alone, it is not known which server cannot respond normally, and therefore, on the basis of the static aggregation link, it is necessary to detect whether the server can respond normally, so that when the server does not respond, the physical port to which the server is connected can be deleted from the aggregation link. The detected detection result is generally hooked with the IP address of the server, the physical port in the static aggregation link cannot be dynamically adjusted only by knowing the IP address, and in order to know the physical port corresponding to the IP address, that is, the physical port connected to the server of the IP address, the physical port corresponding to each server may be selected to be recorded in the ARP entry, so as to conveniently search the ARP entry corresponding to the IP address through the IP address of the server, and to search a specific physical port in the ARP entry.
The ARP list item is obtained by the message forwarding equipment through the ARP reply message of the server in the ARP learning process. Specifically, when a message forwarding device needs to send a message, it needs to search a route first to find an MAC address corresponding to a destination IP address of the message, and when the MAC address is not found, it needs to start ARP learning, that is, the message forwarding device sends a broadcast, a corresponding server responds to the broadcast, sends an ARP reply message carrying the MAC address corresponding to the IP address in the broadcast, maintains a process of an ARP entry, and generates an ARP entry according to the ARP reply message. The ARP list item is not generated according to the original ARP response message, but is generated according to the ARP response message processed by the protocol stack. After receiving the message, the protocol stack of the kernel records information of the message according to the variable in the message structure, and records the physical port, which enters the switch and is originally carried in the message, as port information of the aggregation link, so that the variable needs to be added in the message structure, so that the physical port, into which the message enters, is recorded in the message processed by the protocol stack, and thus, the process of maintaining the ARP entry can be realized, and the physical port connected with the server can be obtained according to the message processed by the protocol stack.
The message structure may be struct sk _ buff, the ARP entry is represented by an ARP structure, and the ARP structure may be struct neighbor bour. The physical port may be represented by an identification of the physical port.
As shown in fig. 3, fig. 3 is a flowchart of a server connection control method according to an exemplary embodiment, and includes the following steps:
step 302, under the specified condition, sending a detection message to each server, where the detection message is used to detect whether the server can normally respond to the message to be processed sent by the switch.
Wherein the specified condition is the condition of reaching the specified period. Or sending the detection message under the condition of user triggering. In addition, the detection message is a ping packet, that is, the IP address of the server needs to be detected in a health detection mode of sending the ping packet. When the detection message is a ping packet, a health detection group needs to be configured in the local computer, and under the specified condition, the ping packet is sent to all servers. The Detection packet may also be a Bidirectional Forwarding protocol (BFD) packet.
In addition, the message forwarding equipment sends the detection message to the server to detect whether the server can normally respond, and each server can also be set to send the message to the message forwarding equipment at regular time, wherein the message represents the response condition of the server. When the preset period is reached, the message forwarding equipment does not receive the message, or the received message represents that the server cannot normally respond, and the server is determined to be incapable of normally responding.
After the message forwarding device is started, when the message is not forwarded yet, the static aggregation link includes all servers, the message forwarding device needs to send a detection message to each server connected to each physical port in the static aggregation link first, and the sending of the detection message needs to differentiate a route first, so as to perform ARP learning, that is, broadcast to the servers in the virtual local area network, so as to obtain the required MAC address.
Step 304, when it is determined that there are servers that cannot respond normally, for each server that cannot respond normally, executing the following steps: searching a physical port corresponding to the server through the IP address and the ARP table entry of the server; and deleting the physical port from the static aggregation link under the condition that the physical port corresponding to the server is determined to be the physical port of the static aggregation link.
Wherein the determining that there is a server that cannot respond normally includes: within a specified time, the reply message of the server is not received; or, the server cannot respond normally according to the representation of the state parameters carried by the message replied by the server. In the case that the detection message is a BFD message, whether the server responds normally can be determined according to whether a reply message is received within a prescribed time. And performing health detection through the ping packet, wherein the detection result comprises network accessibility, packet loss rate and delay time, and under the condition that the detection message is the ping packet, whether the server normally responds can be represented according to whether the detection result exceeds a preset threshold value, so that whether the server normally responds is judged.
Searching a physical port corresponding to the IP address of the server through the IP address and the physical port recorded in the message structure, specifically including: and searching an ARP table entry corresponding to the IP address of the server, and searching a physical port corresponding to the server from the ARP table entry.
After a physical port is deleted from a static aggregation link, an ARP entry corresponding to the physical port should also be deleted, so as to save space.
In this specification, the reason why the physical port is selected to be deleted from the static aggregation link rather than the port state in the static aggregation link is that if the adjustment state is selected, after the adjustment state is adjusted, the message cannot be forwarded through the shielded physical port, the detection message cannot be sent to the server to which the physical port is connected, and the switch cannot know whether the server is normal or not, and then the server shielded once cannot be reused before the device is powered off, so the physical port is selected to be deleted from the static aggregation link. After the physical port is deleted from the static aggregation link, in order to send a detection packet to the server through the physical port, it is necessary to set the vlan attribute of the physical port to be the same as the vlan attribute of the static aggregation link.
In order to resend the message to be processed to the server which returns to normal after the server returns to normal, the method further comprises the following steps: for each server capable of responding normally, executing the following steps: and searching a physical port corresponding to the server through the IP address and the ARP table entry of the server, and adding the physical port to the static aggregation link under the condition that the physical port corresponding to the server is determined not to be the physical port of the static aggregation link.
In addition, in the process of adding a physical port to the static aggregation link, there is an election process of the physical port, which involves an up or down event of the physical port, and at this time, it is necessary to temporarily mask processing for a server that cannot respond, so as to avoid deleting a server that can normally respond from the static aggregation link. That is, in the process of adding the physical port to the static aggregation link, the processing for the server that cannot respond normally is stopped. Wherein, the processing for the unresponsive server may be set to stop within 3 seconds.
In addition, in order to prevent all the physical ports in the static aggregation link from being deleted so that a message to be processed cannot be sent to the server, and in order to prevent a situation that only one physical port in the static aggregation link causes the static aggregation link to be deleted, in a case that only two ports remain in the static aggregation link, processing for the server which cannot normally respond should be temporarily stopped.
As shown in fig. 4, fig. 4 is a flowchart illustrating another server connection control method in the present application, where the method is applied to a packet forwarding device, and for a health detection notification, the method includes the following steps:
at step 401, a health detection notifies an event. When a health detection notification event is received, the following steps are performed. The health detection notification event may be a condition that the message forwarding device sends a ping packet to the server and receives a ping packet responded by the server.
Step 402, acquiring an IP address carried in the health detection notification event and a state of the IP address. The status of the IP address may be that the server of the IP address can respond normally, or that the server of the IP address cannot respond normally.
Step 403, searching the ARP entry, and obtaining the physical port corresponding to the IP address. According to the method described above, it is necessary to add a variable for recording a physical port in the ARP table entry structure and the packet structure in advance.
Step 404, determining whether the state of the IP address responds normally, if the server of the IP address can respond normally, skipping to 4052 only, if the server of the IP address cannot respond normally, skipping to 4051.
Step 4051, determine whether the physical port belongs to the static aggregation link, if the physical port belongs to the static aggregation link, go to step 4061, and if the physical port does not belong to the static aggregation link, go to step 408.
Step 4061 removes the physical port from the static aggregated link.
Step 4071 sets the vlan attribute of the deleted physical port.
Step 4052, determine whether the physical port belongs to the static aggregation link, and jump to step 408 if the physical port belongs to the static aggregation link, or jump to step 4062 if the physical port does not belong to the static aggregation link.
Step 4062, add the physical port to the static aggregated link.
Step 4072 temporarily stops processing of the health detection notification event.
At step 408, processing of health detection notification events is completed.
Corresponding to the embodiments of the method, the present specification also provides embodiments of the device and the applied equipment.
As shown in fig. 5, fig. 5 is a block diagram of a server connection control apparatus shown in this specification according to an exemplary embodiment, where a message forwarding device is applied, where the message forwarding device is configured with a static aggregation link, each physical port of the static aggregation link is connected to one server, servers connected to different physical ports are different, and the message forwarding device sends a message to be processed to a server cluster through the static aggregation link; adding variables for recording physical ports in a message structure body and an Address Resolution Protocol (ARP) table item structure body of the message forwarding equipment in advance so as to record the corresponding relation between the Internet Protocol (IP) address of the server and the physical ports in the ARP table item; the device comprises:
the server detection unit 510 is configured to send a detection packet to each server in a specified situation, where the detection packet is used to detect whether the server can normally respond to a to-be-processed packet sent by the switch.
A physical port deleting unit 520, configured to, when it is determined that there is a server that cannot normally respond, execute the following steps for each server that cannot normally respond: searching a physical port corresponding to the server through the IP address and the ARP table entry of the server; and deleting the physical port from the static aggregation link under the condition that the physical port corresponding to the server is determined to be the physical port of the static aggregation link.
Furthermore, the apparatus further comprises: a physical port adding unit 530, configured to perform the following steps for each server capable of responding normally: and searching a physical port corresponding to the server through the IP address and the ARP table entry of the server, and adding the physical port to the static aggregation link under the condition that the physical port corresponding to the server is determined not to be the physical port of the static aggregation link.
A processing stopping unit 540, configured to stop processing for a server that cannot respond normally in a process of adding the physical port to the static aggregation link.
Wherein the specified condition in the server detection unit may be a condition that a specified period is reached. The detection message may be a ping packet. In the physical port deletion unit, determining that there is a server that cannot respond normally includes: within a specified time, the reply message of the server is not received; or the server can not respond normally due to the representation of the state parameters carried by the message replied by the server.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the elements can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
As shown in fig. 6, fig. 6 is a hardware structure diagram of a computer device in which an apparatus for issuing an aggregated link configuration to a switch chip according to an embodiment is located, where the device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static Memory device, a dynamic Memory device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
The bus 1050 includes a path to transfer information between various components of the device, such as the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the aforementioned server connection control method.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (9)

1. A server connection control method is characterized in that a message forwarding device is applied, the message forwarding device is configured with a static aggregation link, each physical port of the static aggregation link is connected to a server, the servers connected with different physical ports are different, and the message forwarding device sends a message to be processed to a server cluster through the static aggregation link; adding a variable for recording a physical port in a message structure body and an Address Resolution Protocol (ARP) table item structure body of the message forwarding equipment in advance so as to record the corresponding relation between an Internet Protocol (IP) address of a server and the physical port in the ARP table item; the method comprises the following steps:
under the appointed condition, sending a detection message to each server, wherein the detection message is used for detecting whether an IP address corresponding to the server can normally respond to a message to be processed sent by the switch or not; the detection message is a ping packet;
in the case that the server incapable of normally responding is determined to exist, the following steps are executed for each server incapable of normally responding:
searching a physical port corresponding to the server through the IP address and the ARP table entry of the server;
and deleting the physical port from the static aggregation link under the condition that the physical port corresponding to the server is determined to be the physical port of the static aggregation link.
2. The method of claim 1, wherein the specified condition is a condition of reaching a specified period.
3. The method of claim 1, wherein the determining that there is a server that cannot respond properly comprises:
within a specified time, the reply message of the server is not received;
or the like, or, alternatively,
and the server can not respond normally due to the representation of the state parameters carried by the message replied by the server.
4. The method of claim 1, wherein the method further comprises:
for each server capable of responding normally, executing the following steps:
and searching a physical port corresponding to the server through the IP address and the ARP table entry of the server, and adding the physical port to the static aggregation link under the condition that the physical port corresponding to the server is determined not to be the physical port of the static aggregation link.
5. The method of claim 4, wherein the method further comprises:
and stopping the processing of the server which cannot normally respond in the process of adding the physical port to the static aggregation link.
6. A server connection control device is characterized in that a message forwarding device is applied, the message forwarding device is configured with a static aggregation link, each physical port of the static aggregation link is connected to a server, the servers connected with different physical ports are different, and the message forwarding device sends a message to be processed to a server cluster through the static aggregation link; adding variables for recording physical ports in a message structure body and an Address Resolution Protocol (ARP) table item structure body of the message forwarding equipment in advance so as to record the corresponding relation between the Internet Protocol (IP) address of the server and the physical ports in the ARP table item; the device comprises:
the server detection unit is used for sending a detection message to each server under the specified condition, wherein the detection message is used for detecting whether the IP address corresponding to the server can normally respond to the message to be processed sent by the switch or not; the detection message is a ping packet;
a physical port deleting unit, configured to, when it is determined that there is a server that cannot normally respond, execute the following steps for each server that cannot normally respond: searching a physical port corresponding to the server through the IP address and the ARP table entry of the server; and deleting the physical port from the static aggregation link under the condition that the physical port corresponding to the server is determined to be the physical port of the static aggregation link.
7. The apparatus of claim 6, wherein the apparatus further comprises:
a physical port adding unit, configured to execute the following steps for each server capable of responding normally: searching a physical port corresponding to the server through the IP address and the ARP table entry of the server, and adding the physical port to the static aggregation link under the condition that the physical port corresponding to the server is determined not to be the physical port of the static aggregation link;
and the processing stopping unit is used for stopping the processing of the server which cannot normally respond in the process of adding the physical port into the static aggregation link.
8. A computer-readable storage medium on which a computer program is stored, which program, when executed by a processor, implements the server connection control method according to any one of claims 1 to 5.
9. A computer device, characterized in that the computer device comprises:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the server connection control method of any one of claims 1 to 5.
CN202011613583.7A 2020-12-30 2020-12-30 Server connection control method and device Active CN112737945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011613583.7A CN112737945B (en) 2020-12-30 2020-12-30 Server connection control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011613583.7A CN112737945B (en) 2020-12-30 2020-12-30 Server connection control method and device

Publications (2)

Publication Number Publication Date
CN112737945A CN112737945A (en) 2021-04-30
CN112737945B true CN112737945B (en) 2022-09-30

Family

ID=75611217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011613583.7A Active CN112737945B (en) 2020-12-30 2020-12-30 Server connection control method and device

Country Status (1)

Country Link
CN (1) CN112737945B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472698A (en) * 2021-06-18 2021-10-01 新华三信息安全技术有限公司 Switching equipment and message forwarding method thereof
CN114866456A (en) * 2022-04-22 2022-08-05 新华三工业互联网有限公司 Message sending method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227402A (en) * 2008-02-20 2008-07-23 杭州华三通信技术有限公司 Method and apparatus for sharing polymerization link circuit flow
CN108337159A (en) * 2018-01-31 2018-07-27 新华三技术有限公司 port operation control method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2217275C (en) * 1997-10-03 2005-08-16 Newbridge Networks Corporation Multiple internetworking realms within an internetworking device
US20040225725A1 (en) * 2003-02-19 2004-11-11 Nec Corporation Network system, learning bridge node, learning method and its program
CA2549285C (en) * 2006-05-26 2017-01-31 Bce Inc Method, system and apparatus for verifying validity of location information in a packet-switched network
CN101018205A (en) * 2007-02-14 2007-08-15 杭州华为三康技术有限公司 A traffic control method and communication device
CN101483593B (en) * 2009-02-13 2011-10-26 中兴通讯股份有限公司 Method and apparatus for distributing cache based on aggregated links in switch device
US9009259B2 (en) * 2012-05-02 2015-04-14 Guest Tek Interactive Entertainment Ltd. Automatic client device location detection within hospitality establishment
CN111131024A (en) * 2019-12-09 2020-05-08 盛科网络(苏州)有限公司 Processing method and device of aggregated link

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227402A (en) * 2008-02-20 2008-07-23 杭州华三通信技术有限公司 Method and apparatus for sharing polymerization link circuit flow
CN108337159A (en) * 2018-01-31 2018-07-27 新华三技术有限公司 port operation control method and device

Also Published As

Publication number Publication date
CN112737945A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
US11509534B2 (en) Collection of error packet information for network policy enforcement
CN112737945B (en) Server connection control method and device
US9237460B2 (en) Traffic control method and device
CN108924274B (en) Domain name system DNS processing method and device, storage medium and electronic equipment
KR20180088577A (en) Method, apparatus, and system for discovering application topology relationship
CN110442610A (en) The method, apparatus of load balancing calculates equipment and medium
CN109542659A (en) Using more activating methods, equipment, data center's cluster and readable storage medium storing program for executing
CN109982034A (en) Access request processing method and processing device in video monitoring system
CN113067875A (en) Access method, device and equipment based on dynamic flow control of micro-service gateway
CN111258851A (en) Cluster alarm method, device, setting and storage medium
US9654491B2 (en) Network filtering apparatus and filtering method
US10277484B2 (en) Self organizing network event reporting
CN110519109B (en) Method, device, computing equipment and medium for detecting node association
CN112532714A (en) Data processing method, processing device, server and storage medium
CN108235800A (en) A kind of network failure probing method and control centre's equipment
CN112769849B (en) Method, system, equipment and storage medium for virus diagnosis and blocking
CN113179295B (en) Message processing method and device
US11638134B2 (en) Methods, systems, and computer readable media for resource cleanup in communications networks
CN109450794B (en) Communication method and device based on SDN network
CN114356593A (en) Data processing method, device, network equipment and medium
CN111130941B (en) Network error detection method and device and computer readable storage medium
CN110912760A (en) Link state detection method and device
CN113992566B (en) Message broadcasting method and device
CN109905320B (en) Message distribution method and device for aggregation port
CN110912997B (en) Method and device for checking Loopback interface of triangular networking

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
GR01 Patent grant
GR01 Patent grant