WO2023082706A1 - 一种处理报文的系统、方法和网络装置 - Google Patents

一种处理报文的系统、方法和网络装置 Download PDF

Info

Publication number
WO2023082706A1
WO2023082706A1 PCT/CN2022/107851 CN2022107851W WO2023082706A1 WO 2023082706 A1 WO2023082706 A1 WO 2023082706A1 CN 2022107851 W CN2022107851 W CN 2022107851W WO 2023082706 A1 WO2023082706 A1 WO 2023082706A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
port
node
intermediate node
mapping relationship
Prior art date
Application number
PCT/CN2022/107851
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 WO2023082706A1 publication Critical patent/WO2023082706A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/24Connectivity information management, e.g. connectivity discovery or connectivity update

Definitions

  • the embodiments of the present application relate to the Internet field, and in particular to a system, method and network device for processing messages.
  • IB Infiniband
  • SMP management packets
  • SMA subnet management agent
  • direct port routing is used between the SM and the SMA to send and receive messages to obtain (Get) messages and feedback (GetResp) messages To discover the topology of the subnet, and collect the information of each node to the SM.
  • the SM then generates a routing table based on the collected node information.
  • the SM sends the routing table to each node through the direct port routing message again, thus completing the routing table configuration in the network initialization phase, and each node can forward the message according to the routing table based on the LID routing method.
  • Message forwarding is carried out through the method of direct port routing.
  • the method of direct port routing needs to send the message to the CPU of the node device, and then the CPU analyzes the message to obtain the forwarding port information. Since nodes close to the SM need to process more packets, as the network scale expands, the efficiency of this method of decoding packets by node CPUs to obtain packet forwarding paths for topology discovery becomes more and more obvious. How to improve the efficiency of network topology discovery Packet forwarding efficiency has become a problem to be solved urgently.
  • the embodiment of the present application provides a system and method for processing messages.
  • the intermediate node In the stage of network topology discovery, the intermediate node generates the first port identifier and the source node ID after receiving the message sent from the source node to the destination node from the first port.
  • the intermediate node decodes the message to obtain the forwarding path of the message and forwards the message according to the forwarding path.
  • the intermediate node receives the response message of the message, it can directly follow the mapping relationship from The first port forwards the response message to the source node. It saves the time of decoding the response message when the intermediate node forwards the response message, and improves the message forwarding efficiency in the process of topology discovery.
  • the first aspect of the embodiments of the present application provides a system for processing packets, including a source node, an intermediate node, and a destination node.
  • the source node and the intermediate node are connected in a communicable manner, and are used to generate a first message to be sent to the destination node, and send the first message to the intermediate node, and the first message carries the identity ID of the source node and the first Packet forwarding path.
  • the intermediate node is connected to the source node and the destination node in a communicable manner, and is used to receive the first message from the first port of the intermediate node.
  • the intermediate node decodes the first message to obtain the forwarding path of the first message.
  • the intermediate node The first mapping relationship is generated according to the first port identifier and the source node ID. After receiving the response message of the first message, the intermediate node can determine the sending port of the response message of the first message according to the first mapping relationship.
  • the destination node is communicably connected with the intermediate node for receiving the first message, generating a response message to the first message according to the received first message, and sending the response message to the intermediate node.
  • the intermediate node receives the first message from the first port and decodes the first message to obtain the forwarding path of the first message, and generates a first mapping relationship according to the first port and the source node ID, When receiving the response message of the first message, the intermediate node can determine the sending port of the response message according to the first mapping relationship, which saves the decoding time of the response message and improves the forwarding efficiency of the message.
  • the forwarding path of the first packet includes a second mapping relationship, and the second mapping relationship is used to instruct the intermediate node to forward the first packet through the second port.
  • the intermediate node is also used to send the identifiers of at least two ports of the intermediate node to the source node through the first port, the identifiers of the at least two ports include a first port identifier and a second port identifier, and the second ports are all ports of the intermediate node Any port except the first port, so that the source node generates a second mapping relationship according to the second port identifier and the first packet.
  • the intermediate node sends all port identifiers of the intermediate node to the source node before receiving the first message, so that the source node can generate the first message carrying the second mapping relationship according to all port identifiers of the intermediate node.
  • the embodiment of the present application provides that the intermediate node sends all port identifiers of the intermediate node to the source node before receiving the first message, so that the source node can generate the first message and the second port according to the second port except the first port.
  • the first message carries the second mapping relationship as the outgoing port for the intermediate node to forward the first message, which improves the feasibility of the solution.
  • the response message further includes identifiers of all ports of the destination node, and the identifiers of all ports of the destination node are used by the source node to generate a routing table.
  • the intermediate node is further configured to, according to the second mapping relationship, forward the first packet from the second port to the third port, and the third port is a port of the destination node.
  • the first message is a message for performing topology discovery on the destination node, and the intermediate node forwards the first message from the second port of the intermediate node to the third port of the destination node according to the second mapping relationship carried in the first message.
  • the embodiment of the present application provides that the intermediate node forwards the first message to the third port according to the second mapping relationship, so as to obtain the response message sent by the destination node, and the response message carries all port identifiers of the destination node, so that the source node can use All port identifiers of the destination node generate a routing table, which improves the feasibility of the solution.
  • the intermediate node is further configured to receive a second packet from the first port, where the second packet carries a routing table.
  • the source node can generate a routing table according to the port information of the destination node carried in the response message, and the intermediate node forwards the second message carrying the routing table to the destination node.
  • the embodiment of the present application provides a routing table generated by the forwarding source node according to the response message, which improves the feasibility of the solution.
  • the first packet further carries a preset routing table of the destination node of the first packet.
  • the first message may also be a message for delivering a preset routing table, which provides more application scenarios for the implementation of the solution and improves the feasibility of the solution.
  • the second aspect of the embodiment of the present application provides a method for processing messages, including: an intermediate node receives a first message from a first port, and the first message carries an ID of a source node and a forwarding path of the first message.
  • the intermediate node decodes the first packet, and obtains a forwarding path of the first packet.
  • the intermediate node generates the first mapping relationship according to the identifier of the first port and the source node ID of the first packet.
  • the intermediate node receives the response message of the first message, and determines the sending port of the response message of the first message according to the first mapping relationship.
  • the intermediate node receives the first message from the first port and decodes the first message to obtain the forwarding path of the first message, and generates a first mapping relationship according to the first port and the source node ID, When receiving the response message of the first message, the intermediate node can determine the sending port of the response message according to the first mapping relationship, which saves the decoding time of the response message and improves the forwarding efficiency of the message.
  • the first packet includes a second mapping relationship
  • the second mapping relationship is used to instruct the intermediate node to forward the first packet through the second port.
  • the method further includes: the intermediate node sends the identifiers of at least two ports of the intermediate node to the source node through the first port, and the identifiers of the at least two ports include the first port identifier and A second port identifier, where the second port is any port except the first port among all the ports of the intermediate node, so that the source node generates a second mapping relationship according to the second port identifier and the first packet.
  • the intermediate node sends all port identifiers of the intermediate node to the source node before receiving the first message, so that the source node can generate the first message carrying the second mapping relationship according to all port identifiers of the intermediate node.
  • the embodiment of the present application provides a method for obtaining node ports in topology discovery, which improves the feasibility of the solution.
  • the response message further includes identifiers of all ports of the destination node, and the identifiers of all ports of the destination node are used by the source node to generate a routing table.
  • the method further includes: the intermediate node forwards the first message from the second port to the third port according to the second mapping relationship, and the third port is the port of the destination node.
  • the first message is a message for performing topology discovery on the destination node, and the intermediate node forwards the first message from the second port of the intermediate node to the third port of the destination node according to the second mapping relationship carried in the first message.
  • the method further includes: the intermediate node receives a second packet from the first port, and the second packet carries a routing table. After the intermediate node forwards the response message of the first message, the source node can generate a routing table according to the port information of the destination node carried in the response message, and the intermediate node forwards the second message carrying the routing table to the destination node.
  • the embodiment of the present application provides a routing table generated by the forwarding source node according to the response message, which improves the feasibility of the solution.
  • the first packet further carries a preset routing table of the destination node of the first packet.
  • the first message may also be a message for delivering a preset routing table, which provides more application scenarios for the implementation of the solution and improves the feasibility of the solution.
  • the third aspect of the embodiment of the present application provides a network device, including: a receiving unit, configured to receive a first message from a first port, where the first message carries a source node ID and a forwarding path of the first message;
  • the decoding unit is used to decode the first message and obtain the forwarding path of the first message;
  • the generating unit is used to generate the first mapping relationship according to the identification of the first port and the source node ID of the first message;
  • receiving The unit is further configured to receive a response message of the first message, and determine a sending port of the response message of the first message according to the first mapping relationship.
  • the intermediate node has the function of executing the behavior of the intermediate node in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
  • This function can be implemented by hardware, or A corresponding software implementation may be performed by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the fourth aspect of the embodiment of the present application provides a network device, the network device includes: one or more processors, one or more processors are coupled to a memory, the memory stores a program, and when the program instructions stored in the memory are executed by one or The method for processing packets described in the foregoing second aspect or any possible implementation manner of the second aspect is implemented when the multiple processors are executed.
  • the fifth aspect of the present application provides a computer-readable storage medium, the computer-readable storage medium stores instructions, and when it is run on a computer, the computer can execute any one of the aforementioned second aspect or the second aspect.
  • FIG. 1 is a schematic structural diagram of a switch provided in an embodiment of the present application.
  • FIG. 2 is a schematic diagram of message processing provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a message processing method provided in an embodiment of the present application.
  • FIG. 4 is another schematic flowchart of a method for processing a message provided in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a system for processing messages provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a source node provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of an intermediate node provided in an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a destination node provided by an embodiment of the present application.
  • FIG. 9 is another schematic structural diagram of a source node provided by an embodiment of the present application.
  • FIG. 10 is another schematic structural diagram of an intermediate node provided in the embodiment of the present application.
  • FIG. 11 is another schematic structural diagram of a destination node provided by an embodiment of the present application.
  • Fig. 1 is a schematic structural diagram of a switch provided by the embodiment of the present application.
  • the switch includes a CPU and a network processing unit (NP, network processing unit), and the NP includes a matcher (match ) and the executor (action).
  • the execution of complex algorithms and software processing is performed on the CPU.
  • the network message is forwarded, since the routing table is stored in the switch, when the message is forwarded, only the matching and execution logic of the NP is needed to quickly perform the message forwarding action according to the information of the network protocol message header. , forwarded from the corresponding port. There are mainly two ways to forward the message.
  • the first is to send the message to the CPU for decoding, obtain the forwarding path of the message from the message, and then forward the message according to the forwarding path.
  • This application The forwarding mode of hop-by-hop forwarding (PHMP, per-hop management protocol) in the embodiment and the forwarding mode of direct port routing are all this forwarding mode; The header information of the packet, the NP learns which port to forward from the routing table, and directly forwards it.
  • the LID-based forwarding mode and the direct access management protocol (DAMP, direct access management protocol) in the embodiment of the present application both For this forwarding method.
  • FIG. 2 is a schematic diagram of message processing provided by the embodiment of the present application.
  • the message information of the direct port routing message defines an initial path (initial path) and a return path (return path).
  • each manufacturer has its own name for the network management protocol of direct port routing, but its essence is that in the process of message forwarding, each intermediate node sends the message to the intermediate node through the internal loop.
  • the CPU decodes the message to obtain a forwarding path, and forwards the message through the egress port indicated by the forwarding path.
  • the initial path (initial path) and the return path (return path) are defined in the direct port routing message.
  • the SM sends a direct port routing message to the SMA. After receiving the direct port routing message, the SMA sends a direct port routing message to the SM. Routed response packets. Take sending direct port routing message to node three as shown in Fig.
  • SM generates direct port routing message and sends this direct port routing message to node one by port 1, and node one receives this direct port routing message Afterwards, the direct port routing message is sent to the CPU of node one, and the SMA deployed on the CPU of node one processes the direct port routing message to obtain the initial path carried by the direct port routing message, and node one according to the The initial path forwards the direct port routing packet from port 4.
  • the initial path here is (4,6), and the initial path indicates that node one forwards the direct port routing message through port 4, and node two forwards the direct port routing message through port 6.
  • the direct port routing message also carries a return path, where the return path is (4,2), and the return path indicates that when the response message of the direct port routing message is forwarded, node 2 forwards the For the response message of the direct port routing message, Node 1 forwards the response message of the direct port routing message through port 2.
  • node 2 After receiving the direct port routing message, node 2 sends the direct port routing message to the CPU of node 2, and the SMA deployed on the CPU of node 2 processes the direct port routing message to obtain the direct port routing message.
  • the initial path carried in the packet node 2 forwards the direct port routing packet from port 6 according to the initial path.
  • node 3 After node 3 receives the direct port routing packet forwarded by node 1 and node 2 from port 8, it sends the direct port routing packet to the CPU of node 3, and the SMP deployed on the CPU of node 3 sends the direct port routing packet
  • the routing message is processed, and a response message of the direct port routing message is generated according to the direct port routing message.
  • the return path of the direct port routing message is used as the initial path of the response message of the message, because the response message of the message does not need to respond message, so its return path is empty.
  • the mapping relationship is to forward the response packet from the first port.
  • the NP When forwarding the response message in this solution, due to the provisional routing table entry, the NP can directly forward the response from the first port according to the mapping relationship between the ID of the destination node indicated by the temporary routing table entry and the first port message. There is no need to send the response message to the CPU of the intermediate node, which saves the time for the intermediate node to report the response message to the CPU and decode the response message by the CPU of the intermediate node, and improves the network topology stage. Packet forwarding efficiency.
  • the present application has various application scenarios, and the present invention will be described respectively from the process of topology discovery and the process of delivering the routing table below.
  • the topology discovery of the routing network is usually performed. During this process, the nodes of the routing network do not have routing tables.
  • the routing network there are only two methods for packet forwarding: direct port routing forwarding and LID-based forwarding. There are two types of forwarding forms, so the forwarding of the message at the intermediate node can only use the forwarding form of PHMP.
  • the intermediate node when the first message is sent to the target node of the first message, the intermediate node receives the message The first port of the first message is bound to the source node ID of the first message to generate the first mapping relationship.
  • the DAMP forwarding form can be adopted, and the NP directly forwards the message from the first port according to the destination node ID of the message in the message header.
  • FIG. 3 is a schematic flow chart of a message processing method provided in the embodiment of the present application.
  • the intermediate node sends the port identifier of the intermediate node to the source node;
  • the intermediate node was the destination node of this topology.
  • the intermediate node received the request message sent by the source node to obtain the port ID of the intermediate node, the intermediate node sent the port ID of the intermediate node to the source node, and the intermediate node There are two ports, where the first port is connected to the source node.
  • the intermediate node includes a first port and a second port, the port identifier of the first port is 1, and the port identifier of the second port is 2.
  • the source node generates a first packet
  • the source node After receiving the port identifier of the intermediate node sent by the intermediate node, the source node learns that the intermediate node has at least one port other than the first port according to the port identifier of the intermediate node. The source node generates the first message according to the obtained port identifier of the intermediate node. The first message is used to discover the topology process of the destination node on the premise that the intermediate node has been discovered. In the forwarding path carried by the first message, the intermediate node Forward the first packet through the second port.
  • the source node sends the first packet to the intermediate node
  • the source node After the source node generates the first packet, the source node sends the first packet to the first port of the intermediate node.
  • the intermediate node When the intermediate node receives the first message from the first port, the intermediate node will add one to the number of times (TTL, time to live) field of the first message, and the intermediate node will add one according to the number of the first message.
  • TTL time to live
  • the number of times to be forwarded field (step) and the TTL field determine whether the message has reached the destination node. If the numbers in the number of times to be forwarded field and the TTL field at this time are equal, then the message has arrived at the destination node and does not need to be forwarded further.
  • TTL time to live
  • the first packet can be encapsulated using the direct port routing packet encapsulation format, or can be encapsulated in a self-defined format.
  • the packet header of the first packet includes at least the first The forwarding path of the packet, the number of times to be forwarded, and the protocol type.
  • This application provides various format definitions of the headers of the first message. Please refer to Table 1, which is a format of the header of the control protocol provided by the embodiment of this application.
  • the format needs to include: the source node ID (source ID) used to determine the source of the message, the protocol type (protocol) or sub-protocol type (sub protocol) used to determine the message processing method, and the need to determine the forwarding progress
  • source ID source node ID
  • protocol type protocol
  • sub protocol sub-protocol type
  • the header of the first message may also include a destination node ID (destination ID) for determining the destination node of the message, but since the destination node ID does not affect the implementation of the embodiment of the present application, so Indicates that the destination node ID is not limited in this embodiment of the application.
  • the first message mentioned in the embodiment of the present application is described in the format and content shown in Table 1.
  • the source node of the first message is the source node, and the source node ID is 100.
  • the protocol type of the first message is PHMP.
  • the first message is a message for topology discovery, so the sub-protocol type is topology discovery protocol (get topo).
  • the first message is a topology discovery message for discovering the destination node connected to it through the second port located in the intermediate node, so it needs to be forwarded twice, and the initial value of the forwarded jump is 0, so the number of hops to be forwarded is 2.
  • the TTL item is 0, and the outbound port list of the forwarding path is 2.
  • Table 1 A format of the control protocol header provided by the embodiment of this application.
  • the aforementioned destination node ID can be empty in topology discovery, that is, the destination node ID does not have to be in the header exists in.
  • the NP judges whether to send the message to the node CPU by judging the protocol type field or the sub-protocol type field, so the protocol type and the sub-protocol type can have either item in the message header.
  • the number of hops to be forwarded minus the number of hops already forwarded can be used to determine whether forwarding is still required, but also by Only set the number of hops that need to be forwarded, and the number will be reduced by one every time it is forwarded, until the number is zero, no forwarding will be performed.
  • the determination of the forwarding path is not limited to the outgoing port list of the forwarding path, as long as it includes a part that can indicate the outgoing port of each forwarding path. In practical applications, as long as the functions in the foregoing table can be realized, there is no specific limitation here.
  • the intermediate node generates a first mapping relationship
  • the intermediate node After the intermediate node receives the first message sent by the source node from the first port, it can know from the header of the first message that the intermediate node can at least route through the first port and the source node, and the intermediate node receives the first message from the first port
  • the first message received and the sub-protocol type in the first message header are 100, and the first port, that is, the mapping relationship between the port identifier 1 and the destination node ID 100, that is, the first port and the ID of the source node is generated. mapping relationship between them.
  • the first mapping relationship is used to indicate that the packet whose destination node ID is 100 is forwarded through the first port.
  • the intermediate node may generate the second mapping relationship according to the destination node ID 200 and the second port identifier 2.
  • the intermediate node can forward the third message from the second port according to the second mapping relationship, wherein, the field identifying the destination node in the header of the third message is 200, and the third message's The protocol type field is DAMP.
  • the NP of the intermediate node can determine that the message does not need to be reported according to the protocol type field of the third message, and determine from the destination node ID field of the message header of the third message that the message should be forwarded from the second port according to the second mapping relationship. third message.
  • the intermediate node sends the first message to the destination node
  • the NP of the intermediate node decodes the header of the message, determines that the first message is a message that needs to be sent to the CPU through the protocol type field of the first message, and sends the first message to the CPU.
  • a message is sent to the CPU of the intermediate node for processing.
  • the CPU of the intermediate node decodes the first message, and learns from the hop count and TTL of the first message that the first message needs to be forwarded once, but it has not been forwarded yet.
  • the port list field learns that the first packet needs to be forwarded through the second port. After the CPU of the intermediate node adds one to the number of the TTL field of the first packet, the intermediate node of the first packet forwards the first packet from the second port to the destination node.
  • the destination node generates a response message
  • the NP of the destination node After the destination node receives the first message forwarded by the intermediate node from the third port, the NP of the destination node still determines that the first message is a message that needs to be sent to the CPU according to the protocol type field of the first message, and the NP of the destination node Send the first message to the CPU of the destination node for processing, the CPU of the destination node decodes the first message, and learns from the hop count and TTL of the first message that the first message needs to be forwarded once, Now that it has been forwarded once, the specific content of the first message is further processed, and it is known that the first message is a message for performing topology discovery on the destination node. The content of the message generates a response message, and the response message carries all port identifiers of the destination node.
  • the encapsulation of the response message can be encapsulated according to the standard format of the DAMP message, or can be encapsulated according to another format of the control protocol header provided in the embodiment of the present application according to Table 2.
  • Table 2 is used to describe in Table 2.
  • the specific packet header format is not limited.
  • the destination node ID of the response message is the sub-protocol type of the first message, which is 100, and the protocol type of the response message is DAMP.
  • the format needs to include: the destination node ID used to determine where the message goes and the The protocol type or sub-protocol type of the text processing method.
  • the header of the first message may also include the sub-protocol type used to determine the source node of the message, but since the sub-protocol type will not affect the implementation of the embodiment of the present application, the sub-protocol type It is not limited in the embodiment of this application.
  • the destination node sends a response message to the intermediate node
  • the destination node sends a response message from the third port to the intermediate node.
  • the NP determines that the response message adopts the DAMP forwarding method according to the protocol type field of the header of the response message. to retweet.
  • the intermediate node searches the content 100 of the destination node ID field, and finds that the intermediate node has a first mapping relationship between 100 and the first port, and the intermediate node determines that the response message is forwarded from the first port according to the first mapping relationship.
  • the intermediate node sends a response message to the source node
  • the intermediate node searches the content 100 of the destination node ID field, and can find that the intermediate node has a first mapping relationship between 100 and the first port. After the intermediate node determines that the response message is forwarded from the first port according to the first mapping relationship, the intermediate node forwards the response message from the first port according to the first mapping relationship;
  • the source node generates a routing table.
  • the source node After the source node performs multiple topology discoveries, after confirming that each port of the intermediate node and the destination node in the routing network has performed topology discovery, it generates the routing table of each node in the routing network according to the response messages obtained from multiple topology discoveries .
  • the source node sends the second packet to the intermediate node.
  • the source node After the source node generates the routing table, it sends a second message to the intermediate node.
  • the second message carries the routing table.
  • the routing table can be the routing table of any node in the network.
  • the intermediate node saves the routing table and sends a response message to the source node.
  • the intermediate node saves the first mapping relationship between the first port and the source node ID, and decodes the second message to obtain the forwarding port path of the second message .
  • the intermediate node forwards the routing table to the destination node according to the path.
  • the source node when the source node knows the information of the intermediate node and performs topology discovery on the destination node, when the intermediate node forwards the first message sent by the source node to the destination node, according to the source node of the first message
  • the ID and the port identifier of the first port on which the intermediate node receives the first packet generate a first mapping relationship between the source node ID and the port identifier of the first port.
  • the destination node generates a response message according to the first message, and the protocol type field of the response message is LID, that is, the response message adopts the LID-based forwarding method, so that during the forwarding process of the response message, the intermediate node can directly
  • LID the protocol type field of the response message
  • the destination node ID in the header and the first mapping relationship stored in the intermediate node forward the response message through the first port, which saves the time for reporting the response message to the CPU of the intermediate node for processing, and improves the efficiency of message forwarding.
  • the routing table is usually issued. During this process, the nodes of the routing network do not have the routing table of the routing network.
  • the only packet forwarding methods are direct port routing and LID-based forwarding. Two forwarding forms, so the forwarding of the message at the intermediate node can only adopt the direct port routing forwarding form.
  • the intermediate node when the first message is sent to the target node of the first message, the intermediate node receives the message The first port of the first message is bound to the destination node ID of the first message to generate the first mapping relationship.
  • the LID-based forwarding method can be adopted, and the NP forwards the message directly from the first port according to the destination node ID of the message.
  • FIG. 4 is another schematic flow chart of the message processing method provided by the embodiment of the present application.
  • the source node generates a first packet
  • the source node After the source node completes the topology discovery of the routing network, it generates the first message, which includes the routing table of the destination node, the message type of the first message, the source node ID of the first message, and the first message.
  • the forwarding path of the message, etc., the content of the header of the first message is similar to the foregoing Table 1, and details are not repeated here.
  • the routing table may be preset by the user, or may be automatically generated by the source node after topology discovery, and the details are not limited here.
  • the source node sends the first message to the intermediate node
  • the intermediate node generates a first mapping relationship
  • the intermediate node sends the first packet to the destination node
  • Steps 402 to 404 in this embodiment are similar to steps 303 to 305 in the foregoing embodiment shown in FIG. 3 , and will not be repeated here.
  • the destination node generates a response message
  • the NP determines that the first message is a message that needs to be sent to the CPU according to the protocol type field of the first message, and the NP sends the first message to To the CPU of the destination node for processing, the CPU of the destination node decodes the first message, and learns from the hop count field and TTL field of the first message that the first message needs to be forwarded twice, and it has been forwarded now 2 times, the message has reached the destination node of the message.
  • the destination node saves the routing table carried in the first message, and generates a response message, the response message is a response message of the first message, and the protocol type of the response message is a forwarding method based on LID.
  • the encapsulation of the response message can be encapsulated according to the standard format of the LID message, or the header format can be customized.
  • the custom header format here refers to the aforementioned Table 2, and details are not repeated here.
  • the destination node sends a response message to the intermediate node
  • the destination node sends a response message from the third port to the intermediate node.
  • the NP determines that the response message uses the LID-based protocol according to the protocol type field of the header of the response message. Forward method to forward.
  • the intermediate node searches the content 100 of the destination node ID field, and finds that the intermediate node has a first mapping relationship between 100 and the first port, and the intermediate node determines that the response message is forwarded from the first port according to the first mapping relationship.
  • the intermediate node sends a response message to the source node.
  • the intermediate node searches the content 100 of the destination node ID field, and can find that the intermediate node has a first mapping relationship between 100 and the first port. After the intermediate node determines that the response message is forwarded from the first port according to the first mapping relationship, the intermediate node forwards the response message from the first port according to the first mapping relationship.
  • the source node collects the information of each node in the routing network, it generates a routing table. Identify and generate the first mapping relationship.
  • the destination node generates a response message according to the first message, and the protocol type field of the response message is LID, that is, the response message adopts the LID-based forwarding method, so that during the forwarding process of the response message, the intermediate node can directly
  • LID the protocol type field of the response message
  • the destination node ID in the header and the first mapping relationship stored in the intermediate node forward the response message through the first port, which saves the time for reporting the response message to the CPU of the intermediate node for processing, and improves the efficiency of message forwarding.
  • FIG. 5 is a schematic structural diagram of a system for processing packets provided by an embodiment of the present application.
  • the system includes: a source node 501 , an intermediate node 502 and a destination node 503 .
  • the source node 501 and the intermediate node 502 are connected in a communicable manner, and are used to generate a first message to be sent to the destination node, and send the first message to the intermediate node 502, and the first message carries the identity of the source node 501 ID and the forwarding path of the first packet.
  • the intermediate node 502 is connected to the source node 501 and the destination node in a communicable manner, and is used to receive the first message from the first port of the intermediate node 502, and the intermediate node 502 decodes the first message to obtain the forwarding of the first message path, the intermediate node 502 generates a first mapping relationship according to the first port identifier and the source node ID, and the intermediate node 502 can determine the response message of the first message according to the first mapping relationship after receiving the response message of the first message sending port.
  • the destination node is communicably connected to the intermediate node 502 for receiving the first message, generating a response message to the first message according to the received first message, and sending the response message to the intermediate node 502 .
  • Figure 6 is a schematic structural diagram of a source node provided in the embodiment of this application, including:
  • a generating unit 601 configured to generate a first packet to be sent to a destination node.
  • a sending unit 602 configured to send a first message to an intermediate node, where the first message carries an ID of the source node and a forwarding path of the first message.
  • Figure 7 is a schematic structural diagram of an intermediate node provided in the embodiment of this application, including:
  • the receiving unit 701 is configured to receive a first packet from a first port, where the first packet carries a source node ID and a forwarding path of the first packet.
  • the decoding unit 702 is configured to decode the first packet, and obtain a forwarding path of the first packet.
  • a generating unit 703, configured to generate a first mapping relationship according to the identifier of the first port and the source node ID of the first packet.
  • the receiving unit 701 is further configured to receive a response message of the first message, and determine a sending port of the response message of the first message according to the first mapping relationship.
  • Figure 8 is a schematic structural diagram of a destination node provided in the embodiment of this application, including:
  • the receiving unit 801 is configured to receive the first packet.
  • a generating unit 802 configured to generate a response message to the first message according to the received first message.
  • a sending unit 803, configured to send a response message to the intermediate node.
  • FIG. 9 is another schematic structural diagram of a source node provided by the embodiment of the present application.
  • the source node includes: a processor 901 , a memory 902 , a network interface 903 and a bus system 904 .
  • the bus system 904 is used to couple various hardware components of the source node together.
  • the network interface 903 is used to realize the communication connection between the source node and at least one other network element, which may be in the form of the Internet, a wide area network, a local network, or a metropolitan area network.
  • the memory 902 is used for storing program instructions and data.
  • the processor 901 is configured to read the instructions and data stored in the memory 902, so as to execute the functions and processes executed by the source node in FIG. 3 and FIG. 4, which will not be repeated here.
  • FIG. 10 is another schematic structural diagram of an intermediate node provided by the embodiment of the present application.
  • the intermediate node includes: a processor 1001 , a memory 1002 , a network interface 1003 and a bus system 1004 .
  • the bus system 1004 is used to couple various hardware components of the source node together.
  • the network interface 1003 is used to realize the communication connection between the source node and at least one other network element, which may be in the form of the Internet, a wide area network, a local network, or a metropolitan area network.
  • the memory 1002 is used for storing program instructions and data.
  • the processor 1001 is configured to read instructions and data stored in the memory 1002, so as to execute the functions and processes performed by the intermediate nodes in FIG. 3 and FIG. 4, which will not be repeated here.
  • FIG. 11 is another schematic structural diagram of a destination node provided by the embodiment of the present application.
  • the destination node includes: a processor 1101 , a memory 1102 , a network interface 1103 and a bus system 1104 .
  • the bus system 1104 is used to couple various hardware components of the source node together.
  • the network interface 1103 is used to realize the communication connection between the source node and at least one other network element, which may be in the form of the Internet, a wide area network, a local network, or a metropolitan area network.
  • the memory 1102 is used for storing program instructions and data.
  • the processor 1101 is configured to read the instructions and data stored in the memory 1102, so as to execute the functions and processes performed by the destination node in FIG. 3 and FIG. 4, which will not be repeated here.
  • the embodiment of the present application also provides a computer storage medium, the computer storage medium is used to store computer software instructions for the above-mentioned source node, intermediate node or destination node, which includes instructions for executing as the source node, intermediate node or destination node The designed program.
  • the source node may be the source node described in FIG. 3 and FIG. 4 .
  • the intermediate node may be the intermediate node described above in FIG. 3 and FIG. 4 .
  • the intermediate node may be the destination node described above in FIG. 3 and FIG. 4 .
  • the embodiment of the present application also provides a computer program product, the computer program product includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the method for processing messages in any one of the above-mentioned Figures 3 and 4 in the process.
  • the disclosed system, device and method can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in 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 may be distributed to multiple network units. Part or all of the units can 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, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), magnetic disk or optical disc, etc., which can store program codes. .

