WO2020156166A1 - 用于处理报文的方法和装置 - Google Patents
用于处理报文的方法和装置 Download PDFInfo
- Publication number
- WO2020156166A1 WO2020156166A1 PCT/CN2020/072174 CN2020072174W WO2020156166A1 WO 2020156166 A1 WO2020156166 A1 WO 2020156166A1 CN 2020072174 W CN2020072174 W CN 2020072174W WO 2020156166 A1 WO2020156166 A1 WO 2020156166A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- node
- function
- sid
- correspondence
- message
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/34—Source routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/741—Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Definitions
- This application relates to the field of communications, and more specifically, to methods and devices for processing messages in the field of communications.
- segment routing (SR) technology is used to forward packets, and the source node uses sequential segment identifiers (SID) as instructions To guide the forwarding of messages.
- SID segment identifiers
- the SID is composed of the locator field and the function field.
- the location field is the address prefix of the node and is used to identify Route to the node that needs to perform the function
- the function field is used to identify the network function that needs to be executed, and guide the forwarding of the message by using sequential segments as instructions.
- the message header needs to carry the SID of each node along the way in the SRH of the message.
- the present application provides a method and device for processing messages, which help improve system performance.
- a method for processing a message including: a first node determines a first message, and both the message header and the segment routing header SRH of the first message include a common segment identifier SID ,
- the shared SID is composed of a first address identifier and a first function identifier, the first address identifier is used to identify the address information of a terminating node, and the first function identifier is used to identify at least two nodes that need to perform the same First function
- the first node determines to execute the first function according to the first correspondence and the first function identifier, where the first correspondence is used to indicate that at least one function identifier corresponds to at least one function one-to-one, and the at least one function
- the function includes the first function.
- a shared SID in the SRH can replace the SID of each node in the multiple nodes, which can reduce the SID overhead, thereby saving bandwidth Resources help improve system performance.
- the first node determines to perform the first function, the first node performs the first function.
- the first correspondence is used to indicate that at least one function identifier corresponds to at least one function one-to-one.
- the SID may be a function identifier, or a network-wide unified function identifier may be used to identify the function.
- the specific content of the corresponding relationship is not limited, as long as the function can be identified.
- the first node may be a source node, an intermediate node, or a terminating node (that is, the last node on the forwarding path).
- the first function may be traffic rate limiting, operation administration and maintenance (OAM), or forwarding information database (FIB), etc.
- OAM operation administration and maintenance
- FIB forwarding information database
- the first correspondence is specifically used to indicate that at least one SID corresponds to at least one function one-to-one, and the at least one SID includes the shared SID; wherein, the first node corresponds to The determination of the relationship and the first function identifier to execute the first function includes: the first node determines to execute the first function according to the first correspondence and the shared SID.
- the first node locally stores the first corresponding relationship
- each node on the forwarding path stores its own corresponding relationship.
- the corresponding relationship of each node may be the same or different. This embodiment of the application does not make this difference. limited.
- the determining, by the first node, to execute the first function according to the first correspondence and the first functional segment identifier includes: the first node determining whether the first correspondence exists The first function identifier; if the first function identifier exists in the first correspondence, the first node determines to execute the first function according to the first correspondence and the first function identifier.
- the first node determines not to execute the first function.
- the method further includes:
- the first node determines that the value of the remaining segment (segments left, SL) in the SRH remains unchanged.
- the first node determining whether the first function identifier exists in the first correspondence includes: the first node determining whether the value of the remaining segment SL in the SRH is greater than 0 ; If the value of the SL is greater than 0, the first node determines whether the first function identifier exists in the first correspondence.
- the first function is traffic rate limiting, operation, management and maintenance, or searching forwarding tables.
- the method further includes: the first node follows the shortest path Forward the first message to a second node, where the at least two nodes include the first node and the second node.
- the first node is the source node
- the first node determining the first message includes: the first node receives the encapsulation configuration information sent by the controller; The encapsulation configuration information generates and encapsulates the first message.
- the first node is a terminating node, and determining the first message by the first node includes:
- the first node receives the first message sent by the last hop node; after the first node determines to execute the first function according to the first correspondence and the first function identifier, the method further The method includes: the first node decapsulates the first packet.
- a method for processing messages which can be executed by a controller, and the method includes at least one of the following steps:
- the controller determines multiple nodes on the forwarding path that perform the first function, and the multiple nodes include a source node, at least one intermediate node, and a termination node;
- the controller generates a common SID according to a first address identifier and a first function identifier, the first address identifier is used to identify address information of the terminating node, and the first function identifier is used to identify the first function;
- the controller sends encapsulation configuration information to the source node, where the encapsulation configuration information includes the shared SID, so that the source node generates the first message according to the encapsulation configuration information;
- the controller sends a common SID to each of the at least one intermediate node, so that each intermediate node saves the common SID.
- the controller sends decapsulation configuration information to the terminating node.
- the decapsulation configuration information may include a common SID.
- the decapsulation configuration information may not include the common SID.
- the several nodes may also be several nodes that do not perform the first function on the forwarding path, for example, the several nodes include terminal nodes.
- a device for processing a message includes a unit for executing each step in each aspect or any possible implementation manner of each aspect.
- a device for processing a message includes a transceiver, a memory, and a processor.
- the transceiver, the memory, and the processor communicate with each other through an internal connection path
- the memory is used to store instructions
- the processor is used to execute the instructions stored in the memory to control the receiver to receive signals and control the transmitter to send signals
- the execution causes the processor to execute the first aspect or the method in any one of the possible implementation manners of the first aspect.
- a computer program product includes a computer program.
- the computer program product includes a computer program.
- the computer program is executed by a processor, the computer program is used to execute each aspect or a method in any possible implementation manner of each aspect.
- a computer-readable storage medium stores a computer program, and when the computer program is executed, it is used to execute each aspect or the method in any possible implementation manner of each aspect .
- Figure 1 shows a schematic diagram of the forwarding mechanism of SRv6.
- Figure 2 shows a schematic diagram of the format of a shared SID provided by an embodiment of the present application.
- Fig. 3 shows a schematic diagram of a method for processing a message provided by an embodiment of the present application.
- Fig. 4 shows a schematic diagram of another method for processing a message provided by an embodiment of the present application.
- FIG. 5 shows a schematic diagram of another method for processing a message provided by an embodiment of the present application.
- FIG. 6 shows a schematic diagram of another method for processing a message provided by an embodiment of the present application.
- FIG. 7 shows a schematic diagram of another method for processing a message provided by an embodiment of the present application.
- FIG. 8 shows a schematic diagram of another method for processing a message provided by an embodiment of the present application.
- FIG. 9 shows a schematic diagram of another method for processing a message provided by an embodiment of the present application.
- FIG. 10 shows a schematic block diagram of an apparatus for processing a message provided by an embodiment of the present application.
- FIG. 11 shows a schematic block diagram of another apparatus for processing a message provided by an embodiment of the present application.
- IPv6 Internet protocol version 4, IPv4.
- Loc is used to represent the location (locator) field
- Funct is used to represent the function (function) field.
- the forwarding mechanism of SRv6 is shown in Figure 1.
- the SRv6 message includes three main parts, namely the IPv6 header, SRH, and load. The message should start from R1 and be forwarded to R4 along the path of R1-R2-R3-R4.
- the source address field of the IPv6 header is Loc1::Funct1, that is, Loc1::Funct1 is the SID of R1
- the destination address field is Loc2::Funct2, that is, Loc2::Funct2 is the SID of R2
- SRH Contains Loc2::Funct2, Loc3::Funct3 and Loc4::Funct4, that is, the SIDs of nodes R2, R3, and R4.
- the value of SL is 2, pointing to Loc2::Funct2; the payload part is IP data. Because the destination address is R2's SID, the message is forwarded to R2.
- the message After the message arrives at node R2, it executes the function represented by Funct2. After that, the SL value is reduced by one and the pointer points to Loc3::Funct3. The destination address field in the IPv6 header of the message is replaced with Loc3::Funct3, and other fields are not change. Because the destination address is R3's SID, the message is forwarded to R3.
- the function represented by Funct3 is executed. After that, the SL value is reduced by one, and the pointer points to Loc4::Funct4.
- the destination address field in the IPv6 header of the message is replaced with Loc4::Funct4, and other fields are not change. Because the destination address is R4's SID, the message is forwarded to R4.
- the above forwarding mechanism has the following problems:
- the SID of this node When performing a function on a node, the SID of this node must be placed in the SRH. When there are many nodes along the way, the scale of the SID in the SRH will increase, and a SID stack needs to be carried, which leads to a relatively large overhead, even if the path When all the nodes on the above perform the same function, the SID of each node still needs to be carried in the SRH, which will occupy more bandwidth resources and affect the performance of the system.
- the embodiment of the present application provides a message forwarding method and proposes a shared SID.
- SID When there are at least two nodes along the way that need to perform the same function, at least two nodes along the way can share one SID.
- 2 shows the format of the shared SID.
- the shared SID is composed of two parts, the L-bit address field (also called the Loc field) and the M-bit function field (also called the Funct field). L and M are positive integers, shared
- the address field of the SID is the address information of the end node of the message (for example, the entire address or the address prefix), and the function field is the identification of the network function that needs to be performed at the nodes along the way.
- the function field may also include a parameter (arguments, Args) field, which is a parameter that executes the function corresponding to the function field.
- the function corresponding to the function field is flow rate limit, and the parameter parameter may be the specific flow rate.
- the shared SID can be C4::100:500, where C4 is the address field, 100:500 is the function field, 100 is used to identify the flow rate limit function, and 500 indicates that the flow rate is limited to 500KB/s.
- L+M 128.
- the values of L and M can be set according to actual conditions, for example, L and M can be 64, that is, the length of the address field is the same as the length of the function field.
- the shared SID can be placed on the top of the SID stack, but at the same time, the embodiment of the present application does not limit the location of the shared SID in the SID stack.
- the address field and the function field describe the shared SID in the previous section.
- the bit value carried in the address field can be called an address identifier.
- the bit value carried in the function field can be called a function identifier.
- FIG. 3 shows a method 100 for processing a message provided by an embodiment of the present application, including:
- the first node determines a first message. Both the header of the first message and the SRH include a shared segment identifier SID.
- the shared SID is composed of a first address identifier and a first function identifier. An address identifier is used to identify address information of a terminating node, and the first function identifier is used to identify the same first function that at least two nodes need to perform.
- the shared SID is the destination address of the header of the first message.
- the message header of each node on the forwarding path that performs the same first function is the same.
- the source address of the message header is the address of the source node
- the destination address of the message header is the address of the terminating node.
- the first node determines to execute the first function according to the first correspondence and the first function identifier, where the first correspondence is used to indicate that at least one function identifier is in one-to-one correspondence with at least one function; optional
- the at least one function includes the first function.
- the first node may be the source node on the forwarding path and used to encapsulate the first packet; optionally, the first node may also be an intermediate node on the forwarding path and used to receive the packet from the previous hop node. And forward the message to the next hop node; optionally, the first node can also be the destination node on the forwarding path, and it can also be called the terminating node, which is used to receive the message from the previous hop node and resolve it. Encapsulate the message.
- the controller may centrally control each node on the forwarding path, and some nodes on the forwarding path may perform the same first function, and the remaining nodes may not perform the first function.
- the controller For nodes that perform the first function on the forwarding path, the controller generates a common SID for these nodes. For example, the controller generates a common SID according to the first address identifier and the first function identifier, and the controller sends the node performing the first function to the forwarding path.
- the source node sends package configuration information that includes the shared SID, so that the source node can generate the first message based on the shared SID, and the source node can save the shared SID and the correspondence between the functions identified by the shared SID Further, the controller can also send the shared SID to the intermediate node on the forwarding path that performs the first function, so that the intermediate node can save the corresponding relationship between the shared SID and the functions identified by the shared SID; the controller can also send The termination node on the forwarding path sends the decapsulation configuration information.
- the decapsulation configuration information may include a common SID, so that the termination node can save the common SID and the correspondence between the functions identified by the common SID, so that the termination The node can perform the function of the shared SID identification, and decapsulate the message according to the decapsulation configuration information.
- the controller may also send function identification to the source node, intermediate node, and termination node.
- the source node, intermediate node, and termination node may store the function identification and the corresponding relationship between the functions locally. In this way, the source node When the intermediate node and the terminating node are receiving the first message, they can determine that the corresponding function needs to be performed according to the function identifier of the shared SID in the SRH of the message, which is not repeated here in this embodiment of the application.
- the method 100 further includes: the first node forwards the first packet according to the shortest radial direction of the second node, and the at least two nodes include the The first node and the second node; if the first node is a terminating node, there is no need to continue forwarding the first message.
- the first node may execute method 100, and the first node may receive the package configuration information sent by the controller, where the controller controls the integration of each node in the network topology. ⁇ Controller.
- the first node may generate and encapsulate the first message according to the received encapsulation configuration information.
- the first node may decapsulate the first message according to the first message sent by the previous hop node, and after S120, the first node decapsulates.
- each node can store its own first correspondence locally, and this application only uses the first node as an example for description.
- Each function in at least one function has a corresponding identifier, which is called a function identifier.
- the function identifier may be an SID
- the first correspondence is used to indicate that each SID in the at least one SID and each of the at least one function
- Table 1 shows that three SIDs correspond to three Function, SID1 (Loc1::Funct1) corresponds to function 1, SID2 (Loc2::Funct2) corresponds to function 2, and shared SID (Loc::Funct) corresponds to function 3.
- the shared SID can be the SID shared by the nodes on the forwarding path,
- the function 3 corresponding to the shared SID is a function that needs to be performed by each node of at least two nodes. Assuming that N nodes on the forwarding path need to perform function 3, then each of the N nodes stores a similar third The content of the line. For another example, the first corresponding relationship is shown in Table 2.
- 100, 50, and 20 in the first column are the identification of each function, 100 is used to identify function 4, 50 is used to identify function 5, and 20 is used to identify function 6.
- function 4 is traffic rate limit
- function 5 is OAM
- function 6 is to find forwarding table.
- the header of the first message includes a shared SID
- the shared SID is composed of Loc::Funct, where Loc is the first address identifier, Funct is the first function identifier, and Loc is The address or address prefix of the destination node on the forwarding path, that is, the address or address prefix of the last node on the path. Funct identifies the same function that multiple nodes on the forwarding path need to perform. 3.
- the first node finds the local address based on the shared SID. In the table 1 of the message, it is determined that the function corresponding to the shared SID is function 3. Then the first node determines that function 3 needs to be performed, and then the first node performs function 3.
- the header of the first message includes a shared SID
- the shared SID is composed of Loc::Funct, where Loc is the first address identifier, Funct is the first function identifier, and Loc is The address or address prefix of the destination node on the forwarding path, that is, the address or address prefix of the last node on the path, Funct identifies the same function that multiple nodes on the forwarding path need to perform 3, the first node according to the function SID
- the first function identifier (Funct) looks up the table 2. Assuming that the first function identifier (Funct) is 100, the first node determines that the function 4 corresponding to 100 needs to be executed.
- the first correspondence is specifically used to indicate that at least one SID corresponds to at least one function one-to-one, and the at least one The SID includes the common SID.
- the first correspondence is used to indicate that at least one function identifier corresponds to at least one function one-to-one.
- both the header and SRH of the first message include a shared SID, where the shared SID in the header is the destination address.
- the first case includes the following process:
- the first node determines whether the value of SL in the SRH of the first packet is greater than 0.
- S230 If the value of SL in SRH is greater than 0, it needs to continue forwarding to the next node.
- the first node searches for a shared SID according to the locally stored SID list.
- the SID list here can also be referred to as the first correspondence. For example, it can be in the form of Table 1.
- S260 If the first node determines that there is no shared SID according to the locally stored SID list, the first node subtracts 1 from the SL value in the SRH, and the first node updates the destination address of the message header to the one pointed to by the SL minus 1. SID, that is, the SID pointed to after SL minus 1 is the target address.
- S270 The first node determines whether there is an SID in the destination address in the locally saved SID list (that is, the SID pointed by the SL minus 1), and if so, executes the function corresponding to the SID pointed by the SL minus 1.
- S280 If in S270, the locally saved SID list contains the SID in the destination address, the function corresponding to the SID is executed.
- the second case includes the following process:
- S310 The first node determines whether the value of the remaining segment (segment left, SL) in the SRH of the first packet is greater than 0.
- the first node searches for the first function identifier of the function SID according to the locally stored function identifier list.
- the function identifier list here can also be used. It is called the first correspondence, and may be in the form of Table 2, for example.
- S360 If the first node determines that the first function identifier does not exist according to the locally stored function identifier list, the first node subtracts 1 from the SL value in the SRH, and the first node updates the destination address of the message header to SL minus 1.
- the pointed SID that is, the SID pointed to after SL minus 1 is the target address.
- the first node determines whether the locally saved function identifier list has the function identifier of the SID in the destination address (that is, the SID pointed to by the SL minus 1).
- each node can advertise its own address information, such as address prefix information, that is, each node can advertise the address information corresponding to the address field of the SID in the SID list saved by itself. In this way, nodes in the network topology can determine the nodes on the shortest path according to the address information advertised by other nodes.
- address prefix information such as address prefix information
- Table 1 suppose that the first node stores Table 1 locally, where Loc1 and Loc2 are the address prefixes of the first node itself, and Loc is the address field of the shared SID, which also carries the address information of the terminating node. Therefore, The first node only advertises Loc1 and Loc2, but not Loc.
- the SRH of the first message includes a shared SID, and a shared SID is used instead of multiple SIDs.
- the scale of the SID can be reduced. Help reduce bandwidth resources, thereby improving system performance. If the size of the SID is reduced, the SID stack is also reduced, which will reduce the difficulty for the SP to read the SID stack. Further, in this application, it is not necessary to know in advance which nodes exist on the forwarding path, and multiple nodes can use a common SID to perform the corresponding first function, which improves the feasibility of forwarding messages.
- nodes on the forwarding path can perform functions such as traffic rate limiting, operation, management, and maintenance, or searching for forwarding tables.
- functions such as traffic rate limiting, operation, management, and maintenance, or searching for forwarding tables.
- the embodiments of the present application are not limited to this, and nodes on the forwarding path can also perform other functions.
- the first function is the flow rate limit
- the node on the forwarding path stores the SID list locally as an example.
- some nodes on the forwarding path need to perform the traffic rate limiting function.
- the aforementioned first node may be any node on the forwarding path.
- the data flow enters from the PE1 node, passes through the P1 node, the P2 node, and finally reaches the PE2 node.
- the traffic rate limiting function needs to be implemented on the PE1, P1 and P2 nodes.
- the IPv6 address prefix of the PE1 node is C1::/64
- the IPv6 address prefix of the P1 node is C2::/64
- the IPv6 address prefix of the P2 node is C3::/64
- the IPv6 address prefix of the PE2 node is C4::/ 64.
- the shared SID is C4::100:500, that is, the Loc field is C4 and the length is 64bit, which means that the address prefix of the terminating node (PE2) is C4::/64, and the Funct field is 100:500.
- the length is 64bit, which is the identification of the network function that needs to be performed on the nodes along the way, where 100 is the identification of the flow rate limit function, 500 is the Args field, that is, the parameter field, which refers to the flow limit of 500KB/s.
- the parameters are combined into the Funct field.
- the local SID list on the PE1 node stores SIDs such as C1::0, and its function is "local”, which refers to the most basic function, that is, it represents this endpoint.
- the local SID lists of the P1 node, P2 node, and PE2 node also store the corresponding SIDs, which are C2::0, C3::0 and C4::0, respectively, whose function is to represent this endpoint; and the PE2 node
- the upper storage C4::40, its function is "E.DX2 (End.DX2)", which means to strip the outer SRv6 header (including the outer IPv6 header and SRH), and perform Layer 2 forwarding, this function
- the egress node dedicated to SRv6 is used to strip SRv6 encapsulation and restore the original IPv6 data.
- PE1 node, P1 node and P2 node respectively store a shared SID, namely C4::100:500
- PE1 node, P1 node and P2 node need to implement flow rate limit when data flow is forwarded by this node, and the flow limit is 500KB/s.
- the PE1 node, P1 node, P2 node and PE2 node need to advertise the SID address prefix in the local SID list to other nodes, but the address prefix of the common SID is only advertised by the termination node (PE2), although the local SID list of other nodes contains the common SID, but not advertised, that is, the PE1 node advertises the address prefix C1::/64, the P1 node advertises the address prefix C2::/64, the P2 node advertises the address prefix C3::/64, and the PE2 node advertises the address prefix C4::/ 64.
- the packet encapsulates the SRv6 header at the PE1 node.
- First construct the SRH place the shared SID on the top of the SID stack of the SRH, and place the SID of PE2 behind the shared SID, that is, the content of the SRH is C4::100:500, C4::40.
- the rules for generating the destination address of the outer IPv6 header of SRv6 copy the top SID of the SRH stack, that is, the shared SID, to the destination address field of the message, as the destination address of the SRv6 message, the destination address field is C4::100 :500.
- the packet After the packet has encapsulated the SRv6 header on the PE1 node, first check whether the C4::100:500 in the destination address field matches in the local SID list of PE1.
- the search result is a match, that is, the PE1 node needs to perform traffic limit based on the shared SID Speed function, flow limit is 500KB/s.
- the message is forwarded at PE1 according to the Loc field of the shared SID, that is, C4::/64 look-up table.
- the message After the message arrives at the P1 node, first find out whether C4::100:500 in the destination address field matches in the P1 local SID list.
- the search result is a match, that is, the P1 node needs to perform the traffic rate limit function based on the shared SID ,
- the flow limit is 500KB/s.
- the message is forwarded at P1 according to the Loc field of the shared SID, that is, C4::/64 lookup table.
- the message After the message arrives at the P2 node, first find out whether C4::100:500 in the destination address field matches in the P2's local SID list.
- the search result is a match, that is, the P2 node needs to perform the traffic rate limit function based on the shared SID ,
- the flow limit is 500KB/s.
- the message is forwarded at P2 according to the Loc field of the shared SID, that is, C4::/64 look-up table.
- the packet After the packet arrives at the PE2 node, it first searches whether C4::100:500 in the destination address field matches in the local SID list of PE2. The search result does not match. The SL value is reduced by one, and the SID corresponding to the new SL in the SRH, namely C4::40, is copied to the destination address field. Then check whether C4::40 in the destination address field matches in the local SID list.
- the search result is a match, that is, the packet needs to strip the outer SRv6 header at the PE2 node and perform Layer 2 forwarding, that is, the PE2 node As the egress node, strip off the SRv6 package.
- the first function is inband operation administration and maintenance (iOAM), and the node on the forwarding path locally stores the SID list as an example.
- iOAM inband operation administration and maintenance
- the node on the forwarding path locally stores the SID list as an example.
- some nodes on the forwarding path need to perform iOAM functions.
- the aforementioned first node may be any node on the forwarding path.
- the data flow enters from the PE1 node, passes through the P1 node, the P2 node, and finally reaches the PE2 node. It is necessary to perform the associated OAM function on the PE1, P1 and P2 nodes.
- the IPv6 address prefix of the PE1 node is C1::/64
- the IPv6 address prefix of the P1 node is C2::/64
- the IPv6 address prefix of the P2 node is C3::/64
- the IPv6 address prefix of the PE2 node is C4::/ 64.
- the shared SID is C4::50, that is, the Loc field is C4 and the length is 64bit, which means that the address prefix of the terminating node (PE2) is C4::/64, the Funct field is 50, and the length is 64bit.
- PE2 address prefix of the terminating node
- the Funct field is 50
- the length is 64bit.
- the local SID list on the PE1 node stores SIDs such as C1::0, and its function is "local”, which refers to the most basic function, that is, it represents this endpoint.
- the local SID lists of the P1 node, P2 node, and PE2 node also store the corresponding SIDs, which are C2::0, C3::0 and C4::0, respectively, whose function is to represent this endpoint; and the PE2 node C4::40 is stored on the upper storage, and its function is "E.DX2 (End.DX2)", which refers to stripping the outer SRv6 header (including the outer IPv6 header and SRH) and performing Layer 2 forwarding.
- the egress node dedicated to SRv6 is used to strip SRv6 encapsulation and restore the original IPv6 data.
- PE1 node, P1 node and P2 node respectively store the shared SID, namely C4::50, PE1 node, P1 node and P2 node need to perform the associated OAM when the data flow is forwarded by the node, and identify the local node of the node Recorded in the message.
- the PE1 node, P1 node, P2 node and PE2 node need to advertise the SID address prefix in the local SID list to other nodes, but the address prefix of the common SID is only advertised by the termination node.
- the local SID list of other nodes contains the common SID, No notification is performed, that is, the PE1 node advertises the address prefix C1::/64, the P1 node advertises the address prefix C2::/64, the P2 node advertises the address prefix C3::/64, and the PE2 node advertises the address prefix C4::/64.
- the packet encapsulates the SRv6 header at the PE1 node.
- First construct the SRH place the shared SID at the top of the SID stack of the SRH, and place the SID of PE2 behind the shared SID, that is, the contents of the SRH are C4::50 and C4::40.
- the rules for generating the destination address of the outer IPv6 header of SRv6 copy the top SID of the SRH, that is, the shared SID, to the destination address field of the message, as the destination address of the SRv6 message, the destination address field is C4::50 .
- the packet After the packet has encapsulated the SRv6 header on the PE1 node, first check whether C4::50 in the destination address field matches in the local SID list of PE1.
- the search result is a match; that is, the PE1 node needs to perform the OAM function according to the shared SID.
- the local node ID of the node is recorded in the message.
- the message is forwarded at PE1 according to the Loc field of the shared SID, that is, C4::/64 look-up table.
- the P1 node After the message arrives at the P1 node, first find out whether C4::50 in the destination address matches in the P1 local SID list.
- the search result is a match, that is, the P1 node needs to perform the path-associated OAM function according to the shared SID, and the node The local node ID is recorded in the message.
- the message is forwarded at P1 according to the Loc field of the shared SID, that is, C4::/64 lookup table.
- the message After the message arrives at the P2 node, it first searches whether C4::50 in the destination address field matches in the P2's local SID list.
- the search result is a match, that is, the P2 node needs to perform the OAM function according to the shared SID.
- the local node identifier of the node is recorded in the message.
- the message is forwarded at P2 according to the Loc field of the shared SID, that is, C4::/64 look-up table.
- the message After the message arrives at the PE2 node, it first checks whether C4::50 in the destination address field matches in the local SID list of PE2. The search result is no match. The SL value is reduced by one, and the SID corresponding to the new SL in the SRH, namely C4::40, is copied to the destination address field. Then check whether C4::40 in the destination address field matches in the local SID list.
- the search result is a match, that is, the packet needs to strip the outer SRv6 header at the PE2 node and perform Layer 2 forwarding, that is, the PE2 node As an egress node, the SRv6 encapsulation is stripped, and at the same time, the node identifier of the node passing through the packet forwarding path can be extracted from the SRv6 header (for example, PE1, P1, P2 in Figure 7), so as to obtain the exact forwarding path of the node , Used for network diagnosis and other purposes.
- the first function is to look up the forwarding information database (FIB), and the SID list stored locally by the node on the forwarding path is described as an example.
- some nodes on the forwarding path need to perform the function of looking up the forwarding table.
- the aforementioned first node may be any node on the forwarding path.
- PE1 is connected to P1 and P3
- PE2 is connected to P2 and P4
- CE1 is connected
- the PE1 node and the CE2 node are connected to the PE2 node.
- the data stream enters from the PE1 node and flows out from the PE2 node.
- the PE1 node, PE2 node, P1 node, P2 node, P3 node and P4 node are for different data stream types (in this embodiment, voice data stream and video data stream are Example) Applicable to different FIBs, corresponding to different topologies.
- the IPv6 address prefix of the PE1 node is C1::/64
- the IPv6 address prefix of the P1 node is C2::/64
- the IPv6 address prefix of the P2 node is C3::/64
- the IPv6 address prefix of the P3 node is C4::/ 64.
- the IPv6 address prefix of the P4 node is C5::/64
- the IPv6 address prefix of the PE2 node is C6::/64.
- the shared SID is C6::20:1, that is, the Loc field is C6 and the length is 64 bits, which means that the address prefix of the destination node is C6::/64, the Funct field is 20:1, and the length is 64 bits.
- the function of searching the specified forwarding table is represented by "ET"; 1 is the arg field, which is the parameter The field refers to which FIB to find, 1 refers to the FIB of the voice data stream topology, and the function identifier and parameters are combined into the Funct field.
- the local SID list on the PE1 node stores SIDs such as C1::0, and its function is "End”, which refers to the most basic function, that is, represents this endpoint.
- the local SID list of P1 node, P2 node, P3 node, P4 node and PE2 node also stores the corresponding SID, which are C2::0, C3::0, C4::0, C5::0 and C6::0, its function is to represent this endpoint; and C6::40 is stored on the PE2 node, its function is "End.DX2", which refers to stripping the outer SRv6 header (including the outer IPv6 header and SRH ) And perform Layer 2 forwarding.
- PE1 node, P1 node, P2 node, P3 node and P4 node respectively store the shared SID, namely C6::20:1, PE1 node, P1 node, P2 node, P3 node and P4 node need to be in the data flow
- the node searches for the designated forwarding table when forwarding.
- the designated forwarding table is FIB_1, which is the FIB of the voice data flow topology.
- the PE1 node, P1 node, P2 node, P3 node, P4 node and PE2 node need to advertise the SID address prefix in the local SID list to other nodes, but the address prefix of the shared SID is only advertised by the destination node, and is in the local SID list of other nodes Although the shared SID is included, it is not advertised, that is, the PE1 node advertises the address prefix C1::/64, the P1 node advertises the address prefix C2::/64, the P2 node advertises the address prefix C3::/64, and the P3 node advertises the address prefix C4 ::/64, the P4 node advertises the address prefix C5::/64, and the PE2 node advertises the address prefix C6::/64.
- the packet encapsulates the SRv6 header at the PE1 node.
- First construct the SRH place the shared SID on the top of the SID stack of the SRH, and place the SID of PE2 behind the shared SID, that is, the contents of the SRH are C6::20:1 and C6::40.
- the generation rules of the destination address of the outer IPv6 header of SRv6 copy the top SID of the SRH stack, that is, the shared SID, to the destination address field of the message, as the destination address of the SRv6 message, the destination address field is C6::20 :1.
- the packet After the packet has encapsulated the SRv6 header on the PE1 node, first find out whether C6::20:1 in the destination address field matches in the local SID list of PE1.
- the search result is a match, that is, the PE1 node needs to perform a search based on the shared SID.
- Forwarding table function the FIB searched is the FIB corresponding to the voice data flow topology.
- the message is forwarded at PE1 according to the Loc field of the shared SID, that is, C6::/64, checking FIB_1.
- the topology corresponding to the voice data stream After the message arrives at the P1 node, first find whether the C6::20:1 in the destination address field matches in the local SID list of P1.
- the search result is a match, that is, the P1 node needs According to the shared SID, perform the function of searching the designated forwarding table, and the FIB searched is the FIB corresponding to the voice data stream topology.
- the message is forwarded at P1 according to the Loc field of the shared SID, that is, C6::/64, checking the FIB_1 table.
- the topology corresponding to the voice data stream after the message arrives at the P2 node, first find whether the C6::20:1 in the destination address field matches in the P2 local SID list.
- the search result is a match, that is, the P2 node needs According to the shared SID, perform the function of searching the designated forwarding table, and the FIB searched is the FIB corresponding to the voice data stream topology.
- the message is forwarded at P1 according to the Loc field of the shared SID, that is, C6::/64, checking the FIB_1 table.
- the packet After the packet reaches the PE2 node, it first searches for a match between C6::20:1 in the destination address field in the local SID list of PE2, and the search result is no match.
- the SL value is reduced by one, and the SID corresponding to the new SL in the SRH, namely C6::40, is copied to the destination address field. Then check whether C6::40 in the destination address field matches in the local SID list.
- the search result is a match, that is, the packet needs to strip the outer SRv6 header at the PE2 node and perform Layer 2 forwarding, that is, the PE2 node As the egress node, strip off the SRv6 package.
- the first function is the flow rate limit
- the node on the forwarding path locally stores the function identification list as an example.
- the function identification list is stored locally in the node.
- the function identification list is shown in Table 2.
- the content of the list is the identification code of the network function that the node can support and needs to be performed at the nodes along the way.
- This identification code should be uniform for the entire network, namely A network-wide uniform identification code should be assigned for each network function, as shown in Table 2.
- the identification code for traffic rate limit is 100
- the identification code for OAM is 50
- the identification code for searching the designated forwarding table (ET) is 20.
- Some network functions are not suitable for network functions performed at nodes along the way, such as decapsulation.
- the local SID list on the PE1 node stores SIDs such as C1::0, and its function is "local end", which refers to the most basic function, that is, represents the local end point.
- the local SID lists of the P1 and P2 nodes also store the corresponding SIDs, which are C2::0 and C3::0, respectively, whose function is to represent this endpoint; and the PE2 node stores C4::40, its function "E.DX2" refers to stripping the outer SRv6 header (including the outer IPv6 header and SRH) and performing Layer 2 forwarding. This function is dedicated to the SRv6 egress node and is used to strip the SRv6 encapsulation To restore the original IPv6 packet.
- the PE1 node, P1 node, P2 node and PE2 node need to advertise the address prefix of the SID in the local SID list to other nodes, that is, the PE1 node advertises the address prefix C1::/64, and the P1 node advertises the address prefix C2::/64, P2 The node advertises the address prefix C3::/64, and the PE2 node advertises the address prefix C4::/64.
- the PE1 node, P1 node, P2 node and PE2 node maintain and advertise the local function list to other nodes through IGP.
- the contents of the local function list of the PE1 node, the P1 node and the P2 node are the identification codes of the traffic rate limit, iOAM, and E.T, namely 100, 50 and 20.
- the data flow enters from the PE1 node, sequentially passes through the P1 node, the P2 node, and finally reaches the PE2 node.
- the traffic rate limiting function needs to be implemented on the PE1, P1, and P2 nodes.
- the IPv6 address prefix of the PE1 node is C1::/64
- the IPv6 address prefix of the P1 node is C2::/64
- the IPv6 address prefix of the P2 node is C3::/64
- the IPv6 address prefix of the PE2 node is C4::/ 64.
- the packet encapsulates the SRv6 header at the PE1 node.
- First construct SRH The Loc field of the SID at the top of the SRH stack is the address prefix of the PE2 node, and the Funct field is the identification code 100 of the traffic rate limit function, and carries the arg field, that is, the parameter field 500, which refers to the traffic limit of 500KB/s .
- Put the SID in the local SID list of PE2 behind the top SID of the stack, that is, the content of SRH is C4::100:500, C4::40.
- the packet After the packet has encapsulated the SRv6 header on the PE1 node, first check whether the Funct field 100 in the destination address C4::100:500 matches in the local function list.
- the search result is a match, that is, the data flow needs to perform traffic rate limiting along the way Function, and the PE1 node supports the flow rate limit function.
- the traffic is limited to 500KB/s, and the packet is forwarded at PE1 according to the Loc field of the SID of the destination address field, that is, C4::/64 table lookup.
- the message After the message reaches the P1 node, it first searches for a match in the Funct field 100 in the destination address C4::100:500 in the local function list.
- the search result is a match, that is, the data flow needs to perform the flow rate limit function along the way.
- P1 node supports the flow rate limit function.
- the flow is limited to 500KB/s, and the message is forwarded at P1 according to the Loc field of the SID of the destination address field, that is, C4::/64 look-up table.
- the P2 node After the message arrives at the P2 node, first find out whether the Funct field 100 in the destination address C4::100:500 matches in the local function list. The result of the search is a match, that is, the data flow needs to perform the flow rate limit function along the way. And the P2 node supports the flow rate limit function. The flow is limited to 500KB/s, and the message is forwarded at P2 according to the Loc field of the SID of the destination address field, that is, C4::/64 look-up table.
- the message After the message arrives at the PE2 node, it first searches whether the Funct field 100 in the destination address C4::100:500 matches in the local function list. The search result is no match. The SL value is reduced by one, and the SID corresponding to the new SL in the SRH, namely C4::40, is copied to the destination address field. Then check whether C4::40 in the destination address field matches in the local SID list. The search result is a match, that is, the packet needs to strip the outer SRv6 header at the PE2 node and perform Layer 2 forwarding, that is, the PE2 node As the egress node, strip off the SRv6 package.
- the search result is a match, that is, the packet needs to strip the outer SRv6 header at the PE2 node and perform Layer 2 forwarding, that is, the PE2 node As the egress node, strip off the SRv6 package.
- FIG. 10 shows a schematic block diagram of an apparatus 400 for processing packets provided by an embodiment of the present application.
- the apparatus 400 may correspond to the first node described in the foregoing method, or may correspond to the chip or component of the first node, and, Each module or unit in the apparatus 400 may be used to execute each action or processing procedure performed by the first node in the above method.
- the apparatus 400 for processing a message may include a first processing unit 410 And a second processing unit 420.
- the first processing unit 410 is configured to determine a first packet. Both the packet header and the segment routing header SRH of the first packet include a shared segment identifier SID, and the shared SID is identified by the first address and the first
- the function identifier is composed of, the first address identifier is used to identify the address information of the terminating node, and the first function identifier is used to identify the same first function that at least two nodes need to perform;
- the second processing unit 420 is configured to determine to execute the first function according to the first correspondence and the first function identifier, where the first correspondence is used to indicate that at least one function identifier is in one-to-one correspondence with at least one function.
- the first correspondence is specifically used to indicate that at least one SID has a one-to-one correspondence with at least one function, and the at least one SID includes the shared SID;
- the second processing unit 420 is specifically configured to determine to execute the first function according to the first correspondence and the shared SID.
- the second processing unit 420 is specifically configured to:
- the first function identifier exists in the first correspondence, it is determined to execute the first function according to the first correspondence and the first function identifier.
- the first processing unit 410 or the second processing unit 420 is further configured to: if the first function identifier exists in the first correspondence relationship, determine the remaining segments in the SRH The value of SL does not change.
- the second processing unit 420 is specifically configured to: determine whether the value of the remaining segment SL in the SRH is greater than 0; if the value of the SL is greater than 0, in the first correspondence Determine whether the first function identifier exists.
- the first function is traffic rate limiting, operation, management and maintenance, or searching forwarding tables.
- the device further includes:
- the first transceiving unit is configured to, after determining to execute the first function according to the first local correspondence and the first function identifier, forward the first message according to the shortest radial direction to the second node, the At least two nodes include the device and the second node.
- the device is a source node, and the device further includes:
- a second transceiver unit configured to receive package configuration information sent by the controller, where the package configuration information includes the common SID;
- the first processing unit is specifically configured to generate and encapsulate the first message according to the encapsulation configuration information.
- the device is a terminating node, and the device further includes:
- the third transceiver unit is configured to receive the first message sent by the previous hop node
- the first processing unit or the second processing unit is further configured to: decapsulate the first message after determining to execute the first function according to the first correspondence and the first function identifier.
- the apparatus 400 of each of the foregoing solutions has the function of implementing the corresponding steps executed by the first node in the foregoing method; the function may be implemented by hardware, or may be implemented by hardware executing corresponding software.
- the hardware or software includes one or more modules corresponding to the above-mentioned functions; for example, the sending unit can be replaced by a transmitter, the receiving unit can be replaced by a receiver, and other units, such as a determining unit, can be replaced by a processor, and each method is executed separately Transceiving operations and related processing operations in the embodiment.
- the processor can be used to perform, for example, but not limited to, baseband related processing
- the transceiver can be used to perform, for example, but not limited to, radio frequency transceiving.
- the above-mentioned devices may be arranged on separate chips, or at least partly or all of them may be arranged on the same chip.
- the processor can be further divided into an analog baseband processor and a digital baseband processor.
- the analog baseband processor and the transceiver can be integrated on the same chip, and the digital baseband processor can be set on a separate chip. With the continuous development of integrated circuit technology, more and more devices can be integrated on the same chip.
- a digital baseband processor can be combined with a variety of application processors (such as but not limited to graphics processors, multimedia processors, etc.) Integrated on the same chip.
- application processors such as but not limited to graphics processors, multimedia processors, etc.
- Such a chip may be called a system on chip (SOC).
- SOC system on chip
- an embodiment of the present application provides a schematic block diagram of an apparatus 500 for processing a message.
- the apparatus 500 includes a processor 510, a transceiver 520, and a memory 530.
- the processor 510, the transceiver 520, and the memory 530 communicate with each other through an internal connection path.
- the memory 530 is used to store instructions, and the processor 510 is used to execute the instructions stored in the memory 530 to control the transceiver 520 to send signals and / Or receive signal.
- the processor 510 is configured to determine a first message.
- the message header and the segment routing header SRH of the first message both include a shared segment identifier SID, and the shared SID is identified by a first address and a first function.
- the first address identifier is used to identify the address information of the terminating node, and the first function identifier is used to identify the same first function that at least two nodes need to perform;
- the processor 510 is further configured to The relationship and the first function identifier determine that the first function is executed, and the first correspondence relationship is used to indicate that at least one function identifier corresponds to at least one function one-to-one, and the at least one function includes the first function.
- the apparatus in FIG. 10 in the embodiment of the present application may be implemented by the apparatus 500 in FIG. 11, and may be used to execute each step and/or process corresponding to the first device in the foregoing method embodiment.
- the present application also provides a computer program product, the computer program product includes: computer program code, when the computer program code runs on a computer, the computer executes the method in the above embodiment .
- the various embodiments in this application can also be combined with each other.
- the present application also provides a computer-readable medium with a program code stored in the computer-readable interpretation, and when the program code runs on a computer, the computer executes the method in the above-mentioned embodiment .
- the foregoing method embodiments in the embodiments of the present application may be applied to a processor or implemented by a processor.
- the processor may be an integrated circuit chip with signal processing capabilities.
- the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
- the foregoing processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
- DSP digital signal processor
- ASIC application specific integrated circuit
- FPGA ready-made programmable gate array
- Programming logic devices discrete gates or transistor logic devices, discrete hardware components.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
- the steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
- the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
- the memory in the embodiments of the present application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
- the non-volatile memory can be read-only memory (ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), and electrically available Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
- the volatile memory may be random access memory (RAM), which is used as an external cache.
- RAM static RAM
- DRAM dynamic random access memory
- DRAM synchronous dynamic random access memory
- SDRAM synchronous dynamic random access memory
- double data rate Synchronous dynamic random access memory double data rate SDRAM, DDR SDRAM
- enhanced SDRAM enhanced synchronous dynamic random access memory
- SLDRAM synchronous connection dynamic random access memory
- direct memory bus random memory Take memory direct rambus RAM, DR RAM.
- the computer program product may include one or more computer instructions.
- the computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices.
- the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
- the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
- the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic disk), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)).
- the disclosed system, device, and method may be implemented in other ways.
- the device embodiments described above are merely illustrative.
- the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
- the technical solution of this application essentially or the part that contributes to the existing technology or the 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 are used 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 method described in each embodiment of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program code .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请提供了一种用于处理报文的方法,包括:第一节点确定第一报文,第一报文的报文头和段路由头部SRH都包括共用SID,所述共用SID由第一地址标识和第一功能标识组成,所述第一地址标识用于标识终结节点的地址信息,所述第一功能标识用于标识至少两个节点需要执行的相同的第一功能,若多个节点需要执行相同的第一功能,通过在SRH中的一个共用SID可以代替多个节点中每个节点的SID,这样可以减少SID的开销,从而可以节省带宽资源,有助于提高系统性能。
Description
本申请要求于2019年01月30日提交中国专利局、申请号为201910089083.9、申请名称为“用于处理报文的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信领域,并且更具体地,涉及通信领域中用于处理报文的方法和装置。
在当前的互联网协议的第六个版本(internet protocol version 6,IPv6)中,采用段路由(segment routing,SR)技术转发报文,源节点使用顺序的段标识符(segment identifier,SID)作为指令来指导报文的转发。在报文中,SID的集合称为段路由头部(segment routing header,SRH),SID由位置(locator)字段和功能(function)字段两个组成,位置字段为节点的地址前缀,用于标识路由到需要执行功能的节点,功能字段用于标识需要执行的网络功能,通过采用顺序的段作为指令来指导报文的转发。在路径上的每个节点需要执行相应的功能时,报文的报文头中需要在报文的SRH中携带沿途每个节点的SID,当路径上的节点较多时,SRH中的SID的规模就会增大,即使沿途的节点执行的是相同的功能,仍然需要在SRH中携带每个节点的SID,这样会增大开销,降低了网络带宽的利用率,从而影响系统的性能。
发明内容
本申请提供一种用于处理报文的方法和装置,有助于提高系统性能。
第一方面,提供了一种用于处理报文的方法,包括:第一节点确定第一报文,所述第一报文的报文头和段路由头部SRH都包括共用段标识符SID,所述共用SID由第一地址标识和第一功能标识组成,所述第一地址标识用于标识终结节点的地址信息,所述第一功能标识用于标识至少两个节点需要执行的相同的第一功能;
所述第一节点根据第一对应关系以及所述第一功能标识确定执行所述第一功能,所述第一对应关系用于指示至少一个功能标识与至少一个功能一一对应,所述至少一个功能包括所述第一功能。
因此,在本申请中,若多个节点需要执行相同的第一功能,通过在SRH中的一个共用SID可以代替多个节点中每个节点的SID,这样可以减少SID的开销,从而可以节省带宽资源,有助于提高系统性能。
需要说明的是,若所述第一节点确定执行所述第一功能,则所述第一节点执行第一功能。
在本申请中,第一对应关系用于指示至少一个功能标识与至少一个功能一一对应,例 如,SID可以是功能标识,或者可以采用全网统一的功能标识来标识功能,本申请对第一对应关系的具体内容不作限定,只要能够标识功能即可。
在本申请中,第一节点可以是源节点、中间节点或者终结节点(即转发路径上的最后一个节点)。
例如,第一功能可以是流量限速、操作管理维护(operation administration and maintenance,OAM)或查找转发表(forwarding information database,FIB)等。
在某些实现方式中,所述第一对应关系具体用于指示至少一个SID与至少一个功能一一对应,所述至少一个SID包括所述共用SID;其中,所述第一节点根据第一对应关系以及所述第一功能标识确定执行所述第一功能,包括:所述第一节点根据所述第一对应关系以及所述共用SID确定执行所述第一功能。
在本申请中,第一节点的本地保存有第一对应关系,转发路径上的每个节点都保存有自身的对应关系,每个节点的对应关系可以相同或者不同,本申请实施例对此不作限定。
在某些实现方式中,所述第一节点根据第一对应关系以及所述第一功能段标识确定执行所述第一功能,包括:所述第一节点确定所述第一对应关系中是否存在所述第一功能标识;若所述第一对应关系中存在所述第一功能标识,所述第一节点根据所述第一对应关系以及所述第一功能标识确定执行所述第一功能。
若所述第一对应关系中不存在所述第一功能标识,所述第一节点确定不执行所述第一功能。
在某些实现方式中,若所述第一对应关系中存在所述第一功能标识,所述方法还包括:
所述第一节点确定所述SRH中的剩余段(segments left,SL)的值不变。
在某些实现方式中,所述第一节点确定所述第一对应关系中是否存在所述第一功能标识,包括:所述第一节点确定所述SRH中的剩余段SL的值是否大于0;若所述SL的值大于0,所述第一节点在所述第一对应关系中确定是否存在所述第一功能标识。
在某些实现方式中,所述第一功能为流量限速、操作管理维护或查找转发表。
在某些实现方式中,在所述第一节点根据本地的第一对应关系以及所述第一功能标识确定执行所述第一功能之后,所述方法还包括:所述第一节点按照最短路径向第二节点转发所述第一报文,所述至少两个节点包括所述第一节点和所述第二节点。
在某些实现方式中,所述第一节点为源节点,所述第一节点确定第一报文,包括:所述第一节点接收控制器发送的封装配置信息;所述第一节点根据所述封装配置信息生成并封装所述第一报文。
在某些实现方式中,所述第一节点为终结节点,所述第一节点确定第一报文,包括:
所述第一节点接收上一跳节点发送的所述第一报文;在所述第一节点根据第一对应关系以及所述第一功能标识确定执行所述第一功能之后,所述方法还包括:所述第一节点解封装所述第一报文。
第二方面,提供了一种用于处理报文的方法,可以由控制器执行,该方法包括以下至少一个步骤:
控制器确定转发路径上执行第一功能的多个节点,多个节点包括源节点、至少一个中间节点和终结节点;
控制器根据第一地址标识和第一功能标识生成共用SID,所述第一地址标识用于标识 所述终结节点的地址信息,所述第一功能标识用于标识所述第一功能;
控制器向源节点发送封装配置信息,封装配置信息包括所述共用SID,以便于源节点根据所述封装配置信息生成第一报文;
控制器向所述至少一个中间节点中的每个中间节点发送共用SID,以便于每个中间节点保存共用SID。
控制器向终结节点发送解封装配置信息,可选地,该解封装配置信息可以包括共用SID,当然该解封装配置信息也可以不包括共用SID。
可选地,转发路径上也可以存在不执行第一功能的若干个节点,例如若干个节点包括终结节点。
第三方面,提供了一种用于处理报文的装置,该装置包括用于执行各方面或各方面任意可能的实现方式中的方法中各个步骤的单元。
第四方面,提供了一种用于处理报文的装置,该装置包括:收发器、存储器和处理器。其中,该收发器、该存储器和该处理器通过内部连接通路互相通信,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,以控制接收器接收信号,并控制发送器发送信号,并且当该处理器执行该存储器存储的指令时,该执行使得该处理器执行第一方面或第一方面的任一种可能的实现方式中的方法。
第五方面,提供了一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序在被处理器执行时,用于执行各方面或各方面的任意可能的实现方式中的方法。
第六方面,提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当该计算机程序被执行时,用于执行各方面或各方面的任意可能的实现方式中的方法。
图1示出了SRv6的转发机制的示意图。
图2示出了本申请实施例提供的共用SID的格式示意图。
图3示出了本申请实施例提供的用于处理报文的方法示意图。
图4示出了本申请实施例提供的另一用于处理报文的方法示意图。
图5示出了本申请实施例提供的又一用于处理报文的方法示意图。
图6示出了本申请实施例提供的又一用于处理报文的方法示意图。
图7示出了本申请实施例提供的又一用于处理报文的方法示意图。
图8示出了本申请实施例提供的又一用于处理报文的方法示意图。
图9示出了本申请实施例提供的又一用于处理报文的方法示意图。
图10示出了本申请实施例提供的用于处理报文的装置示意性框图。
图11示出了本申请实施例提供的又一用于处理报文的装置的示意性框图。
本申请实施例以IPv6协议举例进行说明,但本申请实施例不限于此,例如还可以用于互联网协议的第四个版本(internet protocol version 4,IPv4)等协议中。
为了方便描述,在本申请中,用Loc表示位置(locator)字段,用Funct表示功能(function)字段。
当SR技术采用IPv6协议时,为SRv6,SRv6的转发机制如图1所示,SRv6报文包括三个主要的部分,即IPv6头部,SRH,以及负载。报文要从R1开始,沿着R1-R2-R3-R4的路径转发到R4。报文从R1发出时,IPv6头部的源地址字段为Loc1::Funct1,即Loc1::Funct1为R1的SID,目的地址字段为Loc2::Funct2,即Loc2::Funct2为R2的SID;SRH包含Loc2::Funct2、Loc3::Funct3和Loc4::Funct4,即节点R2、R3和R4的SID,此时SL的值为2,指向Loc2::Funct2;负载部分为IP数据。因为目的地址为R2的SID,所以报文转发到R2。
报文到达节点R2后,执行Funct2所代表的功能,之后,SL值减一,指针指向Loc3::Funct3,报文的IPv6头部中的目的地址字段被替换为Loc3::Funct3,其他字段不变。因为目的地址为R3的SID,所以报文转发到R3。
报文到达节点R3后,执行Funct3所代表的功能,之后,SL值减一,指针指向Loc4::Funct4,报文的IPv6头部中的目的地址字段被替换为Loc4::Funct4,其他字段不变。因为目的地址为R4的SID,所以报文转发到R4。
以上的转发机制存在以下问题:
1、在某节点上执行功能时,必须在SRH中放置此节点的SID,当沿途节点较多时,SRH中的SID的规模就会增加,需要携带一个SID栈,从而导致开销比较大,即使路径上的所有节点都执行的是同一个功能时,仍然需要在SRH中携带每个节点的SID,这样会占用较多的带宽资源,从而影响系统的性能。
2、报文在源节点(R1)封装时,必须预先知道沿途有哪些节点,需要将沿途的节点的SID封装在SRH中,但是对于无法预知沿途节点的情况下,就不能实现报文转发,并且节点也没办法执行相应的功能。
3、当沿途的节点较多,导致SID栈较大时,网络处理器(network processor,NP)每次读取的长度固定的情况下,NP每次读取处理的字节数会小于SRH中SID栈的字节数,这样NP读取难度就会增加。
针对上述的问题,本申请实施例提供了一种报文转发方法,并提出了共用SID,当沿途存在至少两个节点需要执行相同的功能时,沿途的至少两个节点可以共用一个SID,图2示出了共用SID的格式,共用SID由两部分组成,L比特的地址字段(也称为Loc字段)和M比特的功能字段(也称为Funct字段),L和M为正整数,共用SID的地址字段为报文的终结节点的地址信息(例如可以是整个地址或者是地址前缀),功能字段为需要在沿途节点执行的网络功能的标识。可选地,功能字段还可以包括参数(arguments,Args)字段,即执行该功能字段对应的功能的参数,例如,该功能字段对应的功能为流量限速,参数参数可以是具体流量的速度是多少。例如,共用SID可以是C4::100:500,其中C4为地址字段,100:500为功能字段,100用于为流量限速功能的标识,500表示流量限制为500KB/s。可选地,L+M=128。L和M的取值可以根据实际情况设置,比如L和M可以为64,即地址字段的长度与功能字段的长度相同。可选地,可以将共用SID放置在SID栈的栈顶,但同时本申请实施例不限定共用SID的在SID栈的位置。
下面结合附图描述本申请实施例提供的用于处理报文的方法,前面是以地址字段和功能字段描述共用SID的,在实际中,承载在地址字段的比特值可以称之为地址标识,承载在功能字段的比特值可以称之为功能标识。
图3示出了本申请实施例提供的用于处理报文的方法100,包括:
S110,第一节点确定第一报文,所述第一报文的报文头和SRH都包括共用段标识符SID,所述共用SID由第一地址标识和第一功能标识组成,所述第一地址标识用于标识终结节点的地址信息,所述第一功能标识用于标识至少两个节点需要执行的相同的第一功能。
需要说明的是,共用SID为第一报文的报文头的目的地址。进一步地,转发路径上执行相同的第一功能的每个节点的报文头都相同,例如报文头的源地址为源节点的地址,报文头的目的地址为终结节点的地址,换句话说,若多个节点执行的是相同的功能,则多个节点接收到第一报文时,该第一报文的报文头都相同。
S120,所述第一节点根据第一对应关系以及所述第一功能标识确定执行所述第一功能,所述第一对应关系用于指示至少一个功能标识与至少一个功能一一对应;可选地,所述至少一个功能包括所述第一功能。
可选地,第一节点可以是转发路径上的源节点,用于封装第一报文;可选地,第一节点还可以是转发路径上的中间节点,用于接收上一跳节点的报文,并将报文转发到下一跳节点;可选地,第一节点还可以是转发路径上的目的节点,也可以称为终结节点,用于接收上一跳节点的报文,并解封装报文。
需要说明的是,在本申请实施例中,控制器可以集中控制转发路径上的各个节点,并且转发路径上的部分节点可以执行相同的第一功能,剩余部分节点可以不执行该第一功能。对于转发路径上执行该第一功能的节点,控制器为这些节点生成共用SID,例如,控制器根据第一地址标识和第一功能标识生成共用SID,控制器向转发路径上执行第一功能的源节点发送封装配置信息,该封装配置信息包括所述共用SID,这样源节点就可以根据共用SID生成第一报文,并且源节点可以保存共用SID以及该共用SID标识的功能之间的对应关系;进一步地,控制器还可以向转发路径上的执行第一功能的中间节点发送该共用SID,这样中间节点可以保存共用SID以该共用SID标识的功能之间的对应关系;控制器还可以向转发路径上的终结节点发送解封装配置信息,可选地,该解封装配置信息可以包括共用SID,这样终结节点可以保存该共用SID以及该共用SID标识的功能之间的对应关系,这样,终结节点可以执行该共用SID标识的功能,并根据解封装配置信息解封装该报文。
当然,在本申请实施例中,控制器还可以向源节点,中间节点以及终结节点发送功能标识,源节点、中间节点以及终结节点可以在本地保存功能标识和功能的对应关系,这样,源节点、中间节点和终结节点正在接收到第一报文时,可以根据报文的SRH中的共用SID的功能标识确定需要执行相应的功能,本申请实施例在此不再赘述。
若第一节点为源节点或者中间节点,则在S120之后,方法100还包括:所述第一节点按照最短路径向第二节点转发所述第一报文,所述至少两个节点包括所述第一节点和所述第二节点;若第一节点为终结节点,则不需要继续转发该第一报文。
可选地,若第一节点为源节点,第一节点可以执行方法100之外,第一节点可以接收控制器发送的封装配置信息,这里的控制器为控制网络拓扑结构中的各个节点的整网控制器。第一节点可以根据接收到的封装配置信息生成并封装该第一报文。相应地,若第一节点为终结节点,则第一节点可以根据上一跳节点发送的所述第一报文,并S120之后,所 述第一节点解封装所述第一报文。
需要说明的是,每个节点可以在本地保存自身的第一对应关系,本申请仅以第一节点为例描述。至少一个功能中每个功能都存在一个对应的标识,称之为功能标识,例如,功能标识可以是SID,则第一对应关系用于指示至少一个SID中每个SID与至少一个功能中每个功能一一对应,举例来说,假设第一对应关系如表1所示,第一列为每个SID,第二列为每个SID对应的功能,表1示出了三个SID对应三个功能,SID1(Loc1::Funct1)对应功能1,SID2(Loc2::Funct2)对应功能2,共用SID(Loc::Funct)对应功能3,其中共用SID可以是转发路径上的节点共用的SID,共用SID对应的功能3为至少两个节点每个节点都需要执行的功能,假设转发路径上的N个节点都需要执行功能3,则N个节点中每个节点的本地都保存有类似第三行的内容。又例如,第一对应关系如表2所示,第一列的100,50,20为每个功能的标识,用100来标识功能4,用50来标识功能5,用20来标识功能6,例如,功能4为流量限速,功能为5为OAM,功能6为查找转发表。
表1
Loc1::Funct1(SID1) | 功能1 |
Loc2::Funct2(SID2) | 功能2 |
Loc::Funct(共用SID) | 功能3 |
…… | …… |
表2
100 | 功能4 |
50 | 功能5 |
20 | 功能6 |
…… | …… |
例如,假设第一对应关系为表1,第一报文的报文头包括共用SID,共用SID由Loc::Funct组成,其中,Loc为第一地址标识,Funct为第一功能标识,Loc为转发路径上目的节点的地址或者地址前缀,也即路径上的最后一个节点的地址或者地址前缀,Funct标识转发路径上的多个节点需要执行的相同的功能3,第一节点根据共用SID查找本地报文的表1,确定共用SID对应的功能为功能3,则第一节点确定需要执行功能3,则第一节点执行功能3。
例如,假设第一对应关系为表2,第一报文的报文头包括共用SID,共用SID由Loc::Funct组成,其中,Loc为第一地址标识,Funct为第一功能标识,Loc为转发路径上目的节点的地址或者地址前缀,也即路径上的最后一个节点的地址或者地址前缀,Funct标识转发路径上的多个节点需要执行的相同的功能3,第一节点根据功能SID中的第一功能标识(Funct)查找表2,假设第一功能标识(Funct)为100,则第一节点确定需要执行100对应的功能4。
下面分两种情况描述本申请实施例提供的用于处理报文的方法,第一种情况,所述第一对应关系具体用于指示至少一个SID与至少一个功能一一对应,所述至少一个SID包括 所述共用SID。第二种情况,所述第一对应关系用于指示至少一个功能标识与至少一个功能一一对应。在第一种情况和第二种情况下,第一报文的报文头和SRH都包括共用SID,其中,报文头的共用SID为目的地址。
第一种情况,如图4所示,包括以下过程:
S210,第一节点确定第一报文的SRH中的SL的取值是否大于0。
S220,若SRH中SL的取值等于0,当前节点为最后一个节点,不需要转发,需要进行解封装操作。
S230,若SRH中SL的取值大于0,则还需要往下一个节点继续转发,第一节点根据本地保存的SID列表查找是否存在共用SID,这里的SID列表也可以称为第一对应关系,例如可以是表1的形式。
S240,若第一节点根据本地保存的SID列表确定存在共用的SID,则第一节点确定该共用的SID对应的功能,,则第一节点执行该功能。并且此时,第一报文的SRH中的SL值不变。
S250,在执行完S240之后,第一节点按照报文头的目的地址的地址段(Loc段)所代表的地址继续转发报文。
S260,若第一节点根据本地保存的SID列表确定不存在共用的SID,则第一节点将SRH中的SL值减1,第一节点将报文头的目的地址更新为SL减1后指向的SID,即SL减1后指向的SID为目标地址。
S270,第一节点确定本地保存的SID列表是否存在目的地址中的SID(即SL减1后指向的SID),若存在,则执行该SL减1后指向的SID对应的功能。S280,若S270中,本地保存的SID列表存在目的地址中的SID,则执行该SID对应的功能。
S290,若S270中,本地保存的SID列表中不存在目的地址中的SID,则第一节点按照目的地址转发第一报文。
第二种情况,如图5所示,包括以下过程:
S310,第一节点确定第一报文的SRH中的剩余段(segment left,SL)的取值是否大于0。
S320,若SRH中SL的取值小于或等于0,当前节点为最后一个节点,不需要转发,则丢弃该第一报文。
S330,若SRH中SL的取值大于0,则还需要往下一个节点继续转发,第一节点根据本地保存的功能标识列表查找是否存在功能SID的第一功能标识,这里的功能标识列表也可以称为第一对应关系,例如可以是表2的形式。
S340,若第一节点根据本地保存的功能标识列表确定存在第一功能标识,第一节点确定该第一功能标识对应的功能,则第一节点执行该功能。并且此时,第一报文的SRH中的SL值不变。
S350,在执行完S340之后,第一节点按照报文头的目的地址的地址段(Loc段)所代表的地址继续转发报文。
S360,若第一节点根据本地保存的功能标识列表确定不存在第一功能标识,则第一节点将SRH中的SL值减1,第一节点将报文头的目的地址更新为SL减1后指向的SID,即SL减1后指向的SID为目标地址。
S370,第一节点确定本地保存的功能标识列表是否存在目的地址中的SID(即SL减1后指向的SID)的功能标识。
S380,若S370中,本地保存的功能标识列表存在目的地址中的SID的功能标识,则执行该功能标识对应的功能。
S390,若S370中,本地保存的功能标识列表不存在目的地址中的SID的功能标识,则按照目的地址转发第一报文。
需要说明的是,网络拓扑结构中,每个节点可以通告自身的地址信息,例如地址前缀信息,也即每个节点可以将自身保存的SID列表中的SID的地址字段对应的地址信息通告出去,这样,网络拓扑结构中的节点可以根据其他节点通告的地址信息确定最短路径上的节点。但是,在本申请中,对于任何一个节点,若本地保存的SID列表中有共用的SID,由于共用SID的地址字段承载着终结节点的地址信息,而不是节点自身的地址信息,因此,节点不需要通告共用SID对应的终结节点的地址信息。以表1为例,假设第一节点本地保存有表1,其中,Loc1和Loc2为第一节点自身的地址前缀,Loc为共用SID的地址字段,也即承载着终结节点的地址信息,因此,第一节点只通告Loc1和Loc2,而不通告Loc。
因此,本申请实施例中,若多个节点执行的是相同的第一功能,第一报文的SRH中包括共用SID,利用一个共用SID代替多个SID,这样,可以减少SID的规模,有助于降低带宽资源,从而提升系统性能。若SID的规模减小,则SID栈也随之减小,这样会降低SP读取SID栈的难度。进一步地,本申请中,可以不需预先知道转发路径上存在哪些节点,利用多个节点可以利用一个共用SID就可能执行相应的第一功能,提高了转发报文的可行性。
下面结合图6至图9进行详细的举例说明本申请实施例中的用于处理报文的方法。下面的例子以转发路径上的节点可以执行流量限速、操作管理维护或查找转发表等功能进行说明,但是本申请实施例不限于此,转发路上的节点还可以执行其他的功能。
第一个例子
第一个例子以第一功能为流量限速,转发路径上的节点本地保存的是SID列表为例进行描述。该例子中转发路径上的部分节点需要执行流量限速功能。前述的第一节点可以是转发路径上的任何一个节点。
如图6所示的网络拓扑图中,数据流从PE1节点进入,依次经过P1节点,P2节点,最终到达PE2节点,需要在PE1,P1和P2节点上执行流量限速功能。PE1节点的IPv6地址前缀为C1::/64,P1节点的IPv6地址前缀为C2::/64,P2节点的IPv6地址前缀为C3::/64,PE2节点的IPv6地址前缀为C4::/64。
在该例中,共用SID为C4::100:500,即Loc字段为C4,长度为64bit,指的是终结节点(PE2)的地址前缀为C4::/64,Funct字段为100:500,长度为64bit,为需要在沿途节点上执行的网络功能的标识,其中100为流量限速功能的标识,500为Args字段,即参数字段,指的是流量限制为500KB/s,功能的标识与参数合起来为Funct字段。
PE1节点上的本地SID列表中存储了C1::0等SID,其功能是“本端”,指的是最基本的功能,即代表本端点。同样,P1节点,P2节点,和PE2节点的本地SID列表中也存储了对应的SID,分别为C2::0,C3::0和C4::0,其功能为代表本端点;并且PE2节点上存储C4::40,其功能是“E.DX2(End.DX2)”,指的是剥去外层的SRv6头部(包括外层IPv6 报头和SRH),并执行二层转发,此功能专用于SRv6的出口节点,用于剥掉SRv6的封装,还原原始的IPv6数据。同时,PE1节点,P1节点和P2节点上分别存储了共用SID,即C4::100:500,PE1节点,P1节点和P2节点需要在数据流于本节点转发时执行流量限速,流量限制为500KB/s。
PE1节点,P1节点,P2节点和PE2节点需要向其他节点通告本地SID列表中的SID地址前缀,但共用SID的地址前缀仅由终结节点(PE2)通告,其他节点的本地SID列表中虽然包含共用SID,但不进行通告,即PE1节点通告地址前缀C1::/64,P1节点通告地址前缀C2::/64,P2节点通告地址前缀C3::/64,PE2节点通告地址前缀C4::/64。
报文在PE1节点处封装SRv6的报头。首先构建SRH,将共用SID置于SRH的SID栈的栈顶,将PE2的SID置于共用SID的后面,即SRH的内容为C4::100:500,C4::40。根据SRv6的外层IPv6报头的目的地址的生成规则,将SRH的栈顶SID,即共用SID复制到报文的目的地址字段,作为SRv6报文的目的地址,则目的地址字段为C4::100:500。
报文在PE1节点封装了SRv6报头之后,首先查找目的地址字段中的C4::100:500在PE1的本地SID列表中是否匹配,查找结果为有匹配,即PE1节点需要根据共用SID执行流量限速功能,流量限制为500KB/s。报文在PE1处按照共用SID的Loc字段,即C4::/64查表转发。
报文在到达了P1节点之后,首先查找目的地址字段中的C4::100:500在P1的本地SID列表中是否匹配,查找结果为有匹配,即P1节点需要根据共用SID执行流量限速功能,流量限制为500KB/s。报文在P1处按照共用SID的Loc字段,即C4::/64查表转发。
报文在到达了P2节点之后,首先查找目的地址字段中的C4::100:500在P2的本地SID列表中是否匹配,查找结果为有匹配,即P2节点需要根据共用SID执行流量限速功能,流量限制为500KB/s。报文在P2处按照共用SID的Loc字段,即C4::/64查表转发。
报文在到达了PE2节点之后,首先查找目的地址字段中的C4::100:500在PE2的本地SID列表中是否匹配,查找结果没有匹配。将SL值减一,将新的SL在SRH中对应的SID,即C4::40复制到目的地址字段。然后查找目的地址字段中的C4::40在本地SID列表中是否匹配,查找结果为有匹配,即报文需要在PE2节点剥去外层的SRv6头部,并执行二层转发,即PE2节点为出口节点,剥去SRv6的封装。
第二个例子
第二个例子以第一功能为随路操作管理维护(inband operation administration and maintenance,iOAM),转发路径上的节点本地保存的是SID列表为例进行描述。该例子中转发路径上的部分节点需要执行iOAM功能。前述的第一节点可以是转发路径上的任何一个节点。
如图7所示的网络拓扑图中,数据流从PE1节点进入,依次经过P1节点,P2节点,最终到达PE2节点,需要在PE1,P1和P2节点上执行随路OAM功能。PE1节点的IPv6地址前缀为C1::/64,P1节点的IPv6地址前缀为C2::/64,P2节点的IPv6地址前缀为C3::/64,PE2节点的IPv6地址前缀为C4::/64。
在本实施例中,共用SID为C4::50,即Loc字段为C4,长度为64bit,指的是终结节点(PE2)的地址前缀为C4::/64,Funct字段为50,长度为64bit,为需要在沿途节点上执行的网络功能的标识,50为随路OAM功能的标识,将节点本地的节点标识记录在报文中。
PE1节点上的本地SID列表中存储了C1::0等SID,其功能是“本端”,指的是最基本的功能,即代表本端点。同样,P1节点,P2节点,和PE2节点的本地SID列表中也存储了对应的SID,分别为C2::0,C3::0和C4::0,其功能为代表本端点;并且PE2节点上存储C4::40,其功能是“E.DX2(End.DX2)”,指的是剥去外层的SRv6头部(包括外层IPv6报头和SRH),并执行二层转发,此功能专用于SRv6的出口节点,用于剥掉SRv6的封装,还原原始的IPv6数据。同时,PE1节点,P1节点和P2节点上分别存储了共用SID,即C4::50,PE1节点,P1节点和P2节点需要在数据流在于节点转发时执行随路OAM,将节点的本地节点标识记录在报文中。
PE1节点,P1节点,P2节点和PE2节点需要向其他节点通告本地SID列表中的SID地址前缀,但共用SID的地址前缀仅由终结节点通告,其他节点的本地SID列表中虽然包含共用SID,但不进行通告,即PE1节点通告地址前缀C1::/64,P1节点通告地址前缀C2::/64,P2节点通告地址前缀C3::/64,PE2节点通告地址前缀C4::/64。
报文在PE1节点处封装SRv6的报头。首先构建SRH,将共用SID置于SRH的SID栈的栈顶,将PE2的SID置于共用SID的后面,即SRH的内容为C4::50,C4::40。根据SRv6的外层IPv6报头的目的地址的生成规则,将SRH的栈顶SID,即共用SID复制到报文的目的地址字段,作为SRv6报文的目的地址,则目的地址字段为C4::50。
报文在PE1节点封装了SRv6报头之后,首先查找目的地址字段中的C4::50在PE1的本地SID列表中是否匹配,查找结果为有匹配;即PE1节点需要根据共用SID执行随路OAM功能,将节点的本地节点标识记录在报文中。报文在PE1处按照共用SID的Loc字段,即C4::/64查表转发。
报文在到达了P1节点之后,首先查找目的地址中的C4::50在P1的本地SID列表中是否匹配,查找结果为有匹配,即P1节点需要根据共用SID执行随路OAM功能,将节点的本地节点标识记录在报文中。报文在P1处按照共用SID的Loc字段,即C4::/64查表转发。
报文在到达了P2节点之后,首先查找目的地址字段中的C4::50在P2的本地SID列表中是否匹配,查找结果为有匹配,即P2节点需要根据共用SID执行随路OAM功能,将节点的本地节点标识记录在报文中。报文在P2处按照共用SID的Loc字段,即C4::/64查表转发。
报文在到达了PE2节点之后,首先查找目的地址字段中的C4::50在PE2的本地SID列表中是否匹配,查找结果为没有匹配。将SL值减一,将新的SL在SRH中对应的SID,即C4::40复制到目的地址字段。然后查找目的地址字段中的C4::40在本地SID列表中是否匹配,查找结果为有匹配,即报文需要在PE2节点剥去外层的SRv6头部,并执行二层转发,即PE2节点为出口节点,剥去SRv6的封装,同时,可以从SRv6报头中提取报文转发路径上经过的节点的节点标识(例如,图7中的PE1,P1,P2),从而获得节点确切的转发路径,用于网络诊断等目的。
第三个例子
第三个例子以第一功能为查找转发表(forwarding information database,FIB),转发路径上的节点本地保存的是SID列表为例进行描述。该例子中转发路径上的部分节点需要执行查找转发表的功能。前述的第一节点可以是转发路径上的任何一个节点。
如图8所示的网络拓扑图中,P1节点,P2节点,P3节点和P4节点两两之间互连,PE1节点连接P1节点和P3节点,PE2节点连接P2节点和P4节点,CE1节点连接PE1节点,CE2节点连接PE2节点。数据流从PE1节点进入,从PE2节点流出,PE1节点,PE2节点,P1节点,P2节点,P3节点和P4节点上针对不同的数据流种类(本实施例中举语音数据流和视频数据流为例)适用不同的FIB,对应不同的拓扑。PE1节点的IPv6地址前缀为C1::/64,P1节点的IPv6地址前缀为C2::/64,P2节点的IPv6地址前缀为C3::/64,P3节点的IPv6地址前缀为C4::/64,P4节点的IPv6地址前缀为C5::/64,PE2节点的IPv6地址前缀为C6::/64。
在实施例中,共用SID为C6::20:1,即Loc字段为C6,长度为64bit,指的是目的节点的地址前缀为C6::/64,Funct字段为20:1,长度为64bit,为需要在沿途节点上执行的网络功能的标识,其中20为查找指定转发表功能的标识,本申请中,将查找指定转发表的功能用“E.T”来表示;1为arg字段,即参数字段,指的是查找哪个FIB,1指的是语音数据流拓扑的FIB,功能的标识与参数合起来为Funct字段。
PE1节点上的本地SID列表中存储了C1::0等SID,其功能是“本端(End)”,指的是最基本的功能,即代表本端点。同样,P1节点,P2节点,P3节点,P4节点和PE2节点的本地SID列表中也存储了对应的SID,分别为C2::0,C3::0,C4::0,C5::0和C6::0,其功能为代表本端点;并且PE2节点上存储C6::40,其功能是“End.DX2”,指的是剥去外层的SRv6头部(包括外层IPv6报头和SRH),并执行二层转发,此功能专用于SRv6的出口节点,用于剥掉SRv6的封装,还原原始的IPv6报文。同时,PE1节点,P1节点,P2节点,P3节点和P4节点上分别存储了共用SID,即C6::20:1,PE1节点,P1节点,P2节点,P3节点和P4节点需要在数据流于本节点转发时执行查找指定转发表,指定的转发表为FIB_1,即语音数据流拓扑的FIB。
PE1节点,P1节点,P2节点,P3节点,P4节点和PE2节点需要向其他节点通告本地SID列表中的SID地址前缀,但共用SID的地址前缀仅由目的节点通告,其他节点的本地SID列表中虽然包含共用SID,但不进行通告,即PE1节点通告地址前缀C1::/64,P1节点通告地址前缀C2::/64,P2节点通告地址前缀C3::/64,P3节点通告地址前缀C4::/64,P4节点通告地址前缀C5::/64,PE2节点通告地址前缀C6::/64。
报文在PE1节点处封装SRv6的报头。首先构建SRH,将共用SID置于SRH的SID栈的栈顶,将PE2的SID置于共用SID的后面,即SRH的内容为C6::20:1,C6::40。根据SRv6的外层IPv6报头的目的地址的生成规则,将SRH的栈顶SID,即共用SID复制到报文的目的地址字段,作为SRv6报文的目的地址,则目的地址字段为C6::20:1。
报文在PE1节点封装了SRv6报头之后,首先查找目的地址字段中的C6::20:1在PE1的本地SID列表中是否匹配,查找结果为有匹配,即PE1节点需要根据共用SID执行查找指定转发表功能,所查找的FIB为语音数据流拓扑对应的FIB。报文在PE1处按照共用SID的Loc字段,即C6::/64查FIB_1转发。
按照语音数据流对应的拓扑,报文在到达了P1节点之后,首先查找目的地址字段中的C6::20:1在P1的本地SID列表中是否匹配,查找结果为有匹配,即P1节点需要根据共用SID执行查找指定转发表功能,所查找的FIB为语音数据流拓扑对应的FIB。报文在P1处按照共用SID的Loc字段,即C6::/64查FIB_1表转发。
按照语音数据流对应的拓扑,报文在到达了P2节点之后,首先查找目的地址字段中的C6::20:1在P2的本地SID列表中是否匹配,查找结果为有匹配,即P2节点需要根据共用SID执行查找指定转发表功能,所查找的FIB为语音数据流拓扑对应的FIB。报文在P1处按照共用SID的Loc字段,即C6::/64查FIB_1表转发。
报文在到达了PE2节点之后,首先查找目的地址字段中的C6::20:1在PE2的本地SID列表中是否匹配,查找结果为没有匹配。将SL值减一,将新的SL在SRH中对应的SID,即C6::40复制到目的地址字段。然后查找目的地址字段中的C6::40在本地SID列表中是否匹配,查找结果为有匹配,即报文需要在PE2节点剥去外层的SRv6头部,并执行二层转发,即PE2节点为出口节点,剥去SRv6的封装。
第四个例子,
第四个例子以第一功能为流量限速,转发路径上的节点本地保存的是功能标识列表为例进行描述。功能标识列表存储在节点本地,例如,功能标识列表如表2所示,列表内容为本节点可以支持的需要在沿途节点执行的网络功能的标识码,此标识码应该为全网统一的,即应该为每一种网络功能定一个全网统一的标识码,如表2所示,比如流量限速的标识码为100,OAM的标识码为50,查找指定转发表(E.T)的标识码为20。有些网络功能不是适合在沿途节点执行的网络功能,比如解封装等。如图9所示,PE1节点上的本地SID列表中存储了C1::0等SID,其功能是“本端”,指的是最基本的功能,即代表本端点。同样,P1节点和P2节点的本地SID列表中也存储了对应的SID,分别为C2::0和C3::0,其功能为代表本端点;并且PE2节点上存储C4::40,其功能是“E.DX2”,指的是剥去外层的SRv6头部(包括外层IPv6报头和SRH),并执行二层转发,此功能专用于SRv6的出口节点,用于剥掉SRv6的封装,还原原始的IPv6报文。
PE1节点,P1节点,P2节点和PE2节点需要向其他节点通告本地SID列表中的SID的地址前缀,即PE1节点通告地址前缀C1::/64,P1节点通告地址前缀C2::/64,P2节点通告地址前缀C3::/64,PE2节点通告地址前缀C4::/64。
PE1节点,P1节点,P2节点和PE2节点维护并通过IGP向其他节点通告本地功能列表。其中PE1节点,P1节点和P2节点的本地功能列表内容为流量限速、iOAM、E.T的标识码,即100,50和20。
如图9所示,数据流从PE1节点进入,依次经过P1节点,P2节点,最终到达PE2节点,需要在PE1,P1和P2节点上执行流量限速功能。PE1节点的IPv6地址前缀为C1::/64,P1节点的IPv6地址前缀为C2::/64,P2节点的IPv6地址前缀为C3::/64,PE2节点的IPv6地址前缀为C4::/64。
报文在PE1节点处封装SRv6的报头。首先构建SRH,SRH栈顶的SID的Loc字段为PE2节点的地址前缀,Funct字段为流量限速功能的标识码100,同时携带arg字段,即参数字段500,指的是流量限制为500KB/s。将PE2的本地SID列表中的SID置于栈顶SID的后面,即SRH的内容为C4::100:500,C4::40。根据SRv6的外层IPv6报头的目的地址的生成规则,将SRH的栈顶SID复制到报文的目的地址字段,作为SRv6报文的目的地址,则目的地址字段为C4::100:500。
报文在PE1节点封装了SRv6报头之后,首先查找目的地址C4::100:500中的Funct字段100在本地功能列表中是否匹配,查找结果为有匹配,即数据流需要在沿途执行流量 限速功能,并且PE1节点支持流量限速功能。流量限制为500KB/s,报文在PE1处按照目的地址字段的SID的Loc字段,即C4::/64查表转发。
报文在到达了P1节点之后,首先查找目的地址C4::100:500中的Funct字段100在本地功能列表中是否匹配,查找结果为有匹配,即数据流需要在沿途执行流量限速功能,并且P1节点支持流量限速功能。流量限制为500KB/s,报文在P1处按照目的地址字段的SID的Loc字段,即C4::/64查表转发。
报文在到达了P2节点之后,首先查找目的地址C4::100:500中的Funct字段100在本地功能列表中是否匹配,查找结果为有匹配,即数据流需要在沿途执行流量限速功能,并且P2节点支持流量限速功能。流量限制为500KB/s,报文在P2处按照目的地址字段的SID的Loc字段,即C4::/64查表转发。
报文在到达了PE2节点之后,首先查找目的地址C4::100:500中的Funct字段100在本地功能列表中是否匹配,查找结果为没有匹配。将SL值减一,将新的SL在SRH中对应的SID,即C4::40复制到目的地址字段。然后查找目的地址字段中的C4::40在本地SID列表中是否匹配,查找结果为有匹配,即报文需要在PE2节点剥去外层的SRv6头部,并执行二层转发,即PE2节点为出口节点,剥去SRv6的封装。
在第四个例子中,将报文的SRH中的栈顶SID(目的地址SID)的Funct字段部分替换为50,就可以实现类似于第二个例子中的随路OAM功能;替换为20,就可以实现类似于第三个例子中的查找指定转发表的功能。
以上结合图1至图9,详细得描述了本申请实施例提供的用于处理报文的方法,下面结合图10至图11,详细描述本申请实施例提供的用于处理报文的装置。
图10示出了本申请实施例提供用于处理报文的装置400的示意性框图,该装置400可以对应上述方法中描述的第一节点,也可以对应第一节点的芯片或者组件,并且,该装置400中各个模块或者单元分别可以用于执行上述方法中第一节点所执行的各动作或处理过程,如图10所示,该用于处理报文的装置400可以包括第一处理单元410和第二处理单元420。
第一处理单元410,用于确定第一报文,所述第一报文的报文头和段路由头部SRH都包括共用段标识符SID,所述共用SID由第一地址标识和第一功能标识组成,所述第一地址标识用于标识终结节点的地址信息,所述第一功能标识用于标识至少两个节点需要执行的相同的第一功能;
第二处理单元420,用于根据第一对应关系以及所述第一功能标识确定执行所述第一功能,所述第一对应关系用于指示至少一个功能标识与至少一个功能一一对应。
作为一个可选实施例,所述第一对应关系具体用于指示至少一个SID与至少一个功能一一对应,所述至少一个SID包括所述共用SID;
所述第二处理单元420具体用于:根据所述第一对应关系以及所述共用SID确定执行所述第一功能。
作为一个可选实施例,所述第二处理单元420具体用于:
确定所述第一对应关系中是否存在所述第一功能标识;
若所述第一对应关系中存在所述第一功能标识,根据所述第一对应关系以及所述第一功能标识确定执行所述第一功能。
作为一个可选实施例,所述第一处理单元410或所述第二处理单元420还用于:若所述第一对应关系中存在所述第一功能标识,确定所述SRH中的剩余段SL的值不变。
作为一个可选实施例,所述第二处理单元420具体用于:确定所述SRH中的剩余段SL的值是否大于0;若所述SL的值大于0,在所述第一对应关系中确定是否存在所述第一功能标识。
作为一个可选实施例,所述第一功能为流量限速、操作管理维护或查找转发表。
作为一个可选实施例,所述装置还包括:
第一收发单元,用于在所述根据本地的第一对应关系以及所述第一功能标识确定执行所述第一功能之后,按照最短路径向第二节点转发所述第一报文,所述至少两个节点包括所述装置和所述第二节点。
作为一个可选实施例,所述装置为源节点,所述装置还包括:
第二收发单元,用于接收控制器发送的封装配置信息,所述封装配置信息包括所述共用SID;
所述第一处理单元具体用于:根据所述封装配置信息生成并封装所述第一报文。
作为一个可选实施例,所述装置为终结节点,所述装置还包括:
第三收发单元,用于接收上一跳节点发送的所述第一报文;
所述第一处理单元或所述第二处理单元还用于:在所述根据第一对应关系以及所述第一功能标识确定执行所述第一功能之后,解封装所述第一报文。
应理解,装置400中各单元执行上述相应步骤的具体过程请参照前文中结合图1-图9的方法实施例的描述,为了简洁,这里不加赘述。
上述各个方案的装置400具有实现上述方法中第一节点执行的相应步骤的功能;功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块;例如发送单元可以由发射机替代,接收单元可以由接收机替代,其它单元,如确定单元等可以由处理器替代,分别执行各个方法实施例中的收发操作以及相关的处理操作。
在具体实现过程中,处理器可用于进行,例如但不限于,基带相关处理,收发器可用于进行,例如但不限于,射频收发。上述器件可以分别设置在彼此独立的芯片上,也可以至少部分的或者全部的设置在同一块芯片上。例如,处理器可以进一步划分为模拟基带处理器和数字基带处理器,其中模拟基带处理器可以与收发器集成在同一块芯片上,数字基带处理器可以设置在独立的芯片上。随着集成电路技术的不断发展,可以在同一块芯片上集成的器件越来越多,例如,数字基带处理器可以与多种应用处理器(例如但不限于图形处理器,多媒体处理器等)集成在同一块芯片之上。这样的芯片可以称为系统芯片(system on chip,SOC)。将各个器件独立设置在不同的芯片上,还是整合设置在一个或者多个芯片上,往往取决于产品设计的具体需要。本申请实施例对上述器件的具体实现形式不做限定。
可以理解的是,对于前述实施例中所涉及的处理器可以通过具有处理器和通信接口的硬件平台执行程序指令来分别实现其在本申请前述实施例中任一设计中涉及的功能,基于此,如图11所示,本申请实施例提供了一种用于处理报文的装置500的示意性框图,装置500包括:处理器510、收发器520和存储器530。其中,处理器510、收发器520和 存储器530通过内部连接通路互相通信,该存储器530用于存储指令,该处理器510用于执行该存储器530存储的指令,以控制该收发器520发送信号和/或接收信号。
其中,处理器510用于确定第一报文,所述第一报文的报文头和段路由头部SRH都包括共用段标识符SID,所述共用SID由第一地址标识和第一功能标识组成,所述第一地址标识用于标识终结节点的地址信息,所述第一功能标识用于标识至少两个节点需要执行的相同的第一功能;处理器510还用于根据第一对应关系以及所述第一功能标识确定执行所述第一功能,所述第一对应关系用于指示至少一个功能标识与至少一个功能一一对应,所述至少一个功能包括所述第一功能。
应理解,本申请实施例图10中的装置可以通过图11中的装置500来实现,并且可以用于执行上述方法实施例中第一设备对应的各个步骤和/或流程。
可以理解的是,本申请实施例描述的各种设计涉及的方法,流程,操作或者步骤,能够以一一对应的方式,通过计算机软件,电子硬件,或者计算机软件和电子硬件的结合来一一对应实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件,比如,考虑通用性好成本低软硬件解耦等方面,可以采纳执行程序指令的方式来实现,又比如,考虑系统性能和可靠性等方面,可以采纳使用专用电路来实现。普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,此处不做限定。
根据本申请实施例提供的方法,本申请还提供一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码在计算机上运行时,使得该计算机执行上述实施例中的方法。本申请中的各个实施例也可以互相结合。
根据本申请实施例提供的方法,本申请还提供一种计算机可读介质,该计算机可读解释存储有程序代码,当该程序代码在计算机上运行时,使得该计算机执行上述实施例中的方法。
在本申请实施例中,应注意,本申请实施例上述的方法实施例可以应用于处理器中,或者由处理器实现。处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(Field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM), 其用作外部高速缓存。RAM有多种不同的类型,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本申请中出现的术语“第一”、“第二”等仅是为了区分不同的对象,“第一”、“第二”本身并不对其修饰的对象的实际顺序或功能进行限定。本申请中被描述为“示例性的”,“示例”,“例如”,“可选地”或者“在某些实现方式中”的任何实施例或设计方案都不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用这些词旨在以具体方式呈现相关概念。
在本申请中可能出现的对各种消息/信息/设备/网元/系统/装置/操作/等各类客体进行了赋名,可以理解的是,这些具体的名称并不构成对相关客体的限定,所赋名称可随着场景,语境或者使用习惯等因素而变更,对本申请中技术术语的技术含义的理解,应主要从其在技术方案中所体现/执行的功能和技术效果来确定。
上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品可以包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁盘)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的 划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
Claims (17)
- 一种用于处理报文的方法,其特征在于,包括:第一节点确定第一报文,所述第一报文的报文头和段路由头部SRH都包括共用段标识符SID,所述共用SID由第一地址标识和第一功能标识组成,所述第一地址标识用于标识终结节点的地址信息,所述第一功能标识用于标识至少两个节点需要执行的相同的第一功能;所述第一节点根据第一对应关系以及所述第一功能标识确定执行所述第一功能,所述第一对应关系用于指示至少一个功能标识与至少一个功能一一对应。
- 根据权利要求1所述的方法,其特征在于,所述第一对应关系具体用于指示至少一个SID与至少一个功能一一对应,所述至少一个SID包括所述共用SID;其中,所述第一节点根据第一对应关系以及所述第一功能标识确定执行所述第一功能,包括:所述第一节点根据所述第一对应关系以及所述共用SID确定执行所述第一功能。
- 根据权利要求1或2所述的方法,其特征在于,所述第一节点根据第一对应关系以及所述第一功能段标识确定执行所述第一功能,包括:所述第一节点确定所述第一对应关系中是否存在所述第一功能标识;若所述第一对应关系中存在所述第一功能标识,所述第一节点根据所述第一对应关系以及所述第一功能标识确定执行所述第一功能。
- 根据权利要求3所述的方法,其特征在于,若所述第一对应关系中存在所述第一功能标识,所述方法还包括:所述第一节点确定所述SRH中的剩余段SL的值不变。
- 根据权利要求3或4所述的方法,其特征在于,所述第一节点确定所述第一对应关系中是否存在所述第一功能标识,包括:所述第一节点确定所述SRH中的剩余段SL的值是否大于0;若所述SL的值大于0,所述第一节点在所述第一对应关系中确定是否存在所述第一功能标识。
- 根据权利要求1至5中任一项所述的方法,其特征在于,在所述第一节点根据本地的第一对应关系以及所述第一功能标识确定执行所述第一功能之后,所述方法还包括:所述第一节点按照最短路径向第二节点转发所述第一报文,所述至少两个节点包括所述第一节点和所述第二节点。
- 根据权利要求1至6中任一项所述的方法,其特征在于,所述第一节点为源节点,所述第一节点确定第一报文,包括:所述第一节点接收控制器发送的封装配置信息,所述封装配置信息包括所述共用SID;所述第一节点根据所述封装配置信息生成并封装所述第一报文。
- 根据权利要求1至4中任一项所述的方法,其特征在于,所述第一节点为终结节点,所述第一节点确定第一报文,包括:所述第一节点接收上一跳节点发送的所述第一报文;在所述第一节点根据第一对应关系以及所述第一功能标识确定执行所述第一功能之后,所述方法还包括:所述第一节点解封装所述第一报文。
- 一种用于处理报文的装置,其特征在于,包括:第一处理单元,用于确定第一报文,所述第一报文的报文头和段路由头部SRH都包括共用段标识符SID,所述共用SID由第一地址标识和第一功能标识组成,所述第一地址标识用于标识终结节点的地址信息,所述第一功能标识用于标识至少两个节点需要执行的相同的第一功能;第二处理单元,用于根据第一对应关系以及所述第一功能标识确定执行所述第一功能,所述第一对应关系用于指示至少一个功能标识与至少一个功能一一对应。
- 根据权利要求9所述的装置,其特征在于,所述第一对应关系具体用于指示至少一个SID与至少一个功能一一对应,所述至少一个SID包括所述共用SID;所述第二处理单元具体用于:根据所述第一对应关系以及所述共用SID确定执行所述第一功能。
- 根据权利要求9或10所述的装置,其特征在于,所述第二处理单元具体用于:确定所述第一对应关系中是否存在所述第一功能标识;若所述第一对应关系中存在所述第一功能标识,根据所述第一对应关系以及所述第一功能标识确定执行所述第一功能。
- 根据权利要求11所述的装置,其特征在于,所述第一处理单元或所述第二处理单元还用于:若所述第一对应关系中存在所述第一功能标识,确定所述SRH中的剩余段SL的值不变。
- 根据权利要求11或12所述的装置,其特征在于,所述第二处理单元具体用于:确定所述SRH中的剩余段SL的值是否大于0;若所述SL的值大于0,在所述第一对应关系中确定是否存在所述第一功能标识。
- 根据权利要求9至13中任一项所述的装置,其特征在于,所述装置还包括:第一收发单元,用于在所述根据本地的第一对应关系以及所述第一功能标识确定执行所述第一功能之后,按照最短路径向第二节点转发所述第一报文,所述至少两个节点包括所述装置和所述第二节点。
- 根据权利要求9至14中任一项所述的装置,其特征在于,所述装置为源节点,所述装置还包括:第二收发单元,用于接收控制器发送的封装配置信息,所述封装配置信息包括所述共用SID;所述第一处理单元具体用于:根据所述封装配置信息生成并封装所述第一报文。
- 根据权利要求9至13中任一项所述的装置,其特征在于,所述装置为终结节点,所述装置还包括:第三收发单元,用于接收上一跳节点发送的所述第一报文;所述第一处理单元或所述第二处理单元还用于:在所述根据第一对应关系以及所述第一功能标识确定执行所述第一功能之后,解封装所述第一报文。
- 一种用于处理报文的装置,其特征在于,包括存储器和处理器,所述存储器用于存储计算机程序,所述处理器用于从读取并执行所述存储器中存储的所述计算机程序,以执行如权利要求1至8中任一项所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP20748532.7A EP3742685B1 (en) | 2019-01-30 | 2020-01-15 | Packet processing method and device |
US17/002,160 US11349754B2 (en) | 2019-01-30 | 2020-08-25 | Packet processing method and apparatus |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910089083.9 | 2019-01-30 | ||
CN201910089083.9A CN111510386B (zh) | 2019-01-30 | 2019-01-30 | 用于处理报文的方法和装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US17/002,160 Continuation US11349754B2 (en) | 2019-01-30 | 2020-08-25 | Packet processing method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020156166A1 true WO2020156166A1 (zh) | 2020-08-06 |
Family
ID=71842394
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/072174 WO2020156166A1 (zh) | 2019-01-30 | 2020-01-15 | 用于处理报文的方法和装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US11349754B2 (zh) |
EP (1) | EP3742685B1 (zh) |
CN (1) | CN111510386B (zh) |
WO (1) | WO2020156166A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114531386A (zh) * | 2020-11-23 | 2022-05-24 | 中国移动通信有限公司研究院 | 报文转发的方法、装置、设备及可读存储介质 |
CN115022415A (zh) * | 2022-05-23 | 2022-09-06 | 烽火通信科技股份有限公司 | 一种多层sid报文终结方法及装置 |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112583711B (zh) * | 2019-09-27 | 2024-06-28 | 华为技术有限公司 | 一种报文处理方法及装置 |
CN113328937B (zh) * | 2021-04-08 | 2022-05-24 | 新华三技术有限公司 | 分布式聚合的实现方法及装置 |
JP7527411B2 (ja) * | 2021-06-29 | 2024-08-02 | 新華三技術有限公司 | パケット転送方法、装置、ネットワークノードおよび記憶媒体 |
CN113783789B (zh) * | 2021-09-29 | 2023-03-31 | 新华三信息安全技术有限公司 | 一种报文限速方法及装置 |
CN116489237A (zh) * | 2022-01-13 | 2023-07-25 | 大唐移动通信设备有限公司 | 数据包处理方法、装置及网络设备 |
CN117134925A (zh) * | 2022-05-18 | 2023-11-28 | 中国移动通信有限公司研究院 | 一种网络编程技术处理方法、系统及存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107566272A (zh) * | 2017-10-17 | 2018-01-09 | 新华三技术有限公司 | 转发表建立方法及数据转发方法 |
CN108156077A (zh) * | 2016-12-02 | 2018-06-12 | 中兴通讯股份有限公司 | 一种基于IPv6数据平面的分段路由转发方法及装置 |
WO2019005956A1 (en) * | 2017-06-27 | 2019-01-03 | Cisco Technology, Inc. | IMPROVED PROCESSING OF PACKET SEGMENT ROUTING |
WO2019011114A1 (en) * | 2017-07-14 | 2019-01-17 | Huawei Technologies Co., Ltd. | METHOD FOR ESTABLISHING SEGMENT ROUTING FOR IPV6 TUNNEL |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7089240B2 (en) * | 2000-04-06 | 2006-08-08 | International Business Machines Corporation | Longest prefix match lookup using hash function |
CN105337785B (zh) * | 2014-07-18 | 2018-10-02 | 华为技术有限公司 | 一种路径连通性检测方法及装置 |
CN105471737B (zh) * | 2014-09-05 | 2019-05-10 | 华为技术有限公司 | 一种标签栈的压缩方法及装置、标签栈的解压缩方法及装置 |
US20160335296A1 (en) * | 2015-05-14 | 2016-11-17 | Blue Sage Communications, Inc. | Memory System for Optimized Search Access |
CN106411738A (zh) * | 2015-07-30 | 2017-02-15 | 中兴通讯股份有限公司 | Ipv6报文封装的处理方法和装置 |
US9979629B2 (en) * | 2015-08-21 | 2018-05-22 | Cisco Technology, Inc. | Distribution of segment identifiers in network functions virtualization and software defined network environments |
CN106487677B (zh) * | 2015-09-02 | 2019-10-01 | 华为技术有限公司 | 运营商边缘设备及数据转发方法 |
US10038572B1 (en) * | 2015-09-11 | 2018-07-31 | Amazon Technologies, Inc. | Programmable tunnel creation for hardware-based packet processing |
US11005751B2 (en) * | 2016-02-15 | 2021-05-11 | Telefonaktiebolaget Lm Ericsson (Publ) | Techniques for exposing maximum node and/or link segment identifier depth utilizing IS-IS |
CN107925624B (zh) * | 2016-07-01 | 2021-02-23 | 华为技术有限公司 | 基于业务功能链sfc的报文转发方法、装置和系统 |
US10158558B1 (en) * | 2017-01-19 | 2018-12-18 | Cisco Technology, Inc. | Segment routing of packets according to a multicast distribution tree in a network |
US11019075B2 (en) * | 2018-06-26 | 2021-05-25 | Cisco Technology, Inc. | Providing processing and network efficiencies in protecting internet protocol version 6 segment routing packets and functions using security segment identifiers |
US10812374B2 (en) * | 2018-09-21 | 2020-10-20 | Cisco Technology, Inc. | Segment routing with fast reroute for container networking |
-
2019
- 2019-01-30 CN CN201910089083.9A patent/CN111510386B/zh active Active
-
2020
- 2020-01-15 EP EP20748532.7A patent/EP3742685B1/en active Active
- 2020-01-15 WO PCT/CN2020/072174 patent/WO2020156166A1/zh unknown
- 2020-08-25 US US17/002,160 patent/US11349754B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108156077A (zh) * | 2016-12-02 | 2018-06-12 | 中兴通讯股份有限公司 | 一种基于IPv6数据平面的分段路由转发方法及装置 |
WO2019005956A1 (en) * | 2017-06-27 | 2019-01-03 | Cisco Technology, Inc. | IMPROVED PROCESSING OF PACKET SEGMENT ROUTING |
WO2019011114A1 (en) * | 2017-07-14 | 2019-01-17 | Huawei Technologies Co., Ltd. | METHOD FOR ESTABLISHING SEGMENT ROUTING FOR IPV6 TUNNEL |
CN107566272A (zh) * | 2017-10-17 | 2018-01-09 | 新华三技术有限公司 | 转发表建立方法及数据转发方法 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3742685A4 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114531386A (zh) * | 2020-11-23 | 2022-05-24 | 中国移动通信有限公司研究院 | 报文转发的方法、装置、设备及可读存储介质 |
CN115022415A (zh) * | 2022-05-23 | 2022-09-06 | 烽火通信科技股份有限公司 | 一种多层sid报文终结方法及装置 |
CN115022415B (zh) * | 2022-05-23 | 2023-08-25 | 烽火通信科技股份有限公司 | 一种多层sid报文终结方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
EP3742685A1 (en) | 2020-11-25 |
EP3742685A4 (en) | 2020-12-30 |
EP3742685B1 (en) | 2023-05-31 |
CN111510386B (zh) | 2023-06-20 |
CN111510386A (zh) | 2020-08-07 |
US11349754B2 (en) | 2022-05-31 |
US20200389391A1 (en) | 2020-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020156166A1 (zh) | 用于处理报文的方法和装置 | |
US11902049B2 (en) | BIER packet sending method and apparatus | |
US9154993B1 (en) | Mobile-IPv6 encapsulation for wireless networks | |
WO2020182156A1 (zh) | 网络中报文转发的方法、网络节点、网络系统 | |
JP7140910B2 (ja) | 通信方法、デバイス、及びシステム | |
CN106982163B (zh) | 按需获取路由的方法及网关 | |
WO2021043232A1 (zh) | 主机网络性能需求可编程化的方法、设备和系统 | |
WO2021197141A1 (zh) | 业务处理方法、装置、设备及存储介质 | |
WO2020098597A1 (zh) | 一种组播的方法及路由设备 | |
WO2022184169A1 (zh) | 报文转发方法、系统、存储介质及电子装置 | |
US20180048593A1 (en) | Flow entry generating and packet processing based on flow entry | |
WO2021088561A1 (zh) | 位索引显式复制网络中负载分担的方法、装置及设备 | |
WO2021232906A1 (zh) | 报文转发备份路径确定方法及相关设备 | |
US11929923B2 (en) | Packet transmission method and apparatus | |
WO2023273957A1 (zh) | 算力发布方法、算力更新方法及装置 | |
EP4020903B1 (en) | Method and apparatus for preventing traffic bypassing | |
CN108282404B (zh) | 一种路由生成方法、装置及系统 | |
WO2022228090A1 (zh) | 路径学习方法、装置、业务节点及存储介质 | |
WO2022199486A1 (zh) | 路径跟踪方法、设备和存储介质 | |
CN113472912B (zh) | 一种arp缓存表项的更新方法、vtep、vm及装置 | |
WO2021047317A1 (zh) | 报文处理方法及装置 | |
US20240223496A1 (en) | Packet transmission method, apparatus, and system, network device, and storage medium | |
CN113055268A (zh) | 隧道流量负载均衡的方法、装置、设备及介质 | |
CN113132230A (zh) | 发送报文的方法、设备及计算机存储介质 | |
WO2024098244A1 (zh) | 一种节点保护方法、装置、电子设备及介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
ENP | Entry into the national phase |
Ref document number: 2020748532 Country of ref document: EP Effective date: 20200821 |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20748532 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |