WO2021077972A1 - Packet forwarding method, device, and storage medium - Google Patents

Packet forwarding method, device, and storage medium Download PDF

Info

Publication number
WO2021077972A1
WO2021077972A1 PCT/CN2020/117228 CN2020117228W WO2021077972A1 WO 2021077972 A1 WO2021077972 A1 WO 2021077972A1 CN 2020117228 W CN2020117228 W CN 2020117228W WO 2021077972 A1 WO2021077972 A1 WO 2021077972A1
Authority
WO
WIPO (PCT)
Prior art keywords
neighbor
node
domain
tlv
virtual
Prior art date
Application number
PCT/CN2020/117228
Other languages
French (fr)
Chinese (zh)
Inventor
赵科强
张华�
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021077972A1 publication Critical patent/WO2021077972A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]

Definitions

  • This application relates to the technical field of segment routing (SR), and in particular to a method, device and storage medium for confirming forwarding of packets.
  • SR segment routing
  • the network is usually divided into multiple domains.
  • Each domain includes a set of hosts and a set of routers.
  • the hosts and routers in a domain are managed by a controller. At this time, how to forward the message to the destination node in the network has become a current research hotspot.
  • the SR technology can be used to implement packet forwarding in the domain. That is, the ingress node of the domain inserts the message forwarding path in the domain into the message, and the ingress node forwards the message to the next hop node according to the forwarding path, and the next hop node receives the message after receiving the message. After the message, continue to forward the message according to the forwarding path until the message is forwarded to the egress node of the domain.
  • the egress node forwards the message to the ingress node of another domain according to the controller's instruction, and the forwarding process of the message in the other domain is basically the same as the forwarding process of the message in the aforementioned domain. Through the above process, the message can be forwarded to the destination node in the network.
  • the node determines that it is in Whether there is a backup path from the node to the next hop node in the domain? If there is no backup path from the node to the next hop node in the domain, the message will not be successfully forwarded to the destination node.
  • the present application provides a method, device and storage medium for forwarding messages, which can establish a cross-domain backup path when the link between the current node and the next hop node fails, thereby improving the success of message forwarding rate.
  • the technical solution is as follows:
  • a method for forwarding messages is provided.
  • a first node receives a message, the first node is any node in a first domain, and the first domain is any domain in a plurality of domains in the network.
  • the first node obtains one or more neighbor relationships of each node in the first domain, and the one or more neighbor relationships of border nodes in the first domain include the neighbor relationships of the border node in the second domain, and the second domain is divided by A domain outside the first domain;
  • the first node determines a forwarding path to the destination node of the message according to one or more neighbor relationships of each node in the first domain; the first node forwards according to the determined forwarding path The message.
  • the neighbor relationship of the border node in the first domain acquired by the first node includes the neighbor relationship of the border node in the second domain. It is a domain other than the first domain.
  • the first node can determine the forwarding path based on the neighbor relationship of the border node in the second domain. That is, the first node can use other than the first domain when determining the forwarding path.
  • Link resources in other domains other than the link resources of the domain thereby avoiding the problem that packets cannot be forwarded when there is no backup path in the current domain, and thus improving the success rate of packet forwarding.
  • the first node obtains one or more neighbor relationships of each node in the first domain, specifically: for a second node in each node, from one or more neighbor relationship types of the second node ⁇ Select a neighbor relationship TLV from the length-value TLV, and obtain the neighbor identifier in the selected neighbor relationship TLV.
  • the second node is any one of the nodes; the neighbor identifier carried in the selected neighbor relationship TLV indicates one
  • a virtual neighbor sub-TLV is obtained from the selected neighbor relationship TLV, the virtual neighbor sub-TLV carries a neighbor identifier and a path label, and the neighbor identifier carried by the virtual neighbor sub-TLV is used to indicate the corresponding
  • the identifier of the virtual neighbor, the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the second node to the virtual neighbor, and the path of the second node to the virtual neighbor is constructed through link resources in the second domain ; Determine a neighbor relationship of the second node according to the neighbor identifier and path label carried by the virtual neighbor sub-TLV.
  • virtual neighbors can be used to indicate the neighbor relationship of border nodes in the first domain in the second domain, so that when the link between the first node and the next hop node fails, it can be Determine other feasible backup paths based on the virtual neighbor.
  • the first node may also use the selected neighbor relationship if the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor.
  • the TLV determines a neighbor relationship of the second node, and the normal neighbor refers to a node that constructs a path with the second node through link resources in the first domain.
  • the embodiment of the application extends the original neighbor relationship TLV, and the original neighbor relationship TLV can still indicate a normal neighbor in the domain.
  • the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor.
  • the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor.
  • whether the neighbor indicated in the neighbor relationship TLV is the node itself can be used to determine whether the neighbor indicated in the neighbor relationship TLV is a virtual neighbor or a normal neighbor in the domain.
  • the first node may also obtain virtual neighbor function indication information from the virtual neighbor sub-TLV; where the virtual neighbor function indication information indicates the
  • the virtual neighbor is used in the scenario of forwarding packets based on the segment routing optimal path SR-BE technology, and currently in the scenario of forwarding packets based on the SR-BE technology, the implementation is performed according to the neighbor identifier carried by the virtual neighbor sub-TLV And the path label to determine a neighbor relationship of the second node.
  • the first node may also obtain virtual neighbor function indication information from the virtual neighbor sub-TLV; where the virtual neighbor function indication information indicates the
  • the virtual neighbor is used in the scenario of forwarding packets based on the segmented routing process engineering SR-TE technology, and currently in the scenario of forwarding packets based on the SR-TE technology, the virtual neighbor is executed according to the neighbor identification and the sub-TLV carried by the virtual neighbor.
  • the path label determines the step of a neighbor relationship of the second node.
  • the method for forwarding messages can be applied to the scenario where the forwarding message is determined by the SR-BE technology, it can also be applied to the scenario where the message is forwarded through the SR-TE technology, and the first in different scenarios The way for a node to reach the virtual neighbor through the second domain is different. Therefore, in order for the first node to quickly determine that the path label carried by the virtual neighbor sub-TLV can be used to determine the forwarding path, the virtual neighbor function indication information can also be configured in the virtual neighbor sub-TLV, and the virtual neighbor function indication information can be used to determine Indicate which scenario the path label carried by the virtual neighbor sub-TLV is applicable to.
  • the virtual neighbor function indication information is carried in the control bit field of the virtual neighbor sub-TLV.
  • the virtual neighbor function indication information may be carried in the control bit field of the virtual neighbor sub-TLV.
  • the first node obtains one or more neighbor relationships of each node in the first domain, specifically: for the second node in each node, select from one or more neighbor relationship TLVs of the second node A neighbor relationship TLV to obtain a neighbor sub-TLV in the selected neighbor relationship TLV, the neighbor sub-TLV is used to indicate the neighbor relationship from the second node to the third node, and the third node is the first domain or the second domain
  • the second node is any node in each node.
  • each node can also advertise the neighbor relationship through the neighbor sub-TLV (Adj-SID Sub TLV) in the neighbor relationship TLV. That is, in the scenario of forwarding packets based on the SR-TE technology, the neighbor relationship TLV originally carries a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate the neighbor relationship in the domain.
  • the neighbor sub-TLV Adj-SID Sub TLV
  • the neighbor sub-TLV in the neighbor relationship TLV can also be directly reconfigured, so that the neighbor sub-TLV can carry the cross-domain neighbor relationship (In the embodiment of the present application, it specifically refers to the case where the third node is a node in the second domain), so that nodes in the first domain can establish tunnels between nodes in the second domain, that is, to establish a cross-domain Tunnel
  • the first node determines the forwarding path of the message according to one or more neighbor relationships of each node in the first domain, specifically: starting from the first node, the first node sequentially executes The step of determining the next hop node of the current node until the determined next hop node is the destination node of the message, the forwarding path of the message is obtained.
  • the next hop node In order to determine the forwarding path to the destination of the message, the next hop node needs to be determined hop by hop.
  • the determining the next hop node of the current node according to one or more neighbor relationships of the current node is specifically: determining the optimal neighbor to the destination node from the one or more neighbor relationships of the current node Relationship; the current node is a boundary node, the optimal neighbor relationship is the neighbor relationship of the current node in the second domain, and the path between the current node and the node indicated by the optimal neighbor relationship has unidirectional In the case of reaching performance, the node indicated by the optimal neighbor relationship is determined as the next hop node of the current node.
  • the message forwarding method provided by the embodiment of the present application usually re-determines the forwarding path when the current link fails, it does not need to have two-way reachability at this time, and it can be used only after it has one-way reachability.
  • the forwarding path can be determined based on the neighbor relationship, thereby improving the efficiency of re-determining the forwarding path.
  • the first node obtains one or more neighbor relationships of each node in the first domain, specifically: the link between the first node and the next hop node indicated in the message is faulty In this case, one or more neighbor relationships of each node in the first domain are acquired.
  • the message forwarding method provided in the embodiment of the present application can be applied in the case that the link between the first node and the next hop node indicated in the message is faulty, thereby avoiding the problem of being in the current domain. There is a problem that packets cannot be forwarded when there is no backup path, which improves the success rate of packet forwarding.
  • a method for forwarding packets is provided.
  • a border node between a first domain and a second domain determines a neighbor relationship TLV, and the neighbor relationship TLV is used to indicate that the border node is in the first domain.
  • the neighbor relationship in the second domain; the border node publishes the neighbor relationship TLV in the first domain.
  • the border node between the first domain and the second domain may determine the neighbor relationship used to indicate the neighbor relationship of the border node in the second domain TLV, and publish the neighbor relationship TLV in the first domain.
  • the first node in the first domain can receive the neighbor relationship TLV, so that the subsequent first node can determine the forwarding path based on the neighbor relationship of the border node in the second domain, that is, the first node is determining the forwarding path It is possible to use link resources in other domains except the link resources in the first domain, thereby avoiding the problem that packets cannot be forwarded when there is no backup path in the current domain, thereby improving the success rate of packet forwarding.
  • the neighbor relationship TLV includes a virtual neighbor sub-TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, and the virtual neighbor TLV
  • the neighbor identifier carried by the neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the border node
  • the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the border node to the virtual neighbor.
  • the path to the virtual neighbor is constructed through link resources in the second domain.
  • the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
  • the neighbor relationship TLV includes a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate a neighbor relationship from the border node to a third node, and the third node is the first domain or the second domain. Nodes in the domain.
  • a first node in a third aspect, includes:
  • a receiving module configured to receive a message, the first node is any node in a first domain, and the first domain is any one of multiple domains in the network;
  • the obtaining module is configured to obtain one or more neighbor relationships of each node in the first domain, and the one or more neighbor relationships of border nodes in the first domain include the neighbor relationship of the border nodes in the second domain, so The second domain is a domain other than the first domain;
  • a determining module configured to determine a forwarding path to the destination node of the message according to one or more neighbor relationships of each node in the first domain
  • the forwarding module is configured to forward the message according to the determined forwarding path.
  • the aforementioned acquisition module is specifically used for:
  • the second node in each of the nodes select a neighbor relationship TLV from one or more neighbor relationship type-length-value TLVs of the second node, and obtain the neighbor identifier in the selected neighbor relationship TLV, the The second node is any one of the nodes;
  • a virtual neighbor sub-TLV is obtained from the selected neighbor relationship TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, so The neighbor identifier carried by the virtual neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the second node, and the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the second node to the virtual neighbor, The path for the second node to reach the virtual neighbor is constructed through link resources in the second domain;
  • the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor.
  • the aforementioned acquiring module is further specifically configured to: in the case that the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor, determine one of the second nodes according to the selected neighbor relationship TLV Neighbor relationship, the normal neighbor refers to a node that constructs a path with the second node through link resources in the first domain.
  • the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor.
  • the aforementioned acquisition module is also specifically used for:
  • a step of determining a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV is performed.
  • the aforementioned acquisition module is also specifically used for:
  • the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segmented routing process engineering SR-TE technology, and is currently in the scenario of forwarding packets based on the SR-TE technology, execute The step of determining a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV.
  • the virtual neighbor function indication information is carried in a control bit field of the virtual neighbor sub-TLV.
  • the aforementioned acquisition module is also specifically used for:
  • the second node in each node For the second node in each node, select a neighbor relationship TLV from one or more neighbor relationship TLVs of the second node, and obtain a neighbor sub-TLV in the selected neighbor relationship TLV, and the neighbor sub-TLV is used for Indicates the neighbor relationship between the second node and the third node, where the third node is a node in the first domain or the second domain, and the second node is any one of the nodes .
  • the aforementioned determining module is also specifically used for:
  • the first node Starting from the first node, the first node sequentially executes the step of determining the next hop node of the current node according to one or more neighbor relationships of the current node, until the determined next hop node is the When the destination node of the message, the forwarding path of the message is obtained.
  • the aforementioned acquisition module is also specifically used for:
  • the current node is a boundary node
  • the optimal neighbor relationship is the neighbor relationship of the current node in the second domain
  • the path between the current node and the node indicated by the optimal neighbor relationship In the case of unidirectional reachability, the node indicated by the optimal neighbor relationship is determined as the next hop node of the current node.
  • the aforementioned acquisition module is also specifically used for:
  • a boundary node between a first domain and a second domain includes:
  • a determining module configured to determine a neighbor relationship TLV, where the neighbor relationship TLV is used to indicate the neighbor relationship of the border node in the second domain;
  • the publishing module is configured to publish the neighbor relationship TLV in the first domain.
  • the neighbor relationship TLV includes a virtual neighbor sub-TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, and the virtual neighbor TLV
  • the neighbor identifier carried by the neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the border node
  • the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the border node to the virtual neighbor.
  • the path to the virtual neighbor is constructed through link resources in the second domain.
  • the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
  • the neighbor relationship TLV includes a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate a neighbor relationship from the border node to a third node, and the third node is the first domain or the second domain. Nodes in the domain.
  • a first node in a communication network is provided, the first node is any node in a first domain, the first domain is any one of a plurality of domains in the network, and the first node is One node includes memory and processor;
  • the memory is used to store a computer program
  • the processor is configured to execute a computer program stored in the memory to execute the following method for forwarding messages:
  • the one or more neighbor relationships of border nodes in the first domain include neighbor relationships of the border nodes in a second domain, and the second domain is Domains other than the first domain;
  • the acquiring, by the first node, one or more neighbor relationships of each node in the first domain includes:
  • the second node in each of the nodes select a neighbor relationship TLV from one or more neighbor relationship type-length-value TLVs of the second node, and obtain the neighbor identifier in the selected neighbor relationship TLV, the The second node is any one of the nodes;
  • a virtual neighbor sub-TLV is obtained from the selected neighbor relationship TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, so The neighbor identifier carried by the virtual neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the second node, and the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the second node to the virtual neighbor, The path for the second node to reach the virtual neighbor is constructed through link resources in the second domain;
  • the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor.
  • the method further includes: in the case that the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor, according to the selected neighbor relationship TLV A neighbor relationship of the second node is determined, and the normal neighbor refers to a node that constructs a path with the second node through link resources in the first domain.
  • the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor.
  • the method further includes:
  • a step of determining a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV is performed.
  • the method further includes:
  • the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segmented routing process engineering SR-TE technology, and is currently in the scenario of forwarding packets based on the SR-TE technology, execute The step of determining a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV.
  • the virtual neighbor function indication information is carried in a control bit field of the virtual neighbor sub-TLV.
  • the acquiring, by the first node, one or more neighbor relationships of each node in the first domain includes:
  • the second node in each node For the second node in each node, select a neighbor relationship TLV from one or more neighbor relationship TLVs of the second node, and obtain a neighbor sub-TLV in the selected neighbor relationship TLV, and the neighbor sub-TLV is used for Indicates the neighbor relationship between the second node and the third node, where the third node is a node in the first domain or the second domain, and the second node is any one of the nodes .
  • the first node determining the forwarding path of the message according to one or more neighbor relationships of each node in the first domain includes:
  • the first node Starting from the first node, the first node sequentially executes the step of determining the next hop node of the current node according to one or more neighbor relationships of the current node, until the determined next hop node is the When the destination node of the message, the forwarding path of the message is obtained.
  • the determining the next hop node of the current node according to one or more neighbor relationships of the current node includes:
  • the current node is a boundary node
  • the optimal neighbor relationship is the neighbor relationship of the current node in the second domain
  • the path between the current node and the node indicated by the optimal neighbor relationship In the case of unidirectional reachability, the node indicated by the optimal neighbor relationship is determined as the next hop node of the current node.
  • the acquiring, by the first node, one or more neighbor relationships of each node in the first domain includes:
  • a boundary node in a communication network wherein the boundary node is a boundary node between a first domain and a second domain, and the boundary node includes a memory and a processor;
  • the memory is used to store a computer program
  • the processor is configured to execute a computer program stored in the memory to execute the following method for forwarding messages:
  • the neighbor relationship TLV includes a virtual neighbor sub-TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, and the virtual neighbor TLV
  • the neighbor identifier carried by the neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the border node
  • the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the border node to the virtual neighbor.
  • the path to the virtual neighbor is constructed through link resources in the second domain.
  • the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
  • the neighbor relationship TLV includes a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate a neighbor relationship from the border node to a third node, and the third node is the first domain or the second domain. Nodes in the domain.
  • a computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute any one of the first or second aspects described above. The method of forwarding the message.
  • a computer program product containing instructions which when running on a computer, causes the computer to execute the method for forwarding a message as described in any one of the first or second aspects.
  • a system for forwarding packets includes a first node and a second node.
  • the first node is any node in a first domain
  • the second node is the first node.
  • the second node is used to determine a neighbor relationship TLV, and the neighbor relationship TLV is used to indicate the neighbor relationship of the border node in the second domain, and publish the neighbor relationship TLV in the first domain;
  • the first node is used to receive the neighbor relationship TLV.
  • the neighbor relationship TLV includes a virtual neighbor sub-TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, and the virtual neighbor TLV
  • the neighbor identifier carried by the neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the border node
  • the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the border node to the virtual neighbor.
  • the path to the virtual neighbor is constructed through link resources in the second domain.
  • the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
  • the neighbor relationship TLV includes a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate a neighbor relationship from the border node to a third node, and the third node is the first domain or the second domain. Nodes in the domain.
  • Fig. 1 is a schematic diagram of a network system provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of another network system provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of another network system provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of a method for forwarding packets provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of another method for forwarding messages provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of the format of a TLV22 provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of the format of a virtual neighbor sub-TLV provided by an embodiment of the present application.
  • FIG. 8 is a flowchart of another method for forwarding packets provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the format of a neighbor sub-TLV provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of an apparatus of a first node provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a boundary node device provided by an embodiment of the present application.
  • Fig. 12 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • Fig. 1 is a schematic diagram of a network system provided by an embodiment of the present application.
  • the network system includes three cell site gateways (CSG), which are marked as CSG1, CSG2, and CSG3 in Figure 1.
  • CSG can also be referred to as an access service gateway, which is a role in the mobile bearer network. This role is in the access layer and is responsible for the access of the base station.
  • the network system 100 also includes two aggregation site gateways (ASG), which are marked as ASG1 and ASG2 in FIG. 1 respectively.
  • ASG is also a role in the mobile bearer network. This role is located at the convergence layer and is used to converge the massive CSG service flows in the access layer of the mobile bearer network.
  • the network system 100 also includes two operator devices (providers), which are respectively marked as P1 and P2 in FIG. 1.
  • the network system 100 also includes two radio service gateways (RSG), which are marked as RSG1 and RSG2 in FIG. 1 respectively.
  • RSG is also a role in the mobile bearer network. The role is at the convergence layer and is used to connect to the wireless controller.
  • CSG1 is connected to CSG2 and CSG3 through wired or wireless connections for communication.
  • CSG2 and ASG1 are connected by wire or wireless for communication.
  • ASG1 and P1 are connected through a wired or wireless connection for communication.
  • P1 and RSG1 are connected through a wired or wireless connection for communication.
  • CSG3 and ASG2 are connected by wired or wireless for communication.
  • ASG2 and P2 are connected through a wired or wireless connection for communication.
  • P2 and RSG2 are connected through a wired or wireless connection for communication.
  • ASG1 and ASG2 are connected through a wired or wireless connection for communication.
  • the domain may be a domain divided based on the Interior Gateway Protocol (IGP), that is, nodes in the same domain communicate based on the same IGP, and nodes in different domains communicate based on different IGPs .
  • IGP Interior Gateway Protocol
  • the network system shown in FIG. 1 is applied to a scenario where a route is determined by segment routing (Segment Routing-Best Effort, SR-BE) technology.
  • segment routing Segment Routing-Best Effort, SR-BE
  • SR-BE Segment Routing-Best Effort
  • each node in the network system shown in FIG. 1 is only used for illustration, and the numbers of CSG, ASG, and RSG in FIG. 1 are only used for illustration, and do not constitute an impact on this application. limited.
  • Fig. 2 is a schematic diagram of another network system provided by an embodiment of the present application.
  • the network system includes a CSG, an ASG, and an RSG.
  • CSG and ASG are located in the same domain, which is marked as domain 1 in Figure 2.
  • ASG and RSG are located in another domain, marked as domain 2 in Figure 2.
  • the CSG can establish a TE tunnel between the ASG to transfer the packets from CSG is forwarded to ASG.
  • the ASG can also establish a TE tunnel to the RSG, which is used to forward packets from the ASG to the RSG.
  • CSG and RSG are not located in the same domain, CSG cannot directly establish TE tunnels to RSG. It is necessary to glue the tunnels from CSG to ASG and the tunnels between ASG to RSG by sticking labels to establish a cross-domain connection.
  • TE tunnel used to forward packets.
  • Fig. 3 is a schematic diagram of another network system provided by an embodiment of the present application.
  • the network system includes node R1, node R2, node R3, node R4, and node R5.
  • the point R1, the node R2, and the node R3 are located in a domain, which is marked as domain 1 in Fig. 3.
  • Node R2, node R3, node R4, and node R5 are located in another domain, which is marked as domain 2 in FIG. 3.
  • the network connection relationship between the various nodes is shown in Figure 3, which will not be explained one by one here.
  • a TE tunnel between each node is established in each domain in advance, and the established TE tunnel is bound with the tunnel label.
  • an SR-TE tunnel is established between node R1 and node R2, and the bound tunnel label is 1, and an SR-TE tunnel is established between node R2 and node R4, and the bound tunnel label is 2.
  • the explicit path refers to the tunnel label that indicates at the ingress node of each domain that the packet passes through each single-segment tunnel in the domain along the way, and adds a sticky label corresponding to the egress node in the domain to the displayed path.
  • the corresponding relationship between the sticky label and one or more tunnel labels in other domains is pre-configured at the location, which is used to instruct the egress node to replace the sticky label in the message with the corresponding one or more tunnels when receiving the message Labels to realize the continued forwarding of messages in other domains.
  • the displayed path deployed at node R1 is tunnel label 1 and adhesive label, where the mapping relationship between adhesive label and tunnel label 2 is pre-configured, so that when R2 receives the message, it can directly replace the adhesive label It is tunnel label 2, so that the packet is forwarded in domain 2 through the tunnel indicated by tunnel label 2.
  • this method needs to configure the display path including the sticky label at the network entrance, such as R1 in Figure 3, to indicate the forwarding path of the message.
  • This path configuration method is static. For a node in the network, if there is a failure between the node and the next hop node, because the backup path cannot be determined dynamically and temporarily, the successful forwarding of the message cannot be guaranteed at this time. In addition, in the network system shown in Figure 3, if node R4 fails, R1 cannot perceive that the TE tunnel between R2 and R4 is down, but the TE tunnel between R1 and R2 is still operating normally. At this time, subsequent packets will continue to be forwarded to node R2 and be discarded, thus forming a forwarding black hole.
  • the method for forwarding packets provided in the embodiment of the present application can dynamically establish a cross-domain TE tunnel.
  • FIG. 4 is a flowchart of a method for forwarding packets provided by an embodiment of the present application, which is applied to any node in the network system shown in FIG. 1 to FIG. 3. As shown in FIG. 4, the method includes the following steps:
  • Step 401 The first node receives the message, the first node is any node in the first domain, and the first domain is any domain among multiple domains in the network.
  • the first domain is any domain in the network system shown in FIG. 1 to FIG. 3, and the first node may be any node in the first domain.
  • the forwarding path of the message can be deployed at the entrance of the network through the SR technology in advance, so that subsequent nodes will receive the message after receiving the message. Directly forward to the message according to the pre-deployed forwarding path. Therefore, when the first node receives the message to be forwarded, it can determine the next hop node of the message according to the pre-deployed forwarding path, and then forward the message to the determined next hop node.
  • the first node After the first node forwards the message to the determined next hop node, if the link between the first node and the next hop node fails, the first node will not be able to successfully forward the message to the next hop node. At this time, in order to continue to realize the forwarding of the message, in this embodiment of the present application, the first node may re-determine the forwarding path of the message through the following steps 402 and 503.
  • Step 402 The first node obtains one or more neighbor relations of each node in the first domain.
  • the one or more neighbor relations of the border nodes in the first domain include the neighbor relations of the border nodes in the second domain.
  • the one or more neighbor relationships of the border nodes in the first domain acquired by the first node include the neighbors of the border node in the second domain.
  • the second domain is a domain other than the first domain.
  • the border node in the first domain can obtain its neighbor relationship in the second domain in advance, and then publish its neighbor relationship in the second domain through the neighbor relationship TLV in the first domain, so that the nodes in the first domain can learn Neighbor relationship to border nodes in the first domain in the second domain.
  • the border node in the first domain advertises its neighbor relationship in the second domain in the first domain, which will be described in detail in the following embodiments, and will not be elaborated here.
  • Step 403 The first node determines the forwarding path of the message according to one or more neighbor relationships of each node in the first domain, and forwards the message according to the determined forwarding path.
  • the first node After determining the neighbor relationship of each node in the first domain, the first node can determine the forwarding path of the message according to the neighbor relationship of each node in the first domain. Step 403 will be explained in detail according to different scenarios later, and will not be explained here.
  • the neighbor relationship of the border node in the first domain acquired by the first node includes the neighbor relationship of the border node in the second domain, and the second domain
  • the first node can determine the forwarding path in conjunction with the nodes in the second domain, which avoids the problem that packets cannot be forwarded when there is no backup path in the current domain.
  • FIG. 4 can be applied to the scenario where the link between the first node and the next hop node fails, and the first node cannot successfully forward the message to the next hop node, and can also be applied to In the scenario where the first node establishes a cross-domain TE tunnel, the following embodiments shown in FIG. 5 and FIG. 8 are respectively used to explain in detail the message forwarding process in these two scenarios.
  • the method for forwarding messages provided in the embodiments of the present application can be applied to SR-BE technology, and can also be applied to SR-TE technology. Of course, it can also be applied to scenarios where messages are forwarded through other technologies. limited.
  • the following embodiments respectively take the SR-BE scenario and the SR-TE scenario as examples to illustrate the method for forwarding packets provided in the embodiments of the present application.
  • the message forwarding method provided in the embodiment of the present application is applied to a scenario where a message is forwarded through other technologies, the following embodiments may also be referred to to implement the message forwarding method provided in the embodiment of the present application.
  • FIG. 5 is a flowchart of another method for forwarding packets provided by an embodiment of the present application, which is applied to any node in the network system shown in FIG. 1 to FIG. 3, that is, it can be applied to SR-BE technology , Can also be applied to SR-TE technology, of course, it can also be applied to scenarios where messages are forwarded through other technologies.
  • the neighbor relationship of border nodes in the first domain in the second domain can be indicated by means of virtual neighbors.
  • the virtual neighbor refers to the neighbor established by the first node through the neighbor relationship in the second domain.
  • the link between a node and the next-hop node fails, other feasible backup paths can be determined according to the virtual neighbor.
  • the method includes the following steps:
  • Step 501 The first node receives the message, the first node is any node in the first domain, and the first domain is any domain among multiple domains in the network.
  • step 501 For the implementation of step 501, reference may be made to the implementation of step 401 in the embodiment shown in FIG. 4, which will not be repeated here.
  • the node can pre-publish its neighbor relationship in the current domain through the neighbor relationship TLV.
  • the neighbor relationship TLV may be a type-length-value (tag-length-value, TLV) TLV22.
  • TLV tag-length-value
  • the neighbor relationship TLV is modified. The following uses TLV22 as an example to explain the neighbor relationship TLV What modifications have been made, other types of neighbor relationship TLVs can be modified with reference to TLV22 to implement the message forwarding method provided in the embodiments of the present application.
  • FIG. 6 is a schematic diagram of the format of a TLV22 provided by an embodiment of the present application.
  • the TLV 22 includes TLV Type (TLV Type), TLV Length (TLV Length), Neighbour ID (Neighbour ID), Cost Value (Metric), SubTLV Length (SubTLV Length), and reserved optional subtypes. TLV (Optional SubTLV) and other fields.
  • the neighbor identifier is used to indicate the node that has a neighbor relationship with the node.
  • the neighbor identifier can be used to indicate whether the neighbor is a virtual neighbor or a normal neighbor in the current domain.
  • the neighbor identifier can be set as its own identifier and selected from the reserved optional sub-TLVs
  • a sub-TLV carries information about virtual neighbors.
  • the sub-TLV used to carry the related information of the virtual neighbor is referred to as the virtual neighbor sub-TLV, or SR virtual-adjacent sub-TLV (SR Virtual-Adj SID sub TLV).
  • the neighbor identifier can be directly set to the identifier of other nodes that have a neighbor relationship with the node, and the cost value field is used to indicate the routing cost of the neighbor relationship.
  • whether the neighbor indicated in the TLV 22 is a virtual neighbor or a normal neighbor in the domain can be determined by whether the neighbor identifier in the TLV 22 issued by the node is the node itself.
  • the neighbor identifier can be set to a specific value, assuming 0 to indicate that the current neighbor is a virtual neighbor.
  • other fields in the TLV 22 are used to indicate whether the current neighbor is a virtual neighbor or a normal neighbor in the domain, which is not specifically limited in the embodiment of the present application.
  • FIG. 7 is a schematic diagram of the format of a virtual neighbor sub-TLV provided by an embodiment of the present application.
  • the virtual neighbor sub-TLV includes type (Type), length (Length), control bits (Flags), weight (Weight), bound path label segment identifier (Binding SID), and neighbor identifier (Neighbor SID) and other fields.
  • the neighbor identifier in the virtual neighbor sub-TLV in TLV22 issued by the node is used to indicate the identifier of the virtual neighbor corresponding to any node
  • the segment identifier of the bound path label in the virtual neighbor sub-TLV is used as To indicate the path of any node to the virtual neighbor through the second domain.
  • the method for forwarding messages can be applied to the scenario where the forwarding message is determined by the SR-BE technology, it can also be applied to the scenario where the message is forwarded through the SR-TE technology, and the first in different scenarios The way for a node to reach the virtual neighbor through the second domain is different. Therefore, in order for the first node to quickly determine that the path label carried by the virtual neighbor sub-TLV can be used to determine the forwarding path, the virtual neighbor function indication information can also be configured in the virtual neighbor sub-TLV, and the virtual neighbor function indication information can be used to determine Indicate which scenario the path label carried by the virtual neighbor sub-TLV is applicable to.
  • the virtual neighbor function indication information is carried in the control bit field of the virtual neighbor sub-TLV.
  • the first bit (0 bit) and the second bit (1 bit) of the control bit in the virtual neighbor sub-TLV can be marked as R bit and T bit.
  • Two bits are used to configure the virtual neighbor function indication information. Specifically, if the R bit is set, it indicates that the path label carried by the virtual neighbor sub-TLV is used in the scenario of forwarding packets based on the SR-BE technology. If the T bit is set, it indicates that the path label carried by the virtual neighbor sub-TLV is used in the scenario of forwarding packets based on the SR-TE technology. Therefore, when the first node publishes the TLV 22, the bit values on the R bit and the T bit can be set according to the above configuration, so that the control bit is used to indicate to which scenario the path label carried by the virtual neighbor sub-TLV is applicable.
  • the virtual neighbor function indication information can also be configured through other bits of the control bit.
  • the virtual neighbor function indication information can also be configured through other fields in the virtual neighbor sub-TLV. The embodiments of this application do not specifically limit this.
  • the border node in the first domain can predetermine its neighbor relationship in the second domain, and then advertise the neighbor in the first domain through the neighbor relationship TLV Relationship, so that other nodes in the first domain can learn the neighbor relationship of the border node in the second domain.
  • the boundary node ASG1 in the second domain (that is, domain 1)
  • the boundary node ASG1 can first determine the path to ASG2 through related resources in the second domain, such as Link State Database (LSDB), as ASG1 ⁇ CSG2 ⁇ CSG1 ⁇ CSG3 ⁇ ASG2, and then generate TLV22 according to the determined path.
  • LSDB Link State Database
  • the neighbor identifier in the published TLV22 is the identifier of the node ASG1. At this time, it indicates that the TLV22 is used to publish a virtual neighbor of ASG1.
  • the neighbor identifier carried in the virtual neighbor sub-TLV in TLV22 is ASG2, and the path label carried in the virtual neighbor sub-TLV is used to indicate the path: ASG1 ⁇ CSG2 ⁇ CSG1 ⁇ CSG3 ⁇ ASG2.
  • the neighbor relationship between the node ASG1 and the node ASG2 is constructed by the nodes in the second domain. Therefore, the node P1 in the first domain can use the node ASG2 as the virtual neighbor of the node ASG1.
  • the first domain in step 501 is domain 1 in FIG. 1, and the second domain is domain 2 in FIG. 1.
  • the node ASG in the second domain that is, domain 2
  • you can first use related resources in the second domain that is, domain 2), such as LSDB, to determine that the path to RSG is ASG ⁇ RSG, and then determine The path is a TE tunnel.
  • Then generate TLV22 according to the determined path.
  • the neighbor identifier in the published TLV22 is the identifier of the node ASG. At this time, it indicates that the TLV22 is used to publish a virtual neighbor of the ASG.
  • the neighbor identifier carried in the virtual neighbor sub-TLV in TLV22 is RSG, and the path label carried in the virtual neighbor sub-TLV is used to indicate the path: ASG ⁇ RSG.
  • the neighbor relationship between the node ASG and the node RSG is constructed through the TE tunnel in the second domain (that is, domain 2). Therefore, the node CSG in the first domain can use the node RSG as the virtual neighbor of the node ASG.
  • the first node can obtain the neighbor relationship of each node in the first domain through the following steps 502 to 504.
  • the virtual neighbor sub-TLV may also include the Neighbor Label Switched Router Identification (Neighbor LSR-ID) field.
  • the identification field of the label switching router of the neighbor is used to identify the IP of the virtual neighbor.
  • the Neighbor LSR-ID of the virtual neighbor needs to be determined, and then the Neighbor LSR of the virtual neighbor must be determined.
  • the ID is the destination IP of the tunnel, if it is, it indicates that the virtual neighbor is the destination node of the message, and then it can stop executing the operation of setting the next hop node of the virtual neighbor, that is, stop determining the path .
  • Step 502 In the case that the link between the first node and the next-hop node indicated in the message fails, for the second node among the nodes in the first domain, from one or more of the second nodes One neighbor relationship TLV is selected from among the neighbor relationship TLVs, and the neighbor identifier in the selected neighbor relationship TLV is obtained, and the second node is any one of the nodes.
  • a routing policy has been deployed in the header of the message to indicate each node through which the message passes. Therefore, when the first node receives the message, it can determine the next hop node from the header of the message, and then forward the message to the next hop node indicated in the message. In the event that the link between the first node and the next-hop node indicated in the message fails, the first node can determine a backup path through steps 502 to 505 to ensure that the message can be successfully forwarded To the destination node.
  • the neighbor identifier in the neighbor relationship TLV can be used to indicate whether the current neighbor is a virtual neighbor or a normal node in the domain, for any node in the first domain, when the first node needs to obtain the node's In the case of a neighbor relationship, the first node needs to first obtain the neighbor identifier in the neighbor relationship TLV issued by the node.
  • the same node may pre-publish multiple neighbor relationship TLVs, that is, for the second node, there may be multiple neighbor relationship TLVs. Therefore, one needs to be selected from one or more neighbor relationship TLVs of the second node.
  • the neighbor relationship TLV is then obtained, and the neighbor identifier in the selected neighbor relationship TLV is obtained, so as to determine the neighbor relationship indicated in the currently selected neighbor relationship TLV through the following steps 503 and 504.
  • the neighbor relationship can be determined by referring to the foregoing manner.
  • Step 503 In the case that the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor, the virtual neighbor sub-TLV is obtained from the selected neighbor relationship TLV, and the second is determined according to the neighbor identifier and path label carried in the virtual neighbor sub-TLV. A neighbor relationship of the node.
  • the virtual neighbor sub-TLV carries a neighbor identifier and a path label
  • the neighbor identifier carried by the virtual neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the second node
  • the path label carried by the virtual neighbor sub-TLV is used to indicate that the second node reaches the virtual neighbor.
  • the path of the neighbor, and the path from the second node to the virtual neighbor is constructed through link resources in the second domain.
  • step 503 may be: if the neighbor identifier carried in the neighbor relationship TLV is the same as the identifier of any node, it is determined that the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
  • the first node obtains the virtual neighbor sub-TLV from the neighbor relationship TLV, and then obtains the virtual neighbor sub-TLV from the virtual neighbor Obtain the virtual neighbor function indication information from the neighbor sub-TLV.
  • the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario where packets are forwarded based on the SR-BE technology, then execute the neighbor identification and The path label determines the steps of the neighbor relationship of any node. If the virtual neighbor function indication information indicates that the virtual neighbor is not used in the scenario of forwarding packets based on the SR-BE technology, the forwarding path cannot be determined based on the neighbor relationship. Therefore, the first node will discard the neighbor relationship of the node.
  • the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on SR-TE technology, execute the neighbor based on the virtual neighbor sub-TLV
  • the identification and path label determine the steps of the neighbor relationship of any node.
  • the forwarding path cannot be determined based on the neighbor relationship. Therefore, the first node will discard the neighbor relationship of the node. .
  • the neighbor relationship of the node is used to determine the forwarding path. Otherwise, this neighbor relationship of the node cannot be used to determine the forwarding path in the next step.
  • the virtual neighbor is used in the scenario of forwarding packets based on SR-TE technology.
  • the neighbor relationship of the node is used to determine the forwarding path in the next step. Otherwise, this neighbor relationship of the node cannot be used to determine the forwarding path in the next step.
  • Step 504 In the case that the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor, determine a neighbor relationship of the second node according to the selected neighbor relationship TLV.
  • the normal neighbor refers to a node that constructs a path with the second node through link resources in the first domain.
  • whether the neighbor indicated in the neighbor relationship TLV is a virtual neighbor or a normal node in the domain is determined by whether the neighbor identifier in the neighbor relationship TLV issued by the node is the node itself.
  • the implementation process of step 504 may be: if the neighbor identifier carried in the neighbor relationship TLV is not the same as the identifier of the node issuing the neighbor relationship TLV, it is determined that the neighbor identifier carried in the neighbor relationship TLV indicates a normal neighbor.
  • the neighbor relationship can also be determined by referring to the foregoing manner.
  • P1 can obtain the first domain (That is, the neighbor relationship of each node in domain 2).
  • the following takes obtaining the neighbor relationship of ASG1, P2, RSG2, and RSG1 in the first domain as an example to illustrate how P1 determines the neighbor relationship of each node in the first domain.
  • the node ASG1 publishes two TLVs 22 in advance.
  • the neighbor identifier in a TLV22 is the identifier of the node ASG1.
  • the neighbor identifier carried in the virtual neighbor sub-TLV in the TLV 22 is ASG2, and the path label carried in the virtual neighbor sub-TLV is used to indicate the path: ASG1 ⁇ CSG2 ⁇ CSG1 ⁇ CSG3 ⁇ ASG2.
  • the neighbor relationship between the node ASG1 and the node ASG2 is constructed by the nodes in the second domain. Therefore, the node P1 can use the node ASG2 as the virtual neighbor of the node ASG1 according to the TLV22.
  • the neighbor identifier in another TLV22 issued by node ASG1 is node P1, indicating that this TLV22 is used to publish a normal neighbor P1 of ASG2. Therefore, the node P1 can regard the node P1 as a normal neighbor of the node ASG1 according to the TLV22.
  • the node P2 may pre-publish two TLVs 22, the neighbor identifier in one TLV 22 is the node ASG2, and the neighbor identifier in the other TLV 22 is the node RSG2.
  • the node RSG2 may pre-publish two TLV22, the neighbor identifier in one TLV22 is the node P2, and the neighbor identifier in the other TLV22 is the node RSG1.
  • the node RSG1 may pre-publish two TLVs 22, the neighbor identifier in one TLV 22 is the node P1, and the neighbor identifier in the other TLV 22 is the node RSG2.
  • the node P1 can also determine the neighbor relationship of each node in the first domain (that is, domain 2 in FIG. 1) according to the above-mentioned TLV22.
  • the CSG can obtain the neighbor relationship of each node in the first domain (that is, domain 1).
  • the neighbor identifier in a TLV22 pre-published by the node ASG is the identifier of the node ASG.
  • the TLV22 is used to publish a virtual neighbor of the ASG.
  • the neighbor identifier carried in the virtual neighbor sub-TLV in TLV22 is RSG, and the path label carried in the virtual neighbor sub-TLV is used to indicate the path: ASG ⁇ RSG.
  • the neighbor relationship between the node ASG and the node RSG is constructed through the tunnel in the second domain. Therefore, the node CSG in the first domain can use the node RSG as the virtual neighbor of the node ASG.
  • Step 505 The first node determines the forwarding path of the message according to one or more neighbor relationships of each node in the first domain, and forwards the message according to the determined forwarding path.
  • the implementation process of step 505 can be: starting from the first node, the first node sequentially executes the steps of determining the next hop node in the forwarding path according to the neighbor relationship of the current node, until it is determined The next hop node is the destination node of the message.
  • the path formed by the first node and each determined next-hop node is the forwarding path of the message.
  • the foregoing first node determines the optimal neighbor relationship to the destination node from one or more neighbor relationships of the current node.
  • the implementation manner may be: the current node is a boundary node, and the optimal neighbor relationship is the neighbor of the current node in the second domain.
  • the node indicated by the optimal neighbor relationship is determined as the next hop node of the current node.
  • the two nodes for any two nodes in the first domain, it is usually necessary for the two nodes to have bidirectional reachability between them before establishing a path from one node to another node.
  • the two-way reachability between node A and node B means that node A advertises a neighbor relationship to node B, and node B also advertises a neighbor relationship to node A.
  • the forwarding path is usually re-determined when the current link fails. At this time, it does not need to have two-way reachability. It can be based on only one-way reachability.
  • the neighbor relationship determines the forwarding path, thereby improving the efficiency of re-determining the forwarding path.
  • the first node and other nodes other than the boundary node among the determined next hop nodes determine the two-way reachability between the nodes indicated in the neighbor relationship between other nodes and other nodes, if other nodes are The nodes indicated in the neighbor relationship of other nodes have bidirectional reachability, and the node indicated in the neighbor relationship of other nodes is determined as the next hop node of the other node.
  • the forwarding path can be determined based on the neighbor relationship after only one-way reachability, thereby improving Re-determine the efficiency of the forwarding path.
  • the embodiment of the application does not specifically limit this.
  • the node may also be reachable in both directions when the node indicated in the neighbor relationship between the node and the node has two-way reachability.
  • the node indicated in the neighbor relationship of is determined as the next hop node of the node. That is, no matter whether the neighbor of the node is a normal neighbor or a virtual neighbor, the neighbor of the node is determined as the next hop node of the node after checking the two-way reachability between the node and the neighbor of the node. .
  • the method for the first node to determine the optimal neighbor relationship to the destination node from one or more neighbor relationships of the current node can be as follows: determine the cost value of each neighbor relationship in the one or more neighbor relationships, from this Select the neighbor relationship with the smallest cost value among one or more neighbor relationships.
  • the cost value has been explained in the above-mentioned related content of introducing TLV22, and the explanation will not be repeated here.
  • step 505 because the link between the first node and the next hop node indicated in the message has failed, the first node needs to exclude the message when determining its own next hop node. The next hop node indicated in to ensure that the finally determined path can be successfully used to forward the message.
  • each node can also advertise the neighbor relationship through the neighbor sub-TLV (Adj-SID Sub TLV) in the neighbor relationship TLV.
  • the neighbor sub-TLV can be implemented by one of one or more optional sub-TLVs (not shown in Fig. 6).
  • the neighbor relationship TLV originally carries a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate the neighbor relationship in the domain. Therefore, in the embodiment of this application, in the scenario of forwarding packets based on SR-TE technology, the neighbor sub-TLV in the neighbor relationship TLV can also be directly reconfigured, so that the neighbor sub-TLV can carry neighbors in this domain.
  • the relationship function can also carry a cross-domain neighbor relationship, so that nodes in the first domain can establish tunnels between nodes in the second domain, that is, to establish a cross-domain tunnel.
  • FIG. 8 is a flowchart of another method for forwarding packets provided by an embodiment of the present application, which is applied to any node in the network system shown in FIG. 2. As shown in Figure 8, the method includes the following steps:
  • Step 801 The first node receives the message, the first node is any node in the first domain, and the first domain is any domain among multiple domains in the network.
  • step 801 For the implementation of step 801, reference may be made to the implementation of step 401 in the embodiment of FIG. 4, which will not be described in detail here.
  • the node in order to be able to establish a cross-domain tunnel, for any node in the second domain, first allow the node to publish the neighbor relationship TLV in the first domain
  • the neighbor identifier in can indicate neighbors in the second domain, and the neighbor sub-TLV in the neighbor relationship TLV is extended, so that the neighbor sub-TLV can carry the neighbor relationship between the node and the neighbor.
  • the neighbor flag in the neighbor relationship TLV may directly indicate a neighbor of the second node, and the neighbor may be The neighbors of the first node in the same domain may also be neighbors that are not in the same domain with the first node. Instead of using the neighbor identifier in the neighbor relationship TLV to indicate whether the neighbor is a cross-domain neighbor as in the embodiment shown in FIG. 4.
  • the ASG can create an SR-TE tunnel to the RSG, and the SR-TE tunnel can be determined by the LSDB in the second domain. Then, the ASG configures a neighbor relationship (Forwarding Adjacency, FA) for the SR-TE tunnel.
  • configuring the neighbor relationship refers to generating a neighbor relationship TLV including neighbor sub-TLVs, and setting the neighbor identifier in the neighbor relationship TLV to RSG, and then publishing the neighbor relationship TLV so that the CSG in the first domain can pass the following step 802 Go to step 803 to determine the forwarding path to the RSG based on the neighbor relationship.
  • the neighbor relationship is usually used to determine the backup path when the link fails, it is usually not necessary to have two-way reachability between the two nodes to establish the path when determining the forwarding path. Therefore, you can also The neighbor sub-TLV in the neighbor relationship TLV is modified so that the first node can confirm the path only after checking that the unidirectional reachability is satisfied when determining the forwarding path based on the neighboring sub-TLV.
  • the ASG after the ASG generates the neighbor sub-TLV for indicating the TE tunnel to the RSG, if the neighbor relationship TLV carrying the neighbor sub-TLV is currently released in domain 1, the ASG can send the neighbor
  • the O bit in the control bit in the sub-TLV is set, so that when the node CSG in the subsequent domain 1 obtains the neighbor relationship, it can confirm the path only after checking that the unidirectional reachability is satisfied.
  • the neighbor relationship sub-TLV will carry other one or more sub-TLVs as needed according to the configuration of the cross-domain neighbor relationship, and these one or more sub-TLVs are used to describe some attributes of the cross-domain neighbor relationship. For example, attributes such as maximum link bandwidth, maximum reserved bandwidth, unreserved bandwidth, and TE tunnel cost value.
  • the other one or more sub-TLVs can be implemented through sub-TLV 9/10/11/18 in TLV22.
  • the neighbor identifier in the TLV22 is used to indicate a neighbor of the node that publishes the TLV22, and the TLV22 also includes a neighbor sub-TLV, and the neighbor sub-TLV may be as shown in FIG. 6.
  • the neighbor sub-TLV may be as shown in FIG. 6.
  • One of the optional sub-TLVs (not shown in Figure 6).
  • FIG. 9 is a schematic diagram of the format of a neighbor sub-TLV provided by an embodiment of the present application. As shown in Figure 9, the neighbor sub-TLV includes fields such as type, length, control bits, weight, and SID/Label/Index.
  • the SID/label/index field is used to indicate the label of the established cross-domain tunnel, that is, the SID/label/index field is used to indicate the node issuing the neighbor relationship TLV and the neighbor identifier in the neighbor relationship TLV indicated Tunnel between nodes.
  • the O bit in the control bit is used to indicate that only one-way reachability needs to be checked when establishing a tunnel.
  • F, B, V, L, S, and P in the control bits shown in FIG. 9 are the bits that have been defined in the protocol.
  • the F bit is the address family flag. If the F bit is not set, it represents IPv4; if the F bit is set, it represents IPv6.
  • the B bit is a backup flag. If the B bit is set, the Adj-SID (referring to the neighbor identifier in the TLV22 in this embodiment) is used to protect other nodes.
  • the V bit is the Value flag. If the V bit is set, the Adj-SID carries the tag value Value, which is set by default. L: Local logo. If set, it means that the Value/Index carried by the Adj-SID has local meaning and is set by default.
  • the S bit is a sequence flag. If the S bit is set, it means that the Adj-SID is an Adjacency sequence.
  • the P bit refers to a permanent flag. If the P bit is set, it means that the Adj-SID is a permanently allocated SID, and the SID will not change regardless of device restart or interface shock. Regarding the detailed function description of these bits in the control bit, you can refer to the relevant protocol, which will not be explained one by one here.
  • step 802 For the second node in each node in the first domain, select a neighbor relationship TLV from one or more neighbor relationship TLVs of the second node, and obtain neighbor sub-TLVs in the selected neighbor relationship TLV, and neighbor sub-TLVs.
  • the TLV is used to indicate the neighbor relationship from the second node to the third node.
  • the third node is a node in the first domain or the second domain, and the second node is any node in each node in the first domain.
  • a neighbor can be determined by the neighbor identifier in the neighbor relationship TLV, and the forwarding path to the neighbor can be determined by the neighbor sub-TLV in the neighbor relationship TLV. . Therefore, for each neighbor relationship TLV in one or more neighbor relationship TLVs of any second node, the first node needs to first obtain neighbor sub-TLVs from the neighbor relationship TLV.
  • the CSG needs to first obtain the neighbor relationship TLV issued by the ASG.
  • the neighbor identifier in the neighbor relationship TLV issued by the ASG is used to indicate the RSG, that is, the third node is the RSG at this time.
  • the SID/tag/index field included in the neighbor sub-TLV in the neighbor relationship TLV is used to indicate the tunnel from the ASG to the RSG.
  • Step 803 The first node determines a forwarding path of the message according to one or more neighbor relationships of each node in the first domain, and forwards the message according to the determined forwarding path.
  • the CSG first creates a TE tunnel to the ASG based on the neighbor relationship with the ASG, and then passes Neighbor relationship between ASG and RSG, creating a TE tunnel from ASG to RSG.
  • FIG. 10 is a schematic diagram of an apparatus of a first node according to an embodiment of the present application. As shown in FIG. 10, the first node 1000 includes:
  • the receiving module 1001 is configured to receive a message, the first node is any node in the first domain, and the first domain is any one of multiple domains in the network;
  • the obtaining module 1002 is used to obtain one or more neighbor relations of each node in the first domain.
  • the one or more neighbor relations of the border nodes in the first domain include the neighbor relations of the border nodes in the second domain.
  • the determining module 1003 is configured to determine a forwarding path to the destination node of the message according to one or more neighbor relationships of each node in the first domain;
  • the forwarding module 1004 is configured to forward the message according to the determined forwarding path.
  • the aforementioned acquisition module is specifically used for:
  • the second node of each node For the second node of each node, select a neighbor relationship TLV from one or more neighbor relationship type-length-value TLVs of the second node, and obtain the neighbor identifier in the selected neighbor relationship TLV.
  • the second node is each node Any node in;
  • the virtual neighbor sub-TLV is obtained from the selected neighbor relationship TLV, the virtual neighbor sub-TLV carries the neighbor identifier and path label, and the neighbor carried by the virtual neighbor sub-TLV
  • the identifier is used to indicate the identifier of the virtual neighbor corresponding to the second node.
  • the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the second node to the virtual neighbor.
  • the path of the second node to the virtual neighbor is through a link in the second domain.
  • the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor.
  • the aforementioned acquisition module is further specifically configured to: in the case that the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor, determine a neighbor relationship of the second node according to the selected neighbor relationship TLV, and the normal neighbor is Refers to a node that constructs a path through link resources in the first domain and the second node.
  • the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor.
  • the aforementioned acquisition module is also specifically used for:
  • the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segment routing optimal path SR-BE technology, and the current situation is in the scenario of forwarding packets based on the SR-BE technology
  • the virtual neighbor is executed according to the virtual neighbor The step of determining a neighbor relationship of the second node by the neighbor identifier and path label carried by the sub-TLV.
  • the aforementioned acquisition module is also specifically used for:
  • the virtual neighbor function instruction information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segmented routing process engineering SR-TE technology, and the current situation is in the scenario of forwarding packets based on the SR-TE technology
  • the virtual neighbor is executed according to the virtual neighbor.
  • the virtual neighbor function indication information is carried in the control bit field of the virtual neighbor sub-TLV.
  • the aforementioned acquisition module is also specifically used for:
  • the second node in each node For the second node in each node, select a neighbor relationship TLV from one or more neighbor relationship TLVs of the second node, and obtain the neighbor sub-TLV in the selected neighbor relationship TLV.
  • the neighbor sub-TLV is used to indicate the second node to the second node.
  • the neighbor relationship of three nodes, the third node is a node in the first domain or the second domain, and the second node is any node in each node.
  • the aforementioned determining module is also specifically used for:
  • the first node Starting from the first node, the first node sequentially executes the steps of determining the next hop node of the current node according to one or more neighbor relationships of the current node, until the next hop node is determined as the destination node of the message, the result is The forwarding path of the packet.
  • the aforementioned acquisition module is also specifically used for:
  • the optimal neighbor relationship is the neighbor relationship of the current node in the second domain, and the path between the current node and the node indicated by the optimal neighbor relationship has unidirectional reachability, the most The node indicated by the good neighbor relationship is determined as the next hop node of the current node.
  • the aforementioned acquisition module is also specifically used for:
  • the neighbor relationship of the border node in the first domain acquired by the first node includes the neighbor relationship of the border node in the second domain. It is a domain other than the first domain.
  • the first node can determine the forwarding path based on the neighbor relationship of the border node in the second domain. That is, the first node can use other than the first domain when determining the forwarding path.
  • Link resources in other domains other than the link resources of the domain thereby avoiding the problem that messages cannot be forwarded when there is no backup path in the current domain, thereby improving the success rate of message forwarding.
  • the first node provided in the above embodiment forwards a message
  • only the division of the above functional modules is used as an example for illustration.
  • the above function allocation can be completed by different functional modules according to needs. That is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the first node provided in the foregoing embodiment belongs to the same concept as the embodiment of the method for forwarding a message. For the specific implementation process, please refer to the method embodiment, which will not be repeated here.
  • FIG. 11 is a schematic diagram of a boundary node device provided by an embodiment of the present application.
  • the boundary node is a boundary node between a first domain and a second domain.
  • the boundary node 1100 includes:
  • the determining module 1101 is used to determine the neighbor relationship TLV, and the neighbor relationship TLV is used to indicate the neighbor relationship of the border node in the second domain;
  • the publishing module 1102 is used to publish the neighbor relationship TLV in the first domain.
  • the neighbor relationship TLV includes a virtual neighbor sub-TLV
  • the virtual neighbor sub-TLV carries the neighbor identifier and path label
  • the neighbor identifier carried in the virtual neighbor sub-TLV is used for
  • the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the border node to the virtual neighbor
  • the path from the border node to the virtual neighbor is constructed through link resources in the second domain.
  • the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
  • the neighbor relationship TLV includes a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate the neighbor relationship from the border node to the third node, and the third node is a node in the first domain or the second domain.
  • the border node between the first domain and the second domain may determine the neighbor relationship used to indicate the neighbor relationship of the border node in the second domain TLV, and publish the neighbor relationship TLV in the first domain.
  • the first node in the first domain can receive the neighbor relationship TLV, so that the subsequent first node can determine the forwarding path based on the neighbor relationship of the border node in the second domain, that is, the first node is determining the forwarding path It is possible to use link resources in other domains except the link resources in the first domain, thereby avoiding the problem that packets cannot be forwarded when there is no backup path in the current domain, thereby improving the success rate of packet forwarding.
  • boundary node provided in the foregoing embodiment forwards a message
  • only the division of the foregoing functional modules is used as an example for illustration.
  • the foregoing function allocation can be completed by different functional modules according to needs, i.e.
  • the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the boundary node provided in the foregoing embodiment and the method embodiment for forwarding a message belong to the same concept. For the specific implementation process, please refer to the method embodiment, which will not be repeated here.
  • FIG. 12 is a schematic structural diagram of a computer device provided by an embodiment of the present invention. Any node in the network system of the foregoing embodiment can be implemented by the computer device shown in FIG. 12.
  • the computer device includes at least one processor 1201, a communication bus 1202, a memory 1203, and at least one communication interface 1204.
  • the processor 1201 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling program execution of the solution of this application.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • the communication bus 1202 may include a path for transferring information between the above-mentioned components.
  • the memory 1203 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions
  • the dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (Including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer Any other media, but not limited to this.
  • the memory 1203 may exist independently, and is connected to the processor 1201 through the communication bus 1202.
  • the memory 1203 may also be integrated with the processor 1201.
  • the memory 1203 is used to store program codes for executing the solutions of the present application, and the processor 1201 controls the execution.
  • the processor 1201 is configured to execute program codes stored in the memory 1203.
  • the program code may include one or more software modules, and any node in the foregoing embodiments may determine the data used to develop the application through one or more software modules in the program code in the processor 1201 and the memory 1203.
  • the communication interface 1204 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network RAN, wireless local area networks (WLAN), and so on.
  • a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network RAN, wireless local area networks (WLAN), and so on.
  • the computer device may include multiple processors, such as the processor 1201 and the processor 1205 shown in FIG. 12.
  • processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • the computer may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)) )Wait.
  • the program can be stored in a computer-readable storage medium.
  • the storage medium mentioned can be a read-only memory, a magnetic disk or an optical disk, etc.

Abstract

Disclosed by the present application are a packet forwarding method, device, and storage medium, belonging to the technical field of segment routing. In the method, in order to enable nodes in a certain domain to determine a forwarding path across domains, a neighboring relationship of a boundary node in a first domain acquired by a first node comprises a neighboring relationship of a boundary node in a second domain, said second domain being a domain other than said first domain; thus the first node can determine the forwarding path in view of the neighboring relationship of the boundary node in the second domain, that is, the first node can use a link resource in another domain other than a link resource in the first domain when determining the forwarding path, thereby avoiding the problem that packets cannot be forwarded when there is no backup path in the current domain, and improving the rate of success of packet forwarding.

Description

转发报文的方法、装置及存储介质Method, device and storage medium for forwarding messages
本申请要求于2019年10月22日提交的申请号为201911005235.9、发明名称为“转发报文的方法、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on October 22, 2019 with the application number 201911005235.9 and the invention title "Method, device and storage medium for message forwarding", the entire content of which is incorporated into this application by reference .
技术领域Technical field
本申请涉及分段路由(segment routing,SR)技术领域,特别涉及一种确转发报文的方法、装置及存储介质。This application relates to the technical field of segment routing (SR), and in particular to a method, device and storage medium for confirming forwarding of packets.
背景技术Background technique
目前,为了便于对大型网络进行管理,通常将网络划分为多个域,每个域包括一组主机和一组路由器,一个域内的主机和路由器由一个控制器统一进行管理。此时,如何将报文转发至网络中的目的节点已经成为当前的研究热点。At present, in order to facilitate the management of large-scale networks, the network is usually divided into multiple domains. Each domain includes a set of hosts and a set of routers. The hosts and routers in a domain are managed by a controller. At this time, how to forward the message to the destination node in the network has become a current research hotspot.
相关技术中,对于任一域,可以通过SR技术实现报文在该域内的转发。也即是,在该域的入口节点处在报文中插入报文在该域内的转发路径,入口节点按照该转发路径将报文转发至下一跳节点,下一跳节点在接收到该报文后,继续按照转发路径转发报文,直至报文转发至该域的出口节点。出口节点根据控制器的指示将报文转发至另一个域的入口节点,报文在另一个域的转发过程和报文在前述域内的转发过程基本相同。通过上述过程,即可实现将报文转发至网络内的目的节点。In related technologies, for any domain, the SR technology can be used to implement packet forwarding in the domain. That is, the ingress node of the domain inserts the message forwarding path in the domain into the message, and the ingress node forwards the message to the next hop node according to the forwarding path, and the next hop node receives the message after receiving the message. After the message, continue to forward the message according to the forwarding path until the message is forwarded to the egress node of the domain. The egress node forwards the message to the ingress node of another domain according to the controller's instruction, and the forwarding process of the message in the other domain is basically the same as the forwarding process of the message in the aforementioned domain. Through the above process, the message can be forwarded to the destination node in the network.
在上述转发报文的过程中,对于任一域,当该域内的某个节点接收到报文,且该节点和该域内的下一跳节点之间的链路出现故障时,该节点确定在该域内到下一跳节点之间是否有备份路径,如果该域内该节点到下一跳节点之间没有备份路径,将导致将报文无法成功转发至目的节点。In the above process of forwarding messages, for any domain, when a node in the domain receives a message, and the link between the node and the next-hop node in the domain fails, the node determines that it is in Whether there is a backup path from the node to the next hop node in the domain? If there is no backup path from the node to the next hop node in the domain, the message will not be successfully forwarded to the destination node.
发明内容Summary of the invention
本申请提供了一种转发报文的方法、装置及存储介质,可以在当前节点到下一跳节点之间的链路发生故障的情况下建立跨域的备份路径,从而提高报文的转发成功率。所述技术方案如下:The present application provides a method, device and storage medium for forwarding messages, which can establish a cross-domain backup path when the link between the current node and the next hop node fails, thereby improving the success of message forwarding rate. The technical solution is as follows:
第一方面,提供了一种转发报文的方法。在该方法中,第一节点接收报文,该第一节点为第一域内的任一节点,该第一域为网络中的多个域中的任一域。该第一节点获取第一域内各个节点的一个或多个邻居关系,该第一域内的边界节点的一个或多个邻居关系包括该边界节点在第二域内的邻居关系,该第二域为除该第一域之外的域;该第一节点根据该第一域内各个节点的一个或多个邻居关系,确定到达该报文的目的节点的转发路径;该第一节点按照确定的转发路径转发该报文。In the first aspect, a method for forwarding messages is provided. In this method, a first node receives a message, the first node is any node in a first domain, and the first domain is any domain in a plurality of domains in the network. The first node obtains one or more neighbor relationships of each node in the first domain, and the one or more neighbor relationships of border nodes in the first domain include the neighbor relationships of the border node in the second domain, and the second domain is divided by A domain outside the first domain; the first node determines a forwarding path to the destination node of the message according to one or more neighbor relationships of each node in the first domain; the first node forwards according to the determined forwarding path The message.
在本申请实施例中,为了实现某个域内的节点能够跨域确定转发路径,第一节点获取的第一域内的边界节点的邻居关系包括边界节点在第二域内的邻居关系,该第二域为除第一域之外的域,如此,第一节点便可结合边界节点在第二域内的邻居关系来确定转发路径,也即是,第一节点在确定转发路径时可以利用除了第一域内的链路资源之外的其他域内的链路资源,从而避免了在当前所在域内没有备份路径时报文无法转发的问题,也就提高了报文转发的成功率。In the embodiment of the present application, in order to realize that nodes in a certain domain can determine the forwarding path across domains, the neighbor relationship of the border node in the first domain acquired by the first node includes the neighbor relationship of the border node in the second domain. It is a domain other than the first domain. In this way, the first node can determine the forwarding path based on the neighbor relationship of the border node in the second domain. That is, the first node can use other than the first domain when determining the forwarding path. Link resources in other domains other than the link resources of the domain, thereby avoiding the problem that packets cannot be forwarded when there is no backup path in the current domain, and thus improving the success rate of packet forwarding.
可选地,该第一节点获取该第一域内各个节点的一个或多个邻居关系,具体为:对于该各个节点中的第二节点,从该第二节点的一个或多个邻居关系类型-长度-值TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居标识,该第二节点为该各个节点中的任一节点;在该选择的邻居关系TLV中携带的邻居标识指示一个虚拟邻居的情况下,从该选择的邻居关系TLV中获取虚拟邻居子TLV,该虚拟邻居子TLV携带邻居标识和路径标签,该虚拟邻居子TLV携带的邻居标识用于指示该第二节点对应的虚拟邻居的标识,该虚拟邻居子TLV携带的路径标签用于指示该第二节点到达该虚拟邻居的路径,该第二节点达到该虚拟邻居的路径是通过该第二域内的链路资源构建的;根据该虚拟邻居子TLV携带的邻居标识和路径标签确定该第二节点的一个邻居关系。Optionally, the first node obtains one or more neighbor relationships of each node in the first domain, specifically: for a second node in each node, from one or more neighbor relationship types of the second node − Select a neighbor relationship TLV from the length-value TLV, and obtain the neighbor identifier in the selected neighbor relationship TLV. The second node is any one of the nodes; the neighbor identifier carried in the selected neighbor relationship TLV indicates one In the case of a virtual neighbor, a virtual neighbor sub-TLV is obtained from the selected neighbor relationship TLV, the virtual neighbor sub-TLV carries a neighbor identifier and a path label, and the neighbor identifier carried by the virtual neighbor sub-TLV is used to indicate the corresponding The identifier of the virtual neighbor, the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the second node to the virtual neighbor, and the path of the second node to the virtual neighbor is constructed through link resources in the second domain ; Determine a neighbor relationship of the second node according to the neighbor identifier and path label carried by the virtual neighbor sub-TLV.
在本申请实施例中,可以通过虚拟邻居的方式来指示第一域内的边界节点在第二域内的邻居关系,如此当第一节点与下一跳节点之间的链路出现故障时,便可根据该虚拟邻居确定其他可行的备份路径。In the embodiment of the present application, virtual neighbors can be used to indicate the neighbor relationship of border nodes in the first domain in the second domain, so that when the link between the first node and the next hop node fails, it can be Determine other feasible backup paths based on the virtual neighbor.
可选地,第一节点获取选择的邻居关系TLV中的邻居标识之后,第一节点还可以在该选择的邻居关系TLV中携带的邻居标识指示一个正常邻居的情况下,根据该选择的邻居关系TLV确定该第二节点的一个邻居关系,该正常邻居是指通过该第一域内的链路资源与该第二节点构建路径的节点。Optionally, after the first node obtains the neighbor identifier in the selected neighbor relationship TLV, the first node may also use the selected neighbor relationship if the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor. The TLV determines a neighbor relationship of the second node, and the normal neighbor refers to a node that constructs a path with the second node through link resources in the first domain.
本申请实施例是对原有的邻居关系TLV进行了扩展,而原有的邻居关系TLV仍然可以指示所在域内的一个正常邻居。The embodiment of the application extends the original neighbor relationship TLV, and the original neighbor relationship TLV can still indicate a normal neighbor in the domain.
可选地,在该选择的邻居关系TLV中携带的邻居标识与该第二节点的标识相同的情况下,该选择的邻居关系TLV中携带的邻居标识指示一个虚拟邻居。在该选择的邻居关系TLV中携带的邻居标识与该第二节点的标识不相同的情况下,该选择的邻居关系TLV中携带的邻居标识指示一个正常邻居。Optionally, in the case that the neighbor identifier carried in the selected neighbor relationship TLV is the same as the identifier of the second node, the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor. In the case that the neighbor identifier carried in the selected neighbor relationship TLV is different from the identifier of the second node, the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor.
具体地,在本申请实施例中,可以通过节点发布的邻居关系TLV中的邻居标识是否是该节点自身来确定邻居关系TLV中指示的邻居是虚拟邻居还是所在域内的正常邻居。Specifically, in this embodiment of the present application, whether the neighbor indicated in the neighbor relationship TLV is the node itself can be used to determine whether the neighbor indicated in the neighbor relationship TLV is a virtual neighbor or a normal neighbor in the domain.
可选地,第一节点从该选择的邻居关系TLV中获取虚拟邻居子TLV之后,第一节点还可以从该虚拟邻居子TLV中获取虚拟邻居功能指示信息;在该虚拟邻居功能指示信息指示该虚拟邻居用于基于分段路由最优路径SR-BE技术转发报文的场景中,且当前处于基于SR-BE技术转发报文的场景的情况下,执行根据该虚拟邻居子TLV携带的邻居标识和路径标签确定该第二节点的一个邻居关系的步骤。Optionally, after the first node obtains the virtual neighbor sub-TLV from the selected neighbor relationship TLV, the first node may also obtain virtual neighbor function indication information from the virtual neighbor sub-TLV; where the virtual neighbor function indication information indicates the The virtual neighbor is used in the scenario of forwarding packets based on the segment routing optimal path SR-BE technology, and currently in the scenario of forwarding packets based on the SR-BE technology, the implementation is performed according to the neighbor identifier carried by the virtual neighbor sub-TLV And the path label to determine a neighbor relationship of the second node.
可选地,第一节点从该选择的邻居关系TLV中获取虚拟邻居子TLV之后,第一节点还可以从该虚拟邻居子TLV中获取虚拟邻居功能指示信息;在该虚拟邻居功能指示信息指示该虚拟邻居用于基于分段路由流程工程SR-TE技术转发报文的场景中,且当前处于基于SR-TE技术转发报文的场景的情况下,执行根据该虚拟邻居子TLV携带的邻居标识和路径标签确定 该第二节点的一个邻居关系的步骤。Optionally, after the first node obtains the virtual neighbor sub-TLV from the selected neighbor relationship TLV, the first node may also obtain virtual neighbor function indication information from the virtual neighbor sub-TLV; where the virtual neighbor function indication information indicates the The virtual neighbor is used in the scenario of forwarding packets based on the segmented routing process engineering SR-TE technology, and currently in the scenario of forwarding packets based on the SR-TE technology, the virtual neighbor is executed according to the neighbor identification and the sub-TLV carried by the virtual neighbor. The path label determines the step of a neighbor relationship of the second node.
由于本申请实施例提供的转发报文的方法可以应用于通过SR-BE技术确定转发报文的场景中,也可以应用于通过SR-TE技术转发报文的场景中,而不同的场景中第一节点通过第二域达到虚拟邻居的路径的方式不同。因此,为了便于第一节点后续能够快速确定该虚拟邻居子TLV携带的路径标签能够用于确定转发路径,还可以在虚拟邻居子TLV中配置虚拟邻居功能指示信息,通过该虚拟邻居功能指示信息来指示该虚拟邻居子TLV携带的路径标签适用于哪种场景。Since the method for forwarding messages provided by the embodiments of the present application can be applied to the scenario where the forwarding message is determined by the SR-BE technology, it can also be applied to the scenario where the message is forwarded through the SR-TE technology, and the first in different scenarios The way for a node to reach the virtual neighbor through the second domain is different. Therefore, in order for the first node to quickly determine that the path label carried by the virtual neighbor sub-TLV can be used to determine the forwarding path, the virtual neighbor function indication information can also be configured in the virtual neighbor sub-TLV, and the virtual neighbor function indication information can be used to determine Indicate which scenario the path label carried by the virtual neighbor sub-TLV is applicable to.
可选地,该虚拟邻居功能指示信息携带在该虚拟邻居子TLV的控制位字段中。具体地,可以在虚拟邻居子TLV的控制位字段中携带该虚拟邻居功能指示信息。Optionally, the virtual neighbor function indication information is carried in the control bit field of the virtual neighbor sub-TLV. Specifically, the virtual neighbor function indication information may be carried in the control bit field of the virtual neighbor sub-TLV.
可选地,该第一节点获取该第一域内各个节点的一个或多个邻居关系,具体为:对于该各个节点中第二节点,从该第二节点的一个或多个邻居关系TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居子TLV,该邻居子TLV用于指示该第二节点到第三节点的邻居关系,该第三节点为该第一域或该第二域中的节点,该第二节点为该各个节点中的任一节点。Optionally, the first node obtains one or more neighbor relationships of each node in the first domain, specifically: for the second node in each node, select from one or more neighbor relationship TLVs of the second node A neighbor relationship TLV to obtain a neighbor sub-TLV in the selected neighbor relationship TLV, the neighbor sub-TLV is used to indicate the neighbor relationship from the second node to the third node, and the third node is the first domain or the second domain The second node is any node in each node.
在基于SR-TE技术转发报文的场景中,各个节点还可以通过邻居关系TLV中的邻居子TLV(Adj-SID Sub TLV)发布邻居关系。也即是,在基于SR-TE技术转发报文的场景中,邻居关系TLV中原本就携带一个邻居子TLV,该邻居子TLV用于指示所在域内的邻居关系。因此,在本申请实施例中,在基于SR-TE技术转发报文的场景中,还可以直接对邻居关系TLV中的邻居子TLV进行重新配置,以使邻居子TLV能够携带跨域的邻居关系(在本申请实施例中,具体是指第三节点为第二域内的节点的情况),以便于第一域内的节点能够建立到第二域内的节点之间的隧道,也即是建立跨域的隧道In the scenario of forwarding packets based on the SR-TE technology, each node can also advertise the neighbor relationship through the neighbor sub-TLV (Adj-SID Sub TLV) in the neighbor relationship TLV. That is, in the scenario of forwarding packets based on the SR-TE technology, the neighbor relationship TLV originally carries a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate the neighbor relationship in the domain. Therefore, in the embodiment of the present application, in the scenario of forwarding packets based on the SR-TE technology, the neighbor sub-TLV in the neighbor relationship TLV can also be directly reconfigured, so that the neighbor sub-TLV can carry the cross-domain neighbor relationship (In the embodiment of the present application, it specifically refers to the case where the third node is a node in the second domain), so that nodes in the first domain can establish tunnels between nodes in the second domain, that is, to establish a cross-domain Tunnel
可选地,该第一节点根据该第一域内各个节点的一个或多个邻居关系,确定该报文的转发路径,具体为:从该第一节点开始,该第一节点依次执行根据当前节点的一个或多个邻居关系,确定该当前节点的下一跳节点的步骤,直至确定出的下一跳节点为该报文的目的节点时,得到该报文的转发路径。Optionally, the first node determines the forwarding path of the message according to one or more neighbor relationships of each node in the first domain, specifically: starting from the first node, the first node sequentially executes The step of determining the next hop node of the current node until the determined next hop node is the destination node of the message, the forwarding path of the message is obtained.
为了确定到达报文的目的地的转发路径,需要逐跳确定下一跳节点。In order to determine the forwarding path to the destination of the message, the next hop node needs to be determined hop by hop.
可选地,该根据当前节点的一个或多个邻居关系,确定该当前节点的下一跳节点,具体为:从该当前节点的一个或多个邻居关系中确定到达该目的节点的最优邻居关系;在该当前节点为边界节点、该最优邻居关系为该当前节点在该第二域内的邻居关系、且该当前节点到该最优邻居关系所指示的节点之间的路径具有单向可达性的情况下,将该最优邻居关系所指示的节点确定为该当前节点的下一跳节点。Optionally, the determining the next hop node of the current node according to one or more neighbor relationships of the current node is specifically: determining the optimal neighbor to the destination node from the one or more neighbor relationships of the current node Relationship; the current node is a boundary node, the optimal neighbor relationship is the neighbor relationship of the current node in the second domain, and the path between the current node and the node indicated by the optimal neighbor relationship has unidirectional In the case of reaching performance, the node indicated by the optimal neighbor relationship is determined as the next hop node of the current node.
由于本申请实施例提供的报文转发方法通常是在当前链路出现故障时才重新确定转发路径,此时并不需要其具有双向可达性,可以仅仅在具有单向可达性之后可便可基于该邻居关系确定转发路径,从而提高了重新确定转发路径的效率。Since the message forwarding method provided by the embodiment of the present application usually re-determines the forwarding path when the current link fails, it does not need to have two-way reachability at this time, and it can be used only after it has one-way reachability. The forwarding path can be determined based on the neighbor relationship, thereby improving the efficiency of re-determining the forwarding path.
可选地,该第一节点获取该第一域内各个节点的一个或多个邻居关系,具体为:在该第一节点与该报文中指示的下一跳节点之间的链路有故障的情况下,获取该第一域内各个节点的一个或多个邻居关系。Optionally, the first node obtains one or more neighbor relationships of each node in the first domain, specifically: the link between the first node and the next hop node indicated in the message is faulty In this case, one or more neighbor relationships of each node in the first domain are acquired.
具体地,本申请实施例提供的报文转发方法可以应用于在该第一节点与该报文中指示的下一跳节点之间的链路有故障的情况下,从而避免了在当前所在域内没有备份路径时报文无 法转发的问题,从而提高了报文转发的成功率。Specifically, the message forwarding method provided in the embodiment of the present application can be applied in the case that the link between the first node and the next hop node indicated in the message is faulty, thereby avoiding the problem of being in the current domain. There is a problem that packets cannot be forwarded when there is no backup path, which improves the success rate of packet forwarding.
第二方面,提供了一种转发报文的方法,在该方法中:第一域和第二域之间的边界节点确定邻居关系TLV,所述邻居关系TLV用于指示所述边界节点在第二域内的邻居关系;所述边界节点在所述第一域内发布所述邻居关系TLV。In a second aspect, a method for forwarding packets is provided. In the method, a border node between a first domain and a second domain determines a neighbor relationship TLV, and the neighbor relationship TLV is used to indicate that the border node is in the first domain. The neighbor relationship in the second domain; the border node publishes the neighbor relationship TLV in the first domain.
在本申请实施例中,为了实现某个域内的节点能够跨域确定转发路径,第一域和第二域之间的边界节点可以确定用于指示边界节点在第二域内的邻居关系的邻居关系TLV,并在第一域内发布该邻居关系TLV。如此,第一域内的第一节点便可接收该邻居关系TLV,以便于后续第一节点可以结合边界节点在第二域内的邻居关系来确定转发路径,也即是,第一节点在确定转发路径时可以利用除了第一域内的链路资源之外的其他域内的链路资源,从而避免了在当前所在域内没有备份路径时报文无法转发的问题,从而提高了报文转发的成功率。In the embodiment of the present application, in order to realize that nodes in a certain domain can determine the forwarding path across domains, the border node between the first domain and the second domain may determine the neighbor relationship used to indicate the neighbor relationship of the border node in the second domain TLV, and publish the neighbor relationship TLV in the first domain. In this way, the first node in the first domain can receive the neighbor relationship TLV, so that the subsequent first node can determine the forwarding path based on the neighbor relationship of the border node in the second domain, that is, the first node is determining the forwarding path It is possible to use link resources in other domains except the link resources in the first domain, thereby avoiding the problem that packets cannot be forwarded when there is no backup path in the current domain, thereby improving the success rate of packet forwarding.
可选地,在所述邻居关系TLV携带的的邻居标识指示一个虚拟邻居的情况下,所述邻居关系TLV包括虚拟邻居子TLV,所述虚拟邻居子TLV携带邻居标识和路径标签,所述虚拟邻居子TLV携带的邻居标识用于指示所述边界节点对应的虚拟邻居的标识,所述虚拟邻居子TLV携带的路径标签用于指示所述边界节点到达所述虚拟邻居的路径,所述边界节点达到所述虚拟邻居的路径是通过所述第二域内的链路资源构建的。Optionally, in the case that the neighbor identifier carried by the neighbor relationship TLV indicates a virtual neighbor, the neighbor relationship TLV includes a virtual neighbor sub-TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, and the virtual neighbor TLV The neighbor identifier carried by the neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the border node, and the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the border node to the virtual neighbor. The path to the virtual neighbor is constructed through link resources in the second domain.
可选地,在所述邻居关系TLV中携带的邻居标识与所述边界节点的标识相同的情况下,所述邻居关系TLV中携带的邻居标识指示一个虚拟邻居。Optionally, in the case that the neighbor identifier carried in the neighbor relationship TLV is the same as the identifier of the border node, the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
可选地,所述邻居关系TLV包括邻居子TLV,所述邻居子TLV用于指示所述边界节点到第三节点的邻居关系,所述第三节点为所述第一域或所述第二域中的节点。Optionally, the neighbor relationship TLV includes a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate a neighbor relationship from the border node to a third node, and the third node is the first domain or the second domain. Nodes in the domain.
上述通过不同的方式来指示边界节点在第二域内的邻居关系的有益效果已在第一方面提供的报文转发方法中进行了详细说明,在此就不再赘述。The foregoing beneficial effects of indicating the neighbor relationship of the border node in the second domain in different ways have been described in detail in the message forwarding method provided by the first aspect, and will not be repeated here.
第三方面,提供了一种第一节点,该第一节点包括:In a third aspect, a first node is provided, and the first node includes:
接收模块,用于接收报文,所述第一节点为第一域内的任一节点,所述第一域为网络中的多个域中的任一域;A receiving module, configured to receive a message, the first node is any node in a first domain, and the first domain is any one of multiple domains in the network;
获取模块,用于获取所述第一域内各个节点的一个或多个邻居关系,所述第一域内的边界节点的一个或多个邻居关系包括所述边界节点在第二域内的邻居关系,所述第二域为除所述第一域之外的域;The obtaining module is configured to obtain one or more neighbor relationships of each node in the first domain, and the one or more neighbor relationships of border nodes in the first domain include the neighbor relationship of the border nodes in the second domain, so The second domain is a domain other than the first domain;
确定模块,用于根据所述第一域内各个节点的一个或多个邻居关系,确定到达所述报文的目的节点的转发路径;A determining module, configured to determine a forwarding path to the destination node of the message according to one or more neighbor relationships of each node in the first domain;
转发模块,用于按照确定的转发路径转发所述报文。The forwarding module is configured to forward the message according to the determined forwarding path.
可选地,前述获取模块,具体用于:Optionally, the aforementioned acquisition module is specifically used for:
对于所述各个节点中的第二节点,从所述第二节点的一个或多个邻居关系类型-长度-值TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居标识,所述第二节点为所述各个节点中的任一节点;For the second node in each of the nodes, select a neighbor relationship TLV from one or more neighbor relationship type-length-value TLVs of the second node, and obtain the neighbor identifier in the selected neighbor relationship TLV, the The second node is any one of the nodes;
在所述选择的邻居关系TLV中携带的邻居标识指示一个虚拟邻居的情况下,从所述选择的邻居关系TLV中获取虚拟邻居子TLV,所述虚拟邻居子TLV携带邻居标识和路径标签,所述虚拟邻居子TLV携带的邻居标识用于指示所述第二节点对应的虚拟邻居的标识,所述虚 拟邻居子TLV携带的路径标签用于指示所述第二节点到达所述虚拟邻居的路径,所述第二节点达到所述虚拟邻居的路径是通过所述第二域内的链路资源构建的;In the case where the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor, a virtual neighbor sub-TLV is obtained from the selected neighbor relationship TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, so The neighbor identifier carried by the virtual neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the second node, and the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the second node to the virtual neighbor, The path for the second node to reach the virtual neighbor is constructed through link resources in the second domain;
根据所述虚拟邻居子TLV携带的邻居标识和路径标签确定所述第二节点的一个邻居关系。Determine a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV.
可选地,在所述选择的邻居关系TLV中携带的邻居标识与所述第二节点的标识相同的情况下,所述选择的邻居关系TLV中携带的邻居标识指示一个虚拟邻居。Optionally, in the case that the neighbor identifier carried in the selected neighbor relationship TLV is the same as the identifier of the second node, the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor.
可选地,前述获取模块,还具体用于:在所述选择的邻居关系TLV中携带的邻居标识指示一个正常邻居的情况下,根据所述选择的邻居关系TLV确定所述第二节点的一个邻居关系,所述正常邻居是指通过所述第一域内的链路资源与所述第二节点构建路径的节点。Optionally, the aforementioned acquiring module is further specifically configured to: in the case that the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor, determine one of the second nodes according to the selected neighbor relationship TLV Neighbor relationship, the normal neighbor refers to a node that constructs a path with the second node through link resources in the first domain.
可选地,在所述选择的邻居关系TLV中携带的邻居标识与所述第二节点的标识不相同的情况下,所述选择的邻居关系TLV中携带的邻居标识指示一个正常邻居。Optionally, in the case that the neighbor identifier carried in the selected neighbor relationship TLV is different from the identifier of the second node, the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor.
可选地,前述获取模块,还具体用于:Optionally, the aforementioned acquisition module is also specifically used for:
从所述虚拟邻居子TLV中获取虚拟邻居功能指示信息;Acquiring virtual neighbor function indication information from the virtual neighbor sub-TLV;
在所述虚拟邻居功能指示信息指示所述虚拟邻居用于基于分段路由最优路径SR-BE技术转发报文的场景中,且当前处于基于SR-BE技术转发报文的场景的情况下,执行根据所述虚拟邻居子TLV携带的邻居标识和路径标签确定所述第二节点的一个邻居关系的步骤。In the case where the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segment routing optimal path SR-BE technology, and is currently in the scenario of forwarding packets based on the SR-BE technology, A step of determining a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV is performed.
可选地,前述获取模块,还具体用于:Optionally, the aforementioned acquisition module is also specifically used for:
从所述虚拟邻居子TLV中获取虚拟邻居功能指示信息;Acquiring virtual neighbor function indication information from the virtual neighbor sub-TLV;
在所述虚拟邻居功能指示信息指示所述虚拟邻居用于基于分段路由流程工程SR-TE技术转发报文的场景中,且当前处于基于SR-TE技术转发报文的场景的情况下,执行根据所述虚拟邻居子TLV携带的邻居标识和路径标签确定所述第二节点的一个邻居关系的步骤。When the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segmented routing process engineering SR-TE technology, and is currently in the scenario of forwarding packets based on the SR-TE technology, execute The step of determining a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV.
可选地,所述虚拟邻居功能指示信息携带在所述虚拟邻居子TLV的控制位字段中。Optionally, the virtual neighbor function indication information is carried in a control bit field of the virtual neighbor sub-TLV.
可选地,前述获取模块,还具体用于:Optionally, the aforementioned acquisition module is also specifically used for:
对于所述各个节点中第二节点,从所述第二节点的一个或多个邻居关系TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居子TLV,所述邻居子TLV用于指示所述第二节点到第三节点的邻居关系,所述第三节点为所述第一域或所述第二域中的节点,所述第二节点为所述各个节点中的任一节点。For the second node in each node, select a neighbor relationship TLV from one or more neighbor relationship TLVs of the second node, and obtain a neighbor sub-TLV in the selected neighbor relationship TLV, and the neighbor sub-TLV is used for Indicates the neighbor relationship between the second node and the third node, where the third node is a node in the first domain or the second domain, and the second node is any one of the nodes .
可选地,前述确定模块,还具体用于:Optionally, the aforementioned determining module is also specifically used for:
从所述第一节点开始,所述第一节点依次执行根据当前节点的一个或多个邻居关系,确定所述当前节点的下一跳节点的步骤,直至确定出的下一跳节点为所述报文的目的节点时,得到所述报文的转发路径。Starting from the first node, the first node sequentially executes the step of determining the next hop node of the current node according to one or more neighbor relationships of the current node, until the determined next hop node is the When the destination node of the message, the forwarding path of the message is obtained.
可选地,前述获取模块,还具体用于:Optionally, the aforementioned acquisition module is also specifically used for:
从所述当前节点的一个或多个邻居关系中确定到达所述目的节点的最优邻居关系;Determining the optimal neighbor relationship to the destination node from one or more neighbor relationships of the current node;
在所述当前节点为边界节点、所述最优邻居关系为所述当前节点在所述第二域内的邻居关系、且所述当前节点到所述最优邻居关系所指示的节点之间的路径具有单向可达性的情况下,将所述最优邻居关系所指示的节点确定为所述当前节点的下一跳节点。The current node is a boundary node, the optimal neighbor relationship is the neighbor relationship of the current node in the second domain, and the path between the current node and the node indicated by the optimal neighbor relationship In the case of unidirectional reachability, the node indicated by the optimal neighbor relationship is determined as the next hop node of the current node.
可选地,前述获取模块,还具体用于:Optionally, the aforementioned acquisition module is also specifically used for:
在所述第一节点与所述报文中指示的下一跳节点之间的链路有故障的情况下,获取所述第一域内各个节点的一个或多个邻居关系。In the case that the link between the first node and the next hop node indicated in the message is faulty, obtain one or more neighbor relationships of each node in the first domain.
上述第三方面提供的第一节点包括的各个模块的功能已在第一方面提供的报文转发方法中进行了详细说明,在此就不再赘述。The functions of the modules included in the first node provided in the above third aspect have been described in detail in the message forwarding method provided in the first aspect, and will not be repeated here.
第四方面、提供一种第一域和第二域之间的边界节点,该边界节点包括:In a fourth aspect, a boundary node between a first domain and a second domain is provided, and the boundary node includes:
确定模块,用于确定邻居关系TLV,所述邻居关系TLV用于指示所述边界节点在第二域内的邻居关系;A determining module, configured to determine a neighbor relationship TLV, where the neighbor relationship TLV is used to indicate the neighbor relationship of the border node in the second domain;
发布模块,用于在所述第一域内发布所述邻居关系TLV。The publishing module is configured to publish the neighbor relationship TLV in the first domain.
可选地,在所述邻居关系TLV携带的的邻居标识指示一个虚拟邻居的情况下,所述邻居关系TLV包括虚拟邻居子TLV,所述虚拟邻居子TLV携带邻居标识和路径标签,所述虚拟邻居子TLV携带的邻居标识用于指示所述边界节点对应的虚拟邻居的标识,所述虚拟邻居子TLV携带的路径标签用于指示所述边界节点到达所述虚拟邻居的路径,所述边界节点达到所述虚拟邻居的路径是通过所述第二域内的链路资源构建的。Optionally, in the case that the neighbor identifier carried by the neighbor relationship TLV indicates a virtual neighbor, the neighbor relationship TLV includes a virtual neighbor sub-TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, and the virtual neighbor TLV The neighbor identifier carried by the neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the border node, and the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the border node to the virtual neighbor. The path to the virtual neighbor is constructed through link resources in the second domain.
可选地,在所述邻居关系TLV中携带的邻居标识与所述边界节点的标识相同的情况下,所述邻居关系TLV中携带的邻居标识指示一个虚拟邻居。Optionally, in the case that the neighbor identifier carried in the neighbor relationship TLV is the same as the identifier of the border node, the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
可选地,所述邻居关系TLV包括邻居子TLV,所述邻居子TLV用于指示所述边界节点到第三节点的邻居关系,所述第三节点为所述第一域或所述第二域中的节点。Optionally, the neighbor relationship TLV includes a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate a neighbor relationship from the border node to a third node, and the third node is the first domain or the second domain. Nodes in the domain.
上述第四方面提供的边界节点包括的各个模块的功能已在第二方面提供的报文转发方法中进行了详细说明,在此就不再赘述。The functions of the various modules included in the boundary node provided in the above fourth aspect have been described in detail in the message forwarding method provided in the second aspect, and will not be repeated here.
第五方面,提供一种通信网络中的第一节点,所述第一节点为第一域内的任一节点,所述第一域为网络中的多个域中的任一域,所述第一节点包括存储器和处理器;In a fifth aspect, a first node in a communication network is provided, the first node is any node in a first domain, the first domain is any one of a plurality of domains in the network, and the first node is One node includes memory and processor;
所述存储器用于存储计算机程序;The memory is used to store a computer program;
所述处理器用于执行所述存储器中存储的计算机程序以执行下述转发报文的方法:The processor is configured to execute a computer program stored in the memory to execute the following method for forwarding messages:
接收报文;Receive message;
获取所述第一域内各个节点的一个或多个邻居关系,所述第一域内的边界节点的一个或多个邻居关系包括所述边界节点在第二域内的邻居关系,所述第二域为除所述第一域之外的域;Obtain one or more neighbor relationships of each node in the first domain, the one or more neighbor relationships of border nodes in the first domain include neighbor relationships of the border nodes in a second domain, and the second domain is Domains other than the first domain;
根据所述第一域内各个节点的一个或多个邻居关系,确定到达所述报文的目的节点的转发路径;Determine a forwarding path to the destination node of the message according to one or more neighbor relationships of each node in the first domain;
按照确定的转发路径转发所述报文;Forward the message according to the determined forwarding path;
可选地,所述第一节点获取所述第一域内各个节点的一个或多个邻居关系,包括:Optionally, the acquiring, by the first node, one or more neighbor relationships of each node in the first domain includes:
对于所述各个节点中的第二节点,从所述第二节点的一个或多个邻居关系类型-长度-值TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居标识,所述第二节点为所述各个节点中的任一节点;For the second node in each of the nodes, select a neighbor relationship TLV from one or more neighbor relationship type-length-value TLVs of the second node, and obtain the neighbor identifier in the selected neighbor relationship TLV, the The second node is any one of the nodes;
在所述选择的邻居关系TLV中携带的邻居标识指示一个虚拟邻居的情况下,从所述选择的邻居关系TLV中获取虚拟邻居子TLV,所述虚拟邻居子TLV携带邻居标识和路径标签,所述虚拟邻居子TLV携带的邻居标识用于指示所述第二节点对应的虚拟邻居的标识,所述虚拟邻居子TLV携带的路径标签用于指示所述第二节点到达所述虚拟邻居的路径,所述第二节点达到所述虚拟邻居的路径是通过所述第二域内的链路资源构建的;In the case where the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor, a virtual neighbor sub-TLV is obtained from the selected neighbor relationship TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, so The neighbor identifier carried by the virtual neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the second node, and the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the second node to the virtual neighbor, The path for the second node to reach the virtual neighbor is constructed through link resources in the second domain;
根据所述虚拟邻居子TLV携带的邻居标识和路径标签确定所述第二节点的一个邻居关系。Determine a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV.
可选地,在所述选择的邻居关系TLV中携带的邻居标识与所述第二节点的标识相同的情况下,所述选择的邻居关系TLV中携带的邻居标识指示一个虚拟邻居。Optionally, in the case that the neighbor identifier carried in the selected neighbor relationship TLV is the same as the identifier of the second node, the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor.
可选地,所述获取选择的邻居关系TLV中的邻居标识之后,还包括:在所述选择的邻居关系TLV中携带的邻居标识指示一个正常邻居的情况下,根据所述选择的邻居关系TLV确定所述第二节点的一个邻居关系,所述正常邻居是指通过所述第一域内的链路资源与所述第二节点构建路径的节点。Optionally, after obtaining the neighbor identifier in the selected neighbor relationship TLV, the method further includes: in the case that the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor, according to the selected neighbor relationship TLV A neighbor relationship of the second node is determined, and the normal neighbor refers to a node that constructs a path with the second node through link resources in the first domain.
可选地,在所述选择的邻居关系TLV中携带的邻居标识与所述第二节点的标识不相同的情况下,所述选择的邻居关系TLV中携带的邻居标识指示一个正常邻居。Optionally, in the case that the neighbor identifier carried in the selected neighbor relationship TLV is different from the identifier of the second node, the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor.
可选地,所述从所述选择的邻居关系TLV中获取虚拟邻居子TLV之后,还包括:Optionally, after obtaining the virtual neighbor sub-TLV from the selected neighbor relationship TLV, the method further includes:
从所述虚拟邻居子TLV中获取虚拟邻居功能指示信息;Acquiring virtual neighbor function indication information from the virtual neighbor sub-TLV;
在所述虚拟邻居功能指示信息指示所述虚拟邻居用于基于分段路由最优路径SR-BE技术转发报文的场景中,且当前处于基于SR-BE技术转发报文的场景的情况下,执行根据所述虚拟邻居子TLV携带的邻居标识和路径标签确定所述第二节点的一个邻居关系的步骤。In the case where the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segment routing optimal path SR-BE technology, and is currently in the scenario of forwarding packets based on the SR-BE technology, A step of determining a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV is performed.
可选地,所述从所述选择的邻居关系TLV中获取虚拟邻居子TLV之后,还包括:Optionally, after obtaining the virtual neighbor sub-TLV from the selected neighbor relationship TLV, the method further includes:
从所述虚拟邻居子TLV中获取虚拟邻居功能指示信息;Acquiring virtual neighbor function indication information from the virtual neighbor sub-TLV;
在所述虚拟邻居功能指示信息指示所述虚拟邻居用于基于分段路由流程工程SR-TE技术转发报文的场景中,且当前处于基于SR-TE技术转发报文的场景的情况下,执行根据所述虚拟邻居子TLV携带的邻居标识和路径标签确定所述第二节点的一个邻居关系的步骤。When the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segmented routing process engineering SR-TE technology, and is currently in the scenario of forwarding packets based on the SR-TE technology, execute The step of determining a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV.
可选地,所述虚拟邻居功能指示信息携带在所述虚拟邻居子TLV的控制位字段中。Optionally, the virtual neighbor function indication information is carried in a control bit field of the virtual neighbor sub-TLV.
可选地,所述第一节点获取所述第一域内各个节点的一个或多个邻居关系,包括:Optionally, the acquiring, by the first node, one or more neighbor relationships of each node in the first domain includes:
对于所述各个节点中第二节点,从所述第二节点的一个或多个邻居关系TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居子TLV,所述邻居子TLV用于指示所述第二节点到第三节点的邻居关系,所述第三节点为所述第一域或所述第二域中的节点,所述第二节点为所述各个节点中的任一节点。For the second node in each node, select a neighbor relationship TLV from one or more neighbor relationship TLVs of the second node, and obtain a neighbor sub-TLV in the selected neighbor relationship TLV, and the neighbor sub-TLV is used for Indicates the neighbor relationship between the second node and the third node, where the third node is a node in the first domain or the second domain, and the second node is any one of the nodes .
可选地,所述第一节点根据所述第一域内各个节点的一个或多个邻居关系,确定所述报文的转发路径,包括:Optionally, the first node determining the forwarding path of the message according to one or more neighbor relationships of each node in the first domain includes:
从所述第一节点开始,所述第一节点依次执行根据当前节点的一个或多个邻居关系,确定所述当前节点的下一跳节点的步骤,直至确定出的下一跳节点为所述报文的目的节点时,得到所述报文的转发路径。Starting from the first node, the first node sequentially executes the step of determining the next hop node of the current node according to one or more neighbor relationships of the current node, until the determined next hop node is the When the destination node of the message, the forwarding path of the message is obtained.
可选地,所述根据当前节点的一个或多个邻居关系,确定所述当前节点的下一跳节点,包括:Optionally, the determining the next hop node of the current node according to one or more neighbor relationships of the current node includes:
从所述当前节点的一个或多个邻居关系中确定到达所述目的节点的最优邻居关系;Determining the optimal neighbor relationship to the destination node from one or more neighbor relationships of the current node;
在所述当前节点为边界节点、所述最优邻居关系为所述当前节点在所述第二域内的邻居关系、且所述当前节点到所述最优邻居关系所指示的节点之间的路径具有单向可达性的情况下,将所述最优邻居关系所指示的节点确定为所述当前节点的下一跳节点。The current node is a boundary node, the optimal neighbor relationship is the neighbor relationship of the current node in the second domain, and the path between the current node and the node indicated by the optimal neighbor relationship In the case of unidirectional reachability, the node indicated by the optimal neighbor relationship is determined as the next hop node of the current node.
可选地,所述第一节点获取所述第一域内各个节点的一个或多个邻居关系,包括:Optionally, the acquiring, by the first node, one or more neighbor relationships of each node in the first domain includes:
在所述第一节点与所述报文中指示的下一跳节点之间的链路有故障的情况下,获取所述 第一域内各个节点的一个或多个邻居关系。In the case that the link between the first node and the next hop node indicated in the message is faulty, obtain one or more neighbor relationships of each node in the first domain.
第六方面,提供了一种通信网络中的边界节点,其特征在于,所述边界节点为第一域和第二域之间的边界节点,所述边界节点包括存储器和处理器;In a sixth aspect, a boundary node in a communication network is provided, wherein the boundary node is a boundary node between a first domain and a second domain, and the boundary node includes a memory and a processor;
所述存储器用于存储计算机程序;The memory is used to store a computer program;
所述处理器用于执行所述存储器中存储的计算机程序以执行下述转发报文的方法:The processor is configured to execute a computer program stored in the memory to execute the following method for forwarding messages:
确定邻居关系TLV,所述邻居关系TLV用于指示所述边界节点在第二域内的邻居关系;Determining a neighbor relationship TLV, where the neighbor relationship TLV is used to indicate the neighbor relationship of the border node in the second domain;
在所述第一域内发布所述邻居关系TLV。Publish the neighbor relationship TLV in the first domain.
可选地,在所述邻居关系TLV携带的的邻居标识指示一个虚拟邻居的情况下,所述邻居关系TLV包括虚拟邻居子TLV,所述虚拟邻居子TLV携带邻居标识和路径标签,所述虚拟邻居子TLV携带的邻居标识用于指示所述边界节点对应的虚拟邻居的标识,所述虚拟邻居子TLV携带的路径标签用于指示所述边界节点到达所述虚拟邻居的路径,所述边界节点达到所述虚拟邻居的路径是通过所述第二域内的链路资源构建的。Optionally, in the case that the neighbor identifier carried by the neighbor relationship TLV indicates a virtual neighbor, the neighbor relationship TLV includes a virtual neighbor sub-TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, and the virtual neighbor TLV The neighbor identifier carried by the neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the border node, and the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the border node to the virtual neighbor. The path to the virtual neighbor is constructed through link resources in the second domain.
可选地,在所述邻居关系TLV中携带的邻居标识与所述边界节点的标识相同的情况下,所述邻居关系TLV中携带的邻居标识指示一个虚拟邻居。Optionally, in the case that the neighbor identifier carried in the neighbor relationship TLV is the same as the identifier of the border node, the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
可选地,所述邻居关系TLV包括邻居子TLV,所述邻居子TLV用于指示所述边界节点到第三节点的邻居关系,所述第三节点为所述第一域或所述第二域中的节点。Optionally, the neighbor relationship TLV includes a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate a neighbor relationship from the border node to a third node, and the third node is the first domain or the second domain. Nodes in the domain.
第七方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面或第二方面任一所述的转发报文的方法。In a seventh aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute any one of the first or second aspects described above. The method of forwarding the message.
第八方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第二方面任一所述的转发报文的方法。In an eighth aspect, a computer program product containing instructions is provided, which when running on a computer, causes the computer to execute the method for forwarding a message as described in any one of the first or second aspects.
第九方面,提供了一种转发报文的系统,所述系统包括第一节点和第二节点,所述第一节点为第一域内的任一节点,所述第二节点为所述第一域和第二域之间的边界节点;In a ninth aspect, a system for forwarding packets is provided. The system includes a first node and a second node. The first node is any node in a first domain, and the second node is the first node. The boundary node between the domain and the second domain;
所述第二节点用于确定邻居关系TLV,所述邻居关系TLV用于指示所述边界节点在第二域内的邻居关系,在所述第一域内发布所述邻居关系TLV;The second node is used to determine a neighbor relationship TLV, and the neighbor relationship TLV is used to indicate the neighbor relationship of the border node in the second domain, and publish the neighbor relationship TLV in the first domain;
所述第一节点用于接收所述邻居关系TLV。The first node is used to receive the neighbor relationship TLV.
可选地,在所述邻居关系TLV携带的的邻居标识指示一个虚拟邻居的情况下,所述邻居关系TLV包括虚拟邻居子TLV,所述虚拟邻居子TLV携带邻居标识和路径标签,所述虚拟邻居子TLV携带的邻居标识用于指示所述边界节点对应的虚拟邻居的标识,所述虚拟邻居子TLV携带的路径标签用于指示所述边界节点到达所述虚拟邻居的路径,所述边界节点达到所述虚拟邻居的路径是通过所述第二域内的链路资源构建的。Optionally, in the case that the neighbor identifier carried by the neighbor relationship TLV indicates a virtual neighbor, the neighbor relationship TLV includes a virtual neighbor sub-TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, and the virtual neighbor TLV The neighbor identifier carried by the neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the border node, and the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the border node to the virtual neighbor. The path to the virtual neighbor is constructed through link resources in the second domain.
可选地,在所述邻居关系TLV中携带的邻居标识与所述边界节点的标识相同的情况下,所述邻居关系TLV中携带的邻居标识指示一个虚拟邻居。Optionally, in the case that the neighbor identifier carried in the neighbor relationship TLV is the same as the identifier of the border node, the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
可选地,所述邻居关系TLV包括邻居子TLV,所述邻居子TLV用于指示所述边界节点到第三节点的邻居关系,所述第三节点为所述第一域或所述第二域中的节点。Optionally, the neighbor relationship TLV includes a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate a neighbor relationship from the border node to a third node, and the third node is the first domain or the second domain. Nodes in the domain.
附图说明Description of the drawings
图1是本申请实施例提供的一种网络系统示意图;Fig. 1 is a schematic diagram of a network system provided by an embodiment of the present application;
图2是本申请实施例提供的另一种网络系统示意图;Figure 2 is a schematic diagram of another network system provided by an embodiment of the present application;
图3是本申请实施例提供的另一种网络系统的示意图;Figure 3 is a schematic diagram of another network system provided by an embodiment of the present application;
图4是本申请实施例提供的一种转发报文的方法流程图;FIG. 4 is a flowchart of a method for forwarding packets provided by an embodiment of the present application;
图5是本申请实施例提供的另一种转发报文的方法流程图;FIG. 5 is a flowchart of another method for forwarding messages provided by an embodiment of the present application;
图6是本申请实施例提供的一种TLV22的格式示意图;FIG. 6 is a schematic diagram of the format of a TLV22 provided by an embodiment of the present application;
图7是本申请实施例提供的一种虚拟邻居子TLV的格式示意图;FIG. 7 is a schematic diagram of the format of a virtual neighbor sub-TLV provided by an embodiment of the present application;
图8是本申请实施例提供的另一种转发报文的方法流程图;FIG. 8 is a flowchart of another method for forwarding packets provided by an embodiment of the present application;
图9是本申请实施例提供的一种邻居子TLV的格式示意图;FIG. 9 is a schematic diagram of the format of a neighbor sub-TLV provided by an embodiment of the present application;
图10是本申请实施例提供的一种第一节点的装置示意图;FIG. 10 is a schematic diagram of an apparatus of a first node provided by an embodiment of the present application;
图11是本申请实施例提供的一种边界节点的装置示意图;FIG. 11 is a schematic diagram of a boundary node device provided by an embodiment of the present application;
图12是本申请实施例提供的一种计算机设备的结构示意图。Fig. 12 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions, and advantages of the present application clearer, the implementation manners of the present application will be further described in detail below with reference to the accompanying drawings.
应当理解的是,本文提及的“多个”是指两个或两个以上。在本申请的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。It should be understood that the "plurality" mentioned herein refers to two or more. In the description of this application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in this document is only an association relationship describing associated objects, It means that there can be three kinds of relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone. In addition, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same function and effect. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not limit the difference.
在对本申请实施例提供的转发报文的方法进行解释说明之前,先对本申请实施例的应用场景进行解释说明。Before explaining the method for forwarding packets provided in the embodiment of the present application, the application scenario of the embodiment of the present application will be explained first.
图1是本申请实施例提供的一种网络系统示意图。如图1所示,该网络系统包括三个小区站点网关(cell site gateway,CSG),图1中分别标记为CSG1、CSG2、CSG3。其中,CSG也可以称为接入业务网关,是移动承载网络中的一种角色,该角色处于接入层,用于负责基站的接入。Fig. 1 is a schematic diagram of a network system provided by an embodiment of the present application. As shown in Figure 1, the network system includes three cell site gateways (CSG), which are marked as CSG1, CSG2, and CSG3 in Figure 1. Among them, the CSG can also be referred to as an access service gateway, which is a role in the mobile bearer network. This role is in the access layer and is responsible for the access of the base station.
该网络系统100还包括两个汇聚侧网关(aggregation site gateway,ASG),图1中分别标记为ASG1和ASG2。ASG也是移动承载网络中的一种角色,该角色位于汇聚层,用于负责对移动承载网络接入层的海量CSG业务流进行汇聚。The network system 100 also includes two aggregation site gateways (ASG), which are marked as ASG1 and ASG2 in FIG. 1 respectively. ASG is also a role in the mobile bearer network. This role is located at the convergence layer and is used to converge the massive CSG service flows in the access layer of the mobile bearer network.
该网络系统100还包括两个运营商设备(provider),图1中分别标记为P1和P2。该网络系统100还包括两个无线业务侧网关(radio service gateway,RSG),图1中分别标记为RSG1和RSG2。RSG也是移动承载网络中的一种角色,该角色处在汇聚层,用于连接无线控制器。The network system 100 also includes two operator devices (providers), which are respectively marked as P1 and P2 in FIG. 1. The network system 100 also includes two radio service gateways (RSG), which are marked as RSG1 and RSG2 in FIG. 1 respectively. RSG is also a role in the mobile bearer network. The role is at the convergence layer and is used to connect to the wireless controller.
如图1所示,CSG1分别与CSG2和CSG3之间通过有线或无线方式连接以进行通信。CSG2与ASG1之间通过有线或无线方式连接以进行通信。ASG1与P1之间通过有线或无线方式连接以进行通信。P1与RSG1之间通过有线或无线方式连接以进行通信。CSG3与ASG2之间通过有线或无线方式连接以进行通信。ASG2与P2之间通过有线或无线方式连接以进行通信。P2与RSG2之间通过有线或无线方式连接以进行通信。ASG1与ASG2之间通过有线或无线方式连接以进行通信。As shown in Figure 1, CSG1 is connected to CSG2 and CSG3 through wired or wireless connections for communication. CSG2 and ASG1 are connected by wire or wireless for communication. ASG1 and P1 are connected through a wired or wireless connection for communication. P1 and RSG1 are connected through a wired or wireless connection for communication. CSG3 and ASG2 are connected by wired or wireless for communication. ASG2 and P2 are connected through a wired or wireless connection for communication. P2 and RSG2 are connected through a wired or wireless connection for communication. ASG1 and ASG2 are connected through a wired or wireless connection for communication.
另外,如图1所示,三个CSG和两个ASG位于一个域,在图1中标记为域1。两个ASG、两个P1和两个RSG位于另一个域,在图1中标记为域2。在本申请实施例中,域可以为基于内部网关协议(Interior Gateway Protocol,IGP)划分的域,也即是,同一域内的节点基于同一IGP进行通信,不同的域内的节点基于不同的IGP进行通信。In addition, as shown in Fig. 1, three CSGs and two ASGs are located in one domain, which is marked as domain 1 in Fig. 1. Two ASGs, two P1s, and two RSGs are located in another domain, which is marked as domain 2 in Figure 1. In the embodiments of this application, the domain may be a domain divided based on the Interior Gateway Protocol (IGP), that is, nodes in the same domain communicate based on the same IGP, and nodes in different domains communicate based on different IGPs .
图1所示的网络系统应用于通过尽力而为的分段路由(Segment Routing-Best Effort,SR-BE)技术来确定路径的场景中。在这种场景下,假设ASG1和ASG2之间的链路发生故障,P1到RSG1之间的链路也发生了故障,此时,当P1接收到报文时,如果报文的目的节点为RSG1,由于P1只能基于域2内的节点来确定备份路径,但是显然在域2内没有可选的备份路径来传输该报文,此时将导致该报文传输失败。本申请实施例提供的转发报文的方法就可以在这种场景下获取一条可选的路径用于转发报文。The network system shown in FIG. 1 is applied to a scenario where a route is determined by segment routing (Segment Routing-Best Effort, SR-BE) technology. In this scenario, suppose that the link between ASG1 and ASG2 fails, and the link between P1 and RSG1 also fails. At this time, when P1 receives a message, if the destination node of the message is RSG1 Since P1 can only determine the backup path based on the nodes in domain 2, but obviously there is no optional backup path in domain 2 to transmit the message, this will cause the message transmission to fail. The method for forwarding messages provided in the embodiments of the present application can obtain an optional path for forwarding messages in this scenario.
需要说明的是,图1所示的网络系统中的各个节点之间的布局仅仅用于举例说明,图1中的CSG、ASG以及RSG的数量也仅仅用于举例说明,并不构成对本申请的限定。It should be noted that the layout of each node in the network system shown in FIG. 1 is only used for illustration, and the numbers of CSG, ASG, and RSG in FIG. 1 are only used for illustration, and do not constitute an impact on this application. limited.
图2是本申请实施例提供的另一种网络系统示意图。如图2所示,该网络系统包括一个CSG、一个ASG以及一个RSG。其中,CSG与ASG位于同一域内,图2中标记为域1。ASG和RSG位于另一域内,图2中标记为域2。Fig. 2 is a schematic diagram of another network system provided by an embodiment of the present application. As shown in Figure 2, the network system includes a CSG, an ASG, and an RSG. Among them, CSG and ASG are located in the same domain, which is marked as domain 1 in Figure 2. ASG and RSG are located in another domain, marked as domain 2 in Figure 2.
当图2所示的网络系统通过分段路由流程工程(Segment Routing Traffic Engineering,SR-TE)技术转发报文时,此时,CSG可以建立到ASG之间的TE隧道,用于将报文从CSG转发至ASG。ASG也可以建立到RSG之间的TE隧道,用于将报文从ASG转发至RSG。但是由于CSG和RSG没有位于同一域内,因此,CSG不能直接建立到RSG的TE隧道,需要通过粘连标签的方式将CSG到ASG的隧道以及ASG到RSG之间的隧道粘连起来,以建立跨域的TE隧道,用于转发报文。When the network system shown in Figure 2 forwards packets through the Segment Routing Traffic Engineering (SR-TE) technology, at this time, the CSG can establish a TE tunnel between the ASG to transfer the packets from CSG is forwarded to ASG. The ASG can also establish a TE tunnel to the RSG, which is used to forward packets from the ASG to the RSG. However, since CSG and RSG are not located in the same domain, CSG cannot directly establish TE tunnels to RSG. It is necessary to glue the tunnels from CSG to ASG and the tunnels between ASG to RSG by sticking labels to establish a cross-domain connection. TE tunnel, used to forward packets.
图3是本申请实施例提供的另一种网络系统的示意图。如图3所示,该网络系统包括节点R1、节点R2、节点R3、节点R4、节点R5。点R1、节点R2、节点R3位于一个域内,图3中标记为域1。节点R2、节点R3、节点R4、节点R5位于另一个域内,图3中标记为域2。各个节点之间的网络连接关系如图3所示,在此不再一一解释说明。Fig. 3 is a schematic diagram of another network system provided by an embodiment of the present application. As shown in Fig. 3, the network system includes node R1, node R2, node R3, node R4, and node R5. The point R1, the node R2, and the node R3 are located in a domain, which is marked as domain 1 in Fig. 3. Node R2, node R3, node R4, and node R5 are located in another domain, which is marked as domain 2 in FIG. 3. The network connection relationship between the various nodes is shown in Figure 3, which will not be explained one by one here.
如图3所示,预先在每个域内建立各个节点之间的TE隧道,并将建立的TE隧道与隧道标签绑定起来。如图3所示,在节点R1与节点R2之间建立SR-TE隧道,绑定的隧道标签为1,在节点R2与节点R4之间建立SR-TE隧道,绑定的隧道标签为2。As shown in Figure 3, a TE tunnel between each node is established in each domain in advance, and the established TE tunnel is bound with the tunnel label. As shown in Figure 3, an SR-TE tunnel is established between node R1 and node R2, and the bound tunnel label is 1, and an SR-TE tunnel is established between node R2 and node R4, and the bound tunnel label is 2.
当需要创建跨域的TE隧道时,可以通过指定显示路径的方式创建跨域的TE隧道。显式路径是指在每个域的入口节点处指明报文沿途经过该域内的各个单段隧道的隧道标签,并在显示路径中添加一个与该域内的出口节点对应的粘连标签,在出口节点处预先配置有该粘连标签与其他域内的一个或多个隧道标签的对应关系,用于指示该出口节点在接收到报文时, 将报文中的粘连标签替换为对应的一个或多个隧道标签,以实现报文在其他域内的继续转发。比如,在R1节点处部署的显示路径为隧道标签1和粘连标签,其中,预先配置粘连标签与隧道标签2之间的映射关系,如此,当R2接收到报文之后,可直接将粘连标签替换为隧道标签2,从而实现通过隧道标签2所指示的隧道继续在域2内转发该报文。When you need to create a cross-domain TE tunnel, you can create a cross-domain TE tunnel by specifying the displayed path. The explicit path refers to the tunnel label that indicates at the ingress node of each domain that the packet passes through each single-segment tunnel in the domain along the way, and adds a sticky label corresponding to the egress node in the domain to the displayed path. The corresponding relationship between the sticky label and one or more tunnel labels in other domains is pre-configured at the location, which is used to instruct the egress node to replace the sticky label in the message with the corresponding one or more tunnels when receiving the message Labels to realize the continued forwarding of messages in other domains. For example, the displayed path deployed at node R1 is tunnel label 1 and adhesive label, where the mapping relationship between adhesive label and tunnel label 2 is pre-configured, so that when R2 receives the message, it can directly replace the adhesive label It is tunnel label 2, so that the packet is forwarded in domain 2 through the tunnel indicated by tunnel label 2.
但是,这种方式需要一开始就在网络入口,比如图3中的R1处,配置包括粘连标签的显示路径,用于指示报文的转发路径。这种路径的配置方式属于静态方式,对于网络中的节点,如果该节点与下一跳节点之间出现故障,由于无法动态临时确定备份路径,此时仍然无法保证报文的转发成功。另外,在图3所示的网络系统中,如果节点R4故障,R1无法感知到R2与R4之间的TE隧道已经下线(down)了,但是R1与R2之间的TE隧道仍然正常运行,此时后续报文会继续转发到节点R2并被丢弃,这样就形成了转发黑洞。而本申请实施例提供的转发报文的方法就可以动态建立跨域的TE隧道。However, this method needs to configure the display path including the sticky label at the network entrance, such as R1 in Figure 3, to indicate the forwarding path of the message. This path configuration method is static. For a node in the network, if there is a failure between the node and the next hop node, because the backup path cannot be determined dynamically and temporarily, the successful forwarding of the message cannot be guaranteed at this time. In addition, in the network system shown in Figure 3, if node R4 fails, R1 cannot perceive that the TE tunnel between R2 and R4 is down, but the TE tunnel between R1 and R2 is still operating normally. At this time, subsequent packets will continue to be forwarded to node R2 and be discarded, thus forming a forwarding black hole. However, the method for forwarding packets provided in the embodiment of the present application can dynamically establish a cross-domain TE tunnel.
需要说明的是,图2或图3所示的网络系统中的各个节点之间的布局仅仅用于举例说明,图2中的CSG、ASG以及RSG的数量也仅仅用于举例说明,并不构成对本申请的限定。It should be noted that the layout of each node in the network system shown in Figure 2 or Figure 3 is only used for illustration, and the numbers of CSG, ASG, and RSG in Figure 2 are only used for illustration and do not constitute Limitations on this application.
图4是本申请实施例提供的一种转发报文的方法流程图,应用于图1至图3所示的网路系统中的任一节点,如图4所示,该方法包括如下步骤:FIG. 4 is a flowchart of a method for forwarding packets provided by an embodiment of the present application, which is applied to any node in the network system shown in FIG. 1 to FIG. 3. As shown in FIG. 4, the method includes the following steps:
步骤401:第一节点接收报文,第一节点为第一域内的任一节点,第一域为网络中的多个域中的任一域。Step 401: The first node receives the message, the first node is any node in the first domain, and the first domain is any domain among multiple domains in the network.
其中,第一域为图1至图3所示的网络系统中的任一域,第一节点可以为第一域内的任一节点。The first domain is any domain in the network system shown in FIG. 1 to FIG. 3, and the first node may be any node in the first domain.
在图1至图3所示的网络系统中,为了提高节点转发报文的效率,可以预先通过SR技术在网络入口处部署报文的转发路径,以便于后续各个节点在接收到报文之后,直接按照预先部署的转发路径转发给报文。因此,第一节点在接收到待转发的报文时,可以按照预先部署的转发路径确定报文的下一跳节点,然后将该报文转发给确定的下一跳节点。In the network system shown in Figures 1 to 3, in order to improve the efficiency of node forwarding messages, the forwarding path of the message can be deployed at the entrance of the network through the SR technology in advance, so that subsequent nodes will receive the message after receiving the message. Directly forward to the message according to the pre-deployed forwarding path. Therefore, when the first node receives the message to be forwarded, it can determine the next hop node of the message according to the pre-deployed forwarding path, and then forward the message to the determined next hop node.
第一节点在将该报文转发给确定的下一跳节点之后,如果第一节点与下一跳节点之间的链路发生故障,第一节点将无法将该报文成功转发至下一跳节点。此时,为了能够继续实现报文的转发,在本申请实施例中,第一节点可以通过下述步骤402和503重新确定该报文的转发路径。After the first node forwards the message to the determined next hop node, if the link between the first node and the next hop node fails, the first node will not be able to successfully forward the message to the next hop node. At this time, in order to continue to realize the forwarding of the message, in this embodiment of the present application, the first node may re-determine the forwarding path of the message through the following steps 402 and 503.
步骤402:第一节点获取第一域内各个节点的一个或多个邻居关系,第一域内的边界节点的一个或多个邻居关系包括边界节点在第二域内的邻居关系,第二域为除第一域之外的域。Step 402: The first node obtains one or more neighbor relations of each node in the first domain. The one or more neighbor relations of the border nodes in the first domain include the neighbor relations of the border nodes in the second domain. A domain outside of a domain.
在图1至图3任一所示的网络系统中,任意两个节点之间具有邻居关系时,这两个节点之间才可转发报文,因此,为了重新确定报文的转发路径,第一节点需要获取第一域内每个节点的邻居关系,以便于通过下述步骤402重新确定转发路径。In the network system shown in any one of Figures 1 to 3, when there is a neighbor relationship between any two nodes, messages can be forwarded between these two nodes. Therefore, in order to re-determine the forwarding path of the message, the first A node needs to obtain the neighbor relationship of each node in the first domain, so as to re-determine the forwarding path through the following step 402.
在本申请实施例中,为了能够实现某个域内的节点能够跨域确定转发路径,第一节点获取的第一域内的边界节点的一个或多个邻居关系中包括边界节点在第二域内的邻居关系,第二域为除第一域之外的域,如此,第一节点便可结合第二域内的节点来确定转发路径,避免了在当前所在域内没有备份路径时报文无法转发的问题。In the embodiments of the present application, in order to enable nodes in a certain domain to determine the forwarding path across domains, the one or more neighbor relationships of the border nodes in the first domain acquired by the first node include the neighbors of the border node in the second domain. The second domain is a domain other than the first domain. In this way, the first node can determine the forwarding path in conjunction with the nodes in the second domain, avoiding the problem that packets cannot be forwarded when there is no backup path in the current domain.
其中,第一域内的边界节点可以预先获取自身在第二域内的邻居关系,然后将自身在第二域内的邻居关系通过邻居关系TLV在第一域内发布,如此,第一域内的节点便可获悉到第 一域内的边界节点在第二域内的邻居关系。第一域内的边界节点在第一域内发布自身在第二域内的邻居关系将在下述实施例中详细说明,在此先不展开阐述。Among them, the border node in the first domain can obtain its neighbor relationship in the second domain in advance, and then publish its neighbor relationship in the second domain through the neighbor relationship TLV in the first domain, so that the nodes in the first domain can learn Neighbor relationship to border nodes in the first domain in the second domain. The border node in the first domain advertises its neighbor relationship in the second domain in the first domain, which will be described in detail in the following embodiments, and will not be elaborated here.
步骤403:第一节点根据第一域内各个节点的一个或多个邻居关系,确定报文的转发路径,按照确定的转发路径转发报文。Step 403: The first node determines the forwarding path of the message according to one or more neighbor relationships of each node in the first domain, and forwards the message according to the determined forwarding path.
第一节点在确定出第一域内的各个节点的邻居关系之后,便可根据第一域内每个节点的邻居关系,确定报文的转发路径。后续将根据不同的场景对步骤403展开详细解释,在此就先不阐述。After determining the neighbor relationship of each node in the first domain, the first node can determine the forwarding path of the message according to the neighbor relationship of each node in the first domain. Step 403 will be explained in detail according to different scenarios later, and will not be explained here.
在本申请实施例中,为了能够实现某个域内的节点能够跨域确定转发路径,第一节点获取的第一域内的边界节点的邻居关系包括边界节点在第二域内的邻居关系,第二域为除第一域之外的域,如此,第一节点便可结合第二域内的节点来确定转发路径,避免了在当前所在域内没有备份路径时报文无法转发的问题。In the embodiments of the present application, in order to enable nodes in a certain domain to determine the forwarding path across domains, the neighbor relationship of the border node in the first domain acquired by the first node includes the neighbor relationship of the border node in the second domain, and the second domain For domains other than the first domain, in this way, the first node can determine the forwarding path in conjunction with the nodes in the second domain, which avoids the problem that packets cannot be forwarded when there is no backup path in the current domain.
图4所示的实施例可以应用于在第一节点与下一跳节点之间的链路发生故障,第一节点无法将该报文成功转发至下一跳节点的场景中,还可以应用到第一节点建立跨域的TE隧道的场景中,下述图5和图8所示的实施例分别用于对这两个场景下的报文转发过程进行详细解释说明。The embodiment shown in FIG. 4 can be applied to the scenario where the link between the first node and the next hop node fails, and the first node cannot successfully forward the message to the next hop node, and can also be applied to In the scenario where the first node establishes a cross-domain TE tunnel, the following embodiments shown in FIG. 5 and FIG. 8 are respectively used to explain in detail the message forwarding process in these two scenarios.
另外,本申请实施例提供的转发报文的方法可以应用于SR-BE技术,也可以应用于SR-TE技术,当然,还可以应用通过其他技术转发报文的场景中,对此不做具体限定。下述实施例分别以SR-BE场景和SR-TE场景为例来说明本申请实施例提供的转发报文的方法。当本申请实施例提供的报文转发方法应用于通过其他技术转发报文的场景时,同样可以参考下述实施例实现本申请实施例提供的报文转发方法。In addition, the method for forwarding messages provided in the embodiments of the present application can be applied to SR-BE technology, and can also be applied to SR-TE technology. Of course, it can also be applied to scenarios where messages are forwarded through other technologies. limited. The following embodiments respectively take the SR-BE scenario and the SR-TE scenario as examples to illustrate the method for forwarding packets provided in the embodiments of the present application. When the message forwarding method provided in the embodiment of the present application is applied to a scenario where a message is forwarded through other technologies, the following embodiments may also be referred to to implement the message forwarding method provided in the embodiment of the present application.
图5是本申请实施例提供的另一种转发报文的方法流程图,应用于图1至图3所示的网络系统中的任一节点,也即是,可以以应用于SR-BE技术,也可以应用于SR-TE技术,当然,还可以应用通过其他技术转发报文的场景中。在本申请实施例中,可以通过虚拟邻居的方式来指示第一域内的边界节点在第二域内的邻居关系,虚拟邻居是指第一节点通过第二域内的邻居关系建立的邻居,如此当第一节点与下一跳节点之间的链路出现故障时,便可根据该虚拟邻居确定其他可行的备份路径。下面对该实现方式进行详细解释说明。如图5所示,该方法包括如下步骤:FIG. 5 is a flowchart of another method for forwarding packets provided by an embodiment of the present application, which is applied to any node in the network system shown in FIG. 1 to FIG. 3, that is, it can be applied to SR-BE technology , Can also be applied to SR-TE technology, of course, it can also be applied to scenarios where messages are forwarded through other technologies. In the embodiments of the present application, the neighbor relationship of border nodes in the first domain in the second domain can be indicated by means of virtual neighbors. The virtual neighbor refers to the neighbor established by the first node through the neighbor relationship in the second domain. When the link between a node and the next-hop node fails, other feasible backup paths can be determined according to the virtual neighbor. The implementation will be explained in detail below. As shown in Figure 5, the method includes the following steps:
步骤501:第一节点接收报文,第一节点为第一域内的任一节点,第一域为网络中的多个域中的任一域。Step 501: The first node receives the message, the first node is any node in the first domain, and the first domain is any domain among multiple domains in the network.
步骤501的实现方式可以参考图4所示的实施例中的步骤401的实现方式,在此就不再赘述。For the implementation of step 501, reference may be made to the implementation of step 401 in the embodiment shown in FIG. 4, which will not be repeated here.
对于网络系统中的任一节点,该节点可以预先通过邻居关系TLV在当前所在域内发布自身的邻居关系。该邻居关系TLV可以为类型-长度-值(tag-length-value,TLV)TLV22。在本申请实施例中,为了能够实现通过虚拟邻居的方式来指示第一域内的边界节点在第二域内的邻居关系,对邻居关系TLV进行了修改,下面以TLV22为例解释说明对邻居关系TLV进行了哪些修改,其他类型的邻居关系TLV均可以参考TLV22进行修改,以实现本申请实施例提供的报文转发方法。For any node in the network system, the node can pre-publish its neighbor relationship in the current domain through the neighbor relationship TLV. The neighbor relationship TLV may be a type-length-value (tag-length-value, TLV) TLV22. In the embodiments of the present application, in order to be able to indicate the neighbor relationship of border nodes in the first domain in the second domain through virtual neighbors, the neighbor relationship TLV is modified. The following uses TLV22 as an example to explain the neighbor relationship TLV What modifications have been made, other types of neighbor relationship TLVs can be modified with reference to TLV22 to implement the message forwarding method provided in the embodiments of the present application.
图6是本申请实施例提供的一种TLV22的格式示意图。如图6所示,该TLV22包括TLV 类型(TLV Type)、TLV长度(TLV Length)、邻居标识(Neighbour ID)、代价值(Metric)、子TLV长度(SubTLV Length)以及预留的可选子TLV(Optional SubTLV)等字段。FIG. 6 is a schematic diagram of the format of a TLV22 provided by an embodiment of the present application. As shown in Figure 6, the TLV 22 includes TLV Type (TLV Type), TLV Length (TLV Length), Neighbour ID (Neighbour ID), Cost Value (Metric), SubTLV Length (SubTLV Length), and reserved optional subtypes. TLV (Optional SubTLV) and other fields.
邻居标识用于指示与该节点存在邻居关系的节点。在本申请实施例中,可以通过邻居标识来指示邻居是虚拟邻居还是当前所在域内的正常邻居。在一种可能的实现方式中,对于任一节点,如果该节点发布的TLV22中的邻居关系为虚拟邻居关系,可以将邻居标识设置为自身的标识,并从预留的可选子TLV中选择一个子TLV来携带虚拟邻居的相关信息。为了后续便于说明,将用于携带虚拟邻居的相关信息的子TLV称为虚拟邻居子TLV,或者SR虚拟邻居子TLV(SR Virtual-Adj SID sub TLV)。The neighbor identifier is used to indicate the node that has a neighbor relationship with the node. In the embodiment of the present application, the neighbor identifier can be used to indicate whether the neighbor is a virtual neighbor or a normal neighbor in the current domain. In a possible implementation manner, for any node, if the neighbor relationship in the TLV22 published by the node is a virtual neighbor relationship, the neighbor identifier can be set as its own identifier and selected from the reserved optional sub-TLVs A sub-TLV carries information about virtual neighbors. For the convenience of subsequent description, the sub-TLV used to carry the related information of the virtual neighbor is referred to as the virtual neighbor sub-TLV, or SR virtual-adjacent sub-TLV (SR Virtual-Adj SID sub TLV).
如果该节点发布的TLV22中的邻居关系为正常的邻居关系,则可以直接将邻居标识设置为与该节点存在邻居关系的其他节点的标识,并通过代价值字段来指示该邻居关系的路由开销。If the neighbor relationship in the TLV 22 issued by the node is a normal neighbor relationship, the neighbor identifier can be directly set to the identifier of other nodes that have a neighbor relationship with the node, and the cost value field is used to indicate the routing cost of the neighbor relationship.
也即是,在本申请实施例中,可以通过节点发布的TLV22中的邻居标识是否是该节点自身来确定TLV22中指示的邻居是虚拟邻居还是所在域内的正常邻居。That is, in the embodiment of the present application, whether the neighbor indicated in the TLV 22 is a virtual neighbor or a normal neighbor in the domain can be determined by whether the neighbor identifier in the TLV 22 issued by the node is the node itself.
需要说明的是,还可以通过其它方式指示当前的邻居是虚拟邻居还是所在域内的正常邻居。比如,可以将邻居标识设置为特定数值假设为0时用于指示当前的邻居为虚拟邻居。或者,通过TLV22中的其他字段来指示当前的邻居是虚拟邻居还是所在域内的正常邻居,本申请实施例对此不做具体限定。It should be noted that, other methods may also be used to indicate whether the current neighbor is a virtual neighbor or a normal neighbor in the domain. For example, the neighbor identifier can be set to a specific value, assuming 0 to indicate that the current neighbor is a virtual neighbor. Alternatively, other fields in the TLV 22 are used to indicate whether the current neighbor is a virtual neighbor or a normal neighbor in the domain, which is not specifically limited in the embodiment of the present application.
图7是本申请实施例提供的一种虚拟邻居子TLV的格式示意图。如图7所示,该虚拟邻居子TLV包括类型(Type)、长度(Length)、控制位(Flags)、权重(Weight)、绑定的路径标签的段标识(Binding SID)以及邻居标识(Neighbor SID)等字段。FIG. 7 is a schematic diagram of the format of a virtual neighbor sub-TLV provided by an embodiment of the present application. As shown in Figure 7, the virtual neighbor sub-TLV includes type (Type), length (Length), control bits (Flags), weight (Weight), bound path label segment identifier (Binding SID), and neighbor identifier (Neighbor SID) and other fields.
其中,对于任一节点,该节点发布的TLV22中的虚拟邻居子TLV中的邻居标识用于指示任一节点对应的虚拟邻居的标识,虚拟邻居子TLV中的绑定的路径标签的段标识用于指示任一节点通过第二域到达虚拟邻居的路径。Among them, for any node, the neighbor identifier in the virtual neighbor sub-TLV in TLV22 issued by the node is used to indicate the identifier of the virtual neighbor corresponding to any node, and the segment identifier of the bound path label in the virtual neighbor sub-TLV is used as To indicate the path of any node to the virtual neighbor through the second domain.
由于本申请实施例提供的转发报文的方法可以应用于通过SR-BE技术确定转发报文的场景中,也可以应用于通过SR-TE技术转发报文的场景中,而不同的场景中第一节点通过第二域达到虚拟邻居的路径的方式不同。因此,为了便于第一节点后续能够快速确定该虚拟邻居子TLV携带的路径标签能够用于确定转发路径,还可以在虚拟邻居子TLV中配置虚拟邻居功能指示信息,通过该虚拟邻居功能指示信息来指示该虚拟邻居子TLV携带的路径标签适用于哪种场景。Since the method for forwarding messages provided by the embodiments of the present application can be applied to the scenario where the forwarding message is determined by the SR-BE technology, it can also be applied to the scenario where the message is forwarded through the SR-TE technology, and the first in different scenarios The way for a node to reach the virtual neighbor through the second domain is different. Therefore, in order for the first node to quickly determine that the path label carried by the virtual neighbor sub-TLV can be used to determine the forwarding path, the virtual neighbor function indication information can also be configured in the virtual neighbor sub-TLV, and the virtual neighbor function indication information can be used to determine Indicate which scenario the path label carried by the virtual neighbor sub-TLV is applicable to.
在一种可能的实现方式中,该虚拟邻居功能指示信息携带在虚拟邻居子TLV的控制位字段中。如图7所示,可以将虚拟邻居子TLV中的控制位的第一个比特位(0比特位)和第二个比特位(1比特位)标记为R比特位和T比特位,通过这两个比特位来配置虚拟邻居功能指示信息。具体地,如果R比特位置位,则表明虚拟邻居子TLV携带的路径标签用于基于SR-BE技术转发报文的场景中。如果T比特位置位,则表明虚拟邻居子TLV携带的路径标签用于基于SR-TE技术转发报文的场景中。因此,第一节点在发布TLV22时,可以根据上述配置设置R比特位和T比特位上的比特值,以实现通过控制位来指示该虚拟邻居子TLV携带的路径标签适用于哪种场景。In a possible implementation manner, the virtual neighbor function indication information is carried in the control bit field of the virtual neighbor sub-TLV. As shown in Figure 7, the first bit (0 bit) and the second bit (1 bit) of the control bit in the virtual neighbor sub-TLV can be marked as R bit and T bit. Two bits are used to configure the virtual neighbor function indication information. Specifically, if the R bit is set, it indicates that the path label carried by the virtual neighbor sub-TLV is used in the scenario of forwarding packets based on the SR-BE technology. If the T bit is set, it indicates that the path label carried by the virtual neighbor sub-TLV is used in the scenario of forwarding packets based on the SR-TE technology. Therefore, when the first node publishes the TLV 22, the bit values on the R bit and the T bit can be set according to the above configuration, so that the control bit is used to indicate to which scenario the path label carried by the virtual neighbor sub-TLV is applicable.
需要说明的是,也可以通过控制位的其他比特位来配置虚拟邻居功能指示信息。或者,也可以通过虚拟邻居子TLV中的其他字段来配置虚拟邻居功能指示信息。本申请实施例对此 不做具体限定。It should be noted that the virtual neighbor function indication information can also be configured through other bits of the control bit. Alternatively, the virtual neighbor function indication information can also be configured through other fields in the virtual neighbor sub-TLV. The embodiments of this application do not specifically limit this.
在对邻居关系TLV进行上述扩展之后,对于任一的第一域,第一域内的边界节点便可预先确定自身在第二域内的邻居关系,然后通过邻居关系TLV在第一域内的发布该邻居关系,以实现第一域的其他节点能够获知边界节点在第二域内的邻居关系。After the aforementioned extension of the neighbor relationship TLV, for any first domain, the border node in the first domain can predetermine its neighbor relationship in the second domain, and then advertise the neighbor in the first domain through the neighbor relationship TLV Relationship, so that other nodes in the first domain can learn the neighbor relationship of the border node in the second domain.
比如,对于图1所示的网络系统,假设步骤501中的第一域为图1中的域2,第二域为图1中的域1。第二域(也即是域1)内的边界节点ASG1,该边界节点ASG1可以先通过第二域内的相关资源,比如链路状态数据库(Link State Database,LSDB),确定到ASG2的路径为ASG1→CSG2→CSG1→CSG3→ASG2,然后根据确定的路径生成TLV22。并在第一域(也即是域2)内发布该TLV22。其中,发布的TLV22中的邻居标识即为节点ASG1的标识,此时,表明TLV22用于发布ASG1的一个虚拟邻居。其中,TLV22中的虚拟邻居子TLV中携带的邻居标识为ASG2,虚拟邻居子TLV中携带的路径标签用于指示的路径为:ASG1→CSG2→CSG1→CSG3→ASG2。显然,节点ASG1和节点ASG2之间的邻居关系是通过第二域内的节点构建的,因此,第一域内的节点P1可以将节点ASG2作为节点ASG1的虚拟邻居。For example, for the network system shown in FIG. 1, it is assumed that the first domain in step 501 is domain 2 in FIG. 1, and the second domain is domain 1 in FIG. 1. The boundary node ASG1 in the second domain (that is, domain 1), the boundary node ASG1 can first determine the path to ASG2 through related resources in the second domain, such as Link State Database (LSDB), as ASG1 →CSG2→CSG1→CSG3→ASG2, and then generate TLV22 according to the determined path. And publish the TLV22 in the first domain (that is, domain 2). Among them, the neighbor identifier in the published TLV22 is the identifier of the node ASG1. At this time, it indicates that the TLV22 is used to publish a virtual neighbor of ASG1. Among them, the neighbor identifier carried in the virtual neighbor sub-TLV in TLV22 is ASG2, and the path label carried in the virtual neighbor sub-TLV is used to indicate the path: ASG1→CSG2→CSG1→CSG3→ASG2. Obviously, the neighbor relationship between the node ASG1 and the node ASG2 is constructed by the nodes in the second domain. Therefore, the node P1 in the first domain can use the node ASG2 as the virtual neighbor of the node ASG1.
又比如,对于图2所示的网络系统,假设步骤501中的第一域为图1中的域1,第二域为图1中的域2。对于第二域(也即是域2)内的节点ASG,可以先通过第二域(也即是域2)内的相关资源,比如LSDB,确定到RSG的路径为ASG→RSG,此时确定的路径为一条TE隧道。然后根据确定的路径生成TLV22。并在第一域(也即是域1)内发布该TLV22。其中,发布的TLV22中的邻居标识即为节点ASG的标识,此时,表明TLV22用于发布ASG的一个虚拟邻居。其中,TLV22中的虚拟邻居子TLV中携带的邻居标识为RSG,虚拟邻居子TLV中携带的路径标签用于指示的路径为:ASG→RSG。显然,节点ASG和节点RSG之间的邻居关系是通过第二域(也即是域2)内的TE隧道构建的,因此,第一域内的节点CSG可以将节点RSG作为节点ASG的虚拟邻居。For another example, for the network system shown in FIG. 2, it is assumed that the first domain in step 501 is domain 1 in FIG. 1, and the second domain is domain 2 in FIG. 1. For the node ASG in the second domain (that is, domain 2), you can first use related resources in the second domain (that is, domain 2), such as LSDB, to determine that the path to RSG is ASG→RSG, and then determine The path is a TE tunnel. Then generate TLV22 according to the determined path. And publish the TLV22 in the first domain (that is, domain 1). Among them, the neighbor identifier in the published TLV22 is the identifier of the node ASG. At this time, it indicates that the TLV22 is used to publish a virtual neighbor of the ASG. Among them, the neighbor identifier carried in the virtual neighbor sub-TLV in TLV22 is RSG, and the path label carried in the virtual neighbor sub-TLV is used to indicate the path: ASG→RSG. Obviously, the neighbor relationship between the node ASG and the node RSG is constructed through the TE tunnel in the second domain (that is, domain 2). Therefore, the node CSG in the first domain can use the node RSG as the virtual neighbor of the node ASG.
基于上述对邻居关系TLV的修改,第一节点便可通过下述步骤502至步骤504来获取第一域内的各个节点的邻居关系。Based on the foregoing modification to the neighbor relationship TLV, the first node can obtain the neighbor relationship of each node in the first domain through the following steps 502 to 504.
另外,如图7所示,当虚拟邻居子TLV中的控制位中的T比特位置位时,也即是,当虚拟邻居子TLV携带的路径标签用于基于SR-TE技术转发报文的场景时,虚拟邻居子TLV中还可以包括邻居的标签交换路由器的标识(Neighbor Label Switched Router Identification,Neighbor LSR-ID)字段。该邻居的标签交换路由器的标识字段用于标识该虚拟邻居的IP,在基于SR-TE技术转发报文的场景中,需要确定该虚邻居的Neighbor LSR-ID,然后判断该虚拟邻居的Neighbor LSR-ID是否是隧道的目的IP,如果是,表明该虚拟邻居即为报文的目的节点,此时便可则停止执行继定该虚拟邻居的下一跳节点的操作,也即是停止确定路径。In addition, as shown in Figure 7, when the T bit in the control bit in the virtual neighbor sub-TLV is set, that is, when the path label carried by the virtual neighbor sub-TLV is used in the scenario of forwarding packets based on the SR-TE technology At this time, the virtual neighbor sub-TLV may also include the Neighbor Label Switched Router Identification (Neighbor LSR-ID) field. The identification field of the label switching router of the neighbor is used to identify the IP of the virtual neighbor. In the scenario of forwarding packets based on SR-TE technology, the Neighbor LSR-ID of the virtual neighbor needs to be determined, and then the Neighbor LSR of the virtual neighbor must be determined. -Whether the ID is the destination IP of the tunnel, if it is, it indicates that the virtual neighbor is the destination node of the message, and then it can stop executing the operation of setting the next hop node of the virtual neighbor, that is, stop determining the path .
步骤502:在第一节点与该报文中指示的下一跳节点之间的链路出现故障的情况下,对于第一域内的各个节点中的第二节点,从第二节点的一个或多个邻居关系TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居标识,第二节点为各个节点中的任一节点。Step 502: In the case that the link between the first node and the next-hop node indicated in the message fails, for the second node among the nodes in the first domain, from one or more of the second nodes One neighbor relationship TLV is selected from among the neighbor relationship TLVs, and the neighbor identifier in the selected neighbor relationship TLV is obtained, and the second node is any one of the nodes.
在SRv6技术中,报文的报文头已经部署有路由策略,用于指示报文经过的各个节点。因此,当第一节点接收到该报文时,便可从该报文的报文头中确定下一跳节点,然后将该报文转发至该报文中指示的下一跳节点。在第一节点与该报文中指示的下一跳节点之间的链路出现故障的情况下,第一节点便可通过步骤502至步骤505确定一条备份路径,以保证该报 文能够成功转发至目的节点。In the SRv6 technology, a routing policy has been deployed in the header of the message to indicate each node through which the message passes. Therefore, when the first node receives the message, it can determine the next hop node from the header of the message, and then forward the message to the next hop node indicated in the message. In the event that the link between the first node and the next-hop node indicated in the message fails, the first node can determine a backup path through steps 502 to 505 to ensure that the message can be successfully forwarded To the destination node.
基于步骤501可知,由于邻居关系TLV中的邻居标识可以用于指示当前的邻居是虚拟邻居还是所在域内的正常节点,因此,对于第一域内的任一节点,当第一节点需要获取该节点的邻居关系时,第一节点需先获取该节点发布的邻居关系TLV中的邻居标识。Based on step 501, since the neighbor identifier in the neighbor relationship TLV can be used to indicate whether the current neighbor is a virtual neighbor or a normal node in the domain, for any node in the first domain, when the first node needs to obtain the node's In the case of a neighbor relationship, the first node needs to first obtain the neighbor identifier in the neighbor relationship TLV issued by the node.
此外,由于同一节点预先可能发布有多个邻居关系TLV,也即是,对于第二节点,可能存在多个邻居关系TLV,因此,需要从第二节点的一个或多个邻居关系TLV中选择一个邻居关系TLV,然后获取选择的邻居关系TLV中的邻居标识,以便于通过下述步骤503和步骤504确定当前选择的邻居关系TLV中指示的邻居关系。对于第二节点的其他邻居关系TLV均可参考前述方式确定邻居关系。In addition, since the same node may pre-publish multiple neighbor relationship TLVs, that is, for the second node, there may be multiple neighbor relationship TLVs. Therefore, one needs to be selected from one or more neighbor relationship TLVs of the second node. The neighbor relationship TLV is then obtained, and the neighbor identifier in the selected neighbor relationship TLV is obtained, so as to determine the neighbor relationship indicated in the currently selected neighbor relationship TLV through the following steps 503 and 504. For other neighbor relationship TLVs of the second node, the neighbor relationship can be determined by referring to the foregoing manner.
步骤503:在选择的邻居关系TLV中携带的邻居标识指示一个虚拟邻居的情况下,从选择的邻居关系TLV中获取虚拟邻居子TLV,根据虚拟邻居子TLV携带的邻居标识和路径标签确定第二节点的一个邻居关系。Step 503: In the case that the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor, the virtual neighbor sub-TLV is obtained from the selected neighbor relationship TLV, and the second is determined according to the neighbor identifier and path label carried in the virtual neighbor sub-TLV. A neighbor relationship of the node.
其中,虚拟邻居子TLV携带邻居标识和路径标签,虚拟邻居子TLV携带的邻居标识用于指示第二节点对应的虚拟邻居的标识,虚拟邻居子TLV携带的路径标签用于指示第二节点到达虚拟邻居的路径,第二节点达到虚拟邻居的路径是通过第二域内的链路资源构建的。Among them, the virtual neighbor sub-TLV carries a neighbor identifier and a path label, the neighbor identifier carried by the virtual neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the second node, and the path label carried by the virtual neighbor sub-TLV is used to indicate that the second node reaches the virtual neighbor. The path of the neighbor, and the path from the second node to the virtual neighbor is constructed through link resources in the second domain.
在一种可能的实现方式中,如果通过节点发布的邻居关系TLV中的邻居标识是否是该节点自身来确定邻居关系TLV中指示的邻居是虚拟邻居还是所在域内的正常节点。此时,步骤503的实现过程可以为:如果邻居关系TLV中携带的邻居标识与任一节点的标识相同,则确定邻居关系TLV中携带的邻居标识指示一个虚拟邻居。In a possible implementation manner, whether the neighbor indicated in the neighbor relationship TLV is a virtual neighbor or a normal node in the domain is determined by whether the neighbor identifier in the neighbor relationship TLV issued by the node is the node itself. At this time, the implementation process of step 503 may be: if the neighbor identifier carried in the neighbor relationship TLV is the same as the identifier of any node, it is determined that the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
可选地,如果预先设置通过邻居关系TLV中的其他字段来确定邻居关系TLV中指示的邻居是虚拟邻居还是所在域内的正常邻居,同样可以参考上述方式来确定在什么情况下需要获取虚拟邻居子TLV。Optionally, if it is preset to determine whether the neighbor indicated in the neighbor relationship TLV is a virtual neighbor or a normal neighbor in the domain through other fields in the neighbor relationship TLV, you can also refer to the above method to determine under what circumstances the virtual neighbor needs to be acquired. TLV.
另外,当通过虚拟邻居子TLV中的虚拟邻居功能指示信息来指示该虚拟邻居子TLV携带的路径标签适用于哪种场景时,第一节点从邻居关系TLV中获取虚拟邻居子TLV后,从虚拟邻居子TLV中获取虚拟邻居功能指示信息。假设当前处于基于SR-BE技术转发报文的场景中,如果虚拟邻居功能指示信息指示虚拟邻居用于基于SR-BE技术转发报文的场景中,则执行根据虚拟邻居子TLV携带的邻居标识和路径标签确定任一节点的邻居关系的步骤。如果虚拟邻居功能指示信息指示虚拟邻居不是用于基于SR-BE技术转发报文的场景中,则不能基于该邻居关系确定转发路径,因此,第一节点将舍弃该节点的这个邻居关系。In addition, when the virtual neighbor function indication information in the virtual neighbor sub-TLV is used to indicate which scenario the path label carried by the virtual neighbor sub-TLV is applicable to, the first node obtains the virtual neighbor sub-TLV from the neighbor relationship TLV, and then obtains the virtual neighbor sub-TLV from the virtual neighbor Obtain the virtual neighbor function indication information from the neighbor sub-TLV. Assuming that you are currently in a scenario where packets are forwarded based on the SR-BE technology, if the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario where packets are forwarded based on the SR-BE technology, then execute the neighbor identification and The path label determines the steps of the neighbor relationship of any node. If the virtual neighbor function indication information indicates that the virtual neighbor is not used in the scenario of forwarding packets based on the SR-BE technology, the forwarding path cannot be determined based on the neighbor relationship. Therefore, the first node will discard the neighbor relationship of the node.
或者,假设当前处于基于SR-TE技术转发报文的场景中,如果虚拟邻居功能指示信息指示虚拟邻居用于基于SR-TE技术转发报文的场景中,则执行根据虚拟邻居子TLV携带的邻居标识和路径标签确定任一节点的邻居关系的步骤。相应地,如果虚拟邻居功能指示信息指示虚拟邻居不是用于基于SR-TE技术转发报文的场景中,则不能基于该邻居关系确定转发路径,因此,第一节点将舍弃该节点的这个邻居关系。Or, assuming that you are currently in the scenario of forwarding packets based on SR-TE technology, if the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on SR-TE technology, execute the neighbor based on the virtual neighbor sub-TLV The identification and path label determine the steps of the neighbor relationship of any node. Correspondingly, if the virtual neighbor function indication information indicates that the virtual neighbor is not used in the scenario of forwarding packets based on the SR-TE technology, the forwarding path cannot be determined based on the neighbor relationship. Therefore, the first node will discard the neighbor relationship of the node. .
比如,如果虚拟邻居子TLV的控制位中的R比特位置位,则确定该虚拟邻居用于基于SR-BE技术转发报文的场景中,如果当前恰好处于基于SR-BE技术转发报文的场景中,则将该节点的这个邻居关系用于下一步确定转发路径中。否则,则不能将该节点的这个邻居关系用于下一步确定转发路径中。For example, if the R bit in the control bit of the virtual neighbor sub-TLV is set, it is determined that the virtual neighbor is used in the scenario of forwarding packets based on the SR-BE technology, if the current situation happens to be the scenario of forwarding packets based on the SR-BE technology In the next step, the neighbor relationship of the node is used to determine the forwarding path. Otherwise, this neighbor relationship of the node cannot be used to determine the forwarding path in the next step.
又比如,如果虚拟邻居子TLV的控制位中的T比特位置位,则确定该虚拟邻居用于基于 SR-TE技术转发报文的场景中,如果当前恰好处于基于SR-TE技术转发报文的场景中,则将该节点的这个邻居关系用于下一步确定转发路径中。否则,则不能将该节点的这个邻居关系用于下一步确定转发路径中。For another example, if the T bit in the control bit of the virtual neighbor sub-TLV is set, it is determined that the virtual neighbor is used in the scenario of forwarding packets based on SR-TE technology. In the scenario, the neighbor relationship of the node is used to determine the forwarding path in the next step. Otherwise, this neighbor relationship of the node cannot be used to determine the forwarding path in the next step.
步骤504:在选择的邻居关系TLV中携带的邻居标识指示一个正常邻居的情况下,根据选择的邻居关系TLV确定第二节点的一个邻居关系。Step 504: In the case that the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor, determine a neighbor relationship of the second node according to the selected neighbor relationship TLV.
其中,正常邻居是指通过第一域内的链路资源与第二节点构建路径的节点。Among them, the normal neighbor refers to a node that constructs a path with the second node through link resources in the first domain.
在一种可能的实现方式中,如果通过节点发布的邻居关系TLV中的邻居标识是否是该节点自身来确定邻居关系TLV中指示的邻居是虚拟邻居还是所在域内的正常节点。此时,步骤504的实现过程可以为:如果邻居关系TLV中携带的邻居标识与发布该邻居关系TLV的节点的标识不相同,则确定邻居关系TLV中携带的邻居标识指示一个正常邻居。In a possible implementation manner, whether the neighbor indicated in the neighbor relationship TLV is a virtual neighbor or a normal node in the domain is determined by whether the neighbor identifier in the neighbor relationship TLV issued by the node is the node itself. At this time, the implementation process of step 504 may be: if the neighbor identifier carried in the neighbor relationship TLV is not the same as the identifier of the node issuing the neighbor relationship TLV, it is determined that the neighbor identifier carried in the neighbor relationship TLV indicates a normal neighbor.
可选地,如果预先设置通过邻居关系TLV中的其他字段来确定邻居关系TLV中指示的邻居是虚拟邻居还是所在域内的正常邻居,同样可以参考上述方式来确定邻居关系。Optionally, if it is preset to determine whether the neighbor indicated in the neighbor relationship TLV is a virtual neighbor or a normal neighbor in the domain by using other fields in the neighbor relationship TLV, the neighbor relationship can also be determined by referring to the foregoing manner.
比如,对于图1所示的网络系统,假设第一节点为P1,当P1与接收到的报文中指示的下一跳节点RSG1之间的链路出现故障时,P1可以获取第一域(也即是域2)中的各个节点的邻居关系。下面以获取第一域内ASG1、P2、RSG2以及RSG1的邻居关系为例说明P1如何确定第一域内的各个节点的邻居关系。For example, for the network system shown in Figure 1, assuming that the first node is P1, when the link between P1 and the next hop node RSG1 indicated in the received message fails, P1 can obtain the first domain ( That is, the neighbor relationship of each node in domain 2). The following takes obtaining the neighbor relationship of ASG1, P2, RSG2, and RSG1 in the first domain as an example to illustrate how P1 determines the neighbor relationship of each node in the first domain.
基于步骤501可知,节点ASG1预先发布有两个TLV22。一个TLV22中的邻居标识即为节点ASG1的标识,此时,表明该TLV22用于发布ASG1的一个虚拟邻居。其中,该TLV22中的虚拟邻居子TLV中携带的邻居标识为ASG2,虚拟邻居子TLV中携带的路径标签用于指示的路径为:ASG1→CSG2→CSG1→CSG3→ASG2。显然,节点ASG1和节点ASG2之间的邻居关系是通过第二域内的节点构建的,因此,节点P1根据该TLV22可以将节点ASG2作为节点ASG1的虚拟邻居。Based on step 501, it can be known that the node ASG1 publishes two TLVs 22 in advance. The neighbor identifier in a TLV22 is the identifier of the node ASG1. At this time, it indicates that the TLV22 is used to publish a virtual neighbor of ASG1. Among them, the neighbor identifier carried in the virtual neighbor sub-TLV in the TLV 22 is ASG2, and the path label carried in the virtual neighbor sub-TLV is used to indicate the path: ASG1→CSG2→CSG1→CSG3→ASG2. Obviously, the neighbor relationship between the node ASG1 and the node ASG2 is constructed by the nodes in the second domain. Therefore, the node P1 can use the node ASG2 as the virtual neighbor of the node ASG1 according to the TLV22.
节点ASG1发布的另一个TLV22中的邻居标识即为节点P1,表明该TLV22用于发布ASG2的一个正常邻居P1。因此,节点P1可以根据该TLV22可以将节点P1作为节点ASG1的一个正常邻居。The neighbor identifier in another TLV22 issued by node ASG1 is node P1, indicating that this TLV22 is used to publish a normal neighbor P1 of ASG2. Therefore, the node P1 can regard the node P1 as a normal neighbor of the node ASG1 according to the TLV22.
此外,节点P2可以预先发布两个TLV22,一个TLV22中的邻居标识为节点ASG2,另一个TLV22中的邻居标识为节点RSG2。节点RSG2可以预先发布两个TLV22,一个TLV22中的邻居标识为节点P2,另一个TLV22中的邻居标识为节点RSG1。节点RSG1可以预先发布两个TLV22,一个TLV22中的邻居标识为节点P1,另一个TLV22中的邻居标识为节点RSG2。节点P1同样可以按照上述各个TLV22确定出第一域(也即图1中的域2)内的各个节点的邻居关系。In addition, the node P2 may pre-publish two TLVs 22, the neighbor identifier in one TLV 22 is the node ASG2, and the neighbor identifier in the other TLV 22 is the node RSG2. The node RSG2 may pre-publish two TLV22, the neighbor identifier in one TLV22 is the node P2, and the neighbor identifier in the other TLV22 is the node RSG1. The node RSG1 may pre-publish two TLVs 22, the neighbor identifier in one TLV 22 is the node P1, and the neighbor identifier in the other TLV 22 is the node RSG2. The node P1 can also determine the neighbor relationship of each node in the first domain (that is, domain 2 in FIG. 1) according to the above-mentioned TLV22.
又比如,对于图2所示的网络系统,假设第一节点为CSG,CSG可以获取第一域(也即是域1)中的各个节点的邻居关系。图2所示的网络系统中第一域中除了CSG之外只有一个ASG。该节点ASG预先发布的一个TLV22中的邻居标识即为节点ASG的标识,此时,表明TLV22用于发布ASG的一个虚拟邻居。其中,TLV22中的虚拟邻居子TLV中携带的邻居标识为RSG,虚拟邻居子TLV中携带的路径标签用于指示的路径为:ASG→RSG。显然,节点ASG和节点RSG之间的邻居关系是通过第二域内的隧道构建的,因此,第一域内的节点CSG可以将节点RSG作为节点ASG的虚拟邻居。For another example, for the network system shown in FIG. 2, assuming that the first node is a CSG, the CSG can obtain the neighbor relationship of each node in the first domain (that is, domain 1). In the network system shown in FIG. 2, there is only one ASG in addition to the CSG in the first domain. The neighbor identifier in a TLV22 pre-published by the node ASG is the identifier of the node ASG. At this time, it indicates that the TLV22 is used to publish a virtual neighbor of the ASG. Among them, the neighbor identifier carried in the virtual neighbor sub-TLV in TLV22 is RSG, and the path label carried in the virtual neighbor sub-TLV is used to indicate the path: ASG→RSG. Obviously, the neighbor relationship between the node ASG and the node RSG is constructed through the tunnel in the second domain. Therefore, the node CSG in the first domain can use the node RSG as the virtual neighbor of the node ASG.
步骤505:第一节点根据第一域内各个节点的一个或多个邻居关系,确定报文的转发路 径,按照确定的转发路径转发报文。Step 505: The first node determines the forwarding path of the message according to one or more neighbor relationships of each node in the first domain, and forwards the message according to the determined forwarding path.
在一种可能的实现方式中,步骤505的实现过程可以为:从第一节点开始,第一节点依次执行根据当前节点的邻居关系,确定转发路径中的下一跳节点的步骤,直至确定出的下一跳节点为报文的目的节点。第一节点、以及确定的各个下一跳节点构成的路径即为该报文的转发路径。In a possible implementation manner, the implementation process of step 505 can be: starting from the first node, the first node sequentially executes the steps of determining the next hop node in the forwarding path according to the neighbor relationship of the current node, until it is determined The next hop node is the destination node of the message. The path formed by the first node and each determined next-hop node is the forwarding path of the message.
上述第一节点从当前节点的一个或多个邻居关系中确定到达目的节点的最优邻居关系的实现方式可以为;在当前节点为边界节点、最优邻居关系为当前节点在第二域内的邻居关系、且当前节点到最优邻居关系所指示的节点之间的路径具有单向可达性的情况下,将最优邻居关系所指示的节点确定为当前节点的下一跳节点。The foregoing first node determines the optimal neighbor relationship to the destination node from one or more neighbor relationships of the current node. The implementation manner may be: the current node is a boundary node, and the optimal neighbor relationship is the neighbor of the current node in the second domain. In the case where the path between the current node and the node indicated by the optimal neighbor relationship has unidirectional reachability, the node indicated by the optimal neighbor relationship is determined as the next hop node of the current node.
在本申请实施例中,对于第一域的任意两个节点,通常需要这两个节点之间具有双向可达性之后,方可建立一个节点到另一个节点的路径。节点A和节点B之间具有双向可达性是指,节点A发布有到节点B的邻居关系,节点B也发布有到节点A的邻居关系。但是对于基于虚拟邻居的邻居关系,通常是在当前链路出现故障时才重新确定转发路径,此时并不需要其具有双向可达性,可以仅仅在具有单向可达性之后可便可基于该邻居关系确定转发路径,从而提高了重新确定转发路径的效率。In the embodiment of the present application, for any two nodes in the first domain, it is usually necessary for the two nodes to have bidirectional reachability between them before establishing a path from one node to another node. The two-way reachability between node A and node B means that node A advertises a neighbor relationship to node B, and node B also advertises a neighbor relationship to node A. However, for the neighbor relationship based on virtual neighbors, the forwarding path is usually re-determined when the current link fails. At this time, it does not need to have two-way reachability. It can be based on only one-way reachability. The neighbor relationship determines the forwarding path, thereby improving the efficiency of re-determining the forwarding path.
另外,对于第一节点、以及确定的各个下一跳节点中除边界节点之外的其他节点,确定其他节点与其他节点的邻居关系中指示的节点之间的双向可达性,如果其他节点与其他节点的邻居关系中指示的节点之间具有双向可达性,则将其他节点的邻居关系中指示的节点确定为其他节点的下一跳节点。In addition, for the first node and other nodes other than the boundary node among the determined next hop nodes, determine the two-way reachability between the nodes indicated in the neighbor relationship between other nodes and other nodes, if other nodes are The nodes indicated in the neighbor relationship of other nodes have bidirectional reachability, and the node indicated in the neighbor relationship of other nodes is determined as the next hop node of the other node.
当然,对于第一节点、以及确定的各个下一跳节点中除边界节点之外的其他节点,也可以在仅仅具有单向可达性之后可便可基于该邻居关系确定转发路径,从而提高了重新确定转发路径的效率。本申请实施例对此不做具体限定。Of course, for the first node and the nodes other than the border node among the determined next hop nodes, the forwarding path can be determined based on the neighbor relationship after only one-way reachability, thereby improving Re-determine the efficiency of the forwarding path. The embodiment of the application does not specifically limit this.
可选地,对于第一节点、以及确定的各个下一跳节点中的任一节点,也可以在该节点与该节点的邻居关系中指示的节点之间具有双向可达性时,将该节点的邻居关系中指示的节点确定为该节点的下一跳节点。也即是,不管该节点的邻居为正常的邻居还是虚拟邻居,均在检查该节点与该节点的邻居之间具有双向可达性之后将该该节点的邻居确定为该节点的下一跳节点。Optionally, for the first node and any one of the determined next-hop nodes, the node may also be reachable in both directions when the node indicated in the neighbor relationship between the node and the node has two-way reachability. The node indicated in the neighbor relationship of is determined as the next hop node of the node. That is, no matter whether the neighbor of the node is a normal neighbor or a virtual neighbor, the neighbor of the node is determined as the next hop node of the node after checking the two-way reachability between the node and the neighbor of the node. .
此外,第一节点从当前节点的一个或多个邻居关系中确定到达目的节点的最优邻居关系的实现方式可以为:确定这一个或多个邻居关系中每个邻居关系的代价值,从这一个或多个邻居关系中选择代价值最小的邻居关系。关于代价值已经在前述介绍TLV22的相关内容中进行了解释说明,在此不再重复说明。In addition, the method for the first node to determine the optimal neighbor relationship to the destination node from one or more neighbor relationships of the current node can be as follows: determine the cost value of each neighbor relationship in the one or more neighbor relationships, from this Select the neighbor relationship with the smallest cost value among one or more neighbor relationships. The cost value has been explained in the above-mentioned related content of introducing TLV22, and the explanation will not be repeated here.
此外,在步骤505中,由于第一节点与该报文中指示的下一跳节点之间的链路发生了故障,因此,第一节点在确定自身的下一跳节点时需要排除该报文中指示的下一跳节点,以保证最终确定的路径能够成功用于转发该报文。In addition, in step 505, because the link between the first node and the next hop node indicated in the message has failed, the first node needs to exclude the message when determining its own next hop node. The next hop node indicated in to ensure that the finally determined path can be successfully used to forward the message.
上述图5所示的实施例是通过虚拟邻居子TLV的方式来指示第一域内的边界节点在第二域内的邻居关系,以便于第一节点能够结合第二域内的链路资源来确定转发路径,避免了在当前所在域内没有备份路径时报文无法转发的问题。而在基于SR-TE技术转发报文的场景中,各个节点还可以通过邻居关系TLV中的邻居子TLV(Adj-SID Sub TLV)发布邻居关系。对 于图6所示的邻居关系TLV,该邻居子TLV可以通过一个或多个可选子TLV中的一个来实现(图6中未示出)。也即是,在基于SR-TE技术转发报文的场景中,邻居关系TLV中原本就携带一个邻居子TLV,该邻居子TLV用于指示所在域内的邻居关系。因此,在本申请实施例中,在基于SR-TE技术转发报文的场景中,还可以直接对邻居关系TLV中的邻居子TLV进行重新配置,以使邻居子TLV在能够携带本域内的邻居关系的功能上,还能够携带跨域的邻居关系,以便于第一域内的节点能够建立到第二域内的节点之间的隧道,也即是建立跨域的隧道。下面对该实现方式进行详细解释说明。The embodiment shown in Figure 5 above uses virtual neighbor sub-TLVs to indicate the neighbor relationship of border nodes in the first domain in the second domain, so that the first node can determine the forwarding path in combination with link resources in the second domain. , To avoid the problem that packets cannot be forwarded when there is no backup path in the current domain. In the scenario of forwarding packets based on the SR-TE technology, each node can also advertise the neighbor relationship through the neighbor sub-TLV (Adj-SID Sub TLV) in the neighbor relationship TLV. For the neighbor relationship TLV shown in Fig. 6, the neighbor sub-TLV can be implemented by one of one or more optional sub-TLVs (not shown in Fig. 6). That is, in the scenario of forwarding packets based on the SR-TE technology, the neighbor relationship TLV originally carries a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate the neighbor relationship in the domain. Therefore, in the embodiment of this application, in the scenario of forwarding packets based on SR-TE technology, the neighbor sub-TLV in the neighbor relationship TLV can also be directly reconfigured, so that the neighbor sub-TLV can carry neighbors in this domain. The relationship function can also carry a cross-domain neighbor relationship, so that nodes in the first domain can establish tunnels between nodes in the second domain, that is, to establish a cross-domain tunnel. The implementation will be explained in detail below.
图8是本申请实施例提供的另一种转发报文的方法流程图,应用于图2所示的网络系统中的任一节点。如图8所示,该方法包括如下步骤:FIG. 8 is a flowchart of another method for forwarding packets provided by an embodiment of the present application, which is applied to any node in the network system shown in FIG. 2. As shown in Figure 8, the method includes the following steps:
步骤801:第一节点接收报文,第一节点为第一域内的任一节点,第一域为网络中的多个域中的任一域。Step 801: The first node receives the message, the first node is any node in the first domain, and the first domain is any domain among multiple domains in the network.
步骤801的实现方式可以参考图4实施例中的步骤401的实现方式,在此不再详细阐述。For the implementation of step 801, reference may be made to the implementation of step 401 in the embodiment of FIG. 4, which will not be described in detail here.
在本申请实施例中,在基于SR-TE技术转发报文的场景中,为了能够建立跨域的隧道,对于第二域内的任一节点,首先允许该节点在第一域内发布的邻居关系TLV中的邻居标识可以指示第二域内的邻居,并对邻居关系TLV中的邻居子TLV进行了扩展,以使邻居子TLV能够携带该节点与该邻居之间的邻居关系。In the embodiment of the present application, in the scenario of forwarding packets based on the SR-TE technology, in order to be able to establish a cross-domain tunnel, for any node in the second domain, first allow the node to publish the neighbor relationship TLV in the first domain The neighbor identifier in can indicate neighbors in the second domain, and the neighbor sub-TLV in the neighbor relationship TLV is extended, so that the neighbor sub-TLV can carry the neighbor relationship between the node and the neighbor.
也即是,对于图8所示的实施例,对于第二节点在第一域内发布的邻居关系TLV,该邻居关系TLV中的邻居标可以直接指示第二节点的一个邻居,该邻居可以为与第一节点处于同一域内的邻居,也可以为与第一节点没有处于同一域内的邻居。而不是像图4所示的实施例那样,通过邻居关系TLV中的邻居标识来指示邻居是否是跨域的邻居。That is, for the embodiment shown in FIG. 8, for the neighbor relationship TLV issued by the second node in the first domain, the neighbor flag in the neighbor relationship TLV may directly indicate a neighbor of the second node, and the neighbor may be The neighbors of the first node in the same domain may also be neighbors that are not in the same domain with the first node. Instead of using the neighbor identifier in the neighbor relationship TLV to indicate whether the neighbor is a cross-domain neighbor as in the embodiment shown in FIG. 4.
比如,对于图2所示的网络系统,对于节点ASG,ASG可以创建到RSG的SR-TE隧道,该SR-TE隧道可以通过第二域内的LSDB确定。然后ASG针对该SR-TE隧道配置邻居关系(Forwarding Adjacency,FA)。其中,配置邻居关系是指生成包括邻居子TLV的邻居关系TLV,并将邻居关系TLV中的邻居标识设置为RSG,然后发布该邻居关系TLV,以便于第一域内的CSG可以通过下述步骤802至步骤803基于该邻居关系确定到达RSG的转发路径。For example, for the network system shown in FIG. 2, for the node ASG, the ASG can create an SR-TE tunnel to the RSG, and the SR-TE tunnel can be determined by the LSDB in the second domain. Then, the ASG configures a neighbor relationship (Forwarding Adjacency, FA) for the SR-TE tunnel. Among them, configuring the neighbor relationship refers to generating a neighbor relationship TLV including neighbor sub-TLVs, and setting the neighbor identifier in the neighbor relationship TLV to RSG, and then publishing the neighbor relationship TLV so that the CSG in the first domain can pass the following step 802 Go to step 803 to determine the forwarding path to the RSG based on the neighbor relationship.
另外,由于该邻居关系通常是用于链路出现故障时确定备份路径时所需,因此,在确定转发路径时通常无需两个节点之间具有双向可达性才能建立路径,因此,还可以对邻居关系TLV中的邻居子TLV进行修改,以使第一节点在基于邻居子TLV确定转发路径时只需检查单向可达性满足之后即可确认路径。In addition, because the neighbor relationship is usually used to determine the backup path when the link fails, it is usually not necessary to have two-way reachability between the two nodes to establish the path when determining the forwarding path. Therefore, you can also The neighbor sub-TLV in the neighbor relationship TLV is modified so that the first node can confirm the path only after checking that the unidirectional reachability is satisfied when determining the forwarding path based on the neighboring sub-TLV.
比如,对于图2所示的网络系统,ASG在生成用于指示到达RSG的TE隧道的邻居子TLV之后,如果当前是在域1内发布携带该邻居子TLV的邻居关系TLV,ASG可以将邻居子TLV中的控制位中的O比特位置位,以便于后续域1内的节点CSG在获取到该邻居关系时,只需检查单向可达性满足之后即可确认路径。For example, for the network system shown in Figure 2, after the ASG generates the neighbor sub-TLV for indicating the TE tunnel to the RSG, if the neighbor relationship TLV carrying the neighbor sub-TLV is currently released in domain 1, the ASG can send the neighbor The O bit in the control bit in the sub-TLV is set, so that when the node CSG in the subsequent domain 1 obtains the neighbor relationship, it can confirm the path only after checking that the unidirectional reachability is satisfied.
另外,邻居关系子TLV中会根据跨域的邻居关系的配置按需携带其他一个或多个子TLV,这一个或多个子TLV用于描述该跨域的邻居关系的一些属性。比如,最大链路带宽、最大预留带宽、未预留带宽以及TE隧道代价值等属性。其中,这其他的一个或多个子TLV可以通过TLV22中的子TLV9/10/11/18来实现。In addition, the neighbor relationship sub-TLV will carry other one or more sub-TLVs as needed according to the configuration of the cross-domain neighbor relationship, and these one or more sub-TLVs are used to describe some attributes of the cross-domain neighbor relationship. For example, attributes such as maximum link bandwidth, maximum reserved bandwidth, unreserved bandwidth, and TE tunnel cost value. Among them, the other one or more sub-TLVs can be implemented through sub-TLV 9/10/11/18 in TLV22.
比如,当邻居关系TLV为图6所示的TLV22时,该TLV22中的邻居标识用于指示发布该TLV22的节点的一个邻居,该TLV22还包括邻居子TLV,该邻居子TLV可以图6所示的 可选的子TLV中的一个(图6中未示出)。图9是本申请实施例提供的一种邻居子TLV的格式示意图。如图9所示,该邻居子TLV包括类型、长度、控制位、权重以及SID/标签(Label)/索引(Index)等字段。SID/标签/索引字段用于指示建立的跨域的隧道的标签,也即是,该SID/标签/索引字段用于指示发布邻居关系TLV的节点与该邻居关系TLV中的邻居标识所指示的节点之间的隧道。控制位中的O比特位用于指示建立隧道时只需检查单向可达性。For example, when the neighbor relationship TLV is TLV22 shown in FIG. 6, the neighbor identifier in the TLV22 is used to indicate a neighbor of the node that publishes the TLV22, and the TLV22 also includes a neighbor sub-TLV, and the neighbor sub-TLV may be as shown in FIG. 6. One of the optional sub-TLVs (not shown in Figure 6). FIG. 9 is a schematic diagram of the format of a neighbor sub-TLV provided by an embodiment of the present application. As shown in Figure 9, the neighbor sub-TLV includes fields such as type, length, control bits, weight, and SID/Label/Index. The SID/label/index field is used to indicate the label of the established cross-domain tunnel, that is, the SID/label/index field is used to indicate the node issuing the neighbor relationship TLV and the neighbor identifier in the neighbor relationship TLV indicated Tunnel between nodes. The O bit in the control bit is used to indicate that only one-way reachability needs to be checked when establishing a tunnel.
另外,图9所示的控制位中的F、B、V、L、S、P为协议中已经定义的比特位。其中,F比特位是地址族标志,如果F比特位未置位,代表IPv4;如果F比特位置位,代表IPv6。B比特位是备份标志,如果B比特位置位,Adj-SID(在本实施例中是指TLV22中的邻居标识)用于保护其他节点。V比特位是Value标志,如果V比特位置位,则Adj-SID携带标签值Value,缺省置位。L:Local标志。如果置位,表示Adj-SID携带的Value/Index具有本地意义,缺省置位。S比特位是序列标志,如果S比特位置位,表示Adj-SID是一个Adjacency序列。P比特位是指永久标志。如果P比特位置位,表示Adj-SID是一个永久分配的SID,无论设备重启或接口震荡该SID都不变化。关于控制位中这几个比特位的详细功能说明,可以参考相关协议,在此不再一一解释说明。In addition, F, B, V, L, S, and P in the control bits shown in FIG. 9 are the bits that have been defined in the protocol. Among them, the F bit is the address family flag. If the F bit is not set, it represents IPv4; if the F bit is set, it represents IPv6. The B bit is a backup flag. If the B bit is set, the Adj-SID (referring to the neighbor identifier in the TLV22 in this embodiment) is used to protect other nodes. The V bit is the Value flag. If the V bit is set, the Adj-SID carries the tag value Value, which is set by default. L: Local logo. If set, it means that the Value/Index carried by the Adj-SID has local meaning and is set by default. The S bit is a sequence flag. If the S bit is set, it means that the Adj-SID is an Adjacency sequence. The P bit refers to a permanent flag. If the P bit is set, it means that the Adj-SID is a permanently allocated SID, and the SID will not change regardless of device restart or interface shock. Regarding the detailed function description of these bits in the control bit, you can refer to the relevant protocol, which will not be explained one by one here.
另外,步骤802:对于第一域内的各个节点中第二节点,从第二节点的一个或多个邻居关系TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居子TLV,邻居子TLV用于指示第二节点到第三节点的邻居关系,第三节点为第一域或第二域中的节点,第二节点为第一域内的各个节点中的任一节点。In addition, step 802: For the second node in each node in the first domain, select a neighbor relationship TLV from one or more neighbor relationship TLVs of the second node, and obtain neighbor sub-TLVs in the selected neighbor relationship TLV, and neighbor sub-TLVs. The TLV is used to indicate the neighbor relationship from the second node to the third node. The third node is a node in the first domain or the second domain, and the second node is any node in each node in the first domain.
基于上述对邻居关系TLV的修改可知,在基于SR-TE技术转发报文的场景中,可以通过邻居关系TLV中邻居标识确定一个邻居,通过邻居关系TLV中的邻居子TLV确定达到邻居的转发路径。因此,对于任一的第二节点的一个或多个邻居关系TLV中的每个邻居关系TLV,第一节点需先从该邻居关系TLV中获取邻居子TLV。Based on the above modification to the neighbor relationship TLV, it can be seen that in the scenario of forwarding packets based on the SR-TE technology, a neighbor can be determined by the neighbor identifier in the neighbor relationship TLV, and the forwarding path to the neighbor can be determined by the neighbor sub-TLV in the neighbor relationship TLV. . Therefore, for each neighbor relationship TLV in one or more neighbor relationship TLVs of any second node, the first node needs to first obtain neighbor sub-TLVs from the neighbor relationship TLV.
对于图2所示的网络系统,假设第一节点为CSG,当前CSG需要创建到RSG的路径,此时,CSG需先获取ASG发布的邻居关系TLV。ASG发布的邻居关系TLV中邻居标识用于指示RSG,也即是,此时第三节点为RSG。该邻居关系TLV中的邻居子TLV包括的SID/标签/索引字段用于指示ASG到RSG的隧道。For the network system shown in Figure 2, assuming that the first node is a CSG, the current CSG needs to create a path to the RSG. At this time, the CSG needs to first obtain the neighbor relationship TLV issued by the ASG. The neighbor identifier in the neighbor relationship TLV issued by the ASG is used to indicate the RSG, that is, the third node is the RSG at this time. The SID/tag/index field included in the neighbor sub-TLV in the neighbor relationship TLV is used to indicate the tunnel from the ASG to the RSG.
步骤803:第一节点根据第一域内各个节点的一个或多个邻居关系,确定报文的转发路径,按照确定的转发路径转发报文。Step 803: The first node determines a forwarding path of the message according to one or more neighbor relationships of each node in the first domain, and forwards the message according to the determined forwarding path.
比如,对于图2所示的网络系统,假设第一节点为CSG,当前CSG需要创建到RSG的路径,此时,CSG先基于和ASG之间的邻居关系,创建到ASG的TE隧道,然后通过ASG和RSG之间的邻居关系,创建ASG到RSG的TE隧道。For example, for the network system shown in Figure 2, suppose the first node is a CSG, and the current CSG needs to create a path to the RSG. At this time, the CSG first creates a TE tunnel to the ASG based on the neighbor relationship with the ASG, and then passes Neighbor relationship between ASG and RSG, creating a TE tunnel from ASG to RSG.
并且CSG在创建ASG到RSG的TE隧道时,由于ASG发布的邻居关系TLV中的邻居子TLV中的控制位的O比特位置位了,因此只需检查ASG到RSG的单向可达性即可。And when CSG creates the TE tunnel from ASG to RSG, because the O bit of the control bit in the neighbor sub-TLV in the neighbor relationship TLV released by the ASG is set, only the one-way reachability from ASG to RSG needs to be checked. .
图10是本申请实施例提供的一种第一节点的装置示意图,如图10所示,第一节点1000包括:FIG. 10 is a schematic diagram of an apparatus of a first node according to an embodiment of the present application. As shown in FIG. 10, the first node 1000 includes:
接收模块1001,用于接收报文,第一节点为第一域内的任一节点,第一域为网络中的多个域中的任一域;The receiving module 1001 is configured to receive a message, the first node is any node in the first domain, and the first domain is any one of multiple domains in the network;
获取模块1002,用于获取第一域内各个节点的一个或多个邻居关系,第一域内的边界节 点的一个或多个邻居关系包括边界节点在第二域内的邻居关系,第二域为除第一域之外的域;The obtaining module 1002 is used to obtain one or more neighbor relations of each node in the first domain. The one or more neighbor relations of the border nodes in the first domain include the neighbor relations of the border nodes in the second domain. A domain outside of one domain;
确定模块1003,用于根据第一域内各个节点的一个或多个邻居关系,确定到达报文的目的节点的转发路径;The determining module 1003 is configured to determine a forwarding path to the destination node of the message according to one or more neighbor relationships of each node in the first domain;
转发模块1004,用于按照确定的转发路径转发报文。The forwarding module 1004 is configured to forward the message according to the determined forwarding path.
可选地,前述获取模块,具体用于:Optionally, the aforementioned acquisition module is specifically used for:
对于各个节点中的第二节点,从第二节点的一个或多个邻居关系类型-长度-值TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居标识,第二节点为各个节点中的任一节点;For the second node of each node, select a neighbor relationship TLV from one or more neighbor relationship type-length-value TLVs of the second node, and obtain the neighbor identifier in the selected neighbor relationship TLV. The second node is each node Any node in;
在选择的邻居关系TLV中携带的邻居标识指示一个虚拟邻居的情况下,从选择的邻居关系TLV中获取虚拟邻居子TLV,虚拟邻居子TLV携带邻居标识和路径标签,虚拟邻居子TLV携带的邻居标识用于指示第二节点对应的虚拟邻居的标识,虚拟邻居子TLV携带的路径标签用于指示第二节点到达虚拟邻居的路径,第二节点达到虚拟邻居的路径是通过第二域内的链路资源构建的;In the case that the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor, the virtual neighbor sub-TLV is obtained from the selected neighbor relationship TLV, the virtual neighbor sub-TLV carries the neighbor identifier and path label, and the neighbor carried by the virtual neighbor sub-TLV The identifier is used to indicate the identifier of the virtual neighbor corresponding to the second node. The path label carried by the virtual neighbor sub-TLV is used to indicate the path of the second node to the virtual neighbor. The path of the second node to the virtual neighbor is through a link in the second domain. Resource-based
根据虚拟邻居子TLV携带的邻居标识和路径标签确定第二节点的一个邻居关系。Determine a neighbor relationship of the second node according to the neighbor identifier and the path label carried in the virtual neighbor sub-TLV.
可选地,在选择的邻居关系TLV中携带的邻居标识与第二节点的标识相同的情况下,选择的邻居关系TLV中携带的邻居标识指示一个虚拟邻居。Optionally, in the case that the neighbor identifier carried in the selected neighbor relationship TLV is the same as the identifier of the second node, the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor.
可选地,前述获取模块,还具体用于:在选择的邻居关系TLV中携带的邻居标识指示一个正常邻居的情况下,根据选择的邻居关系TLV确定第二节点的一个邻居关系,正常邻居是指通过第一域内的链路资源与第二节点构建路径的节点。Optionally, the aforementioned acquisition module is further specifically configured to: in the case that the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor, determine a neighbor relationship of the second node according to the selected neighbor relationship TLV, and the normal neighbor is Refers to a node that constructs a path through link resources in the first domain and the second node.
可选地,在选择的邻居关系TLV中携带的邻居标识与第二节点的标识不相同的情况下,选择的邻居关系TLV中携带的邻居标识指示一个正常邻居。Optionally, in the case that the neighbor identifier carried in the selected neighbor relationship TLV is different from the identifier of the second node, the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor.
可选地,前述获取模块,还具体用于:Optionally, the aforementioned acquisition module is also specifically used for:
从虚拟邻居子TLV中获取虚拟邻居功能指示信息;Obtain virtual neighbor function indication information from the virtual neighbor sub-TLV;
在虚拟邻居功能指示信息指示虚拟邻居用于基于分段路由最优路径SR-BE技术转发报文的场景中,且当前处于基于SR-BE技术转发报文的场景的情况下,执行根据虚拟邻居子TLV携带的邻居标识和路径标签确定第二节点的一个邻居关系的步骤。When the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segment routing optimal path SR-BE technology, and the current situation is in the scenario of forwarding packets based on the SR-BE technology, the virtual neighbor is executed according to the virtual neighbor The step of determining a neighbor relationship of the second node by the neighbor identifier and path label carried by the sub-TLV.
可选地,前述获取模块,还具体用于:Optionally, the aforementioned acquisition module is also specifically used for:
从虚拟邻居子TLV中获取虚拟邻居功能指示信息;Obtain virtual neighbor function indication information from the virtual neighbor sub-TLV;
在虚拟邻居功能指示信息指示虚拟邻居用于基于分段路由流程工程SR-TE技术转发报文的场景中,且当前处于基于SR-TE技术转发报文的场景的情况下,执行根据虚拟邻居子TLV携带的邻居标识和路径标签确定第二节点的一个邻居关系的步骤。When the virtual neighbor function instruction information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segmented routing process engineering SR-TE technology, and the current situation is in the scenario of forwarding packets based on the SR-TE technology, the virtual neighbor is executed according to the virtual neighbor. The step of determining a neighbor relationship of the second node by the neighbor identifier and the path label carried in the TLV.
可选地,虚拟邻居功能指示信息携带在虚拟邻居子TLV的控制位字段中。Optionally, the virtual neighbor function indication information is carried in the control bit field of the virtual neighbor sub-TLV.
可选地,前述获取模块,还具体用于:Optionally, the aforementioned acquisition module is also specifically used for:
对于各个节点中第二节点,从第二节点的一个或多个邻居关系TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居子TLV,邻居子TLV用于指示第二节点到第三节点的邻居关系,第三节点为第一域或第二域中的节点,第二节点为各个节点中的任一节点。For the second node in each node, select a neighbor relationship TLV from one or more neighbor relationship TLVs of the second node, and obtain the neighbor sub-TLV in the selected neighbor relationship TLV. The neighbor sub-TLV is used to indicate the second node to the second node. The neighbor relationship of three nodes, the third node is a node in the first domain or the second domain, and the second node is any node in each node.
可选地,前述确定模块,还具体用于:Optionally, the aforementioned determining module is also specifically used for:
从第一节点开始,第一节点依次执行根据当前节点的一个或多个邻居关系,确定当前节点的下一跳节点的步骤,直至确定出的下一跳节点为报文的目的节点时,得到报文的转发路 径。Starting from the first node, the first node sequentially executes the steps of determining the next hop node of the current node according to one or more neighbor relationships of the current node, until the next hop node is determined as the destination node of the message, the result is The forwarding path of the packet.
可选地,前述获取模块,还具体用于:Optionally, the aforementioned acquisition module is also specifically used for:
从当前节点的一个或多个邻居关系中确定到达目的节点的最优邻居关系;Determine the optimal neighbor relationship to the destination node from one or more neighbor relationships of the current node;
在当前节点为边界节点、最优邻居关系为当前节点在第二域内的邻居关系、且当前节点到最优邻居关系所指示的节点之间的路径具有单向可达性的情况下,将最优邻居关系所指示的节点确定为当前节点的下一跳节点。When the current node is a boundary node, the optimal neighbor relationship is the neighbor relationship of the current node in the second domain, and the path between the current node and the node indicated by the optimal neighbor relationship has unidirectional reachability, the most The node indicated by the good neighbor relationship is determined as the next hop node of the current node.
可选地,前述获取模块,还具体用于:Optionally, the aforementioned acquisition module is also specifically used for:
在第一节点与报文中指示的下一跳节点之间的链路有故障的情况下,获取第一域内各个节点的一个或多个邻居关系。In the case that the link between the first node and the next-hop node indicated in the message is faulty, obtain one or more neighbor relationships of each node in the first domain.
在本申请实施例中,为了实现某个域内的节点能够跨域确定转发路径,第一节点获取的第一域内的边界节点的邻居关系包括边界节点在第二域内的邻居关系,该第二域为除第一域之外的域,如此,第一节点便可结合边界节点在第二域内的邻居关系来确定转发路径,也即是,第一节点在确定转发路径时可以利用除了第一域内的链路资源之外的其他域内的链路资源,从而避免了在当前所在域内没有备份路径时报文无法转发的问题,从而提高了报文转发的成功率。In the embodiment of the present application, in order to realize that nodes in a certain domain can determine the forwarding path across domains, the neighbor relationship of the border node in the first domain acquired by the first node includes the neighbor relationship of the border node in the second domain. It is a domain other than the first domain. In this way, the first node can determine the forwarding path based on the neighbor relationship of the border node in the second domain. That is, the first node can use other than the first domain when determining the forwarding path. Link resources in other domains other than the link resources of the domain, thereby avoiding the problem that messages cannot be forwarded when there is no backup path in the current domain, thereby improving the success rate of message forwarding.
需要说明的是:上述实施例提供的第一节点在转发报文时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的第一节点与转发报文的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the first node provided in the above embodiment forwards a message, only the division of the above functional modules is used as an example for illustration. In actual applications, the above function allocation can be completed by different functional modules according to needs. That is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the first node provided in the foregoing embodiment belongs to the same concept as the embodiment of the method for forwarding a message. For the specific implementation process, please refer to the method embodiment, which will not be repeated here.
图11是本申请实施例提供的一种边界节点的装置示意图,该边界节点为第一域和第二域之间的边界节点,如图11所示,该边界节1100点包括:FIG. 11 is a schematic diagram of a boundary node device provided by an embodiment of the present application. The boundary node is a boundary node between a first domain and a second domain. As shown in FIG. 11, the boundary node 1100 includes:
确定模块1101,用于确定邻居关系TLV,邻居关系TLV用于指示边界节点在第二域内的邻居关系;The determining module 1101 is used to determine the neighbor relationship TLV, and the neighbor relationship TLV is used to indicate the neighbor relationship of the border node in the second domain;
发布模块1102,用于在第一域内发布邻居关系TLV。The publishing module 1102 is used to publish the neighbor relationship TLV in the first domain.
可选地,在邻居关系TLV携带的的邻居标识指示一个虚拟邻居的情况下,邻居关系TLV包括虚拟邻居子TLV,虚拟邻居子TLV携带邻居标识和路径标签,虚拟邻居子TLV携带的邻居标识用于指示边界节点对应的虚拟邻居的标识,虚拟邻居子TLV携带的路径标签用于指示边界节点到达虚拟邻居的路径,边界节点达到虚拟邻居的路径是通过第二域内的链路资源构建的。Optionally, in the case where the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor, the neighbor relationship TLV includes a virtual neighbor sub-TLV, the virtual neighbor sub-TLV carries the neighbor identifier and path label, and the neighbor identifier carried in the virtual neighbor sub-TLV is used for To indicate the identifier of the virtual neighbor corresponding to the border node, the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the border node to the virtual neighbor, and the path from the border node to the virtual neighbor is constructed through link resources in the second domain.
可选地,在邻居关系TLV中携带的邻居标识与边界节点的标识相同的情况下,邻居关系TLV中携带的邻居标识指示一个虚拟邻居。Optionally, in the case that the neighbor identifier carried in the neighbor relationship TLV is the same as the identifier of the border node, the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor.
可选地,邻居关系TLV包括邻居子TLV,邻居子TLV用于指示边界节点到第三节点的邻居关系,第三节点为第一域或第二域中的节点。Optionally, the neighbor relationship TLV includes a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate the neighbor relationship from the border node to the third node, and the third node is a node in the first domain or the second domain.
在本申请实施例中,为了实现某个域内的节点能够跨域确定转发路径,第一域和第二域之间的边界节点可以确定用于指示边界节点在第二域内的邻居关系的邻居关系TLV,并在第一域内发布该邻居关系TLV。如此,第一域内的第一节点便可接收该邻居关系TLV,以便于后续第一节点可以结合边界节点在第二域内的邻居关系来确定转发路径,也即是,第一节点 在确定转发路径时可以利用除了第一域内的链路资源之外的其他域内的链路资源,从而避免了在当前所在域内没有备份路径时报文无法转发的问题,从而提高了报文转发的成功率。In the embodiment of the present application, in order to realize that nodes in a certain domain can determine the forwarding path across domains, the border node between the first domain and the second domain may determine the neighbor relationship used to indicate the neighbor relationship of the border node in the second domain TLV, and publish the neighbor relationship TLV in the first domain. In this way, the first node in the first domain can receive the neighbor relationship TLV, so that the subsequent first node can determine the forwarding path based on the neighbor relationship of the border node in the second domain, that is, the first node is determining the forwarding path It is possible to use link resources in other domains except the link resources in the first domain, thereby avoiding the problem that packets cannot be forwarded when there is no backup path in the current domain, thereby improving the success rate of packet forwarding.
需要说明的是:上述实施例提供的边界节点在转发报文时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的边界节点与转发报文的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the boundary node provided in the foregoing embodiment forwards a message, only the division of the foregoing functional modules is used as an example for illustration. In actual applications, the foregoing function allocation can be completed by different functional modules according to needs, i.e. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the boundary node provided in the foregoing embodiment and the method embodiment for forwarding a message belong to the same concept. For the specific implementation process, please refer to the method embodiment, which will not be repeated here.
图12是本发明实施例提供的一种计算机设备的结构示意图。上述实施例的网络系统中的任一节点均可以通过图12所示的计算机设备来实现。参见图12,该计算机设备包括至少一个处理器1201,通信总线1202、存储器1203以及至少一个通信接口1204。FIG. 12 is a schematic structural diagram of a computer device provided by an embodiment of the present invention. Any node in the network system of the foregoing embodiment can be implemented by the computer device shown in FIG. 12. Referring to FIG. 12, the computer device includes at least one processor 1201, a communication bus 1202, a memory 1203, and at least one communication interface 1204.
处理器1201可以是一个通用中央处理器(central processing unit,CPU)、特定应用集成电路(application-specific integrated circuit,ASIC)或一个或多个用于控制本申请方案程序执行的集成电路。The processor 1201 may be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling program execution of the solution of this application.
通信总线1202可包括一通路,在上述组件之间传送信息。The communication bus 1202 may include a path for transferring information between the above-mentioned components.
存储器1203可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器1203可以是独立存在,通过通信总线1202与处理器1201相连接。存储器1203也可以和处理器1201集成在一起。The memory 1203 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions The dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (Including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer Any other media, but not limited to this. The memory 1203 may exist independently, and is connected to the processor 1201 through the communication bus 1202. The memory 1203 may also be integrated with the processor 1201.
其中,存储器1203用于存储执行本申请方案的程序代码,并由处理器1201来控制执行。处理器1201用于执行存储器1203中存储的程序代码。程序代码中可以包括一个或多个软件模块,前述实施例中任一节点可以通过处理器1201以及存储器1203中的程序代码中的一个或多个软件模块,来确定用于开发应用的数据。Among them, the memory 1203 is used to store program codes for executing the solutions of the present application, and the processor 1201 controls the execution. The processor 1201 is configured to execute program codes stored in the memory 1203. The program code may include one or more software modules, and any node in the foregoing embodiments may determine the data used to develop the application through one or more software modules in the program code in the processor 1201 and the memory 1203.
通信接口1204,使用任何收发器一类的装置,用于与其它设备或通信网络通信,如以太网,无线接入网(radio access networkRAN),无线局域网(wireless local area networks,WLAN)等。The communication interface 1204 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network RAN, wireless local area networks (WLAN), and so on.
在具体实现中,作为一种实施例,计算机设备可以包括多个处理器,例如图12中所示的处理器1201和处理器1205。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In specific implementation, as an embodiment, the computer device may include multiple processors, such as the processor 1201 and the processor 1205 shown in FIG. 12. Each of these processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意结合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按 照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如:同轴电缆、光纤、数据用户线(digital subscriber line,DSL))或无线(例如:红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如:软盘、硬盘、磁带)、光介质(例如:数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如:固态硬盘(solid state disk,SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in 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 a website, computer, server, or data center. Transmission to another website, computer, server or data center via wired (for example: coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example: infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)) )Wait.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person of ordinary skill in the art can understand that all or part of the steps in the above embodiments can be implemented by hardware, or by a program to instruct relevant hardware. The program can be stored in a computer-readable storage medium. The storage medium mentioned can be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述为本申请提供的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above-mentioned examples provided for this application are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection scope of this application. Inside.

Claims (19)

  1. 一种转发报文的方法,其特征在于,所述方法包括:A method for forwarding messages, characterized in that the method includes:
    第一节点接收报文,所述第一节点为第一域内的任一节点,所述第一域为网络中的多个域中的任一域;A first node receives the message, the first node is any node in a first domain, and the first domain is any domain among multiple domains in the network;
    所述第一节点获取所述第一域内各个节点的一个或多个邻居关系,所述第一域内的边界节点的一个或多个邻居关系包括所述边界节点在第二域内的邻居关系,所述第二域为除所述第一域之外的域;The first node obtains one or more neighbor relationships of each node in the first domain, and the one or more neighbor relationships of border nodes in the first domain include neighbor relationships of the border nodes in the second domain, so The second domain is a domain other than the first domain;
    所述第一节点根据所述第一域内各个节点的一个或多个邻居关系,确定到达所述报文的目的节点的转发路径;Determining, by the first node, a forwarding path to the destination node of the message according to one or more neighbor relationships of each node in the first domain;
    所述第一节点按照确定的转发路径转发所述报文。The first node forwards the message according to the determined forwarding path.
  2. 如权利要求1所述的方法,其特征在于,所述第一节点获取所述第一域内各个节点的一个或多个邻居关系,包括:The method according to claim 1, wherein the first node acquiring one or more neighbor relationships of each node in the first domain comprises:
    对于所述各个节点中的第二节点,从所述第二节点的一个或多个邻居关系类型-长度-值TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居标识,所述第二节点为所述各个节点中的任一节点;For the second node in each of the nodes, select a neighbor relationship TLV from one or more neighbor relationship type-length-value TLVs of the second node, and obtain the neighbor identifier in the selected neighbor relationship TLV, the The second node is any one of the nodes;
    在所述选择的邻居关系TLV中携带的邻居标识指示一个虚拟邻居的情况下,从所述选择的邻居关系TLV中获取虚拟邻居子TLV,所述虚拟邻居子TLV携带邻居标识和路径标签,所述虚拟邻居子TLV携带的邻居标识用于指示所述第二节点对应的虚拟邻居的标识,所述虚拟邻居子TLV携带的路径标签用于指示所述第二节点到达所述虚拟邻居的路径,所述第二节点达到所述虚拟邻居的路径是通过所述第二域内的链路资源构建的;In the case where the neighbor identifier carried in the selected neighbor relationship TLV indicates a virtual neighbor, a virtual neighbor sub-TLV is obtained from the selected neighbor relationship TLV, and the virtual neighbor sub-TLV carries the neighbor identifier and the path label, so The neighbor identifier carried by the virtual neighbor sub-TLV is used to indicate the identifier of the virtual neighbor corresponding to the second node, and the path label carried by the virtual neighbor sub-TLV is used to indicate the path of the second node to the virtual neighbor, The path for the second node to reach the virtual neighbor is constructed through link resources in the second domain;
    根据所述虚拟邻居子TLV携带的邻居标识和路径标签确定所述第二节点的一个邻居关系。Determine a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV.
  3. 如权利要求2所述的方法,其特征在于,在所述选择的邻居关系TLV中携带的邻居标识与所述第二节点的标识相同的情况下,所述选择的邻居关系TLV中携带的邻居标识指示一个虚拟邻居。The method according to claim 2, wherein in the case that the neighbor identifier carried in the selected neighbor relationship TLV is the same as the identifier of the second node, the neighbor relationship carried in the selected neighbor relationship TLV The logo indicates a virtual neighbor.
  4. 如权利要求2所述的方法,其特征在于,所述获取选择的邻居关系TLV中的邻居标识之后,还包括:在所述选择的邻居关系TLV中携带的邻居标识指示一个正常邻居的情况下,根据所述选择的邻居关系TLV确定所述第二节点的一个邻居关系,所述正常邻居是指通过所述第一域内的链路资源与所述第二节点构建路径的节点。The method according to claim 2, wherein after obtaining the neighbor identifier in the selected neighbor relationship TLV, the method further comprises: when the neighbor identifier carried in the selected neighbor relationship TLV indicates a normal neighbor Determine a neighbor relationship of the second node according to the selected neighbor relationship TLV, and the normal neighbor refers to a node that constructs a path with the second node through link resources in the first domain.
  5. 如权利要求4所述的方法,其特征在于,在所述选择的邻居关系TLV中携带的邻居标识与所述第二节点的标识不相同的情况下,所述选择的邻居关系TLV中携带的邻居标识指示一个正常邻居。The method according to claim 4, wherein in the case that the neighbor identifier carried in the selected neighbor relationship TLV is different from the identifier of the second node, the selected neighbor relationship TLV carries The neighbor identifier indicates a normal neighbor.
  6. 如权利要求2至5任一所述的方法,其特征在于,所述从所述选择的邻居关系TLV中获取虚拟邻居子TLV之后,还包括:The method according to any one of claims 2 to 5, wherein after obtaining a virtual neighbor sub-TLV from the selected neighbor relationship TLV, the method further comprises:
    从所述虚拟邻居子TLV中获取虚拟邻居功能指示信息;Acquiring virtual neighbor function indication information from the virtual neighbor sub-TLV;
    在所述虚拟邻居功能指示信息指示所述虚拟邻居用于基于分段路由最优路径SR-BE技术转发报文的场景中,且当前处于基于SR-BE技术转发报文的场景的情况下,执行根据所述虚拟邻居子TLV携带的邻居标识和路径标签确定所述第二节点的一个邻居关系的步骤。In the case where the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segment routing optimal path SR-BE technology, and is currently in the scenario of forwarding packets based on the SR-BE technology, A step of determining a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV is performed.
  7. 如权利要求2至5任一所述的方法,其特征在于,所述从所述选择的邻居关系TLV中获取虚拟邻居子TLV之后,还包括:The method according to any one of claims 2 to 5, wherein after obtaining a virtual neighbor sub-TLV from the selected neighbor relationship TLV, the method further comprises:
    从所述虚拟邻居子TLV中获取虚拟邻居功能指示信息;Acquiring virtual neighbor function indication information from the virtual neighbor sub-TLV;
    在所述虚拟邻居功能指示信息指示所述虚拟邻居用于基于分段路由流程工程SR-TE技术转发报文的场景中,且当前处于基于SR-TE技术转发报文的场景的情况下,执行根据所述虚拟邻居子TLV携带的邻居标识和路径标签确定所述第二节点的一个邻居关系的步骤。When the virtual neighbor function indication information indicates that the virtual neighbor is used in the scenario of forwarding packets based on the segmented routing process engineering SR-TE technology, and is currently in the scenario of forwarding packets based on the SR-TE technology, execute The step of determining a neighbor relationship of the second node according to the neighbor identifier and the path label carried by the virtual neighbor sub-TLV.
  8. 如权利要求6或7所述的方法,其特征在于,所述虚拟邻居功能指示信息携带在所述虚拟邻居子TLV的控制位字段中。The method according to claim 6 or 7, wherein the virtual neighbor function indication information is carried in a control bit field of the virtual neighbor sub-TLV.
  9. 如权利要求1所述的方法,其特征在于,所述第一节点获取所述第一域内各个节点的一个或多个邻居关系,包括:The method according to claim 1, wherein the first node acquiring one or more neighbor relationships of each node in the first domain comprises:
    对于所述各个节点中第二节点,从所述第二节点的一个或多个邻居关系TLV中选择一个邻居关系TLV,获取选择的邻居关系TLV中的邻居子TLV,所述邻居子TLV用于指示所述第二节点到第三节点的邻居关系,所述第三节点为所述第一域或所述第二域中的节点,所述第二节点为所述各个节点中的任一节点。For the second node in each node, select a neighbor relationship TLV from one or more neighbor relationship TLVs of the second node, and obtain a neighbor sub-TLV in the selected neighbor relationship TLV, and the neighbor sub-TLV is used for Indicates the neighbor relationship between the second node and the third node, where the third node is a node in the first domain or the second domain, and the second node is any one of the nodes .
  10. 如权利要求1至9任一所述的方法,其特征在于,所述第一节点根据所述第一域内各个节点的一个或多个邻居关系,确定所述报文的转发路径,包括:The method according to any one of claims 1 to 9, wherein the first node determines the forwarding path of the message according to one or more neighbor relationships of each node in the first domain, comprising:
    从所述第一节点开始,所述第一节点依次执行根据当前节点的一个或多个邻居关系,确定所述当前节点的下一跳节点的步骤,直至确定出的下一跳节点为所述报文的目的节点时,得到所述报文的转发路径。Starting from the first node, the first node sequentially executes the step of determining the next hop node of the current node according to one or more neighbor relationships of the current node, until the determined next hop node is the When the destination node of the message, the forwarding path of the message is obtained.
  11. 如权利要求10所述的方法,其特征在于,所述根据当前节点的一个或多个邻居关系,确定所述当前节点的下一跳节点,包括:The method according to claim 10, wherein the determining the next hop node of the current node according to one or more neighbor relationships of the current node comprises:
    从所述当前节点的一个或多个邻居关系中确定到达所述目的节点的最优邻居关系;Determining the optimal neighbor relationship to the destination node from one or more neighbor relationships of the current node;
    在所述当前节点为边界节点、所述最优邻居关系为所述当前节点在所述第二域内的邻居关系、且所述当前节点到所述最优邻居关系所指示的节点之间的路径具有单向可达性的情况下,将所述最优邻居关系所指示的节点确定为所述当前节点的下一跳节点。The current node is a boundary node, the optimal neighbor relationship is the neighbor relationship of the current node in the second domain, and the path between the current node and the node indicated by the optimal neighbor relationship In the case of unidirectional reachability, the node indicated by the optimal neighbor relationship is determined as the next hop node of the current node.
  12. 如权利要求1至11任一所述的方法,其特征在于,所述第一节点获取所述第一域内各个节点的一个或多个邻居关系,包括:The method according to any one of claims 1 to 11, wherein the first node acquiring one or more neighbor relationships of each node in the first domain comprises:
    在所述第一节点与所述报文中指示的下一跳节点之间的链路有故障的情况下,获取所述第一域内各个节点的一个或多个邻居关系。In the case that the link between the first node and the next hop node indicated in the message is faulty, obtain one or more neighbor relationships of each node in the first domain.
  13. 一种转发报文的方法,其特征在于,所述方法包括:A method for forwarding messages, characterized in that the method includes:
    第一域和第二域之间的边界节点确定邻居关系TLV,所述邻居关系TLV用于指示所述边界节点在第二域内的邻居关系;The border node between the first domain and the second domain determines a neighbor relationship TLV, where the neighbor relationship TLV is used to indicate the neighbor relationship of the border node in the second domain;
    所述边界节点在所述第一域内发布所述邻居关系TLV。The border node publishes the neighbor relationship TLV in the first domain.
  14. 如权利要求13所述的方法,其特征在于,在所述邻居关系TLV携带的的邻居标识指示一个虚拟邻居的情况下,所述邻居关系TLV包括虚拟邻居子TLV,所述虚拟邻居子TLV携带邻居标识和路径标签,所述虚拟邻居子TLV携带的邻居标识用于指示所述边界节点对应的虚拟邻居的标识,所述虚拟邻居子TLV携带的路径标签用于指示所述边界节点到达所述虚拟邻居的路径,所述边界节点达到所述虚拟邻居的路径是通过所述第二域内的链路资源构建的。The method according to claim 13, wherein in the case that the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor, the neighbor relationship TLV includes a virtual neighbor sub-TLV, and the virtual neighbor sub-TLV carries Neighbor ID and path label, the neighbor ID carried by the virtual neighbor sub-TLV is used to indicate the ID of the virtual neighbor corresponding to the border node, and the path label carried by the virtual neighbor sub-TLV is used to indicate that the border node arrives at the border node. The path of the virtual neighbor, and the path from the border node to the virtual neighbor is constructed through link resources in the second domain.
  15. 如权利要求14所述的方法,其特征在于,在所述邻居关系TLV中携带的邻居标识与所述边界节点的标识相同的情况下,所述邻居关系TLV中携带的邻居标识指示一个虚拟邻居。The method according to claim 14, wherein in the case that the neighbor identifier carried in the neighbor relationship TLV is the same as the identifier of the border node, the neighbor identifier carried in the neighbor relationship TLV indicates a virtual neighbor .
  16. 如权利要求13所述的方法,其特征在于,所述邻居关系TLV包括邻居子TLV,所述邻居子TLV用于指示所述边界节点到第三节点的邻居关系,所述第三节点为所述第一域或所述第二域中的节点。The method according to claim 13, wherein the neighbor relationship TLV includes a neighbor sub-TLV, and the neighbor sub-TLV is used to indicate the neighbor relationship from the border node to a third node, and the third node is A node in the first domain or the second domain.
  17. 一种通信网络中的第一节点,其特征在于,所述第一节点为第一域内的任一节点,所述第一域为网络中的多个域中的任一域,所述第一节点包括存储器和处理器;A first node in a communication network, wherein the first node is any node in a first domain, the first domain is any one of a plurality of domains in the network, and the first The node includes a memory and a processor;
    所述存储器用于存储计算机程序;The memory is used to store a computer program;
    所述处理器用于执行所述存储器中存储的计算机程序以执行下述转发报文的方法:The processor is configured to execute a computer program stored in the memory to execute the following method for forwarding messages:
    接收报文;Receive message;
    获取所述第一域内各个节点的一个或多个邻居关系,所述第一域内的边界节点的一个或多个邻居关系包括所述边界节点在第二域内的邻居关系,所述第二域为除所述第一域之外的域;Obtain one or more neighbor relationships of each node in the first domain, the one or more neighbor relationships of border nodes in the first domain include neighbor relationships of the border nodes in a second domain, and the second domain is Domains other than the first domain;
    根据所述第一域内各个节点的一个或多个邻居关系,确定到达所述报文的目的节点的转发路径;Determine a forwarding path to the destination node of the message according to one or more neighbor relationships of each node in the first domain;
    按照确定的转发路径转发所述报文。The message is forwarded according to the determined forwarding path.
  18. 一种通信网络中的边界节点,其特征在于,所述边界节点为第一域和第二域之间的边界节点,所述边界节点包括存储器和处理器;A boundary node in a communication network, wherein the boundary node is a boundary node between a first domain and a second domain, and the boundary node includes a memory and a processor;
    所述存储器用于存储计算机程序;The memory is used to store a computer program;
    所述处理器用于执行所述存储器中存储的计算机程序以执行下述转发报文的方法:The processor is configured to execute a computer program stored in the memory to execute the following method for forwarding messages:
    确定邻居关系TLV,所述邻居关系TLV用于指示所述边界节点在第二域内的邻居关系;Determining a neighbor relationship TLV, where the neighbor relationship TLV is used to indicate the neighbor relationship of the border node in the second domain;
    在所述第一域内发布所述邻居关系TLV。Publish the neighbor relationship TLV in the first domain.
  19. 一种转发报文的系统,其特征在于,所述系统包括第一节点和第二节点,所述第一节点为第一域内的任一节点,所述第二节点为所述第一域和第二域之间的边界节点;A system for forwarding messages, characterized in that the system includes a first node and a second node, the first node is any node in the first domain, and the second node is the first domain and The boundary node between the second domain;
    所述第二节点用于确定邻居关系TLV,所述邻居关系TLV用于指示所述边界节点在第二域内的邻居关系,在所述第一域内发布所述邻居关系TLV;The second node is used to determine a neighbor relationship TLV, and the neighbor relationship TLV is used to indicate the neighbor relationship of the border node in the second domain, and publish the neighbor relationship TLV in the first domain;
    所述第一节点用于接收所述邻居关系TLV。The first node is used to receive the neighbor relationship TLV.
PCT/CN2020/117228 2019-10-22 2020-09-23 Packet forwarding method, device, and storage medium WO2021077972A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911005235.9 2019-10-22
CN201911005235.9A CN112702263B (en) 2019-10-22 2019-10-22 Method and device for forwarding message

Publications (1)

Publication Number Publication Date
WO2021077972A1 true WO2021077972A1 (en) 2021-04-29

Family

ID=75504749

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117228 WO2021077972A1 (en) 2019-10-22 2020-09-23 Packet forwarding method, device, and storage medium

Country Status (2)

Country Link
CN (1) CN112702263B (en)
WO (1) WO2021077972A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404216A (en) * 2011-11-23 2012-04-04 华为技术有限公司 Method for TRILL (transparent interconnection of lots of links) network protection, routing bridge and system
CN103023774A (en) * 2012-11-30 2013-04-03 中兴通讯股份有限公司 Multi-domain routing computation method and apparatus, path computation unit and routing network
WO2017007381A1 (en) * 2015-07-06 2017-01-12 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for determining synchronisation references
CN108768856A (en) * 2018-05-31 2018-11-06 新华三技术有限公司 A kind of route processing method and device
CN109525423A (en) * 2018-11-06 2019-03-26 深圳市风云实业有限公司 Automatic network-building method, device and computer equipment
CN109802888A (en) * 2017-11-16 2019-05-24 中兴通讯股份有限公司 A kind of method and device based on anycast address protection

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102325A (en) * 2006-11-09 2008-01-09 华为技术有限公司 Method and device for notifying boundary connection information of autonomous system
CN102264009B (en) * 2010-05-28 2013-11-06 华为技术有限公司 Virtual path acquisition method, relevant devices and network system
US9942145B2 (en) * 2015-07-20 2018-04-10 Cisco Technology, Inc. Attribute SET_ID in border gateway protocol
CN105791457B (en) * 2016-02-26 2019-04-09 新华三技术有限公司 A kind of data processing method and device
CN107689915A (en) * 2016-08-04 2018-02-13 中兴通讯股份有限公司 Message forwarding method and device
CN108574628B (en) * 2017-03-13 2022-09-27 中兴通讯股份有限公司 Method, device and system for establishing domain-level topology

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404216A (en) * 2011-11-23 2012-04-04 华为技术有限公司 Method for TRILL (transparent interconnection of lots of links) network protection, routing bridge and system
CN103023774A (en) * 2012-11-30 2013-04-03 中兴通讯股份有限公司 Multi-domain routing computation method and apparatus, path computation unit and routing network
WO2017007381A1 (en) * 2015-07-06 2017-01-12 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for determining synchronisation references
CN109802888A (en) * 2017-11-16 2019-05-24 中兴通讯股份有限公司 A kind of method and device based on anycast address protection
CN108768856A (en) * 2018-05-31 2018-11-06 新华三技术有限公司 A kind of route processing method and device
CN109525423A (en) * 2018-11-06 2019-03-26 深圳市风云实业有限公司 Automatic network-building method, device and computer equipment

Also Published As

Publication number Publication date
CN112702263A (en) 2021-04-23
CN112702263B (en) 2023-12-19

Similar Documents

Publication Publication Date Title
US11799773B2 (en) EVPN packet processing method, device, and system
US11533249B2 (en) Route processing method and apparatus, and data transmission method and apparatus
US11310079B2 (en) EVPN packet processing method, device, and system for MAC learning via MAC/IP advertisement route
CN108574616B (en) Method, equipment and system for processing route
CN111865796B (en) Path Computation Element Central Controller (PCECC) for network traffic
WO2021170092A1 (en) Message processing method and apparatus, and network device and storage medium
US10432427B2 (en) Border gateway protocol for communication among software defined network controllers
US10003531B2 (en) Method for establishing tunnel, method for allocating label, device and network system
US7751405B1 (en) Automatic configuration of label switched path tunnels using BGP attributes
US20210203586A1 (en) Communication Method, Device, and System
WO2009111959A1 (en) Method and device for route installation and distribution
US20170093685A1 (en) Generating service-optimized paths based on enhanced eigrp telemetry
US11240063B2 (en) Methods, nodes and computer readable media for tunnel establishment per slice
WO2022127586A1 (en) Message processing method, node, and computer-readable storage medium
US20200336334A1 (en) Controlling Device and Method Implemented Thereon for Ethernet Virtual Private Netwok
CN106416153B (en) LDP handoff threshold TLV representing LSP handoff threshold
US20130259057A1 (en) Pseudowire groups in a packet switched network
WO2021077972A1 (en) Packet forwarding method, device, and storage medium
WO2024007762A1 (en) Route publishing method, and communication method and apparatus
US20240056392A1 (en) Communication method and apparatus
WO2022042610A1 (en) Information processing method, network controller, node and computer-readable storage medium
CN116264589A (en) Message transmission method and device
CN114978975A (en) Fast rerouting of BUM traffic in ethernet virtual private networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20879639

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20879639

Country of ref document: EP

Kind code of ref document: A1