Landscapes

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

Abstract

本申请实施例公开了一种处理报文的系统和方法,用于网络的拓扑发现和路由表的下发。本申请实施例系统包括:源节点、中间节点和目的节点。中间节点从第一端口接收到源节点向目的节点发送的第一报文后,对第一报文进行解码获得该报文的转发路径和源节点的身份标识ID,中间节点根据该源节点ID和第一端口标识生成第一映射关系,使得中间节点在接收到第一报文的响应报文时,可以根据第一映射关系确定该响应报文的发送端口,节省了中间节点对该响应报文进行解码的时间,提升了处理报文的效率。

Description

一种处理报文的系统、方法和网络装置
本申请要求于2021年11月10日提交中国国家知识产权局、申请号为202111329291.5、发明名称为“一种处理报文的系统、方法和网络装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及互联网领域,尤其涉及一种处理报文的系统、方法和网络装置。
背景技术
为了对网络进行管理和运维,传统网络设备和对应的网络管理系统支持一系列网络管理操作和控制协议,用于网络的拓扑发现、故障检测和路由更新等。
无限宽带(IB,infiniband)是一种新型的高速网络互联技术,IB子网的网络初始化需要依赖子网管理器(SM,subnet manager)进行拓扑发现和网络本地标识符(LID,local identifier)路由的配置。SM通过子网管理接口(SMI,subnet management interface)与每个节点(Node)上的子网管理代理(SMA,subnet management agent)收发管理报文(SMP,subnet management packet)来实现对IB网络的管理功能。其中,在网络拓扑的过程中,由于网络设备还没有LID对应的路由表,SM与SMA之间采用直接端口路由(直接端口路由)报文收发获取(Get)报文和反馈(GetResp)报文的方式对子网进行拓扑发现,将各节点的信息收集至SM。SM再根据这些收集到的节点信息生成路由表。SM再次通过直接端口路由报文将该路由表下发至各节点,这样就完成了网络初始化阶段的路由表配置,各节点可以根据该路由表采取基于LID的路由方法对报文进行转发。
通过直接端口路由的方法进行报文转发,在这种方法中,该报文每到一个节点时,需要将报文上报到该节点设备的中央处理器(CPU,center processing unit),由CPU对报文进行解析获取该报文的转发路径,完成转发操作。直接端口路由的方法需要将报文上送节点设备的CPU,再由该CPU对报文进行解析,才可以获取转发端口信息。由于靠近SM的节点需要处理更多报文,随着网络规模的扩大,这种通过节点CPU解码报文获取报文转发路径进行拓扑发现的方法效率问题就越发明显,如何提升网络拓扑发现时的报文转发效率就成了当前亟待解决的问题。
发明内容
本申请实施例提供了一种处理报文的系统和方法,在网络拓扑发现的阶段,中间节点从第一端口接收源节点向目的节点发送的报文后,生成第一端口标识和源节点ID之间的映射关系,中间节点解码该报文获得该报文的转发路径并根据该转发路径转发该报文,中间节点在接收到该报文的响应报文时,可以直接根据该映射关系从第一端口向源节点转发该响应报文。节省了中间节点转发响应报文时解码该响应报文的时间,提升了拓扑发现过程中报文转发效率。
本申请实施例第一方面提供了一种处理报文的系统,包括源节点、中间节点和目的节点。其中,源节点与中间节点以可通信方式连接,用于生成向目的节点发送的第一报文,并向中间节点发送第一报文,第一报文携带源节点的身份标识ID和第一报文的转发路径。中间节点与源节点和目的节点以可通信方式连接,用于从中间节点的第一端口接收第一报文,中间节点对第一报文进行解码,获取第一报文的转发路径,中间节点根据第一端口标 识和源节点ID生成第一映射关系,中间节点在接收第一报文的响应报文后,可以根据第一映射关系确定第一报文的响应报文的发送端口。目的节点与中间节点以可通信方式连接,用于接收第一报文,根据接收到的第一报文生成第一报文的响应报文并向中间节点发送该响应报文。
本申请实施例中,中间节点从第一端口接收第一报文并对第一报文进行解码以获得第一报文的转发路径,并根据第一端口和源节点ID生成第一映射关系,使得中间节点在接收到第一报文的响应报文时,可以根据该第一映射关系确定该响应报文的发送端口,节省了响应报文的解码时间,提升了报文的转发效率。
在第一方面的一种可能的实施方式中,第一报文的转发路径包括第二映射关系,第二映射关系用于指示中间节点从第二端口转发第一报文。中间节点还用于,通过第一端口向源节点发送中间节点的至少两个端口的标识,至少两个端口的标识包括第一端口标识和第二端口标识,第二端口是中间节点的全部端口中除第一端口之外的任意一个端口,以使得源节点根据第二端口标识和第一报文生成第二映射关系。中间节点在接收第一报文前向源节点发送了中间节点的全部端口标识,使得源节点可以根据该中间节点的全部端口标识生成携带第二映射关系的第一报文。本申请实施例提供了中间节点在接收到第一报文之前,向源节点发送该中间节点的全部端口标识,使得源节点可以根据除第一端口外的第二端口生成第一报文和第二端口之间的第二映射关系,第一报文携带第二映射关系作为中间节点转发第一报文的出端口,提升了方案的可实现性。
在第一方面的一种可能的实施方式中,响应报文还包括目的节点的全部端口标识,目的节点的全部端口的标识用于源节点生成路由表。中间节点还用于,根据第二映射关系,从第二端口向第三端口转发第一报文,第三端口是目的节点的端口。第一报文为对目的节点进行拓扑发现的报文,中间节点根据第一报文携带的第二映射关系从中间节点的第二端口向目的节点的第三端口转发第一报文。本申请实施例提供了中间节点根据第二映射关系向第三端口转发第一报文,以获得目的节点发送的响应报文,响应报文中携带目的节点的全部端口标识,使得源节点可以根据目的节点的全部端口标识生成路由表,提升了方案的可实现性。
在第一方面的一种可能的实施方式中,中间节点还用于从第一端口接收第二报文,第二报文中携带路由表。中间节点在转发了第一报文的响应报文后,源节点可以根据该响应报文携带的目的节点的端口信息生成路由表,中间节点向目的节点转发携带该路由表的第二报文。本申请实施例提供了转发源节点根据该响应报文生成的路由表,提升了方案的可实现性。
在第一方面的一种可能的实施方式中,第一报文还携带第一报文的目的节点的预设路由表。本申请实施例中,第一报文还可以为下发预设路由表的报文,为方案的实施提供了更多的应用场景,提升了方案的可实现性。
本申请实施例第二方面提供了一种处理报文的方法,包括:中间节点从第一端口接收第一报文,第一报文携带源节点身份标识ID和第一报文的转发路径。中间节点对第一报文进行解码,并获取第一报文的转发路径。中间节点根据第一端口的标识和第一报文的源节点ID生成第一映射关系。中间节点接收第一报文的响应报文,并根据第一映射关系确定第 一报文的响应报文的发送端口。本申请实施例中,中间节点从第一端口接收第一报文并对第一报文进行解码以获得第一报文的转发路径,并根据第一端口和源节点ID生成第一映射关系,使得中间节点在接收到第一报文的响应报文时,可以根据该第一映射关系确定该响应报文的发送端口,节省了响应报文的解码时间,提升了报文的转发效率。
在第二方面的一种可能的实施方式中,第一报文包括第二映射关系,第二映射关系用于指示中间节点从第二端口转发第一报文。中间节点从第一端口接收第一报文前,该方法还包括:中间节点通过第一端口向源节点发送中间节点的至少两个端口的标识,至少两个端口的标识包括第一端口标识和第二端口标识,第二端口是中间节点的全部端口中除第一端口之外的任意一个端口,以使得源节点根据第二端口标识和第一报文生成第二映射关系。中间节点在接收第一报文前向源节点发送了中间节点的全部端口标识,使得源节点可以根据该中间节点的全部端口标识生成携带第二映射关系的第一报文。本申请实施例提供了拓扑发现中获取节点端口的方法,提升了方案的可实现性。
在第二方面的一种可能的实施方式中,响应报文还包括目的节点的全部端口标识,目的节点的全部端口的标识用于源节点生成路由表。中间节点接收第一报文的响应报文前,该方法还包括:中间节点根据第二映射关系,从第二端口向第三端口转发第一报文,第三端口是目的节点的端口。第一报文为对目的节点进行拓扑发现的报文,中间节点根据第一报文携带的第二映射关系从中间节点的第二端口向目的节点的第三端口转发第一报文。本申请实施例提供了通过第一报文发现目的节点的方案,提升了方案的可实现性。
在第二方面的一种可能的实施方式中,该方法还包括:中间节点从第一端口接收第二报文,第二报文中携带路由表。中间节点在转发了第一报文的响应报文后,源节点可以根据该响应报文携带的目的节点的端口信息生成路由表,中间节点向目的节点转发携带该路由表的第二报文。本申请实施例提供了转发源节点根据该响应报文生成的路由表,提升了方案的可实现性。
在第二方面的一种可能的实施方式中,第一报文还携带第一报文的目的节点的预设路由表。本申请实施例中,第一报文还可以为下发预设路由表的报文,为方案的实施提供了更多的应用场景,提升了方案的可实现性。
本申请实施例第三方面提供了一种网络装置,包括:接收单元,用于从第一端口接收第一报文,第一报文携带源节点身份标识ID和第一报文的转发路径;解码单元,用于对第一报文进行解码,并获取第一报文的转发路径;生成单元,用于根据第一端口的标识和第一报文的源节点ID生成第一映射关系;接收单元,还用于接收第一报文的响应报文,并根据第一映射关系确定第一报文的响应报文的发送端口。该中间节点具备执行前述第一方面、第一方面任一种可能的实现方式、第二方面或第二方面任一种可能的实现方式中中间节点行为的功能,该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
本申请实施例第四方面提供了一种网络装置,该网络装置包括:一个或多个处理器,一个或多个处理器和存储器耦合,存储器存储有程序,当存储器存储的程序指令被一个或多个处理器执行时实现前述第二方面或第二方面任一种可能的实现方式中描述的处理报文的方法。
本申请第五方面提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行现前述第二方面或第二方面任一种可能实现方式的处理报文的方法。
附图说明
图1为本申请实施例提供的交换机的一种结构示意图;
图2为本申请实施例提供的报文处理的一种示意图;
图3为本申请实施例提供的报文处理的方法一种流程示意图;
图4为本申请实施例提供的报文处理的方法另一种流程示意图;
图5为本申请实施例提供的处理报文的系统的一种结构示意图;
图6为本申请实施例提供的源节点的一种结构示意图;
图7为本申请实施例提供的中间节点的一种结构示意图;
图8为本申请实施例提供的目的节点的一种结构示意图;
图9为本申请实施例提供的源节点的另一种结构示意图;
图10为本申请实施例提供的中间节点的另一种结构示意图;
图11为本申请实施例提供的目的节点的另一种结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了便于对本申请技术方案进行理解,首先对常见的交换机和拓扑发现方法进行简单的介绍:
请参阅图1,为本申请实施例提供的交换机的一种结构示意图,从图1中可以看出交换机中包括CPU和网络处理器(NP,network processing unit),NP中又包括匹配器(match)和执行器(action)。通常,执行复杂的算法和和软件处理都在CPU进行。而网络报文在转发时,由于交换机中存储有路由表,在报文转发时,只需要通过NP的匹配和执行的逻辑,快速的根据网路协议报文头的信息,进行报文转发动作,从对应的端口转发出去。而报文的转发主要有两种方式第一种就是将报文上送至CPU进行解码,从报文中获得该报文的转发路径,再根据该转发路径对该报文进行转发,本申请实施例中的逐跳转发(PHMP,per-hop management protocol)的转发方式和直接端口路由的转发方式都为该转发方式;第二种就是利用NP和存储于交换机的路由表,根据报文的报文头信息,NP从路由表中查表获知从哪个端口转发,直接进行转发,本申请实施例中的基于LID的转发方式和直接存取访问管理协议(DAMP,direct access management protocol)都为这种转发方式。
上述交换机在实际应用中可以和其他交换机组成网络,具体的,请参阅图2,为本申请实施例提供的报文处理的一种示意图。IB子网的SM和SMA通信,在进行拓扑发现的过程中,由于SMA上还没有子网的路由表,只能使用直接端口路由进行转发。以图中所示向节点三发送直接端口路由报文为例,该直接端口路由报文的报文信息中定义了初始路径(initial path)和返回路径(return path)。需要说明的是,各家厂商对直接端口路由 的网络管理协议有各自的叫法,但其本质都是在报文转发的过程中,每个中间节点将报文通过内部回路上送至中间节点的CPU,由CPU对报文进行解码,获得转发路径,从该转发路径指示的出端口转发该报文。
直接端口路由报文中定义了初始路径(initial path)和返回路径(return path),SM向SMA发送直接端口路由报文,SMA在接收到该直接端口路由报文后向SM发送一个该直接端口路由的响应报文。以图2中所示向节点三发送直接端口路由报文为例,SM生成直接端口路由报文由端口1向节点一发送该直接端口路由报文,节点一在接收到该直接端口路由报文后将该直接端口路由报文上送节点一的CPU,由部署于节点一的CPU的SMA对该直接端口路由报文进行处理,获知该直接端口路由报文携带的初始路径,节点一根据该初始路径从端口4转发该直接端口路由报文。此处的初始路径为(4,6),该初始路径指示了节点一从端口4转发该直接端口路由报文,节点二从端口6转发该直接端口路由报文。该直接端口路由报文还携带了返回路径,此处的返回路径为(4,2),该返回路径指示了在转发该直接端口路由报文的响应报文时,节点二从端口4转发该直接端口路由报文的响应报文,节点一从端口2转发该直接端口路由报文的响应报文。
节点二在接收到该直接端口路由报文后将该直接端口路由报文上送节点二的CPU,由部署于节点二的CPU的SMA对该直接端口路由报文进行处理,获知该直接端口路由报文携带的初始路径,节点二根据该初始路径从端口6转发该直接端口路由报文。节点三从端口8接收到经由节点一和节点二转发的直接端口路由报文后,将该直接端口路由报文上送至节点三的CPU,由部署于节点三的CPU的SMP对该直接端口路由报文进行处理,并根据该直接端口路由报文生成该直接端口路由报文的响应报文。其中,节点三在生成该直接端口路由报文的响应报文时,将该直接端口路由报文的返回路径作为该报文的响应报文的初始路径,由于该报文的响应报文无需响应报文,所以它的返回路径为空。
随着互联网络的规模不断增大,若每个节点在接收到发给自己的报文时,都需要通过内部总线将报文上送至CPU处理,由于内部总线、CPU处理性能和操作系统调度等多方面的原因,必然会带来时间上的浪费,效率较为低下。针对在网络拓扑阶段的报文转发效率低下的问题,本申请提出了能够有效提升在网络拓扑阶段的报文转发效率的方案。
以上介绍了与本申请较为接近的技术方案,基于以上的方案,针对网络拓扑发现阶段,各网络节点上由于没有路由表,只能将报文上送至CPU,由CPU上配置的SMA对报文进行解码,提取报文中携带的转发路径,再根据转发路径,从指定的端口转发报文的情况。本申请提出一下思路,在SM向节点三发送需要经由节点一和节点二转发的直接端口路由报文时,中间节点在接收到第一报文时,记录下接收第一报文的第一端口以及第一报文的源节点的身份标识(ID,identity document),并生成第一端口和第一报文的源节点的身份标识之间的映射关系作为临时路由表项,该临时路由表项就指示了当经由本节点的响应报文的目的节点ID和第一报文的源节点ID相同时,从第一端口转发该响应报文。由于第一报文的响应报文的目的节点为第一报文的源节点,在第一报文的响应报文被转发至中间节点时,中间节点的NP可以根据该临时路由表项指示的映射关系,从第一端口转发该响应报文。本方案在转发该响应报文时,由于有了临时路由表项,NP可以直接根据临时路由表项指示的目的节点的ID和第一端口之间的映射关系,直接从第一端口转发该响应报文。无需将该 响应报文上送至中间节点的CPU,节约了中间节点将响应报文上报至CPU,并由中间节点的CPU对该响应报文进行解码处理的时间,提升了在网络拓扑阶段的报文转发效率。
下面将结合附图,对本申请实施例的具体实现方式进行说明:
本申请有多种应用场景,下面将分别从拓扑发现过程中和路由表下发的过程中阐述本发明。
一、本申请应用于拓扑发现过程中的情况。
在路由网络建立前,通常会进行路由网络的拓扑发现,在这个过程中,路由网络的节点没有路由表,而在路由网络中,报文转发只有直接端口路由转发方法和基于LID的转发方法两种类型的转发形式,所以报文在中间节点的转发只能采用PHMP的转发形式,本申请实施例通过在向第一报文的目标节点发送第一报文的时候,将中间节点接收报文的第一端口和第一报文的源节点ID绑定,生成第一映射关系,在后续的转发中,遇到响应报文的目的节点的ID和该第一报文的目的节点ID相同时,就可以采用DAMP的转发形式,由NP直接根据报文头中报文的目的节点ID从第一端口转发该报文。
具体的实施方式和步骤请参阅图3,为本申请实施例提供的报文处理的方法一种流程示意图。
301、中间节点向源节点发送中间节点的端口标识;
在前一次拓扑中,中间节点作为本次拓扑的目的节点,中间节点在接收到源节点发送的获取中间节点端口标识的请求报文后,中间节点向源节点发送中间节点的端口标识,中间节点有两个端口,其中第一端口与源节点相连。中间节点包括第一端口和第二端口,第一端口的端口标识为1,第二端口的端口标识为2。
302、源节点生成第一报文;
源节点在接收中间节点发送的中间节点的端口标识后,根据中间节点的端口标识获知中间节点除第一端口外还有至少一个端口。源节点根据获得的中间节点的端口标识生成第一报文,第一报文用于在已经发现中间节点的前提下,发现目的节点的拓扑过程,第一报文携带的转发路径中,中间节点从第二端口转发该第一报文。
303、源节点向中间节点发送第一报文;
源节点生成第一报文后,源节点向中间节点的第一端口发送第一报文。中间节点在从第一端口接收到第一报文时,中间节点会将第一报文的已经转发的次数(TTL,time to live)字段的数字加一,中间节点会根据第一报文的需要转发的次数字段(step)和TTL字段判断是否该报文是否已经到达目的节点。若此时的需要转发的次数字段字段和TTL字段的数字相等,那么该报文就已经到达目的节点就已经到达目的节点无需继续进行转发。需要说明的是,本申请实施例中描述的第一报文的封装格式均以自定义的格式为例进行阐述。
可选的,该第一报文可以使用直接端口路由报文封装格式进行封装,也可以由自定义的格式进行封装,需要注意的是,该第一报文的报文头至少包括,第一报文的转发路径、需要转发的次数和协议类型。
本申请提供了多种第一报文的报文头的格式定义,请参阅表1,为本申请实施例提供的控制协议报文头的一种格式。该格式中需要包括:用于确定报文来源的源节点ID(source ID)、用于确定报文处理方式的协议类型(protocol)或子协议类型(sub protocol)、用 于确定转发进度的需要转发的跳数(step)与TTL和用于确定转发路径的转发路径的出端口列表(destpath)。除此以外,第一报文的报文头还可以包括用于确定报文的目的节点的目的节点ID(destination ID),但由于该目的节点ID并不会影响本申请实施例的进行,所示该目的节点ID在本申请实施例中不做限定。本申请实施例中提到的第一报文,均以表1所示的格式和内容进行阐述,第一报文的源节点为源节点,源节点ID为100。第一报文的协议类型为PHMP。第一报文为进行拓扑发现进行的报文,故子协议类型为拓扑发现协议(get topo)。第一报文为通过位于中间节点的第二端口发现与之相连的目的节点的拓扑发现报文,故需要转发2次,已经转发的跳出初始值为0,故需要转发的跳数为2,TTL项为0,转发路径的出端口列表为2。
Figure PCTCN2022107851-appb-000001
表1本申请实施例提供的控制协议报文头的一种格式
可选的,在实际应用中,可以通过不同的手段达到前述表1所示的报头的效果,例如,前述目的节点ID在拓扑发现中可以为空,也即是目的节点ID不是一定要在报头中存在。而NP判断是否要将报文上送至节点CPU是通过判断协议类型字段或子协议类型字段,那么协议类型和子协议类型在报文头中有任一项即可。至于判断转发进度,不仅可以通过前述表1中所示的需要转发的次数字段和TTL结合的方式,用需要转发的跳数减去已经转发的跳数去判断是否仍需进行转发,也可以通过只设置需要转发的跳数,每经过一次转发将该数字减一,直至该数字为零时,不再进行转发。转发路径的判断不拘泥于转发路径的出端口列表,只要包括可以指示转发路径上每一条的转发出端口的部分即可。在实际应用中,只要能实现前述表格中的功能即可,具体此处不做限定。
304、中间节点生成第一映射关系;
中间节点从第一端口接收到源节点发送的第一报文后,从第一报文的报头即可获知中间节点至少可以通过第一端口和源节点进行路由,中间节点根据从第一端口接收到的第一报文以及第一报文头中的子协议类型为100,生成第一端口也即端口标识1和目的节点ID100之间的映射关系,也就是第一端口和源节点的ID之间的映射关系。第一映射关系用于指示目的节点ID为100的报文从第一端口转发。
可选的,当第一报文的报头中还携带有目的节点ID为200时,中间节点可以根据目的节点ID200和第二端口标识2生成第二映射关系。使得中间节点在接收到第三报文时,可以根据第二映射关系从第二端口转发第三报文,其中,第三报文的报头中标识目的节点的字段为200,第三报文的协议类型字段为DAMP。这样中间节点的NP就可以根据第三报文的协议类型字段确定该报文无需上报,从第三报文的报文头的目的节点ID字段确定要根据第二映射关系从第二端口转发该第三报文。
305、中间节点向目的节点发送第一报文;
中间节点在接收到第一报文后,该中间节点的NP对该报文的报头进行解码,通过第一报文的协议类型字段确定第一报文为需要上送CPU的报文,将第一报文上送至中间节点的 CPU进行处理。中间节点的CPU对第一报文进行解码处理,从第一报文的需要转发的跳数和TTL获知第一报文需要转发一次,现在还未转发,从第一报文的转发路径的出端口列表字段获知该第一报文需要从第二端口转发。中间节点的CPU将第一报文的TTL字段数字加一后,从第一报文的中间节点从第二端口向目的节点转发第一报文。
306、目的节点生成响应报文;
目的节点从第三端口接收到中间节点转发的第一报文后,目的节点的NP仍根据第一报文的协议类型字段确定第一报文为需要上送CPU的报文,目的节点的NP将第一报文上送至目的节点的CPU进行处理,目的节点的CPU对第一报文进行解码处理,从第一报文的需要转发的跳数和TTL获知第一报文需要转发一次,现在已经转发了一次,进一步对第一报文的具体内容进行处理,获知第一报文为对目的节点进行拓扑发现的报文,目的节点的CPU根据第一报文的子协议类型和第一报文的内容生成响应报文,响应报文携带了目的节点的全部端口标识。
需要说明的是,响应报文的封装可以按照DAMP报文的标准格式封装,也可以按照表2,为本申请实施例提供的控制协议报文头的另一种格式进行封装,本申请实施例中以表2的形式进行阐述,在实际应用中,具体的报文头格式不做限定。
响应报文的目的节点ID为第一报文的子协议类型也就是100,响应报文的协议类型为DAMP,该格式中需要包括:用于确定报文去处的目的节点ID和用于确定报文处理方式的协议类型或子协议类型。除此以外,第一报文的报文头还可以包括用于确定报文的源节点的子协议类型,但由于该子协议类型并不会影响本申请实施例的进行,故该子协议类型在本申请实施例中不做限定。
Figure PCTCN2022107851-appb-000002
表2本申请实施例提供的控制协议报文头的另一种格式
307、目的节点向中间节点发送响应报文;
目的节点从第三端口向中间节点发送响应报文,中间节点的第二端口接收到目的节点发送的响应报文后,NP根据响应报文的报头的协议类型字段确定响应报文采用DAMP转发方法进行转发。中间节点查找目的节点ID字段的内容100,可以发现中间节点存有100与第一端口之间的第一映射关系,中间节点根据第一映射关系确定响应报文从第一端口转发。
308、中间节点向源节点发送响应报文;
中间节点查找目的节点ID字段的内容100,可以发现中间节点存有100与第一端口之间的第一映射关系。中间节点根据第一映射关系确定响应报文从第一端口转发后,中间节点根据第一映射关系从第一端口转发响应报文;
309、源节点生成路由表。
源节点在进行多次拓扑发现,确定该路由网络中中间节点和目的节点的每一个端口都已经进行拓扑发现后,根据多次拓扑发现获得的响应报文,生成路由网络中各节点的路由表。
310、源节点向中间节点发送第二报文。
源节点在生成路由表后,向中间节点发送第二报文,第二报文携带该路由表,该路由 表可以为该网络中任意节点的路由表。当该路由表为中间节点的路由表时,中间节点保存该路由表,并向源节点发送响应报文。
可选的,当该路由表为目的节点的路由表时,中间节点保存第一端口和源节点ID之间的第一映射关系,并解码第二报文获得第二报文的转发出端口路径。中间节点根据该路径向目的节点转发该路由表。
需要注意的是,此处对该路由表不做具体的限制。
本申请实施例中,源节点在已知中间节点的信息,对目的节点进行拓扑发现的过程中,中间节点在转发源节点向目的节点发送第一报文时,根据第一报文的源节点ID和中间节点接收第一报文的第一端口的端口标识,生成源节点ID和第一端口的端口标识之间的第一映射关系。目的节点根据第一报文生成响应报文,响应报文的协议类型字段为LID,也就是响应报文采用基于LID的转发方法,使得响应报文的转发过程中,中间节点可以直接根据报文头中的目的节点ID和中间节点中保存的第一映射关系从第一端口转发响应报文,节省了将响应报文上报至中间节点的CPU进行处理的时间,提升了报文转发的效率。
二、本申请应用于路由表下发过程中的情况。
在路由网络建立前,通常会进行路由表的下发,在这个过程中,路由网络的节点没有路由网络的路由表,而在路由网络中,报文转发只有直接端口路由和基于LID的转发方法两种转发形式,所以报文在中间节点的转发只能采用直接端口路由转发形式,本申请实施例通过在向第一报文的目标节点发送第一报文的时候,将中间节点接收报文的第一端口和第一报文的目的节点ID绑定,生成第一映射关系,在后续的转发中,遇到报文的目的节点的ID和该第一报文的目的节点ID相同时,就可以采用基于LID的转发方法,由NP直接根据报文的目的节点ID从第一端口转发该报文。
具体的实施方式和步骤请参阅图4,为本申请实施例提供的报文处理的方法另一种流程示意图。
401、源节点生成第一报文;
源节点在完成路由网络的拓扑发现后,生成第一报文,第一报文中包括目的节点的路由表、第一报文的报文类型、第一报文的源节点ID和第一报文的转发路径等,第一报文的报头内容与前述表1类似,具体此处不再赘述。
可选的,该路由表可以是用户预先设置好的,也可以是源节点在拓扑发现后自动生成的,具体的此处不做限定。
402、源节点向中间节点发送第一报文;
403、中间节点生成第一映射关系;
404、中间节点向目的节点发送第一报文;
本实施例中的步骤402至404与前述图3所示实施例中的步骤303至305类似,此处不再赘述。
405、目的节点生成响应报文;
目的节点从第三端口接收到中间节点转发的第一报文后,NP根据第一报文的协议类型字段确定第一报文为需要上送CPU的报文,NP将第一报文上送至目的节点的CPU进行处理,目的节点的CPU对第一报文进行解码处理,从第一报文的需要转发的跳数字段和TTL字段 获知第一报文需要转发2次,现在已经转发了2次,该报文已经到达报文的目的节点。目的节点保存第一报文中携带的路由表,并生成响应报文,响应报文为第一报文的响应报文,响应报文的协议类型为基于LID的转发方法。响应报文的封装可以按照LID报文的标准格式封装,也可以自定义报头格式,此处的自定义报头格式参照前述表2,具体此处不再赘述。
406、目的节点向中间节点发送响应报文;
目的节点从第三端口向中间节点发送响应报文,中间节点的第二端口接收到目的节点发送的响应报文后,NP根据响应报文的报头的协议类型字段确定响应报文采用基于LID的转发方法进行转发。中间节点查找目的节点ID字段的内容100,可以发现中间节点存有100与第一端口之间的第一映射关系,中间节点根据第一映射关系确定响应报文从第一端口转发。
407、中间节点向源节点发送响应报文。
中间节点查找目的节点ID字段的内容100,可以发现中间节点存有100与第一端口之间的第一映射关系。中间节点根据第一映射关系确定响应报文从第一端口转发后,中间节点根据第一映射关系从第一端口转发响应报文。
本申请实施例中,源节点在收集到路由网络中各节点的信息之后,生成路由表,经由中间节点向目的节点发送路由表时,中间节点根据源节点的ID和接收第一报文的端口标识生成第一映射关系。目的节点根据第一报文生成响应报文,响应报文的协议类型字段为LID,也就是响应报文采用基于LID的转发方法,使得响应报文的转发过程中,中间节点可以直接根据报文头中的目的节点ID和中间节点中保存的第一映射关系从第一端口转发响应报文,节省了将响应报文上报至中间节点的CPU进行处理的时间,提升了报文转发的效率。
上面对本申请实施例中的处理报文的方法进行了描述,下面对本申请实施例中的处理报文的系统、源节点、中间节点和目的节点进行描述:
请参阅图5,为本申请实施例提供的处理报文的系统的一种结构示意图。该系统包括:源节点501、中间节点502和目的节点503。其中,源节点501与中间节点502以可通信方式连接,用于生成向目的节点发送的第一报文,并向中间节点502发送第一报文,第一报文携带源节点501的身份标识ID和第一报文的转发路径。中间节点502与源节点501和目的节点以可通信方式连接,用于从中间节点502的第一端口接收第一报文,中间节点502对第一报文进行解码,获取第一报文的转发路径,中间节点502根据第一端口标识和源节点ID生成第一映射关系,中间节点502在接收第一报文的响应报文后,可以根据第一映射关系确定第一报文的响应报文的发送端口。目的节点与中间节点502以可通信方式连接,用于接收第一报文,根据接收到的第一报文生成第一报文的响应报文并向中间节点502发送该响应报文。
本申请实施例中源节点实行的功能及流程与前述图3和图4中源节点所执行的功能和流程类似,此处不再赘述。
本申请实施例中中间节点实行的功能及流程与前述图3和图4中中间节点所执行的功能和流程类似,此处不再赘述。
本申请实施例中目的节点实行的功能及流程与前述图3和图4中目的节点所执行的功 能和流程类似,此处不再赘述。
请参阅图6,为本申请实施例提供的源节点的一种结构示意图,包括:
生成单元601,用于生成向目的节点发送的第一报文。
发送单元602,用于向中间节点发送第一报文,第一报文携带源节点身份标识ID和第一报文的转发路径。
本申请实施例中源节点实行的功能及流程与前述图3和图4中源节点所执行的功能和流程类似,此处不再赘述。
请参阅图7,为本申请实施例提供的中间节点的一种结构示意图,包括:
接收单元701,用于从第一端口接收第一报文,第一报文携带源节点身份标识ID和第一报文的转发路径。
解码单元702,用于对第一报文进行解码,并获取第一报文的转发路径。
生成单元703,用于根据第一端口的标识和第一报文的源节点ID生成第一映射关系。
接收单元701,还用于接收第一报文的响应报文,并根据第一映射关系确定第一报文的响应报文的发送端口。
本申请实施例中中间节点实行的功能及流程与前述图3和图4中中间节点所执行的功能和流程类似,此处不再赘述。
请参阅图8,为本申请实施例提供的目的节点的一种结构示意图,包括:
接收单元801,用于接收第一报文。
生成单元802,用于根据接收到的第一报文生成第一报文的响应报文。
发送单元803,用于向中间节点发送响应报文。
本申请实施例中目的节点实行的功能及流程与前述图3和图4中目的节点所执行的功能和流程类似,此处不再赘述。
请参阅图9,为本申请实施例提供的源节点的另一种结构示意图,源节点包括:处理器901、存储器902、网络接口903和总线系统904。
总线系统904,用于将源节点的各个硬件组件耦合在一起。
网络接口903,用于实现源节点与至少一个其他网元之间的通信连接,可以是用互联网,广域网,本地网,城域网等方式。
存储器902,用于存储程序指令和数据。
处理器901,用于读取存储器902中存储指令和数据,以执行前述图3和图4中源节点所执行的功能和流程,此处不再赘述。
请参阅图10,为本申请实施例提供的中间节点的另一种结构示意图,中间节点包括:处理器1001、存储器1002、网络接口1003和总线系统1004。
总线系统1004,用于将源节点的各个硬件组件耦合在一起。
网络接口1003,用于实现源节点与至少一个其他网元之间的通信连接,可以是用互联网,广域网,本地网,城域网等方式。
存储器1002,用于存储程序指令和数据。
处理器1001,用于读取存储器1002中存储指令和数据,以执行前述图3和图4中中间节点所执行的功能和流程,此处不再赘述。
请参阅图11,为本申请实施例提供的目的节点的另一种结构示意图,目的节点包括:处理器1101、存储器1102、网络接口1103和总线系统1104。
总线系统1104,用于将源节点的各个硬件组件耦合在一起。
网络接口1103,用于实现源节点与至少一个其他网元之间的通信连接,可以是用互联网,广域网,本地网,城域网等方式。
存储器1102,用于存储程序指令和数据。
处理器1101,用于读取存储器1102中存储指令和数据,以执行前述图3和图4中目的节点所执行的功能和流程,此处不再赘述。
本申请实施例还提供了一种计算机存储介质,该计算机存储介质用于储存为上述源节点、中间节点或目的节点所用的计算机软件指令,其包括用于执行为源节点、中间节点或目的节点所设计的程序。
该源节点可以如前述图3和图4中所描述的源节点。
该中间节点可以如前述图3和图4中所描述的中间节点。
该中间节点可以如前述图3和图4中所描述的目的节点。
本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机软件指令,该计算机软件指令可通过处理器进行加载来实现上述图3和图4中任意一项的处理报文的方法中的流程。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,read-only memory)、随机存取存储器(RAM,random access memory)、磁碟或者光盘等各种可以存储程序代码 的介质。

Claims (17)

  1. 一种处理报文的系统,其特征在于,包括源节点、中间节点和目的节点;
    所述源节点,与所述中间节点以可通信方式连接,用于生成向所述目的节点发送的第一报文,还用于向所述中间节点发送所述第一报文,所述第一报文携带所述源节点身份标识ID和所述第一报文的转发路径;
    所述中间节点,与所述源节点和所述目的节点以可通信方式连接,用于从所述中间节点的第一端口接收所述第一报文,所述中间节点对所述第一报文进行解码,获取所述第一报文的转发路径,所述中间节点根据所述第一端口标识和所述源节点ID生成第一映射关系,所述中间节点在接收所述第一报文的响应报文后,根据所述第一映射关系确定所述第一报文的响应报文的发送端口;
    所述目的节点,与所述中间节点以可通信方式连接,用于接收所述第一报文,根据接收到的所述第一报文生成所述第一报文的响应报文,并向所述中间节点发送所述响应报文。
  2. 根据权利要求1所述的系统,其特征在于,所述第一报文的转发路径包括第二映射关系,所述第二映射关系用于指示所述中间节点从第二端口转发所述第一报文;
    所述中间节点还用于:
    通过所述第一端口向源节点发送所述中间节点的至少两个端口的标识,所述至少两个端口的标识包括所述第一端口标识和第二端口标识,所述第二端口是所述中间节点的全部端口中除所述第一端口之外的任意一个端口,以使得所述源节点根据所述第二端口标识和第一报文生成所述第二映射关系。
  3. 根据权利要求2所述的系统,其特征在于,所述响应报文还包括所述目的节点的全部端口标识,所述目的节点的全部端口的标识用于所述源节点生成路由表;
    所述中间节点还用于:
    根据所述第二映射关系,从所述第二端口向第三端口转发所述第一报文,所述第三端口是所述目的节点的端口。
  4. 根据权利要求3所述的系统,其特征在于,所述中间节点,还用于从所述第一端口接收第二报文,所述第二报文中携带所述路由表。
  5. 根据权利要求1所述的系统,其特征在于,所述第一报文还携带所述第一报文的目的节点的预设路由表。
  6. 一种处理报文的方法,其特征在于,包括:
    中间节点从第一端口接收第一报文,所述第一报文携带源节点身份标识ID和所述第一报文的转发路径;
    所述中间节点对所述第一报文进行解码,并获取所述第一报文的转发路径;
    所述中间节点根据所述第一端口的标识和所述第一报文的源节点ID生成第一映射关系;
    所述中间节点接收所述第一报文的响应报文,并根据所述第一映射关系确定所述第一报文的响应报文的发送端口。
  7. 根据权利要求6所述的方法,其特征在于,所述第一报文的转发路径包括第二映射关系,所述第二映射关系用于指示所述中间节点从第二端口转发所述第一报文;
    所述中间节点从第一端口接收所述第一报文前,所述方法还包括:
    所述中间节点通过所述第一端口向源节点发送所述中间节点的至少两个端口的标识,所述至少两个端口的标识包括所述第一端口标识和第二端口标识,所述第二端口是所述中间节点的全部端口中除所述第一端口之外的任意一个端口,以使得所述源节点根据所述第二端口标识和第一报文生成所述第二映射关系。
  8. 根据权利要求7所述的方法,其特征在于,所述响应报文还包括所述目的节点的全部端口标识,所述目的节点的全部端口的标识用于所述源节点生成路由表;
    所述中间节点接收所述第一报文的响应报文前,所述方法还包括:
    所述中间节点根据所述第二映射关系,从所述第二端口向第三端口转发所述第一报文,所述第三端口是所述目的节点的端口。
  9. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    所述中间节点从所述第一端口接收第二报文,所述第二报文中携带所述路由表。
  10. 根据权利要求6所述的方法,其特征在于,所述第一报文还携带所述第一报文的目的节点的预设路由表。
  11. 一种网络装置,其特征在于,包括:
    接收单元,用于从第一端口接收第一报文,所述第一报文携带源节点身份标识ID和所述第一报文的转发路径;
    解码单元,用于对所述第一报文进行解码,并获取所述第一报文的转发路径;
    生成单元,用于根据所述第一端口的标识和所述第一报文的源节点ID生成第一映射关系;
    所述接收单元,还用于接收所述第一报文的响应报文,并根据所述第一映射关系确定所述第一报文的响应报文的发送端口。
  12. 根据权利要求11所述的网络装置,其特征在于,所述第一报文包括第二映射关系,所述第二映射关系用于指示所述中间节点从第二端口转发所述第一报文;
    所述中间节点还包括:
    发送单元,用于通过所述第一端口向源节点发送所述中间节点的至少两个端口的标识,所述至少两个端口的标识包括所述第一端口标识和第二端口标识,所述第二端口是所述中间节点的全部端口中除所述第一端口之外的任意一个端口,以使得所述源节点根据所述第二端口标识和第一报文生成所述第二映射关系。
  13. 根据权利要求12所述的网络装置,其特征在于,所述响应报文还包括所述目的节点的全部端口标识,所述目的节点的全部端口的标识用于所述源节点生成路由表;
    所述发送单元,还用于根据所述第二映射关系,从所述第二端口向第三端口转发所述第一报文,所述第三端口是所述目的节点的端口。
  14. 根据权利要求13所述的网络装置,其特征在于,所述接收单元,还用于从所述第一端口接收第二报文,所述第二报文中携带所述路由表。
  15. 根据权利要求14所述的网络装置,其特征在于,所述第一报文还携带所述第一报文的目的节点的预设路由表。
  16. 一种网络装置,其特征在于,包括:一个或多个处理器,所述一个或多个处理器和 存储器耦合,所述存储器存储有程序,当所述存储器存储的程序指令被所述一个或多个处理器执行时实现权利要求6至10中任一项所述的方法。
  17. 一种计算机可读存储介质,包括指令,当所述指令在计算机上运行时,使得计算机执行如权利要求6至10中任意一项所述的方法。
PCT/CN2022/107851 2021-11-10 2022-07-26 一种处理报文的系统、方法和网络装置 WO2023082706A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111329291.5 2021-11-10
CN202111329291.5A CN116113006A (zh) 2021-11-10 2021-11-10 一种处理报文的系统、方法和网络装置

Publications (1)

Publication Number Publication Date
WO2023082706A1 true WO2023082706A1 (zh) 2023-05-19

Family

ID=86256720

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/107851 WO2023082706A1 (zh) 2021-11-10 2022-07-26 一种处理报文的系统、方法和网络装置

Country Status (2)

Country Link
CN (1) CN116113006A (zh)
WO (1) WO2023082706A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050201371A1 (en) * 2004-03-12 2005-09-15 Lucent Technologies Inc. GPRS tunneling protocol path integrity protocol
CN106549871A (zh) * 2015-09-22 2017-03-29 华为技术有限公司 一种报文处理的方法、设备和系统
CN109246624A (zh) * 2017-07-11 2019-01-18 华为技术有限公司 一种组播转发方法及相关设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050201371A1 (en) * 2004-03-12 2005-09-15 Lucent Technologies Inc. GPRS tunneling protocol path integrity protocol
CN106549871A (zh) * 2015-09-22 2017-03-29 华为技术有限公司 一种报文处理的方法、设备和系统
CN112087386A (zh) * 2015-09-22 2020-12-15 华为技术有限公司 一种报文处理的方法、设备和系统
CN109246624A (zh) * 2017-07-11 2019-01-18 华为技术有限公司 一种组播转发方法及相关设备

