CN113328933B - Data traffic forwarding method and system - Google Patents

Data traffic forwarding method and system Download PDF

Info

Publication number
CN113328933B
CN113328933B CN202110585526.0A CN202110585526A CN113328933B CN 113328933 B CN113328933 B CN 113328933B CN 202110585526 A CN202110585526 A CN 202110585526A CN 113328933 B CN113328933 B CN 113328933B
Authority
CN
China
Prior art keywords
equipment
protocol
vrrp
state
standby
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110585526.0A
Other languages
Chinese (zh)
Other versions
CN113328933A (en
Inventor
王海波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202110585526.0A priority Critical patent/CN113328933B/en
Publication of CN113328933A publication Critical patent/CN113328933A/en
Application granted granted Critical
Publication of CN113328933B publication Critical patent/CN113328933B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects

Abstract

The disclosure relates to a data traffic forwarding method, system, electronic device, and computer readable medium. The method can be applied to a network supporting an OSPF protocol and a VRRP protocol, and comprises the following steps: establishing a neighbor relation based on an OSPF protocol between main equipment and interconnection equipment based on a VRRP protocol; determining a forwarding path based on the OSPF protocol of the master device to forward data traffic; when the VRRP state of the main equipment is switched, the standby equipment based on the VRRP protocol is started; and determining a forwarding path based on the OSPF protocol of the standby equipment for data traffic forwarding. The data traffic forwarding method, the data traffic forwarding system, the electronic equipment and the computer readable medium can solve the problems of disordered route learning and wrong traffic forwarding caused by the fact that the main equipment and the standby equipment need to establish OSPF neighbors with the interconnection equipment under VRRP networking.

Description

Data traffic forwarding method and system
Technical Field
The present disclosure relates to the field of computer information processing, and in particular, to a data traffic forwarding method, system, electronic device, and computer readable medium.
Background
An Open Shortest Path First (OSPF) Protocol and a Virtual Router Redundancy (VRRP) Protocol are both common traffic forwarding protocols, and at present, OSPF is based on interfaces to establish neighbors and learn routes, so that OSPF must establish OSPF neighbors with two VRRP devices simultaneously in a networking environment of VRRP to ensure that OSPF of a standby device can normally communicate with an interconnection device when a failure occurs in a VRRP primary device.
In the existing scheme, if OSPF is used for three-layer forwarding in a VRRP networking and an interconnection device, the interconnection device must establish OSPF neighbors with a primary device and a standby device of the VRRP respectively. At this time, the interconnection device, the active device and the standby device all form an OSPF neighbor relationship. The routes issued by the interconnection device through the OSPF are advertised to the active device and the standby device, and the routes on the active and standby devices are also issued to two neighbors of the interconnection device through the OSPF. Therefore, any one of the three devices can learn the other two issued OSPF routes, and the route is an equivalent route, and the next hop is two neighboring interface addresses respectively. Therefore, route learning is disordered, the flow cannot be correctly forwarded, the standby equipment receives a large amount of flow which is originally destined for the main equipment, and the operation load and pressure of the standby equipment are increased.
Accordingly, there is a need for new data traffic forwarding methods, systems, electronic devices, and computer readable media that support both the OSPF protocol and the VRRP protocol.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present disclosure provides a data traffic forwarding method, system, electronic device, and computer readable medium, which can solve the problems of confusion of route learning and traffic forwarding error caused by that both the active device and the standby device need to establish an OSPF neighbor with the interconnection device under the VRRP networking.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, a data traffic forwarding method is provided, where the method includes: establishing a neighbor relation based on an OSPF protocol between main equipment and interconnection equipment based on a VRRP protocol; determining a forwarding path based on the OSPF protocol of the master device to forward data traffic; when the VRRP state of the main equipment is switched, the standby equipment based on the VRRP protocol is started; and determining a forwarding path based on the OSPF protocol of the standby equipment so as to forward the data traffic.
In an exemplary embodiment of the present disclosure, further comprising: acquiring the starting states of an OSPF protocol and a VRRP protocol of the main equipment and the standby equipment; and when the OSPF protocol and the VRRP protocol are both in an open state, generating a judgment list according to the current states of the active equipment and/or the standby equipment and the VRRP protocol thereof.
In an exemplary embodiment of the present disclosure, further comprising: reading the current state of the VRRP protocol of the judgment list at regular time; and generating state change information when the current state is inconsistent with the current state read last time.
In an exemplary embodiment of the present disclosure, the establishing, by the active device and the interconnect device based on the VRRP protocol, a neighbor relationship based on the OSPF protocol further includes: and setting the OSPF protocol state of the standby equipment based on the VRRP protocol as invalid.
In an exemplary embodiment of the present disclosure, when the VRRP state of the active device is switched, the method includes: and when the state change information is received, determining the VRRP state switching of the main equipment.
In an exemplary embodiment of the present disclosure, after the standby device based on the VRRP protocol is started, the method further includes: cutting off the neighbor relation between the main equipment and the interconnection equipment; and establishing the neighbor relation between the standby equipment and the interconnection equipment.
In an exemplary embodiment of the present disclosure, cutting off the neighbor relationship between the active device and the interconnect device includes: and setting the state according to the state change information and a preset strategy so as to cut off the neighbor relation between the main equipment and the interconnection equipment.
In an exemplary embodiment of the present disclosure, performing state setting according to the state change information and a preset policy to cut off a neighbor relationship between the active device and the interconnect device includes: and when the interface state of the state change information is changed from active to standby, setting the OSPF protocol state of the active device as invalid.
In an exemplary embodiment of the present disclosure, establishing a neighbor relationship between the standby device and the interconnection device includes: and setting the state according to the state change information and a preset strategy to establish the neighbor relation between the standby equipment and the interconnection equipment.
In an exemplary embodiment of the present disclosure, the performing state setting according to the state change information and a preset policy to establish a neighbor relationship between the standby device and the interconnect device includes: and when the interface state of the state change information is changed from standby to main, setting the OSPF protocol state of the standby equipment to be valid.
According to an aspect of the present disclosure, a data traffic forwarding system is provided, which can be applied in a network supporting OSPF protocol and VRRP protocol, and the apparatus includes: the main equipment supports VRRP protocol and OSPF protocol and is used for forwarding flow; the standby equipment supports VRRP protocol and OSPF protocol and is used for forwarding flow; the interconnection equipment is used for establishing a neighbor relation based on an OSPF protocol with the main equipment or the standby equipment; and the control equipment is used for controlling the standby equipment to start to forward data flow when the VRRP state of the main equipment is switched.
According to an aspect of the present disclosure, an electronic device is provided, the electronic device including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.
According to an aspect of the disclosure, a computer-readable medium is proposed, on which a computer program is stored which, when being executed by a processor, carries out the method as above.
According to the data traffic forwarding method, the data traffic forwarding system, the electronic equipment and the computer readable medium, the VRRP protocol-based main equipment and the interconnection equipment establish a neighbor relation based on an OSPF protocol; determining a forwarding path based on the OSPF protocol of the master device to forward data traffic; when the VRRP state of the main equipment is switched, the standby equipment based on the VRRP protocol is started; the method for determining the forwarding path based on the OSPF protocol of the standby equipment to forward the data traffic can solve the problems of disordered route learning and wrong traffic forwarding caused by the fact that the active equipment and the standby equipment need to establish OSPF neighbors with the interconnection equipment under the VRRP networking.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.
Fig. 1 is a schematic diagram illustrating a data traffic forwarding system in accordance with an exemplary embodiment.
Fig. 2 is a flow diagram illustrating a method of forwarding data traffic in accordance with an example embodiment.
Fig. 3 is a flow chart illustrating a method of forwarding data traffic according to another exemplary embodiment.
Fig. 4 is a flow chart illustrating a method of data traffic forwarding according to another exemplary embodiment.
Fig. 5 is a flow chart illustrating a method of forwarding data traffic according to another exemplary embodiment.
Fig. 6 is a block diagram illustrating a data traffic forwarding system in accordance with an exemplary embodiment.
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 8 is a block diagram illustrating a computer-readable medium in accordance with an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the embodiments of the disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known methods, systems, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below could be termed a second component without departing from the teachings of the disclosed concepts. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.
Technical abbreviations related to the present disclosure:
OSPF (Open Shortest Path First) is a routing protocol developed by IETF (The Internet Engineering Task Force, internet Engineering Task Force). It is a Link State protocol, which maintains a same LSDB (Link State Database) through interaction and flooding LSA (Link State Advertisement, carrying routing information), and calculates the shortest path to all known destinations by using the shortest path first algorithm based on this Database.
VRRP (Virtual Router Redundancy Protocol) is a routing Protocol proposed by IETF to solve the single point failure phenomenon of configuring a static gateway in a local area network, and a formal RFC2338 Protocol standard has been introduced in 1998. Its design goal is to support IP data traffic failover without confusion in certain situations, allow hosts to use a single router, and maintain connectivity between routers even in the event of actual first hop router usage failure. It divides a group of routers in the lan together and is called a backup group. The Backup group consists of a Master router and a Backup router and is functionally equivalent to a virtual router.
Fig. 1 is a system block diagram illustrating a data traffic forwarding method, system, electronic device, and computer readable medium in accordance with an example embodiment.
As shown in fig. 1, the system architecture 10 may include an active device 101, a standby device 102, an interconnect device 103, and a network 104. The network 104 is used to provide a medium for communication links between the active device 101, the standby device 102, and the interconnect device 103. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
Various communication client applications, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like, may be installed on the active device 101, the standby device 102, and the interconnection device 103.
The active device 101, the standby device 102, and the interconnection device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
Establishing a neighbor relation based on an OSPF protocol between the main equipment 101 and the interconnection equipment 103 based on the VRRP protocol; determining a forwarding path based on the OSPF protocol of the active device 101 to forward data traffic; when the VRRP state of the active device 101 is switched, the standby device 102 based on the VRRP protocol is started; determining a forwarding path for data traffic forwarding based on the OSPF protocol of the standby device 102.
Fig. 2 is a flow diagram illustrating a method of forwarding data traffic in accordance with an example embodiment. The data traffic forwarding method 20 includes at least steps S202 to S208.
As shown in fig. 2, in S202, the active device and the interconnect device based on the VRRP protocol establish a neighbor relationship based on the OSPF protocol. Further comprising: and setting the OSPF protocol state of the standby equipment based on the VRRP protocol as invalid.
In one embodiment, further comprising: acquiring the starting states of an OSPF protocol and a VRRP protocol of the main equipment and the standby equipment; and when the OSPF protocol and the VRRP protocol are both in the open state, generating a judgment list according to the current state of the active equipment and/or the standby equipment and the VRRP protocol thereof.
In one embodiment, further comprising: reading the current state of the VRRP protocol of the judgment list at regular time; and generating state change information when the current state is inconsistent with the current state read last time.
In S204, a forwarding path is determined based on the OSPF protocol of the active device to forward data traffic.
In S206, when the VRRP state of the active device is switched, the standby device based on the VRRP protocol is started. The VRRP state switch of the active device may be determined, for example, upon receiving the state change information.
After the standby device based on the VRRP protocol is started, the method further includes: cutting off the neighbor relation between the main equipment and the interconnection equipment; and establishing the neighbor relation between the standby equipment and the interconnection equipment.
Wherein the cutting off the neighbor relationship between the active device and the interconnect device includes: and setting the state according to the state change information and a preset strategy so as to cut off the neighbor relation between the main equipment and the interconnection equipment. More specifically, when the interface state of the state change information is changed from active to standby, the OSPF protocol state of the active device is set to invalid.
Establishing a neighbor relationship between the standby device and the interconnection device includes: and setting the state according to the state change information and a preset strategy to establish the neighbor relation between the standby equipment and the interconnection equipment. More specifically, when the interface state of the state change information is changed from standby to active, the OSPF protocol state of the standby device is set to active.
In S208, a forwarding path is determined for data traffic forwarding based on the OSPF protocol of the standby device.
According to the data traffic forwarding method disclosed by the invention, the main equipment and the interconnection equipment based on the VRRP protocol establish a neighbor relation based on the OSPF protocol; determining a forwarding path based on the OSPF protocol of the master device to forward data traffic; when the VRRP state of the main equipment is switched, the standby equipment based on the VRRP protocol is started; the method for determining the forwarding path based on the OSPF protocol of the standby equipment to forward the data traffic can solve the problems of disordered route learning and wrong traffic forwarding caused by the fact that the active equipment and the standby equipment need to establish OSPF neighbors with the interconnection equipment under VRRP networking.
In the scheme of the disclosure, only the active device of the VRRP and the interconnection device establish the OSPF neighbor under the OSPF protocol, and when the VRRP state is switched, the new active device can establish the neighbor with the interconnection device in time and can immediately disconnect the OSPF neighbor of the original active device and the interconnection device. In the scheme disclosed by the invention, the OSPF (open shortest path first) neighbor establishing mode only by the main equipment and the interconnection equipment well solves the problems of disordered route learning and incorrect traffic forwarding caused by the OSPF neighbor establishing mode by the three equipment.
It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
The data traffic forwarding method disclosed in the present disclosure may be implemented by a determining module, a notifying module, and an executing module, where the determining module, the notifying module, and the executing module may be disposed in the control device, or may be disposed in the primary device, the standby device, and the interconnection device, and the present disclosure is not limited thereto.
The judging module is used for judging whether an interface on the equipment starts OSPF and VRRP functions, adding the interface which simultaneously starts OSPF and VRRP functions into the judging list and recording the VRRP state of the interface;
the notification module is used for reading the VRRP state of the interfaces in the judgment list once every N seconds, notifying the execution module of the VRRP state of the interfaces, and immediately notifying the execution module if the VRRP state of the interfaces in the judgment list is changed. If the interface state is not changed within 3 times of N seconds, the execution module is not informed;
the execution module is used for receiving and processing the information of the notification module, and when the OSPF state of the interface with the VRRP state of 'Backup' sent by the notification module is set to 'Down' and the interface is stopped from sending the 'Hello' message and not processing the 'Hello' message received by the interface. When receiving the message that the VRRP state of the interface sent by the notification module is changed from 'Backup' to 'Master', restoring the interface to make the interface consistent with a normally enabled OSPF interface, and normally receiving and sending a 'Hello' message; when the VRRP state of the interface receiving the notification module is changed from 'Master' to 'Backup', the processing flow is consistent with the processing flow of the message of which the VRRP state of the interface receiving the notification module is 'Backup'. If the interface state is always 'Master', keeping the OSPF state of the interface unchanged.
The above modules are described in detail in turn.
Fig. 3 is a flow chart illustrating a method of data traffic forwarding according to another exemplary embodiment. The process 30 shown in fig. 3 is a detailed description of the determination module.
As shown in fig. 3, in S302, whether the interface turns OSPF on. The method comprises the steps of actively collecting interface information of the main equipment and the standby equipment, and judging whether the OSPF function is started by the interfaces of the main equipment and the standby equipment according to the collected information.
In S304, whether the interface turns on VRRP. If the OSPF function is started by the interface, continuously judging whether the VRRP function is started by the interface.
In S306, the judgment list is not added. If the OSPF function is not started by the interface, the interface is not directly added in the judgment list. If the interface only opens the OSPF function and does not open the VRRP function, the interface is not added in the judgment list.
In S308, a judgment list is added. If the interface starts both OSPF function and VRRP function, adding the interface into the judgment list and recording the VRRP state of the interface in the judgment list.
Furthermore, when the VRRP state of the interface added in the judgment list is changed, the judgment module can immediately update the judgment list. When an interface for starting OSPF function and VRRP function is added, the judging module will add the added interface into the judging list and record the VRRP state of the added interface. When the interface in the judgment list closes the OSPF or VRRP function, the judgment module deletes the interface in the judgment list immediately.
Fig. 4 is a flow chart illustrating a method of forwarding data traffic according to another exemplary embodiment. The flow 40 shown in FIG. 4 is a detailed description of the notification module.
As shown in fig. 4, in S402, whether the interface VRRP state changes within 3 preset times or not. And reading the VRRP state of the interfaces in the judgment list once every preset time (N seconds), and informing all the interfaces in the judgment list of the VRRP state to an execution module.
In S404, a notification message is generated. When the notification module finds and judges that the state of the VRRP in the interface in the list is changed, the notification module immediately notifies the execution module of the latest state of the VRRP in the interface.
Furthermore, when the notification module finds that the new interface exists in the determination module, the notification module immediately notifies the execution module of the VRRP state of the new interface.
Furthermore, when the notification module detects that the interface in the determination module is deleted, the notification module immediately notifies the execution module that the interface is an invalid interface.
In S406, no notification message is generated. And when the VRRP state of the interface in the list is judged to be unchanged within 3 times N seconds, the execution module is not informed.
Fig. 5 is a flow chart illustrating a method of data traffic forwarding according to another exemplary embodiment. The flow 50 shown in FIG. 5 is a detailed description of the execution module.
As shown in fig. 5, in S502, whether the state of the interface VRRP is Master or not is determined.
In S504, the interface state is kept unchanged. When the notification module is received to inform the VRRP state of the interface as "Master", the execution module keeps the original OSPF state of the interface from processing.
In S506, the interface OSPF state is set to down and sending of hello packets is stopped. When the notification module informs the interface that the VRRP state is changed from 'Master' to 'Backup', the execution module immediately sets the OSPF state of the interface to 'Down' and stops sending the interface 'Hello' message.
Further, when the notification module is received to notify that the interface status is "Backup", the execution module immediately sets the OSPF status of the interface to "Down" and stops sending the interface "Hello" message.
Furthermore, when the notification module informs the VRRP state of the interface to change from "Backup" to "Master", the execution module immediately cancels the state restriction on the OSPF of the interface and allows the interface to normally send and receive the "Hello" message.
Furthermore, when the notification module is received to inform that the interface is invalid, the initial state of the interface is directly recovered.
The data traffic forwarding method disclosed by the invention realizes the mode that OSPF supports VRRP networking by introducing the control equipment, so that OSPF only needs to establish a neighbor with the main equipment of VRRP, thereby solving the problems of disordered route learning, wrong traffic forwarding and increased load pressure of the standby equipment caused by the OSPF neighbor between VRRP main and standby equipment.
Those skilled in the art will appreciate that all or part of the steps to implement the above embodiments are implemented as a computer program executed by a CPU. When executed by the CPU, performs the functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes illustrated in the above figures are not intended to indicate or limit the temporal order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 6 is a block diagram illustrating a data traffic forwarding system in accordance with another exemplary embodiment. As shown in fig. 6, the data traffic forwarding system 60 can be applied in a network supporting OSPF protocol and VRRP protocol, and includes: an active device 602, a standby device 604, an interconnect device 606, and a control device 608.
The active device 602 supports the VRRP protocol and the OSPF protocol, and is configured to forward traffic;
the standby device 604 supports VRRP protocol and OSPF protocol, and is used for forwarding traffic;
the interconnection device 606 is configured to establish a neighbor relationship based on an OSPF protocol with the active device or the standby device;
the control device 608 is configured to control the standby device to start up to forward data traffic when the VRRP state of the active device is switched.
According to the data flow forwarding system, a main device and an interconnection device based on a VRRP protocol establish a neighbor relation based on an OSPF protocol; determining a forwarding path based on the OSPF protocol of the active device to forward data traffic; when the VRRP state of the main equipment is switched, the standby equipment based on the VRRP protocol is started; the method for determining the forwarding path based on the OSPF protocol of the standby equipment to forward the data traffic can solve the problems of disordered route learning and wrong traffic forwarding caused by the fact that the active equipment and the standby equipment need to establish OSPF neighbors with the interconnection equipment under VRRP networking.
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
An electronic device 700 according to this embodiment of the disclosure is described below with reference to fig. 7. The electronic device 700 shown in fig. 7 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, electronic device 700 is in the form of a general purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one memory unit 720, a bus 730 that couples various system components including the memory unit 720 and the processing unit 710, a display unit 740, and the like.
Wherein the storage unit stores program code that can be executed by the processing unit 710 to cause the processing unit 710 to perform the steps according to various exemplary embodiments of the present disclosure described in this specification. For example, the processing unit 710 may perform the steps as shown in fig. 2, 3, 4, 5.
The memory unit 720 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM) 7201 and/or a cache memory unit 7202, and may further include a read only memory unit (ROM) 7203.
The memory unit 720 may also include a program/utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 730 may be any representation of one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 700 can also communicate with one or more external devices 700' (e.g., keyboard, pointing device, bluetooth device, etc.) such that a user can communicate with the devices with which the electronic device 700 interacts, and/or any device (e.g., router, modem, etc.) with which the electronic device 700 can communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 750. Also, the electronic device 700 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 760. The network adapter 760 may communicate with other modules of the electronic device 700 via the bus 730. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, as shown in fig. 8, the technical solution according to the embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present disclosure.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In situations involving remote computing devices, the remote computing devices may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to external computing devices (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: establishing a neighbor relation based on an OSPF protocol between main equipment and interconnection equipment based on a VRRP protocol; determining a forwarding path based on the OSPF protocol of the master device to forward data traffic; when the VRRP state of the main equipment is switched, the standby equipment based on the VRRP protocol is started; and determining a forwarding path based on the OSPF protocol of the standby equipment so as to forward the data traffic.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the disclosure is not limited to the precise construction, arrangements, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (6)

1. A data traffic forwarding method can be applied to a network supporting OSPF protocol and VRRP protocol, and is characterized by comprising the following steps:
acquiring the starting states of an OSPF protocol and a VRRP protocol of a main device and a standby device;
when both an OSPF protocol and a VRRP protocol are in an open state, generating a judgment list according to the current state of the active equipment and/or the standby equipment and the VRRP protocol thereof;
establishing a neighbor relation based on an OSPF protocol between main equipment and interconnection equipment based on a VRRP protocol;
determining a forwarding path based on the OSPF protocol of the active device to forward data traffic, and setting the OSPF protocol state of the standby device based on the VRRP protocol to be invalid;
reading the current state of the VRRP protocol of the judgment list at regular time, and generating state change information when the current state is inconsistent with the current state read last time;
when the VRRP state of the main equipment is switched, state setting is carried out according to the state change information and a preset strategy so as to cut off the neighbor relation between the main equipment and the interconnection equipment, and the standby equipment based on a VRRP protocol is started to establish the neighbor relation between the standby equipment and the interconnection equipment; and determining a forwarding path based on the OSPF protocol of the standby equipment for data traffic forwarding.
2. The method of claim 1, wherein when the VRRP state of the active device is switched, comprising:
and when the state change information is received, determining the VRRP state switching of the main equipment.
3. The method of claim 1, wherein performing state setting to cut off neighbor relations of the active device and the interconnect device according to the state change information and a preset policy comprises:
and when the interface state of the state change information is changed from active to standby, setting the OSPF protocol state of the active device as invalid.
4. The method of claim 1, wherein establishing the neighbor relationship of the standby device and the interconnect device comprises:
and setting the state according to the state change information and a preset strategy to establish the neighbor relation between the standby equipment and the interconnection equipment.
5. The method as claimed in claim 4, wherein performing state setting according to the state change information and a preset policy to establish a neighbor relationship between the standby device and the interconnection device comprises:
and when the interface state of the state change information is changed from standby to main, setting the OSPF protocol state of the standby equipment to be effective.
6. A data traffic forwarding system, comprising:
the main equipment supports VRRP protocol and OSPF protocol and is used for forwarding flow;
the standby equipment supports VRRP protocol and OSPF protocol and is used for forwarding flow;
the interconnection equipment is used for acquiring the open states of an OSPF protocol and a VRRP protocol of the main equipment and the standby equipment, generating a judgment list according to the current states of the main equipment and/or the standby equipment and the VRRP protocol thereof when both the OSPF protocol and the VRRP protocol are in the open states, establishing a neighbor relation based on the OSPF protocol with the main equipment or the standby equipment, determining a forwarding path based on the OSPF protocol of the main equipment to forward data traffic, and setting the OSPF protocol state of the standby equipment based on the VRRP protocol to be invalid;
and the control equipment is used for regularly reading the current state of the VRRP protocol in the judgment list, generating state change information when the current state is inconsistent with the current state read last time, setting the state according to the state change information and a preset strategy to cut off the neighbor relation between the main equipment and the interconnection equipment when the VRRP state of the main equipment is switched, establishing the neighbor relation between the standby equipment and the interconnection equipment based on the starting of the standby equipment of the VRRP protocol, and controlling the starting of the standby equipment to forward data traffic when the VRRP state of the main equipment is switched.
CN202110585526.0A 2021-05-27 2021-05-27 Data traffic forwarding method and system Active CN113328933B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110585526.0A CN113328933B (en) 2021-05-27 2021-05-27 Data traffic forwarding method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110585526.0A CN113328933B (en) 2021-05-27 2021-05-27 Data traffic forwarding method and system

