CN113132229A - Segment identifier determination method and device - Google Patents

Segment identifier determination method and device Download PDF

Info

Publication number
CN113132229A
CN113132229A CN201911395279.7A CN201911395279A CN113132229A CN 113132229 A CN113132229 A CN 113132229A CN 201911395279 A CN201911395279 A CN 201911395279A CN 113132229 A CN113132229 A CN 113132229A
Authority
CN
China
Prior art keywords
network device
identifier
identification information
segment
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.)
Granted
Application number
CN201911395279.7A
Other languages
Chinese (zh)
Other versions
CN113132229B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

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 the first segment identifier compressed, 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 to encapsulate the message. In addition, compressing the segment identifier 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. SR technology can be applied to a network supporting the sixth generation internet protocol (IPv 6), referred to as SRv6 network. In SRv6 the network, the head node encapsulates a Segment Routing Header (SRH) in the 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 identifier.
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 identifier 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 within the 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 the intermediate node on the packet forwarding path to quickly determine the destination address of the forwarding packet according to the compressed segment identifier, the packet may further 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 forwarding 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 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 packet between the first network device and the second network device is reduced, thereby improving the efficiency of forwarding the packet.
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 is specifically: 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 also compressed when the segment identifier is compressed, the segment identifier 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 section identification, wherein the message comprises the updated first section 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 of 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 confirm 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 network devices, where the segment identifier remaining on the forwarding path of the packet from the first network device includes the third identification information, the fourth identification information may be updated in a manner that the numerical value indicated by the fourth identification information is directly subtracted by 1.
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 provided 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 packet forwarding process according to 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 flow chart 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 describing an associated object, and means that there may be three relationships, e.g., a and/or B, which 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 IPv6 message head by head node in SRv6 network, and pressing an IPv6 address list into SRH. The forwarding of IPv6 packets one by one is accomplished by SRv6 forwarding nodes in the network constantly updating the destination address according to the IPv6 address list. 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 the type of the next packet header, a field Hdr Ext Len for indicating the length of the SRH header, a field routing type for indicating the type of the route, a field segment left for indicating the 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 SRv6 network is called IPv6 DA for short. 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],. Where each Segment List [ m ], m 0 ≦ n in the SID List may correspond to a respective 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 SRv6 protocol.
In SRv6 network, taking the example that the Segments List values in the SID List all correspond to the nodes on the forwarding path, every time a node supporting SRv6 is passed, the SL field value is reduced by 1, and the information of IPv6 DA is also transformed. The SL field and the SID list field together determine the information of IPv6 DA. The specific transformation procedure is exemplified as follows:
if the SL value is n, the IPv6 DA value is the value of Segments List [ n ] in the SID List.
...
If SL value is 1, IPv6 DA takes the value of Segments List [1] in the SID List.
If SL value is 0, 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 unique functions, and the SID in a SRv6 network may represent a node or a link, may represent a Virtual Private Network (VPN) of L2/L3, 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 of 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. End.dt specifically includes types such as end.dt4, where end.dt is used to represent a SID of a Provider Edge (PE) device, and is used to identify a VPN instance of a certain fourth-generation internet protocol (IPv 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 node R1, node R2, node R3, node R4, and node R5. The node R1 is the head node of the SRv6 network, the nodes R2, R3 and R4 are the middle nodes of the SRv6 network, and the node R5 is the tail node of the SRv6 network.
The node R1 is configured to push an SRH into a packet, forward the packet pushed into the SRH to the node R2, and forward the packet to the node R5 by the node R2 hop by hop according to the SRH. The node R1, the node R2, the node R3, the node R4 and the node R5 may be any routing device having SRv6 functions. In addition, the SRv6 network shown in fig. 3 is only illustrated with five nodes as an example, and does not constitute the only limitation on the number of nodes in the SRv6 network provided by the embodiments 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 the embodiment of the present application mainly includes two processes, one is a process in which the head node presses the SRH into 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 separately below.
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 SRv6 a head node in a 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 forwarding path in 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 corresponding to the second network device is identified as 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 by the network device itself in the network, 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 SRv6 the locator fields of the various nodes in the 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 to 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 multiple 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 obtain related information (e.g., a vlocator field in the original SID) of the other party in advance, 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 method is that the compressed second segment identifier does not include a locator field (i.e. the first identification information in S401) nor a vlocator field, but includes only a function field, and if the length of the function field is 16 bits, the compression method may be referred to as 16-bit compression. Secondly, the compressed second segment identifier does not include the locator field (also the first identifier information in S401) nor the vlocator field, but includes only 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 the locator field (i.e. the first identification information in S401) nor the function field, but only includes the vlocator field, and in order to distinguish 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-mentioned strict display path and the loose display path may be applied to the compression schemes respectively as an example, and it is understood that in some possible implementations, the application 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.
Such as 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 identifications for other network devices on the forwarding path and encapsulate the compressed identifications in 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 R3 as an example, the message sent after the SRH header is encapsulated by R1 will be sent to R2 first, and an update operation is performed, such as hit and pop after the compressed Segment List [3] is 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, or 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 locator, vlocator and/or function fields change, the original SID may still adopt the three compression methods during compression, but the compressed SID length may change.
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 steps:
s601: 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 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 may be configured with two types of original SIDs, e.g., END A:1:0 and END. X A:1:3, respectively, END A:1:0 for identifying node R1 and END. X A:1:3 for identifying the link of node R1 to the next hop node R2. Similarly, node R2 may also be configured with two types of original SIDs, END A:2:0 and END. X A:2:5, respectively, END A:2:0 identifying node R2 and END. X A:2:5 identifying the link from node R2 to node R3. Node R3 is configured with two types of original SIDs, END A:3:0 and END.X A:3:6, respectively, END A:3:0 for identifying node R3 and END.X A:3:6 for identifying the link from node R3 to node R4. Node R4 is configured with two types of original SIDs, END A:4:0 and END. X A:4:1, END A:4:0 for identifying node R4 and END. X A:4:1 for identifying the link from node R4 to node R5. The node R5 is configured with a type of original SID, END DT 4A: 5:8001, END DT 4A: 5:8001 for identifying that node R5 corresponds to an IPv4 VPN instance. These original SIDs are all expressed in a format of x ×: x, where the first ": "preceding field is locator field, first": "and second": "fields between are vlocator fields, second": the field after "is a function field.
When forwarding a message, the head node may specify a message forwarding path 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, etc.
Still taking fig. 7 as an example, the list of original SIDs received by the head node R1 before compression can be expressed as: < A:5:8001, A:4:0, A:3:6, A:2:0 >. If the header node R1 compresses the original list of SIDs in a 32-bit compression, the compressed list of SIDs can be represented as: <5:8001, 4:0, 3:6, 2:0>, i.e., none of the compressed SIDs includes the same AS domain identification "A". The compressed SID list in the message sent by the head node R1 to the intermediate node R2 is denoted as <5:8001, 4:0, 3:6, 2:0 >. 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 the SID values of the respective types 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 forwarding path in 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 the 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 can 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:0 and END. X A:1:3, respectively. Node R2 is configured with two types of original SIDs, END A:2:0 and END. X A:2:5, respectively. Node R3 is configured with two types of original SIDs, END A:3:0 and END. X A:3:6, respectively. Node R4 is configured with two types of original SIDs, END A:4:0 and END. X A:4:1, respectively. Node R5 is configured with one type of original SID, END DT 4A: 5: 8001. 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:8001, A:4:1, A:3:6, A:2:5 >. The path for forwarding the packet from R1 to R5 is a strict display path, so the head node can compress the intermediate node R2, the intermediate node R3, and the intermediate node 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, and the list of compressed SIDs may be represented as <5:8001, 1, 6, 5 >. That is, the list of SIDs included in the SRH in the message sent by the head node R1 to the intermediate node R2 is <5:8001, 1, 6, 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 segment identifiers according to an embodiment of the present application, which is used to explain such a compression scheme of 20 bits. The method comprises the following steps:
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 after 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, 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.
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 respective 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 may be 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 fifth segment identifier is compressed by the 20-bit compression method shown in fig. 10, the fifth segment identifier after compression may further not include the first identifier information (i.e., the locator field) and the sixth identifier information (i.e., the vlocator field) respectively corresponding to the multiple network devices. The sixth identification information is used for uniquely identifying 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: 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 receiving the packet in the multiple network devices may be a subsequent node on a strict display path forwarding 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 32-bit or 16-bit compression scheme, for example.
Fig. 11 is a schematic diagram of a forwarding packet based on the 20-bit compression scheme 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:0 and end.x a:1:5060, respectively. Node R2 is configured with two types of original SIDs, END a:2:0 and end.x a:2:5060, respectively. Node R3 is configured with two types of original SIDs, END a:3:0 and end.x a:3:5060, respectively. Node R4 is configured with two types of original SIDs, END a:4:0 and end.x a:4:5060, respectively. Node R5 is configured with one type of original SID, END DT 4A: 5: 8001. 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:4:5060, A:3:5060, A:2:5060 >. At this time, since the forwarding path of the packet is a strict display path and the function fields of the original SIDs corresponding to the intermediate nodes 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 may be denoted as <5:8001, 5060:3 >. In the SID list, 5:8001 corresponds to tail node R5. 5060:3 is used to indicate node R2 through node R4 with 3 function fields each 5060. The SRH in the message sent by the head node R1 to the intermediate node R2 includes a list of SIDs <5:8001, 5060:3 >.
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 identifiers of the intermediate nodes R2 to R4 by using an 8-bit compression method, and generates the second segment identifier 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 various specific implementation manners for SRH expansion, and it is only necessary to ensure that the expanded SRH can indicate the compression scheme (including the 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 cssd compressed by 20 bits, a cssd compressed by 8 bits, and a cssd compressed by 32 bits, and may further include 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, the above-mentioned multiple identification information for indicating the compression policy may be carried by a type-length-value (TLV) field, and 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 a 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 SID list. 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 into one group 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, each group of 128 bits may further include a plurality of compressed SIDs. 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. The network device receiving the message can restore the obtained SID according to the obtained 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 by 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 the compression scheme of the original SID for each network device according to actual requirements, and then transmits 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 SRv 6-based intermediate nodes in a 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 an 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 behind the second network device on the forwarding path. As shown in fig. 3, 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. 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 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 a SID obtained after the header node compresses the original SID (that is, the first segment identifier in the embodiment shown in fig. 4) of the third network device. 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 one 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 the first identifier information 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 packet according to an embodiment of the present application. As shown in fig. 14, the IGP message includes a location identifier field (locator) and a subtype length value (TLV), and the TLV is used to carry the length of the locator (denoted as the first location in fig. 14) field and the length of the vlocator (denoted as the 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 devices on the packet forwarding path belong 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 may 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 identifier.
Based on S1303, it can be known that 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 SRv 6-based intermediate nodes in a 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 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 12, and a next SRv 6-capable node located after 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 the same, the information of the pointers may also be stored in each network node in advance for use in restoring the SID.
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 the packet based on the 32-bit compression scheme provided in fig. 7, as shown in fig. 7, the SID list included in the SRH sent by the head node R1 to the intermediate node R2 is: <5:8001, 4:0, 3:6, 2:0 >. When the intermediate node R2 receives the packet, it determines the locator field of the intermediate node R3 as a according to the IGP packet issued by the intermediate node R3 in advance or the message sent by the control device in advance, and then restores the original SID of the intermediate node R3 as a:3:6 according to the compressed 3:6 corresponding to the intermediate node R3 in the SID list, so as to forward the packet with the determined original SID a:3:6 as the destination address DA of the next hop.
When the intermediate node R3 receives the packet, it determines the locator field of the intermediate node R4 as a according to the IGP packet issued by the intermediate node R4 or the message sent in advance by the control device, and then restores the original SID of the intermediate node R4 as a:4:0 according to the compressed 4:0 corresponding to the intermediate node R4 in the SID list, so as to forward the packet with the determined original SID a:4:0 as the destination address DA.
When the intermediate node R4 receives the packet, it determines the pointer field of the tail node R5 as a according to the IGP packet issued by the tail node R5 or the control device or the message sent by the control device in advance, and then restores the original SID of the tail node R5 as a:5:8001 according to the compressed 5:8001 corresponding to the tail node R5 in the SID list, so as to forward the packet with 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 case, 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 SRv 6-based intermediate nodes in a 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 12, and the third network device is the next SRv 6-capable node 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, does not include the vlocator field, and only includes the function field. Therefore, the first network device needs to determine, in addition to the first identification information, 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 the IGP packet, or the control device sends a message 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 manner of S1604 may refer to S1304 in the embodiment of fig. 3, and details are not repeated here again.
For the process of forwarding the packet based on the 16-bit compression scheme provided in fig. 9, as shown in fig. 9, the SID list included in the SRH sent by the head node R1 to the intermediate node R2 is: <8001, 1, 6, 5 >. When the intermediate node R2 receives the packet, it determines that the locator field of the intermediate node R3 is A, vlocator field 3 according to the IGP packet issued by the intermediate node R3 or the message sent by the control device, and then restores the original SID of the intermediate node R3 as a:3:6 according to the compressed 6 corresponding to the intermediate node R3 in the SID list, so as to forward the packet with the determined original SID a:3:6 as the destination address DA.
When the intermediate node R3 receives the packet, it determines that the locator field of the intermediate node R4 is A, vlocator field 4 according to the IGP packet issued by the intermediate node R4 or the message sent by the control device, and then restores the original SID of the intermediate node R4 as a:4:0 according to the compressed 0 corresponding to the intermediate node R4 in the SID list, so as to forward the packet with the determined original SID a:4:0 as the destination address DA.
When the intermediate node R4 receives the packet, it determines that the locator field of the tail node R5 is a according to the IGP packet issued by the tail node R5 or the message sent by the control device, and then restores the original SID of the tail node R5 to be a:5:8001 according to the compressed 5:8001 corresponding to the tail node R5 in the SID list, so as to forward the packet with the determined original SID a:5:8001 as the destination address DA.
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 SRv 6-based intermediate nodes in a 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 one of node R2, or 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 that support SRv6 and have a function field that is the same 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 intermediate node R2, in which case the third network device may be 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 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 inform the next hop node of the remaining number of network devices having the same function field. 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 the packet based on the 20-bit compression scheme provided in fig. 11, as shown in fig. 11, the SID list included in the SRH sent by the head node R1 to the intermediate node R2 is: <5:8001, 5060:3 >. When the intermediate node R2 receives the packet, it determines that the pointer field of the intermediate node R3 is A, vlocator and the field is 3, then according to the compressed 5060 corresponding to the intermediate node R3 in the SID list, it restores that the original SID of the intermediate node R3 is a:3:5060, and updates 5060:3 in the packet to 5060:2, which is used to indicate that there are two network devices with function fields of 5060 on the packet forwarding path. R2 forwards the message with the determined original SID A:3:5060 as the destination address DA.
When the intermediate node R3 receives the packet, it determines that the pointer field of the intermediate node R4 is A, vlocator and the field is 4, then according to the compressed 5060 corresponding to the intermediate node R4 in the SID list, it restores the original SID of the intermediate node R4 to be a:4:5060, and updates 5060:2 in the packet to be 5060:1, which is used to indicate that there are 1 network devices with function fields of 5060 on the packet forwarding path. R3 forwards the message with the determined original SID A:4:5060 as the destination address DA.
When the intermediate node R4 receives the packet, because 5060:1 indicates that only one network device with a function field of 5060 is a network device with a function field of R4, the network device is the intermediate node R4, the intermediate node R4 needs to determine the compression mode of the R5 of the tail node, determine the pointer field of the tail node R5 as a according to the IGP packet issued by the tail node R5 or the message sent by the control device after determining the compression mode of the tail node as a 32-bit compression mode, then restore the original SID of the tail node R5 as a:5:8001 according to the compressed 5:8001 corresponding to the tail node R5 in the SID list, and then forward the packet by using the determined original SID a:5:8001 as the destination address DA.
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 of the embodiment shown in fig. 15, which is not described herein.
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 the SRv6 network according to any embodiment. 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 switch 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 the packet. The memory 1832 of the interface board 1830 is used for storing a forwarding table, and the processor 1831 forwards the message by looking up the forwarding table 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 herein. The detailed functions of the processor 1831 are not repeated here.
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. Furthermore, it is understood that the processors 1831 and/or 1841 in the interface board 1830 in fig. 18 may be dedicated hardware or chips, 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 chips. 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, the more interface boards are provided the stronger the data processing capacity of the device. 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 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, but is not limited to such. 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 a 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 SRv6 networks 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 to complete functions such as system management, device maintenance, and protocol processing. 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, the control units on the interface boards 1930 and 1940, and the like. The main control board 1910 is mainly provided with 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 1910, the interface boards 1930 and 1940, and the switch network board 1920 are connected with the system backplane through a 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 packet 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 large-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 the 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 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 upstream 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 process flow or module inside the NP, the processing order of each module in the specific implementation is not limited thereto, and other modules or process flows may be deployed as required in practical applications. The examples of the present application are not to be construed as limiting.
Fig. 21 is a schematic diagram of a first network device according to an embodiment of the present application, which is applied to a network supporting SRv6 protocol. At least a plurality of network devices supporting SRv6 protocols are included in the SRv6 network. 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, 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;
the sending module 2103 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 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 within the 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 identifier 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, only the division of each functional module is used for illustration, and in practical application, the function distribution 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 SRv6 network, where the SRv6 network includes at least 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, any one of the intermediate nodes R2, R3, or R4 shown in fig. 3, and may be a second network device or the like for implementing the methods provided in any one of fig. 13, fig. 15, fig. 16, and fig. 17 described above. As shown in fig. 22, the first network device 2200 includes:
a receiving module 2201, configured to receive a message, where the message 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 identification information, the second identification 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 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;
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 packet between the first network device and the second network device is reduced, thereby improving the efficiency of forwarding the packet.
It should be noted that: the foregoing embodiment provides that, when determining the segment identifier, the first network device only uses the above-mentioned division of the functional modules for illustration, and in practical applications, the above-mentioned 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-mentioned 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 performed 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, the second network device for implementing the method provided in any one of fig. 13, fig. 15, fig. 16, and fig. 17, or 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, specific functions of the network device 2300 may refer to a specific implementation manner of the control device in the foregoing embodiment, which is not described herein 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 general-purpose 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 communicating 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 disk storage, optical disk 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 executing the present application, and the processor 2301 controls the execution. The processor 2301 is operative 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 is to be understood that the network device shown in fig. 23 is a node that can implement any of the above-described 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, 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 not to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (27)

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 generates 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 identification.
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 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.
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 identifier and the fourth segment identifier are the same segment identifier.
4. The method of any of claims 1 to 3, further comprising:
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 identifier.
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 or 5, wherein the plurality of network devices includes a second network device, and wherein the second segment identifier and the fifth segment identifier are the same segment identifier.
7. The method according to any of claims 1 to 6, wherein the packet further comprises seventh identification information, the seventh identification information being used to identify a policy for the first network device to generate the second segment identifier.
8. The method of any of claims 4 to 7, 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 electrodes 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.
9. A method for determining segment identifiers, the method comprising:
a first network device receives a message, wherein the message comprises a first section 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.
10. The method of claim 9, 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.
11. The method according to claim 9 or 10, 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 identification information, the first segment identifier includes the third identification information and a fourth identification information, the fourth identification information is used for indicating 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;
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.
12. The method of claim 11, 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.
13. The method according to any of claims 9 to 12, wherein the determining, by the first network device, the first identification information corresponding to the second network device comprises:
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.
14. A first network device, wherein the first network device comprises:
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.
15. The apparatus of claim 14,
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.
16. The device of claim 15, 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 identifier and the fourth segment identifier are the same segment identifier.
17. The apparatus according to any one of claims 14 to 16,
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.
18. The device of claim 17, 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.
19. The device of claim 17 or 18, wherein the plurality of network devices includes the second network device, and wherein the second segment identification and the fifth segment identification are the same segment identification.
20. The device according to any of claims 14 to 19, wherein the message further comprises seventh identification information, the seventh identification information being used to identify a policy for the first network device to generate the second segment identity.
21. The device of any of claims 17 to 20, wherein the determining 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.
22. 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;
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.
23. The device of claim 22, 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.
24. The device according to claim 22 or 23, 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 fourth identifier information is used to indicate the number of the plurality of consecutive network devices, 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.
25. The apparatus of claim 24, 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.
26. The apparatus of any of claims 22 to 25, 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 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.
27. 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 one of claims 1-8 or to perform the method of any one of claims 9-13.
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 true CN113132229A (en) 2021-07-16
CN113132229B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113691451A (en) * 2021-09-22 2021-11-23 新华三信息安全技术有限公司 Segment identifier determination method and device
CN113726654A (en) * 2021-08-13 2021-11-30 新华三信息安全技术有限公司 Message forwarding method and device of SRV6 protocol, electronic equipment and medium
CN113872866A (en) * 2021-09-28 2021-12-31 中国电信股份有限公司 Message forwarding method, system and storage medium
CN114157601A (en) * 2021-11-29 2022-03-08 中国联合网络通信集团有限公司 Message transmission method, device and storage medium
CN114826999A (en) * 2022-03-22 2022-07-29 北京邮电大学 Satellite network data transmission method and device
WO2023185235A1 (en) * 2022-04-02 2023-10-05 华为技术有限公司 Packet forwarding method, apparatus and system

Families Citing this family (3)

* 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
CN114389996B (en) * 2022-01-04 2023-06-09 烽火通信科技股份有限公司 Method and device for SRv SID distribution in multi-topology environment based on resources
CN115065725B (en) * 2022-05-12 2024-01-12 北京奇艺世纪科技有限公司 Data processing method, device, electronic equipment and storage medium

Citations (3)

* 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
US20180375968A1 (en) * 2017-06-27 2018-12-27 Cisco Technology, Inc., A California Corporation Providing Efficiencies in Processing and Communicating Internet Protocol Packets in a Network Using Segment Routing
US20190288940A1 (en) * 2018-03-15 2019-09-19 Cisco Technology, Inc. Segment Routing Packet Policies and Functions Including an Engineered Reverse Reply Path Providing Efficiencies in Communicating Packets in a Network

Family Cites Families (5)

* 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
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180375968A1 (en) * 2017-06-27 2018-12-27 Cisco Technology, Inc., A California Corporation Providing Efficiencies in Processing and Communicating Internet Protocol Packets in a Network Using Segment Routing
US20190288940A1 (en) * 2018-03-15 2019-09-19 Cisco Technology, Inc. Segment Routing Packet Policies and Functions Including an Engineered Reverse Reply Path Providing Efficiencies in Communicating Packets in a Network
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

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726654A (en) * 2021-08-13 2021-11-30 新华三信息安全技术有限公司 Message forwarding method and device of SRV6 protocol, electronic equipment and medium
CN113726654B (en) * 2021-08-13 2023-05-26 新华三信息安全技术有限公司 Message forwarding method and device of SRV6 protocol, electronic equipment and medium
CN113691451A (en) * 2021-09-22 2021-11-23 新华三信息安全技术有限公司 Segment identifier determination method and device
CN113872866A (en) * 2021-09-28 2021-12-31 中国电信股份有限公司 Message forwarding method, system and storage medium
CN113872866B (en) * 2021-09-28 2023-04-07 中国电信股份有限公司 Message forwarding method, system and storage medium
CN114157601A (en) * 2021-11-29 2022-03-08 中国联合网络通信集团有限公司 Message transmission method, device and storage medium
CN114157601B (en) * 2021-11-29 2024-03-29 中国联合网络通信集团有限公司 Message transmission method, device and storage medium
CN114826999A (en) * 2022-03-22 2022-07-29 北京邮电大学 Satellite network data transmission method and device
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

Also Published As

Publication number Publication date
CN113132229B (en) 2022-10-28
WO2021135468A1 (en) 2021-07-08

Similar Documents

Publication Publication Date Title
CN113132229B (en) Segment identifier determination method and device
US20230300070A1 (en) Packet Sending Method, Device, and System
CN112019433B (en) Message forwarding method and device
US7936668B2 (en) Methods and apparatus for distributing label information
US20230137778A1 (en) Packet Sending Method and Apparatus, Network Device, System, and Storage Medium
JP6027688B2 (en) Method and apparatus for automatic label assignment in ring network protection
CN113395735B (en) Message transmission method, device and network equipment
CN113973082A (en) Message processing method and network equipment
CN114374634A (en) Message forwarding method and network equipment
US20240048479A1 (en) Packet Forwarding Method and Apparatus, Network Device, and Storage Medium
EP4047888A1 (en) Method for issuing oam configuration information and control node
CN117118886A (en) Message forwarding method, head-end equipment, controller, equipment and storage medium
US20230412508A1 (en) Packet processing method and related apparatus
CN112751768B (en) Service message forwarding method and device and computer storage medium
CN114157600A (en) Method, equipment and system for forwarding message
CN113965525A (en) Load balancing method, device, network equipment and system
US20230224241A1 (en) Path Identity Allocation Method, System, and Apparatus, Device, and Storage Medium
CN114124793A (en) Method and equipment for forwarding message, issuing forwarding indication information and notifying message
CN116233279A (en) Message processing method, device and system
CN112751766A (en) Message forwarding method and device and computer storage medium
CN117097818A (en) Message processing method and related equipment
CN113595915A (en) Method for forwarding message and related equipment
CN114531360A (en) Semantic name acquisition method, device, equipment and storage medium
JP7273130B2 (en) Communication method and device
CN112910773B (en) Method for issuing OAM configuration information and control node

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