WO2021078171A1 - Message transmission method and device, and digital processing chip - Google Patents

Message transmission method and device, and digital processing chip Download PDF

Info

Publication number
WO2021078171A1
WO2021078171A1 PCT/CN2020/122573 CN2020122573W WO2021078171A1 WO 2021078171 A1 WO2021078171 A1 WO 2021078171A1 CN 2020122573 W CN2020122573 W CN 2020122573W WO 2021078171 A1 WO2021078171 A1 WO 2021078171A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
label
short
long
message
Prior art date
Application number
PCT/CN2020/122573
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 WO2021078171A1 publication Critical patent/WO2021078171A1/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/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source 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/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • H04L45/507Label distribution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Definitions

  • This application relates to network communication technology, in particular to a message transmission method, device, and digital processing chip.
  • Segment routing is a network transmission technology.
  • the transmission of multi-protocol label switching (muti-protocol label switching, MPLS) labels can be used to implement message transmission.
  • the first node pushes the MPLS long labels of all nodes included in the node path at one time.
  • Each node of the node path determines the egress port and next hop address of the forwarded packet according to the corresponding MPLS long label. Due to the large number of layers of MPLS long labels, the overhead is too large and the efficiency of packet encapsulation is low.
  • the present application provides the embodiments of the present application provide a message transmission method, related equipment, and digital processing chip, which are used to reduce the overhead of the message in the process of message transmission and improve the encapsulation efficiency of the message.
  • an embodiment of the present invention provides a message transmission method.
  • the method includes: first, the node obtains a short label, the short label is used to indicate the forwarding information of the next-hop node to forward the message, and the length of the short label is less than 20 bits; then, the node replaces at least part of the bits of the target label with the short label, The target label is in the message; subsequently, the node sends the message to the next hop node.
  • the head node converts the long label stack into short labels.
  • the short label stack effectively improves the efficiency of packet encapsulation and transmission.
  • the network can support node paths with a larger number of nodes.
  • the node is the first node of the node path, and the node path includes the first node and N nodes arranged in the order of transmitting the message.
  • Non-head node before the node obtains the short label, the method further includes: the node obtains a long label stack, the long label stack includes N long labels, the N long labels correspond to the N non-head nodes, and the long label is used to indicate the corresponding node The forwarding information of the forwarded message; the node converts the long label stack into a short label stack, the short label stack includes the target label and N short labels, and the N short labels and N long labels correspond to the N non-head nodes respectively; the node will The short label stack is encapsulated into the message.
  • the head node can successfully convert the long label stack to the short label stack. Therefore, the message is forwarded based on the short label stack, and the encapsulation efficiency and transmission efficiency of the message are improved.
  • the target label includes the first field
  • the node converting the long label stack to the short label stack includes: the node determines the first value , N long labels all include the first value; the node sets the first field to the first value.
  • the first field of the target tag is not used for the association of forwarding information.
  • the purpose of associating forwarding information can be achieved only through the second field. This reduces the number of bits used to associate forwarding information in the target tag.
  • the node converting the long label stack to the short label stack includes: the node determines that the N short labels are N second Numerical value, and the N second numerical values are part of the bits included in the N long tags.
  • the first node determines N second values in the long label stack.
  • the N second values are respectively used to correlate the forwarding information of N non-head nodes. Because the length of the second value is less than 20bit. Effectively reduce the length of the associated forwarding information.
  • the target label further includes a second field
  • the node is a non-tail node of the node path
  • the node adds at least part of the target label
  • the replacement of bits with short labels includes: the node sets the second field to the second value.
  • the non-tail node when the message is forwarded to a non-tail node.
  • the non-tail node After the non-tail node determines the associated forwarding information according to the second field of the target label, the non-tail node dynamically sets the second field of the target label.
  • the second field that has been set is the short label corresponding to the next hop node. It can be seen that through the dynamic setting of the second field by each non-tail node, each non-tail node directly forwards the message according to the second field. Effectively improve the message forwarding efficiency.
  • the node is a non-head node of the node path, and before the node replaces at least some bits of the target label with a short label, the method It also includes: the node determines that the first field is the same as the preset value.
  • the node can forward the message based on the short label stack. If the node determines that the second field is not equal to the preset value, the node can forward the message based on the existing long label stack. It enables the node to be compatible with different label stacks to realize message forwarding.
  • the node converting the long label stack to the short label stack includes: the node obtains label correspondences, and the label correspondences include N The correspondence between the long label and the N short labels; the node determines the N short labels according to the label correspondence.
  • the node is a non-tail node of the node path
  • the node replacing at least part of the bits of the target label with a short label includes: node Make sure that the target tag is a short tag.
  • the node is an intermediate node of the node path, and before the node replaces at least part of the bits of the target label with a short label, the method also Including: the node determines the long label corresponding to the target label according to the label correspondence relationship; the node determines the corresponding forwarding information according to the long label.
  • each non-tail node on the node path directly uses the short label as an index, and the long label can be determined by querying the label correspondence.
  • the node acquiring the short label includes: the node acquiring the short label according to at least one indication field included in the short label stack, at least An indication field is used to indicate the short label.
  • each node can accurately determine the corresponding short label according to the indication of the indication field. This effectively guarantees that the message can be transmitted along multiple nodes included in the node path.
  • an embodiment of the present invention provides a message transmission method.
  • the method includes: first, a control device obtains a long label stack, the long label stack includes N long labels, N long labels and N included in the node path
  • the non-head nodes correspond respectively, and the N long labels respectively include N short labels.
  • the short labels are used to indicate the path for the corresponding node to forward the message, and the length of the short label is less than 20 bits; then, the control device sends the long label stack to the node.
  • the long label further includes the first value, and the N long labels all include the first value.
  • an embodiment of the present invention provides a message transmission method.
  • the method includes: first, a control device sends a long label stack to a node, the long label stack includes N long labels, and the N long labels and the path included in the node The N non-head nodes correspond to each other, and the long label is used to indicate the path for the corresponding node to forward the message; the control device sends the label correspondence to the node, and the label correspondence includes the correspondence between N long labels and N short labels.
  • an embodiment of the present invention provides a forwarding device, including: a processor, a memory, and a transceiver, wherein the processor, the memory, and the transceiver are interconnected through a line, and the processor calls the program code in the memory to execute the foregoing Functions related to processing in the message transmission method shown in any one of the first aspect.
  • the transceiver is used to perform functions related to receiving and sending in the message transmission method shown in any one of the foregoing first aspects.
  • an embodiment of the present invention provides a control device, including: a processor, a memory, and a transceiver, where the processor, the memory, and the transceiver are interconnected through a line, and the processor calls the program code in the memory to execute the above A processing-related function in the message transmission method shown in any one of the second aspect or the third aspect.
  • the transceiver is used to perform functions related to receiving and sending in the message transmission method shown in any one of the second aspect or the third aspect.
  • an embodiment of the present invention provides a digital processing chip.
  • the chip includes a processor and a memory.
  • the memory and the processor are interconnected by wires.
  • the memory stores instructions.
  • the processor is used to execute the above-mentioned first to third aspects. Functions related to processing in any of the message transmission methods.
  • an embodiment of the present invention provides a communication system.
  • the communication system includes a control device and a plurality of forwarding devices.
  • the control device is as shown in the above fifth aspect.
  • the forwarding device is as shown in the above-mentioned fourth aspect.
  • an embodiment of the present invention provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the message transmission in any one of the first to third aspects. method.
  • an embodiment of the present invention provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the message transmission method in any one of the foregoing first aspect to the third aspect.
  • Figure 1 is a diagram of an example structure of a transport network
  • Figure 2 is an example diagram of a process of SR technology for message transmission
  • Figure 3 is a diagram of an example structure of a long label stack
  • Figure 4 is a structural example diagram of a short label stack provided by this application.
  • FIG. 5 is a flowchart of the steps of an embodiment of the message transmission method provided by this application.
  • Figure 6 is an example diagram of a partial structure of a long label stack
  • FIG. 7 is a diagram of another example structure of the short label stack provided by this application.
  • FIG. 8 is a flowchart of the steps of another embodiment of the message transmission method provided by this application.
  • FIG. 9 is a structural example diagram of a forwarding device or a control device provided by this application.
  • Fig. 10 is a structural example diagram of the communication network provided by this application.
  • Figure 1 does not limit the specific type of the transport network.
  • Figure 1 shows an example where the type of the transport network is a microwave (MW) network.
  • MW microwave
  • it can also be used for any other transport network.
  • optical transport network optical transport network, OTN
  • digital subscriber line digital subscriber line
  • DSL digital subscriber line
  • Ethernet Ethernet
  • the microwave network 100 includes at least one node path.
  • This node path is used to transmit service data from the customer network 102.
  • This application does not limit the specific network type of the client network 102.
  • the node path includes a first node 101, a plurality of intermediate nodes 103, and a tail node 104 arranged in the order of the transmission message.
  • the first node 101 is located at the entrance of the microwave network 100.
  • the head node 101 is used to receive service data from the customer network 102.
  • the intermediate node 103 is located inside the microwave network 100.
  • the tail node 104 is located at the exit of the microwave network 100.
  • Figure 1 takes the number of intermediate nodes of 4 as an example for illustration.
  • Figure 1 shows an example where each node is a label switching router (LSR).
  • LSR label switching router
  • nodes take the node path including 6 nodes arranged in the order of transmitting the message as an example.
  • the 6 nodes are the A node to the F node shown in FIG. 2.
  • node A is the first node of the node path.
  • the F node is the end node of the node path.
  • Nodes B to E are all intermediate nodes of the node path.
  • the A node can push the long label stack of the node path once before the service data to form the message.
  • the long label stack supports the transmission of messages from node A to node F. The structure of the long label stack is described below with reference to Figure 3:
  • the value of layer N is 5, which means that the long label has 5 layers of long labels.
  • the five layers of long labels are long label B to long label F respectively.
  • the long label 301 has four fields in total, namely, a label field (Label) field, an extended field (Exp) field, a stack bottom identifier (S) field, and a time-to-live (TTL) field.
  • label field label field
  • Exp extended field
  • S stack bottom identifier
  • TTL time-to-live
  • the length of the Label field is 20 bits (bit), which is used to associate forwarding information used for forwarding the message.
  • the forwarding information may include the address of the egress port and the next hop node (C node).
  • the length of the Exp field is 3 bits.
  • the length of the S field is 1 bit, and when the S field is 1, it indicates that the long label is the bottom label of the long label stack. When the S field is 0, it means that there is a next hop node.
  • the S field of the long label 301 shown in FIG. 3 is 0.
  • the length of the time to live (TTL) field is 8 bits, which indicates how many hops the message can transmit. For the description of other long labels in the label stack, please refer to Long Label B for details.
  • Node B can obtain the outermost long label (long label B) after receiving the message. Node B can find out the outgoing port associated with long label B and the address of the next hop node. Node B peels off the outermost long label (ie, long label B). Node B can forward the message to the next hop node (node C) through the outgoing port.
  • Intermediate nodes treat long labels in the same way as node B. It can be seen that each intermediate node forwards the message according to the outermost label. And each intermediate node also strips the outer long label hop by hop. Until the message is transmitted to the tail node (F node). The business data is restored by the F node to complete the business processing.
  • the first node needs to encapsulate more long labels.
  • node A needs to encapsulate a 5-layer long label. Each long label occupies 4 bytes (Bytes).
  • the header forwarded by node A requires an additional 20Bytes to encapsulate the long label stack.
  • the encapsulation efficiency of the message refers to the proportion of business data in the entire message. It can be seen that the more layers of the long label encapsulated in the message, the lower the encapsulation efficiency of the message. The lower the packet encapsulation efficiency is, the lower the packet transmission efficiency will be.
  • the message transmission scheme shown in Figure 2 is also limited by the hardware processing capabilities of the nodes. For example, if the node has the ability to process 10-layer long labels at most. The node can support a node path with 10 nodes at most. The node cannot support node paths with more than 10 nodes.
  • the short label stack also includes the target label, whose length is 20 bits as an example.
  • the short label stack also includes N short labels, that is, short label 1 to short label N shown in FIG. 4.
  • the value of N represents the number of non-first nodes included in the node path. It can be seen that the N short labels included in the short label stack shown in FIG. 4 respectively correspond to the N non-head nodes of the node path.
  • the N short labels included in the short label stack are arranged in sequence according to the order of the transmission message.
  • the length of each short label is not limited, as long as the length of each short label is less than 20 bits.
  • the length of the short label is 8 bits.
  • the short label stack includes two indication fields as an example, that is, the first indication field and the second indication field.
  • the length of the first indication field may be 4 bits, which is used to indicate the total number of short labels included in the short label stack.
  • the length of the second indication field is 4 bits, which is used to indicate the number of the short label of the node currently performing packet forwarding in the short label stack. It should be clear that the description of the number and functions of the indication fields shown in FIG. 4 is an optional example and is not limited. As long as each node on the node path determines the short label corresponding to the next hop node according to the indication of the indication field.
  • the implementation of SR may be an SR deployed on the MPLS data plane.
  • the implementation of SR can also be applied to the Internet Protocol Version 6 (Internet Protocol Version 6, IPv6) network. It is called segment routing over IPv6 (SRv6) based on IPv6.
  • IPv6 Internet Protocol Version 6, IPv6
  • the short label stack shown in FIG. 4 can be used in any of the above-mentioned implementations of SR. It should be clear that the short label stack shown in FIG. 4 can also be used in other SR implementations, and is not limited.
  • Step 501 The control device sends the long label stack to the first node.
  • the long label stack is sent by the control device to the head node as an example. In other examples, the long label stack may also be generated in advance by the head node.
  • the upper L bits refer to the first L bits included in the label field.
  • the lower M bits refer to the last M bits included in the label field.
  • the L bit can also be located in the high bit of the label field, and the M bit can also be located in the low bit of the label field.
  • all the high-order L bits included in the long label stack are the first value 601.
  • the value of the first value 601 is the same in the label field of different long labels.
  • the value of L may be 12. That is, the length of the first value 601 of each long tag is 12 bits.
  • the value of each first value 601 is "101001011010". It should be clear that the description of the value and length of the first value 601 is not limited in this embodiment.
  • the low-order M bits included in the long tag are the second value 602.
  • the second value 602 included in the label field of different long labels is different.
  • the value of M may be 8.
  • the length of the second value 602 of each long tag is 8 bits.
  • the second value 602 of the label field 603 is "10101010”
  • the second value 602 of the label field 604 is "010110101”... It should be clear that the description of the specific value of the second value 602 in this embodiment is an optional example and is not limited.
  • Step 502 The head node receives the long label stack from the control device.
  • Step 503 The first node judges whether the trigger condition is met, and if so, execute step 504.
  • the first node when the first node obtains the long label stack, it needs to determine whether the trigger is satisfied.
  • the first node that meets the trigger condition has the ability to execute the message transmission method shown in this embodiment.
  • the trigger conditions shown in this embodiment may specifically include trigger condition a and trigger condition b, which are specifically as follows:
  • the trigger condition a may be: all the first values included in the long label stack have the same value. And the first value is the same as the preset value.
  • the preset value may be sent by the control device to the first node, or may be sent to the control device after being configured by the first node, and the specific value is not limited.
  • the first node can determine that all the first values have the same value. And the first value is the same as the preset value "101001011010". The first node determines that the trigger condition a is satisfied.
  • the trigger condition b may be: the first node obtains the configured enable (enable) field. Wherein, when the value of the enable field is 0, it indicates that the first node does not satisfy the trigger condition b. If the value of the enable field is 1, it indicates that the first node meets the trigger condition b.
  • the triggering of the first node to perform step 504 is taken as an example for description.
  • step 503 shown in this embodiment is: if the initiating node meets the trigger condition, the initiating node can forward the message based on the short label stack. If the initiating node does not meet the trigger condition, the initiating node can forward the message based on the existing long label stack.
  • the first node can be compatible with different label stacks to realize message forwarding.
  • step 503 shown in this embodiment is an optional step.
  • the head node may directly perform step 504.
  • Step 504 The first node determines the address of the outgoing port and the next hop node.
  • the first node After the first node obtains the long label stack, it determines the addresses of the outgoing port and the next hop node according to the outer long label of the long label stack. Specifically, the head node determines the associated egress port and the address of the next hop node according to the label field of the outermost long label.
  • Step 505 The first node converts the long label stack into a short label stack.
  • the first node needs to convert the long label stack into a short label stack.
  • the short label stack structure please refer to Figure 4 for details. The following describes the specific process of how the first node converts the long label stack into the short label stack:
  • the first node determines the first value and the second value among N long labels.
  • N long labels correspond to N non-head nodes included in the node path. Specifically, since the head node has obtained the corresponding outgoing port and the address of the next hop node according to the outer long label of the long label stack, there is no need to convert the long label of the head node into a short label.
  • the first value and the second value please refer to step 501 for details.
  • the target tag includes a first field and a second field.
  • the first node can set the first field to the first value.
  • the second field is the second value included in the long label of the next hop node.
  • the head node may set the second field to "10101010".
  • the first node determines that the N short labels are respectively N second values.
  • This embodiment does not limit the sequence of execution timing between step 504 and step 505.
  • Step 506 The head node forwards the message to the next hop node.
  • the head node When the head node obtains the message, it encapsulates the short label into the header of the message.
  • the next hop node of the first node is an intermediate node of the node path as an example for illustration. In other examples, the next hop node of the head node may also be the tail node. Specifically, the first node forwards the message to the next hop node according to the determined egress port and the address of the next hop node.
  • Step 507 The intermediate node receives the message from the previous hop node.
  • the intermediate node shown in this step can be any intermediate node of the node path.
  • Step 508 The intermediate node judges whether the trigger condition is met, and if so, execute step 509.
  • Step 509 The intermediate node determines the address of the outgoing port and the next hop node.
  • the intermediate node determines the associated egress port and the address of the next hop node according to the second field of the target label.
  • Step 510 The intermediate node determines the short label corresponding to the next hop node.
  • the intermediate node When the intermediate node obtains the short label stack, it may obtain the first indication information and the second indication information.
  • first instruction information and the second instruction information For the specific description of the first instruction information and the second instruction information, please refer to Figure 4 for details. It is assumed that the short label stack shown in this embodiment is used as shown in FIG. 2, and the intermediate node shown in this step is Node B as an example. In this example, the number indicated by the first indication information is 5.
  • the second indication information indicates that the short label corresponding to the Node B is the first one in the short label stack.
  • the intermediate node can determine the short label corresponding to the next hop node of the intermediate node among the N short labels included in the short label stack. As shown in FIG. 4, the intermediate node determines, according to the first indication information and the second indication information, that the short label corresponding to the next hop node is the second of the five short labels, that is, the short label 2 of the C node. It should be clear that the description of how the intermediate node determines the short label corresponding to the next hop node in this embodiment is an optional example and is not limited.
  • Step 511 The intermediate node replaces the second field of the target label with the short label corresponding to the next hop node.
  • each intermediate node determines the outgoing port and the next hop address according to the second field of the target label.
  • the intermediate node can also dynamically change the second field of the target label.
  • the changed second field is the short label corresponding to the next hop node. Therefore, after the next hop node receives the short label stack, it can determine how to forward the message according to the second field.
  • Step 512 The intermediate node forwards the message to the next hop node.
  • Step 513 The tail node strips the short label stack from the message.
  • the specific number of intermediate nodes included in the node path is not limited.
  • the message obtained by the tail node has been encapsulated with the short label stack. And because the tail node does not need to forward the message to the next hop node.
  • the tail node can directly strip the entire short label stack from the header. In this way, the business data is restored, and the tail node can perform corresponding business processing on the business data.
  • each non-tail node can strip its corresponding short label from the short label.
  • the tail node is responsible for stripping short labels as an example, which can effectively improve the alignment of the short label stack format, reduce the difficulty of processing the short labels by the node, and improve the processing efficiency.
  • the head node converts the long label stack into the short label stack, which effectively reduces the length of the label stack.
  • the 5-layer long label is converted into a short label.
  • the short label stack can effectively improve the encapsulation efficiency of the message, thereby improving the transmission efficiency of the message.
  • the length of each short label shown in this embodiment is small, so that the node can support a node path with a larger number of nodes to forward the message.
  • the target label of the short label stack shown in FIG. 7 is no longer divided into the first field and the second field.
  • the length of the target label shown in Figure 7 is equal to the length of the short label. Since the length of the short label is less than 20 bits, the length of the target label is also less than 20 bits. For example, if the length of the short label is 4 bits, the length of the target label is also 4 bits.
  • Step 801 The control device sends the long label stack to the first node.
  • Step 802 The control device sends the label correspondence to the head node.
  • each node needs to obtain a long label for associated forwarding information.
  • the control device shown in this embodiment may send the label correspondence to the head node.
  • the label correspondence relationship establishes the correspondence relationship between the short label and the long label of each non-tail node on the node path. Specifically, the label correspondence relationship establishes the correspondence relationship between the label fields of the short label and the long label of each non-tail node.
  • control device may pass one of the intermediate system to the intermediate system (intermediate system to intermediate system, open shortest path first (OSPF), and border gateway protocol (border gateway protocol, BGP) to the first
  • the node sends the correspondence to the label.
  • OSPF open shortest path first
  • BGP border gateway protocol
  • steps 801 and 802 shown in this embodiment are optional steps. It should be clarified that the label correspondence can also be configured in advance by the first node. It is also obtained through negotiation between the first node and other nodes.
  • Step 803 The head node receives the long label stack from the control device.
  • Step 804 The first node receives the label correspondence from the control device.
  • Step 805 The first node judges whether the trigger condition is met, and if so, step 806 is executed.
  • the trigger condition shown in this embodiment is the trigger condition b shown in FIG. 5.
  • the trigger condition b shown in FIG. 5 please refer to step 503 shown in FIG. 5 for details.
  • Step 806 The first node determines the address of the outgoing port and the next hop node.
  • the first node After the first node obtains the long label stack, the first node determines the long label at the outermost layer of the long label stack. The first node can determine the associated egress port and the address of the next hop node based on the long label.
  • Step 807 The first node converts the long label stack into a short label stack.
  • the first node uses N long tags as an index, and determines the corresponding N short tags by querying the corresponding relationship of the tags. The first node then sets the N short labels in the short label stack according to the transmission sequence of the message. The head node determines all the bits of the target label as the short label corresponding to the next hop node of the head node.
  • Step 808 The head node forwards the message to the next hop node.
  • step 505 shown in Figure 5 For the specific execution process, please refer to step 505 shown in Figure 5 for details.
  • Step 809 The intermediate node receives the message from the previous hop node.
  • the intermediate node shown in this step can be any intermediate node of the node path.
  • Step 810 The intermediate node receives the label correspondence from the control device.
  • the label correspondence received by the intermediate node may be the same as the label correspondence received by the first node.
  • the label correspondence received by the intermediate node may also only include the correspondence between the short label and the long label of the intermediate node. It should be clarified that the label correspondence can also be configured in advance by the intermediate node. It is also negotiated by the intermediate node and other nodes to obtain it.
  • Step 811 The intermediate node determines whether the trigger condition is met, and if so, execute step 812.
  • Step 812 The intermediate node determines the address of the outgoing port and the next hop node.
  • the intermediate node uses the target label as an index, and determines the corresponding long label by querying the label correspondence.
  • the long label is associated with the outgoing port of the intermediate node and the address of the next hop node.
  • Step 813 The intermediate node determines the short label corresponding to the next hop node.
  • step 510 For the process that the intermediate node determines the short label corresponding to the next hop node in the short label stack, refer to step 510.
  • Step 814 The intermediate node replaces the target label with the short label corresponding to the next hop node.
  • all bits of the target label can be replaced with the short label corresponding to the next hop node.
  • Step 815 The intermediate node forwards the message to the next hop node.
  • Step 816 The tail node strips the short label stack from the message.
  • step 815 to step 816 For the specific execution process of step 815 to step 816 shown in this embodiment, reference may be made to step 512 to step 513 shown in FIG. 5.
  • each non-tail node on the node path is directly indexed by the short label, which can be determined by querying the label correspondence relationship. Long label.
  • FIG. 9 may be a schematic structural diagram of a forwarding device.
  • the forwarding device may be any one of the head node, the intermediate node, and the tail node in the foregoing method embodiment.
  • the forwarding device includes a processor 901, a memory 902, and a transceiver 903.
  • the processor 901, the memory 902, and the transceiver 903 are interconnected by wires.
  • the memory 902 is used to store program instructions and data.
  • the memory 902 stores program instructions and data that are executed by the node in supporting the steps shown in FIG. 5 and FIG. 8.
  • the processor 901 and the transceiver 903 are configured to execute the method steps shown in any one of the embodiments in FIG. 5 and FIG. 8.
  • the transceiver 903 is used to perform step 502 and step 506.
  • the processor 901 is configured to execute step 503 to step 505.
  • the transceiver 903 is used to perform step 803, step 804, and step 808.
  • the processor 901 is configured to execute step 805 to step 807.
  • the transceiver 903 is used to perform step 507 and step 512.
  • the processor 901 is configured to execute step 508 to step 511.
  • the transceiver is used to perform step 809 and step 815.
  • the processor 901 is configured to execute step 810 to step 814.
  • the processor 901 is configured to perform step 513. In FIG. 8, the processor 901 is configured to perform step 816.
  • FIG. 9 may also be a structural example diagram of the control device.
  • the memory 902 shown in FIG. 9 stores program instructions and data executed by the control device in the steps shown in FIG. 5 and FIG. 8.
  • the processor 901 and the transceiver 903 are used to execute the steps shown in any one of the embodiments in FIGS. 5 and 8. The method steps shown.
  • the transceiver 901 is used to perform step 501 shown in FIG. 5.
  • the transceiver 901 is used to perform step 801 to step 802 shown in FIG. 8.
  • the communication system shown in this embodiment includes a control device 1001, a forwarding device 1002 as a head node, one or more forwarding devices 1003 as intermediate nodes, and a forwarding device 1004 as a tail node.
  • a control device 1001 a forwarding device 1002 as a head node
  • forwarding devices 1003 as intermediate nodes
  • forwarding device 1004 as a tail node.
  • the specific description of forwarding equipment and control equipment please refer to Figure 9 for details.
  • This embodiment does not limit the specific number of forwarding devices 1003 as intermediate nodes.
  • the embodiment of the application also provides a digital processing chip.
  • the digital processing chip integrates a circuit for realizing the functions of the processor 901 and one or more interfaces.
  • the digital processing chip can complete the method steps of any one or more of the foregoing embodiments.
  • the memory is not integrated in the digital processing chip, it can be connected to an external memory through an interface.
  • the digital processing chip implements the actions performed by the control device or the forwarding device in the foregoing embodiment according to the program code stored in the external memory.
  • the above-mentioned processing unit or processor may be a central processing unit, a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device , Transistor logic devices, hardware components, or any combination thereof.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • Transistor logic devices hardware components, or any combination thereof.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • 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.
  • computer instructions may be transmitted from a website, computer, server, or data center through a cable (such as Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to transmit to another website site, 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 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, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium.

Landscapes

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

Abstract

Disclosed are a message transmission method, a related device, and a digital processing chip, wherein same are used for improving the encapsulation efficiency and the transmission efficiency of a message. The method of the embodiments of the present application comprises the following steps: a node acquiring a short tag, wherein the short tag is used for indicating forwarding information that a next-hop node forwards a message, and the length of the short tag is less than 20 bits; a node replacing at least some of the bits of a target tag with the short tag, wherein the target tag is located in the message; and then, the next-hop node of the node sending the message.

Description

一种报文传输方法、设备以及数字处理芯片Message transmission method, equipment and digital processing chip
本申请要求于2019年10月25日提交中国国家知识产权局、申请号为201911025945.8、发明名称为“一种报文传输方法、设备以及数字处理芯片”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office of China, the application number is 201911025945.8, and the invention title is "a message transmission method, equipment and digital processing chip" on October 25, 2019, and its entire contents Incorporated in this application by reference.
技术领域Technical field
本申请涉及网络通信技术,特别涉及一种报文传输方法、设备以及数字处理芯片。This application relates to network communication technology, in particular to a message transmission method, device, and digital processing chip.
背景技术Background technique
分段路由(segment routing,SR)是一种网络传送技术。可利用传递多协议标签交换(muti-protocol label switching,MPLS)标签,以实现报文的传输。Segment routing (SR) is a network transmission technology. The transmission of multi-protocol label switching (muti-protocol label switching, MPLS) labels can be used to implement message transmission.
使用SR技术时,首节点一次性地压入节点路径包括的所有节点的MPLS长标签。节点路径的各节点根据对应的MPLS长标签确定转发报文的出端口和下一跳地址。因MPLS长标签的层数较多,导致开销过大以及报文的封装效率低。When using SR technology, the first node pushes the MPLS long labels of all nodes included in the node path at one time. Each node of the node path determines the egress port and next hop address of the forwarded packet according to the corresponding MPLS long label. Due to the large number of layers of MPLS long labels, the overhead is too large and the efficiency of packet encapsulation is low.
发明内容Summary of the invention
本申请提供本申请实施例提供了一种报文传输方法、相关设备以及数字处理芯片,用于降低报文传输过程中的报文的开销以及提高报文的封装效率。The present application provides the embodiments of the present application provide a message transmission method, related equipment, and digital processing chip, which are used to reduce the overhead of the message in the process of message transmission and improve the encapsulation efficiency of the message.
第一方面,本发明实施例提供了一种报文传输方法。该方法包括:首先,节点获取短标签,短标签用于指示下一跳节点转发报文的转发信息,短标签的长度小于20比特;随后,节点将目标标签的至少部分比特替换为短标签,目标标签位于报文中;随后,节点向下一跳节点发送报文。In the first aspect, an embodiment of the present invention provides a message transmission method. The method includes: first, the node obtains a short label, the short label is used to indicate the forwarding information of the next-hop node to forward the message, and the length of the short label is less than 20 bits; then, the node replaces at least part of the bits of the target label with the short label, The target label is in the message; subsequently, the node sends the message to the next hop node.
在该实施方式中,首节点将长标签栈转换为短标签。通过短标签栈有效提高了报文的封装效率以及传输效率。而且因短标签的长度较短,使得网络能支持具有更多节点数量的节点路径。In this embodiment, the head node converts the long label stack into short labels. The short label stack effectively improves the efficiency of packet encapsulation and transmission. And because the length of the short label is shorter, the network can support node paths with a larger number of nodes.
基于本发明实施例第一方面,本发明实施例第一方面的一种可选的实现方式中,节点为节点路径的首节点,节点路径包括按传输报文的顺序排列的首节点和N个非首节点,节点获取短标签之前,方法还包括:节点获取长标签栈,长标签栈包括N个长标签,N个长标签与N个非首节点分别对应,长标签用于指示对应的节点转发报文的转发信息;节点将长标签栈转换为短标签栈,短标签栈包括目标标签和N个短标签,N个短标签、N个长标签分别与N个非首节点对应;节点将短标签栈封装入报文中。Based on the first aspect of the embodiments of the present invention, in an alternative implementation of the first aspect of the embodiments of the present invention, the node is the first node of the node path, and the node path includes the first node and N nodes arranged in the order of transmitting the message. Non-head node, before the node obtains the short label, the method further includes: the node obtains a long label stack, the long label stack includes N long labels, the N long labels correspond to the N non-head nodes, and the long label is used to indicate the corresponding node The forwarding information of the forwarded message; the node converts the long label stack into a short label stack, the short label stack includes the target label and N short labels, and the N short labels and N long labels correspond to the N non-head nodes respectively; the node will The short label stack is encapsulated into the message.
在该实施方式中,首节点能够成功的将长标签栈转换为短标签栈。从而基于该短标签栈进行报文的转发,提高了报文的封装效率和传输效率。In this embodiment, the head node can successfully convert the long label stack to the short label stack. Therefore, the message is forwarded based on the short label stack, and the encapsulation efficiency and transmission efficiency of the message are improved.
基于本发明实施例第一方面,本发明实施例第一方面的一种可选的实现方式中,目标标签包括第一字段,节点将长标签栈转换为短标签栈包括:节点确定第一数值,N个长标签都包括第一数值;节点设置第一字段为第一数值。Based on the first aspect of the embodiments of the present invention, in an optional implementation of the first aspect of the embodiments of the present invention, the target label includes the first field, and the node converting the long label stack to the short label stack includes: the node determines the first value , N long labels all include the first value; the node sets the first field to the first value.
在该实施方式中,目标标签的第一字段不用于进行转发信息的关联。仅通过第二字段即可实现关联转发信息的目的。从而降低了目标标签中用于关联转发信息的比特数量。In this embodiment, the first field of the target tag is not used for the association of forwarding information. The purpose of associating forwarding information can be achieved only through the second field. This reduces the number of bits used to associate forwarding information in the target tag.
基于本发明实施例第一方面,本发明实施例第一方面的一种可选的实现方式中,节点将 长标签栈转换为短标签栈包括:节点确定N个短标签分别为N个第二数值,N个第二数值分别为N个长标签所包括的部分比特。Based on the first aspect of the embodiments of the present invention, in an optional implementation of the first aspect of the embodiments of the present invention, the node converting the long label stack to the short label stack includes: the node determines that the N short labels are N second Numerical value, and the N second numerical values are part of the bits included in the N long tags.
在该实施方式中,首节点在长标签栈中确定出N个第二数值。N个第二数值分别用于关联N个非首节点的转发信息。因第二数值的长度小于20bit。有效的降低了用于关联转发信息的长度。In this embodiment, the first node determines N second values in the long label stack. The N second values are respectively used to correlate the forwarding information of N non-head nodes. Because the length of the second value is less than 20bit. Effectively reduce the length of the associated forwarding information.
基于本发明实施例第一方面,本发明实施例第一方面的一种可选的实现方式中,目标标签还包括第二字段,节点为节点路径的非尾节点,节点将目标标签的至少部分比特替换为短标签包括:节点设置第二字段为第二数值。Based on the first aspect of the embodiments of the present invention, in an optional implementation of the first aspect of the embodiments of the present invention, the target label further includes a second field, the node is a non-tail node of the node path, and the node adds at least part of the target label The replacement of bits with short labels includes: the node sets the second field to the second value.
在该实施方式中,在报文转发至非尾节点时。该非尾节点在根据目标标签的第二字段确定出关联的转发信息后,非尾节点动态的对目标标签的第二字段进行设置。已设置的第二字段为下一跳节点对应的短标签。可见,通过各非尾节点对第二字段的动态设置,使得各非尾节点直接根据第二字段进行报文的转发。有效的提高了报文的转发效率。In this embodiment, when the message is forwarded to a non-tail node. After the non-tail node determines the associated forwarding information according to the second field of the target label, the non-tail node dynamically sets the second field of the target label. The second field that has been set is the short label corresponding to the next hop node. It can be seen that through the dynamic setting of the second field by each non-tail node, each non-tail node directly forwards the message according to the second field. Effectively improve the message forwarding efficiency.
基于本发明实施例第一方面,本发明实施例第一方面的一种可选的实现方式中,节点为节点路径的非首节点,节点将目标标签的至少部分比特替换为短标签之前,方法还包括:节点确定第一字段与预设值相同。Based on the first aspect of the embodiments of the present invention, in an optional implementation of the first aspect of the embodiments of the present invention, the node is a non-head node of the node path, and before the node replaces at least some bits of the target label with a short label, the method It also includes: the node determines that the first field is the same as the preset value.
在该实施方式中,若节点确定第二字段为预设值,则该节点可基于短标签栈进行报文的转发。若节点确定第二字段不等于预设值,则节点可基于已有的长标签栈进行报文的转发。使得节点能够兼容不同的标签栈以实现报文的转发。In this embodiment, if the node determines that the second field is the preset value, the node can forward the message based on the short label stack. If the node determines that the second field is not equal to the preset value, the node can forward the message based on the existing long label stack. It enables the node to be compatible with different label stacks to realize message forwarding.
基于本发明实施例第一方面,本发明实施例第一方面的一种可选的实现方式中,节点将长标签栈转换为短标签栈包括:节点获取标签对应关系,标签对应关系包括N个长标签和N个短标签的对应关系;节点根据标签对应关系确定N个短标签。Based on the first aspect of the embodiments of the present invention, in an optional implementation manner of the first aspect of the embodiments of the present invention, the node converting the long label stack to the short label stack includes: the node obtains label correspondences, and the label correspondences include N The correspondence between the long label and the N short labels; the node determines the N short labels according to the label correspondence.
基于本发明实施例第一方面,本发明实施例第一方面的一种可选的实现方式中,节点为节点路径的非尾节点,节点将目标标签的至少部分比特替换为短标签包括:节点确定目标标签为短标签。Based on the first aspect of the embodiments of the present invention, in an optional implementation manner of the first aspect of the embodiments of the present invention, the node is a non-tail node of the node path, and the node replacing at least part of the bits of the target label with a short label includes: node Make sure that the target tag is a short tag.
基于本发明实施例第一方面,本发明实施例第一方面的一种可选的实现方式中,节点为节点路径的中间节点,节点将目标标签的至少部分比特替换为短标签之前,方法还包括:节点根据标签对应关系,确定与目标标签对应的长标签;节点根据长标签确定对应的转发信息。Based on the first aspect of the embodiments of the present invention, in an optional implementation manner of the first aspect of the embodiments of the present invention, the node is an intermediate node of the node path, and before the node replaces at least part of the bits of the target label with a short label, the method also Including: the node determines the long label corresponding to the target label according to the label correspondence relationship; the node determines the corresponding forwarding information according to the long label.
在该实施方式中,无需对长标签进行基于第一数值的统一分配。节点路径上的各非尾节点直接以短标签为索引,通过查询标签对应关系的方式可确定长标签。In this embodiment, there is no need to uniformly allocate long labels based on the first value. Each non-tail node on the node path directly uses the short label as an index, and the long label can be determined by querying the label correspondence.
基于本发明实施例第一方面,本发明实施例第一方面的一种可选的实现方式中,节点获取短标签包括:节点根据短标签栈所包括的至少一个指示字段,获取短标签,至少一个指示字段用于指示短标签。Based on the first aspect of the embodiments of the present invention, in an optional implementation of the first aspect of the embodiments of the present invention, the node acquiring the short label includes: the node acquiring the short label according to at least one indication field included in the short label stack, at least An indication field is used to indicate the short label.
在该实施方式中,各节点根据指示字段的指示,可准确的确定出对应的短标签。有效的保障了报文可沿节点路径所包括的多个节点进行传输。In this embodiment, each node can accurately determine the corresponding short label according to the indication of the indication field. This effectively guarantees that the message can be transmitted along multiple nodes included in the node path.
第二方面,本发明实施例提供了一种报文传输方法,方法包括:首先,控制设备获取长标签栈,长标签栈包括N个长标签,N个长标签与节点路径所包括的N个非首节点分别对应,N个长标签分别包括N个短标签,短标签用于指示对应的节点转发报文的路径,短标签的长度小于20比特;随后,控制设备向节点发送长标签栈。本方面所示的有益效果详见上述第一方面所示,不再赘述。In the second aspect, an embodiment of the present invention provides a message transmission method. The method includes: first, a control device obtains a long label stack, the long label stack includes N long labels, N long labels and N included in the node path The non-head nodes correspond respectively, and the N long labels respectively include N short labels. The short labels are used to indicate the path for the corresponding node to forward the message, and the length of the short label is less than 20 bits; then, the control device sends the long label stack to the node. The beneficial effects shown in this aspect are shown in the above-mentioned first aspect in detail, and will not be repeated.
基于本发明实施例第二方面,本发明实施例第二方面的一种可选的实现方式中,长标签 还包括第一数值,N个长标签都包括第一数值。Based on the second aspect of the embodiment of the present invention, in an optional implementation of the second aspect of the embodiment of the present invention, the long label further includes the first value, and the N long labels all include the first value.
第三方面,本发明实施例提供了一种报文传输方法,方法包括:首先,控制设备向节点发送长标签栈,长标签栈包括N个长标签,N个长标签与节点路径所包括的N个非首节点分别对应,长标签用于指示对应的节点转发报文的路径;控制设备向节点发送标签对应关系,标签对应关系包括N个长标签和N个短标签的对应关系。In a third aspect, an embodiment of the present invention provides a message transmission method. The method includes: first, a control device sends a long label stack to a node, the long label stack includes N long labels, and the N long labels and the path included in the node The N non-head nodes correspond to each other, and the long label is used to indicate the path for the corresponding node to forward the message; the control device sends the label correspondence to the node, and the label correspondence includes the correspondence between N long labels and N short labels.
第四方面,本发明实施例提供了一种转发设备,包括:处理器、存储器以及收发器,其中,处理器、存储器以及收发器通过线路互联,处理器调用存储器中的程序代码用于执行上述第一方面任一项所示的报文传输方法中与处理相关的功能。收发器用于执行上述第一方面任一项所示的报文传输方法中与收发相关的功能。In a fourth aspect, an embodiment of the present invention provides a forwarding device, including: a processor, a memory, and a transceiver, wherein the processor, the memory, and the transceiver are interconnected through a line, and the processor calls the program code in the memory to execute the foregoing Functions related to processing in the message transmission method shown in any one of the first aspect. The transceiver is used to perform functions related to receiving and sending in the message transmission method shown in any one of the foregoing first aspects.
第五方面,本发明实施例提供了一种控制设备,包括:处理器、存储器以及收发器,其中,处理器、存储器以及收发器通过线路互联,处理器调用存储器中的程序代码用于执行上述第二方面或第三方面任一项所示的报文传输方法中与处理相关的功能。收发器用于执行上述第二方面或第三方面任一项所示的报文传输方法中与收发相关的功能。In a fifth aspect, an embodiment of the present invention provides a control device, including: a processor, a memory, and a transceiver, where the processor, the memory, and the transceiver are interconnected through a line, and the processor calls the program code in the memory to execute the above A processing-related function in the message transmission method shown in any one of the second aspect or the third aspect. The transceiver is used to perform functions related to receiving and sending in the message transmission method shown in any one of the second aspect or the third aspect.
第六方面,本发明实施例提供了一种数字处理芯片,芯片包括处理器和存储器,存储器和处理器通过线路互联,存储器中存储有指令,处理器用于执行如上述第一方面至第三方面任一项的报文传输方法中与处理相关的功能。In a sixth aspect, an embodiment of the present invention provides a digital processing chip. The chip includes a processor and a memory. The memory and the processor are interconnected by wires. The memory stores instructions. The processor is used to execute the above-mentioned first to third aspects. Functions related to processing in any of the message transmission methods.
第七方面,本发明实施例提供了一种通信系统,该通信系统包括控制设备和多个转发设备,该控制设备如上述第五方面所示。该转发设备如上述第四方面所示。In a seventh aspect, an embodiment of the present invention provides a communication system. The communication system includes a control device and a plurality of forwarding devices. The control device is as shown in the above fifth aspect. The forwarding device is as shown in the above-mentioned fourth aspect.
第八方面,本发明实施例提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行上述第一方面至第三方面的任一实施方式中的报文传输方法。In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the message transmission in any one of the first to third aspects. method.
第九方面,本发明实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面至第三方面的任一实施方式中的报文传输方法。In a ninth aspect, an embodiment of the present invention provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the message transmission method in any one of the foregoing first aspect to the third aspect.
附图说明Description of the drawings
图1为传送网络的一种结构示例图;Figure 1 is a diagram of an example structure of a transport network;
图2为SR技术进行报文传输的一种过程示例图;Figure 2 is an example diagram of a process of SR technology for message transmission;
图3为长标签栈的一种结构示例图;Figure 3 is a diagram of an example structure of a long label stack;
图4为本申请所提供的短标签栈的一种结构示例图;Figure 4 is a structural example diagram of a short label stack provided by this application;
图5为本申请所提供的报文传输方法的一种实施例步骤流程图;FIG. 5 is a flowchart of the steps of an embodiment of the message transmission method provided by this application;
图6为长标签栈的一种局部结构示例图;Figure 6 is an example diagram of a partial structure of a long label stack;
图7为本申请所提供的短标签栈的另一种结构示例图;FIG. 7 is a diagram of another example structure of the short label stack provided by this application;
图8为本申请所提供的报文传输方法的另一种实施例步骤流程图;FIG. 8 is a flowchart of the steps of another embodiment of the message transmission method provided by this application;
图9为本申请所提供的转发设备或控制设备的结构示例图;FIG. 9 is a structural example diagram of a forwarding device or a control device provided by this application;
图10为本申请所提供的通信网络的结构示例图。Fig. 10 is a structural example diagram of the communication network provided by this application.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the protection scope of the present invention.
首先结合图1,对本申请所提供的报文传输方法所应用的传送网络的结构进行说明。需明确的是,图1对该传送网络的具体类型不做限定。图1所示以传送网络的类型为微波(microwave,MW)网络为例。图1所示还可用于其他任意传送网络。例如,光传送网(optical transport network,OTN)、数字用户线路(digital subscriber line,DSL),或以太网(ethernet)等。First, with reference to FIG. 1, the structure of the transmission network applied by the message transmission method provided by the present application will be described. It should be clear that Figure 1 does not limit the specific type of the transport network. Figure 1 shows an example where the type of the transport network is a microwave (MW) network. As shown in Figure 1, it can also be used for any other transport network. For example, optical transport network (optical transport network, OTN), digital subscriber line (digital subscriber line, DSL), or Ethernet (ethernet), etc.
如图1所示,微波网络100至少包括一条节点路径。该节点路径用于传输来自客户网络102的业务数据。本申请对客户网络102的具体网络类型不做限定。其中,该节点路径包括按传输报文的顺序排列的首节点101、多个中间节点103和尾节点104。首节点101位于微波网络100入口。该首节点101用于接收来自客户网络102的业务数据。该中间节点103位于微波网络100内部。该尾节点104位于微波网络100出口。图1以中间节点的数量为4个为例进行说明。图1所示以各节点为标签交换路由器(label switching router,LSR)为例。As shown in FIG. 1, the microwave network 100 includes at least one node path. This node path is used to transmit service data from the customer network 102. This application does not limit the specific network type of the client network 102. Wherein, the node path includes a first node 101, a plurality of intermediate nodes 103, and a tail node 104 arranged in the order of the transmission message. The first node 101 is located at the entrance of the microwave network 100. The head node 101 is used to receive service data from the customer network 102. The intermediate node 103 is located inside the microwave network 100. The tail node 104 is located at the exit of the microwave network 100. Figure 1 takes the number of intermediate nodes of 4 as an example for illustration. Figure 1 shows an example where each node is a label switching router (LSR).
基于图1所示的微波网络100,以下结合图2所示对已有方案所示的SR技术是如何进行报文传输的过程进行说明。Based on the microwave network 100 shown in FIG. 1, the process of how the SR technology shown in the existing solution performs message transmission will be described below in conjunction with FIG. 2.
如图2所示,以节点路径包括按传输报文的顺序进行排列的6个节点为例。该6个节点为图2所示的A节点至F节点。其中,A节点为节点路径的首节点。F节点为节点路径的尾节点。B节点至E节点均为节点路径的中间节点。As shown in Figure 2, take the node path including 6 nodes arranged in the order of transmitting the message as an example. The 6 nodes are the A node to the F node shown in FIG. 2. Among them, node A is the first node of the node path. The F node is the end node of the node path. Nodes B to E are all intermediate nodes of the node path.
为实现报文的传输,A节点接收到业务数据的情况下,A节点可一次在业务数据前压入节点路径的长标签栈以形成报文。该长标签栈支持将报文由A节点传输至F节点。以下结合图3所示对该长标签栈的结构进行说明:In order to realize the transmission of the message, when the A node receives the service data, the A node can push the long label stack of the node path once before the service data to form the message. The long label stack supports the transmission of messages from node A to node F. The structure of the long label stack is described below with reference to Figure 3:
此种示例下,层N的取值为5,表示该长标签共有5层长标签。该五层长标签分别为长标签B至长标签F。以长标签栈的最外层长标签301(即长标签B)为例。该长标签301共有四个字段,即标签域(Label)字段、扩展域(Exp)字段、栈底标识(S)字段以及生存时间(TTL)字段。其中,Label字段的长度为20比特(bit),其用于关联用于转发报文的转发信息。其中,该转发信息可包括出端口和下一跳节点(C节点)的地址。Exp字段的长度为3bit。S字段的长度为1bit,S字段为1时表明为该长标签为长标签栈的栈底标签。S字段为0时表示还有下一跳节点。图3所示长标签301的S字段为0。生存时间(time to live,TTL)字段的长度8bit,表示该报文能传输多少跳节点。对标签栈的其他长标签的说明,请详见长标签B。In this example, the value of layer N is 5, which means that the long label has 5 layers of long labels. The five layers of long labels are long label B to long label F respectively. Take the outermost long label 301 (ie, long label B) of the long label stack as an example. The long label 301 has four fields in total, namely, a label field (Label) field, an extended field (Exp) field, a stack bottom identifier (S) field, and a time-to-live (TTL) field. Wherein, the length of the Label field is 20 bits (bit), which is used to associate forwarding information used for forwarding the message. Wherein, the forwarding information may include the address of the egress port and the next hop node (C node). The length of the Exp field is 3 bits. The length of the S field is 1 bit, and when the S field is 1, it indicates that the long label is the bottom label of the long label stack. When the S field is 0, it means that there is a next hop node. The S field of the long label 301 shown in FIG. 3 is 0. The length of the time to live (TTL) field is 8 bits, which indicates how many hops the message can transmit. For the description of other long labels in the label stack, please refer to Long Label B for details.
B节点接收到报文后可获取最外层长标签(长标签B)。B节点可查找出与长标签B关联的出端口和下一跳节点的地址。节点B剥离最外层的长标签(即长标签B)。B节点即可通过该出端口将报文转发至下一跳节点(节点C)。Node B can obtain the outermost long label (long label B) after receiving the message. Node B can find out the outgoing port associated with long label B and the address of the next hop node. Node B peels off the outermost long label (ie, long label B). Node B can forward the message to the next hop node (node C) through the outgoing port.
中间节点(C~E),对长标签的处理方式同节点B。可见,各中间节点根据最外层标签对报文进行转发。且各中间节点还逐跳剥离最外层的长标签。直至报文传输至尾节点(F节点)。由F节点还原出业务数据完成业务处理。Intermediate nodes (C to E) treat long labels in the same way as node B. It can be seen that each intermediate node forwards the message according to the outermost label. And each intermediate node also strips the outer long label hop by hop. Until the message is transmitted to the tail node (F node). The business data is restored by the F node to complete the business processing.
在如上所示的方案中,首节点需要封装较多的长标签。如图2所示,A节点需要封装5层长标签。每层长标签占4字节(Bytes)。A节点所转发的报头需要额外的20Bytes用于封装长标签栈。若A节点所获取到的业务数据的长度为64bytes,则A节点封装了5层长标签后,该报文的封装效率=64/(20+64)=76%。其中,报文的封装效率是指,业务数据占整个报文的比例。可见,报文所封装的长标签的层数越多,则报文的封装效率越低。报文的封装效率越低,会导致报文的传输效率越低。In the scheme shown above, the first node needs to encapsulate more long labels. As shown in Figure 2, node A needs to encapsulate a 5-layer long label. Each long label occupies 4 bytes (Bytes). The header forwarded by node A requires an additional 20Bytes to encapsulate the long label stack. If the length of the service data obtained by the A node is 64 bytes, after the A node encapsulates the 5-layer long label, the packet encapsulation efficiency = 64/(20+64) = 76%. Among them, the encapsulation efficiency of the message refers to the proportion of business data in the entire message. It can be seen that the more layers of the long label encapsulated in the message, the lower the encapsulation efficiency of the message. The lower the packet encapsulation efficiency is, the lower the packet transmission efficiency will be.
另外,图2所示的报文传输方案还受限于节点的硬件处理能力。例如若节点具有最大处理10层长标签的能力。该节点最多能支持具有10个节点的节点路径。该节点无法支持具有10个节点以上的节点路径。In addition, the message transmission scheme shown in Figure 2 is also limited by the hardware processing capabilities of the nodes. For example, if the node has the ability to process 10-layer long labels at most. The node can support a node path with 10 nodes at most. The node cannot support node paths with more than 10 nodes.
以下结合图4所示对本申请所提供的报文传输方法所使用的短标签栈的结构进行说明。图4所示的短标签栈的Exp字段、S字段以及TTL字段的具体说明,详见图3的相关描述,在此不再赘述。The structure of the short label stack used in the message transmission method provided by the present application will be described below with reference to FIG. 4. The specific description of the Exp field, the S field, and the TTL field of the short label stack shown in FIG. 4 is detailed in the related description in FIG. 3, and will not be repeated here.
该短标签栈还包括目标标签,其长度以20bit为例。该短标签栈还包括N个短标签,即图4所示的短标签1至短标签N。N的取值表示节点路径所包括的非首节点的数量。可见,图4所示的短标签栈所包括的N个短标签分别与节点路径的N个非首节点对应。为实现对报文的转发,短标签栈所包括的N个短标签,按传输报文的顺序进行依次排列。The short label stack also includes the target label, whose length is 20 bits as an example. The short label stack also includes N short labels, that is, short label 1 to short label N shown in FIG. 4. The value of N represents the number of non-first nodes included in the node path. It can be seen that the N short labels included in the short label stack shown in FIG. 4 respectively correspond to the N non-head nodes of the node path. In order to realize the forwarding of the message, the N short labels included in the short label stack are arranged in sequence according to the order of the transmission message.
例如,若图4所示的短标签栈用于图2所示报文传输的过程,则N取值为5。即短标签1对应B节点,依次类推,短标签5对应F节点。图4所示对各短标签的长度不做限定,只要各短标签的长度小于20bit即可。例如,该短标签的长度为8bit。For example, if the short label stack shown in FIG. 4 is used in the message transmission process shown in FIG. 2, the value of N is 5. That is, short label 1 corresponds to node B, and so on, short label 5 corresponds to node F. As shown in Figure 4, the length of each short label is not limited, as long as the length of each short label is less than 20 bits. For example, the length of the short label is 8 bits.
图4所示以短标签栈包括有两个指示字段为例,即第一指示字段和第二指示字段。该第一指示字段的长度可为4bit,其用于指示短标签栈所包括的短标签的总数量。该第二指示字段的长度为4bit,其用于指示当前执行报文转发的节点的短标签是短标签栈中的第几个。需明确的是,图4所示对指示字段的数量和功能的说明为可选地示例,不做限定。只要节点路径上的各节点根据该指示字段的指示,确定出下一跳节点对应的短标签即可。As shown in FIG. 4, the short label stack includes two indication fields as an example, that is, the first indication field and the second indication field. The length of the first indication field may be 4 bits, which is used to indicate the total number of short labels included in the short label stack. The length of the second indication field is 4 bits, which is used to indicate the number of the short label of the node currently performing packet forwarding in the short label stack. It should be clear that the description of the number and functions of the indication fields shown in FIG. 4 is an optional example and is not limited. As long as each node on the node path determines the short label corresponding to the next hop node according to the indication of the indication field.
SR的实现方式可以是部署在MPLS数据平面上的SR。SR的实现方式也可以是应用在互联网协议第6版(internet protocol version 6,IPv6)网络中。称为基于IPv6的分段路径(segment roouting over IPv6,SRv6)。图4所示的短标签栈可用于上述任一种SR的实现方式。需明确的是,图4所示的短标签栈还可用于其他SR的实现方式中,不做限定。The implementation of SR may be an SR deployed on the MPLS data plane. The implementation of SR can also be applied to the Internet Protocol Version 6 (Internet Protocol Version 6, IPv6) network. It is called segment routing over IPv6 (SRv6) based on IPv6. The short label stack shown in FIG. 4 can be used in any of the above-mentioned implementations of SR. It should be clear that the short label stack shown in FIG. 4 can also be used in other SR implementations, and is not limited.
以下结合图5,对使用如图4所示的短标签栈是如何进行报文传输的过程进行说明:The following describes how to perform message transmission using the short label stack shown in FIG. 4 in conjunction with FIG. 5:
步骤501、控制设备向首节点发送长标签栈。Step 501: The control device sends the long label stack to the first node.
对长标签栈结构的具体说明,请详见图3所示。本实施例以长标签栈由控制设备向首节点发送为例。在其他示例中,也可由首节点预先生成该长标签栈。For a detailed description of the long label stack structure, please refer to Figure 3. In this embodiment, the long label stack is sent by the control device to the head node as an example. In other examples, the long label stack may also be generated in advance by the head node.
以下结合图6所示,对控制设备所发送的各长标签的label字段进行说明:The following describes the label field of each long label sent by the control device with reference to FIG. 6:
各长标签的label字段包括有位于高比特位的L位比特和位于低比特位的M位比特。其中,L+M=20。该位于高比特位的L位比特是指label字段所包括的前L位比特。该位于低比特位的M位比特是指label字段所包括的后M位比特。可选地,该L位比特也可位于label字段的高比特位,该M位比特也可位于label字段的低比特位。The label field of each long label includes L bits located in the upper bits and M bits located in the lower bits. Among them, L+M=20. The upper L bits refer to the first L bits included in the label field. The lower M bits refer to the last M bits included in the label field. Optionally, the L bit can also be located in the high bit of the label field, and the M bit can also be located in the low bit of the label field.
具体地,该长标签栈所包括的所有位于高比特位的L位比特均为第一数值601。且第一数值601的取值在不同的长标签的label字段中均相同。在可选地示例中,该L的取值可为12。即各长标签的第一数值601的长度为12比特。具体如图6所示,各第一数值601的取值均为“101001011010”。需明确的是,本实施例对第一数值601的取值和长度的说明,不做限定。Specifically, all the high-order L bits included in the long label stack are the first value 601. In addition, the value of the first value 601 is the same in the label field of different long labels. In an optional example, the value of L may be 12. That is, the length of the first value 601 of each long tag is 12 bits. Specifically, as shown in FIG. 6, the value of each first value 601 is "101001011010". It should be clear that the description of the value and length of the first value 601 is not limited in this embodiment.
长标签所包括的位于低比特位的M位比特为第二数值602。在长标签栈中,位于不同长标签的label字段所包括的第二数值602均不同。在可选地示例中,该M的取值可为8。各长标签的第二数值602的长度为8比特。具体如图6所示,label字段603的第二数值602为“10101010”、label字段604的第二数值602为“010110101”……。需明确的是,本实 施例对该第二数值602的具体取值的说明为可选地示例,不做限定。The low-order M bits included in the long tag are the second value 602. In the long label stack, the second value 602 included in the label field of different long labels is different. In an optional example, the value of M may be 8. The length of the second value 602 of each long tag is 8 bits. Specifically, as shown in FIG. 6, the second value 602 of the label field 603 is "10101010", and the second value 602 of the label field 604 is "010110101"... It should be clear that the description of the specific value of the second value 602 in this embodiment is an optional example and is not limited.
其中,第二数值602的长度和节点路径所包括所有出端口的数量有关。因不同的第二数值602的取值对应不同的出端口。可见,该节点路径所包括的所有出端口的数量小于或等于具有不同取值的第二数值602的数量。例如,在第二数值602的长度为8bit的情况下,只要节点路径所包括的所有出端口的数量小于或等于28=256即可。若节点路径所包括的所有出端口的数量大于256个,则需要增加第二数值602的长度。The length of the second value 602 is related to the number of all outgoing ports included in the node path. Because different values of the second value 602 correspond to different outgoing ports. It can be seen that the number of all outgoing ports included in the node path is less than or equal to the number of second values 602 with different values. For example, in the case where the length of the second value 602 is 8 bits, it is sufficient that the number of all outgoing ports included in the node path is less than or equal to 28=256. If the number of all outgoing ports included in the node path is greater than 256, the length of the second value 602 needs to be increased.
步骤502、首节点接收来自控制设备的长标签栈。Step 502: The head node receives the long label stack from the control device.
步骤503、首节点判断是否满足触发条件,若是,则执行步骤504。Step 503: The first node judges whether the trigger condition is met, and if so, execute step 504.
本实施例中,首节点获取到长标签栈的情况下,需要判断是否满足触发。满足该触发条件的首节点具有执行本实施例所示的报文传输方法的能力。本实施例所示的触发条件具体可包括触发条件a和触发条件b,具体如下:In this embodiment, when the first node obtains the long label stack, it needs to determine whether the trigger is satisfied. The first node that meets the trigger condition has the ability to execute the message transmission method shown in this embodiment. The trigger conditions shown in this embodiment may specifically include trigger condition a and trigger condition b, which are specifically as follows:
该触发条件a可为:该长标签栈所包括的所有第一数值的取值相同。且该第一数值与预设值相同。该预设值可为控制设备向首节点发送的,也可由首节点配置好后向该控制设备发送的,具体不做限定。The trigger condition a may be: all the first values included in the long label stack have the same value. And the first value is the same as the preset value. The preset value may be sent by the control device to the first node, or may be sent to the control device after being configured by the first node, and the specific value is not limited.
若长标签栈的label字段如图6所示。首节点即可确定所有第一数值的取值相同。且该第一数值与预设值“101001011010”相同。首节点确定满足该触发条件a。If the label field of the long label stack is shown in Figure 6. The first node can determine that all the first values have the same value. And the first value is the same as the preset value "101001011010". The first node determines that the trigger condition a is satisfied.
该触发条件b可为:首节点获取已配置的使能(enable)字段。其中,在enable字段取值为0时,指示该首节点不满足该触发条件b。若该enable字段取值为1时,指示该首节点满足该触发条件b。The trigger condition b may be: the first node obtains the configured enable (enable) field. Wherein, when the value of the enable field is 0, it indicates that the first node does not satisfy the trigger condition b. If the value of the enable field is 1, it indicates that the first node meets the trigger condition b.
本实施例以首节点确定同时满足上述触发条件a和触发条件b的情况下,触发首节点执行步骤504为例进行说明。In this embodiment, when the first node determines that the trigger condition a and the trigger condition b are satisfied at the same time, the triggering of the first node to perform step 504 is taken as an example for description.
执行本实施例所示的步骤503的目的在于:若首节点满足该触发条件,则首节点可基于短标签栈进行报文的转发。若首节点不满足该触发条件,则首节点可基于已有的长标签栈进行报文的转发。使得首节点能够兼容不同的标签栈以实现报文的转发。The purpose of performing step 503 shown in this embodiment is: if the initiating node meets the trigger condition, the initiating node can forward the message based on the short label stack. If the initiating node does not meet the trigger condition, the initiating node can forward the message based on the existing long label stack. The first node can be compatible with different label stacks to realize message forwarding.
还需明确的是,本实施例所示的步骤503为可选执行的步骤。在其他示例中,首节点在接收到长标签栈后,可直接进行步骤504的执行。It should also be clear that step 503 shown in this embodiment is an optional step. In other examples, after receiving the long label stack, the head node may directly perform step 504.
步骤504、首节点确定出端口和下一跳节点的地址。Step 504: The first node determines the address of the outgoing port and the next hop node.
首节点获取到长标签栈后,根据长标签栈的最外层长标签确定出端口和下一跳节点的地址。具体地,该首节点根据最外层长标签的label字段确定出关联的出端口和下一跳节点的地址。After the first node obtains the long label stack, it determines the addresses of the outgoing port and the next hop node according to the outer long label of the long label stack. Specifically, the head node determines the associated egress port and the address of the next hop node according to the label field of the outermost long label.
步骤505、首节点将长标签栈转换为短标签栈。Step 505: The first node converts the long label stack into a short label stack.
本实施例中,为实现报文能够经由节点路径进行传输的目的。首节点需要将长标签栈转换为短标签栈。对短标签栈结构的具体说明,请详见图4所示。以下对首节点如何将长标签栈转换为短标签栈的具体过程进行说明:In this embodiment, in order to realize the purpose that the message can be transmitted via the node path. The first node needs to convert the long label stack into a short label stack. For the specific description of the short label stack structure, please refer to Figure 4 for details. The following describes the specific process of how the first node converts the long label stack into the short label stack:
首先,对首节点如何确定目标标签的过程进行说明:First, the process of how the first node determines the target label is explained:
首节点在N个长标签中确定第一数值和第二数值。其中,N个长标签与节点路径所包括的N个非首节点对应。具体地,因首节点根据长标签栈的最外层长标签,已获取到对应的出端口和下一跳节点的地址,则无需将首节点的长标签转换为短标签。对第一数值和第二数值的具体说明,请详见步骤501所示。The first node determines the first value and the second value among N long labels. Among them, N long labels correspond to N non-head nodes included in the node path. Specifically, since the head node has obtained the corresponding outgoing port and the address of the next hop node according to the outer long label of the long label stack, there is no need to convert the long label of the head node into a short label. For the specific description of the first value and the second value, please refer to step 501 for details.
如图4所示,该目标标签包括第一字段和第二字段。首节点可设置第一字段为该第一数 值。第二字段为下一跳节点的长标签所包括的第二数值。在图6所示的示例中,如长标签603为首节点的下一跳节点的长标签,首节点可设置该第二字段为“10101010”。As shown in Figure 4, the target tag includes a first field and a second field. The first node can set the first field to the first value. The second field is the second value included in the long label of the next hop node. In the example shown in FIG. 6, if the long label 603 is the long label of the next hop node of the head node, the head node may set the second field to "10101010".
其次,对首节点确定N个短标签的过程进行说明:Secondly, the process of determining N short labels by the first node is explained:
在首节点已确定N个长标签分别包括的第二数值的情况下,首节点确定N个短标签分别为N个第二数值。In the case that the first node has determined the second values respectively included in the N long labels, the first node determines that the N short labels are respectively N second values.
本实施例对步骤504和步骤505之间的执行时序的先后不做限定。This embodiment does not limit the sequence of execution timing between step 504 and step 505.
步骤506、首节点向下一跳节点转发报文。Step 506: The head node forwards the message to the next hop node.
首节点在获取到报文的情况下,将该短标签封装入该报文的报头中。本实施例以首节点的下一跳节点为节点路径的中间节点为例进行示例性说明。在其他示例中,该首节点的下一跳节点也可为尾节点。具体地,首节点根据已确定的出端口和下一跳节点的地址,向下一跳节点转发报文。When the head node obtains the message, it encapsulates the short label into the header of the message. In this embodiment, the next hop node of the first node is an intermediate node of the node path as an example for illustration. In other examples, the next hop node of the head node may also be the tail node. Specifically, the first node forwards the message to the next hop node according to the determined egress port and the address of the next hop node.
步骤507、中间节点接收来自上一跳节点的报文。Step 507: The intermediate node receives the message from the previous hop node.
本步骤所示的中间节点可为节点路径的任一中间节点。The intermediate node shown in this step can be any intermediate node of the node path.
步骤508、中间节点判断是否满足触发条件,若是,则执行步骤509。Step 508: The intermediate node judges whether the trigger condition is met, and if so, execute step 509.
其中,中间节点判断是否满足该触发条件的具体说明,请参见步骤503所示。For a specific description of whether the intermediate node determines whether the trigger condition is satisfied, please refer to step 503.
步骤509、中间节点确定出端口和下一跳节点的地址。Step 509: The intermediate node determines the address of the outgoing port and the next hop node.
其中,中间节点获取到短标签栈后,根据目标标签的第二字段确定关联的出端口和下一跳节点的地址。Wherein, after obtaining the short label stack, the intermediate node determines the associated egress port and the address of the next hop node according to the second field of the target label.
步骤510、中间节点确定下一跳节点对应的短标签。Step 510: The intermediate node determines the short label corresponding to the next hop node.
该中间节点获取到短标签栈的情况下,可获取第一指示信息和第二指示信息。对第一指示信息和第二指示信息的具体说明,请详见图4所示。以本实施例所示的短标签栈用于图2所示,且以本步骤所示的中间节点为B节点为例。此种示例下,第一指示信息所指示的数量为5。第二指示信息指示B节点对应的短标签是短标签栈中的第1个。When the intermediate node obtains the short label stack, it may obtain the first indication information and the second indication information. For the specific description of the first instruction information and the second instruction information, please refer to Figure 4 for details. It is assumed that the short label stack shown in this embodiment is used as shown in FIG. 2, and the intermediate node shown in this step is Node B as an example. In this example, the number indicated by the first indication information is 5. The second indication information indicates that the short label corresponding to the Node B is the first one in the short label stack.
可见,中间节点根据第一指示信息和第二指示信息,能够在短标签栈所包括的N个短标签中,确定中间节点的下一跳节点对应的短标签。如图4所示,中间节点根据第一指示信息和第二指示信息确定下一跳节点对应的短标签为5个短标签中的第2个,即C节点的短标签2。需明确的是,本实施例对中间节点如何确定下一跳节点对应的短标签的方式的说明为可选地示例,不做限定。It can be seen that, according to the first indication information and the second indication information, the intermediate node can determine the short label corresponding to the next hop node of the intermediate node among the N short labels included in the short label stack. As shown in FIG. 4, the intermediate node determines, according to the first indication information and the second indication information, that the short label corresponding to the next hop node is the second of the five short labels, that is, the short label 2 of the C node. It should be clear that the description of how the intermediate node determines the short label corresponding to the next hop node in this embodiment is an optional example and is not limited.
步骤511、中间节点将目标标签的第二字段替换为下一跳节点对应的短标签。Step 511: The intermediate node replaces the second field of the target label with the short label corresponding to the next hop node.
本实施例中,在报文转发至节点路径的各中间节点时,各中间节点均根据目标标签的第二字段确定出端口和下一跳地址。中间节点还可动态的对目标标签的第二字段进行更改。更改后的第二字段为下一跳节点对应的短标签。从而在下一跳节点接收到短标签栈后,即可根据第二字段,确定如何对报文进行转发。In this embodiment, when a message is forwarded to each intermediate node of the node path, each intermediate node determines the outgoing port and the next hop address according to the second field of the target label. The intermediate node can also dynamically change the second field of the target label. The changed second field is the short label corresponding to the next hop node. Therefore, after the next hop node receives the short label stack, it can determine how to forward the message according to the second field.
步骤512、中间节点向下一跳节点转发报文。Step 512: The intermediate node forwards the message to the next hop node.
步骤513、尾节点将短标签栈从报文中剥离。Step 513: The tail node strips the short label stack from the message.
本实施例中,对节点路径所包括的中间节点的具体数量不做限定。各中间节点接收到报文后的处理过程,请详见上述步骤507至步骤512所示。In this embodiment, the specific number of intermediate nodes included in the node path is not limited. For the processing process after each intermediate node receives the message, please refer to the above step 507 to step 512 for details.
因尾节点所获取到的报文已封装有该短标签栈。又因尾节点无需再向下一跳节点转发该报文。该尾节点可直接将整个短标签栈从报头中剥离。从而还原出业务数据,尾节点即可对业务数据进行对应的业务处理。可选地,也可由各非尾节点将其对应的短标签从短标签中剥 离。本实施例以尾节点负责对短标签的剥离为例进行说明,可有效提高短标签栈的格式的对齐,降低节点对短标签进行处理的难度,提高了处理的效率。The message obtained by the tail node has been encapsulated with the short label stack. And because the tail node does not need to forward the message to the next hop node. The tail node can directly strip the entire short label stack from the header. In this way, the business data is restored, and the tail node can perform corresponding business processing on the business data. Optionally, each non-tail node can strip its corresponding short label from the short label. In this embodiment, the tail node is responsible for stripping short labels as an example, which can effectively improve the alignment of the short label stack format, reduce the difficulty of processing the short labels by the node, and improve the processing efficiency.
采用本实施例所示的方法,首节点将长标签栈转换为短标签栈,有效地降低了标签栈的长度。如图3所示,若需要压入5层长标签。则图3所示的长标签栈的长度={label字段的长度(20bit)+Exp字段的长度(3bit)+S字段的长度(1bit)+TTL字段的长度(8bit)}*5=160bit。如图4所示,将5层长标签转换为短标签,图4所示的短标签栈的长度=目标标签的长度(20bit)+Exp字段的长度(3bit)+S字段的长度(1bit)+TTL字段的长度(8bit)+第一指示字段的长度(4bit)+第二指示字段的长度(4bit)+短标签的长度(8bit)*5=80bit。进而,短标签栈能够有效地提高报文的封装效率,进而提高了报文的传输效率。而且本实施例所示的各短标签的长度较小,使得节点能够支持具有更多节点数量的节点路径,以进行报文的转发。Using the method shown in this embodiment, the head node converts the long label stack into the short label stack, which effectively reduces the length of the label stack. As shown in Figure 3, if you need to press in a 5-layer long label. Then the length of the long label stack shown in FIG. 3={length of the label field (20bit)+length of the Exp field (3bit)+length of the S field (1bit)+length of the TTL field (8bit)}*5=160bit. As shown in Figure 4, the 5-layer long label is converted into a short label. The length of the short label stack shown in Figure 4 = the length of the target label (20bit) + the length of the Exp field (3bit) + the length of the S field (1bit) +Length of the TTL field (8bit)+Length of the first indicator field (4bit)+Length of the second indicator field (4bit)+Length of the short tag (8bit)*5=80bit. Furthermore, the short label stack can effectively improve the encapsulation efficiency of the message, thereby improving the transmission efficiency of the message. Moreover, the length of each short label shown in this embodiment is small, so that the node can support a node path with a larger number of nodes to forward the message.
结合图7所示对本申请所提供的报文传输方法所使用的另一种短标签栈的结构进行说明。以下对图7所示的短标签栈和图4所示的短标签栈的区别进行如下说明:The structure of another short label stack used in the message transmission method provided by the present application will be described with reference to FIG. 7. The following describes the difference between the short label stack shown in FIG. 7 and the short label stack shown in FIG. 4 as follows:
首先,图7所示的短标签栈的目标标签不再进行第一字段和第二字段的划分。First, the target label of the short label stack shown in FIG. 7 is no longer divided into the first field and the second field.
其次,图7所示的目标标签的长度等于短标签的长度。因短标签的长度小于20bit,则该目标标签的长度也小于20bit。例如,若短标签的长度为4bit,则目标标签的长度也为4bit。对图7所示的短标签栈的其他字段的说明,请详见图4所示。Second, the length of the target label shown in Figure 7 is equal to the length of the short label. Since the length of the short label is less than 20 bits, the length of the target label is also less than 20 bits. For example, if the length of the short label is 4 bits, the length of the target label is also 4 bits. For the description of other fields of the short label stack shown in Fig. 7, please refer to Fig. 4 for details.
以下结合图8,对使用如图7所示的短标签栈是如何进行报文传输的过程进行说明:The following describes how to perform message transmission using the short label stack shown in FIG. 7 in conjunction with FIG. 8:
步骤801、控制设备向首节点发送长标签栈。Step 801: The control device sends the long label stack to the first node.
本实施例所示的长标签栈的具体说明,请详见图3所示。For a specific description of the long label stack shown in this embodiment, please refer to Figure 3 for details.
步骤802、控制设备向首节点发送标签对应关系。Step 802: The control device sends the label correspondence to the head node.
为实现节点路径上各非尾节点对报文的转发,则各节点需要获取用于关联转发信息的长标签。本实施例所示控制设备可向首节点发送标签对应关系。该标签对应关系建立了节点路径上的各非尾节点的短标签和长标签的对应关系。具体地,该标签对应关系建立了各非尾节点的短标签和长标签的label字段的对应关系。In order to realize the forwarding of the message by each non-tail node on the node path, each node needs to obtain a long label for associated forwarding information. The control device shown in this embodiment may send the label correspondence to the head node. The label correspondence relationship establishes the correspondence relationship between the short label and the long label of each non-tail node on the node path. Specifically, the label correspondence relationship establishes the correspondence relationship between the label fields of the short label and the long label of each non-tail node.
可选地,控制设备可通过中间系统到中间系统(intermediate system to intermediate system、开放式最短路径优先(open shortest path first,OSPF)以及边界网关协议(border gateway protocol,BGP)中的一个,向首节点发送给标签对应关系。Optionally, the control device may pass one of the intermediate system to the intermediate system (intermediate system to intermediate system, open shortest path first (OSPF), and border gateway protocol (border gateway protocol, BGP) to the first The node sends the correspondence to the label.
需明确的是,本实施例对步骤801和802的执行时序不做限定。且本实施例所示的步骤801和步骤802为可选的步骤。需明确的是,该标签对应关系也可由首节点提前配置好。也由该首节点和其他节点进行协商以获取。It should be clear that this embodiment does not limit the execution timing of steps 801 and 802. In addition, steps 801 and 802 shown in this embodiment are optional steps. It should be clarified that the label correspondence can also be configured in advance by the first node. It is also obtained through negotiation between the first node and other nodes.
步骤803、首节点接收来自控制设备的长标签栈。Step 803: The head node receives the long label stack from the control device.
步骤804、首节点接收来自控制设备的标签对应关系。Step 804: The first node receives the label correspondence from the control device.
步骤805、首节点判断是否满足触发条件,若是,则执行步骤806。Step 805: The first node judges whether the trigger condition is met, and if so, step 806 is executed.
本实施例所示的触发条件如图5所示的触发条件b,具体说明请详见图5所示的步骤503。The trigger condition shown in this embodiment is the trigger condition b shown in FIG. 5. For details, please refer to step 503 shown in FIG. 5 for details.
步骤806、首节点确定出端口和下一跳节点的地址。Step 806: The first node determines the address of the outgoing port and the next hop node.
首节点获取到长标签栈后,首节点确定长标签栈最外层的长标签。首节点即可根据该长标签确定关联的出端口和下一跳节点的地址。After the first node obtains the long label stack, the first node determines the long label at the outermost layer of the long label stack. The first node can determine the associated egress port and the address of the next hop node based on the long label.
步骤807、首节点将长标签栈转换为短标签栈。Step 807: The first node converts the long label stack into a short label stack.
对短标签栈结构的具体说明,请详见图7所示。以下对首节点如何将长标签栈转换为短 标签栈的具体过程进行说明:For a detailed description of the short label stack structure, please refer to Figure 7 for details. The following describes the specific process of how the first node converts the long label stack into the short label stack:
首节点以N个长标签为索引,通过查询该标签对应关系的方式,确定对应的N个短标签。首节点再将该N个短标签按报文的传输顺序设置于短标签栈中。首节点确定目标标签的全部比特为首节点的下一跳节点对应的短标签。The first node uses N long tags as an index, and determines the corresponding N short tags by querying the corresponding relationship of the tags. The first node then sets the N short labels in the short label stack according to the transmission sequence of the message. The head node determines all the bits of the target label as the short label corresponding to the next hop node of the head node.
步骤808、首节点向下一跳节点转发报文。Step 808: The head node forwards the message to the next hop node.
具体执行过程,请详见图5所示的步骤505。For the specific execution process, please refer to step 505 shown in Figure 5 for details.
步骤809、中间节点接收来自上一跳节点的报文。Step 809: The intermediate node receives the message from the previous hop node.
本步骤所示的中间节点可为节点路径的任一中间节点。The intermediate node shown in this step can be any intermediate node of the node path.
步骤810、中间节点接收来自控制设备的标签对应关系。Step 810: The intermediate node receives the label correspondence from the control device.
其中,该中间节点所接收到的标签对应关系与首节点所接收到的标签对应关系可相同。可选的,该中间节点所接收到标签对应关系也可只包括该中间节点的短标签和长标签的对应关系。需明确的是,该标签对应关系也可由中间节点提前配置好。也由该中间节点和其他节点进行协商以获取。Wherein, the label correspondence received by the intermediate node may be the same as the label correspondence received by the first node. Optionally, the label correspondence received by the intermediate node may also only include the correspondence between the short label and the long label of the intermediate node. It should be clarified that the label correspondence can also be configured in advance by the intermediate node. It is also negotiated by the intermediate node and other nodes to obtain it.
步骤811、中间节点判断是否满足触发条件,若是,则执行步骤812。Step 811: The intermediate node determines whether the trigger condition is met, and if so, execute step 812.
其中,中间节点判断是否满足该触发条件的具体说明,请参见步骤805所示。For a specific description of whether the intermediate node determines whether the trigger condition is satisfied, please refer to step 805.
步骤812、中间节点确定出端口和下一跳节点的地址。Step 812: The intermediate node determines the address of the outgoing port and the next hop node.
其中,因目标标签为该中间节点的短标签,该中间节点以目标标签为索引,通过查询标签对应关系的方式,确定对应的长标签。该长标签关联该中间节点的出端口和下一跳节点的地址。Wherein, since the target label is the short label of the intermediate node, the intermediate node uses the target label as an index, and determines the corresponding long label by querying the label correspondence. The long label is associated with the outgoing port of the intermediate node and the address of the next hop node.
步骤813、中间节点确定下一跳节点对应的短标签。Step 813: The intermediate node determines the short label corresponding to the next hop node.
其中,中间节点在短标签栈中确定下一跳节点对应的短标签的过程,可参见步骤510所示。For the process that the intermediate node determines the short label corresponding to the next hop node in the short label stack, refer to step 510.
步骤814、中间节点将目标标签替换为下一跳节点对应的短标签。Step 814: The intermediate node replaces the target label with the short label corresponding to the next hop node.
本实施例中,在中间节点确定出下一跳节点对应的短标签的情况下,可将目标标签的全部比特替换为下一跳节点对应的短标签。In this embodiment, when the intermediate node determines the short label corresponding to the next hop node, all bits of the target label can be replaced with the short label corresponding to the next hop node.
步骤815、中间节点向下一跳节点转发报文。Step 815: The intermediate node forwards the message to the next hop node.
步骤816、尾节点将短标签栈从报文中剥离。Step 816: The tail node strips the short label stack from the message.
本实施例所示的步骤815至步骤816的具体执行过程,可参见图5所示的步骤512至步骤513所示。For the specific execution process of step 815 to step 816 shown in this embodiment, reference may be made to step 512 to step 513 shown in FIG. 5.
采用本实施例所示的方法,在无需对长标签进行基于第一数值的统一分配的情况下,节点路径上的各非尾节点直接以短标签为索引,通过查询标签对应关系的方式可确定长标签。Using the method shown in this embodiment, without the need for uniform allocation of long labels based on the first value, each non-tail node on the node path is directly indexed by the short label, which can be determined by querying the label correspondence relationship. Long label.
下面结合图9,对本申请中的转发设备和控制设备进行描述。其中,图9可为转发设备的结构示意图。该转发设备可为上述方法实施例中的首节点、中间节点以及尾节点中的任一个。该转发设备包括处理器901、存储器902和收发器903。该处理器901、存储器902和收发器903通过线路互联。其中,存储器902用于存储程序指令和数据。The forwarding device and the control device in this application will be described below with reference to FIG. 9. Among them, FIG. 9 may be a schematic structural diagram of a forwarding device. The forwarding device may be any one of the head node, the intermediate node, and the tail node in the foregoing method embodiment. The forwarding device includes a processor 901, a memory 902, and a transceiver 903. The processor 901, the memory 902, and the transceiver 903 are interconnected by wires. Among them, the memory 902 is used to store program instructions and data.
存储器902存储了支持图5和图8所示步骤中,由节点执行的程序指令和数据。处理器901以及收发器903用于执行图5和图8任一实施例所示的方法步骤。The memory 902 stores program instructions and data that are executed by the node in supporting the steps shown in FIG. 5 and FIG. 8. The processor 901 and the transceiver 903 are configured to execute the method steps shown in any one of the embodiments in FIG. 5 and FIG. 8.
若转发设备作为首节点,则在图5中,收发器903用于执行步骤502以及步骤506。处理器901用于执行步骤503至步骤505。在图8中,收发器903用于执行步骤803、步骤804以及步骤808。处理器901用于执行步骤805至步骤807。If the forwarding device is used as the head node, in FIG. 5, the transceiver 903 is used to perform step 502 and step 506. The processor 901 is configured to execute step 503 to step 505. In FIG. 8, the transceiver 903 is used to perform step 803, step 804, and step 808. The processor 901 is configured to execute step 805 to step 807.
若转发设备作为中间节点,则在图5中,收发器903用于执行步骤507以及步骤512。处理器901用于执行步骤508至步骤511。在图8中,收发器用于执行步骤809以及步骤815。处理器901用于执行步骤810至步骤814。If the forwarding device is used as an intermediate node, in FIG. 5, the transceiver 903 is used to perform step 507 and step 512. The processor 901 is configured to execute step 508 to step 511. In FIG. 8, the transceiver is used to perform step 809 and step 815. The processor 901 is configured to execute step 810 to step 814.
若转发设备作为尾节点,则在图5中,处理器901用于执行步骤513。在图8中,处理器901用于执行步骤816。If the forwarding device is used as the tail node, in FIG. 5, the processor 901 is configured to perform step 513. In FIG. 8, the processor 901 is configured to perform step 816.
在另一种可能的实现方式中,图9还可为控制设备的结构示例图。图9所示的存储器902存储了支持图5和图8所示步骤中,由控制设备执行的程序指令和数据,处理器901以及收发器903用于执行图5和图8任一实施例所示的方法步骤。In another possible implementation manner, FIG. 9 may also be a structural example diagram of the control device. The memory 902 shown in FIG. 9 stores program instructions and data executed by the control device in the steps shown in FIG. 5 and FIG. 8. The processor 901 and the transceiver 903 are used to execute the steps shown in any one of the embodiments in FIGS. 5 and 8. The method steps shown.
在图5中,收发器901用于执行图5所示的步骤501。在图8中,收发器901用于执行图8所示的步骤801至步骤802。In FIG. 5, the transceiver 901 is used to perform step 501 shown in FIG. 5. In FIG. 8, the transceiver 901 is used to perform step 801 to step 802 shown in FIG. 8.
下面结合图10,对本申请所提供的通信系统的结构进行说明。如图10所示,本实施例所示的通信系统包括控制设备1001、作为首节点的转发设备1002、一个或多个作为中间节点的转发设备1003以及作为尾节点的转发设备1004。其中,转发设备和控制设备的具体说明,请详见图9所示。本实施例对作为中间节点的转发设备1003的具体数量不做限定。The structure of the communication system provided by the present application will be described below with reference to FIG. 10. As shown in FIG. 10, the communication system shown in this embodiment includes a control device 1001, a forwarding device 1002 as a head node, one or more forwarding devices 1003 as intermediate nodes, and a forwarding device 1004 as a tail node. Among them, the specific description of forwarding equipment and control equipment, please refer to Figure 9 for details. This embodiment does not limit the specific number of forwarding devices 1003 as intermediate nodes.
本申请实施例还提供一种数字处理芯片。该数字处理芯片中集成了用于实现上述处理器901的功能的电路和一个或者多个接口。当该数字处理芯片中集成了存储器时,该数字处理芯片可以完成前述实施例中的任一个或多个实施例的方法步骤。当该数字处理芯片中未集成存储器时,可以通过接口与外置的存储器连接。该数字处理芯片根据外置的存储器中存储的程序代码来实现上述实施例中控制设备或转发设备执行的动作。The embodiment of the application also provides a digital processing chip. The digital processing chip integrates a circuit for realizing the functions of the processor 901 and one or more interfaces. When a memory is integrated in the digital processing chip, the digital processing chip can complete the method steps of any one or more of the foregoing embodiments. When the memory is not integrated in the digital processing chip, it can be connected to an external memory through an interface. The digital processing chip implements the actions performed by the control device or the forwarding device in the foregoing embodiment according to the program code stored in the external memory.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成。程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,随机接入存储器等。具体地,例如:上述处理单元或处理器可以是中央处理器,通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。上述的这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art can understand that all or part of the steps for implementing the foregoing embodiments can be completed by hardware, or by a program instructing related hardware to be completed. The program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a random access memory, and the like. Specifically, for example: the above-mentioned processing unit or processor may be a central processing unit, a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device , Transistor logic devices, hardware components, or any combination thereof. Whether the above-mentioned functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
当使用软件实现时,上述实施例描述的方法步骤可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质等。When implemented by software, the method steps described in the above embodiments may 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 program 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 can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. 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, computer instructions may be transmitted from a website, computer, server, or data center through a cable (such as Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to transmit to another website site, 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 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, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium.
最后应说明的是:以上,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。Finally, it should be noted that the above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes within the technical scope disclosed in this application. Or replacement should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (21)

  1. 一种报文传输方法,其特征在于,所述方法包括:A message transmission method, characterized in that the method includes:
    节点获取短标签,所述短标签用于指示下一跳节点转发报文的转发信息,所述短标签的长度小于20比特;The node obtains a short label, where the short label is used to indicate forwarding information of a next-hop node to forward a packet, and the length of the short label is less than 20 bits;
    所述节点将目标标签的至少部分比特替换为所述短标签,所述目标标签位于所述报文中;The node replaces at least part of the bits of the target label with the short label, and the target label is located in the message;
    所述节点向所述下一跳节点发送所述报文。The node sends the message to the next hop node.
  2. 根据权利要求1所述的方法,其特征在于,所述节点为节点路径的首节点,所述节点路径包括按传输所述报文的顺序排列的所述首节点和N个非首节点,所述节点获取短标签之前,所述方法还包括:The method according to claim 1, wherein the node is the first node of a node path, and the node path includes the first node and N non-first nodes arranged in the order in which the message is transmitted, so Before the node obtains the short label, the method further includes:
    所述节点获取长标签栈,所述长标签栈包括N个长标签,所述N个长标签与所述N个非首节点分别对应,所述长标签用于指示对应的节点转发所述报文的转发信息;The node obtains a long label stack, the long label stack includes N long labels, the N long labels correspond to the N non-head nodes, and the long label is used to instruct the corresponding node to forward the report. The forwarding information of the text;
    所述节点将所述长标签栈转换为短标签栈,所述短标签栈包括所述目标标签和N个短标签,所述N个短标签与所述N个长标签对应;The node converts the long label stack into a short label stack, the short label stack includes the target label and N short labels, and the N short labels correspond to the N long labels;
    所述节点将所述短标签栈封装入所述报文中。The node encapsulates the short label stack into the message.
  3. 根据权利要求2所述的方法,其特征在于,所述目标标签包括第一字段,所述节点将所述长标签栈转换为短标签栈包括:The method according to claim 2, wherein the target label includes a first field, and the node converting the long label stack into a short label stack comprises:
    所述节点确定第一数值,所述N个长标签都包括所述第一数值;Determining a first value by the node, and all of the N long labels include the first value;
    所述节点设置所述第一字段为所述第一数值。The node sets the first field to the first value.
  4. 根据权利要求2或3所述的方法,其特征在于,所述节点将所述长标签栈转换为短标签栈包括:The method according to claim 2 or 3, wherein the node converting the long label stack into a short label stack comprises:
    所述节点确定所述N个短标签分别为N个第二数值,所述N个第二数值分别为所述N个长标签所包括的部分比特。The node determines that the N short tags are respectively N second values, and the N second values are respectively part of bits included in the N long tags.
  5. 根据权利要求4所述的方法,其特征在于,所述目标标签还包括第二字段,所述节点为所述节点路径的非尾节点,所述节点将目标标签的至少部分比特替换为所述短标签包括:The method according to claim 4, wherein the target label further comprises a second field, the node is a non-tail node of the node path, and the node replaces at least some bits of the target label with the Short tags include:
    所述节点设置所述第二字段为所述第二数值。The node sets the second field to the second value.
  6. 根据权利要求3所述的方法,其特征在于,所述节点为所述节点路径的非首节点,所述节点将目标标签的至少部分比特替换为所述短标签之前,所述方法还包括:The method according to claim 3, wherein the node is a non-head node of the node path, and before the node replaces at least some bits of the target label with the short label, the method further comprises:
    所述节点确定所述第一字段与预设值相同。The node determines that the first field is the same as the preset value.
  7. 根据权利要求2所述的方法,其特征在于,所述节点将所述长标签栈转换为短标签栈包括:The method according to claim 2, wherein the node converting the long label stack into a short label stack comprises:
    所述节点获取标签对应关系,所述标签对应关系包括所述N个长标签和所述N个短标签的对应关系;Acquiring, by the node, a label correspondence, where the label correspondence includes the correspondence between the N long labels and the N short labels;
    所述节点根据所述标签对应关系确定所述N个短标签。The node determines the N short labels according to the label correspondence relationship.
  8. 根据权利要求7所述的方法,其特征在于,所述节点为所述节点路径的非尾节点,所述节点将目标标签的至少部分比特替换为所述短标签包括:The method according to claim 7, wherein the node is a non-tail node of the node path, and the node replacing at least part of the bits of the target label with the short label comprises:
    所述节点确定所述目标标签为所述短标签。The node determines that the target label is the short label.
  9. 根据权利要求8所述的方法,其特征在于,所述节点为所述节点路径的中间节点,所述节点将目标标签的至少部分比特替换为所述短标签之前,所述方法还包括:The method according to claim 8, wherein the node is an intermediate node of the node path, and before the node replaces at least part of the bits of the target label with the short label, the method further comprises:
    所述节点根据所述标签对应关系,确定与所述目标标签对应的长标签;Determining, by the node, a long label corresponding to the target label according to the label correspondence relationship;
    所述节点根据所述长标签确定对应的转发信息。The node determines corresponding forwarding information according to the long label.
  10. 根据权利要求2至9任一项所述的方法,其特征在于,所述节点获取短标签包括:The method according to any one of claims 2 to 9, wherein the node acquiring a short label comprises:
    所述节点根据所述短标签栈所包括的至少一个指示字段,获取所述短标签,所述至少一个指示字段用于指示所述短标签。The node obtains the short label according to at least one indication field included in the short label stack, where the at least one indication field is used to indicate the short label.
  11. 一种转发设备,其特征在于,包括:A forwarding device, characterized in that it comprises:
    处理器、存储器以及收发器,其中,所述处理器、所述存储器以及所述收发器通过线路互联,所述处理器调用所述存储器中的程序代码用于执行如下步骤:A processor, a memory, and a transceiver, wherein the processor, the memory, and the transceiver are interconnected by wires, and the processor calls the program code in the memory to perform the following steps:
    获取短标签,所述短标签用于指示下一跳节点转发报文的转发信息,所述短标签的长度小于20比特;Acquiring a short label, where the short label is used to indicate forwarding information of a next-hop node to forward a message, and the length of the short label is less than 20 bits;
    将目标标签的至少部分比特替换为所述短标签,所述目标标签位于所述报文中;Replacing at least part of the bits of the target tag with the short tag, where the target tag is located in the message;
    所述收发器具体用于执行如下步骤:The transceiver is specifically configured to perform the following steps:
    向所述下一跳节点发送所述报文。Sending the message to the next hop node.
  12. 根据权利要求11所述的转发设备,其特征在于,所述转发设备为节点路径的首节点,所述节点路径包括按传输所述报文的顺序排列的所述首节点和N个非首节点,所述处理器具体用于:The forwarding device according to claim 11, wherein the forwarding device is a head node of a node path, and the node path includes the head node and N non-head nodes arranged in the order in which the message is transmitted , The processor is specifically configured to:
    获取长标签栈,所述长标签栈包括N个长标签,所述N个长标签与所述N个非首节点分别对应,所述长标签用于指示对应的节点转发所述报文的转发信息;Obtain a long label stack, the long label stack includes N long labels, the N long labels correspond to the N non-head nodes respectively, and the long labels are used to instruct the corresponding node to forward the packet forwarding information;
    将所述长标签栈转换为短标签栈,所述短标签栈包括所述目标标签和N个短标签,所述N个短标签、所述N个长标签分别与所述N个非首节点对应;Convert the long label stack into a short label stack, the short label stack includes the target label and N short labels, the N short labels and the N long labels are respectively associated with the N non-head nodes correspond;
    将所述短标签栈封装入所述报文中。Encapsulate the short label stack into the message.
  13. 根据权利要求12所述的转发设备,其特征在于,所述目标标签包括第一字段,所述处理器具体用于:The forwarding device according to claim 12, wherein the target tag includes a first field, and the processor is specifically configured to:
    确定第一数值,所述N个长标签都包括所述第一数值;Determine a first value, where all the N long tags include the first value;
    设置所述第一字段为所述第一数值。Set the first field to the first value.
  14. 根据权利要求12或13所述的转发设备,其特征在于,所述处理器具体用于:The forwarding device according to claim 12 or 13, wherein the processor is specifically configured to:
    确定所述N个短标签分别为N个第二数值,所述N个第二数值分别为所述N个长标签所包括的部分比特。It is determined that the N short tags are respectively N second values, and the N second values are respectively part of bits included in the N long tags.
  15. 根据权利要求14所述的转发设备,其特征在于,所述目标标签还包括第二字段,所述转发设备为所述节点路径的非尾节点,所述处理器具体用于:The forwarding device according to claim 14, wherein the target label further includes a second field, the forwarding device is a non-tail node of the node path, and the processor is specifically configured to:
    设置所述第二字段为所述第二数值。Set the second field to the second numerical value.
  16. 根据权利要求13所述的转发设备,其特征在于,所述转发设备为所述节点路径的非首节点,所述处理器具体用于:The forwarding device according to claim 13, wherein the forwarding device is a non-head node of the node path, and the processor is specifically configured to:
    确定所述第一字段与预设值相同。It is determined that the first field is the same as the preset value.
  17. 根据权利要求12所述的转发设备,其特征在于,所述处理器具体用于:The forwarding device according to claim 12, wherein the processor is specifically configured to:
    获取标签对应关系,所述标签对应关系包括所述N个长标签和所述N个短标签的对应关系;Acquiring label correspondences, where the label correspondences include correspondences between the N long labels and the N short labels;
    根据所述标签对应关系确定所述N个短标签。The N short tags are determined according to the tag correspondence relationship.
  18. 根据权利要求17所述的转发设备,其特征在于,所述转发设备为所述节点路径的非尾节点,所述处理器具体用于:The forwarding device according to claim 17, wherein the forwarding device is a non-tail node of the node path, and the processor is specifically configured to:
    确定所述目标标签为所述短标签。It is determined that the target tag is the short tag.
  19. 根据权利要求18所述的转发设备,其特征在于,所述转发设备为所述节点路径的中间节点,所述处理器具体用于:The forwarding device according to claim 18, wherein the forwarding device is an intermediate node of the node path, and the processor is specifically configured to:
    根据所述标签对应关系,确定与所述目标标签对应的长标签;Determine a long label corresponding to the target label according to the label correspondence relationship;
    根据所述长标签确定对应的转发信息。The corresponding forwarding information is determined according to the long label.
  20. 根据权利要求12至19任一项所述的转发设备,其特征在于,所述处理器具体用于:The forwarding device according to any one of claims 12 to 19, wherein the processor is specifically configured to:
    根据所述短标签栈所包括的至少一个指示字段,获取所述短标签,所述至少一个指示字段用于指示所述短标签。Acquire the short label according to at least one indication field included in the short label stack, where the at least one indication field is used to indicate the short label.
  21. 一种数字处理芯片,其特征在于,所述芯片包括处理器和存储器,所述存储器和所述处理器通过线路互联,所述存储器中存储有指令,所述处理器用于执行如权利要求1至10中任一项所示的报文传输方法。A digital processing chip, characterized in that the chip includes a processor and a memory, the memory and the processor are interconnected by wires, the memory is stored with instructions, and the processor is used to execute 10. The message transmission method shown in any one of 10.
PCT/CN2020/122573 2019-10-25 2020-10-21 Message transmission method and device, and digital processing chip WO2021078171A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911025945.8A CN112714063B (en) 2019-10-25 2019-10-25 Message transmission method, device and digital processing chip
CN201911025945.8 2019-10-25

Publications (1)

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

Family

ID=75540956

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/122573 WO2021078171A1 (en) 2019-10-25 2020-10-21 Message transmission method and device, and digital processing chip

Country Status (2)

Country Link
CN (1) CN112714063B (en)
WO (1) WO2021078171A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537605A (en) * 2021-07-22 2021-10-22 广联达科技股份有限公司 Method, system and device for determining drainage line

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571359A (en) * 2003-07-15 2005-01-26 华为技术有限公司 A multi-level label forwarding method with label expansion
US20060007931A1 (en) * 2004-07-12 2006-01-12 Wright Steven A Methods, systems, and computer program products for pushing and/or popping multiple multiprotocol label switching (MPLS) labels/shim headers at a single node
CN105471737A (en) * 2014-09-05 2016-04-06 华为技术有限公司 Tag stack compression method and device and tag stack decompression method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866919B (en) * 2005-12-06 2012-11-14 华为技术有限公司 Service switching method based on VLAN stack
US20070274286A1 (en) * 2006-05-24 2007-11-29 Ranganathan Krishnan Overhead reduction in an ad-hoc wireless network
JP5150551B2 (en) * 2009-04-10 2013-02-20 株式会社日立製作所 Control device
US9319312B2 (en) * 2013-05-17 2016-04-19 Cisco Technology, Inc. Segment routing mapping server for LDP/SR interoperability
US20150003458A1 (en) * 2013-06-27 2015-01-01 Futurewei Technologies, Inc. Boarder Gateway Protocol Signaling to Support a Very Large Number of Virtual Private Networks
CN107566272B (en) * 2017-10-17 2021-10-12 新华三技术有限公司 Forwarding table establishing method and data forwarding method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571359A (en) * 2003-07-15 2005-01-26 华为技术有限公司 A multi-level label forwarding method with label expansion
US20060007931A1 (en) * 2004-07-12 2006-01-12 Wright Steven A Methods, systems, and computer program products for pushing and/or popping multiple multiprotocol label switching (MPLS) labels/shim headers at a single node
CN105471737A (en) * 2014-09-05 2016-04-06 华为技术有限公司 Tag stack compression method and device and tag stack decompression method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
S. SIVABALAN C. FILSFILS CISCO SYSTEMS, INC. J. TANTSURA APSTRA, INC. W. HENDERICKX NOKIA J. HARDWICK METASWITCH NETWORKS: "PCEP Extensions for Segment Routing; draft-ietf-pce-segment-routing-15.txt", PCEP EXTENSIONS FOR SEGMENT ROUTING; DRAFT-IETF-PCE-SEGMENT-ROUTING-15.TXT; INTERNET-DRAFT: PCE, INTERNET ENGINEERING TASK FORCE, IETF; STANDARDWORKINGDRAFT, INTERNET SOCIETY (ISOC) 4, RUE DES FALAISES CH- 1205 GENEVA, SWITZERLAND, no. 15, 12 February 2019 (2019-02-12), Internet Society (ISOC) 4, rue des Falaises CH- 1205 Geneva, Switzerland, pages 1 - 33, XP015131054 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537605A (en) * 2021-07-22 2021-10-22 广联达科技股份有限公司 Method, system and device for determining drainage line
CN113537605B (en) * 2021-07-22 2024-04-30 广联达科技股份有限公司 Method, system and device for determining drainage line

Also Published As

Publication number Publication date
CN112714063A (en) 2021-04-27
CN112714063B (en) 2022-08-09

Similar Documents

Publication Publication Date Title
JP7520170B2 (en) Packet processing method and apparatus, device and system
JP7208386B2 (en) Packet transfer method, packet transmitter, and packet receiver
US20230078123A1 (en) Method for Forwarding Packet in SRV6 Service Function Chain and SF Device
US11979322B2 (en) Method and apparatus for providing service for traffic flow
EP3154227B1 (en) Packet transmission method, node, path management server and storage medium
EP3742683B1 (en) Method and device for processing packet by using unified sr label stack
US10412008B2 (en) Packet processing method, apparatus, and system
WO2020244651A1 (en) Bier packet sending method and apparatus
CN110401599B (en) Data packet processing method and device, storage medium and electronic device
US20220109745A1 (en) Packet processing method
US20230370298A1 (en) Message header processing method and apparatus, storage medium and electronic device
US20090135833A1 (en) Ingress node and egress node with improved packet transfer rate on multi-protocol label switching (MPLS) network, and method of improving packet transfer rate in MPLS network system
WO2022127586A1 (en) Message processing method, node, and computer-readable storage medium
WO2016124049A1 (en) Method and apparatus for obtaining port path
US20240154902A1 (en) Packet forwarding method and system, storage medium, and electronic device
WO2021073357A1 (en) Packet processing method, device, system and apparatus as well as storage medium
US20240073128A1 (en) Message encapsulation and de-encapsulation method and device, storage medium, and electronic device
WO2012159461A1 (en) Layer-2 path maximum transmission unit discovery method and node
WO2015172675A1 (en) Packet processing method and device
US20240048479A1 (en) Packet Forwarding Method and Apparatus, Network Device, and Storage Medium
WO2021078171A1 (en) Message transmission method and device, and digital processing chip
CN112769738A (en) DetNet data packet processing method and device
JP2024504466A (en) Packet forwarding methods, packet processing methods, and devices
WO2020114083A1 (en) Method and apparatus for processing ioam information
WO2020150878A1 (en) Data message transmission method and node

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: 20879823

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: 20879823

Country of ref document: EP

Kind code of ref document: A1