CN105656772B - Method and system for aggregating failover of switch ports - Google Patents
Method and system for aggregating failover of switch ports Download PDFInfo
- Publication number
- CN105656772B CN105656772B CN201610133237.6A CN201610133237A CN105656772B CN 105656772 B CN105656772 B CN 105656772B CN 201610133237 A CN201610133237 A CN 201610133237A CN 105656772 B CN105656772 B CN 105656772B
- Authority
- CN
- China
- Prior art keywords
- port
- switch
- state
- aggregation group
- changed
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/24—Multipath
- H04L45/245—Link aggregation, e.g. trunking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/28—Routing or path finding of packets in data switching networks using route fault recovery
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a failover aggregation method for a switch port, which comprises the following steps: s1 monitoring the port state of the switch; s2, when the state of the port of the switch is changed, deleting the aggregation group where the port is located; s3 creates a new aggregate group according to the status of the port, the new aggregate group including or not including the port. The invention mainly provides a method for realizing the switch port aggregation failover function through software, which does not need the support of switch chip hardware or starts the LACP protocol, but realizes the function through a simple mode of adding and deleting aggregation groups.
Description
Technical Field
The invention relates to the field of network security, in particular to a method and a system for converging failover of switch ports.
Background
The aggregation FAILOVER of the switch port means that after the port state of the aggregation group changes, the traffic is automatically switched to the normal port, so that the forwarding of the traffic is not affected. This function is typically implemented in hardware or LACP protocol.
Port aggregation is an important function for medium and low switch products. If the switch supports the LACP protocol, port aggregation is controlled entirely by the protocol, which achieves load balancing through the state of the ports. However, if the switch does not support the LACP protocol, only static port aggregation can be selected, but the static port aggregation has a serious defect that if the port state in the aggregation group is DOWN, traffic is sent to the port, which may result in loss of traffic.
Disclosure of Invention
The invention aims to provide a method and a system for aggregation FAILOVER of switch ports, which realize the function of FAILOVER by monitoring the states of the ports to establish and delete aggregation groups.
The technical scheme provided by the invention is as follows:
the invention discloses a failover aggregation method for a switch port, which comprises the following steps: s1: monitoring the port state of the switch; s2: when the state of a port of a switch is changed, deleting an aggregation group where the port is located; s3: a new aggregate group is created based on the state of the port, with or without the port.
Further preferably, before the step S1 "monitoring the switch port status", the method further includes the steps of: s0: the switch is initialized.
Further preferably, the step S1 "monitoring the switch port status" further includes: s11: setting a hook function; the step S2, "when the state of the switch port is changed, deleting the aggregation group in which the port is located" specifically includes: s21: and when the state of the switch port is changed, calling the hook function and deleting the aggregation group where the port is located.
The invention also discloses another method for aggregating failover of the switch ports, which comprises the following steps: s1: monitoring the port state of the switch; s11: setting a hook function; s21: when the state of a switch port is changed, calling the hook function and deleting the aggregation group where the port is located; s31: and detecting the UP/DOWN state of the current port, and calling the hook function to create a new aggregation group when the state of the port is changed from UP to DOWN, wherein the new aggregation group does not comprise the current port.
The invention also discloses another method for aggregating failover of the switch ports, which comprises the following steps: s1: monitoring the port state of the switch; s11: setting a hook function; s21: when the state of a switch port is changed, calling the hook function and deleting the aggregation group where the port is located; s32: and detecting the UP/DOWN state of the current port, and calling the hook function to create a new aggregation group when the state of the port is changed from DOWN to UP, wherein the new aggregation group comprises the current port.
The invention also discloses a switch port aggregation failover system, which comprises: the monitoring module is used for monitoring whether the port state of the switch is changed; the deleting module deletes the aggregation group where the port is located when the monitoring module monitors that the state of the switch port changes; the detection module detects the state of the port; the creating module is used for creating a new aggregation group according to the state of the port detected by the detection module; the new aggregate group may or may not include the port.
Further preferably, the switch port aggregation failover system further includes: and the initialization module is used for initializing the switch.
Further preferably, the switch port aggregation failover system further includes a setting module that sets a hook function; and the deleting module calls the hook function when the state of the port of the switch is changed, and deletes the aggregation group where the port is located.
Further preferably, when the detecting module detects that the state of the port changes from UP to DOWN, the creating module calls the hook function to create a new aggregation group, where the new aggregation group does not include the current port.
Further preferably, when the detecting module detects that the state of the port changes from DOWN to UP, the creating module calls the hook function to create a new aggregation group, where the new aggregation group includes the current port.
Compared with the prior art, the invention has the advantages that: the method for realizing the switch port aggregation failover in the prior art needs hardware chip support or software to start the LACP protocol, and both the methods may not be supported in some specific environments. The invention mainly provides a method for realizing the switch port aggregation failover function through software, which does not need the support of switch chip hardware or starts the LACP protocol, but realizes the function through a simple mode of adding and deleting aggregation groups.
Drawings
The present invention will be further described in the following detailed description of preferred embodiments, which is to be read in connection with the accompanying drawings.
Fig. 1 is a schematic diagram of main steps of a failover method for port aggregation of a switch according to the present invention;
fig. 2 is a schematic step diagram of a specific embodiment of a method for aggregating failover of a switch port according to the present invention;
fig. 3 is a schematic step diagram of another embodiment of a method for aggregating failover of a switch port according to the present invention;
fig. 4 is a schematic structural diagram of a switch port aggregation failover system according to the present invention.
The reference numbers illustrate:
100. the system comprises a monitoring module, a 200 deleting module, a 300 detecting module, a 400 creating module, a 500 initializing module and a 600 setting module.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
FIG. 1 is a schematic diagram of the main steps of one embodiment of the present invention. As a specific embodiment of the present invention, as shown in fig. 1, a method for aggregating failover of switch ports includes the steps of: s1: monitoring the port state of the switch; s2: when the state of a port of a switch is changed, deleting an aggregation group where the port is located; s3: a new aggregate group is created based on the state of the port, with or without the port.
The invention mainly aims to realize the failover function of the aggregation port in the switch which does not support the LACP protocol. When the port state is changed, the software can automatically adjust the setting of the static TRUNK, and the data channel is ensured not to be interrupted.
Preferably, before the step S1 "monitoring the switch port status", the method further includes the steps of: s0: the switch is initialized.
Preferably, the step S1 "monitoring the switch port status" further includes: s11: setting a hook function; the step S2, "when the state of the switch port is changed, deleting the aggregation group in which the port is located" specifically includes: s21: and when the state of the switch port is changed, calling the hook function and deleting the aggregation group where the port is located.
Fig. 2 is a schematic step diagram of a specific embodiment of a switch port failover aggregation method according to the present invention, and a preferred embodiment is obtained by improving the above embodiment, as shown in fig. 2, a switch port failover aggregation method includes the steps of: s1: monitoring the port state of the switch; s11: setting a hook function; s21: when the state of a switch port is changed, calling the hook function and deleting the aggregation group where the port is located; s31: and detecting the UP/DOWN state of the current port, and calling the hook function to create a new aggregation group when the state of the port is changed from UP to DOWN, wherein the new aggregation group does not comprise the current port.
Fig. 3 is a schematic step diagram of another specific embodiment of a switch port failover aggregation method according to the present invention, and a preferred embodiment is obtained by improving the foregoing embodiment, as shown in fig. 3, a switch port failover aggregation method includes the steps of: s1: monitoring the port state of the switch; s11: setting a hook function; s21: when the state of a switch port is changed, calling the hook function and deleting the aggregation group where the port is located; s32: and detecting the UP/DOWN state of the current port, and calling the hook function to create a new aggregation group when the state of the port is changed from DOWN to UP, wherein the new aggregation group comprises the current port.
Specifically, after the switch is initialized, a task for monitoring the port state is started, and a hook function is set in the task. When the state of the port is changed, the hook function is called, if the port with the state change (UP/DOWN) is in the aggregation group, the following operations are carried out on the aggregation group:
1, if the port state is changed from UP to DOWN, deleting the original aggregation group, and then creating a new aggregation group without the port, wherein other ports are not changed.
2, if the port state is changed from DOWN to UP, deleting the original aggregation group and then adding the port to the core aggregation group.
Fig. 4 is a schematic structural diagram of a switch port aggregation failover system according to the present invention. The foregoing embodiment is improved to obtain another switch port aggregation failover system, as shown in fig. 4, including: a monitoring module 100 for monitoring whether the port status of the switch changes; a deleting module 200, configured to delete the aggregation group in which the port is located when the monitoring module 100 monitors that the state of the switch port changes; a detection module 300 for detecting the state of the port; a creating module 400 for creating a new aggregation group according to the port status detected by the detecting module 300; the new aggregate group may or may not include the port.
Preferably, the switch port aggregation failover system further includes: an initialization module 500 is configured to initialize a switch.
Preferably, the switch port aggregation failover system further includes a setting module 600 configured to set a hook function; the deleting module 200 calls the hook function when the state of the switch port is changed, and deletes the aggregation group where the port is located.
Preferably, when the detecting module 300 detects that the state of the port changes from UP to DOWN, the creating module 400 calls the hook function to create a new aggregation group, where the new aggregation group does not include the current port.
Preferably, when the detecting module 300 detects that the state of the port changes from DOWN to UP, the creating module 400 calls the hook function to create a new aggregation group, where the new aggregation group includes the current port.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (4)
1. A method for aggregating failover of switch ports is characterized by comprising the following steps:
s1: monitoring the port state of the switch; the switch does not support the LACP protocol, and the monitoring of the port state of the switch comprises the following steps: s11: setting a hook function;
s2: when the state of the port of the switch is changed, deleting the aggregation group where the port is located, comprising the following steps: s21: when the state of a switch port is changed, calling the hook function and deleting the aggregation group where the port is located;
s3: creating a new aggregation group according to the state of the port, wherein the new aggregation group includes or does not include the port, and the data channel is ensured not to be interrupted, specifically comprising the following steps:
s31: detecting the UP/DOWN state of the current port, and calling the hook function to create a new aggregation group when the state of the port is changed from UP to DOWN, wherein the new aggregation group does not comprise the current port;
s32: and detecting the UP/DOWN state of the current port, and calling the hook function to create a new aggregation group when the state of the port is changed from DOWN to UP, wherein the new aggregation group comprises the current port.
2. The switch port aggregation failover method according to claim 1, wherein the step S1 "monitoring the port status of the switch" is preceded by the step of:
s0: the switch is initialized.
3. A switch port aggregation failover system, comprising:
the monitoring module is used for monitoring whether the port state of the switch is changed; the switch does not support the LACP protocol, and comprises the following steps: the setting module is used for setting a hook function;
the deleting module is used for deleting the aggregation group where the port is located when the monitoring module monitors that the state of the switch port changes, and calling the hook function to delete the aggregation group where the port is located when the state of the switch port changes;
the detection module detects the state of the port;
the creating module is used for creating a new aggregation group according to the state of the port detected by the detection module; the new aggregation group may or may not include the port, and it is ensured that the data channel is not interrupted, specifically including:
when the detection module detects that the state of the port is changed from UP to DOWN, the creation module calls the hook function to create a new aggregation group, and the new aggregation group does not comprise the current port;
when the detection module detects that the state of the port is changed from DOWN to UP, the creation module calls the hook function to create a new aggregation group, and the new aggregation group comprises the current port.
4. The switch port aggregation failover system of claim 3, further comprising: and the initialization module is used for initializing the switch.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610133237.6A CN105656772B (en) | 2016-03-09 | 2016-03-09 | Method and system for aggregating failover of switch ports |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610133237.6A CN105656772B (en) | 2016-03-09 | 2016-03-09 | Method and system for aggregating failover of switch ports |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105656772A CN105656772A (en) | 2016-06-08 |
CN105656772B true CN105656772B (en) | 2020-02-04 |
Family
ID=56492436
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610133237.6A Active CN105656772B (en) | 2016-03-09 | 2016-03-09 | Method and system for aggregating failover of switch ports |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105656772B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111049765B (en) * | 2019-12-12 | 2022-03-11 | 北京东土军悦科技有限公司 | Aggregation port switching method, device, chip, switch and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101018228A (en) * | 2006-12-22 | 2007-08-15 | 华为技术有限公司 | A port convergence method and device |
CN101252459A (en) * | 2008-03-24 | 2008-08-27 | 中兴通讯股份有限公司 | Method for setting protocol state of chain circuit terminal port and supervising method thereof |
CN102123070A (en) * | 2010-01-11 | 2011-07-13 | 中兴通讯股份有限公司 | System for realizing master/slave frame cascade protection and load sharing |
CN104092604A (en) * | 2014-07-02 | 2014-10-08 | 杭州华三通信技术有限公司 | Message transmission control method and device |
CN104468203A (en) * | 2014-11-26 | 2015-03-25 | 上海斐讯数据通信技术有限公司 | Allocating method of fault switching of ports in switch aggregation group |
CN105357058A (en) * | 2015-12-04 | 2016-02-24 | 上海斐讯数据通信技术有限公司 | Method and device for switch port aggregation through physical button |
-
2016
- 2016-03-09 CN CN201610133237.6A patent/CN105656772B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101018228A (en) * | 2006-12-22 | 2007-08-15 | 华为技术有限公司 | A port convergence method and device |
CN101252459A (en) * | 2008-03-24 | 2008-08-27 | 中兴通讯股份有限公司 | Method for setting protocol state of chain circuit terminal port and supervising method thereof |
CN102123070A (en) * | 2010-01-11 | 2011-07-13 | 中兴通讯股份有限公司 | System for realizing master/slave frame cascade protection and load sharing |
CN104092604A (en) * | 2014-07-02 | 2014-10-08 | 杭州华三通信技术有限公司 | Message transmission control method and device |
CN104468203A (en) * | 2014-11-26 | 2015-03-25 | 上海斐讯数据通信技术有限公司 | Allocating method of fault switching of ports in switch aggregation group |
CN105357058A (en) * | 2015-12-04 | 2016-02-24 | 上海斐讯数据通信技术有限公司 | Method and device for switch port aggregation through physical button |
Also Published As
Publication number | Publication date |
---|---|
CN105656772A (en) | 2016-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104301321B (en) | A kind of method and system for realizing distributed network security protection | |
US9655232B2 (en) | Spanning tree protocol (STP) optimization techniques | |
CN103092691B (en) | A kind of process management method and administrative unit of Android system | |
CN105745883B (en) | Forwarding table synchronous method, the network equipment and system | |
WO2015106729A1 (en) | A load balancing method, device, system and computer storage medium | |
CN106888111B (en) | A method of solving dual computer group FC-SAN switching | |
US9225483B2 (en) | Virtual data center bridging exchange (vDCBX) protocol | |
CN103905326A (en) | Ethernet link aggregation packet forwarding control method and network equipment | |
CN102684979A (en) | Multicast data forwarding method and device capable of supporting virtual terminal | |
CN101110820B (en) | Method and switchboard for processing spanning tree protocol message | |
CN103888337A (en) | Networking method of multi-system all-in-one machine and multi-system all-in-one machine | |
CN102710486B (en) | Channel S state advertisement method and apparatus | |
CN104243285A (en) | Message pushing method and server | |
WO2023184983A1 (en) | Method, apparatus and system for direct connection control of air conditioner, and storage medium | |
CN109246762A (en) | A kind of local service shunt method and device | |
CN102217255B (en) | Method for high-speed link auto negotiation and single boards | |
CN105656772B (en) | Method and system for aggregating failover of switch ports | |
CN105049617B (en) | A kind of mobile communication terminal method for switching network, system and mobile communication terminal | |
CN106790411B (en) | The non-polymeric port cascade system and method for virtual switch and physical switches | |
CN103514121B (en) | A kind of network card redundancy switching method under WindowsXp operating system | |
AU2011229566A1 (en) | Load sharing method and apparatus | |
CN111813576A (en) | Business service management method and system based on micro-service | |
CN101917682A (en) | Information transmitting method and system for mobile terminal and mobile terminal | |
CN103067956A (en) | Internet Protocol Security (IPSec) tunnel backing up and switching method and equipment in 3rd generation telecommunication (3G) network | |
CN103780472A (en) | Selected port management method and device of aggregate port group |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20201112 Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province Patentee after: Hangzhou Jiji Intellectual Property Operation Co., Ltd Address before: 201616 Shanghai city Songjiang District Sixian Road No. 3666 Patentee before: Phicomm (Shanghai) Co.,Ltd. |