Method, device, equipment and storage medium for collaborative aggregation of ports

文档序号:750549 发布日期:2021-04-02 浏览:15次 中文

阅读说明:本技术 一种端口的协同聚合方法、装置、设备及存储介质 (Method, device, equipment and storage medium for collaborative aggregation of ports ) 是由 王小军 张因豪 程强 于 2020-11-25 设计创作,主要内容包括:本发明公开了一种端口的协同聚合方法、装置、设备及存储介质,包括:当检测到源端口或者对端交换设备中的对端端口满足端口重聚合条件时,构造指向对端交换设备中的对端端口的至少一项协同交互信息;其中,源端口与对端端口重聚合后,形成源交换设备和对端交换设备间的一条传输链路;通过各协同交互信息与对端端口进行至少一次信息交互,并根据信息交互结果,控制源端口与对端端口进行协同的重聚合配置。本发明实施例的技术方案可以保证两端交换设备对聚合口的配置同时进行,避免交换设备之间的传输链路出现错误,减少了数据的丢包率。(The invention discloses a method, a device, equipment and a storage medium for collaborative aggregation of ports, wherein the method comprises the following steps: when detecting that a source port or an opposite end port in opposite end switching equipment meets a port re-aggregation condition, constructing at least one item of cooperative interaction information pointing to the opposite end port in the opposite end switching equipment; after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed; and performing at least one information interaction with the opposite terminal port through each cooperative interaction information, and controlling the source terminal and the opposite terminal port to perform cooperative re-aggregation configuration according to the information interaction result. The technical scheme of the embodiment of the invention can ensure that the switching equipment at two ends simultaneously configures the aggregation port, avoid transmission link errors between the switching equipment and reduce the packet loss rate of data.)

1. A cooperative port aggregation method is applied to a source switching device, and includes:

when detecting that a source port or an opposite end port in opposite end switching equipment meets a port re-aggregation condition, constructing at least one item of cooperative interaction information pointing to the opposite end port in the opposite end switching equipment;

after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed;

and performing at least one information interaction with the opposite terminal port through each piece of collaborative interaction information, and controlling the source terminal port and the opposite terminal port to perform collaborative re-aggregation configuration according to an information interaction result.

2. The method of claim 1, wherein performing at least one information interaction with the peer port through each piece of cooperative interaction information, and controlling the source port and the peer port to perform cooperative re-aggregation configuration according to an information interaction result comprises:

sending first notification information to the opposite terminal port;

when first confirmation information aiming at the opposite terminal port is received, second confirmation information is sent to the opposite terminal port, and the source terminal port is subjected to re-aggregation configuration;

wherein the second acknowledgement information is used to instruct the peer switching device to perform collaborative re-aggregation configuration on the peer port.

3. The method of claim 2, wherein detecting that the source port or a peer port in the peer switching device satisfies the port re-aggregation condition comprises:

when detecting that the source port or the opposite port has an event of switching from closed to open, determining that the source port or the opposite port meets a port re-aggregation condition;

and/or

Performing a re-aggregation configuration on the source port, including:

and aggregating the source port and the current aggregation port corresponding to the source switching equipment.

4. The method of claim 2, wherein re-aggregating the configuration of the source port comprises:

identifying port information and a preset first configuration waiting duration included in the first confirmation information;

taking the current moment as a time starting point, and after waiting for the first configuration duration, performing re-aggregation configuration on the source port according to the port information;

the second confirmation information comprises a second configuration waiting time length, and the second configuration time length is matched with the first configuration time length.

5. A method for collaborative aggregation of ports is applied to an opposite-end switching device, and comprises the following steps:

receiving at least one item of cooperative interaction information sent by source switching equipment through an opposite end port in opposite end switching equipment, wherein the cooperative interaction information is sent when the source switching equipment detects that a source port or the opposite end port in the opposite end switching equipment meets a port re-aggregation condition;

after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed;

and performing at least one information interaction with the source port according to each piece of collaborative interaction information, and controlling the opposite port and the source port to perform collaborative re-aggregation configuration according to an information interaction result.

6. The method of claim 5, wherein performing at least one information interaction with the source port according to each piece of cooperative interaction information, and controlling the peer port and the source port to perform cooperative re-aggregation configuration according to an information interaction result comprises:

receiving a first notification message sent by the source port;

sending a first acknowledgement message for the source port, where the first acknowledgement message is used to instruct the source switching device to perform collaborative re-aggregation configuration on the source port;

and when second confirmation information sent by the source port is received, performing the re-aggregation configuration on the opposite port.

7. The method of claim 6, further comprising, while sending the first acknowledgement message for the target to the source port:

and sending a second notification message to the source port, where the second notification message is used to confirm that the peer switching device starts to perform preparation for performing the re-aggregation configuration on the peer port.

8. A coordinated aggregation device of ports is applied to a source switching device, and the device comprises:

a collaborative interaction information construction module, configured to construct at least one item of collaborative interaction information pointing to an opposite end port in an opposite end switching device when detecting that a source port or the opposite end port in the opposite end switching device satisfies a port re-aggregation condition;

after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed;

and the information interaction module is used for performing at least one time of information interaction with the opposite terminal port through each piece of collaborative interaction information and controlling the source terminal port and the opposite terminal port to perform collaborative re-aggregation configuration according to an information interaction result.

9. A computer device, comprising:

one or more processors;

storage means for storing one or more programs;

the method of cooperative aggregation of ports of any of claims 1-7 when executed by the one or more programs such that the one or more processors execute the programs.

10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method for collaborative aggregation of ports according to any one of claims 1 to 7.

Technical Field

The present invention relates to ethernet communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for collaborative aggregation of ports.

Background

Port aggregation provides a port binding technique for a switching device, i.e., a plurality of physical ports are virtualized into one port, which is also called an aggregation port. The aggregation port has the functions of improving the bandwidth, sharing the load, increasing the redundant link and the like.

Two switching devices can communicate through their respective deployed aggregation ports, and when an aggregation member port on one switching device is closed (i.e., a DOWN event occurs), the aggregation member port needs to be controlled to move out of the aggregation port on the switching device, and an opposite port corresponding to the aggregation member port is controlled to move out of the aggregation port on the other switching device; when the aggregation member port on the switching device at one end returns to normal and can receive a matched physical signal (i.e., an UP event occurs), the aggregation member port needs to be added to the aggregation port on the switching device, and the opposite end port corresponding to the aggregation member port needs to be added to the aggregation port on the switching device at the other end.

However, when a UP event occurs in a certain aggregation member port, switching devices at two ends may detect that the times of the UP event occurring in the port are not consistent, so that the switching devices at two ends cannot configure the aggregation port at the same time, and thus, a port at one end is in an aggregation state, and a port corresponding to the other end is in a non-aggregation state, which causes a connection error in a link where the port is located, and a data packet is lost.

Disclosure of Invention

Embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for collaborative aggregation of ports, which can ensure that switching devices at two ends configure an aggregation port simultaneously, and reduce a packet loss rate of data.

In a first aspect, an embodiment of the present invention provides a method for collaborative aggregation of ports, where the method is applied to a source switch device, and the method includes:

when detecting that a source port or an opposite end port in opposite end switching equipment meets a port re-aggregation condition, constructing at least one item of cooperative interaction information pointing to the opposite end port in the opposite end switching equipment;

after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed;

and performing at least one information interaction with the opposite terminal port through each piece of collaborative interaction information, and controlling the source terminal port and the opposite terminal port to perform collaborative re-aggregation configuration according to an information interaction result.

In a second aspect, an embodiment of the present invention further provides a method for collaborative aggregation of ports, where the method is applied to an opposite-end switching device, and the method includes:

receiving at least one item of cooperative interaction information sent by source switching equipment through an opposite end port in opposite end switching equipment, wherein the cooperative interaction information is sent when the source switching equipment detects that a source port or the opposite end port in the opposite end switching equipment meets a port re-aggregation condition;

after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed;

and performing at least one information interaction with the source port according to each piece of collaborative interaction information, and controlling the opposite port and the source port to perform collaborative re-aggregation configuration according to an information interaction result.

In a third aspect, an embodiment of the present invention further provides a device for collaborative aggregation of ports, where the device includes:

a collaborative interaction information construction module, configured to construct at least one item of collaborative interaction information pointing to an opposite end port in an opposite end switching device when detecting that a source port or the opposite end port in the opposite end switching device satisfies a port re-aggregation condition;

after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed;

and the information interaction module is used for performing at least one time of information interaction with the opposite terminal port through each piece of collaborative interaction information and controlling the source terminal port and the opposite terminal port to perform collaborative re-aggregation configuration according to an information interaction result.

In a fourth aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:

one or more processors;

storage means 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 implement a method for collaborative aggregation of ports according to any embodiment of the present invention.

In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the computer program implements a method for collaborative aggregation of ports according to any embodiment of the present invention.

The technical scheme of the embodiment of the invention constructs the cooperative interaction information pointing to the opposite terminal port by detecting whether the source port or the opposite terminal port meets the port re-aggregation condition or not, performs at least one time of information interaction with the opposite terminal port through each cooperative interaction information and controls the source port and the opposite terminal port to perform cooperative re-aggregation configuration according to the information interaction result. The technical scheme of the embodiment of the invention can ensure that the switching equipment at two ends simultaneously configures the aggregation port, avoid transmission link errors between the switching equipment and reduce the packet loss rate of data.

Drawings

Fig. 1a is a flowchart of a cooperative aggregation method for ports according to a first embodiment of the present invention;

fig. 1b is a schematic diagram of a switching device in the first embodiment of the present invention;

fig. 1c is a schematic diagram of a switching device in the first embodiment of the present invention;

fig. 1d is a schematic diagram of a switching device in the first embodiment of the present invention;

fig. 2 is a flowchart of a cooperative aggregation method for ports according to a second embodiment of the present invention;

fig. 3 is a flowchart of a cooperative aggregation method for ports in a third embodiment of the present invention;

fig. 4 is a flowchart of a cooperative aggregation method of ports in the fourth embodiment of the present invention;

fig. 5a is a flowchart of a cooperative aggregation method for ports in the fifth embodiment of the present invention;

fig. 5b is a schematic diagram of information interaction between a source switching device and an opposite-end switching device in the fifth embodiment of the present invention;

fig. 5c is a schematic diagram of information interaction between another source switching device and an opposite-end switching device in the fifth embodiment of the present invention;

fig. 5d is a schematic diagram of information interaction between another source switching device and an opposite-end switching device in the fifth embodiment of the present invention;

fig. 6 is a structural diagram of a cooperative aggregation apparatus of a port according to a sixth embodiment of the present invention;

fig. 7 is a structural diagram of a cooperative aggregation apparatus of a port according to a seventh embodiment of the present invention;

fig. 8 is a schematic structural diagram of a computer device in an eighth embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

Example one

Fig. 1a is a flowchart of a port cooperative aggregation method according to an embodiment of the present invention, where this embodiment is applicable to a situation that switching devices at two ends of communication perform cooperative aggregation on respective corresponding ports in a transmission link, and the method may be executed by a port cooperative aggregation apparatus, where the apparatus may be implemented by software and/or hardware, and may generally be integrated in a source switching device, and specifically includes the following steps:

step 110, when detecting that the source port or the opposite port in the opposite switching device satisfies the port re-aggregation condition, constructing at least one item of cooperative interaction information pointing to the opposite port in the opposite switching device.

In this embodiment, when two switching devices perform communication, a switching device, which detects that a port satisfies a port re-aggregation condition in the two switching devices first, is used as a source switching device, and a switching device that performs communication with the source switching device is used as an opposite-end switching device.

Fig. 1B is a schematic diagram of a switch device, and as shown in fig. 1B, assuming that when the switch device a communicates with the switch device B, the switch device a first detects a port provided by itself, and a port meeting a port re-aggregation condition exists in the ports provided by the switch device B, the switch device a is used as a source switch device, and a corresponding switch device B is used as an opposite switch device. The switching device is a device having functions of signal switching, data forwarding and the like, such as an exchange.

In this embodiment, taking the source switching device as the switching device a as an example, when there is no aggregation port on the source switching device and the peer switching device, the source port is a port used for sending and receiving data on the source switching device, such as port a1 and port a2 in fig. 1c, and the peer port is a port used for receiving and sending data corresponding to the source port on the peer switching device, such as port B1 and port B2 in fig. 1 c. When there are aggregation ports (e.g., port a0 and port B0 in fig. 1 d) on the source switching device and the peer switching device, the source port is an independent port on the source switching device, e.g., port A3 in fig. 1d, and the peer port is a port on the peer switching device corresponding to the source port, e.g., port B3 in fig. 1 d.

In this step, optionally, the working states of each source port and the opposite port may be queried according to a preset query instruction and a port number corresponding to each port, if the working state of the source port or the opposite port is an enabled state, it is determined that the port meets a port re-aggregation condition, then the port is used as an effective port, a target port matched with the effective port is obtained, and the cooperative interaction information is constructed according to port information of the effective port and port information of the target port.

In a specific embodiment, as shown in fig. 1c, assuming that the working states of the source port a1 and the source port a2 are always enabled, when it is detected that the port re-aggregation condition is satisfied by the peer port B1 and the peer port B2, the peer port B1 and the peer port B2 are taken as valid ports, and the target ports matching the valid ports are the source port a1 and the source port a 2. Correspondingly, assuming that the working states of the opposite port B1 and the opposite port B2 are always enabled, when it is detected that the source port a1 and the source port a2 satisfy the port re-aggregation condition, the source port a1 and the source port a2 are taken as valid ports, and the target ports matching the valid ports are the opposite port B1 and the opposite port B2.

The cooperative interaction information may include port information of an effective port and port information of a target port, where the port information may include a port number, port state information, a port address, and the like. Specifically, the port address may be a Media Access Control (MAC) address of the port.

And step 120, performing at least one information interaction with the opposite terminal port through each piece of collaborative interaction information, and controlling the source terminal port and the opposite terminal port to perform collaborative re-aggregation configuration according to an information interaction result.

In this embodiment, optionally, when the valid port is a source port and the destination port is an opposite port (or the valid port is an opposite port and the destination port is a source port), the source switching device may send the cooperative interaction information to the opposite port according to an address of the opposite port, and after the opposite port receives the cooperative interaction information, the opposite port may send a confirmation message to the source port according to the source port address in the cooperative interaction information, so that when the source switching device receives the confirmation message, the source port is controlled to perform aggregation configuration, and meanwhile, the opposite port is also controlled to perform aggregation configuration.

In this embodiment, because the time consumed by the peer port to send the acknowledgment message to the source port is short, and the time when the source switching device configures the source port is almost the same as the time when the peer switching device configures the peer port, it can be ensured that the switching devices at both ends configure the aggregation port at the same time, thereby avoiding a transmission link between the switching devices from being in error, and reducing a packet loss rate of data.

In a specific embodiment, as shown in fig. 1c, it is assumed that, after receiving the acknowledgment message sent by the peer port, the source switching device may control the source ports a1 and a2 to perform aggregation configuration to generate a source aggregation port on the source switching device, and at the same time, the peer switching device also controls the peer ports B1 and B2 to perform aggregation configuration to generate a peer aggregation port on the peer switching device.

In this embodiment, after the source port and the peer port are aggregated, a transmission link between the source switching device and the peer switching device is formed. The transmission link is a transmission link between the source aggregation port and the opposite aggregation port.

The technical scheme of the embodiment of the invention constructs the cooperative interaction information pointing to the opposite terminal port by detecting whether the source port or the opposite terminal port meets the port re-aggregation condition or not, performs at least one time of information interaction with the opposite terminal port through each cooperative interaction information and controls the source port and the opposite terminal port to perform cooperative re-aggregation configuration according to the information interaction result. The technical scheme of the embodiment of the invention can ensure that the switching equipment at two ends simultaneously configures the aggregation port, avoid transmission link errors between the switching equipment and reduce the packet loss rate of data.

Example two

This embodiment is a further refinement of the above embodiment, and the same or corresponding terms as those of the above embodiment are explained, and this embodiment is not described again. Fig. 2 is a flowchart of a method for collaborative aggregation of ports provided in the second embodiment, in this embodiment, the technical solution of this embodiment may be combined with one or more methods in the solutions of the foregoing embodiments, as shown in fig. 2, the method provided in this embodiment may further include:

step 210, when it is detected that the source port or the peer port in the peer switching device satisfies the port re-aggregation condition, constructing at least one item of cooperative interaction information pointing to the peer port in the peer switching device.

In an embodiment of the present invention, optionally, detecting that the source port or an opposite port in the opposite switching device satisfies the port re-aggregation condition includes: when detecting that an event of switching from closed to open occurs to a source port or an opposite port, determining that the source port or the opposite port meets a port re-aggregation condition.

The method includes the steps of querying events occurring in each port according to a preset query instruction and port numbers corresponding to the ports, and determining that the source port or the opposite port meets a port re-aggregation condition when detecting that the source port or the opposite port has an event of switching from closed (DOWN) to open (UP). Optionally, if the source port or the opposite port meets the port re-aggregation condition, the source port or the opposite port may be used as an effective port, a target port matched with the effective port is obtained, and the cooperative interaction information is constructed according to the port information of the effective port and the port information of the target port.

In this embodiment, optionally, the collaborative interaction information may include notification information and an acknowledgement message. The notification message may include port information of the valid port, port information of the target port, and a preset identifier for indicating the notification instruction. The confirmation message may include port information of the valid port, port information of the target port, and a preset identifier for indicating the confirmation instruction.

Step 220, sending the first notification information to the opposite port.

In this embodiment, the first notification message is used to notify the port information of the valid port to the peer port.

In a specific embodiment, as shown in fig. 1d, assuming that the source port A3 satisfies the port re-aggregation condition, the source port A3 may be used as an active port, and the destination port matching the active port is the opposite port B3, and then the first notification message is constructed according to the port information of the source port A3 and the port information of the opposite port B3. The source switching device may send a first notification message to peer port B3 based on the address of peer port B3 in the first notification message.

Step 230, when receiving the first acknowledgement information sent by the peer port, sending second acknowledgement information to the peer port, and performing a re-aggregation configuration on the source port.

In this step, after receiving the first notification message, the opposite port may send, to the source port, first acknowledgement information according to an address of the source port in the first notification message, where the first acknowledgement information is used to instruct the source switching device to perform the re-aggregation configuration on the source port. When receiving the first acknowledgement information, the source port sends second acknowledgement information to the peer port, where the second acknowledgement information may be used to indicate that preparation work before the source switching device performs the re-aggregation configuration on the source port has been completed, so as to indicate that the peer switching device performs the coordinated re-aggregation configuration on the peer port.

In this embodiment, because the time consumed by the source port to send the second acknowledgement message to the peer port is short, the time when the source switching device configures the source port is almost the same as the time when the peer switching device configures the peer port, and the second acknowledgement message may also indicate that the preparation work before the source switching device performs the re-aggregation configuration on the source port has been completed, thereby ensuring that the configurations of the aggregation ports by the switching devices at the two ends are performed smoothly at the same time, and reducing errors occurring in the configuration process.

In an implementation manner of the embodiment of the present invention, performing a re-aggregation configuration on a source port includes: and aggregating the source port and the current aggregation port corresponding to the source switching equipment.

In a specific embodiment, as shown in fig. 1d, it is assumed that, after receiving the first acknowledgement message, the source switching device may control the source port A3 and the current aggregation port a0 on the source switching device to perform aggregation configuration to generate a source aggregation port on the source switching device, and at the same time, the peer switching device also controls the peer port B3 and the current aggregation port B0 on the peer switching device to perform aggregation configuration to generate a peer aggregation port on the peer switching device.

In this embodiment, after the source port and the peer port are aggregated, a transmission link between the source switching device and the peer switching device is formed. The transmission link is a transmission link between the source aggregation port and the opposite aggregation port.

In this embodiment, optionally, when the source switching device and the peer switching device detect that the source port or the peer port meets the port re-aggregation condition at the same time, the source switching device and the peer switching device may send the first notification message to the peer switching device at the same time, and control the source port and the peer port to perform cooperative re-aggregation configuration when receiving the first confirmation message sent by the peer switching device.

The technical scheme of the embodiment of the invention constructs the cooperative interaction information pointing to the opposite terminal port in the opposite terminal switching equipment by detecting whether the source port or the opposite terminal port meets the port re-aggregation condition or not, when the source port or the opposite terminal port meets the port re-aggregation condition, the cooperative interaction information can comprise notification information and confirmation information, then the first notification information is sent to the opposite terminal port, when the first confirmation information aiming at the opposite terminal port is received, the second confirmation information is sent to the opposite terminal port, and the re-aggregation configuration is carried out on the source port. The embodiment of the invention can ensure that the configuration of the switching equipment at the two ends to the aggregation port is simultaneously and smoothly carried out, avoids the transmission link between the switching equipment from generating errors and reduces the packet loss rate of data.

EXAMPLE III

This embodiment is a further refinement of the above embodiment, and the same or corresponding terms as those of the above embodiment are explained, and this embodiment is not described again. Fig. 3 is a flowchart of a cooperative aggregation method for ports provided in the third embodiment, in this embodiment, the technical solution of this embodiment may be combined with one or more methods in the solutions of the foregoing embodiments, as shown in fig. 3, the method provided in this embodiment may further include:

step 310, when it is detected that the source port or the peer port in the peer switching device satisfies the port re-aggregation condition, constructing at least one item of cooperative interaction information pointing to the peer port in the peer switching device.

After the source port and the opposite port are re-aggregated, a transmission link between the source switching device and the opposite switching device is formed.

And step 320, sending first notification information to the opposite port.

In this embodiment, optionally, information interaction during the port configuration process may be performed between the source switching device and the peer switching device through a predefined data frame format, where a type information of the information interaction between the source switching device and the peer switching device is defined in the data frame format.

Specifically, the source switching device may send the first notification information to the peer port according to the data frame format, and a data frame sent by the source switching device to the peer port may include the MAC address of the source port, the MAC address of the peer port, the EtherType field, the message type, and the padding field. The EtherType field is used to specify the protocol to be applied in the data frame. The padding field may include port numbers of the source port and the peer port, port state information, and the like.

In a specific embodiment, when the source switching device sends the first notification information to the peer port, the message type is defined as 0x00, which is used to indicate that the message is a notification message.

Step 330, when receiving the first acknowledgement information sent by the opposite port, sending second acknowledgement information to the opposite port.

In a specific embodiment, when the source switching device sends the second acknowledgement information to the peer port, the message type is defined as 0x01, which is used to indicate that the message is an acknowledgement message.

Wherein the second acknowledgement information is used to instruct the peer switching device to perform collaborative re-aggregation configuration on the peer port.

And 340, identifying port information included in the first confirmation information and a preset first configuration waiting duration.

In this embodiment, the first acknowledgement message includes port information that the switching devices at both ends need to configure and a preset first configuration waiting duration, and optionally, the port information and the preset first configuration waiting duration may be identified in the first acknowledgement message according to a preset delimiter.

And step 350, taking the current moment as a time starting point, and after waiting for the first configuration duration, performing re-aggregation configuration on the source port according to the port information.

In this embodiment, optionally, the second acknowledgement information includes port information that the switching devices at both ends need to configure, and a preset second configuration waiting duration, where the second configuration duration is matched with the first configuration duration. Correspondingly, after the peer port receives the second acknowledgement message, the peer switching device may use the current time as a time starting point, wait for the second configuration duration, and perform the re-aggregation configuration on the peer port according to the port information.

In this embodiment, because the switching devices at the two ends start to configure the corresponding ports after receiving the acknowledgment messages respectively, and the source switching device sends the second acknowledgment message to the peer port when receiving the first acknowledgment message, the time difference between the first configuration waiting time and the second configuration waiting time can be determined according to the time consumed by the source switching device sending the second acknowledgment message to the peer port. Specifically, assuming that the time consumed for the source switch device to send the second acknowledgement message to the peer port is 2ms, the first configured waiting duration may be set to 5ms, and the second configured waiting duration may be set to 3 ms. Therefore, the simultaneous configuration of the aggregation ports by the two-end switching equipment can be better ensured.

The technical scheme of the embodiment of the invention constructs the cooperative interaction information pointing to the opposite end port in the opposite end switching equipment by detecting whether the source port or the opposite end port meets the port re-aggregation condition or not, when the source port or the opposite end port meets the port re-aggregation condition, the cooperative interaction information can comprise notification information and confirmation information, then the first notification information is sent to the opposite end port, when the first confirmation information aiming at the opposite end port is received, the second confirmation information is sent to the opposite end port, the port information and the first configuration waiting time length included in the first confirmation information are identified, and the re-aggregation configuration is carried out on the source port according to the port information after the current time is taken as the time starting point and the first configuration waiting time length is waited. The embodiment of the invention can ensure that the switching equipment at two ends simultaneously configures the aggregation port, avoid transmission link errors between the switching equipment and reduce the packet loss rate of data.

Example four

Fig. 4 is a flowchart of a port cooperative aggregation method according to a fourth embodiment of the present invention, where this embodiment is applicable to a case where switching devices at two ends of communication perform cooperative aggregation on respective corresponding ports in a transmission link, and the method may be executed by a port cooperative aggregation apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an opposite-end switching device, and specifically includes the following steps:

step 410, receiving at least one item of collaborative interaction information sent by the source switching device through an opposite port in the opposite port switching device.

The cooperative interaction information is sent when the source switching device detects that the source port or an opposite end port in the opposite end switching device meets a port re-aggregation condition, and a transmission link between the source switching device and the opposite end switching device is formed after the source port and the opposite end port are re-aggregated.

In this embodiment, optionally, the source switching device may query the working states of each source port and the opposite port according to a preset query instruction and the port number corresponding to each port, if the working state of the source port or the opposite port is the enabled state, it is determined that the port meets the port re-aggregation condition, then the port is used as an effective port, a target port matched with the effective port is obtained, and the cooperative interaction information is constructed according to the port information of the effective port and the port information of the target port.

The cooperative interaction information may include port information of an effective port and port information of a target port, where the port information may include a port number, port state information, a port address, and the like. Specifically, the port address may be a Media Access Control (MAC) address of the port.

In this step, optionally, when the valid port is the source port and the destination port is the opposite port (or the valid port is the opposite port and the destination port is the source port), the source switching device may send the cooperative interaction information to the opposite port according to the address of the opposite port.

And step 420, performing at least one information interaction with the source port according to each piece of collaborative interaction information, and controlling the opposite port and the source port to perform collaborative re-aggregation configuration according to an information interaction result.

In this embodiment, after receiving the cooperative interaction information, the peer port may send a confirmation message to the source port according to the source port address in the cooperative interaction information, so that when the source switching device receives the confirmation message, the source port is controlled to perform aggregation configuration, and meanwhile, the peer switching device also controls the peer port to perform aggregation configuration.

In this embodiment, because the time consumed by the peer port to send the acknowledgment message to the source port is short, and the time when the source switching device configures the source port is almost the same as the time when the peer switching device configures the peer port, it can be ensured that the switching devices at both ends configure the aggregation port at the same time, thereby avoiding a transmission link between the switching devices from being in error, and reducing a packet loss rate of data.

The technical scheme of the embodiment of the invention receives at least one item of cooperative interaction information sent by source exchange equipment through the opposite terminal port, then carries out at least one information interaction with the source port according to each cooperative interaction information, and controls the opposite terminal port and the source port to carry out cooperative re-aggregation configuration according to the information interaction result. The technical scheme of the embodiment of the invention can ensure that the switching equipment at two ends simultaneously configures the aggregation port, avoid transmission link errors between the switching equipment and reduce the packet loss rate of data.

EXAMPLE five

This embodiment is a further refinement of the above embodiment, and the same or corresponding terms as those of the above embodiment are explained, and this embodiment is not described again. Fig. 5a is a flowchart of a cooperative aggregation method for a port provided in the fifth embodiment, in this embodiment, the technical solution of this embodiment may be combined with one or more methods in the solutions of the foregoing embodiments, as shown in fig. 5a, the method provided in this embodiment may further include:

step 510, receiving a first notification message sent by a source port through an opposite port in an opposite-end switching device.

In this embodiment, the notification message may include port information of the valid port, port information of the target port, and a preset identifier for indicating the notification instruction. The first notification message is used for notifying the port information of the valid port to the opposite port.

Step 520, sending a first acknowledgement message for the source port, where the first acknowledgement message is used to instruct the source switching device to perform collaborative re-aggregation configuration on the source port.

In this embodiment, the confirmation message may include port information of the valid port, port information of the target port, and a preset identifier for indicating the confirmation instruction. Optionally, after receiving the first notification message, the opposite end port may send first confirmation information to the source port according to the address of the source port in the first notification message, where the first confirmation information is used to instruct the source switching device to perform the re-aggregation configuration on the source port. The peer switching device may send the first acknowledgement information to the source port according to a preset data frame format.

Step 530, when the second acknowledgement information sent by the source port is received, performing a re-aggregation configuration on the opposite port.

In this embodiment, when receiving the first acknowledgement information, the source port further sends second acknowledgement information to the peer port, where the second acknowledgement information may be used to indicate that preparation work before the source switching device performs the re-aggregation configuration on the source port is completed, so as to indicate that the peer switching device performs the coordinated re-aggregation configuration on the peer port.

In this embodiment, because the time consumed by the source port to send the second acknowledgement message to the peer port is short, the time when the source switching device configures the source port is almost the same as the time when the peer switching device configures the peer port, and the second acknowledgement message may also indicate that the preparation work before the source switching device performs the re-aggregation configuration on the source port has been completed, thereby ensuring that the configurations of the aggregation ports by the switching devices at the two ends are performed smoothly at the same time, and reducing errors occurring in the configuration process.

In one implementation manner of the embodiment of the present invention, while sending the first acknowledgment message for the destination to the source port, the method further includes: and sending a second notification message to the source port, where the second notification message is used to confirm that the peer switching device starts to perform preparation for performing the re-aggregation configuration on the peer port.

The opposite end port sends a first confirmation message to the source port and also sends a second notification message to the source port, and the second notification message is used for indicating that the opposite end switching device starts to execute preparation work for performing the re-aggregation configuration on the opposite end port so as to prompt the source switching device to start to execute the preparation work for performing the re-aggregation configuration on the source port, so that the configuration efficiency of the switching devices at two ends on the aggregation port can be improved. The peer switching device may send the first acknowledgement information and the second notification message to the source port according to a preset data frame format.

The technical scheme of the embodiment of the invention receives a first notification message sent by a source port through an opposite terminal port, then sends a first confirmation message aiming at the source port, wherein the first confirmation message is used for indicating source exchange equipment to carry out cooperative reaggregation configuration on the source port, and finally carries out reaggregation configuration on the opposite terminal port when receiving a second confirmation message sent by the source port. The embodiment of the invention can ensure that the switching equipment at two ends simultaneously configures the aggregation port, avoid transmission link errors between the switching equipment and reduce the packet loss rate of data.

To better introduce the technical solution provided by the embodiment of the present invention, the embodiment of the present invention provides an implementation manner of a cooperative aggregation method for ports, as shown in fig. 5b to 5 d:

as shown in fig. 5B, assuming that when the switch device a communicates with the switch device B, the switch device a first detects a port provided by itself, and a port meeting a port re-aggregation condition exists in the ports provided by the switch device B, the switch device a is used as a source switch device, and the switch device B is used as an opposite switch device. In this scenario, the switch device a first sends first notification information to the switch device B to notify the switch device B of port information meeting the port re-aggregation condition; after receiving the first notification message, the switching device B sends a first confirmation message to the switching device a to instruct the switching device a to perform the reaggregation configuration on the source port, and simultaneously, the switching device B also sends a second notification message to the switching device a to confirm that the switching device B starts to perform the preparation work of performing the reaggregation configuration on the peer port; after receiving the first acknowledgement message and the second notification message, the switching device a sends a second acknowledgement message to the switching device B, where the second acknowledgement message is used to indicate that preparation work before the switching device a performs the re-aggregation configuration on the source port is completed, so as to indicate that the switching device B performs the coordinated re-aggregation configuration on the peer port. And the port meeting the port re-aggregation condition is the source port or the opposite port.

As shown in fig. 5c, assuming that when the switch device a communicates with the switch device B, the switch device B first detects the port provided by itself, and a port meeting the port re-aggregation condition exists in the ports provided by the switch device a, the switch device B is used as a source switch device, and the switch device a is used as an opposite switch device. In this scenario, the switch device B first sends first notification information to the switch device a to notify the switch device a of the port information meeting the port re-aggregation condition; after receiving the first notification message, the switching device a sends a first confirmation message to the switching device B to instruct the switching device B to perform the reaggregation configuration on the source port, and simultaneously, the switching device a also sends a second notification message to the switching device B to confirm that the switching device a starts to perform preparation work for performing the reaggregation configuration on the peer port; after receiving the first acknowledgement message and the second notification message, the switching device B sends a second acknowledgement message to the switching device a, where the second acknowledgement message is used to indicate that preparation before the switching device B performs the re-aggregation configuration on the source port is completed, so as to indicate that the switching device a performs the coordinated re-aggregation configuration on the peer port. And the port meeting the port re-aggregation condition is the source port or the opposite port.

As shown in fig. 5d, assuming that when the switch device a communicates with the switch device B, the switch device a and the switch device B simultaneously detect that there is a port satisfying the port re-aggregation condition, the switch device a or the switch device B may be used as a source switch device, and when the switch device a is a source switch device, the opposite switch device is a switch device B; when the switch device B is the source switch device, the opposite switch device is the switch device a. The switching device A and the switching device B simultaneously send a first notification message to the switching device of the opposite side, and when receiving a first confirmation message sent by the switching device of the opposite side, the switching device A controls the source port and the opposite port to carry out cooperative re-aggregation configuration.

The method provided by the embodiment of the application can ensure that the switching devices at two ends configure the aggregation port simultaneously, avoid errors of transmission links between the switching devices, and reduce the packet loss rate of data.

EXAMPLE six

Fig. 6 is a structural diagram of a cooperative aggregation apparatus for ports according to a sixth embodiment of the present invention, where the apparatus is applied to a source switch device, and includes: a collaborative interaction information construction module 610 and an information interaction module 620.

The cooperative interaction information constructing module 610 is configured to, when it is detected that the source port or an opposite port in the opposite-end switching device satisfies the port re-aggregation condition, construct at least one piece of cooperative interaction information pointing to the opposite port in the opposite-end switching device; after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed; an information interaction module 620, configured to perform at least one information interaction with the opposite port through each piece of collaborative interaction information, and control the source port and the opposite port to perform collaborative re-aggregation configuration according to an information interaction result.

The technical scheme of the embodiment of the invention constructs the cooperative interaction information pointing to the opposite terminal port by detecting whether the source port or the opposite terminal port meets the port re-aggregation condition or not, performs at least one time of information interaction with the opposite terminal port through each cooperative interaction information and controls the source port and the opposite terminal port to perform cooperative re-aggregation configuration according to the information interaction result. The technical scheme of the embodiment of the invention can ensure that the switching equipment at two ends simultaneously configures the aggregation port, avoid transmission link errors between the switching equipment and reduce the packet loss rate of data.

On the basis of the foregoing embodiments, the collaborative interaction information constructing module 610 may include: and the re-aggregation condition determining unit is used for determining that the source port or the opposite port meets the port re-aggregation condition when detecting that the source port or the opposite port has an event of switching from closed to open.

The information interaction module 620 may include: a first notification information sending unit, configured to send first notification information to the peer port; a second acknowledgement message sending unit, configured to send, when receiving the first acknowledgement message that the opposite port sends a destination, second acknowledgement message to the opposite port, and perform a re-aggregation configuration on the source port; the second acknowledgement information is used to instruct the peer switching device to perform collaborative re-aggregation configuration on the peer port; the aggregation processing unit is used for aggregating the source port and a current aggregation port corresponding to the source switching equipment; a first configuration waiting duration identifying unit, configured to identify port information included in the first acknowledgement information and a preset first configuration waiting duration; the configuration unit is used for performing re-aggregation configuration on the source port according to the port information after waiting for the first configuration duration by taking the current moment as a time starting point; the second confirmation information comprises a second configuration waiting time length, and the second configuration time length is matched with the first configuration time length.

The port cooperative aggregation device provided by the embodiment of the invention can execute the port cooperative aggregation method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

EXAMPLE seven

Fig. 7 is a structural diagram of a port cooperative aggregation apparatus according to a seventh embodiment of the present invention, where the apparatus is applied to an opposite end switching device, and includes: a collaborative interaction information receiving module 710 and a re-aggregation configuration module 720.

The cooperative interaction information receiving module 710 is configured to receive, through an opposite end port in an opposite end switching device, at least one item of cooperative interaction information sent by a source switching device, where the cooperative interaction information is sent when the source switching device detects that a source port or an opposite end port in the opposite end switching device meets a port re-aggregation condition; after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed; a re-aggregation configuration module 720, configured to perform at least one information interaction with the source port according to each piece of collaborative interaction information, and control the peer port and the source port to perform collaborative re-aggregation configuration according to an information interaction result.

The technical scheme of the embodiment of the invention receives at least one item of cooperative interaction information sent by source exchange equipment through the opposite terminal port, then carries out at least one information interaction with the source port according to each cooperative interaction information, and controls the opposite terminal port and the source port to carry out cooperative re-aggregation configuration according to the information interaction result. The technical scheme of the embodiment of the invention can ensure that the switching equipment at two ends simultaneously configures the aggregation port, avoid transmission link errors between the switching equipment and reduce the packet loss rate of data.

On the basis of the foregoing embodiments, the re-aggregation configuration module 720 may include: a first notification message receiving unit, configured to receive a first notification message sent by the source port; a first acknowledgement message sending unit, configured to send a targeted first acknowledgement message to the source port, where the first acknowledgement message is used to instruct the source switching device to perform collaborative re-aggregation configuration on the source port; a second acknowledgement information receiving unit, configured to perform a re-aggregation configuration on the opposite port when receiving second acknowledgement information sent by the source port; a second notification message sending unit, configured to send a second notification message to the source port, where the second notification message is used to confirm that the peer switching device starts to perform preparation for performing the re-aggregation configuration on the peer port.

The port cooperative aggregation device provided by the embodiment of the invention can execute the port cooperative aggregation method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.

Example eight

Fig. 8 is a schematic structural diagram of a computer apparatus according to an eighth embodiment of the present invention, as shown in fig. 8, the computer apparatus includes a processor 810, a memory 820, an input device 830, and an output device 840; the number of the processors 810 in the computer device may be one or more, and one processor 810 is taken as an example in fig. 8; the processor 810, the memory 820, the input device 830 and the output device 840 in the computer apparatus may be connected by a bus or other means, and fig. 8 illustrates the connection by a bus as an example.

The memory 820 is used as a computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions/modules corresponding to a collaborative aggregation method for a port in the embodiment of the present invention (for example, the collaborative interaction information constructing module 610 and the information interaction module 620 in a collaborative aggregation apparatus for a port). The processor 810 executes various functional applications and data processing of the computer device by executing software programs, instructions and modules stored in the memory 820, that is, implements the above-described one port cooperative aggregation method. That is, the program when executed by the processor implements:

when detecting that a source port or an opposite end port in opposite end switching equipment meets a port re-aggregation condition, constructing at least one item of cooperative interaction information pointing to the opposite end port in the opposite end switching equipment; after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed; and performing at least one information interaction with the opposite terminal port through each piece of collaborative interaction information, and controlling the source terminal port and the opposite terminal port to perform collaborative re-aggregation configuration according to an information interaction result.

The memory 820 is used as a computer readable storage medium and can be further used for storing program instructions/modules corresponding to a collaborative aggregation method of a port (for example, the collaborative interaction information receiving module 710 and the re-aggregation configuration module 720 in a collaborative aggregation apparatus of a port) in the embodiment of the present invention. The processor 810 executes various functional applications and data processing of the computer device by executing software programs, instructions and modules stored in the memory 820, that is, implements the above-described one port cooperative aggregation method. That is, the program when executed by the processor implements:

receiving at least one item of cooperative interaction information sent by source switching equipment through an opposite end port in opposite end switching equipment, wherein the cooperative interaction information is sent when the source switching equipment detects that a source port or the opposite end port in the opposite end switching equipment meets a port re-aggregation condition; after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed; and performing at least one information interaction with the source port according to each piece of collaborative interaction information, and controlling the opposite port and the source port to perform collaborative re-aggregation configuration according to an information interaction result.

The memory 820 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 820 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 820 may further include memory located remotely from the processor 810, which may be connected to a computer device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The input device 830 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus, and may include a keyboard and a mouse, etc. The output device 840 may include a display device such as a display screen.

Example nine

The ninth embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the method according to any embodiment of the present invention. Of course, the embodiment of the present invention provides a computer-readable storage medium, which can perform relevant operations in a cooperative port aggregation method according to any embodiment of the present invention. That is, the program when executed by the processor implements:

when detecting that a source port or an opposite end port in opposite end switching equipment meets a port re-aggregation condition, constructing at least one item of cooperative interaction information pointing to the opposite end port in the opposite end switching equipment; after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed; and performing at least one information interaction with the opposite terminal port through each piece of collaborative interaction information, and controlling the source terminal port and the opposite terminal port to perform collaborative re-aggregation configuration according to an information interaction result.

The computer-readable storage medium provided in the embodiments of the present invention may further perform related operations in another method for collaborative aggregation of ports according to any embodiment of the present invention. That is, the program when executed by the processor implements:

receiving at least one item of cooperative interaction information sent by source switching equipment through an opposite end port in opposite end switching equipment, wherein the cooperative interaction information is sent when the source switching equipment detects that a source port or the opposite end port in the opposite end switching equipment meets a port re-aggregation condition; after the source port and the opposite port are re-aggregated, a transmission link between the source switching equipment and the opposite switching equipment is formed; and performing at least one information interaction with the source port according to each piece of collaborative interaction information, and controlling the opposite port and the source port to perform collaborative re-aggregation configuration according to an information interaction result.

From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.

It should be noted that, in the embodiment of the port cooperative aggregation apparatus, each unit and each module included in the port cooperative aggregation apparatus are only divided according to functional logic, but are not limited to the above division as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.

It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于智能迭代初值选择的信道机器学习估计方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!