Publications (2)

Publication Number Publication Date
CN113328933A CN113328933A (en) 2021-08-31
CN113328933B true CN113328933B (en) 2022-11-01

Family

ID=77421805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110585526.0A Active CN113328933B (en) 2021-05-27 2021-05-27 Data traffic forwarding method and system

Country Status (1)

Country Link
CN (1) CN113328933B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827015B (en) * 2022-04-29 2024-04-02 深圳爱捷云科技有限公司 Data forwarding method and virtualized cloud network architecture

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102187628A (en) * 2011-04-29 2011-09-14 华为技术有限公司 Route update method and router
WO2011157151A2 (en) * 2011-05-31 2011-12-22 华为技术有限公司 Method, device and system for realizing disaster-tolerant backup
CN103095571A (en) * 2013-01-17 2013-05-08 成都西加云杉科技有限公司 Method and system achieving network redundancy and data flow seamless switching

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7636364B2 (en) * 2002-10-31 2009-12-22 Force 10 Networks, Inc. Redundant router network
US7929420B2 (en) * 2006-02-02 2011-04-19 Avaya, Inc. Method and apparatus for learning VRRP backup routers
CN102546430A (en) * 2012-02-05 2012-07-04 华为技术有限公司 Method for redundant backup of network equipment, and routing equipment and system
US9191271B2 (en) * 2013-04-29 2015-11-17 Telefonaktiebolaget L M Ericsson (Publ) Fast traffic recovery in VRRP based routers
CN106559326A (en) * 2015-09-28 2017-04-05 中兴通讯股份有限公司 Flow forwarding method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102187628A (en) * 2011-04-29 2011-09-14 华为技术有限公司 Route update method and router
WO2011157151A2 (en) * 2011-05-31 2011-12-22 华为技术有限公司 Method, device and system for realizing disaster-tolerant backup
CN102439903A (en) * 2011-05-31 2012-05-02 华为技术有限公司 Method, device and system for realizing disaster-tolerant backup
CN103095571A (en) * 2013-01-17 2013-05-08 成都西加云杉科技有限公司 Method and system achieving network redundancy and data flow seamless switching

Also Published As

Publication number Publication date
CN113328933A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
JP5095823B2 (en) Transport control server, network system, and transport control method
CN110113259B (en) Path state notification method, path switching method, forwarding equipment and system
CN103782544B (en) Method and device for notifying network operator when virtual addresses do not match on network elements configured for interchassis redundancy
EP2974166B1 (en) Method and apparatus for ip/mpls fast reroute
WO2009090723A1 (en) Packet transmission device and its control circuit
CN102088415B (en) Method and device for MAC (media access control) address withdrawal
EP1896947A2 (en) Method and apparatus for providing faster convergence for redundant sites
CN112702773B (en) Communication method and device
CN111988222A (en) Data transmission method and device, electronic equipment and computer readable storage medium
CN110750393A (en) Method, device, medium and equipment for avoiding network service dual-computer hot standby split brain
CN113328933B (en) Data traffic forwarding method and system
JP2009296230A (en) Transmission network, transmission apparatus, channel switching method and program for transmission network
CN101499960A (en) Method and apparatus for flow path switching
CN113542099B (en) Data transmission method, device, electronic equipment, medium and product
CN102158393B (en) Method and device for updating virtual private network (VPN) routing
CN111629386B (en) Communication method, system and equipment
CN102882787A (en) Method and device for determining retransmission routes of traffic engineering tunnels
CN111131035A (en) Data transmission method and device
CN107547308B (en) Message mirroring method and device, and controller in Software Defined Network (SDN)
CN114449040A (en) Configuration issuing method and device based on cloud platform
CN109768925B (en) Method and device for switching active/standby pseudo wires
CN113328929B (en) Route conflict reminding method and device, electronic equipment and computer readable medium
JP2005293430A (en) Blade type network repeater
CN113765783B (en) Communication method and device
CN105515934A (en) Method and device used for managing VPN (Virtual Private Network) backup circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant