WO2024093778A1 - 一种报文处理方法以及相关装置 - Google Patents

一种报文处理方法以及相关装置 Download PDF

Info

Publication number
WO2024093778A1
WO2024093778A1 PCT/CN2023/126724 CN2023126724W WO2024093778A1 WO 2024093778 A1 WO2024093778 A1 WO 2024093778A1 CN 2023126724 W CN2023126724 W CN 2023126724W WO 2024093778 A1 WO2024093778 A1 WO 2024093778A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
load balancing
identifier
network device
information
Prior art date
Application number
PCT/CN2023/126724
Other languages
English (en)
French (fr)
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 WO2024093778A1 publication Critical patent/WO2024093778A1/zh

Links

Classifications

    • 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

Definitions

  • the present application relates to the field of communication technology, and in particular to a message processing method and related devices.
  • load balancing load balancing, or load sharing refers to sending traffic evenly from multiple links.
  • the application scenario of the load balancing algorithm is mainly equal-cost multi-path routing (Equal-Cost Multi-Path, ECMP); in a network that uses layer 2 (Layer2, L2) identifier table lookup forwarding (that is, a network that uses link layer table lookup forwarding), such as an Ethernet switching network, the application scenario of the load balancing algorithm is mainly link aggregation (Link Aggregation, LAG).
  • an embodiment of the present application provides a message processing method, including:
  • the message arrives at the network device
  • the network device allocates a load balancing identifier of the message according to the traffic characteristic information of the message, wherein the load balancing identifier is used to indicate a load balancing algorithm corresponding to the message;
  • the network device determines an egress port of the message according to the load balancing identifier of the message and using the load balancing algorithm corresponding to the message, wherein the egress port of the message is used to forward the message.
  • messages are classified according to traffic characteristics, and different types of traffic are assigned different load balancing identifiers. Different load balancing identifiers correspond to different load balancing configuration information.
  • the network device determines the corresponding load balancing configuration information based on the load balancing identifier, and processes the message according to the load balancing configuration information to obtain the egress port of the message.
  • Load balancing processing of traffic is implemented. The coexistence of multiple load balancing configuration information corresponding to multiple services in the running state is supported, and mixed traffic is classified, and load balancing processing is performed on the mixed traffic separately according to different load balancing configuration information running independently.
  • the network device can be divided into multiple functional modules according to the functional division, including: 1. Packet header processing module (packet parser), this module is responsible for extracting multiple message header field information from the message, such as Layer 2 header, Layer 3 header, transport layer header and other message header field information, and supplementing description information such as the physical port information where the message arrives, for subsequent module processing. 2. Tunnel termination module (tunnel termination), this module is used to terminate the message with the switch chip as the tunnel endpoint. 3. VLAN processing module (VLAN processing), this mode is used to process the virtual local area network VLAN function, such as VLAN tagging, de-tagging or conversion. 4.
  • Packet header processing module packet parser
  • tunnel termination module tunnel termination
  • VLAN processing VLAN processing
  • VLAN processing VLAN processing
  • Layer 2 forwarding module (Layer 2 switching), this module is used to process Layer 2 functions. For example, source MAC address learning, destination MAC address forwarding table lookup, providing Layer 2 switching services, and Layer 2 load balancing function are in this module. 5.
  • Layer 3 forwarding module (Layer 3routing), this module is used to process Layer 3 functions, such as the longest match table lookup of the destination IP address, etc., and provide Layer 3 routing services. The Layer 3 load balancing function is in this module.
  • Ingress ACL processing module (ingress ACL), this module is used to implement access control lists (ACLs), differential services, quality of service QoS classification applications, policy routing to modify the next hop and other functions.
  • the traffic feature information of the message is extracted in the message header processing module.
  • a load balancing identifier is assigned to the message according to the traffic feature information of the message, and then the egress port of the message is calculated to implement load balancing processing of the message.
  • the embodiment of the present application proposes a message processing method. After the message arrives at the network device, a load balancing identifier of the message is assigned according to the traffic feature information of the message, and the load balancing identifier is used to indicate the load balancing algorithm corresponding to the message.
  • the network device determines the egress port of the message according to the load balancing identifier of the message and the egress port of the message is used to forward the message.
  • the network device supports the assignment of different load balancing identifiers to different messages. Then, the network device determines the egress port of the message according to the load balancing identifier and uses the corresponding load balancing algorithm to implement load balancing processing of the message. In a scenario where multiple services exist simultaneously in the network, the network device can perform corresponding load balancing processing on the messages of different services to improve the throughput of the entire network.
  • the network device fills the load balancing identifier into the message, including: the network device fills the load balancing identifier into the message descriptor of the message, and the message descriptor is used to record the message header information of the message.
  • the load balancing identifier is an explicit identifier.
  • the information recorded in the message descriptor includes but is not limited to: Ethernet header information, IP header information, TCP/UDP header information, location information of the message stored in the chip buffer, length information of the message, and message output port information, etc.
  • the network device assigns a load balancing identifier to the message, including: the network device (chip) fills (or adds) the load balancing identifier in the message descriptor corresponding to the message.
  • One possible implementation is that the network device fills the load balancing identifier into a reserved field of the message.
  • the network device fills the load balancing identifier into the payload of the message. It is understandable that the filling area of the load balancing identifier is not limited in the embodiment of the present application.
  • the network device determines the egress port of the message according to the load balancing identifier of the message and uses the load balancing algorithm corresponding to the message, including: the network device determines the load balancing algorithm corresponding to the message according to the load balancing identifier; the network device determines the target hash function used by the message and the target hash key value components of the message according to the load balancing algorithm corresponding to the message; the network device calculates the target hash value according to the target hash function and the target hash key value components; the network device determines the egress port of the message according to the target hash value.
  • the network device uses the relevant information recorded in the message descriptor of the message as the traffic characteristic information of the message. Then, the network device selects the matching information that matches the message descriptor (traffic characteristic information) from the matching information of multiple load balancing configuration information. The network device assigns the load balancing identifier corresponding to the load balancing configuration information to the message. The network device fills the load balancing identifier in the message descriptor of the message.
  • the network device determines the target hash function used by the message and the target hash key value component members of the message according to the load balancing identifier, including: the network device determines the hash function selection control word corresponding to the message and the hash key value member selection control word corresponding to the message according to the load balancing identifier; the network device determines the target hash function used by the message according to the hash function selection control word corresponding to the message; the network device selects a target field from the message according to the hash key value member selection control word corresponding to the message, and the target field is used to construct the target hash key value component members of the message.
  • the network device responsible for constructing the hash key value is taken as an example to illustrate.
  • the hash key value has a total of 13 members, each of which is 16 bits wide, or 2 bytes wide.
  • the first member is the source virtual port identifier of the virtual network tag (VNTag); the second member is the destination virtual port identifier of the VNTag; the third member is the identifier of the chip in the system; the fourth member is the physical port identifier of the message arriving at the chip; the fifth member is the network layer protocol identifier of the message; the sixth member is the destination port of the transport layer of the message; the seventh member is the source port of the transport layer of the message; the eighth member is the VLAN identifier of the message; the ninth member is the lower 16 bits of the network layer destination address of the message; the tenth member is the upper 16 bits of the network layer destination address of the message; the eleventh member is the VLAN identifier of the message; the ninth member is the lower 16 bits of the network layer destination address of the message; the tenth member is the upper 16 bits of the network layer destination address of the message; the tenth
  • Some of the above member information comes from the fields carried by the message itself, such as the network layer destination address, network layer source address, transport layer destination port, transport layer source port, network layer protocol identifier, CNTag, VNTag, VLAN identifier, etc. Some of it comes from the information of the chip where the message is located, such as the chip port identifier where the message arrives, the identifier of the chip in the system where the message arrives, etc.
  • the member field will be filled with the default value when constructing the Hash Key, such as 0 or other fixed values; if the chip is told that some member fields need to be filled, but there is no corresponding field in the message or the corresponding member information cannot be extracted, for example, for the Address Resolution Protocol (ARP) message, there is no network layer and transmission information, then the corresponding field is also filled with the default value such as 0 or other fixed values.
  • ARP Address Resolution Protocol
  • the hash key value is calculated according to the configured hash algorithm to obtain the corresponding hash value.
  • the hash value construction method is usually to configure on the network device how to obtain the hash value from the hash calculation result, such as extracting the lower 16 bits of the hash calculation result as the final hash value, or the upper 16 bits as the final hash value, or all bits as the final hash value, etc.
  • the selection of which fields of the message to fill in to construct the hash key value is controlled by the hash key members selection control word.
  • the length of the hash key members selection control word can be 13 bits. If the corresponding bit of the hash key members selection control word is set to 1, it means that the value of the corresponding field of the message needs to be filled into the hash key, otherwise it is ignored. For example: from the low bit to the high bit, if the 7th bit of this control word is set to 1, it means that the value of the source port (source L4port) field of the transport layer needs to be extracted from the message header and filled into the 7th field of the hash key structure; otherwise, the 7th field of the hash key structure defaults to all 0s.
  • the selection of the hash algorithm is also controlled by a control word, which is called a hash function selection control word.
  • the hash function selection control word can be combined with the hash key member selection control word into a single control word.
  • the hash function selection control word and the hash key member selection control word can also exist independently as two control words.
  • the hash algorithm includes cyclic redundancy check (CRC) calculation, XOR calculation or other chip customized calculation methods.
  • CRC cyclic redundancy check
  • the network device determines the egress port of the message according to the load balancing identifier of the message and the load balancing algorithm corresponding to the message, including: the network device determines the target logic circuit according to the load balancing identifier of the message, wherein the target logic circuit is associated with the load balancing identifier of the message, and the target logic circuit runs the load balancing algorithm corresponding to the message; the network device uses the target logic circuit to process the message and determine the egress port of the message.
  • the load balancing identifier is an implicit identifier.
  • the network device determines the target logic circuit based on the load balancing identifier of the message, including: the network device determines the target logic circuit from multiple logic circuits included in the network device, wherein the multiple logic circuits correspond to multiple load balancing identifiers, the multiple load balancing identifiers include the load balancing identifier of the message, and the logic circuit runs the load balancing algorithm corresponding to the load balancing identifier.
  • the network device includes multiple logic circuits, each logic circuit corresponds to a load balancing configuration information, and the logic circuit runs the load balancing algorithm corresponding to the load balancing configuration information.
  • the network device uses the logic circuit to process the message and calculates the output port of the message. Since the load balancing configuration information corresponds to the load balancing identifier (implicit), each logic circuit is associated with an implicit load balancing identifier. In the embodiment of the present application, each logic circuit is associated with a unique load balancing identifier, and this type of implicit load balancing identifier is referred to as a logic circuit identifier in the embodiment of the present application. After the network device assigns an implicit load balancing identifier to the message, the network device determines the target logic circuit based on the load balancing identifier, and the target logic circuit is used to process the message to obtain the output port of the message.
  • the multiple logic circuits included in the network device can be independent physical circuits, or the same physical circuit can be distinguished by different timing sequences, and the embodiments of the present application are not limited thereto.
  • the network device uses the target logic circuit to process the message and determine the output port of the message, including: the network device uses the target logic circuit to process the message and determines the target hash function used by the message and the target hash key value components of the message; the network device calculates the target hash value based on the target hash function and the target hash key value components; the network device determines the output port of the message based on the target hash value.
  • the network device uses the target logic circuit to process the message and determine the
  • the target hash function used by the message and the target hash key value of the message constitute members, including:
  • the network device obtains a hash function selection control word corresponding to the message and a hash key value member selection control word corresponding to the message from a register associated with the target logic circuit; the network device selects a target field from the message according to the hash key value member selection control word corresponding to the message, and the target field is used to construct the target hash key value component member of the message; the network device determines the target hash function used by the message according to the hash function selection control word corresponding to the message.
  • the network device receives a first instruction; the network device configures load balancing configuration information according to the first instruction, and the load balancing configuration information indicates the association between the traffic feature information and the load balancing algorithm.
  • the first instruction may be sent by a network management device, or may be input by a user, which is not limited in this embodiment of the present application.
  • the load balancing identifier includes any one or more of the following: identification information of the load balancing configuration information, a logic circuit identifier, a hash key member selection control word, or a hash function selection control word; wherein the load balancing configuration information indicates an association between the traffic feature information and the load balancing algorithm.
  • the load balancing configuration information includes any one or more of the following information: identification information of the load balancing configuration information, the load balancing algorithm corresponding to the load balancing configuration information, matching information, the matching information belonging to the traffic feature information, selection configuration information of hash key value components, and selection configuration information of hash functions.
  • the traffic characteristic information of the message includes one or more of the following: differentiated service code point DSCP information of the message, priority information of the message, ingress port information of the message, virtual local area network VLAN information of the message, ingress port group information of the message, egress port information of the message, egress port group information of the message, or virtual routing forwarding table VRF information of the message.
  • the load balancing algorithm includes: a hash function (also called a load balancing hash function) and a hash key value component member (also called a load balancing hash key value component member).
  • the load balancing configuration information indicates a specific load balancing algorithm.
  • load balancing configuration information #1 indicates hash function #1 and hash key value component #1.
  • the user selecting load balancing configuration information #1 means that the user selects hash function #1 and hash key value component #1 to perform load balancing on the message.
  • the load balancing configuration information is regarded as an instance of a load balancing algorithm.
  • the network device obtains a second instruction, and the second instruction instructs the network device to use specific load balancing configuration information to process the message.
  • the network device selects specific load balancing configuration information to perform load balancing processing on the message according to the second instruction.
  • the application scenario of the load balancing algorithm is any one of the following: equal cost multipath routing ECMP, weighted multipath routing WCMP, or link aggregation LAG.
  • the message includes a first message and a second message, and the traffic characteristic information of the first message is different from the traffic characteristic information of the second message; the network device allocates the load balancing identifier of the message according to the traffic characteristic information of the message, including: the network device allocates a first load balancing identifier of the first message according to the traffic characteristic information of the first message, and the first load balancing identifier corresponds to a first load balancing algorithm; the network device allocates a second load balancing identifier of the second message according to the traffic characteristic information of the second message, and the second load balancing identifier corresponds to a second load balancing algorithm; the first load balancing identifier is different from the second load balancing identifier, and the first load balancing algorithm is different from the second load balancing algorithm.
  • the network device is configured with multiple load balancing configuration information, and the multiple load balancing configuration information respectively indicate different load balancing algorithms.
  • Each load balancing configuration information corresponds to a unique load balancing identifier, and each load balancing configuration information corresponds to a class of messages.
  • the network device extracts the traffic characteristic information of the first message.
  • a first load balancing identifier of the first message is allocated according to the traffic characteristic information of the first message.
  • the first load balancing identifier corresponds to the first load balancing algorithm, and the network device uses the first load balancing algorithm to perform load balancing processing on the first message.
  • the network device When the second message arrives at the network device, the network device extracts the traffic characteristic information of the second message. Then, a second load balancing identifier of the second message is allocated according to the traffic characteristic information of the second message.
  • the second load balancing identifier corresponds to the second load balancing algorithm, and the network device uses the second load balancing algorithm to perform load balancing processing on the second message.
  • the first load balancing identifier is different from the second load balancing identifier, and the first load balancing algorithm is different from the second load balancing algorithm.
  • an embodiment of the present application provides a communication device for a network device, including:
  • the message arrives at the transceiver module
  • a processing module configured to allocate a load balancing identifier of the message according to the traffic characteristic information of the message, wherein the load balancing identifier is used to indicate a load balancing algorithm corresponding to the message;
  • the processing module is further used to determine the egress port of the message according to the load balancing identifier of the message and using the load balancing algorithm corresponding to the message, wherein the egress port of the message is used to forward the message.
  • the processing module is further used to fill the load balancing identifier into the message descriptor of the message, and the message descriptor is used to record the message header information of the message.
  • the processing module is further used to determine the load balancing algorithm corresponding to the message according to the load balancing identifier;
  • the processing module is further used to determine the target hash function used by the message and the target hash key value component members of the message according to the load balancing algorithm corresponding to the message;
  • the processing module is further used to calculate a target hash value according to the target hash function and the target hash key value component member;
  • the processing module is further used to determine the egress port of the message according to the target hash value.
  • the processing module is further used to determine, according to the load balancing identifier, a hash function selection control word corresponding to the message and a hash key value member selection control word corresponding to the message;
  • the processing module is further configured to select a control word according to the hash function corresponding to the message, and determine the target hash function used by the message;
  • the processing module is further used to select a control word according to the hash key value member corresponding to the message, and select a target field from the message, wherein the target field is used to construct the target hash key value component member of the message.
  • the processing module is further used to determine a target logic circuit according to the load balancing identifier of the message, wherein the target logic circuit is associated with the load balancing identifier of the message, and the target logic circuit runs the load balancing algorithm corresponding to the message;
  • the processing module is further configured to use the target logic circuit to process the message and determine an egress port of the message.
  • the processing module is also used to determine the target logic circuit from multiple logic circuits included in the network device, wherein the multiple logic circuits correspond to multiple load balancing identifiers, the multiple load balancing identifiers include the load balancing identifier of the message, and the logic circuit runs the load balancing algorithm corresponding to the load balancing identifier.
  • the processing module is further used to process the message using the target logic circuit to determine a target hash function used by the message and a target hash key value component member of the message;
  • the processing module is further used to calculate a target hash value according to the target hash function and the target hash key value component member;
  • the processing module is further used to determine the egress port of the message according to the target hash value.
  • the transceiver module is further used to obtain a hash function selection control word corresponding to the message and a hash key value member selection control word corresponding to the message from a register associated with the target logic circuit;
  • the processing module is further used to select a control word according to a hash key value member corresponding to the message, and select a target field from the message, wherein the target field is used to construct the target hash key value component member of the message;
  • the processing module is further configured to select a control word according to the hash function corresponding to the message, and determine the target hash function used by the message.
  • the transceiver module is further configured to receive a first instruction
  • the processing module is further used to configure load balancing configuration information according to the first instruction, and the load balancing configuration information indicates the association between the traffic feature information and the load balancing algorithm.
  • the load balancing identifier includes any one or more of the following:
  • Identification information of load balancing configuration information a logic circuit identifier, a hash key value member selection control word, or a hash function selection control word;
  • the load balancing configuration information indicates the association between the traffic feature information and the load balancing algorithm.
  • the load balancing configuration information includes any one or more of the following information:
  • the matching information belonging to the traffic feature information
  • Hash key value consists of member selection configuration information
  • Hash function selection configuration information
  • the traffic characteristic information of the message includes one or more of the following:
  • the differentiated services code point DSCP information of the message the priority information of the message, the ingress port information of the message, the virtual local area network VLAN information of the message, the ingress port group information of the message, the egress port information of the message, the egress port group information of the message, or the virtual routing forwarding table VRF information of the message.
  • equal cost multi-path routing ECMP weighted multi-path routing WCMP, or link aggregation LAG.
  • the message includes a first message and a second message, and the traffic characteristic information of the first message is different from the traffic characteristic information of the second message;
  • the processing module is specifically configured to allocate a first load balancing identifier of the first message according to the traffic characteristic information of the first message, wherein the first load balancing identifier corresponds to a first load balancing algorithm;
  • the processing module is specifically configured to allocate a second load balancing identifier of the second message according to the traffic characteristic information of the second message, wherein the second load balancing identifier corresponds to a second load balancing algorithm;
  • the first load balancing identifier is different from the second load balancing identifier, and the first load balancing algorithm is different from the second load balancing algorithm.
  • an embodiment of the present application provides a communication device, including: a communication interface;
  • a processor configured to allocate a load balancing identifier of the message according to the traffic characteristic information of the message, wherein the load balancing identifier is used to indicate a load balancing algorithm corresponding to the message;
  • the processor is further configured to determine an egress port of the message according to the load balancing identifier of the message and using the load balancing algorithm corresponding to the message, wherein the egress port of the message is used to forward the message.
  • the processor is further configured to fill the load balancing identifier into a message descriptor of the message, where the message descriptor is configured to record message header information of the message.
  • the processor is further configured to determine the load balancing algorithm corresponding to the message according to the load balancing identifier;
  • the processor is further configured to determine, according to the load balancing algorithm corresponding to the message, a target hash function used by the message and a target hash key value component member of the message;
  • the processor is further configured to calculate a target hash value according to the target hash function and the target hash key value component member;
  • the processor is further configured to determine an egress port of the message according to the target hash value.
  • the processor is further configured to determine, according to the load balancing identifier, a hash function selection control word corresponding to the message and a hash key value member selection control word corresponding to the message;
  • the processor is further configured to select a control word according to the hash function corresponding to the message, and determine the target hash function used by the message;
  • the processor is further configured to select a control word according to the hash key value member corresponding to the message, and select a target field from the message, wherein the target field is used to construct the target hash key value component member of the message.
  • the processor is further configured to determine a target logic circuit according to the load balancing identifier of the message, wherein the target logic circuit is associated with the load balancing identifier of the message, and the target logic circuit runs the load balancing algorithm corresponding to the message;
  • the processor is further configured to use the target logic circuit to process the message and determine an egress port of the message.
  • the processor is further used to determine the target logic circuit from multiple logic circuits included in the network device, wherein the multiple logic circuits correspond to multiple load balancing identifiers, the multiple load balancing identifiers include the load balancing identifier of the message, and the logic circuit runs the load balancing algorithm corresponding to the load balancing identifier.
  • the processor is further configured to process the message using the target logic circuit to determine a target hash function used by the message and a target hash key value component member of the message;
  • the processor is further configured to calculate a target hash value according to the target hash function and the target hash key value component member;
  • the processor is further configured to determine an egress port of the message according to the target hash value.
  • the communication interface is further used to obtain a hash function selection control word corresponding to the message and a hash key value member selection control word corresponding to the message from a register associated with the target logic circuit;
  • the processor is further configured to select a control word according to a hash key value member corresponding to the message, and select a target field from the message, wherein the target field is used to construct the target hash key value component member of the message;
  • the processor is further configured to select a control word according to the hash function corresponding to the message, and determine the target hash function used by the message.
  • the communication interface is further used to receive a first instruction
  • the processor is further configured to configure load balancing configuration information according to the first instruction, wherein the load balancing configuration information indicates an association between the traffic feature information and the load balancing algorithm.
  • the load balancing identifier includes any one or more of the following:
  • Identification information of load balancing configuration information a logic circuit identifier, a hash key value member selection control word, or a hash function selection control word;
  • the load balancing configuration information indicates the association between the traffic feature information and the load balancing algorithm.
  • the load balancing configuration information includes any one or more of the following information:
  • the matching information belonging to the traffic feature information
  • Hash key value consists of member selection configuration information
  • Hash function selection configuration information
  • the traffic characteristic information of the message includes one or more of the following:
  • the differentiated services code point DSCP information of the message the priority information of the message, the ingress port information of the message, the virtual local area network VLAN information of the message, the ingress port group information of the message, the egress port information of the message, the egress port group information of the message, or the virtual routing forwarding table VRF information of the message.
  • equal cost multi-path routing ECMP weighted multi-path routing WCMP, or link aggregation LAG.
  • the message includes a first message and a second message, and the traffic characteristic information of the first message is different from the traffic characteristic information of the second message;
  • the processor is specifically configured to allocate a first load balancing identifier of the first message according to the traffic characteristic information of the first message, where the first load balancing identifier corresponds to a first load balancing algorithm;
  • the processor is specifically configured to allocate a second load balancing identifier of the second message according to the traffic characteristic information of the second message, wherein the second load balancing identifier corresponds to a second load balancing algorithm;
  • the first load balancing identifier is different from the second load balancing identifier, and the first load balancing algorithm is different from the second load balancing algorithm.
  • a communication system comprising the communication device of the second aspect or the third aspect.
  • the fifth aspect of the present application provides a computer storage medium, which may be non-volatile; the computer storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the method in any one of the implementation modes in the first aspect is implemented.
  • a sixth aspect of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method in any one of the implementations of the first aspect.
  • the seventh aspect of the present application provides a chip system, which includes a processor and an interface circuit, and is used to support the network device to implement the functions involved in the above aspects, for example, sending or processing the data and/or information involved in the above methods.
  • the chip system also includes a memory, which is used to store program instructions and data necessary for the network device.
  • the chip system can be composed of a chip, or it can include a chip and other discrete devices.
  • An eighth aspect of the present application provides a communication device, including: a communication interface;
  • a processor connected to the communication interface enables the communication device to execute the method of the first aspect as described above based on the communication interface and the processor.
  • Figure 1 is a schematic diagram of a small-scale network
  • Figure 2 is a schematic diagram of a large-scale network
  • FIG3 is a schematic diagram of the structure of a single control word
  • Fig. 4 is a schematic diagram of CRC calculation
  • FIG5 is a schematic diagram of independent networking of a computing network and a storage network
  • FIG6 is a schematic diagram of a joint network of a computing network and a storage network
  • FIG7 is a schematic diagram of an embodiment of a message processing method in an embodiment of the present application.
  • FIG8 is a schematic diagram of load balancing configuration information in an embodiment of the present application.
  • FIG9 is a schematic diagram of a message descriptor in an embodiment of the present application.
  • FIG10 is a schematic diagram of a flow chart of an application scenario in an embodiment of the present application.
  • FIG11 is a schematic diagram of a flow chart of load balancing processing in an embodiment of the present application.
  • FIG12 is a schematic diagram of the structure of a communication device 1200 provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of the structure of a communication device 1300 provided in an embodiment of the present application.
  • FIG. 14 is a schematic diagram of the structure of a communication device 1400 provided in an embodiment of the present application.
  • Multi-stage switching network (Claus CLOS network).
  • the CLOS network includes: Spine nodes, leaf nodes, and Top-of-Rack (ToR) nodes.
  • the server accesses the network by connecting to the ToR node, which is connected to each leaf node, and each leaf node is connected to each spine node, and vice versa.
  • FIG 1 is a schematic diagram of a small-scale network.
  • a 2-level CLOS network there is usually only one traffic load balancing, which occurs in the forwarding direction from TOR to Leaf switch.
  • Each 2-level CLOS network is called a group (POD).
  • FIG 2 is a schematic diagram of a large-scale network.
  • Load balancing is to forward traffic evenly through multiple links.
  • Load balancing is usually called load balancing, also known as load sharing.
  • Equal-Cost Multi-Path is usually used as a traffic load balancing technology.
  • IP Internet protocol
  • ECMP Equal-Cost Multi-Path
  • LAG Link Aggregation
  • D1. First, query the MAC table based on the link layer identifier (i.e., destination MAC address) extracted from the message, and find the corresponding entry in the MAC table. If the corresponding entry identifier is a LAG, it means that there are multiple parallel ports going to the destination MAC address, so jump to the corresponding Trunk Group table.
  • link layer identifier i.e., destination MAC address
  • the following describes how to construct a hash key value, taking the network device responsible for constructing the hash key value as an example.
  • the hash key value has a total of 13 members, each of which is 16 bits wide, that is, 2 bytes wide.
  • the first member is the source virtual port identifier of the virtual network tag (Virtual Network Tag, VNTag); the second member is the destination virtual port identifier of VNTag; the third member is the identifier of the chip in the system; the fourth member is the physical port identifier of the message arriving at the chip; the fifth member is the network layer protocol identifier of the message; the sixth member is the destination port of the transport layer of the message; the seventh member is the source port of the transport layer of the message; the eighth member is the VLAN identifier of the message; the ninth member is the lower 16 bits of the network layer destination address of the message; the tenth member is the upper 16 bits of the network layer destination address of the message; the eleventh member is the lower 16 bits of the network layer source address of the message; the twelfth member is the upper 16 bits of the network layer source address of the message; and the thirteenth
  • Some of the above member information comes from the fields carried by the message itself, such as the network layer destination address, network layer source address, transport layer destination port, transport layer source port, network layer protocol identifier, CNTag, VNTag, VLAN identifier, etc. Some of it comes from the information of the chip where the message is located, such as the chip port identifier where the message arrives, the identifier of the chip in the system where the message arrives, etc.
  • the member field will be filled with the default value when constructing the Hash Key, such as 0 or other fixed values; if the chip is told that some member fields need to be filled, but there is no corresponding field in the message or the corresponding member information cannot be extracted, for example, for the Address Resolution Protocol (ARP) message, there is no network layer and transmission information, then the corresponding field is also filled with the default value such as 0 or other fixed values.
  • ARP Address Resolution Protocol
  • the hash key value is calculated according to the configured hash algorithm to obtain the corresponding hash value.
  • the hash value construction method is usually to configure on the network device how to obtain the hash value from the hash calculation result, such as extracting the lower 16 bits of the hash calculation result as the final hash value, or the upper 16 bits as the final hash value, or all bits as the final hash value, etc.
  • the selection of which fields of the message to fill in to construct the hash key value is controlled by the hash key members selection control word.
  • the length of the hash key members selection control word can be 13 bits. If the corresponding bit of the hash key members selection control word is set to 1, it means that the value of the corresponding field of the message needs to be filled into the hash key, otherwise it is ignored. For example: from the low bit to the high bit, if the 7th bit of this control word is set to 1, it means that the value of the source port (source L4port) field of the transport layer needs to be extracted from the message header and filled into the 7th field of the hash key structure; otherwise, the 7th field of the hash key structure defaults to all 0s.
  • FIG3 is a schematic diagram of the structure of a single control word.
  • the length of the single control word can be 16 bits, with bits 0 to 12 serving as the hash key member selection control word, and bits 13 to 15 serving as the hash function selection control word.
  • the hash function selection control word and the hash key member selection control word can also exist independently as two control words.
  • the hash algorithm includes cyclic redundancy check (CRC) calculation, XOR calculation or other chip customized calculation methods.
  • CRC cyclic redundancy check
  • Figure 4 is a schematic diagram of CRC calculation.
  • CRC calculation is essentially to perform XOR remainder calculation on the input bit string, such as the Key here.
  • the following example illustrates CRC calculation, as shown in Figure 4.
  • Multiply g(x) by xm that is, add m zeros after g, and then divide it by the m-order polynomial h(x), to obtain the (m-1)-order remainder r(x).
  • the binary code r corresponding to the remainder r(x) is the CRC calculation result.
  • the CRC calculation method is fixed, and what changes are the key used as the input of the dividend and the m-order polynomial h(x) used as the divisor.
  • h(x) is also usually called the generator polynomial.
  • Generator polynomials are usually used to identify and distinguish different CRC algorithms.
  • "CRC algorithm A” actually means “the generator polynomial used by the CRC algorithm is A” or "the generator polynomial name used by the CRC algorithm is identified as A”.
  • CRC-16-CCITT or "CRC 0x1021” can be said.
  • CRC-16-CCITT is the agreed CRC name
  • 0x1021 is the generator polynomial.
  • Network devices or other CRC algorithm implementation entities can also name CRC for identification and distinction.
  • the CRC generator polynomial used in ECMP hash calculation is related to the implementation of the chip.
  • the business traffic model of the computing network takes "Halving-doubling" as an example, which is a sparse traffic model of multiple points to points.
  • the storage business traffic model of the storage network takes storage write as an example, which is a dense traffic model of multiple points to multiple points.
  • Figure 5 is a schematic diagram of independent networking of the computing network and the storage network.
  • the two networks can select the network load balancing configuration with the best performance based on the business traffic models they carry. For example, the computing network uses case#1 as the network load balancing configuration, and the storage network uses case#2 as the network load balancing configuration.
  • the independent networking of computing network and storage network comes at the cost of high investment.
  • the computing network and storage network need to be deployed on different servers and connected to two different networks through at least two independent gateways. Therefore, independent networking requires high costs.
  • FIG6 is a schematic diagram of the joint networking of a computing network and a storage network.
  • an embodiment of the present application proposes a message processing method.
  • a load balancing identifier of the message is assigned according to the traffic characteristic information of the message, and the load balancing identifier is used to indicate the load balancing algorithm corresponding to the message.
  • the network device determines the egress port of the message based on the load balancing identifier of the message and the load balancing algorithm corresponding to the message, and the egress port of the message is used to forward the message.
  • the network device supports the assignment of different load balancing identifiers to different messages.
  • the network device determines the egress port of the message based on the load balancing identifier and uses the corresponding load balancing algorithm to implement load balancing processing of the message.
  • the network device can perform corresponding load balancing processing on the messages of different services to improve the throughput of the entire network.
  • a message processing method proposed in an embodiment of the present application includes:
  • the message arrives at the network device.
  • the message arriving at the network device includes: the network device receiving the message, or the network device actively obtaining the message.
  • the message header of the message includes multiple information, such as: L2 layer message header (L2header), L3 layer message header (L3header), transport layer header information, Ethernet layer information, IP header information, Transmission Control Protocol (TCP)/User Datagram Protocol (UDP) header information, etc.
  • the network device records the physical port information where the message arrives, that is, records the inbound port information of the message.
  • the network device allocates a load balancing identifier of the message according to the traffic characteristic information of the message, where the load balancing identifier is used to indicate a load balancing algorithm corresponding to the message.
  • the message is processed to obtain the traffic characteristic information of the message.
  • the traffic characteristic information of the message in the embodiment of the present application includes but is not limited to: the differential service code point DSCP information of the message, the priority information of the message, the inbound port information of the message, the virtual local area network VLAN information of the message, the inbound port group information of the message, the outbound port information of the message, the outbound port group information of the message, or the virtual routing forwarding table VRF information of the message.
  • the traffic characteristic information of the message is extracted as follows: the network device extracts the source media access control (MAC) address, the destination MAC address, the Ethernet type, and the virtual local area network (VLAN) identifier from the L2 layer message header. The network device extracts the source IP address, the destination IP address, the Differentiated Services Code Point (DSCP) value, the Time To Live (TTL) value, and the IP protocol type value from the L3 layer message header. The network device extracts the source port value of the transport layer and the destination port value of the transport layer from the L4 layer message header.
  • MAC media access control
  • VLAN virtual local area network
  • the network device extracts the physical port identifier (source interface id) where the message arrives, the module identifier (source module id) where the physical port where the message arrives, and the physical port identifier (destination interface id) where the message is to be sent from the message metadata.
  • the network device maintains multiple load balancing configuration information, which indicates the relationship between the load balancing algorithm and the traffic characteristic information.
  • the load balancing configuration information indicates a specific load balancing algorithm, for example: load balancing configuration information #1 indicates hash function #1 and hash key value component member #1.
  • the user selecting load balancing configuration information #1 means: the user selects hash function #1 and hash key value component member #1 to perform load balancing processing on the message.
  • the load balancing configuration information is regarded as an instance of a load balancing algorithm.
  • the load balancing algorithm includes: a hash function (also called a load balancing hash function) and a hash key value component member (also called a load balancing hash key value component member).
  • the load balancing configuration information includes one or more of the following information: identification information of the load balancing configuration information, matching information, selection configuration information of a hash key value component member, or selection configuration information of a hash function.
  • the matching information may be traffic feature information of a message, such as relevant information recorded in a message identifier.
  • the selection configuration information of a hash key value component member may be a hash key value member selection control word.
  • the selection configuration information of a hash function may be a hash function selection control word.
  • the network device receives a first instruction and configures load balancing configuration information according to the first instruction.
  • the first instruction may be sent by a network management device or input by a user, which is not limited in the embodiment of the present application.
  • the network device obtains a second instruction, the second instruction instructing the network device to use specific load balancing configuration information to process the message.
  • the network device selects specific load balancing configuration information to perform load balancing processing on the message according to the second instruction.
  • Load balancing configuration information #1 includes: the identification information of the load balancing configuration information is "1"; the matching information is "Queue3", indicating that the load balancing configuration information #1 is for the traffic of Queue 3; the selection configuration information of the hash key value component member is the source physical port number "src-interface", indicating that the hash key value adopts the source physical port; the selection configuration information of the hash function is "Hashmode 5", indicating that the adopted hash function (or hash algorithm) is Hashmode 5.
  • Load balancing configuration information #2 includes: the identification information of the load balancing configuration information is "2"; the matching information is "Queue 5", indicating that the load balancing configuration information #2 is for the traffic of Queue 5; the selection configuration information of the hash key value components is the source IP address and destination IP address "source IP address (src-ip), destination IP address (dst-ip) and transport layer source port (l4-src-port)", indicating that the hash key value adopts the source IP address (src-ip), destination IP address (dst-ip) and transport layer source port (l4-src-port); the selection configuration information of the hash function is "Hashmode 7", indicating that the adopted hash function (or hash algorithm) is Hashmode 7.
  • the configured load balancing configuration information is shown in Table 1:
  • the network device can be configured with the load balancing configuration information in Table 1 above.
  • a possible configuration model is as follows:
  • a new command configuration "load-balance ecmp qos queue 3 profile AI_traffic” is added.
  • the first keyword “load-balance” indicates that it is a mapping command for network load balancing
  • the second keyword “ecmp” indicates that it is a multipath decision applicable to layer 3 forwarding, namely equal-cost multipath
  • the third keyword group "qos queue3” indicates that it is a queue number that matches traffic characteristics, usually a DSCP value
  • the fourth keyword group "profile AI_traffic” indicates that the network load balancing configuration corresponding to the traffic with a DSCP value of 3 is a load balancing configuration profile named AI_traffic (load-balance profile).
  • AI_traffic the hash key is constructed using the source physical interface number where the message arrives, and the hash algorithm uses hash mode 5.
  • the algorithm for calculating the egress port of a message is referred to as a load balancing algorithm.
  • the load balancing algorithm includes but is not limited to: equal cost multipath routing ECMP, weighted multipath routing WCMP, or link aggregation LAG, etc.
  • the network device classifies and processes the message according to the traffic characteristic information of the message. In other words, the network device matches the traffic characteristic information of the message with the matching information in the load balancing configuration information. If the match is successful, it is considered that the classification result of the message corresponds to the load balancing configuration information, and the message needs to be processed according to the instructions of the load balancing configuration information. Then, the network device assigns a load balancing identifier to the message based on the classification result, and the load balancing identifier uniquely indicates the load balancing configuration information (i.e., the load balancing configuration information that matches the traffic characteristic information of the message).
  • the load balancing identifier is an explicit identifier.
  • the load balancing identifier is an implicit identifier.
  • the load balancing identifier is an explicit identifier.
  • the network device fills the load balancing identifier into the message descriptor of the message, and the message descriptor is used to record the message header information of the message.
  • the message descriptor is used to record the message header information, and the information recorded by the message descriptor includes but is not limited to: Ethernet header information, IP header information, TCP/UDP header information, the location information of the message stored in the chip buffer, the length information of the message, and the message output port information.
  • Ethernet header information, IP header information, and TCP/UDP header information are used to provide information input for forwarding lookup tables and access control lists (ACLs), and these information are written into the message descriptor when the MAC processing module of the network device processes the message; the location information, length information, and message output port information of the message stored in the chip buffer are written by the network device when processing the forwarding decision of the message.
  • ACLs access control lists
  • the length of the message descriptor is 64 bytes. Since the length of the message descriptor is usually less than the average length of the message, the network device obtains the relevant information of the message by reading the message descriptor when using less bandwidth.
  • Figure 9 is a schematic diagram of a message descriptor in an embodiment of the present application.
  • the load balancing identifier can be filled into the metadata part of the message descriptor.
  • the network device uses the relevant information recorded in the message descriptor of the message as the traffic characteristic information of the message. Then, the network device selects the matching information that matches the message descriptor (traffic characteristic information) from the matching information of multiple load balancing configuration information. The network device assigns the load balancing identifier corresponding to the load balancing configuration information to the message. The network device fills the load balancing identifier in the message descriptor of the message.
  • Another possible implementation manner is that the network device fills the load balancing identifier into a reserved field of the message.
  • the network device fills the load balancing identifier into the payload of the message. It is understandable that the filling area of the load balancing identifier is not limited in the embodiment of the present application.
  • the load balancing identifier is used to indicate the load balancing configuration information for processing the message.
  • the network device determines how to process the message and obtains the egress port of the message according to the load balancing identifier to achieve load balancing for the message.
  • the load balancing identifier is the identifier information of the load balancing configuration information.
  • the load balancing identifier corresponding to the load balancing configuration information #1 is "1”
  • the load balancing identifier corresponding to the load balancing configuration information #2 is "2”.
  • the network device can find the corresponding load balancing configuration information based on the load balancing identifier. Furthermore, the network device determines the application scenario of the load balancing algorithm used to process the message from the load balancing configuration information: the Hash key members selection control word and the Hash function selection control word used to process the message.
  • the network device maintains the mapping relationship between the load balancing identifier and the load balancing configuration information, and the network device determines the load balancing configuration information used to process the message through the load balancing identifier. Then, according to the instructions of the load balancing configuration information, the message is processed and the egress port of the message is determined.
  • the load balancing identifier includes a hash key member selection control word and a hash function selection control word.
  • the hash key member selection control word and the hash function selection control word are directly indicated by the load balancing identifier.
  • the load balancing identifier is shown in FIG3 .
  • the load balancing identifier is an implicit identifier.
  • the load balancing identifier when the load balancing identifier is an implicit identifier, the load balancing identifier may also be referred to as a logical circuit identifier.
  • the network device after receiving a message, assigns an implicit load balancing identifier to the message according to the traffic characteristic information of the message. Then, a logic circuit for processing the message is determined according to the implicit load balancing identifier, and the logic circuit runs a load balancing algorithm corresponding to the load balancing identifier, and the egress port of the message is calculated by the logic circuit.
  • the network device includes multiple logic circuits, each logic circuit corresponds to a load balancing configuration information, and the logic circuit runs the load balancing algorithm corresponding to the load balancing configuration information.
  • the network device uses the logic circuit to process the message and calculates the egress port of the message. Since the load balancing configuration information corresponds to the load balancing identifier (implicit), each logic circuit is associated with an implicit load balancing identifier. In the embodiment of the present application, each logic circuit is associated with a unique load balancing identifier. After the network device assigns an implicit load balancing identifier to the message, the network device determines the target logic circuit according to the load balancing identifier, and the target logic circuit is used to process the message to obtain the egress port of the message.
  • mapping relationship between the logical circuit and the implicit load balancing identifier is shown in Table 2:
  • the network device classifies the message according to the traffic characteristic information of the message. Then, based on the classification result, an implicit load balancing identifier is assigned to the message, and the message is forwarded to the logic circuit (i.e., the target logic circuit) corresponding to the load balancing identifier for processing to obtain the egress port of the message. Specifically, the traffic characteristic information of the message is matched with the matching information of the load balancing configuration information to determine the load balancing configuration information that matches the traffic characteristic information. Then, the network device assigns an implicit load balancing identifier to the message, and forwards the message to the target logic circuit associated with the load balancing identifier.
  • the logic circuit i.e., the target logic circuit
  • the network device determines an egress port of the message according to the load balancing identifier of the message and using a load balancing algorithm corresponding to the message.
  • the network device determines the load balancing algorithm corresponding to the message according to the load balancing identifier. Then, the network device uses the load balancing algorithm corresponding to the message to determine the egress port of the message.
  • the following describes the specific methods of determining the egress port of the message according to the explicit load balancing identifier and the implicit load balancing identifier.
  • the load balancing identifier is an explicit identifier.
  • the network device finds the corresponding load balancing configuration information according to the load balancing identifier. Then, the network device determines the load balancing algorithm for processing the message from the load balancing configuration information. According to the load balancing algorithm, the network device determines the hash key member selection control word corresponding to the message and the hash function selection control word corresponding to the message. Then, the network device selects a target field from the message according to the hash key member selection control word corresponding to the message, and the target field is used to construct the target hash key component member of the message. The network device determines the target hash function used by the message according to the hash function selection control word corresponding to the message. The network device uses the target hash function and the target hash key component member to calculate the target hash value of the message. Finally, the network device determines the egress port of the message according to the target hash value.
  • the network device determines the hash value corresponding to the message from the load balancing configuration information according to the load balancing identifier.
  • the function selects the control word and the hash key value member corresponding to the message selects the control word.
  • the load balancing identifier directly indicates the hash function selection control word and the hash key value member selection control word.
  • the network device determines the hash function selection control word and the hash key value member selection control word corresponding to the message according to the load balancing identifier assigned to the message.
  • the load balancing identifier is an implicit identifier.
  • the network device After the network device assigns an implicit load balancing identifier to the message, it forwards the message to the logic circuit (i.e., the target logic circuit) corresponding to the load balancing identifier for processing.
  • the network device obtains the hash function selection control word corresponding to the message and the hash key value member selection control word corresponding to the message from the register associated with the target logic circuit.
  • the network device selects a target field from the message according to the hash key value member selection control word corresponding to the message, and the target field is used to construct the target hash key value component member of the message;
  • the network device determines the target hash function used by the message according to the hash function selection control word corresponding to the message.
  • the network device uses the target hash function and the target hash key value component member to calculate the target hash value of the message.
  • the network device determines the output port of the message according to the target hash value.
  • the network device includes n logic circuits, where n is a positive integer greater than 1.
  • Each logic circuit can be divided into three parts according to its function: a register for storing the load balancing configuration information corresponding to the logic circuit; a hash key value construction logic circuit for constructing a hash key value; and a hash value calculation logic circuit for calculating a hash value.
  • the target logic circuit for example, logic circuit #2
  • the hash key value member selection control word and the hash function selection control word are obtained from register #2 associated with logic circuit #2.
  • the target field is selected from the message by the hash key value construction logic circuit #2, and then the target hash key value component member of the message is constructed according to the target field.
  • the hash value #2 corresponding to the message is calculated by the hash value calculation logic circuit #2 and the target hash key value component member.
  • the network device determines the output port corresponding to the message according to the hash value #2.
  • the embodiment of the present application proposes a message processing method.
  • the load balancing identifier of the message is assigned according to the traffic characteristic information of the message, and the load balancing identifier is used to indicate the load balancing algorithm corresponding to the message.
  • the network device determines the egress port of the message according to the load balancing identifier of the message using the load balancing algorithm corresponding to the message, and the egress port of the message is used to forward the message.
  • the network device supports the assignment of different load balancing identifiers to different messages. Then, the network device determines the egress port of the message according to the load balancing identifier using the corresponding load balancing algorithm to implement load balancing processing of the message.
  • the network device can perform corresponding load balancing processing on the messages of different services to improve the throughput of the entire network.
  • the problem that the current network device only supports L2 or L3 global unique network load balancing configuration is solved, and the messages with different traffic characteristics are realized to intersect on the same network device, so as to maximize the throughput of the entire network.
  • the mixed traffic can be cut into multiple fine sub-traffic topologies, and independent load balancing configuration information can be configured for each sub-traffic topology.
  • An application scenario proposed in the embodiment of the present application is introduced in combination with the above-mentioned embodiment.
  • Figure 10 is a flow chart of an application scenario in the embodiment of the present application.
  • An application scenario proposed in the embodiment of the present application includes:
  • the message arrives at the network device.
  • the message arriving at the network device includes: a first message and a second message.
  • the network device extracts field information of the message.
  • step 1003. Check whether the message is forwarded by multiple ports. If yes, proceed to step 1004; if no, proceed to step 1010.
  • step 1004. Check whether the interface is enabled to select load balancing configuration information according to the traffic characteristic information of the message. If yes, proceed to step 1005; if no, proceed to step 1008.
  • the network device extracts the flow characteristic information of the first message from the field information and other related information of the first message.
  • the network device extracts the flow characteristic information of the second message from the field information and other related information of the second message.
  • step 1006. Check whether the traffic characteristic information of the message matches the matching information included in the load balancing configuration information. If yes, proceed to step 1007; if not, proceed to step 1008. Exemplarily, the network device matches the traffic characteristic information of the first message with the matching information #1 included in the load balancing configuration information #1, and if the match is successful, proceed to step 1007. The network device matches the traffic characteristic information of the second message with the matching information #2 included in the load balancing configuration information #2, and if the match is successful, proceed to step 1007.
  • step 1007 Allocate a load balancing identifier for the message according to the load balancing configuration information that matches the traffic characteristic information. After step 1007, proceed to step 1009.
  • the network device assigns a first load balancing identifier to the first message, and the first load balancing identifier corresponds to the first load balancing algorithm.
  • Load balancing configuration information #1 indicates the first load balancing algorithm, and the load balancing configuration information #1 includes the first load balancing identifier.
  • the network device assigns a second load balancing identifier to the second message, and the second load balancing identifier corresponds to the second load balancing algorithm.
  • Load balancing configuration information #2 indicates the second load balancing algorithm, and the load balancing configuration information #2 includes the second load balancing identifier.
  • the first load balancing identifier is different from the second load balancing identifier, and the first load balancing algorithm is different from the second load balancing algorithm.
  • step 1008 Use the global default load balancing configuration information. After step 1008, proceed to step 1009.
  • the corresponding load balancing algorithm is used to determine the egress port of the message. Specifically, based on the load balancing configuration, a Hash key is constructed, and then the Hash value is calculated. Load balancing is performed using the calculated Hash value to determine the egress port of the message.
  • the network device performs load balancing processing on the first message according to the first load balancing algorithm indicated by the load balancing configuration information #1, and determines the egress port of the first message.
  • the network device performs load balancing processing on the second message according to the second load balancing algorithm indicated by the load balancing configuration information #2, and determines the egress port of the second message.
  • the network device includes a hardware structure and/or software module corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
  • the embodiment of the present application can divide the functional modules of the network device according to the above method example.
  • each functional module can be divided according to each function, or two or more functions can be integrated into one processing module.
  • the above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
  • the communication device described below has any function of the network device in the above method embodiment.
  • the communication device described in the present application may be a network device such as a switch or a router, or may be a component of a network device, such as an interface board, a line card or a chip on a network device, or may be a functional module on a network device, or may be a chip system for implementing the method of the present application, which is not specifically limited in the embodiment of the present application.
  • the communication devices may be directly connected, for example, but not limited to, via an Ethernet cable or an optical fiber.
  • the transceiver module in the communication device may be, for example, an interface circuit in the chip system
  • the processing module may be, for example, a processing circuit in the chip system for performing processing operations.
  • Figure 12 is a schematic diagram of the structure of a communication device 1200 provided in an embodiment of the present application. As shown in Figure 12, the communication device 1200 includes: a transceiver module 1201 for executing step 701; a processing module 1202 for executing steps 702 or 703.
  • the communication device 1200 can correspond to the network device in the above-mentioned method embodiment.
  • the various units in the communication device 1200 and the above-mentioned other operations and/or functions are respectively for implementing the various steps and methods implemented by the network device in the method embodiment.
  • the specific details can be found in the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.
  • the communication device 1200 executes the above method embodiment, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the communication device 1200 is divided into different functional modules to complete all or part of the functions described above.
  • the communication device 1200 provided in the above embodiment and the embodiment method corresponding to FIG. 7 above belong to the same concept, and the specific implementation process is detailed in the above method embodiment, which will not be repeated here.
  • the communication device 1300 shown in Figure 13 shows certain specific features, those skilled in the art will realize from the embodiments of the present application that, for the sake of brevity, various other features are not shown in Figure 13 to avoid confusing more relevant aspects of the implementation methods disclosed in the embodiments of the present application.
  • the communication device 1300 includes one or more processors (such as CPU) 1301, a network interface 1302, a programming interface 1303, a memory 1304 and one or more communication buses 1305 for interconnecting various components.
  • the communication device 1300 can also omit or add some functional components or units based on the above examples.
  • the network interface 1302 is used to connect to one or more other communication devices/servers in the network system.
  • the communication bus 1305 includes circuits for interconnecting and controlling communication between system components.
  • the memory 1304 may include non-volatile memory, such as read-only memory (ROM), programmable read-only memory (ROM), and programmable read-only memory (ROM).
  • the memory 1304 may include an erasable programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the memory 1304 may also include a volatile memory, which may be a random access memory (RAM) used as an external cache.
  • RAM random access memory
  • memory 1304 or a non-temporary computer-readable storage medium of memory 1304 stores the following programs, modules, and data structures, or a subset thereof, including, for example, a transceiver unit (not shown), an acquisition unit 13041 , and a processing unit 13042 .
  • the communication device 1300 may have any function of the network device in the method embodiment corresponding to FIG. 7 above.
  • the communication device 1300 corresponds to the network device or control management device in the above-mentioned method embodiment, and the various modules in the communication device 1300 and the above-mentioned other operations and/or functions are respectively for realizing the various steps and methods implemented by the network device or control management device in the above-mentioned method embodiment.
  • the various modules in the communication device 1300 and the above-mentioned other operations and/or functions are respectively for realizing the various steps and methods implemented by the network device or control management device in the above-mentioned method embodiment.
  • they will not be repeated here.
  • the network interface 1302 on the communication device 1300 can complete the data sending and receiving operations, or the processor can call the program code in the memory and cooperate with the network interface 1302 to implement the functions of the sending and receiving unit when necessary.
  • the communication device 1300 is used to execute the service protection method provided in the embodiment of the present application, for example, to execute the service protection method corresponding to the embodiment shown in FIG. 7 above.
  • FIG. 14 The specific structure of the communication device described in FIG. 13 of the present application may be as shown in FIG. 14 .
  • FIG. 14 is a schematic diagram of the structure of a communication device 1400 provided in an embodiment of the present application.
  • the communication device 1400 includes: a main control board 1414 and an interface board 1430 .
  • the main control board 1414 is also called a main processing unit (MPU) or a route processor.
  • the main control board 1414 is used to control and manage various components in the communication device 1400, including routing calculation, device management, device maintenance, and protocol processing functions.
  • the main control board 1414 includes: a central processing unit 1415 and a memory 1416.
  • the interface board 1430 is also called a line processing unit (LPU), a line card or a service board.
  • the interface board 1430 is used to provide various service interfaces and implement data packet forwarding.
  • the service interfaces include but are not limited to Ethernet interfaces, POS (Packet over SONET/SDH) interfaces, etc.
  • the interface board 1430 includes: a central processor 1431, a network processor 1432, a forwarding table entry memory 1434 and a physical interface card (PIC) 1433.
  • PIC physical interface card
  • the central processor 1431 on the interface board 1430 is used to control and manage the interface board 1430 and communicate with the central processor 1415 on the main control board 1414 .
  • the network processor 1432 is used to implement message forwarding processing.
  • the network processor 1432 may be in the form of a chip.
  • the physical interface card 1433 is used to implement the docking function of the physical layer, and the original traffic enters the interface board 1430 from it, and the processed message is sent from the physical interface card 1433.
  • the physical interface card 1433 includes at least one physical interface, which is also called a physical port.
  • the physical interface can be a Flexible Ethernet (FlexE) physical interface.
  • the physical interface card 1433 is also called a daughter card, which can be installed on the interface board 1430 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 1432 for processing after checking the legitimacy of the message.
  • the central processor 1431 of the interface board 1430 can also perform the functions of the network processor 1432, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1432 is not required in the interface board 1430.
  • the communication device 1400 includes multiple interface boards.
  • the communication device 1400 also includes an interface board 1440 .
  • the interface board 1440 includes: a central processor 1441 , a network processor 1442 , a forwarding table entry memory 1444 , and a physical interface card 1443 .
  • the communication device 1400 further includes a switching fabric board 1420.
  • the switching fabric board 1420 may also be referred to as a switch fabric unit (SFU).
  • SFU switch fabric unit
  • the switching fabric board 1420 is used to complete data exchange between the interface boards.
  • the interface board 1430 and the interface board 1440 may communicate via the switching fabric board 1420.
  • the main control board 1414 is coupled to the interface board.
  • the main control board 1414, the interface board 1430, the interface board 1440, and the switching network board 1420 are interconnected through a system bus and/or a system backplane.
  • an inter-process communication (IPC) channel is established between the main control board 1414 and the interface board 1430, and the main control board 1414 and the interface board 1430 communicate through the IPC channel.
  • IPC inter-process communication
  • the communication device 1400 includes a control plane and a forwarding plane.
  • the control plane includes a main control board 1414 and a central processing unit 1431.
  • the forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 1434, a physical interface card 1433, and a network processor 1432.
  • the control plane performs functions such as publishing routes, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the status of the device.
  • the control plane sends the generated forwarding table to the forwarding plane.
  • the network processor 1432 processes the message received by the physical interface card 1433 based on the forwarding table sent by the control plane.
  • the forwarding table sent by the control plane can be stored in the forwarding table entry storage 1434. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.
  • the transceiver unit in the communication device 1300 can be equivalent to the physical interface card 1433 or the physical interface card 1443 in the communication device 1400; the acquisition unit 13041 and the processing unit 13042 in the communication device 1300 can be equivalent to the central processor 1415 or the central processor 1431 in the communication device 1400, and can also be equivalent to the program code or instructions stored in the memory 1416.
  • the operation on the interface board 1440 in the embodiment of the present application is consistent with the operation of the interface board 1430, and for the sake of brevity, it will not be repeated.
  • the communication device 1400 of this embodiment can correspond to the network device in each of the above-mentioned method embodiments, and the main control board 1414, the interface board 1430 and/or the interface board 1440 in the communication device 1400 can implement the functions and/or various steps implemented by the network device in each of the above-mentioned method embodiments, and for the sake of brevity, it will not be repeated here.
  • main control boards there may be one or more main control boards, and when there are multiple boards, they may include a main main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing capability of the communication device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, load sharing and redundant backup can be achieved together. Under the centralized forwarding architecture, the communication device may not need a switching network board, and the interface board bears the processing function of the service data of the entire system.
  • the communication device may have at least one switching network board, and the data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities.
  • the form of the communication device may also be only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the board.
  • the central processor on the interface board and the central processor on the main control board can be merged into one central processor on the board to perform the functions of the two superimposed. Which architecture is adopted depends on the specific networking deployment scenario, and it is not limited here.
  • the above network device can be implemented as a virtualized device.
  • the virtualized device can be a virtual machine (VM), a virtual router or a virtual switch running a program for sending a message.
  • the virtualized device is deployed on a hardware device (e.g., a physical server).
  • a hardware device e.g., a physical server.
  • the network device can be implemented based on a general physical server combined with network functions virtualization (NFV) technology.
  • NFV network functions virtualization
  • the embodiment of the present application also provides a computer-readable storage medium, including instructions, which, when executed on a computer, enables the computer to control a network device to execute any one of the implementation methods shown in the aforementioned method embodiments.
  • the embodiments of the present application also provide a computer program product, which includes a computer program code.
  • the computer program code runs on a computer, the computer executes any one of the implementation methods shown in the aforementioned method embodiments.
  • an embodiment of the present application also provides a computer program product, which, when executed on a communication device, enables the communication device to execute the method executed by the network device in the method embodiment corresponding to FIG. 7 above.
  • the embodiment of the present application further provides a chip system, including a processor and an interface circuit, wherein the interface circuit is used to receive instructions and transmit them to the processor.
  • the processor is used to implement the method in any of the above method embodiments.
  • the chip system further includes a memory
  • the processor in the chip system may be one or more.
  • the processor may be implemented by hardware or software.
  • the processor may be a logic circuit, an integrated circuit, etc.
  • the processor may be a general-purpose processor that implements the method in any of the above method embodiments by reading the software code stored in the memory.
  • the memory in the chip system may be one or more.
  • the memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application.
  • the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be provided on different chips.
  • the present application does not specifically limit the type of memory and the arrangement of the memory and the processor.
  • the communication devices in the above-mentioned various product forms respectively have any functions of the network devices in the above-mentioned method embodiments, which will not be described in detail here.
  • B corresponding to A means that B is associated with A, and B can be determined according to A.
  • determining B according to A does not mean determining B only according to A, and B can also be determined according to A and/or other information.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

