CN111953590B - Routing table entry outlet switching method and device, electronic equipment and storage medium - Google Patents

Routing table entry outlet switching method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111953590B
CN111953590B CN202010672113.1A CN202010672113A CN111953590B CN 111953590 B CN111953590 B CN 111953590B CN 202010672113 A CN202010672113 A CN 202010672113A CN 111953590 B CN111953590 B CN 111953590B
Authority
CN
China
Prior art keywords
port
outlet
routing table
table entry
aggregation
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
CN202010672113.1A
Other languages
Chinese (zh)
Other versions
CN111953590A (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202010672113.1A priority Critical patent/CN111953590B/en
Publication of CN111953590A publication Critical patent/CN111953590A/en
Application granted granted Critical
Publication of CN111953590B publication Critical patent/CN111953590B/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/28Routing or path finding of packets in data switching networks using route fault recovery
    • 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/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a method and a device for switching routing table entry outlets, electronic equipment and a storage medium. The method comprises the following steps: if judging that the link fails, acquiring source outlet information and destination outlet information of a routing table entry of the failed link; if the source outlet and the target outlet of the routing table item are judged and known to be aggregation ports, acquiring a member port of the target outlet; and replacing the member port of the source outlet with the member port of the destination outlet. In the embodiment of the invention, after the member ports of the source outlet and the target outlet of the routing table entry of the fault link are obtained, the member ports of the source outlet are replaced by the member ports of the target outlet, the outlets of all the routing table entries are updated to the backup link or the reachable link outlet at one time, thereby realizing the fast flow switching, and when the link fault is recovered, the outlets of all the routing table entries are updated to the original link outlet at one time, thereby realizing the fast flow switching.

Description

Routing table entry outlet switching method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a method and a device for switching routing table entry outlets, electronic equipment and a storage medium.
Background
In the ethernet, in order to prevent the host from being unreachable due to link failure, it is necessary to quickly switch the routing table entry outlet to another backup or reachable link when the link fails, so as to continuously forward the traffic. When the link is recovered, the routing table entry outlet needs to be switched back to the original link, so that the flow is continuously forwarded. The routing table entry includes an Address Resolution Protocol (ARP) table entry, a Neighbor Discovery Protocol (ND) table entry, and the like, and the ARP queries an MAC Address of the target device according to an IP Address of the target device, for traffic forwarding and traffic information encapsulation; the ND replaces the ARP and ICMP (Internet Control Message Protocol ) router discovery and ICMP redirection functions of IPv4, and defines the functions of implementing address resolution, tracking neighbor state, repeating address detection, router discovery and redirection, etc. by using an ICMPv6 Message.
In the prior art, when a link fails, an exchange may clear a Media Access Control (MAC) address of the failed link and trigger a rerouting of a routing table entry, and when a response message of the routing table entry enters from a new exit, the routing table entry exit is also updated to the new exit, and then the response message is updated to hardware one by one, and traffic is gradually switched to the new exit, thereby implementing traffic re-forwarding. When the link is restored, the switch also triggers the routing table entry to open again, the routing table entry outlet is updated back to the original outlet, and then the routing table entry is updated to the hardware one by one, and the flow is gradually switched back to the original outlet, so that the convergence performance of the three-layer flow is limited by the updating speed and the updating number of the routing table entry, and the quick convergence cannot be realized.
Disclosure of Invention
To overcome the defects in the prior art, embodiments of the present invention provide a method and an apparatus for switching an exit of a routing table entry, an electronic device, and a storage medium.
In a first aspect, an embodiment of the present invention provides a method for switching an exit of a routing table entry, where the method includes:
if the link is judged to be failed, acquiring source outlet information and destination outlet information of a routing table entry of the failed link;
if the source outlet and the target outlet of the routing table item are judged and known to be aggregation ports, acquiring a member port of the target outlet;
and replacing the member port of the source outlet with the member port of the destination outlet.
As above, optionally, before obtaining the member port of the destination exit, the method further includes:
if the source outlet of the routing table entry is judged and known to be a physical port, a first aggregation port is created, and the physical port of the source outlet is taken as a member port and added into the first aggregation port;
switching the outlet of the routing table entry from the source outlet to the first aggregation port;
correspondingly, the replacing the member port of the source outlet with the member port of the destination outlet includes:
replacing the member port of the first aggregate port with the member port of the destination outlet.
As above, optionally, before obtaining the member port of the destination outlet, the method further includes:
if the target outlet of the routing table entry is judged and known to be a physical port, a second aggregation port is created, and the physical port of the target outlet is taken as a member port and added into the second aggregation port;
accordingly, the replacing the member port of the source outlet with the member port of the destination outlet includes:
replacing the member port of the source outlet with the member port of the second polymerization port.
The method as described above, optionally, further includes:
creating a third aggregation port, and adding the member port of the target outlet into the third aggregation port;
switching the outlet of the routing table entry from the source outlet to the third aggregation port;
restoring a member port of the source outlet;
and if the link is judged to be recovered to be normal, replacing the member port of the third aggregation port with the member port of the source outlet, and switching the outlet of the routing table entry from the third aggregation port to the source outlet.
As in the foregoing method, optionally, after switching the exit of the routing table entry from the third aggregation port to the source exit, the method further includes:
and deleting the third polymerization port.
In a second aspect, an embodiment of the present invention provides a routing table entry exit switching device, including:
the first acquisition module is used for acquiring source outlet information and destination outlet information of a routing table entry of a failed link if judging that the link fails;
a second obtaining module, configured to obtain a member port of the destination outlet if it is determined that the source outlet and the destination outlet of the routing table entry are both aggregation ports;
and the replacing module is used for replacing the member port of the source outlet with the member port of the destination outlet.
The above apparatus, optionally, further comprises:
a first creating module, configured to create a first aggregation port if it is determined that a source outlet of the routing table entry is a physical port, and add the physical port of the source outlet to the first aggregation port as a member port;
a first switching module, configured to switch an exit of the routing table entry from the source exit to the first aggregation port;
correspondingly, the replacement module is specifically configured to:
replacing the member port of the first aggregate port with the member port of the destination outlet. The above apparatus, optionally, further comprises:
a second creating module, configured to create a second aggregation port if it is determined that the destination outlet of the routing table entry is a physical port, and add the physical port of the destination outlet to the second aggregation port as a member port;
correspondingly, the replacement module is specifically configured to:
replacing the member port of the source outlet with the member port of the second polymerization port.
The above apparatus, optionally, further includes:
the third establishing module is used for establishing a third aggregation port and adding the member port of the target outlet into the third aggregation port;
a processing module, configured to switch an exit of the routing table entry from the source exit to the third aggregation port;
a recovery module for recovering a member port of the source outlet;
correspondingly, the processing module is further configured to replace the member port of the third aggregation port with the member port of the source outlet if it is determined that the link is recovered to be normal, and switch the outlet of the routing table entry from the third aggregation port to the source outlet.
The above apparatus, optionally, further comprises:
and the deleting module is used for deleting the third aggregation port.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
the processor and the memory are communicated with each other through a bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform a method comprising: if judging that the link fails, acquiring source outlet information and destination outlet information of a routing table entry of the failed link; if the source outlet and the destination outlet of the routing table item are both aggregation ports, acquiring a member port of the destination outlet; and replacing the member port of the source outlet with the member port of the destination outlet.
In a fourth aspect, an embodiment of the present invention provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following method: if judging that the link fails, acquiring source outlet information and destination outlet information of a routing table entry of the failed link; if the source outlet and the destination outlet of the routing table item are both aggregation ports, acquiring a member port of the destination outlet; and replacing the member port of the source outlet with the member port of the destination outlet.
The routing table entry outlet switching method provided in the embodiment of the present invention replaces the member port of the source outlet with the member port of the destination outlet after acquiring the member ports of the source outlet and the destination outlet of the routing table entry of the failed link, updates the outlets of all routing table entries to the backup link or the reachable link outlet at a time, thereby implementing fast flow switching, and updates the outlets of all routing table entries to the original link outlet at a time when the link failure is recovered, thereby implementing fast flow switching back.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a routing table entry exit switching method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an ARP/ND entry exit switching method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a routing table entry exit switching device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the prior art, when a link fails, the routing table entries of the failed link are updated one by one, and the convergence performance of three-layer flow is limited by the updating speed and the updating number of the routing table entries, so that rapid convergence cannot be realized. In the method for switching the routing table entry outlets provided in the embodiments of the present invention, when a link fails, a member port of a source outlet of a routing table entry of the failed link is replaced with a member port of a destination outlet, and outlets of all routing table entries are updated to a backup link or an reachable link outlet at one time, so that three-layer traffic fast switching is achieved.
Fig. 1 is a schematic flow chart of a method for switching an exit of a routing table entry according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step S11, if judging that the link is failed, acquiring source export information and destination export information of a routing table entry of the failed link;
specifically, the storage structure of the routing table entry in the network device, such as the ARP table entry or the ND table entry, on the hardware is routing prefix + next hop, where the next hop includes egress information, that is, a source egress of the routing table entry, and the egress information may be an AP port (aggregation port) or a physical egress. When a certain egress link fails, the egress information of the routing table entry of the failed link needs to be replaced with an available port, i.e., a destination egress, of the standby link, so that, after the link failure is known, the routing table entry egress switching device installed on the network device obtains the source egress information and the destination egress information of the routing table entry of the failed link, i.e., obtains the next hop and the standby port.
Step S12, if judging that the source outlet and the target outlet of the routing table item are aggregation ports, acquiring a member port of the target outlet;
and S13, replacing the member port of the source outlet with the member port of the destination outlet.
Specifically, the routing table entry outlet may be an AP port or a physical port, and the routing table entry outlet switching device needs to determine whether a source outlet and a destination outlet of the routing table entry are both aggregation ports, where the determination method of an aggregation port may determine according to a port type and the like, which is not described herein again, and if the source outlet and the destination outlet are both aggregation ports, a member port of the destination outlet is obtained, for example, the routing table entry outlet is AP1, the destination outlet is AP2, both are aggregation ports, the member ports of AP1 are D1 and D2, and the member ports of AP2 are D3, D4, and D5. When the source outlet is AP1, to realize fast switching of three-layer traffic from AP1 to AP2, fast switching of traffic can be realized only by replacing the member port of AP1 with the member port of AP2, that is, replacing the member port of AP1 with D3, D4, and D5, without depending on updating the routing table entry to switch traffic.
After the AP1 link fails, the routing table entry outlet switching device informs the information of switching the AP1 to the AP2, and directly replaces the member port of the AP1 with the member port of the AP2, at the moment, the three-layer flow is switched to the AP2, the switching speed is increased from the second level to the millisecond level, and the rapid convergence is realized.
The routing table entry outlet switching device is suitable for scenarios such as STP (Spanning Tree Protocol), MSTP (Multiple Spanning Tree Protocol), MLAG (Multi-Chassis Link Aggregation Group), and the like.
In the method for switching routing table entry outlets provided in the embodiment of the present invention, after it is determined that the source outlet and the destination outlet of the routing table entry of the failed link are both aggregation ports, the member port of the source outlet is replaced with the member port of the destination outlet, and the outlets of all routing table entries are updated to the backup link or the reachable link outlet at a time, so as to implement fast flow switching.
On the basis of the above embodiment, further, before the obtaining the member port of the destination outlet, the method further includes:
if the source outlet of the routing table entry is judged and known to be a physical port, a first aggregation port is created, and the physical port of the source outlet is taken as a member port and added into the first aggregation port;
switching the outlet of the routing table entry from the source outlet to the first aggregation port;
accordingly, the replacing the member port of the source outlet with the member port of the destination outlet includes:
replacing the member port of the first aggregate port with the member port of the destination outlet.
Specifically, a fast switching function is enabled on a port which needs to implement fast switching, and then, a routing table entry is learned, the key to implement the fast switching function is that a source outlet of the routing table entry must be an AP port, if the source outlet is not an AP port, a virtual AP port without a member port is created and is marked as AP1, and a physical port of the source outlet is added to the created virtual AP1, so that the virtual AP port becomes a member port of the AP1. If the source egress is an AP port, no creation is required. And then switching the source outlet of the routing table entry into the created AP1. When the link failure needs to switch the routing table entry outlet, the member port of the destination outlet is directly replaced into the created AP1, and if the destination outlet is a physical port, the physical port is directly replaced with the member port of the created AP1, so that three-layer traffic fast switching can also be realized.
On the basis of the foregoing embodiments, further, before the obtaining the member port of the destination outlet, the method further includes:
if the target outlet of the routing table entry is judged and known to be a physical port, a second aggregation port is created, and the physical port of the target outlet is taken as a member port and added into the second aggregation port;
accordingly, the replacing the member port of the source outlet with the member port of the destination outlet includes:
replacing the member port of the source outlet with the member port of the second polymerization port.
Specifically, in practical applications, the destination exit may also be set as an aggregation port, if the destination exit is not an AP port, a virtual AP port without a member port is created and marked as AP2, and a physical port of the destination exit is added to the created virtual AP2, so that the virtual AP2 becomes a member port of the AP 2. If the destination egress is an AP port, no creation is required. When the link failure needs to switch the routing table entry outlet, the member port of the destination outlet is directly replaced into the member port of the source outlet, so that the three-layer flow fast switching can be realized.
On the basis of the above embodiments, the method further includes:
creating a third aggregation port, and adding the member port of the target outlet into the third aggregation port;
switching the outlet of the routing table entry from the source outlet to the third aggregation port;
restoring a member port of the source outlet;
and if the link is judged to be recovered to be normal, replacing the member port of the third aggregation port with the member port of the source outlet, and switching the outlet of the routing table entry from the third aggregation port to the source outlet.
After switching the exit of the routing table entry from the third aggregation port to the source exit, the method further includes:
and deleting the third polymerization port.
Specifically, the foregoing embodiments have implemented the function of fast switching traffic when a link fails, but when a link cannot be recovered, the routing table entry originally pointing to the AP1 is quickly updated back to the AP1. Therefore, the following steps are also required to be continued: firstly, an AP port without a member port is created to be used as an intermediate process outlet, which is marked as AP3, and the member port of the AP2 is added into the AP3. And simultaneously switching the exit of the routing table entry from AP1 to AP3. And after all the routing table entry outlets are updated to be AP3, restoring the member port of the AP1 to the original member port. After the AP1 link is recovered, the member port of the AP3 is replaced by the member port of the AP1, and because the routing table entry outlets are all pointing to the AP3 at the moment, after the member ports are replaced by the member ports of the AP1, the flow is actually switched to the member ports of the AP1, and the rapid convergence of the flow is realized. Meanwhile, after the switching is completed, the routing table entry egress is switched from AP3 to AP1. And after all the routing table entries are updated to be AP1, deleting AP3.
For example, taking the table entry exit switching of ARP/ND as an example, fig. 2 is a schematic flow diagram of an ARP/ND table entry exit switching method provided in the embodiment of the present invention, as shown in fig. 2, a routing table entry exit switching device is divided into three modules according to the use, where the three modules are: backup port selection module, AP module and routing module, wherein: the backup port selection module is used for selecting a backup outlet when a link fails, informing the AP module to switch from the main link outlet AP1 to the backup link outlet AP2, and informing the AP module to switch back from the backup link outlet AP2 to the AP1 when the link is recovered; the AP module is used for receiving the information of the backup port selection module, directly replacing the member port of the AP1 with the member port of the AP2 when a link fails, creating an AP3 port without the member port to be used as an outlet of an intermediate process, and adding the member port of the AP2 into the AP3. And meanwhile, the routing module is notified to update the ARP/ND table entry outlet from the AP1 to the AP3. Restoring the member port of the AP1 to the original member port; when the link is recovered, the member port of the AP3 is replaced by the member port of the AP1, and meanwhile, the routing module is informed to update the table entry outlet of the ARP/ND from the AP3 to the AP1. After all ARP/ND are updated to AP1, AP3 is deleted. The routing module is used for receiving the message of the AP module, and comprises: and receiving a message that the AP module updates the AP1 to the AP3, and updating the ARP/ND table entry outlet from the AP1 to the AP3. And receiving a message that the AP module AP3 is updated to the AP1, and updating the ARP/ND table entry outlet from the AP3 to the AP1.
In the method for switching routing table entry outlets provided in the embodiments of the present invention, after the member ports of the source outlet and the destination outlet of the routing table entry of the failed link are obtained, the member ports of the source outlet are replaced with the member ports of the destination outlet, and the outlets of all routing table entries are updated to the backup link or the reachable link outlet at a time, so that fast flow switching is achieved.
Based on the same inventive concept, an embodiment of the present invention further provides a routing table entry exit switching device, as shown in fig. 3, including: a first acquisition module 31, a second acquisition module 32 and a replacement module 33, wherein:
the first obtaining module 31 is configured to obtain source egress information and destination egress information of a routing table entry of a failed link if it is determined that the link fails; the second obtaining module 32 is configured to obtain a member port of the destination outlet if it is determined that the source outlet and the destination outlet of the routing table entry are aggregation ports; the replacement module 33 is configured to replace the member port of the source outlet with the member port of the destination outlet.
The above apparatus, optionally, further includes:
a first creating module, configured to create a first aggregation port if it is determined that a source outlet of the routing table entry is a physical port, and add the physical port of the source outlet to the first aggregation port as a member port;
a first switching module, configured to switch an exit of the routing table entry from the source exit to the first aggregation port.
The above apparatus, optionally, further comprises:
a second creating module, configured to create a second aggregation port if it is determined that the destination outlet of the routing table entry is a physical port, and add the physical port of the destination outlet to the second aggregation port as a member port;
correspondingly, the replacement module is specifically configured to:
replacing the member port of the source outlet with the member port of the second polymerization port.
The above apparatus, optionally, further comprises:
the third establishing module is used for establishing a third aggregation port and adding the member port of the target outlet into the third aggregation port;
a processing module, configured to switch an exit of the routing table entry from the source exit to the third aggregation port;
a recovery module for recovering a member port of the source outlet;
correspondingly, the processing module is further configured to, if it is determined that the link is recovered to be normal, replace the member port of the third aggregation port with the member port of the source outlet, and switch the outlet of the routing table entry from the third aggregation port to the source outlet.
The above apparatus, optionally, further includes:
and the deleting module is used for deleting the third aggregation port.
The apparatus provided in the embodiment of the present invention is configured to implement the method, and its functions specifically refer to the method embodiment, which is not described herein again.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 4, the electronic device includes: a processor (processor) 41, a memory (memory) 42, and a bus 43;
wherein, the processor 41 and the memory 42 complete the communication with each other through the bus 43;
processor 41 is configured to call program instructions in memory 42 to perform the methods provided by the above-described method embodiments, including, for example: if the link is judged to be failed, acquiring source outlet information and destination outlet information of a routing table entry of the failed link; if the source outlet and the target outlet of the routing table item are judged and known to be aggregation ports, acquiring a member port of the target outlet; and replacing the member port of the source outlet with the member port of the destination outlet.
Embodiments of the present invention disclose a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the methods provided by the above-mentioned method embodiments, for example, including: if the link is judged to be failed, acquiring source outlet information and destination outlet information of a routing table entry of the failed link; if the source outlet and the destination outlet of the routing table item are both aggregation ports, acquiring a member port of the destination outlet; and replacing the member port of the source outlet with the member port of the destination outlet.
Embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer instructions, which cause a computer to execute the method provided by the above method embodiments, for example, including: if judging that the link fails, acquiring source outlet information and destination outlet information of a routing table entry of the failed link; if the source outlet and the target outlet of the routing table item are judged and known to be aggregation ports, acquiring a member port of the target outlet; and replacing the member port of the source outlet with the member port of the destination outlet.
Those of ordinary skill in the art will understand that: all or part of the steps of implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer-readable storage medium, and when executed, executes the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the apparatuses and the like are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1.A method for switching egress of a routing table entry, comprising:
if judging that the link fails, acquiring source outlet information and destination outlet information of a routing table entry of the failed link;
if the source outlet and the target outlet of the routing table item are judged and known to be aggregation ports, acquiring a member port of the target outlet;
replacing the member port of the source outlet with the member port of the destination outlet; the method further comprises the following steps:
creating a third aggregation port, and adding the member port of the target outlet into the third aggregation port;
switching the outlet of the routing table entry from the source outlet to the third aggregation port;
restoring a member port of the source outlet;
and if the link is judged to be recovered to be normal, replacing the member port of the third aggregation port with the member port of the source outlet, and switching the outlet of the routing table entry from the third aggregation port to the source outlet.
2. The method of claim 1, wherein prior to obtaining the member port of the destination outlet, further comprising:
if the source outlet of the routing table entry is judged and known to be a physical port, creating a first aggregation port, and adding the physical port of the source outlet as a member port into the first aggregation port;
switching the outlet of the routing table entry from the source outlet to the first aggregation port;
accordingly, the replacing the member port of the source outlet with the member port of the destination outlet includes:
replacing the member port of the first aggregate port with the member port of the destination outlet.
3. The method of claim 1, wherein prior to obtaining the member port of the destination outlet, further comprising:
if the destination outlet of the routing table item is judged and known to be a physical port, a second aggregation port is created, and the physical port of the destination outlet is taken as a member port and added into the second aggregation port;
accordingly, the replacing the member port of the source outlet with the member port of the destination outlet includes:
replacing the member port of the source outlet with the member port of the second polymerization port.
4. The method of claim 3, wherein after switching the egress of the routing table entry from the third aggregation port to the source egress, further comprising:
and deleting the third polymerization port.
5. A routing table entry exit switching apparatus, comprising:
the first acquisition module is used for acquiring source outlet information and destination outlet information of a routing table entry of a failed link if judging that the link fails;
a second obtaining module, configured to obtain a member port of the destination outlet if it is determined that the source outlet and the destination outlet of the routing table entry are aggregation ports;
a replacement module for replacing the member port of the source outlet with the member port of the destination outlet;
the device further comprises:
the third establishing module is used for establishing a third aggregation port and adding the member port of the target outlet into the third aggregation port;
a processing module, configured to switch an exit of the routing table entry from the source exit to the third aggregation port;
a recovery module for recovering a member port of the source outlet;
correspondingly, the processing module is further configured to, if it is determined that the link is recovered to be normal, replace the member port of the third aggregation port with the member port of the source outlet, and switch the outlet of the routing table entry from the third aggregation port to the source outlet.
6. The apparatus of claim 5, further comprising:
a first creating module, configured to create a first aggregation port if it is determined that the source outlet of the routing table entry is a physical port, and add the physical port of the source outlet to the first aggregation port as a member port;
a first switching module, configured to switch an exit of the routing table entry from the source exit to the first aggregation port;
correspondingly, the replacement module is specifically configured to:
replacing the member port of the first aggregate port with the member port of the destination outlet.
7. The apparatus of claim 5, further comprising:
a second creating module, configured to create a second aggregation port if it is determined that the destination outlet of the routing table entry is a physical port, and add the physical port of the destination outlet to the second aggregation port as a member port;
correspondingly, the replacement module is specifically configured to:
replacing the member port of the source outlet with the member port of the second polymerization port.
8. The apparatus of claim 5, further comprising:
and the deleting module is used for deleting the third aggregation port.
9. An electronic device, comprising:
the processor and the memory are communicated with each other through a bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 4.
CN202010672113.1A 2020-07-14 2020-07-14 Routing table entry outlet switching method and device, electronic equipment and storage medium Active CN111953590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010672113.1A CN111953590B (en) 2020-07-14 2020-07-14 Routing table entry outlet switching method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010672113.1A CN111953590B (en) 2020-07-14 2020-07-14 Routing table entry outlet switching method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111953590A CN111953590A (en) 2020-11-17
CN111953590B true CN111953590B (en) 2023-01-10

Family

ID=73341493

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010672113.1A Active CN111953590B (en) 2020-07-14 2020-07-14 Routing table entry outlet switching method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111953590B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102480368A (en) * 2010-11-22 2012-05-30 中兴通讯股份有限公司 Protecting method and system of aggregation link
CN104333470A (en) * 2014-11-14 2015-02-04 杭州华三通信技术有限公司 Fault handling method and device
CN111327523A (en) * 2020-02-28 2020-06-23 深信服科技股份有限公司 Network protection method and device based on aggregation port, network equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185784A (en) * 2011-05-26 2011-09-14 杭州华三通信技术有限公司 Automatic protection switching method and device
CN102215124B (en) * 2011-06-08 2013-06-05 华为技术有限公司 Fault processing method, sink node and optical network protection system
CN102347905B (en) * 2011-10-31 2015-02-18 杭州华三通信技术有限公司 Network equipment and forwarded information updating method
CN105591900B (en) * 2015-09-29 2019-01-22 新华三技术有限公司 A kind of link switch-over method and device
CN110611577A (en) * 2018-06-14 2019-12-24 中兴通讯股份有限公司 Service fast switching method, switching device, network equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102480368A (en) * 2010-11-22 2012-05-30 中兴通讯股份有限公司 Protecting method and system of aggregation link
CN104333470A (en) * 2014-11-14 2015-02-04 杭州华三通信技术有限公司 Fault handling method and device
CN111327523A (en) * 2020-02-28 2020-06-23 深信服科技股份有限公司 Network protection method and device based on aggregation port, network equipment and storage medium

Also Published As

Publication number Publication date
CN111953590A (en) 2020-11-17

Similar Documents

Publication Publication Date Title
CN110166356B (en) Method and network equipment for sending message
US9485194B2 (en) Virtual link aggregation of network traffic in an aggregation switch
JP6518697B2 (en) System and method for controlling a network switch using a switch modeling interface on a controller
US7688716B2 (en) Method, apparatus, and system for improving ethernet ring convergence time
EP2643940B1 (en) Method of shrinking a data loss window in a packet network device
US8312066B2 (en) Hash collision resolution with key compression in a MAC forwarding data structure
WO2015095996A1 (en) Technique for network service availability
US9832121B1 (en) Next hop instruction associations for forwarding unit programming within a network device
CN102594657B (en) A kind of route iteration method and route exchange device
CN112367254A (en) Cross-device link aggregation method and device and electronic device
US11245615B2 (en) Method for determining link state, and device
CN108540386B (en) Method and device for preventing service flow interruption
CN112187633A (en) Link fault convergence method and device, electronic equipment and storage medium
CN111147303B (en) Message processing method, device, network system, electronic equipment and storage medium
CN115277305A (en) Network management method, device, equipment and machine readable storage medium
CN113615132A (en) Fast flooding topology protection
EP4009592A1 (en) Method for configuring port state and network device
CN107800581B (en) Two-layer network and loopback detection method thereof
CN111953590B (en) Routing table entry outlet switching method and device, electronic equipment and storage medium
US20140016649A1 (en) Optimizing forward database for a bursty network traffic
CN111327543A (en) Message forwarding method and device, storage medium and electronic device
CN112866115B (en) Method, device, electronic equipment and storage medium for realizing transparent serial connection
CN116055393A (en) Private line communication method, device and system
CN108600075B (en) Fault processing method and device
CN111555970A (en) Network switching method, system and storage medium based on dual-computer redundancy system

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