Summary of the invention
The embodiment of the invention provides a kind of link switch-over method and relevant apparatus, is used for realizing that link switches fast.
Embodiment of the invention first aspect provides a kind of link switch-over method, comprising:
Bypass equipment receives the link switching order that safe forthright equipment sends;
Described bypass equipment responds described link switching order, will route to from the business data flow of the first side ethernet port input to export from the second side ethernet port after described bypass equipment is processed; Wherein, described bypass equipment and described safe forthright equipment share described the first side ethernet port and the second side ethernet port.
In the possible implementation of the first of embodiment of the invention first aspect, the link switching order that described bypass equipment receives safe forthright equipment transmission comprises:
Bypass equipment receives the link switching order that safe forthright equipment sends by management channels.
In conjunction with embodiment of the invention first aspect, or the possible implementation of the first of embodiment of the invention first aspect, in the possible implementation of the second of embodiment of the invention first aspect, described method also comprises:
Described bypass equipment sends heartbeat message to described safe forthright equipment, and detect and whether in Preset Time, receive the heartbeat message that described safe forthright equipment returns, if not, then will route to from the business data flow of the first side ethernet port input and export from the second side ethernet port after described bypass equipment is processed.
In conjunction with the possible implementation of the second of embodiment of the invention first aspect, in the third possible implementation of embodiment of the invention first aspect, described the first side ethernet port and the second side ethernet port are configured to respectively main frame MASTER pattern and slave SLAVE pattern, and described method also comprises:
Trigger described the first side ethernet port during described bypass equipment power down and the second side ethernet port physics is direct-connected, so that export from described the second side ethernet port from the business data flow of described the first side ethernet port input.
Embodiment of the invention second aspect provides a kind of bypass equipment, comprises logic switching device shifter, the first side ethernet port and the second side ethernet port;
Described logic switching device shifter, be used for receiving the link switching order that safe forthright equipment sends, and respond described link switching order, will route to from the business data flow of described the first side ethernet port input described logic switching device shifter and process rear from described the second side ethernet port output; Wherein, described logic switching device shifter and described safe forthright equipment share described the first side ethernet port and described the second side ethernet port.
In the possible implementation of the first of second of the embodiment of the invention, the concrete mode that described logic switching device shifter receives the link switching order of safe forthright equipment transmission is:
Described logic switching device shifter is used for receiving the link switching order that safe forthright equipment sends by management channels.
In conjunction with embodiment of the invention second aspect, or the possible implementation of the first of embodiment of the invention second aspect, in the possible implementation of the second of embodiment of the invention second aspect, described bypass equipment also comprises the logic heartbeat detection device that links with described logic switching device shifter, be used for sending heartbeat message to described safe forthright equipment, and detect and whether in Preset Time, receive the heartbeat message that described safe forthright equipment returns, if not, then trigger described logic switching device shifter and will route to described logic switching device shifter from the business data flow of described the first side ethernet port input and process after from described the second side ethernet port output;
Described logic switching device shifter also is used for after will routing to described logic switching device shifter from the business data flow of described the first side ethernet port input under the triggering of described logic heartbeat detection device and processing from described the second side ethernet port output.
In conjunction with the possible implementation of the second of embodiment of the invention second aspect, in the third possible implementation of embodiment of the invention second aspect, described the first side ethernet port and the second side ethernet port are configured to respectively main frame MASTER pattern and slave SLAVE pattern, described bypass equipment also comprises physical switch, be used for when described bypass equipment power down, triggering described the first side ethernet port and the second side ethernet port physics is direct-connected, so that export from described the second side ethernet port from the business data flow of described the first side ethernet port input.
The embodiment of the invention third aspect provides a kind of link switching system, comprises bypass equipment and safe forthright equipment, and wherein, described bypass equipment comprises logic switching device shifter, the first side ethernet port and the second side ethernet port; Described logic switching device shifter and described safe forthright equipment share described the first side ethernet port and described the second side ethernet port;
Described logic switching device shifter, be used for receiving the link switching order that described safe forthright equipment sends, and respond described link switching order, will route to from the business data flow of described the first side ethernet port input described logic switching device shifter and process rear from described the second side ethernet port output.
In the possible implementation of the first of the 3rd of the embodiment of the invention, the concrete mode that described logic switching device shifter receives the link switching order of safe forthright equipment transmission is:
Described logic switching device shifter is used for receiving the link switching order that safe forthright equipment sends by management channels.
In conjunction with the embodiment of the invention third aspect, or the possible implementation of the first of the embodiment of the invention third aspect, in the possible implementation of the second of the embodiment of the invention third aspect, described bypass equipment also comprises the logic heartbeat detection device that links with described logic switching device shifter, be used for sending heartbeat message to described safe forthright equipment, and detect and whether in Preset Time, receive the heartbeat message that described safe forthright equipment returns, if not, then trigger described logic switching device shifter and will route to described logic switching device shifter from the business data flow of described the first side ethernet port input and process after from described the second side ethernet port output;
Described logic switching device shifter also is used for after will routing to described logic switching device shifter from the business data flow of described the first side ethernet port input under the triggering of described logic heartbeat detection device and processing from described the second side ethernet port output.
In conjunction with the possible implementation of the second of the embodiment of the invention third aspect, in the third possible implementation of the embodiment of the invention third aspect, described the first side ethernet port and the second side ethernet port are configured to respectively main frame MASTER pattern and slave SLAVE pattern, described bypass equipment also comprises physical switch, be used for when described bypass equipment power down, triggering described the first side ethernet port and the second side ethernet port physics is direct-connected, so that export from described the second side ethernet port from the business data flow of described the first side ethernet port input.
In the embodiment of the invention, bypass equipment is after the link switching order that receives safe forthright equipment transmission, can respond this link switching order, to route to from the business data flow of the first side ethernet port input and export from the second side ethernet port after bypass equipment is processed, because bypass equipment and safe forthright equipment share the first side ethernet port and the second side ethernet port, so that bypass equipment need not to carry out the again negotiation of upstream and downstream port again when link switching, thereby can realize that link switches fast, avoid the link switching overlong time and client's loss of vital data of causing.
In the embodiment of the invention, bypass equipment can also send heartbeat message to safe forthright equipment, and when in Preset Time, not receiving the heartbeat message that safe forthright equipment returns, will route to from the business data flow of the first side ethernet port input and export from the second side ethernet port after bypass equipment is processed.The embodiment of the invention can be saved safe forthright equipment periodic and initiatively send heartbeat, thereby can effectively reduce the cpu load of safe forthright equipment.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
The embodiment of the invention provides a kind of link switch-over method and relevant apparatus, system, the method, device and system need not to carry out the again negotiation of upstream and downstream port when link switching, can realize that link switches fast, client's loss of vital data of avoiding the link switching overlong time and causing, initiatively send heartbeat but also can save safe forthright equipment periodic, effectively reduce the cpu load of safe forthright equipment.Below be elaborated respectively.
See also Fig. 1, Fig. 1 is the flow chart of a kind of link switch-over method of providing of the embodiment of the invention.As shown in Figure 1, this link switch-over method can may further comprise the steps.
101, bypass equipment receives the link switching order that safe forthright equipment sends.
Among the embodiment, bypass equipment can be by management channels and safe forthright linking of devices, and correspondingly, bypass equipment can receive the link switching order that safe forthright equipment sends by management channels.
In the embodiment of the invention, safe forthright equipment initiatively sends the link switching order to bypass equipment by management channels, can realize the link switching of initiatively being initiated by safe forthright equipment.
In the embodiment of the invention, safe forthright equipment comprises the safe forthright equipment such as UTM, the DDOS of potential safety hazards such as can eliminating virus, wooden horse, spam, assault and DPI, and the embodiment of the invention is not done concrete restriction.Among the embodiment, bypass equipment also can be and the equipment of safe forthright equipment same type that the embodiment of the invention is not construed as limiting.
102, bypass equipment responds this link switching order, will route to from the business data flow of the first side ethernet port input to export from the second side ethernet port after bypass equipment is processed; Wherein, bypass equipment and safe forthright equipment share the first side ethernet port and the second side ethernet port.
In the embodiment of the invention, bypass equipment can carry out the processing identical with safe forthright equipment to the business data flow that flows into, such as service traffics being detected, analyze and the safety service such as filtration being processed.
Among the embodiment, the described link switch-over method of Fig. 1 is further comprising the steps of:
Bypass equipment sends heartbeat message to safe forthright equipment, and detect and whether in Preset Time, receive the heartbeat message that safe forthright equipment returns, if not, then will route to from the business data flow of the first side ethernet port input and export from the second side ethernet port after described bypass equipment is processed.
Because the interface bandwidth of present safe forthright equipment is all very high, so even bypass equipment sends a heartbeat message to safe forthright equipment every 1ms, for the CPU of safe forthright equipment, also can not bring very large load.Under passive link switching scene, the precision that bypass equipment carries out link switching has just reached Millisecond like this, if necessary, can also be with precision setting higher.
Among the embodiment, the first side ethernet port and the second side ethernet port can be configured to respectively main frame (MASTER) pattern and slave (SLAVE) pattern in the described link switch-over method of Fig. 1, correspondingly, the described link switch-over method of Fig. 1 is further comprising the steps of:
Trigger the first side ethernet port during the bypass equipment power down and the second side ethernet port physics is direct-connected, so that export from the second side ethernet port from the business data flow of the first side ethernet port input.
In the described link switch-over method of Fig. 1, bypass equipment is after the link switching order that receives safe forthright equipment transmission, can respond this link switching order, to route to from the business data flow of the first side ethernet port input and export from the second side ethernet port after bypass equipment is processed, because bypass equipment and safe forthright equipment share the first side ethernet port and the second side ethernet port, so that bypass equipment need not to carry out the again negotiation of upstream and downstream port again when link switching, thereby can realize that link switches fast, avoid the link switching overlong time and client's loss of vital data of causing.
In the described link switch-over method of Fig. 1, bypass equipment can also send heartbeat message to safe forthright equipment, and when in Preset Time, not receiving the heartbeat message that safe forthright equipment returns, will route to from the business data flow of the first side ethernet port input and export from the second side ethernet port after bypass equipment is processed.The embodiment of the invention can be saved safe forthright equipment periodic and initiatively send heartbeat, thereby can effectively reduce the cpu load of safe forthright equipment.
See also Fig. 2, Fig. 2 is the structure chart of a kind of bypass equipment of providing of the embodiment of the invention.As shown in Figure 2, this bypass equipment can comprise:
Logic switching device shifter 1, the first side ethernet port A and the second side ethernet port B;
Wherein, logic switching device shifter 1, be used for receiving the link switching order that safe forthright equipment sends, and respond this link switching order, will route to from the business data flow of the first side ethernet port input and export from the second side ethernet port after logic switching device shifter 1 is processed; Wherein, logic switching device shifter 1 and safe forthright equipment share the first side ethernet port A and the second side ethernet port B.
In the embodiment of the invention, the concrete mode that logic switching device shifter 1 receives the link switching order of safe forthright equipment transmission is:
Logic switching device shifter 1 is used for receiving the link switching order that safe forthright equipment sends by management channels.
See also Fig. 3, Fig. 3 is the structure chart of the another kind of bypass equipment that provides of the embodiment of the invention.Wherein, bypass equipment shown in Figure 3 is to be optimized by bypass equipment shown in Figure 2 to obtain.As shown in Figure 3, this bypass equipment can also comprise:
The logic heartbeat detection device 2 that links with logic switching device shifter 1, be used for sending heartbeat message to safe forthright equipment, and detect and whether in Preset Time, receive the heartbeat message that safe forthright equipment returns, if not, then triggering logic switching device shifter 1 will route to from the business data flow of the first side ethernet port A input and export from the second side ethernet port B after logic switching device shifter 1 is processed;
Correspondingly, logic switching device shifter 1 also is used for exporting from the second side ethernet port B after will routing to logic switching device shifter 1 from the business data flow of the first side ethernet port A input under the triggering of logic heartbeat detection device 2 and processing.
Among the embodiment, the first side ethernet port A and the second side ethernet port B of Fig. 2 or bypass equipment shown in Figure 3 can be configured to respectively MASTER pattern and SLAVE pattern, correspondingly, bypass equipment also comprises physical switch, be used for when institute's bypass equipment power down, triggering the first side ethernet port A and the second side ethernet port B physics is direct-connected, so that export from the second side ethernet port B from the business data flow of the first side ethernet port A input.
The bypass equipment that the embodiment of the invention provides is after the link switching order that receives safe forthright equipment transmission, can respond this link switching order, to route to from the business data flow of the first side ethernet port input and export from the second side ethernet port after bypass equipment is processed, because bypass equipment and safe forthright equipment share the first side ethernet port and the second side ethernet port, so that bypass equipment need not to carry out the again negotiation of upstream and downstream port again when link switching, thereby can realize that link switches fast, avoid the link switching overlong time and client's loss of vital data of causing.
The bypass equipment that the embodiment of the invention provides can also send heartbeat message to safe forthright equipment, and when in Preset Time, not receiving the heartbeat message that safe forthright equipment returns, will route to from the business data flow of the first side ethernet port input and export from the second side ethernet port after bypass equipment is processed.The embodiment of the invention can be saved safe forthright equipment periodic and initiatively send heartbeat, thereby can effectively reduce the cpu load of safe forthright equipment.
See also Fig. 4, Fig. 4 is the structure chart of a kind of link switching system of providing of the embodiment of the invention.As shown in Figure 4, this link switching system can comprise bypass equipment 41 and safe forthright equipment 42, and wherein, bypass equipment 41 comprises logic switching device shifter 1, the first side ethernet port A and the second side ethernet port B; Logic switching device shifter 1 and safe forthright equipment 42 share the first side ethernet port A and the second side ethernet port B, wherein:
Logic switching device shifter 1, be used for receiving the link switching order that safe forthright equipment 42 sends, and respond this link switching order, will route to from the business data flow of the first side ethernet port A input and export from the second side ethernet port B after logic switching device shifter 1 is processed.
That is, logic switching device shifter 1 is used for and will inputs the business datum stream (Fig. 4 solid line) of safe forthright equipment 42 by exporting (dotted line sign Fig. 4) from the second side ethernet port B after processing to logic switching device shifter 1 from the first side ethernet port A.
Among the embodiment, logic switching device shifter 1 can link by management channels and safe forthright equipment 42, and correspondingly, the concrete mode that logic switching device shifter 1 receives the link switching order of safe forthright equipment 42 transmissions is:
Logic switching device shifter 1 is used for receiving the link switching order that safe forthright equipment 42 sends by management channels.
In link switching system shown in Figure 4, initiatively trigger logic switching device shifter 1 by safe forthright equipment 42 and carry out link switching.When safe forthright equipment 42 needs to trigger the logic switching device shifter and carries out link switching under certain scene, safe forthright equipment 42 can issue the link switching order to the logic switching device shifter 1 of bypass equipment 41 by management channels, after logic switching device shifter 1 is received this link switching order, the business data flow (solid line Fig. 4) of originally inputting safe forthright equipment 42 from the first side ethernet port A is routed to dotted line sign among logic switching device shifter 1(Fig. 4) export from the second side ethernet port B after processing, namely the business data flow between the first side ethernet port A and the second side ethernet port B is directly processed in logic device 1 inside, send safe forthright equipment 42 on no longer.This link switching process is only adjusted the trend of business data flow, do not relate to the first side ethernet port A and the second side ethernet port B, do not need to carry out the heavily negotiation of upstream and downstream port, therefore can realize that link switches fast, client's loss of vital data of having avoided the link switching overlong time and having caused is accomplished zero packet loss.
See also Fig. 5, Fig. 5 is the structure chart of the another kind of link switching system that provides of the embodiment of the invention.Wherein, link switching system shown in Figure 5 is to be optimized by link switching system shown in Figure 4 to obtain.Compare with link switching system shown in Figure 4, link switching system shown in Figure 5 also comprises:
The logic heartbeat detection device 2 that links with logic switching device shifter 1, be used for sending heartbeat message to safe forthright equipment 42, and detect and whether in Preset Time, receive the heartbeat message that safe forthright equipment 42 returns, if not, then triggering logic switching device shifter 1 will route to from the business data flow of the first side ethernet port A input and export from the second side ethernet port B after logic switching device shifter 1 is processed;
Correspondingly, logic switching device shifter 1 also is used for exporting from the second side ethernet port B after will routing to logic switching device shifter 1 from the business data flow of the first side ethernet port A input under the triggering of logic heartbeat detection device 2 and processing.
In the embodiment of the invention, when safe forthright equipment 42 breaks down (non-power-failure), can't the scene of normal process business data flow under, just need bypass equipment initiatively to carry out link switching.As shown in Figure 5, logic heartbeat detection device 2 can regularly send heartbeat message (transmission frequency can arrange) by interface C to safe forthright equipment 42, after safe forthright equipment 42 is received this type of heartbeat message, this type of heartbeat message is returned to logic heartbeat detection device 2 by interface D.If logic heartbeat detection device 2 can be received heartbeat message in Preset Time, think that then safe forthright equipment is working properly, otherwise think that then heartbeat loses.When heartbeat was lost, logic heartbeat detection device 2 can trigger logic switching device shifter 1 and carry out link switching.
Because the interface bandwidth of safe forthright equipment 42 is all very high, so even logic heartbeat detection device 2 sends a heartbeat message every 1ms, also can not bring very large pressure for the CPU of safe forthright equipment 42.Under passive handoff scenario, the precision that logic switching device shifter 1 carries out link switching has just reached Millisecond like this, if necessary, can be with precision setting higher.
In the embodiment of the invention, the design of the heartbeat message type of logic heartbeat detection device 2 can be more flexible, logic heartbeat detection device 2 can send specific ethernet type heartbeat message, and is such as the type field of Ethernet message can being defined as privately owned sign, as shown in table 1 below:
Table 1
Wherein, safe forthright equipment 42 can directly be done special processing with heartbeat message after receiving this type of heartbeat message, more safe and reliable like this.
See also Fig. 6, Fig. 6 is the structure chart of another link switching system of providing of the embodiment of the invention.Wherein, link switching system shown in Figure 6 is to be optimized and to be obtained by Fig. 5, link switching system shown in Figure 4.Compare with Fig. 5, link switching system shown in Figure 4, in link switching system shown in Figure 6, the first side ethernet port A and the second side ethernet port B can be configured to respectively MASTER pattern and SLAVE pattern, logic switching device shifter 1 also is used for triggering the first side ethernet port A when the bypass equipment power down and the second side ethernet port B physics is direct-connected like this, so that export from the second side ethernet port B from the business data flow of the first side ethernet port A input.
As shown in Figure 6, at first software is configured to the MASTER pattern with the first side ethernet port A of bypass equipment interface centering in starting configuration, the second side ethernet port B is configured to the SLAVE pattern, the network port C that docks with the first side ethernet port A like this will consult the pattern into SLAVE, and the network port D that docks with the second side ethernet port B will consult the pattern into MASTER; When powered-off fault appears in bypass equipment, physical switch can trigger action, the AB ports physical is direct-connected, be equivalent to network port CD docking, because the CD port had originally consulted to be MASTER and SLAVE, the CD network-side port need not again to consult again behind the analog switch action link switching like this, and link will continue to keep the UP state, thereby realizes the quick link switching function.Wherein, triggering the simulation switch motion can be realized by logic switching device shifter 1.
See also Fig. 7, Fig. 7 is the structure chart of another link switching system of providing of the embodiment of the invention.In link switched system shown in Figure 7, comprise by 2 physical interface GE0, GE1(can adjust interface type and quantity), relay simulation switching device shifter, (quantity and interface are corresponding for 2 ethernet PHY chips, being configured to PHY0 by software is MASTER, and PHY1 is SLAVE in addition), bypass equipment and safe forthright equipment that fpga chip (being used for realizing the function of logic switching device shifter and logic heartbeat detection device) consists of.In normal operation, business data flow enters bypass equipment by the GE0/GE1 mouth and delivers to safe forthright equipment again and process and then send from the GE1/GE0 port; Under safe forthright equipment fault (non-power-failure) state, business data flow is processed by the logic switching device shifter of fpga chip inside, no longer delivers to safe forthright device processes; And when the bypass equipment power down, the GE0/GE1 interface realizes that by relay physics is direct-connected.
In link switching system shown in Figure 7, PHY0 and GE0 have consisted of the first side ethernet port A, and PHY1 and GE1 have consisted of the second side ethernet port B.
The link switching system that the embodiment of the invention provides is after the link switching order that receives safe forthright equipment transmission, can respond this link switching order, to route to from the business data flow of the first side ethernet port input and export from the second side ethernet port after bypass equipment is processed, because bypass equipment and safe forthright equipment share the first side ethernet port and the second side ethernet port, so that bypass equipment need not to carry out the again negotiation of upstream and downstream port again when link switching, thereby can realize that link switches fast, avoid the link switching overlong time and client's loss of vital data of causing.
The link switching system that the embodiment of the invention provides can also send heartbeat message to safe forthright equipment, and when in Preset Time, not receiving the heartbeat message that safe forthright equipment returns, will route to from the business data flow of the first side ethernet port input and export from the second side ethernet port after bypass equipment is processed.The embodiment of the invention can be saved safe forthright equipment periodic and initiatively send heartbeat, thereby can effectively reduce the cpu load of safe forthright equipment.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to come the relevant hardware of instruction finish by program, this program can be stored in the computer-readable recording medium, storage medium can comprise: flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), disk or CD etc.
Above link switch-over method, system and the equipment that the embodiment of the invention is provided is described in detail, used specific case herein principle of the present invention and execution mode are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.