CN116418728A - Message sending method, segment identification generation method and device - Google Patents

Message sending method, segment identification generation method and device Download PDF

Info

Publication number
CN116418728A
CN116418728A CN202111679438.3A CN202111679438A CN116418728A CN 116418728 A CN116418728 A CN 116418728A CN 202111679438 A CN202111679438 A CN 202111679438A CN 116418728 A CN116418728 A CN 116418728A
Authority
CN
China
Prior art keywords
srv
sid
sids
locator
flexible algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111679438.3A
Other languages
Chinese (zh)
Inventor
王大为
刘京卿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202111679438.3A priority Critical patent/CN116418728A/en
Publication of CN116418728A publication Critical patent/CN116418728A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/32Flooding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/741Routing in networks with a plurality of addressing schemes, e.g. with both IPv4 and IPv6

Abstract

The application provides a message sending method, a segment identification generation method and a device, and aims to reduce the quantity of information carried in an announcement message for flooding and relieve the flooding pressure of network equipment. The message sending method comprises the following steps: the first device generates an advertisement message, wherein the advertisement message comprises M flexible algorithms Flexible Algorithm corresponding to a SRv Locator and a SRv Locator based on a segment routing protocol SRv6 positioning SRv of IPv6 version 6 of internet protocol, and M is a positive integer greater than or equal to 2; the first device sends the notification message to the second device, where the notification message is used to trigger the second device to generate N segment identification SIDs, each SID in the N SIDs includes the SRv Locator, each SID in the N SIDs corresponds to one Flexible Algorithm of the M Flexible Algorithm, and N is a positive integer greater than or equal to 2.

Description

Message sending method, segment identification generation method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method for sending a message, and a method and apparatus for generating a segment identifier.
Background
With the rapid development of services, internet protocol version six (Internet Protocol Version, ipv 6) has been widely used. Among them, the IPv 6-based segment routing protocol (Segment Routing over IPv, SRv 6) is an important development direction of IPv6 technology. In a network system implemented based on SRv, data packets can be forwarded or processed by segment identification (Segment Identifier, SID). The SID may be generated based on a SRv location (SRv 6 Locator) identification of the network device, and one network device may correspond to one or more SIDs. And the network equipment floods one or more SIDs corresponding to the network equipment in the network so that other network equipment in the network can forward the data message according to the SIDs.
Flexible algorithm (Flexible Algorithm, flex-Algo) techniques may allow network devices to support multiple forwarding algorithms to compute forwarding paths, thereby implementing different logical topologies under the same physical topology. That is, if the destinations of multiple data packets are the same, the transmission paths of the multiple data packets may be obtained based on different forwarding algorithms, and then the data packets may be forwarded to the destinations via multiple different transmission paths. In the network system implemented by SRv, the network device determines a forwarding path based on SRv6 locators, so that in order to support different forwarding algorithms, the same network device may have a plurality of SRv6 locators, and each SRv6 locators may correspond to one forwarding algorithm.
However, as the forwarding algorithm supported by the network device increases, the number of locators that need to be flooded to other network devices by the network device also greatly increases, and the load of the network increases.
Disclosure of Invention
The application provides a message sending method, a segment identification generating method and a device, which are used for reducing the quantity of information carried in a flooded notification message and relieving the load of a network.
In a first aspect, the present application provides a method for sending a packet, where the method may be applied to a first device, where the first device may be a network device for forwarding a data packet, and may be a device such as a router or a switch. Specifically, the method for sending the message includes: the first device generates an announcement message and sends the announcement message to the second device. The second device may be a network device or a control device for controlling the first device. The notification message includes SRv Locator of the first device and M Flexible Algorithm corresponding to SRv Locator of the first device (where M is a positive integer greater than or equal to 2). That is, the notification message sent by the first device to the second device includes SRv locators of the first device and M Flexible Algorithm supported by the first device. Accordingly, after receiving the advertisement message, the second device may generate N SIDs (where N is a positive integer greater than or equal to 2) from the advertisement message. Each SID of the N SIDs generated by the second device may include a SRv Locator of the first device and one Flexible Algorithm of the M Flexible Algorithm, and a different SID may contain a different Flexible Algorithm. In this way, the second device generates multiple SIDs by using 1 number SRv locators in the notification message and multiple numbers Flexible Algorithm corresponding to the SRv6 locators, and does not need to include SRv6 locators equal to Flexible Algorithm in the notification message. The number of SRv locators contained in the notification message is reduced, the number of information carried by the notification message is reduced, and the network load is reduced.
In one possible design, the notification message further includes K functions (functions), where K is a positive integer greater than or equal to 2, each SID of the N SIDs includes the SRv Locator, one Flexible Algorithm of the M Flexible Algorithm, and one Function of the K functions, and N is less than or equal to a product of the K and the M. In this way, the first device sends an advertisement message including 1+m+n pieces of information (i.e. 1 SRv Locator, M Flexible Algorithm and N functions), so that the second device can obtain the SID of at most n×m first devices. Therefore, the quantity of information needed to be carried in the notification message is reduced, and the flooding pressure is lightened.
In one possible design, the K functions are carried in any one or more of the following fields of the announcement message: SRv6 End-point SID subtype Length value (SRv End SID sub-Type-length-value, SRv6 End SID sub-TLV) field, SRv End-point three-layer cross-connect segment identification subtype Length value (SRv End. X SID sub-TLV) field, and SRv local area network End-point three-layer cross-connect segment identification subtype Length value (SRv 6 LAN End. X SID sub-TLV) field.
In one possible design, the advertisement message includes J SIDs for carrying K functions. And J is a positive integer. Optionally, J is greater than or equal to K. Specifically, the Locator of each SID of the J SIDs includes a SRv Locator of the first device, and the Function portion includes one of the K functions. Optionally, the value of the Flex-algo portion of the J SIDs is 0.
In one possible design, the J SIDs are carried in any one or more of the following fields of the advertisement message: SRv6 End SID sub-TLV field, SRv End. X SID sub-TLV field, and SRv LAN End. X SID sub-TLV field.
In one possible design, if the first device newly increases support for a certain Flexible Algorithm, the first device may generate a new advertisement message and send it to the second device. The new advertisement message may include a new addition Flexible Algorithm. Thus, after receiving a new notification message sent by the first device, the second device may generate a new SID according to SRv Locator and the new Flexible Algorithm of the first device. The newly generated SID may include the SRv Locator and the newly added Flexible Algorithm. Similarly, the second device may also generate a new forwarding table according to the new advertisement packet, where the routing prefix in the new forwarding table includes the SRv Locator and the added Flexible Algorithm. Alternatively, if the advertisement message includes K functions, the second device may generate a plurality of K SIDs corresponding to the new Flexible Algorithm at most.
In one possible design, flexible Algorithm for each SID of the N SIDs is contained in the Flex-algo portion of the corresponding SID.
In one possible design, the advertisement message further includes indication information, where the indication information is used to indicate a location of the Flex-algo portion in the SID.
In one possible design, the Flex-algo portion is 8 bits (bits) in length.
In one possible design, the M Flexible Algorithm are carried in a segment identification Algorithm sub-TLV (SR-Algorithm sub-TLV) field of the advertisement message.
In one possible design, the advertisement message includes a SRv6 Locator TLV field, and the SRv6 Locator and the M Flexible Algorithm are carried in a SRv6 Locator TLV field of the advertisement message. That is, the SRv6 Locator TLV field carries 1 SRv6 locators and M Flexible Algorithm.
In one possible design, the SRv Locator TLV field further includes a first identifier, where the first identifier is used to indicate that the advertisement packet includes the M Flexible Algorithm.
In one possible design, the advertisement message may include a link state protocol (Link State Protocol Data Unit, LSP) message, or may be a link state advertisement (Link State Advertisement, LSA) message.
In one possible design, the second device is a controller, and the advertisement message includes border gateway protocol (Border Gateway Protocol, BGP) Link-State (LS) network layer reachability information (Network Layer Reachability Information, NLRI) and BGP LS attribute (BGP LS Attributes) information, where BGP LS NLRI includes the SRv6 locators, and the BGP LS Attributes information includes the M Flexible Algorithm.
In one possible design, the BGP LS NLRI includes BGP Prefix NLRI (BGP Prefix NLRI), the BGP Prefix NLRI includes the SRv6 Locator, the BGP LS Attributes information includes BGP-LS Prefix Attribute information, and the M Flexible Algorithm are carried in the BGP-LS Prefix Attribute information.
In one possible design, the advertisement message is a BGP update message.
In a second aspect, the present application provides a method for generating a segment identifier, where the method is applied to a second device, where the second device may be a network device, or may be a control device, for example, the second device may be a network device such as a router or a switch, or may be a control device such as a controller or a server. Specifically, the method for generating the segment identification comprises the following steps: the second device receives an announcement message sent by the first device, where the announcement message includes SRv locators and M Flexible Algorithm corresponding to SRv locators. After receiving the advertisement message, the second device may generate N SIDs from the advertisement message. The first device may be a network device corresponding to a SRv Locator in the notification message, or may be a device for forwarding the notification message, where M and N are positive integers greater than or equal to 2. Each of the N SIDs generated from the advertisement message may include one of the SRv Locator and M Flexible Algorithm described above Flexible Algorithm. That is, the second device does not acquire the complete SID, but rather acquires the relatively independent SRv locators and Flexible Algorithm and obtains N SIDs according to SRv6 locators and M Flexible Algorithm. In this way, the second device generates multiple SIDs through 1 piece SRv Locator and multiple pieces Flexible Algorithm corresponding to SRv Locator in the notification message, and no SRv Locator with equal number is needed to be included in the notification message in Flexible Algorithm. The number of SRv locators contained in the notification message is reduced, the number of information carried by the notification message is reduced, and the network load is reduced.
For convenience of explanation, the following will take a device corresponding to SRv Locator in the notification message as a first device as an example.
In one possible design, the second device generates J forwarding entries according to SRv locators and M Flexible Algorithm included in the advertisement message. Wherein each forwarding table entry includes a routing prefix, each routing prefix including SRv Locator and one Flexible Algorithm of M Flexible Algorithm as described above. J is less than or equal to M. The forwarding table item is used for forwarding the data message. Accordingly, after receiving the data message, the second device may find, according to the SID included in the data message, a routing prefix that matches the SID from the J forwarding entries, and determine, according to the routing prefix, a target interface and a next-hop network device corresponding to the data message, and further send the data message to the next-hop network device through the target interface, so as to implement normal forwarding of the data message.
In one possible design, if the first device has newly increased support for a certain Flexible Algorithm, the first device generates a new advertisement message and sends it to the second device. The new advertisement message includes the newly added Flexible Algorithm. After receiving the new notification message sent by the first device, the second device generates a new SID according to the SRv Locator of the first device and the newly added Flexible Algorithm. The newly generated SID may include the SRv Locator and the newly added Flexible Algorithm. Similarly, the second device may also generate a new forwarding table according to the new advertisement packet, where the routing prefix in the new forwarding table includes the SRv Locator and the added Flexible Algorithm. Alternatively, if the first device corresponds to K functions, the second device may generate at most a plurality of K SIDs corresponding to the new Flexible Algorithm.
In one possible design, flexible Algorithm for each SID of the N SIDs is contained in the Flex-algo portion of the corresponding SID.
In one possible design, the advertisement message further includes indication information, where the indication information is used to indicate a location of the Flex-algo portion in the SID.
In one possible design, the Flex-algo portion is 8 bits in length.
In one possible design, the notification message further includes K functions, where K is a positive integer greater than or equal to 2, each SID of the N SIDs includes the SRv Locator, one Flexible Algorithm of the M Flexible Algorithm, and one Function of the K functions, and N is less than or equal to a product of the K and the M.
In one possible design, the K functions are carried in any one or more of the following fields of the announcement message: SRv6 End SID sub-TLV field, SRv end.X SID sub-TLV field and SRv LAN end.X SID sub-TLV field.
In one possible design, the advertisement message may include J SIDs, where each of the J SIDs includes the SRv Locator and one of the J functions, J is a positive integer greater than or equal to 2, each of the N SIDs includes the SRv Locator, one of the M Flexible Algorithm, flexible Algorithm, and one of the J functions, and N is less than or equal to a product of the J and the M.
In one possible design, the second device may add one Flexible Algorithm of M Flexible Algorithm to each of the J SIDs, resulting in N SIDs. For example, assume that the M Flexible Algorithm includes a first Flexible Algorithm, H functions include a first Function, H SIDs include a first SID, and the Function portion of the first SID includes the first Function. The second device may replace the value of the Flex-algo portion of the first SID with the first Flexible Algorithm resulting in a SID corresponding to the first Flexible Algorithm and first Function. Accordingly, the second device may obtain N SIDs through the above method.
In one possible design, the J SIDs include a SRv Locator portion, a Flexible Algorithm portion, and a Function portion. Wherein the SRv Locator portion has a value of SRv Locator and the Function portion has a value of one of K functions of the first device. In generating the N SIDs, the second device may add one Flexible Algorithm of M Flexible Algorithm to the Flexible Algorithm portion of each of the J SIDs.
In one possible design, the J SIDs are carried in any one or more of the following fields of the advertisement message: SRv6 End SID sub-TLV field, SRv End. X SID sub-TLV field, and SRv LAN End. X SID sub-TLV field.
In one possible design, the M Flexible Algorithm are carried in SR-Algorithm sub-TLV fields of the advertisement message.
In one possible design, the advertisement message includes a SRv6 Locator TLV field, and the SRv6 Locator and the M Flexible Algorithm are carried in a SRv6 Locator TLV field of the advertisement message.
In one possible design, the SRv Locator TLV field further includes a first identifier, where the first identifier is used to indicate that the advertisement packet includes the M Flexible Algorithm.
In one possible design, the advertisement message includes an LSP message, or may be an LSA message.
In one possible design, the second device is a controller, the advertisement message includes BGP LS NLRI and BGP LS Attributes information, the BGP LS NLRI includes the SRv6 Locator, and the BGP LS Attributes information includes the M Flexible Algorithm pieces.
In one possible design, the BGP LS NLRI includes BGP Prefix NLRI including the SRv Locator, the BGP LS Attributes information includes BGP-LS Prefix Attribute information, and the M Flexible Algorithm are carried in the BGP-LS Prefix Attribute information.
In one possible design, the advertisement message is a BGP update message.
In a third aspect, the present application provides an apparatus for sending a message, where the apparatus is applied to a first device, where the first device is configured to perform the method in the first aspect or any one of the possible designs of the first aspect. In particular, the first device comprises means for performing the method of the first aspect or any one of the possible designs of the first aspect.
In a fourth aspect, the present application provides an apparatus for segment identification generation, the apparatus being applied to a second device for performing the method of the second aspect or any one of the possible designs of the second aspect. In particular, the second device comprises means for performing the method of the second aspect or any one of the possible designs of the second aspect.
In a fifth aspect, the present application provides a first device comprising a processor and a memory, the memory being for storing instructions or program code, the processor being for invoking and executing the instructions or program code from the memory to perform the method of messaging as described in the previous first aspect.
In a sixth aspect, the present application provides a second device comprising a processor and a memory, the memory being for storing instructions or program code, the processor being for invoking and executing the instructions or program code from the memory to perform the method of segment identification generation as described in the second aspect above.
In a seventh aspect, the present application provides a chip comprising a memory for storing instructions or program code, and a processor for invoking and executing the instructions or program code from the memory for the method of messaging as described in the first aspect, or for performing the method of segment identification generation as described in the second aspect.
In an eighth aspect, the present application provides a system comprising a first device for performing the method as provided by the first aspect or any one of the possible designs of the first aspect and a second device for performing the method as provided by the second aspect or any one of the possible designs of the second aspect.
In a ninth aspect, the present application provides a computer readable storage medium comprising instructions, a program or code which, when executed on a computer, causes the computer to perform a method of messaging as described in the first aspect, or to perform a method of segment identification generation as described in the second aspect.
Drawings
FIG. 1-A is a network architecture diagram of a network system according to an embodiment of the present application;
fig. 1-B is a schematic diagram of an application scenario of a method for processing a message according to an embodiment of the present application;
fig. 1-C is a schematic diagram of another application scenario of a method for processing a message according to an embodiment of the present application;
fig. 1-D is a schematic diagram of another application scenario of a method for processing a message according to an embodiment of the present application;
fig. 2 is a signaling interaction diagram of a method for sending a message and a method for generating a segment identifier according to an embodiment of the present application;
fig. 3-a is a schematic diagram of one possible format of the SR-Algorithm sub-TLV field provided in an embodiment of the present application;
fig. 3-B is a schematic diagram of one possible format of the SR-Algorithm sub-TLV field provided in an embodiment of the present application;
fig. 4-a is a schematic diagram of a possible format of a SRv End SID sub-TLV field provided in an embodiment of the present application;
fig. 4-B is a schematic diagram of one possible format of the SRv end.x SID sub-TLV field provided in an embodiment of the present application;
fig. 4-C is a schematic diagram of one possible format of the SRv LAN end.x SID sub-TLV field provided in an embodiment of the present application;
fig. 4-D is a schematic diagram of one possible format of a sub-TLV field including Function provided in an embodiment of the present application;
Fig. 4-E is a schematic diagram of one possible format of the SRv6 SID Structure TLV field provided in an embodiment of the present application;
fig. 4-F is a schematic diagram of another possible format of the SRv6 SID Structure TLV field provided in an embodiment of the present application;
fig. 5 is another signaling interaction diagram of a method for sending a message and a method for generating a segment identifier according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a device 600 for sending a message according to an embodiment of the present application;
FIG. 7 is a schematic structural diagram of an apparatus 700 for segment identifier generation according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an apparatus 800 according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an apparatus 900 according to an embodiment of the present application.
Detailed Description
The following describes the conventional technology, a method for sending a message and a method for generating a segment identifier provided by the embodiment of the application with reference to the accompanying drawings.
If the network system is implemented based on SRv6, then the network devices supporting SRv6 in the network are configured with SRv6 locators. SRv6 Locator is used to identify the network device and is one of the components of the SID. In addition to the SRv Locator portion, the SID also includes a Function identification (Function). The Function is an Identity (ID) value assigned to the local forwarding instruction by the network device, and is used to instruct the network device that parses the SID to perform a corresponding action. That is, different SRv locators are used to identify different network devices, and different functions represent different forwarding behaviors. To ensure normal transmission of the message, the network device floods one or more SIDs corresponding to itself to other network devices, e.g., the network device may send a plurality of SIDs corresponding to the network device to other network devices via an interior gateway protocol (Interior Gateway Protocol, IGP) protocol.
Referring to fig. 1-a, a network architecture diagram of a system according to an embodiment of the present application is shown. In fig. 1-a, the network system includes device 111, device 112, device 113, network device 121, network device 122, network device 123, network device 124, network device 125, and network device 126. Wherein network device 121 is connected to device 111, network device 122, and network device 125, network device 123 is connected to network device 122 and network device 124, network device 126 is connected to network device 125 and network device 124, device 112 is connected to network device 124, and device 113 is connected to network device 124. Device 111 may send data messages to device 112 and device 113 via forwarding of various network devices between network systems.
Specifically, the network device 121 may be connected to the network device 122 through a network Interface (Interface) A1, and connected to the network device 125 through a network Interface A2; network device 124 may be connected to device 112 through network interface B1 and to device 113 through network interface B2.
If the system shown in FIG. 1-A is implemented based on SRv6, then network device 121, network device 122, network device 123, network device 124, network device 125, and network device 126 have different SRv6 locators. Each network device may in turn correspond to a plurality of functions. The SRv Locator and Function of the network device may be combined to obtain multiple SIDs.
For example, assume that SRv Locator of network device 124 is 1001:64 and that network device 124 has both SRv6 endpoint SID (SRv 6 End SID) and SRv6 endpoint three-layer cross-connect SID (SRv 6 End. X SID) types of SIDs. If the Function corresponding to SRv End SID is:: 12, the Function corresponding to SRv END.X SID corresponding to path "network device 124- & gt device 112" is:: 101, and the Function corresponding to SRv END.X SID corresponding to path "network device 124- & gt device 113" is:: 102. Then the network device 124 may have three SIDs, namely SRv End SID 1001::12, SRv end.x SID 1001 corresponding to path "network device 124 → device 112", and SRv end.x SID 1001 corresponding to path "network device 124 → device 113", 102.
In order to facilitate the other network devices to send the message to the device 112 or the device 113, the network device 124 may flood the three SIDs to the other network devices in the network system, so that the other network devices forward the message to the device 112 or the device 113 according to the network segment corresponding to the SRv Locator portion in the SIDs. For example, network device 121 may receive an advertisement message sent by network device 124. The notification message includes SRv Locator 1001::/64 of the network device 124 and SID of the network device 124, where the SID of the network device 124 belongs to network segment 1001::/64. Through the routing calculation, the network device 121 may determine that the segment 1001:/64 corresponds to the network interface A1, and generate a correspondence between the identifiers of the segment 1001:/64 and the network interface A1, resulting in a corresponding forwarding table entry. Thus, in the process of forwarding the data message, if the SID of the data message X received by the network device 121 belongs to the network segment 1001:64, the network device 121 determines that the target interface corresponding to the data message X is the network interface A1 according to the forwarding table entry, and then sends the data message to the network device 122 through the network interface A1.
In the conventional SRv technology, the addressing of the data packets is based on the network segment corresponding to SRv Locator of the network device. Then to implement the Flex-Algo technique on the basis of SRv, multiple different SRv locators are set for the same network device. For example, assuming that the network system shown in fig. 1-a supports two forwarding algorithms, that is, flex-algo 128 and Flex-algo 129, two different SRv locators may be set for the network device 124, corresponding to the Flex-algo 128 and Flex-algo 129, respectively, so that the rest of the network devices in the network system address according to SRv locators corresponding to the forwarding algorithms.
Along the above description, assume that SRv Locator corresponding to Flex-algo 128 on network device 124 is 2001:: 64 and SRv Locator corresponding to Flex-algo 129 is 3001::/64. The notification message may include 6 SIDs, namely, SRv End SIDs 2001 for Flex-algo 128, SRv End SIDs 3001 for Flex-algo 129, 12 for Flex-algo 12, SRv End SIDs 2001 for Path "network device 124-" device 112 "and Flex-algo 128, SRv6 End SIDs 3001 for Path" network device 124- "device 112" and Flex-algo 129, SRv6 End SIDs 2001 for Flex- algo 128, 102 for Path "network device 124-" device 113 "and SRv6 End SIDs 3001 for Flex-algo 129, and 102 for Path" network device 124- "device 113". Obviously, the 6 SIDs can be divided into two parts, wherein the value of SRv Locator part in one part of SIDs is 2001:64, and the value of SRv Locator part in the other part of SIDs is 3001:643 SIDs.
Through the route calculation, the network device 121 may obtain a correspondence between the identities of the network segment 2001:64 and the network interface A1, and a correspondence between the identities of the network segment 3001:64 and the network interface A2, and generate a forwarding table entry based on the correspondence.
Assuming that the destination device of data packet Y and data packet Z is network device 124 and that the forwarding path of data packet Y is determined based on Flex-algo 128, and that the forwarding path of data packet Z is determined based on Flex-algo 129, then the SID in data packet Y as the destination address belongs to network segment 2001::/64 and the SID in data packet Z as the destination address belongs to network segment 3001::/64.
After receiving the data packet Y, the network device 121 may determine, according to the forwarding table entry, that the target interface of the data packet Y is the network interface A1, so as to forward the data packet Y through the network interface A1. After receiving the data packet Z, the network device 121 may determine, according to the forwarding table entry, that the target interface of the data packet Z is the network interface A2, so as to forward the data packet Z through the network interface A2.
In this way, since the addressing of the data packet is performed according to the SRv Locator portion in the SID, different SRv locators are set for the network device 124 according to different forwarding algorithms, which is equivalent to establishing different logical topologies under the same set of physical topologies, and the Flex-Algo effect is achieved under the SRv scene.
However, as the number of Flexible Algorithm supported by the network device increases, the number of SRv locators and the number of SIDs corresponding to the network device may increase substantially. In the above example, the network device supports 2 kinds Flexible Algorithm and has 3 functions. Accordingly, the network device has 2 types SRv and 6 locators, the notification message includes 2*3 =6 SIDs, if the network device supports 4 types Flexible Algorithm and has 5 functions, the network device has 5 types SRv and 6 locators, and the generated notification message may include 4*5 =20 SIDs at most. Each SID may include a SRv Locator and a Function, among others.
That is, if the network device supports i kinds Flexible Algorithm and j functions (i, j are positive integers), the network device corresponds to i kinds SRv of 6 locators, and i kinds SRv of 6 locators and a maximum of i×j SIDs need to be notified to other network devices. This now increases the amount of information carried in the announcement messages, increasing the network load.
As can be seen from the above description, in the conventional Flex-algo technology based on SRv, since the same device corresponds to different SRv locators at different Flexible Algorithm, the number of SRv6 locators required to be announced to other devices by the network device increases, which increases the flooding pressure of the network device and increases the load of the whole network.
On the other hand, if the number of network devices in the network system is large and each network device supports multiple forwarding algorithms, the number of SRv locators to be allocated to the network devices is also increased, which increases the difficulty in planning SRv6 locators.
In order to solve the problem that the number of SRv locators is excessive, which leads to the increase of flooding pressure, the embodiment of the application provides a method for sending a message and a method for generating a segment identifier, which aims to decouple SRv6 locators from Flexible Algorithm, and is used for reducing the number of information carried in a flooded notification message and relieving the load of a network.
The method for sending the message and the method for generating the segment identifier provided by the embodiment of the application can be applied to the system shown in fig. 1-a. Specifically, the method for sending the message and the method for generating the segment identifier may be performed by any one or more of the network devices 121, 122, 123, 124, 125, and 126 in the embodiment shown in fig. 1-a.
In the embodiment of the present application, the device 111, the device 112, and the device 113 may be network devices or terminal devices. If any of devices 111, 112, and 113 is a network device, then that device may be a Customer Edge (CE). The Terminal device may be referred to as a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), or a Terminal. A terminal device is a device that provides voice and/or data connectivity to a user, or a chip disposed within the device. For example, the terminal device may be a handheld device, an in-vehicle device, or the like having a wireless connection function. The terminal device may be a mobile phone, a desktop computer, a tablet computer, a notebook computer, a palm computer, a mobile internet device (Mobile Internet Device, MID), a wearable device, a Virtual Reality (VR) device, an augmented Reality (Augmented Reality, AR) device, a wireless or wired terminal in industrial control (Industrial Control), a wireless terminal in Self Driving (Self Driving), a wireless terminal in teleoperation (Remote Medical Surgery), a wireless terminal in Smart Grid (Smart Grid), a wireless terminal in transportation security (Transportation Safety), a wireless terminal in Smart City (Smart City), a wireless terminal in Smart Home (Smart Home), or a Home gateway device supporting 5G access (5 g→ Residential Gateway,5g→rg), etc.
The network device may be a device with forwarding functionality, such as: the forwarding device such as a Router (Router) or a Switch (Switch) may be a device having a forwarding function such as a server or a terminal device. Alternatively, the network device may be a Provider Edge (PE) device deployed at the network Edge, such as network device 121 or network device 124 in fig. 1-a; but may also be a Provider (P) device deployed inside the network, such as network device 122, network device 123, network device 125, or network device 126 in fig. 1-a.
It is to be understood that the method of sending the message may be performed by a forwarding plane of the network device, for example, may be performed by a forwarding chip of the network device. The method of segment identification generation may be performed by a control plane of the network device, e.g. by a processor of the network device, which may be a central processor (Central Processing Unit, CPU) of the network device. Alternatively, in some other possible implementations, the method of segment identification generation may also be performed by a separate control plane device. For example, in an application scenario such as a software defined network (Software Defined Network, SDN) network or a virtualized network function (Virtualized Network Function, VNF), the method of segment identification generation may also be performed by a server, which may perform the method performed by the network device control plane as a control plane device. In the embodiment of the present application, if the data processing method is performed by a separate control plane device, the control plane device may be referred to as a first device or a control device.
The following description is presented with reference to fig. 2, in which the technical scheme provided in the embodiment of the present application is implemented by a network device as an example. Referring to fig. 2, the diagram is a signaling interaction diagram of a method for sending a message and a method for generating a segment identifier according to an embodiment of the present application, including:
s201: the first device generates an announcement message.
The first device may be a network device in a network system, for example, any one or more of the network device 121, the network device 122, the network device 123, the network device 124, the network device 125, and the network device 126 in fig. 1-a. In the embodiment of the application, the first device may be a network device supporting SRv6, and at least two kinds of Flexible Algorithm may be disposed on the first device.
In the embodiment of the present application, the notification message includes SRv locators and M flexible algorithms Flexible Algorithm. Wherein M is a positive integer greater than or equal to 2. Which are described below, respectively.
First, SRv Locator will be described. Alternatively, SRv Locator may be simply referred to as Locator. As can be seen from the foregoing description, in the conventional SRv technology, SRv locators of a network device can be used to identify the network device, and different forwarding algorithms can correspond to different SRv6 locators. In the embodiment of the application, the SRv Locator of the first device is used to identify the first device under the plurality Flexible Algorithm. That is, even if the forwarding algorithms are different, SRv locators corresponding to the first devices may be the same.
In some possible implementations, the notification message generated by the first device further includes a length of the SRv Locator. In SRv technology, the SID has a length 128bit,SRv6 Locator at the head of the SID. Thus, alternatively, the SRv Locator of the first device may be half the SID, i.e., 64 bits in length. Alternatively, the SRv Locator of the first device may be 56 bits in length, considering that Flexible Algorithm is 8 bits in length.
M Flexible Algorithm are described below.
In the present embodiment, the identifier of Flexible Algorithm may be simply referred to as Flexible Algorithm. The M Flexible Algorithm are forwarding algorithms supported by the first device. Alternatively, flexible Algorithm may be referred to simply as Flex-Algo. That is, if the first device supports M Flexible Algorithm, the first device may advertise M Flexible Algorithm to other devices through an advertisement message so that the other devices know the supporting capability of the first device to Flexible Algorithm.
In some possible implementations, the aforementioned M Flexible Algorithm can be an identification of a forwarding algorithm in Flex-Algo technology. The Flex-Algo technology allows users to customize 128 Flexible Algorithm. Each Flexible Algorithm can be identified by an integer between 128-255. For example, a first defined Flexible Algorithm may be identified by the number 128 (hereinafter Flex-algo 128) and a second defined Flexible Algorithm may be identified by the number 129 (hereinafter Flex-algo 129). Thus, if the first device supports Flex-algo 128 and Flex-algo 129, M Flexible Algorithm in the advertisement message may include 128 and 129.
In some possible implementations, the advertisement message generated by the first device further includes a length of Flexible Algorithm. If M Flexible Algorithm are represented by numbers between 128-255, each Flexible Algorithm may be represented by an 8-bit binary number and the length of the advertisement message Flexible Algorithm may be 8 bits. Since each bit can correspond to a one-bit binary number, a string of length 8 bits can carry any one Flexible Algorithm.
It will be appreciated that the IP address may be represented by a 16-ary number. Then Flexible Algorithm may also be represented by a 16-ary number in some possible implementations. Then the identification of Flex-algo 128 may be denoted as 0x80 and the identification of Flex-algo 129 may be denoted as 0x81.
In some possible implementations, the advertisement message further includes indication information, where the indication information is used to indicate a location of the Flax-algo portion in the SID. The detailed description of the indication information may be referred to S203, and will not be repeated here.
As can be seen from the foregoing, the SID may also include a Function portion and an area portion. Accordingly, if the SID includes an area portion, the advertisement message may also include one or more Function portions, as well as one or more areas. The description of the Function will be referred to hereinafter, and will not be repeated here.
SRv6 locators and M Flexible Algorithm are described above and notification messages are described below.
In the embodiment of the application, the notification message is used for notifying the second device of the SID of the first device. The second device may be a network device in a network system or a controller. The type of the announcement message may also be different depending on the second device.
In a first implementation, the second device is a network device. The connection between the first device and the second device may be an IGP-based connection and the first device may announce information about the first device to the second device via IGP protocol-based messages, which may be IGP protocol-based messages, for example, the first message may be a link state protocol (Link State Protocol Data Unit, LSP) message or a link state advertisement (Link State Advertisement, LSA) message.
If the advertisement message is an LSP message, the communication protocol between the first device and the second device may be an intermediate system-to-intermediate system (Intermediate System to Intermediate System, ISIS) based communication protocol; if the advertisement message is an LSA message, the communication protocol between the first device and the second device may be an open shortest route first (Open Shortest Path First, OSPF) protocol.
In a second implementation, the second device is a controller. The connection between the first device and the second device may be a border gateway protocol (Border Gateway Protocol, BGP) based connection and the first device announces information about the first device to the second device via BGP protocol based messages, which are BGP protocol based messages. Alternatively, the first device and the second device may be connected based on a BGP Link State (BGP-LS) protocol, and the advertisement message may be a BGP update message.
The description of the body of the notification message is given above, and the description of the method for carrying SRv locators and M flexible algorithms Flexible Algorithm in the notification message is given below.
In a first implementation, the advertisement message is an LSA message or an LSP message. Then, the SRv Locator and the M Flexible Algorithm may be carried in a Type-length-value (TLV) field of SRv Locator of the advertisement message. Specifically, SRv6 Locator may be carried in the Value (Value) portion of the SRv6 Locator TLV field.
Optionally, the Value portion of the SRv Locator TLV field may also include a segment identification Algorithm subtype length Value (Segment Routing Algorithm sub-TLV, SR-Algorithm sub-TLV) field for carrying M Flexible Algorithm. Specifically, the M Flexible Algorithm are carried in the Value portion of the SR-Algorithm sub-TLV field.
The format of the SR-Algorithm sub-TLV field may be referred to a format given by standard request for comments (Request for Comments, RFC) 8665 or RFC 8667. Specifically, if the SR-Algorithm sub-TLV field is as described in RFC8665, the format of the SR-Algorithm sub-TLV field may be as shown in FIG. 3-A. If the SR-Algorithm sub-TLV field is as described in RFC8667, the format of the SR-Algorithm sub-TLV field may be as shown in FIG. 3-B.
As can be seen from the foregoing, SRv Locator may include a length of SRv6 Locator. For a method of carrying SRv Locator length in the notification message, refer to the following, and details are not repeated here.
In some possible implementations, the SRv Locator TLV field of the advertisement message further includes a first identifier for identifying the advertising manners of SRv locators and Flexible Algorithm in the embodiments of the present application. Thus, the device receiving the advertisement message may determine, according to Flexible Algorithm in the sub-TLV field, that multiple SIDs need to be generated according to the combination of SRv Locator and Flexible Algorithm in the SRv6 Locator TLV.
The SRv Locator TLV field includes an Algorithm portion. In the conventional SRv Flex-algo technology, the Algorithm portion of the SRv6 Locator TLV field is used to carry Flexible Algorithm corresponding to the Locator, due to the one-to-one relationship between locators and Flexible Algorithm. In this embodiment of the present application, the Algorithm portion of the SRv Locator TLV field may include the first identifier described above, and does not include Flexible Algorithm corresponding to the Locator.
As can be seen from the foregoing description, the notification message further includes a length of SRv Locator. The length of SRv6 Locator is carried in the SRv6 Locator TLV field, e.g., the length of SRv6 Locator may be carried in the loc.size portion of the SRv6 Locator TLV field. Alternatively, the length of SRv Locator may be carried in the same field as the length of Function. The manner in which the length of SRv Locator and the length of Function are carried in the same field can be seen hereinafter, and will not be described again.
In a second implementation, the advertisement message is a BGP update message, and then the advertisement message may include BGP LS NLRI and BGP LS Attributes information corresponding to BGP LS NLRI. Wherein, BGP LS NLRI includes SRv Locator of the first device. BGP LS Attributes information includes M Flexible Algorithm corresponding to SRv Locator of the first device.
For example, M Flexible Algorithm can be carried in the SR-Algorithm sub-TLV field of BGP LS Attributes information. In particular, BGP LS Attributes information corresponding to BGP LS NLRI may include one or more TLV fields of BGP LS TLV type. The one or more BGP LS TLV type TLV fields include a SRv6 Locator TLV field. The value portion of the SRv Locator TLV field may include an SR-Algorithm sub-TLV field. The SR-Algorithm sub-TLV includes M Flexible Algorithm corresponding to SRv Locator of the first device. For the description of the SR-Algorithm TLV field, reference is made to the above, and no further description is given here.
Alternatively, M Flexible Algorithm can also be carried in TLV fields of BGP LS Attributes information. Specifically, BGP LS Attributes information corresponding to BGP LS NLRI may include SRv6 Locator TLV field and SR-Algorithm TLV field juxtaposed to SRv6 Locator TLV field. The SR-Algorithm TLV field may be used to carry M Flexible Algorithm. It is understood that the TLV field used to carry M Flexible Algorithm may be other TLV fields as well.
In some possible implementations, the BGP LS NLRI of the advertisement message includes BGP Prefix NLRI, and BGP LS Attributes information corresponding to BGP Prefix NLRI includes BGP LS Prefix Attributes information. The BGP Prefix NLRI may include SRv Locator of the first device, and BGP LS Prefix Attributes information may include SRv6 Locator TLV as described above. For example, the SRv Locator of the first device may be carried in the IP reachability information (IP Reachability Information) TLV field of Prefix description (Prefix Description) information of BGP Prefix NLRI.
As can be seen from the foregoing description, the notification message further includes a length of SRv Locator. SRv6 Locator length is carried along with SRv6 Locator. For example, assuming SRv Locator is carried in BGP LS NLRI of the advertisement message, the length of SRv Locator may also be carried in BGP LS NLRI. Alternatively, the length of SRv Locator may be carried in the same field as the length of Function. The manner in which the length of SRv Locator and the length of Function are carried in the same field can be seen hereinafter, and will not be described again.
The manner in which the notification message carries SRv Locator and the M Flexible Algorithm is described above. Optionally, the notification message may further include K functions. The following describes a method for carrying K functions in an announcement message.
In the embodiment of the present application, the Function refers to a string corresponding to the forwarding behavior in the SID, which may also be referred to as a Function identifier. The K functions may be carried in K sub-TLV fields, respectively, each sub-TLV word including one of the K functions. That is, the advertisement message may include K sub-TLV fields, where each sub-TlV field includes a Function, and corresponds to a forwarding behavior.
For example. Assuming that the K functions include a Function corresponding to SRv6End SID, a Function corresponding to SRv6 end.x SID, and a Function corresponding to SRv6 local area network endpoint three layer cross connect segment identification (SRv LAN end.x SID), the advertisement message may include a SRv6End SID sub-TLV field, a SRv6 end.x SID sub-TLV field, and a SRv LAN end.x SID sub-TLV field. Wherein the SRv6End SID sub-TLV field includes a Function corresponding to SRv6End SID, the SRv end.x SID sub-TLV field includes a Function corresponding to SRv end.x SID, and the SRv LAN end.x SID sub-TLV field includes a Function corresponding to SRv LAN end.x SID.
Specifically, the SRv6 End SID sub-TLV field may be as shown in FIG. 4-A, the SRv6 End. X SID sub-TLV field may be as shown in FIG. 4-B, and the SRv6 LAN End. X SID sub-TLV field may be as shown in FIG. 4-C. Wherein the Endpoint Behavior portion of the sub-TLV field may be used to indicate the type of function that carries the SID carried by the sub-TLV field. For example, the Endpoint Behavior portion of the SRv End SID sub-TLV field may be used to indicate that this field is used to carry SRv the Function to which the End SID corresponds.
Alternatively, the SRv end.X SID sub-TLV field and SRv LAN end.X SID sub-TLV field may be carried in TLV fields of BGP LS Link (Link) Attribute information of the advertisement message. Wherein, BGP LS Link Attribute information belongs to BGP LS Attribute information, BGP LS Link Attribute information corresponds to BGP Link NLRI.
In some possible implementations, such as the examples given in fig. 4-a, 4-B, and 4-C, the sub-TLV field for carrying Function also includes an Algorithm portion. In the conventional SRv technology, the Algorithm section is used to carry the corresponding Flexible Algorithm SID. In the embodiment of the application, the Algorithm part may be a value other than 128-255, which is used to identify the notification manners of SRv locators and Flexible Algorithm mentioned in the embodiment of the application. Thus, the device receiving the advertisement message may determine, according to Flexible Algorithm in the sub-TLV field, that multiple SIDs need to be generated according to the combination of SRv Locator and Flexible Algorithm in the SRv6 Locator TLV.
In the embodiment of the present application, the format of the SID may be set according to the combination of "SRv6 locator+ Flexible Algorithm +function". That is, the SID may include a SRv Locator portion, a Flexible Algorithm portion, and a Function portion. Alternatively, the first device may set the value of the Flex-algo portion of each SID of the plurality of SIDs to a preset value. For example, the first device may populate the Flex-algo portion of the SID with 0 s. Thus, when other devices generate the SID according to the notification message, flexible Algorithm carried in the notification message can be used to replace the preset string of the Flex-algo part in the SID, so as to obtain the SID of the first device.
For example. Assuming SRv Locator portion is located at the first 64 bits of the SID, flex-algo portion is located at the 65 th to 72 th bits of the SID and Function is located at the remainder of the SID. The first device may obtain K SIDs from the first device's SRv Locator and K functions. The 65 th bit to 72 th bit of each SID of the K SIDs has a value of 0. For example, assuming that SRv Locator of the first device is 1001:64 and the Function corresponding to SRv6 End SID is 12:12, the SID portion of the SRv End SID sub-TLV field of the advertisement message includes SID 1001:12.
Alternatively, if the first device supports i fragments (i being a positive integer), each sub-TLV field carrying a Function may include i SIDs. Each SID of the i SIDs corresponds to an area.
It can be appreciated that the SID in the sub-TLV of the notification message may be used to carry functions and SRv Locator, which has no practical meaning.
In the embodiment of the present application, the notification message further includes the length of the Function. The SRv Locator length may be carried in the same field as the Function length. The following describes a method for informing the length of the message carrying the Function.
In a first implementation, the advertisement message is sent based on IGP, and the length of the Function may be carried in a sub-TLV field that includes the Function. The Function-containing sub-TLV field may be any one or more of the SRv End SID sub-TLV field, SRv end.x SID sub-TLV field, SRv LAN end.x SID sub-TLV field, and the like.
Optionally, the value of the sub-TLV field including Function includes a fun.size portion for carrying the length of Function. Specifically, the format of the sub-TLV field including Function may be as shown in fig. 4-D. Wherein the Function portion of the sub-TLV field includes one Function of the K functions, and the function.size portion includes the length of the Function. The sub-TLV field also includes a loc.size portion and/or an arg.size portion. The loc.size portion includes the length of SRv Locator and the arg.size portion includes the length of the area.
In a second implementation, the advertisement message is sent based on BGP, and the length of the Function may be carried in the SRv6SID Structure TLV field.
As can be seen from the foregoing description, the advertisement message may include BGP LS NLRI and BGP LS Attribute information corresponding to the BGP LS NLRI. BGP LS Attribute information includes an SR-Algorithm TLV field for carrying M Flexible Algorithm. Optionally, BGP LS Attribute information further includes a SRv6SID Structure TLV field for carrying the length of the Function. Wherein the SRv, 6 and SID Structure TLV fields belong to BGP LS TLV type fields. Specifically, the format of the SRv6SID Structure TLV field may be as shown in FIG. 4-E or FIG. 4-F.
If the format of the SRv6SID Structure TLV field is as shown in fig. 4-E, the lb.length part in the SRv6SID Structure TLV field is used to carry the length of the Locator Block (LB) in the SRv6 Locator, and the ln.length part is used to carry the length of the Locator Node (LN) in the SRv6 Locator. The sum of the value of the length part and the value of the ln. Length part is SRv length of the Locator, the value of the fun. Length part is length of the Function, and the value of the arg. Length part is length of the figure.
If the format of the SRv6 SID Structure TLV field is as shown in fig. 4-F, the value of the loc.length part in the SRv6 SID Structure sTLV field is SRv length of the Locator, the value of the fun.length part is length of the Function, and the value of the arg.length part is length of the figure.
Optionally, the notification message may also include the length of Flexible Algorithm. For example, the advertisement message may carry the length of Flexible Algorithm with M Flexible Algorithm, or the length of Flexible Algorithm and the length of SRv6 Locator in the same TLV field.
The above describes the method of carrying SRv Locator, flexible Algorithm and Function on the announcement message. Further description is provided below in connection with fig. 1-a.
Assume that SRv Locator of network device 124 is 1001:64, that network device 124 supports Flex-algo 128 and Flax-algo129, and that network device 124 has both SRv6 End SID and SRv end.X SID types of SIDs. The Flex-algo 128 is identified as 0x80, the Flex-algo 129 is identified as 0x81,SRv6 End SID, the corresponding Function is 12, the corresponding Function of SRv END.X SID of path "network device 124-" device 112 "is 101, and the corresponding Function of SRv END.X SID of path" network device 124- "device 113" is 102.
To advertise the SID of network device 124 to network device 121, network device 124 generates an advertisement message and sends it to network device 121 based on the IGP. The notification message includes a SRv Locator TLV field. The Value portion of the SRv Locator TLV field includes the network segment 1001 corresponding to SRv Locator of the network device 124, the SR-Algorithm sub-TLV field, and the SRv End SID sub-TLV field. Wherein the Value portion of the SR-Algorithm sub-TLV field includes the identification 0x80 of Flex-algo 128 and the identification 0x81 of Flex-algo 129. SRv6 End SID sub-TLV field includes the Function corresponding to SRv6 End SID (i.e.: 12), for example, the SID portion of SRv6 End SID sub-TLV field may include SID 1001::12.
In addition, the advertisement message also includes a multi-topology intermediate system (Multi Topology Intermediate System, MT IS) TLV field for carrying SRv end.x SID sub-TLV. SRv6 end.X SID sub-TLVs include functions corresponding to SRv end.X SIDs for the path "network device 124- & gt device 112" (i.e.: 101) and functions corresponding to SRv end.X SIDs for the path "network device 124- & gt device 113" (i.e.: 102). Optionally, the SID portion of SRv End.X SID sub-TLV includes 2 SIDs, SIDs 1001:101 and SIDs 1001:102, respectively. Alternatively, the process of network device 124 sending an advertisement message may be as shown in fig. 1-B.
In the embodiment of the application, the first device may generate an announcement message when accessing the network, so as to announce one or more SIDs corresponding to the first device to other network devices in the network system. Alternatively, the first device may generate the announcement message when any one or more of SRv Locator, flexible Algorithm and Function changes. That is, if the first device determines that the first device has added a new SID, the first device may generate an advertisement message to advertise the newly added SID to other devices (e.g., the second device).
The description is given along with the examples given above. Assuming that network device 124 detects that network device 124 is changing support from unsupported to supported for Flex-algo130, network device 124 may generate an advertisement message. The advertisement message includes SRv Locator 1001 of network device 124:64, identification 0x80 of Flex-algo 128, identification 0x81 of Flex-algo 129, and identification 0x82 of Flex-algo 130.
S202: the first device sends an announcement message to the second device.
After generating the notification message, the first device sends the notification message to the second device. Alternatively, the second device may be a network device or a control device. As can be seen from the foregoing description, if the second device is a network device, the first device may send an advertisement message to the second device based on IGP; if the second device is a control device, the first device may send an advertisement message to the second device based on BGP.
S203: the second device generates one or more SIDs from the advertisement message.
After receiving the advertisement message, the second device generates one or more SIDs from the advertisement message. Specifically, if both K and M are equal to 1, the second device generates a SID according to the notification message. If K or M is greater than 1, the second device may generate multiple SIDs according to the advertisement message. Specifically, if the advertisement message includes SRv Locator, M Flexible Algorithm, and K functions, the second device may generate N SIDs according to the advertisement message. Wherein N is a positive integer and N is less than or equal to the product of M and K. That is, the second device combines M Flexible Algorithm and K functions included in the notification message two by two to obtain m×k SIDs at most, and the SRv locators of each SID have the same value.
In one possible implementation, the notification message includes SRv locators, M Flexible Algorithm, and K functions of the first device, where the functions are independent of SRv locators. The second device may splice SRv Locator, flexible Algorithm and Function according to the lengths of the various parts in the SID to obtain the SID.
As can be seen from the foregoing description, the advertisement message may further include indication information for indicating the location of Flex-algo in the SID. Accordingly, the second device may determine the SID based on the indication information. The indication information and the function of the indication information will be described in detail.
Optionally, the indication information includes a start position and an end position of the Flex-algo portion in the SID. For example, assuming that the position of the first binary number in the SID is referred to as the 1 st bit of the SID, the indication information may include 65 and 72. Indicating that Flex-algo is stored at the 65 th bit to 72 th bit of the SID, i.e., 65 th bit to 72 th bit of the SID. In this way, the second device may splice the Flexible Algorithm corresponding to the SID carried in the notification message, where the SRv Locator, the M Flexible Algorithm and the K functions of the first device are spliced to N SIDs.
Alternatively, the indication information includes the length of SRv Locator portion and Function portion in SID. Accordingly, the second device may be configured with a sequential relationship between SRv Locator portion, flex-algo portion, and Function portion in the SID. Thus, the second device may determine SRv Locator of the first device and K functions according to the indication information. Next, the second device may splice SRv locators, M Flexible Algorithm, and K functions of the first device into N SIDs according to the sequential relationship of the parts in the SIDs.
For example. Assuming that the SRv Locator portion is located at the forefront of the SID, the Flex-algo portion is located after the SRv6 Locator portion and adjacent to the SRv6 Locator portion, the Function portion is located at the last of the SID, and the SRv6 Locator portion is 64 bits long. Then in the process of generating the SID, the second device may determine the values from the 1 st bit to the first 64 bits of the SID according to the SRv Locator of the first device in the notification message, determine the values from the 65 th bit to the 72 th bit of the SID according to Flexible Algorithm in the notification message, and determine the values from the 73 rd bit to the 128 th bit of the SID according to the Function in the notification message.
In a second possible implementation, the sub-TLV field used to carry the Function in the advertisement packet includes one or more SIDs, where each SID includes a SRv Locator of the first device and the Function corresponding to the sub-TLV field. Then the first device may replace the Flex-algo portion of the SID in the sub-TLV field with Flexible Algorithm carried in the advertisement message to obtain a SID comprising Flexible Algorithm when generating the SID.
For example, assume that the first device supports Flex-algo 128 and Flex-algo 129, and that the advertisement message includes a SRv6End SID sub-TLV field and a SRv6End. X SID sub-TLV field, where the SRv6End SID sub-TLV field and the SRv6End. X SID sub-TLV field include 1 SID, respectively. Then the first device may replace the Flex-algo portion of the SID in the sub-TLV field of the Flex-algo 128 for SRv END SID, to obtain the SRv END SID corresponding to the Flex-algo 128; replacing the Flex-algo part of the SID in the SRv END SID sub-TLV field by Flex-algo 129 to obtain SRv END SID corresponding to Flex-algo 129; replacing the Flex-algo part of the SID in the SRv END.X SID sub-TLV field by Flex-algo 128 to obtain SRv END.X SID corresponding to Flex-algo 128; and replacing the Flex-algo part of the SID in the SRv END SID.X sub-TLV field by the Flex-algo 129 to obtain SRv END.X SID corresponding to the Flex-algo 129.
As can be seen from the foregoing description, if the first device determines that the first device has added a new SID, the first device may generate a new advertisement message and send the new advertisement message to the second device. After receiving the new advertisement message, the second device may obtain a new SID from the new advertisement message. For example, the first device may replace the updated portion with the original SID to obtain the new SID. For example, assuming that the second device has increased support for the new Flexible Algorithm, the SR-Algorithm sub-TLV field may include the new Flexible Algorithm in a new advertisement message sent by the first device to the second device. After receiving the new notification message, the second device may obtain the original SID of the first device, and replace Flexible Algorithm part of the original SID with a new Flexible Algorithm included in the SR-Algorithm sub-TLV field, to obtain a new SID.
The method by which the second device determines the SID of the first device is described below in connection with fig. 1-a.
Assuming that the first device is network device 124 and the second device is network device 121, SRv Locator of network device 124 is 1001:64, network device 124 supports both Flex-algo 128 and Flax-algo129 forwarding algorithms, and network device 124 has both SRv6 End SID and SRv end.X SID types. The Function corresponding to SRv End SID is 12:101 in SRv END.X SID corresponding to path "network device 124- & gt device 112", and the Function in SRv END.X SID corresponding to path "network device 124- & gt device 113" is 102. That is, function 101 corresponds to network interface B1 on network device 124 and Function 102 corresponds to network interface B2 on network device 124. Alternatively, the Function may be carried in the SID of the announcement message.
If the SID structure is "locator+Flex-algo+function", after receiving the notification message sent by the network device 124, the network device 121 may obtain two SRv End SIDs corresponding to the network device 124, which are respectively SRv End SIDs 1001:80:0:0:12 corresponding to Flex-algo 128 and SRv End SIDs 1001:81:0:0:12 corresponding to Flex-algo 129. Similarly, network device 121 may also obtain 4 SRv end.X SIDs corresponding to network device 124, namely path "network device 124- & gt device 112" and SRv end.X SIDs 1001 corresponding to Flex-algo 128: 80:0:0:101, path "network device 124- & gt device 113" and SRv end.X SIDs 1001 corresponding to Flex-algo 128:: 80:0:102, path "network device 124- & gt device 112" and SRv end.X SIDs 1001 corresponding to Flex-algo 129: 81:0:0:101, and path "network device 124- & gt device 113" and SRv end.X SIDs 1001::81:0:0:102 corresponding to Flex-algo 129, respectively.
In the above example, if the advertisement message includes 1 SRv Locator, 2 Locator, flexible Algorithm and 3 Function. From this information, the network device 124 can obtain 2*3 =6 SIDs of the network device 124. It is readily appreciated that if the network device 124 supports 4 Flexible Algorithm and has 5 functions, the advertisement message sent by the network device 124 may include 1 SRv Locator, 4 Flexible Algorithm and 5 functions, for 9 total to compose the SID. The network device 121 can obtain a maximum of 4*5 =20 SIDs according to the advertisement message.
As can be seen from the above example, if the first device supports M Flexible Algorithm and has K functions, the advertisement message sent by the first device may include 1+m+k pieces of information related to the constituent SIDs. From this information, the second device can obtain m×k SIDs. In this way, the second device generates multiple SIDs through 1 piece SRv Locator and multiple pieces Flexible Algorithm corresponding to SRv Locator in the notification message, and no SRv Locator with equal number is needed to be included in the notification message in Flexible Algorithm. The number of SRv locators contained in the notification message is reduced, the number of information carried by the notification message is reduced, and the network load is reduced.
As can be seen from the foregoing description, in the conventional SRv Flex-algo technology, the same network device corresponds to different SRv locators under different forwarding algorithms. Thus, if the data messages of the two items of equipment are forwarded based on different forwarding algorithms, different destination addresses (i.e. SRv Locator) can be set for the two data messages. In this way, the network device can calculate the transmission paths of the two data messages respectively based on different forwarding algorithms due to the fact that SRv and Locator used for addressing are different.
However, in the embodiment of the present application, in order to alleviate the flooding pressure, the same network device corresponds to the same SRv Locator under different forwarding algorithms. Then to support the Flex-algo technique, the addressing of the data packets may be implemented based on a routing prefix that includes SRv Locator and Flexible Algorithm. Accordingly, in the route issuing phase, the second device may issue a route prefix including SRv Locator and Flexible Algorithm as the network segment route of the first device. The following describes the route issuing and data message forwarding process in the technical scheme provided by the embodiment of the application with reference to the attached drawings.
Referring to fig. 5, this is another signaling interaction diagram of a method for sending a message and a method for generating a segment identifier according to an embodiment of the present application, where the signaling interaction diagram includes:
s501: and the second equipment generates a forwarding table item according to the notification message.
In the embodiment of the present application, the same network device corresponds to the same SRv6 Locator under different forwarding algorithms. The SID corresponding to which Flexible Algorithm is used for forwarding the message cannot be determined only according to the SRv Locator of the first device. The second device may generate corresponding forwarding entries from the SID comprising Flexible Algorithm, each forwarding entry comprising a routing prefix.
The advertisement message includes SRv Locator of the first device and M Flexible Algorithm supported by the first device. The description of the notification message may be referred to above, and will not be repeated here.
The routing prefix of the first device may include SRv Locator of the first device and any Flexible Algorithm supported by the first device. When the advertisement message includes M Flexible Algorithm supported by the first device, the second device may generate at most M routing prefixes. Accordingly, the second device may combine SRv Locator of the first device with each Flexible Algorithm of M Flexible Algorithm, resulting in a maximum of M routing prefixes.
After determining the routing prefix corresponding to the first device, the second device may perform routing computation, a network interface corresponding to the routing prefix, and a next-hop network device. Then, the second device may record the routing prefix, the target interface corresponding to the routing prefix, and the next-hop network device corresponding to the routing prefix, and obtain the forwarding table entry. Specifically, the second device may perform route calculation according to M Flexible Algorithm carried by the advertisement packet, and determine a target interface and a next-hop network device corresponding to the route prefix.
It may be appreciated that the advertisement packet includes M Flexible Algorithm, and the second device may obtain M routing prefixes according to the advertisement packet and generate M forwarding entries. Each forwarding entry includes a routing prefix, corresponding to one Flexible Algorithm.
Still illustrated in fig. 1-a. Assuming that the first device is network device 124 and the second device is network device 121, network device 124 supports both Flex-algo 128 and Flax-algo 129 forwarding algorithms. Wherein SRv Locator of network device 124 is 1001:64, flex-algo 128 is identified as 0x80, flex-algo 129 is identified as 0x81. As will be appreciated from the foregoing description, the advertisement messages sent by network device 124 to network device 121 may include 1001:64, 0x80, and 0x81.
After receiving the advertisement message sent by the network device 124, the network device 121 may obtain a routing prefix 1001 according to the identifiers of the SRv Locator and the Flex-algo 128 of the network device 121, and obtain a routing prefix 1001 according to the identifiers of the SRv Locator and the Flex-algo 129 of the network device 121, wherein the routing prefix 1001 is:: 80:0:0:0.
Assuming that the forwarding path corresponding to Flex-algo 128 is "network device 121→network device 122→network device 123→network device 124→device 112", and the forwarding path corresponding to Flex-algo 129 is "network device 121→network device 125→network device 126→network device 124→device 113". Then, through the routing calculation, the network device 121 may determine that the network interface corresponding to the routing prefix 1001:80:0:0 is the network interface A1, the network device corresponding to the next hop is the network device 122, and determine that the network interface corresponding to the routing prefix 1001:81:0:0:0 is the network interface A2, and the network device corresponding to the next hop is the network device 125. As such, network device 121 may generate two forwarding entries as shown in table 1.
TABLE 1
Routing prefix Target interface Next hop network device
1001::80:0:0:0 A1 Network device 122
1001::81:0:0:0 A2 Network device 125
Wherein A1 is the identifier of the network interface A1, and A2 is the identifier of the network interface A2. The first row of Table 1 embodies the correspondence between the routing prefix 1001:80:0:0, the network interface A1, and the network device 122 as the next-hop network device, and the second row of Table 1 embodies the correspondence between the routing prefix 1001:80:0:0:0, the network interface A2, and the network device 125 as the next-hop network device.
It will be appreciated that the first act of table 1 is one forwarding entry and the second act of table 1 is another forwarding entry.
In some possible implementations, flexible Algorithm may also be included in the forwarding table entry. For example, two forwarding entries generated by the network device 121 as a PE device may also be as shown in table 2.
TABLE 2
Routing prefix Flexible Algorithm Target interface Next hop network device
1001::80:0:0:0 Flex-algo 128 A1 Network device 122
1001::81:0:0:0 Flex-algo 129 A2 Network device 125
Wherein the first row of table 2 represents the correspondence between routing prefix 1001::80:0:0, flex-algo 128, network interface A1 and network device 122 as the next-hop network device, and the second row of table 2 represents the correspondence between routing prefix 1001::: 80:0:0, flex-algo 129, network interface A2 and network device 125 as the next-hop network device.
After generating the forwarding table entry, the second device may send the forwarding table entry to the device or module responsible for sending the data packet, so as to ensure normal forwarding of the data packet. For example, the second device is a network device, and the steps described above may be performed by the second device control plane. After obtaining the forwarding table entry, the control plane of the second device may send the forwarding table entry to the forwarding plane of the second device, so that the forwarding plane of the second device forwards the packet according to the forwarding table entry. If the second device is a control device, the second device may send a forwarding table entry to the network device or forwarding plane device for forwarding the message. In some possible implementations, the above-described process may be referred to as route issuing.
For convenience of explanation, the second device is taken as an example of the network device. It will be appreciated that if the second device is a control device, S502-S504 described below may be performed by a third device, which is a network device that receives the forwarding table entry issued by the second device.
S502: the second device obtains the data message.
In the embodiment of the present application, the data packet is a packet based on SRv6, and then the destination address of the data packet is indicated by SID. The SID includes a SRv Locator portion and a Flex-algo portion. The SID included in the destination address field of the data packet includes SRv Locator of the destination device and corresponding Flexible Algorithm. That is, for a data packet forwarded to a target device through a certain Flex-algo, the SID as its destination address may include SRv Locator of the target device and the corresponding Flex-algo. It will be appreciated that the destination address of a data message forwarded through a different Flexible Algorithm is partially different from Flex-algo.
The data message will be described by taking fig. 1 as an example. Assuming that the forwarding path corresponding to Flex-algo 128 is "network device 121→network device 122→network device 123→network device 124→device 112", the forwarding path corresponding to Flex-algo 129 is "network device 121→network device 125→network device 126→network device 124→device 113"
Assuming that device 111 sends data message a to device 112 via Flex-algo 128, the SID in data message a as the destination address may be the SRv end.x SID of the path "network device 124→device 112". The SRv Locator portion of the SRv END.X SID includes SRv6 Locator 1001 of network device 124/64 and the Flex-algo portion includes the identification 0x80 of Flex-algo 128. That is, the SID in data message A as the destination address belongs to segment 1001:80/72.
Assuming that device 111 sends data message B to device 113 via Flex-algo 129, the SID in data message B as the destination address may be the SRv end.x SID of the path "network device 124→device 113". The SRv Locator portion of the SRv END.X SID includes SRv6 Locator 1001 of network device 124/64 and the Flex-algo portion includes the identification 0x81 of Flex-algo 129. That is, the SID in data message B as the destination address includes segment 1001:81/72.
Specifically, if the SID of the data message A and the data message B as the destination address is the SRv6END.X SID of the network device 126, and the Function corresponding to the SRv END.X SID of the path "network device 124- > device 112" is:: 101, the Function corresponding to the SRv END.X SID of the path "network device 124- > device 113" is:: 102. Then the SID in data message A as the destination address is 1001:80:0:0:101 and the SID in data message B as the destination address is 1001:81:0:0:102.
In some possible implementations, in the process of forwarding the data packet, the second device parses Flexible Algorithm corresponding to the data packet from the SID included in the data packet. And further determining a target interface and a next hop network device of the data message according to the forwarding table entry corresponding to Flexible Algorithm. For example, based on SRv END SID of data message a described above, the second device determines that data message a corresponds to Flex-algo 128. According to SRv END SID of the data message B, the second device determines that the data message B corresponds to Flex-algo 129.
It is understood that the second device may also determine Flexible Algorithm corresponding to the data packet according to other information. And further determining a target interface and a next hop network device of the data message according to the forwarding table entry corresponding to Flexible Algorithm. For example, the second device may determine, according to the virtual private network (Virtual Private Network, VPN) identifier carried in the data packet, a forwarding table entry corresponding to the data packet.
S502: and the second equipment determines the target interface according to the forwarding table entry.
After the data packet is acquired, the second device may determine a target interface corresponding to the data packet according to the forwarding table entry generated in S501. Specifically, the second device may search, according to the destination address of the data packet, a routing prefix that matches the destination address from the forwarding table entry, and use a network interface corresponding to the routing prefix as a target interface of the data packet, so as to send the data packet to the next hop network device through the target interface.
Assuming that the forwarding table entries are shown in table 1, the description of the foregoing example continues.
After receiving data packet A, network device 121 looks up the routing prefix from Table 1 that matches SID 1001:80:0:0:101. Because the routing prefix 1001:80:0:0:0 matches the SID 1001:80:0:0:101, the network device 121 may use the network interface corresponding to the routing prefix 1001:80:0:0 (i.e., network interface A1) as the destination interface for data message A and the next-hop network device corresponding to the routing prefix 1001:80:0:0:0 (i.e., network device 122) as the next-hop network device for data message A. Specifically, the transmission path of the data packet a may be as shown in fig. 1-C.
After receiving data packet B, network device 121 looks up the routing prefix from Table 1 that matches SID 1001:81:0:0:102. Because the routing prefix 1001:81:0:0 is matched with the SID 1001:81:0:0:102, the network device 121 may use the network interface corresponding to the routing prefix 1001:81:0:0 (i.e., the network interface A2) as the target interface of the data packet A and the next-hop network device corresponding to the routing prefix 1001:81:0:0:0 (i.e., the network device 125) as the next-hop network device of the data packet A. Specifically, the transmission path of the data packet B may be as shown in fig. 1-D.
S504: and the second equipment sends the data message through the target interface.
After determining the target interface and the next-hop network device corresponding to the data message, the second device may send the data message to the next-hop network device through the target interface.
In the embodiment of the present application, in order to alleviate the flooding pressure, the same network device corresponds to the same SRv Locator under different forwarding algorithms. On this basis, to implement Flex-algo technology, route delivery may be based on a route prefix that includes SRv6 locators and Flexible Algorithm. The addressing of the data message can also be performed according to SRv Locator and Flexible Algorithm carried by the data message. Thus, even though SRv6 locators are the same, different forwarding algorithms can still be distinguished by different Flexible Algorithm. Thus, the Flex-algo technology is implemented in the context of SRv and the flooding pressure of the network device is reduced.
Referring to fig. 6, the embodiment of the present application further provides a device 600 for sending a message, where the device 600 for sending a message may implement the function of the first device in the embodiment shown in fig. 2. The apparatus 600 for transmitting a message includes a processing unit 610 and a transmitting unit 620. The processing unit 610 is configured to implement S201 in the embodiment shown in fig. 2, and the sending unit 620 is configured to implement S202 in the embodiment shown in fig. 2.
Specifically, the processing unit 610 is configured to generate an advertisement message, where the advertisement message includes SRv locators and M Flexible Algorithm corresponding to the SRv locators, and M is a positive integer greater than or equal to 2.
And a sending unit 620, configured to send the notification message to a second device, where the notification message is used to trigger the second device to generate N SIDs, each SID in the N SIDs includes the SRv Locator, each SID in the N SIDs corresponds to one Flexible Algorithm of the M Flexible Algorithm, and N is a positive integer greater than or equal to 2.
Reference is made to the detailed description of the corresponding steps in the embodiments shown in fig. 2 or fig. 5, and details thereof are not repeated here.
Referring to fig. 7, the embodiment of the present application further provides a device 700 for generating a segment identifier, where the device 700 for generating a segment identifier may implement the function of the second device in the embodiment shown in fig. 2, or implement the function of the second device in fig. 5. The segment identification generation comprises a receiving unit 710 and a processing unit 720. The receiving unit 710 is configured to receive an announcement packet sent by the first device; the processing unit 720 is configured to implement S203 in the embodiment shown in fig. 2, or implement S501, S502, and S503 in the embodiment shown in fig. 5.
Specifically, the receiving unit 710 is configured to receive an advertisement packet sent by the first device, where the advertisement packet includes SRv locators and M Flexible Algorithm corresponding to the SRv6 locators, and M is a positive integer greater than or equal to 2.
And a processing unit 720, configured to generate N SIDs according to the advertisement message, where each SID in the N SIDs includes the SRv Locator, each SID in the N SIDs corresponds to one Flexible Algorithm of the M Flexible Algorithm, and N is a positive integer greater than or equal to 2. Reference is made to the detailed description of the corresponding steps in the embodiments shown in fig. 2 or fig. 5, and details thereof are not repeated here.
It should be noted that, in the embodiment of the present application, the division of the units is schematic, which is merely a logic function division, and other division manners may be implemented in actual practice. Each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. For example, in the above embodiment, the processing unit and the transmitting unit may be the same unit or different units. The integrated units may be implemented in hardware or in software functional units.
Fig. 8 is a schematic structural diagram of an apparatus 800 according to an embodiment of the present application. The above apparatus 600 for sending a message and the apparatus 700 for generating a segment identifier may be implemented by the apparatus shown in fig. 8. With reference to fig. 8, the device 800 comprises at least one processor 801, a communication bus 802 and at least one network interface 804, and optionally the device 800 may also comprise a memory 803.
The processor 801 may be a general purpose central processing unit (Central Processing Unit, CPU), application-specific integrated circuit (ASIC) or one or more integrated circuits (Integrated Circuit, IC) for controlling the execution of programs in accordance with aspects of the present Application. The processor may be configured to process the packet or the period parameter, so as to implement a method for sending the packet or a method for generating a segment identifier provided in an embodiment of the present application.
For example, when the first device of fig. 2 is implemented by the device shown in fig. 8, the processor may be configured to: generating an announcement message, wherein the announcement message comprises SRv locators and M Flexible Algorithm corresponding to the SRv locators, and M is a positive integer greater than or equal to 2; and sending the notification message to a second device, wherein the notification message is used for triggering the second device to generate N SIDs, each SID in the N SIDs comprises the SRv Locator, each SID in the N SIDs corresponds to one Flexible Algorithm of M Flexible Algorithm respectively, and N is a positive integer greater than or equal to 2.
For example, when the second device of fig. 2 or fig. 5 is implemented by the device shown in fig. 8, the processor may be configured to: receiving an announcement message sent by first equipment, wherein the announcement message comprises SRv6 locators and M flexible algorithms Flexible Algorithm corresponding to the SRv6 locators, and M is a positive integer greater than or equal to 2; generating N SIDs according to the notification message, where each SID in the N SIDs includes the SRv Locator, each SID in the N SIDs corresponds to one Flexible Algorithm of the M Flexible Algorithm, and N is a positive integer greater than or equal to 2.
Communication bus 802 is used to transfer information between processor 801, network interface 804, and memory 803.
The Memory 803 may be, but is not limited to, a Read-only Memory (ROM) or other type of static storage device that can store static information and instructions, the Memory 803 may also be a random access Memory (Random Access Memory, RAM) or other type of dynamic storage device that can store information and instructions, or a Read-only optical disk (Compact Disc Read-only Memory, CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage media or other magnetic storage devices, 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. The memory 803 may be stand-alone and coupled to the processor 801 via a communication bus 802. Memory 803 may also be integrated with processor 801.
Optionally, the memory 803 is configured to store program codes or instructions for executing the technical solutions provided in the embodiments of the present application, and the processor 801 controls the execution. The processor 801 is configured to execute program code or instructions stored in the memory 803. One or more software modules may be included in the program code. Alternatively, the processor 801 may store program codes or instructions for performing the technical solutions provided in the embodiments of the present application, in which case the processor 801 does not need to read the program codes or instructions into the memory 803.
The network interface 804 may be a device, such as a transceiver, for communicating with other devices or communication networks, which may be ethernet, radio Access Network (RAN) or wireless local area network (Wireless Local Area Networks, WLAN), etc. In the embodiment of the present application, the network interface 504 may be configured to receive a packet sent by another node in the segment routing network, or may send a packet to another node in the segment routing network. The network interface 804 may be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, or the like.
In a particular implementation, device 800 may include multiple processors, such as processor 801 and processor 805 shown in FIG. 6, as one embodiment. Each of these processors may be a single-core (single-CPU) processor or may be a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
Fig. 9 is a schematic structural diagram of an apparatus 900 according to an embodiment of the present application. The respective devices in fig. 2 or 5 may be implemented by the devices shown in fig. 9. Referring to the schematic device structure shown in fig. 9, a device 900 includes a main control board and one or more interface boards. The main control board is in communication connection with the interface board. The main control board, also called a main processing unit (Main Processing Unit, MPU) or routing processing card (Route Processor Card), includes a CPU and a memory, and is responsible for controlling and managing the various components in the device 900, including routing computation, device management and maintenance functions. The interface board is also called a Line processing unit (Line Processing Unit, LPU) or Line Card (Line Card) for receiving and transmitting messages. In some embodiments, communication is via a bus between the master control board and the interface board or between the interface board and the interface board. In some embodiments, the interface boards communicate via a switch fabric, in which case the device 900 also includes a switch fabric communicatively coupled to the master board and the interface boards, the switch fabric being configured to forward data between the interface boards, which may also be referred to as a switch fabric unit (Switch Fabric Unit, SFU). The Interface board includes a CPU, memory, forwarding engine, and Interface Card (IC), where the Interface Card may include one or more network interfaces. The network interface may be an Ethernet interface, an FE interface, a GE interface, or the like. The CPU is in communication connection with the memory, the forwarding engine and the interface card respectively. The memory is used for storing a forwarding table. The forwarding engine is used for forwarding the received message based on a forwarding table stored in the memory, and if the destination address of the received message is the IP address of the equipment 900, the message is sent to the CPU of the main control board or the interface board for processing; if the destination address of the received message is not the IP address of the device 900, the forwarding table is looked up according to the destination, and if the next hop and the target interface corresponding to the destination address are found from the forwarding table, the message is forwarded to the target interface corresponding to the destination address. The forwarding engine may be a network processor (Network Processor, NP). The interface card is also called a sub-card, can be installed on the interface board, and is responsible for converting the photoelectric signal into a data frame, and forwarding the data frame to a forwarding engine for processing or an interface board CPU after performing validity check. In some embodiments, the CPU may also perform the functions of a forwarding engine, such as soft forwarding based on a general purpose CPU, so that no forwarding engine is needed in the interface board. In some embodiments, the forwarding engine may be implemented by an ASIC or field programmable gate array (Field Programmable Gate Array, FPGA). In some embodiments, the memory storing the forwarding table may also be integrated into the forwarding engine as part of the forwarding engine.
The embodiment of the application also provides a chip system, which comprises: and a processor coupled to the memory, the memory configured to store a program or an instruction that, when executed by the processor, cause the chip system to implement the method of sending a message by the first device in the embodiment shown in fig. 2 or fig. 5, or implement the method of generating a segment identifier by the second device in the embodiment shown in fig. 2 or fig. 5.
Alternatively, the processor in the system-on-chip may be one or more. The processor may be implemented in hardware or in software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general purpose processor, implemented by reading software code stored in a memory. Alternatively, the memory in the system-on-chip may be one or more. The memory may be integral with the processor or separate from the processor, and is not limited in this application. For example, the memory may be a non-transitory processor, such as a ROM, which may be integrated on the same chip as the processor, or may be separately provided on different chips, and the type of memory and the manner of providing the memory and the processor are not specifically limited in this application.
The System-on-Chip may be, for example, an FPGA, an ASIC, a System on Chip (SoC), a CPU, an NP, a digital signal processing circuit (Digital Signal Processor, DSP), a microcontroller (Micro Controller Unit, MCU), a programmable controller (Programmable Logic Device, PLD) or other integrated chips.
It should be understood that the steps in the above-described method embodiments may be accomplished by integrated logic circuitry in hardware in a processor or instructions in the form of software. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor or in a combination of hardware and software modules in a processor.
The present application also provides a computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of messaging provided by the method embodiment above and performed by a first device, or to perform the method of segment identification generation provided by the method embodiment above and performed by a second device.
The present application also provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of messaging provided by the method embodiment above and performed by a first device, or to perform the method of segment identification generation provided by the method embodiment above and performed by a second device.
The embodiment of the application also provides a system, which comprises a first device and a second device, wherein the first device is used for executing the method for sending the message, provided by the embodiment of the method, executed by the first device, and the second device is used for executing the method for generating the segment identification, provided by the embodiment of the method, executed by the second device.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, and the division of the units, for example, is merely a logic module division, and there may be additional divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be acquired according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each module unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units described above may be implemented either in hardware or in software module units.
The integrated units, if implemented in the form of software module units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above embodiments are further described in detail for the purpose, technical solution and advantageous effects of the present invention, and it should be understood that the above description is only an embodiment of the present invention.
The above embodiments are merely for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (37)

1. A method for sending a message, the method comprising:
the first device generates an advertisement message, wherein the advertisement message comprises M flexible algorithms Flexible Algorithm corresponding to a SRv Locator and a SRv Locator based on a segment routing protocol SRv6 positioning SRv of IPv6 version 6 of internet protocol, and M is a positive integer greater than or equal to 2;
the first device sends the notification message to the second device, where the notification message is used to trigger the second device to generate N segment identification SIDs, each SID in the N SIDs includes the SRv Locator, each SID in the N SIDs corresponds to one Flexible Algorithm of the M Flexible Algorithm, and N is a positive integer greater than or equal to 2.
2. The method of claim 1, wherein the advertisement message further comprises K functions, K is a positive integer greater than or equal to 2, each SID of the N SIDs comprises the SRv Locator, one Flexible Algorithm of the M Flexible Algorithm, and one Function of the K functions, and N is less than or equal to a product of the K and the M.
3. The method of claim 2, wherein the K functions are carried in any one or more of the following fields of the announcement message:
SRv6 End-point segment identification subtype length value SRv6 End SID sub-TLV field, SRv End-point three-layer cross-connect segment identification subtype length value SRv end.x SID sub-TLV field, and SRv local area network End-point three-layer cross-connect segment identification subtype length value SRv LAN end.x SID sub-TLV field.
4. The method of claim 1, wherein the advertisement message further comprises J SIDs, each of the J SIDs comprising the SRv Locator and one of the J functions, J being a positive integer greater than or equal to 2, each of the N SIDs comprising the SRv Locator, one of the M Flexible Algorithm Flexible Algorithm, and one of the J functions, the N being less than or equal to the product of the J and the M.
5. The method of claim 4, wherein the J SIDs are carried in any one or more of the following fields of the advertisement message:
SRv6 End SID sub-TLV field, SRv End. X SID sub-TLV field, and SRv LAN End. X SID sub-TLV field.
6. The method of any of claims 1-5, wherein a corresponding Flexible Algorithm for each SID of the N SIDs is contained in a Flex-algo portion of the corresponding SID.
7. The method of claim 6, wherein the advertisement message further comprises indication information, the indication information indicating a location of the Flex-algo portion in the SID.
8. The method of claim 6 or 7, wherein the Flex-algo portion is 8-bit in length.
9. The method according to any of claims 1-8, wherein the M Flexible Algorithm are carried in a segment identification Algorithm subtype length value, SR-Algorithm sub-TLV, field of the advertisement message.
10. The method according to any one of claims 1-9, wherein the advertisement message includes a SRv Locator type length value TLV field, and the SRv Locator and the M Flexible Algorithm are carried in a SRv6 Locator TLV field of the advertisement message.
11. The method of claim 10, wherein the SRv Locator TLV field further comprises a first identifier indicating that the advertisement message comprises the M Flexible Algorithm.
12. The method according to any one of claims 1-9, wherein the second device is a controller, the advertisement message includes border gateway protocol BGP connection state LS network layer reachability information NLRI and BGP LS attribute Attributes information, the BGP LS NLRI includes the SRv Locator, and the BGP LS Attributes information includes the M Flexible Algorithm.
13. The method of claim 12, wherein the BGP LS NLRI comprises BGP Prefix NLRI, the BGP Prefix NLRI comprises the SRv Locator, the BGP LS Attributes information comprises BGP-LS Prefix Attribute information, and the M Flexible Algorithm are carried in the BGP-LS Prefix Attribute information.
14. A method of segment identification, SID, generation, the method comprising:
the second device receives an advertisement message sent by the first device, wherein the advertisement message comprises M flexible algorithms Flexible Algorithm corresponding to a SRv Locator and a SRv Locator positioned based on a segment routing protocol SRv of IPv6 version 6 of an internet protocol, and M is a positive integer greater than or equal to 2;
the second device generates N SIDs according to the notification message, where each SID in the N SIDs includes the SRv Locator, each SID in the N SIDs corresponds to one Flexible Algorithm of the M Flexible Algorithm, and N is a positive integer greater than or equal to 2.
15. The method of claim 14, wherein the method further comprises:
the second device generates one or more forwarding entries according to the SRv6 Locator and the M Flexible Algorithm, where the one or more forwarding entries include a routing prefix including the SRv6 Locator and one Flexible Algorithm of the M Flexible Algorithm.
16. The method of claim 14 or 15, wherein the announcement message further includes K functions, K being a positive integer greater than or equal to 2, each SID of the N SIDs including the SRv Locator, one Flexible Algorithm of the M Flexible Algorithm, and one Function of the K functions, the N being less than or equal to a product of the K and the M.
17. The method of claim 16, wherein the K functions are carried in any one or more of the following fields of the announcement message:
SRv6 End-point segment identification subtype length value SRv6 End SID sub-TLV field, SRv End-point three-layer cross-connect segment identification subtype length value SRv end.x SID sub-TLV field, and SRv local area network End-point three-layer cross-connect segment identification subtype length value SRv LAN end.x SID sub-TLV field.
18. The method of claim 14 or 15, wherein the advertisement message further comprises J SIDs, each of the J SIDs comprising the SRv Locator and one of the J functions, J being a positive integer greater than or equal to 2, each of the N SIDs comprising the SRv Locator, one of the M Flexible Algorithm Flexible Algorithm, and one of the J functions, the N being less than or equal to the product of the J and the M.
19. The method of claim 18, wherein the second device generating N SIDs from the advertisement message comprises:
the second device adds Flexible Algorithm of the M Flexible Algorithm to each of the J SIDs included in the advertisement message, generating the N SIDs.
20. The method of claim 19, wherein each of the J SIDs comprises a Flexible Algorithm portion, wherein the second device adding one Flexible Algorithm of the M Flexible Algorithm to each of the J SIDs included in the advertisement message to generate the N SIDs comprises:
the second device adds one Flexible Algorithm of the M Flexible Algorithm in Flexible Algorithm part in each of the J SIDs included in the advertisement message to generate the N SIDs.
21. The method of claim 18 or 19, wherein the J SIDs are carried in any one or more of the following fields of the advertisement message:
SRv6 End SID sub-TLV field, SRv End. X SID sub-TLV field, and SRv LAN End. X SID sub-TLV field.
22. An apparatus for sending a message, wherein the apparatus is applied to a first device, the apparatus comprising:
The processing unit is configured to generate an advertisement packet, where the advertisement packet includes a segment routing protocol SRv6 positioning SRv6 Locator based on an internet protocol 6 th edition IPv6 and M flexible algorithms Flexible Algorithm corresponding to the SRv6 Locator, and M is a positive integer greater than or equal to 2;
a sending unit, configured to send the notification packet to a second device, where the notification packet is used to trigger the second device to generate N segment identification SIDs, each SID in the N SIDs includes the SRv Locator, each SID in the N SIDs corresponds to one Flexible Algorithm of the M Flexible Algorithm, and N is a positive integer greater than or equal to 2.
23. The apparatus of claim 22, wherein the advertisement message further comprises K functions, K is a positive integer greater than or equal to 2, each SID of the N SIDs comprises the SRv Locator, one Flexible Algorithm of the M Flexible Algorithm, and one Function of the K functions, and N is less than or equal to a product of the K and the M.
24. The apparatus of claim 22, wherein the advertisement message further comprises J SIDs, each of the J SIDs comprising the SRv Locator and one of the J functions, J being a positive integer greater than or equal to 2, each of the N SIDs comprising the SRv Locator, one of the M Flexible Algorithm Flexible Algorithm, and one of the J functions, the N being less than or equal to the product of the J and the M.
25. The apparatus of any of claims 22-24, wherein a corresponding Flexible Algorithm for each SID of the N SIDs is included in a Flex-algo portion of the corresponding SID.
26. The apparatus of claim 25, wherein the advertisement message further comprises indication information, the indication information being used to indicate a location of the Flex-algo portion in the SID.
27. The apparatus of claim 25 or 26, wherein the Flex-algo portion is 8 bits in length.
28. The apparatus according to any of claims 22-27, wherein the M Flexible Algorithm are carried in a segment identification Algorithm subtype length value, SR-Algorithm sub-TLV, field of the advertisement message.
29. An apparatus for segment identification, SID, generation, the apparatus being applied to a second device, the apparatus comprising:
a receiving unit, configured to receive an advertisement packet sent by a first device, where the advertisement packet includes a positioning SRv6 Locator based on a segment routing protocol SRv of IPv6 version 6 of an internet protocol and M flexible algorithms Flexible Algorithm corresponding to the SRv6 Locator, where M is a positive integer greater than or equal to 2;
And the processing unit is used for generating N SIDs according to the notification message, each SID in the N SIDs comprises the SRv Locator, each SID in the N SIDs corresponds to one Flexible Algorithm in the M Flexible Algorithm respectively, and N is a positive integer greater than or equal to 2.
30. The apparatus of claim 29, wherein the device comprises a plurality of sensors,
the processing unit is further configured to generate one or more forwarding table entries according to the SRv Locator and the M Flexible Algorithm, where the one or more forwarding table entries include a routing prefix, and the routing prefix includes one Flexible Algorithm of the SRv Locator and the M Flexible Algorithm.
31. The apparatus of claim 29 or 30, wherein the announcement message further includes K functions, K being a positive integer greater than or equal to 2, each SID of the N SIDs including the SRv Locator, one Flexible Algorithm of the M Flexible Algorithm, and one Function of the K functions, the N being less than or equal to a product of the K and the M.
32. The apparatus of claim 29 or 30, wherein the advertisement message further comprises J SIDs, each of the J SIDs comprising the SRv Locator and one of the J functions, J being a positive integer greater than or equal to 2, each of the N SIDs comprising the SRv Locator, one of the M Flexible Algorithm Flexible Algorithm, and one of the J functions, the N being less than or equal to the product of the J and the M.
33. The apparatus of claim 32, wherein the K functions comprise a first Function, the advertisement message comprises a first SID, the M Flexible Algorithm comprises a first Flexible Algorithm, and a Function portion of the first SID comprises the first Function;
the processing unit is configured to add Flexible Algorithm of the M Flexible Algorithm to each SID of the J SIDs included in the advertisement packet, and generate the N SIDs.
34. The apparatus of claim 33, wherein each SID of the J SIDs comprises a Flexible Algorithm portion,
the processing unit is configured to generate the N SIDs by adding one Flexible Algorithm of the M Flexible Algorithm to Flexible Algorithm parts of each SID of the J SIDs included in the advertisement packet.
35. The apparatus of any of claims 29-34, wherein a corresponding Flexible Algorithm for each SID of the N SIDs is contained in a Flex-algo portion of the corresponding SID.
36. The apparatus of claim 35, wherein the advertisement message further comprises indication information indicating a Flex-algo portion of the SID.
37. The apparatus of claim 35, wherein the Flex-algo portion is 8 bits in length.
CN202111679438.3A 2021-12-31 2021-12-31 Message sending method, segment identification generation method and device Pending CN116418728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111679438.3A CN116418728A (en) 2021-12-31 2021-12-31 Message sending method, segment identification generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111679438.3A CN116418728A (en) 2021-12-31 2021-12-31 Message sending method, segment identification generation method and device

Publications (1)

Publication Number Publication Date
CN116418728A true CN116418728A (en) 2023-07-11

Family

ID=87048488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111679438.3A Pending CN116418728A (en) 2021-12-31 2021-12-31 Message sending method, segment identification generation method and device

Country Status (1)

Country Link
CN (1) CN116418728A (en)

Similar Documents

Publication Publication Date Title
WO2021063232A1 (en) Method, apparatus and system for establishing bier forwarding table entry
CN110661711B (en) Method for generating label forwarding table, message sending method, device and equipment
EP3739823B1 (en) Compressed routing header information for networks
CN107317751B (en) Apparatus and method for providing routing
WO2016133831A2 (en) Automatic optimal route reflector root address assignment to route reflector clients and fast failover in a network environment
EP3675449A1 (en) A compressed routing header
JP7479489B2 (en) Packet transmission method, device, and system
CN111385209B (en) Message processing method, message forwarding method, device and equipment
EP3484107B1 (en) Parameter notification and obtaining methods and devices, and storage medium
CN109873766B (en) Message transmission method and device
CN108768845B (en) Multi-homing host routing synchronization method and device
CN116418728A (en) Message sending method, segment identification generation method and device
CN114006854B (en) Communication method and network equipment
KR20230088494A (en) Method and Apparatus for Determining Next Hop
CN114025025B (en) SRv6SID publishing method and network equipment
US11863445B1 (en) Prefix range to identifier range mapping
CN114079626B (en) Method, network device and medium for configuring a network using a flexible algorithm routing mechanism
US11671322B2 (en) Configuration of a network using a flex-algorithm routing mechanism
US20230091393A1 (en) Segment identifiers that support end-to-end segment routing with color extended community and border gateway protocol virtual private network option b
CN116781596A (en) Routing method, device, equipment, system and storage medium
CN114422435A (en) Notification method of interface address, verification method of network equipment accessibility and equipment
CN114531391A (en) Method and device for determining next hop
JP2023534907A (en) Route notification method and electronic device
CN117640484A (en) Routing information transmission method and device
CN115914066A (en) Route sending method and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication