A method and apparatus for determining a segment identifier
By receiving packets with Block ID and address space boundary address in the SRv6 network, the problem of large message overhead during SID is solved, and the device performance and protocol stability are improved.
Patent Information
- Application Number
- CN202280000349.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-09-22
- Filing Date
- 2022-02-25
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-02-25
AI Technical Summary
In SRv6 network, the message overhead during SID issuance is high, affecting the device performance and the stability of the message transmission protocol.
By receiving messages sent by neighboring devices including Block ID and address space boundary address, the segment identification SID is calculated, the amount of information carried by the message is reduced, and the SID is determined using Block ID and index value.
Reduces message overhead during SID release process, ensuring device performance and stability of message transmission protocol.
Smart Images

Figure CN114731330B_ABST
Abstract
Description
[0001] This application claims the priority of a Chinese patent application with the application number 202111108022.6 and the invention title "A Method and Device for Determining Segment Identifiers" submitted to the Chinese Patent Office on September 22, 2021. The entire content of which is incorporated herein by reference. Technical Field
[0002] This application relates to the field of communications, and in particular, to a method and device for determining segment identifiers. Background Art
[0003] In a Segment Routing Internet Protocol Version 6 (SRv6) network, a device needs to publish Segment Identities (SIDs) in the SRv6 network to enable subsequent forwarding of data packets.
[0004] For each device in the SRv6 network, the device sends a link state packet to each of its corresponding neighbor devices, and the link state packet includes one or more complete SIDs. After receiving the link state packet, the neighbor device of the device can determine the SIDs published by the device. Summary of the Invention
[0005] The purpose of the embodiments of this application is to provide a method and device for determining segment identifiers to reduce the overhead of packets during the SID publishing process, thereby ensuring the performance of the device and the stability of the packet transmission protocol. The specific technical solutions are as follows:
[0006] In a first aspect, the embodiments of this application provide a method for determining segment identifiers, which is applied to a first device in an SRv6 network. The SRv6 network further includes a second device, and the first device and the second device are neighbor devices to each other. The second device stores a first Segment Identity (SID). The method includes:
[0007] Receiving a first packet and a second packet sent by the second device; wherein, the first packet includes at least one first Block identifier and the boundary address of the address space corresponding to each first Block identifier; the second packet includes at least one second Block identifier and a first index value;
[0008] Calculating the first SID by using the boundary address of the first address space corresponding to the same Block and the first index value, where the same Block is the Block represented by the same Block identifier among the at least one first Block identifier and the at least one second Block identifier.
[0009] In a possible implementation, the first message includes a first sub-TLV, and the first sub-TLV includes a block identification field, a starting SID field, and an ending SID field; wherein, the block identification field is used to carry the at least one first Block identification; the starting SID field is used to carry the starting address of the address space corresponding to each first Block; the ending SID field is used to carry the ending address of the address space corresponding to each first Block.
[0010] In a possible implementation, the first sub-TLV further includes an offset field, and the offset field is used to carry a first offset.
[0011] In a possible implementation, the second message includes a second sub-TLV, a third sub-TLV, or a fourth sub-TLV;
[0012] The second sub-TLV is used to carry the index of the link SID of the point-to-point P2P adjacency type; the second sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field; the third sub-TLV is used to carry the index of the link SID of the local area network LAN adjacency type; the third sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field; the fourth sub-TLV is used to carry the index of the device SID; the fourth sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field; wherein, the block identification field is used to carry the second Block identification; the index quantity field is used to carry the index quantity; the index length field is used to carry the index length; each index field is used to carry an index value; each endpoint behavior field is used to carry the endpoint behavior corresponding to an index value.
[0013] In a possible implementation, the second sub-TLV further includes an offset field, the third sub-TLV further includes an offset field, and the fourth sub-TLV further includes an offset field, and the offset field is used to carry a first offset.
[0014] In a possible implementation, the first message further includes the number of endpoint behaviors and the endpoint behaviors; the first index value is the starting index value, and the starting index value is the index value corresponding to the first endpoint behavior included in the first message; calculating the first SID by using the boundary addresses of the first address space corresponding to the same Block and the first index value specifically includes:
[0015] Calculate the index value corresponding to each endpoint behavior included in the first message according to the number of endpoint behaviors and the starting index value;
[0016] Based on the boundary address of the first address space and the index value corresponding to each endpoint behavior included in the first message, calculate the SID corresponding to each endpoint behavior respectively.
[0017] In a possible implementation, the first message includes a fifth sub-TLV, and the fifth sub-TLV includes a block identification field, a starting SID field, an ending SID field, a flag bit field, an algorithm field, a weight field, a behavior number field, and an endpoint behavior field; wherein, the block identification field is used to carry the first Block identification; the starting SID field is used to carry the starting address of the first address space; the ending SID field is used to carry the ending address of the first address space; the flag bit field is used to carry a sharing flag bit, and the sharing flag bit is shared by multiple SIDs included in the Block represented by the first Block identification; the algorithm field is used to carry a sharing algorithm, and the sharing algorithm is shared by multiple SIDs included in the Block represented by the first Block identification; the weight field is used to carry a sharing weight, and the sharing weight is shared by multiple SIDs included in the Block represented by the first Block identification; the behavior number field is used to carry the number of endpoint behaviors; each endpoint behavior is used to carry an endpoint behavior.
[0018] In a possible implementation, the fifth sub-TLV further includes an offset field, and the offset field is used to carry the first offset.
[0019] In a possible implementation, the second message includes a sixth sub-TLV or a seventh sub-TLV;
[0020] The sixth sub-TLV is used to carry the index of the link SID of the point-to-point P2P adjacency type; the sixth sub-TLV includes a block identification field, an index length field, and a starting index field;
[0021] The seventh sub-TLV is used to carry the index of the link SID of the local area network LAN adjacency type; the seventh sub-TLV includes a block identification field, an index length field, and a starting index field; wherein, the block identification field is used to carry the second Block identification; the index length field is used to carry the length of the starting index field; the starting index field is used to carry the starting index value.
[0022] In a possible implementation, the sixth sub-TLV further includes an offset field, the seventh sub-TLV further includes an offset field, and the offset field is used to carry the first offset.
[0023] In a second aspect, an embodiment of the present application provides an electronic device. The electronic device is the first device in an SRv6 network, and the SRv6 network further includes a second device. The first device and the second device are neighbor devices to each other. The second device stores a first segment identifier (SID). The electronic device includes: a processor; a transceiver; and a machine-readable storage medium storing machine-executable instructions executable by the processor. The machine-executable instructions cause the processor to perform the following steps:
[0024] Receive, through the transceiver, a first message and a second message sent by the second device. The first message includes at least one first block identifier and the boundary address of the address space corresponding to each first block identifier. The second message includes at least one second block identifier and a first index value.
[0025] Calculate the first SID by using the boundary address of the first address space corresponding to the same block and the first index value, where the same block is the block represented by the same block identifier among the at least one first block identifier and the at least one second block identifier.
[0026] In a third aspect, an embodiment of the present application further provides a machine-readable storage medium storing machine-executable instructions executable by the processor. The processor is caused by the machine-executable instructions to implement the steps of the segment identifier determination method described in any one of the above.
[0027] In a fourth aspect, an embodiment of the present application further provides a computer program product including instructions that, when running on a computer, cause the computer to perform the steps of the segment identifier determination method described in any one of the above.
[0028] In the technical solution provided by the embodiments of the present application, compared with the SID publishing process in the related art that needs to carry the complete SID, in the first message and the second message sent by the second device to the first device in the embodiments of the present application, the first SID stored in the second device is not included. Instead, the Block identifier of the Block to which the SID stored by it belongs, the boundary address of the first address space of this Block, and the index value corresponding to this SID are sent to the first device. Therefore, when there are many devices in the SRv6 network, each device can make its neighbor device accurately determine the SID published by this device by sending the first message and the second message to its neighbor device. Moreover, the data volume corresponding to the Block identifier included in the first message, and the Block identifier and index value included in the second message is significantly smaller than the data volume corresponding to the complete SID. Therefore, when there are a large number of SIDs to be published in the SRv6 network, by adopting the method provided by the embodiments of the present application, the data volume of the information that the message needs to carry can be significantly reduced, thereby reducing the number of messages that need to be sent, which effectively reduces the overhead of the messages in the SID publishing process, thereby ensuring the device performance and the stability of the message transmission protocol.
[0029] Of course, when implementing any product or method of the present application, it is not necessarily required to achieve all the above-mentioned advantages simultaneously. Brief Description of the Drawings
[0030] Figure 1-a It is a schematic diagram of a kind of SRv6 End SID sub-TLV;
[0031] Figure 1-b It is a schematic diagram of a kind of SRv6 End.X SID sub-TLV;
[0032] Figure 1-c It is a schematic diagram of a kind of SRv6 LAN End.X SID sub-TLV;
[0033] Figure 2 It is the first flow schematic diagram of the segment identifier determination method provided by the embodiments of the present application;
[0034] Figure 3 It is a schematic diagram of a structure of the SRv6 network provided by the embodiments of the present application;
[0035] Figure 4 It is the second flow schematic diagram of the segment identifier determination method provided by the embodiments of the present application;
[0036] Figure 5 It is a schematic diagram of a kind of SID;
[0037] Figure 6The third process schematic diagram of the segment identifier determination method provided by the embodiments of this application;
[0038] Figure 7 The fourth process schematic diagram of the segment identifier determination method provided by the embodiments of this application;
[0039] Figure 8 The fifth process schematic diagram of the segment identifier determination method provided by the embodiments of this application;
[0040] Figure 9 The sixth process schematic diagram of the segment identifier determination method provided by the embodiments of this application;
[0041] Figure 10-a A schematic diagram of the SRv6 SID Block sub-TLV provided by the embodiments of this application;
[0042] Figure 10-b A schematic diagram of the SRv6 End.X SID Index Sub-TLV provided by the embodiments of this application;
[0043] Figure 10-c A schematic diagram of the SRv6 LAN End.X SID Index Sub-TLV provided by the embodiments of this application;
[0044] Figure 10-d A schematic diagram of the SRv6 End SID Index Sub-TLV provided by the embodiments of this application;
[0045] Figure 11 The seventh process schematic diagram of the segment identifier determination method provided by the embodiments of this application;
[0046] Figure 12-a Another schematic diagram of the Rule-based End.X SID Block sub-TLV provided by the embodiments of this application;
[0047] Figure 12-b Another schematic diagram of the Rule-based End.X SID Index sub-TLV provided by the embodiments of this application;
[0048] Figure 12-c Another schematic diagram of the Rule-based LAN End.X SID Index sub-TLV provided by the embodiments of this application;
[0049] Figure 13-a The first structural schematic diagram of the segment identifier device provided by the embodiments of this application;
[0050] Figure 13-bThe second structural schematic diagram of the segment identification device provided by the embodiment of the present application;
[0051] Figure 14 A structural schematic diagram of the device provided by the embodiment of the present application. Detailed implementation manners
[0052] In the SRv6 network, the SID information can be advertised between two adjacent devices through the Intermediate System-to-Intermediate System (IS-IS) protocol or the Open Shortest Path First Version 3 (OSPFv3). However, in the SRv6 network, the number of devices is extremely large, and the length of an SID reaches 128 bits (bits). This makes the number of link state packets sent between devices during the SID advertisement process relatively large, and each link state packet contains a relatively large amount of data. This results in a large overhead of packets during SID advertisement, seriously affecting the performance of the devices and the stability of the packet transmission protocol.
[0053] For ease of understanding, taking the device 1 in the SRv6 network sending an SID to the device 2 based on the IS-IS protocol as an example for illustration. Among them, the device 1 and the device 2 are neighbor devices to each other.
[0054] In the SRv6 network, when the device 1 performs SID advertisement, it will send link state packets to all its corresponding neighbor devices, and the packet includes the complete SID. The SID can be the device SID of the device 1 (denoted as End SID). The SID can also be the link SID between the device 1 and the neighbor device (denoted as End.X SID). Among them, the link SID is the SID corresponding to the outgoing interface during the packet transmission process. That is, the SID corresponding to the link passed through during the packet transmission process.
[0055] When the above SID is the device SID, the device 1 can send a link state packet (for easy distinction, denoted as the first link state packet) to the device 2. The first link state packet carries an SRv6 End SID sub-TLV. Among them, the SRv6 End SID sub-TLV is used to advertise the device SID. Specifically, as Figure 1-a shown, Figure 1-a A schematic diagram of the SRv6 End SID sub-TLV.
[0056] In Figure 1-aIn the SRv6 End SID sub-TLV shown, in addition to including common fields such as Type, Length, Flags, Endpoint Behavior, etc., it also includes an SID field, which is used to fill in the device SID corresponding to the device. For example, Figure 1-a The 128-bit value in the SID field in
[0057] When the above SID is the link SID between devices, Device 1 can send a link status message to Device 2 (for easy distinction, denoted as the second link status message). This second link status message carries an SRv6 End.X SID sub-TLV or an SRv6 LAN End.X SID sub-TLV. Among them, the SRv6 End.X SID sub-TLV is used to publish the link SID of the Peer-to-Peer (P2P) adjacency type, and the SRv6 LAN End.X SID sub-TLV is used to publish the link SID of the Local Area Network (LAN) adjacency type. Specifically, as shown in Figure 1-b and Figure 1-c shown, Figure 1-b is a schematic diagram of an SRv6 End.X SID sub-TLV, Figure 1-c is a schematic diagram of an SRv6 LAN End.X SID sub-TLV.
[0058] In Figure 1-b the SRv6 End.X SID sub-TLV shown and Figure 1-c the SRv6 LAN End.X SID sub-TLV shown, in addition to including common fields such as type, length, flags, Algorithm, Weight, etc., it also includes an SID field, which is used to fill in the link SID between devices. For example, Figure 1-b the 128-bit value in the SID field in Figure 1-c the 128-bit value in the SID field in
[0059] When the above-mentioned device 1 sends a second link state packet carrying a link SID to device 2, it can determine whether to carry an SRv6 End.X SID sub-TLV or an SRv6 LAN End.X SID sub-TLV in the second link state packet according to the way of establishing a neighbor between device 1 and device 2. For example, when device 1 and device 2 are P2P neighbors, device 1 sends a second link state packet carrying an SRv6 End.X SID sub-TLV to device 2. Another example is that when device 1 and device 2 are LAN neighbors, device 1 sends a second link state packet carrying an SRv6 LAN End.X SID sub-TLV to device 2.
[0060] When publishing SIDs based on OSPFv3, it is also achieved by sending link state packets carrying SRv6 End SID sub-TLV, SRv6 End.X SID sub-TLV, or SRv6 LAN End.X SID sub-TLV. The difference lies in that there are certain differences in the common fields corresponding to SRv6 End SID sub-TLV, SRv6 End.X SID sub-TLV, or SRv6 LAN End.X SID sub-TLV in the link state packets sent by the two protocols. For example, in the link state packet carrying SRv6 End SID sub-TLV sent based on the IS-IS protocol, the type field occupies 8 bits, while in the link state packet carrying SRv6 End SID sub-TLV sent based on OSPFv3, the type field occupies 16 bits. The process of publishing SIDs based on OSPFv3 can refer to the process of publishing SIDs based on the IS-IS protocol, which will not be specifically described here. For the sake of understanding, the following only takes the SID publishing process based on the IS-IS protocol as an example for illustration.
[0061] In the SID publishing process of the related art, whether based on the IS-IS protocol or OSPFv3, the link state packet must carry a complete SID, that is, a 128-bit SID. At this time, the data volume of the link state packet is large, and the number of SIDs of each device in the SRv6 network and the number of link SIDs between every two neighbor devices can be multiple, resulting in a large number of link state packets that need to be sent during SID publishing, and the data volume of each link state packet is large, thus resulting in a large overhead of packets in the SID publishing process, affecting the performance of the device and the stability of the IS-IS protocol or OSPFv3.
[0062] To solve the problems in the related art, the embodiment of the present application provides a method for determining a segment identifier. As Figure 2 shownFigure 2 This is the first flowchart of the segment identifier determination method provided by the embodiments of the present application. This method is applied to a first device in an SRv6 network, and the SRv6 network further includes a second device. Among them, the first device and the second device are neighbor devices to each other, and the first SID is stored in the second device. The method specifically includes the following steps.
[0063] Step S201: Receive a first message and a second message sent by the second device; wherein, the first message includes at least one first Block identifier and the boundary address of the address space corresponding to each first Block identifier; the second message includes at least one second Block identifier and a first index value.
[0064] Both the first message and the second message in the embodiments of the present application can be link state messages. For example, in the process of SID publication based on the IS-IS protocol, the link state message can be a Link State Packet (LSP); in the process of publishing SID based on the OSPF protocol, the link state message can be an LSA message. If the method of the embodiments of the present application is applied to other network topologies, appropriate messages can also be selected as the first message and the second message according to the protocol regulations followed by other network topologies.
[0065] Step S202: Calculate the first SID by using the boundary address of the first address space corresponding to the same Block and the first index value, where the same Block is the Block represented by the same Block identifier among at least one first Block identifier and at least one second Block identifier.
[0066] The above SRv6 network may include multiple devices. The above first device can be any device in the SRv6 network. There may be one or more neighbor devices for the first device. The above second device is any one of the neighbor devices of the first device. Here, no specific limitations are imposed on the above first device and second device. For the sake of understanding, only the first device and the second device in the SRv6 network are taken as examples for illustration below.
[0067] Through Figure 2In the method shown, after receiving the first message and the second message sent by the second device, the first device can calculate the first SID published by the second device by using the boundary address and the first index value of the first address space of the same Block. Compared with the SID publishing process in the related art that needs to carry the complete SID, in the embodiments of the present application, the first message and the second message sent by the second device to the first device do not include the first SID stored in the second device, but send the Block identifier of the Block to which the stored SID belongs, the boundary address of the first address space of this Block, and the index value corresponding to this SID to the first device. Therefore, when there are many devices in the SRv6 network, each device can enable its neighbor device to accurately determine the SID published by the device according to the information included in the first message and the second message by sending the first message and the second message to its neighbor device. Moreover, the data volume corresponding to the Block identifier included in the first message and the Block identifier and index value included in the second message is significantly smaller than the data volume corresponding to the complete SID. Therefore, when there are a large number of SIDs to be published in the SRv6 network, adopting the method provided in the embodiments of the present application can significantly reduce the data volume of the information carried by the message, thereby reducing the number of messages to be sent, which effectively reduces the overhead of the message in the SID publishing process, thus ensuring the device performance and the stability of the message transmission protocol.
[0068] For the above step S201, that is, receiving the first message and the second message sent by the second device; wherein, the first message includes at least one first Block identifier and the boundary address of the address space corresponding to each first Block identifier; the second message includes at least one second Block identifier and the first index value.
[0069] In this step, the first SID is stored in the second device. When the second device performs SID publishing, it can send the first message and the second message to its neighbor device. The neighbor devices of the second device can all receive the first message and the second message. That is, the first device can receive the first message and the second message sent by the second device.
[0070] The above first message may be a link state message (for ease of distinction, denoted as the third link state message, and in the following embodiments, the first message is taken as an example of the third link state message for illustration). The first message may include a first sub-TLV, and the first sub-TLV may be an SRv6 SID Block sub-TLV included in the link state message. Among them, the SRv6 SID Block sub-TLV is a sub-type-length-value (Type-Length-Value, TLV) of the SRv6 Locator TLV. That is, the SRv6 SID Block sub-TLV is included in the sub-TLV of the SRv6 Locator TLV. The SRv6 SID Block sub-TLV is used to publish information related to the Block to which the SID belongs. According to the current protocol regulations, the SRv6 Locator TLV is included in the link state message. The first sub-TLV in the embodiments of the present application is a sub-TLV of the SRv6 Locator TLV, but the embodiments of the present application do not limit this. The first sub-TLV may also be a sub-TLV of other TLVs included in the first message.
[0071] The above second message may be a link state message (for ease of distinction, denoted as the fourth link state message, and in the following embodiments, the second message is taken as an example of the fourth link state message for illustration). The second message may include a second sub-TLV, a third sub-TLV, or a fourth sub-TLV. The second sub-TLV is an SRv6 End.X SID Index Sub-TLV, the third sub-TLV is an SRv6 LAN End.X SID Index Sub-TLV, and the fourth sub-TLV is an SRv6 End SID Index Sub-TLV. Among them, the SRv6 End.X SID Index Sub-TLV is used to publish information related to the link SID of the P2P adjacency type, the SRv6 LAN End.X SID Index Sub-TLV is used to publish information related to the link SID of the LAN adjacency type, and the SRv6 End SID Index Sub-TLV is used to publish information related to the device SID.
[0072] In the above fourth link state message, the upper-level TLVs of the SRv6 End.X SID Index Sub-TLV and the SRv6 LAN End.X SID Index Sub-TLV include, but are not limited to, the Extended IS Reachability TLV (also known as TLV-22), the IS Neighbor Attribute TLV (also known as TLV-23), the L2 Bundle Member Attributes TLV (also known as TLV-25), the inter-AS reachability information TLV (also known as TLV-141), the MT-ISN TLV (also known as TLV-222), and the MT IS Neighbor Attribute TLV (also known as TLV-223). The upper-level TLV of the SRv6 End SID Index Sub-TLV is the SRv6 Locator TLV. According to the current protocol regulations, the second sub-TLV and the third sub-TLV in the embodiments of the present application can be used as the sub-TLVs of the above TLV-22, TLV-23, TLV-25, TLV-141, TLV-222, or TLV-223, and the fourth sub-TLV can be used as the sub-TLV of the SRv6 Locator TLV. However, the embodiments of the present application are not limited thereto, and the second sub-TLV, the third sub-TLV, and the fourth TLV can also be used as the sub-TLVs of other TLVs included in the second message.
[0073] After receiving the above third link state message and fourth link state message, the first device can determine the device corresponding to the SID published through the first message and the second message according to the information included in the SRv6 SID Block sub-TLV in the third link state message and the upper-level TLV corresponding to the SRv6 End.X SID Index Sub-TLV, the SRv6 LAN End.X SID Index Sub-TLV, or the SRv6 End SID Index Sub-TLV in the fourth link state message.
[0074] For ease of understanding, two neighbor devices, namely Device 1 and Device 2, are taken as examples for illustration. When Device 1 sends a first message and a second message corresponding to the link SID between Device 1 and another neighbor device (such as Device 3) to Device 2, Device 2 will receive a third link state message carrying an SRv6 SID Block sub-TLV and a fourth link state message carrying an SRv6 LANEnd.X SID Index Sub-TLV from Device 1. At this time, Device 2 can determine the devices corresponding to the first message and the second message sent by Device 1, namely Device 1 and Device 3, according to the information in the upper-level TLV (i.e., the above-mentioned SRv6 Locator TLV) corresponding to the SRv6 SID Block sub-TLV in the received third link state message, and the information in the upper-level TLV (such as the above-mentioned TLV-22) corresponding to the SRv6 LAN End.X SID Index Sub-TLV in the fourth link state message.
[0075] For the above-mentioned SRv6 SID Block sub-TLV, SRv6 End.X SID Index Sub-TLV, SRv6 LANEnd.X SID Index Sub-TLV, and SRv6 End SID Index Sub-TLV, refer to the following description and no specific description is given here.
[0076] In the embodiment of the present application, the number of the first SIDs stored in the second device may be one or multiple. When the number of the first SIDs stored in the second device is multiple, the first SID may include the device SID of the second device, the link SID between the second device and its neighbor device, and if the multiple first SIDs stored in the second device belong to different Blocks, the first message and the second message may include the Block identifier of each Block to which the first SID belongs.
[0077] The neighbor devices of the second device at least include the above-mentioned first device, and in addition, may also include other neighbor devices. Here, the neighbor devices of the second device are not specifically limited.
[0078] For ease of understanding, take Figure 3 as an example for illustration. Figure 3 FIG. is a schematic structural diagram of an SRv6 network provided by an embodiment of the present application.
[0079] Now assume that the above-mentioned second device is Figure 3 the Device 2 in Figure 3The device 3 in []. The first SID is stored in device 2. The first SID may include a device SID and a link SID. Among them, the device SID is the device SID of device 2; the link SID may include the link SID between device 1 and device 2, and the link SID between device 2 and device 3.
[0080] In the embodiments of the present application, each device in the SRv6 network may have one or more device SIDs, and there may be one or more link SIDs between every two adjacent devices. Here, there is no specific limitation on the category of the SIDs included in the above first SID and the number of the first SIDs. For ease of understanding, only the publication of one first SID is taken as an example for illustration below, which does not play any limiting role.
[0081] In an alternative embodiment, when the first SID stored in the second device includes a device SID, the SRv6 SID Block sub-TLV in the third link state packet carries the Block identifier corresponding to the device SID and the boundary address of the first address space corresponding to the Block identifier. The SRv6 End SIDIndex Sub-TLV in the fourth link state information carries the Block identifier corresponding to the device SID and the first index value.
[0082] In another alternative embodiment, when the first SID stored in the second device includes a link SID, the SRv6 SID Block sub-TLV in the third link state packet carries the Block identifier corresponding to the link SID and the boundary address of the first address space corresponding to the Block identifier. The SRv6 End.XSID Index Sub-TLV or SRv6LAN End.X SID Index Sub-TLV in the fourth link state information carries the Block identifier corresponding to the link SID and the first index value.
[0083] For the above fourth link state packet, when the first SID stored in the second device is a link SID, if the second device and the first device are P2P neighbors, the fourth link state packet carries an SRv6 End.X SID IndexSub-TLV; if the second device and the first device are LAN neighbors, the fourth link state packet carries an SRv6 LANEnd.X SID Index Sub-TLV.
[0084] In the embodiments of the present application, depending on the different categories corresponding to the first SID and the different adjacency types between the first device and the second device, the sub-TLVs carried in the above fourth link state message are different. Here, no specific limitation is imposed on the sub-TLVs carried in the above fourth link state message.
[0085] In the embodiments of the present application, the above first message and second message may be the same message or different messages. For example, when the above first message is a third link state message and the second message is a fourth link state message, the above third link state message and fourth link state message may be the same link state message or different link state messages. Here, no specific limitation is imposed on the above third link state message and fourth link state message.
[0086] In the embodiments of the present application, the above first message includes the first block identifier of the first Block to which the first SID belongs, the boundary address of the first address space corresponding to the first Block, and the first offset. The above second message includes the second block identifier of the second Block and the first index value corresponding to the first SID.
[0087] Since the above first SID may be a device SID or a link SID, there may be the same block identifiers or different block identifiers among at least one first block identifier included in the above first message and at least one second block identifier included in the second message.
[0088] The address space corresponding to the above first Block can be represented as the SID value range corresponding to the first Block. The above Block can be obtained by dividing according to a preset rule. The specific division method can be seen in the following description and will not be specifically described here.
[0089] For the above step S202, the first SID is calculated by using the boundary address of the first address space corresponding to the same Block and the first index value. In the embodiments of the present application, after receiving the first message and the second message sent by the second device, the first device obtains the same block identifier from at least one first block identifier and at least one second block identifier, and then determines the boundary address of the first address space corresponding to the same block identifier and the first index value to represent the same first SID.
[0090] Among them, the first message may include one or more first block identifiers, and the second message may include one or more second block identifiers.
[0091] When a first Block identifier is included in the first message and a second Block identifier is included in the second message, after receiving the first message and the second message sent by the second device, the first device can determine whether the first Block identifier included in the first message and the second Block identifier included in the second message represent the same Block, that is, determine whether the first Block identifier included in the first message is the same as the second Block identifier included in the second message, so as to determine whether the SID corresponding to the first message and the SID corresponding to the second message are the same SID.
[0092] In an optional embodiment, when the first Block identifier included in the first message is the same as the second Block identifier included in the second message, that is, the first Block identifier and the second Block identifier represent the same Block, the first device can determine that the SIDs corresponding to the first Block identifier and the second Block identifier are the same SID, that is, the above-mentioned first SID. At this time, the first device can execute the above step S202, that is, the first device can determine the SID, that is, the first SID, according to the boundary address in the first address space included in the first message and the first index value included in the second message. For the specific method of determining the above first SID, refer to the description below and no specific description is given here.
[0093] In the embodiment of the present application, the SID is represented as a 128-bit Internet Protocol Version 6 (IPv6) address. The address space to which the above first Block belongs is specifically represented as: the SID value range corresponding to the first Block (that is, the IPv6 address value range). The boundary address of the above first address space can be the start SID and the end SID in the SID value range corresponding to the first address space. For example, the start address in the boundary address of the first address space can be the start SID (that is, Start SID) in the SID value range corresponding to the first address space. For another example, the boundary address of the first address space can be the end SID (that is, End SID) in the SID value range corresponding to the first address space.
[0094] In another optional embodiment, for a first message received by the first device, if a second message with a Block identifier the same as the Block identifier in the first message cannot be found, that is, the boundary address of the first address space required for calculating the SID is missing, the first device will discard the first message.
[0095] For a second message received by a first device, if a first message with the same Block identifier as the Block identifier in the second message cannot be found, that is, when the first index value required for calculating the SID is missing, the first device will discard the second message.
[0096] In an optional embodiment, considering the impact of the network environment on the link state messages between the first device and the second device, when the first device cannot find a first message or a second message with the same Block identifier, it can wait for a preset duration. If no first message and second message with the same Block identifier are found after the preset duration, the first device can discard the received second message or first message.
[0097] In an optional embodiment, after receiving the first message and the second message, the above-mentioned first device may forward the received first message and second message (such as a third link state message and a fourth link state message). The neighbor nodes of the first device may determine the first SID published by the second device based on the received first message and second message.
[0098] In the embodiments of the present application, the above-mentioned first message further includes a first offset, or the above-mentioned second message further includes a first offset. Based on this, step S202 may be specifically implemented as:
[0099] Calculate the first SID according to the boundary address of the first address space, the first offset, and the first index value.
[0100] In an optional embodiment, when the boundary address of the first address space is the starting address of the first address space, according to Figure 2 As shown in the method, the embodiments of the present application also provide a method for determining a segment identifier. As Figure 4 shown, Figure 4 FIG. is the second flowchart of the method for determining a segment identifier provided by the embodiments of the present application. The method includes the following steps.
[0101] Step S401: Receive a first message and a second message sent by a second device.
[0102] Wherein, the first message includes at least one first Block identifier, the boundary address of the address space corresponding to each first Block identifier, and a first offset; the second message includes at least one second Block identifier and a first index value.
[0103] Or, the first message includes at least one first Block identifier and the boundary address of the address space corresponding to each first Block identifier; the second message includes at least one second Block identifier, a first index value, and a first offset.
[0104] Step S402: According to the address rule of SID, offset the first index value corresponding to the same Block by the first offset to obtain the first offset address.
[0105] Among them, the same Block is the Block represented by the same Block in at least one first Block identifier and at least one second Block identifier.
[0106] In this step, when a first Block identifier included in the first message represents the same Block as a second Block identifier included in the second message, the first device can, based on the first offset, offset the first index value included in the second message according to the address rule of SID to obtain the first offset address. That is, offset the first index value by the first offset to obtain the first offset address.
[0107] In the SRv6 network, the device SID or link SID consists of a Locator, a Function, and Arguments, specifically as Figure 5 shown Figure 5 is a schematic diagram of SID.
[0108] Among them, the Locator is used to identify the network segment to which the SID belongs. The Locator is unique within the Segment Routing (SR) domain. The Function is used to identify the local operation instruction bound to the SID. After receiving the traffic, the specified node within the SR domain performs relevant operations according to the Function field of the SID. The Arguments are used to define information such as the flow and service of the message.
[0109] For example, if the above first index value is 1 and the first offset is 16, at this time, offsetting the first index value according to the address rule of SID can be expressed as: the address obtained after shifting the first index value 16 bit positions to the left, that is, the address 0::1:0. That is, the above first offset address is 0::1:0.
[0110] In the embodiments of the present application, the address rule of the above SID can be determined according to the number of bits corresponding to the Locator, Function, and Arguments included in the SID.
[0111] Step S403: Calculate the first SID according to the starting address and the first offset address.
[0112] In this step, the first device can calculate the first SID corresponding to the first message and the second message based on the first offset address obtained through offset processing and the boundary address of the first address space included in the first message (i.e., the starting address of the first address space mentioned above). For the calculation method of the first SID, refer to the description below and no specific description will be given here.
[0113] The above steps S402 - S403 are refinements of the above step S202.
[0114] Through the above steps S402 - S403, during the process of a large number of SID publications, the device uses the above first offset to perform offset processing on the first index value to obtain the first offset address. Based on the first offset address and the boundary address of the first address space, it can accurately calculate the SID corresponding to the first message and the second message it receives, that is, the SID published by the second device in the SRv6 network. While realizing the publication and calculation of the SID, it reduces the data volume included in the link state message, ensures the accuracy of the calculated SID, and thus ensures the accuracy of the published SID.
[0115] In an optional embodiment, according to the above Figure 4 shown method, the embodiment of the present application also provides a method for determining a segment identifier. As Figure 6 shown, Figure 6 This is the third schematic flowchart of the method for determining a segment identifier provided by the embodiment of the present application. This method includes the following steps.
[0116] Step S601, receive the first message and the second message sent by the second device.
[0117] Among them, the first message includes at least one first Block identifier, the boundary address of the address space corresponding to each first Block identifier, and the first offset; the second message includes at least one second Block identifier and the first index value.
[0118] Alternatively, the first message includes at least one first Block identifier and the boundary address of the address space corresponding to each first Block identifier; the second message includes at least one second Block identifier, the first index value, and the first offset.
[0119] Step S602, according to the address rule of the SID, offset the first index value corresponding to the same Block by the first offset to obtain the first offset address.
[0120] The above steps S601 - S602 are the same as the above steps S401 - S402.
[0121] Step S603, calculate the sum value of the starting address and the first offset address.
[0122] In this step, the first device may perform a summation calculation on the starting address and the first offset address of the first address space to obtain the sum value of the starting address and the first offset address.
[0123] In an optional embodiment, after the first device calculates the sum value of the starting address and the first offset address, it may use this sum value as the SID corresponding to the first message and the second message, that is, the above-mentioned first SID.
[0124] In another optional embodiment, considering that the above-mentioned third link state message and fourth link state message may have transmission errors during the transmission process, in order to ensure the accuracy of the determined first SID, the first device may determine whether the SID corresponding to the calculated sum value of the starting address and the first offset address is within the above-mentioned first address space. That is, it is determined whether the SID corresponding to the calculated sum value of the starting address and the first offset address is within the SID value range corresponding to the first address space. If it is within the first address space, step S604 is executed. If it is not within the first address space, step S605 is executed.
[0125] In an optional embodiment, determining whether the SID corresponding to the sum value of the starting address and the first offset address is within the first address space may be specifically expressed as: determining whether the sum value of the starting address and the first offset address is greater than or equal to the starting address of the first address space and less than or equal to the end address of the first address space. When the sum value of the starting address and the first offset address is greater than or equal to the starting address of the first address space and less than or equal to the end address of the first address space, it is determined that the SID corresponding to this sum value is within the first address space. When the sum value of the starting address and the first offset address is less than the starting address of the first address space or greater than the end address of the first address space, it is determined that the SID corresponding to this sum value is not within the first address space.
[0126] In the embodiment of the present application, the sum value of the starting address and the first offset address is represented as an IPv6 address, and the SID corresponding to this IPv6 is represented as the sum value itself.
[0127] Step S604, if the SID corresponding to the sum value is within the first address space, then use the SID corresponding to the sum value as the first SID.
[0128] The above steps S603 - S604 are refinements of the above step S403.
[0129] Step S605, if the SID corresponding to the sum value is not within the first address space, then reject using the SID corresponding to the sum value as the first SID.
[0130] In this step, when the SID corresponding to the sum value of the calculated starting address and the first offset address is not within the first address space, the first device can determine that an error has occurred in the calculated sum value. At this time, the first device can refuse to use the SID corresponding to the sum value as the first SID.
[0131] By determining whether the SID corresponding to the sum value of the starting address and the first offset address is within the first address space, it is possible to effectively detect whether an error has occurred in the calculated sum value, thereby avoiding using the SID corresponding to the incorrect sum value as the first SID, ensuring the accuracy of the obtained first SID, and thus providing guarantee for the subsequent packet forwarding process based on the SID.
[0132] In an alternative embodiment, when the boundary address of the first address space is the end address of the first address space, according to Figure 2 the method shown, the embodiments of the present application also provide a method for determining a segment identifier. As Figure 7 shown, Figure 7 FIG. 4 is a fourth flowchart of the method for determining a segment identifier provided by the embodiments of the present application. The method includes the following steps.
[0133] Step S701, receive a first packet and a second packet sent by a second device.
[0134] Wherein, the first packet includes at least one first Block identifier, the boundary address of the address space corresponding to each first Block identifier, and a first offset; the second packet includes at least one second Block identifier and a first index value.
[0135] Alternatively, the first packet includes at least one first Block identifier and the boundary address of the address space corresponding to each first Block identifier; the second packet includes at least one second Block identifier, a first index value, and a first offset.
[0136] Step S702, according to the address rule of the SID, offset the first index value corresponding to the same Block by the first offset to obtain a second offset address.
[0137] Wherein, the same Block is the Block represented by the same Block among at least one first Block identifier and at least one second Block identifier.
[0138] The above method for obtaining the second offset address can refer to the above method for obtaining the first offset address, which will not be elaborated here.
[0139] Step S703, calculate a first SID according to the end address and the second offset address.
[0140] In this step, the first device may calculate the first SID corresponding to the first message and the second message based on the second offset address obtained through offset processing and the boundary address of the first address space (i.e., the end address of the first address space) included in the first message. For the calculation method of the first SID, refer to the description below and no specific explanation is provided here.
[0141] The above steps S702 - S703 are refinements of the above step S202.
[0142] In an optional embodiment, according to Figure 7 the method shown, an embodiment of the present application further provides a method for determining a segment identifier. As Figure 8 shown, Figure 8 FIG. 5 is a schematic flowchart of the fifth method for determining a segment identifier provided by an embodiment of the present application. The method includes the following steps.
[0143] Step S801: Receive the first message and the second message sent by the second device.
[0144] Among them, the first message includes at least one first Block identifier, the boundary address of the address space corresponding to each first Block identifier, and a first offset; the second message includes at least one second Block identifier and a first index value.
[0145] Alternatively, the first message includes at least one first Block identifier and the boundary address of the address space corresponding to each Block; the second message includes at least one second Block identifier, a first index value, and a first offset.
[0146] Step S802: According to the address rule of the SID, offset the first index value corresponding to the same Block by the first offset to obtain a second offset address.
[0147] The above steps S801 - S802 are the same as the above steps S701 - S702.
[0148] Step S803: Calculate the difference between the end address and the second offset address.
[0149] In this step, the first device may calculate the difference between the end address of the first address space and the second offset address to obtain the difference between the end address and the second offset address.
[0150] In an optional embodiment, after the first device calculates the difference between the end address and the second offset address, it may determine this difference as the SID corresponding to the first message and the second message, that is, the above first SID.
[0151] In another alternative embodiment, considering that the above-mentioned third link state packet and fourth link state packet may have transmission errors during the transmission process, in order to ensure the accuracy of the determined first SID, the first device may determine whether the SID corresponding to the difference between the calculated end address and the second offset address is within the above-mentioned first address space. That is, it is determined whether the SID corresponding to the difference between the calculated end address and the second offset address is within the SID value range corresponding to the first address space. If it is within the first address space, step S804 is executed. If it is not within the first address space, step S805 is executed.
[0152] The method for determining whether the SID corresponding to the difference between the end address and the second offset address is within the first address space may refer to the method for determining whether the SID corresponding to the sum of the start address and the first offset address is within the first address space, which will not be specifically described here.
[0153] Step S804, if the SID corresponding to the difference is within the first address space, the SID corresponding to the difference is used as the first SID.
[0154] The above steps S803 - step S804 are refinements of the above step S703.
[0155] Step S805, if the SID corresponding to the difference is not within the first address space, rejecting the SID corresponding to the difference as the first SID.
[0156] In this step, when the SID corresponding to the difference between the calculated end address and the second offset address is not within the first address space, the first device may determine that the calculated difference is incorrect. At this time, the first device may reject using the SID corresponding to the difference as the first SID.
[0157] By determining whether the SID corresponding to the difference between the end address and the second offset address is within the first address space, it is possible to effectively detect whether the calculated difference is incorrect, thereby avoiding using the SID corresponding to the incorrect difference as the first SID, ensuring the accuracy of the obtained first SID, and thus providing guarantee for the later packet forwarding process based on the SID.
[0158] In the above Figure 4 、 Figures 6 - 8 embodiment, only the start address and the end address in the first address space are taken as examples to illustrate the method for calculating the first SID. In addition, the first device may also calculate the first SID published by the second device according to any address in the first address space other than the start address and the end address.
[0159] For ease of understanding, any address in the first address space other than the starting address and the ending address is taken as address A, and the calculation method of the first SID is described. At this time, the above-mentioned first offset may include a sign bit indicating positive or negative. For example, when the sign bit value is 0, it represents a positive number, and when the sign bit value is 1, it represents a negative number. After the first device offsets the index value by the above-mentioned first offset according to the address rule of the SID to obtain an offset address, it can perform a sum or difference calculation on address A and the offset address according to the sign bit of the first offset, so as to obtain the first SID. For example, when the sign bit of the first offset represents a positive number, the first device can calculate the sum of address A and the offset address to obtain the first SID; when the sign bit of the first offset represents a negative number, the first device can calculate the difference between address A and the offset address to obtain the first SID.
[0160] In the embodiments of the present application, the address in the first address space used in the above-mentioned calculation process of the first SID is not specifically limited.
[0161] In an optional embodiment, the above-mentioned first device stores a second SID. According to the method shown above, Figure 2 The embodiments of the present application also provide a segment identifier determination method. As shown in Figure 9 shown, Figure 9 is the sixth process schematic diagram of the segment identifier determination method provided by the embodiments of the present application. The method includes the following steps.
[0162] Step S901, receive a first message and a second message sent by a second device; wherein, the first message includes at least one first Block identifier and the boundary addresses of the address spaces corresponding to each first Block identifier; the second message includes a second Block identifier and a first index value.
[0163] Step S902, calculate the first SID by using the boundary addresses of the first address space corresponding to the same Block and the first index value.
[0164] Wherein, the same Block is the Block represented by the same Block identifier among at least one first Block identifier and at least one second Block identifier.
[0165] The above-mentioned steps S901 - step S902 are the same as the above-mentioned steps S201 - step S202.
[0166] Step S903, obtain the stored second SID.
[0167] The above-mentioned second SID may include one or more of the device SID of the first device and the link SID between the first device and its neighbor nodes. Here, the above-mentioned second SID is not specifically limited.
[0168] Step S904: Determine the target Block to which the second SID belongs according to the corresponding relationship between each pre-divided Block and the address space.
[0169] In an optional embodiment, for each device in the SRv6 network, the device can divide multiple SID value ranges according to a preset address space division rule, and each SID value range is a Block. At this time, the above preset rule is the preset address space division rule.
[0170] For ease of understanding, take the address space 0::100:0 to 0::300:0 as an example for illustration. The device can divide this address space into two Blocks according to the preset rule. For example, the address space corresponding to Block 1 can be: 0::100:0 to 0::200:0, and the address space corresponding to Block 2 can be: 0::201:0 to 0::300:0.
[0171] In another optional embodiment, for each device in the SRv6 network, the device can divide multiple SID value ranges according to a preset bit division rule, and each SID value range is a Block. At this time, the above preset rule is the preset bit division rule.
[0172] For ease of understanding, take the division of 4 bits as an example for illustration. The value range of the address space is: 0000 to 1111. The device can divide two SID value ranges based on these 4 bits, that is, two Blocks are obtained by division.
[0173] For example, the address storage space corresponding to Block A can be: 0000 to 0011, that is, the third and fourth bits are set to 0. The address storage space corresponding to Block B is: 0100 - 1111. That is, at least one of the third and fourth bits is set to 1.
[0174] The above Block can be obtained by dividing according to the preset address space division rule or the preset bit division rule. Here, the division method of the above Block is not specifically limited.
[0175] In the embodiments of the present application, the number of Blocks obtained by dividing each device in the above SRv6 network according to the preset rule can be the same or different; and, the value range of the address space corresponding to each Block can be the same or different. Here, the number of Blocks corresponding to each device in the SRv6 network and the address space are not specifically limited.
[0176] In an alternative embodiment, according to the known communication protocol standard, in the above SID, the Arguments field is 0. Therefore, when dividing the Block according to the preset rule, the address space to be divided can be determined according to the number of bits of the Arguments field included in the SID. That is, the address space with the Arguments field being 0 is selected for division to obtain one or more Blocks.
[0177] In an alternative embodiment, after each device in the above SRv6 network divides to obtain one or more Blocks, it can store the Block ID assigned to each Block, that is, the Block ID.
[0178] After the first device obtains the above second SID, it can determine the address space where the second SID is located (denoted as the second address space) according to the corresponding relationship between each Block pre-divided by it and the address space, and determine the Block corresponding to the second address space where the second SID is located as the Block to which the second SID belongs, to obtain the target Block.
[0179] In the above embodiment, the above step S904 is executed after step S903. In addition, the above step S904 and the above step S901 can be executed simultaneously, or can be executed before the above step S901. Here, the execution order of the above step S901 and step S904 is not specifically limited.
[0180] Step S905: Determine the second index value corresponding to the second SID according to the corresponding relationship between each SID and the index value in the second address space corresponding to the target Block.
[0181] In the embodiment of the present application, each SID in the second address space corresponding to the above target Block has a corresponding index value. After the first device determines the second address space corresponding to the target Block to which the second SID belongs, it can determine the index value corresponding to the second SID according to the corresponding relationship between each SID and the index value in this second address space, as the second index value.
[0182] In the embodiment of the present application, the index value corresponding to each SID in the above second address space can be determined based on the boundary address of the second address space.
[0183] For example, the SID value range corresponding to the above second address space is: 0::100:0 to 0::200:0. The starting address of this second address space is: 0::100:0. Then, the index value corresponding to 0::100:0 can be 0, the index value corresponding to 0::101:0 can be 1, the index value corresponding to 0::102:0 can be 2, and so on. The index value corresponding to 0::200:0 can be 256 = 2 * 16^2 - 16^2.
[0184] For another example, the SID value range corresponding to the above second address space is still: 0::100:0 to 0::200:0. The end address of this second address space is: 0::200:0. Then, the index value corresponding to 0::200:0 can be 0, the index value corresponding to 0::1FF:0 can be 1, the index value corresponding to 0::1FE:0 can be 2, and so on. The index value corresponding to 0::100:0 can be 256. In the embodiments of the present application, the method for determining the index value corresponding to each SID in the second address space is not specifically limited.
[0185] Step S906: Send a third message and a fourth message to each neighbor device. The third message includes the third block identifier of the target block and the boundary address of the second address space. The fourth message includes the third block identifier and the second index value.
[0186] The first device can send the third message and the fourth message to each of its neighbor devices. After each neighbor device corresponding to the first device receives the third message and the fourth message, it can determine the above second SID according to the third message and the fourth message. The method for determining the second SID can refer to the method for determining the first SID above, and will not be specifically described here.
[0187] In an alternative embodiment, the third message further includes a second offset, or the fourth message further includes a second offset. Before the above step S906, the method may further include: calculating the second offset of the boundary address of the second address space according to the attribute characteristics of each address in the second address space.
[0188] In an alternative embodiment, in the known communication protocol standard, the above SID includes an Arguments field, and the Arguments field is set at the low address bit of the SID. And each bit corresponding to the Arguments field is 0. Therefore, the first device can determine all the bits corresponding to the Arguments field as the second offset of the boundary address of the second address space.
[0189] In the embodiments of the present application, the attribute characteristics of each address in the second address space can be represented as: the number of bit positions with a value of 0 in the low address bits of each address.
[0190] The boundary address of the second address space can be the start address or the end address in the second address space, etc.
[0191] In the embodiments of the present application, the first device can also determine the second offset according to the actual needs of the user. In one example, starting from the low address bits, the first device selects the first number of address bits as the second offset. Wherein, the value of the first number can be 10, 20, 30, etc. In another example, the second offset can be 0. When the second offset is 0, the second offset may not be carried in the third message and the fourth message.
[0192] It can be understood that in this example, the second offset is not strictly determined according to the fields included in the existing SID, but according to the actual needs of the user, some address bits are selected as the second offset. And, the value corresponding to each selected address bit can be 0 or 1. In the embodiments of the present application, the value corresponding to each address bit is not limited.
[0193] In the embodiments of the present application, the method for determining the second offset is not specifically limited.
[0194] In the embodiments of the present application, the third message can be a link state message (for the convenience of distinction, denoted as the fifth link state message). The third message can include sub-TLVs, and the sub-TLVs of the third message can be the SRv6 SID Block sub-TLVs in the fifth link state message. The fourth message can be a link state message (for the convenience of distinction, denoted as the sixth link state message). The fourth message includes sub-TLVs, and the sub-TLVs of the fourth message can be the SRv6End.X SID Index Sub-TLV, SRv6 LAN End.X SID Index Sub-TLV or SRv6End SIDIndex Sub-TLV in the sixth link state message.
[0195] In an optional embodiment, when the first device sends the third message and the fourth message to its neighbor node, it can also send the first message and the second message. Here, the messages sent by the first device are not specifically limited.
[0196] For ease of understanding, in combination with Figures 10-a to 10-d as an example to illustrate the above first sub-TLV to fourth sub-TLV.
[0197] The first sub-TLV includes a block identification field, a start SID field, and an end SID field; the block identification field is used to carry at least one first Block identification; the start SID field is used to carry the start address of the address space corresponding to each first Block; the end SID field is used to carry the end address of the address space corresponding to each first Block.
[0198] As an example, the first sub-TLV can be an SRv6 SID Block sub-TLV, Figure 10-a which is a schematic diagram of an SRv6 SID Block sub-TLV provided by an embodiment of the present application. According to the current protocol regulations, the SRv6 SID Block sub-TLV includes a type field, a length field, a next-level sub-TLV length field (Sub-sub-tlv-len), and a next-level sub-TLV field (Sub-sub-TLVs). In the embodiment of the present application, in addition to the above fields, the SRv6 SID Block sub-TLV further includes a block identification field (Block ID), a start SID field (Start S ID), and an end SID field (End ID).
[0199] Optionally, the SRv6 SID Block sub-TLV may further include an offset field (offset), and the offset field can carry a first offset, which is used to represent the offset of the boundary address of the address space corresponding to the block identification included in the SRv6 SID Block sub-TLV. Figure 10-a Taking one block identification as an example, it can be understood that when the SRv6 SID Block sub-TLV includes multiple block identifications, the first offset can be used to represent the offset of the boundary address of the address space corresponding to each block identification.
[0200] In the IS-IS protocol, the type field, the length field, the block identification field, the offset field, and the next-level sub-TLV length field in the SRv6 SID Block sub-TLV can all occupy 8 bits, the length of the next-level sub-TLV field is variable, and the start SID field and the end SID field can both occupy 128 bits. In other protocols, the lengths of the fields and the arrangement order of the fields are not limited to this, and the embodiment of the present application does not make any limitations in this regard.
[0201] Optionally, the sub-TLV in the third message may also be an SRv6 SID Block sub-TLV. In this case, the value of the block identification field of the SRv6 SID Block sub-TLV is the third Block identification in the above-mentioned third message, the value of the offset field is the second offset in the third message, and the values of the start SID field and the end SID field are the start address and the end address of the second address space, respectively.
[0202] The second sub-TLV is used to carry the index of the link SID of the P2P adjacency type; the second sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field.
[0203] The third sub-TLV is used to carry the index of the link SID of the LAN adjacency type; the third sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field.
[0204] The fourth sub-TLV is used to carry the index of the device SID; the fourth sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field.
[0205] Among them, in the above-mentioned second sub-TLV, third sub-TLV, and fourth sub-TLV, the block identification field is used to carry the second Block identification; the index quantity field is used to carry the index quantity; the index length field is used to carry the index length; and the index field is used to carry an index value.
[0206] As an example, the second sub-TLV may be an SRv6 End.X SID Index Sub-TLV, and the third sub-TLV may be an SRv6 LAN End.X SID Index Sub-TLV. Figure 10-b It is a schematic diagram of an SRv6 End.X SID Index Sub-TLV provided by an embodiment of the present application; Figure 10-c It is a schematic diagram of an SRv6 LAN End.X SID Index Sub-TLV provided by an embodiment of the present application.
[0207] According to the current protocol regulations, both the SRv6 End.X SID Index Sub-TLV and the SRv6 LAN End.X SID Index Sub-TLV include a type field, a length field, a flag field, an algorithm field, and a weight field. In the embodiments of the present application, in addition to the above fields, the SRv6 End.X SID Index Sub-TLV further includes a block identification field (BlockID), an index number field (Index Num), an index length field (Index Length), at least one index field (Index), and an endpoint behavior field (Endpoint Behavior) corresponding to each index field. Among them, if the index number field is Num, then the at least one index field includes Index 0, Index 1,..., Index Num-1, and correspondingly, the endpoint behavior field includes Endpoint Behavior 0, Endpoint Behavior 1,..., Endpoint Behavior Num-1.
[0208] The SRv6 End.X SID Index Sub-TLV further includes a neighbor system identification field (Neighbor System-ID), and the number of bits occupied by the neighbor system identification field is variable and can be determined based on the neighbor system identification.
[0209] In the IS-IS protocol, the type field, length field, flag field, algorithm field, weight field, block identification field, index number field, index length field, and each endpoint behavior field in the SRv6 End.X SID Index Sub-TLV and the SRv6 LAN End.X SID Index Sub-TLV can each occupy 8 bits, and the number of bits occupied by each index field is variable. In other protocols, the lengths of the various fields and the arrangement order of the various fields are not limited to this.
[0210] Optionally, the sub-TLV in the fourth packet can also be the SRv6 End.X SID Index Sub-TLV. In this case, the value of the block identification field of the SRv6 End.X SID Index Sub-TLV is the third Block identification in the fourth packet, and the value of the index field can be the second index value in the fourth packet.
[0211] Alternatively, the sub-TLV in the fourth message can also be the SRv6 LAN End.X SID Index Sub-TLV. In this case, the value of the block identification field of the SRv6 LAN End.X SID Index Sub-TLV is the third Block identification, and the value of the index field can be the second index value in the fourth message.
[0212] In Figure 10-b and Figure 10-c the Block identifications are both the identifications corresponding to the link SID.
[0213] As an example, the fourth sub-TLV can be the SRv6 End SID Index Sub-TLV. Figure 10-d FIG. [X] is a schematic diagram of the SRv6 End SID Index Sub-TLV provided by an embodiment of the present application. According to the current protocol regulations, the SRv6 End SID Index Sub-TLV includes a type field, a length field, and a flag bit field. In the embodiment of the present application, in addition to the above fields, the SRv6 End SID Index Sub-TLV further includes a block identification field (Block ID), an index quantity field (Index Num), an index length field (Index Length), at least one index field (Index), and an endpoint behavior field (Endpoint Behavior) corresponding to each index field. Among them, if the index quantity field is Num, the at least one index field includes Index 0, Index 1,..., Index Num-1, and correspondingly, the endpoint behavior field includes Endpoint Behavior 0, Endpoint Behavior 1,..., Endpoint Behavior Num-1.
[0214] In the IS-IS protocol, each of the type field, length field, flag bit field, block identification field, index quantity field, index length field, and each endpoint behavior field in the SRv6 End Index Sub-TLV can occupy 8 bits, and the number of bits occupied by each index field is variable. In other protocols, the lengths of the fields and the arrangement order of the fields are not limited to this, and the embodiments of the present application do not make any limitations in this regard.
[0215] Optionally, the sub-TLV in the fourth message can also be the SRv6 End SID Index Sub-TLV. In this case, the value of the block identification field of the SRv6 End SID Index Sub-TLV is the third Block identification in the fourth message, and the value of the index field can be the second index value in the fourth message.
[0216] Optionally, the second sub-TLV further includes an offset field, the third sub-TLV further includes an offset field, and the fourth sub-TLV further includes an offset field. The offset field can carry a first offset.
[0217] The offset included in the second sub-TLV is: the offset of the address space corresponding to the block identification included in the second sub-TLV.
[0218] The offset included in the third sub-TLV is: the offset of the address space corresponding to the block identification included in the third sub-TLV.
[0219] The offset included in the third sub-TLV is: the offset of the address space corresponding to the block identification included in the third sub-TLV.
[0220] The above Figures 10-a to 10-d is the TLV in the link state message sent based on the IS-IS protocol. The TLV in the link state message sent based on OSPFv3 is basically similar to the TLV in the link state message sent based on the IS-IS protocol. Here, the structure of the TLV in the link state message sent based on OSPFv3 will not be specifically described.
[0221] For ease of understanding, taking two adjacent devices, namely device 1 and device 2 as an example, the process of publishing the SIDs stored in device 1 will be described. Now assume that device 1 stores two device SIDs, which are respectively represented as: 1::101:0 and 1::102:0. The number of Blocks allocated by device 1 is 1, and the Block identification of this Block is 1, and the address space is from 1::100:0 to 1::200:0.
[0222] The index information corresponding to the SIDs allocated in the upper Block of device 1 is represented as: Index 1: 1::101:0, and Index 2: 1::102:0. The index corresponding to SID 1::101:0 is Index 1, and the index corresponding to SID 1::102:0 is Index 2.
[0223] At a certain moment, device 1 sends link state packet 1 carrying an SRv6 SID Block sub-TLV and link state packet 2 carrying an SRv6 End SID Index Sub-TLV to its neighbor device, i.e., device 2. In the SRv6 SID Block sub-TLV, the block identifier (i.e., Block-ID) field is 1, the start SID field is 1::100:0, the end SID field is 1::200:0, and the offset (i.e., offset) field is 16. In the SRv6 End SID Index Sub-TLV, the segment identifier field is 1, the index number (i.e., Index Num) field is 2, the index length (i.e., Index Length) field is 1, the Index 0 field occupies 1 byte and its value is 1 (i.e., the index value is 1), and the Index 1 field occupies 1 byte and its value is 2 (i.e., the index value is 2).
[0224] After receiving link state packet 1 and link state packet 2 sent by device 1, for Index 0 in the SRv6 End SID Index Sub-TLV, device 2 can perform an offset process on its index value (i.e., 1) according to the offset in the offset field (i.e., 16), that is, shift the index value 1 to the left by 16 bit positions to obtain the offset address 0::1:0. At this time, device 2 can add the offset address 0::1:0 to the start SID (i.e., 1::100:0) to obtain SID 1::101:0.
[0225] For Index 1 in the SRv6 End SID Index Sub-TLV, device 2 can perform an offset process on its index value (i.e., 2) according to the offset in the offset field (i.e., 16), that is, shift the index value 2 to the left by 16 bit positions to obtain the offset address 0::2:0. At this time, device 2 can add the offset address 0::2:0 to the start SID (i.e., 1::100:0) to obtain SID 1::102:0.
[0226] At this time, device 2 can determine that the SIDs announced by device 1 are 1::101:0 and 1::102:0.
[0227] When there are many neighbor devices of a device or the number of Flex-Algorithms used is large, a large number of link SIDs (End.X SIDs) need to be announced, which further increases the packet overhead during SID announcement. To reduce the packet overhead during SID announcement, the embodiments of this application can further compress the packet content during SID announcement.
[0228] Based on this, in another embodiment of the present application, the first message in the above step S201 further includes the number of endpoint behaviors and endpoint behaviors. The first index value in the above step S201 may be a starting index value, and the starting index value is the index value corresponding to the first endpoint behavior included in the first message. On this basis, the embodiment of the present application provides another method for determining a segment identifier, as Figure 11 shown, the method specifically includes the following steps:
[0229] Step S1101, receive a first message and a second message sent by a second device.
[0230] The first message includes at least one first Block identifier, the boundary address of the address space corresponding to each first Block identifier, the number of endpoint behaviors, and endpoint behaviors; the second message includes at least one second Block identifier and a first index value. Each endpoint behavior included in the first message corresponds to an index value, and the index values corresponding to multiple endpoint behaviors included in the first message are consecutive. The first index value included in the second message is the starting index value, and the starting index value is the index value corresponding to the first endpoint behavior included in the first message.
[0231] For example, if the number of endpoint behaviors included in the first message is 4, then the first message includes 4 endpoint behaviors. If the index value corresponding to the first endpoint behavior is 1, then the first index value included in the second message is 1.
[0232] In the embodiment of the present application, a plurality of link SIDs are stored in the second device, and the Block identifiers included in the first message and the second message are both the identifiers of the Blocks to which the link SIDs belong.
[0233] In the case where the first message further includes the number of endpoint behaviors and endpoint behaviors, step S202 may be specifically implemented as:
[0234] Step S1102, calculate the index value corresponding to each endpoint behavior included in the first message according to the number of endpoint behaviors and the starting index value.
[0235] It can be understood that the index value corresponding to the first endpoint behavior included in the first message is the starting index value, the index value corresponding to the second endpoint behavior is the starting index value plus 1, the index value corresponding to the third endpoint behavior is the starting value plus 1 and then plus 1, and so on. The index value corresponding to each endpoint behavior included in the first message can be calculated.
[0236] Optionally, step S1102 may be specifically implemented as: taking the sum value of the starting index value and N as the index value corresponding to the Nth endpoint behavior included in the first message, where the value range of N is from 0 to the difference between the number of endpoint behaviors and 1.
[0237] For example, if the number of endpoint behaviors included in the first message is 4, the index value corresponding to the 0th endpoint behavior included in the first message is the starting index value, the index value corresponding to the 1st endpoint behavior is the sum of the starting index value and 1, the index value corresponding to the 2nd endpoint behavior is the sum of the starting index value and 2, the index value corresponding to the 3rd endpoint behavior is the sum of the starting index value and 3, and the index value corresponding to the 4th endpoint behavior is the sum of the starting index value and 4.
[0238] Step S1103: Based on the boundary address of the first address space and the index value corresponding to each endpoint behavior included in the first message, calculate the SID corresponding to each endpoint behavior respectively.
[0239] By adopting the embodiment of the present application, compared with the related art where the complete SID needs to be carried in the SID publishing process, in the embodiment of the present application, the complete SID is not carried in the first message and the second message. Moreover, in the case of needing to publish multiple link SIDs, the second message does not need to carry the index value corresponding to each link SID. By carrying the starting index value, the first device can calculate the index value corresponding to each endpoint behavior through the starting index value included in the second message and the number of endpoint behaviors included in the first message, and then calculate the SID corresponding to each endpoint behavior. In this way, when there are many neighbor devices included in the second device or the number of Flex - Algorithms used is large, the method provided by the embodiment of the present application can reduce the data volume required to be carried by the second message, reduce the message overhead in the link SID publishing process, thereby ensuring the device performance and the stability of the message transmission protocol.
[0240] In a possible implementation manner, when neither the first message nor the second message includes the first offset, the above - mentioned S1033 can be specifically implemented as: using the index value corresponding to each endpoint behavior as the first offset address, and based on the boundary address of the first address space and the first offset address corresponding to each endpoint behavior, calculate the SID corresponding to each endpoint behavior respectively.
[0241] In another possible implementation manner, the first message further includes the first offset, or the second message further includes the first offset. When the first message or the second message includes the first offset, the above - mentioned S1033 can specifically include the following steps:
[0242] Step A: According to the address rule of the SID, offset the index value corresponding to each endpoint behavior by the first offset respectively to obtain the first offset address corresponding to each endpoint behavior.
[0243] Step B: Based on the boundary address of the first address space and the first offset address corresponding to each endpoint behavior, calculate the SID corresponding to each endpoint behavior respectively.
[0244] Wherein, when the boundary address of the first address space is the starting address of the first address space, step B specifically includes: calculating the sum of the starting address and the first offset address corresponding to each endpoint behavior respectively; if each calculated sum value is within the first address space, then using each calculated sum value as the SID of each endpoint behavior respectively.
[0245] Alternatively, when the boundary address of the first address space is the end address of the first address space, step B specifically includes: calculating the difference between the starting address and the first offset address corresponding to each endpoint behavior respectively; if each calculated difference value is within the first address space, then determining each calculated difference value as the SID of each endpoint behavior respectively.
[0246] In step B, the method for calculating the SID corresponding to each endpoint behavior based on the boundary address of the first address space and each first offset address is the same as the method for calculating the first SID based on the boundary address of the first address space and the first offset address in the above embodiment. For relevant descriptions, reference can be made to the above embodiment and will not be elaborated here.
[0247] In Figure 11 In the corresponding embodiment, the first message may include a fifth sub-TLV, and the fifth sub-TLV includes a block identification field, a starting SID field, an ending SID field, a flag bit field, an algorithm field, a weight field, a behavior quantity field, and an endpoint behavior field.
[0248] Wherein, the block identification field is used to carry the first Block identification; the starting SID field is used to carry the starting address of the first address space; the ending SID field is used to carry the end address of the first address space.
[0249] The flag bit field is used to carry a shared flag bit, and the shared flag bit is shared by multiple SIDs included in the Block characterized by the first Block identification; the algorithm field is used to carry a shared algorithm, and the shared algorithm is shared by multiple SIDs included in the Block characterized by the first Block identification; the weight field is used to carry a shared weight, and the shared weight is shared by multiple SIDs included in the Block characterized by the first Block identification.
[0250] The behavior quantity field is used to carry the quantity of endpoint behaviors; each endpoint behavior is used to carry an endpoint behavior.
[0251] Optionally, the first message above may be a link state message, and the fifth sub-TLV may be a Rule-based End.X SID Block sub-TLV included in the link state message. According to the current protocol regulations, the link state message includes an SRv6 Locator TLV. The fifth sub-TLV in the embodiments of the present application is a sub-TLV of the SRv6 Locator TLV, but the embodiments of the present application do not limit this. The fifth sub-TLV may also be a sub-TLV of other TLVs included in the first message.
[0252] As Figure 12-a shown, Figure 12-a FIG. is a schematic diagram of a Rule-based End.X SID Block sub-TLV provided by an embodiment of the present application. According to the current protocol regulations, the Rule-based End.X SID Block sub-TLV includes a type field, a length field, a next-level sub-TLV length field (Sub-sub-tlv-len), and a next-level sub-TLV field (Sub-sub-TLVs). In the embodiments of the present application, in addition to the above fields, the Rule-based End.X SID Block sub-TLV further includes a block identifier field, a start SID field, an end SID field, a flag bit field, an algorithm field, a weight field, a behavior quantity field, and an endpoint behavior field.
[0253] Optionally, the Rule-based End.X SID Block sub-TLV may further include an offset field, and the offset field may carry a first offset, which is used to represent the offset of the boundary address of the address space corresponding to the block identifier included in the Rule-based End.X SID Block sub-TLV. Figure 12-a Taking one block identifier as an example, it can be understood that when the Rule-based End.X SID Block sub-TLV includes multiple block identifiers, the first offset can be used to represent the offset of the boundary address of the address space corresponding to each block identifier.
[0254] The number of bits occupied by the fields originally included in the Rule-based End.X SID Block sub-TLV is the number of bits specified by the IS-IS protocol. The number of bits occupied by the newly added fields can be set based on actual requirements, and the embodiments of the present application do not limit this. Figure 12-a Only for illustration, the lengths of the fields and the arrangement order of the fields are not limited to this.
[0255] In Figure 11In the corresponding embodiment, the second message may include a sixth sub-TLV or a seventh sub-TLV.
[0256] The sixth sub-TLV is used to carry the index of the link SID of the P2P adjacency type; the sixth sub-TLV includes a block identification field, an index length field, and a start index field.
[0257] The seventh sub-TLV is used to carry the index of the link SID of the LAN adjacency type; the seventh sub-TLV includes a block identification field, an index length field, and a start index field.
[0258] Among them, the block identification field is used to carry the second Block identification; the index length field is used to carry the length of the start index field; the start index field is used to carry the above start index value.
[0259] Optionally, the above second message may be a link state message, the sixth sub-TLV may be a Rule-based End.X SID Index sub-TLV included in the link state message, and the seventh sub-TLV may be a Rule-based LAN End.X SID Index sub-TLV included in the link state message. According to the current protocol regulations, the sixth sub-TLV and the seventh sub-TLV in the embodiments of the present application may be sub-TLVs of the above TLV-22, TLV-23, TLV-25, TLV-141, TLV-222, or TLV-223. However, the embodiments of the present application are not limited thereto, and the sixth sub-TLV and the seventh sub-TLV may also be sub-TLVs of other TLVs included in the second message.
[0260] Figure 12-b It is a schematic diagram of a Rule-based End.X SID Index sub-TLV provided by an embodiment of the present application; Figure 12-c It is a schematic diagram of a Rule-based LAN End.X SID Index sub-TLV provided by an embodiment of the present application.
[0261] According to the current protocol regulations, both the Rule-based End.X SID Index sub-TLV and the Rule-based LAN End.X SID Index sub-TLV include a type field and a length field. In the embodiments of the present application, the flag field, algorithm field, and weight field originally included in the Rule-based End.X SID Index sub-TLV and the Rule-based LAN End.X SID Index sub-TLV are carried in the above-mentioned fifth sub-TLV. The sixth sub-TLV and the seventh sub-TLV that share the same Block identifier as the fifth sub-TLV can share the flag field, algorithm field, and weight field carried by the fifth sub-TLV. In this way, the message overhead in the link SID publishing process can be further reduced.
[0262] In the embodiments of the present application, the Rule-based End.X SID Index sub-TLV and the Rule-based LAN End.X SID Index sub-TLV may further include a block identifier field, an index length field, and a start index field. That is, the Rule-based End.X SID Index sub-TLV and the Rule-based LAN End.X SID Index sub-TLV do not need to carry the indexes of all link SIDs that need to be announced, but only need to carry the index of the first link SID among multiple consecutively indexed link SIDs. In this way, the message overhead in the link SID publishing process can be further reduced.
[0263] Optionally, the sixth sub-TLV (Rule-based End.X SID Index sub-TLV) may further include an offset field, and the seventh sub-TLV (Rule-based LAN End.X SID Index sub-TLV) also includes an offset field, and this offset field is used to carry a first offset.
[0264] The first offset included in the Rule-based End.X SID Index sub-TLV is used to represent the offset of the boundary address of the address space corresponding to the block identifier included in the Rule-based End.X SID Index sub-TLV. The first offset included in the Rule-based LAN End.X SID Index sub-TLV is used to represent the offset of the boundary address of the address space corresponding to the block identifier included in the Rule-based LAN End.X SID Index sub-TLV.
[0265] The number of bits occupied by the fields originally included in the Rule-based End.X SID Index sub-TLV and the Rule-based LAN End.X SID Index sub-TLV is the number of bits specified by the IS-IS protocol. The number of bits occupied by the newly added fields can be set based on actual requirements, and the embodiments of the present application do not limit this. Figure 12-b and Figure 12-c For example only, the length of each field and the arrangement order of each field are not limited to this.
[0266] In an optional embodiment, on the basis of the above embodiment, Figure 9 In the embodiment shown, the first device may store multiple SIDs with consecutive indexes, and the first SID among the multiple SIDs with consecutive indexes is the second SID. That is to say, the second index value included in the fourth message is the index value of the first SID among the multiple SIDs with consecutive indexes. The above third message further includes the number of endpoint behaviors and endpoint behaviors. The number of endpoint behaviors is the number of SIDs with consecutive indexes, and the above multiple SIDs with consecutive indexes correspond one by one to the endpoint behaviors included in the third message.
[0267] Among them, the sub-TLV included in the third message may be Figure 12-a the same as the TLV structure shown, and the sub-TLV included in the third message may be Figure 12-b or Figure 12-c the same as the TLV structure shown.
[0268] Based on the same inventive concept, according to the segment identifier determination method provided by the embodiments of the present application above, the embodiments of the present application further provide a segment identifier determination device. As Figure 13-a shown, Figure 13-a This is the first structural schematic diagram of the segment identifier device provided by the embodiments of the present application. This device is applied to the above-mentioned first device and specifically includes the following modules.
[0269] A receiving module 1301, configured to receive a first message and a second message sent by a second device; wherein, the first message includes at least one first Block identifier and the boundary address of the address space corresponding to each first Block identifier; the second message includes at least one second Block identifier and a first index value;
[0270] A calculation module 1302, configured to calculate a first SID by using the boundary address of the first address space corresponding to the same Block and the first index value, where the same Block is the Block represented by the same Block identifier among at least one first Block identifier and at least one second Block identifier.
[0271] Optionally, the first message further includes a first offset, or the second message further includes a first offset; the calculation module 1302 is specifically configured to calculate a first SID according to the boundary address of the first address space, the first offset, and the first index value.
[0272] Optionally, the boundary address of the first address space is the starting address of the first address space;
[0273] The calculation module 1302 may specifically be configured to offset the first index value by the first offset according to the address rule of the SID to obtain a first offset address; and determine the first SID according to the starting address and the first offset address.
[0274] Optionally, the calculation module 1302 may specifically be configured to calculate the sum of the starting address and the first offset address; if the SID corresponding to the sum value is within the first address space, use the SID corresponding to the sum value as the first SID.
[0275] Optionally, the boundary address of the first address space is the end address of the first address space.
[0276] The calculation module 1302 may specifically be configured to offset the first index value by the first offset according to the address rule of the SID to obtain a second offset address; and determine the first SID according to the end address and the second offset address.
[0277] Optionally, the calculation module 1302 may specifically be configured to calculate the difference between the end address and the second offset address; if the SID corresponding to the difference value is within the first address space, determine the SID corresponding to the difference value as the first SID.
[0278] Optionally, the first message includes a first sub-TLV, and the first sub-TLV includes a block identification field, a starting SID field, and an end SID field;
[0279] Wherein, the block identification field is used to carry at least one first Block identification; the starting SID field is used to carry the starting address of the address space corresponding to each first Block; the end SID field is used to carry the end address of the address space corresponding to each first Block.
[0280] Optionally, the first sub-TLV further includes an offset field, and the offset field is used to carry the first offset.
[0281] Optionally, the second message includes a second sub-TLV, a third sub-TLV, or a fourth sub-TLV;
[0282] The second sub-TLV is used to carry the index of the link SID of the point-to-point P2P adjacency type; the second sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field;
[0283] The third sub-TLV is used to carry the index of the link SID of the local area network LAN adjacency type; the third sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field;
[0284] The fourth sub-TLV is used to carry the index of the device SID; the fourth sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field;
[0285] Wherein, the block identification field is used to carry the second Block identification; the index quantity field is used to carry the index quantity; the index length field is used to carry the index length; each index field is used to carry an index value; each endpoint behavior field is used to carry the endpoint behavior corresponding to an index value.
[0286] Optionally, the second sub-TLV further includes an offset field, the third sub-TLV further includes an offset field, the fourth sub-TLV further includes an offset field, and the offset field is used to carry the first offset.
[0287] Optionally, the first message further includes the number of endpoint behaviors and the endpoint behaviors; the first index value is the starting index value, and the starting index value is the index value corresponding to the first endpoint behavior included in the first message;
[0288] The calculation module 1302 can specifically be used to calculate the index value corresponding to each endpoint behavior included in the first message according to the number of endpoint behaviors and the starting index value; and calculate the SID corresponding to each endpoint behavior respectively based on the boundary address of the first address space and the index value corresponding to each endpoint behavior included in the first message.
[0289] Optionally, the calculation module 1302 can specifically be used to: use the sum value of the starting index value and N as the index value corresponding to the Nth endpoint behavior included in the first message, where the value range of N is from 0 to the difference between the number of endpoint behaviors and 1.
[0290] Optionally, the first message further includes the first offset, or the second message further includes the first offset;
[0291] The calculation module 1302 can be specifically used to respectively offset the index value corresponding to each endpoint behavior by a first offset according to the address rule of the SID, so as to obtain the first offset address corresponding to each endpoint behavior; based on the boundary address of the first address space and the first offset address corresponding to each endpoint behavior, calculate the SID corresponding to each endpoint behavior respectively.
[0292] Optionally, the boundary address of the first address space is the starting address of the first address space;
[0293] The calculation module 1302 can be specifically used to respectively calculate the sum of the starting address and the first offset address corresponding to each endpoint behavior; if each calculated sum value is within the first address space, then use each calculated sum value as the SID corresponding to each endpoint behavior respectively.
[0294] Optionally, the boundary address of the first address space is the end address of the first address space;
[0295] The calculation module 1302 is specifically used to respectively calculate the difference between the starting address and the first offset address corresponding to each endpoint behavior; if each calculated difference value is within the first address space, then use each calculated difference value as the SID corresponding to each endpoint behavior respectively.
[0296] Optionally, the first message includes a fifth sub-TLV, and the fifth sub-TLV includes a block identification field, a starting SID field, an ending SID field, a flag bit field, an algorithm field, a weight field, a behavior quantity field, and an endpoint behavior field;
[0297] Among them, the block identification field is used to carry the first Block identification; the starting SID field is used to carry the starting address of the first address space; the ending SID field is used to carry the end address of the first address space; the flag bit field is used to carry a shared flag bit, and the shared flag bit is shared by multiple SIDs included in the Block represented by the first Block identification;
[0298] The algorithm field is used to carry a shared algorithm, and the shared algorithm is shared by multiple SIDs included in the Block represented by the first Block identification; the weight field is used to carry a shared weight, and the shared weight is shared by multiple SIDs included in the Block represented by the first Block identification; the behavior quantity field is used to carry the number of endpoint behaviors; each endpoint behavior is used to carry an endpoint behavior.
[0299] Optionally, the fifth sub-TLV further includes an offset field, and the offset field is used to carry the first offset.
[0300] Optionally, the second message includes a sixth sub-TLV or a seventh sub-TLV;
[0301] The sixth sub-TLV is used to carry the index of the link SID of the point-to-point P2P adjacency type; the sixth sub-TLV includes a block identification field, an index length field, and a starting index field;
[0302] The seventh sub-TLV is used to carry the index of the link SID of the local area network LAN adjacency type; the seventh sub-TLV includes a block identification field, an index length field, and a starting index field;
[0303] Among them, the block identification field is used to carry the second Block identification; the index length field is used to carry the length of the starting index field; the starting index field is used to carry the starting index value.
[0304] Optionally, the sixth sub-TLV further includes an offset field, and the seventh sub-TLV further includes an offset field, and the offset field is used to carry the first offset.
[0305] Optionally, the first device stores the second SID; as Figure 13-b shown, the above segment identification determination device may further include:
[0306] An acquisition module 1303, configured to acquire the stored second SID;
[0307] A first determination module 1304, configured to determine the target Block to which the second SID belongs according to the corresponding relationship between each pre-divided Block and the address space;
[0308] A second determination module 1305, configured to determine the second index value corresponding to the second SID according to the corresponding relationship between each SID and the index value in the second address space corresponding to the target Block;
[0309] A sending module 1306, configured to send a third message and a fourth message to each neighbor device, where the third message includes the third Block identification of the target Block, the second offset, and the boundary address of the second address space, and the fourth message includes the third Block identification and the second index value.
[0310] Optionally, the first device stores multiple SIDs with consecutive indexes, and the first SID among the multiple SIDs with consecutive indexes is the second SID;
[0311] The third message further includes the number of endpoint behaviors and the endpoint behaviors, and the number of endpoint behaviors is the number of SIDs with consecutive indexes; the multiple SIDs with consecutive indexes correspond to the endpoint behaviors included in the third message one by one.
[0312] Optionally, a calculation module 1302, configured to calculate the second offset of the boundary address of the second address space according to the attribute characteristics of each address in the second address space.
[0313] Based on the same inventive concept, according to the segment identifier determination method provided in the embodiments of the present application above, embodiments of the present application also provide an electronic device, as Figure 14 shown, including a processor 1401, a machine-readable storage medium 1402, and a transceiver 1404. The machine-readable storage medium 1402 stores machine-executable instructions that can be executed by the processor 1401; the machine-executable instructions cause the processor 1401 to perform the following steps:
[0314] Receive a first message and a second message sent by a second device through the transceiver 1404; wherein, the first message includes at least one first Block identifier and the boundary address of the address space corresponding to each first Block identifier; the second message includes at least one second Block identifier and a first index value;
[0315] Use the boundary address of the first address space and the first index value corresponding to the same Block to calculate a first SID, where the same Block is the Block represented by the same Block identifier among at least one first Block identifier and at least one second Block identifier.
[0316] Optionally, the first message further includes a first offset, or the second message further includes a first offset; the machine-executable instructions cause the processor 1401 to perform the following steps: calculate the first SID according to the boundary address of the first address space, the first offset, and the first index value.
[0317] Optionally, the boundary address of the first address space is the starting address of the first address space;
[0318] The machine-executable instructions further cause the processor 1401 to perform the following steps: offset the first index value by the first offset according to the address rule of the SID to obtain a first offset address; calculate the first SID according to the starting address and the first offset address.
[0319] Optionally, the machine-executable instructions further cause the processor 1401 to perform the following steps: calculate the sum value of the starting address and the first offset address; if the SID corresponding to the sum value is within the first address space, use the SID corresponding to the sum value as the first SID.
[0320] Optionally, the boundary address of the first address space is the end address of the first address space;
[0321] The machine-executable instructions further cause the processor 1401 to perform the following steps: offset the first index value by the first offset according to the address rule of the SID to obtain a second offset address; calculate the first SID according to the end address and the second offset address.
[0322] Optionally, the machine-executable instructions further cause the processor 1401 to perform the following steps:
[0323] Calculate the difference between the end address and the second offset address; if the SID corresponding to the difference is within the first address space, use the SID corresponding to the difference as the first SID.
[0324] Optionally, the first message includes a first sub-TLV, and the first sub-TLV includes a block identification field, a start SID field, and an end SID field; wherein, the block identification field is used to carry at least one first Block identification; the start SID field is used to carry the start address of the address space corresponding to each first Block; the end SID field is used to carry the end address of the address space corresponding to each first Block.
[0325] Optionally, the first sub-TLV further includes an offset field, and the offset field is used to carry a first offset.
[0326] Optionally, the second message includes a second sub-TLV, a third sub-TLV, or a fourth sub-TLV;
[0327] The second sub-TLV is used to carry the index of the link SID of the point-to-point P2P adjacency type; the second sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field;
[0328] The third sub-TLV is used to carry the index of the link SID of the local area network LAN adjacency type; the third sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field;
[0329] The fourth sub-TLV is used to carry the index of the device SID; the fourth sub-TLV includes a block identification field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field;
[0330] Wherein, the block identification field is used to carry a second Block identification; the index quantity field is used to carry the index quantity; the index length field is used to carry the index length; each index field is used to carry an index value; each endpoint behavior field is used to carry the endpoint behavior corresponding to an index value.
[0331] Optionally, the second sub-TLV further includes an offset field, the third sub-TLV further includes an offset field, and the fourth sub-TLV further includes an offset field, and the offset field is used to carry a first offset.
[0332] Optionally, the first message further includes the number of endpoint behaviors and the endpoint behaviors; the first index value is the starting index value, and the starting index value is the index value corresponding to the first endpoint behavior included in the first message;
[0333] The machine-executable instructions cause the processor 1401 to perform the following steps: Calculate the index value corresponding to each endpoint behavior included in the first message according to the number of endpoint behaviors and the starting index value; Calculate the SID corresponding to each endpoint behavior respectively based on the boundary address of the first address space and the index value corresponding to each endpoint behavior included in the first message.
[0334] Optionally, the machine-executable instructions cause the processor 1401 to perform the following steps:
[0335] Use the sum value of the starting index value and N as the index value corresponding to the Nth endpoint behavior included in the first message, where the value range of N is from 0 to the difference between the number of endpoint behaviors and 1.
[0336] Optionally, the first message further includes a first offset, or the second message further includes a first offset; the machine-executable instructions cause the processor 1401 to perform the following steps: Offset the index value corresponding to each endpoint behavior by the first offset respectively according to the address rule of the SID to obtain the first offset address corresponding to each endpoint behavior; Calculate the SID corresponding to each endpoint behavior respectively based on the boundary address of the first address space and the first offset address corresponding to each endpoint behavior.
[0337] Optionally, the boundary address of the first address space is the starting address of the first address space; the machine-executable instructions cause the processor 1401 to perform the following steps: Calculate the sum value of the starting address and the first offset address corresponding to each endpoint behavior respectively; If each calculated sum value is within the first address space, use each calculated sum value as the SID corresponding to each endpoint behavior respectively.
[0338] Optionally, the boundary address of the first address space is the end address of the first address space; the machine-executable instructions cause the processor 1401 to perform the following steps: Calculate the difference value between the starting address and the first offset address corresponding to each endpoint behavior respectively; If each calculated difference value is within the first address space, use each calculated difference value as the SID corresponding to each endpoint behavior respectively.
[0339] Optionally, the first message includes a fifth sub-TLV, and the fifth sub-TLV includes a block identification field, a starting SID field, an end SID field, a flag bit field, an algorithm field, a weight field, a behavior number field, and an endpoint behavior field;
[0340] Among them, the block identification field is used to carry the first Block identification; the starting SID field is used to carry the starting address of the first address space; the ending SID field is used to carry the ending address of the first address space; the flag bit field is used to carry the sharing flag bit, and the sharing flag bit is shared by multiple SIDs included in the Block represented by the first Block identification; the algorithm field is used to carry the sharing algorithm, and the sharing algorithm is shared by multiple SIDs included in the Block represented by the first Block identification; the weight field is used to carry the sharing weight, and the sharing weight is shared by multiple SIDs included in the Block represented by the first Block identification; the behavior quantity field is used to carry the number of endpoint behaviors; each endpoint behavior is used to carry an endpoint behavior.
[0341] Optionally, the fifth sub-TLV further includes an offset field, and the offset field is used to carry the first offset.
[0342] Optionally, the second message includes a sixth sub-TLV or a seventh sub-TLV; the sixth sub-TLV is used to carry the index of the link SID of the peer-to-peer P2P adjacency type; the sixth sub-TLV includes a block identification field, an index length field, and a starting index field; the seventh sub-TLV is used to carry the index of the link SID of the local area network LAN adjacency type; the seventh sub-TLV includes a block identification field, an index length field, and a starting index field; among them, the block identification field is used to carry the second Block identification; the index length field is used to carry the length of the starting index field; the starting index field is used to carry the starting index value.
[0343] Optionally, the sixth sub-TLV further includes an offset field, and the seventh sub-TLV further includes an offset field, and the offset field is used to carry the first offset.
[0344] Optionally, the first device stores a second SID; the machine-executable instruction causes the processor 1401 to perform the following steps: obtain the stored second SID; determine the target Block to which the second SID belongs according to the corresponding relationship between each pre-divided Block and the address space; determine the second index value corresponding to the second SID according to the corresponding relationship between each SID and the index value in the second address space corresponding to the target Block; send a third message and a fourth message to each neighbor device through the transceiver 1404, the third message includes the third Block identification of the target Block and the boundary address of the second address space, and the fourth message includes the third Block identification and the second index value.
[0345] Optionally, the first device stores multiple SIDs with consecutive indexes, and the first SID among the multiple SIDs with consecutive indexes is the second SID;
[0346] The third message further includes the number of endpoint behaviors and the endpoint behaviors. The number of endpoint behaviors is the number of consecutively indexed SIDs; the multiple consecutively indexed SIDs correspond one-to-one to the endpoint behaviors included in the third message.
[0347] Optionally, the third message further includes a second offset, or the fourth message further includes a second offset; the machine-executable instructions cause the processor 1401 to perform the following steps: calculate a second offset of the boundary address of the second address space according to the attribute characteristics of each address in the second address space.
[0348] As Figure 14 shown, the electronic device may further include a communication bus 1403. Communication among the processor 1401, the machine-readable storage medium 1402, and the transceiver 1404 is completed via the communication bus 1403. The communication bus 1403 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 1403 may be divided into an address bus, a data bus, a control bus, etc.
[0349] The transceiver 1404 may be a wireless communication module. Under the control of the processor 1401, the transceiver 1404 performs data interaction with other devices (AC and terminals).
[0350] The machine-readable storage medium 1402 may include a Random Access Memory (RAM), and may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Additionally, the machine-readable storage medium 1402 may also be at least one storage device located away from the aforementioned processor.
[0351] The processor 1401 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0352] Based on the same inventive concept, according to the segment identification determination method provided in the embodiments of the present application above, the embodiments of the present application further provide a machine-readable storage medium, which stores machine-executable instructions that can be executed by a processor. The processor is prompted by the machine-executable instructions to implement the steps of any of the above segment identification determination methods.
[0353] In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when running on a computer, causes the computer to execute the steps of any of the segment identification determination methods in the above embodiments.
[0354] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0355] Each embodiment in this specification is described in a related manner. The same or similar parts among the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the segment identification determination device, equipment and machine-readable storage medium, and the embodiments of the machine-readable storage medium, since they are basically similar to the embodiments of the segment identification determination method, the description is relatively simple, and the relevant parts can be referred to the partial description of the embodiments of the segment identification determination method.
[0356] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.
Claims
1. A method for determining a segment identifier, characterized in that, A first device applied to an SRv6 network, the SRv6 network further including a second device, the first device and the second device being neighbor devices to each other, the second device storing a first segment identifier SID, the method comprising: Receiving a first message and a second message sent by the second device; wherein, the first message includes at least one first Block identifier and the boundary address of the address space corresponding to each first Block identifier; the second message includes at least one second Block identifier and a first index value; Calculating the first SID by using the boundary address of the first address space corresponding to the same Block and the first index value, the same Block being the Block represented by the same Block identifier among the at least one first Block identifier and the at least one second Block identifier.
2. The method according to claim 1, wherein, The first message includes a first sub-TLV, the first sub-TLV including a block identifier field, a start SID field, and an end SID field; Wherein, the block identifier field is used to carry the at least one first Block identifier; The start SID field is used to carry the start address of the address space corresponding to each first Block; The end SID field is used to carry the end address of the address space corresponding to each first Block.
3. The method according to claim 2, wherein The first sub-TLV further includes an offset field, the offset field being used to carry a first offset.
4. The method according to claim 1, wherein The second message includes a second sub-TLV, a third sub-TLV, or a fourth sub-TLV; The second sub-TLV is used to carry the index of the link SID of the point-to-point P2P adjacency type; the second sub-TLV includes a block identifier field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field; The third sub-TLV is used to carry the index of the link SID of the local area network LAN adjacency type; the third sub-TLV includes a block identifier field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field; The fourth sub-TLV is used to carry the index of the device SID; the fourth sub-TLV includes a block identifier field, an index quantity field, an index length field, at least one index field, and an endpoint behavior field corresponding to each index field; Wherein, the block identifier field is used to carry the second Block identifier; The index quantity field is used to carry the index quantity; The index length field is used to carry the index length; Each index field is used to carry an index value; Each endpoint behavior field is used to carry the endpoint behavior corresponding to an index value.
5. The method according to claim 4, wherein The second sub-TLV further includes an offset field, the third sub-TLV further includes an offset field, the fourth sub-TLV further includes an offset field, the offset field being used to carry a first offset.
6. The method according to claim 1, characterized in that, The first message further includes the number of endpoint behaviors and the endpoint behaviors; The first index value is a start index value, the start index value being the index value corresponding to the first endpoint behavior included in the first message; Calculating the first SID by using the boundary address of the first address space corresponding to the same Block and the first index value specifically includes: Calculating the index value corresponding to each endpoint behavior included in the first message according to the number of endpoint behaviors and the starting index value; Based on the boundary address of the first address space and the index value corresponding to each endpoint behavior included in the first message, calculating the SID corresponding to each endpoint behavior respectively.
7. The method according to claim 6, characterized in that, The calculating the index value corresponding to each endpoint behavior included in the first message according to the number of endpoint behaviors and the starting index value specifically includes: Taking the sum value of the starting index value and N as the index value corresponding to the Nth endpoint behavior included in the first message, where the value range of N is from 0 to the difference between the number of endpoint behaviors and 1.
8. The method according to claim 6 or 7, characterized in that, The first message further includes a first offset, or the second message further includes a first offset; The calculating the SID corresponding to each endpoint behavior respectively based on the boundary address of the first address space and the index value corresponding to each endpoint behavior included in the first message includes: According to the address rule of the SID, offsetting the index value corresponding to each endpoint behavior by the first offset respectively to obtain the first offset address corresponding to each endpoint behavior; Based on the boundary address of the first address space and the first offset address corresponding to each endpoint behavior, calculating the SID corresponding to each endpoint behavior respectively.
9. The method according to claim 8, wherein The boundary address of the first address space is the starting address of the first address space; The calculating the SID corresponding to each endpoint behavior respectively based on the boundary address of the first address space and the first offset address corresponding to each endpoint behavior includes: Calculating the sum value of the starting address and the first offset address corresponding to each endpoint behavior respectively; If each calculated sum value is within the first address space, taking each calculated sum value as the SID of each endpoint behavior respectively.
10. The method according to claim 8, wherein The boundary address of the first address space is the end address of the first address space; The calculating the SID corresponding to each endpoint behavior respectively based on the boundary address of the first address space and the first offset address corresponding to each endpoint behavior includes: Calculating the difference between the starting address and the first offset address corresponding to each endpoint behavior respectively; If each calculated difference is within the first address space, taking each calculated difference as the SID of each endpoint behavior respectively.
11. The method according to claim 6, wherein The first message includes a fifth sub-TLV, and the fifth sub-TLV includes a block identification field, a starting SID field, an end SID field, a flag bit field, an algorithm field, a weight field, a behavior number field, and an endpoint behavior field; Wherein, the block identification field is used to carry the first Block identification; The starting SID field is used to carry the starting address of the first address space; The end SID field is used to carry the end address of the first address space; The flag bit field is used to carry a shared flag bit, and the shared flag bit is shared by multiple SIDs included in the Block represented by the first Block identification; The algorithm field is used to carry a shared algorithm, and the shared algorithm is shared by multiple SIDs included in the Block characterized by the first Block identifier; The weight field is used to carry a shared weight, and the shared weight is shared by multiple SIDs included in the Block characterized by the first Block identifier; The behavior quantity field is used to carry the quantity of endpoint behaviors; Each endpoint behavior is used to carry one endpoint behavior.
12. The method according to claim 11, wherein The fifth sub-TLV further includes an offset field, and the offset field is used to carry a first offset.
13. The method according to claim 6, wherein The second message includes a sixth sub-TLV or a seventh sub-TLV; The sixth sub-TLV is used to carry an index of a link SID of a point-to-point P2P adjacency type; the sixth sub-TLV includes a block identifier field, an index length field, and a start index field; The seventh sub-TLV is used to carry an index of a link SID of a local area network LAN adjacency type; the seventh sub-TLV includes a block identifier field, an index length field, and a start index field; Wherein, the block identifier field is used to carry the second Block identifier; The index length field is used to carry the length of the start index field; The start index field is used to carry the start index value.
14. The method according to claim 13, wherein The sixth sub-TLV further includes an offset field, the seventh sub-TLV further includes an offset field, and the offset field is used to carry a first offset.
15. The method according to claim 1, wherein The first device stores a second SID; The method further includes: Obtaining the stored second SID; Determining a target Block to which the second SID belongs according to the corresponding relationship between each pre-divided Block and the address space; Determining a second index value corresponding to the second SID according to the corresponding relationship between each SID and the index value in the second address space corresponding to the target Block; Sending a third message and a fourth message to each neighbor device, where the third message includes a third Block identifier of the target Block and a boundary address of the second address space, and the fourth message includes the third Block identifier and the second index value.
16. The method according to claim 15, wherein The first device stores multiple SIDs with consecutive indexes, and the first SID among the multiple SIDs with consecutive indexes is the second SID; The third message further includes a quantity of endpoint behaviors and endpoint behaviors, and the quantity of endpoint behaviors is the quantity of SIDs with consecutive indexes; the multiple SIDs with consecutive indexes correspond to the endpoint behaviors included in the third message one by one.
17. The method according to claim 15 or 16, characterized in that, The third message further includes a second offset, or the fourth message further includes a second offset; Before sending the third message and the fourth message to each neighbor device, the method further includes: Calculating the second offset of the boundary address of the second address space according to the attribute characteristics of each address in the second address space.
18. An electronic device, characterized in that, The electronic device is the first device in the SRv6 network, and the SRv6 network further includes a second device. The first device and the second device are neighbor devices to each other. The second device stores a first segment identifier (SID). The electronic device includes: a processor; a transceiver; a machine-readable storage medium storing machine-executable instructions executable by the processor; the machine-executable instructions cause the processor to perform the following steps: receive, via the transceiver, a first message and a second message sent by the second device; wherein, the first message includes at least one first Block identifier and the boundary address of the address space corresponding to each first Block identifier; the second message includes at least one second Block identifier and a first index value; calculate the first SID by using the boundary address of the first address space corresponding to the same Block and the first index value, where the same Block is the Block represented by the same Block identifier among the at least one first Block identifier and the at least one second Block identifier.
19. The electronic device according to claim 18, characterized in that, The machine-executable instructions further cause the processor to perform the method steps recited in any one of claims 2-17.
20. A machine-readable storage medium, characterized in that, store machine-executable instructions which, when called and executed by the processor, cause the processor to: implement the method steps recited in any one of claims 1-17.
Citation Information
Patent Citations
Indexed segment id
US20140254596A1
Scalable segment identifier allocation in segment routing
US20150326675A1
Enhanced flexible-algorithm definition
US20200344151A1