WO2024104007A1 - Packet transmission method and apparatus, storage medium and electronic device - Google Patents

Packet transmission method and apparatus, storage medium and electronic device Download PDF

Info

Publication number
WO2024104007A1
WO2024104007A1 PCT/CN2023/123829 CN2023123829W WO2024104007A1 WO 2024104007 A1 WO2024104007 A1 WO 2024104007A1 CN 2023123829 W CN2023123829 W CN 2023123829W WO 2024104007 A1 WO2024104007 A1 WO 2024104007A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
data flows
routing
field
identification field
Prior art date
Application number
PCT/CN2023/123829
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 WO2024104007A1 publication Critical patent/WO2024104007A1/en

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • 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

Definitions

  • the network needs to expand capacity by adding links, and multi-link load balancing technology is needed.
  • SR-MPLS Segment Routing MPLS
  • the top layer of the SR-MPLS label stack is mainly set to path forwarding, and the service flow cannot be identified in detail, so only packet-based load sharing can be achieved.
  • packet-by-packet will affect the terminal service experience, and flow-based load balancing needs to be achieved.
  • the intermediate nodes need to perceive the flow and identify the flow.
  • the current technical solution can only be based on deep analysis of the message, which is relatively costly and inefficient.
  • a message sending method comprising: determining a forwarding label of each data stream in a target message, wherein the target message includes multiple data streams, the forwarding label of each data stream includes a routing field of each data stream and an identification field of each data stream, and the forwarding label of each data stream is set in an outer label of the target message; determining a next-hop forwarding device for sending the target message based on the routing field of each data stream; and distributing the multiple data streams to multiple parallel links in a link aggregation group based on the identification field of each data stream.
  • the above-mentioned device also includes: a first parsing module, which is configured to generate a routing field for each of the above-mentioned data flows and an identification field for each of the above-mentioned data flows through a controller, and after obtaining the forwarding label of each of the above-mentioned data flows, when the identification field of each of the above-mentioned data flows is the above-mentioned zero value, parse the above-mentioned target message through a source routing device to obtain the message information of the above-mentioned target message; a first configuration module, which is configured to configure the identification field of each of the above-mentioned data flows based on the above-mentioned message information; or, a second configuration module, which is configured to configure the identification field of each of the above-mentioned data flows on a network management device according to a preset whitelist mechanism.
  • a first parsing module which is configured to generate a routing field for each of the above-mentioned
  • the above-mentioned device also includes: a first encapsulation module, which is configured to generate a routing field for each of the above-mentioned data streams and an identification field for each of the above-mentioned data streams through a controller, and after obtaining a forwarding label for each of the above-mentioned data streams, when the identification field of each of the above-mentioned data streams is a non-zero preset value, encapsulate the above-mentioned target message according to the forwarding label of each of the above-mentioned data streams through a source routing device.
  • a first encapsulation module which is configured to generate a routing field for each of the above-mentioned data streams and an identification field for each of the above-mentioned data streams through a controller, and after obtaining a forwarding label for each of the above-mentioned data streams, when the identification field of each of the above-mentioned data streams is a non-zero preset value, encapsulate
  • the first determination module includes: a first generation unit, configured to generate a routing field for each of the data streams and an identification field for each of the data streams to obtain a forwarding label for each of the data streams, wherein the routing field for each of the data streams is determined by the source routing device according to routing topology information of the plurality of routing devices, and the identification field for each of the data streams is configured by the source routing device based on information of each of the data streams.
  • the above-mentioned first distribution module includes: a second determination unit, configured to determine the value of the identification field of each of the above-mentioned data streams as the hash value of each of the above-mentioned data streams; a first distribution unit, configured to use a preset algorithm to determine the parallel links corresponding to the distribution of the hash value of each of the above-mentioned data streams.
  • the above-mentioned device also includes: a third determination module, which is configured to determine the tunnel type for transmitting the above-mentioned target message before determining the forwarding label of each data flow in the target message; a fourth determination module, which is configured to determine the bits occupied by each of the above-mentioned data flow forwarding labels and the format of each of the above-mentioned data flow forwarding labels based on the above-mentioned tunnel type.
  • a computer-readable storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.
  • an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the forwarding label of each data stream in the target message includes multiple data streams
  • the forwarding label of each data stream includes the routing field of each data stream and the identification field of each data stream
  • the forwarding label of each data stream is set in the outer label of the target message; based on the routing field of each data stream, the next hop forwarding device for sending the target message is determined; based on the identification field of each data stream, the multiple data streams are distributed to multiple parallel links in the link aggregation group. Since the above method is based on flow-based load balancing, it will not increase the burden on the equipment, making the message encapsulation efficiency higher, reducing the cost of network equipment and the demand for network bandwidth. Therefore, it can solve the problem in the related art that the message parsing has high requirements on the equipment due to the excessive depth of the forwarding label or the low data encapsulation efficiency due to too many label layers.
  • FIG1 is a hardware structure block diagram of a mobile terminal of a message sending method according to an embodiment of the present disclosure
  • FIG4 is a schematic diagram of an SR-MPLS TE service scenario according to an embodiment of the present disclosure.
  • FIG5 is a schematic diagram of a SR-MPLS BE service scenario according to an embodiment of the present disclosure.
  • FIG6 is a schematic diagram of a business scenario based on SRv6 policy according to an embodiment of the present disclosure
  • FIG. 7 is a structural block diagram of a message sending device according to an embodiment of the present disclosure.
  • FIG1 is a hardware structure block diagram of a mobile terminal of a message sending method of an embodiment of the present disclosure.
  • the mobile terminal may include one or more (only one is shown in FIG1) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 configured to store data, wherein the mobile terminal may also include a transmission device 106 configured to have a communication function and an input/output device 108.
  • processors 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA
  • a transmission device 106 configured to have a communication function and an input/output device 108.
  • FIG1 is only for illustration and does not limit the structure of the mobile terminal.
  • the mobile terminal may also include more or fewer components than those shown in FIG1, or have a configuration different from that shown in FIG1.
  • the memory 104 may be configured to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the message sending method in the embodiment of the present disclosure.
  • the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the transmission device 106 is configured to receive or send data via a network.
  • Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of the mobile terminal.
  • the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is configured to communicate with the Internet wirelessly.
  • RF Radio Frequency
  • FIG. 2 is a flow chart of the message sending method according to an embodiment of the present disclosure. As shown in FIG. 2 , the process includes the following steps:
  • Step S202 determining a forwarding label of each data flow in the target message, wherein the target message includes multiple data flows, the forwarding label of each data flow includes a routing field of each data flow and an identification field of each data flow, and the forwarding label of each data flow is set in the outer label of the target message;
  • Step S204 determining the next hop forwarding device to which the target message is sent based on the routing field of each data flow
  • Step S206 Distribute the multiple data flows to the multiple parallel links in the link aggregation group based on the identification field of each data flow.
  • This embodiment includes but is not limited to the scenario where source routing should be set.
  • source routing scenario flow-based load balancing needs to be implemented, and the intermediate nodes need to perceive the flow and identify the flow.
  • the forwarding label may be a label including a routing field and an identification field of the data flow.
  • MPLS Multi-Protocol Label Switching
  • the MPLS Label field is 20 bits
  • this embodiment divides the MPLS Label into two parts, the Forwarding Equivalent Class FEC (Forwarding Equivalent Class) and the Flow Entropy Aware SID (Flow Entropy Aware SID).
  • the FEC part can occupy 16 bits to represent the outbound adjacency of the node or multiple links, and the FEA part can occupy 4 bits, which is set based on the flow and used as the hash value hash key for load balancing of the equal-cost routing ECMP node.
  • the FEA-SID can be used as a prefix-SID label, set for forwarding of SR-BE tunnels; it can also be used as an adjacent SID, set for path forwarding in the form of SR-TE and SR-policy.
  • this embodiment is mainly configured to load balance multiple links between two adjacent network elements.
  • the execution subject of the above steps may be a terminal, a server, a specific processor provided in the terminal or the server, or a processor or processing device provided relatively independently from the terminal or the server, but is not limited thereto.
  • the forwarding label of each data stream in the target message includes multiple data streams
  • the forwarding label of each data stream includes the routing field of each data stream and the identification field of each data stream
  • the forwarding label of each data stream is set in the outer label of the target message
  • the next hop forwarding device for sending the target message is determined
  • the multiple data streams are distributed to multiple parallel links in the link aggregation group. Since the above method is based on flow-based load balancing, it will not increase the burden on the equipment, making the message encapsulation efficiency higher, reducing the cost of network equipment and the demand for network bandwidth.
  • the message parsing has high requirements on the equipment due to the excessive forwarding label or the data encapsulation efficiency is low due to too many label layers, so as to improve the message encapsulation efficiency and reduce the requirements of the device for message parsing.
  • determining a forwarding label for each data flow in a target message includes:
  • S1 generating a routing field for each data flow and an identification field for each data flow through a controller to obtain a forwarding label for each data flow, wherein the routing field for each data flow is determined by the controller according to routing topology information of multiple routing devices, and the identification field for each data flow includes one of the following: setting the identification field of each data flow to a zero value through the controller, and setting the identification field of each data flow to a non-zero preset value through the controller.
  • the routing field of each data flow and the identification field of each data flow are generated by the controller mainly in two ways:
  • Method 1 The controller directly sends the routing field FEC, and the identification field FEA field defaults to 0.
  • Method 2 The controller configures the FEA field according to different data streams and a certain algorithm (for example, random, polling, etc.).
  • the controller in this embodiment needs to obtain information about the data flow.
  • the method further includes:
  • S3 configure the identification field of each data flow on the network management device according to the preset whitelist mechanism.
  • the forwarding label generated by the above method 1 is adopted, and the source routing device configures the identification field FEA of FEA-SID according to different message information and a certain algorithm (for example, random, polling, etc.).
  • the controller generates a routing field for each data flow and a tag for each data flow. After the identification field is obtained and the forwarding label of each data flow is obtained, the method includes:
  • the target message is encapsulated according to the forwarding label of each data flow by the source routing device.
  • the source routing device only needs to encapsulate the message according to the label stack sent by the controller.
  • determining a forwarding label for each data flow in a target message includes:
  • S1 generate a routing field for each data flow and an identification field for each data flow, and obtain a forwarding label for each data flow, wherein the routing field for each data flow is determined by a source routing device according to routing topology information of multiple routing devices, and the identification field for each data flow is configured by the source routing device based on information of each data flow.
  • distributing multiple data streams to multiple parallel links in a link aggregation group based on an identification field of each data stream includes:
  • the value of the identification field for each data flow is set based on the data flow and used as a hash key for load balancing among ECMP nodes.
  • the method before determining the forwarding label of each data flow in the target message, the method further includes:
  • S2 Determine the bits occupied by each data flow forwarding label and the format of each data flow forwarding label based on the tunnel type.
  • the tunnel type includes SR-TE, SR-TP, etc.
  • SR-TP tunnel is a commonly used tunnel type, which provides customers with connection-oriented bidirectional path consistent services.
  • SR-TP tunnel is an extension of unidirectional SR-TE tunnel, which is equivalent to binding two SR-TE tunnels with completely consistent paths and opposite directions.
  • This embodiment provides a flow-based load balancing to meet the demand for network link expansion based on source routing technologies such as SR-MPLS and SRv6, without increasing the burden on devices and with higher message encapsulation efficiency.
  • This embodiment defines a forwarding label, which provides forwarding and certain service awareness capabilities.
  • the forwarding label is called FEA-SID (Flow Entropy Aware SID) in this embodiment.
  • the MPLS Label field is 20 bits.
  • This embodiment divides the MPLS Label into two parts: FEC and FEA.
  • the FEC part (occupying 16 bits) is used to characterize the outbound adjacency of the node or multi-link, and the FEA (occupying 4 bits) is set based on the flow and used as the hash key for load balancing of the ECMP node, as shown in Figure 3.
  • FEA-SID can be used as a prefix-SID label and set for SR-BE tunnel forwarding; it can also be used as an adjacent SID and set for SR-TE or SR-policy path forwarding.
  • This embodiment is mainly configured to balance the load of multiple links between two adjacent network elements, and is not configured to balance the load of multiple paths (paths passing through different network element nodes).
  • FEA-SID label space and label publishing methods include:
  • FEA-SID is used as a prefix-SID label.
  • a segment is reserved in the SRGB (Segment Routing Global Block) global label range as FEA-SID.
  • FEA-SID is advertised with IGP routing information.
  • FEA-SID is used as an adjacent SID (adj-SID) label.
  • a section is reserved in the SRLB (Segment Routing Local Block) local label range as FEA-SID.
  • FEA-SID like adj-SID, is published with IGP link information.
  • the FEC field is mainly released, and the FEA field defaults to 0.
  • the length of the FEA field adopts a unified method across the entire network and does not need to be carried in the release information.
  • the controller sends the FEA-SID together with other SIDs in the label stack mode to the head node (source routing device) of the network.
  • the controller has two configuration methods:
  • Method 1 The controller sends FEA-SID, mainly the FEC field.
  • the FEA field defaults to 0.
  • Method 2 The controller configures the FEA field of the FEA-SID according to different data flows and a certain algorithm (eg, random, polling, etc.) This embodiment requires the controller to have information about the data flows.
  • a certain algorithm eg, random, polling, etc.
  • FEA-SID The processing methods of FEA-SID at the head node include:
  • the head node does not need to perceive the number of ECMP group members of the intermediate network ECMP nodes, nor does it need to perceive the link status of the ECMP group members.
  • the head node is the node for packet identification and label stack loading.
  • the head node configures the FEA field of the FEA-SID according to different flows and a certain algorithm (eg, random, polling, etc.).
  • the judgment criteria for different data flows can refer to the loading rules of the general flow ID.
  • the head node only needs to encapsulate the message according to the label stack sent by the controller.
  • the controller and the head node need to be consistent in the processing method of FEA.
  • FEA-SID is processed in ECMP nodes in the following ways:
  • the intermediate ECMP node can determine that the current SID is FEA-SID based on the value of the currently processed SID. Then, based on the FEC field of the FEA-SID, the outbound ECMP group is determined. Then, the FEA field of the FEA-SID is used as the key value of the hash to load-share the message in the ECMP group.
  • the SRv6 SID is divided into three parts: locator, function, and argument.
  • the locator of SRv6 corresponds to the FEC field of SR-MPLS
  • the argument field corresponds to the FEA field of SR-MPLS.
  • SR-MPLS a specific range is assigned to the FEC of the FEA-SID to identify the SID as a FEA-SID
  • the function field is used to identify the SID as a FEA-SID.
  • a new instruction atomic function FEA is introduced, which is set to identify the load sharing based on the value of the argument as the hash key of ECMP. If the FEA-SID belongs to an END.X instruction type, the FEA-SID can be defined as END.XFEA.
  • SRv6 SID is divided into two parts, one is the locator and the other is the FEA.
  • the implementation method is similar to MPLS.
  • flow-based load balancing can be achieved in the source routing technology scenario.
  • it solves the problem that the intermediate nodes lack the flow identification capability and can only hash each packet under the source routing technology.
  • the solution has low requirements on device capabilities and high message encapsulation efficiency, reducing network device costs and network bandwidth requirements.
  • SR-MPLS TE tunnel is a common tunnel type and service carrying mode in source routing technology.
  • SPN network ITU-T MTN standard
  • SR-TP tunnel is a common tunnel type, providing customers with connection-oriented bidirectional path consistent services.
  • SR-TP tunnel is an extension of unidirectional SR-TE tunnel, which is equivalent to binding two SR-TE tunnels with completely consistent paths and opposite directions.
  • This embodiment takes SR-MPLS TE as an example.
  • the network is a network based on SR-MPLS technology.
  • SR-TE1 is an SR-TE tunnel that passes through two ECMP groups.
  • Flow 1, flow 2, and flow n are flows coming from the PE7 head node and need to be forwarded to the sink node PE8 through the SR-TE1 tunnel.
  • the controller uses method 2 to handle FEA.
  • the label stack is issued according to the calculated path.
  • P1 is an ECMP forwarding node, and the inbound SID it processes is FEA-SID, where the FEC field is 900.
  • the FEA assigned by the head node PE7 is 1; for flow 2, the FEA assigned by the head node PE7 is 2.
  • the FEA assigned by the head node PE7 is a value between 0 and 15, depending on the allocation algorithm.
  • the P1 node After receiving the message, the P1 node determines that the outgoing interface is a multi-link connected to P2 based on FEC; it performs hashing based on FEA to determine which specific flow is distributed to which link member of the ECMP group.
  • the P3 forwarding direction page has an ECMP group, and the processing method is the same as that of the P1 node.
  • SR-BE packets only carry the prefix-SID of the destination node, and the SR-BE forwarding path may pass through multiple nodes that need to perform ECMP.
  • prefix-SIDs are required to be FEA-SIDs.
  • Each ECMP node uses the FEA of the destination node prefix-SID (FEA-SID type) as the hash key value to perform flow-based load balancing.
  • 0008 is the FEC part of the prefix-SID of node PE8.
  • SR-BE1 is the SR-MPLS BE tunnel from PE7 to PE8.
  • the controller uses method 1 to handle FEA.
  • the label stack is issued according to the final destination node.
  • the SR-BE tunnel has only one label layer.
  • P1 is an ECMP forwarding node, and the inbound SID it processes is FEA-SID, where the FEC field is 0008.
  • the controller assigns FEA 1; for flow 2, the head node PE7 assigns FEA 2.
  • the head node PE7 assigns FEA values between 0 and 15, depending on the allocation algorithm.
  • the P1 node After receiving the message, the P1 node determines that the outgoing interface is a multi-link connected to P2 based on FEC; it performs hashing based on FEA to determine which specific flow is distributed to which link member of the ECMP group.
  • P3 also has an ECMP group in the forwarding direction, and the processing method is the same as that of the P1 node.
  • SRv6 is an SR technology system based on IPv6.
  • the network is an SRv6 technology-based network with multiple-link ECMP groups between P1-P2 and P3-PE8.
  • the SRv6 policy 1 shown in the figure is an SRv6 policy that passes through two ECMP groups. Flow 1, flow 2, and flow n are flows coming from the PE7 head node and need to be forwarded to the sink node PE8 through policy 1.
  • the controller uses method 2 to handle FEA.
  • the label stack is issued according to the calculated path.
  • P1 is an ECMP forwarding node.
  • the function field of the incoming SID it processes is END.XFEA, and the locator field is 1002.
  • the argument field FEA assigned by the head node PE7 is 1; for flow 2, the argument field FEA assigned by the head node PE7 is 2.
  • the head node PE7 assigns them specific FEA values. The value range depends on the length of the argument field, and the specific value depends on the allocation algorithm.
  • the P1 node After receiving the message, the P1 node determines that the outgoing interface is a multi-link connected to P2 based on the locator; it performs hashing based on the FEA to determine which specific flow is distributed to which link member of the ECMP group.
  • the P3 forwarding direction also has an ECMP group, and the processing method is the same as that of the P1 node.
  • the method can be implemented by means of software plus a necessary general hardware platform, or by hardware, but in many cases the former is a better implementation method.
  • the technical solution of the present disclosure, or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, disk, CD), and includes several instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.
  • a message sending device is also provided, and the device is arranged to implement the above-mentioned embodiment and preferred implementation mode, and the descriptions which have been made are not repeated.
  • the term "module” can implement a combination of software and/or hardware of a predetermined function.
  • the device described in the following embodiments is preferably implemented with software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
  • FIG. 7 is a structural block diagram of a message sending device according to an embodiment of the present disclosure. As shown in FIG. 7 , the device includes:
  • a first determination module 72 is configured to determine a forwarding label of each data flow in a target message, wherein the target message includes multiple data flows, the forwarding label of each data flow includes a routing field of each data flow and an identification field of each data flow, and the forwarding label of each data flow is set in an outer label of the target message;
  • a second determination module 74 is configured to determine a next hop forwarding device to send a target message based on a routing field of each data flow;
  • the first distribution module 76 is configured to distribute the multiple data streams to the multiple parallel links in the link aggregation group based on the identification field of each data stream.
  • the first determining module includes:
  • the first determination unit is configured to generate a routing field for each of the above-mentioned data flows and an identification field for each of the above-mentioned data flows through a controller to obtain a forwarding label for each of the above-mentioned data flows, wherein the routing field for each of the above-mentioned data flows is determined by the above-mentioned controller according to the routing topology information of the multiple above-mentioned routing devices, and the identification field for each of the above-mentioned data flows includes one of the following: setting the identification field of each of the above-mentioned data flows to a zero value through the above-mentioned controller, and setting the identification field of each of the above-mentioned data flows to a non-zero preset value through the above-mentioned controller.
  • the apparatus further comprises:
  • a first parsing module is configured to generate a routing field of each of the above-mentioned data flows and an identification field of each of the above-mentioned data flows through a controller, and after obtaining a forwarding label of each of the above-mentioned data flows, when the identification field of each of the above-mentioned data flows is the above-mentioned zero value, parse the above-mentioned target message through a source routing device to obtain the message information of the above-mentioned target message;
  • a first configuration module is configured to configure the identification field of each of the above data flows based on the above message information; or,
  • the second configuration module is configured to configure the identification field of each of the above data flows according to a preset whitelist mechanism on the network management device.
  • the apparatus further comprises:
  • the first encapsulation module is configured to generate a routing field for each of the above-mentioned data flows and an identification field for each of the above-mentioned data flows through a controller, and after obtaining a forwarding label for each of the above-mentioned data flows, when the identification field of each of the above-mentioned data flows is the above-mentioned preset value that is non-zero, encapsulate the above-mentioned target message according to the forwarding label of each of the above-mentioned data flows through a source routing device.
  • the first determining module includes:
  • the first generating unit is configured to generate a routing field for each of the above-mentioned data flows and an identification field for each of the above-mentioned data flows, and obtain a forwarding label for each of the above-mentioned data flows, wherein the routing field for each of the above-mentioned data flows is determined by the above-mentioned source routing device according to the routing topology information of the plurality of above-mentioned routing devices, and the identification field for each of the above-mentioned data flows is determined by the above-mentioned source routing device based on the routing topology information of the plurality of above-mentioned routing devices. Information configuration for each of the above data flows.
  • the first distribution module includes:
  • the first distribution unit is configured to use a preset algorithm to determine the parallel link corresponding to the hash value of each of the above data streams.
  • the apparatus further comprises:
  • a third determination module is configured to determine a tunnel type for transmitting the target message before determining a forwarding label of each data flow in the target message;
  • the fourth determination module is configured to determine the bits occupied by each of the data flow forwarding labels and the format of each of the data flow forwarding labels based on the tunnel type.
  • the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
  • An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
  • the above-mentioned computer-readable storage medium may include, but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
  • An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
  • modules or steps of the present disclosure can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation.
  • the present disclosure is not limited to any specific combination of hardware and software.

Landscapes

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

Abstract

Disclosed in the present disclosure are a packet transmission method and apparatus, a storage medium and an electronic device. The method comprises: determining a forwarding label of each data stream in a target packet, wherein the target packet comprises a plurality of data streams, the forwarding label of each data stream comprises a routing field of each data stream and an identification field of each data stream, and the forwarding label of each data stream is provided in an outer label of the target packet; on the basis of the routing field of each data stream, determining a next-hop forwarding device used for transmitting the target packet; and distributing the plurality of data streams to a plurality of parallel links in a link aggregation group on the basis of the identification field of each data stream.

Description

报文发送方法、装置、存储介质及电子装置Message sending method, device, storage medium and electronic device
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本公开基于2022年11月18日提交的发明名称为“报文发送方法、装置、存储介质及电子装置”的中国专利申请CN202211463771.5,并且要求该专利申请的优先权,通过引用将其所公开的内容全部并入本公开。This disclosure is based on Chinese patent application CN202211463771.5, filed on November 18, 2022, with the invention name “Message sending method, device, storage medium and electronic device”, and claims the priority of the patent application, and all the contents disclosed therein are incorporated into this disclosure by reference.
技术领域Technical Field
本公开实施例涉及通信领域,具体而言,涉及一种报文发送方法、装置、存储介质及电子装置。The embodiments of the present disclosure relate to the field of communications, and in particular, to a message sending method, device, storage medium, and electronic device.
背景技术Background technique
随着业务带宽需求增加,网络通过增加链路扩容,需要使用多链路的负载均衡技术。以基于MPLS转发平面的段路由(Segment Routing MPLS,简称为SR-MPLS)网络为例,SR-MPLS标签栈最顶层主要设置为路径转发,并不能详细标识业务流,所以只能实现基于包的负载分担。但是逐包会影响终端业务体验,需要实现基于流的负载均衡。然而在源路由场景,要实现基于流的负载均衡,中间节点需要感知流识别流。当前技术方案中只能基于报文的深度解析,代价比较高,效率低。As the demand for service bandwidth increases, the network needs to expand capacity by adding links, and multi-link load balancing technology is needed. Taking the Segment Routing MPLS (SR-MPLS) network based on the MPLS forwarding plane as an example, the top layer of the SR-MPLS label stack is mainly set to path forwarding, and the service flow cannot be identified in detail, so only packet-based load sharing can be achieved. However, packet-by-packet will affect the terminal service experience, and flow-based load balancing needs to be achieved. However, in the source routing scenario, to achieve flow-based load balancing, the intermediate nodes need to perceive the flow and identify the flow. The current technical solution can only be based on deep analysis of the message, which is relatively costly and inefficient.
发明内容Summary of the invention
本公开实施例提供了一种报文发送方法、装置、存储介质及电子装置,以至少解决相关技术中因为转发标签过深导致报文解析对设备要求高或者标签层数过多导致数据封装效率低的问题。The embodiments of the present disclosure provide a message sending method, device, storage medium and electronic device to at least solve the problem in the related art that message parsing has high requirements on equipment due to too deep forwarding labels or too many label layers lead to low data encapsulation efficiency.
根据本公开的一个实施例,提供了一种报文发送方法,包括:确定目标报文中每个数据流的转发标签,其中,上述目标报文中包括多个上述数据流,每个上述数据流的转发标签中包括每个上述数据流的路由字段和每个上述数据流的标识字段,每个上述数据流的转发标签均设置在上述目标报文的外层标签中;基于每个上述数据流的路由字段确定发送上述目标报文的下一跳转发设备;基于每个上述数据流的标识字段将多个上述数据流分发至链路聚合组中的多个平行链路中。According to an embodiment of the present disclosure, a message sending method is provided, comprising: determining a forwarding label of each data stream in a target message, wherein the target message includes multiple data streams, the forwarding label of each data stream includes a routing field of each data stream and an identification field of each data stream, and the forwarding label of each data stream is set in an outer label of the target message; determining a next-hop forwarding device for sending the target message based on the routing field of each data stream; and distributing the multiple data streams to multiple parallel links in a link aggregation group based on the identification field of each data stream.
根据本公开的又一个实施例,还提供了一种报文发送装置,包括:第一确定模块,设置为确定目标报文中每个数据流的转发标签,其中,上述目标报文中包括多个上述数据流,每个上述数据流的转发标签中包括每个上述数据流的路由字段和每个上述数据流的标识字段,每个上述数据流的转发标签均设置在上述目标报文的外层标签中;第二确定模块,设置为基于每个上述数据流的路由字段确定发送上述目标报文的下一跳转发设备;第一分发模块,设置为基于每个上述数据流的标识字段将多个上述数据流分发至链路聚合组中的多个平行链路中。According to another embodiment of the present disclosure, a message sending device is also provided, including: a first determination module, configured to determine the forwarding label of each data stream in a target message, wherein the target message includes multiple data streams, the forwarding label of each data stream includes a routing field of each data stream and an identification field of each data stream, and the forwarding label of each data stream is set in an outer label of the target message; a second determination module, configured to determine the next-hop forwarding device for sending the target message based on the routing field of each data stream; a first distribution module, configured to distribute the multiple data streams to multiple parallel links in a link aggregation group based on the identification field of each data stream.
在一个示例性实施例中,上述第一确定模块,包括:第一确定单元,设置为通过控制器生成每个上述数据流的路由字段,以及每个上述数据流的标识字段,得到每个上述数据流的转发标签,其中,每个上述数据流的路由字段是上述控制器按照多个上述路由设备的路由拓 扑信息确定的,每个上述数据流的标识字段包括以下之一:通过上述控制器将每个上述数据流的标识字段设置为零值,通过上述控制器每个上述数据流的标识字段设置为非零的预设值。In an exemplary embodiment, the first determination module includes: a first determination unit, configured to generate a routing field of each of the data flows and an identification field of each of the data flows through a controller, and obtain a forwarding label of each of the data flows, wherein the routing field of each of the data flows is a routing field generated by the controller according to the routing topology of the plurality of routing devices. The identification field of each of the above-mentioned data streams is determined by the information of the flutter, and includes one of the following: setting the identification field of each of the above-mentioned data streams to a zero value through the above-mentioned controller, and setting the identification field of each of the above-mentioned data streams to a non-zero preset value through the above-mentioned controller.
在一个示例性实施例中,上述装置还包括:第一解析模块,设置为通过控制器生成每个上述数据流的路由字段,以及每个上述数据流的标识字段,得到每个上述数据流的转发标签之后,在每个上述数据流的标识字段为上述零值的情况下,通过源路由设备解析上述目标报文,得到上述目标报文的报文信息;第一配置模块,设置为基于上述报文信息配置每个上述数据流的标识字段;或者,第二配置模块,设置为在网管设备上按照预设白名单机制,配置每个上述数据流的标识字段。In an exemplary embodiment, the above-mentioned device also includes: a first parsing module, which is configured to generate a routing field for each of the above-mentioned data flows and an identification field for each of the above-mentioned data flows through a controller, and after obtaining the forwarding label of each of the above-mentioned data flows, when the identification field of each of the above-mentioned data flows is the above-mentioned zero value, parse the above-mentioned target message through a source routing device to obtain the message information of the above-mentioned target message; a first configuration module, which is configured to configure the identification field of each of the above-mentioned data flows based on the above-mentioned message information; or, a second configuration module, which is configured to configure the identification field of each of the above-mentioned data flows on a network management device according to a preset whitelist mechanism.
在一个示例性实施例中,上述装置还包括:第一封装模块,设置为通过控制器生成每个上述数据流的路由字段,以及每个上述数据流的标识字段,得到每个上述数据流的转发标签之后,在每个上述数据流的标识字段为非零的上述预设值的情况下,通过源路由设备按照每个上述数据流的转发标签对上述目标报文进行封装。In an exemplary embodiment, the above-mentioned device also includes: a first encapsulation module, which is configured to generate a routing field for each of the above-mentioned data streams and an identification field for each of the above-mentioned data streams through a controller, and after obtaining a forwarding label for each of the above-mentioned data streams, when the identification field of each of the above-mentioned data streams is a non-zero preset value, encapsulate the above-mentioned target message according to the forwarding label of each of the above-mentioned data streams through a source routing device.
在一个示例性实施例中,上述第一确定模块,包括:第一生成单元,设置为生成每个上述数据流的路由字段和每个上述数据流的标识字段,得到每个上述数据流的转发标签,其中,每个上述数据流的路由字段是上述源路由设备按照多个上述路由设备的路由拓扑信息确定的,每个上述数据流的标识字段是上述源路由设备基于每个上述数据流的信息配置的。In an exemplary embodiment, the first determination module includes: a first generation unit, configured to generate a routing field for each of the data streams and an identification field for each of the data streams to obtain a forwarding label for each of the data streams, wherein the routing field for each of the data streams is determined by the source routing device according to routing topology information of the plurality of routing devices, and the identification field for each of the data streams is configured by the source routing device based on information of each of the data streams.
在一个示例性实施例中,上述第一分发模块,包括:第二确定单元,设置为将每个上述数据流的标识字段的值确定为每个上述数据流的哈希值;第一分发单元,设置为利用预设算法确定每个上述数据流的哈希值对应分发的平行链路。In an exemplary embodiment, the above-mentioned first distribution module includes: a second determination unit, configured to determine the value of the identification field of each of the above-mentioned data streams as the hash value of each of the above-mentioned data streams; a first distribution unit, configured to use a preset algorithm to determine the parallel links corresponding to the distribution of the hash value of each of the above-mentioned data streams.
在一个示例性实施例中,上述装置还包括:第三确定模块,设置为确定目标报文中每个数据流的转发标签之前,确定传输上述目标报文的隧道类型;第四确定模块,设置为基于上述隧道类型确定每个上述数据流转发标签所占的比特位以及每个上述数据流转发标签的格式。In an exemplary embodiment, the above-mentioned device also includes: a third determination module, which is configured to determine the tunnel type for transmitting the above-mentioned target message before determining the forwarding label of each data flow in the target message; a fourth determination module, which is configured to determine the bits occupied by each of the above-mentioned data flow forwarding labels and the format of each of the above-mentioned data flow forwarding labels based on the above-mentioned tunnel type.
根据本公开的又一个实施例,还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to another embodiment of the present disclosure, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.
根据本公开的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to another embodiment of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
通过本公开,通过确定目标报文中每个数据流的转发标签,其中,目标报文中包括多个数据流,每个数据流的转发标签中包括每个数据流的路由字段和每个数据流的标识字段,每个数据流的转发标签均设置在目标报文的外层标签中;基于每个数据流的路由字段确定发送目标报文的下一跳转发设备;基于每个数据流的标识字段将多个数据流分发至链路聚合组中的多个平行链路中。由于在上述方法中是基于流的负载均衡,不会增加设备负担,使得报文封装效率更高,降低了网络设备的成本和网络带宽的需求。因此,可以解决相关技术中因为转发标签过深导致报文解析对设备要求高或者标签层数过多导致数据封装效率低的问题。Through the present disclosure, by determining the forwarding label of each data stream in the target message, wherein the target message includes multiple data streams, the forwarding label of each data stream includes the routing field of each data stream and the identification field of each data stream, and the forwarding label of each data stream is set in the outer label of the target message; based on the routing field of each data stream, the next hop forwarding device for sending the target message is determined; based on the identification field of each data stream, the multiple data streams are distributed to multiple parallel links in the link aggregation group. Since the above method is based on flow-based load balancing, it will not increase the burden on the equipment, making the message encapsulation efficiency higher, reducing the cost of network equipment and the demand for network bandwidth. Therefore, it can solve the problem in the related art that the message parsing has high requirements on the equipment due to the excessive depth of the forwarding label or the low data encapsulation efficiency due to too many label layers.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本公开实施例的一种报文发送方法的移动终端的硬件结构框图;FIG1 is a hardware structure block diagram of a mobile terminal of a message sending method according to an embodiment of the present disclosure;
图2是根据本公开实施例的报文发送方法的流程图;FIG2 is a flow chart of a method for sending a message according to an embodiment of the present disclosure;
图3是根据本公开实施例的FA-SID数据结构示意图; FIG3 is a schematic diagram of a FA-SID data structure according to an embodiment of the present disclosure;
图4是根据本公开实施例的基于SR-MPLS TE业务场景下的示意图;FIG4 is a schematic diagram of an SR-MPLS TE service scenario according to an embodiment of the present disclosure;
图5是根据本公开实施例的基于SR-MPLS BE业务场景下的示意图;FIG5 is a schematic diagram of a SR-MPLS BE service scenario according to an embodiment of the present disclosure;
图6是根据本公开实施例的基于SRv6 policy的业务场景的示意图;FIG6 is a schematic diagram of a business scenario based on SRv6 policy according to an embodiment of the present disclosure;
图7是根据本公开实施例的报文发送装置的结构框图。FIG. 7 is a structural block diagram of a message sending device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本公开的实施例。Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是设置为区别类似的对象,而不必设置为描述特定的顺序或先后次序。It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are set to distinguish similar objects, and are not necessarily set to describe a specific order or sequence.
本申请实施例中所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图1是本公开实施例的一种报文发送方法的移动终端的硬件结构框图。如图1所示,移动终端可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和设置为存储数据的存储器104,其中,上述移动终端还可以包括设置为通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, FIG1 is a hardware structure block diagram of a mobile terminal of a message sending method of an embodiment of the present disclosure. As shown in FIG1, the mobile terminal may include one or more (only one is shown in FIG1) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 configured to store data, wherein the mobile terminal may also include a transmission device 106 configured to have a communication function and an input/output device 108. It can be understood by those skilled in the art that the structure shown in FIG1 is only for illustration and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than those shown in FIG1, or have a configuration different from that shown in FIG1.
存储器104可设置为存储计算机程序,例如,应用软件的软件程序以及模块,如本公开实施例中的报文发送方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 may be configured to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the message sending method in the embodiment of the present disclosure. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
传输装置106设置为经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其设置为通过无线方式与互联网进行通讯。The transmission device 106 is configured to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is configured to communicate with the Internet wirelessly.
在本实施例中提供了一种报文发送方法,图2是根据本公开实施例的报文发送方法的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a message sending method is provided. FIG. 2 is a flow chart of the message sending method according to an embodiment of the present disclosure. As shown in FIG. 2 , the process includes the following steps:
步骤S202,确定目标报文中每个数据流的转发标签,其中,目标报文中包括多个数据流,每个数据流的转发标签中包括每个数据流的路由字段和每个数据流的标识字段,每个数据流的转发标签均设置在目标报文的外层标签中;Step S202, determining a forwarding label of each data flow in the target message, wherein the target message includes multiple data flows, the forwarding label of each data flow includes a routing field of each data flow and an identification field of each data flow, and the forwarding label of each data flow is set in the outer label of the target message;
步骤S204,基于每个数据流的路由字段确定发送目标报文的下一跳转发设备;Step S204, determining the next hop forwarding device to which the target message is sent based on the routing field of each data flow;
步骤S206,基于每个数据流的标识字段将多个数据流分发至链路聚合组中的多个平行链路中。Step S206: Distribute the multiple data flows to the multiple parallel links in the link aggregation group based on the identification field of each data flow.
本实施例包括但不限于应设置为源路由的场景中。在源路由场景中,需要实现基于流的负载均衡,中间节点需要感知流识别流。This embodiment includes but is not limited to the scenario where source routing should be set. In the source routing scenario, flow-based load balancing needs to be implemented, and the intermediate nodes need to perceive the flow and identify the flow.
可选地,转发标签可以是包括数据流的路由字段和标识字段的标签。例如,转发标签可 以是多协议标签交换(Multi-Protocol Label Switching,简称为MPLS),MPLS Label字段为20个bit,本实施例将MPLS Label划分为两部分,转发等价类FEC(Forwarding Equivalent Class)和流熵感知FEA(Flow Entropy Aware SID)。FEC部分可以占用16bit,用来表示节点或者多链路的出向邻接,FEA部分可以占用4bit,基于流来设置并作为等价路由ECMP节点进行负载均衡的哈希值hash key。如图3所示,FEA-SID可以作为prefix-SID标签使用,设置为SR-BE形式隧道的转发;也可以作为adjacent SID,设置为SR-TE、SR-policy形式的路径转发。Optionally, the forwarding label may be a label including a routing field and an identification field of the data flow. This is Multi-Protocol Label Switching (MPLS for short), the MPLS Label field is 20 bits, and this embodiment divides the MPLS Label into two parts, the Forwarding Equivalent Class FEC (Forwarding Equivalent Class) and the Flow Entropy Aware SID (Flow Entropy Aware SID). The FEC part can occupy 16 bits to represent the outbound adjacency of the node or multiple links, and the FEA part can occupy 4 bits, which is set based on the flow and used as the hash value hash key for load balancing of the equal-cost routing ECMP node. As shown in Figure 3, the FEA-SID can be used as a prefix-SID label, set for forwarding of SR-BE tunnels; it can also be used as an adjacent SID, set for path forwarding in the form of SR-TE and SR-policy.
可选地,本实施例主要设置为相邻两个网元之间多链路的负载均衡。Optionally, this embodiment is mainly configured to load balance multiple links between two adjacent network elements.
其中,上述步骤的执行主体可以为终端、服务器、终端或服务器中设置的具体处理器,或者与终端或者服务器相对独立设置的处理器或者处理设备等,但不限于此。The execution subject of the above steps may be a terminal, a server, a specific processor provided in the terminal or the server, or a processor or processing device provided relatively independently from the terminal or the server, but is not limited thereto.
通过上述步骤,通过确定目标报文中每个数据流的转发标签,其中,目标报文中包括多个数据流,每个数据流的转发标签中包括每个数据流的路由字段和每个数据流的标识字段,每个数据流的转发标签均设置在目标报文的外层标签中;基于每个数据流的路由字段确定发送目标报文的下一跳转发设备;基于每个数据流的标识字段将多个数据流分发至链路聚合组中的多个平行链路中。由于在上述方法中是基于流的负载均衡,不会增加设备负担,使得报文封装效率更高,降低了网络设备的成本和网络带宽的需求。因此,可以解决相关技术中因为转发标签过深导致报文解析对设备要求高或者标签层数过多导致数据封装效率低的问题,达到提高报文封装效率并降低报文解析对设备要求的效果。Through the above steps, by determining the forwarding label of each data stream in the target message, wherein the target message includes multiple data streams, the forwarding label of each data stream includes the routing field of each data stream and the identification field of each data stream, and the forwarding label of each data stream is set in the outer label of the target message; based on the routing field of each data stream, the next hop forwarding device for sending the target message is determined; based on the identification field of each data stream, the multiple data streams are distributed to multiple parallel links in the link aggregation group. Since the above method is based on flow-based load balancing, it will not increase the burden on the equipment, making the message encapsulation efficiency higher, reducing the cost of network equipment and the demand for network bandwidth. Therefore, it can solve the problem in the related art that the message parsing has high requirements on the equipment due to the excessive forwarding label or the data encapsulation efficiency is low due to too many label layers, so as to improve the message encapsulation efficiency and reduce the requirements of the device for message parsing.
在一个示例性实施例中,确定目标报文中每个数据流的转发标签,包括:In an exemplary embodiment, determining a forwarding label for each data flow in a target message includes:
S1,通过控制器生成每个数据流的路由字段,以及每个数据流的标识字段,得到每个数据流的转发标签,其中,每个数据流的路由字段是控制器按照多个路由设备的路由拓扑信息确定的,每个数据流的标识字段包括以下之一:通过控制器将每个数据流的标识字段设置为零值,通过控制器每个数据流的标识字段设置为非零的预设值。S1, generating a routing field for each data flow and an identification field for each data flow through a controller to obtain a forwarding label for each data flow, wherein the routing field for each data flow is determined by the controller according to routing topology information of multiple routing devices, and the identification field for each data flow includes one of the following: setting the identification field of each data flow to a zero value through the controller, and setting the identification field of each data flow to a non-zero preset value through the controller.
可选地,通过控制器生成每个数据流的路由字段,以及每个数据流的标识字段主要包括两种方式:Optionally, the routing field of each data flow and the identification field of each data flow are generated by the controller mainly in two ways:
方式一:控制器直接下发路由字段FEC,标识字段FEA字段默认为0。Method 1: The controller directly sends the routing field FEC, and the identification field FEA field defaults to 0.
方式二:控制器根据不同的数据流,按照一定的算法(例如,随机、轮询等),配置FEA字段。Method 2: The controller configures the FEA field according to different data streams and a certain algorithm (for example, random, polling, etc.).
可选地,本实施例控制器需要获取数据流的信息。Optionally, the controller in this embodiment needs to obtain information about the data flow.
在一个示例性实施例中,通过控制器生成每个数据流的路由字段,以及每个数据流的标识字段,得到每个数据流的转发标签之后,方法还包括:In an exemplary embodiment, after the controller generates a routing field for each data flow and an identification field for each data flow and obtains a forwarding label for each data flow, the method further includes:
S1,在每个数据流的标识字段为零值的情况下,通过源路由设备解析目标报文,得到目标报文的报文信息;S1, when the identification field of each data flow is zero, the target message is parsed by the source routing device to obtain the message information of the target message;
S2,基于报文信息配置每个数据流的标识字段;或者,S2, configuring the identification field of each data flow based on the message information; or,
S3,在网管设备上按照预设白名单机制,配置每个数据流的标识字段。S3, configure the identification field of each data flow on the network management device according to the preset whitelist mechanism.
可选地,在每个数据流的标识字段为零值的情况下,采用了上述方式一生成的转发标签,则源路由设备根据不同的报文信息,按照一定的算法(例如,随机、轮询等),配置FEA-SID的标识字段FEA。Optionally, when the identification field of each data flow is zero, the forwarding label generated by the above method 1 is adopted, and the source routing device configures the identification field FEA of FEA-SID according to different message information and a certain algorithm (for example, random, polling, etc.).
在一个示例性实施例中,通过控制器生成每个数据流的路由字段,以及每个数据流的标 识字段,得到每个数据流的转发标签之后,方法包括:In an exemplary embodiment, the controller generates a routing field for each data flow and a tag for each data flow. After the identification field is obtained and the forwarding label of each data flow is obtained, the method includes:
S1,在每个数据流的标识字段为非零的预设值的情况下,通过源路由设备按照每个数据流的转发标签对目标报文进行封装。S1, when the identification field of each data flow is a non-zero preset value, the target message is encapsulated according to the forwarding label of each data flow by the source routing device.
可选地,每个数据流的标识字段为非零的预设值的情况下,即是采用了方式二确定的转发标签,则源路由设备只需按照控制器下发的标签栈进行报文封装。Optionally, when the identification field of each data flow is a non-zero preset value, that is, the forwarding label determined in the second manner is adopted, the source routing device only needs to encapsulate the message according to the label stack sent by the controller.
在一个示例性实施例中,确定目标报文中每个数据流的转发标签,包括:In an exemplary embodiment, determining a forwarding label for each data flow in a target message includes:
S1,生成每个数据流的路由字段和每个数据流的标识字段,得到每个数据流的转发标签,其中,每个数据流的路由字段是源路由设备按照多个路由设备的路由拓扑信息确定的,每个数据流的标识字段是源路由设备基于每个数据流的信息配置的。S1, generate a routing field for each data flow and an identification field for each data flow, and obtain a forwarding label for each data flow, wherein the routing field for each data flow is determined by a source routing device according to routing topology information of multiple routing devices, and the identification field for each data flow is configured by the source routing device based on information of each data flow.
在一个示例性实施例中,基于每个数据流的标识字段将多个数据流分发至链路聚合组中的多个平行链路中,包括:In an exemplary embodiment, distributing multiple data streams to multiple parallel links in a link aggregation group based on an identification field of each data stream includes:
S1,将每个数据流的标识字段的值确定为每个数据流的哈希值;S1, determining the value of the identification field of each data flow as the hash value of each data flow;
S2,利用预设算法确定每个数据流的哈希值对应分发的平行链路。S2, using a preset algorithm to determine the parallel link corresponding to the hash value of each data stream.
可选地,每个数据流的标识字段的值是基于数据流来设置的,并作为ECMP节点进行负载均衡的hash key。Optionally, the value of the identification field for each data flow is set based on the data flow and used as a hash key for load balancing among ECMP nodes.
在一个示例性实施例中,确定目标报文中每个数据流的转发标签之前,方法还包括:In an exemplary embodiment, before determining the forwarding label of each data flow in the target message, the method further includes:
S1,确定传输目标报文的隧道类型;S1, determine the tunnel type for transmitting the target message;
S2,基于隧道类型确定每个数据流转发标签所占的比特位以及每个数据流转发标签的格式。S2: Determine the bits occupied by each data flow forwarding label and the format of each data flow forwarding label based on the tunnel type.
可选地,隧道类型包括SR-TE、SR-TP等。SR-TP隧道是常用的隧道类型,为客户提供面向连接的双向路径一致的服务。SR-TP隧道是在单向SR-TE隧道的基础上进行扩展,等同于绑定了路径完全一致,方向相反的两条SR-TE隧道。Optionally, the tunnel type includes SR-TE, SR-TP, etc. SR-TP tunnel is a commonly used tunnel type, which provides customers with connection-oriented bidirectional path consistent services. SR-TP tunnel is an extension of unidirectional SR-TE tunnel, which is equivalent to binding two SR-TE tunnels with completely consistent paths and opposite directions.
下面结合具体实施例对本公开进行说明:The present disclosure is described below in conjunction with specific embodiments:
本实施例针对基于SR-MPLS、SRv6等源路由技术的网络链路扩容需求,提供了一种基于流的负载均衡,不增加设备的负担,报文封装效率更高。This embodiment provides a flow-based load balancing to meet the demand for network link expansion based on source routing technologies such as SR-MPLS and SRv6, without increasing the burden on devices and with higher message encapsulation efficiency.
本实施例定义一种转发标签,同时提供转发和一定的业务感知能力,转发标签在本实施例中称为FEA-SID(Flow Entropy Aware SID)。This embodiment defines a forwarding label, which provides forwarding and certain service awareness capabilities. The forwarding label is called FEA-SID (Flow Entropy Aware SID) in this embodiment.
在SR-MPLS网络中,对于MPLS标签,MPLS Label字段为20个bit,本实施例将MPLS Label划分为两部分:FEC和FEA。FEC部分(占用16bit)用来表征节点或者多链路的出向邻接,FEA(占用4bit)基于流来设置并作为ECMP节点进行负载均衡的hash key,具体如图3所示。In the SR-MPLS network, for the MPLS label, the MPLS Label field is 20 bits. This embodiment divides the MPLS Label into two parts: FEC and FEA. The FEC part (occupying 16 bits) is used to characterize the outbound adjacency of the node or multi-link, and the FEA (occupying 4 bits) is set based on the flow and used as the hash key for load balancing of the ECMP node, as shown in Figure 3.
FEA-SID可以作为prefix-SID标签使用,设置为SR-BE形式隧道的转发;也可以作为adjacent SID,设置为SR-TE、SR-policy形式的路径转发。FEA-SID can be used as a prefix-SID label and set for SR-BE tunnel forwarding; it can also be used as an adjacent SID and set for SR-TE or SR-policy path forwarding.
本实施例主要设置为相邻两个网元之间多链路的负载均衡,不设置为多路径(路径经过不同的网元节点)的负载均衡。This embodiment is mainly configured to balance the load of multiple links between two adjacent network elements, and is not configured to balance the load of multiple paths (paths passing through different network element nodes).
1)FEA-SID的标签空间及标签发布方式包括:1) FEA-SID label space and label publishing methods include:
FEA-SID作为prefix-SID标签使用,在SRGB(Segment Routing Global Block)全局标签范围中预留一段,作为FEA-SID。FEA-SID与prefix-SID一样,随IGP路由信息发布。 FEA-SID is used as a prefix-SID label. A segment is reserved in the SRGB (Segment Routing Global Block) global label range as FEA-SID. Like prefix-SID, FEA-SID is advertised with IGP routing information.
FEA-SID作为adjacent SID(adj-SID)标签使用,在SRLB(Segment Routing Local Block)本地标签范围中预留一段,作为FEA-SID。FEA-SID与adj-SID一样,随IGP链路信息发布。FEA-SID is used as an adjacent SID (adj-SID) label. A section is reserved in the SRLB (Segment Routing Local Block) local label range as FEA-SID. FEA-SID, like adj-SID, is published with IGP link information.
FEA-SID在发布时,主要发布FEC字段,FEA字段默认为0。FEA字段的长度采用全网统一的方式,不用在发布信息中携带。When FEA-SID is released, the FEC field is mainly released, and the FEA field defaults to 0. The length of the FEA field adopts a unified method across the entire network and does not need to be carried in the release information.
2)SDN模式下FEA-SID的配置方式包括:2) The configuration methods of FEA-SID in SDN mode include:
控制器将FEA-SID与其它SID一起按标签栈的模式下发到网络的头节点(源路由设备)设备。对于FEA字段,控制器有两种配置方式:The controller sends the FEA-SID together with other SIDs in the label stack mode to the head node (source routing device) of the network. For the FEA field, the controller has two configuration methods:
方式一:控制器下发FEA-SID主要下发FEC字段,FEA字段默认为0。Method 1: The controller sends FEA-SID, mainly the FEC field. The FEA field defaults to 0.
方式二:控制器根据不同的数据流,按照一定的算法(例如:随机、轮询等),配置FEA-SID的FEA字段。本实施例需要控制器具有数据流的信息。Method 2: The controller configures the FEA field of the FEA-SID according to different data flows and a certain algorithm (eg, random, polling, etc.) This embodiment requires the controller to have information about the data flows.
3)FEA-SID在头节点的处理方式包括:3) The processing methods of FEA-SID at the head node include:
头节点不用感知中间网络ECMP节点的ECMP组成员数量,也不用感知ECMP组成员的链路状态。头节点作为源节点,是报文识别及标签栈加载的节点。The head node does not need to perceive the number of ECMP group members of the intermediate network ECMP nodes, nor does it need to perceive the link status of the ECMP group members. As a source node, the head node is the node for packet identification and label stack loading.
如果控制器为方式一的实现方式,则头节点根据不同的流,按照一定的算法(例如:随机、轮询等),配置FEA-SID的FEA字段。不同的数据流的判断标准可以参考通用的流ID的加载规则。If the controller is implemented in mode 1, the head node configures the FEA field of the FEA-SID according to different flows and a certain algorithm (eg, random, polling, etc.). The judgment criteria for different data flows can refer to the loading rules of the general flow ID.
如果控制器为方式二的实现方式,则头节点只需按照控制器下发的标签栈进行报文封装。控制器和头节点在FEA的处理方式上需要协同一致。If the controller is implemented in mode 2, the head node only needs to encapsulate the message according to the label stack sent by the controller. The controller and the head node need to be consistent in the processing method of FEA.
4)FEA-SID在ECMP节点的处理方式包括:4) FEA-SID is processed in ECMP nodes in the following ways:
中间ECMP节点在接收到报文后,根据当前处理SID的值,可以判定当前SID为FEA-SID。然后根据FEA-SID的FEC字段,确定出向ECMP组。然后把FEA-SID的FEA字段作为hash的key值,将报文在ECMP组中负载分担。After receiving the message, the intermediate ECMP node can determine that the current SID is FEA-SID based on the value of the currently processed SID. Then, based on the FEC field of the FEA-SID, the outbound ECMP group is determined. Then, the FEA field of the FEA-SID is used as the key value of the hash to load-share the message in the ECMP group.
在SRv6网络中,对于SRv6标签,SRv6 SID分为3部分:locator、function、argument。对照SR-MPLS的实现方式,SRv6的locator与SR-MPLS的FEC字段对应,Argument字段与SR-MPLS的FEA字段对应。区别在于,SR-MPLS中通过给FEA-SID的FEC分配一个特定的范围来标识该SID是FEA-SID,而SRv6中通过function字段来标识该SID是FEA-SID。在具体的实现上,引入一个新的指令原子功能FEA,设置为标识根据argument的值作为ECMP的hash key进行负载分担。如果FEA-SID属于一个END.X指令类型,则该FEA-SID可以定义为END.XFEA。In the SRv6 network, for the SRv6 label, the SRv6 SID is divided into three parts: locator, function, and argument. Compared with the implementation of SR-MPLS, the locator of SRv6 corresponds to the FEC field of SR-MPLS, and the argument field corresponds to the FEA field of SR-MPLS. The difference is that in SR-MPLS, a specific range is assigned to the FEC of the FEA-SID to identify the SID as a FEA-SID, while in SRv6, the function field is used to identify the SID as a FEA-SID. In the specific implementation, a new instruction atomic function FEA is introduced, which is set to identify the load sharing based on the value of the argument as the hash key of ECMP. If the FEA-SID belongs to an END.X instruction type, the FEA-SID can be defined as END.XFEA.
对于SRv6不可编程场景,SRv6 SID分为两部分,一部分是locator,另一部分是FEA。实现方式跟MPLS比较类似。For SRv6 non-programmable scenarios, SRv6 SID is divided into two parts, one is the locator and the other is the FEA. The implementation method is similar to MPLS.
采用本实施例的方案,可以实现在源路由技术场景下的基于流的负载均衡。一方面解决了源路由技术下中间节点缺乏流识别能力只能逐包hash的问题,另一方面该方案对设备能力要求低,而且报文封装效率高,降低了网络设备成本和网络带宽需求。By adopting the solution of this embodiment, flow-based load balancing can be achieved in the source routing technology scenario. On the one hand, it solves the problem that the intermediate nodes lack the flow identification capability and can only hash each packet under the source routing technology. On the other hand, the solution has low requirements on device capabilities and high message encapsulation efficiency, reducing network device costs and network bandwidth requirements.
下面结合具体的业务场景对本实施例进行说明:The present embodiment is described below in conjunction with a specific business scenario:
1、基于SR-MPLS TE/TP的业务场景:1. Service scenarios based on SR-MPLS TE/TP:
SR-MPLS TE隧道是源路由技术中常见的隧道类型和业务承载方式。在SPN网络(ITU-T MTN标准)中,SR-TP隧道是常用的隧道类型,为客户提供面向连接的双向路径一致的服务。SR-TP隧道是在单向SR-TE隧道的基础上进行扩展,等同于绑定了路径完全一致,方向相反的两条SR-TE隧道。 SR-MPLS TE tunnel is a common tunnel type and service carrying mode in source routing technology. In SPN network (ITU-T MTN standard), SR-TP tunnel is a common tunnel type, providing customers with connection-oriented bidirectional path consistent services. SR-TP tunnel is an extension of unidirectional SR-TE tunnel, which is equivalent to binding two SR-TE tunnels with completely consistent paths and opposite directions.
本实施例以SR-MPLS TE为例进行说明,如图4所示,网络为1个基于SR-MPLS技术的网络,网络中P1-P2以及P3-PE8之间有多链路的ECMP组。SR-TE1是一条途径了两个ECMP组的SR-TE隧道。流1、流2、流n是从PE7头节点进来的流,需要通过SR-TE1隧道转发到宿节点PE8。This embodiment takes SR-MPLS TE as an example. As shown in Figure 4, the network is a network based on SR-MPLS technology. There are multi-link ECMP groups between P1-P2 and P3-PE8 in the network. SR-TE1 is an SR-TE tunnel that passes through two ECMP groups. Flow 1, flow 2, and flow n are flows coming from the PE7 head node and need to be forwarded to the sink node PE8 through the SR-TE1 tunnel.
控制器对于FEA采用方式二的处理方式。根据计算的路径下发了标签栈。P1是ECMP转发节点,其处理的入向SID是FEA-SID,其中,FEC字段为900。对于流1,头节点PE7分配的FEA为1;对于流2,头节点PE7分配的FEA为2。对于其它的流,头节点PE7为其分配的FEA为0至15中的某个值,具体取决于分配算法。The controller uses method 2 to handle FEA. The label stack is issued according to the calculated path. P1 is an ECMP forwarding node, and the inbound SID it processes is FEA-SID, where the FEC field is 900. For flow 1, the FEA assigned by the head node PE7 is 1; for flow 2, the FEA assigned by the head node PE7 is 2. For other flows, the FEA assigned by the head node PE7 is a value between 0 and 15, depending on the allocation algorithm.
P1节点收到报文后,根据FEC确定出接口是连接P2的多链路;根据FEA进行hash,决定具体哪个流分发到ECMP组的哪一个链路成员。P3转发方向页有ECMP组,处理方式与P1节点相同。After receiving the message, the P1 node determines that the outgoing interface is a multi-link connected to P2 based on FEC; it performs hashing based on FEA to determine which specific flow is distributed to which link member of the ECMP group. The P3 forwarding direction page has an ECMP group, and the processing method is the same as that of the P1 node.
2、基于SR-MPLS BE的业务场景:2. Service scenarios based on SR-MPLS BE:
SR-BE报文只携带了目的节点的prefix-SID,而SR-BE转发路径可能要经过多个需要进行ECMP的节点。这种场景下,如果在这些ECMP节点实现基于流的负载均衡,则要求prefix-SID均为FEA-SID。各个ECMP节点均将目的节点prefix-SID(FEA-SID类型)的FEA作为hash key值,进行基于流的负载均衡。SR-BE packets only carry the prefix-SID of the destination node, and the SR-BE forwarding path may pass through multiple nodes that need to perform ECMP. In this scenario, if flow-based load balancing is implemented on these ECMP nodes, prefix-SIDs are required to be FEA-SIDs. Each ECMP node uses the FEA of the destination node prefix-SID (FEA-SID type) as the hash key value to perform flow-based load balancing.
如图5所示,0008是节点PE8的prefix-SID的FEC部分。SR-BE1是从PE7去PE8的SR-MPLS BE隧道。As shown in Figure 5, 0008 is the FEC part of the prefix-SID of node PE8. SR-BE1 is the SR-MPLS BE tunnel from PE7 to PE8.
控制器对于FEA采用方式一的处理方式。根据最终目的节点下发了标签栈。SR-BE隧道只有一层标签。P1是ECMP转发节点,其处理的入向SID是FEA-SID,其中FEC字段为0008。对于流1,控制器分配的FEA为1;对于流2,头节点PE7分配的FEA为2。对于其它的流,头节点PE7为其分配的FEA为0至15中的某个值,具体取决于分配算法。The controller uses method 1 to handle FEA. The label stack is issued according to the final destination node. The SR-BE tunnel has only one label layer. P1 is an ECMP forwarding node, and the inbound SID it processes is FEA-SID, where the FEC field is 0008. For flow 1, the controller assigns FEA 1; for flow 2, the head node PE7 assigns FEA 2. For other flows, the head node PE7 assigns FEA values between 0 and 15, depending on the allocation algorithm.
P1节点收到报文后,根据FEC确定出接口是连接P2的多链路;根据FEA进行hash,决定具体哪个流分发到ECMP组的哪一个链路成员。After receiving the message, the P1 node determines that the outgoing interface is a multi-link connected to P2 based on FEC; it performs hashing based on FEA to determine which specific flow is distributed to which link member of the ECMP group.
P3转发方向也有ECMP组,处理方式与P1节点相同。P3 also has an ECMP group in the forwarding direction, and the processing method is the same as that of the P1 node.
3、基于SRv6 policy的业务场景:3. Business scenarios based on SRv6 policy:
SRv6是基于IPv6的SR技术体制,如图6所示,网络为1个基于SRv6技术的网络,网络中P1-P2以及P3-PE8之间有多链路的ECMP组。图示的SRv6 policy1是一条途径了两个ECMP组的SRv6 policy。流1、流2、流n是从PE7头节点进来的流,需要通过policy 1转发到宿节点PE8。SRv6 is an SR technology system based on IPv6. As shown in Figure 6, the network is an SRv6 technology-based network with multiple-link ECMP groups between P1-P2 and P3-PE8. The SRv6 policy 1 shown in the figure is an SRv6 policy that passes through two ECMP groups. Flow 1, flow 2, and flow n are flows coming from the PE7 head node and need to be forwarded to the sink node PE8 through policy 1.
控制器对于FEA采用方式二的处理方式。根据计算的路径下发了标签栈。P1是ECMP转发节点,其处理的入向SID function字段是END.XFEA,locator字段为1002。对于流1,头节点PE7分配的argument字段FEA为1;对于流2,头节点PE7分配的argument字段FEA为2。对于其它的流,头节点PE7为其分配特定的FEA值。取值范围取决于argument字段的长度,具体的取值取决于分配算法。The controller uses method 2 to handle FEA. The label stack is issued according to the calculated path. P1 is an ECMP forwarding node. The function field of the incoming SID it processes is END.XFEA, and the locator field is 1002. For flow 1, the argument field FEA assigned by the head node PE7 is 1; for flow 2, the argument field FEA assigned by the head node PE7 is 2. For other flows, the head node PE7 assigns them specific FEA values. The value range depends on the length of the argument field, and the specific value depends on the allocation algorithm.
P1节点收到报文后,根据locator确定出接口是连接P2的多链路;根据FEA进行hash,决定具体哪个流分发到ECMP组的哪一个链路成员。P3转发方向也有ECMP组,处理方式与P1节点相同。After receiving the message, the P1 node determines that the outgoing interface is a multi-link connected to P2 based on the locator; it performs hashing based on the FEA to determine which specific flow is distributed to which link member of the ECMP group. The P3 forwarding direction also has an ECMP group, and the processing method is the same as that of the P1 node.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方 法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiment The method can be implemented by means of software plus a necessary general hardware platform, or by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, disk, CD), and includes several instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.
在本实施例中还提供了一种报文发送装置,该装置设置为实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the present embodiment, a message sending device is also provided, and the device is arranged to implement the above-mentioned embodiment and preferred implementation mode, and the descriptions which have been made are not repeated. As used below, the term "module" can implement a combination of software and/or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented with software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
图7是根据本公开实施例的报文发送装置的结构框图,如图7所示,该装置包括:FIG. 7 is a structural block diagram of a message sending device according to an embodiment of the present disclosure. As shown in FIG. 7 , the device includes:
第一确定模块72,设置为确定目标报文中每个数据流的转发标签,其中,目标报文中包括多个数据流,每个数据流的转发标签中包括每个数据流的路由字段和每个数据流的标识字段,每个数据流的转发标签均设置在目标报文的外层标签中;A first determination module 72 is configured to determine a forwarding label of each data flow in a target message, wherein the target message includes multiple data flows, the forwarding label of each data flow includes a routing field of each data flow and an identification field of each data flow, and the forwarding label of each data flow is set in an outer label of the target message;
第二确定模块74,设置为基于每个数据流的路由字段确定发送目标报文的下一跳转发设备;A second determination module 74 is configured to determine a next hop forwarding device to send a target message based on a routing field of each data flow;
第一分发模块76,设置为基于每个数据流的标识字段将多个数据流分发至链路聚合组中的多个平行链路中。The first distribution module 76 is configured to distribute the multiple data streams to the multiple parallel links in the link aggregation group based on the identification field of each data stream.
在一个示例性实施例中,上述第一确定模块,包括:In an exemplary embodiment, the first determining module includes:
第一确定单元,设置为通过控制器生成每个上述数据流的路由字段,以及每个上述数据流的标识字段,得到每个上述数据流的转发标签,其中,每个上述数据流的路由字段是上述控制器按照多个上述路由设备的路由拓扑信息确定的,每个上述数据流的标识字段包括以下之一:通过上述控制器将每个上述数据流的标识字段设置为零值,通过上述控制器每个上述数据流的标识字段设置为非零的预设值。The first determination unit is configured to generate a routing field for each of the above-mentioned data flows and an identification field for each of the above-mentioned data flows through a controller to obtain a forwarding label for each of the above-mentioned data flows, wherein the routing field for each of the above-mentioned data flows is determined by the above-mentioned controller according to the routing topology information of the multiple above-mentioned routing devices, and the identification field for each of the above-mentioned data flows includes one of the following: setting the identification field of each of the above-mentioned data flows to a zero value through the above-mentioned controller, and setting the identification field of each of the above-mentioned data flows to a non-zero preset value through the above-mentioned controller.
在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the apparatus further comprises:
第一解析模块,设置为通过控制器生成每个上述数据流的路由字段,以及每个上述数据流的标识字段,得到每个上述数据流的转发标签之后,在每个上述数据流的标识字段为上述零值的情况下,通过源路由设备解析上述目标报文,得到上述目标报文的报文信息;A first parsing module is configured to generate a routing field of each of the above-mentioned data flows and an identification field of each of the above-mentioned data flows through a controller, and after obtaining a forwarding label of each of the above-mentioned data flows, when the identification field of each of the above-mentioned data flows is the above-mentioned zero value, parse the above-mentioned target message through a source routing device to obtain the message information of the above-mentioned target message;
第一配置模块,设置为基于上述报文信息配置每个上述数据流的标识字段;或者,A first configuration module is configured to configure the identification field of each of the above data flows based on the above message information; or,
第二配置模块,设置为在网管设备上按照预设白名单机制,配置每个上述数据流的标识字段。The second configuration module is configured to configure the identification field of each of the above data flows according to a preset whitelist mechanism on the network management device.
在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the apparatus further comprises:
第一封装模块,设置为通过控制器生成每个上述数据流的路由字段,以及每个上述数据流的标识字段,得到每个上述数据流的转发标签之后,在每个上述数据流的标识字段为非零的上述预设值的情况下,通过源路由设备按照每个上述数据流的转发标签对上述目标报文进行封装。The first encapsulation module is configured to generate a routing field for each of the above-mentioned data flows and an identification field for each of the above-mentioned data flows through a controller, and after obtaining a forwarding label for each of the above-mentioned data flows, when the identification field of each of the above-mentioned data flows is the above-mentioned preset value that is non-zero, encapsulate the above-mentioned target message according to the forwarding label of each of the above-mentioned data flows through a source routing device.
在一个示例性实施例中,上述第一确定模块,包括:In an exemplary embodiment, the first determining module includes:
第一生成单元,设置为生成每个上述数据流的路由字段和每个上述数据流的标识字段,得到每个上述数据流的转发标签,其中,每个上述数据流的路由字段是上述源路由设备按照多个上述路由设备的路由拓扑信息确定的,每个上述数据流的标识字段是上述源路由设备基 于每个上述数据流的信息配置的。The first generating unit is configured to generate a routing field for each of the above-mentioned data flows and an identification field for each of the above-mentioned data flows, and obtain a forwarding label for each of the above-mentioned data flows, wherein the routing field for each of the above-mentioned data flows is determined by the above-mentioned source routing device according to the routing topology information of the plurality of above-mentioned routing devices, and the identification field for each of the above-mentioned data flows is determined by the above-mentioned source routing device based on the routing topology information of the plurality of above-mentioned routing devices. Information configuration for each of the above data flows.
在一个示例性实施例中,上述第一分发模块,包括:In an exemplary embodiment, the first distribution module includes:
第二确定单元,设置为将每个上述数据流的标识字段的值确定为每个上述数据流的哈希值:The second determining unit is configured to determine the value of the identification field of each of the above data flows as a hash value of each of the above data flows:
第一分发单元,设置为利用预设算法确定每个上述数据流的哈希值对应分发的平行链路。The first distribution unit is configured to use a preset algorithm to determine the parallel link corresponding to the hash value of each of the above data streams.
在一个示例性实施例中,上述装置还包括:In an exemplary embodiment, the apparatus further comprises:
第三确定模块,设置为确定目标报文中每个数据流的转发标签之前,确定传输上述目标报文的隧道类型;A third determination module is configured to determine a tunnel type for transmitting the target message before determining a forwarding label of each data flow in the target message;
第四确定模块,设置为基于上述隧道类型确定每个上述数据流转发标签所占的比特位以及每个上述数据流转发标签的格式。The fourth determination module is configured to determine the bits occupied by each of the data flow forwarding labels and the format of each of the data flow forwarding labels based on the tunnel type.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
本公开的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In an exemplary embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
本公开的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
在一个示例性实施例中,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。In an exemplary embodiment, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above modules or steps of the present disclosure can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present disclosure is not limited to any specific combination of hardware and software.
以上所述仅为本公开的优选实施例而已,并不设置为限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。 The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims (10)

  1. 一种报文发送方法,包括:A message sending method, comprising:
    确定目标报文中每个数据流的转发标签,其中,所述目标报文中包括多个所述数据流,每个所述数据流的转发标签中包括每个所述数据流的路由字段和每个所述数据流的标识字段,每个所述数据流的转发标签均设置在所述目标报文的外层标签中;Determine a forwarding label of each data stream in a target message, wherein the target message includes a plurality of the data streams, the forwarding label of each of the data streams includes a routing field of each of the data streams and an identification field of each of the data streams, and the forwarding label of each of the data streams is set in an outer label of the target message;
    基于每个所述数据流的路由字段确定发送所述目标报文的下一跳转发设备;Determine a next-hop forwarding device for sending the target message based on the routing field of each of the data flows;
    基于每个所述数据流的标识字段将多个所述数据流分发至链路聚合组中的多个平行链路中。The multiple data flows are distributed to multiple parallel links in a link aggregation group based on the identification field of each data flow.
  2. 根据权利要求1所述的方法,其中,确定目标报文中每个数据流的转发标签,包括:The method according to claim 1, wherein determining the forwarding label of each data flow in the target message comprises:
    通过控制器生成每个所述数据流的路由字段,以及每个所述数据流的标识字段,得到每个所述数据流的转发标签,其中,每个所述数据流的路由字段是所述控制器按照多个路由设备的路由拓扑信息确定的,每个所述数据流的标识字段包括以下之一:通过所述控制器将每个所述数据流的标识字段设置为零值,通过所述控制器每个所述数据流的标识字段设置为非零的预设值。The controller generates a routing field for each of the data flows and an identification field for each of the data flows to obtain a forwarding label for each of the data flows, wherein the routing field for each of the data flows is determined by the controller according to routing topology information of a plurality of routing devices, and the identification field for each of the data flows includes one of the following: setting the identification field for each of the data flows to a zero value by the controller, and setting the identification field for each of the data flows to a non-zero preset value by the controller.
  3. 根据权利要求2所述的方法,其中,通过控制器生成每个所述数据流的路由字段,以及每个所述数据流的标识字段,得到每个所述数据流的转发标签之后,所述方法还包括:The method according to claim 2, wherein, after the controller generates the routing field of each of the data flows and the identification field of each of the data flows and obtains the forwarding label of each of the data flows, the method further comprises:
    在每个所述数据流的标识字段为所述零值的情况下,通过源路由设备解析所述目标报文,得到所述目标报文的报文信息;When the identification field of each of the data flows is the zero value, the target message is parsed by a source routing device to obtain message information of the target message;
    基于所述报文信息配置每个所述数据流的标识字段;或者,configuring an identification field of each of the data flows based on the message information; or,
    在网管设备上按照预设白名单机制,配置每个所述数据流的标识字段。The identification field of each data flow is configured on the network management device according to the preset whitelist mechanism.
  4. 根据权利要求2所述的方法,其中,通过控制器生成每个所述数据流的路由字段,以及每个所述数据流的标识字段,得到每个所述数据流的转发标签之后,所述方法包括:The method according to claim 2, wherein, after the controller generates the routing field of each of the data flows and the identification field of each of the data flows and obtains the forwarding label of each of the data flows, the method comprises:
    在每个所述数据流的标识字段为非零的所述预设值的情况下,通过源路由设备按照每个所述数据流的转发标签对所述目标报文进行封装。In a case where the identification field of each of the data flows is the preset value that is not zero, the target message is encapsulated according to the forwarding label of each of the data flows by the source routing device.
  5. 根据权利要求1所述的方法,其中,确定目标报文中每个数据流的转发标签,包括,包括:The method according to claim 1, wherein determining the forwarding label of each data flow in the target message includes:
    生成每个所述数据流的路由字段和每个所述数据流的标识字段,得到每个所述数据流的转发标签,其中,每个所述数据流的路由字段是源路由设备按照多个所述路由设备的路由拓扑信息确定的,每个所述数据流的标识字段是所述源路由设备基于每个所述数据流的信息配置的。Generate a routing field for each of the data flows and an identification field for each of the data flows, and obtain a forwarding label for each of the data flows, wherein the routing field for each of the data flows is determined by a source routing device according to routing topology information of a plurality of the routing devices, and the identification field for each of the data flows is configured by the source routing device based on information of each of the data flows.
  6. 根据权利要求1所述的方法,其中,基于每个所述数据流的标识字段将多个所述数据流分发至链路聚合组中的多个平行链路中,包括:The method according to claim 1, wherein distributing the plurality of data streams to the plurality of parallel links in the link aggregation group based on the identification field of each of the data streams comprises:
    将每个所述数据流的标识字段的值确定为每个所述数据流的哈希值; Determine the value of the identification field of each of the data flows as a hash value of each of the data flows;
    利用预设算法确定每个所述数据流的哈希值对应分发的平行链路。A preset algorithm is used to determine the parallel link to which the hash value of each data stream is distributed.
  7. 根据权利要求1所述的方法,其中,确定目标报文中每个数据流的转发标签之前,所述方法还包括:The method according to claim 1, wherein before determining the forwarding label of each data flow in the target message, the method further comprises:
    确定传输所述目标报文的隧道类型;Determining a tunnel type for transmitting the target message;
    基于所述隧道类型确定每个所述数据流转发标签所占的比特位以及每个所述数据流转发标签的格式。The bits occupied by each of the data flow forwarding labels and the format of each of the data flow forwarding labels are determined based on the tunnel type.
  8. 一种报文发送装置,包括:A message sending device, comprising:
    第一确定模块,设置为确定目标报文中每个数据流的转发标签,其中,所述目标报文中包括多个所述数据流,每个所述数据流的转发标签中包括每个所述数据流的路由字段和每个所述数据流的标识字段,每个所述数据流的转发标签均设置在所述目标报文的外层标签中;A first determination module is configured to determine a forwarding label of each data stream in a target message, wherein the target message includes a plurality of the data streams, the forwarding label of each of the data streams includes a routing field of each of the data streams and an identification field of each of the data streams, and the forwarding label of each of the data streams is set in an outer label of the target message;
    第二确定模块,设置为基于每个所述数据流的路由字段确定发送所述目标报文的下一跳转发设备;A second determination module is configured to determine a next-hop forwarding device for sending the target message based on a routing field of each of the data flows;
    第一分发模块,设置为基于每个所述数据流的标识字段将多个所述数据流分发至链路聚合组中的多个平行链路中。The first distribution module is configured to distribute the multiple data streams to multiple parallel links in a link aggregation group based on the identification field of each data stream.
  9. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被处理器执行时实现所述权利要求1至7任一项中所述的方法。A computer-readable storage medium having a computer program stored therein, wherein the computer program implements the method described in any one of claims 1 to 7 when executed by a processor.
  10. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至7任一项中所述的方法。 An electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method described in any one of claims 1 to 7.
PCT/CN2023/123829 2022-11-18 2023-10-10 Packet transmission method and apparatus, storage medium and electronic device WO2024104007A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211463771.5 2022-11-18
CN202211463771.5A CN118057787A (en) 2022-11-18 2022-11-18 Message sending method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
WO2024104007A1 true WO2024104007A1 (en) 2024-05-23

Family

ID=91069502

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/123829 WO2024104007A1 (en) 2022-11-18 2023-10-10 Packet transmission method and apparatus, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN118057787A (en)
WO (1) WO2024104007A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103416029A (en) * 2011-03-09 2013-11-27 华为技术有限公司 Signaling extension for a label switched path over a composite link
US10218629B1 (en) * 2014-12-23 2019-02-26 Juniper Networks, Inc. Moving packet flows between network paths
CN111953604A (en) * 2019-05-17 2020-11-17 华为技术有限公司 Method and device for providing service for service flow
CN113965525A (en) * 2020-07-06 2022-01-21 华为技术有限公司 Load balancing method, device, network equipment and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103416029A (en) * 2011-03-09 2013-11-27 华为技术有限公司 Signaling extension for a label switched path over a composite link
US10218629B1 (en) * 2014-12-23 2019-02-26 Juniper Networks, Inc. Moving packet flows between network paths
CN111953604A (en) * 2019-05-17 2020-11-17 华为技术有限公司 Method and device for providing service for service flow
CN113965525A (en) * 2020-07-06 2022-01-21 华为技术有限公司 Load balancing method, device, network equipment and system

Also Published As

Publication number Publication date
CN118057787A (en) 2024-05-21

Similar Documents

Publication Publication Date Title
US11374848B2 (en) Explicit routing with network function encoding
CN112751826B (en) Method and device for forwarding flow of computing force application
US20220078114A1 (en) Method and Apparatus for Providing Service for Traffic Flow
CN107005462B (en) Method, equipment and system for forwarding data in software defined network
US10333779B2 (en) System and method for providing a software defined protocol stack
CN107770073B (en) Method, device and system for information synchronization
CN106059924B (en) Method, device and system for managing information
CN110401599B (en) Data packet processing method and device, storage medium and electronic device
WO2021082575A1 (en) Packet forwarding method, apparatus, storage medium, and system
CN111147372B (en) Downlink message sending and forwarding method and device
WO2015039617A1 (en) Method, system, and device for packet processing
US10432755B2 (en) SDN, SDN configuration method, SDN-based data transmission method, and network controller
EP3119057A1 (en) Packet conversion device and method for allowing transparent packet-based multipath bundling
WO2022057810A1 (en) Service packet forwarding method, sr policy sending method, device, and system
CN113923161A (en) Message forwarding method and device
CN107005479B (en) Method, device and system for forwarding data in Software Defined Network (SDN)
JP6055553B2 (en) Queue scheduling method, apparatus and system
CN112491576B (en) Network configuration sending method and device, storage medium and electronic device
Chen et al. Scalable and flexible traffic steering for service function chains
CN113965518A (en) Message processing method and device
WO2024104007A1 (en) Packet transmission method and apparatus, storage medium and electronic device
WO2015154393A1 (en) Method and apparatus for processing service node ability, service classifier and service controller
CN115842876A (en) Method, system, device and storage medium for processing message
CN110581799A (en) Service flow forwarding method and device
JP2016103697A (en) Network system, control device, communication device, control method and program for communication device

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

Country of ref document: EP

Kind code of ref document: A1