CN113132229B - Segment identifier determination method and device - Google Patents

Segment identifier determination method and device Download PDF

Info

Publication number
CN113132229B
CN113132229B CN201911395279.7A CN201911395279A CN113132229B CN 113132229 B CN113132229 B CN 113132229B CN 201911395279 A CN201911395279 A CN 201911395279A CN 113132229 B CN113132229 B CN 113132229B
Authority
CN
China
Prior art keywords
network device
identifier
segment
identification information
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911395279.7A
Other languages
Chinese (zh)
Other versions
CN113132229A (en
Inventor
王其华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911395279.7A priority Critical patent/CN113132229B/en
Priority to PCT/CN2020/118937 priority patent/WO2021135468A1/en
Publication of CN113132229A publication Critical patent/CN113132229A/en
Application granted granted Critical
Publication of CN113132229B publication Critical patent/CN113132229B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/06Deflection routing, e.g. hot-potato routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Abstract

The application discloses a segment identifier determining method and device, and belongs to the technical field of SR. In the method, the first network device may determine a second segment identifier corresponding to the second network device from the first segment identifier corresponding to the second network device. Because the first segment identifier includes the first identifier information for identifying the autonomous domain to which the second network device belongs, and the second segment identifier does not include the first identifier information, the second segment identifier is equivalent to compressing the first segment identifier, and thus, the first network device can carry the compressed segment identifier in the message sent to the second network device, so as to reduce the pressure of the first network device serving as a head node for encapsulating the message. In addition, compressing the segment identifiers is also beneficial to improving the message forwarding efficiency.

Description

Segment identifier determination method and device
Technical Field
The present application relates to the field of Segment Routing (SR) technologies, and in particular, to a method, a device, and a system for determining a segment identifier.
Background
The SR technology is a routing technology in which a head node deploys a forwarding path at a network entry. The SR technology can be applied to a network supporting the sixth generation internet protocol version 6 (ipv 6), which is referred to as an SRv6 network. In an SRv6 network, a head node encapsulates a Segment Routing Header (SRH) in a message. The SRH includes a Segment Identification (SID) list field for indicating a forwarding path of the packet. The SID list field includes a plurality of SIDs, each of which may be used to identify a node or a link on the forwarding path. Since each SID is usually 128 bits (bit) at present, the number of bits included is large, which results in low efficiency of encapsulating the packet by the head node, and if the number of SIDs included in the SID list is large, the efficiency of encapsulating the packet by the head node is further reduced.
Disclosure of Invention
The application provides a method, equipment and a system for determining segment identifiers, which can improve the efficiency of message encapsulation of a head node and save network bandwidth resources. The technical scheme is as follows:
in a first aspect, a method for determining segment identifiers is provided, in which method: the method comprises the steps that a first segment identification corresponding to a second network device is determined by a first network device, the first segment identification comprises first identification information, and the first identification information is used for identifying an autonomous domain to which the second network device belongs. The first network device generates a second segment identification based on the first segment identification, the second segment identification not including the first identification information. And the first network equipment sends a message to the second network equipment, wherein the message comprises the second section identification.
In this application, the first network device may determine, according to the first segment identifier corresponding to the second network device, the second segment identifier corresponding to the second network device. Since the first segment identification includes first identification information for identifying an autonomous domain to which the second network device belongs, and the second segment identification does not include the first identification information. The second segment identifier is equivalent to the first segment identifier compressed, so that the first network device can carry the compressed segment identifier in a message sent to the second network device, so as to reduce the pressure of the first network device serving as a head node to package the message. In addition, compressing the segment identifier is also beneficial to improving the message forwarding efficiency. It should be noted that the first segment identifier corresponding to the second network device is used to identify a corresponding relationship between the second network device and the first segment identifier. The first segment identifier is an original segment identifier before compression, and the correspondence relationship is, for example, that the first segment identifier is used to identify a second network device, or that the first segment identifier is used to identify a link from another network device to the second network device, where the another network device is, for example, a previous hop device of the second network device, or that the first segment identifier may be another type of segment identifier related to the second network device, or the like.
Optionally, in the method: the first network equipment determines a third segment identifier corresponding to third network equipment, wherein the third segment identifier comprises second identifier information and third identifier information, the second identifier information is used for identifying an autonomous domain to which the third network equipment belongs, and the third identifier information is used for identifying the third network equipment in the autonomous domain; the first network device generates a fourth segment identifier based on the third segment identifier, wherein the fourth segment identifier does not include the second identifier information and the third identifier information; and the first network equipment sends the message to the third network equipment, wherein the message comprises the fourth segment identifier.
In this application, for the third network device, the second identification information and the third identification information in the third segment identifier in the third network device may be compressed at the same time, so as to further reduce the pressure of the first network device serving as the head node to encapsulate the packet. In addition, further compressing the segment identifier is also more beneficial to improving the message forwarding efficiency.
Optionally, the second network device and the third network device are the same device, the first identification information and the second identification information are the same identification information, and the second segment identifier and the fourth segment identifier are the same segment identifier. That is, when the present application is applied, the segment identifier corresponding to the second network device may also be compressed by compressing the segment identifier corresponding to the third network device.
Optionally, in the method: the first network device determines a plurality of segment identifiers corresponding to a plurality of network devices, wherein the plurality of segment identifiers respectively comprise the same fourth identification information; the first network device generates a fifth segment identifier based on the plurality of segment identifiers, wherein the fifth segment identifier includes the fourth identifier information and fifth identifier information, and the fifth identifier information is used for identifying the number of the plurality of network devices; and the first network equipment sends the message, wherein the message comprises the fifth segment of identification.
In this application, for a network device having a plurality of identical fourth identification information, a compressed fifth segment identification may be generated in a unified manner for nodes having the identical fourth identification information, and the compressed fifth segment identification only needs to include the identical fourth identification information and the number of the plurality of network devices, so as to further reduce the pressure of the first network device serving as a head node to encapsulate a packet. In addition, further compressing the segment identifiers is also more beneficial to improving the message forwarding efficiency.
Optionally, the fifth segment of identification does not include the first identification information and sixth identification information respectively corresponding to the plurality of network devices, and the sixth identification information is respectively used for uniquely identifying the plurality of network devices in an autonomous domain to which the plurality of network devices belong.
For the network device having a plurality of identical fourth identification information, in addition to compressing the fourth identification information, the first identification information and the sixth identification information may be further compressed, so as to further reduce the pressure of the first network device serving as the head node to encapsulate the packet. In addition, further compressing the segment identifier is also more beneficial to improving the message forwarding efficiency.
Optionally, the plurality of network devices include a second network device, and the second segment identifier and the fifth segment identifier are the same segment identifier. That is, the second network device may be one of the plurality of network devices having the same fourth identification information.
Optionally, the packet further includes seventh identification information, where the seventh identification information is used to identify a policy for generating the second segment identifier by the first network device.
Further, in order to facilitate that the intermediate node on the packet forwarding path can quickly determine the destination address of the forwarded packet according to the compressed segment identifier, the packet may also carry the seventh identifier information, so that the subsequent intermediate node can quickly restore the segment identifier before compression according to the policy of generating the compressed segment identifier, that is, the compression scheme, to obtain the destination address of the forwarded packet.
Optionally, the specific process of the first network device determining the plurality of segment identifiers corresponding to the plurality of network devices is as follows: the first network device determines a plurality of segment identifiers corresponding to a plurality of network devices based on Interior Gateway Protocol (IGP) messages respectively sent by the plurality of network devices; or, the first network device determines a plurality of segment identifiers corresponding to a plurality of network devices based on a control message sent by a control device.
In the embodiment of the present application, the segment identifier of each network device before compression may be issued by the network device itself, or may be issued by the control device in a unified manner, so as to improve flexibility of issuing the segment identifier.
In a second aspect, a method for determining segment identifiers is provided, in which: a first network device receives a message, wherein the message comprises a first segment identifier corresponding to a second network device; the first network equipment determines first identification information corresponding to the second network equipment, wherein the first identification information is used for identifying an autonomous domain to which the second network equipment belongs; the first network equipment generates a second section identification corresponding to the second network equipment based on the first identification information and the first section identification; and the first network equipment sends the message to the second network equipment based on the second section identification.
In this application, after the head node compresses the segment identifier of each node on the packet forwarding path in the manner provided by the first aspect, when the first network device receives the packet, the first network device may obtain the compressed part in the segment identifier, and then restore the packet before compression of the second network device, so as to obtain the destination address for forwarding the packet. Since the head node compresses the segment identifier of each node, the bandwidth occupied by the transmission message between the first network device and the second network device is reduced, thereby improving the efficiency of forwarding the message.
Optionally, the second network device is a next hop device of the first network device, in this case, in the method, the first network device determines second identification information, where the second identification information is used to identify the second network device in the autonomous domain; the implementation process of the first network device generating, based on the first identification information and the first segment identifier, a second segment identifier corresponding to the second network device specifically includes: and the first network equipment generates the second section identification corresponding to the second network equipment based on the first identification information, the second identification information and the first section identification.
If the first identification information is compressed and the second identification information is compressed when the segment identification is compressed, the segment identification before compression can be restored based on the first identification information and the second identification information.
Optionally, a forwarding path of the packet includes multiple consecutive network devices, the multiple consecutive network devices correspond to multiple segment identifiers, the first network device is located on a first one of the multiple consecutive network devices on the forwarding path, the multiple segment identifiers include the same third identifier information, the first segment identifier includes the third identifier information and fourth identifier information, and the fourth identifier information is used to indicate the number of the multiple consecutive network devices. In this scenario, the sending, by the first network device, the packet to the second network device based on the second segment identifier includes: the first network device determines fifth identification information based on the fourth identification information; the first network device determines an updated first segment identifier, where the updated first segment identifier includes the third identifier information and the fifth identifier information; and the first network equipment sends the message to the second network equipment based on the second segment identification, wherein the message comprises the updated first segment identification.
For network devices having a plurality of same third identification information, if a compressed first segment identifier is generated uniformly for nodes having the same plurality of third identification information, the compressed first segment identifier includes the same third identification information and fourth identification information indicating the number of the plurality of network devices. At this time, after the first network device restores the segment identifier before compression by the second network device based on the third identifier information, the fourth identifier information is also required to be updated, so that a subsequent node can determine whether to continue restoring the destination address by using the above method.
Optionally, the fourth identification information is a first numerical value, the fifth identification information is a second numerical value, and the second numerical value is obtained by subtracting 1 from the first numerical value. Since the fourth identification information is used to indicate the number of the network devices that are identified by the segment remaining from the first network device on the forwarding path of the packet and include the third identification information, the manner of updating the fourth identification information may be to directly subtract 1 from the value indicated by the fourth identification information.
Optionally, the determining, by the first network device, first identification information corresponding to the second network device includes: the first network device receiving a message, the message including sixth identification information and seventh identification information corresponding to the second network device, the sixth identification information including the first identification information, the seventh identification information being used to identify a length of the first identification information; the first network device determines the first identification information based on the sixth identification information and the seventh identification information.
In this application, the first identification information of each network device may be issued in advance in the network, so that the subsequent intermediate node can restore the compressed segment identifier based on the first identification information.
In a third aspect, a first network device is provided, which includes: a determining module, configured to determine a first segment identifier corresponding to a second network device, where the first segment identifier includes first identifier information, and the first identifier information is used to identify an autonomous domain to which the second network device belongs; a generation module configured to generate a second segment identifier based on the first segment identifier, the second segment identifier not including the first identifier information; and the sending module is used for sending a message to the second network equipment, wherein the message comprises the second section identifier.
Optionally, the determining module is further configured to determine a third segment identifier corresponding to a third network device, where the third segment identifier includes second identifier information and third identifier information, the second identifier information is used to identify an autonomous domain to which the third network device belongs, and the third identifier information is used to identify the third network device in the autonomous domain; the generating module is further configured to generate the fourth segment identifier based on the third segment identifier, where the fourth segment identifier does not include the second identifier information and the third identifier information; the sending module is further configured to send the packet to the third network device, where the packet includes the fourth segment identifier.
Optionally, the second network device and the third network device are the same device, the first identification information and the second identification information are the same identification information, and the second segment identifier and the fourth segment identifier are the same segment identifier.
Optionally, the determining module is further configured to determine a plurality of segment identifiers corresponding to a plurality of network devices, where the plurality of segment identifiers respectively include the same fourth identification information; the generating module is further configured to generate a fifth segment identifier based on the plurality of segment identifiers, where the fifth segment identifier includes the fourth identifier information and fifth identifier information, and the fifth identifier information is used to identify the number of the plurality of network devices; the sending module is further configured to send the packet, where the packet includes the fifth segment identifier.
Optionally, the fifth segment of identification does not include the first identification information and sixth identification information respectively corresponding to the plurality of network devices, and the sixth identification information is respectively used for uniquely identifying the plurality of network devices within the autonomous domain to which the plurality of network devices belong.
Optionally, the plurality of network devices includes the second network device, and the second segment identifier and the fifth segment identifier are the same segment identifier.
Optionally, the packet further includes seventh identification information, where the seventh identification information is used to identify a policy for generating the second segment identifier by the first network device.
Optionally, the determining module determines a plurality of segment identifiers corresponding to a plurality of network devices, including: the determining module determines a plurality of segment identifiers corresponding to a plurality of network devices based on Interior Gateway Protocol (IGP) messages respectively sent by the plurality of network devices; or, the determining module determines a plurality of segment identifiers corresponding to a plurality of network devices based on a control message sent by a control device.
In a fourth aspect, there is provided another first network device, the first network device comprising: a receiving module, configured to receive a packet, where the packet includes a first segment identifier corresponding to a second network device; a determining module, configured to determine first identification information corresponding to the second network device, where the first identification information is used to identify an autonomous domain to which the second network device belongs; a generating module, configured to generate a second segment identifier corresponding to the second network device based on the first identifier information and the first segment identifier; and the sending module is used for sending the message to the second network equipment based on the second segment identifier.
Optionally, the second network device is a next hop device of the first network device, and the determining module is further configured to determine second identification information, where the second identification information is used to identify the second network device in the autonomous domain; the generation module is configured to generate the second segment identifier corresponding to the second network device based on the first identifier information, the second identifier information, and the first segment identifier.
Optionally, a forwarding path of the packet includes multiple consecutive network devices, the multiple consecutive network devices correspond to multiple segment identifiers, the first network device is located on a first one of the multiple consecutive network devices on the forwarding path, the multiple segment identifiers include the same third identifier information, the first segment identifier includes the third identifier information and fourth identifier information, the fourth identifier information is used to indicate the number of the multiple consecutive network devices, and the sending module includes: a first determining subunit configured to determine fifth identification information based on the fourth identification information; a second determining subunit, configured to determine an updated first segment identifier, where the updated first segment identifier includes the third identifier information and the fifth identifier information; a sending subunit, configured to send the packet to the second network device based on the second segment identifier, where the packet includes the updated first segment identifier.
Optionally, the fourth identification information is a first numerical value, the fifth identification information is a second numerical value, and the second numerical value is obtained by subtracting 1 from the first numerical value.
Optionally, the determining module includes: a receiving subunit, configured to receive a message, where the message includes sixth identification information and seventh identification information corresponding to the second network device, the sixth identification information includes the first identification information, and the seventh identification information is used to identify a length of the first identification information; a third determining subunit, configured to determine the first identification information based on the sixth identification information and the seventh identification information.
In a fifth aspect, a network device is provided, which comprises a processor and a memory, wherein the memory is used for storing a computer program; the processor is configured to execute the computer program stored in the memory to perform the method described in any of the possible implementations of the first aspect above, or to perform the method described in any of the possible implementations of the second aspect above.
In a sixth aspect, a chip is provided, the chip being disposed in a network device in a communication network, the chip comprising a processor and an interface circuit; the interface circuit is used for receiving instructions and transmitting the instructions to the processor; the processor is configured to perform the method described in any of the possible implementations of the first aspect above, or perform the method described in any of the possible implementations of the second aspect above.
In a seventh aspect, a computer-readable storage medium is provided, which has instructions stored therein, and when the instructions are executed on a computer, the instructions cause the computer to perform the method described in any possible implementation of the first aspect or the second aspect.
In an eighth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method as described in any possible implementation of the first or second aspect above.
In a ninth aspect, a network system is provided, where the system includes a first network device, a second network device, and a third network device, the first network device is configured to determine a first segment identifier corresponding to the second network device, where the first segment identifier includes first identifier information, where the first identifier information is used to identify an autonomous domain to which the second network device belongs, the first network device generates a second segment identifier based on the first segment identifier, where the second segment identifier does not include the first identifier information, and the first network device sends a packet to the third network device, where the packet includes the second segment identifier; the third network device is configured to receive a packet, where the packet includes the second segment identifier corresponding to the second network device, the third network device determines the first identifier information corresponding to the second network device, where the first identifier information is used to identify an autonomous domain to which the second network device belongs, the third network device generates the first segment identifier corresponding to the second network device based on the first identifier information and the first segment identifier, and the third network device sends the packet to the second network device based on the first segment identifier.
Drawings
Fig. 1 is a schematic diagram of a format of an SRH provided in an embodiment of the present application;
fig. 2 is a schematic format diagram of a SID provided in an embodiment of the present application;
fig. 3 is a schematic architecture diagram of an SRv6 network according to an embodiment of the present application;
fig. 4 is a flowchart of a method for determining segment identifiers according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another SID format provided in the embodiments of the present application;
FIG. 6 is a flow chart of another method for determining segment identifiers according to an embodiment of the present application;
fig. 7 is a schematic flowchart of a message forwarding process provided in an embodiment of the present application;
FIG. 8 is a flow chart of another method for determining segment identifiers provided by an embodiment of the present application;
fig. 9 is a schematic flowchart of another packet forwarding process provided in this embodiment of the present application;
FIG. 10 is a flowchart of another method for determining segment identifiers provided by an embodiment of the present application;
fig. 11 is a schematic flowchart of another packet forwarding process provided in this embodiment of the present application;
fig. 12 is a schematic diagram of another SRH format provided in this embodiment of the present application;
fig. 13 is a flowchart of another segment identifier determination method provided in the embodiment of the present application;
fig. 14 is a schematic diagram of a format of an IGP packet according to an embodiment of the present application;
FIG. 15 is a flowchart of another segment identifier determination method provided in an embodiment of the present application;
FIG. 16 is a flowchart of another segment identifier determination method provided in an embodiment of the present application;
fig. 17 is a flowchart of another segment identifier determination method provided in the embodiment of the present application;
fig. 18 is a schematic structural diagram of a network device according to an embodiment of the present application;
fig. 19 is a schematic structural diagram of another network device provided in an embodiment of the present application;
fig. 20 is a schematic structural diagram of an interface board in the network device shown in fig. 19 according to an embodiment of the present application;
fig. 21 is a schematic structural diagram of a first network device according to an embodiment of the present application;
fig. 22 is a schematic structural diagram of another first network device provided in an embodiment of the present application;
fig. 23 is a schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that reference herein to "a plurality" means two or more. In the description of the present application, "/" indicates an OR meaning, for example, A/B may indicate A or B; "and/or" herein is merely an association relationship describing an associated object, and means that there may be three relationships, for example, a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in order to facilitate clear description of technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
Before explaining the embodiments of the present application, an application scenario of the embodiments of the present application is explained.
SRv6 is a network architecture designed based on the concept of source routing to forward IPv6 packets in a network. Inserting SRH into the IPv6 message header through a head node in the SRv6 network, and pressing an IPv6 address list into the SRH. And continuously updating the target address according to the IPv6 address list by each forwarding node in the SRv6 network to finish the one-by-one forwarding of the IPv6 data packet. Fig. 1 is a schematic format diagram of an SRH according to an embodiment of the present application. As shown in fig. 1, the SRH includes a field next header for indicating a next header type, a field Hdr Ext Len for indicating a length of the SRH header, a field routing type for indicating a routing type, a field segment left for indicating a number of nodes that should be accessed after reaching the current node, and the like. The SRH also includes a SID list field. The SID list field includes a plurality of SIDs, each of which may correspond to an IPv6 address for identifying a node or link on the forwarding path having the SID. In addition, as shown in fig. 1, an optional type-length-value (TLV) field is further included in the SRH, and the SRH can implement more functions, such as fault diagnosis and detection, through the optional TLV.
The destination address of the message transmitted in the SRv6 network is abbreviated as IPv6 DA. In the traditional message based on the IPv6 protocol, the IPv6 DA is fixed and unchangeable. In the SRv6 network, the IPv6 DA only corresponds to the next node of the current packet, and may be continuously changed.
The SID list in SRH, similar to the Label stack information in SR Multi-Protocol Label Switching (MPLS), may be generated at a head node on a forwarding path, and an intermediate node on the forwarding path may complete forwarding based on the SID list. For the sake of convenience of description hereinafter, the list of SIDs is represented as: < Segment List [0], segment List [1], segment List [2], segment List [ n ] >. Wherein each Segment List [ m ], m is greater than or equal to 0 and less than or equal to n in the SID List can correspond to each corresponding node supporting SRv6 on the forwarding path. Taking the forwarding path of the message as a strict display path as an example, the strict display path means that the SID corresponding to each node on the forwarding path of the message is included in the SID list of the SRH header. It should be noted that the segment identifier corresponding to the node is used to identify a corresponding relationship between the second network device and the first segment identifier. The segment identifier is, for example, an originally assigned segment identifier, and the correspondence is, for example, a segment identifier for identifying the node itself, or a segment identifier for identifying a link from another node, for example, a last-hop node of the node, to the node. In other cases, the segment identifier may be other types of segment identifiers or the like associated with the node. At this time, segment List [0] corresponds to the end node on the forwarding path, segment List [1] corresponds to the penultimate node on the forwarding path, segment List [ n ] corresponds to the second node on the forwarding path, the second node is the node immediately after the head node, and so on, and the stack is pressed in reverse order. In some possible implementation manners, the forwarding path of the packet may also be a loose display path, where the loose display path refers to a SID corresponding to a part of nodes on the forwarding path of the packet and is included in a SID list of the SRH header. In this case, segment List [ n ] may correspond, for example, to the second or third node on the forwarding path that supports the SRv6 protocol. The above-listed cases are only examples, and it should be noted that, in other cases, the Segment List sequence in the SID List may correspond to a plurality of corresponding nodes on the forwarding path according to a certain rule, and the plurality of corresponding nodes may be, for example, continuous nodes on a strict display path or discontinuous nodes on a loose display path, but support the SRv6 protocol.
In the SRv6 network, taking the example that the segmentlist values in the SID List all correspond to the nodes on the forwarding path, the information of the SL field value, i.e. minus 1, ipv6 DA, is transformed once every time a node supporting SRv6 passes through. The SL field and the SID list field together determine information of the IPv6 DA. The specific transformation procedure is exemplified as follows:
if SL value is n, IPv6 DA value is the value of Segments List [ n ] in SID List.
...
If the SL value is 1, the value IPv6 DA takes the value of Segments List [1] in the SID List.
If the SL value is 0, the value IPv6 DA takes the value of Segments List [0] in the SID List.
The SID is an instantiated IPv6 address, such IPv6 address is given a unique function, and the SID in an SRv6 network may represent a node or a link, may represent an L2/L3 Virtual Private Network (VPN), or may represent a service.
As shown in fig. 2, each SID may include two portions, one portion being a locator (locator) field and the other portion being a function (function) field. The positioning field occupies the upper bits of the 128 bits. The function field occupies a low bit among the 128 bits. The location field may assume routing functions and therefore needs to be unique within the SR domain. The function field may identify any function of the device, such as a certain forwarding behavior, or a certain traffic, etc. The SID specifically includes END, end.x, end.dt, and other types based on the difference of the function field. An SID of the END type may be used to identify a node. An end.x type SID may be used to identify a link. A SID of end.dt type may be used to identify a VPN or service. The end.dt specifically includes end.dt4 types, where the end.dt is used to indicate a SID of a Provider Edge (PE) device, and is used to identify a VPN instance of a fourth generation internet protocol (ip v 4) in the network.
The method for determining segment identifiers provided in the embodiment of the present application is applied to the scenario of implementing hop-by-hop forwarding of a packet in an SRv6 network through an SRH. Fig. 3 is a schematic architecture diagram of an SRv6 network according to an embodiment of the present application. As shown in fig. 3, the SRv6 network includes a node R1, a node R2, a node R3, a node R4, and a node R5. Wherein, the node R1 is a head node of the SRv6 network, the nodes R2, R3 and R4 are intermediate nodes of the SRv6 network, and the node R5 is a tail node of the SRv6 network.
The node R1 is configured to press the SRH into the packet, forward the packet pressed into the SRH to the node R2, and forward the packet to the node R5 hop by hop according to the SRH by the node R2. The nodes R1, R2, R3, R4 and R5 may be any routing devices with SRv6 functions. In addition, the SRv6 network shown in fig. 3 is only illustrated by taking five nodes as an example, and does not constitute a unique limit to the number of nodes in the SRv6 network provided in the embodiment of the present application.
The following explains the method for determining segment identifiers provided in the embodiments of the present application in detail.
In the embodiment of the present application, in order to improve the efficiency of encapsulating a packet by a head node and the efficiency of forwarding the packet, the head node compresses each SID in an original SID list when determining an SRH, so that the SRH carries the compressed SID. And after receiving the message, the subsequent intermediate node restores the compressed SID in the SRH to determine the destination address of the message. Therefore, the method for determining the segment identifier provided in this embodiment of the present application mainly includes two processes, one is a process in which the head node presses the SRH in the packet, and the other is a process in which the intermediate node determines the destination address according to the SRH and forwards the packet. These two processes are explained below separately.
It should be noted that the first and second concepts in any of the following embodiments and the first and second concepts in other embodiments are independent of each other, and are not strictly corresponding to each other. For example, the first network device in one embodiment and the first network device in another embodiment may not be used to indicate the same network device. Specific individual concepts will be described in the following embodiments.
Fig. 4 is a flowchart of a method for determining a segment identifier according to an embodiment of the present application, and is applied to a head node in an SRv6 network, that is, a first network device in the following embodiments is a head node. As shown in fig. 4, the method includes:
s401: the first network equipment determines a first segment identifier corresponding to the second network equipment, wherein the first segment identifier comprises first identifier information, and the first identifier information is used for identifying an autonomous domain to which the second network equipment belongs.
The first network device may be a head node on a certain forwarding path in the SRv6 network, and the second network device may be a next hop node of the head node on the forwarding path, or may be another node on the forwarding path, such as an intermediate node or a tail node. The first segment identifier corresponding to the second network device is an original SID configured for the second network in the SRv6 network, and the original SID may be an IPv6 address including 128 bits.
The first network device may determine the first segment identifier corresponding to the first network device in an implementation manner that: the first network device determines a first segment identifier corresponding to a second network device based on an Interior Gateway Protocol (IGP) message issued by the second network device. Or the first network device determines the first segment identifier corresponding to the second network device based on a control message sent by the control device. That is, the original SID of each network device in the SRv6 network may be issued in the network by the network device itself, or may be issued by the control device in a unified manner.
In the embodiment of the present application, in order to implement compression on the original SID, the localization field in the original SID is subdivided, that is, the space of the original SID is re-planned. As shown in fig. 5, the positioning field in fig. 2 is divided into a first positioning field and a second positioning field. For convenience of subsequent description, the first positioning field is referred to herein as a locator field, and the second positioning field is referred to herein as a vlocator field. For the original SID of the second network device, the locator field is used to identify an Autonomous domain (AS) to which the second network device belongs, and the vlocator field is used to identify the second network device. At this time, the original SID includes three parts, a locator field, a vlocator field, and a function field. For ease of description, this application refers to the function field as the function field. In one possible implementation, the function field may be fixed to 16 bits, and the vlocator field may include a number of bits less than or equal to 16 bits. It should be noted that the lengths of the fields are only used as examples, and do not constitute the only limitations on the lengths of the floor field, the vlocator field, and the function field in the embodiments of the present application.
S402: the first network device generates a second segment identity based on the first segment identity, the second segment identity not including the first identity information.
The first network device in S402 may be the head node R1 in fig. 3, and the first identification information may be a locator field in the original SID. Since the locator fields of the various nodes in an SRv6 network are typically identical, i.e., identify the same AS in which the various nodes reside. Therefore, the first network device may compress the original SID of the second network device through S402 to obtain the second segment identifier, so that the second segment identifier does not include the locator field. When the next hop network device of the first network device receives the SRH including the compressed second segment identifier, the next hop network device may restore the second segment identifier according to the locally known AS information to obtain the complete first segment identifier corresponding to the second segment identifier. The AS information known by the next hop network device may be, for example, locally preconfigured and stored, or may be acquired and stored from a network control device.
It should be noted that, there may be a plurality of compression manners in which the second segment identifier does not include the first identifier information, for example, for a scenario in which the forwarding path of the packet is a strict display path, in some cases, because two adjacent nodes corresponding to the SID list in the strict display path are located in the same IGP domain, the two adjacent nodes may know in advance related information (for example, a vlocator field in the original SID) of the other party, and therefore, for a scenario in which the forwarding path of the packet is a strict display path, there may be at least the following three compression manners. The first is that the compressed second segment identifier does not include a locator field (i.e. the first identification information in S401), does not include a vlocator field, and only includes a function field, and if the length of the function field is 16 bits, this compression mode may be referred to as 16-bit compression. The second is that the compressed second segment identifier does not include the locator field (also the first identifier information in S401), does not include the vlocator field, but includes the function field and other necessary indication information, and if the length of the function field is 16 bits and the indication information occupies 4 bits, this compression method can be called 20-bit compression. The 20-bit compression method is suitable for a scenario where function fields of SIDs corresponding to nodes on a forwarding path have certain characteristics, for example, when function fields of SIDs corresponding to some or all of consecutive nodes on the forwarding path are the same, compression can be performed by the 20-bit compression method, where the indication information is used to identify the number of SIDs having the same function field that remain after the current node. The third method is that the compressed second segment identifier does not include a locator field (i.e., the first identifier information in S401), but includes a vlocator field and a function field, and if both the vlocator field and the function field are 16 bits, this compression method may be referred to as 32-bit compression. The following description will be separately expanded for specific implementation manners of the three compression manners, and will not be repeated herein.
In addition, for a scenario where the forwarding path of the packet is a loose display path, since the two corresponding adjacent nodes in the SID list may not be nodes in the same IGP domain at this time, the two adjacent nodes may not know the vlocator field of the other node. Therefore, for a scenario in which the forwarding path of the packet is a loose display path, at least the following two compression methods are available, one of which is the above-mentioned 32-bit compression method, and only the locator field is compressed, but the locator field and the function field are reserved. The other is that the compressed second segment identifier does not include a locator field (i.e. the first identification information in S401), does not include a function field, and includes only a vlocator field, and for distinguishing from the above 16-bit compression method, this compression method may be referred to as 16-bit compression under the loose path. The 16-bit compression method under the loose path is applicable to a scene in which function fields of SIDs corresponding to nodes on the forwarding path are the same, for example, in a scene of the loose display path, if each SID in the SID list is an END type SID, the compression may be performed by the 16-bit compression method under the loose path. The implementation of the 16-bit compression method in the loose path may refer to the implementation of the three compression methods in the strict display path, which is not described in detail in this embodiment of the present application.
It should be noted that, the above strict display path and the loose display path may be applicable to the compression schemes respectively as an example, and it is understood that in some possible implementations, applicable scenarios of different compression schemes may also be changed. For example, if the node on the forwarding path is allowed to request the vlocator field corresponding to another node from the controller, or the node supporting the SR on the forwarding path may obtain and store the vlocator field corresponding to the next hop node supporting the SR in advance based on a mechanism agreed with the controller, a 16-bit compression manner (i.e., a compression scheme that does not include the flo icator and vlocator) under the strict display path may also be applied to the loose path.
S403: and the first network equipment sends a message to the second network equipment, wherein the message comprises a second section identifier.
The second network device is for example the next hop network device R2 of the head node R1. After obtaining the compressed second Segment identifier, R1 encapsulates it into an SRH header, for example, as Segment List [3], and sends it to R2 through a message. In some possible implementations, the head node R1 may also determine compressed identifiers for other network devices on the forwarding path and encapsulate the compressed identifiers into the SRH header. For example, for the network structure shown in fig. 3, R1 may encapsulate the initial Segment identifiers corresponding to R3, R4, and R5 into Segment List [2], segment List [1], and Segment List [0] respectively, and then send the packet encapsulated with SRH to the second network device. It should be noted that the second network device in S403 may be a next-hop device of a head node on a packet forwarding path, such as R2 shown in fig. 3, or may be another network device on the forwarding path, such as R3, R4, or R5 shown in fig. 3. Taking the second network device as R3 as an example, the message sent after the SRH header is encapsulated by R1 will be sent to R2 first and update operation is performed, for example, the compressed Segment List [3] is hit and popped up after being restored to the original value, and the destination address DA is updated according to the original value. Then, the updated packet is forwarded to R3 by R2, and at this time, R3 may receive the updated packet including the second segment identifier corresponding to the updated packet.
In this embodiment of the present application, the first network device may determine, according to the first segment identifier corresponding to the second network device, the second segment identifier corresponding to the second network device, because the first segment identifier includes the first identifier information for identifying the autonomous domain to which the second network device belongs, and the second segment identifier does not include the first identifier information, the second segment identifier is equivalent to compressing the first segment identifier, and thus, the first network device may carry the compressed segment identifier in a packet sent to the second network device, so as to reduce pressure of the first network device serving as a head node to encapsulate the packet. In addition, compressing the segment identifier is also beneficial to improving the message forwarding efficiency.
Based on the above embodiments, the embodiments of the present application provide three different compression manners, namely 16-bit compression, 20-bit compression and 32-bit compression, and the three compression manners will be explained below with reference to specific examples. For convenience of explanation, the above three compression manners are exemplified by taking the original SID as 128 bits in length, in which the floor occupies 96 bits, the vlocator and the function field occupy 16 bits, respectively, and when the above second compression manner is adopted, the indication information field occupies 4 bits, respectively. It can be understood that, under the above premise, the compression schemes for compressing the original SID into 16 bits, 20 bits, and 32 bits, which are referred to as 16 bits, 20 bits, and 32 bits for short, can be implemented by using three compression manners. It should be noted that, if the lengths of the pointer, the vlocator, and/or the function field are changed, the original SID may still adopt the three compression methods during compression, but the length of the compressed SID may be changed.
Fig. 6 is a flowchart of a method for determining segment identifiers according to an embodiment of the present application, which is used to explain such a compression scheme of 32 bits. The method comprises the following processes:
s601: the first network equipment determines a first segment identification corresponding to the second network equipment, wherein the first segment identification comprises first identification information, and the first identification information is used for identifying an autonomous domain to which the second network equipment belongs.
The implementation manner of S601 may refer to the implementation manner of S401 in the embodiment of fig. 4, and a description thereof is not repeated.
S602: and the first network equipment generates a second section identifier based on the first section identifier, wherein the second section identifier only does not comprise first identifier information compared with the first section identifier, and the first identifier information identifies the AS to which the second network equipment belongs.
In the 32-bit compression method, the function field and the vlocator field in the original SID are retained, and the locator field in the original SID is deleted. It should be noted that the 32-bit compression method can be applied to all types of original SIDs.
S603: and the first network equipment sends a message to the second network equipment, wherein the message comprises the second section identification.
The implementation manner of S603 may refer to the implementation manner of S403 in the embodiment of fig. 4, and a detailed description thereof is not repeated here.
Fig. 7 is a schematic diagram of a forwarding packet based on the 32-bit compression method in fig. 6 according to an embodiment of the present application. As shown in fig. 7, node R1 can configure two types of original SIDs, e.g., END a:1 and end.x a:1, respectively, END a. Similarly, node R2 can also be configured with two types of original SIDs, END a:2 and end.x a:2, END a. Node R3 is configured with two types of original SIDs, END a:3 and end.x a:3, respectively, END a. Node R4 is configured with two types of original SIDs, END a:4 and end.x a:4, END a. Node R5 is configured with a type of original SID, END DT4A: 5, 8001. These original SIDs are all expressed in the format of x ×: "preceding field is locator field, first": "and second": "fields between are vlocator fields, second": the field after "is a function field.
When forwarding a packet, the head node may specify a packet forwarding path by using a SID list encapsulated in the SRH, where the SID type in the SID list may be, for example, a node SID, a link SID, or an IPv4 VPN type SID.
Still taking fig. 7 as an example, the list of original SIDs received by the head node R1 before compression can be represented as: < A:5, 8001, A. If the head node R1 compresses the original SID list in a 32-bit compression manner, as shown in fig. 7, the compressed SID list can be represented as: < 5. The compressed SID list in the message sent by the head node R1 to the intermediate node R2 is expressed as < 5. It should be noted that, for the convenience of understanding, the types of the SIDs, such as END a before compression, cEND a after compression, etc., are listed in the SID list in fig. 7, but in the actual forwarding message, the type identifiers are not present in the SID list. Only SID values of the respective type are included in the SID list.
Fig. 8 is a flowchart of a method for determining segment identifiers according to an embodiment of the present application, which is used to explain a compression manner of 16 bits. The method comprises the following steps:
s801: the method comprises the steps that a first segment identification corresponding to a second network device is determined by a first network device, the first segment identification comprises first identification information and second identification information, the first identification information is used for identifying an autonomous domain to which the second network device belongs, and the second identification information is used for identifying the second network device.
The implementation manner of S801 may refer to the implementation manner of S401 in the embodiment of fig. 4. That is, in S801, the first network device may be a head node on a certain forwarding path in the SRv6 network, and the second network device may be a next hop node of the head node on the forwarding path, or may be another node on the forwarding path, such as an intermediate node or a tail node.
S802: the first network device generates a second segment identifier based on the first segment identifier, and the second segment identifier does not include the first identifier information and the second identifier information compared with the first segment identifier.
That is, the 16-bit compression scheme may only retain the function field in the original SID and delete the locator field and vlocator field in the original SID. Based on the embodiment shown in fig. 4, since two adjacent nodes corresponding to the SID list in the strict display path are located in the same IGP domain, the two adjacent nodes may know the vlocator field of the original SID of the other node in advance. In a scenario where the forwarding path of the packet is a loose display path, at this time, two adjacent nodes corresponding to the SID list may not be located in the same IGP domain, and therefore the two adjacent nodes may not know the vlocator field of the other node. The 16-bit compression scheme provided in the embodiment of fig. 8 needs to compress the vlocator field, and therefore, the 16-bit compression scheme provided in the embodiment of fig. 8 is only applicable to a scenario in which the forwarding path of the packet is a strict display path.
It should be noted that, in some application scenarios, for example, only the last 8 bits in the function field of each original SID on the strict display path for packet forwarding may be different, and the values of the first 8 bits are all 0 —, at this time, when the original SID of each node is compressed, the head node may only reserve the last 8 bits of the function field in the original SID. The compression scheme is actually similar to the 16-bit compression scheme, i.e., only the relevant information of the function field is retained, but the network resource can be further saved and the forwarding efficiency can be improved by combining the actual characteristics of the SID.
S803: and the first network equipment sends a message to the second network equipment, wherein the message comprises the second section identification.
The implementation manner of S803 may refer to the implementation manner of S403 in the embodiment of fig. 4, and a detailed description thereof is not repeated here.
Fig. 9 is a schematic diagram of a forwarding packet based on the 16-bit compression method in fig. 8 according to an embodiment of the present application. As shown in fig. 9, node R1 is configured with two types of original SIDs, END a:1 and end.x a: 1. Node R2 is configured with two types of original SIDs, END a:2 and end.x a: 2. Node R3 is configured with two types of original SIDs, END a:3 and end.x a:3, respectively. Node R4 is configured with two types of original SIDs, END a:4 and end.x a: 4. Node R5 is configured with one type of original SID, END DT 4A: 5. The original SIDs of each node have been described in detail in the embodiment shown in fig. 7, and will not be described herein again.
As shown in fig. 9, the original SID list before compression can be expressed as: < A: 5. The path for forwarding the packet from R1 to R5 is a strict display path, so the head node can compress the intermediate nodes R2, R3, and R4 in a 16-bit compression manner. In some cases, since the original SID of the tail node is usually used to indicate a VPN, for this type of SID, in order to avoid other problems caused by that the real IP address of the VPN cannot be restored due to the interruption of the intermediate link, it may be agreed that the original SID of the tail node is compressed according to a 32-bit compression scheme, that is, the tail node R5 is compressed by using a 32-bit compression scheme, as shown in fig. 9, the list of compressed SIDs may be represented as < 5. That is, the SRH in the message sent by the head node R1 to the intermediate node R2 includes a SID list of < 5. It should be noted that, in the process of compressing the tail node R5, a 16-bit compression scheme may also be used for compression, which is not specifically limited in the embodiment of the present application.
As can be seen from the explanation of the original SID in the example shown in fig. 4, the function field in the original SID is generally used to indicate the function of the corresponding SID. Thus, different original SIDs may have the same function field to indicate that these original SIDs correspond to the same function. Therefore, for a scenario in which the forwarding path of the packet is a strict display path, if the function fields of the original SIDs of the nodes on the forwarding path of the packet are the same, the header node may also compress the original SIDs of the nodes by using the compression method (i.e., 20-bit compression method) shown in fig. 10 described below.
Fig. 10 is a flowchart of a method for determining a segment identifier according to an embodiment of the present application, which is used to explain a compression scheme of 20 bits. The method comprises the following processes:
s1001: the first network device determines a plurality of segment identifiers corresponding to the plurality of network devices, wherein the plurality of segment identifiers respectively comprise the same fourth identification information.
In S1001, the segment identifier corresponding to each network device is also the original SID of the network device, and the specific type may be a node type, a link type, or another type. The plurality of network devices may be, for example, a plurality of consecutive nodes in a packet forwarding path. The fourth identification information is the function field in the original SID. As shown in fig. 3, the first network device may be a head node R1, and the plurality of network devices may be intermediate nodes R2, R3, and R4 following the head node R1.
In S1001, the implementation manner of the first network device determining the plurality of segment identifiers corresponding to the plurality of network devices may refer to the implementation manner of the first network device determining the first segment identifier corresponding to the second network device in S401 in the embodiment shown in fig. 4, which is not described herein again.
S1002: the first network device generates a fifth segment identifier based on the plurality of segment identifiers, where the fifth segment identifier includes the fourth identifier information and fifth identifier information, and the fifth identifier information is used to identify the number of the plurality of network devices.
That is, when the function fields of multiple nodes on the packet forwarding path are the same, a compressed SID may be generated uniformly for the nodes with the same function fields, and the compressed SID only needs to include the same function fields and the number of the multiple network devices.
In a possible implementation manner, when the function fields of multiple nodes on the packet forwarding path are the same, the function fields may be compressed only in the manner described above, but the locator fields of the multiple nodes may not be compressed. At this time, the compressed SID for representing the corresponding plurality of nodes may further include locator fields of the plurality of nodes.
In another possible implementation manner, based on the explanation of the original SID in S401, it is known that the original SID further includes a locator field and a vlocator field, and therefore, if subsequent nodes can acquire the locator field and the vlocator field from other ways, at this time, when the nodes are compressed by the 20-bit compression method shown in fig. 10, the compressed fifth segment identifier may further not include the first identification information (i.e., the locator field) and the sixth identification information (i.e., the vlocator field) respectively corresponding to the plurality of network devices. The sixth identification information is used to uniquely identify a plurality of network devices within the autonomous domain, respectively. That is, when the function fields of the nodes on the packet forwarding path are the same, the function field, the locator field, and the vlocator field are compressed at the same time.
S1003, carrying out: and the first network equipment sends messages to the plurality of network equipment, wherein the messages comprise the fifth segment identification.
For example, a device that receives the packet in the first network device may be a next hop node of the first network device; for another example, the first device that receives the packet in the multiple network devices may be a subsequent node on a strict display path that forwards the packet instead of the next hop node of the first network device, and the next hop node of the first network device may adopt the foregoing compression scheme of 32 bits or 16 bits, for example.
Fig. 11 is a schematic diagram of a forwarding packet based on the 20-bit compression method shown in fig. 10 according to an embodiment of the present application. As shown in fig. 11, node R1 is configured with two types of original SIDs, END a:1 and end.x a: 1. Node R2 is configured with two types of original SIDs, END a:2 and end.x a: 2. Node R3 is configured with two types of original SIDs, END a:3 and end.x a:3, respectively. Node R4 is configured with two types of original SIDs, END a:4 and end.x a: 4. Node R5 is configured with one type of original SID, END DT 4A: 5. The function related to each original SID of each node can refer to the embodiment shown in fig. 7, and is not described herein again.
As shown in fig. 11, the original SID before compression can be expressed as: < A:5, 8001, A. At this time, since the forwarding path of the packet is a strict display path, and the function fields of the original SID corresponding to each intermediate node are the same, the head node may compress the intermediate node R2, the intermediate node R3, and the intermediate node R4 according to a 20-bit compression scheme, and compress the intermediate node R5 according to a 32-bit compression scheme. As shown in fig. 11, the compressed SID list can be expressed as < 5. In the SID list, 5. 5060 to indicate node R2 to node R4, each of which has 3 function fields of 5060. The SRH in the message sent by the head node R1 to the intermediate node R2 includes a SID list of < 5.
Based on the embodiments of fig. 4 to fig. 11, when compressing the original SID corresponding to each node on the forwarding path of the packet, the head node may use different compression methods to perform compression. In order to facilitate the subsequent node to determine the destination address of the message from the compressed SID. The packet sent by the head node to the second network device may further include seventh identification information, where the seventh identification information is used to identify a policy for generating the second segment identifier by the first network device. For example, for the method of determining a segment identifier shown in fig. 6, the seventh identification information may be used to identify that the first network device generates a compressed second segment identifier corresponding to the second network device by a 32-bit compression method.
In some possible implementation manners, different compression manners may be adopted for the original SID of each node or link on the forwarding path, and at this time, a plurality of pieces of identification information may be used to respectively identify a policy for generating a compressed segment identification of a corresponding node or link on the forwarding path by the first network device, so that the corresponding node on the forwarding path can determine a corresponding segment identification restoration manner based on the policy. For example, for the packet forwarding path shown in fig. 9, the multiple pieces of identification information are respectively used to identify that the first network device generates the second segment identifications of the intermediate nodes R2 to R4 by using an 8-bit compression method, and generates the second segment identifications of the tail node R5 by using a 32-bit compression method. Through the identification information, the application can support that each SID in the same SID list is generated by adopting different compression schemes. In other possible implementations, the identification information may also be used to identify a scheme that does not compress the original SID, such as not compressing one or more SIDs on the forwarding path, and still retaining the original 128 bits. The content of the identification information corresponding to each different compression scheme and each uncompressed scheme is different.
In a possible implementation manner, the SRH shown in fig. 1 may be extended, so that the extended SRH carries the seventh identification information. It should be noted that there may be multiple specific implementation manners for SRH expansion, and it is only necessary to ensure that the expanded SRH can indicate a compression scheme (including a scheme without compression) of each SID in the SID list.
As a possible example, fig. 12 is a schematic format diagram of an extended SRH provided in an embodiment of the present application. As shown in fig. 12, the field for carrying the SID list in fig. 1 is currently used to carry various types of compressed SIDs, such as a cssid compressed by 20 bits, a cssid compressed by 8 bits, a cssid compressed by 32 bits, and an uncompressed 128-bit original SID. It should be noted that, in fig. 12, all compression manners are embodied in the SID list, and in practical applications, the compressed SID in the SID list may be a SID compressed by using the same compression manner, or may be a SID compressed by using multiple optional compression manners as needed.
As shown in fig. 12, a type-length-value (TLV) field may be utilized to carry the above-mentioned multiple pieces of identification information for indicating the compression policy, where the identification information includes, for example, the seventh identification information corresponding to the second network device. Specifically, a bitmap (bitmap) BMP field may be set in the TLV. The BMP field is used to indicate the compression policy corresponding to each compressed SID in the SID list. That is, the bitmap field includes indication information for indicating the compression method of each SID in the list of SIDs. In addition, since the SL field in the SRH is used to indicate the several SIDs currently processed into the SID list, and each SID in the conventional SID list is 128 bits, the SID list in the conventional SRH is actually divided in groups of 128 bits, and at this time, the SL field in the SRH actually indicates the 128 bits currently processed into the several groups in the SID list. In the present application, since the SID in the SID list may be a compressed SID, a plurality of compressed SIDs may be further included in each 128-bit group. So that a specific SID cannot be located directly only by the SL field, other indication fields, such as a Pointer (PI) field, may be correspondingly set in the TLV field, and the PI field is used to match the SL field to locate which specific SID in a group of 128 bits indicated by the SL field. Based on the above configuration, in the process of forwarding the packet, the network device receiving the packet may first locate the compressed SID corresponding to the current node in the forwarding path according to the PI field and the SL field in the SRH, and then determine the compression policy corresponding to the compressed SID through the BMP field. And the network equipment receiving the message can restore the acquired SID according to the acquired compressed SID and the compression strategy, and then obtain the original SID before compression for subsequent forwarding of the message.
It should be noted that, in the embodiment of the present application, specific implementation manners and setting positions of the PI field and the BMP field are not limited, and only the set PI field and the set BMP field can implement the above functions. Fig. 8 to 11 are used to explain three compression schemes provided by embodiments of the present application. In the method for determining segment identifiers provided in the embodiment of the present application, the head node may determine, according to actual requirements, a compression scheme of the original SID for each network device. Alternatively, the control device determines a compression scheme of the original SID for each network device according to actual requirements, and then sends the determined compression scheme to the head node, so that the head node determines SRH and the like based on the compression scheme of the original SID for each network device.
The embodiments shown in fig. 4 to fig. 12 are used to explain how the head node compresses the original SID of each node in the packet forwarding path, and next, explain a process in which the intermediate node determines a destination address according to the compressed SID and forwards the packet.
Fig. 13 is a flowchart of a method for determining a segment identifier according to an embodiment of the present application, and is applied to an intermediate node in an SRv 6-based network, that is, a second network device in the following embodiments may be any intermediate node on a forwarding path, and the method may be used to recover a compressed SID. As shown in fig. 13, the method includes the following processes:
s1301: and the second network equipment receives a message, wherein the message comprises a second section identification corresponding to the third network equipment.
The second network device may be a certain intermediate node in the packet forwarding path in the embodiments shown in fig. 4 to fig. 12, and the third network device is a next SRv 6-capable node located after the second network device on the forwarding path. As shown in fig. 3, for example, the second network device may be the intermediate node R2, in which case the third network device may be the intermediate node R3. For another example, the second network device may also be the intermediate node R3, in which case the third network device may be the intermediate node R4. In the strict display path, the third network device is actually a next-hop device of the second network device. It should be noted that in some cases, for example, when the forwarding path is a loose display path, the third network device may not be the next hop device of the second network device, but a next network device supporting SRv6 is located after the third network device on the path, in this case, there may be one or more network devices between the third network device and the second network device, and the one or more network devices may not support SRv6, but may complete transparent transmission of the packet.
Based on the embodiments shown in fig. 4 to fig. 12, the second segment identifier corresponding to the third network device included in the packet is an SID obtained after the header node compresses the original SID of the third network device (that is, the first segment identifier in the embodiment shown in fig. 4). That is, the second segment identifier in S1301 does not include the first identifier information, which is used to identify the AS to which the second network device belongs (i.e., the locator field in the original SID).
S1302: and the second network equipment determines first identification information corresponding to the third network equipment, wherein the first identification information is used for identifying an autonomous domain to which the third network equipment belongs.
Based on S1301, the second segment identifier in S1301 does not include the first identifier information. Therefore, in order to send the packet to the third network device, the first identification information corresponding to the third network device needs to be determined first, so that the original SID of the third network device is restored through the following S1303.
In a possible implementation manner, the implementation process of S1302 may be: the second network equipment receives a message, wherein the message comprises sixth identification information and seventh identification information corresponding to the third network equipment, the sixth identification information comprises the first identification information, and the seventh identification information is used for identifying the length of the first identification information; the first network device determines the first identification information based on the sixth identification information and the seventh identification information.
The message may be an IGP message issued by the third network device, where the IGP message is used to advertise a location identifier (locator) of the third network device. The sixth identification information in the foregoing implementation manner is also the location identification of the third network device, where the location identification includes the first identification information (i.e., the locator field). The seventh identification information is used to identify the length of the locator. Therefore, the second network device can determine that the first identifier information is analyzed from the location identifier according to the IGP message.
That is, in the embodiment of the present application, it is equivalent to extending the IGP packet issued by the network device, and the extended IGP packet carries, in addition to the location identifier of the corresponding network device, the length of the locator field.
Further, based on the embodiment shown in fig. 4, the positioning field for the original SID is divided into locator field and vlocator field. Therefore, in a possible implementation manner, the extended IGP message may carry the length of the vlocator field in addition to the location identifier of the network device and the length of the locator field.
Fig. 14 is a schematic diagram of a format of an IGP message according to an embodiment of the present application. As shown in fig. 14, the IGP packet includes a location identifier field (locator) and a subtype length value (TLV), where the TLV is used to carry a length of a locator (shown as a first location in fig. 14) field and a length of a vlocator (shown as a second location in fig. 14) field. That is, in the embodiment of the present application, a sub-TLV is extended in an existing IGP packet, and the locator field and the vlocator field of the network device are notified through the sub-TLV.
The third network device may issue the IGP packet for notifying the locator based on an IGP protocol, so that other nodes in the same IGP domain may receive the IGP packet to obtain the locator field and the vlocator field of the third network device. It should be noted that, if the network devices on the packet forwarding path are all located in the same IGP domain, each network device may notify the locator in the domain by using an IGP packet, and in other possible implementation manners, the control device may also send a message to notify the locator and the length of the corresponding locator field and/or vlocator field. If the network device on the packet forwarding path belongs to different IGP domains, the control device may also issue an IGP packet for the third network device in the IGP domain, so that other network devices in the IGP domain know the locator field and the vlocator field of the third network device based on the IGP packet.
S1303: and the second network equipment generates a first section identification corresponding to the third network equipment based on the first identification information and the second section identification.
The second network device generates a first segment identifier corresponding to the third network device, that is, the second network device restores the compressed SID to obtain the original SID of the third network device. The original SID of the third network device is the first segment identifier corresponding to the third network device in S1303.
Based on the implementation manner of S402 in the embodiment shown in fig. 4, in S1301, there may be a plurality of compression manners in which the second segment identifier corresponding to the third network device does not include the first identifier information. Therefore, in S1303, the second network device generates an implementation manner of the first segment identifier corresponding to the third network device and a compression manner of the first segment identifier, and subsequently, S1303 will be described in detail for different compression manners respectively. And will not be described herein.
S1304: and the second network equipment sends the message to the third network equipment based on the first segment identification.
Based on S1303, the first segment identifier is the original SID of the third network device, and therefore, the second network device may forward the packet using the first segment identifier as a destination address, so as to forward the packet to the third network device.
Fig. 15 is a flowchart of a method for determining a segment identifier according to an embodiment of the present application, and is applied to an intermediate node in an SRv 6-based network, that is, a second network device in the following embodiments may be any intermediate node on a forwarding path. The embodiment shown in fig. 15 is used to explain the process of restoring the segment identifier compressed based on the 32-bit compression method in the embodiment shown in fig. 6. As shown in fig. 15, the method includes the following processes:
s1501: the second network equipment receives a message, wherein the message comprises a second section identification corresponding to third network equipment, the second section identification only does not comprise first identification information, and the first identification information is used for identifying an AS (application server) to which the third network equipment belongs.
As in the embodiment shown in fig. 13, the second network device may be one of the intermediate nodes in the packet forwarding path in the embodiments shown in fig. 4 to fig. 12, and a next SRv 6-supporting node located behind the second network device on the forwarding path of the third network device. For example, the second network device may be intermediate node R2, in which case the third network device may be intermediate node R3. For another example, the second network device may also be the intermediate node R3, in which case the third network device may be the intermediate node R4. The second network device may also be an intermediate node R4, in which case the third network device may be an intermediate node R5. As for the relationship between the second network device and the third network device, reference may be made to the explanation in the embodiment shown in fig. 13, which is not described herein again.
In addition, the implementation manner of S1501 may refer to the implementation manner of S1301 in the embodiment of fig. 13, and is not repeated here again. In addition, as can be seen from the embodiment shown in fig. 6, if the second segment identifier corresponding to the third network device is obtained based on a 32-bit compression method, the second segment identifier corresponding to the third network device only includes the function field and the vlocator field in the original SID, but does not include the locator field in the original SID.
S1502: the second network device determines first identification information corresponding to the third network device, where the first identification information is used to identify an autonomous domain to which the third network device belongs.
The implementation of S1502 may refer to S1302 in the embodiment of fig. 13, and details are not repeated here. In a possible implementation manner, since the pointers of each network node on the forwarding path are all the same, the information of the pointers can also be stored in each network node in advance for use when the SID is restored.
S1503: and the second network equipment generates a first section identification corresponding to the third network equipment based on the first identification information and the second section identification.
Since the second segment identification in S1501 does not include only the locator field, but includes the vlocator field and the function field. Therefore, the implementation manner of S1503 may be: the second network device may directly generate the first segment identifier corresponding to the third network device based on the first identifier information and the second segment identifier.
That is, the second segment identifier includes a vlocator field and a function field of the original SID of the third network device, and then, for example, a locator field of the original SID of the third network device is obtained through an IGP message issued by the third network device in advance, and the original SID of the third network device can be restored by combining the three fields, that is, the first segment identifier corresponding to the third network device is generated.
S1504: and the second network equipment sends the message to the third network equipment based on the first segment identifier.
The implementation manner of S1504 may refer to S1304 in the embodiment of fig. 3, and the description is not repeated here.
For the process of forwarding a packet based on the 32-bit compression mode provided in fig. 7, as shown in fig. 7, the SID list included in the SRH in the packet sent by the head node R1 to the intermediate node R2 is: < 5. When the intermediate node R2 receives the packet, according to an IGP packet issued in advance by the intermediate node R3 or a message sent in advance by the control device, it determines that the locator field of the intermediate node R3 is a, and then, according to the compressed 3.
When the intermediate node R3 receives the packet, according to an IGP packet issued by the intermediate node R4 or a message sent in advance by the control device, it determines that the locator field of the intermediate node R4 is a, and then, according to the compressed 4.
When the intermediate node R4 receives the packet, according to an IGP packet issued by the tail node R5 or the control device or a message sent by the control device in advance, it determines that the locator field of the tail node R5 is a, and then according to the compressed 5 8001 corresponding to the tail node R5 in the SID list, restores the original SID of the tail node R5 as a:5 8001, so that the packet is forwarded by using the determined original SID a:5 8001 as the destination address DA.
The above procedure of SID restoration described based on fig. 7 is only one possible example, and the above restoration method may also be applied to SID restoration of network nodes on other forwarding paths. For example, in one possible scenario, the forwarding path may be a loose display path, i.e., the path includes one or more forwarding nodes only for transparent transmission of packets, and at this time, only the network nodes supporting the SR protocol may perform the SID recovery operation. Or, in another possible scenario, the head node does not compress the SID of the next hop network node supporting the SR protocol, but directly uses the original SID of the next hop network node as the next hop destination address, etc., and in this case, even if the next hop network node supports the SR protocol, the compression and restoration operation need not be performed.
Fig. 16 is a flowchart of a method for determining a segment identifier according to an embodiment of the present application, and is applied to an intermediate node in an SRv 6-based network, that is, a second network device in the following embodiments is any intermediate node on a forwarding path. The embodiment shown in fig. 16 is used to explain the process of restoring the segment identifier compressed based on the 16-bit compression method in the embodiment shown in fig. 8. As shown in fig. 16, the method includes the following processes:
s1601: the second network device receives a message, where the message includes a second segment identifier corresponding to a third network device, and the second segment identifier does not include first identifier information and second identifier information at the same time, where the first identifier information is used to identify an AS to which the third network device belongs, and the second identifier information is used to identify the third network device.
As in the embodiment shown in fig. 13, the second network device may be one of the intermediate nodes in the packet forwarding path in the embodiments shown in fig. 4 to fig. 12, and the third network device is a next node supporting SRv6 located behind the second network device on the forwarding path. For example, the second network device may be intermediate node R2, in which case the third network device may be intermediate node R3. For another example, the second network device may also be the intermediate node R3, in which case the third network device may be the intermediate node R4. For another example, the second network device may also be the intermediate node R4, in which case the third network device may be the intermediate node R5. As for the relationship between the second network device and the third network device, reference may be made to the explanation in the embodiment shown in fig. 13, which is not described herein again.
In addition, the implementation of S1601 may refer to the implementation of S1301 in the embodiment of fig. 13, and is not described herein again. In addition, as can be seen from the embodiment shown in fig. 8, if the second segment identifier corresponding to the third network device is obtained based on a 16-bit compression method, the second segment identifier corresponding to the third network device only includes the function field in the original SID, and does not include the floor field and the vlocator field in the original SID.
S1602: the second network device determines first identification information and second identification information corresponding to the third network device.
Based on S1601, the second segment identifier corresponding to the third network device does not include the locator field, the vlocator field, and only the function field. Therefore, in addition to determining the first identification information, the first network device needs to determine second identification information, where the second identification information is used to identify a second network device (i.e., a vlocator field) in the autonomous domain.
The implementation manner of the second network device determining the second identification information of the third network device may refer to the implementation manner of the second network device determining the first identification information of the third network device in the embodiment shown in fig. 13. That is, the second identification information may also be determined through an IGP message, or a message may be sent by the control device to notify the third network device of the content of the second identification information.
S1603: and the second network equipment generates a first section identification corresponding to the third network equipment based on the first identification information, the second identification information and the second section identification.
Specifically, the second segment identifier includes a function field of the original SID of the third network device, and then a locator field and a vlocator field of the original SID of the third network device are obtained through an IGP message issued by the third network device or a message sent by the control device, and the original SID of the third network device can be restored by combining the three fields, that is, the first segment identifier corresponding to the third network device is generated.
S1604: and the second network equipment sends the message to the third network equipment based on the first segment identifier.
The implementation of S1604 may refer to S1304 in the embodiment of fig. 3, and is not described herein again.
For the process of forwarding a packet based on the 16-bit compression scheme provided in fig. 9, as shown in fig. 9, the SID list included in the SRH in the packet sent by the head node R1 to the intermediate node R2 is: <8001,1,6,5>. When the intermediate node R2 receives the packet, according to the IGP packet issued by the intermediate node R3 or the message sent by the control device, it determines that the locator field of the intermediate node R3 is a and the vlocator field is 3, and then according to the compressed 6 corresponding to the intermediate node R3 in the SID list, it restores the original SID of the intermediate node R3 as a:3, so as to subsequently forward the packet with the determined original SID a:3 as the destination address DA.
When the intermediate node R3 receives the packet, according to the IGP packet issued by the intermediate node R4 or the message sent by the control device, it determines that the locator field of the intermediate node R4 is a and the vlocator field is 4, and then, according to the compressed 0 corresponding to the intermediate node R4 in the SID list, restores the original SID of the intermediate node R4 as a:4, so as to forward the packet with the determined original SID a:4 as the destination address DA.
When the intermediate node R4 receives the packet, according to an IGP packet issued by the tail node R5 or a message sent by the control device, it determines that the locator field of the tail node R5 is a, and then according to the compressed 5.
The above procedure of SID restoration described based on fig. 9 is also only one possible example, and the above restoration method may also be applied to SID restoration of network nodes on other forwarding paths. Other possible situations can refer to the explanation of the embodiment shown in fig. 15, which is not described herein.
Fig. 17 is a flowchart of a method for determining a segment identifier according to an embodiment of the present application, and is applied to an intermediate node in an SRv 6-based network, that is, a first network device in the following embodiments may be any intermediate node on a forwarding path. The embodiment shown in fig. 17 is used to explain the process of restoring the segment identifier compressed based on the 20-bit compression scheme shown in fig. 10. As shown in fig. 17, the method includes the following processes:
s1701: the second network device receives a packet, where the packet includes a second segment identifier corresponding to a plurality of consecutive network devices on the forwarding path, the second segment identifier includes third identifier information and fourth identifier information, the plurality of consecutive network devices correspond to the plurality of segment identifiers, the second network device is located on a first one of the plurality of consecutive network devices on the forwarding path, the plurality of segment identifiers include the same third identifier information, and the fourth identifier information is based on the number of the plurality of consecutive network devices.
As in the embodiment shown in fig. 13, the second network device may be an intermediate node in the packet forwarding path in the embodiments shown in fig. 4 to 12. Based on the embodiment shown in fig. 10, it can be known that an application scenario of the 20-bit compression scheme is that function fields of a plurality of network devices on a forwarding path are the same, so at this time, the forwarding path includes a plurality of consecutive network devices, the plurality of consecutive network devices correspond to a plurality of segment identifiers, the first network device is located on a first one of the plurality of consecutive network devices on the forwarding path, and the plurality of segment identifiers include the same third identification information (i.e., the function fields). For example, the second network device may be any of node R2, node R3, or the like. The plurality of consecutive network devices may be nodes on the forwarding path that are behind the second network device and support SRv6 and have the same function field as the function field of the second network device.
The implementation of S1701 may refer to the implementation of S1301 in the embodiment of fig. 13, and details are not repeated here. In addition, based on the embodiment shown in fig. 10, when the function fields of multiple network devices are the same, the original SIDs of the nodes can be compressed by 20-bit compression. At this time, the second segment identifier in S1701 includes third identifier information and fourth identifier information, where the third identifier information is used to indicate the same function field, and the fourth identifier information is used to indicate the number of network devices that are left on the current node packet forwarding path and have the same function field. That is, if the second segment identifiers corresponding to the plurality of network devices are obtained based on a 20-bit compression method, the second segment identifier in S1701 only includes the same function field and information indicating the number of network devices having the same function field, and does not include the floor field and the vlocator field in the original SID. In other possible implementations, the second segment identifier may be information including the same function field and indicating the number of network devices having the same function field, and include the locator field in the original SID without including the vlocator field in the original SID; or the second segment identification may be information including the same function field and indicating the number of network devices having the same function field, and include the vlocator field in the original SID without including the locator field in the original SID.
At this time, for a third network device of a next hop of the second network device in the multiple network devices, the second network device is equivalent to obtain a function field of the third network device through the second segment identifier, and therefore, the second network device may determine the first segment identifier corresponding to the third network device in the implementation manner in the embodiment shown in fig. 15, that is, generate the first segment identifier corresponding to the third network device through the following S1702 and S1703, so as to send the packet according to the first segment identifier through the following S1704.
S1702: for a third network device of a next hop of a second network device of the plurality of network devices, the second network device determines first identification information and second identification information corresponding to the third network device, where the first identification information is used to identify an autonomous domain to which the third network device belongs, and the second identification information is used to identify the third network device in the autonomous domain.
As shown in fig. 3, the second network device may be the intermediate node R2, in which case the third network device may be the intermediate node R3. The second network device may also be an intermediate node R3, in which case the third network device may be an intermediate node R4.
S1703: and the second network equipment generates a first section identification corresponding to the third network equipment based on the first identification information, the second identification information and the second section identification.
S1704: and the second network equipment sends the message to the third network equipment based on the first segment identifier.
The implementations of S1702, S1703, and S1704 may refer to the implementations of S1502, S1503, and S1504 in the embodiment of fig. 15, respectively, and a description thereof is not repeated here.
In addition, since the second segment identifier compresses the original SIDs of a plurality of network devices having the same function field through the third identifier information and the fourth identifier information, in order to facilitate the subsequent node to determine whether the next-hop node is one of the plurality of network devices, the second network device needs to update the fourth identifier information before sending the packet to the third network device. In one possible implementation, the second network device may determine the fifth identification information based on the fourth identification information; determining an updated first segment identifier, wherein the updated first segment identifier comprises third identifier information and fifth identifier information; and the second network equipment sends the message to the second network equipment based on the second section identification, wherein the message comprises the updated first section identification.
Specifically, the fourth identification information may be a first numerical value, the fifth identification information may be a second numerical value, and the second numerical value is the subtraction of 1 from the first numerical value. That is, the fourth identification information is updated to announce the remaining number of network devices having the same function field for the next hop node. When the next hop node receives the updated fourth identification information, if the numerical value indicated by the updated fourth identification information is greater than 1, the destination address of the message is determined continuously by the above method. If the value indicated by the updated fourth identification information is 1, the compression mode of the SID of the next hop node needs to be determined through other information in the SID list, so as to determine the destination address of the packet.
For the process of forwarding a packet based on the 20-bit compression scheme provided in fig. 11, as shown in fig. 11, the SID list included in the SRH in the packet sent by the head node R1 to the intermediate node R2 is: < 5. When the intermediate node R2 receives the packet, it determines that the locator field of the intermediate node R3 is a and the vlocator field is 3, and then, according to the compressed 5060 corresponding to the intermediate node R3 in the SID list, restores that the original SID of the intermediate node R3 is a:3, 5060, and updates 5060 in the packet to 5060. R2 forwards the message by taking the determined original SID A: 3.
When the intermediate node R3 receives the packet, it determines that the locator field of the intermediate node R4 is a and the vlocator field is 4, and then, according to the compressed 5060 corresponding to the intermediate node R4 in the SID list, restores that the original SID of the intermediate node R4 is a:4, 5060, and updates 5060 in the packet to 5060. R3 forwards the message by taking the determined original SID A: 4.
When the intermediate node R4 receives the packet, because 5060 in the packet indicates a network device with only one function field of 5060, and the network device is the intermediate node R4, the intermediate node R4 needs to determine the compression mode of R5 of the tail node, after determining that the compression mode of the tail node is a 32-bit compression mode, determine that the locator field of the tail node R5 is a according to an IGP packet issued by the tail node R5 or a message sent by the control device, then restore, according to the compressed 5.
Likewise, the above procedure of SID restoration based on fig. 11 is only one possible example, and the above restoration method may also be applied to SID restoration of network nodes on other forwarding paths. Other possible situations can refer to the explanation in the embodiment shown in fig. 15, which is not described herein again.
Based on the three different ways of restoring the original SID shown in fig. 14 to fig. 17, in different compression schemes, the way in which the second network device determines the first segment identifier corresponding to the third network device is also different, and therefore, before the second network device restores the first segment identifier corresponding to the third network device based on the second segment identifier, the second network device needs to determine the compression scheme corresponding to the second segment identifier included in the received message and corresponding to the third network device.
In a possible implementation manner, as can be seen from the embodiment shown in fig. 12, the received packet further carries identification information of a compression scheme used for identifying a second segment identifier corresponding to the third network device. For convenience of description later, the identification information is referred to as compression policy identification information (i.e., the identification information in the embodiment shown in fig. 12), and therefore, the first network device may first determine a compression scheme corresponding to the second segment identifier according to the compression policy identification information, and then restore the first segment identifier corresponding to the third network device according to the determined compression scheme through the corresponding embodiments in fig. 14 to 16.
In one possible implementation, as shown in fig. 12, it is assumed that the compression policy identification information is carried in one TLV in SRH. At this time, when receiving the packet, the first network device may parse the TLV, and determine the compression scheme of the third network device according to the TLV. The compression scheme indicating each SID in the TLV has been described in detail in the embodiment shown in fig. 12, and the first network device only needs to analyze the compression scheme of the third network device according to the embodiment shown in fig. 12.
Next, a structure of any network device in the SRv6 network provided in the embodiment of the present application is explained.
Fig. 18 is a schematic structural diagram of a network device according to an embodiment of the present application, where the network device may be any node in a plurality of nodes in a packet forwarding path in an SRv6 network in any embodiment of the present application. The network device 1800 may be a switch, router, or other network device that forwards messages. In this embodiment, the network device 1800 includes: main control board 1810, interface board 1830 and interface board 1840. A plurality of interface boards may include a switching network board (not shown) for performing data exchange between the interface boards (the interface boards are also called line cards or service boards).
The main control board 1810 is used for completing functions such as system management, device maintenance, and protocol processing. The interface boards 1830 and 1840 are used to provide various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.) and implement forwarding of messages. The main control board 1810 mainly includes 3 types of functional units: the system comprises a system management control unit, a system clock unit and a system maintenance unit. The main control board 1810, the interface board 1830 and the interface board 1840 are connected to the system backplane through a system bus to implement intercommunication. The interface board 1830 includes one or more processors 1831 thereon. The processor 1831 is used to control and manage the interface board, communicate with a central processing unit on the main control board, and forward and process a message. The memory 1832 on the interface board 1830 is used for storing forwarding entries, and the processor 1831 forwards the packet by looking up the forwarding entries stored in the memory 1832.
The interface board 1830 includes one or more network interfaces 1833 to receive a packet sent by a previous-hop node and send a processed packet to a next-hop network node according to an instruction of the processor 1831. The specific implementation process is not described in detail here. The detailed functions of the processor 1831 are also not described in detail herein.
It can be understood that, as shown in fig. 18, the present embodiment includes a plurality of interface boards, and a distributed forwarding mechanism is adopted, and operations on the interface board 1840 are basically similar to those of the interface board 1830, and therefore, for brevity, detailed descriptions are omitted. In addition, it is understood that the processors 1831 and/or 1841 in the interface board 1830 in fig. 18 may be dedicated hardware or chip, such as a network processor or an application specific integrated circuit (application specific integrated circuit) to implement the above functions, which is a way of processing the forwarding plane by using dedicated hardware or chip. The specific implementation of the network processor using dedicated hardware or chip can refer to the embodiment shown in fig. 19 below. In other embodiments, the processors 1831 and/or 1841 may also employ a general-purpose processor, such as a general-purpose CPU, to implement the functions described above.
In addition, it should be noted that there may be one or more main control boards, and when there are multiple main control boards, the main control board may include an active main control board and a standby main control board. The interface board may have one or more blocks, and the more data processing capacity the device has, the more interface boards are provided. Under the condition of a plurality of interface boards, the plurality of interface boards can communicate through one or a plurality of exchange network boards, and when a plurality of interface boards exist, the redundant backup of load sharing can be realized together. Under the centralized forwarding architecture, the device does not need a switching network board, and the interface board undertakes the processing function of the service data of the whole system. Under the distributed forwarding architecture, the device comprises a plurality of interface boards, and can realize data exchange among the plurality of interface boards through the exchange network board, thereby providing large-capacity data exchange and processing capacity. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those of devices in a centralized architecture. Which architecture is specifically adopted depends on the specific networking deployment scenario, and is not limited herein.
In particular embodiments, memory 1832 may be, but is not limited to, a read-only Memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, an electrically erasable programmable read-only Memory (EEPROM), a compact disk read-only Memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), a magnetic disk or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 1832 may be separate and coupled to the processor 1831 via a communication bus. The memory 1832 may also be integrated with the processor 1831.
The memory 1832 is used for storing program codes and is controlled by the processor 1831 to execute the path detection method provided by the above embodiments. A processor 1831 is used to execute program code stored in memory 1832. One or more software modules may be included in the program code. The one or more software modules may be software modules provided in any of the embodiments of fig. 21 or fig. 22 below.
In an embodiment, the network interface 1833 may be any device using any transceiver or the like for communicating with other devices or communication networks, such as ethernet, radio access network (radio access network ran), wireless Local Area Network (WLAN), and the like.
Fig. 19 is a schematic structural diagram of another network device provided in this embodiment of the present application, where the network device may be any node in a plurality of nodes in an SRv6 network provided in any embodiment of the foregoing fig. The network device 1900 may be a switch, router, or other network device that forwards messages. In this embodiment, the network device 1900 includes: a main control board 1910, an interface board 1930, a switch screen board 1920, and an interface board 1940. The main control board 1910 is used for completing functions such as system management, device maintenance, protocol processing, and the like. The switch network board 1920 is used for completing data exchange between interface boards (interface boards are also called line cards or service boards). The interface boards 1930 and 1940 are used to provide various service interfaces (e.g., POS interface, GE interface, ATM interface, etc.) and implement forwarding of data packets. The control plane is formed by the control units of the main control board 1910 and the control units on the interface boards 1930 and 1940. There are mainly 3 types of functional units on the main control board 1910: the system comprises a system management control unit, a system clock unit and a system maintenance unit. The main control board 1910, the interface boards 1930 and 1940, and the switch network board 1920 are connected to the system backplane through the system bus to realize intercommunication. The central processor 1931 on the interface board 1930 is used for controlling and managing the interface board and communicating with the central processor on the main control board. The forwarding table entry memory 1934 on the interface board 1930 is configured to store a forwarding table entry, and the network processor 1932 forwards the packet by looking up the forwarding table entry stored in the forwarding table entry memory 1934.
The physical interface card 1933 of the interface board 1930 is configured to receive a message sent by a previous-hop node. The specific implementation process is not described in detail herein.
The detailed functions of the network processor 1932 are not described in detail here.
Then, the processed packet is sent to the next hop node of the first node through the physical interface card 1933. The specific implementation process is not described in detail herein.
It can be understood that, as shown in fig. 19, the present embodiment includes a plurality of interface boards, and a distributed forwarding mechanism is adopted, and in this mechanism, operations on the interface board 1940 are substantially similar to those of the interface board 1930, and for brevity, description is omitted. Further, as described above, the functions of the network processors 1932 and 1942 in fig. 19 may be implemented by an application specific integrated circuit (application specific integrated circuit) instead.
In addition, it should be noted that there may be one or more main control boards, and when there are multiple main control boards, the main control board may include an active main control board and a standby main control board. The interface board may have one or more blocks, the more interface boards are provided the stronger the data processing capacity of the device. There may also be one or more physical interface cards on an interface board. The exchange network board may not have one or more blocks, and when there are more blocks, the load sharing redundancy backup can be realized together. Under the centralized forwarding architecture, the device does not need a switching network board, and the interface board undertakes the processing function of the service data of the whole system. Under the distributed forwarding architecture, the device can have at least one switching network board, and the data exchange among a plurality of interface boards is realized through the switching network board, so that the high-capacity data exchange and processing capacity is provided. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those of devices in a centralized architecture. Which architecture is specifically adopted depends on a specific networking deployment scenario, and is not limited herein.
Fig. 20 is a schematic structural diagram of an interface board 2000 in the network device shown in fig. 19 according to an embodiment of the present application, where the network device where the interface board 2000 is located may be any node in a plurality of nodes included in a packet forwarding path in any embodiment. The interface board 2000 may include a Physical Interface Card (PIC) 2030, a Network Processor (NP) 2020, and a traffic management module (traffic management) 2020.
Wherein, PIC: the physical interface card (physical interface card) is used for realizing the docking function of a physical layer, so that the original flow enters an interface board of the network equipment, and the processed message is sent out from the PIC card.
The network processor NP2020 is configured to implement forwarding processing of a packet. Specifically, the processing of the uplink packet includes: processing a message input interface, classifying an uplink flow, and searching a forwarding table; and (3) downlink message processing: forwarding table lookup, downstream classification, egress interface processing, and the like.
The traffic management TM is used to implement Quality of Service (QoS), line speed forwarding, large-capacity caching, queue management, and other functions. Specifically, the uplink traffic management includes: uplink Qos processing (such as congestion management and queue scheduling) and slicing processing; the downlink traffic management comprises the following steps: packet processing, multicast replication, and downstream Qos processing (e.g., congestion management and queue scheduling).
It is understood that, in the case of a network device having a plurality of interface boards 2000, the plurality of interface boards 2000 can communicate with each other through the switching network 2040.
It should be noted that fig. 20 only shows an exemplary processing flow or module inside the NP, and the processing order of each module in the specific implementation is not limited thereto, and in an actual application, other modules or processing flows may be deployed as needed. The examples of the present application are not intended to be limiting.
Fig. 21 is a schematic diagram of a first network device according to an embodiment of the present application, which is applied in a network supporting an SRv6 protocol. The SRv6 network at least comprises a plurality of network devices supporting SRv6 protocol. In a possible implementation manner, the SRv6 network may also include one or more other network devices that do not support the SRv6 protocol. The first network device may be, for example, R1 shown in fig. 3, and may be a first network device for implementing the method provided in any one of fig. 4, fig. 6, fig. 8, and fig. 10. As shown in fig. 21, the first network device 2100 includes:
a determining module 2101 is configured to determine a first segment identifier corresponding to a second network device, where the first segment identifier includes first identifier information, and the first identifier information is used to identify an autonomous domain to which the second network device belongs. The specific implementation manner may refer to S401 in the embodiment of fig. 4, S601 in the embodiment of fig. 6, S801 in the embodiment of fig. 8, and S1001 in the embodiment of fig. 10.
A generating module 2102 for generating a second segment identification based on the first segment identification, the second segment identification not including the first identification information. The specific implementation manner may refer to S402 in the embodiment of fig. 4, S602 in the embodiment of fig. 6, S802 in the embodiment of fig. 8, and S1002 in the embodiment of fig. 10.
A sending module 2103, configured to send a message to the second network device, where the message includes the second segment identifier. The specific implementation manner may refer to S403 in the embodiment of fig. 4, S603 in the embodiment of fig. 6, S803 in the embodiment of fig. 8, and S1003 in the embodiment of fig. 10.
Optionally, the determining module 2101 is further configured to determine a third segment identifier corresponding to a third network device, where the third segment identifier includes second identifier information and third identifier information, the second identifier information is used to identify an autonomous domain to which the third network device belongs, and the third identifier information is used to identify the third network device in the autonomous domain;
a generating module 2102 further configured to generate the fourth segment identifier based on the third segment identifier, where the fourth segment identifier does not include the second identifier information and the third identifier information;
a sending module 2103, further configured to send the packet to the third network device, where the packet includes the fourth segment identifier.
Optionally, the second network device and the third network device are the same device, the first identification information and the second identification information are the same identification information, and the second segment identifier and the fourth segment identifier are the same segment identifier.
Optionally, the determining module 2101 is further configured to determine a plurality of segment identifiers corresponding to a plurality of network devices, where the plurality of segment identifiers respectively include the same fourth identification information;
a generating module 2102, configured to generate a fifth segment identifier based on the plurality of segment identifiers, where the fifth segment identifier includes the fourth identifier information and fifth identifier information, and the fifth identifier information is used to identify the number of the plurality of network devices;
the sending module 2103 is further configured to send the packet, where the packet includes the fifth segment identifier.
Optionally, the fifth segment of identification does not include the first identification information and sixth identification information respectively corresponding to the plurality of network devices, and the sixth identification information is respectively used for uniquely identifying the plurality of network devices in an autonomous domain to which the plurality of network devices belong.
Optionally, the plurality of network devices include a second network device, and the second segment identifier and the fifth segment identifier are the same segment identifier.
Optionally, the packet further includes seventh identification information, where the seventh identification information is used to identify a policy for generating the second segment identifier by the first network device.
Optionally, the determining module 2101 determines a plurality of segment identifiers corresponding to a plurality of network devices, including:
the determining module determines a plurality of segment identifiers corresponding to a plurality of network devices based on Interior Gateway Protocol (IGP) messages respectively sent by the plurality of network devices; or, the determining module determines a plurality of segment identifiers corresponding to a plurality of network devices based on a control message sent by a control device.
In this embodiment of the present application, the first network device may determine, according to the first segment identifier corresponding to the second network device, the second segment identifier corresponding to the second network device, because the first segment identifier includes the first identifier information for identifying the autonomous domain to which the second network device belongs, and the second segment identifier does not include the first identifier information, the second segment identifier is equivalent to compressing the first segment identifier, and thus, the first network device may carry the compressed segment identifier in a packet sent to the second network device, so as to reduce pressure of the first network device serving as a head node to encapsulate the packet. In addition, compressing the segment identifiers is also beneficial to improving the message forwarding efficiency.
It should be noted that: in the first network device provided in the foregoing embodiment, when determining the segment identifier, the division of each functional module is merely used as an example, and in practical applications, the function allocation may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the first network device and the method for determining segment identifiers provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
Fig. 22 is a schematic diagram of another first network device provided in an embodiment of the present application, and is applied to an SRv6 network, where the SRv6 network at least includes a plurality of network devices supporting an SRv6 protocol. In a possible implementation manner, the SRv6 network may also include one or more other network devices that do not support the SRv6 protocol. The first network device may be, for example, any intermediate node R2, R3, or R4 shown in fig. 3, and may be a second network device or the like for implementing the method provided in any one of fig. 13, fig. 15, fig. 16, and fig. 17. As shown in fig. 22, the first network device 2200 includes:
a receiving module 2201, configured to receive a packet, where the packet includes a first segment identifier corresponding to the second network device. The specific implementation manner may refer to S1301 in the embodiment of fig. 13, S1501 in the embodiment of fig. 15, S1601 in the embodiment of fig. 16, and S1701 in the embodiment of fig. 17.
A determining module 2202, configured to determine first identification information corresponding to the second network device, where the first identification information is used to identify an autonomous domain to which the second network device belongs. The specific implementation manner may refer to S1302 in the embodiment of fig. 13, S1502 in the embodiment of fig. 15, S1602 in the embodiment of fig. 16, and S1702 in the embodiment of fig. 17.
A generating module 2203, configured to generate a second segment identifier corresponding to the second network device based on the first identifier information and the first segment identifier. The specific implementation manner may refer to S1303 in the embodiment of fig. 13, S1503 in the embodiment of fig. 15, S1603 in the embodiment of fig. 16, and S1703 in the embodiment of fig. 17.
A sending module 2204, configured to send the packet to the second network device based on the second segment identifier. The specific implementation manner may refer to S1304 in the embodiment of fig. 13, S1504 in the embodiment of fig. 15, S1604 in the embodiment of fig. 16, and S1704 in the embodiment of fig. 17.
Optionally, the second network device is a next hop device,
a determining module 2202, further configured to determine second identification information, where the second identification information is used to identify the second network device in the autonomous domain;
the generating module 2203 is further configured to generate the second segment identifier corresponding to the second network device based on the first identifier information, the second identifier information and the first segment identifier.
Optionally, a forwarding path of the packet includes multiple consecutive network devices, where the multiple consecutive network devices correspond to multiple segment identifiers, the first network device is located in a first one of the multiple consecutive network devices on the forwarding path, the multiple segment identifiers include the same third identifier information, the first segment identifier includes the third identifier information and fourth identifier information, and the fourth identifier information is used to indicate the number of the multiple consecutive network devices;
the sending module 2204 comprises:
a first determining subunit configured to determine fifth identification information based on the fourth identification information;
a second determining subunit, configured to determine an updated first segment identifier, where the updated first segment identifier includes the third identifier information and the fifth identifier information;
a sending subunit, configured to send the packet to the second network device based on the second segment identifier, where the packet includes the updated first segment identifier.
Optionally, the fourth identification information is a first numerical value, the fifth identification information is a second numerical value, and the second numerical value is the subtraction of 1 from the first numerical value.
Optionally, the determining module 2202 includes:
a receiving subunit, configured to receive a message, where the message includes sixth identification information and seventh identification information corresponding to the second network device, the sixth identification information includes the first identification information, and the seventh identification information is used to identify a length of the first identification information;
a third determining subunit, configured to determine the first identification information based on the sixth identification information and the seventh identification information.
In this application, after the head node compresses the segment identifier of each node on the packet forwarding path in the manner provided by the first aspect, when the first network device receives the packet, the first network device may obtain the compressed portion in the segment identifier, and then restore the packet before compression of the second network device, so as to obtain the destination address for forwarding the packet. Since the head node compresses the segment identifier of each node, the bandwidth occupied by the transmission message between the first network device and the second network device is reduced, thereby improving the efficiency of forwarding the message.
It should be noted that: in the above embodiment, when determining the segment identifier, the first network device is only illustrated by dividing the functional modules, and in practical applications, the function allocation may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the embodiments of the method for determining the segment identifier and the first network device provided by the embodiments described above belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
In addition, an embodiment of the present application further provides a network system, where the system includes a first network device, a second network device, and a third network device, where the first network device is configured to determine a first segment identifier corresponding to the second network device, where the first segment identifier includes first identifier information, where the first identifier information is used to identify an autonomous domain to which the second network device belongs, the first network device generates a second segment identifier based on the first segment identifier, where the second segment identifier does not include the first identifier information, and the first network device sends a packet to the third network device, where the packet includes the second segment identifier; the third network device is configured to receive a packet, where the packet includes the second segment identifier corresponding to the second network device, the third network device determines the first identifier information corresponding to the second network device, where the first identifier information is used to identify an autonomous domain to which the second network device belongs, the third network device generates the first segment identifier corresponding to the second network device based on the first identifier information and the first segment identifier, and the third network device sends the packet to the second network device based on the first segment identifier.
The first network device in the network system may be, for example, R1 shown in fig. 3, which is used to implement the first network device in the method provided in any one of fig. 4, fig. 6, fig. 8, and fig. 10, and may also be used in other possible methods executed by R1 mentioned in the foregoing embodiments of the present application.
The second network device in the network system may be R2, R3 and/or R4 shown in fig. 3, which is used to implement the second network device in the method provided in any one of fig. 13, fig. 15, fig. 16 and fig. 17, and may also be used in other possible methods performed by R2, R3 and/or R4 mentioned in the foregoing embodiments of the present application.
The detailed description about the specific functions of the first network device, the second network device, and the third network device in the network system has been given in the above method embodiments, and will not be repeated here.
Fig. 23 is a schematic structural diagram of a network device according to an embodiment of the present invention. Any of the above embodiments may be implemented by the network device 2300 shown in fig. 23, in which case the network device 2300 may be a switch, a router, or other network devices that forward packets. In addition, the control device in the foregoing embodiment may also be implemented by the network device 2300 shown in fig. 23, and at this time, for a specific function of the network device 2300, reference may be made to the specific implementation manner of the control device in the foregoing embodiment, and details are not described here again. Referring to fig. 23, the network device includes at least one processor 2301, a communication bus 2302, a memory 2303 and at least one communication interface 2304.
The processor 2301 may be a Central Processing Unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs in accordance with the present disclosure.
The communication bus 2302 may include a pathway for transferring information between the aforementioned components.
The Memory 2303 may be, but is not limited to, a read-only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only Memory (EEPROM), a compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), a magnetic disk or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 2303 may be self-contained and coupled to the processor 2301 via a communication bus 2302. The memory 2303 may also be integrated with the processor 2301.
The memory 2303 is used for storing program codes for implementing the present application, and the processor 2301 controls the execution of the program codes. The processor 2301 is operable to execute program code stored in the memory 2303. One or more software modules may be included in the program code. The control node or any of the nodes in the FIG. 4 embodiment may determine data for developing an application by the processor 2301 and one or more software modules in program code in the memory 2303. The one or more software modules may be software modules provided in either of the embodiments of fig. 21 or fig. 22.
Communication interface 2304 may be any device, such as a transceiver, for communicating with other devices or communication networks, such as an ethernet, a radio access network (radio access network ran), a Wireless Local Area Network (WLAN), etc.
In particular implementations, the network device may include multiple processors, such as processor 2301 and processor 2305 shown in fig. 23, as one embodiment. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
The network device may be a general-purpose network device or a special-purpose network device. In a specific implementation, the network device may be a desktop, a laptop, a network server, a Personal Digital Assistant (PDA), a mobile phone, a tablet, a wireless terminal device, a communication device, or an embedded device. The embodiment of the application does not limit the type of the network equipment.
It will be appreciated that the network device shown in fig. 23 is a node that may implement any of the above method embodiments. In addition, any node involved in the embodiments of the present application may also be a virtual node implemented by combining a Network Function Virtualization (NFV) technology based on a general physical server. The virtual node may be a virtual router. The Virtual node may be a Virtual Machine (VM) running a program for providing a messaging function, and the VM is deployed on a hardware device (e.g., a physical server). A virtual machine refers to a complete computer system with complete hardware system functionality, which is emulated by software, running in a completely isolated environment. Through reading the application, a person skilled in the art can combine the NFV technology to virtually generate a plurality of nodes with the above functions on a general physical server. And will not be described in detail herein.
In the above embodiments, the implementation may be wholly or partly realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital Versatile Disk (DVD)), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It will be understood by those skilled in the art that all or part of the processes for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like.
The above-mentioned embodiments are provided by way of example and should not be construed as limiting the present application, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (25)

1. A method for determining segment identifiers, the method comprising:
the method comprises the steps that a first segment of identification corresponding to a second network device is determined by a first network device, wherein the first segment of identification comprises first identification information, and the first identification information is used for identifying an autonomous domain to which the second network device belongs;
the first network device generating a second segment identifier based on the first segment identifier, the second segment identifier not including the first identification information;
and the first network equipment sends a message to the second network equipment, wherein the message comprises the second section identifier and seventh identifier information, and the seventh identifier information is used for identifying a strategy for generating the second section identifier by the first network equipment.
2. The method of claim 1, wherein the method further comprises:
the first network equipment determines a third segment identifier corresponding to third network equipment, wherein the third segment identifier comprises second identifier information and third identifier information, the second identifier information is used for identifying an autonomous domain to which the third network equipment belongs, and the third identifier information is used for identifying the third network equipment in the autonomous domain;
the first network equipment generates a fourth segment identifier based on the third segment identifier, wherein the fourth segment identifier does not comprise the second identifier information and the third identifier information;
and the first network equipment sends the message to the third network equipment, wherein the message comprises the fourth segment identifier.
3. The method of claim 2, wherein the second network device and a third network device are the same device, the first identification information and the second identification information are the same identification information, and the second segment identification and the fourth segment identification are the same segment identification.
4. The method of claim 1, wherein the method further comprises:
the first network device determines a plurality of segment identifiers corresponding to a plurality of network devices, wherein the plurality of segment identifiers respectively comprise the same fourth identification information, and the fourth identification information is a function field in the corresponding segment identifier;
the first network device generates a fifth segment identifier based on the plurality of segment identifiers, wherein the fifth segment identifier includes the fourth identifier information and fifth identifier information, and the fifth identifier information is used for identifying the number of the plurality of network devices;
and the first network equipment sends the message, wherein the message comprises the fifth segment of identification.
5. The method of claim 4, wherein the fifth segment identification excludes the first identification information and sixth identification information corresponding respectively to the plurality of network devices, the sixth identification information being for uniquely identifying the plurality of network devices within an autonomous domain to which the plurality of network devices belong respectively.
6. The method of claim 4, wherein the plurality of network devices includes a second network device, and wherein the second segment identification and the fifth segment identification are the same segment identification.
7. The method of any of claims 4 to 6, wherein the first network device determines a plurality of segment identifications corresponding to a plurality of network devices as:
the first network device determines a plurality of segment identifiers corresponding to a plurality of network devices based on Interior Gateway Protocol (IGP) messages respectively sent by the plurality of network devices; alternatively, the first and second liquid crystal display panels may be,
the first network device determines a plurality of segment identifiers corresponding to a plurality of network devices based on a control message sent by a control device.
8. A method for determining segment identifiers, the method comprising:
a first network device receives a message, wherein the message comprises a first segment identifier corresponding to a second network device and a strategy for identifying the second network device to generate the first segment identifier, the first segment identifier does not comprise first identifier information corresponding to the second network device, and the first identifier information is used for identifying an autonomous domain to which the second network device belongs;
the first network device determines first identification information corresponding to the second network device based on a policy for identifying the second network device generating the first segment identifier;
the first network device generates a second segment identifier corresponding to the second network device based on the first identifier information and the first segment identifier, wherein the second segment identifier comprises the first identifier information;
and the first network equipment sends the message to the second network equipment based on the second section identification.
9. The method of claim 8, wherein the second network device is a next hop device of the first network device, the method comprising:
the first network equipment determines second identification information, wherein the second identification information is used for identifying the second network equipment in the autonomous domain;
the first network device generates, based on the first identification information and the first segment identifier, a second segment identifier corresponding to the second network device, which specifically is:
and the first network equipment generates the second section identification corresponding to the second network equipment based on the first identification information, the second identification information and the first section identification.
10. The method of claim 9, wherein a forwarding path of the packet includes a plurality of consecutive network devices, the plurality of consecutive network devices correspond to a plurality of segment identifiers, the first network device is located on a first one of the plurality of consecutive network devices on the forwarding path, the plurality of segment identifiers include a same third identifier information, the first segment identifier includes the third identifier information and a fourth identifier information, the third identifier information is a function field in a corresponding segment identifier, the fourth identifier information is used to indicate the number of the plurality of consecutive network devices, and the first network device sends the packet to the second network device based on the second segment identifier, including:
the first network device determines fifth identification information based on the fourth identification information, wherein the fifth identification information is used for announcing the remaining number of network devices of which the next hop nodes have the same functional field;
the first network device determines an updated first segment identifier, where the updated first segment identifier includes the third identifier information and the fifth identifier information;
and the first network equipment sends the message to the second network equipment based on the second section identification, wherein the message comprises the updated first section identification.
11. The method of claim 10, wherein the fourth identification information is a first numerical value, the fifth identification information is a second numerical value, and the second numerical value is the first numerical value minus 1.
12. The method according to any of claims 8 to 11, wherein the determining, by the first network device, the first identification information corresponding to the second network device comprises:
the first network device receives a message, wherein the message comprises sixth identification information and seventh identification information corresponding to the second network device, the sixth identification information is used for indicating the position identification of the second network device, the sixth identification information comprises the first identification information, and the seventh identification information is used for identifying the length of the first identification information;
the first network device determines the first identification information based on the sixth identification information and the seventh identification information.
13. A first network device, wherein the first network device comprises:
the device comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a first segment identifier corresponding to second network equipment, the first segment identifier comprises first identifier information, and the first identifier information is used for identifying an autonomous domain to which the second network equipment belongs;
a generation module configured to generate a second segment identifier based on the first segment identifier, the second segment identifier not including the first identifier information;
a sending module, configured to send a packet to the second network device, where the packet includes the second segment identifier and seventh identifier information, and the seventh identifier information is used to identify a policy for generating the second segment identifier by the first network device.
14. The apparatus of claim 13,
the determining module is further configured to determine a third segment identifier corresponding to a third network device, where the third segment identifier includes second identifier information and third identifier information, the second identifier information is used to identify an autonomous domain to which the third network device belongs, and the third identifier information is used to identify the third network device in the autonomous domain;
the generating module is further configured to generate a fourth segment identifier based on the third segment identifier, where the fourth segment identifier does not include the second identifier information and the third identifier information;
the sending module is further configured to send the packet to the third network device, where the packet includes the fourth segment identifier.
15. The device of claim 14, wherein the second network device and a third network device are the same device, the first identification information and the second identification information are the same identification information, and the second segment identification and the fourth segment identification are the same segment identification.
16. The apparatus of claim 13,
the determining module is further configured to determine a plurality of segment identifiers corresponding to a plurality of network devices, where the plurality of segment identifiers respectively include the same fourth identifier information, and the fourth identifier information is a function field in a corresponding segment identifier;
the generating module is further configured to generate a fifth segment identifier based on the plurality of segment identifiers, where the fifth segment identifier includes the fourth identifier information and fifth identifier information, and the fifth identifier information is used to identify the number of the plurality of network devices;
the sending module is further configured to send the packet, where the packet includes the fifth segment identifier.
17. The device of claim 16, wherein the fifth segment identification excludes the first identification information and sixth identification information corresponding respectively to the plurality of network devices, the sixth identification information being for uniquely identifying the plurality of network devices within an autonomous domain to which the plurality of network devices belong respectively.
18. The device of claim 16, wherein the plurality of network devices includes the second network device, the second segment identification and the fifth segment identification being a same segment identification.
19. The device of any of claims 16 to 18, wherein the determination module determines a plurality of segment identifications corresponding to a plurality of network devices, comprising:
the determining module determines a plurality of segment identifiers corresponding to a plurality of network devices based on Interior Gateway Protocol (IGP) messages respectively sent by the plurality of network devices; alternatively, the first and second electrodes may be,
the determination module determines a plurality of segment identifications corresponding to a plurality of network devices based on a control message transmitted by a control device.
20. A first network device, wherein the first network device comprises:
a receiving module, configured to receive a packet, where the packet includes a first segment identifier corresponding to a second network device and a policy for identifying that the second network device generates the first segment identifier, where the first segment identifier does not include first identifier information corresponding to the second network device, and the first identifier information is used to identify an autonomous domain to which the second network device belongs;
a determining module, configured to determine, based on a policy for identifying that the second network device generates the first segment identifier, first identifier information corresponding to the second network device, where the first identifier information is used to identify an autonomous domain to which the second network device belongs;
a generating module, configured to generate a second segment identifier corresponding to the second network device based on the first identifier information and the first segment identifier, where the second segment identifier includes the first identifier information;
and the sending module is used for sending the message to the second network equipment based on the second segment identifier.
21. The device of claim 20, wherein the second network device is a next hop device of the first network device,
the determining module is further configured to determine second identification information, where the second identification information is used to identify the second network device in the autonomous domain;
the generation module is configured to generate the second segment identifier corresponding to the second network device based on the first identifier information, the second identifier information, and the first segment identifier.
22. The device of claim 21, wherein a forwarding path of the packet includes a plurality of consecutive network devices, the plurality of consecutive network devices correspond to a plurality of segment identifiers, the first network device is located in a first one of the plurality of consecutive network devices on the forwarding path, the plurality of segment identifiers include a same third identification information, the first segment identifier includes the third identification information and a fourth identification information, the third identification information is a function field in a corresponding segment identifier, the fourth identification information indicates a number of the plurality of consecutive network devices, and the sending module includes:
a first determining subunit, configured to determine fifth identification information based on the fourth identification information, where the fifth identification information is used to announce that the next-hop node has the remaining number of network devices with the same function field;
a second determining subunit, configured to determine an updated first segment identifier, where the updated first segment identifier includes the third identifier information and the fifth identifier information;
a sending subunit, configured to send the packet to the second network device based on the second segment identifier, where the packet includes the updated first segment identifier.
23. The apparatus of claim 22, wherein the fourth identification information is a first numerical value, the fifth identification information is a second numerical value, and the second numerical value is the first numerical value minus 1.
24. The apparatus of any of claims 20 to 23, the determining module comprising:
a receiving subunit, configured to receive a message, where the message includes sixth identification information and seventh identification information corresponding to the second network device, the sixth identification information is used to indicate a location identifier of the second network device, the sixth identification information includes the first identification information, and the seventh identification information is used to identify a length of the first identification information;
a third determining subunit, configured to determine the first identification information based on the sixth identification information and the seventh identification information.
25. A network device, comprising a memory and a processor;
the memory is used for storing a computer program;
the processor is configured to execute a computer program stored in the memory to perform the method of any of claims 1-7 or to perform the method of any of claims 8-12.
CN201911395279.7A 2019-12-30 2019-12-30 Segment identifier determination method and device Active CN113132229B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911395279.7A CN113132229B (en) 2019-12-30 2019-12-30 Segment identifier determination method and device
PCT/CN2020/118937 WO2021135468A1 (en) 2019-12-30 2020-09-29 Segment identifier determining method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911395279.7A CN113132229B (en) 2019-12-30 2019-12-30 Segment identifier determination method and device

Publications (2)

Publication Number Publication Date
CN113132229A CN113132229A (en) 2021-07-16
CN113132229B true CN113132229B (en) 2022-10-28

Family

ID=76687104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911395279.7A Active CN113132229B (en) 2019-12-30 2019-12-30 Segment identifier determination method and device

Country Status (2)

Country Link
CN (1) CN113132229B (en)
WO (1) WO2021135468A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112511428A (en) * 2020-03-10 2021-03-16 中兴通讯股份有限公司 Message encapsulation method, message forwarding method, notification method, electronic device, and storage medium
CN113726654B (en) * 2021-08-13 2023-05-26 新华三信息安全技术有限公司 Message forwarding method and device of SRV6 protocol, electronic equipment and medium
CN113691451B (en) * 2021-09-22 2022-08-19 新华三技术有限公司 Segment identifier determination method and device
CN113872866B (en) * 2021-09-28 2023-04-07 中国电信股份有限公司 Message forwarding method, system and storage medium
CN114157601B (en) * 2021-11-29 2024-03-29 中国联合网络通信集团有限公司 Message transmission method, device and storage medium
CN114389996B (en) * 2022-01-04 2023-06-09 烽火通信科技股份有限公司 Method and device for SRv SID distribution in multi-topology environment based on resources
CN114826999B (en) * 2022-03-22 2023-06-20 北京邮电大学 Satellite network data transmission method and device
WO2023185235A1 (en) * 2022-04-02 2023-10-05 华为技术有限公司 Packet forwarding method, apparatus and system
CN115065725B (en) * 2022-05-12 2024-01-12 北京奇艺世纪科技有限公司 Data processing method, device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067652A (en) * 2018-09-25 2018-12-21 盛科网络(苏州)有限公司 The method and device of segment identification expense is saved in a kind of IPv6 Segment routing

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9762488B2 (en) * 2014-03-06 2017-09-12 Cisco Technology, Inc. Segment routing extension headers
US9832115B2 (en) * 2014-10-29 2017-11-28 Cisco Technology, Inc. Label-switched packets with device-independent labels
CN106789619B (en) * 2015-11-24 2020-06-09 华为技术有限公司 Method for determining mapping server, routing node and autonomous system
US10506083B2 (en) * 2017-06-27 2019-12-10 Cisco Technology, Inc. Segment routing gateway storing segment routing encapsulating header used in encapsulating and forwarding of returned native packet
CN109218258B (en) * 2017-06-30 2021-01-05 华为技术有限公司 Data packet transmission method and gateway equipment
CN109802888B (en) * 2017-11-16 2021-11-09 中兴通讯股份有限公司 Method and device based on anycast address protection
US10924399B2 (en) * 2018-03-15 2021-02-16 Cisco Technology, Inc. Segment routing packet policies and functions including an engineered reverse reply path providing efficiencies in communicating packets in a network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109067652A (en) * 2018-09-25 2018-12-21 盛科网络(苏州)有限公司 The method and device of segment identification expense is saved in a kind of IPv6 Segment routing

Also Published As

Publication number Publication date
CN113132229A (en) 2021-07-16
WO2021135468A1 (en) 2021-07-08

Similar Documents

Publication Publication Date Title
CN113132229B (en) Segment identifier determination method and device
EP4047888A1 (en) Method for issuing oam configuration information and control node
US7936668B2 (en) Methods and apparatus for distributing label information
US20230137778A1 (en) Packet Sending Method and Apparatus, Network Device, System, and Storage Medium
US9973427B2 (en) Method for determining management domain, network device, and virtual cluster
CN113973082A (en) Message processing method and network equipment
US20230300070A1 (en) Packet Sending Method, Device, and System
CN114374634A (en) Message forwarding method and network equipment
US20240048479A1 (en) Packet Forwarding Method and Apparatus, Network Device, and Storage Medium
CN109218176B (en) Message processing method and device
US20230224241A1 (en) Path Identity Allocation Method, System, and Apparatus, Device, and Storage Medium
CN114157600A (en) Method, equipment and system for forwarding message
US20220255864A1 (en) Service packet forwarding method, apparatus, and computer storage medium
EP4167544A1 (en) Load balancing method, apparatus, network device, and system
CN114513485A (en) Method, device, equipment and system for obtaining mapping rule and readable storage medium
CN114531360A (en) Semantic name acquisition method, device, equipment and storage medium
CN113595915A (en) Method for forwarding message and related equipment
CN112751766A (en) Message forwarding method and device and computer storage medium
JP7273130B2 (en) Communication method and device
CN117478591A (en) Message processing method, network equipment and system
CN117097818A (en) Message processing method and related equipment
CN117615017A (en) Calculation force request method, device and system
JP2023542219A (en) Packet transmission method and device
CN114143142A (en) Message transmission method and device
CN117097656A (en) Message processing method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant