CN113497794A - Method and device for switching route - Google Patents

Method and device for switching route Download PDF

Info

Publication number
CN113497794A
CN113497794A CN202010261347.7A CN202010261347A CN113497794A CN 113497794 A CN113497794 A CN 113497794A CN 202010261347 A CN202010261347 A CN 202010261347A CN 113497794 A CN113497794 A CN 113497794A
Authority
CN
China
Prior art keywords
node
message
capability
packet
next hop
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.)
Granted
Application number
CN202010261347.7A
Other languages
Chinese (zh)
Other versions
CN113497794B (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202010261347.7A priority Critical patent/CN113497794B/en
Publication of CN113497794A publication Critical patent/CN113497794A/en
Application granted granted Critical
Publication of CN113497794B publication Critical patent/CN113497794B/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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables

Landscapes

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

Abstract

The application discloses a method and a device for switching a route, which relate to the field of communication. The method is applied to a communication network, the communication network comprises a first node, a second main node, a second standby node and a third node, wherein the first node comprises routing information, the routing information is used for indicating the first node to send a message to a destination node, a next hop node in the routing information is the second main node, and the third node is the next hop node when the second main node sends the message to the destination node. The method comprises the following steps: the first node receives a state notification message from the second main node, wherein the state notification message is used for indicating that the state of the third node is an unreachable state; based on the state notification message, the first node switches the next hop node of the routing information to the second standby node.

Description

Method and device for switching route
Technical Field
The present application relates to the field of communications, and in particular, to a method and an apparatus for switching a route.
Background
In a communication network, a Router (RT) 1 sends a packet to a first destination node by using routing information, where a next hop node of the routing information may be RT2, that is, a next hop node of the packet sent by RT1 to the first destination node is RT 2. The next hop node for the RT2 to send a message to the first destination node may be RT 3. Under normal conditions, the message is transmitted to the first destination node by the RT2 and the RT3 in turn from the RT 1.
When the path between the RT2 and the RT3 is not reachable, the packet cannot be transmitted to the first destination node via the RT2 and the RT3, and if the RT2 has no other path to transmit the packet to the first destination node, the RT2 needs to send an update packet to the RT1, where the update packet is used to notify the RT1 of the information that the packet cannot be transmitted to the first destination node via the RT 2.
However, if RT1 sequentially passes through RT2 and RT3 and simultaneously sends a packet to a plurality of other destination nodes except the first destination node, that is, there are a plurality of pieces of routing information on the path where RT1 sequentially passes through RT2 and RT3, when the path between RT2 and RT3 is not reachable, RT2 needs to send a plurality of update packets to RT1 respectively, so as to notify RT1 of information that the packet cannot be transmitted to the plurality of other destination nodes through RT 2.
And the RT1 modifies the next hop node of the related routing information in the routing table item according to the plurality of updating messages. The RT1 needs to receive multiple update messages to complete the route switching, which is time-consuming.
Disclosure of Invention
The application provides a method and a device for switching a route, which shorten the time consumed by route switching equipment for switching the route and improve the route switching performance of the route equipment.
In order to achieve the above purpose, the present application provides the following technical solutions:
in a first aspect, the present application provides a method for switching a route, which is applied in a communication network. The communication network includes a first node, a second master node, a second slave node, and a third node. The first node comprises routing information, the routing information is used for indicating the first node to send a message to a destination node, a next hop node in the routing information is a second main node, and a third node is the next hop node when the second main node sends the message to the destination node. The method comprises the following steps: the first node receives a state advertisement message from the second master node, wherein the state advertisement message is used for indicating that the state of the third node is an unreachable state. Based on the state notification message, the first node switches the next hop node of the routing information to the second standby node.
In this way, when the first node determines that the state of the next hop node (e.g., the third node) of the next hop node of the routing information is an unreachable state through the state advertisement packet sent by the next hop node of the routing information (i.e., the second master node), the first node directly switches the next hop node of the routing information of the first node from the second master node to the second standby node, thereby implementing fast switching of the routing information of the first node. Therefore, even if the first node sends a large amount of routing information of the message to different destination addresses through the second host node, the first node can quickly complete the switching of the routing, thereby improving the routing switching performance of the first node.
In a possible design, before the first node receives the status advertisement packet from the second master node, the method further includes: the first node sends a first capability negotiation message to the second host node, wherein the first capability negotiation message is used for indicating that the first node has the state notification capability. The first node receives a second capability negotiation message from the second host node, where the second capability negotiation message is used to indicate that the second host node has a status notification capability, and a capability code value of the second capability negotiation message and a capability code value of the first capability negotiation message have a preset corresponding relationship. Wherein the status notification capability includes a capability to generate or identify a status notification message.
Through the possible design, the first node and the second main node determine that the first node and the second main node have state passing capability in advance through negotiation, then the first node can determine that the next hop node of the second main node is in an unreachable state based on the capability, and then the first node switches the next hop node of the routing information from the second main node to the second standby node, so that the rapid switching of the routing information of the first node is realized.
In another possible design, the routing information includes attribute information, where the attribute information is used to indicate that the third node is a next hop node when the second master node sends a packet to the destination node.
Through the possible design, the first node may obtain, from the routing information, attribute information for indicating that the third node is a next hop node when the second host node sends a packet to the destination node, that is, the first node may directly know, from the routing information, that the third node is the next hop node of the next hop node in the routing information. The first node may then lock the routing information associated with the third node upon receiving a status advertisement message from the second master node regarding the third node. And then, the first node switches the next hop node of the routing information from the second main node to the second standby node, thereby realizing the quick switching of the routing information of the first node.
In another possible design, before the first node receives the status advertisement packet from the second master node, the method further includes: the first node receives attribute information sent from the second main node, wherein the attribute information is used for indicating that the third node is a next hop node when the second main node sends a message to the destination node. The first node updates the routing information based on the attribute information, and the updated routing information includes the attribute information.
Through the possible design, the first node receives the attribute information for indicating that the third node is the next hop node when the second host node sends the message to the destination node from the second host node, that is, the first node learns that the third node is the next hop node of the next hop node in the routing information according to the indication of the second host node, and updates the attribute information into the routing information, so that the first node can directly learn that the third node is the next hop node of the next hop node in the routing information from the routing information. The first node may then lock the routing information associated with the third node upon receiving a status advertisement message from the second master node regarding the third node. And then, the first node switches the next hop node of the routing information from the second main node to the second standby node, thereby realizing the quick switching of the routing information of the first node.
In another possible design, the communication network further includes a fourth node, where the fourth node is a backup next hop node when the second master node sends a packet to the destination node, and at this time, the state advertisement packet is further used to indicate that the state of the fourth node is an unreachable state; the attribute information is also used for indicating that the fourth node is a backup next hop node when the second main node sends the message to the destination node.
In another possible design, the third node is the only next-hop node when the second master node sends the packet to the destination node.
Through the two possible designs, when the states of all next hop nodes (for example, including the third node and the fourth node, or including only the third node) of the second master node are all in the non-available state, the first node switches the next hop node of the routing information from the second master node to the second standby node, thereby avoiding fast switching of the routing information of the first node under an unnecessary condition.
In a second aspect, the present application provides a method for switching a route, which is applied in a communication network. The communication network includes a first node, a second master node, a second slave node, and a third node. The first node comprises routing information, the routing information is used for indicating the first node to send a message to a destination node, a next hop node in the routing information is a second main node, and a third node is the next hop node when the second main node sends the message to the destination node. The method comprises the following steps: and the second main node generates a state notification message, wherein the state notification message is used for indicating that the state of the third node is an unreachable state. And the second main node sends a state notification message to the first node so that the first node switches the next hop node of the routing information into a second standby node based on the state notification message.
In this way, when receiving the state advertisement message sent by the next hop node (i.e., the second master node), the first node may determine that the state of the next hop node (e.g., the third node) of the next hop node of the routing information is the unreachable state, and then switch the next hop node of the routing information of the first node from the second master node to the second standby node, thereby implementing fast switching of the routing information of the first node. Therefore, even if the first node sends a large amount of routing information of the message to different destination addresses through the second host node, the first node can quickly complete the switching of the routing, thereby improving the routing switching performance of the first node.
In a possible design, before the second master node sends the status notification packet to the first node, the method further includes: and the second main node sends a second capability negotiation message to the first node, wherein the second capability negotiation message is used for indicating that the second main node has the state notification capability. The second master node receives a first capability negotiation message from the first node, wherein the first capability negotiation message is used for indicating that the first node has a state notification capability, and a capability code value of the first capability negotiation message and a capability code value of the second capability negotiation message have a preset corresponding relationship. Wherein the status notification capability includes a capability to generate or identify a status notification message.
Through the possible design, the first node and the second main node determine that the first node and the second main node have state passing capability in advance through negotiation, then the first node can determine that the next hop node of the second main node is in an unreachable state based on the capability, and then the first node switches the next hop node of the routing information from the second main node to the second standby node, so that the rapid switching of the routing information of the first node is realized.
In another possible design, the routing information includes attribute information, where the attribute information is used to indicate that the third node is a next hop node when the second host node sends a packet to the destination node.
Through the possible design, the first node may obtain, from the routing information, attribute information for indicating that the third node is a next hop node when the second host node sends a packet to the destination node, that is, the first node may directly know, from the routing information, that the third node is the next hop node of the next hop node in the routing information. Then, when the first node receives a status advertisement message from the second master node regarding the third node, the routing information related to the third node may be locked. And then, the first node switches the next hop node of the routing information from the second main node to the second standby node, thereby realizing the quick switching of the routing information of the first node.
In another possible design, before the second master node sends the status notification packet to the first node, the method further includes: the second host node generates attribute information, and the attribute information is used for indicating that the third node is the next hop node when the second host node sends the message to the destination node. The second host node sends the attribute information to the first node, so that the first node updates the routing information based on the attribute information, and the updated routing information comprises the attribute information.
Through the possible design, when the first node receives the attribute information, which is sent by the next hop node (i.e., the second master node) and used for indicating that the third node is the next hop node when the second master node sends the message to the destination node, the first node can learn that the third node is the next hop node of the next hop node in the routing information according to the indication of the second master node, and update the attribute information into the routing information. Then, the first node can directly learn that the third node is the next hop node of the next hop node in the routing information from the routing information. The first node may then lock the routing information associated with the third node upon receiving a status advertisement message from the second master node regarding the third node. And then, the first node switches the next hop node of the routing information from the second main node to the second standby node, thereby realizing the quick switching of the routing information of the first node.
In another possible design, the communication network further includes a fourth node, where the fourth node is a backup next hop node when the second master node sends a packet to the destination node, and at this time, the state advertisement packet is further used to indicate that the state of the fourth node is an unreachable state; the attribute information is also used for indicating that the fourth node is a backup next hop node when the second main node sends the message to the destination node.
In another possible design, the third node is the only next-hop node when the second master node sends the packet to the destination node.
Through the two possible designs, when the states of all next hop nodes (for example, including the third node and the fourth node, or including only the third node) of the second master node are all in the non-available state, the first node switches the next hop node of the routing information from the second master node to the second standby node, thereby avoiding fast switching of the routing information of the first node under an unnecessary condition.
In a third aspect, the present application provides a first node, where the first node is applied in a communication network, and the communication network further includes a second master node, a second standby node, and a third node. The first node comprises routing information, the routing information is used for indicating the first node to send a message to a destination node, a next hop node in the routing information is a second main node, and a third node is the next hop node when the second main node sends the message to the destination node.
In a possible design, the first node may be configured to perform any one of the methods provided in the first aspect. The present application may perform functional module division on the first node according to any one of the methods provided by the first aspect. For example, the functional blocks may be divided for the respective functions, or two or more functions may be integrated into one processing block. For example, the first node may be divided into a receiving unit and a switching unit according to functions. The above description of possible technical solutions and beneficial effects executed by each divided functional module may refer to the technical solutions provided by the first aspect or the corresponding possible designs thereof, and will not be described herein again.
In another possible design, the first node includes: a memory for storing computer instructions and one or more processors for invoking the computer instructions to perform any of the methods as provided by the first aspect and any of its possible designs.
In a fourth aspect, the present application provides a second master node, where the second master node is applied to a communication network, and the communication network further includes a first node, a second standby node, and a third node. The first node comprises routing information, the routing information is used for indicating the first node to send a message to a destination node, a next hop node in the routing information is a second main node, and a third node is the next hop node when the second main node sends the message to the destination node.
In a possible design, the second host node may be configured to perform any of the methods provided by the second aspect above. The present application may perform functional module division on the second master node according to any one of the methods provided by the second aspect. For example, the functional blocks may be divided for the respective functions, or two or more functions may be integrated into one processing block. For example, the second master node may be divided into a generation unit and a transmission unit according to functions. The above description of possible technical solutions and beneficial effects executed by each divided functional module can refer to the technical solution provided by the second aspect or its corresponding possible design, and will not be described herein again.
In another possible design, the second host node includes: a memory for storing computer instructions and one or more processors for invoking the computer instructions to perform any of the methods as provided by the second aspect and any of its possible designs.
In a fifth aspect, the present application provides a computer-readable storage medium, such as a computer non-transitory readable storage medium. Having stored thereon a computer program (or instructions) which, when run on a computer, causes the computer to perform any of the methods provided by any of the possible implementations of the first aspect described above.
In a sixth aspect, the present application provides a computer-readable storage medium, such as a computer non-transitory readable storage medium. Having stored thereon a computer program (or instructions) which, when run on a computer, causes the computer to perform any of the methods provided by any of the possible implementations of the second aspect described above.
In a seventh aspect, the present application provides a computer program product which, when run on a first node, causes any of the methods provided by any of the possible implementations of the first aspect to be performed.
In an eighth aspect, the present application provides a computer program product which, when run on a second host node, causes any of the methods provided by any of the possible implementations of the second aspect to be performed.
In a ninth aspect, the present application provides a chip system, comprising: and the processor is used for calling and running the computer program stored in the memory from the memory, and executing any method provided by any possible implementation manner of the first aspect.
In a tenth aspect, the present application provides a chip system, comprising: and the processor is used for calling and running the computer program stored in the memory from the memory and executing any method provided by any possible implementation manner of the second aspect.
In an eleventh aspect, the present application provides a network system comprising any one of the first nodes provided in any one of the possible implementations of the third aspect, and comprising any one of the second master nodes provided in any one of the possible implementations of the fourth aspect.
It is understood that any one of the apparatuses, computer storage media, computer program products, or chip systems provided above can be applied to the corresponding methods provided above, and therefore, the beneficial effects achieved by the apparatuses, the computer storage media, the computer program products, or the chip systems can refer to the beneficial effects in the corresponding methods, and are not described herein again.
In the present application, the names of the first node, the second host node, and the like do not limit the devices or the functional modules themselves, and in an actual implementation, the devices or the functional modules may appear by other names. Insofar as the functions of the respective devices or functional modules are similar to those of the present application, they fall within the scope of the claims of the present application and their equivalents.
These and other aspects of the present application will be more readily apparent from the following description.
Drawings
Fig. 1 is a schematic diagram of a communication network according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a computer device according to an embodiment of the present application;
fig. 3 is a first schematic structural diagram of a status notification message according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a method for switching a route according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a status notification message according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an attribute field provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a first node according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a second host node according to an embodiment of the present application;
FIG. 9 is a block diagram of a computer program product according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a network system according to an embodiment of the present application.
Detailed Description
In the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the embodiments of the present application, the terms "first", "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless otherwise specified.
The term "at least one" in this application means one or more, and the term "plurality" in this application means two or more, for example, the plurality of second messages means two or more second messages. The terms "system" and "network" are often used interchangeably herein.
It is to be understood that the terminology used in the description of the various described examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various described examples and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and/or" is an associative relationship that describes an associated object, meaning that three relationships may exist, e.g., A and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in the present application generally indicates that the former and latter related objects are in an "or" relationship.
It should also be understood that, in the embodiments of the present application, the size of the serial number of each process does not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
It should be understood that determining B from a does not mean determining B from a alone, but may also be determined from a and/or other information.
It will be further understood that the terms "comprises," "comprising," "includes," and/or "including," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also understood that the term "if" may be interpreted to mean "when" ("where" or "upon") or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined." or "if [ a stated condition or event ] is detected" may be interpreted to mean "upon determining.. or" in response to determining. "or" upon detecting [ a stated condition or event ] or "in response to detecting [ a stated condition or event ]" depending on the context.
It should be appreciated that reference throughout this specification to "one embodiment," "an embodiment," "one possible implementation" means that a particular feature, structure, or characteristic described in connection with the embodiment or implementation is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" or "one possible implementation" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Referring to fig. 1, an embodiment of the present application provides a communication network 10. As shown in FIG. 1, the communication network 10 may include a first node A1, a second master node B1, a second slave node B2, and a third node C1. The first node a1 includes routing information, where the routing information is used to instruct the first node a1 to send a packet to a destination node, a next-hop node in the routing information may be the second master node B1, the second standby node B2 may be a backup next-hop node of the routing information, and the third node C1 may be a next-hop node when the second master node B1 sends a packet to the destination node. It will be appreciated that the second master node B1 and the second standby node B2 may be any forwarding node in the communication network other than the source node and the destination node.
In general, when each node within the communication network 10 is reachable, the communication network 10 may send a message to the destination node via the path a1 → B1 → C1, and the second standby node B2 is in a standby state. When the state of the second master node B1 is in the unreachable state or the state of the third node C1 is in the unreachable state, the communication network 10 may send a message to the destination node through the path a1 → B2. Here, if the state of the node is the reachable state, it indicates that the node can normally forward the packet. If the state of the node is the unreachable state, it indicates that the node may not normally forward the packet due to a failure of a link to the node or a failure of the node itself. Of course, the reason why the node cannot forward the packet normally is not limited to this.
The embodiment of the present application provides a method for switching a route, which may be applied to the communication network 10 described above. The method comprises the following steps: the first node a1 modifies the next hop node of the routing table entry in the routing table to be the second standby node by determining that the state of the next hop node (i.e., the third node) of the second master node is the unreachable state, i.e., switches the next hop node of the routing table entry in the routing table from the second master node to the second standby node. By adopting the method, the time for the first node A1 to switch the route is shortened, thereby improving the message transmission efficiency.
Each node shown in the communication network 10 may be a physical machine (e.g., a general-purpose computer) with a routing function, or a virtual machine running on a physical machine with a routing function, which is not limited in this embodiment of the present application.
Referring to fig. 2, an embodiment of the present application provides a computer device 20. The computer device 20 may be any one of the first node a1, the second master node B1, the second slave node B2, or the third node C1 in the communication network 10 described above. Computer device 20 includes a processor 21, a memory 22, a communication interface 23, and a bus 24. The processor 21, the memory 22 and the communication interface 23 may be connected by a bus 24.
The processor 21 is a control center of the computer device 20, and may be a Central Processing Unit (CPU), other general-purpose processors, or the like. Wherein a general purpose processor may be a microprocessor or any conventional processor or the like.
As an example, the processor 21 may include one or more CPUs, such as CPU 0 and CPU 1 shown in fig. 2.
The memory 22 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
In one possible implementation, the memory 22 may exist independently of the processor 21. Memory 22 may be coupled to processor 21 via bus 24 for storing data, instructions, or program code. The processor 21 can implement the method for switching the routing provided by the embodiment of the present application when calling and executing the instructions or program codes stored in the memory 22.
In another possible implementation, the memory 22 may also be integrated with the processor 21.
The communication interface 23 is used for connecting the computer device 20 and other devices (such as the first node a1, the second main node B1, the second standby node B2, and the like) through a communication network, which may be an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), and the like. The communication interface 23 may include a receiving unit for receiving data, and a transmitting unit for transmitting data.
The bus 24 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an extended ISA (enhanced industry standard architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 2, but it is not intended that there be only one bus or one type of bus.
It should be noted that the configuration shown in fig. 2 does not constitute a limitation of the computer device, and that the computer device 20 may include more or less components than those shown, or combine some components, or a different arrangement of components, in addition to the components shown in fig. 2.
The method for switching the route provided by the embodiment of the present application may be applied to the communication network 10 described above. Wherein the first node and the second master node for performing the method each have a status advertisement capability. The status advertisement capability includes a capability to generate or identify a status advertisement message, which may be negotiated between the first node and the second master node.
As an example, the first node may send a first capability negotiation packet to the second host node when or after establishing a neighbor with the second host node, where the first capability negotiation packet is used to indicate that the first node has a status advertisement capability. In response, the second host node may receive a first capability negotiation message.
Similarly, the second host node may send, to the first node, a second capability negotiation packet when or after establishing a neighbor with the first node, where the second capability negotiation packet is used to indicate that the second host node has a status notification capability. In response, the first node may receive a second capability negotiation message. It should be noted that, in the embodiment of the present application, a time sequence of sending the first capability negotiation packet to the second host node by the first node and sending the second capability negotiation packet to the first node by the second host node is not limited, and a causal connection does not exist between the first capability negotiation packet and the second capability negotiation packet.
When the first node receives the second capability negotiation message, it is determined that a capability code (capability code) value in the second capability negotiation message is the same as a capability code value of the first node, or it is determined that the capability code value in the second capability negotiation message has a preset corresponding relationship with the capability code value of the first node, the first node and the second master node negotiate a state notification capability successfully. Or, when the second host node receives the first capability negotiation message, it is determined that the capability code value in the first capability negotiation message is the same as the capability code value of the second host node, or it is determined that the capability code value in the first capability negotiation message and the capability code value of the second host node have a preset corresponding relationship, the negotiation state notification capability between the first node and the second host node is successful. The preset corresponding relationship is not limited in the embodiment of the present application. In practical applications, the capability code value may be obtained by applying to the Internet Assigned Numbers Authority (IANA). This is not limitative. For example, the capability code value may be 72.
The above-mentioned status notification capability defines the message content format of the status notification message. Therefore, the node with the state notification capability can generate and identify the state notification message according to the message content format of the state notification message defined by the state notification capability.
The type value of the message with the message content format may be obtained by applying to the IANA, which is not limited herein. For example, the type value of a message having the message format may be 6.
As an example, referring to fig. 3, fig. 3 shows a message content format of a status notification message defined by a status notification capability. As shown in fig. 3, the content of the status notification message may include 8 fields. The ordering of the 8 fields is not limited in the embodiment of the present application. Specifically, the content represented by the 8 fields is further described below.
Field 1 may be used to represent Address Family Identifier (AFI) information. Field 1 may comprise 2 bytes, i.e. 16 bits. For example, if the address family is internet protocol version 4 (IPV 4), and the protocol value allocated by IANA for IPV4 is 1, the field 1 may be 01, i.e., 0000000000000001.
The field 2 may be used to indicate sub-sequence address family identifier (sub-sequence address family identifier) information. The field 2 may comprise 1 byte, i.e. 8 bits. For example, if the address family is IPV4, the sub-address family may be IPV4 unicast address family, the protocol value assigned by IANA for IPV4 unicast address family is 1, and field 2 may be 1, i.e., 00000001.
Field 3, which may be used to indicate a reserved field. The field 3 may comprise 1 byte, i.e. 8 bits.
The field 4 may be used to indicate a next hop state change. The next hop state change may be used to indicate: the field 5, the field 6, the field 7, and the field 8 are fields for describing the state of the next hop node. The field 4 may indicate a next hop state change with a preset value. The field 4 may comprise 2 bytes, i.e. 16 bits. For example, if the preset value is 1, the field 4 may be 01, i.e., 0000000000000001, and is used to represent the next hop state change.
The field 5 may be used to indicate the Next Hop State Length (Length of Next Hop State). Here, the next hop state length is used to indicate the total length of the next hop network address. The field 5 may comprise 2 bytes, i.e. 16 bits. For example, if the number of next hop nodes is 2 and the length of one network address is 4 bytes, then the next hop state length is 2 × 4, i.e., 8 bytes, and then field 5 may be 08, i.e., 0000000000001000. For another example, if the number of next hop nodes is 2 and the length of a network address is 16 bytes, then the next hop state length is 2 × 16, i.e., 32 bytes, and then field 5 may be 32, i.e., 0000001100000010.
Field 6 may be used to indicate the Next Hop Network Address Length (Length of Next Hop Network Address). The field 6 may comprise 1 byte, i.e. 8 bits. For example, if the next hop network address length is 4 bytes, field 6 may be 4, i.e., 00000100. If the next hop network address length is 16 bytes, field 6 may be 16, 0000000100000110.
The field 7 may include j Next Hop Network addresses (Network Address of Next Hop), each of which may represent a Next Hop node. Here, j is an integer of 1 or more. Thus, the length of field 7 is related to the number of next hop nodes.
The field 8 may be used to indicate a State (State) indicating the State of the next hop node indicated by each next hop network address in the field 7. The state of the next hop node may be an initial state, a reachable state, or a unreachable state. If field 7 includes j next hop network addresses, i.e. corresponding to j next hop nodes, then field 8 may include j states, which are the current states of the j next hop nodes. In addition, the initial state, the reachable state, or the unreachable state may be represented by preset values, respectively. The field 8 may include 4 bytes, and as an example, the initial state may be represented by 0000, the reachable state may be represented by 0001, and the unreachable state may be represented by 0010.
In practical applications, the fields 7 and 8 in the status notification message may be represented as a combination of the status in each next hop network address in the field 7 and the status in the field 8. For example, taking j as 2, the field 7 may be (address 1, address 2), the field 8 may be (unreachable status ), and the field 7 and the field 8 in the status notification message may be represented as (address 1, unreachable status, address 2, unreachable status).
The above description has been made of the state advertisement capability of the first node and the second master node. The following describes a method for switching a route according to an embodiment of the present application with reference to the accompanying drawings.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for switching a route according to an embodiment of the present application. The method may be applied in the communication network 10 shown in fig. 1. The method may comprise the steps of:
s101, the second main node sends a state notification message to the first node.
Optionally, the second host node may send the state advertisement message to the first node through a communication interface of the second host node.
In response, the first node receives the status advertisement message.
The state notification message is a state notification message generated by the second master node when the second master node senses that the state of the third node is an unreachable state. The status advertisement message is used to indicate that the status of the third node is an unreachable status. If the second master node further includes a backup next hop node when sending the message to the destination node, for example, the backup next hop node is a fourth node, the state advertisement message is further used to indicate that the state of the fourth node is an unreachable state. The routing information of the first node is used for indicating the first node to send a message to the destination address.
Here, the state of the third node is an unreachable state (i.e., the third node is unreachable), which may be the third node unreachable due to a path failure between the second master node and the third node, or the third node unreachable due to a failure of the third node itself, and the like, which is not limited herein.
As an example, the second host node may detect a path between the second host node and the third node through a Bidirectional Forwarding Detection (BFD) mechanism to determine that the state of the third node is an unreachable state. Alternatively, the second master node may sense the state of the third node as an unreachable state through an Interior Gateway Protocol (IGP) route. The embodiment of the present application does not specifically limit the manner in which the second master node senses the state of the third node.
When the second host node senses that the state of the third node is the unreachable state, the second host node may generate the state advertisement message according to the message content format defined by the state advertisement capability and shown in fig. 3.
As an example, referring to fig. 5, fig. 5 shows a status notification message generated by the second master node. The message type value may be included in the header of the status notification message, and may be 6 as described above. The field 1, the field 2, the field 3, and the field 4 of the status notification message may all refer to the description of fig. 3, and are not described herein again.
If the next hop node when the second master node sends the packet to the destination node is shown in fig. 1, there are only 1 next hop node (i.e., the third node), in this case, taking a network address with a length of 4 bytes as an example, the status notification packet generated by the second master node is shown in (a) in fig. 5. Wherein, the field 5 of the status notification packet may be 04, which indicates that the network address length of the third node is 4; the field 6 of the status notification packet may be 4, which indicates that the network address length of the third node is 4; the field 7 of the status notification message may be 0000, indicating that the network address of the third node is 0000; the field 8 of the status advertisement message may be 0010, where 0010 indicates that the third node is in an unreachable state.
If the second master node sends the message to the destination node, the second master node further includes a backup next hop node, for example, the backup next hop node is a fourth node. In this case, taking a network address with a length of 4 bytes as an example, the status notification message generated by the second master node is as shown in (b) of fig. 5. The field 5 of the status advertisement message may be 08, which indicates that the total length of the network addresses of the next-hop nodes of the second master node is 8, that is, the sum of the network address length of the third node and the network address length of the fourth node. The field 6 of the status advertisement message may be 4, which indicates that the unit length of the network address of the next hop node of the second master node is 4, i.e. the length of the network address of 1 next hop node is 4. The fields 7 and 8 of the status advertisement packet may be { (0000, 0010), (0001, 0010) }, where (0000, 0010) indicates that the network address of the third node is 0000, 0010 indicates that the third node is in the unreachable state, and (0001, 0010) indicates that the network address of the fourth node is 0001, and 0010 indicates that the fourth node is in the unreachable state.
S102, the first node switches the next hop node of the routing information of the first node into a second standby node based on the state notification message.
Specifically, the first node switches the next hop node of the routing information of the first node to the second standby node based on the attribute information and the state advertisement packet. Here, the second standby node may be a unique backup next hop node in the routing information for instructing the first node to send the packet to the destination address.
The attribute information is used to indicate that the third node is the next hop node when the second host node sends the packet to the destination node. If the second master node further includes a backup next hop node when sending the message to the destination node, for example, the backup next hop node is a fourth node, the attribute information is further used to indicate that the fourth node is the backup next hop node when the second master node sends the message to the destination node.
Optionally, if the routing information of the first node includes the attribute information, the first node may obtain the attribute information from the routing information of the first node.
Optionally, the first node may receive the attribute information sent by the second host node. The first node receives the description of the attribute information sent by the second host node, which may refer to the following text and is not described herein again.
If the next hop node of the second master node is only 1 (i.e., the third node), the first node may determine, based on the attribute information, that the third node is the next hop node when the second master node sends the packet to the destination node. The first node may determine that the state of the third node is an unreachable state based on the state advertisement packet. In this way, the first node may modify the next hop node in the routing information of the first node to be the second standby node. That is, the first node switches the next hop node of the routing information of the first node from the second master node to the second slave node.
If the second master node sends the message to the destination node, the method further includes a backup next hop node, for example, the backup next hop node is a fourth node. In this case, the first node may determine, based on the attribute information, that the third node is a next hop node when the second host node sends the packet to the destination node, and determine that the fourth node is a backup next hop node when the second host node sends the packet to the destination node. The first node may determine that the states of the third node and the fourth node are both unreachable states based on the state advertisement packet. In this way, the first node may modify the next hop node in the routing information of the first node to be the second standby node. That is, the first node switches the next hop node of the routing information of the first node from the second master node to the second slave node.
It should be noted that, if the backup next hop node in the routing information of the first node includes other backup next hop nodes besides the second backup node. At this time, the first node determines that the node with the highest priority is the second standby node according to the priorities of the second standby node and the other backup next hop nodes. Then, the first node switches the next hop node of the routing information of the first node from the second main node to the second standby node. The priority of a node may be based on the priority of the transmission delay of the node, for example, the smaller the transmission delay of the node, the higher the priority of the node is, or the like. Alternatively, the priority of a node may be a priority based on the distance of a transmission path passing through the node, for example, the shorter the distance of a transmission path passing through a certain node, the higher the priority of the node. Alternatively, the priority of the node may also be a priority based on a packet loss rate of the node, for example, the lower the packet loss rate of the node is, the higher the priority of the node is, and the like, which is not described again.
The following describes that the first node receives the attribute information sent by the second host node.
In a possible implementation manner, the second master node may send the attribute information to the first node when sensing that the state of the third node is the unreachable state. In response, the first node receives the attribute information. The description that the state of the third node is the unreachable state and the second master node senses that the state of the third node is the unreachable state may refer to the description in S101, which is not repeated herein.
In another possible implementation manner, the first node may receive an update message sent by the second host node, where the update message includes the attribute information. Specifically, the second master node may periodically send the update packet to the first node from the time of establishing a neighbor with the first node. Alternatively, the second master node may start with establishing a neighbor with the first node, and be triggered by a different trigger event, thereby sending an update packet to the first node. In response, the first node receives an update message including the attribute information. The triggering event for triggering the second master node to send the update message may be that the second master node senses a link failure between the second master node and a next hop node, or may be an event that the second master node updates a routing table, and the like, which is not limited herein.
It should be noted that the attribute information may be a next hop attribute field newly added in the update message. The 1 next hop attribute field may be used to indicate the identity (e.g., Internet Protocol (IP) address) of the 1 next hop node. Taking the second master node as an example, if the second master node includes k next hop nodes, the second master node may add k next hop attribute fields in the update message, where k is an integer greater than or equal to 1.
Referring to fig. 6, fig. 6 shows a new next hop attribute field in the update message, which may include 2 bytes, i.e., 16 bits. As shown in fig. 6, the new next hop attribute field may be appended to the existing update packet, and the comparison is not limited. In practical applications, the type value of the next hop attribute field may be obtained by applying to IANA. As an example, the type value may be 37. The type value is used to identify the newly added next hop attribute field in the update message.
To sum up, in the method for switching a route provided in the embodiment of the present application, when the first node determines that states of next-hop nodes (for example, a third node) when the second host node sends a message to a destination address are all unreachable states based on a state advertisement message sent by the next-hop node (that is, the second host node) of the route information, the next-hop node of the route information of the first node is switched from the second host node to the second standby node, so that fast switching of the route information of the first node is achieved. Therefore, even if the first node sends a large amount of routing information of the message to different destination addresses through the second host node, the first node can quickly complete the switching of the routing, thereby improving the routing switching performance of the first node.
The scheme provided by the embodiment of the application is mainly introduced from the perspective of a method. To implement the above functions, it includes hardware structures and/or software modules for performing the respective functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, functional modules may be divided between the first node and the second master node according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
As shown in fig. 7, fig. 7 is a schematic structural diagram of a first node 70 provided in the embodiment of the present application. The first node 70 is applied in a communication network, which further comprises a second master node, a second standby node and a third node. The first node 70 includes routing information, where the routing information is used to instruct the first node 70 to send a message to a destination node, a next hop node in the routing information is a second host node, and a third node is a next hop node when the second host node sends a message to the destination node. The first node 70 is configured to perform the above-mentioned route switching method, for example, to perform the method shown in fig. 4. Therein, the first node 70 comprises a receiving unit 71 and a switching unit 72.
A receiving unit 71, configured to receive a status notification message from the second master node, where the status notification message is used to indicate that the status of the third node is an unreachable status. And a switching unit 72, configured to switch the next hop node of the routing information to the second standby node based on the state advertisement packet.
As an example, in connection with fig. 4, the receiving unit 71 may be configured to respond to S101, and the switching unit 72 may be configured to perform S102.
Optionally, the first node 70 further includes: a sending unit 73, configured to send a first capability negotiation packet to the second host node before the receiving unit 71 receives the status advertisement packet from the second host node, where the first capability negotiation packet is used to indicate that the first node 70 has the status advertisement capability. The receiving unit 71 is further configured to receive a second capability negotiation packet from the second host node before receiving the status notification packet from the second host node, where the second capability negotiation packet is used to indicate that the second host node has a status notification capability, and here, a capability code value of the second capability negotiation packet and a capability code value of the first capability negotiation packet have a preset corresponding relationship. Wherein the status notification capability includes a capability to generate or identify a status notification message.
Optionally, the routing information includes attribute information, where the attribute information is used to indicate that the third node is a next-hop node when the second host node sends the packet to the destination node.
Optionally, the receiving unit 71 is further configured to receive, before receiving the status notification packet from the second host node, attribute information sent from the second host node, where the attribute information is used to indicate that the third node is a next-hop node when the second host node sends the packet to the destination node. The first node 70 further comprises: an updating unit 74, configured to update the routing information based on the attribute information, where the updated routing information includes the attribute information.
Optionally, the communication network further includes a fourth node, where the fourth node is a backup next hop node when the second master node sends a packet to the destination node, and at this time, the state advertisement packet is further used to indicate that the state of the fourth node is an unreachable state; the attribute information is also used for indicating that the fourth node is a backup next hop node when the second main node sends the message to the destination node.
Optionally, the third node is a unique next hop node when the second host node sends the packet to the destination node.
For the detailed description of the above alternative modes, reference may be made to the foregoing method embodiments, which are not described herein again. In addition, for any explanation and beneficial effect description of the first node 70 provided above, reference may be made to the corresponding method embodiment described above, and details are not repeated.
As an example, in connection with fig. 2, the functions implemented by the switching unit 72 and the updating unit 74 in the first node 70 may be implemented by the processor 21 in fig. 2 executing program code in the memory 22 in fig. 2. The functions performed by the receiving unit 71 and the transmitting unit 73 may be performed by the communication interface 23 in fig. 2.
As shown in fig. 8, fig. 8 is a schematic structural diagram illustrating a second host node 80 provided in an embodiment of the present application. The second master node 80 is applied in a communication network, which further comprises a first node, a second standby node and a third node. The first node includes routing information, the routing information is used to instruct the first node to send a message to a destination node, a next hop node in the routing information is the second master node 80, and the third node is the next hop node when the second master node 80 sends the message to the destination node. The second master node 80 is configured to perform the above-mentioned route switching method, for example, to perform the method shown in fig. 4. The second master node 80 includes a generation unit 81 and a transmission unit 82.
The generating unit 81 is configured to generate a status notification message, where the status notification message is used to indicate that the status of the third node is an unreachable status. A sending unit 82, configured to send the state advertisement packet to the first node, so that the first node switches the next hop node of the routing information to the second standby node based on the state advertisement packet.
As an example, in connection with fig. 4, the sending unit 82 may be configured to perform S101.
Optionally, the sending unit 82 is further configured to send a second capability negotiation packet to the first node before sending the status notification packet to the first node, where the second capability negotiation packet is used to indicate that the second host node 80 has the status notification capability. The second host node 80 further includes: a receiving unit 83, configured to receive a first capability negotiation packet from the first node before the sending unit 82 sends the status notification packet to the first node, where the first capability negotiation packet is used to indicate that the first node has a status notification capability, and a capability code value of the first capability negotiation packet and a capability code value of the second capability negotiation packet have a preset corresponding relationship. Wherein the status notification capability includes a capability to generate or identify a status notification message.
Optionally, the routing information includes attribute information, where the attribute information is used to indicate that the third node is a next hop node when the second host node 80 sends the packet to the destination node.
Optionally, the generating unit 81 is further configured to generate attribute information before the sending unit 82 sends the status notification packet to the first node, where the attribute information is used to indicate that the third node is a next hop node when the second master node 80 sends the packet to the destination node. The sending unit 82 is further configured to send the attribute information to the first node, so that the first node updates the routing information based on the attribute information, where the updated routing information includes the attribute information.
Optionally, the communication network further includes a fourth node, where the fourth node is a backup next hop node when the second master node 80 sends a packet to the destination node, and at this time, the state advertisement packet is further used to indicate that the state of the fourth node is an unreachable state; the attribute information is also used to indicate that the fourth node is a backup next hop node when the second master node 80 sends a packet to the destination node.
Optionally, the third node is a unique next hop node when the second host node 80 sends the packet to the destination node.
For the detailed description of the above alternative modes, reference may be made to the foregoing method embodiments, which are not described herein again. In addition, for any explanation and beneficial effect description of the second host node 80 provided above, reference may be made to the corresponding method embodiment described above, and details are not repeated.
As an example, in connection with fig. 2, the functions implemented by the generating unit 81 in the second master node 80 may be implemented by the processor 21 in fig. 2 executing program code in the memory 22 in fig. 2. The functions performed by the transmitting unit 82 and the receiving unit 83 may be performed by the communication interface 23 in fig. 2.
Another embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a first node or a second host node, the first node or the second host node performs each step performed by the first node or the second host node in the method flow shown in the foregoing method embodiment.
In some embodiments, the disclosed methods may be implemented as computer program instructions encoded on a computer-readable storage medium in a machine-readable format or encoded on other non-transitory media or articles of manufacture.
Fig. 9 schematically illustrates a conceptual partial view of a computer program product comprising a computer program for executing a computer process on a computing device provided by an embodiment of the application.
In one embodiment, the computer program product is provided using a signal bearing medium 90. The signal bearing medium 90 may include one or more program instructions that, when executed by one or more processors, may provide the functions or portions of the functions described above with respect to fig. 4. Thus, for example, one or more features described with reference to S101-S102 in FIG. 4 may be undertaken by one or more instructions associated with the signal bearing medium 90. Further, the program instructions in FIG. 9 also describe example instructions.
In some examples, signal bearing medium 90 may comprise a computer readable medium 91, such as, but not limited to, a hard disk drive, a Compact Disc (CD), a Digital Video Disc (DVD), a digital tape, a memory, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
In some embodiments, the signal bearing medium 90 may comprise a computer recordable medium 92 such as, but not limited to, memory, read/write (R/W) CD, R/W DVD, and the like.
In some implementations, the signal bearing medium 90 may include a communication medium 93, such as, but not limited to, a digital and/or analog communication medium (e.g., a fiber optic cable, a waveguide, a wired communications link, a wireless communication link, etc.).
The signal bearing medium 90 may be conveyed by a wireless form of communication medium 93, such as a wireless communication medium that complies with the IEEE 802.11 standard or other transmission protocol. The one or more program instructions may be, for example, computer-executable instructions or logic-implementing instructions.
In some examples, a first node or a second host node, such as described with respect to fig. 4, may be configured to provide various operations, functions, or actions in response to program instructions through one or more of computer readable medium 91, computer recordable medium 92, and/or communication medium 93.
Referring to fig. 10, an embodiment of the present application further provides a network system 100. The network system 100 includes a first node 101 and a second master node 102. Reference may be made to the above for related descriptions and beneficial effects of first node 101 and second host node 102, which are not described herein again.
It should be understood that the arrangements described herein are for illustrative purposes only. Thus, those skilled in the art will appreciate that other arrangements and other elements (e.g., machines, interfaces, functions, orders, and groupings of functions, etc.) can be used instead, and that some elements may be omitted altogether depending upon the desired results. In addition, many of the described elements are functional entities that may be implemented as discrete or distributed components or in conjunction with other components, in any suitable combination and location.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented using a software program, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The processes or functions according to the embodiments of the present application are generated in whole or in part when the computer-executable instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). Computer-readable storage media can be any available media that can be accessed by a computer or can comprise one or more data storage devices, such as servers, data centers, and the like, that can be integrated with the media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (20)

1. A method for switching a route is applied to a communication network, wherein the communication network comprises a first node, a second main node, a second standby node and a third node, wherein the first node comprises routing information, the routing information is used for indicating the first node to send a message to a destination node, a next hop node in the routing information is the second main node, and the third node is the next hop node when the second main node sends the message to the destination node; the method comprises the following steps:
the first node receives a state notification message from the second host node, wherein the state notification message is used for indicating that the state of the third node is an unreachable state;
and based on the state advertisement message, the first node switches the next hop node of the routing information to the second standby node.
2. The method of claim 1, wherein prior to the first node receiving the status advertisement message from the second master node, the method further comprises:
the first node sends a first capability negotiation message to the second host node, wherein the first capability negotiation message is used for indicating that the first node has state notification capability;
the first node receives a second capability negotiation message from the second host node, wherein the second capability negotiation message is used for indicating that the second host node has a state notification capability, and a capability code value of the second capability negotiation message and a capability code value of the first capability negotiation message have a preset corresponding relationship;
wherein the status notification capability includes a capability to generate or identify the status notification message.
3. The method according to claim 1 or 2, wherein the routing information includes attribute information, and the attribute information is used to indicate that the third node is a next hop node when the second master node sends a packet to the destination node.
4. The method according to claim 1 or 2, wherein before the first node receives a status advertisement message from the second master node, the method further comprises:
the first node receives attribute information sent by the second main node, wherein the attribute information is used for indicating that the third node is a next hop node when the second main node sends a message to the destination node;
and the first node updates the routing information based on the attribute information, wherein the updated routing information comprises the attribute information.
5. The method according to claim 3 or 4, wherein the communication network further comprises a fourth node, the fourth node being a backup next hop node when the second master node sends a message to the destination node,
the state notification message is also used for indicating that the state of the fourth node is an unreachable state;
the attribute information is further used to indicate that the fourth node is a backup next hop node when the second master node sends a packet to the destination node.
6. The method according to any of claims 1 to 4, wherein the third node is the only next hop node when the second master node sends a packet to the destination node.
7. A method for switching a route is applied to a communication network, wherein the communication network comprises a first node, a second main node, a second standby node and a third node, wherein the first node comprises routing information, the routing information is used for indicating the first node to send a message to a destination node, a next hop node in the routing information is the second main node, and the third node is the next hop node when the second main node sends the message to the destination node; the method comprises the following steps:
the second master node generates a state notification message, wherein the state notification message is used for indicating that the state of the third node is an unreachable state;
and the second master node sends the state notification message to the first node, so that the first node switches the next hop node of the routing information into the second standby node based on the state notification message.
8. The method of claim 7, prior to the second master node sending a status advertisement message to the first node, the method further comprising:
the second main node sends a second capability negotiation message to the first node, wherein the second capability negotiation message is used for indicating that the second main node has the state notification capability;
the second master node receives a first capability negotiation message from the first node, wherein the first capability negotiation message is used for indicating that the first node has a state notification capability, and a capability code value of the first capability negotiation message and a capability code value of the second capability negotiation message have a preset corresponding relationship;
wherein the status notification capability includes a capability to generate or identify the status notification message.
9. The method according to claim 7 or 8, wherein before the second master node sends the status advertisement message to the first node, the method further comprises:
the second master node generates attribute information, wherein the attribute information is used for indicating that the third node is a next hop node when the second master node sends a message to the destination node;
and the second main node sends the attribute information to the first node so that the first node updates the routing information based on the attribute information, wherein the updated routing information comprises the attribute information.
10. A first node, where the first node is applied in a communication network, where the communication network further includes a second master node, a second standby node, and a third node, where the first node includes routing information, where the routing information is used to instruct the first node to send a packet to a destination node, a next hop node in the routing information is the second master node, and the third node is a next hop node when the second master node sends a packet to the destination node; the first node comprises:
a receiving unit, configured to receive a status notification message from the second host node, where the status notification message is used to indicate that a status of the third node is an unreachable status;
and the switching unit is used for switching the next hop node of the routing information into the second standby node based on the state notification message.
11. The first node of claim 10, wherein the first node further comprises:
a sending unit, configured to send a first capability negotiation packet to the second host node before the receiving unit receives the status notification packet from the second host node, where the first capability negotiation packet is used to indicate that the first node has a status notification capability;
the receiving unit is further configured to receive a second capability negotiation packet from the second host node before receiving the status notification packet from the second host node, where the second capability negotiation packet is used to indicate that the second host node has a status notification capability, and a capability code value of the second capability negotiation packet and a capability code value of the first capability negotiation packet have a preset corresponding relationship;
wherein the status notification capability includes a capability to generate or identify the status notification message.
12. The first node according to claim 10 or 11, wherein the routing information includes attribute information, and the attribute information is used to indicate that the third node is a next hop node when the second master node sends a packet to the destination node.
13. The first node according to claim 10 or 11,
the receiving unit is further configured to receive attribute information sent from the second host node before receiving the status advertisement packet from the second host node, where the attribute information is used to indicate that the third node is a next-hop node when the second host node sends a packet to the destination node;
the first node further comprises:
and the updating unit is used for updating the routing information based on the attribute information, and the updated routing information comprises the attribute information.
14. The first node according to claim 12 or 13, wherein the communication network further comprises a fourth node, the fourth node being a backup next hop node when the second master node sends a packet to the destination node,
the state notification message is also used for indicating that the state of the fourth node is an unreachable state;
the attribute information is further used to indicate that the fourth node is a backup next hop node when the second master node sends a packet to the destination node.
15. The first node according to any of claims 10 to 13, wherein the third node is the only next hop node when the second master node sends a message to the destination node.
16. A second master node, where the second master node is applied to a communication network, where the communication network further includes a first node, a second standby node, and a third node, where the first node includes routing information, the routing information is used to instruct the first node to send a packet to a destination node, a next hop node in the routing information is the second master node, and the third node is a next hop node when the second master node sends a packet to the destination node; the second master node includes:
a generating unit, configured to generate a state notification message, where the state notification message is used to indicate that the state of the third node is an unreachable state;
a sending unit, configured to send the state advertisement packet to the first node, so that the first node switches the next hop node of the routing information to the second standby node based on the state advertisement packet.
17. The secondary host node of claim 16,
the sending unit is further configured to send a second capability negotiation packet to the first node before sending the state advertisement packet to the first node, where the second capability negotiation packet is used to indicate that the second host node has a state advertisement capability;
the second master node further comprises:
a receiving unit, configured to receive a first capability negotiation packet from the first node before the sending unit sends the status notification packet to the first node, where the first capability negotiation packet is used to indicate that the first node has a status notification capability, and a capability code value of the first capability negotiation packet and a capability code value of the second capability negotiation packet have a preset corresponding relationship;
wherein the status notification capability includes a capability to generate or identify the status notification message.
18. The secondary host node of claim 16 or 17,
the generating unit is further configured to generate attribute information before the sending unit sends the status notification packet to the first node, where the attribute information is used to indicate that the third node is a next-hop node when the second host node sends a packet to the destination node;
the sending unit is further configured to send the attribute information to the first node, so that the first node updates the routing information based on the attribute information, where the updated routing information includes the attribute information.
19. A network system, characterized in that the network system comprises a first node according to any of claims 10 to 15 and a second master node according to any of claims 16 to 18.
20. A computer-readable storage medium, having stored thereon a computer program which, when run on a first node, causes the first node to perform the method of any of claims 1 to 6, or which, when run on a second master node, causes the second master node to perform the method of any of claims 7 to 9.
CN202010261347.7A 2020-04-03 2020-04-03 Method and device for switching route Active CN113497794B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010261347.7A CN113497794B (en) 2020-04-03 2020-04-03 Method and device for switching route

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010261347.7A CN113497794B (en) 2020-04-03 2020-04-03 Method and device for switching route

Publications (2)

Publication Number Publication Date
CN113497794A true CN113497794A (en) 2021-10-12
CN113497794B CN113497794B (en) 2023-04-18

Family

ID=77995331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010261347.7A Active CN113497794B (en) 2020-04-03 2020-04-03 Method and device for switching route

Country Status (1)

Country Link
CN (1) CN113497794B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141382A (en) * 2006-09-07 2008-03-12 华为技术有限公司 Routing update method and router
CN102075360A (en) * 2011-01-19 2011-05-25 中国人民解放军信息工程大学 Aggregation equivalence class-based network fault distributed processing method
CN102625345A (en) * 2011-01-28 2012-08-01 中国移动通信集团公司 Method and device for protecting application layer signaling route
CN107547383A (en) * 2017-07-26 2018-01-05 新华三技术有限公司 Path detection method and device
US9998247B1 (en) * 2014-12-30 2018-06-12 Juniper Networks, Inc. Controller-based network device timing synchronization
CN109218185A (en) * 2017-07-04 2019-01-15 中国电信股份有限公司 Exchange method, device and the computer readable storage medium of routing iinformation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141382A (en) * 2006-09-07 2008-03-12 华为技术有限公司 Routing update method and router
CN102075360A (en) * 2011-01-19 2011-05-25 中国人民解放军信息工程大学 Aggregation equivalence class-based network fault distributed processing method
CN102625345A (en) * 2011-01-28 2012-08-01 中国移动通信集团公司 Method and device for protecting application layer signaling route
US9998247B1 (en) * 2014-12-30 2018-06-12 Juniper Networks, Inc. Controller-based network device timing synchronization
CN109218185A (en) * 2017-07-04 2019-01-15 中国电信股份有限公司 Exchange method, device and the computer readable storage medium of routing iinformation
CN107547383A (en) * 2017-07-26 2018-01-05 新华三技术有限公司 Path detection method and device

Also Published As

Publication number Publication date
CN113497794B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN113300949B (en) Method for forwarding message, method, device and system for releasing routing information
US8340106B2 (en) Connecting multi-hop mesh networks using MAC bridge
CN110798403B (en) Communication method, communication device and communication system
JP6633775B2 (en) Packet transmission
CN114978978B (en) Computing power resource scheduling method and device, electronic equipment and medium
EP4102786A1 (en) Sr policy issuing method and apparatus and sr policy receiving method and apparatus
US10826823B2 (en) Centralized label-based software defined network
JP6195014B2 (en) COMMUNICATION SYSTEM, COMMUNICATION METHOD, RELAY DEVICE, AND COMMUNICATION PROGRAM
WO2020253748A1 (en) Message processing method, device, and computer storage medium
CN112868214B (en) Coordinated load transfer OAM records within packets
CN102123091A (en) Method, device and network equipment for generating multilink transparent transmission interconnection forwarding table
CN112311674B (en) Message sending method, device and storage medium
US20090129387A1 (en) Extending an ip everywhere network over a plurality of flooding domains
CN113162779B (en) Multi-cloud interconnection method and equipment
EP3429139A1 (en) Ingress gateway selection for a shortest path bridging network to support inter domain multicast routing
CN109347748A (en) A kind of method and apparatus of synchronization of routing information
CN113497794B (en) Method and device for switching route
CN109218182B (en) Method and device for synchronizing routing information
CN111385195B (en) Information processing method, device and storage medium
CN115883452A (en) Communication method and communication device
CN108881040B (en) Message processing method and device
CN111556179A (en) ARP (Address resolution protocol) table item updating method and device
CN101789930A (en) Route advertising method and network equipment
WO2022135321A1 (en) Packet transmission method, device and system
US20240064094A1 (en) Route information processing method and apparatus

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