Also Published As

Publication number Publication date
CN116113006A (zh) 2023-05-12

Similar Documents

Publication Publication Date Title
CN107204867B (zh) 一种信息传输方法、装置和系统
JP6144834B2 (ja) Sdnスイッチにより正確なフロー・エントリを獲得するための方法、およびsdnスイッチ、コントローラ、およびシステム
JP6490205B2 (ja) フローエントリ構成の方法、装置及びシステム
US11979322B2 (en) Method and apparatus for providing service for traffic flow
JP6523316B2 (ja) ミドルウェアおよびアプリケーションの実行のための設計されたシステムに対するサービス妨害(dos:denial of service)攻撃を防止するためのシステムおよび方法、ならびに、ミドルウェアおよびアプリケーションの実行のための設計されたシステムにおいてサブネットアドミニストレータ(sa:subnet administrator)アクセスに基づいて信頼性のある接続(rc:reliable connection)をサポートするためのシステムおよび方法
US7428219B2 (en) System and method to exchange information between a control element and forwarding elements in a network element architecture
WO2020001393A1 (zh) 发送网络性能参数、计算网络性能的方法和网络节点
JP5621778B2 (ja) コンテンツベーススイッチシステム、及びコンテンツベーススイッチ方法
US20160301603A1 (en) Integrated routing method based on software-defined network and system thereof
JP2022518475A (ja) パケット処理方法および装置、デバイス、ならびにシステム
CN109361606B (zh) 一种报文处理系统及网络设备
US6985960B2 (en) Routing information mapping device in a network, method thereof and storage medium
US20120314605A1 (en) Communication system, path control apparatus, packet forwarding apparatus, and path control method
US20070127367A1 (en) Communication system and communication method
TWI577164B (zh) 可縮放位址解析之技術
EP2731313A1 (en) Distributed cluster processing system and message processing method thereof
WO2016086064A1 (en) Source ip address transparency systems and methods
JP6752141B2 (ja) パケットを処理するための方法およびフォワーダ
WO2021083341A1 (zh) 一种报文处理的方法、网络节点和系统
US20230067091A1 (en) Method and device for segment routing service processing, routing equipment, and storage medium
CN112152924A (zh) 一种在数据中心网络中转发报文的方法及相关装置
WO2019196914A1 (zh) 一种发现转发路径的方法及其相关设备
WO2023115367A1 (zh) 一种多协议数据传输方法及装置、网络和存储介质
US7796614B1 (en) Systems and methods for message proxying
US20230269164A1 (en) Method and apparatus for sending route calculation information, device, and storage medium

Legal Events

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

Ref document number: 22891515

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022891515

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022891515

Country of ref document: EP

Effective date: 20240430