Landscapes

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

Abstract

本申请实施例公开一种报文处理方法以及相关装置,包括:报文到达网络设备后,根据报文的流量特征信息分配报文的负载均衡标识,该负载均衡标识用于指示报文对应的负载均衡算法。网络设备根据报文的负载均衡标识,使用报文对应的负载均衡算法确定该报文的出端口,该报文的出端口用于转发该报文。在网络中同时存在多种业务的场景下,网络设备可以对不同业务的报文分配对应的负载均衡标识,然后依据负载均衡标识执行对应的负载均衡处理,提升整个网络的吞吐量。解决当前网络设备只支持L2或L3全局唯一网络负载均衡配置的问题,实现不同流量特征的报文在同一个网络设备上交汇,实现整网吞吐最大化。

Description

一种报文处理方法以及相关装置
本申请要求于2022年10月31日提交国家知识产权局、申请号为CN202211366416.6、发明名称为“一种报文处理方法以及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种报文处理方法以及相关装置。
背景技术
在数据中心网络中,当发送端发送的多条数据流的流量之和大于接收端的端口容量时,称为拥塞。拥塞导致丢包,因此,为了避免丢包,数据中心网络中的网络设备需要对网络流量(后文简称为流量)进行流量负载均衡(后文简称为负载均衡)。负载均衡(load balancing,或者,load sharing)指的是将流量均匀地从多个链路中发送出去。
为了实现负载均衡,以克劳斯(CLOS)网络为例:在采用层3(layer3,L3)标识查表转发的网络(即采用网络层标识查表转发的网络),例如互联网协议(Internet Protocol,IP)网络中,负载均衡算法的应用场景主要是等价多路径路由(Equal-Cost Multi-Path,ECMP);在采用层2(Layer2,L2)标识查表转发的网络(即采用链路层查表转发的网络),例如以太交换网络中,负载均衡算法的应用场景主要是链路聚合(Link Aggregation,LAG)。
当前的网络设备仅支持配置唯一的负载均衡算法,即网络设备仅支持ECMP或者仅支持LAG。对于网络中同时存在多种业务的场景,例如同时存在L3业务和L2业务,则网络设备无法对L3业务和L2业务同时进行负载均衡。因此,导致整个网络的吞吐下降。
发明内容
第一方面,本申请实施例提出一种报文处理方法,包括:
报文到达网络设备;
所述网络设备根据所述报文的流量特征信息,分配所述报文的负载均衡标识,其中,所述负载均衡标识用于指示所述报文对应的负载均衡算法;
所述网络设备根据所述报文的所述负载均衡标识,使用所述报文对应的所述负载均衡算法确定所述报文的出端口,其中,所述报文的出端口用于转发所述报文。
具体的,本申请实施例中,对报文按照流量特征分类,不同类的流量分配不同的负载均衡标识。不同负载均衡标识对应不同的负载均衡配置信息。网络设备根据负载均衡标识,确定对应的负载均衡配置信息,根据负载均衡配置信息对报文进行处理得到报文的出端口。实现对流量的负载均衡处理。支持运行态下多业务对应多个负载均衡配置信息共存,支持对混合流量进行分类,并根据独立运行不同的负载均衡配置信息对混合流量分别进行负载均衡处理。
一种示例中,在网络设备中的报文处理流水线上,按照功能划分可以将网络设备分为多个功能模块,包括:1、报文头处理模块(packet parser),这个模块负责从报文中提取多个报文头的字段信息,如Layer2头、Layer 3头、传输层头等报文头的字段信息,并补充描述信息如报文到达的物理端口信息,以供后面模块处理使用。2、隧道终结模块(tunnel termination),这个模块是用来终结以交换芯片为隧道端点的报文的。3、VLAN处理模块(VLAN processing),这个模式是用来处理虚拟局域网VLAN功能的,如VLAN标记、去标记或转换。4、Layer 2转发模块(Layer 2switching),这个模块是进行Layer2功能处理的。如源MAC地址的学习、目的MAC地址转发查表,提供Layer 2交换服务,Layer 2负载均衡功能就在这个模块。5、Layer 3转发模块(Layer 3routing),这个模块是进行Layer 3功能处理的,比如目的IP地址最长匹配查表等,提供Layer 3路由服务,Layer 3负载均衡功能就在这个模块。6、入方向ACL处理模块(ingress ACL),这个模块用来实现访问控制列表(ACL)、差分服务、服务质量QoS分类应用、策略路由修改下一跳等功能。
一种可能的示例中,在报文头处理模块提取报文的流量特征信息。在Layer 2转发模块和Layer 3转发模块上,根据报文的流量特征信息为报文分配负载均衡标识,然后计算报文的出端口,实现对报文的负载均衡处理。本申请实施例提出一种报文处理方法,报文到达网络设备后,根据报文的流量特征信息分配报文的负载均衡标识,该负载均衡标识用于指示报文对应的负载均衡算法。网络设备根据报文的负载均衡标识,使用报文对应的负载均衡算法确定该报文的出端口,该报文的出端口用于转发该报文。网络设备支持对不同的报文分配不同的负载均衡标识。然后,网络设备根据负载均衡标识,使用对应的负载均衡算法确定报文的出端口,实现对报文的负载均衡处理。在网络中同时存在多种业务的场景下,网络设备可以对不同业务的报文执行对应的负载均衡处理,提升整个网络的吞吐量。解决当前网络设备只支持L2或L3全局唯一网络负载均衡配置的问题,实现不同流量特征的报文在同一个网络设备上交汇,实现整网吞吐最大化。通过本方案,可以把混合流量切割为多个精细的子流量拓扑并每个子流量拓扑执行独立的负载均衡配置信息。
在第一方面的一种可能实现方式中,所述网络设备将所述负载均衡标识填充至所述报文,包括:所述网络设备将所述负载均衡标识填充至所述报文的报文描述符,所述报文描述符用于记录所述报文的报文头信息。该负载均衡标识是一种显式的标识。具体的,报文描述符所记录的信息包括但不限于:以太头信息、IP头信息,TCP/UDP头信息,报文存储在芯片缓存(buffer)的位置信息、报文的长度信息以及报文出端口信息等。
示例性的,当本申请实施例中的网络设备作为芯片实现时,网络设备为报文分配负载均衡标识,包括:网络设备(芯片)在报文对应的报文描述符中填充(或者增加)负载均衡标识。
一种可能的实现方式为,网络设备将负载均衡标识填充至报文的保留字段。
又一种可能的实现方式为,网络设备将负载均衡标识填充至报文的有效载荷(payload)。可以理解的是,本申请实施例中不对负载均衡标识的填充区域进行限定。
通过引入负载均衡标识,大幅度减少了对芯片寄存器数目和逻辑处理电路面积的需求,降低硬件成本。
在第一方面的一种可能实现方式中,所述网络设备根据所述报文的所述负载均衡标识,使用所述报文对应的所述负载均衡算法确定所述报文的出端口,包括:所述网络设备根据所述负载均衡标识,确定所述报文对应的所述负载均衡算法;所述网络设备根据所述报文对应的所述负载均衡算法,确定所述报文使用的目标哈希函数和所述报文的目标哈希键值组成成员;所述网络设备根据所述目标哈希函数和所述目标哈希键值组成成员,计算得到目标哈希值;所述网络设备根据所述目标哈希值,确定所述报文的出端口。
具体的,当报文到达网络设备后,网络设备将该报文的报文描述符中记录的相关信息作为该报文的流量特征信息。然后,网络设备从多个负载均衡配置信息的匹配信息中,选取与报文描述符(流量特征信息)相匹配的匹配信息。网络设备将该负载均衡配置信息对应的负载均衡标识分配给该报文。网络设备在该报文的报文描述符中填充该负载均衡标识。
在第一方面的一种可能实现方式中,所述网络设备根据所述负载均衡标识,确定所述报文使用的所述目标哈希函数和所述报文的所述目标哈希键值组成成员,包括:所述网络设备根据所述负载均衡标识,确定所述报文对应的哈希函数选择控制字和所述报文对应的哈希键值成员选择控制字;所述网络设备根据所述报文对应的所述哈希函数选择控制字,确定所述报文使用的所述目标哈希函数;所述网络设备根据所述报文对应的所述哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员。
具体的,以负责构建哈希键值的网络设备是芯片为例进行说明。
一种示例中,哈希键值总共有13个成员,每个成员为16比特宽度即2字节的宽度。其中,第一个成员是虚拟网络标签(Virtual Network Tag,VNTag)的源虚拟端口标识;第二个成员是VNTag的目的虚拟端口标识;第三个成员是芯片在所在系统里面的标识;第四个成员是报文到达芯片的物理端口标识;第五个成员是这个报文的网络层协议标识;第六个成员是这个报文的传输层的目的端口;第七个成员是这个报文的传输层的源端口;第八个成员是这个报文的VLAN标识;第九个成员是这个报文的网络层目的地址的低16比特;第十个成员是这个报文的网络层目的地址的高16比特;第十一个成员是这个报文 的网络层源地址的低16比特;第十二个成员是这个报文的网络层源地址的高16比特;第十三个成员是拥塞通告标签(Congestion Notification tag,CNTag)。
上述成员的信息,有些来自于这个报文自身携带的字段,例如网络层目的地址、网络层源地址、传输层目的端口、传输层源端口、网络层协议标识、CNTag、VNTag、VLAN标识等,有些来自于这个报文所在芯片的信息,例如报文到达的芯片端口标识、报文到达的芯片在所在系统的标识等。如果芯片被告知某些成员字段不需要填充,如第十三成员CNTag,那么该成员字段就会在构建Hash Key的时候被填充以默认值,例如0或其他固定值;如果芯片被告知某些成员字段需要填充,但是报文中没有对应的字段或对应成员信息无法提取,例如针对地址解析协议(Address Resolution Protocol,ARP)报文是没有网络层和传输信息的,那么对应字段也是被填充默认值如0或其他固定值。
当构建哈希键值后,按照配置的哈希算法对该哈希键值进行计算,得到对应的哈希值。哈希值构造方法通常是在网络设备上配置如何从Hash计算结果得到Hash值,例如提取Hash计算结果的低16位为最终Hash值、或高16为最终Hash值、或全部比特为最终Hash值等。
进一步的,选择报文的哪些字段来填充构建哈希键值是由哈希键值成员选择控制字(Hash key members selection control word)来控制。哈希键值成员选择控制字的长度可以是13比特(bit)。如果哈希键值成员选择控制字的对应位设置为1,意味着要填充报文对应字段的值到Hash key里面去,否则就忽略。例如:从低位向高位来看,如果这个控制字第7比特被置1,说明需要从报文头里面提取传输层的源端口(source L4port)字段的值填充到Hash key结构的第7个字段里面去;否则Hash key结构的第7个字段就默认为全0。
进一步的,在计算哈希值的过程中,选择哪个哈希算法也是通过控制字来控制的,这个控制字被称为哈希函数选择控制字(Hash function selection control word)。哈希函数选择控制字可以与哈希键值成员选择控制字合并为一个单一控制字。哈希函数选择控制字与哈希键值成员选择控制字也可以独立作为两个控制字存在。
哈希算法包括循环冗余校验(Cyclic Redundancy Check,CRC)计算、异或计算或芯片自定义的其他计算方法。
在第一方面的一种可能实现方式中,所述网络设备根据所述报文的所述负载均衡标识,使用所述报文对应的所述负载均衡算法确定所述报文的出端口,包括:所述网络设备根据所述报文的所述负载均衡标识,确定目标逻辑电路,其中,所述目标逻辑电路与所述报文的所述负载均衡标识关联,所述目标逻辑电路运行所述报文对应的所述负载均衡算法;所述网络设备使用所述目标逻辑电路处理所述报文,确定所述报文的出端口。该负载均衡标识是一种隐式的标识。
在第一方面的一种可能实现方式中,所述网络设备根据所述报文的所述负载均衡标识,确定所述目标逻辑电路,包括:所述网络设备从所述网络设备包括的多个逻辑电路中确定所述目标逻辑电路,其中,所述多个逻辑电路与多个负载均衡标识对应,所述多个负载均衡标识包括所述报文的所述负载均衡标识,所述逻辑电路运行与所述负载均衡标识对应的所述负载均衡算法。
具体的,网络设备包括多个逻辑电路,每个逻辑电路与一个负载均衡配置信息对应,逻辑电路运行负载均衡配置信息所对应的负载均衡算法。网络设备使用逻辑电路处理报文,计算得到报文的出端口。由于负载均衡配置信息与负载均衡标识(隐式)对应,因此,每个逻辑电路关联一个隐式的负载均衡标识。本申请实施例中,每个逻辑电路与唯一的一个负载均衡标识关联,这类隐式的负载均衡标识在本申请实施例中称为逻辑电路标识。网络设备为报文分配隐式的负载均衡标识后,网络设备根据该负载均衡标识确定目标逻辑电路,目标逻辑电路用于处理该报文得到报文的出端口。
需要说明的是,网络设备包括的多个逻辑电路,可以是相互独立的物理电路,也可以是同一个物理电路以不同时序进行区分,本申请实施例不作限制。
在第一方面的一种可能实现方式中,所述网络设备使用所述目标逻辑电路处理所述报文,确定所述报文的出端口,包括:所述网络设备使用所述目标逻辑电路处理所述报文,确定所述报文使用的目标哈希函数和所述报文的目标哈希键值组成成员;所述网络设备根据所述目标哈希函数和所述目标哈希键值组成成员,计算得到目标哈希值;所述网络设备根据所述目标哈希值,确定所述报文的出端口。
在第一方面的一种可能实现方式中,所述网络设备使用所述目标逻辑电路处理所述报文,确定所述 报文使用的所述目标哈希函数和所述报文的所述目标哈希键值组成成员,包括:
所述网络设备从所述目标逻辑电路关联的寄存器,获取所述报文对应的哈希函数选择控制字和所述报文对应的哈希键值成员选择控制字;所述网络设备根据所述报文对应的哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员;所述网络设备根据所述报文对应的哈希函数选择控制字,确定所述报文使用的所述目标哈希函数。
在第一方面的一种可能实现方式中,所述网络设备接收第一指令;所述网络设备根据所述第一指令配置负载均衡配置信息,所述负载均衡配置信息指示所述流量特征信息与所述负载均衡算法的关联关系。该第一指令可以是网络管理设备发送的,该第一指令也可以由用户输入,本申请实施例对此不作限制。通过本方案,可以把混合流量切割为多个精细的子流量拓扑,并为每个子流量拓扑配置独立的负载均衡配置信息。
在第一方面的一种可能实现方式中,所述负载均衡标识,包括以下任意一项或多项:负载均衡配置信息的标识信息、逻辑电路标识、哈希键值成员选择控制字,或者,哈希函数选择控制字;其中,所述负载均衡配置信息指示所述流量特征信息与所述负载均衡算法的关联关系。
在第一方面的一种可能实现方式中,所述负载均衡配置信息,包括以下任一项或多项信息:所述负载均衡配置信息的标识信息,所述负载均衡配置信息对应的所述负载均衡算法,匹配信息,所述匹配信息属于所述流量特征信息,哈希键值组成成员的选择配置信息,哈希函数的选择配置信息。
在第一方面的一种可能实现方式中,所述报文的所述流量特征信息包括以下一项或多项:所述报文的差分服务代码点DSCP信息、所述报文的优先级信息、所述报文的入端口信息、所述报文的虚拟局域网VLAN信息、所述报文的入端口组信息、所述报文的出端口信息、所述报文的出端口组信息,或者所述报文的虚拟路由转发表VRF信息。
在第一方面的一种可能实现方式中,负载均衡算法包括:哈希函数(也称为负载均衡哈希函数)和哈希键值组成成员(也称为负载均衡哈希键值组成成员)。
负载均衡配置信息指示特定的负载均衡算法,例如:负载均衡配置信息#1指示哈希函数#1和哈希键值组成成员#1。用户选择负载均衡配置信息#1含义为:用户选择哈希函数#1和哈希键值组成成员#1对报文进行负载均衡处理。负载均衡配置信息视为负载均衡算法的一个实例。
在第一方面的一种可能的实现方式中,网络设备获取第二指令,第二指令指示网络设备采用特定的负载均衡配置信息处理报文。网络设备根据第二指令,选择特定的负载均衡配置信息对报文进行负载均衡处理。在第一方面的一种可能实现方式中,所述负载均衡算法的应用场景以下任意一项:等价多路径路由ECMP,加权多路径路由WCMP,或者,链路聚合LAG。
在第一方面的一种可能实现方式中,所述报文包括第一报文和第二报文,所述第一报文的所述流量特征信息与所述第二报文的所述流量特征信息不同;所述网络设备根据所述报文的所述流量特征信息,分配所述报文的所述负载均衡标识,包括:所述网络设备根据所述第一报文的所述流量特征信息,分配所述第一报文的第一负载均衡标识,所述第一负载均衡标识对应于第一负载均衡算法;所述网络设备根据所述第二报文的所述流量特征信息,分配所述第二报文的第二负载均衡标识,所述第二负载均衡标识对应于第二负载均衡算法;所述第一负载均衡标识与所述第二负载均衡标识不同,所述第一负载均衡算法与所述第二负载均衡算法不同。
具体的,网络设备配置有多个负载均衡配置信息,多个负载均衡配置信息分别指示不同的负载均衡算法。每个负载均衡配置信息分别对应唯一的一个负载均衡标识,每个负载均衡配置信息对应一类报文。当第一报文到达网络设备后,网络设备提取第一报文的流量特征信息。然后,根据第一报文的流量特征信息分配第一报文的第一负载均衡标识。第一负载均衡标识对应于第一负载均衡算法,网络设备使用第一负载均衡算法对第一报文进行负载均衡处理。当第二报文到达网络设备后,网络设备提取第二报文的流量特征信息。然后,根据第二报文的流量特征信息分配第二报文的第二负载均衡标识。第二负载均衡标识对应于第二负载均衡算法,网络设备使用第二负载均衡算法对第二报文进行负载均衡处理。第一负载均衡标识与第二负载均衡标识不同,第一负载均衡算法与第二负载均衡算法不同。
第二方面,本申请实施例提出一种通信装置,用于网络设备,包括:
报文到达收发模块;
处理模块,用于根据所述报文的流量特征信息,分配所述报文的负载均衡标识,其中,所述负载均衡标识用于指示所述报文对应的负载均衡算法;
所述处理模块,还用于根据所述报文的所述负载均衡标识,使用所述报文对应的所述负载均衡算法确定所述报文的出端口,其中,所述报文的出端口用于转发所述报文。
在一种可能实现方式中,所述处理模块,还用于将所述负载均衡标识填充至所述报文的报文描述符,所述报文描述符用于记录所述报文的报文头信息。
在一种可能实现方式中,所述处理模块,还用于根据所述负载均衡标识,确定所述报文对应的所述负载均衡算法;
所述处理模块,还用于根据所述报文对应的所述负载均衡算法,确定所述报文使用的目标哈希函数和所述报文的目标哈希键值组成成员;
所述处理模块,还用于根据所述目标哈希函数和所述目标哈希键值组成成员,计算得到目标哈希值;
所述处理模块,还用于根据所述目标哈希值,确定所述报文的出端口。
在一种可能实现方式中,所述处理模块,还用于根据所述负载均衡标识,确定所述报文对应的哈希函数选择控制字和所述报文对应的哈希键值成员选择控制字;
所述处理模块,还用于根据所述报文对应的所述哈希函数选择控制字,确定所述报文使用的所述目标哈希函数;
所述处理模块,还用于根据所述报文对应的所述哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员。
在一种可能实现方式中,所述处理模块,还用于根据所述报文的所述负载均衡标识,确定目标逻辑电路,其中,所述目标逻辑电路与所述报文的所述负载均衡标识关联,所述目标逻辑电路运行所述报文对应的所述负载均衡算法;
所述处理模块,还用于使用所述目标逻辑电路处理所述报文,确定所述报文的出端口。
在一种可能实现方式中,所述处理模块,还用于从所述网络设备包括的多个逻辑电路中确定所述目标逻辑电路,其中,所述多个逻辑电路与多个负载均衡标识对应,所述多个负载均衡标识包括所述报文的所述负载均衡标识,所述逻辑电路运行与所述负载均衡标识对应的所述负载均衡算法。
在一种可能实现方式中,所述处理模块,还用于使用所述目标逻辑电路处理所述报文,确定所述报文使用的目标哈希函数和所述报文的目标哈希键值组成成员;
所述处理模块,还用于根据所述目标哈希函数和所述目标哈希键值组成成员,计算得到目标哈希值;
所述处理模块,还用于根据所述目标哈希值,确定所述报文的出端口。
在一种可能实现方式中,所述收发模块,还用于从所述目标逻辑电路关联的寄存器,获取所述报文对应的哈希函数选择控制字和所述报文对应的哈希键值成员选择控制字;
所述处理模块,还用于根据所述报文对应的哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员;
所述处理模块,还用于根据所述报文对应的哈希函数选择控制字,确定所述报文使用的所述目标哈希函数。
在一种可能实现方式中,所述收发模块,还用于接收第一指令;
所述处理模块,还用于根据所述第一指令配置负载均衡配置信息,所述负载均衡配置信息指示所述流量特征信息与所述负载均衡算法的关联关系。
在一种可能实现方式中,所述负载均衡标识,包括以下任意一项或多项:
负载均衡配置信息的标识信息、逻辑电路标识、哈希键值成员选择控制字,或者,哈希函数选择控制字;
其中,所述负载均衡配置信息指示所述流量特征信息与所述负载均衡算法的关联关系。
在一种可能实现方式中,所述负载均衡配置信息,包括以下任一项或多项信息:
所述负载均衡配置信息的标识信息,
所述负载均衡配置信息对应的所述负载均衡算法,
匹配信息,所述匹配信息属于所述流量特征信息,
哈希键值组成成员的选择配置信息,
哈希函数的选择配置信息。
在一种可能实现方式中,所述报文的所述流量特征信息包括以下一项或多项:
所述报文的差分服务代码点DSCP信息、所述报文的优先级信息、所述报文的入端口信息、所述报文的虚拟局域网VLAN信息、所述报文的入端口组信息、所述报文的出端口信息、所述报文的出端口组信息,或者所述报文的虚拟路由转发表VRF信息。
在一种可能实现方式中,等价多路径路由ECMP,加权多路径路由WCMP,或者,链路聚合LAG。
在一种可能实现方式中,所述报文包括第一报文和第二报文,所述第一报文的所述流量特征信息与所述第二报文的所述流量特征信息不同;
所述处理模块,具体用于根据所述第一报文的所述流量特征信息,分配所述第一报文的第一负载均衡标识,所述第一负载均衡标识对应于第一负载均衡算法;
所述处理模块,具体用于根据所述第二报文的所述流量特征信息,分配所述第二报文的第二负载均衡标识,所述第二负载均衡标识对应于第二负载均衡算法;
所述第一负载均衡标识与所述第二负载均衡标识不同,所述第一负载均衡算法与所述第二负载均衡算法不同。
第三方面,本申请实施例提出一种通信装置,包括:通信接口;
与所述通信接口连接的处理器;
通信接口,用于获取报文;
处理器,用于根据所述报文的流量特征信息,分配所述报文的负载均衡标识,其中,所述负载均衡标识用于指示所述报文对应的负载均衡算法;
所述处理器,还用于根据所述报文的所述负载均衡标识,使用所述报文对应的所述负载均衡算法确定所述报文的出端口,其中,所述报文的出端口用于转发所述报文。
在一种可能实现方式中,所述处理器,还用于将所述负载均衡标识填充至所述报文的报文描述符,所述报文描述符用于记录所述报文的报文头信息。
在一种可能实现方式中,所述处理器,还用于根据所述负载均衡标识,确定所述报文对应的所述负载均衡算法;
所述处理器,还用于根据所述报文对应的所述负载均衡算法,确定所述报文使用的目标哈希函数和所述报文的目标哈希键值组成成员;
所述处理器,还用于根据所述目标哈希函数和所述目标哈希键值组成成员,计算得到目标哈希值;
所述处理器,还用于根据所述目标哈希值,确定所述报文的出端口。
在一种可能实现方式中,所述处理器,还用于根据所述负载均衡标识,确定所述报文对应的哈希函数选择控制字和所述报文对应的哈希键值成员选择控制字;
所述处理器,还用于根据所述报文对应的所述哈希函数选择控制字,确定所述报文使用的所述目标哈希函数;
所述处理器,还用于根据所述报文对应的所述哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员。
在一种可能实现方式中,所述处理器,还用于根据所述报文的所述负载均衡标识,确定目标逻辑电路,其中,所述目标逻辑电路与所述报文的所述负载均衡标识关联,所述目标逻辑电路运行所述报文对应的所述负载均衡算法;
所述处理器,还用于使用所述目标逻辑电路处理所述报文,确定所述报文的出端口。
在一种可能实现方式中,所述处理器,还用于从所述网络设备包括的多个逻辑电路中确定所述目标逻辑电路,其中,所述多个逻辑电路与多个负载均衡标识对应,所述多个负载均衡标识包括所述报文的所述负载均衡标识,所述逻辑电路运行与所述负载均衡标识对应的所述负载均衡算法。
在一种可能实现方式中,所述处理器,还用于使用所述目标逻辑电路处理所述报文,确定所述报文使用的目标哈希函数和所述报文的目标哈希键值组成成员;
所述处理器,还用于根据所述目标哈希函数和所述目标哈希键值组成成员,计算得到目标哈希值;
所述处理器,还用于根据所述目标哈希值,确定所述报文的出端口。
在一种可能实现方式中,所述通信接口,还用于从所述目标逻辑电路关联的寄存器,获取所述报文对应的哈希函数选择控制字和所述报文对应的哈希键值成员选择控制字;
所述处理器,还用于根据所述报文对应的哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员;
所述处理器,还用于根据所述报文对应的哈希函数选择控制字,确定所述报文使用的所述目标哈希函数。
在一种可能实现方式中,所述通信接口,还用于接收第一指令;
所述处理器,还用于根据所述第一指令配置负载均衡配置信息,所述负载均衡配置信息指示所述流量特征信息与所述负载均衡算法的关联关系。
在一种可能实现方式中,所述负载均衡标识,包括以下任意一项或多项:
负载均衡配置信息的标识信息、逻辑电路标识、哈希键值成员选择控制字,或者,哈希函数选择控制字;
其中,所述负载均衡配置信息指示所述流量特征信息与所述负载均衡算法的关联关系。
在一种可能实现方式中,所述负载均衡配置信息,包括以下任一项或多项信息:
所述负载均衡配置信息的标识信息,
所述负载均衡配置信息对应的所述负载均衡算法,
匹配信息,所述匹配信息属于所述流量特征信息,
哈希键值组成成员的选择配置信息,
哈希函数的选择配置信息。
在一种可能实现方式中,所述报文的所述流量特征信息包括以下一项或多项:
所述报文的差分服务代码点DSCP信息、所述报文的优先级信息、所述报文的入端口信息、所述报文的虚拟局域网VLAN信息、所述报文的入端口组信息、所述报文的出端口信息、所述报文的出端口组信息,或者所述报文的虚拟路由转发表VRF信息。
在一种可能实现方式中,等价多路径路由ECMP,加权多路径路由WCMP,或者,链路聚合LAG。
在一种可能实现方式中,所述报文包括第一报文和第二报文,所述第一报文的所述流量特征信息与所述第二报文的所述流量特征信息不同;
所述处理器,具体用于根据所述第一报文的所述流量特征信息,分配所述第一报文的第一负载均衡标识,所述第一负载均衡标识对应于第一负载均衡算法;
所述处理器,具体用于根据所述第二报文的所述流量特征信息,分配所述第二报文的第二负载均衡标识,所述第二负载均衡标识对应于第二负载均衡算法;
所述第一负载均衡标识与所述第二负载均衡标识不同,所述第一负载均衡算法与所述第二负载均衡算法不同。
第四方面,提供了一种通信系统,通信系统包括如第二方面或第三方面的通信装置。
本申请第五方面提供一种计算机存储介质,该计算机存储介质可以是非易失性的;该计算机存储介质中存储有计算机可读指令,当该计算机可读指令被处理器执行时实现第一方面中任意一种实现方式中的方法。
本申请第六方面提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行第一方面中任意一种实现方式中的方法。
本申请第七面提供一种芯片系统,该芯片系统包括处理器和接口电路,用于支持网络设备实现上述方面中所涉及的功能,例如,发送或处理上述方法中所涉及的数据和/或信息。在一种可能的设计中,芯片系统还包括存储器,存储器,用于保存网络设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
本申请第八方面提供一种通信装置,包括:通信接口;
与通信接口连接的处理器,基于通信接口和处理器,使得通信装置执行如前述第一方面的方法。
附图说明
图1为小规模组网示意图;
图2为大规模组网示意图;
图3为一种单一控制字的结构示意图;
图4为CRC计算示意图;
图5为计算网络和存储网络的独立组网示意图;
图6为计算网络和存储网络的联合组网示意图;
图7为本申请实施例中一种报文处理方法的实施例示意图;
图8为本申请实施例中一种负载均衡配置信息的示意图;
图9为本申请实施例中一种报文描述符的示意图;
图10为本申请实施例中一种应用场景的流程示意图;
图11为本申请实施例中负载均衡处理的一种流程示意图;
图12为本申请实施例提供的一种通信装置1200的结构示意图;
图13为本申请实施例提供的一种通信装置1300的结构示意图;
图14为本申请实施例提供的一种通信装置1400的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的一些示例实现。虽然附图中显示了本公开的一些示例实现, 然而,应该理解,可以以各种形式实现本公开而不应被这里阐述的示例实现所限制。相反,提供这些实现是为了使本公开更加透彻和完整,并且能够将本公开的范围完整地传达给本领域的技术人员。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块。本申请中所出现的模块的划分,是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式,例如多个模块可以结合成或集成在另一个系统中,或一些特征可以忽略,或不执行。
首先介绍本申请实施例涉及的一些概念。
1、多级交换网络(克劳斯CLOS网络)。
CLOS网络包括:骨干(Spine)节点、叶子(leaf)节点以及架顶式(Top-of-Rack,ToR)节点。服务器通过连接ToR节点接入网络,ToR节点与每一个leaf节点连接,每一个leaf节点连接到了每一个spine节点,反之亦然。
请参阅图1,图1为小规模组网示意图。在2级CLOS网络上,通常只有1次流量负载均衡,发生在从TOR到Leaf交换机的转发方向上。每个2级CLOS网络称为一个组群(POD)。
请参阅图2,图2为大规模组网示意图。在3级CLOS网络上,通常有2次流量负载均衡,一次是在POD内从TOR到Leaf交换机的转发方向上,一次是出POD的时候从Leaf到Spine交换机的转发方向上。负载均衡是将流量均匀地通过多个链路转发出去,负载均衡通常被称为load balancing,也被称为load sharing。
2、负载均衡。
2.1、为了实现负载均衡,在采用层3(Layer 3,L3)即网络层标识查表转发的网络,如互联网协议(Internet protocol,IP)网络中,通常使用等价多路径路由(Equal-Cost Multi-Path,ECMP)作为流量负载均衡技术。具体的,ECMP的处理流程如下:
S1、首先基于报文提取的网络层标识(即目的IP地址,destination IP,DIP)查询网络层路由表,从网络层路由中找到对应表项,如果对应的表项的ECMP标识为1,说明去往该目的地址存在多个等价下一跳,于是跳转到对应的ECMP Group表。
S2、然后从该报文信息中提取字段(field)构成哈希键值(Hash Key),送给Hash计算引擎进行Hash计算。
S3、将计算产生的哈希(Hash)值对ECMP组(Group)成员数目做取模运算。
S4、将所得到的哈希值跟ECMP Group表的基指针求和,得到选择的ECMP成员链路下一跳信息在ECMP成员表中的位置(成员链路)。
S5、该报文就从步骤S4所选择的成员链路对应的物理端口转发出去。
2.2、为了实现负载均衡,在采用层2(Layer 2,L2)即链路层标识查表转发的网络,如以太交换网络中,主要使用链路聚合(Link Aggregation,LAG)作为流量负载均衡技术,LAG也被称为Trunk。具体的,LAG的处理流程如下:
D1、首先基于报文提取的链路层标识(即目的MAC地址,destination MAC)查询MAC表,从MAC表中找到对应的表项,如果对应的表项标识是一个LAG,说明去往所述目的MAC地址存在多个并行端口,于是跳转到对应的Trunk Group表。
D2、然后从该报文信息中提取字段(field)构成Hash Key,送给Hash计算引擎进行Hash计算。
D3、将计算产生的Hash值对Trunk Group的成员数目做取模运算。
D4、然后将所得的值跟Trunk Group表的基指针求和,就得到选择的Trunk成员链路端口在Trunk成员表中的位置(成员链路)。
D5、最终报文就从步骤D4所选择的成员链路转发出去。
3、构建哈希键值(hash key)与计算哈希值。
下面介绍如何构建哈希键值。以负责构建哈希键值的网络设备是芯片为例进行说明。
一种示例中,哈希键值总共有13个成员,每个成员为16比特宽度即2字节的宽度。其中,第一个成员是虚拟网络标签(Virtual Network Tag,VNTag)的源虚拟端口标识;第二个成员是VNTag的目的虚拟端口标识;第三个成员是芯片在所在系统里面的标识;第四个成员是报文到达芯片的物理端口标识;第五个成员是这个报文的网络层协议标识;第六个成员是这个报文的传输层的目的端口;第七个成员是这个报文的传输层的源端口;第八个成员是这个报文的VLAN标识;第九个成员是这个报文的网络层目的地址的低16比特;第十个成员是这个报文的网络层目的地址的高16比特;第十一个成员是这个报文的网络层源地址的低16比特;第十二个成员是这个报文的网络层源地址的高16比特;第十三个成员是拥塞通告标签(Congestion Notification tag,CNTag)。
上述成员的信息,有些来自于这个报文自身携带的字段,例如网络层目的地址、网络层源地址、传输层目的端口、传输层源端口、网络层协议标识、CNTag、VNTag、VLAN标识等,有些来自于这个报文所在芯片的信息,例如报文到达的芯片端口标识、报文到达的芯片在所在系统的标识等。如果芯片被告知某些成员字段不需要填充,如第十三成员CNTag,那么该成员字段就会在构建Hash Key的时候被填充以默认值,例如0或其他固定值;如果芯片被告知某些成员字段需要填充,但是报文中没有对应的字段或对应成员信息无法提取,例如针对地址解析协议(Address Resolution Protocol,ARP)报文是没有网络层和传输信息的,那么对应字段也是被填充默认值如0或其他固定值。
当构建哈希键值后,按照配置的哈希算法对该哈希键值进行计算,得到对应的哈希值。哈希值构造方法通常是在网络设备上配置如何从Hash计算结果得到Hash值,例如提取Hash计算结果的低16位为最终Hash值、或高16为最终Hash值、或全部比特为最终Hash值等。
进一步的,选择报文的哪些字段来填充构建哈希键值是由哈希键值成员选择控制字(Hash key members selection control word)来控制。哈希键值成员选择控制字的长度可以是13比特(bit)。如果哈希键值成员选择控制字的对应位设置为1,意味着要填充报文对应字段的值到Hash key里面去,否则就忽略。例如:从低位向高位来看,如果这个控制字第7比特被置1,说明需要从报文头里面提取传输层的源端口(source L4port)字段的值填充到Hash key结构的第7个字段里面去;否则Hash key结构的第7个字段就默认为全0。
进一步的,在计算哈希值的过程中,选择哪个哈希算法也是通过控制字来控制的,这个控制字被称为哈希函数选择控制字(Hash function selection control word)。哈希函数选择控制字可以与哈希键值成员选择控制字合并为一个单一控制字。例如,图3所示,图3为一种单一控制字的结构示意图。该单一控制字的长度可以是16比特,第0~12位作为哈希键值成员选择控制字,第13~15位作为哈希函数选择控制字。哈希函数选择控制字与哈希键值成员选择控制字也可以独立作为两个控制字存在。
哈希算法包括循环冗余校验(Cyclic Redundancy Check,CRC)计算、异或计算或芯片自定义的其他计算方法。
为了便于理解,请参阅图4,图4为CRC计算示意图。CRC计算本质上是对输入比特串,例如这里的Key,进行辗转异或求余。下面以一个例子来说明CRC计算,如图4,假设Hash Key是16位的二进制信息g=1011 0110 0100 0011,这串二进制码可以表示为代数多项式g(x)=x15+x13+x12+x10+x9+x6+x1+1,其中g中第k位的值对应g(x)中xk的系数,k为正整数。将g(x)乘以xm,即将g后加m个0,然后除以m阶多项式h(x),得到的(m-1)阶余项r(x),余项r(x)对应的二进制码r就是CRC计算结果。
结合图4可知,CRC计算方法是确定的,变化的是用作被除数的输入的Key和用作除数的m阶多项式h(x),h(x)通常也被称为生成多项式。通常用生成多项式来标识和区分不同的CRC算法,例如常说“CRC算法A”其实是说“CRC算法使用的生成多项式是A”或“CRC算法使用的生成多项式名字标识为A”,例如可以说“CRC-16-CCITT”或者“CRC 0x1021”,这里“CRC-16-CCITT”是约定的CRC名称,0x1021是生成多项式,网络设备或者其他CRC算法实现主体(例如芯片)也可以自己命名CRC来进行标识区分。ECMP的Hash计算所用CRC生成多项式跟芯片的实现相关。
4、独立组网与联合组网。
以计算网络(compute network)和存储网络(storage network)为例介绍独立组网和联合组网。
4.1、独立组网。
计算网络的业务流量模型以“Halving-doubling”为例,该模型是多个点到点的稀疏流量模型。存储网络的存储业务流量模型,以存储写为例,该模型是多个点到多点的稠密流量模型。例如,图5所示,图5为计算网络和存储网络的独立组网示意图。
当计算网络和存储网络分别独立组网的时候,计算流量和存储流量不会在同一个网络里面共存,这个两个网络可以根据各自承载的业务流量模型选择性能最好的网络负载均衡配置,如计算网络采用case#1作为网络负载均衡配置,存储网络采用case#2作为网络负载均衡配置。
而计算网络和存储网络分别独立组网,是以高投入为代价的。计算网络与存储网络需要分别部署在不同的服务器上,通过至少两个相互独立的网关在接入两个不同的网络。因此,独立组网需要较高的成本。
4.2、联合组网。
由于独立组网需要较高的成本,因此为了降低成本可以采用联合组网。具体的,在融合网络(即联合组网的网络)中通过相同的网关和链路接入到同一个网络里面去。例如图6所示,图6为计算网络和存储网络的联合组网示意图。
但是联合组网带来新的问题:无论case#1还是case#2都不能使得计算业务流量(计算网络)和存储流量(存储网络)同时实现各链路负载偏差率最低,即无法同时实现计算网络和存储网络的最优。导致整个网络的各链路负载偏差率高、整个网络吞吐降低。
基于此,本申请实施例提出一种报文处理方法,报文到达网络设备后,根据报文的流量特征信息分配报文的负载均衡标识,该负载均衡标识用于指示报文对应的负载均衡算法。网络设备根据报文的负载均衡标识,使用报文对应的负载均衡算法确定该报文的出端口,该报文的出端口用于转发该报文。网络设备支持对不同的报文分配不同的负载均衡标识。然后,网络设备根据负载均衡标识,使用对应的负载均衡算法确定报文的出端口,实现对报文的负载均衡处理。在网络中同时存在多种业务的场景下,网络设备可以对不同业务的报文执行对应的负载均衡处理,提升整个网络的吞吐量。
下面,结合附图介绍本申请实施例,请参阅图7,图7为本申请实施例中一种报文处理方法的实施例示意图。本申请实施例提出的一种报文处理方法,包括:
701、报文到达网络设备。
本实施例中,报文到达网络设备包括:网络设备接收报文,或者,网络设备主动获取报文。该报文的报文头包括多种信息,例如:L2层报文头(L2header)、L3层报文头(L3header)、传输层头信息、以太层信息、IP头信息、传输控制协议(Transmission Control Protocol,TCP)/用户数据报协议(User Datagram Protocol,UDP)头信息等。
进一步的,报文到达网络设备后,网络设备记录该报文到达的物理端口信息,也就是记录该报文的入端口信息。
702、网络设备根据报文的流量特征信息,分配报文的负载均衡标识,负载均衡标识用于指示报文对应的负载均衡算法。
本实施例中,报文到达网络设备后对报文进行处理,得到报文的流量特征信息。本申请实施例中报文的流量特征信息,包括但不限于:所述报文的差分服务代码点DSCP信息、所述报文的优先级信息、所述报文的入端口信息、所述报文的虚拟局域网VLAN信息、所述报文的入端口组信息、所述报文的出端口信息、所述报文的出端口组信息,或者所述报文的虚拟路由转发表VRF信息。
具体的,提取报文的流量特征信息包括:网络设备从L2层报文头中提取源媒体访问控制(Media Access Control,MAC)地址、目的MAC地址、以太类型以及虚拟局域网(Virtual Local Area Network,VLAN)标识等。网络设备从L3层报文头中提取源IP地址、目的IP地址、差分服务编码点(Differentiated Services Code Point,DSCP)值、生存时间(Time To Live,TTL)值以及IP协议类型值等。网络设备从L4层报文头中提取传输层的源端口值以及传输层的目的端口值等。网络设备从报文的元数据(metadata)中提取报文到达的物理端口标识(source interface id),报文到达的物理端口所在的模块的标识(source module id)以及报文将要发出去的物理端口标识(destination interface id)等。
网络设备中维护多个负载均衡配置信息,负载均衡配置信息指示负载均衡算法与流量特征信息之间 的关联关系。负载均衡配置信息指示特定的负载均衡算法,例如:负载均衡配置信息#1指示哈希函数#1和哈希键值组成成员#1。用户选择负载均衡配置信息#1含义为:用户选择哈希函数#1和哈希键值组成成员#1对报文进行负载均衡处理。负载均衡配置信息视为负载均衡算法的一个实例。本申请实施例中,负载均衡算法包括:哈希函数(也称为负载均衡哈希函数)和哈希键值组成成员(也称为负载均衡哈希键值组成成员)。
具体的,负载均衡配置信息包括以下一项或多项信息:负载均衡配置信息的标识信息、匹配信息、哈希键值组成成员的选择配置信息、或者哈希函数的选择配置信息。匹配信息可以是报文的流量特征信息,例如:报文标识符中记录的相关信息。哈希键值组成成员的选择配置信息可以是哈希键值成员选择控制字。哈希函数的选择配置信息可以是哈希函数选择控制字。
一种可能的实现方式中,网络设备接收第一指令,并根据第一指令配置负载均衡配置信息。该第一指令可以是网络管理设备发送的,该第一指令也可以由用户输入,本申请实施例对此不作限制。
一种可能的实现方式中,网络设备获取第二指令,第二指令指示网络设备采用特定的负载均衡配置信息处理报文。网络设备根据第二指令,选择特定的负载均衡配置信息对报文进行负载均衡处理。
一种示例,如图8所示,图8为本申请实施例中一种负载均衡配置信息的示意图。负载均衡配置信息#1包括:负载均衡配置信息的标识信息为“1”;匹配信息为“Queue3”,指示该负载均衡配置信息#1针对Queue 3的流量;哈希键值组成成员的选择配置信息为源物理端口号“src-interface”,指示哈希键值采用源物理端口;哈希函数的选择配置信息为“Hashmode 5”,指示采用的哈希函数(或哈希算法)为Hashmode 5。负载均衡配置信息#2包括:负载均衡配置信息的标识信息为“2”;匹配信息为“Queue5”,指示该负载均衡配置信息#2针对Queue 5的流量;哈希键值组成成员的选择配置信息为源IP地址目的IP地址“源IP地址(src-ip)、目的IP地址(dst-ip)和传输层源端口(l4-src-port)”,指示哈希键值采用源IP地址(src-ip)、目的IP地址(dst-ip)和传输层源端口(l4-src-port);哈希函数的选择配置信息为“Hashmode 7”,指示采用的哈希函数(或哈希算法)为Hashmode 7。
又一种示例中,配置的负载均衡配置信息如表1所示:
表1
结合上述表1,网络设备可以配置上述表1的负载均衡配置信息,一种可能的配置模型如下:

示例性的,在物理接口100GE 1/2/2下,新增了命令配置“load-balance ecmp qos queue 3profile AI_traffic”,这个配置命令中,第一个关键词“load-balance”说明是针对网络负载均衡的映射命令;第二个关键词“ecmp”说明是适用于layer 3转发的多路径决策即等价多路径;第三个关键词组“qos queue3”说明是匹配流量特征队列号,通常是DSCP值;第四个关键词组“profile AI_traffic”说明针对DSCP值为3的流量对应的网络负载均衡配置是名为AI_traffic的负载均衡配置的配置文件(load-balance profile)。在配置“AI_traffic”中,Hash key采用报文到达的源物理接口号构建,Hash算法采用hash mode 5。
本申请实施例中,将计算报文的出端口的算法称为负载均衡算法。负载均衡算法包括但不限于:等价多路径路由ECMP,加权多路径路由WCMP,或者,链路聚合LAG等。
当报文到达网络设备的流量特征信息后,网络设备根据报文的流量特征信息对报文进行分类处理。也就是说,网络设备将报文的流量特征信息和负载均衡配置信息中的匹配信息进行匹配。若匹配成功,则认为该报文的分类结果对应于该负载均衡配置信息,需要根据该负载均衡配置信息的指示处理该报文。然后,网络设备根据分类结果,向该报文分配负载均衡标识,该负载均衡标识唯一指示该负载均衡配置信息(即与报文的流量特征信息相匹配的负载均衡配置信息)。
关于分配报文的负载均衡标识,本申请实施例中提出了两种可选的实现方式,具体如下:
A、该负载均衡标识为显式标识。
B、该负载均衡标识为隐式标识。
下面进行具体说明:A、该负载均衡标识为显式标识。
一种可能的实现方式中,网络设备将负载均衡标识填充至报文的报文描述符,报文描述符用于记录报文的报文头信息。报文描述符用于记录报文头信息,报文描述符所记录的信息包括但不限于:以太头信息、IP头信息,TCP/UDP头信息,报文存储在芯片缓存(buffer)的位置信息、报文的长度信息以及报文出端口信息等。其中,以太头信息、IP头信息以及TCP/UDP头信息用于转发查表和访问控制列表(Access Control List,ACL)提供信息输入,这些信息是网络设备的MAC处理模块处理报文时写入到报文描述符;报文存储在芯片buffer的位置信息、长度信息以及报文出端口信息等信息,是网络设备在处理该报文的转发决策的时候写入的。示例性的,报文描述符的长度为64字节。由于报文描述符的长度通常小于报文的平均长度,因此网络设备使用较少带宽的情况下通过读取报文描述符获取报文的相关信息。示例性的,填充负载均衡标识后的报文描述符如图9所示,图9为本申请实施例中一种报文描述符的示意图。负载均衡标识可填充至报文描述符的元数据(metadata)部分。
具体的,当报文到达网络设备后,网络设备将该报文的报文描述符中记录的相关信息作为该报文的流量特征信息。然后,网络设备从多个负载均衡配置信息的匹配信息中,选取与报文描述符(流量特征信息)相匹配的匹配信息。网络设备将该负载均衡配置信息对应的负载均衡标识分配给该报文。网络设备在该报文的报文描述符中填充该负载均衡标识。
又一种可能的实现方式为,网络设备将负载均衡标识填充至报文的保留字段。
又一种可能的实现方式为,网络设备将负载均衡标识填充至报文的有效载荷(payload)。可以理解的是,本申请实施例中不对负载均衡标识的填充区域进行限定。
关于负载均衡标识,负载均衡标识用于指示处理该报文的负载均衡配置信息。网络设备根据该负载均衡标识,确定如何处理该报文并得到报文的出端口,实现对该报文的负载均衡。
一种可能的实现方式为,负载均衡标识为负载均衡配置信息的标识信息。例如图8示意的,负载均 衡配置信息#1所对应的负载均衡标识为“1”,负载均衡配置信息#2所对应的负载均衡标识为“2”。网络设备根据该负载均衡标识,可以找到对应的负载均衡配置信息。进而,网络设备从该负载均衡配置信息中确定用于处理该报文的负载均衡算法的应用场景:用于处理该报文的哈希键值成员选择控制字(Hash key members selection control word)和哈希函数选择控制字(Hash function selection control word)。换言之,网络设备维护负载均衡标识与负载均衡配置信息的映射关系,网络设备通过负载均衡标识确定用于处理该报文的负载均衡配置信息。然后根据负载均衡配置信息的指示,处理该报文并确定报文的出端口。
又一种可能的实现方式为,负载均衡标识包括哈希键值成员选择控制字和哈希函数选择控制字。换言之,通过负载均衡标识直接指示哈希键值成员选择控制字和哈希函数选择控制字。示例性的,该负载均衡标识如图3所示。
B、该负载均衡标识为隐式标识。
本申请实施例中,当负载均衡标识是一种隐式标识时,该负载均衡标识也可以称为逻辑电路标识。
一种可能的实现方式中,网络设备接收报文后,网络设备根据报文的流量特征信息,为报文分配隐式的负载均衡标识。然后根据该隐式的负载均衡标识确定处理该报文的逻辑电路,该逻辑电路运行与该负载均衡标识对应的负载均衡算法,通过该逻辑电路计算得到该报文的出端口。
具体的,网络设备包括多个逻辑电路,每个逻辑电路与一个负载均衡配置信息对应,逻辑电路运行负载均衡配置信息所对应的负载均衡算法。网络设备使用逻辑电路处理报文,计算得到报文的出端口。由于负载均衡配置信息与负载均衡标识(隐式)对应,因此,每个逻辑电路关联一个隐式的负载均衡标识。本申请实施例中,每个逻辑电路与唯一的一个负载均衡标识关联。网络设备为报文分配隐式的负载均衡标识后,网络设备根据该负载均衡标识确定目标逻辑电路,目标逻辑电路用于处理该报文得到报文的出端口。
逻辑电路与隐式的负载均衡标识之间的映射关系,例如表2所示:
表2
与分配显式的负载均衡标识类似,网络设备根据报文的流量特征信息对报文进行分类。然后根据分类结果,向报文分配隐式的负载均衡标识,并将报文转发到该负载均衡标识对应的逻辑电路(即目标逻辑电路)进行处理,得到报文的出端口。具体的,将报文的流量特征信息与负载均衡配置信息的匹配信息进行匹配处理,确定与流量特征信息匹配的负载均衡配置信息。然后,网络设备为该报文分配隐式的负载均衡标识,并将报文转发至与该负载均衡标识关联的目标逻辑电路。
703、网络设备根据报文的负载均衡标识,使用报文对应的负载均衡算法确定报文的出端口。
本实施例中,当网络设备为报文分配负载均衡标识后,网络设备根据该负载均衡标识确定报文对应的负载均衡算法。然后,网络设备使用报文对应的负载均衡算法确定报文的出端口。下面按照显式的负载均衡标识和隐式的负载均衡标识,分别介绍确定报文出端口的具体方式。
A、负载均衡标识为显式标识。
具体的,网络设备根据该负载均衡标识,找到对应的负载均衡配置信息。然后,网络设备从负载均衡配置信息中确定处理该报文的负载均衡算法。网络设备根据该负载均衡算法,确定所述报文对应的所述哈希键值成员选择控制字和所述报文对应的所述哈希函数选择控制字。然后,所述网络设备根据所述报文对应的所述哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员。所述网络设备根据所述报文对应的所述哈希函数选择控制字,确定所述报文使用的所述目标哈希函数。网络设备使用该目标哈希函数和目标哈希键值组成成员,计算得到该报文的目标哈希值。最后,网络设备根据目标哈希值,确定该报文的出端口。
一种可能的实现方式中,网络设备根据负载均衡标识,从负载均衡配置信息中确定报文对应的哈希 函数选择控制字和报文对应的哈希键值成员选择控制字。
又一种可能的实现方式中,负载均衡标识直接指示哈希函数选择控制字和哈希键值成员选择控制字。网络设备根据分配给报文的负载均衡标识,确定该报文对应的哈希函数选择控制字和该报文对应的哈希键值成员选择控制字。
B、负载均衡标识为隐式标识。
具体的,网络设备向报文分配隐式的负载均衡标识后,将报文转发到该负载均衡标识对应的逻辑电路(即目标逻辑电路)进行处理。所述网络设备从所述目标逻辑电路关联的寄存器,获取所述报文对应的哈希函数选择控制字和所述报文对应的哈希键值成员选择控制字。然后,所述网络设备根据所述报文对应的哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员;所述网络设备根据所述报文对应的哈希函数选择控制字,确定所述报文使用的所述目标哈希函数。网络设备使用该目标哈希函数和目标哈希键值组成成员,计算得到该报文的目标哈希值。最后,网络设备根据目标哈希值,确定该报文的出端口。
示例性的,请参阅图11,图11为本申请实施例中负载均衡处理的一种流程示意图。网络设备包括n个逻辑电路,n为大于1的正整数。每个逻辑电路按照功能划分可以分为三部分:寄存器,用于存储该逻辑电路所对应的负载均衡配置信息;哈希键值构建逻辑电路用于构建哈希键值;哈希值计算逻辑电路用于计算哈希值。报文进入目标逻辑电路(例如逻辑电路#2)后,从逻辑电路#2关联的寄存器#2中获取哈希键值成员选择控制字和哈希函数选择控制字。通过哈希键值构建逻辑电路#2从报文中选择目标字段,然后根据所述目标字段构建所述报文的所述目标哈希键值组成成员。通过哈希值计算逻辑电路#2和目标哈希键值组成成员,计算得到该报文对应的哈希值#2。网络设备根据该哈希值#2确定该报文对应的出端口。
本申请实施例提出一种报文处理方法,报文到达网络设备后,根据报文的流量特征信息分配报文的负载均衡标识,该负载均衡标识用于指示报文对应的负载均衡算法。网络设备根据报文的负载均衡标识,使用报文对应的负载均衡算法确定该报文的出端口,该报文的出端口用于转发该报文。网络设备支持对不同的报文分配不同的负载均衡标识。然后,网络设备根据负载均衡标识,使用对应的负载均衡算法确定报文的出端口,实现对报文的负载均衡处理。在网络中同时存在多种业务的场景下,网络设备可以对不同业务的报文执行对应的负载均衡处理,提升整个网络的吞吐量。解决当前网络设备只支持L2或L3全局唯一网络负载均衡配置的问题,实现不同流量特征的报文在同一个网络设备上交汇,实现整网吞吐最大化。通过本方案,可以把混合流量切割为多个精细的子流量拓扑,并为每个子流量拓扑配置独立的负载均衡配置信息。
接下来,结合前述实施例介绍本申请实施例提出的一种应用场景。请参阅图10,图10为本申请实施例中一种应用场景的流程示意图。本申请实施例提出的一种应用场景包括:
1001、报文到达网络设备。
示例性的,到达网络设备的报文包括:第一报文和第二报文。
1002、网络设备提取报文的字段信息。
1003、检测该报文是否由多端口转发。若是,则进入步骤1004;若否,则进入步骤1010。
1004、检测接口是否使能根据报文的流量特征信息选择负载均衡配置信息。若是,则进入步骤1005;若否,则进入步骤1008。
1005、提取报文的流量特征信息。
示例性的,网络设备从第一报文的字段信息等相关信息中,提取第一报文的流量特征信息。网络设备从第二报文的字段信息等相关信息中,提取第二报文的流量特征信息。
1006、检测报文的流量特征信息与负载均衡配置信息包括的匹配信息是否匹配。若是则进入步骤1007;若否,则进入步骤1008。示例性的,网络设备将第一报文的流量特征信息与负载均衡配置信息#1包括的匹配信息#1进行匹配,匹配成功进入步骤1007。网络设备将第二报文的流量特征信息与负载均衡配置信息#2包括的匹配信息#2进行匹配,匹配成功进入步骤1007。
1007、根据与流量特征信息相匹配的负载均衡配置信息,为报文分配负载均衡标识。步骤1007后,进入步骤1009。
示例性的,网络设备为第一报文分配第一负载均衡标识,第一负载均衡标识对应于第一负载均衡算法。负载均衡配置信息#1指示第一负载均衡算法,负载均衡配置信息#1包括第一负载均衡标识。网络设备为第二报文分配第二负载均衡标识,第二负载均衡标识对应于第二负载均衡算法。负载均衡配置信息#2指示第二负载均衡算法,负载均衡配置信息#2包括第二负载均衡标识。第一负载均衡标识与第二负载均衡标识不同,第一负载均衡算法与第二负载均衡算法不同。
1008、采用全局默认的负载均衡配置信息。步骤1008后,进入步骤1009。
1009、根据负载均衡配置信息,使用对应的负载均衡算法确定报文的出端口。具体的,基于负载均衡配置,构建Hash key,然后计算Hash值。以计算出的Hash值进行负载均衡,确定报文的出端口。
示例性的,网络设备根据负载均衡配置信息#1指示的第一负载均衡算法,对第一报文进行负载均衡处理,确定第一报文的出端口。网络设备根据负载均衡配置信息#2指示的第二负载均衡算法,对第二报文进行负载均衡处理,确定第二报文的出端口。
1010、从报文的出端口转发报文,实现对流量的负载均衡处理。
上述主要以方法的角度对本申请实施例提供的方案进行了介绍。可以理解的是,网络设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对网络设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
以下介绍本申请实施例的通信装置,以下介绍的通信装置具有上述方法实施例中的网络设备的任意功能。本申请所述的通信装置,可以是交换机、路由器等网络设备,也可以是网络设备上的一部分组件,例如是网络设备上的接口板,线卡或者芯片,还可以是网络设备上的一个功能模块,还可以是用于实现本申请方法的芯片系统,本申请实施例不做具体限定。通信装置之间例如可以但不限于通过以太网线或光纤直接连接。当通信装置是芯片系统时,通信装置中的收发模块例如可以是芯片系统中的接口电路,处理模块例如可以是芯片系统中用于执行处理操作的处理电路。图12为本申请实施例提供的一种通信装置1200的结构示意图,如图12所示,通信装置1200包括:收发模块1201,用于执行步骤701;处理模块1202,用于执行步骤702、或703。
通信装置1200可以对应于上述方法实施例中的网络设备,通信装置1200中的各单元和上述其他操作和/或功能分别为了实现方法实施例中的网络设备所实施的各种步骤和方法,具体细节可参见上述方法实施例,为了简洁,在此不再赘述。
通信装置1200执行上述方法实施例时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将通信装置1200的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的通信装置1200与上述图7对应的实施例方法属于同一构思,其具体实现过程详见上述方法实施例,这里不再赘述。
图13所示的通信装置1300尽管示出了某些特定特征,但是本领域的技术人员将从本申请实施例中意识到,为了简洁起见,图13未示出各种其他特征,以免混淆本申请实施例所公开的实施方式的更多相关方面。为此,作为示例,在一些实现方式中,通信装置1300包括一个或多个处理器(如,CPU)1301、网络接口1302、编程接口1303、存储器1304和一个或多个通信总线1305,用于将各种组件互连。在另一些实现方式中,通信装置1300也可以在上述示例基础上省略或增加部分功能部件或单元。
在一些实现方式中,网络接口1302用于在网络系统中和一个或多个其他的通信装置/服务器连接。在一些实现方式中,通信总线1305包括互连和控制系统组件之间的通信的电路。存储器1304可以包括非易失性存储器,例如,只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM, PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。存储器1304也可以包括易失性存储器,易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。
在一些实现中,存储器1304或存储器1304的非暂时性计算机可读存储介质存储以下程序、模块和数据结构,或其子集,例如包括收发单元(图中未示出)、获取单元13041和处理单元13042。
在一个可能的实施例中,该通信装置1300可以具有上述图7对应的方法实施例中的网络设备中的任意功能。
应理解,通信装置1300对应于上述方法实施例中的网络设备或控制管理装置,通信装置1300中的各模块和上述其他操作和/或功能分别为了实现上述方法实施例中的网络设备或控制管理装置所实施的各种步骤和方法,具体细节可参见上述图7对应的方法实施例,为了简洁,在此不再赘述。
应理解,本申请可以是由通信装置1300上的网络接口1302来完成数据的收发操作,也可以是由处理器调用存储器中的程序代码,并在需要时配合网络接口1302来实现收发单元的功能。
在各种实现中,通信装置1300用于执行本申请实施例提供的业务保护方法,例如是执行上述图7所示的实施例所对应的业务保护方法。
本申请图13所述的通信装置具体结构可以为图14所示。
图14为本申请实施例提供的一种通信装置1400的结构示意图,通信装置1400包括:主控板1414和接口板1430。
主控板1414也称为主处理单元(main processing unit,MPU)或路由处理器(route processor),主控板1414用于对通信装置1400中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板1414包括:中央处理器1415和存储器1416。
接口板1430也称为线路处理单元(line processing unit,LPU)、线卡(line card)或业务板。接口板1430用于提供各种业务接口并实现数据包的转发。业务接口包括但不限于以太网接口、POS(Packet over SONET/SDH)接口等。接口板1430包括:中央处理器1431、网络处理器1432、转发表项存储器1434和物理接口卡(physical interface card,PIC)1433。
接口板1430上的中央处理器1431用于对接口板1430进行控制管理并与主控板1414上的中央处理器1415通信。
网络处理器1432用于实现报文的转发处理。网络处理器1432的形态可以是芯片。
物理接口卡1433用于实现物理层的对接功能,原始的流量由此进入接口板1430,以及处理后的报文从该物理接口卡1433发出。物理接口卡1433包括至少一个物理接口,物理接口也称物理口,物理接口可以为灵活以太(Flexible Ethernet,FlexE)物理接口。物理接口卡1433也称为子卡,可安装在接口板1430上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器1432处理。在一些实施例中,接口板1430的中央处理器1431也可执行网络处理器1432的功能,比如基于通用CPU实现软件转发,从而接口板1430中不需要网络处理器1432。
可选的,通信装置1400包括多个接口板,例如通信装置1400还包括接口板1440,接口板1440包括:中央处理器1441、网络处理器1442、转发表项存储器1444和物理接口卡1443。
可选的,通信装置1400还包括交换网板1420。交换网板1420也可以称为交换网板单元(switch fabric unit,SFU)。在通信装置有多个接口板1430的情况下,交换网板1420用于完成各接口板之间的数据交换。例如,接口板1430和接口板1440之间可以通过交换网板1420通信。
主控板1414和接口板耦合。例如,主控板1414、接口板1430和接口板1440,以及交换网板1420之间通过系统总线和/或系统背板相连实现互通。在一种可能的实现方式中,主控板1414和接口板1430之间建立进程间通信协议(inter-process communication,IPC)通道,主控板1414和接口板1430之间通过IPC通道进行通信。
在逻辑上,通信装置1400包括控制面和转发面,控制面包括主控板1414和中央处理器1431,转发面包括执行转发的各个组件,比如转发表项存储器1434、物理接口卡1433和网络处理器1432。控制面执行发布路由、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器1432基于控制面下发的转发表对物理接口卡1433收到的报 文查表转发。控制面下发的转发表可以保存在转发表项存储器1434中。在有些实施例中,控制面和转发面可以完全分离,不在同一设备上。
应理解,通信装置1300中的收发单元可以相当于通信装置1400中的物理接口卡1433或物理接口卡1443;通信装置1300中的获取单元13041和处理单元13042可以相当于通信装置1400中的中央处理器1415或中央处理器1431,也可以相当于存储器1416中存储的程序代码或指令。
应理解,本申请实施例中接口板1440上的操作与接口板1430的操作一致,为了简洁,不再赘述。应理解,本实施例的通信装置1400可对应于上述各个方法实施例中的网络设备,该通信装置1400中的主控板1414、接口板1430和/或接口板1440可以实现上述各个方法实施例中的网络设备所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,通信装置的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,通信装置可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,通信装置可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。可选的,通信装置的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能。具体采用哪种架构,取决于具体的组网部署场景,此处不做唯一限定。
在一些可能的实施例中,上述网络设备可以实现为虚拟化设备。虚拟化设备可以是运行有用于发送报文功能的程序的虚拟机(virtual machine,VM),虚拟路由器或虚拟交换机。虚拟化设备部署在硬件设备上(例如,物理服务器)。例如,可以基于通用的物理服务器结合网络功能虚拟化(network functions virtualization,NFV)技术来实现网络设备。
应理解,上述各种产品形态的通信装置,分别具有上述方法实施例中网络设备的任意功能,此处不再赘述。
本申请实施例还提供的一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机控制网络装置执行如前述方法实施例所示任一项实现方式。
本申请实施例还提供的一种计算机程序产品,计算机程序产品包括计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行如前述方法实施例所示任一项实现方式。
进一步地,本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在通信装置上运行时,使得通信装置执行上述图7对应的方法实施例中网络设备执行的方法。
本申请实施例还提供了一种芯片系统,包括处理器和接口电路,接口电路,用于接收指令并传输至处理器。其中,所述处理器用于实现上述任一方法实施例中的方法。
可选的,该芯片系统还包括存储器,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现上述任一方法实施例中的方法。
可选的,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
上述各种产品形态的通信装置,分别具有上述方法实施例中网络设备的任意功能,此处不再赘述。
以上对本申请实施例进行了详细介绍,本申请实施例方法中的步骤可以根据实际需要进行顺序调度、合并或删减;本申请实施例装置中的模块可以根据实际需要进行划分、合并或删减。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合 在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
应理解,在本申请实施例中,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。

Claims (32)

  1. 一种报文处理方法,其特征在于,包括:
    报文到达网络设备;
    所述网络设备根据所述报文的流量特征信息,分配所述报文的负载均衡标识,其中,所述负载均衡标识用于指示所述报文对应的负载均衡算法;
    所述网络设备根据所述报文的所述负载均衡标识,使用所述报文对应的所述负载均衡算法确定所述报文的出端口,其中,所述报文的出端口用于转发所述报文。
  2. 根据权利要求1所述的方法,其特征在于,所述网络设备将所述负载均衡标识填充至所述报文,包括:
    所述网络设备将所述负载均衡标识填充至所述报文的报文描述符,所述报文描述符用于记录所述报文的报文头信息。
  3. 根据权利要求1-2中任一项所述的方法,其特征在于,所述网络设备根据所述报文的所述负载均衡标识,使用所述报文对应的所述负载均衡算法确定所述报文的出端口,包括:
    所述网络设备根据所述负载均衡标识,确定所述报文对应的所述负载均衡算法;
    所述网络设备根据所述报文对应的所述负载均衡算法,确定所述报文使用的目标哈希函数和所述报文的目标哈希键值组成成员;
    所述网络设备根据所述目标哈希函数和所述目标哈希键值组成成员,计算得到目标哈希值;
    所述网络设备根据所述目标哈希值,确定所述报文的出端口。
  4. 根据权利要求3所述的方法,其特征在于,所述网络设备根据所述负载均衡标识,确定所述报文使用的所述目标哈希函数和所述报文的所述目标哈希键值组成成员,包括:
    所述网络设备根据所述负载均衡标识,确定所述报文对应的哈希函数选择控制字和所述报文对应的哈希键值成员选择控制字;
    所述网络设备根据所述报文对应的所述哈希函数选择控制字,确定所述报文使用的所述目标哈希函数;
    所述网络设备根据所述报文对应的所述哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员。
  5. 根据权利要求1所述的方法,其特征在于,所述网络设备根据所述报文的所述负载均衡标识,使用所述报文对应的所述负载均衡算法确定所述报文的出端口,包括:
    所述网络设备根据所述报文的所述负载均衡标识,确定目标逻辑电路,其中,所述目标逻辑电路与所述报文的所述负载均衡标识关联,所述目标逻辑电路运行所述报文对应的所述负载均衡算法;
    所述网络设备使用所述目标逻辑电路处理所述报文,确定所述报文的出端口。
  6. 根据权利要求5所述的方法,其特征在于,所述网络设备根据所述报文的所述负载均衡标识,确定所述目标逻辑电路,包括:
    所述网络设备从所述网络设备包括的多个逻辑电路中确定所述目标逻辑电路,其中,所述多个逻辑电路与多个负载均衡标识对应,所述多个负载均衡标识包括所述报文的所述负载均衡标识,所述逻辑电路运行与所述负载均衡标识对应的所述负载均衡算法。
  7. 根据权利要求5或6所述的方法,其特征在于,所述网络设备使用所述目标逻辑电路处理所述报文,确定所述报文的出端口,包括:
    所述网络设备使用所述目标逻辑电路处理所述报文,确定所述报文使用的目标哈希函数和所述报文 的目标哈希键值组成成员;
    所述网络设备根据所述目标哈希函数和所述目标哈希键值组成成员,计算得到目标哈希值;
    所述网络设备根据所述目标哈希值,确定所述报文的出端口。
  8. 根据权利要求7所述的方法,其特征在于,所述网络设备使用所述目标逻辑电路处理所述报文,确定所述报文使用的所述目标哈希函数和所述报文的所述目标哈希键值组成成员,包括:
    所述网络设备从所述目标逻辑电路关联的寄存器,获取所述报文对应的哈希函数选择控制字和所述报文对应的哈希键值成员选择控制字;
    所述网络设备根据所述报文对应的哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员;
    所述网络设备根据所述报文对应的哈希函数选择控制字,确定所述报文使用的所述目标哈希函数。
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,所述方法还包括:
    所述网络设备接收第一指令;
    所述网络设备根据所述第一指令配置负载均衡配置信息,所述负载均衡配置信息指示所述流量特征信息与所述负载均衡算法的关联关系。
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,所述负载均衡标识,包括以下任意一项或多项:
    负载均衡配置信息的标识信息、逻辑电路标识、哈希键值成员选择控制字,或者,哈希函数选择控制字;
    其中,所述负载均衡配置信息指示所述流量特征信息与所述负载均衡算法的关联关系。
  11. 根据权利要求9或10所述的方法,其特征在于,所述负载均衡配置信息,包括以下任一项或多项信息:
    所述负载均衡配置信息的标识信息,
    所述负载均衡配置信息对应的所述负载均衡算法,
    匹配信息,所述匹配信息属于所述流量特征信息,
    哈希键值组成成员的选择配置信息,
    哈希函数的选择配置信息。
  12. 根据权利要求1-11中任一项所述的方法,其特征在于,所述报文的所述流量特征信息包括以下一项或多项:
    所述报文的差分服务代码点DSCP信息、所述报文的优先级信息、所述报文的入端口信息、所述报文的虚拟局域网VLAN信息、所述报文的入端口组信息、所述报文的出端口信息、所述报文的出端口组信息,或者所述报文的虚拟路由转发表VRF信息。
  13. 根据权利要求1-12中任一项所述的方法,其特征在于,所述负载均衡算法的应用场景以下任意一项:
    等价多路径路由ECMP,加权多路径路由WCMP,或者,链路聚合LAG。
  14. 根据权利要求1-13中任一项所述的方法,其特征在于,
    所述报文包括第一报文和第二报文,所述第一报文的所述流量特征信息与所述第二报文的所述流量特征信息不同;
    所述网络设备根据所述报文的所述流量特征信息,分配所述报文的所述负载均衡标识,包括:
    所述网络设备根据所述第一报文的所述流量特征信息,分配所述第一报文的第一负载均衡标识,所 述第一负载均衡标识对应于第一负载均衡算法;
    所述网络设备根据所述第二报文的所述流量特征信息,分配所述第二报文的第二负载均衡标识,所述第二负载均衡标识对应于第二负载均衡算法;
    所述第一负载均衡标识与所述第二负载均衡标识不同,所述第一负载均衡算法与所述第二负载均衡算法不同。
  15. 一种通信装置,其特征在于,用于网络设备,包括:
    报文到达收发模块;
    处理模块,用于根据所述报文的流量特征信息,分配所述报文的负载均衡标识,其中,所述负载均衡标识用于指示所述报文对应的负载均衡算法;
    所述处理模块,还用于根据所述报文的所述负载均衡标识,使用所述报文对应的所述负载均衡算法确定所述报文的出端口,其中,所述报文的出端口用于转发所述报文。
  16. 根据权利要求15所述的通信装置,其特征在于,
    所述处理模块,还用于将所述负载均衡标识填充至所述报文的报文描述符,所述报文描述符用于记录所述报文的报文头信息。
  17. 根据权利要求15-16中任一项所述的通信装置,其特征在于,
    所述处理模块,还用于根据所述负载均衡标识,确定所述报文对应的所述负载均衡算法;
    所述处理模块,还用于根据所述报文对应的所述负载均衡算法,确定所述报文使用的目标哈希函数和所述报文的目标哈希键值组成成员;
    所述处理模块,还用于根据所述目标哈希函数和所述目标哈希键值组成成员,计算得到目标哈希值;
    所述处理模块,还用于根据所述目标哈希值,确定所述报文的出端口。
  18. 根据权利要求17所述的通信装置,其特征在于,
    所述处理模块,还用于根据所述负载均衡标识,确定所述报文对应的哈希函数选择控制字和所述报文对应的哈希键值成员选择控制字;
    所述处理模块,还用于根据所述报文对应的所述哈希函数选择控制字,确定所述报文使用的所述目标哈希函数;
    所述处理模块,还用于根据所述报文对应的所述哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员。
  19. 根据权利要求15所述的通信装置,其特征在于,
    所述处理模块,还用于根据所述报文的所述负载均衡标识,确定目标逻辑电路,其中,所述目标逻辑电路与所述报文的所述负载均衡标识关联,所述目标逻辑电路运行所述报文对应的所述负载均衡算法;
    所述处理模块,还用于使用所述目标逻辑电路处理所述报文,确定所述报文的出端口。
  20. 根据权利要求19所述的通信装置,其特征在于,
    所述处理模块,还用于从所述网络设备包括的多个逻辑电路中确定所述目标逻辑电路,其中,所述多个逻辑电路与多个负载均衡标识对应,所述多个负载均衡标识包括所述报文的所述负载均衡标识,所述逻辑电路运行与所述负载均衡标识对应的所述负载均衡算法。
  21. 根据权利要求19或20所述的通信装置,其特征在于,
    所述处理模块,还用于使用所述目标逻辑电路处理所述报文,确定所述报文使用的目标哈希函数和所述报文的目标哈希键值组成成员;
    所述处理模块,还用于根据所述目标哈希函数和所述目标哈希键值组成成员,计算得到目标哈希值;
    所述处理模块,还用于根据所述目标哈希值,确定所述报文的出端口。
  22. 根据权利要求21所述的通信装置,其特征在于,
    所述收发模块,还用于从所述目标逻辑电路关联的寄存器,获取所述报文对应的哈希函数选择控制字和所述报文对应的哈希键值成员选择控制字;
    所述处理模块,还用于根据所述报文对应的哈希键值成员选择控制字,从所述报文中选择目标字段,所述目标字段用于构建所述报文的所述目标哈希键值组成成员;
    所述处理模块,还用于根据所述报文对应的哈希函数选择控制字,确定所述报文使用的所述目标哈希函数。
  23. 根据权利要求15-22中任一项所述的通信装置,其特征在于,
    所述收发模块,还用于接收第一指令;
    所述处理模块,还用于根据所述第一指令配置负载均衡配置信息,所述负载均衡配置信息指示所述流量特征信息与所述负载均衡算法的关联关系。
  24. 根据权利要求15-23中任一项所述的通信装置,其特征在于,所述负载均衡标识,包括以下任意一项或多项:
    负载均衡配置信息的标识信息、逻辑电路标识、哈希键值成员选择控制字,或者,哈希函数选择控制字;
    其中,所述负载均衡配置信息指示所述流量特征信息与所述负载均衡算法的关联关系。
  25. 根据权利要求23或24所述的通信装置,其特征在于,所述负载均衡配置信息,包括以下任一项或多项信息:
    所述负载均衡配置信息的标识信息,
    所述负载均衡配置信息对应的所述负载均衡算法,
    匹配信息,所述匹配信息属于所述流量特征信息,
    哈希键值组成成员的选择配置信息,
    哈希函数的选择配置信息。
  26. 根据权利要求15-25中任一项所述的通信装置,其特征在于,所述报文的所述流量特征信息包括以下一项或多项:
    所述报文的差分服务代码点DSCP信息、所述报文的优先级信息、所述报文的入端口信息、所述报文的虚拟局域网VLAN信息、所述报文的入端口组信息、所述报文的出端口信息、所述报文的出端口组信息,或者所述报文的虚拟路由转发表VRF信息。
  27. 根据权利要求15-26中任一项所述的通信装置,其特征在于,所述负载均衡算法的应用场景以下任意一项:
    等价多路径路由ECMP,加权多路径路由WCMP,或者,链路聚合LAG。
  28. 根据权利要求15-27中任一项所述的通信装置,其特征在于,
    所述报文包括第一报文和第二报文,所述第一报文的所述流量特征信息与所述第二报文的所述流量特征信息不同;
    所述处理模块,具体用于根据所述第一报文的所述流量特征信息,分配所述第一报文的第一负载均衡标识,所述第一负载均衡标识对应于第一负载均衡算法;
    所述处理模块,具体用于根据所述第二报文的所述流量特征信息,分配所述第二报文的第二负载均衡标识,所述第二负载均衡标识对应于第二负载均衡算法;
    所述第一负载均衡标识与所述第二负载均衡标识不同,所述第一负载均衡算法与所述第二负载均衡算法不同。
  29. 一种通信装置,其特征在于,包括:
    通信接口;
    与所述通信接口连接的处理器,基于所述通信接口和所述处理器,使得所述控制器执行如权利要求1-14任一项所述的方法。
  30. 一种通信系统,其特征在于,所述通信系统包括通信装置,所述通信装置用于执行权利要求1-14任一项所述的方法。
  31. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令被处理器执行时,实现权利要求1-14任一项所述的方法。
  32. 一种计算机程序产品,包括程序,其特征在于,当所述程序被处理器执行时,实现权利要求1-14任一项所述的方法。
PCT/CN2023/126724 2022-10-31 2023-10-26 一种报文处理方法以及相关装置 WO2024093778A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211366416.6 2022-10-31
CN202211366416.6A CN117955913A (zh) 2022-10-31 2022-10-31 一种报文处理方法以及相关装置

Publications (1)

Publication Number Publication Date
WO2024093778A1 true WO2024093778A1 (zh) 2024-05-10

Family

ID=90798750

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/126724 WO2024093778A1 (zh) 2022-10-31 2023-10-26 一种报文处理方法以及相关装置

Country Status (2)

Country Link
CN (1) CN117955913A (zh)
WO (1) WO2024093778A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067664A (zh) * 2018-08-29 2018-12-21 迈普通信技术股份有限公司 一种负载均衡方法及装置
CN110798400A (zh) * 2019-10-23 2020-02-14 新华三信息安全技术有限公司 报文转发方法及装置
US10887234B1 (en) * 2016-02-23 2021-01-05 Amazon Technologies, Inc. Programmatic selection of load balancing output amongst forwarding paths

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10887234B1 (en) * 2016-02-23 2021-01-05 Amazon Technologies, Inc. Programmatic selection of load balancing output amongst forwarding paths
CN109067664A (zh) * 2018-08-29 2018-12-21 迈普通信技术股份有限公司 一种负载均衡方法及装置
CN110798400A (zh) * 2019-10-23 2020-02-14 新华三信息安全技术有限公司 报文转发方法及装置

Also Published As

Publication number Publication date
CN117955913A (zh) 2024-04-30

Similar Documents

Publication Publication Date Title
US10333836B2 (en) Convergence for EVPN multi-homed networks
KR102205882B1 (ko) 팻-트리 라우팅에 기반하여 별개의 인피니밴드 서브넷들 사이에서 트래픽을 라우팅하기 위한 시스템 및 방법
US7558268B2 (en) Apparatus and method for combining forwarding tables in a distributed architecture router
US9300483B2 (en) Self-routing multicast in a software defined network fabric
CN112311675B (zh) 用于分段路由(sr)路径的保证型带宽
JP2002508123A (ja) マルチレイヤ・ネットワーク要素用のシステムおよび方法
CN103746931A (zh) 在服务应用后用网络设备维持负载均衡
CN112448900A (zh) 一种数据传输方法及装置
CN111147372B (zh) 下行报文发送、转发方法和装置
US20220200820A1 (en) Packet Sending Method and Apparatus
CN112822097A (zh) 报文转发的方法、第一网络设备以及第一设备组
US20240179095A1 (en) Method and apparatus for determining hash algorithm information for load balancing, and storage medium
WO2019108102A1 (en) Packet value based packet processing
CN113923158A (zh) 一种报文转发、路由发送和接收方法及装置
EP4325800A1 (en) Packet forwarding method and apparatus
WO2024093778A1 (zh) 一种报文处理方法以及相关装置
CN113285878B (zh) 负载分担的方法、第一网络设备
WO2022166465A1 (zh) 一种报文处理方法及相关装置
CN116094987A (zh) 转发路径的确定方法及装置
US8094665B1 (en) Packet forwarding using intermediate policy information
WO2024067084A1 (zh) 一种路径故障检测的方法以及相关装置
WO2023236880A1 (zh) 一种报文控制方法以及相关装置
WO2023130957A1 (zh) 一种路由选路的方法及相关设备
WO2024093306A1 (zh) 通信方法及装置
WO2023005335A1 (zh) 一种报文传输方法及相关装置