WO2023185235A1 - Packet forwarding method, apparatus and system - Google Patents
Packet forwarding method, apparatus and system Download PDFInfo
- Publication number
- WO2023185235A1 WO2023185235A1 PCT/CN2023/073738 CN2023073738W WO2023185235A1 WO 2023185235 A1 WO2023185235 A1 WO 2023185235A1 CN 2023073738 W CN2023073738 W CN 2023073738W WO 2023185235 A1 WO2023185235 A1 WO 2023185235A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- forwarding
- message
- node
- segment identifier
- behavior
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 175
- 230000006399 behavior Effects 0.000 claims abstract description 385
- 238000004590 computer program Methods 0.000 claims description 17
- 238000004891 communication Methods 0.000 abstract description 7
- 238000001341 grazing-angle X-ray diffraction Methods 0.000 description 35
- 230000008569 process Effects 0.000 description 25
- 238000010586 diagram Methods 0.000 description 24
- 238000012545 processing Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 12
- 230000001360 synchronised effect Effects 0.000 description 9
- 101000840469 Arabidopsis thaliana Isochorismate synthase 1, chloroplastic Proteins 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 7
- 238000012423 maintenance Methods 0.000 description 4
- 230000003068 static effect Effects 0.000 description 4
- 101100256916 Caenorhabditis elegans sid-1 gene Proteins 0.000 description 3
- 101100256918 Caenorhabditis elegans sid-2 gene Proteins 0.000 description 3
- 101100256922 Caenorhabditis elegans sid-3 gene Proteins 0.000 description 3
- RGNPBRKPHBKNKX-UHFFFAOYSA-N hexaflumuron Chemical compound C1=C(Cl)C(OC(F)(F)C(F)F)=C(Cl)C=C1NC(=O)NC(=O)C1=C(F)C=CC=C1F RGNPBRKPHBKNKX-UHFFFAOYSA-N 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000005538 encapsulation Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000003542 behavioural effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/33—Flow control; Congestion control using forward notification
Definitions
- the present application relates to the field of communication technology, and in particular to a message forwarding method, device and system.
- SRv6 is a segment routing (segment routing) forwarding technology based on Internet Protocol version 6 (IPv6).
- IPv6 Internet Protocol version 6
- a segment routing header (SRH) is inserted into the SRv6 message.
- the SRH includes a segment list.
- the segment list is used to carry the segment identification (SID) of the node in the forwarding path of the message.
- SID is a special IPv6 address that has both the routing capabilities of ordinary IPv6 addresses and the unique behavioral capabilities of SRv6.
- Each node that supports SRv6 (SRv6 node for short) in the network maintains a local SID table.
- the local SID table includes multiple SIDs and the behavior corresponding to each SID.
- the SRv6 node After receiving the message, if the SRv6 node detects that the value of the destination address (DA) field of the message matches a certain SID in the local SID table, the SRv6 node will perform the behavior corresponding to the SID. This behavior usually includes Update the value of the DA field based on the segment list. Afterwards, the SRv6 node can forward the packet to the next hop node.
- DA destination address
- each node in the forwarding path needs to perform a specific operation on the received packet. For example, all nodes use a specified network slice, such as network slice 1, to forward the packet.
- a specific SID needs to be defined for each node in the forwarding path.
- the specific SID indicates that network slice 1 is used to forward the packet. For example, define SID 1, SID 2, and SID 3 respectively for node 1, node 2, and node 3 in the forwarding path.
- SID 1 is the SID of node 1, which is used to indicate that network slice 1 is used to forward packets
- SID 2 is the SID of node 2.
- SID is used to indicate that network slice 1 is used to forward packets.
- SID 3 is the SID of node 3 and is used to indicate that network slice 1 is used to forward packets.
- the head node of the forwarding path can insert an SRH into the message.
- the segment list of the SRH records the specific SIDs of the nodes in the forwarding path, such as SID 1, SID 2 and SID 3.
- the node that receives the message can use the specified network slice, such as network slice 1, to forward the message based on the specific SID.
- the above packet forwarding method requires defining a specific SID for each node in the forwarding path, which has high operational complexity and low efficiency.
- This application provides a message forwarding method, device and system, which can solve the technical problem of high complexity of message forwarding caused by defining SID for each node separately.
- a message forwarding method is provided, which is applied to the first node.
- the method includes: receiving a first message, where the DA field of the first message includes a first segment identifier.
- the forwarding entry is determined according to the first segment identifier, the forwarding entry includes the forwarding behavior corresponding to the first segment identifier, and the first segment identifier is a locally instantiated segment identifier of the first node.
- the second message is forwarded to the second node according to the forwarding behavior.
- the second message is obtained based on the first message, and the DA field of the second message includes the first segment identifier.
- the first segment identifier in the second message is used to instruct the second node to search for a forwarding entry based on the first segment identifier, which is also a local identifier of the second node.
- the instantiated segment identifier is also a local identifier of the second node.
- the node that receives the second message can also determine the forwarding entry based on the first segment identifier to determine the corresponding forwarding behavior. That is to say, the first segment of identification can guide the forwarding behavior of multiple nodes. Based on this, if multiple nodes need to perform a specific operation on the received message, then the forwarding behavior of each node guided by the first segment of the identifier can include the specific operation. This eliminates the need to allocate segment identifiers to each node, effectively simplifying the operational complexity of packet forwarding.
- the forwarding behavior does not include updating the value of the segment left (SL) field.
- SL segment left
- the forwarding behavior corresponding to the first segment identifier does not include updating the value of the SL field, updating the DA field can be avoided, thereby ensuring that the DA field of the second message also includes the first segment identifier.
- the forwarding behavior does not include stripping off the outer IPv6 header of the first message. Since the DA field of the first message is included in the outer IPv6 header, the forwarding behavior does not include stripping off the outer IPv6 header. In other words, the first node is not a network egress node.
- both the first packet and the second packet may include an outer IPv6 header, and the outer IPv6 header includes a DA field.
- the outer IPv6 header may include an IPv6 basic header and an IPv6 extension header, and the DA field is included in the IPv6 basic header.
- both the first message and the second message may be SRv6 messages, and the SRv6 messages include SRH.
- the first segment identifier is included in the segment list of the SRH.
- the solution provided by this application can enable the nodes in the message forwarding system to process the SRv6 message according to the traditional SRv6 message processing method by carrying the first segment identifier in the SRH segment list.
- a node can copy the first segment identifier in the segment list to the DA field based on the value of the SL field. It can be seen from this that the solution provided by this application can be effectively compatible with traditional SRv6 technology.
- the segment list may include multiple first segment identifiers, and a second segment identifier may be included between two adjacent first segment identifiers, and the first segment identifier may be different from the second segment identifier.
- the second segment of the identifier may be a common SID, and the common SID may be used only to guide the forwarding behavior of one node.
- the common SID may be a virtual private network (VPN) SID.
- the same sub-behavior can be directed through a first segment identifier in the segment list. sub-behavior. If multiple nodes that need to execute the same sub-behavior are not completely consecutive, you can set multiple first segment identifiers in the segment list and insert a second segment identifier between two adjacent first segment identifiers. The second segment identifies the SIDs of other nodes that do not need to perform the same sub-behavior. Based on this, some nodes in the message forwarding system can perform the same sub-behavior under the guidance of the first identifier, and other nodes can perform other forwarding behaviors under the guidance of the second identifier.
- the forwarding behavior corresponding to the first segment identifier may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- the first segment identifier can guide the forwarding behavior of multiple nodes, the first segment identifier can also be called a global segment identifier (global SID, GSID or GID).
- global SID global segment identifier
- GID global segment identifier
- the forwarding behavior corresponding to the first segment identification may include: forwarding based on the specified next hop address. Since multiple nodes in the packet forwarding system forward packets based on the first identifier of the DA field, the first identifier can also indicate the next hop address to ensure reliable forwarding of the message. And, for different nodes, the first segment identifies the next hop indicated The address is different.
- the method may also include: obtaining the first segment identifier and the forwarding behavior, and adding a forwarding entry in the forwarding table, where the forwarding entry includes the first segment identifier and the forwarding behavior.
- the node that receives the first message can use the first segment identifier as an index to search the forwarding table to accurately determine the forwarding entry and thereby determine the forwarding behavior.
- the process of obtaining the first segment identifier and forwarding behavior may include: receiving the first segment identifier and forwarding behavior issued by the controller; or, obtaining the statically configured first segment identifier and forwarding behavior.
- static configuration may refer to manual configuration by operation and maintenance personnel in the node.
- a message forwarding method is provided, which is applied to the first node.
- the method includes: obtaining the first segment identifier and the forwarding behavior corresponding to the first segment identifier, and adding a forwarding entry in the forwarding table, where the forwarding entry includes the first segment identifier and the forwarding behavior.
- the message is forwarded to the second node according to the forwarding entry.
- the forwarding behavior does not include updating the value of the DA field in the outer IPv6 header of the message, and does not include stripping off the outer IPv6 header, and the first segment identifier is a locally instantiated segment identifier of the first node.
- the forwarding behavior does not include updating the value of the DA field and stripping off the outer IPv6 header, it can be ensured that the DA field of the message sent by the node also includes the first segment identifier.
- the node that receives the message can also perform the same forwarding behavior based on the first segment identifier in the DA field. Since the solution provided by this application does not need to allocate segment identifiers to each node in the message forwarding system, it effectively simplifies the operational complexity of message forwarding.
- the process for a node to obtain the first segment identifier and the forwarding behavior corresponding to the first segment identifier may include: receiving the first segment identifier and the forwarding behavior corresponding to the first segment identifier issued by the controller; or, obtaining the statically configured The first segment identifier and the forwarding behavior corresponding to the first segment identifier.
- the outer IPv6 header may include: an IPv6 basic header and/or an IPv6 extension header.
- the DA field may be included in the IPv6 basic header.
- the forwarding behavior does not include updating the value of the SL field.
- the forwarding behavior may include: forwarding based on a specified next hop address.
- the forwarding behavior may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- the process of the first node forwarding the message to the second node according to the forwarding table may include: receiving the first message, the DA field of the first message including the first segment identifier. Afterwards, the forwarding table entry is determined based on the first segment identifier to determine the forwarding behavior, and the second message is forwarded based on the forwarding behavior. The second message is obtained based on the first message, and the DA field of the second message includes the first segment identifier.
- a message forwarding method is provided, which is applied to a message forwarding system.
- the message forwarding system includes a first node and a second node.
- the method includes: a first node receives a first message, and the DA field of the first message includes a first segment identifier; the first node determines a first forwarding entry based on the first segment identifier, so as to obtain the first forwarding entry from the first forwarding entry. Determine the first forwarding behavior corresponding to the first segment identifier, and forward the second message to the second node according to the first forwarding behavior.
- the second message is obtained based on the first message.
- the second node receives the second message, and the DA field of the second message includes the first segment identifier.
- the second node determines a second forwarding entry based on the first segment identifier, determines the second forwarding behavior corresponding to the first segment identifier from the second forwarding entry, and forwards the third message according to the second forwarding behavior. .
- the third message is obtained based on the second message.
- the first segment identifier is a locally instantiated segment identifier of the first node, and is a locally instantiated segment identifier of the second node.
- both the first node and the second node can perform forwarding behavior according to the first segment identifier in the DA field, that is, one first segment identifier can guide the forwarding behavior of multiple nodes. Based on this, if multiple nodes need to receive If the received packet performs a specific operation, then the forwarding behavior of each node guided by the first segment identification only needs to include the specific operation. This eliminates the need to allocate segment identifiers to each node, effectively simplifying the operational complexity of packet forwarding.
- the first forwarding behavior does not include updating the value of the SL field.
- the second forwarding behavior and the first forwarding behavior may include the same sub-behavior, and the DA field of the third message also includes the first segment identifier. That is, neither the first node nor the second node updates the value of the DA field.
- the same sub-behavior may include at least one of the following sub-behaviors: slice resource forwarding based on specified network slices; forwarding based on allocated network resources; encrypted forwarding; forwarding after traffic statistics.
- the second forwarding behavior does not include: updating the value of the SL field.
- the DA field of the third message does not include the first segment identifier, and accordingly, the second forwarding behavior includes updating the value of the SL field.
- the third message does not include a DA field, and accordingly, the second forwarding behavior includes stripping off the outer IPv6 header.
- the first forwarding behavior may include: forwarding based on the first next hop address; the second forwarding behavior may include: forwarding based on the second next hop address. Wherein, the second next hop address is different from the first next hop address.
- both the first message and the second message may include an SRH, and the segment list of the SRH includes the first segment identifier.
- the fourth aspect provides a message forwarding method, which is applied to the controller in the message forwarding system.
- the method includes: delivering a first segment identifier and a first forwarding behavior corresponding to the first segment identifier to a first node in the message forwarding system, and delivering the first segment identifier to a second node in the message forwarding system. , and the second forwarding behavior corresponding to the first paragraph identification.
- the first forwarding behavior does not include updating the value of the DA field, and does not include stripping off the outer IPv6 header.
- the second forwarding behavior includes the same sub-behavior as the first forwarding behavior.
- the same sub-behavior includes at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- the first forwarding behavior includes: forwarding based on the first next hop address; the second forwarding behavior includes: based on the second next hop address. Wherein, the second next hop address is different from the first next hop address.
- the process of delivering the first segment identifier and the forwarding behavior corresponding to the first segment identifier to the node in the message forwarding system may include: based on the network configuration (NETCONF) protocol or the border gateway protocol (border gateway) protocol, BGP), delivers the first segment identifier and the forwarding behavior corresponding to the first segment identifier to the nodes in the message forwarding system.
- NETCONF network configuration
- border gateway border gateway protocol
- a message forwarding method includes: encapsulating SRH in the message and sending the message.
- the segment list of the SRH includes the first segment identifier.
- This message enables at least two nodes in the message forwarding system to determine the forwarding entry based on the first segment identifier in the DA field of the message, so as to determine the forwarding behavior corresponding to the first segment identifier from the forwarding entry. , and forward the message according to the forwarding behavior.
- the first segment identifier is a locally instantiated segment identifier of each node in the at least two nodes. This method can be executed by the SRv6 network entry node.
- the segment list may include a first segment identifier.
- the segment list may include multiple first segment identifiers, and a second segment identifier may be included between two adjacent first segment identifiers. Among them, the first paragraph of identification is different from the second paragraph of identification.
- a sixth aspect provides a network device, which may be a node or a controller in a message forwarding system. Furthermore, the network device includes at least one module, and the at least one module can be used to implement the message forwarding method provided in any of the above aspects.
- a seventh aspect provides a network device, which may be a node or a controller in a message forwarding system. Furthermore, the network device includes: a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, the message forwarding method provided in any of the above aspects is implemented.
- a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the instructions are run on a computer, they cause the computer to execute the message forwarding method provided in any of the above aspects.
- a ninth aspect provides a computer program product containing instructions.
- the computer program product When the computer program product is run on a computer, it causes the computer to execute the message forwarding method provided in any of the above aspects.
- a message forwarding system in a tenth aspect, includes a plurality of nodes; at least two nodes among the plurality of nodes are used to implement as provided in any one of the above-mentioned first to third aspects. message forwarding method.
- the system may also include: a controller; the controller may be used to implement the message forwarding method provided in the fourth aspect.
- At least one node among the plurality of nodes may also be used to implement the message forwarding method provided in the fifth aspect.
- An eleventh aspect provides a chip, which can be used to implement the message forwarding method provided in any of the above aspects.
- this application provides a message forwarding method, device and system.
- the node can determine the forwarding entry according to the first segment identifier in the DA field of the first message to determine the forwarding behavior, and forward the second message obtained from the first message according to the forwarding behavior.
- the DA field of the second message also includes the first segment identifier
- the node that receives the second message can also determine the forwarding entry based on the first segment identifier to determine the corresponding forwarding behavior. That is to say, the first segment of identification can guide the forwarding behavior of multiple nodes.
- the forwarding behavior of each node guided by the first segment of the identifier can include the specific operation. This eliminates the need to allocate segment identifiers to each node, effectively simplifying the operational complexity of packet forwarding.
- Figure 1 is a schematic structural diagram of a message forwarding system provided by an embodiment of the present application.
- Figure 2 is a schematic structural diagram of an SRv6 message provided by an embodiment of the present application.
- Figure 3 is a schematic structural diagram of another message forwarding system provided by an embodiment of the present application.
- Figure 4 is a flow chart of a message forwarding method provided by an embodiment of the present application.
- Figure 5 is a flow chart of another message forwarding method provided by an embodiment of the present application.
- Figure 6 is a flow chart of yet another message forwarding method provided by an embodiment of the present application.
- Figure 7 is a schematic diagram of the data structure of a first segment identifier provided by an embodiment of the present application.
- Figure 8 is a schematic diagram of forwarding entries of each node in a message forwarding system provided by an embodiment of the present application.
- Figure 9 is a schematic diagram of a message forwarding process provided by an embodiment of the present application.
- Figure 10 is a schematic diagram of another message forwarding process provided by an embodiment of the present application.
- Figure 11 is a flow chart of yet another message forwarding method provided by an embodiment of the present application.
- Figure 12 is a schematic structural diagram of a first node provided by an embodiment of the present application.
- Figure 13 is a schematic structural diagram of another first node provided by an embodiment of the present application.
- Figure 14 is a schematic structural diagram of a second node provided by an embodiment of the present application.
- Figure 15 is a schematic structural diagram of a controller provided by an embodiment of the present application.
- Figure 16 is a schematic structural diagram of a third node provided by an embodiment of the present application.
- Figure 17 is a schematic structural diagram of a network device provided by an embodiment of the present application.
- Figure 18 is a schematic structural diagram of another network device provided by an embodiment of the present application.
- FIG 1 is a schematic structural diagram of a message forwarding system provided by an embodiment of the present application.
- the message forwarding system may include multiple nodes 01, and communication connections are established between the multiple nodes 01.
- each node 01 can be a device with a packet forwarding function, such as a router or a switch, and each node 01 can also be called a network device.
- node 01 may be a provider (provider, P) device or a provider edge (provider edge, PE) device.
- the PE device can be connected to the user terminal through customer edge (CE) device 02.
- CE device 02 is used to provide network access services for user terminals.
- the user terminal can also be called user equipment, which can be a residential gateway (RGW), a mobile phone, a laptop or a desktop computer.
- RGW residential gateway
- the message forwarding system may also include a controller 03.
- the controller 03 is connected to at least one node 01 and is used to manage and control the node 01 to which it is connected.
- the controller 03 may be a network controller, for example, a software defined network (SDN) controller.
- SDN software defined network
- the message forwarding system may be an SRv6 system, and the messages forwarded by each node in the SRv6 system are SRv6 messages.
- Figure 2 is a schematic structural diagram of an SRv6 message provided by an embodiment of the present application.
- the SRv6 message includes: IPv6 header, SRH and payload.
- the IPv6 header includes the following fields: version (version), traffic class (TC), flow label (flow label), payload length (payload length), next header (next header), hop limit (hop limit), source address (source address, SA) and DA.
- SRH includes the following fields: next header, extension header length (Hdr Ext Len), routing header type (routing type), SL, last entry, flags, tag, Segment list and optional TLV.
- the segment list includes segment list [0] to segment list [n], a total of n+1 identification fields (n can be an integer greater than or equal to 1), and each identification field is used to carry a node in the message forwarding path.
- SID which can be the IPv6 address of the node. Please refer to Table 1 for the length and meaning of each field in the SRH.
- node 01 can update the value of the DA field of the message based on the SID indicated by the SL field.
- the content in the SRH is equivalent to the computer program, and the segment list [0] to segment list [n] are equivalent to the contents of the computer program. multiple instructions, and the first instruction to be executed in the computer program is segment list [n].
- the SL field in SRH is equivalent to the pointer of the computer program, which always points to the currently executing instruction. Before the message is forwarded, the value of the SL field can be initialized to n.
- the value of the SL field can be decremented by 1 (that is, SL-- is executed), so that the SL field points to the next instruction to be executed.
- the forwarding path of the SRv6 message is: Node A ⁇ Node B ⁇ Node C ⁇ Node D ⁇ Node G.
- node A, node B, node D and node G all support SRv6 technology, while node C does not support SRv6 technology.
- node A, as the ingress node can insert SRH into the SRv6 message.
- the SRH is encapsulated with the segment list ⁇ G::, D::, B::>.
- G:: is the SID of node G
- D:: is the SID of node D
- node A Before forwarding the message, node A can initialize the value of the SL field to 2. Then, node A can copy the SID in the segment list indicated by the SL field, that is, B:: in segment list [2], to the DA field in the IPv6 header. Afterwards, node A can forward the SRv6 packet to node B.
- Node B After receiving the SRv6 message, Node B can search the local SID table based on the value of the DA field in the IPv6 header. Since the value of the DA field can hit the local SID table of node B, node B can decrement the value of the SL field by 1 and add the SID in the segment list indicated by the updated SL field, that is, the SID in the segment list [1] D::Copied to the DA field in the IPv6 header. Afterwards, node B can forward the SRv6 packet to node C.
- node C After node C receives the SRv6 message, since node C does not support SRv6 technology, it does not need to process SRH. Instead, it can directly query the routing table based on the DA in the IPv6 header and forward the SRv6 message to node D.
- node D After receiving the SRv6 message, node D can search the local SID table based on the DA in the IPv6 header. Since the DA can hit the local SID table of node D, node D can decrement the value of the SL field by 1 and add the SID in the segment list indicated by the updated SL field, that is, G:: in segment list [0]. Copied to the DA in the IPv6 header. Since the value of the updated SL field is 0, node D can eject the SRH and forward the SRv6 message of the ejected SRH to node G.
- the embodiment of the present application provides a message forwarding method, which can be applied to the first node and the second node in the message forwarding system such as shown in Figure 1 or Figure 3.
- the first node and the second node may be any two adjacent nodes in the message forwarding system. Referring to Figure 4, the method includes:
- Step 101 The first node receives a first message, and the DA field of the first message includes a first segment identifier.
- the first node may be a head node or an intermediate node in the message forwarding system. If the first node is an intermediate node, the first node can receive the first message sent by other nodes (for example, the head node) in the message forwarding system, and the DA field of the first message includes the first segment identifier.
- the first node can receive the first message sent by the CE device or the user terminal, and can forward the first message to the first node.
- the value of the DA field of the message is updated to the first segment identifier.
- the first node may first encapsulate the SRH in the first message, and the segment list of the SRH includes the first segment identifier.
- the value of the last identifier field in the segment list is the first segment identifier.
- the first node can copy the first segment identifier in the segment list to the DA field.
- Step 102 The first node determines a first forwarding entry based on the first segment identifier, and determines a first forwarding behavior corresponding to the first segment identifier from the first forwarding entry.
- a forwarding table also called a forward information database (FIB) is stored in the first node.
- the forwarding table may include a local segment identifier (local SID) table, and the first forwarding entry in the forwarding table records the first segment identifier and the first forwarding behavior corresponding to the first segment identifier.
- the first node can search its forwarding table according to the first segment identifier in the DA field of the first message to determine the first forwarding table entry, and then determine the first forwarding table entry from the first forwarding table entry.
- the first segment identifies the corresponding first forwarding behavior.
- the first segment is identified as the first node A locally instantiated SRv6SID.
- the first forwarding entry may also be called a forwarding entry or a FIB entry, which can represent a locally instantiated SRv6 SID.
- the first forwarding behavior may include: forwarding based on a first next hop (NHP) address, and the next hop address may be the identifier of the outbound interface (out interface) of the first node.
- the first forwarding behavior may also include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- the encrypted forwarding can be media access control security (media access control security, MACsec) encrypted forwarding.
- Network resources may at least include: bandwidth resources of interfaces used to forward packets.
- network resources of different sizes can be represented by different queues.
- forwarding messages based on allocated network resources can also be understood as: forwarding messages based on allocated queues.
- first forwarding behavior listed above is only a partial example, and the embodiment of the present application does not limit the type of the first forwarding behavior.
- Step 103 The first node forwards the second message to the second node according to the first forwarding behavior, and the second message is obtained based on the first message.
- the first node After the first node determines the first forwarding behavior, it can forward the second message obtained based on the first message to the second node according to the first forwarding behavior.
- the second node is the node indicated by the first next hop address. It can be understood that the second node may be an intermediate node or an egress node in the message forwarding system.
- Step 104 The second node receives the second message, and the DA field of the second message includes the first segment identifier.
- the DA field of the second message received by the second node also includes the first segment identifier. That is to say, when the first node obtains the second message based on the first message, it does not update the value of the DA field of the message. Alternatively, it can be understood that the first forwarding behavior does not include updating the value of the DA field.
- the DA field is generally included in the outer IPv6 header of the first message, and the node in the message forwarding system usually updates the value of the SL field based on the updated value of the SL field. The value of the DA field. Based on this, in order to determine that the second message forwarded by the first node includes the DA field, the first forwarding behavior may not include updating the value of the SL field, and may not include stripping off the outer IPv6 header.
- Step 105 The second node determines a second forwarding entry based on the first segment identifier, and determines a second forwarding behavior corresponding to the first segment identifier from the second forwarding entry.
- the second node also stores a forwarding table, and the second forwarding entry in the forwarding table of the second node records the first segment identifier and the second forwarding behavior corresponding to the first segment identifier.
- the second node can search its forwarding table according to the first segment identifier in the DA field of the second message to determine the second forwarding table entry, and then obtain the second forwarding table entry from the second forwarding table entry. Determine the second forwarding behavior corresponding to the second segment identifier.
- the first segment identifier is a locally instantiated SRv6 SID of the second node, or it can be understood that the second forwarding entry indicates a locally instantiated SRv6 SID.
- the second forwarding behavior may include: forwarding based on a second next hop address, where the second next hop address is different from the first next hop address.
- the first forwarding behavior and the second forwarding behavior may include the same sub-behavior.
- the same sub-behavior may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- slice resource forwarding based on a specified network slice For example, except for the indicated next hop address, the first forwarding behavior and the second forwarding behavior may be the same, and the second forwarding behavior does not include updating the value of the DA field.
- the first forwarding behavior and the second forwarding behavior may not include the same sub-behavior.
- the second forwarding behavior may include updating the value of the DA field, or stripping the outer IPv6 header, or updating the value of the SL field. value.
- the second forwarding behavior does not include any of the following sub-behaviors: forwarding based on slice resources of a specified network slice; forwarding based on allocated network resources; forwarding with encryption; and forwarding after traffic statistics.
- Step 106 The second node forwards the third message according to the second forwarding behavior, and the third message is obtained based on the second message.
- the second node After the second node determines the second forwarding behavior, it can forward the third message obtained based on the second message according to the second forwarding behavior. For example, the second node may forward the message to the node indicated by the second next hop address.
- the DA field of the third message also includes the first segment identifier.
- the DA field of the third message does not include the first segment identifier.
- the second forwarding behavior includes stripping the outer IPv6 header, the third message does not include the DA field.
- the DA fields of the first message and the second message both carry the first segment identifier, and the first segment identifier can guide the forwarding behavior of multiple nodes.
- the first segment identification may also be called GSID or GID. Since the first segment of the identifier can guide the forwarding behavior of the node, the first segment of the identifier may also be called a forwarding instruction or a behavior instruction.
- both the first message and the second message include an outer IPv6 header, and the outer IPv6 header includes a DA field.
- the message forwarding system in the embodiment of the present application may be a system that supports SRv6 technology, and the above-mentioned first message and the second message may both be SRv6 messages. Both the above-mentioned first node and the second node may be SRv6 segment endpoint nodes (Segment Endpoint nodes), which may be referred to as Endpoint nodes for short.
- the embodiment of the present application provides a message forwarding method.
- the first node can determine the forwarding entry according to the first segment identifier in the DA field of the first message to determine the first forwarding behavior, and forward the second message obtained from the first message according to the first forwarding behavior. Since the DA field of the second message also includes the first segment identifier, the second node that receives the second message can also determine the forwarding entry based on the first segment identifier to determine the second forwarding behavior and perform the second forwarding behavior. forwarding behavior. If both the first node and the second node are required to perform a specific operation on the received message, then both the first forwarding behavior and the second forwarding behavior include the specific operation.
- the method provided by the embodiment of the present application can guide the forwarding behavior of multiple nodes through a first segment identifier carried in the DA field, there is no need to allocate segment identifiers to each node respectively, thereby effectively simplifying the operational complexity of message forwarding. .
- the embodiment of the present application provides another message forwarding method, which can be applied to the controller, the first node and the second node in the message forwarding system such as shown in Figure 1 or Figure 3.
- the first node and the second node may be any two adjacent nodes in the message forwarding system. Referring to Figure 5, the method includes:
- Step 201 The controller delivers the first segment identifier and the first forwarding behavior corresponding to the first segment identifier to the first node.
- the controller may deliver configuration information to the first node through a network configuration protocol or a border gateway protocol.
- the configuration information includes a first segment identifier and a first forwarding behavior corresponding to the first segment identifier.
- the first forwarding behavior does not include updating the value of the DA field and does not include stripping the outer IPv6 header.
- the outer IPv6 header may include an IPv6 basic header and/or an IPv6 extension header, and the DA field may be included in the IPv6 basic header.
- the IPv6 basic header may also be called IPv6 fixed header.
- Step 202 The controller delivers the first segment identifier and the second forwarding behavior corresponding to the first segment identifier to the second node.
- the second forwarding behavior may include the same sub-behavior as the first forwarding behavior.
- the second forwarding behavior does not include updating the value of the DA field and does not include stripping the outer IPv6 header.
- the second forwarding behavior may not include the same sub-behavior as the first forwarding behavior.
- the second forwarding behavior may include updating the value of the DA field, or including stripping off the outer IPv6 header.
- Step 203 The first node adds a first forwarding entry to its forwarding table, where the first forwarding entry includes a first segment identifier and a first forwarding behavior.
- the first node After receiving the configuration information issued by the controller, the first node can add a first forwarding entry to its forwarding table based on the configuration information.
- the first forwarding entry includes a first segment identifier and a first forwarding behavior.
- the first segment identification is a locally instantiated SRv6 SID of the first node.
- Step 204 The second node adds a second forwarding entry to its forwarding table.
- the second forwarding entry includes the first segment identifier and the second forwarding behavior.
- the first segment is identified as a locally instantiated SRv6SID of the second node.
- the implementation process of step 204 may refer to the above-mentioned step 203.
- Step 205 The first node forwards the message to the second node according to the first forwarding entry.
- the first node After receiving the message, the first node can forward the message to the second node according to the first forwarding entry.
- the first forwarding entry For the implementation process of step 205, reference may be made to the relevant descriptions of steps 101 to 103 in the embodiment shown in FIG. 4 .
- Step 206 The second node forwards the message according to the second forwarding entry.
- step 206 For the implementation process of step 206, reference may be made to the relevant descriptions of steps 104 to 106 in the embodiment shown in FIG. 4 .
- the first node and/or the second node can obtain the first segment identifier and the corresponding forwarding behavior through other methods.
- the first node and/or the second node can obtain the statically configured first segment identifier and the corresponding forwarding behavior.
- the embodiment of the present application provides a message forwarding method.
- the controller can deliver the first segment identifier and the corresponding first forwarding behavior to the first node, and deliver the second segment identifier and the corresponding second forwarding behavior to the second node.
- the first node and the second node can then add the configuration information issued by the controller to the forwarding entry in the forwarding table, and forward the message based on the forwarding entry. Since the first segment identifier in the configuration information delivered by the controller to different nodes is the same, the first segment identifier can guide the forwarding behavior of different nodes. If both the first node and the second node are required to perform a specific operation on the received message, then both the first forwarding behavior and the second forwarding behavior include the specific operation. Since the method provided by the embodiment of the present application does not need to allocate segment identifiers to each node, it effectively simplifies the operational complexity of message forwarding.
- the embodiment of the present application provides yet another message forwarding method, which can be applied to a message forwarding system such as that shown in Figure 1 or Figure 3 .
- the embodiment of the present application takes the third node as the head node, the first node as the intermediate node, and the second node as the intermediate node or the tail node as an example for description.
- the method includes:
- Step 301 The controller delivers the first segment identifier and the first forwarding behavior corresponding to the first segment identifier to the first node.
- the controller can deliver configuration information to the first node through the NETCONF protocol or BGP.
- the configuration information includes a first segment identifier and a first forwarding behavior corresponding to the first segment identifier.
- the first forwarding behavior does not include updating the value of the DA field and does not include stripping the outer IPv6 header.
- the DA field may refer to the DA field in the outer IPv6 header, for example, it may be the DA field in the IPv6 basic header in the outer IPv6 header.
- the first node is an Endpoint node in the SRv6 system
- the first node if it updates the value of the SL field in the SRH, it can update the value of the DA field based on the updated value of the SL field. Based on this, the above first forwarding behavior may not include: updating the value of the SL field.
- the first forwarding behavior may include: forwarding based on the first next hop address.
- the first forwarding behavior may also include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- the first segment identifier has at least one of the following functions: 1. A segment of the identifier is associated with a network slice and can instruct the packet to be forwarded based on the slice resources of the associated network slice. 2. The first segment of the identifier is associated with an action of allocating network resources (such as bandwidth) and can instruct the forwarding interface of the message. Reserve designated network resources; 3. The first segment of the identifier can instruct the encrypted forwarding of the message; 4. The first segment of the identifier is associated with a traffic statistics action and can instruct the statistics of the data flow to which the message belongs. forwarded later.
- FIG. 7 is a schematic diagram of the data structure of a first segment identifier provided by an embodiment of the present application.
- the first segment identifier may include: a locator field and a function field.
- the value of the locator field may be a public prefix, which is not used to indicate any node in the system.
- the public prefix can be used to indicate the aggregate address of the packet forwarding system. It can be seen from this that the values of the locator fields in different GIDs issued by the controller are the same. Correspondingly, when the values of the function fields in the GIDs are different values, different forwarding behaviors can be indicated.
- this function field when the value of this function field is 100, it can indicate encrypted forwarding; when the value of this function field is 200, it can indicate slice resource forwarding based on the specified network slice; when the value of this function field is 300, it can indicate based on allocation. forwarding of network resources.
- the first segment of identification may also include: parameters (arguments, Args) field.
- parameters arguments, Args
- the values of the parameter field and/or the function field in the GID are different values, different forwarding behaviors can be indicated.
- Step 302 The controller delivers the first segment identifier and the second forwarding behavior corresponding to the first segment identifier to the second node.
- the second forwarding behavior and the first forwarding behavior may include the same sub-behavior.
- the same sub-behavior may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- the second forwarding behavior may also include: forwarding based on the second next hop address.
- the first forwarding behavior and the second forwarding behavior may include the same other sub-behaviors.
- the second forwarding behavior also does not include updating the value of the DA field, and does not include stripping the outer IPv6 header.
- the second forwarding behavior may not include: updating the value of the SL field.
- next hop addresses indicated by the first forwarding behavior and the second forwarding behavior are different, and other sub-behaviors included in the two are partly the same and partly different.
- the second forwarding behavior may also include one of the following sub-behaviors: updating the value of the DA field, stripping off the outer IPv6 header, and updating the value of the SL field.
- the second forwarding behavior may not include the same sub-behavior as the first forwarding behavior.
- the second forwarding behavior may include updating the value of the DA field, or including stripping the outer IPv6 layer. head.
- the second forwarding behavior does not include any of the following sub-behaviors: forwarding based on slice resources of a specified network slice; forwarding based on allocated network resources; forwarding with encryption; and forwarding after traffic statistics.
- the second forwarding behavior may include: updating the value of the SL field.
- Step 303 The controller delivers the first segment identifier and the third forwarding behavior corresponding to the first segment identifier to the third node.
- the third node is the head node in the message forwarding system.
- the controller can also issue the first segment identifier and the third forwarding corresponding to the first segment identifier to the head node. Behavior.
- the third forwarding behavior and the first forwarding behavior may include the same sub-behavior.
- the same sub-behavior may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- the third forwarding behavior may also include: forwarding based on the third next hop address. For example, except for the indicated next hop address, the third forwarding behavior and the first forwarding behavior may include the same other sub-behaviors.
- the controller can also deliver an SRv6 policy (policy) to the third node.
- the SRv6policy includes the SID of the node in the forwarding path of the message, and the SID of the node in the forwarding path includes the first segment identifier.
- the third node can encapsulate SRH in the message based on the SRv6 policy, and the segment list of the SRH includes the SID of the node in the forwarding path.
- the controller does not need to perform the above steps 301 to 303.
- the above-mentioned first segment identifier and the forwarding behavior corresponding to the first segment identifier may also be statically configured in each node. For example, operation and maintenance personnel can manually configure the first segment of identifiers in each node and the forwarding behavior corresponding to the first segment of identifiers.
- Step 304 The first node adds a first forwarding entry to its forwarding table, where the first forwarding entry includes a first segment identifier and a first forwarding behavior.
- the first node After the first node obtains the configuration information issued by the controller or statically configured, it can add a first forwarding table entry in its forwarding table based on the configuration information.
- the first forwarding entry includes a first segment identifier and a first forwarding behavior.
- the forwarding table in the first node is also called FIB.
- the forwarding table may include a local segment identification table, and the first segment identification in the forwarding table is a locally instantiated SRv6 SID of the first node.
- the first node is node 2
- the first segment identifier (i.e. GID) in the configuration information it receives is A1::1
- the first forwarding behavior includes: based on the first next hop address O2 forwarding, and slice resource forwarding based on the specified network slice S1.
- the first forwarding table entry added by node 2 in its forwarding table may include GID: A1::1, the first next hop address O2 corresponding to the GID, and the network slice S1.
- the slicing resources between nodes may include: network slice 1, network slice 2, and network slice 3.
- the forwarding table of the first node may include multiple forwarding table entries, and each forwarding table entry includes a segment identifier (such as a GID) and a forwarding behavior corresponding to the segment identifier.
- the forwarding table of the first node can be as shown in Table 2. Referring to Table 2, the forwarding behavior corresponding to each GID includes: forwarding based on the specified next hop address, and other sub-behaviors. Among them, the forwarding behavior corresponding to the segment identifier B1::1 includes: forwarding based on the next hop address O0, and encrypted forwarding. The forwarding behavior corresponding to the segment identifier D1::1 includes: forwarding based on the next hop address O0, encrypted forwarding, and forwarding based on allocated network resources.
- Step 305 The second node adds a second forwarding entry to its forwarding table.
- the second forwarding entry includes the first segment identifier and the second forwarding behavior.
- the first segment is identified as a locally instantiated SRv6SID of the second node.
- the implementation process of step 305 may refer to the above-mentioned step 304.
- the first segment identifier i.e. GID
- the second forwarding behavior includes: based on the second next Hop address O3 forwarding, and slice resource forwarding based on the specified network slice S1.
- the second forwarding table entry added by node 3 in its forwarding table may include GID: A1::1, the second next hop address O3 corresponding to the GID, and the network slice S1.
- the second forwarding entry added by node 5 in its forwarding table may include GID: A1::1, the second forwarding behavior corresponding to the GID: SL--, and the updated DA field value.
- SL-- refers to decrementing the value of the SL field by 1.
- Step 306 The third node adds a third forwarding entry to its forwarding table.
- the third forwarding entry includes the first segment identifier and the third forwarding behavior.
- the first segment identifier may be a locally instantiated SRv6 SID of the third node.
- the implementation process of step 306 may also refer to the above-mentioned step 304. For example, continue to refer to Figure 8, assuming that the third node is node 1, and the first segment identifier in the configuration information it receives is A1::1.
- the third forwarding behavior includes: forwarding based on the third next hop address O1, And slice resource forwarding based on the specified network slice S1.
- the third forwarding table entry added by node 1 in its forwarding table may include GID: A1::1, the third next hop address O1 corresponding to the GID, and the network slice S1.
- Step 307 The third node encapsulates the SRH in the received message, and the segment list of the SRH includes the first segment identifier.
- the third node serves as the head node and can introduce specified traffic to the SRv6 policy based on the traffic diversion policy issued by the controller (or statically configured). If the third node determines that the message it receives belongs to the specified traffic, it can encapsulate SRH in the received message.
- the SRH includes a segment list, and the segment list includes a first segment identifier.
- the segment list may include a first segment identifier, and the first segment identifier can guide the forwarding behavior of multiple consecutive nodes in the message forwarding system. Furthermore, the position of the first segment identifier in the segment list may be determined based on the position of the first node among the plurality of consecutive nodes.
- the first segment of the identifier is used to guide the forwarding behavior from node 1 to node 5, because the first node (i.e., node 1) among the five consecutive nodes is the head node of the message forwarding system. , so the last identification field in the segment list can identify this first segment.
- the first segment of the identifier is used to guide the forwarding behavior from node 3 to node 5, because the first node (i.e. node 3) among the three consecutive nodes is the third node in the message forwarding system. node, so the penultimate identification field in the segment list can be the identity of the first segment.
- the segment list may include multiple first segment identifiers, and a second segment identifier may be included between two adjacent first segment identifiers.
- the second segment identifier is different from the first segment identifier.
- the second segment identifier may be a common SID, and the common SID is only used to guide the forwarding behavior of a node.
- each first segment identifier can guide the forwarding behavior of one node in the message forwarding system, or the forwarding behavior of multiple consecutive nodes.
- one or more common SIDs may be included between two adjacent first segment identifiers.
- the second implementation method can be used to set multiple identical first segment identifiers in the segment list.
- multiple nodes that need to execute the same sub-behavior can be identified by the first segment of identifiers, and nodes that do not need to execute the same sub-behavior can be identified by using the second segment of identifiers (ie, common SIDs).
- the message forwarding system includes node 1 to node 7, and requires nodes 3 to 5, and node 7 to perform the same sub-behavior, for example, all perform encrypted forwarding.
- node 1 serves as the head node and can encapsulate SRH in the packet.
- the segment list of this SRH includes: SID2, B1::1, SID6, B1::1.
- SID2 is the SID of node 2, which is used to guide the forwarding behavior of node 2
- SID6 is the SID of node 6, which is used to guide the forwarding behavior of node 6.
- the first segment identifier (GID) B1::1 between SID2 and SID6 is used to guide node 3 to node 5 to perform encrypted forwarding, and the first segment identifier B1::1 after SID6 is used to guide node 7 to perform encrypted forwarding. .
- SID2 and SID6 are both common SIDs.
- the forwarding behaviors guided by this common SID can include: END, END.X, END.DT4 or END.DT6 and other behaviors.
- the behavior of END can include: if the value of the SL field is not 0, then Decrement the value of the SL field by 1 and copy the value of the segment list [SL] to the DA field in the IPv6 header.
- the behavior of END.X may also include: forwarding the packet to the specified neighbor node.
- Step 308 The third node copies the first segment identifier in the segment list to the DA field of the message to obtain the first message.
- the third node can copy the first segment identifier to the DA field of the message to obtain the first message.
- node 1 can copy GID: A1::1 to the DA field in the outer IPv6 header (eg, IPv6 basic header).
- Step 309 The third node determines a third forwarding entry based on the first segment identifier, and determines a third forwarding behavior corresponding to the first segment identifier from the third forwarding entry.
- the third node can also search its forwarding table using the first segment identifier in the DA field as an index to determine the third forwarding entry, and determine the third forwarding behavior corresponding to the first segment identifier from the third forwarding entry. .
- node 1 searches its forwarding table based on GID: A1::1, and the determined third forwarding behavior may include: forwarding based on the third next hop address O1, and slicing based on the specified network slice S1 Resource forwarding.
- the nodes in the message forwarding system do not need to first determine whether the value of the DA field in the message is an ordinary IPv6 address or an IPv6 address. GID. Therefore, when the node determines the forwarding entry based on the first segment identifier in the DA field, it does not need to identify each field in the first segment identifier, but can determine the forwarding entry using the entire first segment identifier as an index.
- Step 310 The third node forwards the first message to the first node according to the third forwarding behavior.
- the third node after the third node determines the third forwarding behavior, it can forward the first message to the first node according to the third forwarding behavior.
- the first node is the node indicated by the third next hop address.
- node 1 can forward the first message to node 2 through the slice resources of network slice S1 based on the third next hop address O1.
- steps 309 and 310 can be deleted according to the situation. For example, if the third node does not need to perform the forwarding behavior indicated by the first segment identifier, the third node can directly forward the first message to the first node.
- the third node can copy the common SID to the DA field of the message, and forward the message directly to the next hop node.
- node 1 has the last identifier in the SRH segment list encapsulated in the message.
- the field can be the SID of node 2: SID2.
- Step 311 The first node determines the first forwarding entry based on the first segment identifier, and determines the first forwarding behavior corresponding to the first segment identifier from the first forwarding entry.
- the first node After receiving the first message, the first node can use the first segment identifier of the DA field in the first message as an index to search the forwarding table of the first node to determine the first forwarding entry, and select the first forwarding entry from the first forwarding table.
- the first forwarding behavior corresponding to the first segment identifier is determined.
- the first forwarding behavior may include: forwarding based on the first next hop address.
- the first forwarding behavior may also include At least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; forwarding after traffic statistics.
- node 2 searches its forwarding table according to GID: A1::1, and the determined first forwarding behavior may include: forwarding based on the first next hop address O2, And slice resource forwarding based on the specified network slice S1.
- Step 312 The first node forwards the second message to the second node according to the first forwarding behavior.
- the first node After the first node determines the first forwarding behavior, it can forward the second message obtained based on the first message to the second node according to the first forwarding behavior.
- the second node is the node indicated by the first next hop address.
- the DA field of the second message also includes the first segment identifier. That is to say, when the first node obtains the second message based on the first message, it does not update the value of the DA field of the message. Alternatively, it can be understood that the first forwarding behavior does not include updating the value of the DA field and does not include stripping the outer IPv6 header. If the first node is an Endpoint node in the SRv6 system, it can be understood that the first forwarding behavior does not include updating the value of the SL field.
- node 2 can forward the second message to node 3 through the slice resources of network slice S1 based on the first next hop address O2.
- the value of the DA field of the second message forwarded by node 2 is still A1::1.
- node 3 may encrypt and forward the second message to node 4.
- the value of the DA field of the second message forwarded by node 3 is still B1::1, and the value of the SL field in the SRH is still 2.
- Step 313 The second node determines the second forwarding entry based on the first segment identifier, and determines the second forwarding behavior corresponding to the first segment identifier from the second forwarding entry.
- the second node After receiving the second message, the second node can use the first segment identifier in the DA field of the second message as an index to search the forwarding table of the second node to determine the second forwarding entry, and obtain the second forwarding entry from the second node.
- the second forwarding behavior corresponding to the second segment identifier is determined in the forwarding table entry.
- the second forwarding behavior may include: forwarding based on a second next hop address, where the second next hop address is different from the first next hop address.
- the first forwarding behavior and the second forwarding behavior may include the same other sub-behaviors.
- the same sub-behavior may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- the next hop addresses indicated by the first forwarding behavior and the second forwarding behavior are different, and other sub-behaviors included in the two are partly the same and partly different.
- the second forwarding behavior may also include one of the following sub-behaviors: updating the value of the DA field, stripping off the outer IPv6 header, and updating the value of the SL field.
- the second forwarding behavior may not include the same sub-behavior as the first forwarding behavior.
- the second forwarding behavior may include updating the value of the DA field, or including stripping the outer IPv6 header.
- the second forwarding behavior does not include any of the following sub-behaviors: forwarding based on the specified next hop address, forwarding based on the slice resources of the specified network slice; forwarding based on the allocated network resources; encrypted forwarding; forwarding after traffic statistics .
- the second node is an intermediate node among the multiple consecutive nodes, then the second node Except for the indicated next hop address, the second forwarding behavior and the first forwarding behavior may include the same other sub-behaviors.
- the second forwarding behavior may also include: updating the value of the DA field, or updating the value of the SL field.
- the second forwarding behavior may also include: stripping off the outer IPv6 header.
- the second forwarding behavior and the first forwarding behavior may not include the same sub-behavior.
- the second forwarding behavior may include: updating the value of the DA field or updating the value of the SL field.
- the second forwarding behavior may include: stripping off the outer IPv6 header.
- Step 314 The second node forwards the third message according to the second forwarding behavior.
- the second node After the second node determines the second forwarding behavior, it can forward the third message obtained based on the second message according to the second forwarding behavior. For example, the second node may forward the third message to the node indicated by the second next hop address.
- the second node will not update the value of the DA field in the second message.
- the DA field in the third message forwarded by the second node still includes the first segment identifier.
- node 3 can use the slice resources of network slice S1 to forward the third message to node 4, and the value of the DA field in the third message is still A1::1.
- the second node in addition to performing the same sub-behavior as the first node, the second node also updates the value of the DA field in the second message, or directly strips off the outer IPv6 header. Wherein, if the second node updates the value of the DA field in the second message, the DA field of the third message forwarded by the second node does not include the first segment identifier. If the second node strips off the outer IPv6 header of the second message, the third message forwarded by the second node does not include the DA field.
- the second forwarding behavior includes: SL--, and encrypted forwarding.
- node 5 can encrypt and forward the third message to node 6, and the SID of node 6 is SID6.
- the second node will not perform the same sub-behavior as the first node, and the second node will also update the value of the DA field in the second message, or directly strip off the outer IPv6 head.
- the second node is node 5
- the second forwarding behavior includes: SL--, and updating the value of the DA field.
- node 5 can update the value of the SL field in the second message, and update the value of the DA field to SID6 based on the updated value of the SL field, to obtain the third message.
- node 5 can forward the third message to node 6.
- the first segment of the identifier can guide multiple nodes in the message forwarding system to perform the same sub-behavior. Therefore, the controller can deliver configuration information to the multiple nodes respectively, and in the configuration information delivered by the controller to different nodes, except for different next hop addresses, other information can be the same.
- the multiple nodes can all perform the methods shown in step 305, step 311 and step 312.
- multiple nodes that need to perform the same sub-behavior may be multiple nodes that are continuously arranged in the message forwarding path, and the multiple nodes that are continuously arranged may be identified by a GID in the segment list.
- the nodes that need to perform the same sub-behavior are node 1 to node 4.
- the nodes 1 and 4 can be configured by one of the segment lists. GID: A1::1 to identify.
- multiple nodes that need to perform the same sub-behavior may not be completely consecutively arranged in the packet forwarding path. That is, there may be two spaced nodes among the plurality of nodes, and there is at least one other node between the two spaced nodes that does not need to perform the same sub-behavior.
- multiple consecutive nodes that need to execute the same sub-behavior can be identified by a GID in the segment list, and other nodes that do not need to execute the same sub-behavior can be identified by ordinary SIDs.
- nodes that need to perform the same sub-behavior include nodes 3 to 5, and node 7.
- the above-mentioned nodes 3 to 5 can be identified by one GID: B1::1, and node 7 can be identified by another GID: B1::1.
- the SID of node 6 that does not need to perform encrypted forwarding: SID6.
- node 3 and node 4 can encrypt and forward the message under the guidance of GID: B1::1, and will not update the value of the DA field in the message.
- Node 5 can encrypt and forward the message under the guidance of GID: B1::1, and update the value of the DA field in the message to SID6.
- the nodes in the message forwarding system can process the SRv6 message according to the traditional SRv6 message processing method. For example, a node can copy the first segment identifier in the segment list to the DA field based on the value of the SL field. As a result, the compatibility of the solution provided by the embodiments of the present application is effectively improved.
- the length of the segment list ie, the stack depth
- the size of the packet can be effectively reduced and the forwarding rate of the packet can be improved.
- the sequence of steps in the message forwarding method provided by the embodiments of the present application can be adjusted appropriately, and the steps can also be increased or decreased accordingly according to the situation.
- the execution order of the above steps 301 to 303 can be adjusted according to the situation.
- at least one of the above-mentioned steps 301 to 303 can be deleted according to circumstances.
- the above-mentioned steps 308 and 309 can be deleted according to the situation, that is, the third node, as the head node, does not need to perform forwarding behavior under the guidance of the first segment identifier.
- the embodiment of the present application provides yet another message forwarding method.
- This method can be applied to the first node in the message forwarding system such as shown in Figure 1 or Figure 3.
- the first node can be a message forwarding system. Head node or intermediate node. Referring to Figure 11, the method includes:
- Step 401 The first node receives a first message, and the DA field of the first message includes a first segment identifier.
- step 401 may refer to the above-mentioned step 101.
- Step 402 The first node determines a forwarding entry based on the first segment identifier, and the forwarding entry includes the forwarding behavior corresponding to the first segment identifier.
- a forwarding table is stored in the first node, and the forwarding entry in the forwarding table records the first segment identifier and the forwarding behavior corresponding to the first segment identifier.
- the first node can search its forwarding table according to the first segment identifier in the DA field of the first message to determine the forwarding table entry, and then determine the first segment from the forwarding table entry. Identifies the corresponding forwarding behavior.
- the first segment identifier may be a locally instantiated SRv6 SID of the first node.
- the implementation process of this step 402 may refer to the above-mentioned step 102.
- Step 403 The first node forwards the second message to the second node according to the forwarding behavior, and the second message is obtained based on the first message.
- step 403 may refer to the above-mentioned step 103.
- the embodiment of the present application provides a message forwarding method.
- the first node can determine the forwarding entry according to the first segment identifier in the DA field of the first message to determine the first forwarding behavior, and forward the second message obtained from the first message according to the first forwarding behavior. Since the DA field of the second message also includes the first segment identifier, the second node that receives the second message can also determine the forwarding entry based on the first segment identifier to determine the second forwarding behavior and perform the second forwarding behavior. forwarding behavior. If both the first node and the second node are required to perform a specific operation on the received message, then both the first forwarding behavior and the second forwarding behavior include the specific operation. Since the method provided by the embodiment of this application can carry a The first segment identifier guides the forwarding behavior of multiple nodes, so there is no need to assign segment identifiers to each node separately, which effectively simplifies the operational complexity of message forwarding.
- Figure 12 is a schematic structural diagram of a first node provided by an embodiment of the present application.
- the first node can be applied to a message forwarding system such as that shown in Figure 1, and can implement the steps performed by the first node in the above method embodiment. step.
- the first node includes:
- the receiving module 501 is configured to receive a first message, where the DA field of the first message includes a first segment identifier.
- the receiving module 501 please refer to the relevant descriptions of step 101 and step 310 in the above method embodiment.
- the determination module 502 is configured to determine a forwarding entry based on the first segment identifier, the forwarding entry includes the forwarding behavior corresponding to the first segment identifier, and the first segment identifier is a locally instantiated segment of the first node. logo.
- the determination module 502 please refer to the relevant descriptions of step 102 and step 311 in the above method embodiment.
- the forwarding module 503 is configured to forward a second message according to the forwarding behavior.
- the second message is obtained based on the first message, and the DA field of the second message includes the first segment identifier.
- the forwarding module 503 please refer to the relevant descriptions of step 103 and step 312 in the above method embodiment.
- the forwarding behavior does not include updating the value of the SL field. Moreover, the forwarding behavior does not include stripping off the outer IPv6 header of the first message.
- both the first packet and the second packet include an outer IPv6 header, and the outer IPv6 header includes a DA field.
- the first message and the second message are both SRv6 messages
- the SRv6 message includes an SRH
- the segment list of the SRH includes the first segment identifier
- the segment list includes multiple first segment identifiers, and a second segment identifier is included between two adjacent first segment identifiers, and the first segment identifier is different from the second segment identifier.
- the forwarding behavior includes at least one of the following sub-behaviors: forwarding based on slice resources of a specified network slice; forwarding based on allocated network resources; forwarding with encryption; and forwarding after traffic statistics.
- the forwarding behavior includes: forwarding based on the specified next hop address.
- the first node may also include:
- Obtaining module 504 is used to obtain the first segment identifier and the forwarding behavior.
- the acquisition module 504 please refer to the relevant descriptions of step 201 and step 301 in the above method embodiment.
- Adding module 505 is used to add a forwarding entry to the forwarding table, where the forwarding entry includes the first segment identifier and the forwarding behavior.
- the adding module 505 please refer to the relevant descriptions of steps 203 and 304 in the above method embodiment.
- the obtaining module 504 may be used to: receive the first segment identification and forwarding behavior issued by the controller; or obtain the statically configured first segment identification and forwarding behavior.
- the first node provided by the embodiment of the present application can determine the forwarding entry according to the first segment identifier in the DA field of the first message to determine the first forwarding behavior, and forward the message sent by the first forwarding behavior according to the first forwarding behavior.
- the first message gets the second message. Since the DA field of the second message also includes the first segment identifier, the second node that receives the second message can also determine the forwarding entry based on the first segment identifier to determine the second forwarding behavior and execute the third forwarding behavior. 2. Forwarding behavior. If both the first node and the second node are required to perform a specific operation on the received message, then both the first forwarding behavior and the second forwarding behavior include the specific operation. Since the DA field carries a first segment identifier that can guide the forwarding behavior of multiple nodes, there is no need to allocate segment identifiers to each node separately, thus effectively simplifying the operational complexity of message forwarding.
- Figure 13 is a schematic structural diagram of another first node provided by an embodiment of the present application.
- This first node can be applied to a message forwarding system such as that shown in Figure 1, and can implement the execution of the first node in the above method embodiment.
- a step of. As shown in Figure 13, the first node includes:
- the acquisition module 601 is used to obtain the first segment identifier and the forwarding behavior corresponding to the first segment identifier.
- the acquisition module 601 please refer to the relevant descriptions of step 201 and step 301 in the above method embodiment.
- Adding module 602 is used to add a forwarding entry in the forwarding table.
- the forwarding entry includes the first segment identifier and the forwarding behavior.
- the forwarding behavior does not include the value of the DA field in the outer IPv6 header of the update message, and does not This includes stripping off the outer IPv6 header, and the first segment identifier being a locally instantiated segment identifier of the first node.
- the adding module 602 please refer to the relevant descriptions of steps 203 and 304 in the above method embodiment.
- the forwarding module 603 is used to forward the message according to the forwarding entry.
- the forwarding module 603 please refer to the relevant description of step 205 in the above method embodiment.
- the acquisition module 601 can be used to: receive the first segment identifier issued by the controller and the forwarding behavior corresponding to the first segment identifier; or, obtain the statically configured first segment identifier and the forwarding behavior corresponding to the first segment identifier. forwarding behavior.
- the outer IPv6 header includes: IPv6 basic header and/or IPv6 extension header.
- the DA field is included in the IPv6 basic header.
- the forwarding behavior does not include updating the value of the SL field.
- the forwarding behavior may include: forwarding based on a specified next hop address.
- the forwarding behavior may also include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- the forwarding module 603 can be used to: receive a first message, the DA field of the first message includes the first segment identifier; determine the forwarding entry according to the first segment identifier to determine the forwarding behavior; and Forward the second message according to the forwarding behavior.
- the second message is obtained based on the first message, and the DA field of the second message also includes the first segment identifier.
- the forwarding module 603 reference can also be made to the relevant descriptions of steps 101 to 103 and steps 310 to 312 in the above method embodiment.
- the first node provided by the embodiment of the present application can add the first segment identifier and the corresponding first forwarding behavior to its forwarding entry, and forward the message according to the forwarding entry. Since the forwarding behavior corresponding to the first segment identifier does not include updating the value of the DA field in the outer IPv6 header of the message, and does not include stripping the outer IPv6 header, it is possible to ensure that the DA field in the message sent by the first node Also include this first paragraph of identification. Correspondingly, the node that receives the message can perform forwarding behavior under the guidance of the first segment identifier. Since the first segment identifier can guide the forwarding behavior of multiple nodes, there is no need to allocate segment identifiers to each node, which effectively simplifies the operational complexity of message forwarding.
- FIG 14 is a schematic structural diagram of a second node provided by an embodiment of the present application.
- the second node can be applied to a message forwarding system such as that shown in Figure 1, and can implement the steps performed by the second node in the above method embodiment. step.
- the second node includes:
- the receiving module 701 is configured to receive a second message forwarded by the first node according to the first forwarding behavior, where the DA field of the second message includes a first segment identifier.
- the second message is obtained based on the first message received by the first node
- the DA field of the first message includes the first segment identifier
- the first forwarding behavior is performed by the first node based on the first segment identifier. Determined from the first forwarding entry of the first node.
- the receiving module 701 please refer to the relevant descriptions of steps 104 and 312 in the above method embodiment.
- the determining module 702 is configured to determine a second forwarding entry according to the first segment identifier, so as to determine the second forwarding behavior corresponding to the first segment identifier from the second forwarding entry.
- the determination module 702 please refer to the relevant descriptions of step 105 and step 313 in the above method embodiment.
- the forwarding module 703 is configured to forward the third message according to the second forwarding behavior, and the third message is obtained based on the second message.
- the forwarding module 703 please refer to the relevant descriptions of step 106 and step 314 in the above method embodiment.
- the first forwarding behavior does not include updating the value of the SL field.
- the second forwarding behavior includes the same sub-behavior as the first forwarding behavior, and the DA field of the third message includes the first segment identifier.
- the same sub-behavior includes at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- the second forwarding behavior does not include: updating the value of the SL field.
- the DA field of the third message does not include the first segment identifier
- the second forwarding behavior may include updating the value of the SL field.
- the third message does not include a DA field
- the second forwarding behavior may include stripping the outer IPv6 header.
- the first forwarding behavior may include: forwarding based on the first next hop address; the second forwarding behavior may include: forwarding based on the second next hop address.
- the second next hop address is different from the first next hop address.
- both the first message and the second message include an SRH, and the segment list of the SRH includes the first segment identifier.
- the DA field in the packets received by the first node and the second node both includes the first segment identifier.
- both nodes can determine the forwarding behavior corresponding to the first segment identifier by determining the forwarding table entry, and execute the forwarding behavior. Since different nodes in the message forwarding system can perform forwarding behaviors under the guidance of the same first segment identifier, there is no need to assign segment identifiers to each node respectively, thus effectively simplifying the operational complexity of message forwarding.
- FIG 15 is a schematic structural diagram of a controller provided by an embodiment of the present application.
- the controller can be applied to a message forwarding system such as that shown in Figure 1, and can implement the steps performed by the controller in the above method embodiment.
- the controller includes:
- the first sending module 801 is configured to deliver the first segment identifier and the first forwarding behavior corresponding to the first segment identifier to the first node in the message forwarding system.
- the first sending module 801 please refer to the relevant descriptions of step 201 and step 301 in the above method embodiment.
- the second sending module 802 is configured to deliver the first segment identifier and the second forwarding behavior corresponding to the first segment identifier to the second node in the message forwarding system.
- the second sending module 802 please refer to the relevant descriptions of steps 202 and 302 in the above method embodiment.
- the first forwarding behavior does not include updating the value of the DA field, and does not include stripping off the outer IPv6 header.
- the second forwarding behavior includes the same sub-behavior as the first forwarding behavior.
- the same sub-behavior includes at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
- the first forwarding behavior includes: forwarding based on a first next hop address; the second forwarding behavior includes: based on a second next hop address, the second next hop address being different from the first next hop address .
- both the first sending module 801 and the second sending module 802 can be used to: deliver the first segment identifier to the node in the message forwarding system based on the NETCONF protocol or BGP, and the first segment identifier corresponding to forwarding behavior.
- the controller provided by the embodiment of the present application can deliver the first segment identifier and the corresponding first segment to the first node. forwarding behavior, and deliver the second segment identifier and the corresponding second forwarding behavior to the second node.
- the first node and the second node can then add the configuration information issued by the controller to the forwarding table entry, and forward the message based on the forwarding table entry. Since the first segment identifier in the configuration information delivered by the controller to different nodes is the same, the first segment identifier can guide the forwarding behavior of different nodes. If both the first node and the second node are required to perform a specific operation on the received message, then both the first forwarding behavior and the second forwarding behavior include the specific operation. Since the controller provided by the embodiment of the present application does not need to allocate segment identifiers to each node, it effectively simplifies the operational complexity of message forwarding.
- FIG 16 is a schematic structural diagram of a third node provided by an embodiment of the present application.
- the third node can be the head node in the message forwarding system such as shown in Figure 1, and can implement the third node in the above method embodiment. The steps the node performs.
- the third node includes:
- the encapsulation module 901 is used to encapsulate the SRH in the message, and the segment list of the SRH includes the first segment identifier.
- the encapsulation module 901 please refer to the relevant description of step 307 in the above method embodiment.
- the sending module 902 is used to send the message so that at least two nodes in the message forwarding system determine the forwarding entry according to the first segment identifier in the DA field of the message to determine the corresponding first segment identifier. forwarding behavior, and forward the message according to this forwarding behavior.
- the sending module 902 please refer to the relevant descriptions of steps 308 to 310 in the above method embodiment.
- the segment list includes a first segment identifier.
- the segment list includes multiple first segment identifiers, and a second segment identifier is included between two adjacent first segment identifiers, and the first segment identifier is different from the second segment identifier.
- the third node provided by the embodiment of the present application can encapsulate the SRH in the message, and the segment list of the SRH includes the first segment identifier. Since the first segment identifier can be carried in the DA field of the message to guide the forwarding behavior of multiple nodes, there is no need to allocate segment identifiers to each node, which effectively simplifies the operational complexity of message forwarding.
- controller and each node provided by the embodiment of the present application can also be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).
- ASIC application-specific integrated circuit
- PLD programmable logic device
- the above-mentioned PLD It can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL) or any combination thereof.
- CPLD complex programmable logical device
- FPGA field-programmable gate array
- GAL general array logic
- the message forwarding method provided by the above method embodiment can also be implemented through software.
- the functional modules in the controller and each node can also be software modules.
- Figure 17 is a schematic structural diagram of a network device provided by an embodiment of the present application.
- the network device can be applied to a system such as that shown in Figure 1, and the network device can be a controller or any node in the system, for example, it can be a first node, a second node, or a third node.
- the network device includes: a processor 1001, a memory 1002, a network interface 1003 and a bus 1004.
- the computer program 10021 is stored in the memory 1002, and the computer program 10021 is used to implement various application functions.
- the processor 1001 is configured to execute the computer program 10021 to implement the message forwarding method provided by the above method embodiment and applied to the first node, the second node, the third node or the controller.
- the processor 1001 can be a central processing unit (CPU).
- the processor 1001 can also be other general-purpose processors, digital signal processors (DSP), ASICs, FPGAs, graphics processing units, etc. processor (graphics processing unit, GPU) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- DSP digital signal processor
- ASIC application specific integrated circuit
- FPGA field-programmable gate array
- GPU graphics processing unit
- a general purpose processor can be a microprocessor or any conventional processor.
- Memory 1002 may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
- non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically removable memory. Erase electrically programmable read-only memory (EPROM, EEPROM) or flash memory.
- Volatile memory can be random access memory (RAM), which is used as an external cache.
- RAM static random access memory
- DRAM dynamic random access memory
- SDRAM synchronous dynamic random access memory
- double data rate synchronous dynamic random access memory double data date SDRAM, DDR SDRAM
- enhanced synchronous dynamic random access memory enhanced SDRAM, ESDRAM
- synchronous link dynamic random access memory direct rambus RAM, DR RAM
- the network interface 1003 is used to implement communication connections with other devices (which may be wired or wireless). Among them, in this embodiment of the present application, the network interface 1003 is used to send and receive messages. Among them, other devices may be terminals, servers, VMs and other devices or other network devices.
- the bus 1004 is used to connect the processor 1001, the memory 1002 and the network interface 1003. Furthermore, in addition to the data bus, the bus 1004 may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, the various buses are labeled as bus 1004 in the figure.
- the processor 1001 is configured to receive the first message through the network interface 1003.
- the DA field of the first message includes the first segment identifier, and is configured to determine the first segment according to the first segment identifier. Forwarding entry, to determine the forwarding behavior corresponding to the first segment identifier from the first forwarding entry; and for forwarding the second message through the network interface 1003 according to the forwarding behavior.
- the second message is obtained based on the first message, and the DA field of the second message includes a first segment identifier, and the first segment identifier is a locally instantiated SRv6 SID of the first node.
- the processor 1001 is used to obtain the first segment identifier and the forwarding behavior corresponding to the first segment identifier, add a forwarding entry to the forwarding table, and forward the message through the network interface 1003 according to the forwarding entry.
- the first segment identifier is a locally instantiated SRv6 SID of the first node.
- the forwarding entry includes the first segment identifier and the forwarding behavior. The forwarding behavior does not include the value of the DA field in the outer IPv6 header of the update message, and does not include stripping the outer IPv6 header.
- the processor 1001 may be configured to receive a second message through the network interface 1003.
- the DA field of the second message includes a first segment identifier, and is configured to determine the first segment identifier based on the first segment identifier. and two forwarding entries, to determine the second forwarding behavior corresponding to the first segment identifier from the second forwarding entry, and to forward the third message according to the second forwarding behavior.
- the third message is obtained based on the second message, and the first segment identifier is a locally instantiated SRv6 SID of the second node.
- the processor 1001 may be configured to deliver the first segment identifier and the first forwarding behavior corresponding to the first segment identifier to the first node in the message forwarding system through the network interface 1003, and send the first segment identifier to the first node.
- the second node in the message forwarding system delivers the first segment identifier and the second forwarding behavior corresponding to the first segment identifier.
- the first forwarding behavior does not include updating the value of the DA field, and does not include stripping off the outer IPv6 header.
- the processor 1001 can encapsulate the SRH in the message, the segment list of the SRH includes the first segment identifier, and send the message through the network interface 1003 so that the message can be forwarded.
- At least two nodes in the system determine the forwarding entry based on the first segment identifier in the DA field of the message, determine the forwarding behavior corresponding to the first segment identifier from the forwarding entry, and forward the message based on the forwarding behavior.
- the first segment identifier is a locally instantiated segment identifier of each node in the at least two nodes.
- Figure 18 is a schematic structural diagram of another network device provided by an embodiment of the present application.
- the network device can be applied to a system such as that shown in Figure 1, and can be a controller or any node in the system, for example, it can be a first node, a second node or a third node.
- the network device may include: a main control board 1101 and at least one interface board (the interface board is also called a line card or a service board).
- the interface board is also called a line card or a service board.
- Figure 18 shows the interface board 1102 and the interface board 1103.
- the network device may also include a switching network board 1104, which is used to complete data exchange between the interface boards.
- the main control board 1101 is also called a main processing unit (MPU) or a route processor card.
- the main control board 1101 is used to complete functions such as system management, equipment maintenance, and protocol processing.
- the main control board 1101 includes: a central processing unit 11011 and a memory 11012.
- Interface boards 1102 and 1103 are also called line processing unit (LPU), line card (line card) or service boards.
- the interface boards are used to provide various service interfaces and implement packet forwarding.
- the service interfaces provided by the interface board can include: SONET/SDH-based packet (packet over SONET/SDH, POS) interface, Gigabit Ethernet (gigabit Ethernet, GE) interface and asynchronous transfer mode (asynchronous transfer mode, ATM) interface, etc.
- SONET refers to synchronous optical network (synchronous optical network)
- SDH refers to synchronous digital hierarchy (synchronous digital hierarchy).
- the main control board 1101, the interface board 1102 and the interface board 1103 are connected to the system backplane through a system bus to achieve intercommunication.
- the interface board 1102 includes one or more central processors 11021.
- the central processor 11021 is used to control and manage the interface board 1102 and communicate with the central processor 11011 on the main control board 1101 and the interface board 1102 .
- the memory 11024 on the interface board 1102 is used to store forwarding entries, and the network processor 11022 can forward messages by searching for the forwarding entries stored in the memory 11024.
- Memory 11024 may also be used to store program code.
- the interface board 1102 also includes one or more physical interface cards 11023.
- the one or more physical interface cards 11023 are used to receive messages sent by the previous hop node and send them to the next hop node according to the instructions of the central processor 11021. processed message.
- the central processor 11021 and/or the network processor 11022 in the interface board 1102 in Figure 18 can be dedicated hardware or chips.
- an ASIC can be used to implement the above functions.
- This implementation method is generally The forwarding plane is processed by dedicated hardware or chips.
- the central processor 11021 and/or the network processor 11022 may also use a general-purpose processor, such as a general-purpose CPU, to implement the functions described above.
- main control boards 1101 there may be one or more main control boards 1101, and when there are multiple main control boards, they may include a main main control board and a backup main control board.
- the network device includes an interface board 1102 and an interface board 1103.
- the structure of the interface board 1103 is basically the same as that of the interface board 1102, and the operations on the interface board 1103 are basically similar to the operations on the interface board 1102. For the sake of simplicity, they will not be described again.
- the network device has multiple interface boards, the multiple interface boards They can communicate with each other through one or more switching network boards 1104, and can realize load sharing and redundancy backup to provide large-capacity data exchange and processing capabilities.
- the network device does not need the switching network board 1104, and the interface board is responsible for processing the service data of the entire system. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture.
- the specific architecture used depends on the specific networking deployment scenario and is not limited here.
- memory 11012 and memory 11024 may be ROM or other types of static storage devices that can store static information and instructions, or they may be RAM or other types of dynamic storage devices that can store information and instructions. They may also be It is EEPROM, compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk or other magnetic storage device , or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
- CD-ROM compact disc read-only memory
- optical disc storage including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.
- magnetic disk or other magnetic storage device or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
- the memory 11024 in the interface board 1102 can exist independently and be connected to the central processor 11021 through a communication bus; or the memory 11024 can also be integrated with the central processor 11021.
- the memory 11012 in the main control board 1101 can exist independently and be connected to the central processor 11011 through a communication bus; or the memory 11012 can also be integrated with the central processor 11011.
- the program code stored in the memory 11024 is controlled and executed by the central processor 11021, and the program code stored in the memory 11012 is controlled and executed by the central processor 11011.
- the central processor 11021 and/or the central processor 11011 can implement the message forwarding method provided in the above embodiments by executing program codes. For example, a method executed by a first node, a second node, a third node or a controller may be implemented.
- the program code stored in the memory 11024 and/or the memory 11012 may include one or more software units, and the one or more software units may be the functional modules shown in any of the figures in FIGS. 12 to 16 .
- the physical interface card 11023 can be a device using any transceiver, used to communicate with other devices or communication networks, such as Ethernet, radio access network (radio access network, RAN), Wireless local area networks (WLAN), etc.
- Ethernet radio access network
- RAN radio access network
- WLAN Wireless local area networks
- the device shown in any one of Figures 12 to 17 can also be implemented using the structure shown in Figure 18 .
- Embodiments of the present application also provide a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are run on a computer, they cause the computer to execute the steps performed by the first node and the third node in the above method embodiment. Steps performed by the second node, third node, or controller.
- Embodiments of the present application also provide a computer program product containing instructions.
- the computer program product When the computer program product is run on a computer, it causes the computer to execute the first node, the second node, the third node or the controller in the above method embodiment. steps to perform.
- the embodiment of the present application also provides a message forwarding system.
- the message forwarding system includes multiple nodes 01.
- At least two nodes 01 among the plurality of nodes 01 may be used to implement the steps performed by the first node in the above method embodiment.
- the at least two nodes 01 may include a first node and a second node.
- the first node is used to implement the steps performed by the first node in the above method embodiment.
- the second node is used to implement the steps in the above method embodiment. Steps performed by the second node.
- the structure of the first node may be as shown in Figure 12, Figure 13, Figure 17 or Figure 18, and the structure of the second node may be as shown in Figure 14, Figure 17 or Figure 18.
- the system may also include: controller 03.
- controller 03 can be used to implement the method performed by the controller in the above method embodiment.
- the structure of the controller can be shown in Figure 15, Figure 17 or Figure 18.
- At least one node 01 among the plurality of nodes 01 can also be used to implement the method performed by the third node in the above method embodiment. That is, the plurality of nodes 01 may include a third node, and the structure of the third node may be as shown in any of the figures in FIG. 16 to FIG. 18 .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present application belongs to the technical field of communications. Provided are a packet forwarding method, apparatus and system. In the solution provided in the present application, a node can determine a forwarding table entry according to a first segment identification in a DA field of a first packet so as to determine a forwarding behavior, and forward, according to the forwarding behavior, a second packet obtained on the basis of the first packet. Since a DA field of the second packet also comprises the first segment identification, a node that has received the second packet can also determine a forwarding table entry according to the first segment identification, and determine a corresponding forwarding behavior. That is, the first segment identification can guide forwarding behaviors of a plurality of nodes. On this basis, if the plurality of nodes all need to execute a specific operation on a received packet, it is necessary to ensure that forwarding behaviors of the nodes that are guided by the first segment identification all comprise the specific operation. Therefore, there is no need to respectively allocate a segment identification to each node, thereby effectively reducing the operation complexity during packet forwarding.
Description
本申请要求于2022年4月02日提交的申请号为202210351055.1、发明名称为“一种新型数据面编程方法”的中国专利申请的优先权,以及要求于2022年6月10日提交的申请号为202210658325.3、发明名称为“报文转发方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with application number 202210351055.1 and the invention title "A New Data Plane Programming Method" submitted on April 2, 2022, as well as the application number submitted on June 10, 2022 It is the priority of the Chinese patent application 202210658325.3 with the invention title "Message Forwarding Method, Device and System", the entire content of which is incorporated into this application by reference.
本申请涉及通信技术领域,特别涉及一种报文转发方法、装置及系统。The present application relates to the field of communication technology, and in particular to a message forwarding method, device and system.
SRv6是一种基于互联网协议第6版(internet protocol version 6,IPv6)的段路由(segment routing)转发技术。SRv6报文中插入有分段路由头(segment routing header,SRH),该SRH包括段列表(segment list),段列表用于携带报文的转发路径中节点的段标识(segment identification,SID)。其中,SID是一种特殊的IPv6地址,其既具普通IPv6地址的路由能力,也具有SRv6特有的行为能力。SRv6 is a segment routing (segment routing) forwarding technology based on Internet Protocol version 6 (IPv6). A segment routing header (SRH) is inserted into the SRv6 message. The SRH includes a segment list. The segment list is used to carry the segment identification (SID) of the node in the forwarding path of the message. Among them, SID is a special IPv6 address that has both the routing capabilities of ordinary IPv6 addresses and the unique behavioral capabilities of SRv6.
网络中每个支持SRv6的节点(简称SRv6节点)均维护有一张本地(local)SID表,该本地SID表包括多个SID,以及每个SID对应的行为(behavior)。SRv6节点接收到报文后,若检测到报文的目的地址(destination address,DA)字段的值与本地SID表中某个SID匹配,则SRv6节点会执行该SID对应的行为,该行为通常包括基于段列表更新DA字段的值。之后,SRv6节点即可将报文转发至下一跳节点。Each node that supports SRv6 (SRv6 node for short) in the network maintains a local SID table. The local SID table includes multiple SIDs and the behavior corresponding to each SID. After receiving the message, if the SRv6 node detects that the value of the destination address (DA) field of the message matches a certain SID in the local SID table, the SRv6 node will perform the behavior corresponding to the SID. This behavior usually includes Update the value of the DA field based on the segment list. Afterwards, the SRv6 node can forward the packet to the next hop node.
在某些场景下,需要转发路径中的每个节点均对接收到的报文执行特定操作,例如,均采用指定的网络切片,例如网络切片1,来转发报文。按照传统的SRv6网络编程方法,需分别为转发路径中的每个节点定义特定的SID,该特定的SID指示采用网络切片1转发报文。例如为转发路径中的节点1、节点2和节点3分别定义SID 1,SID 2,SID 3,SID 1为节点1的SID,用于指示采用网络切片1转发报文,SID 2为节点2的SID,用于指示采用网络切片1转发报文,SID 3为节点3的SID,用于指示采用网络切片1转发报文。In some scenarios, each node in the forwarding path needs to perform a specific operation on the received packet. For example, all nodes use a specified network slice, such as network slice 1, to forward the packet. According to the traditional SRv6 network programming method, a specific SID needs to be defined for each node in the forwarding path. The specific SID indicates that network slice 1 is used to forward the packet. For example, define SID 1, SID 2, and SID 3 respectively for node 1, node 2, and node 3 in the forwarding path. SID 1 is the SID of node 1, which is used to indicate that network slice 1 is used to forward packets, and SID 2 is the SID of node 2. SID is used to indicate that network slice 1 is used to forward packets. SID 3 is the SID of node 3 and is used to indicate that network slice 1 is used to forward packets.
转发路径的头节点可以在报文中插入SRH,该SRH的段列表中记录有转发路径中节点的特定的SID,例如SID 1,SID 2和SID 3。相应的,接收到报文的节点即可基于该特定的SID,采用指定的网络切片,例如网络切片1,转发报文。但是,上述报文转发方式需要为转发路径中的每个节点均定义特定的SID,其操作复杂度较高,效率较低。The head node of the forwarding path can insert an SRH into the message. The segment list of the SRH records the specific SIDs of the nodes in the forwarding path, such as SID 1, SID 2 and SID 3. Correspondingly, the node that receives the message can use the specified network slice, such as network slice 1, to forward the message based on the specific SID. However, the above packet forwarding method requires defining a specific SID for each node in the forwarding path, which has high operational complexity and low efficiency.
发明内容Contents of the invention
本申请提供了一种报文转发方法、装置及系统,可以解决为每个节点分别定义SID导致的报文转发的复杂度较高的技术问题。This application provides a message forwarding method, device and system, which can solve the technical problem of high complexity of message forwarding caused by defining SID for each node separately.
第一方面,提供了一种报文转发方法,应用于第一节点。该方法包括:接收第一报文,第一报文的DA字段包括第一段标识。根据该第一段标识确定转发表项,该转发表项中包括第一段标识对应的转发行为,且该第一段标识为第一节点的一个本地实例化的段标识。之后,根据该转发行为向第二节点转发第二报文。其中,该第二报文为基于第一报文获得,且该第二报文的DA字段包括第一段标识。
In the first aspect, a message forwarding method is provided, which is applied to the first node. The method includes: receiving a first message, where the DA field of the first message includes a first segment identifier. The forwarding entry is determined according to the first segment identifier, the forwarding entry includes the forwarding behavior corresponding to the first segment identifier, and the first segment identifier is a locally instantiated segment identifier of the first node. Afterwards, the second message is forwarded to the second node according to the forwarding behavior. The second message is obtained based on the first message, and the DA field of the second message includes the first segment identifier.
其中,所述第二报文中的所述第一段标识用于指示所述第二节点根据所述第一段标识查找转发表项,该第一段标识也是所述第二节点的一个本地实例化的段标识。Wherein, the first segment identifier in the second message is used to instruct the second node to search for a forwarding entry based on the first segment identifier, which is also a local identifier of the second node. The instantiated segment identifier.
由于第二报文的DA字段也包括该第一段标识,因此接收到第二报文的节点也能够根据该第一段标识确定转发表项,以确定对应的转发行为。也即是,该第一段标识能够指导多个节点的转发行为。基于此,若需要多个节点均对接收到的报文执行特定操作,则使该第一段标识指导的各个节点的转发行为均包括该特定操作即可。由此,无需分别为每个节点分配段标识,有效简化了报文转发时的操作复杂度。Since the DA field of the second message also includes the first segment identifier, the node that receives the second message can also determine the forwarding entry based on the first segment identifier to determine the corresponding forwarding behavior. That is to say, the first segment of identification can guide the forwarding behavior of multiple nodes. Based on this, if multiple nodes need to perform a specific operation on the received message, then the forwarding behavior of each node guided by the first segment of the identifier can include the specific operation. This eliminates the need to allocate segment identifiers to each node, effectively simplifying the operational complexity of packet forwarding.
可选地,该转发行为不包括更新段剩余(segment left,SL)字段的值。可以理解的是,在SRv6系统中,节点若更新了SL字段的值,则需基于更新后的SL字段的值,更新DA字段的值。由于该第一段标识对应的转发行为不包括更新SL字段的值,因此可以避免对DA字段的更新,进而可以确保第二报文的DA字段也包括第一段标识。Optionally, the forwarding behavior does not include updating the value of the segment left (SL) field. It can be understood that in the SRv6 system, if a node updates the value of the SL field, it needs to update the value of the DA field based on the updated value of the SL field. Since the forwarding behavior corresponding to the first segment identifier does not include updating the value of the SL field, updating the DA field can be avoided, thereby ensuring that the DA field of the second message also includes the first segment identifier.
可选地,该转发行为不包括剥离该第一报文的外层IPv6头。由于第一报文的DA字段包括在该外层IPv6头中,因此该转发行为还不包括剥离该外层IPv6头。也就是说,该第一节点并非网络出口节点。Optionally, the forwarding behavior does not include stripping off the outer IPv6 header of the first message. Since the DA field of the first message is included in the outer IPv6 header, the forwarding behavior does not include stripping off the outer IPv6 header. In other words, the first node is not a network egress node.
可选地,该第一报文和第二报文均可以包括外层IPv6头,该外层IPv6头包括DA字段。例如,该外层IPv6头可以包括IPv6基本头和IPv6扩展头,该DA字段包括在该IPv6基本头中。Optionally, both the first packet and the second packet may include an outer IPv6 header, and the outer IPv6 header includes a DA field. For example, the outer IPv6 header may include an IPv6 basic header and an IPv6 extension header, and the DA field is included in the IPv6 basic header.
可选地,该第一报文和第二报文均可以为SRv6报文,该SRv6报文包括SRH。该SRH的段列表中包括该第一段标识。Optionally, both the first message and the second message may be SRv6 messages, and the SRv6 messages include SRH. The first segment identifier is included in the segment list of the SRH.
本申请提供的方案通过在SRH的段列表中携带第一段标识,可以使得报文转发系统中的节点能够按照传统SRv6报文的处理方法,对该SRv6报文进行处理。例如,节点能够基于SL字段的值,将段列表中的第一段标识拷贝至DA字段。由此可知,本申请提供的方案能够与传统SRv6技术有效兼容。The solution provided by this application can enable the nodes in the message forwarding system to process the SRv6 message according to the traditional SRv6 message processing method by carrying the first segment identifier in the SRH segment list. For example, a node can copy the first segment identifier in the segment list to the DA field based on the value of the SL field. It can be seen from this that the solution provided by this application can be effectively compatible with traditional SRv6 technology.
可选地,该段列表中可以包括多个第一段标识,相邻两个第一段标识之间可以包括第二段标识,该第一段标识与第二段标识不同。其中,该第二段标识可以为普通SID,该普通SID可以仅用于指导一个节点的转发行为。例如,该普通SID可以是虚拟专用网络(virtual private network,VPN)SID。Optionally, the segment list may include multiple first segment identifiers, and a second segment identifier may be included between two adjacent first segment identifiers, and the first segment identifier may be different from the second segment identifier. The second segment of the identifier may be a common SID, and the common SID may be used only to guide the forwarding behavior of one node. For example, the common SID may be a virtual private network (VPN) SID.
在本申请提供的方案中,若报文转发系统中多个连续的节点执行的转发行为需包括相同的子行为(例如加密转发),则可以通过段列表中的一个第一段标识指导该相同的子行为。若需要执行该相同的子行为的多个节点不完全连续,则可以在段列表中设置多个第一段标识,并在相邻两个第一段标识之间插入第二段标识。该第二段标识为无需执行该相同的子行为的其他节点的SID。基于此,报文转发系统中的部分节点可以在第一段标识的指导下,执行该相同的子行为,其他节点则可以在第二段标识的指导下执行其他转发行为。In the solution provided by this application, if the forwarding behavior performed by multiple consecutive nodes in the message forwarding system needs to include the same sub-behavior (such as encrypted forwarding), the same sub-behavior can be directed through a first segment identifier in the segment list. sub-behavior. If multiple nodes that need to execute the same sub-behavior are not completely consecutive, you can set multiple first segment identifiers in the segment list and insert a second segment identifier between two adjacent first segment identifiers. The second segment identifies the SIDs of other nodes that do not need to perform the same sub-behavior. Based on this, some nodes in the message forwarding system can perform the same sub-behavior under the guidance of the first identifier, and other nodes can perform other forwarding behaviors under the guidance of the second identifier.
可选地,该第一段标识对应的转发行为可以包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。Optionally, the forwarding behavior corresponding to the first segment identifier may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
由于该第一段标识能够指导多个节点的转发行为,因此该第一段标识也可以称为全局段标识(global SID,GSID或GID)。本申请提供的方法,可以通过不同的GID指示不同的转发行为,从而有效提高了报文转发处理的灵活性。Since the first segment identifier can guide the forwarding behavior of multiple nodes, the first segment identifier can also be called a global segment identifier (global SID, GSID or GID). The method provided by this application can indicate different forwarding behaviors through different GIDs, thereby effectively improving the flexibility of message forwarding processing.
可选地,该第一段标识对应的转发行为可以包括:基于指定的下一跳地址转发。由于报文转发系统中多个节点均基于DA字段的第一段标识转发报文,因此该第一段标识还可以指示下一跳地址,以确保报文的可靠转发。并且,对于不同的节点,该第一段标识指示的下一跳
地址不同。Optionally, the forwarding behavior corresponding to the first segment identification may include: forwarding based on the specified next hop address. Since multiple nodes in the packet forwarding system forward packets based on the first identifier of the DA field, the first identifier can also indicate the next hop address to ensure reliable forwarding of the message. And, for different nodes, the first segment identifies the next hop indicated The address is different.
可选地,该方法还可以包括:获得第一段标识和转发行为,并在转发表中添加转发表项,该转发表项包括第一段标识以及转发行为。Optionally, the method may also include: obtaining the first segment identifier and the forwarding behavior, and adding a forwarding entry in the forwarding table, where the forwarding entry includes the first segment identifier and the forwarding behavior.
接收到第一报文的节点能够以该第一段标识为索引查找转发表,以准确地确定该转发表项,进而确定该转发行为。The node that receives the first message can use the first segment identifier as an index to search the forwarding table to accurately determine the forwarding entry and thereby determine the forwarding behavior.
可选地,获得第一段标识和转发行为的过程可以包括:接收控制器下发的第一段标识和转发行为;或者,获得静态配置的第一段标识和转发行为。其中,静态配置可以是指运维人员在节点中手动配置。Optionally, the process of obtaining the first segment identifier and forwarding behavior may include: receiving the first segment identifier and forwarding behavior issued by the controller; or, obtaining the statically configured first segment identifier and forwarding behavior. Among them, static configuration may refer to manual configuration by operation and maintenance personnel in the node.
第二方面,提供了一种报文转发方法,应用于第一节点。该方法包括:获得第一段标识和第一段标识对应的转发行为,并在转发表中添加转发表项,该转发表项包括第一段标识以及该转发行为。之后,根据该转发表项向第二节点转发报文。其中,该转发行为不包括更新报文的外层IPv6头中DA字段的值,且不包括剥离外层IPv6头,且该第一段标识为第一节点的一个本地实例化的段标识。In the second aspect, a message forwarding method is provided, which is applied to the first node. The method includes: obtaining the first segment identifier and the forwarding behavior corresponding to the first segment identifier, and adding a forwarding entry in the forwarding table, where the forwarding entry includes the first segment identifier and the forwarding behavior. Afterwards, the message is forwarded to the second node according to the forwarding entry. The forwarding behavior does not include updating the value of the DA field in the outer IPv6 header of the message, and does not include stripping off the outer IPv6 header, and the first segment identifier is a locally instantiated segment identifier of the first node.
由于该转发行为不包括更新DA字段的值,且不包括剥离外层IPv6头,因此可以确保节点发出的报文的DA字段也包括该第一段标识。相应的,接收到报文的节点也能够根据该DA字段中的第一段标识执行相同的转发行为。由于本申请提供的方案无需分别为报文转发系统中的每个节点分配段标识,因此有效简化了报文转发时的操作复杂度。Since the forwarding behavior does not include updating the value of the DA field and stripping off the outer IPv6 header, it can be ensured that the DA field of the message sent by the node also includes the first segment identifier. Correspondingly, the node that receives the message can also perform the same forwarding behavior based on the first segment identifier in the DA field. Since the solution provided by this application does not need to allocate segment identifiers to each node in the message forwarding system, it effectively simplifies the operational complexity of message forwarding.
可选地,节点获得第一段标识和第一段标识对应的转发行为的过程可以包括:接收控制器下发的第一段标识和第一段标识对应的转发行为;或者,获得静态配置的第一段标识和第一段标识对应的转发行为。Optionally, the process for a node to obtain the first segment identifier and the forwarding behavior corresponding to the first segment identifier may include: receiving the first segment identifier and the forwarding behavior corresponding to the first segment identifier issued by the controller; or, obtaining the statically configured The first segment identifier and the forwarding behavior corresponding to the first segment identifier.
可选地,该外层IPv6头可以包括:IPv6基本头和/或IPv6扩展头。Optionally, the outer IPv6 header may include: an IPv6 basic header and/or an IPv6 extension header.
可选地,该DA字段可以包括在IPv6基本头中。Optionally, the DA field may be included in the IPv6 basic header.
可选地,该转发行为不包括更新SL字段的值。Optionally, the forwarding behavior does not include updating the value of the SL field.
可选地,该转发行为可以包括:基于指定的下一跳地址转发。Optionally, the forwarding behavior may include: forwarding based on a specified next hop address.
可选地,该转发行为可以包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。Optionally, the forwarding behavior may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
可选地,第一节点根据转发表向第二节点转发报文的过程可以包括:接收第一报文,该第一报文的DA字段包括第一段标识。之后,根据第一段标识确定转发表项,以确定转发行为,并根据转发行为转发第二报文。该第二报文为基于第一报文获得,且该第二报文的DA字段包括第一段标识。Optionally, the process of the first node forwarding the message to the second node according to the forwarding table may include: receiving the first message, the DA field of the first message including the first segment identifier. Afterwards, the forwarding table entry is determined based on the first segment identifier to determine the forwarding behavior, and the second message is forwarded based on the forwarding behavior. The second message is obtained based on the first message, and the DA field of the second message includes the first segment identifier.
第三方面,提供了一种报文转发方法,应用于报文转发系统,该报文转发系统包括第一节点和第二节点。该方法包括:第一节点接收第一报文,第一报文的DA字段包括第一段标识;第一节点根据第一段标识确定第一转发表项,以从该第一转发表项中确定第一段标识对应的第一转发行为,并根据该第一转发行为向第二节点转发第二报文。该第二报文为基于第一报文获得。第二节点接收第二报文,该第二报文的DA字段包括第一段标识。之后,第二节点根据该第一段标识确定第二转发表项,以从该第二转发表项中确定第一段标识对应的第二转发行为,并根据第二转发行为转发第三报文。该第三报文为基于第二报文获得。其中,该第一段标识为第一节点的一个本地实例化的段标识,且为第二节点的一个本地实例化的段标识。In the third aspect, a message forwarding method is provided, which is applied to a message forwarding system. The message forwarding system includes a first node and a second node. The method includes: a first node receives a first message, and the DA field of the first message includes a first segment identifier; the first node determines a first forwarding entry based on the first segment identifier, so as to obtain the first forwarding entry from the first forwarding entry. Determine the first forwarding behavior corresponding to the first segment identifier, and forward the second message to the second node according to the first forwarding behavior. The second message is obtained based on the first message. The second node receives the second message, and the DA field of the second message includes the first segment identifier. Afterwards, the second node determines a second forwarding entry based on the first segment identifier, determines the second forwarding behavior corresponding to the first segment identifier from the second forwarding entry, and forwards the third message according to the second forwarding behavior. . The third message is obtained based on the second message. Wherein, the first segment identifier is a locally instantiated segment identifier of the first node, and is a locally instantiated segment identifier of the second node.
本申请提供的方案中,第一节点和第二节点均能够根据DA字段中的第一段标识执行转发行为,即一个第一段标识能够指导多个节点的转发行为。基于此,若需要多个节点均对接收
到的报文执行特定操作,则使该第一段标识指导的各个节点的转发行为均包括该特定操作即可。由此,无需分别为每个节点分配段标识,有效简化了报文转发时的操作复杂度。In the solution provided by this application, both the first node and the second node can perform forwarding behavior according to the first segment identifier in the DA field, that is, one first segment identifier can guide the forwarding behavior of multiple nodes. Based on this, if multiple nodes need to receive If the received packet performs a specific operation, then the forwarding behavior of each node guided by the first segment identification only needs to include the specific operation. This eliminates the need to allocate segment identifiers to each node, effectively simplifying the operational complexity of packet forwarding.
可选地,该第一转发行为不包括更新SL字段的值。Optionally, the first forwarding behavior does not include updating the value of the SL field.
可选地,该第二转发行为与第一转发行为可以包括相同的子行为,且该第三报文的DA字段也包括第一段标识。也即是,第一节点和第二节点均不对DA字段的值进行更新。Optionally, the second forwarding behavior and the first forwarding behavior may include the same sub-behavior, and the DA field of the third message also includes the first segment identifier. That is, neither the first node nor the second node updates the value of the DA field.
可选地,该相同的子行为可以包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。Optionally, the same sub-behavior may include at least one of the following sub-behaviors: slice resource forwarding based on specified network slices; forwarding based on allocated network resources; encrypted forwarding; forwarding after traffic statistics.
可选地,该第二转发行为不包括:更新SL字段的值。Optionally, the second forwarding behavior does not include: updating the value of the SL field.
可选地,该第三报文的DA字段不包括第一段标识,相应的,该第二转发行为包括更新SL字段的值。Optionally, the DA field of the third message does not include the first segment identifier, and accordingly, the second forwarding behavior includes updating the value of the SL field.
可选地,该第三报文不包括DA字段,相应的,该第二转发行为包括剥离外层IPv6头。Optionally, the third message does not include a DA field, and accordingly, the second forwarding behavior includes stripping off the outer IPv6 header.
可选地,该第一转发行为可以包括:基于第一下一跳地址转发;该第二转发行为可以包括:基于第二下一跳地址转发。其中,该第二下一跳地址与第一下一跳地址不同。Optionally, the first forwarding behavior may include: forwarding based on the first next hop address; the second forwarding behavior may include: forwarding based on the second next hop address. Wherein, the second next hop address is different from the first next hop address.
可选地,该第一报文和第二报文均可以包括SRH,该SRH的段列表中包括第一段标识。Optionally, both the first message and the second message may include an SRH, and the segment list of the SRH includes the first segment identifier.
第四方面,提供了一种报文转发方法,应用于报文转发系统中的控制器。该方法包括:向报文转发系统中的第一节点下发第一段标识,以及第一段标识对应的第一转发行为,以及向报文转发系统中的第二节点下发第一段标识,以及第一段标识对应的第二转发行为。其中,该第一转发行为不包括更新DA字段的值,且不包括剥离外层IPv6头。The fourth aspect provides a message forwarding method, which is applied to the controller in the message forwarding system. The method includes: delivering a first segment identifier and a first forwarding behavior corresponding to the first segment identifier to a first node in the message forwarding system, and delivering the first segment identifier to a second node in the message forwarding system. , and the second forwarding behavior corresponding to the first paragraph identification. The first forwarding behavior does not include updating the value of the DA field, and does not include stripping off the outer IPv6 header.
可选地,该第二转发行为与第一转发行为包括相同的子行为。Optionally, the second forwarding behavior includes the same sub-behavior as the first forwarding behavior.
可选地,该相同的子行为包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。Optionally, the same sub-behavior includes at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
可选地,该第一转发行为包括:基于第一下一跳地址转发;该第二转发行为包括:基于第二下一跳地址。其中,该第二下一跳地址与第一下一跳地址不同。Optionally, the first forwarding behavior includes: forwarding based on the first next hop address; the second forwarding behavior includes: based on the second next hop address. Wherein, the second next hop address is different from the first next hop address.
可选地,向报文转发系统中的节点下发第一段标识,以及第一段标识对应的转发行为的过程可以包括:基于网络配置(network configuration,NETCONF)协议或边界网关协议(border gateway protocol,BGP),向报文转发系统中的节点下发第一段标识,以及第一段标识对应的转发行为。Optionally, the process of delivering the first segment identifier and the forwarding behavior corresponding to the first segment identifier to the node in the message forwarding system may include: based on the network configuration (NETCONF) protocol or the border gateway protocol (border gateway) protocol, BGP), delivers the first segment identifier and the forwarding behavior corresponding to the first segment identifier to the nodes in the message forwarding system.
第五方面,提供了一种报文转发方法,该方法包括:在报文中封装SRH并发送报文。其中,该SRH的段列表中包括第一段标识。该报文能够使报文转发系统中的至少两个节点根据该报文的DA字段中的第一段标识确定转发表项,以从该转发表项中确定该第一段标识对应的转发行为,并根据转发行为转发报文。其中,该第一段标识为该至少两个节点中每个节点的一个本地实例化的段标识。该方法可以由SRv6网络入口节点执行。In the fifth aspect, a message forwarding method is provided, which method includes: encapsulating SRH in the message and sending the message. The segment list of the SRH includes the first segment identifier. This message enables at least two nodes in the message forwarding system to determine the forwarding entry based on the first segment identifier in the DA field of the message, so as to determine the forwarding behavior corresponding to the first segment identifier from the forwarding entry. , and forward the message according to the forwarding behavior. Wherein, the first segment identifier is a locally instantiated segment identifier of each node in the at least two nodes. This method can be executed by the SRv6 network entry node.
可选地,该段列表中可以包括一个第一段标识。或者,该段列表中可以包括多个第一段标识,且相邻两个第一段标识之间包括第二段标识。其中,第一段标识与第二段标识不同。Optionally, the segment list may include a first segment identifier. Alternatively, the segment list may include multiple first segment identifiers, and a second segment identifier may be included between two adjacent first segment identifiers. Among them, the first paragraph of identification is different from the second paragraph of identification.
第六方面,提供了一种网络设备,该网络设备可以是报文转发系统中的节点或控制器。并且,该网络设备包括至少一个模块,该至少一个模块可以用于实现上述任一方面提供的报文转发方法。A sixth aspect provides a network device, which may be a node or a controller in a message forwarding system. Furthermore, the network device includes at least one module, and the at least one module can be used to implement the message forwarding method provided in any of the above aspects.
第七方面,提供了一种网络设备,该网络设备可以是报文转发系统中的节点或控制器。并且,该网络设备包括:存储器,处理器及存储在存储器上并能够在处理器上运行的计算机程序,处理器执行计算机程序时实现如上述任一方面提供的报文转发方法。
A seventh aspect provides a network device, which may be a node or a controller in a message forwarding system. Furthermore, the network device includes: a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, the message forwarding method provided in any of the above aspects is implemented.
第八方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在计算机上运行时,使得计算机执行如上述任一方面提供的报文转发方法。In an eighth aspect, a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the instructions are run on a computer, they cause the computer to execute the message forwarding method provided in any of the above aspects.
第九方面,提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行如上述任一方面提供的报文转发方法。A ninth aspect provides a computer program product containing instructions. When the computer program product is run on a computer, it causes the computer to execute the message forwarding method provided in any of the above aspects.
第十方面,提供了一种报文转发系统,该报文转发系统包括多个节点;该多个节点中的至少两个节点用于实现如上述第一方面至第三方面中任一方面提供的报文转发方法。In a tenth aspect, a message forwarding system is provided. The message forwarding system includes a plurality of nodes; at least two nodes among the plurality of nodes are used to implement as provided in any one of the above-mentioned first to third aspects. message forwarding method.
可选地,该系统还可以包括:控制器;该控制器可以用于实现上述第四方面提供的报文转发方法。Optionally, the system may also include: a controller; the controller may be used to implement the message forwarding method provided in the fourth aspect.
可选地,该多个节点中的至少一个节点还可以用于实现上述第五方面所提供的报文转发方法。Optionally, at least one node among the plurality of nodes may also be used to implement the message forwarding method provided in the fifth aspect.
第十一方面,提供了一种芯片,该芯片可以用于实现上述任一方面所提供的报文转发方法。An eleventh aspect provides a chip, which can be used to implement the message forwarding method provided in any of the above aspects.
综上所述,本申请提供了一种报文转发方法、装置及系统。本申请提供的方案中,节点能够根据第一报文的DA字段中的第一段标识确定转发表项以确定转发行为,并根据该转发行为转发由该第一报文获得的第二报文。由于第二报文的DA字段也包括该第一段标识,因此接收到第二报文的节点也能够根据该第一段标识确定转发表项,以确定对应的转发行为。也即是,该第一段标识能够指导多个节点的转发行为。基于此,若需要多个节点均对接收到的报文执行特定操作,则使该第一段标识指导的各个节点的转发行为均包括该特定操作即可。由此,无需分别为每个节点分配段标识,有效简化了报文转发时的操作复杂度。To sum up, this application provides a message forwarding method, device and system. In the solution provided by this application, the node can determine the forwarding entry according to the first segment identifier in the DA field of the first message to determine the forwarding behavior, and forward the second message obtained from the first message according to the forwarding behavior. . Since the DA field of the second message also includes the first segment identifier, the node that receives the second message can also determine the forwarding entry based on the first segment identifier to determine the corresponding forwarding behavior. That is to say, the first segment of identification can guide the forwarding behavior of multiple nodes. Based on this, if multiple nodes need to perform a specific operation on the received message, then the forwarding behavior of each node guided by the first segment of the identifier can include the specific operation. This eliminates the need to allocate segment identifiers to each node, effectively simplifying the operational complexity of packet forwarding.
图1是本申请实施例提供的一种报文转发系统的结构示意图;Figure 1 is a schematic structural diagram of a message forwarding system provided by an embodiment of the present application;
图2是本申请实施例提供的一种SRv6报文的结构示意图;Figure 2 is a schematic structural diagram of an SRv6 message provided by an embodiment of the present application;
图3是本申请实施例提供的另一种报文转发系统的结构示意图;Figure 3 is a schematic structural diagram of another message forwarding system provided by an embodiment of the present application;
图4是本申请实施例提供的一种报文转发方法的流程图;Figure 4 is a flow chart of a message forwarding method provided by an embodiment of the present application;
图5是本申请实施例提供的另一种报文转发方法的流程图;Figure 5 is a flow chart of another message forwarding method provided by an embodiment of the present application;
图6是本申请实施例提供的又一种报文转发方法的流程图;Figure 6 is a flow chart of yet another message forwarding method provided by an embodiment of the present application;
图7是本申请实施例提供的一种第一段标识的数据结构示意图;Figure 7 is a schematic diagram of the data structure of a first segment identifier provided by an embodiment of the present application;
图8是本申请实施例提供的一种报文转发系统中各节点的转发表项的示意图;Figure 8 is a schematic diagram of forwarding entries of each node in a message forwarding system provided by an embodiment of the present application;
图9是本申请实施例提供的一种报文转发流程的示意图;Figure 9 is a schematic diagram of a message forwarding process provided by an embodiment of the present application;
图10是本申请实施例提供的另一种报文转发流程的示意图;Figure 10 is a schematic diagram of another message forwarding process provided by an embodiment of the present application;
图11是本申请实施例提供的再一种报文转发方法的流程图;Figure 11 is a flow chart of yet another message forwarding method provided by an embodiment of the present application;
图12是本申请实施例提供的一种第一节点的结构示意图;Figure 12 is a schematic structural diagram of a first node provided by an embodiment of the present application;
图13是本申请实施例提供的另一种第一节点的结构示意图;Figure 13 is a schematic structural diagram of another first node provided by an embodiment of the present application;
图14是本申请实施例提供的一种第二节点的结构示意图;Figure 14 is a schematic structural diagram of a second node provided by an embodiment of the present application;
图15是本申请实施例提供的一种控制器的结构示意图;Figure 15 is a schematic structural diagram of a controller provided by an embodiment of the present application;
图16是本申请实施例提供的一种第三节点的结构示意图;Figure 16 is a schematic structural diagram of a third node provided by an embodiment of the present application;
图17是本申请实施例提供的一种网络设备的结构示意图;Figure 17 is a schematic structural diagram of a network device provided by an embodiment of the present application;
图18是本申请实施例提供的另一种网络设备的结构示意图。
Figure 18 is a schematic structural diagram of another network device provided by an embodiment of the present application.
下面结合附图详细介绍本申请实施例提供的报文转发方法、装置及系统。The message forwarding method, device and system provided by the embodiments of the present application will be introduced in detail below with reference to the accompanying drawings.
图1是本申请实施例提供的一种报文转发系统的结构示意图,如图1所示,该报文转发系统可以包括多个节点01,该多个节点01之间建立有通信连接。其中,每个节点01可以为路由器或交换机等具备报文转发功能的设备,且每个节点01也可以称为网络设备。Figure 1 is a schematic structural diagram of a message forwarding system provided by an embodiment of the present application. As shown in Figure 1, the message forwarding system may include multiple nodes 01, and communication connections are established between the multiple nodes 01. Among them, each node 01 can be a device with a packet forwarding function, such as a router or a switch, and each node 01 can also be called a network device.
示例的,节点01可以为运营商(provider,P)设备或者运营商边缘(provider edge,PE)设备。若节点01为PE设备,则如图1所示,该PE设备可以通过用户边缘(customer edge,CE)设备02与用户终端连接。该CE设备02用于为用户终端提供网络接入服务。其中,用户终端也可以称为用户设备,其可以为家庭网关(residential gateway,RGW)、手机、笔记本电脑或者台式电脑等设备。For example, node 01 may be a provider (provider, P) device or a provider edge (provider edge, PE) device. If node 01 is a PE device, as shown in Figure 1, the PE device can be connected to the user terminal through customer edge (CE) device 02. The CE device 02 is used to provide network access services for user terminals. Among them, the user terminal can also be called user equipment, which can be a residential gateway (RGW), a mobile phone, a laptop or a desktop computer.
可选地,如图1所示,该报文转发系统还可以包括控制器03。控制器03与至少一个节点01连接,并用于管理和控制其所连接的节点01。其中,该控制器03可以为网络控制器,例如可以是软件定义网络(software defined network,SDN)控制器。Optionally, as shown in Figure 1, the message forwarding system may also include a controller 03. The controller 03 is connected to at least one node 01 and is used to manage and control the node 01 to which it is connected. The controller 03 may be a network controller, for example, a software defined network (SDN) controller.
在本申请实施例中,该报文转发系统可以为SRv6系统,该SRv6系统中各节点转发的报文为SRv6报文。图2是本申请实施例提供的一种SRv6报文的结构示意图,如图2所示,SRv6报文包括:IPv6头、SRH和载荷(payload)。其中,IPv6头包括如下字段:版本(version)、流分类(traffic class,TC)、流标签(flow label)、载荷长度(payload length)、下一头部(next header)、跳数限制(hop limit)、源地址(source address,SA)和DA。In this embodiment of the present application, the message forwarding system may be an SRv6 system, and the messages forwarded by each node in the SRv6 system are SRv6 messages. Figure 2 is a schematic structural diagram of an SRv6 message provided by an embodiment of the present application. As shown in Figure 2, the SRv6 message includes: IPv6 header, SRH and payload. Among them, the IPv6 header includes the following fields: version (version), traffic class (TC), flow label (flow label), payload length (payload length), next header (next header), hop limit (hop limit), source address (source address, SA) and DA.
SRH包括如下字段:下一头部、扩展头长度(header extension length,Hdr Ext Len)、路由头类型(routing type)、SL、最后条目(last entry)、标记(flags)、标签(tag)、段列表以及可选TLV。其中,该段列表包括段列表[0]至段列表[n]共n+1个标识字段(n可以为大于或等于1的整数),每个标识字段用于携带报文转发路径中一个节点的SID,该SID可以为节点的IPv6地址。该SRH中各字段的长度和含义可以参考表1。SRH includes the following fields: next header, extension header length (Hdr Ext Len), routing header type (routing type), SL, last entry, flags, tag, Segment list and optional TLV. Among them, the segment list includes segment list [0] to segment list [n], a total of n+1 identification fields (n can be an integer greater than or equal to 1), and each identification field is used to carry a node in the message forwarding path. SID, which can be the IPv6 address of the node. Please refer to Table 1 for the length and meaning of each field in the SRH.
表1
Table 1
Table 1
可以理解的是,在报文转发的过程中,节点01可以基于SL字段指示的SID更新报文的DA字段的值。该SRH中的内容即相当于计算机程序,段列表[0]至段列表[n]相当于计算机程序中
的多个指令,且该计算机程序中第一个要执行的指令是段列表[n]。SRH中的SL字段相当于计算机程序的指针,该指针始终指向当前正在执行的指令。在报文转发之前,可以将SL字段的值初始化为n,每执行完一个指令,可以将SL字段的值减1(即执行SL--),从而使得SL字段指向下一条要执行的指令。通过上述方式,即可实现报文的端到端转发。It can be understood that during the process of message forwarding, node 01 can update the value of the DA field of the message based on the SID indicated by the SL field. The content in the SRH is equivalent to the computer program, and the segment list [0] to segment list [n] are equivalent to the contents of the computer program. multiple instructions, and the first instruction to be executed in the computer program is segment list [n]. The SL field in SRH is equivalent to the pointer of the computer program, which always points to the currently executing instruction. Before the message is forwarded, the value of the SL field can be initialized to n. After each instruction is executed, the value of the SL field can be decremented by 1 (that is, SL-- is executed), so that the SL field points to the next instruction to be executed. Through the above method, end-to-end forwarding of messages can be achieved.
示例的,参考图3,假设SRv6报文的转发路径为:节点A→节点B→节点C→节点D→节点G。其中,节点A、节点B、节点D和节点G均支持SRv6技术,而节点C不支持SRv6技术。则节点A作为入(ingress)节点,可以在SRv6报文中插入SRH,该SRH中封装有段列表<G::,D::,B::>。其中,G::为节点G的SID,D::为节点D的SID,B::为节点B的SID。在转发报文之前,节点A可以将SL字段的值初始化为2。然后,节点A可以将SL字段指示的段列表中的SID,即段列表[2]中的B::拷贝至IPv6头中的DA字段。之后,节点A即可将SRv6报文转发到节点B。For example, referring to Figure 3, assume that the forwarding path of the SRv6 message is: Node A→Node B→Node C→Node D→Node G. Among them, node A, node B, node D and node G all support SRv6 technology, while node C does not support SRv6 technology. Then node A, as the ingress node, can insert SRH into the SRv6 message. The SRH is encapsulated with the segment list <G::, D::, B::>. Among them, G:: is the SID of node G, D:: is the SID of node D, and B:: is the SID of node B. Before forwarding the message, node A can initialize the value of the SL field to 2. Then, node A can copy the SID in the segment list indicated by the SL field, that is, B:: in segment list [2], to the DA field in the IPv6 header. Afterwards, node A can forward the SRv6 packet to node B.
节点B收到SRv6报文后,可以根据IPv6头中的DA字段的值查找本地SID表。由于该DA字段的值能够命中节点B的本地SID表,因此节点B可以将SL字段的值减1,并将更新后的SL字段指示的段列表中的SID,即段列表[1]中的D::拷贝至IPv6头中的DA字段。之后,节点B即可将SRv6报文转发到节点C。After receiving the SRv6 message, Node B can search the local SID table based on the value of the DA field in the IPv6 header. Since the value of the DA field can hit the local SID table of node B, node B can decrement the value of the SL field by 1 and add the SID in the segment list indicated by the updated SL field, that is, the SID in the segment list [1] D::Copied to the DA field in the IPv6 header. Afterwards, node B can forward the SRv6 packet to node C.
节点C收到SRv6报文后,由于该节点C不支持SRv6技术,因此无需处理SRH,而可以直接基于该IPv6头中的DA查询路由表,并将SRv6报文转发到节点D。After node C receives the SRv6 message, since node C does not support SRv6 technology, it does not need to process SRH. Instead, it can directly query the routing table based on the DA in the IPv6 header and forward the SRv6 message to node D.
节点D收到SRv6报文后,可以根据IPv6头中的DA查找本地SID表。由于该DA能够命中节点D的本地SID表,因此节点D可以将SL字段的值减1,并将更新后的SL字段指示的段列表中的SID,即段列表[0]中的G::拷贝至IPv6头中的DA。由于更新后的SL字段的值为0,因此节点D可以将该SRH弹出,并将弹出SRH的SRv6报文转发至节点G。After receiving the SRv6 message, node D can search the local SID table based on the DA in the IPv6 header. Since the DA can hit the local SID table of node D, node D can decrement the value of the SL field by 1 and add the SID in the segment list indicated by the updated SL field, that is, G:: in segment list [0]. Copied to the DA in the IPv6 header. Since the value of the updated SL field is 0, node D can eject the SRH and forward the SRv6 message of the ejected SRH to node G.
本申请实施例提供了一种报文转发方法,该方法可以应用于诸如图1或图3所示的报文转发系统中的第一节点和第二节点。该第一节点和第二节点可以是报文转发系统中任意相邻的两个节点。参考图4,该方法包括:The embodiment of the present application provides a message forwarding method, which can be applied to the first node and the second node in the message forwarding system such as shown in Figure 1 or Figure 3. The first node and the second node may be any two adjacent nodes in the message forwarding system. Referring to Figure 4, the method includes:
步骤101、第一节点接收第一报文,该第一报文的DA字段包括第一段标识。Step 101: The first node receives a first message, and the DA field of the first message includes a first segment identifier.
该第一节点可以是报文转发系统中的头节点或中间节点。若第一节点为中间节点,则该第一节点能够接收报文转发系统中的其他节点(例如头节点)发送的第一报文,该第一报文的DA字段包括第一段标识。The first node may be a head node or an intermediate node in the message forwarding system. If the first node is an intermediate node, the first node can receive the first message sent by other nodes (for example, the head node) in the message forwarding system, and the DA field of the first message includes the first segment identifier.
若第一节点为报文转发系统中的头节点,也称为入节点或源(source)节点,则第一节点可以接收CE设备或用户终端发送的第一报文,并可以将该第一报文的DA字段的值更新为第一段标识。示例的,第一节点可以先在第一报文中封装SRH,该SRH的段列表中包括第一段标识,例如,该段列表中的最后一个标识字段的值为第一段标识。之后,第一节点可以将该段列表中的第一段标识拷贝至DA字段。If the first node is the head node in the message forwarding system, also called an ingress node or a source node, the first node can receive the first message sent by the CE device or the user terminal, and can forward the first message to the first node. The value of the DA field of the message is updated to the first segment identifier. For example, the first node may first encapsulate the SRH in the first message, and the segment list of the SRH includes the first segment identifier. For example, the value of the last identifier field in the segment list is the first segment identifier. Afterwards, the first node can copy the first segment identifier in the segment list to the DA field.
步骤102、第一节点根据该第一段标识确定第一转发表项,并从该第一转发表项中确定该第一段标识对应的第一转发行为。Step 102: The first node determines a first forwarding entry based on the first segment identifier, and determines a first forwarding behavior corresponding to the first segment identifier from the first forwarding entry.
在本申请实施例中,第一节点中存储有转发表,也称为转发信息库(forward information database,FIB)。该转发表可以包括本地段标识(local SID)表,且该转发表中的第一转发表项中记录有第一段标识,以及第一段标识对应的第一转发行为。第一节点接收到第一报文后,可以根据该第一报文的DA字段中的第一段标识查找其转发表,以确定该第一转发表项,进而从第一转发表项中确定该第一段标识对应的第一转发行为。其中,该第一段标识为第一节点
的一个本地实例化(locally instantiated)的SRv6SID。该第一转发表项也可以称为转发条目(entry)或FIB entry,其能够指示(represents)一个本地实例化的SRv6SID。In this embodiment of the present application, a forwarding table, also called a forward information database (FIB), is stored in the first node. The forwarding table may include a local segment identifier (local SID) table, and the first forwarding entry in the forwarding table records the first segment identifier and the first forwarding behavior corresponding to the first segment identifier. After receiving the first message, the first node can search its forwarding table according to the first segment identifier in the DA field of the first message to determine the first forwarding table entry, and then determine the first forwarding table entry from the first forwarding table entry. The first segment identifies the corresponding first forwarding behavior. Among them, the first segment is identified as the first node A locally instantiated SRv6SID. The first forwarding entry may also be called a forwarding entry or a FIB entry, which can represent a locally instantiated SRv6 SID.
该第一转发行为可以包括:基于第一下一跳(next hop,NHP)地址转发,该下一跳地址可以是第一节点的出接口(out interface)的标识。该第一转发行为还可以包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。The first forwarding behavior may include: forwarding based on a first next hop (NHP) address, and the next hop address may be the identifier of the outbound interface (out interface) of the first node. The first forwarding behavior may also include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
其中,加密转发可以为媒体接入控制安全(media access control security,MACsec)加密转发。网络资源至少可以包括:用于转发报文的接口的带宽资源。可选地,不同大小的网络资源可以用不同的队列(queue)来表征,相应的,基于分配的网络资源转发报文也可以理解为:基于分配的队列转发报文。Among them, the encrypted forwarding can be media access control security (media access control security, MACsec) encrypted forwarding. Network resources may at least include: bandwidth resources of interfaces used to forward packets. Optionally, network resources of different sizes can be represented by different queues. Correspondingly, forwarding messages based on allocated network resources can also be understood as: forwarding messages based on allocated queues.
可以理解的是,以上列出的第一转发行为仅为部分举例,本申请实施例对该第一转发行为的类型不做限定。It can be understood that the first forwarding behavior listed above is only a partial example, and the embodiment of the present application does not limit the type of the first forwarding behavior.
步骤103、第一节点根据该第一转发行为向第二节点转发第二报文,该第二报文为基于第一报文获得。Step 103: The first node forwards the second message to the second node according to the first forwarding behavior, and the second message is obtained based on the first message.
第一节点确定出第一转发行为后,即可根据该第一转发行为向第二节点转发基于该第一报文获得的第二报文。其中,该第二节点为第一下一跳地址指示的节点。可以理解的是,该第二节点可以是报文转发系统中的中间节点或尾(egress)节点。After the first node determines the first forwarding behavior, it can forward the second message obtained based on the first message to the second node according to the first forwarding behavior. Wherein, the second node is the node indicated by the first next hop address. It can be understood that the second node may be an intermediate node or an egress node in the message forwarding system.
步骤104、第二节点接收第二报文,该第二报文的DA字段包括第一段标识。Step 104: The second node receives the second message, and the DA field of the second message includes the first segment identifier.
在本申请实施例中,第二节点接收到的第二报文的DA字段也包括第一段标识。也即是,第一节点在基于第一报文获得第二报文时,并不会更新报文的DA字段的值。或者,可以理解为:该第一转发行为不包括更新DA字段的值。In this embodiment of the present application, the DA field of the second message received by the second node also includes the first segment identifier. That is to say, when the first node obtains the second message based on the first message, it does not update the value of the DA field of the message. Alternatively, it can be understood that the first forwarding behavior does not include updating the value of the DA field.
可以理解的是,该DA字段一般包括在第一报文的外层IPv6头中,且报文转发系统中的节点通常是在更新SL字段的值之后,根据该更新后的SL字段的值更新DA字段的值。基于此,为了确定第一节点转发的第二报文包括DA字段,该第一转发行为可以不包括更新SL字段的值,且不包括剥离外层IPv6头。It can be understood that the DA field is generally included in the outer IPv6 header of the first message, and the node in the message forwarding system usually updates the value of the SL field based on the updated value of the SL field. The value of the DA field. Based on this, in order to determine that the second message forwarded by the first node includes the DA field, the first forwarding behavior may not include updating the value of the SL field, and may not include stripping off the outer IPv6 header.
步骤105、第二节点根据该第一段标识确定第二转发表项,并从该第二转发表项中确定该第一段标识对应的第二转发行为。Step 105: The second node determines a second forwarding entry based on the first segment identifier, and determines a second forwarding behavior corresponding to the first segment identifier from the second forwarding entry.
第二节点中也存储有转发表,该第二节点的转发表中的第二转发表项中记录有第一段标识,以及第一段标识对应的第二转发行为。第二节点接收到第二报文后,可以根据该第二报文的DA字段中的第一段标识查找其转发表,以确定该第二转发表项,进而从该第二转发表项中确定该第二段标识对应的第二转发行为。其中,该第一段标识为第二节点的一个本地实例化的SRv6SID,或者可以理解为:该第二转发表项指示一个本地实例化的SRv6SID。该第二转发行为可以包括:基于第二下一跳地址转发,该第二下一跳地址与第一下一跳地址不同。The second node also stores a forwarding table, and the second forwarding entry in the forwarding table of the second node records the first segment identifier and the second forwarding behavior corresponding to the first segment identifier. After receiving the second message, the second node can search its forwarding table according to the first segment identifier in the DA field of the second message to determine the second forwarding table entry, and then obtain the second forwarding table entry from the second forwarding table entry. Determine the second forwarding behavior corresponding to the second segment identifier. The first segment identifier is a locally instantiated SRv6 SID of the second node, or it can be understood that the second forwarding entry indicates a locally instantiated SRv6 SID. The second forwarding behavior may include: forwarding based on a second next hop address, where the second next hop address is different from the first next hop address.
作为一种可选的实现方式,该第一转发行为和第二转发行为可以包括相同的子行为。该相同的子行为可以包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。例如,第一转发行为和第二转发行为除指示的下一跳地址不同之外,其他的行为均可以相同,则该第二转发行为也不包括更新DA字段的值。As an optional implementation manner, the first forwarding behavior and the second forwarding behavior may include the same sub-behavior. The same sub-behavior may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics. For example, except for the indicated next hop address, the first forwarding behavior and the second forwarding behavior may be the same, and the second forwarding behavior does not include updating the value of the DA field.
作为另一种可选的实现方式,该第一转发行为和第二转发行为可以不包括相同的子行为。例如,该第二转发行为可以包括更新DA字段的值,或者剥离外层IPv6头,或者更新SL字段的
值。并且,该第二转发行为不包括下述子行为中的任一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。As another optional implementation manner, the first forwarding behavior and the second forwarding behavior may not include the same sub-behavior. For example, the second forwarding behavior may include updating the value of the DA field, or stripping the outer IPv6 header, or updating the value of the SL field. value. Moreover, the second forwarding behavior does not include any of the following sub-behaviors: forwarding based on slice resources of a specified network slice; forwarding based on allocated network resources; forwarding with encryption; and forwarding after traffic statistics.
步骤106、第二节点根据第二转发行为转发第三报文,第三报文为基于第二报文获得。Step 106: The second node forwards the third message according to the second forwarding behavior, and the third message is obtained based on the second message.
第二节点确定出第二转发行为后,即可根据该第二转发行为转发基于该第二报文获得的第三报文。例如,第二节点可以将报文转发至第二下一跳地址指示的节点。After the second node determines the second forwarding behavior, it can forward the third message obtained based on the second message according to the second forwarding behavior. For example, the second node may forward the message to the node indicated by the second next hop address.
若第二转发行为与第一转发行为包括相同的子行为,且第二转发行为也不包括更新DA字段的值,则该第三报文的DA字段也包括该第一段标识。If the second forwarding behavior includes the same sub-behavior as the first forwarding behavior, and the second forwarding behavior does not include updating the value of the DA field, then the DA field of the third message also includes the first segment identifier.
若第二转发行为与第一转发行为不包括相同的子行为,且第二转发行为包括更新DA字段的值,则该第三报文的DA字段不包括该第一段标识。或者,若第二转发行为包括剥离外层IPv6头,则该第三报文不包括DA字段。If the second forwarding behavior and the first forwarding behavior do not include the same sub-behavior, and the second forwarding behavior includes updating the value of the DA field, then the DA field of the third message does not include the first segment identifier. Alternatively, if the second forwarding behavior includes stripping the outer IPv6 header, the third message does not include the DA field.
基于上述步骤可知,第一报文和第二报文的DA字段均携带有第一段标识,且该第一段标识能够指导多个节点的转发行为。基于此,该第一段标识也可以称为GSID或GID。由于该第一段标识能够指导节点的转发行为,因此该第一段标识还可以称为转发指令或行为指令。其中,第一报文和第二报文均包括外层IPv6头,该外层IPv6头包括DA字段。Based on the above steps, it can be seen that the DA fields of the first message and the second message both carry the first segment identifier, and the first segment identifier can guide the forwarding behavior of multiple nodes. Based on this, the first segment identification may also be called GSID or GID. Since the first segment of the identifier can guide the forwarding behavior of the node, the first segment of the identifier may also be called a forwarding instruction or a behavior instruction. Wherein, both the first message and the second message include an outer IPv6 header, and the outer IPv6 header includes a DA field.
可以理解的是,本申请实施例中的报文转发系统可以为支持SRv6技术的系统,上述第一报文和第二报文均可以为SRv6报文。上述第一节点和第二节点均可以为SRv6段端点节点(Segment Endpoint node),可以简称为Endpoint节点。It can be understood that the message forwarding system in the embodiment of the present application may be a system that supports SRv6 technology, and the above-mentioned first message and the second message may both be SRv6 messages. Both the above-mentioned first node and the second node may be SRv6 segment endpoint nodes (Segment Endpoint nodes), which may be referred to as Endpoint nodes for short.
综上所述,本申请实施例提供了一种报文转发方法。第一节点能够根据第一报文的DA字段中的第一段标识确定转发表项以确定第一转发行为,并根据该第一转发行为转发由该第一报文获得的第二报文。由于第二报文的DA字段也包括该第一段标识,因此接收到第二报文的第二节点也能够根据该第一段标识确定转发表项以确定第二转发行为,并执行第二转发行为。若需要该第一节点和第二节点均对接收到的报文执行特定操作,则使该第一转发行为和第二转发行为均包括该特定操作即可。由于本申请实施例提供的方法能够通过DA字段携带的一个第一段标识指导多个节点的转发行为,因此无需分别为每个节点分配段标识,进而有效简化了报文转发时的操作复杂度。To sum up, the embodiment of the present application provides a message forwarding method. The first node can determine the forwarding entry according to the first segment identifier in the DA field of the first message to determine the first forwarding behavior, and forward the second message obtained from the first message according to the first forwarding behavior. Since the DA field of the second message also includes the first segment identifier, the second node that receives the second message can also determine the forwarding entry based on the first segment identifier to determine the second forwarding behavior and perform the second forwarding behavior. forwarding behavior. If both the first node and the second node are required to perform a specific operation on the received message, then both the first forwarding behavior and the second forwarding behavior include the specific operation. Since the method provided by the embodiment of the present application can guide the forwarding behavior of multiple nodes through a first segment identifier carried in the DA field, there is no need to allocate segment identifiers to each node respectively, thereby effectively simplifying the operational complexity of message forwarding. .
本申请实施例提供了另一种报文转发方法,该方法可以应用于诸如图1或图3所示的报文转发系统中的控制器、第一节点和第二节点。其中,该第一节点和第二节点可以是报文转发系统中任意相邻的两个节点。参考图5,该方法包括:The embodiment of the present application provides another message forwarding method, which can be applied to the controller, the first node and the second node in the message forwarding system such as shown in Figure 1 or Figure 3. The first node and the second node may be any two adjacent nodes in the message forwarding system. Referring to Figure 5, the method includes:
步骤201、控制器向第一节点下发第一段标识,以及该第一段标识对应的第一转发行为。Step 201: The controller delivers the first segment identifier and the first forwarding behavior corresponding to the first segment identifier to the first node.
在本申请实施例中,控制器可以通过网络配置协议或边界网关协议,向第一节点下发配置信息。该配置信息包括第一段标识,以及该第一段标识对应的第一转发行为。该第一转发行为不包括更新DA字段的值,且不包括剥离外层IPv6头。In this embodiment of the present application, the controller may deliver configuration information to the first node through a network configuration protocol or a border gateway protocol. The configuration information includes a first segment identifier and a first forwarding behavior corresponding to the first segment identifier. The first forwarding behavior does not include updating the value of the DA field and does not include stripping the outer IPv6 header.
其中,该外层IPv6头可以包括IPv6基本头和/或IPv6扩展头,该DA字段可以包括在IPv6基本头中。该IPv6基本头也可以称为IPv6固定头。The outer IPv6 header may include an IPv6 basic header and/or an IPv6 extension header, and the DA field may be included in the IPv6 basic header. The IPv6 basic header may also be called IPv6 fixed header.
步骤202、控制器向第二节点下发第一段标识,以及该第一段标识对应的第二转发行为。Step 202: The controller delivers the first segment identifier and the second forwarding behavior corresponding to the first segment identifier to the second node.
该步骤202的实现过程可以参考步骤201。并且,该第二转发行为与第一转发行为可以包括相同的子行为,例如该第二转发行为也不包括更新DA字段的值,且不包括剥离外层IPv6头。或者,该第二转发行为与第一转发行为可以不包括相同的子行为,例如该第二转发行为可以包括更新DA字段的值,或者包括剥离外层IPv6头。
For the implementation process of step 202, please refer to step 201. Furthermore, the second forwarding behavior may include the same sub-behavior as the first forwarding behavior. For example, the second forwarding behavior does not include updating the value of the DA field and does not include stripping the outer IPv6 header. Alternatively, the second forwarding behavior may not include the same sub-behavior as the first forwarding behavior. For example, the second forwarding behavior may include updating the value of the DA field, or including stripping off the outer IPv6 header.
步骤203、第一节点在其转发表中添加第一转发表项,该第一转发表项包括第一段标识以及第一转发行为。Step 203: The first node adds a first forwarding entry to its forwarding table, where the first forwarding entry includes a first segment identifier and a first forwarding behavior.
第一节点接收到控制器下发的配置信息后,可以基于该配置信息在其转发表中添加第一转发表项。该第一转发表项包括第一段标识以及第一转发行为。该第一段标识为第一节点的一个本地实例化的SRv6SID。After receiving the configuration information issued by the controller, the first node can add a first forwarding entry to its forwarding table based on the configuration information. The first forwarding entry includes a first segment identifier and a first forwarding behavior. The first segment identification is a locally instantiated SRv6 SID of the first node.
步骤204、第二节点在其转发表中添加第二转发表项,该第二转发表项包括第一段标识以及第二转发行为。Step 204: The second node adds a second forwarding entry to its forwarding table. The second forwarding entry includes the first segment identifier and the second forwarding behavior.
该第一段标识为第二节点的一个本地实例化的SRv6SID。该步骤204的实现过程可以参考上述步骤203。The first segment is identified as a locally instantiated SRv6SID of the second node. The implementation process of step 204 may refer to the above-mentioned step 203.
步骤205、第一节点根据该第一转发表项向第二节点转发报文。Step 205: The first node forwards the message to the second node according to the first forwarding entry.
第一节点接收到报文后,可以根据该第一转发表项向第二节点转发报文。该步骤205的实现过程可以参考图4所示实施例中步骤101至步骤103的相关描述。After receiving the message, the first node can forward the message to the second node according to the first forwarding entry. For the implementation process of step 205, reference may be made to the relevant descriptions of steps 101 to 103 in the embodiment shown in FIG. 4 .
步骤206、第二节点根据该第二转发表项转发报文。Step 206: The second node forwards the message according to the second forwarding entry.
该步骤206的实现过程可以参考图4所示实施例中步骤104至步骤106的相关描述。For the implementation process of step 206, reference may be made to the relevant descriptions of steps 104 to 106 in the embodiment shown in FIG. 4 .
可以理解的是,上述步骤201和步骤202中的至少一个步骤可以根据情况删除。相应的,第一节点和/或第二节点能够通过其他方式获得第一段标识以及对应的转发行为。例如,第一节点和/或第二节点能够获得静态配置的第一段标识以及对应的转发行为。It can be understood that at least one of the above steps 201 and 202 can be deleted according to circumstances. Correspondingly, the first node and/or the second node can obtain the first segment identifier and the corresponding forwarding behavior through other methods. For example, the first node and/or the second node can obtain the statically configured first segment identifier and the corresponding forwarding behavior.
综上所述,本申请实施例提供了一种报文转发方法。控制器能够向第一节点下发第一段标识以及对应的第一转发行为,并向第二节点下发第二段标识以及对应的第二转发行为。第一节点和第二节点进而可以将控制器下发的配置信息添加至转发表中的转发表项,并基于该转发表项转发报文。由于控制器向不同节点下发的配置信息中的第一段标识相同,因此该第一段标识可以指导不同节点的转发行为。若需要该第一节点和第二节点均对接收到的报文执行特定操作,则使该第一转发行为和第二转发行为均包括该特定操作即可。由于本申请实施例提供的方法无需分别为每个节点分配段标识,因此有效简化了报文转发时的操作复杂度。To sum up, the embodiment of the present application provides a message forwarding method. The controller can deliver the first segment identifier and the corresponding first forwarding behavior to the first node, and deliver the second segment identifier and the corresponding second forwarding behavior to the second node. The first node and the second node can then add the configuration information issued by the controller to the forwarding entry in the forwarding table, and forward the message based on the forwarding entry. Since the first segment identifier in the configuration information delivered by the controller to different nodes is the same, the first segment identifier can guide the forwarding behavior of different nodes. If both the first node and the second node are required to perform a specific operation on the received message, then both the first forwarding behavior and the second forwarding behavior include the specific operation. Since the method provided by the embodiment of the present application does not need to allocate segment identifiers to each node, it effectively simplifies the operational complexity of message forwarding.
本申请实施例提供了又一种报文转发方法,该方法可以应用于诸如图1或图3所示的报文转发系统。并且,本申请实施例以第三节点为头节点,第一节点为中间节点,第二节点为中间节点或尾节点为例进行说明。参考图6,该方法包括:The embodiment of the present application provides yet another message forwarding method, which can be applied to a message forwarding system such as that shown in Figure 1 or Figure 3 . Moreover, the embodiment of the present application takes the third node as the head node, the first node as the intermediate node, and the second node as the intermediate node or the tail node as an example for description. Referring to Figure 6, the method includes:
步骤301、控制器向第一节点下发第一段标识,以及该第一段标识对应的第一转发行为。Step 301: The controller delivers the first segment identifier and the first forwarding behavior corresponding to the first segment identifier to the first node.
在本申请实施例中,控制器可以通过NETCONF协议或BGP,向第一节点下发配置信息。该配置信息包括第一段标识,以及该第一段标识对应的第一转发行为。该第一转发行为不包括更新DA字段的值,且不包括剥离外层IPv6头。其中,该DA字段可以是指外层IPv6头中的DA字段,例如可以是外层IPv6头中IPv6基本头中的DA字段。In this embodiment of the present application, the controller can deliver configuration information to the first node through the NETCONF protocol or BGP. The configuration information includes a first segment identifier and a first forwarding behavior corresponding to the first segment identifier. The first forwarding behavior does not include updating the value of the DA field and does not include stripping the outer IPv6 header. The DA field may refer to the DA field in the outer IPv6 header, for example, it may be the DA field in the IPv6 basic header in the outer IPv6 header.
可以理解的是,对于第一节点为SRv6系统中的Endpoint节点的场景,第一节点若更新了SRH中SL字段的值,则可以基于更新后的SL字段的值,更新DA字段的值。基于此,上述第一转发行为可以不包括:更新SL字段的值。It can be understood that, for the scenario where the first node is an Endpoint node in the SRv6 system, if the first node updates the value of the SL field in the SRH, it can update the value of the DA field based on the updated value of the SL field. Based on this, the above first forwarding behavior may not include: updating the value of the SL field.
可选地,该第一转发行为可以包括:基于第一下一跳地址转发。并且,该第一转发行为还可以包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。Optionally, the first forwarding behavior may include: forwarding based on the first next hop address. Furthermore, the first forwarding behavior may also include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
基于上述第一转发行为的举例可知,该第一段标识具有下述功能中的至少一种:1、该第
一段标识关联到一个网络切片,能够指示基于关联的网络切片的切片资源转发报文;2、该第一段标识关联到一个分配网络资源(例如带宽)的动作,能够指示在报文的转发接口预留指定的网络资源;3、该第一段标识能够指示对报文进行加密转发;4、该第一段标识关联到一个统计流量的动作,能够指示对报文所属数据流的流量进行统计后转发。Based on the above example of the first forwarding behavior, it can be seen that the first segment identifier has at least one of the following functions: 1. A segment of the identifier is associated with a network slice and can instruct the packet to be forwarded based on the slice resources of the associated network slice. 2. The first segment of the identifier is associated with an action of allocating network resources (such as bandwidth) and can instruct the forwarding interface of the message. Reserve designated network resources; 3. The first segment of the identifier can instruct the encrypted forwarding of the message; 4. The first segment of the identifier is associated with a traffic statistics action and can instruct the statistics of the data flow to which the message belongs. forwarded later.
图7是本申请实施例提供的一种第一段标识的数据结构示意图,如图7所示,该第一段标识可以包括:定位符(locator)字段和功能(function)字段。其中,该定位符字段的值可以为公共前缀,其不用于指示系统中的任一节点。例如,该公共前缀可以用于指示该报文转发系统的聚合地址。由此可知,控制器下发的不同GID中的定位符字段的值相同,相应的,GID中的功能字段的值为不同值时,可以指示不同的转发行为。例如,该功能字段的值为100时,可以指示加密转发;该功能字段的值为200时,可以指示基于指定的网络切片的切片资源转发;该功能字段的值为300时,可以指示基于分配的网络资源转发。FIG. 7 is a schematic diagram of the data structure of a first segment identifier provided by an embodiment of the present application. As shown in FIG. 7 , the first segment identifier may include: a locator field and a function field. The value of the locator field may be a public prefix, which is not used to indicate any node in the system. For example, the public prefix can be used to indicate the aggregate address of the packet forwarding system. It can be seen from this that the values of the locator fields in different GIDs issued by the controller are the same. Correspondingly, when the values of the function fields in the GIDs are different values, different forwarding behaviors can be indicated. For example, when the value of this function field is 100, it can indicate encrypted forwarding; when the value of this function field is 200, it can indicate slice resource forwarding based on the specified network slice; when the value of this function field is 300, it can indicate based on allocation. forwarding of network resources.
可选地,如图7所示,该第一段标识还可以包括:参数(arguments,Args)字段。相应的,GID中的参数字段和/或功能字段的值为不同值时,可以指示不同的转发行为。Optionally, as shown in Figure 7, the first segment of identification may also include: parameters (arguments, Args) field. Correspondingly, when the values of the parameter field and/or the function field in the GID are different values, different forwarding behaviors can be indicated.
步骤302、控制器向第二节点下发第一段标识,以及该第一段标识对应的第二转发行为。Step 302: The controller delivers the first segment identifier and the second forwarding behavior corresponding to the first segment identifier to the second node.
该步骤302的实现过程可以参考步骤301。作为第一种可选的实现方式,该第二转发行为与第一转发行为可以包括相同的子行为。该相同的子行为可以包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。并且,该第二转发行为还可以包括:基于第二下一跳地址转发。For the implementation process of step 302, please refer to step 301. As a first optional implementation manner, the second forwarding behavior and the first forwarding behavior may include the same sub-behavior. The same sub-behavior may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics. Moreover, the second forwarding behavior may also include: forwarding based on the second next hop address.
在该第一种可选的实现方式中,作为一种可能的示例,该第一转发行为和第二转发行为除了指示的下一跳地址不同之外,两者包括的其他子行为均可以相同。相应的,该第二转发行为也不包括更新DA字段的值,且不包括剥离外层IPv6头。其中,对于第二节点为SRv6系统中的Endpoint节点的场景,该第二转发行为可以不包括:更新SL字段的值。In this first optional implementation, as a possible example, except for the indicated next hop address, the first forwarding behavior and the second forwarding behavior may include the same other sub-behaviors. . Correspondingly, the second forwarding behavior also does not include updating the value of the DA field, and does not include stripping the outer IPv6 header. Wherein, for the scenario where the second node is an Endpoint node in the SRv6 system, the second forwarding behavior may not include: updating the value of the SL field.
作为另一种可能的示例,该第一转发行为和第二转发行为所指示的下一跳地址不同,且两者包括的其他子行为部分相同,部分不同。例如,该第二转发行为除了可以包括上述相同的子行为之外,还可以包括下述子行为中的一个:更新DA字段的值,剥离外层IPv6头,更新SL字段的值。As another possible example, the next hop addresses indicated by the first forwarding behavior and the second forwarding behavior are different, and other sub-behaviors included in the two are partly the same and partly different. For example, in addition to the same sub-behaviors mentioned above, the second forwarding behavior may also include one of the following sub-behaviors: updating the value of the DA field, stripping off the outer IPv6 header, and updating the value of the SL field.
在第二种可选的实现方式中,该第二转发行为与第一转发行为可以不包括相同的子行为,例如,该第二转发行为可以包括更新DA字段的值,或者包括剥离外层IPv6头。并且,第二转发行为不包括下述子行为中的任一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。其中,对于第二节点为SRv6系统中的Endpoint节点的场景,该第二转发行为可以包括:更新SL字段的值。In a second optional implementation, the second forwarding behavior may not include the same sub-behavior as the first forwarding behavior. For example, the second forwarding behavior may include updating the value of the DA field, or including stripping the outer IPv6 layer. head. Moreover, the second forwarding behavior does not include any of the following sub-behaviors: forwarding based on slice resources of a specified network slice; forwarding based on allocated network resources; forwarding with encryption; and forwarding after traffic statistics. Wherein, for the scenario where the second node is an Endpoint node in the SRv6 system, the second forwarding behavior may include: updating the value of the SL field.
步骤303、控制器向第三节点下发第一段标识,以及该第一段标识对应的第三转发行为。Step 303: The controller delivers the first segment identifier and the third forwarding behavior corresponding to the first segment identifier to the third node.
该第三节点为报文转发系统中的头节点。在本申请实施例中,若需要头节点也基于第一段标识执行相应的转发行为,则控制器还可以向该头节点下发第一段标识,以及该第一段标识对应的第三转发行为。The third node is the head node in the message forwarding system. In the embodiment of this application, if the head node is required to also perform corresponding forwarding behavior based on the first segment identifier, the controller can also issue the first segment identifier and the third forwarding corresponding to the first segment identifier to the head node. Behavior.
其中,该第三转发行为与第一转发行为可以包括相同的子行为。该相同的子行为可以包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。并且,该第三转发行为还可以包括:基于第三下一跳地址转发。示例的,该第三转发行为和第一转发行为除了指示的下一跳地址不同之外,两者包括的其他子行为均可以相同。
The third forwarding behavior and the first forwarding behavior may include the same sub-behavior. The same sub-behavior may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics. Moreover, the third forwarding behavior may also include: forwarding based on the third next hop address. For example, except for the indicated next hop address, the third forwarding behavior and the first forwarding behavior may include the same other sub-behaviors.
可以理解的是,对于第三节点为SRv6系统中的头节点的场景,控制器还可以向第三节点下发SRv6策略(policy)。该SRv6policy包括报文的转发路径中的节点的SID,且该转发路径中的节点的SID包括该第一段标识。第三节点可以基于该SRv6policy在报文中封装SRH,该SRH的段列表中包括转发路径中的节点的SID。It can be understood that, for the scenario where the third node is the head node in the SRv6 system, the controller can also deliver an SRv6 policy (policy) to the third node. The SRv6policy includes the SID of the node in the forwarding path of the message, and the SID of the node in the forwarding path includes the first segment identifier. The third node can encapsulate SRH in the message based on the SRv6 policy, and the segment list of the SRH includes the SID of the node in the forwarding path.
还可以理解的是,控制器也可以无需执行上述步骤301至步骤303。相应的,上述第一段标识以及第一段标识对应的转发行为也可以是静态配置在各个节点中的。例如,可以由运维人员手动在各个节点中配置第一段标识,以及第一段标识对应的转发行为。It can also be understood that the controller does not need to perform the above steps 301 to 303. Correspondingly, the above-mentioned first segment identifier and the forwarding behavior corresponding to the first segment identifier may also be statically configured in each node. For example, operation and maintenance personnel can manually configure the first segment of identifiers in each node and the forwarding behavior corresponding to the first segment of identifiers.
步骤304、第一节点在其转发表中添加第一转发表项,该第一转发表项包括第一段标识以及第一转发行为。Step 304: The first node adds a first forwarding entry to its forwarding table, where the first forwarding entry includes a first segment identifier and a first forwarding behavior.
第一节点获得控制器下发或静态配置的配置信息后,可以基于该配置信息在其转发表中添加第一转发表项。该第一转发表项包括第一段标识以及第一转发行为。其中,第一节点中的转发表也称为FIB。该转发表可以包括本地段标识表,且该转发表中的第一段标识为第一节点的一个本地实例化的SRv6SID。After the first node obtains the configuration information issued by the controller or statically configured, it can add a first forwarding table entry in its forwarding table based on the configuration information. The first forwarding entry includes a first segment identifier and a first forwarding behavior. Among them, the forwarding table in the first node is also called FIB. The forwarding table may include a local segment identification table, and the first segment identification in the forwarding table is a locally instantiated SRv6 SID of the first node.
示例的,参考图8,假设第一节点为节点2,其接收到的配置信息中的第一段标识(即GID)为A1::1,第一转发行为包括:基于第一下一跳地址O2转发,以及基于指定的网络切片S1的切片资源转发。则该节点2在其转发表中添加的第一转发表项可以包括GID:A1::1,该GID对应的第一下一跳地址O2,以及网络切片S1。参考图8可以看出,报文转发系统中,节点之间的切片资源可以包括:网络切片1、网络切片2和网络切片3。For example, referring to Figure 8, assume that the first node is node 2, the first segment identifier (i.e. GID) in the configuration information it receives is A1::1, and the first forwarding behavior includes: based on the first next hop address O2 forwarding, and slice resource forwarding based on the specified network slice S1. Then the first forwarding table entry added by node 2 in its forwarding table may include GID: A1::1, the first next hop address O2 corresponding to the GID, and the network slice S1. Referring to Figure 8, it can be seen that in the packet forwarding system, the slicing resources between nodes may include: network slice 1, network slice 2, and network slice 3.
可以理解的是,第一节点的转发表中可以包括多个转发表项,每个转发表项包括一个段标识(例如GID),以及该段标识对应的转发行为。示例的,第一节点的转发表可以如表2所示。参考表2,每个GID对应的转发行为均包括:基于指定的下一跳地址转发,以及其他子行为。其中,段标识B1::1对应的转发行为包括:基于下一跳地址O0转发,以及加密转发。段标识D1::1对应的转发行为包括:基于下一跳地址O0转发,加密转发,以及基于分配的网络资源转发。It can be understood that the forwarding table of the first node may include multiple forwarding table entries, and each forwarding table entry includes a segment identifier (such as a GID) and a forwarding behavior corresponding to the segment identifier. As an example, the forwarding table of the first node can be as shown in Table 2. Referring to Table 2, the forwarding behavior corresponding to each GID includes: forwarding based on the specified next hop address, and other sub-behaviors. Among them, the forwarding behavior corresponding to the segment identifier B1::1 includes: forwarding based on the next hop address O0, and encrypted forwarding. The forwarding behavior corresponding to the segment identifier D1::1 includes: forwarding based on the next hop address O0, encrypted forwarding, and forwarding based on allocated network resources.
表2
Table 2
Table 2
步骤305、第二节点在其转发表中添加第二转发表项,该第二转发表项包括第一段标识以及第二转发行为。Step 305: The second node adds a second forwarding entry to its forwarding table. The second forwarding entry includes the first segment identifier and the second forwarding behavior.
该第一段标识为第二节点的一个本地实例化的SRv6SID。该步骤305的实现过程可以参考上述步骤304。示例的,如图8所示,假设第二节点为节点3,其接收到的配置信息中的第一段标识(即GID)为A1::1,第二转发行为包括:基于第二下一跳地址O3转发,以及基于指定的网络切片S1的切片资源转发。则节点3在其转发表中添加的第二转发表项可以包括GID:A1::1,该GID对应的第二下一跳地址O3,以及网络切片S1。
The first segment is identified as a locally instantiated SRv6SID of the second node. The implementation process of step 305 may refer to the above-mentioned step 304. For example, as shown in Figure 8, assuming that the second node is node 3, the first segment identifier (i.e. GID) in the configuration information it receives is A1::1, and the second forwarding behavior includes: based on the second next Hop address O3 forwarding, and slice resource forwarding based on the specified network slice S1. Then the second forwarding table entry added by node 3 in its forwarding table may include GID: A1::1, the second next hop address O3 corresponding to the GID, and the network slice S1.
或者,假设第二节点为节点5,其接收到的配置信息中的第一段标识为A1::1,第二转发行为包括:SL--,以及更新DA字段的值。则如图8所示,节点5在其转发表中添加的第二转发表项可以包括GID:A1::1,该GID对应的第二转发行为:SL--,以及更新DA字段的值。其中,SL--是指将SL字段的值减1。Or, assuming that the second node is node 5, the first segment identifier in the configuration information it receives is A1::1, and the second forwarding behavior includes: SL--, and updating the value of the DA field. As shown in Figure 8, the second forwarding entry added by node 5 in its forwarding table may include GID: A1::1, the second forwarding behavior corresponding to the GID: SL--, and the updated DA field value. Among them, SL-- refers to decrementing the value of the SL field by 1.
步骤306、第三节点在其转发表中添加第三转发表项,该第三转发表项包括第一段标识以及第三转发行为。Step 306: The third node adds a third forwarding entry to its forwarding table. The third forwarding entry includes the first segment identifier and the third forwarding behavior.
该第一段标识可以是第三节点的一个本地实例化的SRv6SID。该步骤306的实现过程也可以参考上述步骤304。示例的,继续参考图8,假设第三节点为节点1,其接收到的配置信息中的第一段标识为A1::1,第三转发行为包括:基于第三下一跳地址O1转发,以及基于指定的网络切片S1的切片资源转发。则该节点1在其转发表中添加的第三转发表项可以包括GID:A1::1,该GID对应的第三下一跳地址O1,以及网络切片S1。The first segment identifier may be a locally instantiated SRv6 SID of the third node. The implementation process of step 306 may also refer to the above-mentioned step 304. For example, continue to refer to Figure 8, assuming that the third node is node 1, and the first segment identifier in the configuration information it receives is A1::1. The third forwarding behavior includes: forwarding based on the third next hop address O1, And slice resource forwarding based on the specified network slice S1. Then the third forwarding table entry added by node 1 in its forwarding table may include GID: A1::1, the third next hop address O1 corresponding to the GID, and the network slice S1.
步骤307、第三节点在接收到的报文中封装SRH,该SRH的段列表中包括第一段标识。Step 307: The third node encapsulates the SRH in the received message, and the segment list of the SRH includes the first segment identifier.
在本申请实施例中,第三节点作为头节点,能够基于控制器下发(或静态配置)的引流策略,将指定的流量引入至SRv6policy。若第三节点确定其接收到的报文属于该指定的流量,则可以在接收到的报文中封装SRH。该SRH包括段列表,该段列表中包括第一段标识。In the embodiment of this application, the third node serves as the head node and can introduce specified traffic to the SRv6 policy based on the traffic diversion policy issued by the controller (or statically configured). If the third node determines that the message it receives belongs to the specified traffic, it can encapsulate SRH in the received message. The SRH includes a segment list, and the segment list includes a first segment identifier.
在第一种可能的实现方式中,该段列表中可以包括一个第一段标识,该一个第一段标识能够指导报文转发系统中多个连续的节点的转发行为。并且,该第一段标识在段列表中的位置可以是基于该多个连续的节点中首个节点的位置确定的。In a first possible implementation manner, the segment list may include a first segment identifier, and the first segment identifier can guide the forwarding behavior of multiple consecutive nodes in the message forwarding system. Furthermore, the position of the first segment identifier in the segment list may be determined based on the position of the first node among the plurality of consecutive nodes.
示例的,参考图9,假设该第一段标识用于指导节点1至节点5的转发行为,由于该连续的5个节点中的首个节点(即节点1)为报文转发系统的头节点,因此该段列表中的最后一个标识字段可以为该第一段标识。或者,参考图10,假设第一段标识用于指导节点3至节点5的转发行为,由于该连续的3个节点中的首个节点(即节点3)为报文转发系统中的第3个节点,因此该段列表中的倒数第2个标识字段可以为该第一段标识。For example, referring to Figure 9, assume that the first segment of the identifier is used to guide the forwarding behavior from node 1 to node 5, because the first node (i.e., node 1) among the five consecutive nodes is the head node of the message forwarding system. , so the last identification field in the segment list can identify this first segment. Or, referring to Figure 10, assume that the first segment of the identifier is used to guide the forwarding behavior from node 3 to node 5, because the first node (i.e. node 3) among the three consecutive nodes is the third node in the message forwarding system. node, so the penultimate identification field in the segment list can be the identity of the first segment.
在第二种可能的实现方式中,该段列表中可以包括多个第一段标识,且相邻两个第一段标识之间包括第二段标识。该第二段标识与第一段标识不同,例如,该第二段标识可以为普通SID,该普通SID仅用于指导一个节点的转发行为。在该实现方式中,每个第一段标识能够指导报文转发系统中一个节点的转发行为,或者多个连续的节点的转发行为。并且,相邻两个第一段标识之间可以包括一个或多个普通SID。In a second possible implementation manner, the segment list may include multiple first segment identifiers, and a second segment identifier may be included between two adjacent first segment identifiers. The second segment identifier is different from the first segment identifier. For example, the second segment identifier may be a common SID, and the common SID is only used to guide the forwarding behavior of a node. In this implementation, each first segment identifier can guide the forwarding behavior of one node in the message forwarding system, or the forwarding behavior of multiple consecutive nodes. Furthermore, one or more common SIDs may be included between two adjacent first segment identifiers.
可以理解的是,当需要报文转发系统中多个不连续的节点执行相同的子行为时,即可采用该第二种实现方式,在段列表中设置多个相同的第一段标识。其中,需执行相同的子行为的多个节点可以采用第一段标识来标识,无需执行该相同的子行为的节点则可以采用第二段标识(即普通SID)来标识。It can be understood that when multiple discontinuous nodes in the message forwarding system need to perform the same sub-behavior, the second implementation method can be used to set multiple identical first segment identifiers in the segment list. Among them, multiple nodes that need to execute the same sub-behavior can be identified by the first segment of identifiers, and nodes that do not need to execute the same sub-behavior can be identified by using the second segment of identifiers (ie, common SIDs).
示例的,参考图10,假设报文转发系统包括节点1至节点7,且需要节点3至节点5,以及节点7执行相同的子行为,例如均执行加密转发。则节点1作为头节点,可以在报文中封装SRH,该SRH的段列表包括:SID2,B1::1,SID6,B1::1。其中,SID2为节点2的SID,用于指导节点2的转发行为;SID6为节点6的SID,用于指导节点6的转发行为。SID2和SID6之间的第一段标识(即GID)B1::1用于指导节点3至节点5执行加密转发,SID6之后的第一段标识B1::1则用于指导节点7执行加密转发。For example, referring to Figure 10, assume that the message forwarding system includes node 1 to node 7, and requires nodes 3 to 5, and node 7 to perform the same sub-behavior, for example, all perform encrypted forwarding. Then node 1 serves as the head node and can encapsulate SRH in the packet. The segment list of this SRH includes: SID2, B1::1, SID6, B1::1. Among them, SID2 is the SID of node 2, which is used to guide the forwarding behavior of node 2; SID6 is the SID of node 6, which is used to guide the forwarding behavior of node 6. The first segment identifier (GID) B1::1 between SID2 and SID6 is used to guide node 3 to node 5 to perform encrypted forwarding, and the first segment identifier B1::1 after SID6 is used to guide node 7 to perform encrypted forwarding. .
其中,SID2和SID6均为普通SID,该普通SID指导的转发行为可以包括:END、END.X、END.DT4或END.DT6等多种行为。其中,END的行为可以包括:若SL字段的值不为0,则将
SL字段的值减1,并将段列表[SL]的值复制到IPv6头中的DA字段。END.X的行为在END的行为的基础上还可以包括:将报文转发至指定的邻居节点。Among them, SID2 and SID6 are both common SIDs. The forwarding behaviors guided by this common SID can include: END, END.X, END.DT4 or END.DT6 and other behaviors. Among them, the behavior of END can include: if the value of the SL field is not 0, then Decrement the value of the SL field by 1 and copy the value of the segment list [SL] to the DA field in the IPv6 header. On the basis of the END behavior, the behavior of END.X may also include: forwarding the packet to the specified neighbor node.
步骤308、第三节点将段列表中的第一段标识拷贝至报文的DA字段,得到第一报文。Step 308: The third node copies the first segment identifier in the segment list to the DA field of the message to obtain the first message.
在本申请实施例中,若段列表中的最后一个标识字段为第一段标识,则第三节点可以将该第一段标识拷贝至报文的DA字段,得到第一报文。In this embodiment of the present application, if the last identifier field in the segment list is the first segment identifier, the third node can copy the first segment identifier to the DA field of the message to obtain the first message.
示例的,参考图9,假设第三节点为节点1,则节点1可以将GID:A1::1拷贝至外层IPv6头(例如IPv6基本头)中的DA字段。For example, referring to Figure 9, assuming that the third node is node 1, node 1 can copy GID: A1::1 to the DA field in the outer IPv6 header (eg, IPv6 basic header).
步骤309、第三节点根据该第一段标识确定第三转发表项,并从第三转发表项中确定该第一段标识对应的第三转发行为。Step 309: The third node determines a third forwarding entry based on the first segment identifier, and determines a third forwarding behavior corresponding to the first segment identifier from the third forwarding entry.
第三节点还能够以DA字段中的第一段标识为索引查找其转发表以确定第三转发表项,并从该第三转发表项中确定出该第一段标识对应的第三转发行为。The third node can also search its forwarding table using the first segment identifier in the DA field as an index to determine the third forwarding entry, and determine the third forwarding behavior corresponding to the first segment identifier from the third forwarding entry. .
示例的,参考图8,节点1根据GID:A1::1查找其转发表,确定出的第三转发行为可以包括:基于第三下一跳地址O1转发,以及基于指定的网络切片S1的切片资源转发。For example, referring to Figure 8, node 1 searches its forwarding table based on GID: A1::1, and the determined third forwarding behavior may include: forwarding based on the third next hop address O1, and slicing based on the specified network slice S1 Resource forwarding.
可以理解的是,报文转发系统中的节点(包括第一节点、第二节点和第三节点)在接收到报文后,无需先判断该报文中DA字段的值是普通的IPv6地址还是GID。因此,节点在根据DA字段中的第一段标识确定转发表项时,无需识别该第一段标识中的各个字段,而是能够以整个第一段标识为索引确定转发表项。It can be understood that after receiving the message, the nodes in the message forwarding system (including the first node, the second node and the third node) do not need to first determine whether the value of the DA field in the message is an ordinary IPv6 address or an IPv6 address. GID. Therefore, when the node determines the forwarding entry based on the first segment identifier in the DA field, it does not need to identify each field in the first segment identifier, but can determine the forwarding entry using the entire first segment identifier as an index.
步骤310、第三节点根据该第三转发行为向第一节点转发第一报文。Step 310: The third node forwards the first message to the first node according to the third forwarding behavior.
在本申请实施例中,第三节点确定出第三转发行为后,即可根据该第三转发行为向第一节点转发第一报文。其中,该第一节点为第三下一跳地址指示的节点。In this embodiment of the present application, after the third node determines the third forwarding behavior, it can forward the first message to the first node according to the third forwarding behavior. Wherein, the first node is the node indicated by the third next hop address.
示例的,参考图8和图9,节点1可以基于第三下一跳地址O1,将第一报文通过网络切片S1的切片资源转发至节点2。For example, referring to Figures 8 and 9, node 1 can forward the first message to node 2 through the slice resources of network slice S1 based on the third next hop address O1.
可以理解的是,上述步骤309和步骤310可以根据情况删除。例如,若无需第三节点执行第一段标识所指示的转发行为,则第三节点可以直接将第一报文转发至第一节点。It can be understood that the above steps 309 and 310 can be deleted according to the situation. For example, if the third node does not need to perform the forwarding behavior indicated by the first segment identifier, the third node can directly forward the first message to the first node.
或者,若第三节点的下一跳节点也无需执行该第一段标识指示的转发行为(即该下一跳节点并非是第一节点),则该SRH的段列表中最后一个标识字段可以为该下一跳节点的普通SID。相应的,在上述步骤308中,第三节点可以将该普通SID拷贝至报文的DA字段,并将报文直接转发至该下一跳节点。Alternatively, if the next-hop node of the third node does not need to perform the forwarding behavior indicated by the first segment identifier (that is, the next-hop node is not the first node), then the last identifier field in the segment list of the SRH can be The common SID of the next hop node. Correspondingly, in the above step 308, the third node can copy the common SID to the DA field of the message, and forward the message directly to the next hop node.
示例的,如图10所示,假设节点1和节点2均无需执行第一段标识:B1::1指导的转发行为,则节点1在报文中封装的SRH的段列表中,最后一个标识字段可以为节点2的SID:SID2。节点1在转发报文之前,可以先将SL字段的值初始化为3,并将SL=3所指示的SID2拷贝至IPv6头中的DA字段。之后,节点1即可将报文转发至节点2。节点2收到报文后,可以根据该DA字段中的SID2确定转发表项。由于SID2能够命中节点2的转发表,因此节点2可以将SL字段的值减1,并将更新后的SL字段的值(即SL=2)所指示的GID:B1::1拷贝至DA字段,得到第一报文。之后,节点2即可将该第一报文转发至第一节点,即节点3。For example, as shown in Figure 10, assuming that neither node 1 nor node 2 needs to perform the forwarding behavior guided by the first segment identifier: B1::1, then node 1 has the last identifier in the SRH segment list encapsulated in the message. The field can be the SID of node 2: SID2. Before forwarding the message, node 1 can initialize the value of the SL field to 3 and copy the SID2 indicated by SL=3 to the DA field in the IPv6 header. Afterwards, node 1 can forward the message to node 2. After receiving the message, node 2 can determine the forwarding entry based on SID2 in the DA field. Since SID2 can hit the forwarding table of node 2, node 2 can decrement the value of the SL field by 1 and copy the GID:B1::1 indicated by the updated value of the SL field (that is, SL=2) to the DA field. , get the first message. Afterwards, node 2 can forward the first message to the first node, that is, node 3.
步骤311、第一节点根据该第一段标识确定第一转发表项,并从第一转发表项中确定该第一段标识对应的第一转发行为。Step 311: The first node determines the first forwarding entry based on the first segment identifier, and determines the first forwarding behavior corresponding to the first segment identifier from the first forwarding entry.
第一节点接收到第一报文后,能够以第一报文中DA字段的第一段标识为索引,查找第一节点的转发表以确定第一转发表项,并从第一转发表项中确定出该第一段标识对应的第一转发行为。该第一转发行为可以包括:基于第一下一跳地址转发。该第一转发行为还可以包括
下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。After receiving the first message, the first node can use the first segment identifier of the DA field in the first message as an index to search the forwarding table of the first node to determine the first forwarding entry, and select the first forwarding entry from the first forwarding table. The first forwarding behavior corresponding to the first segment identifier is determined. The first forwarding behavior may include: forwarding based on the first next hop address. The first forwarding behavior may also include At least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; forwarding after traffic statistics.
示例的,参考图8,假设第一节点为节点2,则节点2根据GID:A1::1查找其转发表,确定出的第一转发行为可以包括:基于第一下一跳地址O2转发,以及基于指定的网络切片S1的切片资源转发。For example, referring to Figure 8, assuming that the first node is node 2, node 2 searches its forwarding table according to GID: A1::1, and the determined first forwarding behavior may include: forwarding based on the first next hop address O2, And slice resource forwarding based on the specified network slice S1.
步骤312、第一节点根据该第一转发行为向第二节点转发第二报文。Step 312: The first node forwards the second message to the second node according to the first forwarding behavior.
第一节点确定出第一转发行为后,即可根据该第一转发行为向第二节点转发基于该第一报文获得的第二报文。其中,该第二节点为第一下一跳地址指示的节点。该第二报文的DA字段也包括第一段标识。也即是,第一节点在基于第一报文获得第二报文时,并不会更新报文的DA字段的值。或者,可以理解为:该第一转发行为不包括更新DA字段的值,且不包括剥离外层IPv6头。若第一节点为SRv6系统中的Endpoint节点,则可以理解为:该第一转发行为不包括更新SL字段的值。After the first node determines the first forwarding behavior, it can forward the second message obtained based on the first message to the second node according to the first forwarding behavior. Wherein, the second node is the node indicated by the first next hop address. The DA field of the second message also includes the first segment identifier. That is to say, when the first node obtains the second message based on the first message, it does not update the value of the DA field of the message. Alternatively, it can be understood that the first forwarding behavior does not include updating the value of the DA field and does not include stripping the outer IPv6 header. If the first node is an Endpoint node in the SRv6 system, it can be understood that the first forwarding behavior does not include updating the value of the SL field.
示例的,参考图8和图9,节点2可以基于第一下一跳地址O2,将第二报文通过网络切片S1的切片资源转发至节点3。并且,节点2转发的第二报文的DA字段的值仍为A1::1。或者,参考图10,节点3可以将第二报文加密转发至节点4。并且,节点3转发的第二报文的DA字段的值仍为B1::1,且SRH中SL字段的值仍为2。For example, referring to Figures 8 and 9, node 2 can forward the second message to node 3 through the slice resources of network slice S1 based on the first next hop address O2. Moreover, the value of the DA field of the second message forwarded by node 2 is still A1::1. Alternatively, referring to Figure 10, node 3 may encrypt and forward the second message to node 4. Moreover, the value of the DA field of the second message forwarded by node 3 is still B1::1, and the value of the SL field in the SRH is still 2.
步骤313、第二节点根据该第一段标识确定第二转发表项,并从第二转发表项中确定该第一段标识对应的第二转发行为。Step 313: The second node determines the second forwarding entry based on the first segment identifier, and determines the second forwarding behavior corresponding to the first segment identifier from the second forwarding entry.
第二节点接收到第二报文后,能够以该第二报文的DA字段中的第一段标识为索引,查找第二节点的转发表以确定第二转发表项,并从该第二转发表项中确定出该第二段标识对应的第二转发行为。其中,该第二转发行为可以包括:基于第二下一跳地址转发,该第二下一跳地址与第一下一跳地址不同。After receiving the second message, the second node can use the first segment identifier in the DA field of the second message as an index to search the forwarding table of the second node to determine the second forwarding entry, and obtain the second forwarding entry from the second node. The second forwarding behavior corresponding to the second segment identifier is determined in the forwarding table entry. Wherein, the second forwarding behavior may include: forwarding based on a second next hop address, where the second next hop address is different from the first next hop address.
参考上述步骤302可知,在第一种实现方式中,第一转发行为和第二转发行为除了指示的下一跳地址不同之外,两者包括的其他子行为均可以相同。该相同的子行为可以包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。Referring to the above step 302, it can be seen that in the first implementation manner, except for the indicated next hop address, the first forwarding behavior and the second forwarding behavior may include the same other sub-behaviors. The same sub-behavior may include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
在第二种实现方式中,该第一转发行为和第二转发行为所指示的下一跳地址不同,且两者包括的其他子行为部分相同,部分不同。例如,该第二转发行为除了可以包括上述相同的子行为,还可以包括下述子行为中的一个:更新DA字段的值,剥离外层IPv6头,更新SL字段的值。In the second implementation manner, the next hop addresses indicated by the first forwarding behavior and the second forwarding behavior are different, and other sub-behaviors included in the two are partly the same and partly different. For example, in addition to the same sub-behaviors mentioned above, the second forwarding behavior may also include one of the following sub-behaviors: updating the value of the DA field, stripping off the outer IPv6 header, and updating the value of the SL field.
在第三种实现方式中,该第二转发行为与第一转发行为可以不包括相同的子行为,例如,该第二转发行为可以包括更新DA字段的值,或者包括剥离外层IPv6头。并且,第二转发行为不包括下述子行为中的任一个:基于指定的下一跳地址转发,基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。In a third implementation manner, the second forwarding behavior may not include the same sub-behavior as the first forwarding behavior. For example, the second forwarding behavior may include updating the value of the DA field, or including stripping the outer IPv6 header. Moreover, the second forwarding behavior does not include any of the following sub-behaviors: forwarding based on the specified next hop address, forwarding based on the slice resources of the specified network slice; forwarding based on the allocated network resources; encrypted forwarding; forwarding after traffic statistics .
可以理解的是,当需要报文转发系统中多个连续的节点均执行相同的子行为(例如均执行加密转发)时,若第二节点为该多个连续的节点中的中间节点,则第二转发行为和第一转发行为除了指示的下一跳地址不同之外,两者包括的其他子行为均可以相同。It can be understood that when multiple consecutive nodes in the message forwarding system are required to all perform the same sub-behavior (for example, all perform encrypted forwarding), if the second node is an intermediate node among the multiple consecutive nodes, then the second node Except for the indicated next hop address, the second forwarding behavior and the first forwarding behavior may include the same other sub-behaviors.
若第二节点为该多个连续的节点中的最后一个节点,则第二转发行为和第一转发行为指示的下一跳地址不同,且第二转发行为除了包括上述相同的子行为之外,还可以包括:更新DA字段的值,或更新SL字段的值。或者,若该最后一个节点为报文转发系统中的尾节点,则
该第二转发行为除了包括上述相同的子行为之外,还可以包括:剥离外层IPv6头。If the second node is the last node among the multiple consecutive nodes, the next hop address indicated by the second forwarding behavior and the first forwarding behavior are different, and the second forwarding behavior includes the same sub-behavior as mentioned above, It may also include: updating the value of the DA field, or updating the value of the SL field. Or, if the last node is the tail node in the message forwarding system, then In addition to the same sub-behaviors mentioned above, the second forwarding behavior may also include: stripping off the outer IPv6 header.
若第二节点为该多个连续的节点中的最后一个节点的下一跳节点,则该第二转发行为和第一转发行为可以不包括相同的子行为。例如,该第二转发行为可以包括:更新DA字段的值或更新SL字段的值。或者,若该下一跳节点为报文转发系统中的尾节点,则该第二转发行为可以包括:剥离外层IPv6头。If the second node is the next-hop node of the last node among the multiple consecutive nodes, the second forwarding behavior and the first forwarding behavior may not include the same sub-behavior. For example, the second forwarding behavior may include: updating the value of the DA field or updating the value of the SL field. Or, if the next hop node is the tail node in the message forwarding system, the second forwarding behavior may include: stripping off the outer IPv6 header.
步骤314、第二节点根据第二转发行为转发第三报文。Step 314: The second node forwards the third message according to the second forwarding behavior.
第二节点确定出第二转发行为后,即可根据该第二转发行为转发基于该第二报文获得的第三报文。例如,第二节点可以将该第三报文转发至第二下一跳地址指示的节点。After the second node determines the second forwarding behavior, it can forward the third message obtained based on the second message according to the second forwarding behavior. For example, the second node may forward the third message to the node indicated by the second next hop address.
对于上述步骤313中的第一种实现方式,第二节点不会更新第二报文中DA字段的值。相应的,第二节点转发的第三报文中的DA字段仍包括第一段标识。For the first implementation manner in step 313 above, the second node will not update the value of the DA field in the second message. Correspondingly, the DA field in the third message forwarded by the second node still includes the first segment identifier.
例如,参考图8和图9,假设第二节点为节点3,则节点3可以采用网络切片S1的切片资源向节点4转发第三报文,且该第三报文中DA字段的值仍为A1::1。For example, referring to Figures 8 and 9, assuming that the second node is node 3, node 3 can use the slice resources of network slice S1 to forward the third message to node 4, and the value of the DA field in the third message is still A1::1.
对于上述步骤313中的第二种实现方式,第二节点除了能够执行与第一节点相同的子行为,还会更新第二报文中DA字段的值,或者直接剥离外层IPv6头。其中,若第二节点更新第二报文中DA字段的值,则第二节点转发的第三报文的DA字段不包括该第一段标识。若第二节点剥离了第二报文的外层IPv6头,则第二节点转发的第三报文中不包括DA字段。For the second implementation method in step 313 above, in addition to performing the same sub-behavior as the first node, the second node also updates the value of the DA field in the second message, or directly strips off the outer IPv6 header. Wherein, if the second node updates the value of the DA field in the second message, the DA field of the third message forwarded by the second node does not include the first segment identifier. If the second node strips off the outer IPv6 header of the second message, the third message forwarded by the second node does not include the DA field.
例如,参考图10,假设第二转发行为包括:SL--,以及加密转发。则节点5可以更新第二报文中SL字段的值,并基于更新后的SL字段的值(即SL=1)将DA字段的值更新为SID6,得到第三报文。之后,节点5即可将该第三报文加密转发至节点6,该节点6的SID为SID6。For example, referring to Figure 10, assume that the second forwarding behavior includes: SL--, and encrypted forwarding. Then node 5 can update the value of the SL field in the second message, and update the value of the DA field to SID6 based on the updated value of the SL field (that is, SL=1), to obtain the third message. Afterwards, node 5 can encrypt and forward the third message to node 6, and the SID of node 6 is SID6.
对于上述步骤313中的第三种实现方式,第二节点不会执行与第一节点相同的子行为,且第二节点还会更新第二报文中DA字段的值,或者直接剥离外层IPv6头。For the third implementation method in step 313 above, the second node will not perform the same sub-behavior as the first node, and the second node will also update the value of the DA field in the second message, or directly strip off the outer IPv6 head.
例如,参考图8和图9,假设第二节点为节点5,且第二转发行为包括:SL--,以及更新DA字段的值。则节点5可以更新第二报文中SL字段的值,并基于更新后的SL字段的值将DA字段的值更新为SID6,得到第三报文。之后,节点5即可将该第三报文转发至节点6。For example, referring to Figures 8 and 9, assume that the second node is node 5, and the second forwarding behavior includes: SL--, and updating the value of the DA field. Then node 5 can update the value of the SL field in the second message, and update the value of the DA field to SID6 based on the updated value of the SL field, to obtain the third message. Afterwards, node 5 can forward the third message to node 6.
基于上文描述可知,在本申请实施例提供的方案中,第一段标识能够指导报文转发系统中的多个的节点均执行相同的子行为。因此,控制器可以向该多个节点分别下发配置信息,且控制器下发至不同节点的配置信息中,除了下一跳地址不同之外,其他信息均可以相同。相应的,该多个节点均能够执行上述步骤305,步骤311和步骤312所示的方法。Based on the above description, it can be seen that in the solution provided by the embodiment of the present application, the first segment of the identifier can guide multiple nodes in the message forwarding system to perform the same sub-behavior. Therefore, the controller can deliver configuration information to the multiple nodes respectively, and in the configuration information delivered by the controller to different nodes, except for different next hop addresses, other information can be the same. Correspondingly, the multiple nodes can all perform the methods shown in step 305, step 311 and step 312.
作为一种可能的示例,需执行相同的子行为的多个节点可以是报文转发路径中连续排列的多个节点,该连续排列的多个节点可以由段列表中的一个GID标识。例如,参考图8和图9,需执行相同的子行为(例如采用网络切片S1的网络资源转发报文)的节点为节点1至节点4,该节点1和节点4可以由段列表中的一个GID:A1::1来标识。As a possible example, multiple nodes that need to perform the same sub-behavior may be multiple nodes that are continuously arranged in the message forwarding path, and the multiple nodes that are continuously arranged may be identified by a GID in the segment list. For example, referring to Figure 8 and Figure 9, the nodes that need to perform the same sub-behavior (for example, forwarding messages using the network resources of network slice S1) are node 1 to node 4. The nodes 1 and 4 can be configured by one of the segment lists. GID: A1::1 to identify.
作为另一种可能的示例,需执行相同的子行为的多个节点在报文转发路径中可以不完全连续排列。也即是,上述多个节点中可以存在两个间隔的节点,该两个间隔的节点之间存在至少一个无需执行该相同的子行为的其他节点。并且,在段列表中,需执行相同的子行为,且连续排列的多个节点可以由段列表中的一个GID标识,无需执行该相同的子行为的其他节点则可以由普通SID标识。As another possible example, multiple nodes that need to perform the same sub-behavior may not be completely consecutively arranged in the packet forwarding path. That is, there may be two spaced nodes among the plurality of nodes, and there is at least one other node between the two spaced nodes that does not need to perform the same sub-behavior. Moreover, in the segment list, multiple consecutive nodes that need to execute the same sub-behavior can be identified by a GID in the segment list, and other nodes that do not need to execute the same sub-behavior can be identified by ordinary SIDs.
例如,参考图10,需执行相同的子行为(例如加密转发)的节点包括节点3至节点5,以及节点7。则在段列表中,上述节点3至节点5可以由一个GID:B1::1来标识,节点7可以由另一个GID:B1::1来标识。并且,该两个GID之间为无需执行加密转发的节点6的SID:SID6。
For example, referring to Figure 10, nodes that need to perform the same sub-behavior (eg, encrypted forwarding) include nodes 3 to 5, and node 7. Then in the segment list, the above-mentioned nodes 3 to 5 can be identified by one GID: B1::1, and node 7 can be identified by another GID: B1::1. Moreover, between the two GIDs is the SID of node 6 that does not need to perform encrypted forwarding: SID6.
基于图10所示的段列表,节点3和节点4可以在GID:B1::1的指导下,加密转发报文,且不会更新报文中DA字段的值。节点5可以在GID:B1::1的指导下,加密转发报文,并且会将报文中DA字段的值更新为SID6。节点6接收到报文后,由于该DA字段的值:SID6能够命中节点6的转发表,因此节点6可以将SL字段的值减1,并将更新后的SL字段的值(即SL=0)所指示的GID:B1::1拷贝至DA字段。之后,节点6可以将该报文转发至节点7。节点7进而可以基于该DA字段中的GID:B1::1,执行加密转发。Based on the segment list shown in Figure 10, node 3 and node 4 can encrypt and forward the message under the guidance of GID: B1::1, and will not update the value of the DA field in the message. Node 5 can encrypt and forward the message under the guidance of GID: B1::1, and update the value of the DA field in the message to SID6. After node 6 receives the message, since the value of the DA field: SID6 can hit the forwarding table of node 6, node 6 can decrement the value of the SL field by 1 and change the value of the updated SL field (i.e. SL=0 ) indicated by GID: B1::1 is copied to the DA field. Afterwards, node 6 can forward the message to node 7. Node 7 can then perform encrypted forwarding based on the GID:B1::1 in the DA field.
基于上述分析可知,通过在SRH的段列表中携带第一段标识(即GID),可以使得报文转发系统中的节点能够按照传统SRv6报文的处理方法,对该SRv6报文进行处理。例如,节点能够基于SL字段的值,将段列表中的第一段标识拷贝至DA字段。由此,有效提升了本申请实施例提供的方案的兼容性。Based on the above analysis, it can be seen that by carrying the first segment identifier (ie, GID) in the SRH segment list, the nodes in the message forwarding system can process the SRv6 message according to the traditional SRv6 message processing method. For example, a node can copy the first segment identifier in the segment list to the DA field based on the value of the SL field. As a result, the compatibility of the solution provided by the embodiments of the present application is effectively improved.
并且,由于需执行相同的子行为且连续排列的多个节点可以由段列表中的一个第一段标识来标识,因此可以有效缩短该段列表的长度(即栈深)。进而,可以有效减小报文的大小,提升报文的转发速率。Moreover, since multiple nodes that need to perform the same sub-behavior and are arranged continuously can be identified by a first segment identifier in the segment list, the length of the segment list (ie, the stack depth) can be effectively shortened. Furthermore, the size of the packet can be effectively reduced and the forwarding rate of the packet can be improved.
可以理解的是,本申请实施例提供的报文转发方法的步骤先后顺序可以进行适当调整,步骤也可以根据情况进行相应增减。例如,上述步骤301至步骤303的执行顺序可以根据情况调节。或者,上述步骤301至步骤303中的至少一个步骤可以根据情况删除。又或者,上述步骤308和步骤309可以根据情况删除,即第三节点作为头节点,可以无需在第一段标识的指导下执行转发行为。It can be understood that the sequence of steps in the message forwarding method provided by the embodiments of the present application can be adjusted appropriately, and the steps can also be increased or decreased accordingly according to the situation. For example, the execution order of the above steps 301 to 303 can be adjusted according to the situation. Alternatively, at least one of the above-mentioned steps 301 to 303 can be deleted according to circumstances. Alternatively, the above-mentioned steps 308 and 309 can be deleted according to the situation, that is, the third node, as the head node, does not need to perform forwarding behavior under the guidance of the first segment identifier.
本申请实施例提供了再一种报文转发方法,该方法可以应用于诸如图1或图3所示的报文转发系统中的第一节点,该第一节点可以是报文转发系统中的头节点或中间节点。参考图11,该方法包括:The embodiment of the present application provides yet another message forwarding method. This method can be applied to the first node in the message forwarding system such as shown in Figure 1 or Figure 3. The first node can be a message forwarding system. Head node or intermediate node. Referring to Figure 11, the method includes:
步骤401、第一节点接收第一报文,该第一报文的DA字段包括第一段标识。Step 401: The first node receives a first message, and the DA field of the first message includes a first segment identifier.
该步骤401的实现过程可以参考上述步骤101。The implementation process of step 401 may refer to the above-mentioned step 101.
步骤402、第一节点根据该第一段标识确定转发表项,该转发表项中包括该第一段标识对应的转发行为。Step 402: The first node determines a forwarding entry based on the first segment identifier, and the forwarding entry includes the forwarding behavior corresponding to the first segment identifier.
在本申请实施例中,第一节点中存储有转发表,该转发表中的转发表项中记录有第一段标识,以及第一段标识对应的转发行为。第一节点接收到第一报文后,可以根据该第一报文的DA字段中的第一段标识查找其转发表,以确定转发表项,进而从该转发表项中确定该第一段标识对应的转发行为。其中,该第一段标识可以为第一节点的一个本地实例化的SRv6SID。该步骤402的实现过程可以参考上述步骤102。In this embodiment of the present application, a forwarding table is stored in the first node, and the forwarding entry in the forwarding table records the first segment identifier and the forwarding behavior corresponding to the first segment identifier. After receiving the first message, the first node can search its forwarding table according to the first segment identifier in the DA field of the first message to determine the forwarding table entry, and then determine the first segment from the forwarding table entry. Identifies the corresponding forwarding behavior. The first segment identifier may be a locally instantiated SRv6 SID of the first node. The implementation process of this step 402 may refer to the above-mentioned step 102.
步骤403、第一节点根据该转发行为向第二节点转发第二报文,该第二报文为基于第一报文获得。Step 403: The first node forwards the second message to the second node according to the forwarding behavior, and the second message is obtained based on the first message.
第一节点确定出转发行为后,即可根据该转发行为向第二节点转发基于该第一报文获得的第二报文。该步骤403的实现过程可以参考上述步骤103。After the first node determines the forwarding behavior, it can forward the second message obtained based on the first message to the second node according to the forwarding behavior. The implementation process of step 403 may refer to the above-mentioned step 103.
综上所述,本申请实施例提供了一种报文转发方法。第一节点能够根据第一报文的DA字段中的第一段标识确定转发表项以确定第一转发行为,并根据该第一转发行为转发由该第一报文获得的第二报文。由于第二报文的DA字段也包括该第一段标识,因此接收到第二报文的第二节点也能够根据该第一段标识确定转发表项以确定第二转发行为,并执行第二转发行为。若需要该第一节点和第二节点均对接收到的报文执行特定操作,则使该第一转发行为和第二转发行为均包括该特定操作即可。由于本申请实施例提供的方法能够通过DA字段携带的一个
第一段标识指导多个节点的转发行为,因此无需分别为每个节点分配段标识,进而有效简化了报文转发时的操作复杂度。To sum up, the embodiment of the present application provides a message forwarding method. The first node can determine the forwarding entry according to the first segment identifier in the DA field of the first message to determine the first forwarding behavior, and forward the second message obtained from the first message according to the first forwarding behavior. Since the DA field of the second message also includes the first segment identifier, the second node that receives the second message can also determine the forwarding entry based on the first segment identifier to determine the second forwarding behavior and perform the second forwarding behavior. forwarding behavior. If both the first node and the second node are required to perform a specific operation on the received message, then both the first forwarding behavior and the second forwarding behavior include the specific operation. Since the method provided by the embodiment of this application can carry a The first segment identifier guides the forwarding behavior of multiple nodes, so there is no need to assign segment identifiers to each node separately, which effectively simplifies the operational complexity of message forwarding.
图12是本申请实施例提供的一种第一节点的结构示意图,该第一节点可以应用于诸如图1所示的报文转发系统,且可以实现上述方法实施例中由第一节点执行的步骤。参考图12,该第一节点包括:Figure 12 is a schematic structural diagram of a first node provided by an embodiment of the present application. The first node can be applied to a message forwarding system such as that shown in Figure 1, and can implement the steps performed by the first node in the above method embodiment. step. Referring to Figure 12, the first node includes:
接收模块501,用于接收第一报文,该第一报文的DA字段包括第一段标识。该接收模块501的功能实现可以参考上述方法实施例中步骤101和步骤310的相关描述。The receiving module 501 is configured to receive a first message, where the DA field of the first message includes a first segment identifier. For the functional implementation of the receiving module 501, please refer to the relevant descriptions of step 101 and step 310 in the above method embodiment.
确定模块502,用于根据该第一段标识确定转发表项,该转发表项中包括该第一段标识对应的转发行为,且该第一段标识为第一节点的一个本地实例化的段标识。该确定模块502的功能实现可以参考上述方法实施例中步骤102和步骤311的相关描述。The determination module 502 is configured to determine a forwarding entry based on the first segment identifier, the forwarding entry includes the forwarding behavior corresponding to the first segment identifier, and the first segment identifier is a locally instantiated segment of the first node. logo. For the functional implementation of the determination module 502, please refer to the relevant descriptions of step 102 and step 311 in the above method embodiment.
转发模块503,用于根据该转发行为转发第二报文,该第二报文为基于第一报文获得,且该第二报文的DA字段包括该第一段标识。该转发模块503的功能实现可以参考上述方法实施例中步骤103和步骤312的相关描述。The forwarding module 503 is configured to forward a second message according to the forwarding behavior. The second message is obtained based on the first message, and the DA field of the second message includes the first segment identifier. For the functional implementation of the forwarding module 503, please refer to the relevant descriptions of step 103 and step 312 in the above method embodiment.
可选地,该转发行为不包括更新SL字段的值。并且,该转发行为不包括剥离第一报文的外层IPv6头。Optionally, the forwarding behavior does not include updating the value of the SL field. Moreover, the forwarding behavior does not include stripping off the outer IPv6 header of the first message.
可选地,该第一报文和第二报文均包括外层IPv6头,该外层IPv6头包括DA字段。Optionally, both the first packet and the second packet include an outer IPv6 header, and the outer IPv6 header includes a DA field.
可选地,该第一报文和第二报文均为SRv6报文,该SRv6报文包括SRH,该SRH的段列表中包括该第一段标识。Optionally, the first message and the second message are both SRv6 messages, the SRv6 message includes an SRH, and the segment list of the SRH includes the first segment identifier.
可选地,该段列表中包括多个第一段标识,相邻两个第一段标识之间包括第二段标识,该第一段标识与第二段标识不同。Optionally, the segment list includes multiple first segment identifiers, and a second segment identifier is included between two adjacent first segment identifiers, and the first segment identifier is different from the second segment identifier.
可选地,该转发行为包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。Optionally, the forwarding behavior includes at least one of the following sub-behaviors: forwarding based on slice resources of a specified network slice; forwarding based on allocated network resources; forwarding with encryption; and forwarding after traffic statistics.
可选地,该转发行为包括:基于指定的下一跳地址转发。Optionally, the forwarding behavior includes: forwarding based on the specified next hop address.
可选地,继续参考图12,该第一节点还可以包括:Optionally, continuing to refer to Figure 12, the first node may also include:
获取模块504,用于获得该第一段标识和该转发行为。该获取模块504的功能实现可以参考上述方法实施例中步骤201和步骤301的相关描述。Obtaining module 504 is used to obtain the first segment identifier and the forwarding behavior. For the functional implementation of the acquisition module 504, please refer to the relevant descriptions of step 201 and step 301 in the above method embodiment.
添加模块505,用于在转发表中添加转发表项,该转发表项包括该第一段标识以及该转发行为。该添加模块505的功能实现可以参考上述方法实施例中步骤203和步骤304的相关描述。Adding module 505 is used to add a forwarding entry to the forwarding table, where the forwarding entry includes the first segment identifier and the forwarding behavior. For the functional implementation of the adding module 505, please refer to the relevant descriptions of steps 203 and 304 in the above method embodiment.
可选地,该获取模块504可以用于:接收控制器下发的第一段标识和转发行为;或者,获得静态配置的第一段标识和转发行为。Optionally, the obtaining module 504 may be used to: receive the first segment identification and forwarding behavior issued by the controller; or obtain the statically configured first segment identification and forwarding behavior.
综上所述,本申请实施例提供的第一节点能够根据第一报文的DA字段中的第一段标识确定转发表项以确定第一转发行为,并根据该第一转发行为转发由该第一报文获得的第二报文。由于第二报文的DA字段也包括该第一段标识,因此接收到第二报文的第二节点也能够根据该第一段标识确定转发表项以确定第二转发行为,并执行该第二转发行为。若需要该第一节点和第二节点均对接收到的报文执行特定操作,则使该第一转发行为和第二转发行为均包括该特定操作即可。由于该DA字段携带的一个第一段标识能够指导多个节点的转发行为,因此无需分别为每个节点分配段标识,进而有效简化了报文转发时的操作复杂度。
To sum up, the first node provided by the embodiment of the present application can determine the forwarding entry according to the first segment identifier in the DA field of the first message to determine the first forwarding behavior, and forward the message sent by the first forwarding behavior according to the first forwarding behavior. The first message gets the second message. Since the DA field of the second message also includes the first segment identifier, the second node that receives the second message can also determine the forwarding entry based on the first segment identifier to determine the second forwarding behavior and execute the third forwarding behavior. 2. Forwarding behavior. If both the first node and the second node are required to perform a specific operation on the received message, then both the first forwarding behavior and the second forwarding behavior include the specific operation. Since the DA field carries a first segment identifier that can guide the forwarding behavior of multiple nodes, there is no need to allocate segment identifiers to each node separately, thus effectively simplifying the operational complexity of message forwarding.
图13是本申请实施例提供的另一种第一节点的结构示意图,该第一节点可以应用于诸如图1所示的报文转发系统,且可以实现上述方法实施例中由第一节点执行的步骤。如图13所示,该第一节点包括:Figure 13 is a schematic structural diagram of another first node provided by an embodiment of the present application. This first node can be applied to a message forwarding system such as that shown in Figure 1, and can implement the execution of the first node in the above method embodiment. A step of. As shown in Figure 13, the first node includes:
获取模块601,用于获得第一段标识和该第一段标识对应的转发行为。该获取模块601的功能实现可以参考上述方法实施例中步骤201和步骤301的相关描述。The acquisition module 601 is used to obtain the first segment identifier and the forwarding behavior corresponding to the first segment identifier. For the functional implementation of the acquisition module 601, please refer to the relevant descriptions of step 201 and step 301 in the above method embodiment.
添加模块602,用于在转发表中添加转发表项,该转发表项包括该第一段标识以及转发行为,该转发行为不包括更新报文的外层IPv6头中DA字段的值,且不包括剥离该外层IPv6头,且该第一段标识为第一节点的一个本地实例化的段标识。该添加模块602的功能实现可以参考上述方法实施例中步骤203和步骤304的相关描述。Adding module 602 is used to add a forwarding entry in the forwarding table. The forwarding entry includes the first segment identifier and the forwarding behavior. The forwarding behavior does not include the value of the DA field in the outer IPv6 header of the update message, and does not This includes stripping off the outer IPv6 header, and the first segment identifier being a locally instantiated segment identifier of the first node. For the functional implementation of the adding module 602, please refer to the relevant descriptions of steps 203 and 304 in the above method embodiment.
转发模块603,用于根据该转发表项转发报文。该转发模块603的功能实现可以参考上述方法实施例中步骤205的相关描述。The forwarding module 603 is used to forward the message according to the forwarding entry. For the functional implementation of the forwarding module 603, please refer to the relevant description of step 205 in the above method embodiment.
可选地,该获取模块601可以用于:接收控制器下发的第一段标识和该第一段标识对应的转发行为;或者,获得静态配置的第一段标识和该第一段标识对应的转发行为。Optionally, the acquisition module 601 can be used to: receive the first segment identifier issued by the controller and the forwarding behavior corresponding to the first segment identifier; or, obtain the statically configured first segment identifier and the forwarding behavior corresponding to the first segment identifier. forwarding behavior.
可选地,该外层IPv6头包括:IPv6基本头和/或IPv6扩展头。该DA字段包括在该IPv6基本头中。Optionally, the outer IPv6 header includes: IPv6 basic header and/or IPv6 extension header. The DA field is included in the IPv6 basic header.
可选地,该转发行为不包括更新SL字段的值。Optionally, the forwarding behavior does not include updating the value of the SL field.
可选地,该转发行为可以包括:基于指定的下一跳地址转发。并且,该转发行为还可以包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。Optionally, the forwarding behavior may include: forwarding based on a specified next hop address. Furthermore, the forwarding behavior may also include at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
可选地,该转发模块603可以用于:接收第一报文,该第一报文的DA字段包括该第一段标识;根据该第一段标识确定转发表项,以确定转发行为;以及根据该转发行为转发第二报文。其中,该第二报文为基于第一报文获得,且该第二报文的DA字段也包括该第一段标识。该转发模块603的功能实现还可以参考上述方法实施例中步骤101至步骤103,以及步骤310至步骤312的相关描述。Optionally, the forwarding module 603 can be used to: receive a first message, the DA field of the first message includes the first segment identifier; determine the forwarding entry according to the first segment identifier to determine the forwarding behavior; and Forward the second message according to the forwarding behavior. The second message is obtained based on the first message, and the DA field of the second message also includes the first segment identifier. For the functional implementation of the forwarding module 603, reference can also be made to the relevant descriptions of steps 101 to 103 and steps 310 to 312 in the above method embodiment.
综上所述,本申请实施例提供的第一节点能够在其转发表项中添加第一段标识以及对应的第一转发行为,并根据该转发表项转发报文。由于该第一段标识对应的转发行为不包括更新报文的外层IPv6头中DA字段的值,且不包括剥离该外层IPv6头,因此可以确保第一节点发出的报文中的DA字段也包括该第一段标识。相应的,接收到报文的节点即可在该第一段标识的指导下执行转发行为。由于该第一段标识能够指导多个节点的转发行为,因此无需分别为每个节点分配段标识,进而有效简化了报文转发时的操作复杂度。To sum up, the first node provided by the embodiment of the present application can add the first segment identifier and the corresponding first forwarding behavior to its forwarding entry, and forward the message according to the forwarding entry. Since the forwarding behavior corresponding to the first segment identifier does not include updating the value of the DA field in the outer IPv6 header of the message, and does not include stripping the outer IPv6 header, it is possible to ensure that the DA field in the message sent by the first node Also include this first paragraph of identification. Correspondingly, the node that receives the message can perform forwarding behavior under the guidance of the first segment identifier. Since the first segment identifier can guide the forwarding behavior of multiple nodes, there is no need to allocate segment identifiers to each node, which effectively simplifies the operational complexity of message forwarding.
图14是本申请实施例提供的一种第二节点的结构示意图,该第二节点可以应用于诸如图1所示的报文转发系统,且可以实现上述方法实施例中由第二节点执行的步骤。参考图14,该第二节点包括:Figure 14 is a schematic structural diagram of a second node provided by an embodiment of the present application. The second node can be applied to a message forwarding system such as that shown in Figure 1, and can implement the steps performed by the second node in the above method embodiment. step. Referring to Figure 14, the second node includes:
接收模块701,用于接收第一节点根据第一转发行为转发的第二报文,该第二报文的DA字段包括第一段标识。其中,该第二报文基于第一节点接收到的第一报文获得,该第一报文的DA字段包括该第一段标识,该第一转发行为是第一节点根据该第一段标识从第一节点的第一转发表项中确定的。该接收模块701的功能实现可以参考上述方法实施例中步骤104和步骤312的相关描述。
The receiving module 701 is configured to receive a second message forwarded by the first node according to the first forwarding behavior, where the DA field of the second message includes a first segment identifier. Wherein, the second message is obtained based on the first message received by the first node, the DA field of the first message includes the first segment identifier, and the first forwarding behavior is performed by the first node based on the first segment identifier. Determined from the first forwarding entry of the first node. For the functional implementation of the receiving module 701, please refer to the relevant descriptions of steps 104 and 312 in the above method embodiment.
确定模块702,用于根据该第一段标识确定第二转发表项,以从该第二转发表项中确定该第一段标识对应的第二转发行为。该确定模块702的功能实现可以参考上述方法实施例中步骤105和步骤313的相关描述。The determining module 702 is configured to determine a second forwarding entry according to the first segment identifier, so as to determine the second forwarding behavior corresponding to the first segment identifier from the second forwarding entry. For the functional implementation of the determination module 702, please refer to the relevant descriptions of step 105 and step 313 in the above method embodiment.
转发模块703,用于根据该第二转发行为转发第三报文,该第三报文为基于第二报文获得。该转发模块703的功能实现可以参考上述方法实施例中步骤106和步骤314的相关描述。The forwarding module 703 is configured to forward the third message according to the second forwarding behavior, and the third message is obtained based on the second message. For the functional implementation of the forwarding module 703, please refer to the relevant descriptions of step 106 and step 314 in the above method embodiment.
可选地,该第一转发行为不包括更新SL字段的值。该第二转发行为与第一转发行为包括相同的子行为,该第三报文的DA字段包括第一段标识。Optionally, the first forwarding behavior does not include updating the value of the SL field. The second forwarding behavior includes the same sub-behavior as the first forwarding behavior, and the DA field of the third message includes the first segment identifier.
可选地,该相同的子行为包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。Optionally, the same sub-behavior includes at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
可选地,该第二转发行为不包括:更新SL字段的值。Optionally, the second forwarding behavior does not include: updating the value of the SL field.
可选地,该第三报文的DA字段不包括第一段标识,该第二转发行为可以包括更新SL字段的值。Optionally, the DA field of the third message does not include the first segment identifier, and the second forwarding behavior may include updating the value of the SL field.
可选地,该第三报文不包括DA字段,该第二转发行为可以包括剥离外层IPv6头。Optionally, the third message does not include a DA field, and the second forwarding behavior may include stripping the outer IPv6 header.
可选地,该第一转发行为可以包括:基于第一下一跳地址转发;该第二转发行为可以包括:基于第二下一跳地址转发。该第二下一跳地址与该第一下一跳地址不同。Optionally, the first forwarding behavior may include: forwarding based on the first next hop address; the second forwarding behavior may include: forwarding based on the second next hop address. The second next hop address is different from the first next hop address.
可选地,该第一报文和第二报文均包括SRH,该SRH的段列表中包括该第一段标识。Optionally, both the first message and the second message include an SRH, and the segment list of the SRH includes the first segment identifier.
综上所述,本申请实施例提供的方案中,第一节点和第二节点接收到的报文中的DA字段均包括第一段标识。相应的,该两个节点均能够通过确定转发表项确定该第一段标识对应的转发行为,并执行该转发行为。由于报文转发系统中的不同节点能够在同一个第一段标识的指导下执行转发行为,因此无需分别为每个节点分配段标识,进而有效简化了报文转发时的操作复杂度。To sum up, in the solution provided by the embodiment of the present application, the DA field in the packets received by the first node and the second node both includes the first segment identifier. Correspondingly, both nodes can determine the forwarding behavior corresponding to the first segment identifier by determining the forwarding table entry, and execute the forwarding behavior. Since different nodes in the message forwarding system can perform forwarding behaviors under the guidance of the same first segment identifier, there is no need to assign segment identifiers to each node respectively, thus effectively simplifying the operational complexity of message forwarding.
图15是本申请实施例提供的一种控制器的结构示意图,该控制器可以应用于诸如图1所示的报文转发系统,且可以实现上述方法实施例中由控制器执行的步骤。如图15所示,该控制器包括:Figure 15 is a schematic structural diagram of a controller provided by an embodiment of the present application. The controller can be applied to a message forwarding system such as that shown in Figure 1, and can implement the steps performed by the controller in the above method embodiment. As shown in Figure 15, the controller includes:
第一发送模块801,用于向报文转发系统中的第一节点下发第一段标识,以及该第一段标识对应的第一转发行为。该第一发送模块801的功能实现可以参考上述方法实施例中步骤201和步骤301的相关描述。The first sending module 801 is configured to deliver the first segment identifier and the first forwarding behavior corresponding to the first segment identifier to the first node in the message forwarding system. For the functional implementation of the first sending module 801, please refer to the relevant descriptions of step 201 and step 301 in the above method embodiment.
第二发送模块802,用于向报文转发系统中的第二节点下发该第一段标识,以及该第一段标识对应的第二转发行为。该第二发送模块802的功能实现可以参考上述方法实施例中步骤202和步骤302的相关描述。The second sending module 802 is configured to deliver the first segment identifier and the second forwarding behavior corresponding to the first segment identifier to the second node in the message forwarding system. For the functional implementation of the second sending module 802, please refer to the relevant descriptions of steps 202 and 302 in the above method embodiment.
其中,该第一转发行为不包括更新DA字段的值,且不包括剥离外层IPv6头。The first forwarding behavior does not include updating the value of the DA field, and does not include stripping off the outer IPv6 header.
可选地,该第二转发行为与该第一转发行为包括相同的子行为。Optionally, the second forwarding behavior includes the same sub-behavior as the first forwarding behavior.
可选地,该相同的子行为包括下述子行为中的至少一个:基于指定的网络切片的切片资源转发;基于分配的网络资源转发;加密转发;统计流量后转发。Optionally, the same sub-behavior includes at least one of the following sub-behaviors: slice resource forwarding based on a specified network slice; forwarding based on allocated network resources; encrypted forwarding; and forwarding after traffic statistics.
可选地,该第一转发行为包括:基于第一下一跳地址转发;该第二转发行为包括:基于第二下一跳地址,该第二下一跳地址与第一下一跳地址不同。Optionally, the first forwarding behavior includes: forwarding based on a first next hop address; the second forwarding behavior includes: based on a second next hop address, the second next hop address being different from the first next hop address .
可选地,该第一发送模块801和第二发送模块802均可以用于:基于NETCONF协议或BGP,向该报文转发系统中的节点下发第一段标识,以及该第一段标识对应的转发行为。Optionally, both the first sending module 801 and the second sending module 802 can be used to: deliver the first segment identifier to the node in the message forwarding system based on the NETCONF protocol or BGP, and the first segment identifier corresponding to forwarding behavior.
综上所述,本申请实施例提供的控制器能够向第一节点下发第一段标识以及对应的第一
转发行为,并向第二节点下发第二段标识以及对应的第二转发行为。第一节点和第二节点进而可以将控制器下发的配置信息添加至转发表项,并基于该转发表项转发报文。由于控制器向不同节点下发的配置信息中的第一段标识相同,因此该第一段标识可以指导不同节点的转发行为。若需要该第一节点和第二节点均对接收到的报文执行特定操作,则使该第一转发行为和第二转发行为均包括该特定操作即可。由于本申请实施例提供的控制器无需分别为每个节点分配段标识,因此有效简化了报文转发时的操作复杂度。To sum up, the controller provided by the embodiment of the present application can deliver the first segment identifier and the corresponding first segment to the first node. forwarding behavior, and deliver the second segment identifier and the corresponding second forwarding behavior to the second node. The first node and the second node can then add the configuration information issued by the controller to the forwarding table entry, and forward the message based on the forwarding table entry. Since the first segment identifier in the configuration information delivered by the controller to different nodes is the same, the first segment identifier can guide the forwarding behavior of different nodes. If both the first node and the second node are required to perform a specific operation on the received message, then both the first forwarding behavior and the second forwarding behavior include the specific operation. Since the controller provided by the embodiment of the present application does not need to allocate segment identifiers to each node, it effectively simplifies the operational complexity of message forwarding.
图16是本申请实施例提供的一种第三节点的结构示意图,该第三节点可以是诸如图1所示的报文转发系统中的头节点,且可以实现上述方法实施例中由第三节点执行的步骤。如图16所示,该第三节点包括:Figure 16 is a schematic structural diagram of a third node provided by an embodiment of the present application. The third node can be the head node in the message forwarding system such as shown in Figure 1, and can implement the third node in the above method embodiment. The steps the node performs. As shown in Figure 16, the third node includes:
封装模块901,用于在报文中封装SRH,该SRH的段列表中包括第一段标识。该封装模块901的功能实现可以参考上述方法实施例中步骤307的相关描述。The encapsulation module 901 is used to encapsulate the SRH in the message, and the segment list of the SRH includes the first segment identifier. For the functional implementation of the encapsulation module 901, please refer to the relevant description of step 307 in the above method embodiment.
发送模块902,用于发送该报文,以使该报文转发系统中的至少两个节点根据该报文的DA字段中的第一段标识确定转发表项,以确定该第一段标识对应的转发行为,并根据该转发行为转发报文。该发送模块902的功能实现可以参考上述方法实施例中步骤308至步骤310的相关描述。The sending module 902 is used to send the message so that at least two nodes in the message forwarding system determine the forwarding entry according to the first segment identifier in the DA field of the message to determine the corresponding first segment identifier. forwarding behavior, and forward the message according to this forwarding behavior. For the functional implementation of the sending module 902, please refer to the relevant descriptions of steps 308 to 310 in the above method embodiment.
可选地,该段列表中包括一个第一段标识。或者,该段列表中包括多个第一段标识,且相邻两个第一段标识之间包括第二段标识,该第一段标识与第二段标识不同。Optionally, the segment list includes a first segment identifier. Alternatively, the segment list includes multiple first segment identifiers, and a second segment identifier is included between two adjacent first segment identifiers, and the first segment identifier is different from the second segment identifier.
综上所述,本申请实施例提供的第三节点能够在报文中封装SRH,该SRH的段列表中包括第一段标识。由于该第一段标识能够携带在报文的DA字段,以指导多个节点的转发行为,因此无需分别为每个节点分配段标识,进而有效简化了报文转发时的操作复杂度。To sum up, the third node provided by the embodiment of the present application can encapsulate the SRH in the message, and the segment list of the SRH includes the first segment identifier. Since the first segment identifier can be carried in the DA field of the message to guide the forwarding behavior of multiple nodes, there is no need to allocate segment identifiers to each node, which effectively simplifies the operational complexity of message forwarding.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的控制器、各个节点以及各模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the controller, each node and each module described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here. .
应理解的是,本申请实施例提供的控制器和各个节点还可以用特定应用集成电路(application-specific integrated circuit,ASIC)实现,或可编程逻辑器件(programmable logic device,PLD)实现,上述PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD),现场可编程门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。此外,也可以通过软件实现上述方法实施例提供的报文转发方法,当通过软件实现上述方法实施例提供的报文转发方法时,该控制器和各节点中的功能模块也可以为软件模块。It should be understood that the controller and each node provided by the embodiment of the present application can also be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The above-mentioned PLD It can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL) or any combination thereof. In addition, the message forwarding method provided by the above method embodiment can also be implemented through software. When the message forwarding method provided by the above method embodiment is implemented through software, the functional modules in the controller and each node can also be software modules.
图17是本申请实施例提供的一种网络设备的结构示意图。该网络设备可以应用于诸如图1所示系统,且该网络设备可以是该系统中的控制器或任一节点,例如可以是第一节点、第二节点或第三节点。参考图17,该网络设备包括:处理器1001、存储器1002、网络接口1003和总线1004。Figure 17 is a schematic structural diagram of a network device provided by an embodiment of the present application. The network device can be applied to a system such as that shown in Figure 1, and the network device can be a controller or any node in the system, for example, it can be a first node, a second node, or a third node. Referring to Figure 17, the network device includes: a processor 1001, a memory 1002, a network interface 1003 and a bus 1004.
其中,存储器1002中存储有计算机程序10021,计算机程序10021用于实现各种应用功能。处理器1001用于执行该计算机程序10021以实现上述方法实施例提供的应用于第一节点、第二节点、第三节点或者控制器的报文转发方法。Among them, the computer program 10021 is stored in the memory 1002, and the computer program 10021 is used to implement various application functions. The processor 1001 is configured to execute the computer program 10021 to implement the message forwarding method provided by the above method embodiment and applied to the first node, the second node, the third node or the controller.
处理器1001可以是中央处理器(central processing unit,CPU),该处理器1001还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、ASIC、FPGA、图形处
理器(graphics processing unit,GPU)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者是任何常规的处理器。The processor 1001 can be a central processing unit (CPU). The processor 1001 can also be other general-purpose processors, digital signal processors (DSP), ASICs, FPGAs, graphics processing units, etc. processor (graphics processing unit, GPU) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor can be a microprocessor or any conventional processor.
存储器1002可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(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 date SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。Memory 1002 may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Among them, non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically removable memory. Erase electrically programmable read-only memory (EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of illustration, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data date SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM) ) and direct memory bus random access memory (direct rambus RAM, DR RAM).
网络接口1003可以为多个,且网络接口1003用于实现与其他设备之间的通信连接(可以是有线或者无线)。其中,在本申请实施例中,网络接口1003用于收发报文。其中,其他设备可以是终端、服务器、VM等设备或其它网络设备。There may be multiple network interfaces 1003, and the network interface 1003 is used to implement communication connections with other devices (which may be wired or wireless). Among them, in this embodiment of the present application, the network interface 1003 is used to send and receive messages. Among them, other devices may be terminals, servers, VMs and other devices or other network devices.
总线1004用于连接处理器1001、存储器1002和网络接口1003。并且,总线1004除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线1004。The bus 1004 is used to connect the processor 1001, the memory 1002 and the network interface 1003. Furthermore, in addition to the data bus, the bus 1004 may also include a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, the various buses are labeled as bus 1004 in the figure.
若该网络设备为第一节点,则处理器1001用于通过网络接口1003接收第一报文,该第一报文的DA字段包括第一段标识,并用于根据该第一段标识确定第一转发表项,以从第一转发表项中确定第一段标识对应的转发行为;以及用于根据该转发行为通过网络接口1003转发第二报文。其中,该第二报文为基于所述第一报文获得,且第二报文的DA字段包括第一段标识,该第一段标识为第一节点的一个本地实例化的SRv6SID。If the network device is the first node, the processor 1001 is configured to receive the first message through the network interface 1003. The DA field of the first message includes the first segment identifier, and is configured to determine the first segment according to the first segment identifier. Forwarding entry, to determine the forwarding behavior corresponding to the first segment identifier from the first forwarding entry; and for forwarding the second message through the network interface 1003 according to the forwarding behavior. The second message is obtained based on the first message, and the DA field of the second message includes a first segment identifier, and the first segment identifier is a locally instantiated SRv6 SID of the first node.
或者,该处理器1001用于获得第一段标识和第一段标识对应的转发行为,在转发表中添加转发表项,并根据该转发表项通过网络接口1003转发报文。其中,该第一段标识为第一节点的一个本地实例化的SRv6SID。并且,该转发表项包括第一段标识以及转发行为,该转发行为不包括更新报文的外层IPv6头中DA字段的值,且不包括剥离该外层IPv6头。Alternatively, the processor 1001 is used to obtain the first segment identifier and the forwarding behavior corresponding to the first segment identifier, add a forwarding entry to the forwarding table, and forward the message through the network interface 1003 according to the forwarding entry. The first segment identifier is a locally instantiated SRv6 SID of the first node. Furthermore, the forwarding entry includes the first segment identifier and the forwarding behavior. The forwarding behavior does not include the value of the DA field in the outer IPv6 header of the update message, and does not include stripping the outer IPv6 header.
其中,该处理器1001的详细处理过程请参考上述图5至图7所示方法实施例中由第一节点执行的步骤,这里不再赘述。For the detailed processing process of the processor 1001, please refer to the steps executed by the first node in the above method embodiment shown in Figures 5 to 7, which will not be described again here.
若该网络设备为第二节点,则处理器1001可以用于通过网络接口1003接收第二报文,该第二报文的DA字段包括第一段标识,并用于根据该第一段标识确定第二转发表项,以从该第二转发表项中确定该第一段标识对应的第二转发行为,以及根据该第二转发行为转发第三报文。该第三报文为基于所述第二报文获得,该第一段标识为第二节点的一个本地实例化的SRv6SID。该处理器1001的详细处理过程请参考上述图5至图7所示方法实施例中由第二节点执行的步骤,这里不再赘述。If the network device is a second node, the processor 1001 may be configured to receive a second message through the network interface 1003. The DA field of the second message includes a first segment identifier, and is configured to determine the first segment identifier based on the first segment identifier. and two forwarding entries, to determine the second forwarding behavior corresponding to the first segment identifier from the second forwarding entry, and to forward the third message according to the second forwarding behavior. The third message is obtained based on the second message, and the first segment identifier is a locally instantiated SRv6 SID of the second node. For the detailed processing process of the processor 1001, please refer to the steps executed by the second node in the above method embodiment shown in Figures 5 to 7, which will not be described again here.
若该网络设备为控制器,则处理器1001可以用于通过网络接口1003向报文转发系统中的第一节点下发第一段标识,以及第一段标识对应的第一转发行为,并向该报文转发系统中的第二节点下发该第一段标识,以及该第一段标识对应的第二转发行为。其中,该第一转发行为不包括更新DA字段的值,且不包括剥离外层IPv6头。该处理器1001的详细处理过程请参考
上述图5至图7所示方法实施例中由控制器执行的步骤,这里不再赘述。If the network device is a controller, the processor 1001 may be configured to deliver the first segment identifier and the first forwarding behavior corresponding to the first segment identifier to the first node in the message forwarding system through the network interface 1003, and send the first segment identifier to the first node. The second node in the message forwarding system delivers the first segment identifier and the second forwarding behavior corresponding to the first segment identifier. The first forwarding behavior does not include updating the value of the DA field, and does not include stripping off the outer IPv6 header. For detailed processing procedures of the processor 1001, please refer to The steps performed by the controller in the above method embodiments shown in Figures 5 to 7 will not be described again here.
若该网络设备为第三节点,则处理器1001可以在报文中封装SRH,该SRH的段列表中包括第一段标识,以及用于通过网络接口1003发送该报文,以使报文转发系统中的至少两个节点根据报文的DA字段中的第一段标识确定转发表项,以从该转发表项中确定该第一段标识对应的转发行为,并根据该转发行为转发报文。其中,该第一段标识为该至少两个节点中每个节点的一个本地实例化的段标识。该处理器1001的详细处理过程请参考上述图5至图7所示方法实施例中由第三节点执行的步骤,这里不再赘述。If the network device is the third node, the processor 1001 can encapsulate the SRH in the message, the segment list of the SRH includes the first segment identifier, and send the message through the network interface 1003 so that the message can be forwarded. At least two nodes in the system determine the forwarding entry based on the first segment identifier in the DA field of the message, determine the forwarding behavior corresponding to the first segment identifier from the forwarding entry, and forward the message based on the forwarding behavior. . Wherein, the first segment identifier is a locally instantiated segment identifier of each node in the at least two nodes. For the detailed processing process of the processor 1001, please refer to the steps executed by the third node in the above method embodiment shown in Figures 5 to 7, which will not be described again here.
图18是本申请实施例提供的另一种网络设备的结构示意图。该网络设备可以应用于诸如图1所示系统,且可以为该系统中的控制器或任一节点,例如可以是第一节点、第二节点或第三节点。如图18所示,该网络设备可以包括:主控板1101和至少一个接口板(接口板也称为线卡或业务板),例如图18中示出了接口板1102和接口板1103。多个接口板的情况下网络设备还可以包括交换网板1104,该交换网板1104用于完成各接口板之间的数据交换。Figure 18 is a schematic structural diagram of another network device provided by an embodiment of the present application. The network device can be applied to a system such as that shown in Figure 1, and can be a controller or any node in the system, for example, it can be a first node, a second node or a third node. As shown in Figure 18, the network device may include: a main control board 1101 and at least one interface board (the interface board is also called a line card or a service board). For example, Figure 18 shows the interface board 1102 and the interface board 1103. In the case of multiple interface boards, the network device may also include a switching network board 1104, which is used to complete data exchange between the interface boards.
其中,主控板1101也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板1101用于完成系统管理、设备维护和协议处理等功能。主控板1101上主要有3类功能单元:系统管理控制单元、系统时钟单元和系统维护单元。主控板1101包括:中央处理器11011和存储器11012。Among them, the main control board 1101 is also called a main processing unit (MPU) or a route processor card. The main control board 1101 is used to complete functions such as system management, equipment maintenance, and protocol processing. There are three main types of functional units on the main control board 1101: system management control unit, system clock unit and system maintenance unit. The main control board 1101 includes: a central processing unit 11011 and a memory 11012.
接口板1102和1103也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板,接口板用于提供各种业务接口,并实现报文的转发。其中,接口板所提供的业务接口可以包括:基于SONET/SDH的数据包(packet over SONET/SDH,POS)接口、千兆以太网(gigabit Ethernet,GE)接口和异步传输模式(asynchronous transfer mode,ATM)接口等。其中,SONET是指同步光纤网络(synchronous optical network),SDH是指同步数字体系(synchronous digital hierarchy)。主控板1101、接口板1102以及接口板1103之间通过系统总线与系统背板相连以实现互通。如图18所示,接口板1102上包括一个或多个中央处理器11021。中央处理器11021用于对接口板1102进行控制管理并与主控板1101上的中央处理器11011进行通信,以及接口板1102。接口板1102上的存储器11024用于存储转发表项,网络处理器11022可以通过查找存储器11024中存储的转发表项进行报文的转发。存储器11024还可以用于存储程序代码。Interface boards 1102 and 1103 are also called line processing unit (LPU), line card (line card) or service boards. The interface boards are used to provide various service interfaces and implement packet forwarding. Among them, the service interfaces provided by the interface board can include: SONET/SDH-based packet (packet over SONET/SDH, POS) interface, Gigabit Ethernet (gigabit Ethernet, GE) interface and asynchronous transfer mode (asynchronous transfer mode, ATM) interface, etc. Among them, SONET refers to synchronous optical network (synchronous optical network), and SDH refers to synchronous digital hierarchy (synchronous digital hierarchy). The main control board 1101, the interface board 1102 and the interface board 1103 are connected to the system backplane through a system bus to achieve intercommunication. As shown in Figure 18, the interface board 1102 includes one or more central processors 11021. The central processor 11021 is used to control and manage the interface board 1102 and communicate with the central processor 11011 on the main control board 1101 and the interface board 1102 . The memory 11024 on the interface board 1102 is used to store forwarding entries, and the network processor 11022 can forward messages by searching for the forwarding entries stored in the memory 11024. Memory 11024 may also be used to store program code.
该接口板1102还包括一个或多个物理接口卡11023,该一个或多个物理接口卡11023用于接收上一跳节点发送的报文,并根据中央处理器11021的指示向下一跳节点发送处理后的报文。The interface board 1102 also includes one or more physical interface cards 11023. The one or more physical interface cards 11023 are used to receive messages sent by the previous hop node and send them to the next hop node according to the instructions of the central processor 11021. processed message.
此外,可以理解的是,图18中的接口板1102中的中央处理器11021和/或网络处理器11022可以是专用硬件或芯片,如可以采用ASIC来实现上述功能,这种实现方式即为通常所说的转发面采用专用硬件或芯片处理的方式。在另外的实施方式中,所述中央处理器11021和/或网络处理器11022也可以采用通用的处理器,如通用的CPU来实现以上描述的功能。In addition, it can be understood that the central processor 11021 and/or the network processor 11022 in the interface board 1102 in Figure 18 can be dedicated hardware or chips. For example, an ASIC can be used to implement the above functions. This implementation method is generally The forwarding plane is processed by dedicated hardware or chips. In other embodiments, the central processor 11021 and/or the network processor 11022 may also use a general-purpose processor, such as a general-purpose CPU, to implement the functions described above.
此外应理解的是,主控板1101可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,该网络设备的数据处理能力越强,提供的接口板越多。如图18所示,网络设备包括接口板1102和接口板1103。当采用分布式的转发机制时,接口板1103的结构与接口板1102的结构基本相同,且接口板1103上的操作与接口板1102的操作基本相似,为了简洁,不再赘述。网络设备具有多块接口板的情况下,该多块接口板
之间可以通过一块或多块交换网板1104通信,且可以实现负荷分担和冗余备份,以提供大容量的数据交换和处理能力。In addition, it should be understood that there may be one or more main control boards 1101, and when there are multiple main control boards, they may include a main main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. As shown in Figure 18, the network device includes an interface board 1102 and an interface board 1103. When a distributed forwarding mechanism is adopted, the structure of the interface board 1103 is basically the same as that of the interface board 1102, and the operations on the interface board 1103 are basically similar to the operations on the interface board 1102. For the sake of simplicity, they will not be described again. When the network device has multiple interface boards, the multiple interface boards They can communicate with each other through one or more switching network boards 1104, and can realize load sharing and redundancy backup to provide large-capacity data exchange and processing capabilities.
在集中式转发架构下,该网络设备可以不需要交换网板1104,接口板承担整个系统的业务数据的处理功能。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的网络设备。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。Under the centralized forwarding architecture, the network device does not need the switching network board 1104, and the interface board is responsible for processing the service data of the entire system. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture. The specific architecture used depends on the specific networking deployment scenario and is not limited here.
在本申请实施例中,存储器11012和存储器11024可以是ROM或可存储静态信息和指令的其它类型的静态存储设备,也可以是RAM或者可存储信息和指令的其它类型的动态存储设备,还可以是EEPROM、只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。接口板1102中的存储器11024可以是独立存在,并通过通信总线与中央处理器11021相连接;或者,存储器11024也可以和中央处理器11021集成在一起。主控板1101中的存储器11012可以是独立存在,并通过通信总线与中央处理器11011相连接;或者,存储器11012也可以和中央处理器11011集成在一起。In this embodiment of the present application, memory 11012 and memory 11024 may be ROM or other types of static storage devices that can store static information and instructions, or they may be RAM or other types of dynamic storage devices that can store information and instructions. They may also be It is EEPROM, compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk or other magnetic storage device , or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 11024 in the interface board 1102 can exist independently and be connected to the central processor 11021 through a communication bus; or the memory 11024 can also be integrated with the central processor 11021. The memory 11012 in the main control board 1101 can exist independently and be connected to the central processor 11011 through a communication bus; or the memory 11012 can also be integrated with the central processor 11011.
存储器11024中存储的程序代码,由中央处理器11021来控制执行,存储器11012存储的程序代码,由中央处理器11011来控制执行。该中央处理器11021和/或中央处理器11011可以通过执行程序代码来实现上述实施例所提供的报文转发方法。例如,可以实现第一节点、第二节点、第三节点或控制器执行的方法。存储器11024和/或存储器11012存储的程序代码中可以包括一个或多个软件单元,这一个或多个软件单元可以为图12至图16中任一附图所示的功能模块。The program code stored in the memory 11024 is controlled and executed by the central processor 11021, and the program code stored in the memory 11012 is controlled and executed by the central processor 11011. The central processor 11021 and/or the central processor 11011 can implement the message forwarding method provided in the above embodiments by executing program codes. For example, a method executed by a first node, a second node, a third node or a controller may be implemented. The program code stored in the memory 11024 and/or the memory 11012 may include one or more software units, and the one or more software units may be the functional modules shown in any of the figures in FIGS. 12 to 16 .
在本申请实施例中,该物理接口卡11023,可以是使用任何收发器一类的装置,用于与其它设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),无线局域网(wireless local area networks,WLAN)等。In the embodiment of this application, the physical interface card 11023 can be a device using any transceiver, used to communicate with other devices or communication networks, such as Ethernet, radio access network (radio access network, RAN), Wireless local area networks (WLAN), etc.
可选地,图12至图17中任一附图所示的设备也可以采用图18所示的结构实现。Optionally, the device shown in any one of Figures 12 to 17 can also be implemented using the structure shown in Figure 18 .
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在计算机上运行时,使得计算机执行如上述方法实施例中由第一节点、第二节点、第三节点或者控制器执行的步骤。Embodiments of the present application also provide a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are run on a computer, they cause the computer to execute the steps performed by the first node and the third node in the above method embodiment. Steps performed by the second node, third node, or controller.
本申请实施例还提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述方法实施例中由第一节点、第二节点、第三节点或者控制器执行的步骤。Embodiments of the present application also provide a computer program product containing instructions. When the computer program product is run on a computer, it causes the computer to execute the first node, the second node, the third node or the controller in the above method embodiment. steps to perform.
本申请实施例还提供了一种报文转发系统,如图1所示,该报文转发系统包括多个节点01。该多个节点01中的至少两个节点01可以用于实现上述方法实施例中由第一节点执行的步骤。例如,该至少两个节点01可以包括第一节点和第二节点,该第一节点用于实现上述方法实施例中由第一节点执行的步骤,该第二节点用于实现上述方法实施例中由第二节点执行的步骤。The embodiment of the present application also provides a message forwarding system. As shown in Figure 1, the message forwarding system includes multiple nodes 01. At least two nodes 01 among the plurality of nodes 01 may be used to implement the steps performed by the first node in the above method embodiment. For example, the at least two nodes 01 may include a first node and a second node. The first node is used to implement the steps performed by the first node in the above method embodiment. The second node is used to implement the steps in the above method embodiment. Steps performed by the second node.
其中,该第一节点的结构可以如图12、图13、图17或图18所示,该第二节点的结构可以如图14、图17或图18所示。
The structure of the first node may be as shown in Figure 12, Figure 13, Figure 17 or Figure 18, and the structure of the second node may be as shown in Figure 14, Figure 17 or Figure 18.
可选地,该系统还可以包括:控制器03。该控制器03可以用于实现上述方法实施例中由控制器执行的方法。该控制器的结构可以如图15、图17或图18所示。Optionally, the system may also include: controller 03. The controller 03 can be used to implement the method performed by the controller in the above method embodiment. The structure of the controller can be shown in Figure 15, Figure 17 or Figure 18.
可选地,该多个节点01中的至少一个节点01还可以用于实现上述方法实施例中由第三节点执行的方法。也即是,该多个节点01中可以包括第三节点,该第三节点的结构可以如图16至图18中的任一附图所示。Optionally, at least one node 01 among the plurality of nodes 01 can also be used to implement the method performed by the third node in the above method embodiment. That is, the plurality of nodes 01 may include a third node, and the structure of the third node may be as shown in any of the figures in FIG. 16 to FIG. 18 .
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage media mentioned can be read-only memory, magnetic disks or optical disks, etc.
在本申请实施例中,术语“第一”、“第二”和“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the embodiments of the present application, the terms "first", "second" and "third" are only used for description purposes and cannot be understood as indicating or implying relative importance.
本申请中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。The term "and/or" in this application is just an association relationship describing related objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, alone There are three situations B. In addition, the character "/" in this article generally indicates that the related objects are an "or" relationship.
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的构思和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the concepts and principles of the present application shall be included in the protection of the present application. within the range.
Claims (41)
- 一种报文转发方法,其特征在于,应用于第一节点,所述方法包括:A message forwarding method, characterized in that, applied to the first node, the method includes:接收第一报文,所述第一报文的目的地址DA字段包括第一段标识;Receive the first message, the destination address DA field of the first message including the first segment identifier;根据所述第一段标识确定转发表项,所述转发表项中包括所述第一段标识对应的转发行为,且所述第一段标识为所述第一节点的一个本地实例化的段标识;Determine the forwarding entry according to the first segment identifier, the forwarding entry includes the forwarding behavior corresponding to the first segment identifier, and the first segment identifier is a locally instantiated segment of the first node logo;根据所述转发行为向第二节点转发第二报文,所述第二报文为基于所述第一报文获得,且所述第二报文的DA字段包括所述第一段标识。Forward a second message to the second node according to the forwarding behavior, the second message is obtained based on the first message, and the DA field of the second message includes the first segment identifier.
- 根据权利要求1所述的方法,其特征在于,所述转发行为不包括更新段剩余SL字段的值。The method according to claim 1, characterized in that the forwarding behavior does not include updating the value of the remaining SL field of the segment.
- 根据权利要求1或2所述的方法,其特征在于,所述转发行为不包括剥离所述第一报文的外层互联网协议第6版IPv6头。The method according to claim 1 or 2, characterized in that the forwarding behavior does not include stripping the outer Internet Protocol version 6 IPv6 header of the first message.
- 根据权利要求1至3任一所述的方法,其特征在于,所述第一报文和所述第二报文均包括外层互联网协议第6版IPv6头,所述外层IPv6头包括所述DA字段。The method according to any one of claims 1 to 3, characterized in that the first message and the second message both include an outer Internet Protocol version 6 IPv6 header, and the outer IPv6 header includes all Describe the DA field.
- 根据权利要求1至4任一所述的方法,其特征在于,所述第一报文和所述第二报文均为基于IPv6的段路由SRv6报文,所述SRv6报文包括分段路由头SRH,所述SRH的段列表中包括所述第一段标识。The method according to any one of claims 1 to 4, characterized in that the first message and the second message are both segment routing SRv6 messages based on IPv6, and the SRv6 message includes segment routing Header SRH, the segment list of the SRH includes the first segment identifier.
- 根据权利要求5所述的方法,其特征在于,所述段列表中包括多个所述第一段标识,相邻两个所述第一段标识之间包括第二段标识,所述第一段标识与所述第二段标识不同。The method according to claim 5, characterized in that the segment list includes a plurality of first segment identifiers, and a second segment identifier is included between two adjacent first segment identifiers. The segment identifier is different from the second segment identifier.
- 根据权利要求1至6任一所述的方法,其特征在于,所述转发行为包括下述子行为中的至少一个:The method according to any one of claims 1 to 6, characterized in that the forwarding behavior includes at least one of the following sub-behaviors:基于指定的网络切片的切片资源转发;Slice resource forwarding based on specified network slice;基于分配的网络资源转发;Network resource forwarding based on allocation;加密转发;Encrypted forwarding;统计流量后转发。Traffic is forwarded after statistics.
- 根据权利要求1至7任一所述的方法,其特征在于,所述转发行为包括:The method according to any one of claims 1 to 7, characterized in that the forwarding behavior includes:基于指定的下一跳地址转发。Forward based on the specified next hop address.
- 根据权利要求1至8任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 8, characterized in that the method further includes:获得所述第一段标识和所述转发行为;Obtain the first segment identification and the forwarding behavior;在转发表中添加所述转发表项,所述转发表项包括所述第一段标识以及所述转发行为。Add the forwarding entry to the forwarding table, where the forwarding entry includes the first segment identifier and the forwarding behavior.
- 根据权利要求9所述的方法,其特征在于,所述获得所述第一段标识和所述转发行为,包括:The method of claim 9, wherein obtaining the first segment identifier and the forwarding behavior includes:接收控制器下发的所述第一段标识和所述转发行为; Receive the first segment identifier and the forwarding behavior issued by the controller;或者,获得静态配置的所述第一段标识和所述转发行为。Or, obtain the statically configured first segment identifier and the forwarding behavior.
- 一种报文转发方法,其特征在于,应用于第一节点,所述方法包括:A message forwarding method, characterized in that, applied to the first node, the method includes:获得第一段标识和所述第一段标识对应的转发行为;Obtain the first segment identifier and the forwarding behavior corresponding to the first segment identifier;在转发表中添加转发表项,所述转发表项包括所述第一段标识以及所述转发行为,所述转发行为不包括更新报文的外层互联网协议第6版IPv6头中目的地址DA字段的值,且不包括剥离所述外层IPv6头,且所述第一段标识为所述第一节点的一个本地实例化的段标识;Add a forwarding entry to the forwarding table. The forwarding entry includes the first segment identifier and the forwarding behavior. The forwarding behavior does not include the destination address DA in the outer Internet Protocol version 6 IPv6 header of the update message. The value of the field does not include stripping off the outer IPv6 header, and the first segment identifier is a locally instantiated segment identifier of the first node;根据所述转发表项向第二节点转发报文。Forward the message to the second node according to the forwarding entry.
- 根据权利要求11所述的方法,其特征在于,所述获得第一段标识和所述第一段标识对应的转发行为,包括:The method according to claim 11, characterized in that said obtaining the first segment identifier and the forwarding behavior corresponding to the first segment identifier includes:接收控制器下发的所述第一段标识和所述第一段标识对应的转发行为;Receive the first segment identifier issued by the controller and the forwarding behavior corresponding to the first segment identifier;或者,获得静态配置的所述第一段标识和所述第一段标识对应的转发行为。Or, obtain the statically configured first segment identifier and the forwarding behavior corresponding to the first segment identifier.
- 根据权利要求11或12所述的方法,其特征在于,所述外层IPv6头包括:IPv6基本头和/或IPv6扩展头。The method according to claim 11 or 12, characterized in that the outer IPv6 header includes: IPv6 basic header and/or IPv6 extension header.
- 根据权利要求13所述的方法,其特征在于,所述DA字段包括在所述IPv6基本头中。The method of claim 13, wherein the DA field is included in the IPv6 basic header.
- 根据权利要求11至14任一所述的方法,其特征在于,所述转发行为不包括更新段剩余SL字段的值。The method according to any one of claims 11 to 14, characterized in that the forwarding behavior does not include updating the value of the remaining SL field of the segment.
- 根据权利要求11至15任一所述的方法,其特征在于,所述转发行为包括:The method according to any one of claims 11 to 15, characterized in that the forwarding behavior includes:基于指定的下一跳地址转发。Forward based on the specified next hop address.
- 根据权利要求11至16任一所述的方法,其特征在于,所述转发行为包括下述子行为中的至少一个:The method according to any one of claims 11 to 16, characterized in that the forwarding behavior includes at least one of the following sub-behaviors:基于指定的网络切片的切片资源转发;Slice resource forwarding based on specified network slice;基于分配的网络资源转发;Network resource forwarding based on allocation;加密转发;Encrypted forwarding;统计流量后转发。Traffic is forwarded after statistics.
- 根据权利要求11至17任一所述的方法,其特征在于,所述根据所述转发表项向第二节点转发报文,包括:The method according to any one of claims 11 to 17, characterized in that forwarding the message to the second node according to the forwarding entry includes:接收第一报文,所述第一报文的DA字段包括所述第一段标识;Receive the first message, the DA field of the first message including the first segment identifier;根据所述第一段标识确定所述转发表项,以确定所述转发行为;Determine the forwarding entry according to the first segment identifier to determine the forwarding behavior;根据所述转发行为向第二节点转发第二报文,所述第二报文为基于所述第一报文获得,且所述第二报文的DA字段包括所述第一段标识。Forward a second message to the second node according to the forwarding behavior, the second message is obtained based on the first message, and the DA field of the second message includes the first segment identifier.
- 一种报文转发方法,其特征在于,应用于报文转发系统,所述报文转发系统包括第一 节点和第二节点;所述方法包括:A message forwarding method, characterized in that it is applied to a message forwarding system, and the message forwarding system includes a first node and a second node; the method includes:所述第一节点接收第一报文,所述第一报文的目的地址DA字段包括第一段标识;The first node receives the first message, and the destination address DA field of the first message includes a first segment identifier;所述第一节点根据所述第一段标识确定第一转发表项,以从所述第一转发表项中确定所述第一段标识对应的第一转发行为,所述第一段标识为所述第一节点的一个本地实例化的段标识;The first node determines a first forwarding entry based on the first segment identifier to determine the first forwarding behavior corresponding to the first segment identifier from the first forwarding entry, and the first segment identifier is a locally instantiated segment identifier of the first node;所述第一节点根据所述第一转发行为向所述第二节点转发第二报文,所述第二报文为基于所述第一报文获得;The first node forwards a second message to the second node according to the first forwarding behavior, and the second message is obtained based on the first message;所述第二节点接收所述第二报文,所述第二报文的DA字段包括所述第一段标识;The second node receives the second message, and the DA field of the second message includes the first segment identifier;所述第二节点根据所述第一段标识确定第二转发表项,以从所述第二转发表项中确定所述第一段标识对应的第二转发行为,所述第一段标识为所述第二节点的一个本地实例化的段标识;The second node determines a second forwarding entry based on the first segment identifier to determine the second forwarding behavior corresponding to the first segment identifier from the second forwarding entry, and the first segment identifier is a locally instantiated segment identifier of the second node;所述第二节点根据所述第二转发行为转发第三报文,所述第三报文为基于所述第二报文获得。The second node forwards a third message according to the second forwarding behavior, and the third message is obtained based on the second message.
- 根据权利要求19所述的方法,其特征在于,所述第一转发行为不包括更新段剩余SL字段的值。The method according to claim 19, characterized in that the first forwarding behavior does not include updating the value of the remaining SL field of the segment.
- 根据权利要求20所述的方法,其特征在于,所述第一转发行为不包括剥离所述第一报文的外层互联网协议第6版IPv6头。The method of claim 20, wherein the first forwarding behavior does not include stripping the outer Internet Protocol version 6 IPv6 header of the first message.
- 根据权利要求19至21任一所述的方法,其特征在于,所述第二转发行为与所述第一转发行为包括相同的子行为,所述第三报文的DA字段包括所述第一段标识。The method according to any one of claims 19 to 21, characterized in that the second forwarding behavior and the first forwarding behavior include the same sub-behavior, and the DA field of the third message includes the first Segment ID.
- 根据权利要求22所述的方法,其特征在于,所述相同的子行为包括下述子行为中的至少一个:The method according to claim 22, characterized in that the same sub-behavior includes at least one of the following sub-behaviors:基于指定的网络切片的切片资源转发;Slice resource forwarding based on specified network slice;基于分配的网络资源转发;Network resource forwarding based on allocation;加密转发;Encrypted forwarding;统计流量后转发。Traffic is forwarded after statistics.
- 根据权利要求19至23任一所述的方法,其特征在于,所述第二转发行为不包括:更新SL字段的值。The method according to any one of claims 19 to 23, characterized in that the second forwarding behavior does not include: updating the value of the SL field.
- 根据权利要求20所述的方法,其特征在于,所述第三报文的DA字段不包括所述第一段标识,所述第二转发行为包括更新SL字段的值。The method of claim 20, wherein the DA field of the third message does not include the first segment identifier, and the second forwarding behavior includes updating the value of the SL field.
- 根据权利要求20所述的方法,其特征在于,所述第三报文不包括DA字段,所述第二转发行为包括剥离外层IPv6头。The method of claim 20, wherein the third message does not include a DA field, and the second forwarding behavior includes stripping off an outer IPv6 header.
- 根据权利要求19至26任一所述的方法,其特征在于,所述第一转发行为包括:基于第 一下一跳地址转发;The method according to any one of claims 19 to 26, characterized in that the first forwarding behavior includes: based on the first One-hop address forwarding;所述第二转发行为包括:基于第二下一跳地址转发,所述第二下一跳地址与所述第一下一跳地址不同。The second forwarding behavior includes: forwarding based on a second next hop address, where the second next hop address is different from the first next hop address.
- 根据权利要求19至27任一所述的方法,其特征在于,所述第一报文和所述第二报文均包括分段路由头SRH,所述SRH的段列表中包括所述第一段标识。The method according to any one of claims 19 to 27, characterized in that both the first message and the second message include a segment routing header SRH, and the segment list of the SRH includes the first Segment ID.
- 一种报文转发方法,其特征在于,应用于报文转发系统中的控制器;所述方法包括:A message forwarding method, characterized in that it is applied to a controller in a message forwarding system; the method includes:向所述报文转发系统中的第一节点下发第一段标识,以及所述第一段标识对应的第一转发行为;Delivering a first segment identifier and a first forwarding behavior corresponding to the first segment identifier to the first node in the message forwarding system;向所述报文转发系统中的第二节点下发所述第一段标识,以及所述第一段标识对应的第二转发行为;Deliver the first segment identifier and the second forwarding behavior corresponding to the first segment identifier to a second node in the message forwarding system;其中,所述第一转发行为不包括更新目的地址DA字段的值,且不包括剥离外层互联网协议第6版IPv6头。Wherein, the first forwarding behavior does not include updating the value of the DA field of the destination address, and does not include stripping the outer Internet Protocol version 6 IPv6 header.
- 根据权利要求29所述的方法,其特征在于,所述第二转发行为与所述第一转发行为包括相同的子行为。The method of claim 29, wherein the second forwarding behavior and the first forwarding behavior include the same sub-behavior.
- 根据权利要求30所述的方法,其特征在于,所述相同的子行为包括下述子行为中的至少一个:The method according to claim 30, characterized in that the same sub-behavior includes at least one of the following sub-behaviors:基于指定的网络切片的切片资源转发;Slice resource forwarding based on specified network slice;基于分配的网络资源转发;Network resource forwarding based on allocation;加密转发;Encrypted forwarding;统计流量后转发。Traffic is forwarded after statistics.
- 根据权利要求29至31任一所述的方法,其特征在于,所述第一转发行为包括:基于第一下一跳地址转发;The method according to any one of claims 29 to 31, characterized in that the first forwarding behavior includes: forwarding based on the first next hop address;所述第二转发行为包括:基于第二下一跳地址,所述第二下一跳地址与所述第一下一跳地址不同。The second forwarding behavior includes: based on a second next hop address, the second next hop address being different from the first next hop address.
- 根据权利要求29至32任一所述的方法,其特征在于,向所述报文转发系统中的节点下发第一段标识,以及所述第一段标识对应的转发行为,包括:The method according to any one of claims 29 to 32, characterized in that, delivering a first segment identifier to a node in the message forwarding system, and the forwarding behavior corresponding to the first segment identifier, include:基于网络配置协议或边界网关协议,向所述报文转发系统中的节点下发第一段标识,以及所述第一段标识对应的转发行为。Based on the network configuration protocol or the border gateway protocol, the first segment identifier and the forwarding behavior corresponding to the first segment identifier are delivered to the nodes in the message forwarding system.
- 一种报文转发方法,其特征在于,所述方法包括:A message forwarding method, characterized in that the method includes:在报文中封装分段路由头SRH,所述SRH的段列表中包括第一段标识;Encapsulate the segment routing header SRH in the message, and the segment list of the SRH includes the first segment identifier;发送所述报文,以使所述报文转发系统中的至少两个节点根据所述报文的目的地址DA字段中的所述第一段标识确定转发表项,以从所述转发表项中确定所述第一段标识对应的转发行为,并根据所述转发行为转发所述报文,其中,所述第一段标识为所述至少两个节点中每 个节点的一个本地实例化的段标识。Send the message so that at least two nodes in the message forwarding system determine a forwarding entry based on the first segment identifier in the destination address DA field of the message to obtain the forwarding entry from the forwarding entry. Determine the forwarding behavior corresponding to the first segment identifier, and forward the message according to the forwarding behavior, wherein the first segment identifier is each of the at least two nodes. A locally instantiated segment identifier for the node.
- 根据权利要求34所述的方法,其特征在于,所述段列表中包括一个所述第一段标识;The method according to claim 34, characterized in that the segment list includes one of the first segment identifiers;或者,所述段列表中包括多个所述第一段标识,且相邻两个所述第一段标识之间包括第二段标识,所述第一段标识与所述第二段标识不同。Alternatively, the segment list includes multiple first segment identifiers, and a second segment identifier is included between two adjacent first segment identifiers, and the first segment identifier is different from the second segment identifier. .
- 一种网络设备,其特征在于,所述网络设备包括:存储器,处理器及存储在所述存储器上并能够在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至35任一所述的方法。A network device, characterized in that the network device includes: a memory, a processor and a computer program stored on the memory and capable of running on the processor. When the processor executes the computer program, the The method of any one of claims 1 to 35.
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行如权利要求1至35任一所述的方法。A computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, they cause the computer to execute the method according to any one of claims 1 to 35.
- 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1至35任一所述的方法。A computer program product containing instructions, characterized in that when the computer program product is run on a computer, it causes the computer to execute the method according to any one of claims 1 to 35.
- 一种报文转发系统,其特征在于,所述系统包括多个节点;A message forwarding system, characterized in that the system includes multiple nodes;所述多个节点中的至少两个节点用于实现如权利要求1至28任一所述的方法。At least two nodes among the plurality of nodes are used to implement the method according to any one of claims 1 to 28.
- 根据权利要求39所述的系统,其特征在于,所述系统还包括:控制器;The system of claim 39, further comprising: a controller;所述控制器用于实现如权利要求29至33任一所述的方法。The controller is used to implement the method according to any one of claims 29 to 33.
- 根据权利要求39或40所述的系统,其特征在于,所述多个节点中的至少一个节点还用于实现如权利要求34或35所述的方法。 The system according to claim 39 or 40, characterized in that at least one node among the plurality of nodes is also used to implement the method according to claim 34 or 35.
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210351055 | 2022-04-02 | ||
CN202210351055.1 | 2022-04-02 | ||
CN202210658325.3 | 2022-06-10 | ||
CN202210658325.3A CN116938830A (en) | 2022-04-02 | 2022-06-10 | Message forwarding method, device and system |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023185235A1 true WO2023185235A1 (en) | 2023-10-05 |
Family
ID=88199061
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/073738 WO2023185235A1 (en) | 2022-04-02 | 2023-01-29 | Packet forwarding method, apparatus and system |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2023185235A1 (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111314219A (en) * | 2020-02-24 | 2020-06-19 | 盛科网络(苏州)有限公司 | Efficient forwarding method and device for IPv6 segmented routing |
US20200267241A1 (en) * | 2019-02-14 | 2020-08-20 | Mediatek Inc. | Simple Ethernet Header Compression |
CN112511430A (en) * | 2020-06-28 | 2021-03-16 | 中兴通讯股份有限公司 | Information interaction method, information interaction device, tunnel establishment method, tunnel establishment device, communication node and storage medium |
CN112787921A (en) * | 2019-11-08 | 2021-05-11 | 华为技术有限公司 | Message transmission method, proxy node and storage medium |
CN113132229A (en) * | 2019-12-30 | 2021-07-16 | 华为技术有限公司 | Segment identifier determination method and device |
WO2021254500A1 (en) * | 2020-06-18 | 2021-12-23 | 华为技术有限公司 | Method, device and system for forwarding message |
-
2023
- 2023-01-29 WO PCT/CN2023/073738 patent/WO2023185235A1/en unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200267241A1 (en) * | 2019-02-14 | 2020-08-20 | Mediatek Inc. | Simple Ethernet Header Compression |
CN112787921A (en) * | 2019-11-08 | 2021-05-11 | 华为技术有限公司 | Message transmission method, proxy node and storage medium |
CN113132229A (en) * | 2019-12-30 | 2021-07-16 | 华为技术有限公司 | Segment identifier determination method and device |
CN111314219A (en) * | 2020-02-24 | 2020-06-19 | 盛科网络(苏州)有限公司 | Efficient forwarding method and device for IPv6 segmented routing |
WO2021254500A1 (en) * | 2020-06-18 | 2021-12-23 | 华为技术有限公司 | Method, device and system for forwarding message |
CN112511430A (en) * | 2020-06-28 | 2021-03-16 | 中兴通讯股份有限公司 | Information interaction method, information interaction device, tunnel establishment method, tunnel establishment device, communication node and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112953831A (en) | Message forwarding method and device | |
CN113259238B (en) | Method and device for processing segment identifiers | |
US20230300070A1 (en) | Packet Sending Method, Device, and System | |
CN112019433B (en) | Message forwarding method and device | |
WO2022001835A1 (en) | Method and apparatus for sending message, and network device, system and storage medium | |
US20220263751A1 (en) | Packet Processing Method, Apparatus, and System | |
JP2023523048A (en) | Packet processing method and related device | |
WO2021043232A1 (en) | Method by which host network performance requirements may be programmed, device and system | |
WO2021151381A1 (en) | Method for processing segment id, and apparatus | |
WO2022057810A1 (en) | Service packet forwarding method, sr policy sending method, device, and system | |
US20230388223A1 (en) | Packet forwarding method, apparatus, and system | |
WO2019033964A1 (en) | Method for transmitting packet, forwarding device, controller, and system | |
US20240048479A1 (en) | Packet Forwarding Method and Apparatus, Network Device, and Storage Medium | |
WO2022237291A1 (en) | Message transmission method and apparatus, related device, and storage medium | |
WO2022111666A1 (en) | Route advertisement method, apparatus, and system | |
CN110022263B (en) | Data transmission method and related device | |
CN115348202A (en) | Data transmission method, device and equipment based on network slice and storage medium | |
WO2023185235A1 (en) | Packet forwarding method, apparatus and system | |
CN117097818A (en) | Message processing method and related equipment | |
CN113542112B (en) | Message forwarding method and network equipment | |
WO2023231431A1 (en) | Message receiving method, sending method, forwarding method, apparatus, and system | |
CN116938830A (en) | Message forwarding method, device and system | |
CN115242699A (en) | Message transmission method, slice generation method, device and system | |
WO2024002101A1 (en) | Packet transmission method and apparatus, related device, and storage medium | |
WO2023088145A1 (en) | Packet processing method, apparatus and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23777614 Country of ref document: EP Kind code of ref document: A1 |