Network switching equipment management method, device, server and storage medium

文档序号:1601350 发布日期:2020-01-07 浏览:16次 中文

阅读说明:本技术 一种网络交换设备管理方法、装置、服务器和存储介质 (Network switching equipment management method, device, server and storage medium ) 是由 张志强 谢永恒 周汉川 余勇 许敬缓 于 2019-10-24 设计创作,主要内容包括:本发明公开了一种网络交换设备管理方法,包括:第一管理卡从第一设备读取第一拓扑信息,所述第一设备包括多个收发数据的通讯端口;获取第二设备的第二拓扑信息;基于所述第一拓扑信息和所述第二拓扑信息生成调整信息;根据所述调整信息调整所述第一设备的通讯端口在负载均衡算法中的权重。同时,本发明还提供了一种网络交换设备管理装置、服务器和存储介质。本发明通过在一个网络交换设备获取自身及互联网络设备的拓扑信息,生成输出端口的调整信息,实现级联设备的输出均衡。(The invention discloses a network switching equipment management method, which comprises the following steps: the method comprises the steps that a first management card reads first topology information from first equipment, wherein the first equipment comprises a plurality of communication ports for receiving and transmitting data; acquiring second topology information of second equipment; generating adjustment information based on the first topology information and the second topology information; and adjusting the weight of the communication port of the first device in a load balancing algorithm according to the adjustment information. Meanwhile, the invention also provides a network switching equipment management device, a server and a storage medium. The invention generates the adjustment information of the output port by acquiring the topology information of the network switching equipment and the topology information of the interconnection network equipment at the network switching equipment, thereby realizing the output balance of the cascade equipment.)

1. A network switching device management method, comprising:

the method comprises the steps that a first management card reads first topology information from first equipment, wherein the first equipment comprises a plurality of communication ports for receiving and transmitting data;

acquiring second topology information of second equipment;

generating adjustment information based on the first topology information and the second topology information;

and adjusting the weight of the communication port of the first device in a load balancing algorithm according to the adjustment information.

2. The method for managing a network switching device according to claim 1, wherein after the first management card reads the first topology information from the first device, the method further comprises:

and reading an ip address list of a second device prestored by the first device, and sending the first topology information to the ip address.

3. The method according to claim 1, wherein the first topology information includes a presence flag and a topology flag of the first device, the second topology information includes a presence flag and a topology flag of the second device, a presence flag of 1 indicates that the network switching device is in a power-off state, and a topology flag of 1 indicates that the topology of the network switching device is changed.

4. The method for managing network switching devices according to claim 3, wherein the generating adjustment information based on the first topology information and the second topology information includes:

setting the position marks of the first equipment and the second equipment in the adjustment information to be 0;

judging whether the topology of the first equipment and the second equipment changes or not;

if the number of the output port is changed, acquiring the output port number in the working state, and writing the adjustment information;

setting the topological mark of the first device and/or the second device to be 1;

and if the topology flag is not changed, setting the topology flag of the first device and the topology flag of the second device to be 0.

5. The method for managing network switching devices according to claim 4, wherein the determining whether the topology of the first device and the second device changes further comprises:

judging whether the second equipment is newly added to the topology;

and if so, reading the output port number in the working state in the second equipment, and writing the adjustment information.

6. The method as claimed in claim 5, wherein the adjusting the weight of the communication port of the first device in the load balancing algorithm according to the adjustment information includes:

sequentially judging whether the in-place marks of the first equipment and the second equipment are 1;

if the on-site flag is 1, deleting the topology information of the power-off equipment from the adjustment information;

setting the topological mark of the uninterrupted equipment in the adjustment information as 1;

inquiring and updating the output port in the working state in the adjustment information;

and adjusting the output weight of the output port based on the updated adjustment information and a preset load balancing algorithm.

7. The method according to claim 2, wherein before reading an ip address list of a second device pre-stored in the first device and sending the first topology to the ip address, the method further includes:

and converting the first topology information into a character string in a preset format.

8. The method for managing network switching devices according to claim 7, further comprising, after the obtaining the second topology information of the second device:

checking the character string of the second topological information based on a preset format to judge whether the character string is legal or not;

and if the character string is legal, converting the character string into the second topology information.

9. A network switching equipment management device is characterized by comprising the following modules:

the first acquisition module is used for enabling a first management card to read first topology information from first equipment, and the first equipment comprises a plurality of communication ports for receiving and transmitting data;

the second acquisition module is used for acquiring second topology information of the second equipment;

an information generation module that generates adjustment information based on the first topology information and the second topology information;

and the adjusting module is used for adjusting the weight of the communication port of the first equipment in the load balancing algorithm according to the adjusting information.

10. A server comprising a memory, a processor and a program stored on the memory and executable on the processor, wherein the processor when executing the program implements a network switching device management method according to any one of claims 1 to 8.

11. A terminal readable storage medium, having a program stored thereon, wherein the program, when executed by a processor, is capable of implementing a network switching device management method according to any one of claims 1 to 8.

Technical Field

The embodiment of the invention relates to the field of computer data communication, in particular to a network switching equipment management method, a network switching equipment management device, a server and a storage medium.

Background

In a large data distribution system, network switching equipment needs to uniformly perform hash output on data from different lines so as to ensure that the data are homologously homodromous and homologized and intelligently balanced.

Although a single network switching device is used, the corresponding output port weight can be calculated according to the Hash algorithm, and the output balance of the device is achieved. However, when a system has a plurality of devices, the amount of data accessed by different devices is different, and the problem of unbalanced input exists, so that the output ports of different devices are also unbalanced.

Disclosure of Invention

In a first aspect, the present invention provides a method for managing a network switching device, so as to implement load balancing of an output port in a system with a multi-network switching device cascade topology, including the following steps:

the method comprises the steps that a first management card reads first topology information from first equipment, wherein the first equipment comprises a plurality of communication ports for receiving and transmitting data;

acquiring second topology information of second equipment;

generating adjustment information based on the first topology information and the second topology information;

and adjusting the weight of the communication port of the first device in a load balancing algorithm according to the adjustment information.

Further, after the first management card reads the first topology information from the first device, the method further includes:

and reading an ip address list of a second device prestored by the first device, and sending the first topology information to the ip address.

Further, the first topology information includes an in-place flag and a topology flag of the first device, the second topology information includes an in-place flag and a topology flag of the second device, the in-place flag is 1 to indicate that the network switching device is in a power-off state, and the topology flag is 1 to indicate that the topology of the network switching device is changed.

Further, the generating adjustment information based on the first topology information and the second topology information includes:

setting the position marks of the first equipment and the second equipment in the adjustment information to be 0;

judging whether the topology of the first equipment and the second equipment changes or not;

if the number of the output port is changed, acquiring the output port number in the working state, and writing the adjustment information;

setting the topological mark of the first device and/or the second device to be 1;

and if the topology flag is not changed, setting the topology flag of the first device and the topology flag of the second device to be 0.

Further, the determining whether the topology of the first device and the second device changes further includes:

judging whether the second equipment is newly added to the topology;

and if so, reading the output port number in the working state in the second equipment, and writing the adjustment information.

Further, the adjusting the weight of the communication port of the first device in the load balancing algorithm according to the adjustment information includes:

sequentially judging whether the in-place marks of the first equipment and the second equipment are 1;

if the on-site flag is 1, deleting the topology information of the power-off equipment from the adjustment information;

setting the topological mark of the uninterrupted equipment in the adjustment information as 1;

inquiring and updating the output port in the working state in the adjustment information;

and adjusting the output weight of the output port based on the updated adjustment information and a preset load balancing algorithm.

Further, before the reading an ip address list of a second device pre-stored by the first device, the reading an ip address list of the second device pre-stored by the first device, and sending the first topology information to the ip address, the method further includes:

and converting the first topology information into a character string in a preset format.

Further, after the obtaining of the second topology information of the second device, the method further includes:

checking the character string of the second topological information based on a preset format to judge whether the character string is legal or not;

and if the character string is legal, converting the character string into the second topology information.

In a second aspect, the present invention further provides a network switching device management apparatus, including the following modules:

a first obtaining module 401, configured to enable a first management card to read first topology information from a first device, where the first device includes a plurality of communication ports for receiving and sending data;

a second obtaining module 402, configured to obtain second topology information of a second device;

an information generating module 403, configured to generate adjustment information based on the first topology information and the second topology information;

the adjusting module 404 adjusts the weight of the communication port of the first device in the load balancing algorithm according to the adjustment information.

In a third aspect, the present invention provides a server, including a memory, a processor and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement a network switching device management method as described in any one of the above.

In a fourth aspect, the present invention provides a terminal readable storage medium, on which a program is stored, which when executed by a processor is capable of implementing a network switching device management method as described in any one of the above.

The invention uses a topology management algorithm in a cascade system of two or more network switching devices to carry out unified management, realizes real-time communication among the network switching devices, and outputs the data to be output to all output ports in a balanced manner, thereby achieving the purpose of homologously homologating and homologously outputting and balancing the shunt data of the plurality of network switching devices.

Drawings

Fig. 1 is a flowchart of a network switching device management method according to a first embodiment of the present invention.

Fig. 2 is a flowchart of a network switching device management method according to an alternative embodiment of the first embodiment of the present invention.

Fig. 3 is a bus topology of a plurality of network switching devices in a second embodiment of the present invention.

Fig. 4 is a flowchart of a network switching device management method in the second embodiment of the present invention.

Fig. 5 is a distributed topology of a plurality of network switching devices in a second embodiment of the present invention.

Fig. 6 is a flowchart of a network switching device management method in the second embodiment of the present invention.

Fig. 7 is a flowchart of a network switching device management method in the third embodiment of the present invention.

Fig. 8 is a flowchart of a network switching device management method in an alternative embodiment to the third embodiment of the present invention.

Fig. 9 is a flowchart of a network switching device management method in an alternative embodiment to the third embodiment of the present invention.

Fig. 10 is a block diagram of a network switching device management apparatus according to a fourth embodiment of the present invention.

Fig. 11 is a block diagram of a network switching device management apparatus in a fourth alternative embodiment of the present invention.

Fig. 12 is a schematic structural diagram of a server according to a fifth 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.

Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but may have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

Furthermore, the terms "first," "second," and the like may be used herein to describe various orientations, actions, steps, elements, or the like, but the orientations, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. For example, a first apparatus may be a second apparatus, and similarly, a second apparatus may be a first apparatus without departing from the scope of the present application. The first device and the second device are both network switching devices, but are not the same network switching device. The terms "first", "second", etc. are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "plurality", "batch" means at least two, e.g., two, three, etc., unless specifically limited otherwise.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种报文处理方法及其装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!