WO2021135468A1 - Segment identifier determining method and device - Google Patents

Segment identifier determining method and device Download PDF

Info

Publication number
WO2021135468A1
WO2021135468A1 PCT/CN2020/118937 CN2020118937W WO2021135468A1 WO 2021135468 A1 WO2021135468 A1 WO 2021135468A1 CN 2020118937 W CN2020118937 W CN 2020118937W WO 2021135468 A1 WO2021135468 A1 WO 2021135468A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
identification information
segment identifier
segment
message
Prior art date
Application number
PCT/CN2020/118937
Other languages
French (fr)
Chinese (zh)
Inventor
王其华
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021135468A1 publication Critical patent/WO2021135468A1/en

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

Definitions

  • This application relates to the technical field of segment routing (segment routing, SR), and in particular to a method and device for determining a segment identifier.
  • SR technology is a routing technology in which the head node deploys a forwarding path at the entrance of the network.
  • the SR technology can be applied to networks that support the sixth-generation Internet Protocol (Internet Protocol Version 6, IPv6), which is referred to as an SRv6 network for short.
  • IPv6 Internet Protocol Version 6, IPv6
  • the head node encapsulates the segment routing header (segment routing header, SRH) in the message.
  • the SRH includes a segment identification (segment identification, SID) list field for indicating the forwarding path of the message.
  • the SID list field includes multiple SIDs, and each SID can be used to identify a node or a link on the forwarding path.
  • each SID is usually 128 bits (bit), which contains a large number of bits, resulting in low efficiency of the head node in encapsulating the message, and if the SID list includes a large number of SIDs, the head node will encapsulate the message The efficiency is further reduced.
  • the present application provides a method and device for determining a segment identifier, which can improve the efficiency of packet encapsulation by the head node and save network bandwidth resources.
  • the technical solution is as follows:
  • a method for determining a segment identifier determines a first segment identifier corresponding to a second network device, and the first segment identifier includes first identifier information, and The first identification information is used to identify the autonomous domain to which the second network device belongs.
  • 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 identification information.
  • the first network device sends a message to the second network device, and the message includes the second segment identifier.
  • the first network device may determine the second segment identifier corresponding to the second network device according to the first segment identifier corresponding to the second network device. Because the first segment of identification includes the first identification information used to identify the autonomous domain to which the second network device belongs, and the second segment of identification does not include the first identification information.
  • the second segment identifier is equivalent to compressing the first segment identifier. In this way, the first network device can carry the compressed segment identifier in the message sent to the second network device, so that the first network device can be used as the head node. The pressure to encapsulate the message. In addition, compressing the segment identifier is also beneficial to improve the efficiency of message forwarding.
  • the first segment identifier corresponding to the second network device is used to identify the correspondence between the second network device and the first segment identifier.
  • the first segment identifier is the original segment identifier before compression, and the corresponding relationship is, for example, that the first segment identifier is used to identify the second network device, or the first segment identifier is used to identify the transition from another network device to the second network device.
  • the other network device is, for example, the previous hop device of the second network device, or the first segment identifier may also be another type of segment identifier related to the second network device.
  • the first network device determines a third segment identifier corresponding to the third network device, the third segment identifier includes second identifier information and third identifier information, and the second identifier Information is used to identify the autonomous domain to which the third network device belongs, and the third identification information is used to identify the third network device in the autonomous domain; the first network device is generated based on the third segment identifier The fourth segment identifier, the fourth segment identifier does not include the second identification information and the third identification information; the first network device sends the message to the third network device, the The message includes the fourth segment identifier.
  • the second identification information and the third identification information in the third segment of the identification in the third network device can be compressed at the same time, so as to further reduce the first network device as the head node to encapsulate the message pressure.
  • further compression of the segment identifier is also more conducive to improving the efficiency of message forwarding.
  • 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 Identifies the same paragraph. That is, when applying this application, the segment identifier corresponding to the third network device can also be compressed to compress the segment identifier corresponding to the second network device.
  • the first network device determines multiple segment identifiers corresponding to the multiple network devices, and the multiple segment identifiers respectively include the same fourth identification information; the first network device is based on The plurality of segment identifiers generates a fifth segment identifier, the fifth segment identifier includes the fourth identification information and fifth identification information, and the fifth identification information is used to identify the number of the plurality of network devices; The first network device sends the message, and the message includes the fifth segment identifier.
  • a compressed fifth-segment identification can be generated uniformly for nodes with the same fourth identification information, and the compressed fifth-segment identification only needs to It suffices to include the same fourth identification information and the number of the multiple network devices, so as to further reduce the pressure of the first network device as the head node to encapsulate packets.
  • further compression of the segment identifier is also more conducive to improving the efficiency of message forwarding.
  • 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 used to uniquely identify the plurality of network devices.
  • the multiple network devices in the autonomous domain to which the network device belongs.
  • the first identification information and the sixth identification information can be further compressed to further reduce the packaging of the first network device as a head node.
  • the pressure of the message in addition, further compression of the segment identifier is also more conducive to improving the efficiency of message forwarding.
  • the multiple 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 foregoing second network device may also be one of the plurality of network devices having multiple identical fourth identification information.
  • the message further includes seventh identification information, where the seventh identification information is used to identify a strategy for generating the second segment identifier by the first network device.
  • the seventh identification information can also be carried in the packet, so that subsequent intermediate nodes can generate
  • the strategy for the segment identification after compression that is, the compression scheme, quickly restores the segment identification before compression to obtain the destination address of the forwarded message.
  • the specific process for the first network device to determine the multiple segment identifiers corresponding to the multiple network devices is: the first network device determines based on the internal gateway protocol IGP messages sent by the multiple network devices respectively Multiple segment identifiers corresponding to multiple network devices; or, the first network device determines multiple segment identifiers corresponding to multiple network devices based on a control message sent by the control device.
  • the segment identifiers before compression of each network device may be issued by the network device itself, or may be issued uniformly by the control device, so as to improve the flexibility of issuing the segment identifiers.
  • a method for determining a segment identifier receives a message, and the message includes a first segment identifier corresponding to the second network device;
  • the network device determines first identification information corresponding to the second network device, where the first identification information is used to identify the autonomous domain to which the second network device belongs; the first network device is based on the first identification information And the first segment identifier to generate a second segment identifier corresponding to the second network device; the first network device sends the message to the second network device based on the second segment identifier.
  • the first network device can obtain the compressed part of the segment identifier when receiving the message. Then the compressed message of the second network device is restored to obtain the destination address for forwarding the message. Since the head node compresses the segment identifiers of each node, the bandwidth occupied by the packet transmission between the first network device and the second network device will be reduced, thereby improving the efficiency of packet forwarding.
  • the second network device is a next-hop device of the first network device.
  • the first network device determines second identification information, and the second identification Information is used to identify the second network device in the autonomous domain; the first network device generates a second segment corresponding to the second network device based on the first identification information and the first segment identifier
  • the identification process is specifically as follows: the first network device generates the second segment corresponding to the second network device based on the first identification information, the second identification information, and the first segment identifier Logo.
  • the packet forwarding path includes multiple consecutive network devices, the multiple consecutive network devices correspond to multiple segment identifiers, and the first network device is located on the forwarding path.
  • the first of three consecutive network devices, the plurality of segment identifiers include the same third identifier information, the first segment identifier includes the third identifier information and the fourth identifier information, and the fourth identifier information It is used to indicate the number of the multiple consecutive network devices.
  • the first network device sending the message to the second network device based on the second segment identifier includes: the first network device determines a fifth identifier based on the fourth identification information Information; the first network device determines the updated first segment identifier, the updated first segment identifier includes the third identification information and the fifth identification information; the first network device is based on the The second segment identifier sends the message to the second network device, and the message includes the updated first segment identifier.
  • the compressed first segment identifier For network devices with multiple identical third identification information, if a compressed first segment identifier is uniformly generated for the multiple nodes with the same third identification information, the compressed first segment identifier includes the same third identifier. Identification information and fourth identification information used to indicate the number of the multiple network devices. At this time, after the first network device restores the segment identifier of the second network device before compression based on the third identification information, the fourth identification information needs to be updated, so that subsequent nodes can confirm whether to continue to restore the destination address in the above manner. .
  • the fourth identification information is a first value
  • the fifth identification information is a second value
  • the second value is the first value minus one. Since the fourth identification information is used to indicate the number of network devices whose segment identifiers from the first network device on the forwarding path of the message include the third identification information, the number of the fourth identification information is updated The method may be to directly subtract 1 from the value indicated by the fourth identification information.
  • the first network device determining the first identification information corresponding to the second network device includes: the first network device receives a message, and the message includes the first identification information corresponding to the second network device.
  • Six identification information and seventh identification information where the sixth identification information includes the first identification information, and the seventh identification information is used to identify the length of the first identification information; the first network device is based on the The sixth identification information and the seventh identification information determine the first identification information.
  • the first identification information of each network device may be pre-published in the network, so that subsequent intermediate nodes can restore the compressed segment identification based on the first identification information.
  • a first network device includes: a determining module configured to determine a first segment identifier corresponding to a second network device, the first segment identifier including first identifier information The first identification information is used to identify the autonomous domain to which the second network device belongs; the generating module is configured to generate a second segment identifier based on the first segment identifier, and the second segment identifier does not include the first segment identifier. An identification information; a sending module, configured to send a message to the second network device, the message including the second segment identifier.
  • 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 identification information and third identification information, and the second identification information is used for To identify the autonomous domain to which the third network device belongs, and the third identification information is used to identify the third network device in the autonomous domain; and the generating module is further configured to generate the third network device based on the third segment identifier.
  • the fourth segment identifier, the fourth segment identifier does not include the second identification information and the third identification information; the sending module is further configured to send the message to the third network device, the The message includes the fourth segment identifier.
  • 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 Identifies the same paragraph.
  • the determining module is further configured to determine multiple segment identifiers corresponding to multiple network devices, and the multiple segment identifiers respectively include the same fourth identification information; the generating module is further configured to determine The multiple segment identifiers generate a fifth segment identifier, the fifth segment identifier includes the fourth identification information and fifth identification information, and the fifth identification information is used to identify the number of the multiple network devices; The sending module is further configured to send the message, and the message includes the fifth segment identifier.
  • 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 used to uniquely identify the plurality of network devices.
  • the multiple network devices in the autonomous domain to which the network device belongs.
  • the multiple network devices include the second network device, and the second segment identifier and the fifth segment identifier are the same segment identifier.
  • the message further includes seventh identification information, where the seventh identification information is used to identify a strategy for generating the second segment identifier by the first network device.
  • the determining module determining multiple segment identifiers corresponding to multiple network devices includes: the determining module determines corresponding to multiple network devices based on internal gateway protocol IGP messages sent by the multiple network devices respectively Or, the determining module determines multiple segment identifiers corresponding to multiple network devices based on the control message sent by the control device.
  • another first network device includes: a receiving module for receiving a message, the message including a first segment identifier corresponding to the second network device; a determining module, Is used to determine first identification information corresponding to the second network device, where the first identification information is used to identify the autonomous domain to which the second network device belongs; a generating module is used to based on the first identification information and The first segment identifier generates a second segment identifier corresponding to the second network device; a sending module is configured to send the message to the second network device based on the second segment identifier.
  • 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, and the second identification information is used to identify The second network device; the generating module is configured to generate the second segment corresponding to the second network device based on the first identification information, the second identification information, and the first segment identifier Logo.
  • the packet forwarding path includes multiple consecutive network devices, the multiple consecutive network devices correspond to multiple segment identifiers, and the first network device is located on the forwarding path.
  • the first of three consecutive network devices, the plurality of segment identifiers include the same third identifier information, the first segment identifier includes the third identifier information and the fourth identifier information, and the fourth identifier information
  • the sending module includes: a first determining subunit, configured to determine fifth identification information based on the fourth identification information; and a second determining subunit, configured to determine The updated first segment identifier, the updated first segment identifier includes the third identifier information and the fifth identifier information; a sending subunit is configured to send the second segment identifier to the second segment identifier based on the second segment identifier.
  • the network device sends the message, and the message includes the updated first segment identifier.
  • the fourth identification information is a first value
  • the fifth identification information is a second value
  • the second value is the first value minus one.
  • the determining module includes: a receiving subunit for receiving a message, the message including sixth identification information and seventh identification information corresponding to the second network device, and the sixth identification information includes all The first identification information, the seventh identification information is used to identify the length of the first identification information; the third determining subunit is used to determine the length of the first identification information based on the sixth identification information and the seventh identification information The first identification information.
  • a network device in a fifth aspect, includes a processor and a memory, the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory to execute the above-mentioned first
  • the method described in any possible implementation of the second aspect or execute the method described in any possible implementation of the second aspect above.
  • a chip is provided, the chip is set in a network device in a communication network, the chip includes a processor and an interface circuit; the interface circuit is used to receive instructions and transmit them to the processor;
  • the processor is configured to execute the method described in any possible implementation of the foregoing first aspect, or execute the method described in any possible implementation of the foregoing second aspect.
  • a computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute any possible implementation of the first aspect or the second aspect. The method described.
  • a computer program product containing instructions which when run on a computer, causes the computer to execute the method described in any possible implementation of the first aspect or the second aspect.
  • a network system in a ninth aspect, includes a first network device, a second network device, and a third network device.
  • the first network device is used to determine a first segment corresponding to the second network device.
  • the first segment identifier includes first identifier information, the first identifier information is used to identify the autonomous domain to which the second network device belongs, and the first network device generates a second segment based on the first segment identifier.
  • Segment identifier the second segment identifier does not include the first identification information
  • the first network device sends a message to a third network device, the message includes the second segment identifier
  • the third network A device for receiving a message, the message including the second segment identifier corresponding to the second network device, and the third network device determines the first identifier corresponding to the second network device Information
  • the first identification information is used to identify the autonomous domain to which the second network device belongs
  • the third network device generates a connection with the second network device based on the first identification information and the first segment identification
  • the third network device sends the message to the second network device based on the first segment identifier.
  • FIG. 1 is a schematic diagram of the format of an SRH provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a format of an SID provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an SRv6 network architecture provided by an embodiment of the present application.
  • FIG. 4 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application
  • FIG. 5 is a schematic diagram of another SID format provided by an embodiment of the present application.
  • FIG. 6 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a message forwarding process provided by an embodiment of the present application.
  • FIG. 8 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another message forwarding process provided by an embodiment of the present application.
  • FIG. 10 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of another message forwarding process provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of another SRH format provided by an embodiment of the present application.
  • FIG. 13 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of the format of an IGP message provided by an embodiment of the present application.
  • FIG. 15 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application.
  • FIG. 16 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application.
  • FIG. 17 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application.
  • FIG. 18 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • FIG. 19 is a schematic structural diagram of another network device provided by 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 provided by an embodiment of the present application.
  • FIG. 22 is a schematic structural diagram of another first network device provided by an embodiment of the present application.
  • FIG. 23 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • SRv6 is a network architecture designed based on the concept of source routing to forward IPv6 packets in the network.
  • the head node in the SRv6 network inserts SRH into the IPv6 message header, and presses an IPv6 address list into the SRH.
  • Each forwarding node in the SRv6 network continuously updates the target address according to the IPv6 address list to complete the forwarding of IPv6 data packets one by one.
  • Fig. 1 is a schematic diagram of the format of an SRH provided by an embodiment of the present application.
  • SRH includes the next header field used to indicate the next header type, the field Hdr Ext Len used to indicate the length of the SRH header, the field routing type used to indicate the routing type, and the field routing type used to indicate the current After the node, the field of the number of nodes that should be visited is segment left, etc.
  • the SRH also includes the SID list field.
  • the SID list field includes multiple SIDs, and each SID may correspond to an IPv6 address, which is used to identify the node or link with the SID on the forwarding path.
  • SRH also includes an optional type-length-value (type-length-value, TLV) field. Through these optional TLVs, SRH can achieve more functions, such as failure Diagnostic testing, etc.
  • IPv6 DA The destination address of the message transmitted in the SRv6 network, referred to as IPv6 DA.
  • IPv6 DA In traditional IPv6 protocol-based messages, IPv6 DA is fixed. In the SRv6 network, IPv6 DA only corresponds to the next node of the current message, which can be changed continuously.
  • the SID list in SRH can be generated at the head node on a forwarding path, and the intermediate nodes on the forwarding path can be based on the SID The list is forwarded.
  • the SID list is expressed as: ⁇ Segment List[0], Segment List[1], Segment List[2],...,Segment List[n]>.
  • each Segment List[m] in the SID list, 0 ⁇ m ⁇ n can correspond to each corresponding node on the forwarding path that supports SRv6.
  • the strict display path means that the SID corresponding to each node on the message forwarding path is included in the SID list in the SRH header.
  • the segment identifier corresponding to the node is used to identify the corresponding relationship between the second network device and the first segment identifier.
  • the segment identifier is, for example, the originally allocated segment identifier, and the correspondence relationship is, for example, the segment identifier is used to identify the node itself, or the segment identifier is used to identify the link from another node to the node, and the other
  • the node is, for example, the previous hop node of the node.
  • the segment identifier may also be other types of segment identifiers related to the node.
  • Segment List[0] corresponds to the tail 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 two nodes are the nodes immediately after the head node, and so on, pushing the stack in reverse order.
  • the forwarding path of the message may also be a loose display path.
  • the loose display path means that the SIDs corresponding to some nodes on the forwarding path of the message are included in the SID list in the SRH header.
  • Segment List[n] may correspond to, for example, the second or third node on the forwarding path that supports the SRv6 protocol.
  • the situations listed above are only examples. It should be noted that in other situations, the Segment List sequence in the SID list may correspond to multiple corresponding nodes on the forwarding path according to a certain rule, and the multiple corresponding nodes may be, for example, Strictly display continuous nodes on the path, or loosely display multiple corresponding nodes that are not continuous on the path but support the SRv6 protocol.
  • the Segment List value in the SID list corresponds to the node on the forwarding path as an example. Every time a node that supports SRv6 passes, the value of the SL field is reduced by 1, and the IPv6 DA information is also changed accordingly.
  • the SL field and the SID list field jointly determine the IPv6 DA information.
  • the IPv6 DA value is the value of Segments List[n] in the SID list.
  • the IPv6 DA value is the value of Segments List[1] in the SID list.
  • the IPv6 DA value is the value of Segments List[0] in the SID list.
  • the above SID is an instantiated IPv6 address. This type of IPv6 address is given a unique function.
  • the SID in an SRv6 network can represent a node or link, or it can represent an L2/L3 virtual private network (virtual private network). , VPN), or a service.
  • each SID may include two parts, one part is a locator field, and the other part is a function field.
  • the positioning field occupies high bits among 128 bits.
  • the function field occupies the low bit of 128 bits.
  • the location field can take on the routing function, so it needs to be unique in the SR domain.
  • the function field can identify any function of the device, such as a certain forwarding behavior, or a certain service.
  • SID specifically includes END, END.X, and END.DT types.
  • the END type SID can be used to identify a node.
  • SID of type END.X can be used to identify a link.
  • the END.DT type SID can be used to identify a VPN or service.
  • END.DT specifically includes END.DT4 and other types, where END.DT is used to indicate the SID of the operator edge (provider edge, PE) device, and is used to identify a fourth-generation Internet protocol (internet protocol version 4) in the network. , IPv4) VPN instance.
  • PE provider edge
  • IPv4 fourth-generation Internet protocol
  • FIG. 3 is a schematic diagram of an SRv6 network architecture provided by an embodiment of the present application.
  • the SRv6 network includes node R1, node R2, node R3, node R4, and node R5.
  • node R1 is the head node of the SRv6 network
  • node R2, node R3, and node R4 are intermediate nodes of the SRv6 network
  • node R5 is the tail node of the SRv6 network.
  • the node R1 is used to press the SRH into the message, and forward the message pressed into the SRH to the node R2, and the node R2 forwards the message to the node R5 hop by hop according to the SRH.
  • Node R1, node R2, node R3, node R4, and node R5 can be any routing device with SRv6 function.
  • the SRv6 network shown in FIG. 3 only uses five nodes as an example for description, and does not constitute the only limitation on the number of nodes in the SRv6 network provided in the embodiment of the present application.
  • the head node in order to improve the efficiency of packet encapsulation and packet forwarding efficiency of the head node, the head node compresses each SID in the original SID list when determining the SRH, so that the SID carries the compressed SID. .
  • 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 message, and the other is a process in which the intermediate node determines the destination address according to the SRH and forwards the message. The two processes are explained separately below.
  • 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.
  • first network device in one embodiment and the first network device in another embodiment may not be used to indicate the same network device.
  • the specific concepts will be explained one by one in the following embodiments.
  • FIG. 4 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is applied to a head node in an SRv6 network, that is, the first network device in the following embodiment is the head node. As shown in Figure 4, the method includes:
  • the first network device determines a first segment identifier corresponding to the second network device, where the first segment identifier includes first identification information, and the first identification information is used to identify the autonomous domain to which the second network device belongs.
  • the first network device may be the head node on a certain forwarding path in the SRv6 network
  • the second network device may be the next hop node of the head node on the forwarding path, or the forwarding path Other nodes on the upper end, such as intermediate nodes or tail nodes.
  • the first segment identifier corresponding to the second network device is the 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 to determine the first segment of the identifier corresponding to the first network device may be implemented as follows: the first network device determines the connection with the second network device based on the Interior Gateway Protocol (IGP) message issued by the second network device The first segment identifier corresponding to the device. Alternatively, the first network device determines the first segment identifier corresponding to the second network device based on the 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 it may be issued uniformly by the control device.
  • IGP Interior Gateway Protocol
  • the location field in the original SID is re-divided, that is, the space of the original SID is re-planned.
  • the positioning field in FIG. 2 is divided into a first positioning field and a second positioning field.
  • this application refers to the first positioning field as a flocator field, and the second positioning field as a vlocator field.
  • the flocator field is used to identify the autonomous domain (Autonomous Systems, AS) to which the second network device belongs
  • the vlocator field is used to identify the second network device.
  • the original SID includes three parts, the flocator field, the vlocator field, and the function field.
  • this application refers to the function field as a function field.
  • the function field may be fixed to 16 bits, and the number of bits included in the vlocator field may be less than or equal to 16 bits. It should be noted that the length of the above-mentioned fields is only an example, and does not constitute the only limitation on the length of the flocator field, the vlocator field, and the function field in the embodiment of the present application.
  • 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 identification information.
  • the first network device in S402 may be the head node R1 in FIG. 3, and the first identification information may be the flocator field in the original SID. Because the flocator field of each node in the SRv6 network is usually the same, that is, it identifies the same AS where each node is located. 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 flocator field. When the next-hop network device of the first network device receives the SRH that includes the compressed second segment identifier, the next-hop network device may perform a check on the AS information according to the locally known AS information. The second segment identifier is restored to obtain the complete first segment identifier corresponding to the second segment identifier.
  • the AS information known by the next-hop network device may be pre-configured and stored locally, or may be obtained and stored from the network control device, for example.
  • the second segment of the identification there can be multiple compression methods for the second segment of the identification that does not include the first identification information.
  • the forwarding path of the message is a strict display path
  • the two adjacent nodes corresponding to the SID list are located in the same IGP domain, so the two adjacent nodes can know in advance the relevant information of each other's original SID (for example, the vlocator field in the original SID), so
  • the forwarding path of the message is strictly displayed, there are at least the following three compression methods.
  • the first is that the compressed second segment identifier not only does not include the flocator field (that is, the first identification information in S401), nor does it include the vlocator field, but only includes the function field.
  • this compression method can be called 16-bit compression.
  • the second is that the compressed second segment identifier not only does not include the flocator field (also the first identification information in S401), nor does it include the vlocator field, but only includes the function field and other necessary indication information. If the length of the function field is It is 16 bits, and the indication information occupies 4 bits, so this compression method can be called 20-bit compression.
  • the 20-bit compression method is suitable for scenarios where the function field of the SID corresponding to each node on the forwarding path has certain characteristics.
  • This 20-bit compression method performs compression, where the indication information is used to identify the number of SIDs with the same function field remaining after the current node.
  • the third type is that the compressed second segment identifier does not include the flocator field (that is, the first identification information in S401), but includes the vlocator field and the function field. If the vlocator field and the function field are both 16 bits, this kind of compression The method can be called 32-bit compression. The specific implementations of the above three compression methods will be separately explained in the following, and will not be repeated here.
  • the forwarding path of the message is a loosely displayed path
  • the two adjacent nodes in the SID list may not be nodes in the same IGP domain at this time, the two adjacent nodes may not be able to know each other’s vlocator field. Therefore, for the scenario where the forwarding path of the message is a loosely displayed path, at least the following two compression methods are possible.
  • One is the above-mentioned 32-bit compression method, which compresses only the flocator field, but retains the vlocator field and the function field.
  • the compressed second segment identifier not only does not include the flocator field (that is, the first identification information in S401), nor the function field, but only includes the vlocator field.
  • This compression method can be called 16-bit compression under loose path.
  • the 16-bit compression method under the loose path is suitable for scenarios where the function field of the SID corresponding to each node on the forwarding path is the same. For example, in the scenario where the path is loosely displayed, if each SID in the SID list is an END type SID , It can be compressed by 16-bit compression under this scattered path.
  • the implementation of the 16-bit compression method under the loose path can refer to the implementation of the three compression methods under the strict display path described above, which is not described in detail in the embodiment of the present application.
  • the above-mentioned compression schemes applicable to the strict display path and the loose display path respectively are taken as examples. It is understandable that in some possible implementations, the application scenarios of different compression schemes may also change. For example, if the node on the forwarding path is allowed to request the vlocator field corresponding to other nodes from the controller, or the node on the forwarding path that supports SR is based on a mechanism agreed with the controller, it can obtain and store the downloads that support SR in advance. When the vlocator field corresponding to a one-hop node is used, the 16bit compression mode under the strict display path (that is, the compression scheme of flocator and vlocator is not included) can also be applied on the loose path.
  • the first network device sends a message to the second network device, and the message includes a second segment identifier.
  • the second network device is, for example, the next-hop network device R2 of the head node R1.
  • R1 After obtaining the compressed second segment identifier, R1 encapsulates it into the SRH header, for example, as a Segment List[3], and sends it to R2 through a message.
  • the head node R1 may also determine the compressed identifiers for other network devices on the forwarding path, and encapsulate them into the SRH header.
  • R1 can respectively compress the initial segment identifiers corresponding to R3, R4, and R5 and place them into Segment List[2], Segment List[1], and Segment List[0].
  • the second network device in S403 may be the next-hop device of the head node on the packet forwarding path, such as R2 shown in FIG. 3, or other network devices on the forwarding path, such as Figure 3 shows R3, R4 or R5.
  • the message sent by R1 after encapsulating the SRH header will be sent to R2 first and perform an update operation, such as restoring the compressed Segment List[3] to the original value and then hitting it. Pop up, and update the destination address DA according to the original value. Then, the updated message is forwarded from R2 to R3.
  • R3 can receive the updated message including the corresponding second segment identifier.
  • the first network device may determine the second segment identifier corresponding to the second network device according to the first segment identifier corresponding to the second network device, because the first segment identifier includes the identifier used to identify the second network device to which the second network device belongs.
  • the first identification information of the autonomous domain, and the second identification information does not include the first identification information. Therefore, the second identification is equivalent to compressing the first identification.
  • the first network device is sending to the second network device.
  • the compressed segment identifier can be carried in the message to reduce the pressure of the first network device as the head node to encapsulate the message.
  • compressing the segment identifier is also beneficial to improve the efficiency of message forwarding.
  • the embodiment of the present application provides three different compression methods: 16-bit compression, 20-bit compression, and 32-bit compression.
  • the above three compression methods will be explained in conjunction with specific examples. For ease of description, take the original SID length of 128 bits, where the flocator occupies 96 bits, the vlocator and function fields occupies 16 bits respectively, and when the second compression method is used, the indication information field occupies 4 bits as an example , Respectively explain the above three compression methods as examples. Understandably, under the foregoing premise, three compression methods can be used to compress the original SID into 16-bit, 20-bit, and 32-bit compression schemes, referred to as 16-bit, 20-bit, and 32-bit compression schemes. It should be noted that if the length of the flocator, vlocator, and/or function field changes, the original SID can still be compressed using the aforementioned three compression methods, but the length of the compressed SID may change.
  • Fig. 6 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is used to explain the 32-bit compression scheme.
  • the method includes the following processes:
  • the first network device determines a first segment identifier corresponding to the second network device, where the first segment identifier includes first identification information, and the first identification information is used to identify the autonomous domain to which the second network device belongs.
  • the implementation manner of S601 may refer to the implementation manner of S401 in the embodiment of FIG. 4, and the description will not be repeated here.
  • the first network device generates a second segment identifier based on the first segment identifier. Compared with the first segment identifier, the second segment identifier only does not include first identification information, and the first identification information identifies the AS to which the second network device belongs.
  • the function field and the vlocator field in the original SID are retained, and the flocator 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.
  • the first network device sends a message to the second network device, where the message includes the second segment identifier.
  • FIG. 7 is a schematic diagram of a packet forwarding based on the 32-bit compression mode of FIG. 6 provided by an embodiment of the present application.
  • node R1 can be configured with two types of original SIDs, for example, END A:1:0 and END.X A:1:3, END A:1:0 are used to identify nodes R1 and END.
  • X A: 1:3 is used to identify the link from node R1 to the next hop node R2.
  • node R2 can also be configured with two types of original SIDs, namely END A: 2:0 and END.
  • X A: 2: 5 END A: 2:0 is used to identify node R2, END.
  • X A :2:5 is used to identify the link from node R2 to node R3.
  • Node R3 is configured with two types of original SIDs, namely END A: 3:0 and END.
  • X A: 3: 6 is used to identify node R3, and END.
  • X A: 3: 6 To identify the link from node R3 to node R4.
  • Node R4 is configured with two types of original SIDs, namely END A: 4:0 and END.
  • X A: 4: 1 END A: 4:0 is used to identify node R4, and END.
  • X A: 4: 1 To identify the link from node R4 to node R5.
  • the node R5 is configured with a type of original SID, which is END DT4 A:5:8001, and END DT4 A:5:8001 is used to identify that the node R5 corresponds to an IPv4 VPN instance.
  • These original SIDs are all expressed in the format of ⁇ : ⁇ : ⁇ , where the field before the first ":” is the flocator field, and the field between the first ":” and the second ":” is The vlocator field, the field after the second ":” is the function field.
  • the head node can use the SID list encapsulated in the SRH to specify the message forwarding path.
  • the SID type in the SID list can be, for example, the node SID, the link SID, or the IPv4 VPN type SID.
  • the original SID list before compression received by the head node R1 can be expressed as: ⁇ A:5:8001, A:4:0, A:3:6, A:2:0>. If the head node R1 compresses the original SID list according to the 32-bit compression method, as shown in Figure 7, the compressed SID list can be expressed as: ⁇ 5:8001, 4:0, 3:6, 2:0 >, that is, the compressed SID does not include the same AS domain identifier "A".
  • the compressed SID list in the message sent by the head node R1 to the intermediate node R2 is represented as ⁇ 5:8001, 4:0, 3:6, 2:0>.
  • the SID list in Figure 7 lists the types of each SID, such as END A before compression and cEND A after compression, but in the actual forwarded message, the above-mentioned types are not identified. Does not appear in the SID list.
  • the SID list only includes SID values of each corresponding type.
  • FIG. 8 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is used to explain the 16-bit compression method.
  • the method includes the following processes:
  • the first network device determines a first segment identifier corresponding to the second network device, where the first segment identifier includes first identification information and second identification information, and the first identification information is used to identify the second network device to which the second network device belongs The second identification information is used to identify the second network device.
  • the first network device may be the head node on a certain forwarding path in the SRv6 network
  • the second network device may be the next hop node of the head node on the forwarding path
  • It can also be other nodes on the forwarding path, such as an intermediate node or a tail node.
  • the first network device generates a second segment identifier based on the first segment identifier. Compared with the first segment identifier, the second segment identifier does not include the first identifier information and the second segment identifier. Identification information.
  • the 16-bit compression scheme can only retain the function field in the original SID, and delete the flocator field and vlocator field in the original SID.
  • the 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 original source of each other in advance.
  • the vlocator field of the SID For the scenario where the forwarding path of the message is a loosely displayed path, since two adjacent nodes corresponding to the SID list may not be located in the same IGP domain at this time, the two adjacent nodes may not be able to learn each other's vlocator field.
  • the vlocator field needs to be compressed. Therefore, the 16-bit compression scheme provided in the embodiment of FIG. 8 is only applicable to the scenario where the forwarding path of the message is a strict display path.
  • the first network device sends a message to the second network device, where the message includes the second segment identifier.
  • FIG. 9 is a schematic diagram of a packet forwarding based on the 16-bit compression method of FIG. 8 provided by an embodiment of the present application.
  • node R1 is configured with two types of original SIDs, namely END A:1:0 and END.X A:1:3.
  • the node R2 is configured with two types of original SIDs, namely END A: 2:0 and END. X A: 2:5.
  • Node R3 is configured with two types of original SIDs, namely END A: 3:0 and END. X A: 3:6.
  • Node R4 is configured with two types of original SIDs, namely END A: 4:0 and END. X A: 4: 1.
  • Node R5 is configured with a type of original SID, which is END DT4 A:5:8001. The original SID of each node has been described in detail in the embodiment shown in FIG. 7, and will not be repeated here.
  • 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 the message to be forwarded 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 mode.
  • 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 the inability to restore the real IP address of the VPN due to the interruption of the intermediate link, you can It is agreed that the original SID of the tail node is compressed according to the 32-bit compression method, that is, the tail node R5 is compressed using a 32-bit compression scheme, as shown in Figure 9, the compressed SID list can be expressed as ⁇ 5:8001, 1, 6, 5>. That is, the SID list 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 foregoing 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.
  • the function field in the original SID is usually used to indicate the function of the corresponding SID. Therefore, different original SIDs may have the same function field, which is used to indicate that these original SIDs correspond to the same function. Therefore, for the scenario where the forwarding path of the message is a strictly displayed path, if the function field of the original SID of each node on the forwarding path of the message is the same, the head node can also use the compression method shown in Figure 10 below (that is, It is a 20-bit compression method) to compress the original SID of each node.
  • FIG. 10 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is used to explain the 20-bit compression scheme.
  • the method includes the following processes:
  • the first network device determines multiple segment identifiers corresponding to the multiple network devices, and the multiple segment identifiers respectively include the same fourth identification information.
  • the segment identifier corresponding to each network device is the original SID of the network device, and the specific type can be a node type, a link type, or other types.
  • the multiple network devices may be multiple consecutive nodes in the packet forwarding path, for example.
  • the fourth identification information is the function field in the original SID.
  • the first network device may be a head node R1
  • the multiple network devices may be intermediate nodes R2, R3, and R4 after the head node R1.
  • the implementation manner for the first network device to determine the multiple segment identifiers corresponding to the multiple network devices can refer to S401 in the embodiment shown in FIG. 4 for the first network device to determine the first segment identifier corresponding to the second network device.
  • the implementation method of, I won’t go into details here.
  • the first network device generates a fifth segment identifier based on the plurality of segment identifiers, where the fifth segment identifier includes the fourth identification information and fifth identification information, and the fifth identification information is used to identify the plurality of networks The number of devices.
  • a compressed SID can be generated uniformly for these nodes with the same function field, and the compressed SID only needs to include the same function field and this number. The number of network devices is sufficient.
  • the function fields of multiple nodes on the message forwarding path are the same, only the function fields may be compressed in the foregoing manner, but the flocator fields of the multiple nodes may not be compressed.
  • the compressed SIDs used to indicate the corresponding multiple nodes may also include the flocator fields of the multiple nodes.
  • the compressed fifth segment of identification may also not include the first identification information (that is, the flocator field) and the sixth segment corresponding to multiple network devices.
  • Identification information that is, the vlocator field.
  • the sixth identification information is respectively used to uniquely identify multiple network devices in the autonomous domain. That is, when the function field of each node on the message forwarding path is the same, the function field, the flocator field, and the vlocator field are compressed at the same time.
  • the first network device sends a message to the multiple network devices, where the message includes the fifth segment identifier.
  • the first device among the plurality of network devices to receive the message may be the next hop node of the first network device; for another example, the first device among the plurality of network devices to receive the message
  • the device of the text may not be the next hop node of the first network device, but a subsequent node on the strict display path forwarding the message, and the next hop node of the first network device may use the aforementioned 32bit Or 16bit compression scheme.
  • FIG. 11 is a schematic diagram of a forwarded packet based on the 20-bit compression method shown in FIG. 10 according to an embodiment of the present application.
  • node R1 is configured with two types of original SIDs, namely END A:1:0 and END.X A:1:5060.
  • the node R2 is configured with two types of original SIDs, namely END A: 2:0 and END. X A: 2:5060.
  • Node R3 is configured with two types of original SIDs, namely END A: 3:0 and END. X A: 3:5060.
  • Node R4 is configured with two types of original SIDs, namely END A: 4:0 and END. X A: 4: 5060.
  • Node R5 is configured with a type of original SID, which is END DT4 A:5:8001. For the related functions of each original SID of each node, reference may be made to the embodiment shown in FIG. 7, which will not be repeated
  • the original SID before compression can be expressed as: ⁇ A:5:8001, A:4:5060, A:3:5060, A:2:5060>.
  • the head node can compress the intermediate node R2, intermediate node R3, and intermediate node R4 according to the 20-bit compression scheme.
  • the 32-bit compression scheme compresses the intermediate node R5.
  • the compressed SID list can be expressed as ⁇ 5:8001, 5060:3>. In the above SID list, 5:8001 corresponds to the tail node R5.
  • 5060:3 is used to indicate that there are 3 nodes R2 to R4 whose function fields are all 5060.
  • the SID list included in the SRH in the message sent by the head node R1 to the intermediate node R2 is ⁇ 5:8001, 5060:3>.
  • the message 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 strategy 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 through a 32-bit compression method.
  • different compression methods can be used for the original SID of each node or link on the forwarding path.
  • multiple identification information can be used to respectively identify the first network device to generate the corresponding node or the corresponding node on the forwarding path.
  • the strategy of the compressed segment identifier of the link so that the corresponding node on the forwarding path can determine the corresponding segment identifier restoration method based on the strategy.
  • multiple identification information is used to identify the first network device to generate the second segment identifiers of the intermediate nodes R2 to R4 through 8-bit compression, and to generate the second segment identifiers through 32-bit compression.
  • the present application can support the generation of each SID in the same SID table using different compression schemes.
  • the identification information may also be used to identify a solution that does not compress the original SID, for example, one or more SIDs on the forwarding path are not compressed, and the original 128 bits are still retained.
  • the content of the identification information corresponding to each different compression scheme and the uncompressed scheme is different.
  • 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 can be multiple specific implementations of SRH extension, and it is only necessary to ensure that the extended SRH can indicate the compression scheme (including the uncompressed scheme) of each SID in the SID list.
  • FIG. 12 is a schematic diagram of an extended SRH format provided in an embodiment of the present application.
  • the field used to carry the SID list in Figure 1 is currently used to carry various types of compressed SIDs, for example, cSID compressed according to 20-bit compression, and cSID compressed according to 8-bit compression And the cSID compressed according to the 32-bit compression method, in addition to the uncompressed 128-bit original SID.
  • all compression methods are reflected in the SID list.
  • the compressed SID in the SID list can be the SID compressed by the same compression method, or it can be used as needed. SID compressed by a variety of optional compression methods.
  • a type-length-value (type-length-value, TLV) field may be used to carry multiple pieces of identification information used to indicate the compression strategy.
  • the identification information includes, for example, corresponding to the second network device.
  • a bitmap (bitmap) BMP field can be set in the TLV.
  • the BMP field is used to indicate the compression strategy corresponding to each compressed SID in the SID list. That is, the bitmap field includes indication information for indicating the compression mode of each SID in the SID list.
  • the SID list in the traditional SRH is actually based on each SID list.
  • the 128 bits are divided into a group.
  • the SL field in the SRH actually indicates which group of 128 bits are currently processed into the SID list.
  • each group of 128 bits may also include multiple compressed SIDs. Therefore, only the SL field cannot directly locate the specific SID. Therefore, other indication fields can be set in the TLV field accordingly, such as the pointer (PI) field.
  • the PI field is used to coordinate with the SL field to locate the indication of the SL field. Which specific SID in a set of 128 bits.
  • the network device receiving the message can 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 through the BMP field The compression strategy corresponding to the SID.
  • the network device receiving the message can restore the acquired SID according to the acquired compressed SID and compression strategy, and then obtain the original SID before compression for subsequent forwarding of the message.
  • the embodiment of the present application does not limit the specific implementation manner and setting location of the PI field and the BMP field, and only the set PI field and BMP field can implement the above-mentioned functions.
  • the foregoing Figures 8 to 11 are used to explain the three compression schemes provided by the embodiments of the present application.
  • the head node may determine the original SID compression scheme for each network device according to actual requirements.
  • the control device determines the compression scheme for the original SID of each network device according to actual requirements, and then sends the determined compression scheme to the head node, so that the head node determines the SRH based on the compression scheme for the original SID of each network device.
  • FIG. 13 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is applied to an intermediate node in an SRv6 network, that is, the second network device in the following embodiment can be any on the forwarding path Intermediate node, the method can be used to restore the compressed SID.
  • the method includes the following processes:
  • the second network device receives a message, and the message includes a second segment identifier corresponding to the third network device.
  • the second network device may be an intermediate node in the packet forwarding path in the embodiments shown in FIGS. 4 to 12, and the third network device is the next SRv6-supporting node on the forwarding path and located after the second network device. node.
  • the second network device may be the intermediate node R2
  • the third network device may be the intermediate node R3 in this case.
  • the second network device may also be the intermediate node R3, and in this case, the third network device may be the intermediate node R4.
  • the third network device is actually the next hop device of the second network device.
  • the third network device may not necessarily be the next hop device of the second network device, but after the third network device on the path, The next network device that supports SRv6.
  • the next network device that supports SRv6 there may be one or more network devices between the third network device and the second network device.
  • the one or more network devices may not support SRv6, but it can be done Transparent transmission of messages.
  • the second segment of the identifier corresponding to the third network device included in the message is the original SID of the head node to the third network device (that is, the original SID shown in Figure 4).
  • the first segment identifier in the embodiment is the SID obtained after compression. That is, the second segment of identification in S1301 does not include the first identification information, and the first identification information is used to identify the AS to which the second network device belongs (that is, the flocator field in the original SID).
  • the second network device determines first identification information corresponding to the third network device, where the first identification information is used to identify the autonomous domain to which the third network device belongs.
  • the second segment identifier in S1301 does not include the first identifier information. Therefore, in order to be able to send the message to the third network device, the first identification information corresponding to the third network device needs to be determined first, so as to restore the original SID of the third network device through the following S1303.
  • the implementation process of S1302 may be: the second network device receives a message, the message includes the sixth identification information and the seventh identification information corresponding to the third network device, and the sixth identification information includes the first The identification information, the seventh identification information is used to identify 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, and the IGP message is used to advertise the 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, and the location identification includes the first identification information (that is, the flocator field).
  • the seventh identification information is used to identify the length of the flocator. Therefore, the second network device can determine, according to the IGP message, to parse the first identification information from the location identification.
  • the extended IGP message In addition to carrying the location identifier of the corresponding network device, the extended IGP message also carries the length of the flocator field.
  • the location field of the original SID is divided into a flocator field and a vlocator field. Therefore, in addition to carrying the location identifier of the network device and the length of the flocator field, the extended IGP message may also carry the length of the vlocator field.
  • FIG. 14 is a schematic diagram of the format of an IGP message provided by an embodiment of the present application.
  • the IGP message includes a location identification field (locator) and a subtype length value (type-length-value, TLV).
  • the sub-TLV is used to carry a flocator (denoted as the first in Figure 14).
  • the length of the location) field and the length of the vlocator (denoted as the second location in FIG. 14) field. That is, the embodiment of the present application extends a sub-TLV in the existing IGP message, and the flocator field and the vlocator field of the network device are advertised through the sub-TLV.
  • the third network device may publish the above-mentioned IGP message for advertising the locator based on the IGP protocol, so that other nodes in the same IGP domain can receive the IGP message to learn the flocator field and the vlocator field of the third network device. It should be noted that if the network devices on the message forwarding path are all in the same IGP domain, each network device can use the IGP message to advertise the locator in the domain, and in other possible implementations, the control device can also send the message. To advertise the locator and the length of the corresponding flocator field and/or vlocator field.
  • control device can also publish an IGP packet for the third network device in the IGP domain, so that other network devices in the IGP domain can learn based on the IGP packet The flocator field and vlocator field of the third network device.
  • the second network device generates a first segment identifier corresponding to the third network device based on the first identification information and the second segment identifier.
  • the second network device generates the 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.
  • the second segment identifier corresponding to the third network device does not include the first identification information in a variety of compression methods. Therefore, in S1303, the implementation manner in which the second network device generates the first segment identifier corresponding to the third network device is related to the compression method of the first segment identifier, and S1303 will be described in detail for different compression methods respectively. I won't expand the explanation here.
  • the second network device sends the message to the third network device based on the first segment identifier.
  • the first segment identifier is the original SID of the third network device. Therefore, the second network device can use the first segment identifier as the destination address to forward the message, so as to forward the message to the third network device.
  • Internet equipment
  • FIG. 15 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is applied to an intermediate node in an SRv6 network, that is, the second network device in the following embodiment can be any on the forwarding path Intermediate node.
  • 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 Figure 15, the method includes the following processes:
  • the second network device receives a message, the message includes a second segment identifier corresponding to the third network device, the second segment identifier only does not include the first identification information, and the first identification information is used to identify the Describe the AS to which the third network device belongs.
  • the second network device may be an intermediate node in the packet forwarding path in the embodiments shown in FIG. 4 to FIG. 12.
  • the third network device is located on the forwarding path of the second network device.
  • the second network device may be the intermediate node R2, and in this case, the third network device may be the intermediate node R3.
  • the second network device may also be the intermediate node R3, and in this case, the third network device may be the intermediate node R4.
  • the second network device may also be the intermediate node R4, and in this case, the third network device may be the intermediate node R5.
  • 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 will not be repeated here.
  • the implementation manner of S1501 may refer to the implementation manner of S1301 in the embodiment of FIG. 13, which is not repeated here again.
  • the second segment identifier corresponding to the third network device if the second segment identifier corresponding to the third network device is obtained based on the 32-bit compression method, then the second segment identifier corresponding to the third network device only includes the function in the original SID Field and vlocator field, excluding the flocator field in the original SID.
  • the second network device determines first identification information corresponding to the third network device, where the first identification information is used to identify the autonomous domain to which the third network device belongs.
  • the second network device generates a first segment identifier corresponding to the third network device based on the first identification information and the second segment identifier.
  • the implementation of S1503 may be that the second network device can directly generate the first segment identifier corresponding to the third network device based on the first identification information and the second segment identifier.
  • the second segment of the identifier includes the vlocator field and the function field of the original SID of the third network device, and then, for example, the flocator field of the original SID of the third network device is obtained through an IGP message pre-published by the third network device, and the The combination of these three fields can restore the original SID of the third network device, that is, generate the first segment identifier corresponding to the third network device.
  • the second network device sends the message to the third network device based on the first segment identifier.
  • the SID list included in the SRH in the message sent by the head node R1 to the intermediate node R2 is: ⁇ 5:8001, 4: 0, 3:6, 2:0>.
  • the intermediate node R2 When the intermediate node R2 receives the message, it determines that the flocator field of the intermediate node R3 is A according to the IGP message pre-published by the intermediate node R3 or the message pre-sent by the control device, and then according to the SID list corresponding to the intermediate node R3 After the compressed 3:6, the original SID of the intermediate node R3 is restored to A:3:6, so that the determined original SID A:3:6 is subsequently used as the destination address DA of the next hop to forward the message.
  • the intermediate node R3 When the intermediate node R3 receives the message, it determines that the flocator field of the intermediate node R4 is A according to the IGP message issued by the intermediate node R4 or the message sent in advance by the control device, and then according to the compression corresponding to the intermediate node R4 in the SID list After 4:0, the original SID of the intermediate node R4 is restored to A:4:0, so that the determined original SID A:4:0 will be used as the destination address DA to forward the message.
  • the flocator field of the tail node R5 is determined to be A, and then according to the SID list and the tail node R5 Corresponding to the compressed 5:8001, the original SID of the tail node R5 is restored to A:5:8001, so that the determined original SID A:5:8001 is subsequently used as the destination address DA to forward the message.
  • the above described SID restoration process based on FIG. 7 is only a possible example, and the above restoration method can also be applied to SID restoration of network nodes on other forwarding paths.
  • the forwarding path may be a loose display path, that is, the path includes one or more forwarding nodes that are only used for transparent transmission of packets. In this case, only network nodes that support the SR protocol may be Perform the SID restore operation.
  • 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., At this time, even if the next-hop network node supports the SR protocol, there is no need to perform a compression and restoration operation.
  • FIG. 16 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is applied to an intermediate node in an SRv6-based network, that is, the second network device in the following embodiment is any one on the forwarding path Intermediate node.
  • 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.
  • the method includes the following processes:
  • the second network device receives a message, the message includes a second segment identifier corresponding to the third network device, and the second segment identifier does not include the first identification information and the second identification information at the same time, and the first identifier The information is used to identify the AS to which the third network device belongs, and the second identification information is used to identify the third network device.
  • 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 on the forwarding path and is located in the first The next node after the second network device that supports SRv6.
  • the second network device may be the intermediate node R2, and in this case, the third network device may be the intermediate node R3.
  • the second network device may also be the intermediate node R3, and in this case, the third network device may be the intermediate node R4.
  • the second network device may also be the intermediate node R4, and in this case, the third network device may be the intermediate node R5.
  • 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 will not be repeated here.
  • the implementation manner of S1601 may refer to the implementation manner of S1301 in the embodiment of FIG. 13, and details are not described herein again.
  • the second segment identifier corresponding to the third network device if the second segment identifier corresponding to the third network device is obtained based on the 16-bit compression method, then the second segment identifier corresponding to the third network device only includes the function in the original SID Field, excluding the flocator field and vlocator field in the original SID.
  • the second network device determines first identification information and second identification information corresponding to the third network device.
  • the second segment identifier corresponding to the third network device not only does not include the flocator field, but also does not include the vlocator field, but only includes the function field. Therefore, in addition to determining the first identification information, the first network device also needs to determine the second identification information, which is used to identify the second network device in the autonomous domain (that is, the vlocator field).
  • the implementation manner for the second network device to determine the second identification information of the third network device may refer to the implementation manner for the second network device to determine the first identification information of the third network device in the embodiment shown in FIG. 13. That is, the second identification information can also be determined through an IGP message, or the control device sends a message to inform the third network device of the content of the second identification information.
  • the second network device generates a first segment identifier corresponding to the third network device based on the first identification information, the second identification information, and the second segment identifier.
  • the second segment of the identifier includes the function field of the original SID of the third network device, and then the flocator field and the flocator field of the original SID of the third network device are obtained through the IGP message issued by the third network device or the message sent by the control device
  • the vlocator field, combining these three fields can restore the original SID of the third network device, that is, to generate the first segment identifier corresponding to the third network device.
  • the second network device sends the message to the third network device based on the first segment identifier.
  • the SID list included in the SRH in the message sent by the head node R1 to the intermediate node R2 is: ⁇ 8001, 1, 6, 5>.
  • the intermediate node R2 receives the message, according to the IGP message issued by the intermediate node R3 or the message sent by the control device, it is determined that the flocator field of the intermediate node R3 is A and the vlocator field is 3, and then according to the SID list and the intermediate node
  • the compressed 6 corresponding to R3 restores the original SID of the intermediate node R3 as A:3:6, so that the determined original SID A:3:6 is subsequently used as the destination address DA to forward the message.
  • the intermediate node R3 When the intermediate node R3 receives the message, according to the IGP message issued by the intermediate node R4 or the message sent by the control device, it is determined that the flocator field of the intermediate node R4 is A and the vlocator field is 4, and then according to the SID list and the intermediate node The compressed 0 corresponding to R4 restores the original SID of the intermediate node R4 to A:4:0, so that the determined original SID A:4:0 is subsequently used as the destination address DA to forward the message.
  • the flocator field of the tail node R5 is determined to be A, and then according to the compression corresponding to the tail node R5 in the SID list After 5:8001, the original SID of the tail node R5 is restored to A:5:8001, so that the determined original SID A:5:8001 is used as the destination address DA to forward the message.
  • FIG. 17 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is applied to an intermediate node in an SRv6-based network, that is, the first network device in the following embodiment may be any device on the forwarding path.
  • An intermediate node The embodiment shown in FIG. 17 is used to explain the process of restoring the segment identifier after compression based on the 20-bit compression method shown in FIG. 10. As shown in Figure 17, the method includes the following processes:
  • the second network device receives a packet.
  • the packet includes a second segment of identifiers corresponding to multiple consecutive network devices on the forwarding path.
  • the second segment of identifiers includes third identification information and fourth identification information.
  • a continuous network device corresponds to multiple segment identifiers, the second network device is located in the first of the multiple continuous network devices on the forwarding path, and the multiple segment identifiers include the same third identification information. Four identification information uses the number of these multiple consecutive network devices.
  • the second network device may be an intermediate node in the packet forwarding path in the embodiments shown in FIG. 4 to FIG. 12.
  • the application scenario of the 20-bit compression scheme is that the function fields of multiple network devices on the forwarding path are the same. Therefore, at this time, the forwarding path includes multiple consecutive network devices.
  • the network device corresponding to multiple segment identifiers, the first network device is located in the first of the multiple consecutive network devices on the forwarding path, and the multiple segment identifiers include the same third identification information (that is, the function field ).
  • the second network device may be any one of node R2, node R3, or the like.
  • the multiple consecutive network devices may be nodes on the forwarding path that are located behind the second network device and support SRv6 and have the same function field as the function field of the second network device.
  • the second segment of identification in S1701 includes third identification information and fourth identification information.
  • the third identification information is used to indicate the same function field
  • the fourth identification information is used to indicate that the packet forwarding path of the current node is left. The number of network devices with the same function field below.
  • the second segment identifier in S1701 only includes the same function field and the identifier used to indicate network devices with the same function field.
  • the quantity information does not include the flocator field and vlocator field in the original SID.
  • the second segment of identification may include the same function field and information used to indicate the number of network devices with the same function field, and include the flocator field in the original SID, but not the original SID
  • the second segment of identification may include the same function field and information used to indicate the number of network devices with the same function field, and include the vlocator field in the original SID, but not the original SID flocator field.
  • the second network device is equivalent to knowing the function field of the third network device through the second segment identifier. Therefore, the second network device The device can 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 facilitate The message is sent according to the first segment identifier through the following S1704.
  • the second network device determines the first identification information and the second identification information corresponding to the third network device, so The first identification information is used to identify the 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.
  • the second network device may be the intermediate node R2, and the third network device may be the intermediate node R3 in this case.
  • the second network device may also be an intermediate node R3, and in this case, the third network device may be an intermediate node R4.
  • the second network device generates a first segment identifier corresponding to the third network device based on the first identification information, the second identification information, and the second segment identifier.
  • the second network device sends the message to the third network device based on the first segment identifier.
  • the implementation manners of S1702, S1703, and S1704 may refer to the implementation manners of S1502, S1503, and S1504 in the embodiment of FIG. 15 respectively, and the description is not repeated here.
  • the second network device since the second segment of identification is achieved by compressing the original SIDs of multiple network devices with the same function field through the third identification information and the fourth identification information, in order to facilitate subsequent nodes to determine whether the next hop node is still this One of the multiple network devices, the second network device needs to update the fourth identification information before sending the message to the third network device.
  • the second network device may determine the fifth identification information based on the fourth identification information; determine the updated first-segment identification, and the updated first-segment identification includes the third identification information and the fifth identification information. Identification information; the second network device sends the message to the second network device based on the second segment identifier, and the message includes the updated first segment identifier.
  • the fourth identification information may be a first value
  • the fifth identification information may be a second value
  • the second value may be the first value minus one. That is, the fourth identification information is updated to advertise the remaining number of network devices with the same function field in the next hop node.
  • the next hop node receives the updated fourth identification information, if the value indicated by the updated fourth identification information is greater than 1, it continues to determine the destination address of the message in the above-mentioned manner. If the value indicated by the updated fourth identification information is 1, other information in the SID list needs to be used to determine the compression mode of the SID of the next hop node to determine the destination address of the message.
  • the SID list included in the SRH in the message sent by the head node R1 to the intermediate node R2 is: ⁇ 5:8001, 5060: 3>.
  • the intermediate node R2 determines that the flocator field of the intermediate node R3 is A and the vlocator field is 3, and then restores the original SID of the intermediate node R3 according to the compressed 5060 corresponding to the intermediate node R3 in the SID list It is A:3:5060, and the 5060:3 in the message is updated to 5060:2, which is used to indicate that there are two network devices with a function field of 5060 on the message forwarding path.
  • R2 uses the determined original SID A:3:5060 as the destination address DA to forward the message.
  • the intermediate node R3 When the intermediate node R3 receives the message, it determines that the flocator field of the intermediate node R4 is A and the vlocator field is 4, and then restores the original SID of the intermediate node R4 according to the compressed 5060 corresponding to the intermediate node R4 in the SID list It is A:4:5060, and the 5060:2 in the message is updated to 5060:1, which is used to indicate that there is a network device with a function field of 5060 on the message forwarding path. R3 uses the determined original SID A:4:5060 as the destination address DA to forward the message.
  • the intermediate node R4 When the intermediate node R4 receives the message, because 5060:1 in the message indicates that there is only one network device with a function field of 5060, and this network device is the intermediate node R4, the intermediate node R4 needs to determine the tail node's The compression method of R5, after determining that the compression method of the tail node is 32-bit compression, according to the IGP message issued by the tail node R5 or the message sent by the control device, the flocator field of the tail node R5 is determined to be A, and then according to the SID list The compressed 5:8001 corresponding to the tail node R5, the original SID of the tail node R5 is restored to A:5:8001, and then the determined original SID A:5:8001 is used as the destination address DA to forward the message.
  • the second network device determines the first segment identifier corresponding to the third network device in different ways. Therefore, the second network device Before restoring the first segment identifier corresponding to the third network device based on the second segment identifier, it is necessary to determine the compression scheme included in the received message corresponding to the second segment identifier of the third network device.
  • the received message also carries identification information for identifying the compression scheme of the second segment identification corresponding to the third network device.
  • this identification information is called compression strategy identification information (that is, identification information in the embodiment shown in FIG. 12). Therefore, the first network device may first determine the second segment according to the compression strategy identification information. Identify the corresponding compression scheme, and then restore the first segment identifier corresponding to the third network device through the corresponding embodiments in FIGS. 14 to 16 according to the determined compression scheme.
  • the compression strategy identification information is carried in a TLV in the SRH.
  • the first network device receives the message, it can parse the TLV and determine the compression scheme of the third network device according to the TLV.
  • the compression scheme of each SID indicated in the TLV has been described in detail in the embodiment shown in FIG. 12.
  • the first network device only needs to analyze the compression scheme of the third network device according to the embodiment shown in FIG. 12 .
  • FIG. 18 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • the network device may be any one of multiple nodes in the packet forwarding path in the SRv6 network in any of the foregoing embodiments.
  • the network device 1800 may be a switch, a router, or other network device that forwards packets.
  • the network device 1800 includes: a main control board 1810, an interface board 1830, and an interface board 1840.
  • a switching network board (not shown in the figure) may be included, and the switching network board is used to complete data exchange between various interface boards (interface boards are also called line cards or service boards).
  • the main control board 1810 is used to complete functions such as system management, equipment maintenance, and protocol processing.
  • the interface boards 1830 and 1840 are used to provide various service interfaces (for example, POS interface, GE interface, ATM interface, etc.), and implement message forwarding.
  • 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 achieve intercommunication.
  • the interface board 1830 includes one or more processors 1831.
  • the processor 1831 is used for controlling and managing the interface board, communicating with the central processing unit on the main control board, and for forwarding processing of messages.
  • the memory 1832 on the interface board 1830 is used to store forwarding entries, and the processor 1831 forwards the message by looking up the forwarding entries stored in the memory 1832.
  • the interface board 1830 includes one or more network interfaces 1833 for receiving the message sent by the previous hop node, and sending the processed message to the next hop network node according to the instruction of the processor 1831.
  • the specific implementation process will not be repeated here one by one.
  • the specific functions of the processor 1831 are also not repeated here one by one.
  • this embodiment includes multiple interface boards and adopts a distributed forwarding mechanism. Under this mechanism, the operation on the interface board 1840 is basically similar to that of the interface board 1830. For the sake of brevity ,No longer.
  • the processor 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.
  • a network processor or an application specific integrated circuit application specific integrated circuit
  • the processor 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.
  • the processor 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.
  • the processor 1831 and/or 1841 may also adopt a general-purpose processor, such as a general-purpose CPU
  • main control boards there may be one or more main control boards, and when there are more than one, it may include a main main control board and a standby main control board.
  • the multiple interface boards can communicate with each other through one or more switching network boards, and when there are more than one, the load sharing and redundant backup can be realized together.
  • the device does not need to switch the network board, and the interface board undertakes the processing function of the business data of the entire system.
  • the device includes multiple interface boards, which can realize data exchange between multiple interface boards through the switching network board, and provide large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture.
  • the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • the memory 1832 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM), or can store Other types of dynamic storage devices for information and instructions can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only Memory, CD-ROM, or Other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures And any other media that can be accessed by the computer, but not limited to this.
  • the memory 1832 may exist independently, and is connected to the processor 1831 through a communication bus.
  • the memory 1832 may also be integrated with the processor 1831.
  • the memory 1832 is used to store program codes, and is controlled by the processor 1831 to execute, so as to execute the path detection method provided in the foregoing embodiments.
  • the processor 1831 is configured to execute the program code stored in the memory 1832.
  • One or more software modules can be included in the program code.
  • the one or more software modules may be the software modules provided in any of the following embodiments in FIG. 21 or FIG. 22.
  • the network interface 1833 may be any device such as a transceiver for communicating with other devices or communication networks, such as Ethernet, radio access network RAN, and wireless local area network (wireless local area network). local area networks, WLAN), etc.
  • a transceiver for communicating with other devices or communication networks, such as Ethernet, radio access network RAN, and wireless local area network (wireless local area network). local area networks, WLAN), etc.
  • FIG. 19 is a schematic structural diagram of another network device provided by an embodiment of the present application.
  • the network device may be any one of the multiple nodes in the SRv6 network provided in any embodiment of the above figure.
  • the network device 1900 may be a switch, a router, or other network device that forwards packets.
  • the network device 1900 includes: a main control board 1910, an interface board 1930, a switching network board 1920, and an interface board 1940.
  • the main control board 1910 is used to complete functions such as system management, equipment maintenance, and protocol processing.
  • the switching network board 1920 is used to complete data exchange between various 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 (for example, POS interface, GE interface, ATM interface, etc.) and implement data packet forwarding.
  • the control plane is composed of the management and control units of the main control board 1910 and the management and control units on the interface boards 1930 and 1940.
  • the main control board 1910, the interface boards 1930 and 1940, and the switching network board 1920 are connected to the system backplane through the system bus to achieve intercommunication.
  • the central processing unit 1931 on the interface board 1930 is used to control and manage the interface board and communicate with the central processing unit on the main control board.
  • the forwarding entry memory 1934 on the interface board 1930 is used to store forwarding entries, and the network processor 1932 forwards the message by searching for the forwarding entries stored in the forwarding entry memory 1934.
  • the physical interface card 1933 of the interface board 1930 is used to receive the message sent by the previous hop node. The specific implementation process will not be repeated here one by one.
  • the processed message is sent to the next hop node of the first node through the physical interface card 1933.
  • the specific implementation process will not be repeated here one by one.
  • this embodiment includes multiple interface boards and adopts a distributed forwarding mechanism. Under this mechanism, the operation on the interface board 1940 is basically similar to the operation of the interface board 1930. For the sake of brevity ,No longer.
  • the functions of the network processors 1932 and 1942 in FIG. 19 can be implemented by replacing application specific integrated circuits.
  • main control boards there may be one or more main control boards, and when there are more than one, it may include a main main control board and a standby main control board.
  • interface boards There may be one or more interface boards. The stronger the data processing capability of the device, the more interface boards provided.
  • the switching network board may not exist, or there may be one or more. When there are more than one, the load sharing and redundant backup can be realized together. Under the centralized forwarding architecture, the device does not need to switch the network board, and the interface board undertakes the processing function of the business data of the entire system.
  • the device can have at least one switching network board, and data exchange between multiple interface boards can be realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture.
  • the specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
  • FIG. 20 is a schematic structural diagram of the interface board 2000 in the network device shown in FIG. 19 provided by an embodiment of the present application.
  • the network device where the interface board 2000 is located may be included in the packet forwarding path in any of the foregoing embodiments. Any one of multiple nodes.
  • the interface board 2000 may include a physical interface card (PIC) 2030, a network processor (NP) 2020, and a traffic management module (traffic management) 2020.
  • PIC physical interface card
  • NP network processor
  • traffic management traffic management
  • PIC physical interface card (physical interface card), used to realize the docking function of the physical layer, the original traffic enters the interface board of the network device from this, and the processed message is sent from the PIC card.
  • the network processor NP2020 is used to implement message forwarding processing. Specifically, the processing of upstream packets includes: packet inbound interface processing, upstream classification, forwarding table lookup; downstream packet processing: forwarding table lookup, downstream flow classification, outgoing interface processing, and so on.
  • Traffic ManagementTM is used to implement functions such as Quality of Service (QoS), wire-speed forwarding, large-capacity buffering, and queue management.
  • QoS Quality of Service
  • upstream traffic management includes: upstream QoS processing (such as congestion management and queue scheduling, etc.) and slicing processing;
  • downstream traffic management includes: packet processing, multicast replication, and downstream QoS processing (such as congestion management and queue scheduling, etc.) ).
  • the multiple interface boards 2000 can communicate through the switching network 2040.
  • FIG. 20 only shows a schematic processing flow or module inside the NP, and the processing sequence of each module in a specific implementation is not limited to this, and other modules or processing flows can be deployed as needed in practical applications. The comparison of the embodiments of this application is not limited.
  • FIG. 21 is a schematic diagram of a first network device provided by an embodiment of the present application, which is applied to a network supporting the SRv6 protocol.
  • the SRv6 network includes at least a plurality of network devices supporting the SRv6 protocol. In a possible implementation manner, the SRv6 network may also include one or more other network devices that do not support the SRv6 protocol.
  • the first network device may be, for example, R1 shown in FIG. 3, and may be the first network device used to implement any of the methods provided in FIG. 4, FIG. 6, FIG. 8, and FIG. 10, etc. As shown in FIG. 21, the first network device 2100 includes:
  • the determining module 2101 is configured to determine a first segment identifier corresponding to a second network device, where the first segment identifier includes first identification information, and the first identification information is used to identify the autonomous domain to which the second network device belongs .
  • 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.
  • the generating module 2102 is configured to generate a second segment identifier based on the first segment identifier, where the second segment identifier does not include the first identifier information.
  • 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.
  • the sending module 2103 is configured to send a message to the second network device, where the message includes the second segment identifier.
  • 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.
  • 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 identification information and third identification information, and the second identification information is used to identify The autonomous domain to which the third network device belongs, and the third identification information is used to identify the third network device in the autonomous domain;
  • the generating module 2102 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 identification information and the third identification information;
  • the sending module 2103 is further configured to send the message to the third network device, where the message includes the fourth segment identifier.
  • 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 Identifies the same paragraph.
  • the determining module 2101 is further configured to determine multiple segment identifiers corresponding to multiple network devices, where the multiple segment identifiers respectively include the same fourth identification information;
  • the generating module 2102 is further configured to generate a fifth segment identifier based on the multiple 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 The number of multiple network devices;
  • the sending module 2103 is further configured to send the message, and the message includes the fifth segment identifier.
  • 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 used to uniquely identify the plurality of network devices.
  • the multiple network devices in the autonomous domain to which the network device belongs.
  • the multiple network devices include a second network device, and the second segment identifier and the fifth segment identifier are the same segment identifier.
  • the message further includes seventh identification information, where the seventh identification information is used to identify a strategy for generating the second segment identifier by the first network device.
  • the determining module 2101 determining multiple segment identifiers corresponding to multiple network devices includes:
  • the determining module determines the multiple segment identifiers corresponding to the multiple network devices based on the internal gateway protocol IGP messages sent by the multiple network devices respectively; or, the determining module determines the multiple segments based on the control message sent by the control device. Multiple segment identifiers corresponding to each network device.
  • the first network device may determine the second segment identifier corresponding to the second network device according to the first segment identifier corresponding to the second network device, because the first segment identifier includes the identifier used to identify the second network device to which the second network device belongs.
  • the first identification information of the autonomous domain, and the second identification information does not include the first identification information. Therefore, the second identification is equivalent to compressing the first identification.
  • the first network device is sending to the second network device.
  • the compressed segment identifier can be carried in the message to reduce the pressure of the first network device as the head node to encapsulate the message.
  • compressing the segment identifier is also beneficial to improve the efficiency of message forwarding.
  • the first network device provided in the above embodiment determines the segment identifier
  • only the division of the above functional modules is used as an example for illustration.
  • the above functions can be allocated by different functional modules according to needs. , Divide the internal structure of the device into different functional modules to complete all or part of the functions described above.
  • the first network device and the method embodiment for determining the segment identifier provided in the above-mentioned embodiment belong to the same concept. For the specific implementation process, please refer to the method embodiment for details, which will not be repeated here.
  • FIG. 22 is a schematic diagram of another first network device provided by an embodiment of the present application, which is applied to an SRv6 network, and the SRv6 network includes at least a plurality of network devices supporting the SRv6 protocol.
  • the SRv6 network may also include one or more other network devices that do not support the SRv6 protocol.
  • the first network device may be, for example, any intermediate node R2, R3, or R4 shown in FIG. 3, and may be used to implement the second network in any of the methods provided in FIG. 13, FIG. 15, FIG. 16, and FIG. Equipment, etc.
  • the first network device 2200 includes:
  • the receiving module 2201 is configured to receive a message, the message including a first segment identifier corresponding to the second network device.
  • a message including a first segment identifier corresponding to the second network device.
  • 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.
  • the determining module 2202 is configured to determine first identification information corresponding to the second network device, where the first identification information is used to identify the autonomous domain to which the second network device belongs.
  • first identification information is used to identify the autonomous domain to which the second network device belongs.
  • the generating module 2203 is configured to generate a second segment identifier corresponding to the second network device based on the first identifier information and the first segment identifier.
  • 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.
  • the sending module 2204 is configured to send the message to the second network device based on the second segment identifier.
  • the second network device is a next hop device
  • the determining module 2202 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 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.
  • the forwarding path of the message includes multiple consecutive network devices, the multiple consecutive network devices correspond to multiple segment identifiers, and the first network device is located in the multiple consecutive network devices on the forwarding path
  • the first one, the multiple segment identifiers include the same third identifier information, the first segment identifier includes the third identifier information and the fourth identifier information, and the fourth identifier information is used to indicate the number of the multiple consecutive network devices ;
  • the sending module 2204 includes:
  • the first determining subunit is configured to determine fifth identification information based on the fourth identification information
  • the second determining subunit is configured to determine the updated first segment identifier, where the updated first segment identifier includes the third identification information and the fifth identification information;
  • the sending subunit is configured to send the message to the second network device based on the second segment identifier, where the message includes the updated first segment identifier.
  • the fourth identification information is the first value
  • the fifth identification information is the second value
  • the second value is the first value minus one.
  • the determining module 2202 includes:
  • the receiving subunit is configured to receive 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, and the seventh identification information.
  • the identification information is used to identify the length of the first identification information
  • the third determining subunit is configured to determine the first identification information based on the sixth identification information and the seventh identification information.
  • the first network device can obtain the compressed part of the segment identifier when receiving the message. Then the compressed message of the second network device is restored to obtain the destination address for forwarding the message. Since the head node compresses the segment identifiers of each node, the bandwidth occupied by the packet transmission between the first network device and the second network device will be reduced, thereby improving the efficiency of packet forwarding.
  • the foregoing embodiment provides that when the first network device determines the segment identifier, only the division of the foregoing functional modules is used as an example for illustration. In actual applications, the foregoing function allocation can be completed by different functional modules as required. That is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the foregoing embodiment provides the same conception of the method for determining the first network device and the segment identifier. For the specific implementation process, refer to the method embodiment, which will not be repeated here.
  • an embodiment of the present application also provides a network system, which includes a first network device, a second network device, and a third network device.
  • the first network device is used to determine the network device corresponding to the second network device.
  • the first segment identifier, the first segment identifier includes first identification information, the first identification information is used to identify the autonomous domain to which the second network device belongs, and the first network device is based on the first segment identifier Generating a second segment identifier, the second segment identifier does not include the first identification information, the first network device sends a message to a third network device, and the message includes the second segment identifier;
  • the third network device is configured to receive a message, the message including the second segment identifier corresponding to the second network device, and the third network device determines the First identification information, where the first identification information is used to identify the autonomous domain to which the second network device belongs, and the third network device generates a connection with the first identification information based on the first identification information and the first segment identification
  • 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 any of the methods provided in FIG. 4, FIG. 6, FIG. 8, and FIG. Other possible methods executed by R1 mentioned in the foregoing embodiment of this application.
  • the second network device in the network system may be R2, R3, and/or R4 shown in FIG. 3, which is used to implement the second network device in any of the methods provided in FIG. 13, FIG. 15, FIG. 16, and FIG. It can also be used in other possible methods performed by R2, R3, and/or R4 mentioned in the foregoing embodiments of this application.
  • FIG. 23 is a schematic structural diagram of a network device provided by an embodiment of the present invention. Any network device in the foregoing embodiment may be implemented by the network device 2300 shown in FIG. 23.
  • the network device 2300 may be a switch, a router, or other network device that forwards packets.
  • the control device in the foregoing embodiment can also be implemented by the network device 2300 shown in FIG. 23.
  • the specific functions of the network device 2300 can refer to the specific implementation of the control device in the foregoing embodiment, which will not be repeated here. Go into details.
  • 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 program execution of the solution of the present application.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • the communication bus 2302 may include a path for transferring information between the above-mentioned components.
  • the memory 2303 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions
  • the dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (Including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer Any other media, but not limited to this.
  • the memory 2303 may exist independently, and is connected to the processor 2301 through a communication bus 2302.
  • the memory 2303 may also be integrated with the processor 2301.
  • the memory 2303 is used to store the program code for executing the solution of the present application, and the processor 2301 controls the execution.
  • the processor 2301 is configured to execute the program code stored in the memory 2303.
  • One or more software modules can be included in the program code.
  • the control node or any one of the multiple nodes in the embodiment of FIG. 4 can determine the data used to develop the application through the processor 2301 and one or more software modules in the program code in the memory 2303.
  • the one or more software modules may be the software modules provided in any embodiment of FIG. 21 or FIG. 22.
  • the communication interface 2304 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network RAN, wireless local area networks (WLAN), and so on.
  • a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network RAN, wireless local area networks (WLAN), and so on.
  • the network device may include multiple processors, for example, the processor 2301 and the processor 2305 shown in FIG. 23.
  • processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • the aforementioned network device may be a general network device or a dedicated network device.
  • the network device may be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device.
  • PDA personal digital assistant
  • the embodiments of this application do not limit the type of network equipment.
  • the network device shown in FIG. 23 is a node that can be any of the foregoing method embodiments.
  • any node involved in the embodiments of the present application may also be a virtual node implemented based on a general physical server combined with network function virtualization NFV technology.
  • the virtual node may be a virtual router.
  • the virtual node may be a virtual machine (English: Virtual Machine, VM) running a program for providing a message sending function, and the virtual machine is deployed on a hardware device (for example, a physical server).
  • a virtual machine refers to a complete computer system with complete hardware system functions that is simulated by software and runs in a completely isolated environment.
  • Those skilled in the art can combine NFV technology to virtualize multiple nodes with the above-mentioned functions on a general physical server by reading this application. I won't repeat them here.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)) )Wait.
  • the program can be stored in a computer-readable storage medium.
  • the storage medium mentioned can be a read-only memory, a magnetic disk or an optical disk, etc.

Abstract

The present application relates to the technical field of SR. Disclosed are a segment identifier determining method and device. In the method, a first network device may determine a second segment identifier corresponding to a second network device according to a first segment identifier corresponding to the second network device. Because the first segment identifier comprises first identifier information used for identifying the autonomous domain of the second network device, and the second segment identifier does not comprise the first identifier information, the second segment identifier can be said to be obtained by compressing the first segment identifier, such that the first network device can carry the compressed segment identifier in a packet sent to the second network device, so as to reduce the pressure of the first network device as a head node to encapsulate the packet. In addition, the compression of the segment identifier also facilitates the improvement of packet forwarding efficiency.

Description

段标识的确定方法和设备Method and equipment for determining segment identification
本申请要求于2019年12月30日提交的申请号为201911395279.7、发明名称为“段标识的确定方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on December 30, 2019 with the application number 201911395279.7 and the title of the invention "Method and Equipment for Determining Segment Identification", the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请涉及分段路由(segment routing,SR)技术领域,特别涉及一种段标识的确定方法和设备。This application relates to the technical field of segment routing (segment routing, SR), and in particular to a method and device for determining a segment identifier.
背景技术Background technique
SR技术是一种头节点在网络入口部署转发路径的路由技术。SR技术可以应用在支持第六代互联网协议(internet protocol version 6,IPv6)的网络中,简称为SRv6网络。在SRv6网络中,头节点在报文中封装分段路由头(segment routing header,SRH)。SRH中包括用于指示报文的转发路径的段标识(segment identification,SID)列表字段。该SID列表字段包括多个SID,每个SID可以用于标识转发路径上的一个节点或一条链路。由于目前每个SID通常为128比特(bit),包含的比特数较多,导致头节点封装报文的效率较低,并且如果SID列表中包括的SID数量较多时,将导致头节点封装报文的效率进一步降低。SR technology is a routing technology in which the head node deploys a forwarding path at the entrance of the network. The SR technology can be applied to networks that support the sixth-generation Internet Protocol (Internet Protocol Version 6, IPv6), which is referred to as an SRv6 network for short. In the SRv6 network, the head node encapsulates the segment routing header (segment routing header, SRH) in the message. The SRH includes a segment identification (segment identification, SID) list field for indicating the forwarding path of the message. The SID list field includes multiple SIDs, and each SID can be used to identify a node or a link on the forwarding path. Currently, each SID is usually 128 bits (bit), which contains a large number of bits, resulting in low efficiency of the head node in encapsulating the message, and if the SID list includes a large number of SIDs, the head node will encapsulate the message The efficiency is further reduced.
发明内容Summary of the invention
本申请提供了一种段标识的确定方法和设备,可以提高头节点封装报文的效率,以及节约网络带宽资源。所述技术方案如下:The present application provides a method and device for determining a segment identifier, which can improve the efficiency of packet encapsulation by the head node and save network bandwidth resources. The technical solution is as follows:
第一方面,提供了一种段标识的确定方法,在该方法中:第一网络设备确定与第二网络设备对应的第一段标识,所述第一段标识包括第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域。所述第一网络设备基于所述第一段标识生成第二段标识,所述第二段标识不包括所述第一标识信息。所述第一网络设备向所述第二网络设备发送报文,所述报文包括所述第二段标识。In a first aspect, a method for determining a segment identifier is provided. In the method, a first network device determines a first segment identifier corresponding to a second network device, and the first segment identifier includes first identifier information, and The first identification information is used to identify the autonomous domain to which the second network device belongs. 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 identification information. The first network device sends a message to the second network device, and the message includes the second segment identifier.
在本申请中,第一网络设备可以根据与第二网络设备对应的第一段标识确定第二网络设备对应的第二段标识。由于第一段标识包括用于标识第二网络设备所属的自治域的第一标识信息,而第二段标识不包括第一标识信息。第二段标识相当于对第一段标识进行了压缩,如此,第一网络设备在向第二网络设备发送的报文中便可携带压缩后的段标识,以降低第一网络设备作为头节点封装报文的压力。此外,对段标识进行压缩也有利于提升报文转发效率。需要说明的是,所述与第二网络设备对应的第一段标识用于标识第二网络设备和第一段标识之间的对应关系。所述第一段标识为压缩前的原始段标识,所述对应关系例如为第一段标识用于标识第二网络设备,或者第一段标识用于标识从另一网络设备到第二网络设备的链路,所述另一网络设备例如为所述第二网络设备的上一跳设备,或者第一段标识也可以是与所述第二网络设备相关的其他类型的段标识等。In this application, the first network device may determine the second segment identifier corresponding to the second network device according to the first segment identifier corresponding to the second network device. Because the first segment of identification includes the first identification information used to identify the autonomous domain to which the second network device belongs, and the second segment of identification does not include the first identification information. The second segment identifier is equivalent to compressing the first segment identifier. In this way, the first network device can carry the compressed segment identifier in the message sent to the second network device, so that the first network device can be used as the head node. The pressure to encapsulate the message. In addition, compressing the segment identifier is also beneficial to improve the efficiency of message forwarding. It should be noted that the first segment identifier corresponding to the second network device is used to identify the correspondence between the second network device and the first segment identifier. The first segment identifier is the original segment identifier before compression, and the corresponding relationship is, for example, that the first segment identifier is used to identify the second network device, or the first segment identifier is used to identify the transition from another network device to the second network device. The other network device is, for example, the previous hop device of the second network device, or the first segment identifier may also be another type of segment identifier related to the second network device.
可选地,在该方法中:所述第一网络设备确定与第三网络设备对应的第三段标识,所述 第三段标识包括第二标识信息和第三标识信息,所述第二标识信息用于标识所述第三网络设备所属的自治域,所述第三标识信息用于标识所述自治域内的所述第三网络设备;所述第一网络设备基于所述第三段标识生成所述第四段标识,所述第四段标识不包括所述第二标识信息和所述第三标识信息;所述第一网络设备向所述第三网络设备发送所述报文,所述报文包括所述第四段标识。Optionally, in this method: the first network device determines a third segment identifier corresponding to the third network device, the third segment identifier includes second identifier information and third identifier information, and the second identifier Information is used to identify the autonomous domain to which the third network device belongs, and the third identification information is used to identify the third network device in the autonomous domain; the first network device is generated based on the third segment identifier The fourth segment identifier, the fourth segment identifier does not include the second identification information and the third identification information; the first network device sends the message to the third network device, the The message includes 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 of the identification in the third network device can be compressed at the same time, so as to further reduce the first network device as the head node to encapsulate the message pressure. In addition, further compression of the segment identifier is also more conducive to improving the efficiency of message forwarding.
可选地,所述第二网络设备和第三网络设备为同一设备,所述第一标识信息和所述第二标识信息为同一标识信息,所述第二段标识和所述第四段标识为同一段标识。也即是,在应用本申请时,同样可以采用压缩第三网络设备对应的段标识的方式来压缩第二网络设备对应的段标识。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 Identifies the same paragraph. That is, when applying this application, the segment identifier corresponding to the third network device can also be compressed to compress the segment identifier corresponding to the second network device.
可选地,在该方法中:所述第一网络设备确定与多个网络设备对应的多个段标识,所述多个段标识分别包括相同的第四标识信息;所述第一网络设备基于所述多个段标识生成第五段标识,所述第五段标识包括所述第四标识信息和第五标识信息,所述第五标识信息用于标识所述多个网络设备的个数;所述第一网络设备发送所述报文,所述报文包括所述第五段标识。Optionally, in this method: the first network device determines multiple segment identifiers corresponding to the multiple network devices, and the multiple segment identifiers respectively include the same fourth identification information; the first network device is based on The plurality of segment identifiers generates a fifth segment identifier, the fifth segment identifier includes the fourth identification information and fifth identification information, and the fifth identification information is used to identify the number of the plurality of network devices; The first network device sends the message, and the message includes the fifth segment identifier.
在本申请中,对于具有多个相同的第四标识信息的网络设备,可以针对这第四标识信息相同的节点统一生成一个压缩后的第五段标识,该压缩后的第五段标识只需包括相同的第四标识信息和这多个网络设备的个数即可,以进一步降低第一网络设备作为头节点封装报文的压力。此外,对段标识进一步进行压缩也更有利于提升报文转发效率。In this application, for network devices with multiple identical fourth identification information, a compressed fifth-segment identification can be generated uniformly for nodes with the same fourth identification information, and the compressed fifth-segment identification only needs to It suffices to include the same fourth identification information and the number of the multiple network devices, so as to further reduce the pressure of the first network device as the head node to encapsulate packets. In addition, further compression of the segment identifier is also more conducive to improving the efficiency of message forwarding.
可选地,所述第五段标识不包括所述第一标识信息和分别对应于所述多个网络设备的第六标识信息,所述第六标识信息分别用于唯一地标识所述多个网络设备所属的自治域内的所述多个网络设备。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 used to uniquely identify the plurality of network devices. The multiple network devices in the autonomous domain to which the network device belongs.
对于具有多个相同的第四标识信息的网络设备,除了对第四标识信息进行压缩,还可以进一步对第一标识信息和第六标识信息进行压缩,以进一步降低第一网络设备作为头节点封装报文的压力。此外,对段标识进一步进行压缩也更有利于提升报文转发效率。For network devices with multiple identical fourth identification information, in addition to compressing the fourth identification information, the first identification information and the sixth identification information can be further compressed to further reduce the packaging of the first network device as a head node. The pressure of the message. In addition, further compression of the segment identifier is also more conducive to improving the efficiency of message forwarding.
可选地,所述多个网络设备包括第二网络设备,所述第二段标识和所述第五段标识为同一段标识。也即是,上述第二网络设备也可以为这多个具有多个相同的第四标识信息的网络设备中的一个。Optionally, the multiple 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 foregoing second network device may also be one of the plurality of network devices having multiple identical fourth identification information.
可选地,所述报文还包括第七标识信息,所述第七标识信息用于标识所述第一网络设备生成所述第二段标识的策略。Optionally, the message further includes seventh identification information, where the seventh identification information is used to identify a strategy 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 forwarded packet according to the compressed segment identifier, the seventh identification information can also be carried in the packet, so that subsequent intermediate nodes can generate The strategy for the segment identification after compression, that is, the compression scheme, quickly restores the segment identification before compression to obtain the destination address of the forwarded message.
可选地,所述第一网络设备确定与多个网络设备对应的多个段标识的具体过程为:所述第一网络设备基于所述多个网络设备分别发送的内部网关协议IGP消息,确定与多个网络设备对应的多个段标识;或者,所述第一网络设备基于控制设备发送的控制消息,确定与多个 网络设备对应的多个段标识。Optionally, the specific process for the first network device to determine the multiple segment identifiers corresponding to the multiple network devices is: the first network device determines based on the internal gateway protocol IGP messages sent by the multiple network devices respectively Multiple segment identifiers corresponding to multiple network devices; or, the first network device determines multiple segment identifiers corresponding to multiple network devices based on a control message sent by the control device.
在本申请实施例中,各个网络设备的压缩前的段标识可以由网络设备自身来发布,也可以由控制设备来统一发布,以提高发布段标识的灵活性。In the embodiment of the present application, the segment identifiers before compression of each network device may be issued by the network device itself, or may be issued uniformly by the control device, so as to improve the flexibility of issuing the segment identifiers.
第二方面、提供了一种段标识的确定方法,在该方法中:第一网络设备接收报文,所述报文包括与所述第二网络设备对应的第一段标识;所述第一网络设备确定与所述第二网络设备对应的第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域;所述第一网络设备基于所述第一标识信息和所述第一段标识,生成与所述第二网络设备对应的第二段标识;所述第一网络设备基于所述第二段标识向所述第二网络设备发送所述报文。In a second aspect, a method for determining a segment identifier is provided. In the method, a first network device receives a message, and the message includes a first segment identifier corresponding to the second network device; The network device determines first identification information corresponding to the second network device, where the first identification information is used to identify the autonomous domain to which the second network device belongs; the first network device is based on the first identification information And the first segment identifier to generate a second segment identifier corresponding to the second network device; the first network device sends the message to the second network device based on the second segment identifier.
在本申请中,当头节点通过第一方面提供的方式压缩报文转发路径上各个节点的段标识之后,第一网络设备在接收到该报文时,便可获取段标识中被压缩的部分,然后还原出第二网络设备的压缩前的报文,以得到转发该报文的目的地址。由于头节点对各个节点的段标识进行了压缩,因此第一网络设备和第二网络设备之间传输报文所占的带宽将降低,从而提高了转发报文的效率。In this application, after the head node compresses the segment identifier of each node on the message forwarding path by the method provided in the first aspect, the first network device can obtain the compressed part of the segment identifier when receiving the message. Then the compressed message of the second network device is restored to obtain the destination address for forwarding the message. Since the head node compresses the segment identifiers of each node, the bandwidth occupied by the packet transmission between the first network device and the second network device will be reduced, thereby improving the efficiency of packet forwarding.
可选地,所述第二网络设备为所述第一网络设备的下一跳设备,这种情况下,在该方法中,所述第一网络设备确定第二标识信息,所述第二标识信息用于标识所述自治域内的所述第二网络设备;所述第一网络设备基于所述第一标识信息和所述第一段标识,生成与所述第二网络设备对应的第二段标识的实现过程具体为:所述第一网络设备基于所述第一标识信息、所述第二标识信息和所述第一段标识,生成与所述第二网络设备对应的所述第二段标识。Optionally, the second network device is a next-hop device of the first network device. In this case, in this method, the first network device determines second identification information, and the second identification Information is used to identify the second network device in the autonomous domain; the first network device generates a second segment corresponding to the second network device based on the first identification information and the first segment identifier The identification process is specifically as follows: the first network device generates the second segment corresponding to the second network device based on the first identification information, the second identification information, and the first segment identifier Logo.
如果在压缩段标识时,不仅对第一标识信息进行了压缩,还对第二标识信息也进行了压缩,此时则需要先基于第一标识信息和第二标识信息才能还原出压缩前的段标识。If when compressing the segment identification, not only the first identification information is compressed, but also the second identification information is also compressed. In this case, the segment before compression needs to be restored based on the first identification information and the second identification information. Logo.
可选地,所述报文的转发路径上包括多个连续的网络设备,所述多个连续的网络设备对应于多个段标识,所述第一网络设备位于所述转发路径上所述多个连续的网络设备中的第一个,所述多个段标识包括相同的第三标识信息,所述第一段标识包括所述第三标识信息和第四标识信息,所述第四标识信息用于指示所述多个连续的网络设备的数量。在该场景中,所述第一网络设备基于所述第二段标识向所述第二网络设备发送所述报文,包括:所述第一网络设备基于所述第四标识信息确定第五标识信息;所述第一网络设备确定更新后的第一段标识,所述更新后的第一段标识包括所述第三标识信息和所述第五标识信息;所述第一网络设备基于所述第二段标识向所述第二网络设备发送所述报文,所述报文中包括所述更新后的第一段标识。Optionally, the packet forwarding path includes multiple consecutive network devices, the multiple consecutive network devices correspond to multiple segment identifiers, and the first network device is located on the forwarding path. The first of three consecutive network devices, the plurality of segment identifiers include the same third identifier information, the first segment identifier includes the third identifier information and the fourth identifier information, and the fourth identifier information It is used to indicate the number of the multiple consecutive network devices. In this scenario, the first network device sending the message to the second network device based on the second segment identifier includes: the first network device determines a fifth identifier based on the fourth identification information Information; the first network device determines the updated first segment identifier, the updated first segment identifier includes the third identification information and the fifth identification information; the first network device is based on the The second segment identifier sends the message to the second network device, and the message includes the updated first segment identifier.
对于具有多个相同的第三标识信息的网络设备,如果针对这多个第三标识信息相同的节点统一生成一个压缩后的第一段标识,该压缩后的第一段标识包括相同的第三标识信息和用于指示这多个网络设备的个数的第四标识信息。此时,第一网络设备在基于第三标识信息还原出第二网络设备压缩前的段标识之后,还需第四标识信息进行更新,以便于后续的节点能够确认是否继续采用上述方式还原目的地址。For network devices with multiple identical third identification information, if a compressed first segment identifier is uniformly generated for the multiple nodes with the same third identification information, the compressed first segment identifier includes the same third identifier. Identification information and fourth identification information used to indicate the number of the multiple network devices. At this time, after the first network device restores the segment identifier of the second network device before compression based on the third identification information, the fourth identification information needs to be updated, so that subsequent nodes can confirm whether to continue to restore the destination address in the above manner. .
可选地,所述第四标识信息为第一数值,所述第五标识信息为第二数值,所述第二数值为所述第一数值减1。由于第四标识信息用于指示所述报文的转发路径上从所述第一网络设备起剩下的段标识包括所述第三标识信息的网络设备的数量,因此,更新第四标识信息的方式可以为直接在第四标识信息所指示的数值上减1即可。Optionally, the fourth identification information is a first value, the fifth identification information is a second value, and the second value is the first value minus one. Since the fourth identification information is used to indicate the number of network devices whose segment identifiers from the first network device on the forwarding path of the message include the third identification information, the number of the fourth identification information is updated The method may be to directly subtract 1 from the value indicated by the fourth identification information.
可选地,所述第一网络设备确定与所述第二网络设备对应的第一标识信息,包括:所述第一网络设备接收消息,所述消息包括对应于所述第二网络设备的第六标识信息和第七标识信息,所述第六标识信息包括所述第一标识信息,所述第七标识信息用于标识所述第一标识信息的长度;所述第一网络设备基于所述第六标识信息和所述第七标识信息,确定所述第一标识信息。Optionally, the first network device determining the first identification information corresponding to the second network device includes: the first network device receives a message, and the message includes the first identification information corresponding to the second network device. Six identification information and seventh identification information, where the sixth identification information includes the first identification information, and the seventh identification information is used to identify the length of the first identification information; the first network device is based on the The sixth identification information and the seventh identification information determine the first identification information.
在本申请中,各个网络设备的第一标识信息可以预先发布在网络中,以便于后续中间节点能够基于第一标识信息对压缩后的段标识进行还原。In this application, the first identification information of each network device may be pre-published in the network, so that subsequent intermediate nodes can restore the compressed segment identification based on the first identification information.
第三方面,提供了一种第一网络设备,所述第一网络设备包括:确定模块,用于确定与第二网络设备对应的第一段标识,所述第一段标识包括第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域;生成模块,用于基于所述第一段标识生成第二段标识,所述第二段标识不包括所述第一标识信息;发送模块,用于向所述第二网络设备发送报文,所述报文包括所述第二段标识。In a third aspect, a first network device is provided, the first network device includes: a determining module configured to determine a first segment identifier corresponding to a second network device, the first segment identifier including first identifier information The first identification information is used to identify the autonomous domain to which the second network device belongs; the generating module is configured to generate a second segment identifier based on the first segment identifier, and the second segment identifier does not include the first segment identifier. An identification information; a sending module, configured to send a message to the second network device, the message including the second segment 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 identification information and third identification information, and the second identification information is used for To identify the autonomous domain to which the third network device belongs, and the third identification information is used to identify the third network device in the autonomous domain; and the generating module is further configured to generate the third network device based on the third segment identifier. The fourth segment identifier, the fourth segment identifier does not include the second identification information and the third identification information; the sending module is further configured to send the message to the third network device, the The message 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 Identifies the same paragraph.
可选地,所述确定模块,还用于确定与多个网络设备对应的多个段标识,所述多个段标识分别包括相同的第四标识信息;所述生成模块,还用于基于所述多个段标识生成第五段标识,所述第五段标识包括所述第四标识信息和第五标识信息,所述第五标识信息用于标识所述多个网络设备的个数;所述发送模块,还用于发送所述报文,所述报文包括所述第五段标识。Optionally, the determining module is further configured to determine multiple segment identifiers corresponding to multiple network devices, and the multiple segment identifiers respectively include the same fourth identification information; the generating module is further configured to determine The multiple segment identifiers generate a fifth segment identifier, the fifth segment identifier includes the fourth identification information and fifth identification information, and the fifth identification information is used to identify the number of the multiple network devices; The sending module is further configured to send the message, and the message 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 used to uniquely identify the plurality of network devices. The multiple network devices in the autonomous domain to which the network device belongs.
可选地,所述多个网络设备包括所述第二网络设备,所述第二段标识和所述第五段标识为同一段标识。Optionally, the multiple network devices include the second network device, and the second segment identifier and the fifth segment identifier are the same segment identifier.
可选地,所述报文还包括第七标识信息,所述第七标识信息用于标识所述第一网络设备生成所述第二段标识的策略。Optionally, the message further includes seventh identification information, where the seventh identification information is used to identify a strategy for generating the second segment identifier by the first network device.
可选地,所述确定模块确定与多个网络设备对应的多个段标识,包括:所述确定模块基于所述多个网络设备分别发送的内部网关协议IGP消息,确定与多个网络设备对应的多个段标识;或者,所述确定模块基于控制设备发送的控制消息,确定与多个网络设备对应的多个段标识。Optionally, the determining module determining multiple segment identifiers corresponding to multiple network devices includes: the determining module determines corresponding to multiple network devices based on internal gateway protocol IGP messages sent by the multiple network devices respectively Or, the determining module determines multiple segment identifiers corresponding to multiple network devices based on the control message sent by the control device.
第四方面,提供了另一种第一网络设备,该第一网络设备包括:接收模块,用于接收报 文,所述报文包括与第二网络设备对应的第一段标识;确定模块,用于确定与所述第二网络设备对应的第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域;生成模块,用于基于所述第一标识信息和所述第一段标识,生成与所述第二网络设备对应的第二段标识;发送模块,用于基于所述第二段标识向所述第二网络设备发送所述报文。In a fourth aspect, another first network device is provided, and the first network device includes: a receiving module for receiving a message, the message including a first segment identifier corresponding to the second network device; a determining module, Is used to determine first identification information corresponding to the second network device, where the first identification information is used to identify the autonomous domain to which the second network device belongs; a generating module is used to based on the first identification information and The first segment identifier generates a second segment identifier corresponding to the second network device; a sending module is configured to send the message to the second network device 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, and the second identification information is used to identify The second network device; the generating module is configured to generate the second segment corresponding to the second network device based on the first identification information, the second identification information, and the first segment identifier Logo.
可选地,所述报文的转发路径上包括多个连续的网络设备,所述多个连续的网络设备对应于多个段标识,所述第一网络设备位于所述转发路径上所述多个连续的网络设备中的第一个,所述多个段标识包括相同的第三标识信息,所述第一段标识包括所述第三标识信息和第四标识信息,所述第四标识信息用于指示所述多个连续的网络设备的数量,所述发送模块包括:第一确定子单元,用于基于所述第四标识信息确定第五标识信息;第二确定子单元,用于确定更新后的第一段标识,所述更新后的第一段标识包括所述第三标识信息和所述第五标识信息;发送子单元,用于基于所述第二段标识向所述第二网络设备发送所述报文,所述报文中包括所述更新后的第一段标识。Optionally, the packet forwarding path includes multiple consecutive network devices, the multiple consecutive network devices correspond to multiple segment identifiers, and the first network device is located on the forwarding path. The first of three consecutive network devices, the plurality of segment identifiers include the same third identifier information, the first segment identifier includes the third identifier information and the fourth identifier information, and the fourth identifier information For indicating the number of the multiple consecutive network devices, the sending module includes: a first determining subunit, configured to determine fifth identification information based on the fourth identification information; and a second determining subunit, configured to determine The updated first segment identifier, the updated first segment identifier includes the third identifier information and the fifth identifier information; a sending subunit is configured to send the second segment identifier to the second segment identifier based on the second segment identifier. The network device sends the message, and the message includes the updated first segment identifier.
可选地,所述第四标识信息为第一数值,所述第五标识信息为第二数值,所述第二数值为所述第一数值减1。Optionally, the fourth identification information is a first value, the fifth identification information is a second value, and the second value is the first value minus one.
可选地,所述确定模块包括:接收子单元,用于接收消息,所述消息包括对应于所述第二网络设备的第六标识信息和第七标识信息,所述第六标识信息包括所述第一标识信息,所述第七标识信息用于标识所述第一标识信息的长度;第三确定子单元,用于基于所述第六标识信息和所述第七标识信息,确定所述第一标识信息。Optionally, the determining module includes: a receiving subunit for receiving a message, the message including sixth identification information and seventh identification information corresponding to the second network device, and the sixth identification information includes all The first identification information, the seventh identification information is used to identify the length of the first identification information; the third determining subunit is used to determine the length of the first identification information based on the sixth identification information and the seventh identification information The first identification information.
第五方面,提供了一种网络设备,该网络设备的结构中包括处理器和存储器,所述存储器用于存储计算机程序;所述处理器用于执行所述存储器中存储的计算机程序以执行上述第一方面任意可能的实现中所述的方法,或者,执行上述第二方面任意可能的实现中所述的方法。In a fifth aspect, a network device is provided. The structure of the network device includes a processor and a memory, the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory to execute the above-mentioned first On the one hand, the method described in any possible implementation of the second aspect, or execute the method described in any possible implementation of the second aspect above.
第六方面,提供了一种芯片,所述芯片设置在通信网络中的网络设备中,所述芯片包括处理器和接口电路;所述接口电路用于接收指令并传输至所述处理器;所述处理器用于执行上述第一方面任意可能的实现中所述的方法,或者,执行上述第二方面任意可能的实现中所述的方法。In a sixth aspect, a chip is provided, the chip is set in a network device in a communication network, the chip includes a processor and an interface circuit; the interface circuit is used to receive instructions and transmit them to the processor; The processor is configured to execute the method described in any possible implementation of the foregoing first aspect, or execute the method described in any possible implementation of the foregoing second aspect.
第七方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面或第二方面任意可能的实现中所述的方法。In a seventh aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute any possible implementation of the first aspect or the second aspect. The method described.
第八方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第二方面任意可能的实现中所述的方法。In an eighth aspect, a computer program product containing instructions is provided, which when run on a computer, causes the computer to execute the method described in any possible implementation of the first aspect or the second aspect.
第九方面,提供了一种网络系统,所述系统包括第一网络设备、第二网络设备和第三网络设备,所述第一网络设备,用于确定与第二网络设备对应的第一段标识,所述第一段标识包括第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域,所述第一网络设备基于所述第一段标识生成第二段标识,所述第二段标识不包括所述第一标识信息,所述第一网络设备向第三网络设备发送报文,所述报文包括所述第二段标识;所述第三网络设备,用于接收报文,所述报文包括与所述第二网络设备对应的所述第二段标识,所述第三网络设备确定与所述第二网络设备对应的所述第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域,所述第三网络设备基于所述第一标识信息和所述第一段标识,生成与所述第二网络设备对应的所述第一段标识,所述第三网络设备基于所述第一段标识向所述第二网络设备发送所述报文。In a ninth aspect, a network system is provided. The system includes a first network device, a second network device, and a third network device. The first network device is used to determine a first segment corresponding to the second network device. The first segment identifier includes first identifier information, the first identifier information is used to identify the autonomous domain to which the second network device belongs, and the first network device generates a second segment based on the first segment identifier. Segment identifier, the second segment identifier does not include the first identification information, the first network device sends a message to a third network device, the message includes the second segment identifier; the third network A device for receiving a message, the message including the second segment identifier corresponding to the second network device, and the third network device determines the first identifier corresponding to the second network device Information, the first identification information is used to identify the autonomous domain to which the second network device belongs, and the third network device generates a connection with the second network device based on the first identification information and the first segment identification For the first segment identifier corresponding to the device, the third network device sends the message to the second network device based on the first segment identifier.
附图说明Description of the drawings
图1是本申请实施例提供的一种SRH的格式示意图;FIG. 1 is a schematic diagram of the format of an SRH provided by an embodiment of the present application;
图2是本申请实施例提供的一种SID的格式示意图;FIG. 2 is a schematic diagram of a format of an SID provided by an embodiment of the present application;
图3是本申请实施例提供的一种SRv6网络的架构示意图;FIG. 3 is a schematic diagram of an SRv6 network architecture provided by an embodiment of the present application;
图4是本申请实施例提供的一种段标识的确定方法流程图;FIG. 4 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application;
图5是本申请实施例提供的另一种SID的格式示意图;FIG. 5 is a schematic diagram of another SID format provided by an embodiment of the present application;
图6是本申请实施例提供的另一种确定段标识的方法流程图;FIG. 6 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application;
图7是本申请实施例提供的一种转发报文的流程示意图;FIG. 7 is a schematic diagram of a message forwarding process provided by an embodiment of the present application;
图8是本申请实施例提供的另一种确定段标识的方法流程图;FIG. 8 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application;
图9是本申请实施例提供的另一种转发报文的流程示意图;FIG. 9 is a schematic diagram of another message forwarding process provided by an embodiment of the present application;
图10是本申请实施例提供的另一种确定段标识的方法流程图;FIG. 10 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application;
图11是本申请实施例提供的另一种转发报文的流程示意图;FIG. 11 is a schematic diagram of another message forwarding process provided by an embodiment of the present application;
图12是本申请实施例提供的另一种SRH的格式示意图;FIG. 12 is a schematic diagram of another SRH format provided by an embodiment of the present application;
图13是本申请实施例提供的另一种段标识的确定方法流程图;FIG. 13 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application;
图14是本申请实施例提供的一种IGP报文的格式示意图;FIG. 14 is a schematic diagram of the format of an IGP message provided by an embodiment of the present application;
图15是本申请实施例提供的另一种段标识的确定方法流程图;FIG. 15 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application;
图16是本申请实施例提供的另一种段标识的确定方法流程图;FIG. 16 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application;
图17是本申请实施例提供的另一种段标识的确定方法流程图;FIG. 17 is a flowchart of another method for determining a segment identifier provided by an embodiment of the present application;
图18是本申请实施例提供的一种网络设备的结构示意图;FIG. 18 is a schematic structural diagram of a network device provided by an embodiment of the present application;
图19是本申请实施例提供的另一种网络设备的结构示意图;FIG. 19 is a schematic structural diagram of another network device provided by an embodiment of the present application;
图20是本申请实施例提供的一种图19所示网络设备中的接口板的结构示意图;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;
图21是本申请实施例提供的一种第一网络设备的结构示意图;FIG. 21 is a schematic structural diagram of a first network device provided by an embodiment of the present application;
图22是本申请实施例提供的另一种第一网络设备的结构示意图;FIG. 22 is a schematic structural diagram of another first network device provided by an embodiment of the present application;
图23是本申请实施例提供的一种网络设备的结构示意图。FIG. 23 is a schematic structural diagram of a network device provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进 一步地详细描述。In order to make the purpose, technical solutions, and advantages of the present application clearer, the implementation manners of the present application will be further described in detail below in conjunction with the accompanying drawings.
应当理解的是,本文提及的“多个”是指两个或两个以上。在本申请的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。It should be understood that the "plurality" mentioned herein refers to two or more. In the description of this application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in this document is only an association relationship describing associated objects, It means that there can be three kinds of relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone. In addition, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with substantially the same function and effect. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and order of execution, and words such as "first" and "second" do not limit the difference.
在对本申请实施例进行解释说明之前,先对本申请实施例的应用场景进行解释说明。Before explaining the embodiments of the present application, the application scenarios of the embodiments of the present application are first explained.
SRv6是基于源路由理念而设计的在网络中转发IPv6数据包的一种网络架构。通过SRv6网络中的头节点在IPv6报文头中插入SRH,在SRH中压入一个IPv6地址列表。通过SRv6网络中的各个转发节点根据IPv6地址列表不断地更新目标地址来完成IPv6数据包的逐条转发。图1是本申请实施例提供的一种SRH的格式示意图。如图1所示,SRH包括用于指示下一个报文头类型的字段next header、用于指示SRH头的长度的字段Hdr Ext Len,用于指示路由类型的字段routing type、用于指示达到当前节点后还应当访问的节点的数量的字段segment left等。SRH中还包括SID列表字段。该SID列表字段包括多个SID,每个SID可以对应于一个IPv6地址,用于标识转发路径上具有该SID的节点或链路。另外,如图1所示,SRH中还包括可选的类型-长度-值(type-length-value,TLV)字段,通过这些可选的TLV,SRH可以实现更多的功能,比如可以实现故障诊断检测等。SRv6 is a network architecture designed based on the concept of source routing to forward IPv6 packets in the network. The head node in the SRv6 network inserts SRH into the IPv6 message header, and presses an IPv6 address list into the SRH. Each forwarding node in the SRv6 network continuously updates the target address according to the IPv6 address list to complete the forwarding of IPv6 data packets one by one. Fig. 1 is a schematic diagram of the format of an SRH provided by an embodiment of the present application. As shown in Figure 1, SRH includes the next header field used to indicate the next header type, the field Hdr Ext Len used to indicate the length of the SRH header, the field routing type used to indicate the routing type, and the field routing type used to indicate the current After the node, the field of the number of nodes that should be visited is segment left, etc. The SRH also includes the SID list field. The SID list field includes multiple SIDs, and each SID may correspond to an IPv6 address, which is used to identify the node or link with the SID on the forwarding path. In addition, as shown in Figure 1, SRH also includes an optional type-length-value (type-length-value, TLV) field. Through these optional TLVs, SRH can achieve more functions, such as failure Diagnostic testing, etc.
在SRv6网络中传输的报文的目的地址,简称IPv6 DA。在传统的基于IPv6协议的报文里,IPv6 DA是固定不变的。而在SRv6网络中,IPv6 DA仅对应当前报文的下一个节点,是可以不断变换的。The destination address of the message transmitted in the SRv6 network, referred to as IPv6 DA. In traditional IPv6 protocol-based messages, IPv6 DA is fixed. In the SRv6 network, IPv6 DA only corresponds to the next node of the current message, which can be changed continuously.
SRH中的SID列表,类似于SR多协议标签交换(Multi-Protocol Label Switching,MPLS)中的标签栈信息,可以在一条转发路径上的头节点生成,所述转发路径上的中间节点可以基于SID列表完成转发。为了后续便于说明,将SID列表表示为:<Segment List[0],Segment List[1],Segment List[2],...,Segment List[n]>。其中SID列表中的每一个Segment List[m],0≤m≤n可以对应转发路径上支持SRv6的各相应节点。以报文的转发路径为严格显示路径为例,严格显示路径是指报文的转发路径上的每个节点对应的SID均包含在SRH头的SID列表中。需要说明的是,所述与节点对应的段标识用于标识第二网络设备和第一段标识之间的对应关系。所述段标识例如是原始分配的段标识,所述对应关系例如为段标识用于标识所述节点本身,或者段标识用于标识从另一节点到所述节点的链路,所述另一节点例如为所述节点的上一跳节点。在其他情形下,段标识也可以是与所述节点相关的其他类型的段标识等。此时,Segment List[0]对应转发路径上的尾节点,Segment List[1]对应转发路径上的倒数第二个节点,Segment List[n]对应转发路径上的第二个节点,所述第二个节点为头节点之后紧邻的节点,依次类推,逆序压栈。在一些可能的实现方式中,报文的转发路径也可以是松散显示路径,松散显示路径是指报文的转发路径上的部分节点对应的SID包含在SRH头的SID列表中。此种情形下,Segment List[n]例如可以对应于转发路径上支持SRv6协议的第二个或第三个节点。以上列举的情形仅作为示例,需要说明的是,在其他情形中,SID列表中的Segment  List序列可以是按照一定规律对应于转发路径上的多个相应节点,所述多个相应节点例如可以为严格显示路径上的连续的节点,也可以为松散显示路径上不连续、但支持SRv6协议的多个相应节点。The SID list in SRH, similar to the label stack information in SR Multi-Protocol Label Switching (MPLS), can be generated at the head node on a forwarding path, and the intermediate nodes on the forwarding path can be based on the SID The list is forwarded. For the convenience of subsequent description, the SID list is expressed as: <Segment List[0], Segment List[1], Segment List[2],...,Segment List[n]>. Among them, each Segment List[m] in the SID list, 0≤m≤n can correspond to each corresponding node on the forwarding path that supports SRv6. Taking the message forwarding path as the strict display path as an example, the strict display path means that the SID corresponding to each node on the message forwarding path is included in the SID list in the SRH header. It should be noted that the segment identifier corresponding to the node is used to identify the corresponding relationship between the second network device and the first segment identifier. The segment identifier is, for example, the originally allocated segment identifier, and the correspondence relationship is, for example, the segment identifier is used to identify the node itself, or the segment identifier is used to identify the link from another node to the node, and the other The node is, for example, the previous hop node of the node. In other situations, the segment identifier may also be other types of segment identifiers related to the node. At this time, Segment List[0] corresponds to the tail node on the forwarding path, Segment List[1] corresponds to the penultimate node on the forwarding path, and Segment List[n] corresponds to the second node on the forwarding path. The two nodes are the nodes immediately after the head node, and so on, pushing the stack in reverse order. In some possible implementations, the forwarding path of the message may also be a loose display path. The loose display path means that the SIDs corresponding to some nodes on the forwarding path of the message are included in the SID list in the SRH header. In this case, Segment List[n] may correspond to, for example, the second or third node on the forwarding path that supports the SRv6 protocol. The situations listed above are only examples. It should be noted that in other situations, the Segment List sequence in the SID list may correspond to multiple corresponding nodes on the forwarding path according to a certain rule, and the multiple corresponding nodes may be, for example, Strictly display continuous nodes on the path, or loosely display multiple corresponding nodes that are not continuous on the path but support the SRv6 protocol.
在SRv6网络中,以SID列表中的Segments List值均对应于转发路径上的节点为例,每经过一个支持SRv6的节点,SL字段值即减1,IPv6 DA的信息也随之变换一次。SL字段和SID列表字段共同决定IPv6 DA的信息。具体变换过程示例如下:In the SRv6 network, the Segment List value in the SID list corresponds to the node on the forwarding path as an example. Every time a node that supports SRv6 passes, the value of the SL field is reduced by 1, and the IPv6 DA information is also changed accordingly. The SL field and the SID list field jointly determine the IPv6 DA information. An example of the specific transformation process is as follows:
如果SL值是n,则IPv6 DA取值就是SID列表中的Segments List[n]的值。If the SL value is n, the IPv6 DA value is the value of Segments List[n] in the SID list.
......
如果SL值是1,则IPv6 DA取值就是SID列表中的Segments List[1]的值。If the SL value is 1, the IPv6 DA value is the value of Segments List[1] in the SID list.
如果SL值是0,则IPv6 DA取值就是SID列表中的Segments List[0]的值。If the SL value is 0, the IPv6 DA value is the value of Segments List[0] in the SID list.
上述SID是一种实例化的IPv6地址,此类IPv6地址被赋予唯一的功能,一个SRv6网络中的SID可以表示一个节点或链路,也可以表示一个L2/L3的虚拟专用网络(virtual private network,VPN),又或者一个服务。The above SID is an instantiated IPv6 address. This type of IPv6 address is given a unique function. The SID in an SRv6 network can represent a node or link, or it can represent an L2/L3 virtual private network (virtual private network). , VPN), or a service.
如图2所示,每个SID可以包括两部分,一部分为定位(locator)字段,另一部分为功能(function)字段。定位字段占据128个比特位中的高比特位。功能字段占据128个比特位中的低比特位。定位字段可以承担路由功能,所以需在SR域内唯一。功能字段可以标识设备的任何功能,比如某个转发行为,或者某种业务等。基于function字段的不同,SID具体包括END、END.X、以及END.DT等类型。END类型的SID可以用于标识一个节点。END.X类型的SID可以用于标识一条链路。END.DT类型的SID可以用于标识一个VPN或服务。END.DT具体又包括END.DT4等类型,其中END.DT用于表示运营商边缘(provider edge,PE)设备的SID,用于标识网络中的某个第四代互联网协议(internet protocol version 4,IPv4)的VPN实例。As shown in FIG. 2, each SID may include two parts, one part is a locator field, and the other part is a function field. The positioning field occupies high bits among 128 bits. The function field occupies the low bit of 128 bits. The location field can take on the routing function, so it needs to be unique in the SR domain. The function field can identify any function of the device, such as a certain forwarding behavior, or a certain service. Based on the difference in the function field, SID specifically includes END, END.X, and END.DT types. The END type SID can be used to identify a node. SID of type END.X can be used to identify a link. The END.DT type SID can be used to identify a VPN or service. END.DT specifically includes END.DT4 and other types, where END.DT is used to indicate the SID of the operator edge (provider edge, PE) device, and is used to identify a fourth-generation Internet protocol (internet protocol version 4) in the network. , IPv4) VPN instance.
本申请实施例提供的段标识的确定方法就应用于上述通过SRH实现报文在SRv6网络中的逐跳转发的场景中。图3是本申请实施例提供的一种SRv6网络的架构示意图。如图3所示,该SRv6网络包括节点R1、节点R2、节点R3、节点R4、节点R5。其中,节点R1为SRv6网络的头节点,节点R2、节点R3、节点R4为SRv6网络的中间节点,节点R5为SRv6网络的尾节点。The method for determining the segment identifier provided in the embodiment of the present application is applied to the above scenario in which the SRH realizes the hop-by-hop transmission of the message in the SRv6 network. FIG. 3 is a schematic diagram of an SRv6 network architecture provided by an embodiment of the present application. As shown in Figure 3, the SRv6 network includes node R1, node R2, node R3, node R4, and node R5. Among them, node R1 is the head node of the SRv6 network, node R2, node R3, and node R4 are intermediate nodes of the SRv6 network, and node R5 is the tail node of the SRv6 network.
节点R1用于向报文中压入SRH,并将压入SRH的报文转发至节点R2,由节点R2根据SRH逐跳将报文转发至节点R5。节点R1、节点R2、节点R3、节点R4、节点R5可以为任意具有SRv6功能的路由设备。此外,图3所示的SRv6网络仅仅以五个节点为例进行说明,并不构成对本申请实施例提供的SRv6网络中的节点的数量的唯一限制。The node R1 is used to press the SRH into the message, and forward the message pressed into the SRH to the node R2, and the node R2 forwards the message to the node R5 hop by hop according to the SRH. Node R1, node R2, node R3, node R4, and node R5 can be any routing device with SRv6 function. In addition, the SRv6 network shown in FIG. 3 only uses five nodes as an example for description, and does not constitute the only limitation on the number of nodes in the SRv6 network provided in the embodiment of the present application.
下面对本申请实施例提供的段标识的确定方法进行详细解释说明。The method for determining the segment identifier provided in the embodiment of the present application will be explained in detail below.
在本申请实施例中,为了提高头节点封装报文的效率以及报文转发效率,头节点在确定SRH时对原始SID列表中的各个SID进行压缩,以使SRH中携带的是压缩后的SID。后续中间节点在接收到报文后,对SRH中的压缩后的SID进行还原,以确定报文的目的地址。因此,本申请实施例提供的段标识的确定方法主要包括两个过程,一是头节点在报文中压入SRH的过程,另一个是中间节点根据SRH确定目的地址并转发报文的过程。下面分别对这两个过程进行解释说明。In the embodiment of the present application, in order to improve the efficiency of packet encapsulation and packet forwarding efficiency of the head node, the head node compresses each SID in the original SID list when determining the SRH, so that the SID carries the compressed SID. . 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 message, and the other is a process in which the intermediate node determines the destination address according to the SRH and forwards the message. The 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. 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. The specific concepts will be explained one by one in the following embodiments.
图4是本申请实施例提供的一种段标识的确定方法流程图,应用于SRv6网络中的头节点,也即是下述实施例中的第一网络设备为头节点。如图4所示,该方法包括:FIG. 4 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is applied to a head node in an SRv6 network, that is, the first network device in the following embodiment is the head node. As shown in Figure 4, the method includes:
S401:第一网络设备确定与第二网络设备对应的第一段标识,第一段标识包括第一标识信息,第一标识信息用于标识第二网络设备所属的自治域。S401: The first network device determines a first segment identifier corresponding to the second network device, where the first segment identifier includes first identification information, and the first identification information is used to identify the autonomous domain to which the second network device belongs.
所述第一网络设备可以为SRv6网络中某一转发路径上的头节点,所述第二网络设备可以为所述转发路径上所述头节点的下一跳节点,也可以为所述转发路径上的其他节点,如中间节点或尾节点。所述第二网络设备对应的第一段标识为SRv6网络中为第二网络配置的原始SID,该原始SID可以为包括128个比特位的IPv6地址。The first network device may be the head node on a certain forwarding path in the SRv6 network, and the second network device may be the next hop node of the head node on the forwarding path, or the forwarding path Other nodes on the upper end, such as intermediate nodes or tail nodes. The first segment identifier corresponding to the second network device is the original SID configured for the second network in the SRv6 network, and the original SID may be an IPv6 address including 128 bits.
第一网络设备确定与第一网络设备对应的第一段标识的实现方式可以为:第一网络设备基于第二网络设备发布的内部网关协议(Interior Gateway Protocol,IGP)消息,确定与第二网络设备对应的第一段标识。或者,第一网络设备基于控制设备发送的控制消息,确定与第二网络设备对应的第一段标识。也即是,SRv6网络中各个网络设备的原始SID可以是由网络设备自身发布在网络中,也可以是由控制设备统一发布。The first network device to determine the first segment of the identifier corresponding to the first network device may be implemented as follows: the first network device determines the connection with the second network device based on the Interior Gateway Protocol (IGP) message issued by the second network device The first segment identifier corresponding to the device. Alternatively, the first network device determines the first segment identifier corresponding to the second network device based on the 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 it may be issued uniformly by the control device.
在本申请实施例中,为了实现对原始SID的压缩,对原始SID中的定位字段重新进行了划分,也即是,对原始SID的空间重新进行规划。如图5所示,将图2中的定位字段划分为第一定位字段和第二定位字段。为便于后续表述,本申请将所述第一定位字段称为flocator字段,将第二定位字段称为vlocator字段。对于第二网络设备的原始SID,flocator字段用于标识第二网络设备所属的自治域(Autonomous Systems,AS),vlocator字段用于标识第二网络设备。此时,原始SID包括三部分,flocator字段、vlocator字段和function字段。为便于表述,本申请将所述功能字段称为function字段。在一种可能的实现方式中,function字段可以固定为16个比特,vlocator字段包括的比特数可以小于或等于16个比特。需要说明的是,上述各字段的长度仅作为示例,并不构成对本申请实施例中flocator字段、vlocator字段和function字段长度的唯一限定。In the embodiment of the present application, in order to achieve compression of the original SID, the location field in the original SID is re-divided, 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. To facilitate subsequent descriptions, this application refers to the first positioning field as a flocator field, and the second positioning field as a vlocator field. For the original SID of the second network device, the flocator field is used to identify the autonomous domain (Autonomous Systems, 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, the flocator field, the vlocator field, and the function field. For ease of presentation, this application refers to the function field as a function field. In a possible implementation manner, the function field may be fixed to 16 bits, and the number of bits included in the vlocator field may be less than or equal to 16 bits. It should be noted that the length of the above-mentioned fields is only an example, and does not constitute the only limitation on the length of the flocator field, the vlocator field, and the function field in the embodiment of the present application.
S402:第一网络设备基于所述第一段标识生成第二段标识,所述第二段标识不包括第一标识信息。S402: 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 identification information.
S402中的所述第一网络设备可以是图3中的头节点R1,所述第一标识信息可以是原始SID中的flocator字段。由于SRv6网络中各个节点的flocator字段通常是相同的,即标识各个节点所在的同一AS。因此,第一网络设备可以通过S402对第二网络设备的原始SID进行压缩,得到第二段标识,以使第二段标识不包括flocator字段。当所述第一网络设备的下一跳网络设备接收到包括压缩后的所述第二段标识的SRH时,所述下一跳网络设备可以根据本地已知的所述AS信息,对所述第二段标识进行还原,以获得对应于所述第二段标识的完整的所述第一段标识。所述下一跳网络设备已知的所述AS信息例如可以是本地预先配置并存储的,也可以是从网络控制设备获取并存储的。The first network device in S402 may be the head node R1 in FIG. 3, and the first identification information may be the flocator field in the original SID. Because the flocator field of each node in the SRv6 network is usually the same, that is, it identifies the same AS where each node is located. 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 flocator field. When the next-hop network device of the first network device receives the SRH that includes the compressed second segment identifier, the next-hop network device may perform a check on the AS information according to the locally known AS information. The second segment identifier is restored to obtain the complete first segment identifier corresponding to the second segment identifier. The AS information known by the next-hop network device may be pre-configured and stored locally, or may be obtained and stored from the network control device, for example.
需要说明的是,第二段标识不包括第一标识信息的压缩方式可以有多种,例如,对于报 文的转发路径为严格显示路径的场景,在某些情形下,由于在严格显示路径中SID列表中所对应的相邻的两个节点是位于同一IGP域的,因此这相邻的两个节点可以预先获知到对方的原始SID的相关信息(比如,原始SID中的vlocator字段),因此,对于报文的转发路径为严格显示路径的场景,至少可以有以下三种压缩方式。第一种是压缩后的第二段标识不仅不包括flocator字段(也即S401中的第一标识信息),也不包括vlocator字段,而只包括function字段,如果function字段的长度为16bit,则该种压缩方式可以称为16比特压缩。第二种是压缩后的第二段标识不仅不包括flocator字段(也是S401中的第一标识信息),也不包括vlocator字段,而只包括function字段和其他必要的指示信息,如果function字段的长度为16bit,而指示信息占据4比特,则此种压缩方式可以称为20比特压缩。20比特压缩方式适用于转发路径上各个节点对应的SID的function字段具有某些特性的场景中,比如,当转发路径上部分或全部连续的节点所对应的SID的function字段相同时,便可通过这种20比特压缩方式进行压缩,其中指示信息用于标识在当前节点之后还剩余的具有相同function字段的SID的个数。第三种是压缩后的第二段标识不包括flocator字段(也即S401中的第一标识信息),但是包括vlocator字段和function字段,如果vlocator字段和function字段均为16比特,则该种压缩方式可以称为32比特压缩。后续将针对上述三种压缩方式的具体实现方式分别展开说明,在此就先不赘述。It should be noted that there can be multiple compression methods for the second segment of the identification that does not include the first identification information. For example, for the scenario where the forwarding path of the message is a strict display path, in some cases, because in the strict display path The two adjacent nodes corresponding to the SID list are located in the same IGP domain, so the two adjacent nodes can know in advance the relevant information of each other's original SID (for example, the vlocator field in the original SID), so For scenarios where the forwarding path of the message is strictly displayed, there are at least the following three compression methods. The first is that the compressed second segment identifier not only does not include the flocator field (that is, the first identification information in S401), nor does it include the vlocator field, but only includes the function field. If the length of the function field is 16 bits, this This compression method can be called 16-bit compression. The second is that the compressed second segment identifier not only does not include the flocator field (also the first identification information in S401), nor does it include the vlocator field, but only includes the function field and other necessary indication information. If the length of the function field is It is 16 bits, and the indication information occupies 4 bits, so this compression method can be called 20-bit compression. The 20-bit compression method is suitable for scenarios where the function field of the SID corresponding to each node on the forwarding path has certain characteristics. For example, when the function field of the SID corresponding to some or all consecutive nodes on the forwarding path is the same, it can be passed This 20-bit compression method performs compression, where the indication information is used to identify the number of SIDs with the same function field remaining after the current node. The third type is that the compressed second segment identifier does not include the flocator field (that is, the first identification information in S401), but includes the vlocator field and the function field. If the vlocator field and the function field are both 16 bits, this kind of compression The method can be called 32-bit compression. The specific implementations of the above three compression methods will be separately explained in the following, and will not be repeated here.
此外,对于报文的转发路径为松散显示路径的场景,由于此时SID列表中对应的相邻的两个节点可能不是同一IGP域内的节点,因此这相邻两个节点可能无法获知到对方的vlocator字段。所以,对于报文的转发路径为松散显示路径的场景,至少可以有以下两种压缩方式,一种是上述的32比特压缩方式,仅压缩flocator字段,但是保留vlocator字段和function字段。另一种是压缩后的第二段标识不仅不包括flocator字段(也即S401中的第一标识信息),也不包括function字段,而只包括vlocator字段,为了和上述16比特压缩方式进行区分,此种压缩方式可以称为松散路径下的16比特压缩。其中,松散路径下的16比特压缩方式适用于转发路径上各个节点对应的SID的function字段相同的场景中,比如,在松散显示路径的场景中,如果SID列表中各个SID均为END类型的SID,则可以通过这种散路径下的16比特压缩方式进行压缩。这种松散路径下的16比特压缩方式的实现方式可以参考上述严格显示路径下的三种压缩方式的实现方式,本申请实施例对此不做详细阐述。In addition, for the scenario where the forwarding path of the message is a loosely displayed path, since the two adjacent nodes in the SID list may not be nodes in the same IGP domain at this time, the two adjacent nodes may not be able to know each other’s vlocator field. Therefore, for the scenario where the forwarding path of the message is a loosely displayed path, at least the following two compression methods are possible. One is the above-mentioned 32-bit compression method, which compresses only the flocator field, but retains the vlocator field and the function field. The other is that the compressed second segment identifier not only does not include the flocator field (that is, the first identification information in S401), nor the function field, but only includes the vlocator field. In order to distinguish it from the above 16-bit compression method, This compression method can be called 16-bit compression under loose path. Among them, the 16-bit compression method under the loose path is suitable for scenarios where the function field of the SID corresponding to each node on the forwarding path is the same. For example, in the scenario where the path is loosely displayed, if each SID in the SID list is an END type SID , It can be compressed by 16-bit compression under this scattered path. The implementation of the 16-bit compression method under the loose path can refer to the implementation of the three compression methods under the strict display path described above, which is not described in detail in the embodiment of the present application.
需要说明的是,上述严格显示路径和松散显示路径分别可以适用的压缩方案作为例举的情形,可以理解的是,在某些可能的实现方式中,不同压缩方案的适用场景也可能发生变化。例如,如果允许转发路径上的节点向控制器请求与其他节点对应的vlocator字段,或者转发路径上支持SR的节点基于某种和控制器之间约定的机制,可以预先获取并存储支持SR的下一跳节点对应的vlocator字段时,也可以在松散路径上适用严格显示路径下的16bit压缩方式(即不包括flocator和vlocator的压缩方案)等。It should be noted that the above-mentioned compression schemes applicable to the strict display path and the loose display path respectively are taken as examples. It is understandable that in some possible implementations, the application scenarios of different compression schemes may also change. For example, if the node on the forwarding path is allowed to request the vlocator field corresponding to other nodes from the controller, or the node on the forwarding path that supports SR is based on a mechanism agreed with the controller, it can obtain and store the downloads that support SR in advance. When the vlocator field corresponding to a one-hop node is used, the 16bit compression mode under the strict display path (that is, the compression scheme of flocator and vlocator is not included) can also be applied on the loose path.
S403:所述第一网络设备向所述第二网络设备发送报文,该报文包括第二段标识。S403: The first network device sends a message to the second network device, and the message includes a second segment identifier.
所述第二网络设备例如是头节点R1的下一跳网络设备R2。R1在获得压缩后的第二段标识后,将其封装入SRH头中,例如作为Segment List[3],通过报文发送至R2。在一些可能的实现方式中,头节点R1还可以一并确定出针对转发路径上的其他网络设备的压缩后的标识,并封装入所述SRH头中。例如,对于图3示出的网络结构,R1可以分别将与R3、R4和R5对应的初始段标识,分别压缩后置入Segment List[2]、Segment List[1]和Segment List[0]封装 入所述SRH头中,然后向所述第二网络设备发送封装有SRH的报文。需要说明的是,S403中的所述第二网络设备可以是报文转发路径上头节点的下一跳设备,如图3示出的R2,也可以是所述转发路径上的其他网络设备,如图3示出的R3、R4或R5。以所述第二网络设备为R3为例,R1封装SRH头后发出的报文,将会先发送至R2并执行更新操作,如将压缩后的Segment List[3]恢复为原始值后命中并弹出,并根据所述原始值更新目的地址DA。然后,更新后的报文再由R2转发至R3,此时R3可以接收到包括了与其对应的所述第二段标识的所述更新后的报文。The second network device is, for example, the next-hop network device R2 of the head node R1. After obtaining the compressed second segment identifier, R1 encapsulates it into the SRH header, for example, as a Segment List[3], and sends it to R2 through a message. In some possible implementation manners, the head node R1 may also determine the compressed identifiers for other network devices on the forwarding path, and encapsulate them into the SRH header. For example, for the network structure shown in Figure 3, R1 can respectively compress the initial segment identifiers corresponding to R3, R4, and R5 and place them into Segment List[2], Segment List[1], and Segment List[0]. Into the SRH header, and then send a message encapsulated with the SRH to the second network device. It should be noted that the second network device in S403 may be the next-hop device of the head node on the packet forwarding path, such as R2 shown in FIG. 3, or other network devices on the forwarding path, such as Figure 3 shows R3, R4 or R5. Taking the second network device as R3 as an example, the message sent by R1 after encapsulating the SRH header will be sent to R2 first and perform an update operation, such as restoring the compressed Segment List[3] to the original value and then hitting it. Pop up, and update the destination address DA according to the original value. Then, the updated message is forwarded from R2 to R3. At this time, R3 can receive the updated message including the corresponding second segment identifier.
在本申请实施例中,第一网络设备可以根据第二网络设备对应的第一段标识确定第二网络设备对应的第二段标识,由于第一段标识包括用于标识第二网络设备所属的自治域的第一标识信息,而第二段标识不包括第一标识信息,因此,第二段标识相当于对第一段标识进行了压缩,如此,第一网络设备在向第二网络设备发送的报文中便可携带压缩后的段标识,以降低第一网络设备作为头节点封装报文的压力。此外,对段标识进行压缩也有利于提升报文转发效率。In the embodiment of the present application, the first network device may determine the second segment identifier corresponding to the second network device according to the first segment identifier corresponding to the second network device, because the first segment identifier includes the identifier used to identify the second network device to which the second network device belongs. The first identification information of the autonomous domain, and the second identification information does not include the first identification information. Therefore, the second identification is equivalent to compressing the first identification. In this way, the first network device is sending to the second network device. The compressed segment identifier can be carried in the message to reduce the pressure of the first network device as the head node to encapsulate the message. In addition, compressing the segment identifier is also beneficial to improve the efficiency of message forwarding.
基于上述实施例可知,本申请实施例提供有16比特压缩、20比特压缩以及32比特压缩这三种不同的压缩方式,以下将分别结合具体示例对上述三种压缩方式进行解释说明。为便于说明,以原始SID的长度为128比特,其中flocator占据96比特位,vlocator和function字段分别占据16比特位,并且当采用上述第二种压缩方式时,指示信息字段占据4比特位为例,分别对上述三种压缩方式进行示例解释。可以理解地,在上述前提下,采用三种压缩方式可以分别实现将原始SID压缩为16比特、20比特和32比特,简称16比特、20比特和32比特的压缩方案。需要说明的是,如果flocator、vlocator和/或function字段的长度发生变化,原始SID在压缩时仍可采用前述三种压缩方式,只是压缩后的SID长度有可能发生变化。Based on the foregoing embodiment, it can be seen that the embodiment of the present application provides three different compression methods: 16-bit compression, 20-bit compression, and 32-bit compression. The above three compression methods will be explained in conjunction with specific examples. For ease of description, take the original SID length of 128 bits, where the flocator occupies 96 bits, the vlocator and function fields occupies 16 bits respectively, and when the second compression method is used, the indication information field occupies 4 bits as an example , Respectively explain the above three compression methods as examples. Understandably, under the foregoing premise, three compression methods can be used to compress the original SID into 16-bit, 20-bit, and 32-bit compression schemes, referred to as 16-bit, 20-bit, and 32-bit compression schemes. It should be noted that if the length of the flocator, vlocator, and/or function field changes, the original SID can still be compressed using the aforementioned three compression methods, but the length of the compressed SID may change.
图6是本申请实施例提供的一种确定段标识的方法流程图,用于对32比特这种压缩方案进行解释说明。该方法包括如下过程:Fig. 6 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is used to explain the 32-bit compression scheme. The method includes the following processes:
S601:第一网络设备确定与第二网络设备对应的第一段标识,第一段标识包括第一标识信息,第一标识信息用于标识第二网络设备所属的自治域。S601: The first network device determines a first segment identifier corresponding to the second network device, where the first segment identifier includes first identification information, and the first identification information is used to identify the autonomous domain to which the second network device belongs.
S601的实现方式可以参考图4实施例中的S401的实现方式,在此不再重复说明。The implementation manner of S601 may refer to the implementation manner of S401 in the embodiment of FIG. 4, and the description will not be repeated here.
S602:所述第一网络设备基于所述第一段标识生成第二段标识,所述第二段标识相较第一段标识仅不包括第一标识信息,所述第一标识信息标识所述第二网络设备所属的AS。S602: The first network device generates a second segment identifier based on the first segment identifier. Compared with the first segment identifier, the second segment identifier only does not include first identification information, and the first identification information identifies the AS to which the second network device belongs.
在上述32比特的压缩方式中,保留原始SID中的function字段和vlocator字段,删除原始SID中的flocator字段。需要说明的是,32比特的压缩方式可以适用于所有类型的原始SID。In the above 32-bit compression method, the function field and the vlocator field in the original SID are retained, and the flocator 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:所述第一网络设备向所述第二网络设备发送报文,该报文包括所述第二段标识。S603: The first network device sends a message to the second network device, where the message includes the second segment identifier.
S603的实现方式可以参考图4实施例中S403的实现方式,在此不再详细重复说明。For the implementation of S603, reference may be made to the implementation of S403 in the embodiment of FIG. 4, which will not be repeated here in detail.
图7是本申请实施例提供的一种基于图6的32比特压缩方式的转发报文的示意图。如图7所示,节点R1可以配置两个类型的原始SID,例如分别为END A:1:0和END.X A:1:3,END A:1:0用于标识节点R1,END.X A:1:3用于标识节点R1到下一跳节点R2的链路。类似地,节点R2也可以配置有两个类型的原始SID,分别为END A:2:0和END.X A:2:5,END A:2:0用于标识节点R2,END.X A:2:5用于标识节点R2到节点R3的链路。节点R3配置有两个类型的原始SID,分别为END A:3:0和END.X A:3:6,END A:3:0用于标识节点R3,END.X A:3:6 用于标识节点R3到节点R4的链路。节点R4配置有两个类型的原始SID,分别为END A:4:0和END.X A:4:1,END A:4:0用于标识节点R4,END.X A:4:1用于标识节点R4到节点R5的链路。节点R5配置有一个类型的原始SID,为END DT4 A:5:8001,END DT4 A:5:8001用于标识节点R5对应一个IPv4 VPN实例。这些原始SID均表示为××:××:××的格式,其中,第一个“:”之前的字段为flocator字段,第一个“:”和第二个“:”之间的字段为vlocator字段,第二个“:”之后的字段为function字段。FIG. 7 is a schematic diagram of a packet forwarding based on the 32-bit compression mode of FIG. 6 provided by an embodiment of the present application. As shown in Figure 7, node R1 can be configured with two types of original SIDs, for example, END A:1:0 and END.X A:1:3, END A:1:0 are used to identify nodes R1 and END. X A: 1:3 is used to identify the link from node R1 to the next hop node R2. Similarly, node R2 can also be configured with two types of original SIDs, namely END A: 2:0 and END. X A: 2: 5, END A: 2:0 is used to identify node R2, END. X A :2:5 is used to identify the link from node R2 to node R3. Node R3 is configured with two types of original SIDs, namely END A: 3:0 and END. X A: 3: 6, END A: 3:0 is used to identify node R3, and END. X A: 3: 6 To identify the link from node R3 to node R4. Node R4 is configured with two types of original SIDs, namely END A: 4:0 and END. X A: 4: 1, END A: 4:0 is used to identify node R4, and END. X A: 4: 1 To identify the link from node R4 to node R5. The node R5 is configured with a type of original SID, which is END DT4 A:5:8001, and END DT4 A:5:8001 is used to identify that the node R5 corresponds to an IPv4 VPN instance. These original SIDs are all expressed in the format of ××:××:××, where the field before the first ":" is the flocator field, and the field between the first ":" and the second ":" is The vlocator field, the field after the second ":" is the function field.
在转发报文时,头节点可以利用封装在SRH中的SID列表指定报文转发路径,所述SID列表中的SID类型例如可以为节点SID、链路SID或IPv4 VPN类型的SID等。When forwarding the message, the head node can use the SID list encapsulated in the SRH to specify the message forwarding path. The SID type in the SID list can be, for example, the node SID, the link SID, or the IPv4 VPN type SID.
仍以图7为例,头节点R1接收到的压缩前的原始SID列表可以表示为:<A:5:8001,A:4:0,A:3:6,A:2:0>。如果头节点R1按照32比特压缩方式对所述原始SID列表进行压缩,则如图7所示,压缩后的SID列表可以表示为:<5:8001,4:0,3:6,2:0>,即压缩后的SID均不包括相同的AS域标识“A”。头节点R1向中间节点R2发送的报文中的压缩SID列表表示为<5:8001,4:0,3:6,2:0>。需要说明的是,为便于理解,图7中在SID列表中列出了各个SID的类型,如压缩前的END A以及压缩后的cEND A等,但在实际转发报文中,上述类型标识并不出现在SID列表中。SID列表中仅包括各相应类型的SID值。Still taking Fig. 7 as an example, the original SID list before compression received by the head node R1 can be expressed as: <A:5:8001, A:4:0, A:3:6, A:2:0>. If the head node R1 compresses the original SID list according to the 32-bit compression method, as shown in Figure 7, the compressed SID list can be expressed as: <5:8001, 4:0, 3:6, 2:0 >, that is, the compressed SID does not include the same AS domain identifier "A". The compressed SID list in the message sent by the head node R1 to the intermediate node R2 is represented as <5:8001, 4:0, 3:6, 2:0>. It should be noted that, for ease of understanding, the SID list in Figure 7 lists the types of each SID, such as END A before compression and cEND A after compression, but in the actual forwarded message, the above-mentioned types are not identified. Does not appear in the SID list. The SID list only includes SID values of each corresponding type.
图8是本申请实施例提供的一种确定段标识的方法流程图,用于对16比特这种压缩方式进行解释说明。该方法包括如下过程:FIG. 8 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is used to explain the 16-bit compression method. The method includes the following processes:
S801:第一网络设备确定与第二网络设备对应的第一段标识,所述第一段标识包括第一标识信息和第二标识信息,所述第一标识信息用于标识第二网络设备所属的自治域,所述第二标识信息用于标识所述第二网络设备。S801: The first network device determines a first segment identifier corresponding to the second network device, where the first segment identifier includes first identification information and second identification information, and the first identification information is used to identify the second network device to which the second network device belongs The second identification information is used to identify the second network device.
S801的实现方式可以参考图4实施例中的S401的实现方式。也即是,在S801中,所述第一网络设备可以为SRv6网络中某一转发路径上的头节点,所述第二网络设备可以为所述转发路径上所述头节点的下一跳节点,也可以为所述转发路径上的其他节点,如中间节点或尾节点。For the implementation of S801, reference may be made to the implementation of S401 in the embodiment of FIG. 4. That is, in S801, the first network device may be the head node on a certain forwarding path in the SRv6 network, and the second network device may be the next hop node of the head node on the forwarding path , It can also be other nodes on the forwarding path, such as an intermediate node or a tail node.
S802:所述第一网络设备基于所述第一段标识生成第二段标识,所述第二段标识与所述第一段标识相比,不包括所述第一标识信息和所述第二标识信息。S802: The first network device generates a second segment identifier based on the first segment identifier. Compared with the first segment identifier, the second segment identifier does not include the first identifier information and the second segment identifier. Identification information.
也即是,16比特的压缩方案可以仅保留原始SID中的function字段,删除原始SID中的flocator字段和vlocator字段。基于图4所示的实施例可知,由于在严格显示路径中SID列表中所对应的相邻的两个节点是位于同一IGP域内的,因此这相邻的两个节点可以预先获知到对方的原始SID的vlocator字段。而对于报文的转发路径为松散显示路径的场景,由于此时SID列表中对应的相邻的两个节点可能没有位于同一IGP域,因此相邻两个节点可能无法获知到对方的vlocator字段。在图8实施例提供的16比特的压缩方案中需要对vlocator字段进行压缩,因此,图8实施例提供的16比特的压缩方案只适用于报文的转发路径为严格显示路径的场景中。That is, the 16-bit compression scheme can only retain the function field in the original SID, and delete the flocator field and vlocator field in the original SID. Based on the embodiment shown in Fig. 4, it can be seen that since the 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 original source of each other in advance. The vlocator field of the SID. For the scenario where the forwarding path of the message is a loosely displayed path, since two adjacent nodes corresponding to the SID list may not be located in the same IGP domain at this time, the two adjacent nodes may not be able to learn each other's vlocator field. In the 16-bit compression scheme provided in the embodiment of FIG. 8, the vlocator field needs to be compressed. Therefore, the 16-bit compression scheme provided in the embodiment of FIG. 8 is only applicable to the scenario where the forwarding path of the message is a strict display path.
另外需要说明的是,在某些应用场景下,例如报文转发的严格显示路径上的各个原始SID的function字段中只有最后8个比特可能是不同的,而前8个比特的取值均为0-,此时,头节点在压缩各个节点的原始SID时,可以只保留原始SID中的function字段的最后8个比特。这种压缩方案实际与16比特的压缩方案类似,即仅保留了function字段的相关信息,但能够 结合SID的实际特点进一步节约网络资源,提高转发效率。In addition, it should be noted that in some application scenarios, such as the strict display of message forwarding, only the last 8 bits in the function field of each original SID on the path may be different, and the values of the first 8 bits are all 0-, at this time, when compressing the original SID of each node, the head node can only retain the last 8 bits of the function field in the original SID. This compression scheme is actually similar to the 16-bit compression scheme, that is, only the relevant information of the function field is retained, but it can further save network resources and improve the forwarding efficiency by combining the actual characteristics of the SID.
S803:所述第一网络设备向所述第二网络设备发送报文,该报文包括所述第二段标识。S803: The first network device sends a message to the second network device, where the message includes the second segment identifier.
S803的实现方式可以参考图4实施例中S403的实现方式,在此不再详细重复说明。For the implementation of S803, reference may be made to the implementation of S403 in the embodiment of FIG. 4, which will not be repeated here in detail.
图9是本申请实施例提供的一种基于图8的16比特压缩方式的转发报文的示意图。如图9所示,节点R1配置有两个类型的原始SID,分别为END A:1:0和END.X A:1:3。节点R2配置有两个类型的原始SID,分别为END A:2:0和END.X A:2:5。节点R3配置有两个类型的原始SID,分别为END A:3:0和END.X A:3:6。节点R4配置有两个类型的原始SID,分别为END A:4:0和END.X A:4:1。节点R5配置有一个类型的原始SID,为END DT4 A:5:8001。每个节点的各个原始SID已经在图7所示的实施例中进行了详细说明,在此就不再赘述。FIG. 9 is a schematic diagram of a packet forwarding based on the 16-bit compression method of FIG. 8 provided by an embodiment of the present application. As shown in Figure 9, node R1 is configured with two types of original SIDs, namely END A:1:0 and END.X A:1:3. The node R2 is configured with two types of original SIDs, namely END A: 2:0 and END. X A: 2:5. Node R3 is configured with two types of original SIDs, namely END A: 3:0 and END. X A: 3:6. Node R4 is configured with two types of original SIDs, namely END A: 4:0 and END. X A: 4: 1. Node R5 is configured with a type of original SID, which is END DT4 A:5:8001. The original SID of each node has been described in detail in the embodiment shown in FIG. 7, and will not be repeated here.
如图9所示,压缩前的原始SID列表可以表示为:<A:5:8001,A:4:1,A:3:6,A:2:5>。报文自R1转发至R5的路径为严格显示路径,因此头节点可以按照16比特压缩方式压缩中间节点R2、中间节点R3、中间节点R4。在某些情形下,由于尾节点的原始SID通常用于指示一个VPN,对于这种类型的SID,为了避免由于中间链路发生中断导致无法还原出VPN的真实IP地址而造成其他的问题,可以约定尾节点的原始SID按照32比特压缩方式压缩,也即是,采用32比特压缩方案压缩尾节点R5,如图9所示,压缩后的SID列表可以表示为<5:8001,1,6,5>。也即是,头节点R1向中间节点R2发送的报文中的SRH包括的SID列表为<5:8001,1,6,5>。需要说明的是,在前述压缩尾节点R5的过程中,也可以采用16比特的压缩方案来压缩,本申请实施例对此不做具体限定。As shown in Figure 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 the message to be forwarded 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 mode. 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 the inability to restore the real IP address of the VPN due to the interruption of the intermediate link, you can It is agreed that the original SID of the tail node is compressed according to the 32-bit compression method, that is, the tail node R5 is compressed using a 32-bit compression scheme, as shown in Figure 9, the compressed SID list can be expressed as <5:8001, 1, 6, 5>. That is, the SID list 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 foregoing 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.
基于图4所示的实例中关于原始SID的解释说明中可知,在原始SID中function字段通常用于指示相应SID的功能。因此,不同的原始SID可能具有相同的function字段,用于指示这些原始SID对应同一功能。因此,对于报文的转发路径为严格显示路径的场景,如果报文转发路径上的各个节点的原始SID的function字段相同时,头节点还可以采用下述图10所示的压缩方式(也即是20比特压缩方式)对各个节点的原始SID进行压缩。Based on the explanation about the original SID in the example shown in FIG. 4, it can be known that the function field in the original SID is usually used to indicate the function of the corresponding SID. Therefore, different original SIDs may have the same function field, which is used to indicate that these original SIDs correspond to the same function. Therefore, for the scenario where the forwarding path of the message is a strictly displayed path, if the function field of the original SID of each node on the forwarding path of the message is the same, the head node can also use the compression method shown in Figure 10 below (that is, It is a 20-bit compression method) to compress the original SID of each node.
图10是本申请实施例提供的一种确定段标识的方法流程图,用于对20比特这种压缩方案进行解释说明。该方法包括如下过程:FIG. 10 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is used to explain the 20-bit compression scheme. The method includes the following processes:
S1001:第一网络设备确定与多个网络设备对应的多个段标识,所述多个段标识分别包括相同的第四标识信息。S1001: The first network device determines multiple segment identifiers corresponding to the multiple network devices, and the multiple segment identifiers respectively include the same fourth identification information.
在S1001中,每个网络设备对应的段标识也即是该网络设备的原始SID,具体类型可以为节点类型、链路类型或其他类型等。这多个网络设备例如可以为报文转发路径中多个连续的节点。第四标识信息即为原始SID中的function字段。如图3所示,第一网络设备可以为头节点R1,这多个网络设备可以为头节点R1之后的中间节点R2、R3和R4。In S1001, the segment identifier corresponding to each network device is the original SID of the network device, and the specific type can be a node type, a link type, or other types. The multiple network devices may be multiple consecutive nodes in the packet forwarding path, for example. 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 multiple network devices may be intermediate nodes R2, R3, and R4 after the head node R1.
在S1001中,第一网络设备确定与多个网络设备对应的多个段标识的实现方式可以参考图4所示的实施例的S401中第一网络设备确定第二网络设备对应的第一段标识的实现方式,在此不再赘述。In S1001, the implementation manner for the first network device to determine the multiple segment identifiers corresponding to the multiple network devices can refer to S401 in the embodiment shown in FIG. 4 for the first network device to determine the first segment identifier corresponding to the second network device. The implementation method of, I won’t go into details here.
S1002:第一网络设备基于所述多个段标识生成第五段标识,所述第五段标识包括所述第四标识信息和第五标识信息,第五标识信息用于标识所述多个网络设备的个数。S1002: The first network device generates a fifth segment identifier based on the plurality of segment identifiers, where the fifth segment identifier includes the fourth identification information and fifth identification information, and the fifth identification information is used to identify the plurality of networks The number of devices.
也即是,当报文转发路径上多个节点的function字段相同时,可以针对这些function字段相同的节点统一生成一个压缩后的SID,该压缩后的SID只需包括相同的function字段和这 多个网络设备的个数即可。That is, when the function fields of multiple nodes on the message forwarding path are the same, a compressed SID can be generated uniformly for these nodes with the same function field, and the compressed SID only needs to include the same function field and this number. The number of network devices is sufficient.
在一种可能的实现方式中,当报文转发路径上多个节点的function字段相同时,可以仅针对所述function字段按照上述方式压缩,但是所述多个节点的flocator字段可以不压缩。此时,用于表示相应的多个节点的压缩后的SID还可以包括所述多个节点的flocator字段。In a possible implementation manner, when the function fields of multiple nodes on the message forwarding path are the same, only the function fields may be compressed in the foregoing manner, but the flocator fields of the multiple nodes may not be compressed. At this time, the compressed SIDs used to indicate the corresponding multiple nodes may also include the flocator fields of the multiple nodes.
在另一种可能的实现方式中,基于S401对原始SID的解释说明可知,原始SID中还包括flocator字段和vlocator字段,因此,如果后续的各个节点能够从其他途径获取到flocator字段和vlocator字段,此时当通过图10所示的20比特的压缩方式压缩时,压缩后的第五段标识还可以不包括第一标识信息(也即是flocator字段)和分别对应于多个网络设备的第六标识信息(也即是vlocator字段)。所述第六标识信息分别用于唯一地标识自治域内的多个网络设备。也即是,在报文转发路径上各个节点的function字段相同时,同时对function字段、flocator字段和vlocator字段进行了压缩。In another possible implementation, based on the explanation of the original SID in S401, it can be known that the original SID also includes the flocator field and the vlocator field. Therefore, if each subsequent node can obtain the flocator field and the vlocator field from other means, At this time, when compressed by the 20-bit compression method shown in FIG. 10, the compressed fifth segment of identification may also not include the first identification information (that is, the flocator field) and the sixth segment corresponding to multiple network devices. Identification information (that is, the vlocator field). The sixth identification information is respectively used to uniquely identify multiple network devices in the autonomous domain. That is, when the function field of each node on the message forwarding path is the same, the function field, the flocator field, and the vlocator field are compressed at the same time.
S1003:第一网络设备向所述多个网络设备发送报文,该报文包括所述第五段标识。S1003: The first network device sends a message to the multiple network devices, where the message includes the fifth segment identifier.
例如,所述多个网络设备中第一个接收所述报文的设备可以为所述第一网络设备的下一跳节点;再例如,所述多个网络设备中第一个接收所述报文的设备可以不是所述第一网络设备的下一跳节点,而是转发所述报文的严格显示路径上的后续节点,而所述第一网络设备的下一跳节点例如可以采用前述32bit或16bit的压缩方案。For example, the first device among the plurality of network devices to receive the message may be the next hop node of the first network device; for another example, the first device among the plurality of network devices to receive the message The device of the text may not be the next hop node of the first network device, but a subsequent node on the strict display path forwarding the message, and the next hop node of the first network device may use the aforementioned 32bit Or 16bit compression scheme.
图11是本申请实施例提供的一种基于图10所示的20比特压缩方式的转发报文的示意图。如图11所示,节点R1配置有两个类型的原始SID,分别为END A:1:0和END.X A:1:5060。节点R2配置有两个类型的原始SID,分别为END A:2:0和END.X A:2:5060。节点R3配置有两个类型的原始SID,分别为END A:3:0和END.X A:3:5060。节点R4配置有两个类型的原始SID,分别为END A:4:0和END.X A:4:5060。节点R5配置有一个类型的原始SID,为END DT4 A:5:8001。每个节点的各个原始SID的相关功能可以参考图7所示的实施例,在此不再赘述。FIG. 11 is a schematic diagram of a forwarded packet based on the 20-bit compression method shown in FIG. 10 according to an embodiment of the present application. As shown in Figure 11, node R1 is configured with two types of original SIDs, namely END A:1:0 and END.X A:1:5060. The node R2 is configured with two types of original SIDs, namely END A: 2:0 and END. X A: 2:5060. Node R3 is configured with two types of original SIDs, namely END A: 3:0 and END. X A: 3:5060. Node R4 is configured with two types of original SIDs, namely END A: 4:0 and END. X A: 4: 5060. Node R5 is configured with a type of original SID, which is END DT4 A:5:8001. For the related functions of each original SID of each node, reference may be made to the embodiment shown in FIG. 7, which will not be repeated here.
如图11所示,压缩前的原始SID可以表示为:<A:5:8001,A:4:5060,A:3:5060,A:2:5060>。此时,由于报文的转发路径为严格显示路径,且各个中间节点对应的原始SID的function字段相同,因此头节点可以按照20比特压缩方案压缩中间节点R2、中间节点R3、中间节点R4,按照32比特压缩方案压缩中间节点R5。如图11所示,压缩后的SID列表可以表示为<5:8001,5060:3>。在上述SID列表中,5:8001和尾节点R5对应。5060:3用于指示有3个function字段均为5060的节点R2至节点R4。头节点R1向中间节点R2发送的报文中的SRH包括的SID列表为<5:8001,5060:3>。As shown in Figure 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 message is strictly displayed, and the function field of the original SID corresponding to each intermediate node is the same, the head node can compress the intermediate node R2, intermediate node R3, and intermediate node R4 according to the 20-bit compression scheme. The 32-bit compression scheme compresses the intermediate node R5. As shown in Figure 11, the compressed SID list can be expressed as <5:8001, 5060:3>. In the above SID list, 5:8001 corresponds to the tail node R5. 5060:3 is used to indicate that there are 3 nodes R2 to R4 whose function fields are all 5060. The SID list included in the SRH in the message sent by the head node R1 to the intermediate node R2 is <5:8001, 5060:3>.
基于上述图4至图11的实施例可知,头节点在压缩报文的转发路径上各个节点对应的原始SID时,可以采用不同的压缩方式进行压缩。为了便于后续节点能够从压缩后的SID中确定报文的目的地址。头节点向第二网络设备发送的报文还可以包括第七标识信息,该第七标识信息用于标识第一网络设备生成第二段标识的策略。例如,针对图6所示的确定段标识的方法,该第七标识信息可以用于标识第一网络设备通过32比特的压缩方式生成与第二网络设备对应的压缩后的第二段标识。Based on the above embodiments of FIG. 4 to FIG. 11, it can be seen that when the head node compresses the original SID corresponding to each node on the forwarding path of the message, different compression methods can be used for compression. In order to facilitate subsequent nodes to be able to determine the destination address of the message from the compressed SID. The message 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 strategy 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 through a 32-bit compression method.
在一些可能的实现方式中,对于转发路径上各个节点或链路的原始SID可以采用不同的压缩方式,此时,多个标识信息可以用于分别标识第一网络设备生成转发路径上相应节点或 链路的压缩段标识的策略,以便于所述转发路径上的相应节点能够基于所述策略确定对应的段标识还原方式。比如,针对图9所示的报文转发路径,多个标识信息分别用于标识第一网络设备通过8比特压缩方式生成中间节点R2至R4的第二段标识,以及通过32比特的压缩方式生成尾节点R5的第二段标识。通过所述多个标识信息,本申请可以支持同一SID表中的各个SID采用不同的压缩方案生成。在另一些可能的实现方式中,所述标识信息还可以用于标识不对原始SID进行压缩的方案,如不对转发路径上的一个或多个SID进行压缩,仍保留原始的128比特等。各个不同的压缩方案以及不压缩的方案所对应的标识信息的内容均不同。In some possible implementations, different compression methods can be used for the original SID of each node or link on the forwarding path. In this case, multiple identification information can be used to respectively identify the first network device to generate the corresponding node or the corresponding node on the forwarding path. The strategy of the compressed segment identifier of the link, so that the corresponding node on the forwarding path can determine the corresponding segment identifier restoration method based on the strategy. For example, for the packet forwarding path shown in Figure 9, multiple identification information is used to identify the first network device to generate the second segment identifiers of the intermediate nodes R2 to R4 through 8-bit compression, and to generate the second segment identifiers through 32-bit compression. The second segment identifier of the tail node R5. Through the multiple identification information, the present application can support the generation of each SID in the same SID table using different compression schemes. In other possible implementation manners, the identification information may also be used to identify a solution that does not compress the original SID, for example, one or more SIDs on the forwarding path are not compressed, and the original 128 bits are still retained. The content of the identification information corresponding to each different compression scheme and the uncompressed scheme is different.
在一种可能的实现方式中,可以对图1所示的SRH进行扩展,以使扩展后的SRH携带上述第七标识信息。需要说明的是,对SRH扩展的具体实现方式可以有多种,只需保证扩展后的SRH能够指示SID列表中各个SID的压缩方案(包括不压缩的方案)即可。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 can be multiple specific implementations of SRH extension, and it is only necessary to ensure that the extended SRH can indicate the compression scheme (including the uncompressed scheme) of each SID in the SID list.
作为一种可能的示例,图12是本申请实施例提供的一种扩展后的SRH的格式示意图。如图12所示,图1中用于携带SID列表的字段当前用于携带各种类型的压缩后的SID,比如,按照20比特压缩方式压缩后的cSID,按照8比特压缩方式压缩后的cSID以及按照32比特压缩方式压缩后的cSID,此外还可以包括不压缩的128比特的原始SID。需要说明的是,图12中是将所有的压缩方式体现在SID列表中,在实际应用中,SID列表中的压缩后的SID可以是采用同一压缩方式压缩后的SID,也可以是根据需要采用可选的多种压缩方式压缩后的SID。As a possible example, FIG. 12 is a schematic diagram of an extended SRH format provided in an embodiment of the present application. As shown in Figure 12, the field used to carry the SID list in Figure 1 is currently used to carry various types of compressed SIDs, for example, cSID compressed according to 20-bit compression, and cSID compressed according to 8-bit compression And the cSID compressed according to the 32-bit compression method, in addition to the uncompressed 128-bit original SID. It should be noted that in Figure 12, all compression methods are reflected in the SID list. In practical applications, the compressed SID in the SID list can be the SID compressed by the same compression method, or it can be used as needed. SID compressed by a variety of optional compression methods.
如图12所示,可以利用类型-长度-值(type-length-value,TLV)字段携带上述用于指示压缩策略的多个标识信息,所述标识信息例如包括与所述第二网络设备对应的所述第七标识信息。具体地,该TLV中可以设置位图(bitmap)BMP字段。该BMP字段用于指示SID列表中各个压缩SID对应的压缩策略。也即是,该位图字段包括用于指示SID列表中每个SID的压缩方式的指示信息。此外,由于SRH中的SL字段用于指示当前处理到SID列表中的第几个SID,而传统的SID列表中每个SID为128比特位,所以传统的SRH中的SID列表实际上是按照每128个比特位为一组的方式进行了划分,此时,SRH中的SL字段实际上指示的是当前处理到SID列表中的第几组的128比特位。而在本申请中,由于SID列表中的SID可以是压缩后的SID,因此每一组128比特位中可能还包括多个压缩后的SID。所以只通过SL字段不能直接定位到具体的那个SID,因此在TLV字段中还可以相应的设置其他指示字段,如指针(pointer,PI)字段,PI字段用于配合SL字段以定位SL字段所指示的一组128比特位中的哪个具体SID。基于上述配置,在转发报文的过程中,接收所述报文的网络设备可以先根据PI字段和SRH中的SL字段定位到转发路径中当前节点对应的压缩SID,然后通过BMP字段确定该压缩SID对应的压缩策略。接收所述报文的网络设备根据获取的压缩SID和压缩策略,即可对获取的SID进行还原,然后得到压缩前的原始SID,以用于所述报文后续的转发。As shown in FIG. 12, a type-length-value (type-length-value, TLV) field may be used to carry multiple pieces of identification information used to indicate the compression strategy. The identification information includes, for example, corresponding to the second network device. Of the seventh identification information. Specifically, a bitmap (bitmap) BMP field can be set in the TLV. The BMP field is used to indicate the compression strategy corresponding to each compressed SID in the SID list. That is, the bitmap field includes indication information for indicating the compression mode of each SID in the SID list. In addition, since the SL field in SRH is used to indicate which SID is currently processed into the SID list, and each SID in the traditional SID list is 128 bits, the SID list in the traditional SRH is actually based on each SID list. The 128 bits are divided into a group. At this time, the SL field in the SRH actually indicates which group of 128 bits are currently processed into the SID list. In this application, since the SIDs in the SID list may be compressed SIDs, each group of 128 bits may also include multiple compressed SIDs. Therefore, only the SL field cannot directly locate the specific SID. Therefore, other indication fields can be set in the TLV field accordingly, such as the pointer (PI) field. The PI field is used to coordinate with the SL field to locate the indication of the SL field. Which specific SID in a set of 128 bits. Based on the above configuration, in the process of forwarding the message, the network device receiving the message can 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 through the BMP field The compression strategy corresponding to the SID. The network device receiving the message can restore the acquired SID according to the acquired compressed SID and compression strategy, and then obtain the original SID before compression for subsequent forwarding of the message.
需要说明的是,本申请实施例并不限定PI字段和BMP字段的具体实现方式和设置位置,只需设置的PI字段和BMP字段能够实现上述功能即可。上述图8至图11用于解释说明本申请实施例提供的三种压缩方案。在应用本申请实施例提供的确定段标识的方法中,头节点可以根据实际需求来确定针对各个网络设备的原始SID的压缩方案。或者,控制设备根据实际 需求来确定针对各个网络设备的原始SID的压缩方案,然后将确定的压缩方案发送给头节点,以使头节点基于针对各个网络设备的原始SID的压缩方案确定SRH等。It should be noted that the embodiment of the present application does not limit the specific implementation manner and setting location of the PI field and the BMP field, and only the set PI field and BMP field can implement the above-mentioned functions. The foregoing Figures 8 to 11 are used to explain the three compression schemes provided by the embodiments of the present application. In applying the method for determining the segment identifier provided by the embodiment of the present application, the head node may determine the original SID compression scheme for each network device according to actual requirements. Alternatively, the control device determines the compression scheme for the original SID of each network device according to actual requirements, and then sends the determined compression scheme to the head node, so that the head node determines the SRH based on the compression scheme for the original SID of each network device.
上述图4至图12所示的实施例用于解释说明头节点如何对报文转发路径中的各个节点的原始SID进行压缩的过程,接下来对中间节点根据压缩后的SID确定目的地址并转发报文的过程进行解释说明。The embodiments shown in Figures 4 to 12 above are used to explain how the head node compresses the original SID of each node in the message forwarding path. Next, the intermediate node determines the destination address according to the compressed SID and forwards it. The message process is explained.
图13是本申请实施例提供的一种段标识的确定方法流程图,应用于基于SRv6网络中的中间节点,也即是,下述实施例中的第二网络设备可以为转发路径上的任意中间节点,所述方法可以用于恢复压缩后的SID。如图13所示,该方法包括如下过程:FIG. 13 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is applied to an intermediate node in an SRv6 network, that is, the second network device in the following embodiment can be any on the forwarding path Intermediate node, the method can be used to restore the compressed SID. As shown in Figure 13, the method includes the following processes:
S1301:第二网络设备接收报文,该报文包括与第三网络设备对应的第二段标识。S1301: The second network device receives a message, and the message includes a second segment identifier corresponding to the third network device.
第二网络设备可以为图4至图12所示的实施例中的报文转发路径中的某一个中间节点,第三网络设备为转发路径上、位于第二网络设备之后的下一个支持SRv6的节点。如图3所示,例如第二网络设备可以为中间节点R2,此时第三网络设备可以为中间节点R3。再例如,第二网络设备还可以为中间节点R3,此时第三网络设备可以为中间节点R4。在上述严格显示路径中,第三网络设备实际为第二网络设备的下一跳设备。需要说明的是,在某些情形下,例如在转发路径为松散显示路径时,第三网络设备可能未必是第二网络设备的下一跳设备,而是所述路径上第三网络设备之后,下一个支持SRv6的网络设备,此种情形下,第三网络设备和第二网络设备之间可能还存在一个或多个网络设备,所述一个或多个网络设备可以不支持SRv6,但可以完成对报文的透传。The second network device may be an intermediate node in the packet forwarding path in the embodiments shown in FIGS. 4 to 12, and the third network device is the next SRv6-supporting node on the forwarding path and located after the second network device. node. As shown in FIG. 3, for example, the second network device may be the intermediate node R2, and the third network device may be the intermediate node R3 in this case. For another example, the second network device may also be the intermediate node R3, and in this case, the third network device may be the intermediate node R4. In the above strict display path, the third network device is actually the next hop device of the second network device. It should be noted that in some situations, for example, when the forwarding path is a loose display path, the third network device may not necessarily be the next hop device of the second network device, but after the third network device on the path, The next network device that supports SRv6. In this case, there may be one or more network devices between the third network device and the second network device. The one or more network devices may not support SRv6, but it can be done Transparent transmission of messages.
基于图4至图12所示的实施例可知,该报文中包括的与第三网络设备对应的第二段标识是头节点对第三网络设备的原始SID(也即是图4所示的实施例中的第一段标识)进行压缩之后得到的SID。也即是,S1301中的第二段标识是不包括第一标识信息的,该第一标识信息用于标识第二网络设备所属的AS(也即是,原始SID中的flocator字段)。Based on the embodiments shown in Figures 4 to 12, it can be seen that the second segment of the identifier corresponding to the third network device included in the message is the original SID of the head node to the third network device (that is, the original SID shown in Figure 4). The first segment identifier in the embodiment) is the SID obtained after compression. That is, the second segment of identification in S1301 does not include the first identification information, and the first identification information is used to identify the AS to which the second network device belongs (that is, the flocator field in the original SID).
S1302:第二网络设备确定与所述第三网络设备对应的第一标识信息,所述第一标识信息用于标识所述第三网络设备所属的自治域。S1302: The second network device determines first identification information corresponding to the third network device, where the first identification information is used to identify the autonomous domain to which the third network device belongs.
基于S1301可知,S1301中的第二段标识是不包括第一标识信息的。因此,为了能够将报文发送至第三网络设备,需要先确定与第三网络设备对应的第一标识信息,以便于通过下述S1303还原第三网络设备的原始SID。Based on S1301, it can be known that the second segment identifier in S1301 does not include the first identifier information. Therefore, in order to be able to send the message to the third network device, the first identification information corresponding to the third network device needs to be determined first, so as to restore the original SID of the third network device through the following S1303.
在一种可能的实现方式中,S1302的实现过程可以为:第二网络设备接收消息,该消息包括对应于第三网络设备的第六标识信息和第七标识信息,第六标识信息包括第一标识信息,第七标识信息用于标识第一标识信息的长度;第一网络设备基于第六标识信息和第七标识信息,确定第一标识信息。In a possible implementation manner, the implementation process of S1302 may be: the second network device receives a message, the message includes the sixth identification information and the seventh identification information corresponding to the third network device, and the sixth identification information includes the first The identification information, the seventh identification information is used to identify 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.
该消息可以为第三网络设备发布的IGP报文,该IGP报文用于通告该第三网络设备的位置标识(locator)。其中,上述实现方式中的第六标识信息也即是该第三网络设备的位置标识,该位置标识包括第一标识信息(也即是flocator字段)。第七标识信息用于标识flocator的长度。因此,第二网络设备根据该IGP报文即可确定出从位置标识中解析出第一标识信息。The message may be an IGP message issued by the third network device, and the IGP message is used to advertise the 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, and the location identification includes the first identification information (that is, the flocator field). The seventh identification information is used to identify the length of the flocator. Therefore, the second network device can determine, according to the IGP message, to parse the first identification information from the location identification.
也即是,在本申请实施例中,相当于对网络设备发布的IGP报文进行了扩展,扩展后的IGP报文中除了携带相应的网络设备的位置标识,还携带flocator字段的长度。That is, in the embodiment of the present application, it is equivalent to an extension of the IGP message issued by the network device. In addition to carrying the location identifier of the corresponding network device, the extended IGP message also carries the length of the flocator field.
此外,基于图4所示的实施例可知,对原始SID的定位字段划分为flocator字段和vlocator字段。因此,在一种可能的实现方式中,扩展后的IGP报文中除了携带网络设备的位置标识和flocator字段的长度,还可以携带vlocator字段的长度。In addition, based on the embodiment shown in FIG. 4, it can be known that the location field of the original SID is divided into a flocator field and a vlocator field. Therefore, in a possible implementation manner, in addition to carrying the location identifier of the network device and the length of the flocator field, the extended IGP message may also carry the length of the vlocator field.
图14是本申请实施例提供的一种IGP报文的格式示意图。如图14所示,该IGP报文中包括位置标识字段(locator)、以及子类型长度值(type-length-value,TLV),该子TLV用于携带flocator(在图14中表示为第一定位)字段的长度和vlocator(在图14中表示为第二定位)字段的长度。也即是,本申请实施例在现有的IGP报文中扩展了一个子TLV,通过该子TLV来通告该网络设备的flocator字段和vlocator字段。FIG. 14 is a schematic diagram of the format of an IGP message provided by an embodiment of the present application. As shown in Figure 14, the IGP message includes a location identification field (locator) and a subtype length value (type-length-value, TLV). The sub-TLV is used to carry a flocator (denoted as the first in Figure 14). The length of the location) field and the length of the vlocator (denoted as the second location in FIG. 14) field. That is, the embodiment of the present application extends a sub-TLV in the existing IGP message, and the flocator field and the vlocator field of the network device are advertised through the sub-TLV.
第三网络设备可以基于IGP协议发布上述用于通告locator的IGP报文,以使处于同一IGP域内的其他节点均可以接收到该IGP报文,以获知第三网络设备的flocator字段和vlocator字段。需要说明的是,如果报文转发路径上的网络设备均处于同一IGP域内,则各个网络设备既可以利用IGP报文在域内通告locator,在其他可能的实现方式中,也可以由控制设备发送消息以通告locator,以及相应的flocator字段和/或vlocator字段的长度。如果报文转发路径上的网络设备属于不同的IGP域,也可以由控制设备在IGP域发布针对该第三网络设备的IGP报文,以使该IGP域内的其他网络设备基于该IGP报文获知第三网络设备的flocator字段和vlocator字段。The third network device may publish the above-mentioned IGP message for advertising the locator based on the IGP protocol, so that other nodes in the same IGP domain can receive the IGP message to learn the flocator field and the vlocator field of the third network device. It should be noted that if the network devices on the message forwarding path are all in the same IGP domain, each network device can use the IGP message to advertise the locator in the domain, and in other possible implementations, the control device can also send the message. To advertise the locator and the length of the corresponding flocator field and/or vlocator field. If the network devices on the packet forwarding path belong to different IGP domains, the control device can also publish an IGP packet for the third network device in the IGP domain, so that other network devices in the IGP domain can learn based on the IGP packet The flocator field and vlocator field of the third network device.
S1303:第二网络设备基于所述第一标识信息和第二段标识,生成与第三网络设备对应的第一段标识。S1303: The second network device generates a first segment identifier corresponding to the third network device based on the first identification information and the second segment identifier.
第二网络设备生成与第三网络设备对应的第一段标识,也即是,第二网络设备对压缩后的SID进行还原,得到第三网络设备的原始SID。该第三网络设备的原始SID即为S1303中的第三网络设备对应的第一段标识。The second network device generates the 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.
基于图4所示的实施例中S402的实现方式可知,在S1301中,第三网络设备对应的第二段标识不包括第一标识信息的压缩方式可以有多种。因此,在S1303中,第二网络设备生成与第三网络设备对应的第一段标识的实现方式和第一段标识的压缩方式有关,后续将针对不同的压缩方式分别对S1303进行详细说明。在此就先不展开说明。Based on the implementation of S402 in the embodiment shown in FIG. 4, it can be known that in S1301, the second segment identifier corresponding to the third network device does not include the first identification information in a variety of compression methods. Therefore, in S1303, the implementation manner in which the second network device generates the first segment identifier corresponding to the third network device is related to the compression method of the first segment identifier, and S1303 will be described in detail for different compression methods respectively. I won't expand the explanation here.
S1304:所述第二网络设备基于所述第一段标识向所述第三网络设备发送该报文。S1304: The second network device sends the message to the third network device based on the first segment identifier.
基于S1303可知,第一段标识即为第三网络设备的原始SID,因此,第二网络设备可以将该第一段标识作为目的地址来转发该报文,以实现将该报文转发至第三网络设备。Based on S1303, the first segment identifier is the original SID of the third network device. Therefore, the second network device can use the first segment identifier as the destination address to forward the message, so as to forward the message to the third network device. Internet equipment.
图15是本申请实施例提供的一种段标识的确定方法流程图,应用于基于SRv6网络中的中间节点,也即是,下述实施例中的第二网络设备可以为转发路径上的任意中间节点。图15所示的实施例用于对基于图6所示的实施例中32比特压缩方式压缩后的段标识进行还原的过程进行解释说明。如图15所示,该方法包括如下过程:15 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is applied to an intermediate node in an SRv6 network, that is, the second network device in the following embodiment can be any on the forwarding path Intermediate node. 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 Figure 15, the method includes the following processes:
S1501:第二网络设备接收报文,该报文包括与第三网络设备对应的第二段标识,所述第二段标识仅不包括第一标识信息,所述第一标识信息用于标识所述第三网络设备所属的AS。S1501: The second network device receives a message, the message includes a second segment identifier corresponding to the third network device, the second segment identifier only does not include the first identification information, and the first identification information is used to identify the Describe the AS to which the third network device belongs.
和图13所示的实施例一样,第二网络设备可以为图4至图12所示的实施例中的报文转发路径中的某一个中间节点,第三网络设备转发路径上,位于第二网络设备之后的下一个支持SRv6的节点。例如,第二网络设备可以为中间节点R2,此时第三网络设备可以为中间节点R3。再例如,第二网络设备还可以为中间节点R3,此时第三网络设备可以为中间节点R4。 第二网络设备还可以为中间节点R4,此时第三网络设备可以为中间节点R5。关于第二网络设备和第三网络设备之间的关系,可以参考图13所示的实施例中的解释说明,在此不再赘述。Like 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 FIG. 12. The third network device is located on the forwarding path of the second network device. The next node after the network device that supports SRv6. For example, the second network device may be the intermediate node R2, and in this case, the third network device may be the intermediate node R3. For another example, the second network device may also be the intermediate node R3, and in this case, the third network device may be the intermediate node R4. The second network device may also be the intermediate node R4, and in this case, the third network device may be the intermediate node R5. Regarding 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 will not be repeated here.
此外,S1501的实现方式可以参考图13实施例中的S1301的实现方式,在此同样不再赘述。另外,基于图6所示的实施例可知,如果第三网络设备对应的第二段标识是基于32比特压缩方式得到的,那么第三网络设备对应的第二段标识仅包括原始SID中的function字段和vlocator字段,而不包括原始SID中的flocator字段。In addition, the implementation manner of S1501 may refer to the implementation manner of S1301 in the embodiment of FIG. 13, which is not repeated here again. In addition, based on the embodiment shown in Figure 6, if the second segment identifier corresponding to the third network device is obtained based on the 32-bit compression method, then the second segment identifier corresponding to the third network device only includes the function in the original SID Field and vlocator field, excluding the flocator field in the original SID.
S1502:所述第二网络设备确定与所述第三网络设备对应的第一标识信息,所述第一标识信息用于标识所述第三网络设备所属的自治域。S1502: The second network device determines first identification information corresponding to the third network device, where the first identification information is used to identify the autonomous domain to which the third network device belongs.
S1502的实现方式可以参考图13实施例中的S1302,在此不再赘述。在一种可能的实现方式中,由于转发路径上各个网络节点的flocator均相同,也可以将所述flocator的信息提前存储在各个网络节点中,以供还原SID时使用。For the implementation of S1502, reference may be made to S1302 in the embodiment of FIG. 13, and details are not described herein again. In a possible implementation manner, since the flocator of each network node on the forwarding path is the same, the information of the flocator may also be stored in each network node in advance for use when restoring the SID.
S1503:所述第二网络设备基于所述第一标识信息和第二段标识,生成与所述第三网络设备对应的第一段标识。S1503: The second network device generates a first segment identifier corresponding to the third network device based on the first identification information and the second segment identifier.
由于S1501中的第二段标识仅不包括flocator字段,但是包括vlocator字段和function字段。因此,S1503的实现方式可以为:第二网络设备基于第一标识信息和第二段标识,便可直接生成与第三网络设备对应的第一段标识。Because the second segment identifier in S1501 only does not include the flocator field, but includes the vlocator field and the function field. Therefore, the implementation of S1503 may be that the second network device can directly generate the first segment identifier corresponding to the third network device based on the first identification information and the second segment identifier.
也即是,第二段标识中包括第三网络设备的原始SID的vlocator字段和function字段,然后例如通过第三网络设备预先发布的IGP报文获取第三网络设备的原始SID的flocator字段,将这三个字段组合即可还原出第三网络设备的原始SID,也即是生成与第三网络设备对应的第一段标识。That is, the second segment of the identifier includes the vlocator field and the function field of the original SID of the third network device, and then, for example, the flocator field of the original SID of the third network device is obtained through an IGP message pre-published by the third network device, and the The combination of these three fields can restore the original SID of the third network device, that is, generate the first segment identifier corresponding to the third network device.
S1504:所述第二网络设备基于所述第一段标识向所述第三网络设备发送该报文。S1504: The second network device sends the message to the third network device based on the first segment identifier.
S1504的实现方式可以参考图3实施例中的S1304,在此同样不再重复说明。For the implementation of S1504, reference may be made to S1304 in the embodiment of FIG. 3, and the description will not be repeated here again.
针对图7提供的基于32比特压缩方式的转发报文的过程,如图7所示,头节点R1向中间节点R2发送的报文中的SRH包括的SID列表为:<5:8001,4:0,3:6,2:0>。当中间节点R2接收到该报文时,根据中间节点R3预先发布的IGP报文或控制设备预先发送的消息,确定中间节点R3的flocator字段为A,然后根据SID列表中与中间节点R3对应的压缩后的3:6,还原出中间节点R3的原始SID为A:3:6,以便于后续将确定的原始SID A:3:6作为下一跳的目的地址DA转发该报文。For the process of forwarding messages based on 32-bit compression provided in Figure 7, as shown in Figure 7, the SID list included in the SRH in the message 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 message, it determines that the flocator field of the intermediate node R3 is A according to the IGP message pre-published by the intermediate node R3 or the message pre-sent by the control device, and then according to the SID list corresponding to the intermediate node R3 After the compressed 3:6, the original SID of the intermediate node R3 is restored to A:3:6, so that the determined original SID A:3:6 is subsequently used as the destination address DA of the next hop to forward the message.
当中间节点R3接收到该报文时,根据中间节点R4发布的IGP报文或控制设备预先发送的消息,确定中间节点R4的flocator字段为A,然后根据SID列表中与中间节点R4对应的压缩后的4:0,还原出中间节点R4的原始SID为A:4:0,以便于后续将确定的原始SID A:4:0作为目的地址DA转发该报文。When the intermediate node R3 receives the message, it determines that the flocator field of the intermediate node R4 is A according to the IGP message issued by the intermediate node R4 or the message sent in advance by the control device, and then according to the compression corresponding to the intermediate node R4 in the SID list After 4:0, the original SID of the intermediate node R4 is restored to A:4:0, so that the determined original SID A:4:0 will be used as the destination address DA to forward the message.
当中间节点R4接收到该报文时,根据尾节点R5或控制设备发布的IGP报文或控制设备预先发送的消息,确定尾节点R5的flocator字段为A,然后根据SID列表中与尾节点R5对应的压缩后的5:8001,还原出尾节点R5的原始SID为A:5:8001,以便于后续将确定的原始SID A:5:8001作为目的地址DA转发该报文。When the intermediate node R4 receives the message, according to the IGP message issued by the tail node R5 or the control device or the message sent in advance by the control device, the flocator field of the tail node R5 is determined to be A, and then according to the SID list and the tail node R5 Corresponding to the compressed 5:8001, the original SID of the tail node R5 is restored to A:5:8001, so that the determined original SID A:5:8001 is subsequently used as the destination address DA to forward the message.
以上基于图7描述的SID还原的过程仅作为一种可能的示例,上述还原方式也可以应用于其他转发路径上网络节点的SID还原。例如,在一种可能的情形中,转发路径可以为松散显示路径,即路径中包括一个或多个仅用于透传报文的转发节点,此时,仅有支持SR协议的 网络节点可能会执行SID还原操作。或者,在另一种可能的情形中,头节点并不对支持SR协议的下一跳网络节点的SID进行压缩,而直接将所述下一跳网络节点的原始SID作为下一跳目的地址等,此时即使所述下一跳网络节点支持SR协议,也无需执行压缩还原操作。The above described SID restoration process based on FIG. 7 is only a possible example, and the above restoration method can also be applied to SID restoration of network nodes on other forwarding paths. For example, in a possible situation, the forwarding path may be a loose display path, that is, the path includes one or more forwarding nodes that are only used for transparent transmission of packets. In this case, only network nodes that support the SR protocol may be Perform the SID restore operation. Or, in another possible situation, 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., At this time, even if the next-hop network node supports the SR protocol, there is no need to perform a compression and restoration operation.
图16是本申请实施例提供的一种段标识的确定方法流程图,应用于基于SRv6网络中的中间节点,也即是,下述实施例中的第二网络设备为转发路径上的任一中间节点。图16所示的实施例用于对基于图8所示的实施例中16比特压缩方式压缩后的段标识进行还原的过程进行解释说明。如图16所示,该方法包括如下过程:FIG. 16 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is applied to an intermediate node in an SRv6-based network, that is, the second network device in the following embodiment is any one on the forwarding path Intermediate node. 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 Figure 16, the method includes the following processes:
S1601:第二网络设备接收报文,该报文包括与第三网络设备对应的第二段标识,所述第二段标识同时不包括第一标识信息和第二标识信息,所述第一标识信息用于标识所述第三网络设备所属的AS,所述第二标识信息用于标识所述第三网络设备。S1601: The second network device receives a message, the message includes a second segment identifier corresponding to the third network device, and the second segment identifier does not include the first identification information and the second identification information at the same time, and the first identifier The information is used to identify the AS to which the third network device belongs, and the second identification information is used to identify the third network device.
和图13所示的实施例一样,第二网络设备可以为图4至图12所示的实施例中的报文转发路径中的某一个中间节点,第三网络设备为转发路径上,位于第二网络设备之后的下一个支持SRv6的节点。例如,第二网络设备可以为中间节点R2,此时第三网络设备可以为中间节点R3。再例如,第二网络设备还可以为中间节点R3,此时第三网络设备可以为中间节点R4。再例如,第二网络设备还可以为中间节点R4,此时第三网络设备可以为中间节点R5。关于第二网络设备和第三网络设备之间的关系,可以参考图13所示的实施例中的解释说明,在此不再赘述。Like 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 FIG. 12, and the third network device is on the forwarding path and is located in the first The next node after the second network device that supports SRv6. For example, the second network device may be the intermediate node R2, and in this case, the third network device may be the intermediate node R3. For another example, the second network device may also be the intermediate node R3, and in this 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, and in this case, the third network device may be the intermediate node R5. Regarding 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 will not be repeated here.
此外,S1601的实现方式可以参考图13实施例中的S1301的实现方式,在此不再赘述。另外,基于图8所示的实施例可知,如果第三网络设备对应的第二段标识是基于16比特压缩方式得到的,那么第三网络设备对应的第二段标识仅包括原始SID中的function字段,而不包括原始SID中的flocator字段和vlocator字段。In addition, the implementation manner of S1601 may refer to the implementation manner of S1301 in the embodiment of FIG. 13, and details are not described herein again. In addition, based on the embodiment shown in FIG. 8, if the second segment identifier corresponding to the third network device is obtained based on the 16-bit compression method, then the second segment identifier corresponding to the third network device only includes the function in the original SID Field, excluding the flocator field and vlocator field in the original SID.
S1602:所述第二网络设备确定与所述第三网络设备对应的第一标识信息和第二标识信息。S1602: The second network device determines first identification information and second identification information corresponding to the third network device.
基于S1601可知,第三网络设备对应的第二段标识不仅不包括flocator字段,还不包括vlocator字段,只包括function字段。因此,第一网络设备除了确定第一标识信息,还需确定第二标识信息,该第二标识信息为用于标识自治域内的第二网络设备(也即是vlocator字段)。Based on S1601, it can be known that the second segment identifier corresponding to the third network device not only does not include the flocator field, but also does not include the vlocator field, but only includes the function field. Therefore, in addition to determining the first identification information, the first network device also needs to determine the second identification information, which is used to identify the second network device in the autonomous domain (that is, the vlocator field).
第二网络设备确定第三网络设备的第二标识信息的实现方式可以参考图13所示的实施例中第二网络设备确定第三网络设备的第一标识信息的实现方式。也即是,同样可以通过IGP报文来确定第二标识信息,或者,由控制设备发送消息以告知第三网络设备所述第二标识信息的内容。The implementation manner for the second network device to determine the second identification information of the third network device may refer to the implementation manner for the second network device to determine the first identification information of the third network device in the embodiment shown in FIG. 13. That is, the second identification information can also be determined through an IGP message, or the control device sends a message to inform the third network device of the content of the second identification information.
S1603:所述第二网络设备基于所述第一标识信息和所述第二标识信息,以及所述第二段标识,生成与所述第三网络设备对应的第一段标识。S1603: The second network device generates a first segment identifier corresponding to the third network device based on the first identification information, the second identification information, and the second segment identifier.
具体地,第二段标识中包括第三网络设备的原始SID的function字段,然后通过第三网络设备发布的IGP报文或控制设备发送的消息,获取第三网络设备的原始SID的flocator字段和vlocator字段,将这三个字段组合即可还原出第三网络设备的原始SID,也即是生成与第三网络设备对应的第一段标识。Specifically, the second segment of the identifier includes the function field of the original SID of the third network device, and then the flocator field and the flocator field of the original SID of the third network device are obtained through the IGP message issued by the third network device or the message sent by the control device The vlocator field, combining these three fields can restore the original SID of the third network device, that is, to generate the first segment identifier corresponding to the third network device.
S1604:所述第二网络设备基于所述第一段标识向所述第三网络设备发送该报文。S1604: The second network device sends the message to the third network device based on the first segment identifier.
S1604的实现方式可以参考图3实施例中的S1304,在此同样不再赘述。For the implementation of S1604, reference may be made to S1304 in the embodiment of FIG. 3, which will not be described again here.
针对图9提供的基于16比特压缩方式的转发报文的过程,如图9所示,头节点R1向中 间节点R2发送的报文中的SRH包括的SID列表为:<8001,1,6,5>。当中间节点R2接收到该报文时,根据中间节点R3发布的IGP报文或控制设备发送的消息,确定中间节点R3的flocator字段为A、vlocator字段为3,然后根据SID列表中与中间节点R3对应的压缩后的6,还原出中间节点R3的原始SID为A:3:6,以便于后续将确定的原始SID A:3:6作为目的地址DA转发该报文。For the process of forwarding packets based on 16-bit compression provided in Figure 9, as shown in Figure 9, the SID list included in the SRH in the message sent by the head node R1 to the intermediate node R2 is: <8001, 1, 6, 5>. When the intermediate node R2 receives the message, according to the IGP message issued by the intermediate node R3 or the message sent by the control device, it is determined that the flocator field of the intermediate node R3 is A and the vlocator field is 3, and then according to the SID list and the intermediate node The compressed 6 corresponding to R3 restores the original SID of the intermediate node R3 as A:3:6, so that the determined original SID A:3:6 is subsequently used as the destination address DA to forward the message.
当中间节点R3接收到该报文时,根据中间节点R4发布的IGP报文或控制设备发送的消息,确定中间节点R4的flocator字段为A、vlocator字段为4,然后根据SID列表中与中间节点R4对应的压缩后的0,还原出中间节点R4的原始SID为A:4:0,以便于后续将确定的原始SID A:4:0作为目的地址DA转发该报文。When the intermediate node R3 receives the message, according to the IGP message issued by the intermediate node R4 or the message sent by the control device, it is determined that the flocator field of the intermediate node R4 is A and the vlocator field is 4, and then according to the SID list and the intermediate node The compressed 0 corresponding to R4 restores the original SID of the intermediate node R4 to A:4:0, so that the determined original SID A:4:0 is subsequently used as the destination address DA to forward the message.
当中间节点R4接收到该报文时,根据尾节点R5发布的IGP报文,或控制设备发送的消息,确定尾节点R5的flocator字段为A,然后根据SID列表中与尾节点R5对应的压缩后的5:8001,还原出尾节点R5的原始SID为A:5:8001,以便于后续将确定的原始SID A:5:8001作为目的地址DA转发该报文。When the intermediate node R4 receives the message, according to the IGP message issued by the tail node R5 or the message sent by the control device, the flocator field of the tail node R5 is determined to be A, and then according to the compression corresponding to the tail node R5 in the SID list After 5:8001, the original SID of the tail node R5 is restored to A:5:8001, so that the determined original SID A:5:8001 is used as the destination address DA to forward the message.
以上基于图9描述的SID还原的过程也仅作为一种可能的示例,上述还原方式也可以应用于其他转发路径上网络节点的SID还原。其他可能的情形可以参考图15所示的实施例中的解释说明,在此不再赘述。The above described SID restoration process based on FIG. 9 is only a possible example, and the above restoration method can also be applied to SID restoration of network nodes on other forwarding paths. For other possible situations, reference may be made to the explanations in the embodiment shown in FIG. 15, which will not be repeated here.
图17是本申请实施例提供的一种段标识的确定方法流程图,应用于基于SRv6网络中的中间节点,也即是,下述实施例中的第一网络设备可以为转发路径上的任一中间节点。图17所示的实施例用于对图10所示的基于20比特压缩方式压缩后的段标识进行还原的过程进行解释说明。如图17所示,该方法包括如下过程:FIG. 17 is a flowchart of a method for determining a segment identifier provided by an embodiment of the present application, which is applied to an intermediate node in an SRv6-based network, that is, the first network device in the following embodiment may be any device on the forwarding path. An intermediate node. The embodiment shown in FIG. 17 is used to explain the process of restoring the segment identifier after compression based on the 20-bit compression method shown in FIG. 10. As shown in Figure 17, the method includes the following processes:
S1701:第二网络设备接收报文,该报文包括与转发路径上的多个连续的网络设备对应的第二段标识,该第二段标识包括第三标识信息和第四标识信息,这多个连续的网络设备对应于多个段标识,第二网络设备位于转发路径上这多个连续的网络设备中的第一个,所述多个段标识包括相同的第三标识信息,所述第四标识信息用这多个连续的网络设备的数量。S1701: The second network device receives a packet. The packet includes a second segment of identifiers corresponding to multiple consecutive network devices on the forwarding path. The second segment of identifiers includes third identification information and fourth identification information. A continuous network device corresponds to multiple segment identifiers, the second network device is located in the first of the multiple continuous network devices on the forwarding path, and the multiple segment identifiers include the same third identification information. Four identification information uses the number of these multiple consecutive network devices.
和图13所示的实施例一样,第二网络设备可以为图4至图12所示的实施例中的报文转发路径中的某一个中间节点。基于图10所示的实施例可知,20比特的压缩方案的应用场景为转发路径上多个网络设备的function字段相同,所以此时,转发路径上包括多个连续的网络设备,这多个连续的网络设备对应于多个段标识,第一网络设备位于转发路径上这多个连续的网络设备中的第一个,所述多个段标识包括相同的第三标识信息(也即是function字段)。例如,第二网络设备可以为节点R2、或者节点R3等中的任一个。这多个连续的网络设备可以为转发路径上,位于第二网络设备之后的支持SRv6、且function字段与第二网络设备的function字段相同的节点。Like 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 FIG. 12. Based on the embodiment shown in Figure 10, the application scenario of the 20-bit compression scheme is that the function fields of multiple network devices on the forwarding path are the same. Therefore, at this time, the forwarding path includes multiple consecutive network devices. The network device corresponding to multiple segment identifiers, the first network device is located in the first of the multiple consecutive network devices on the forwarding path, and the multiple segment identifiers include the same third identification information (that is, the function field ). For example, the second network device may be any one of node R2, node R3, or the like. The multiple consecutive network devices may be nodes on the forwarding path that are located behind the second network device and support SRv6 and have the same function field as the function field of the second network device.
S1701的实现方式可以参考图13实施例中的S1301的实现方式,在此不再赘述。另外,基于图10所示的实施例可知,当多个网络设备的function字段相同时,便可通过20比特的压缩方式压缩各个节点的原始SID。此时,S1701中的第二段标识包括第三标识信息和第四标识信息,第三标识信息用于指示该相同的function字段,第四标识信息用于指示截止当前节点报文转发路径上剩下的具有该相同的function字段的网络设备的数量。也即是,如果多个网络设备对应的第二段标识是基于20比特压缩方式得到的,那么S1701中的第二段标识仅 包括相同的function字段和用于指示具有相同function字段的网络设备的数量的信息,而不包括原始SID中的flocator字段和vlocator字段。在其他可能的实现方式中,第二段标识可以是包括该相同的function字段和用于指示具有相同function字段的网络设备的数量的信息,并且包括原始SID中的flocator字段,而不包括原始SID中的vlocator字段;或者第二段标识可以是包括该相同的function字段和用于指示具有相同function字段的网络设备的数量的信息,并且包括原始SID中的vlocator字段,而不包括原始SID中的flocator字段。For the implementation manner of S1701, reference may be made to the implementation manner of S1301 in the embodiment of FIG. 13, and details are not described herein again. In addition, based on the embodiment shown in FIG. 10, it can be known that when the function fields of multiple network devices are the same, the original SID of each node can be compressed through a 20-bit compression method. At this time, the second segment of identification in S1701 includes third identification information and fourth identification information. The third identification information is used to indicate the same function field, and the fourth identification information is used to indicate that the packet forwarding path of the current node is left. The number of network devices with the same function field below. That is, if the second segment identifiers corresponding to multiple network devices are obtained based on 20-bit compression, then the second segment identifier in S1701 only includes the same function field and the identifier used to indicate network devices with the same function field. The quantity information does not include the flocator field and vlocator field in the original SID. In other possible implementations, the second segment of identification may include the same function field and information used to indicate the number of network devices with the same function field, and include the flocator field in the original SID, but not the original SID Or the second segment of identification may include the same function field and information used to indicate the number of network devices with the same function field, and include the vlocator field in the original SID, but not the original SID flocator field.
此时,对于多个网络设备中的第二网络设备的下一跳的第三网络设备,第二网络设备相当于通过第二段标识获知到第三网络设备的function字段,因此,第二网络设备可以图15所示的实施例中的实现方式来确定第三网络设备对应的第一段标识,也即是,通过下述S1702和S1703生成第三网络设备对应的第一段标识,以便于通过下述S1704根据该第一段标识发送该报文。At this time, for the third network device that is the next hop of the second network device among the multiple network devices, the second network device is equivalent to knowing the function field of the third network device through the second segment identifier. Therefore, the second network device The device can 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 facilitate The message is sent according to the first segment identifier through the following S1704.
S1702:对于多个网络设备中的第二网络设备的下一跳的第三网络设备,所述第二网络设备确定与所述第三网络设备对应的第一标识信息和第二标识信息,所述第一标识信息用于标识所述第三网络设备所属的自治域,所述第二标识信息用于标识所述自治域内的所述第三网络设备。S1702: For the third network device that is the next hop of the second network device among the plurality of network devices, the second network device determines the first identification information and the second identification information corresponding to the third network device, so The first identification information is used to identify the 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.
如图3所示,第二网络设备可以为中间节点R2,此时第三网络设备可以为中间节点R3。第二网络设备还可以为中间节点R3,此时第三网络设备可以为中间节点R4。As shown in FIG. 3, the second network device may be the intermediate node R2, and the third network device may be the intermediate node R3 in this case. The second network device may also be an intermediate node R3, and in this case, the third network device may be an intermediate node R4.
S1703:所述第二网络设备基于所述第一标识信息和所述第二标识信息,以及所述第二段标识,生成与所述第三网络设备对应的第一段标识。S1703: The second network device generates a first segment identifier corresponding to the third network device based on the first identification information, the second identification information, and the second segment identifier.
S1704:所述第二网络设备基于所述第一段标识向所述第三网络设备发送该报文。S1704: The second network device sends the message to the third network device based on the first segment identifier.
S1702、S1703以及S1704的实现方式可以分别参考图15实施例中的S1502、S1503以及S1504的实现方式,在此不再重复说明。The implementation manners of S1702, S1703, and S1704 may refer to the implementation manners of S1502, S1503, and S1504 in the embodiment of FIG. 15 respectively, and the description is not repeated here.
此外,由于第二段标识是通过第三标识信息和第四标识信息来实现对多个具有相同function字段的网络设备的原始SID压缩的,为了便于后续的节点能够确定下一跳节点是否还是这多个网络设备中的一个,第二网络设备在向第三网络设备发送该报文之前,需要对第四标识信息进行更新。在一种可能的实现方式中,第二网络设备可以基于第四标识信息确定第五标识信息;确定更新后的第一段标识,该更新后的第一段标识包括第三标识信息和第五标识信息;所述第二网络设备基于所述第二段标识向所述第二网络设备发送所述报文,所述报文中包括所述更新后的第一段标识。In addition, since the second segment of identification is achieved by compressing the original SIDs of multiple network devices with the same function field through the third identification information and the fourth identification information, in order to facilitate subsequent nodes to determine whether the next hop node is still this One of the multiple network devices, the second network device needs to update the fourth identification information before sending the message to the third network device. In a possible implementation manner, the second network device may determine the fifth identification information based on the fourth identification information; determine the updated first-segment identification, and the updated first-segment identification includes the third identification information and the fifth identification information. Identification information; the second network device sends the message to the second network device based on the second segment identifier, and the message includes the updated first segment identifier.
具体地,第四标识信息可以为第一数值,第五标识信息为第二数值,第二数值为第一数值减1。也即是,更新第四标识信息以通告下一跳节点具有该相同function字段的网络设备的剩余个数。当下一跳节点接收到更新的第四标识信息时,如果该更新后的第四标识信息指示的数值大于1,则继续通过上述方式确定报文的目的地址。如果更新后的第四标识信息指示的数值为1,则需通过SID列表中其他信息来确定下一跳节点的SID的压缩方式,以确定报文的目的地址。Specifically, the fourth identification information may be a first value, the fifth identification information may be a second value, and the second value may be the first value minus one. That is, the fourth identification information is updated to advertise the remaining number of network devices with the same function field in the next hop node. When the next hop node receives the updated fourth identification information, if the value indicated by the updated fourth identification information is greater than 1, it continues to determine the destination address of the message in the above-mentioned manner. If the value indicated by the updated fourth identification information is 1, other information in the SID list needs to be used to determine the compression mode of the SID of the next hop node to determine the destination address of the message.
针对图11提供的基于20比特压缩方式的转发报文的过程,如图11所示,头节点R1向中间节点R2发送的报文中的SRH包括的SID列表为:<5:8001,5060:3>。当中间节点R2接收到该报文时,确定中间节点R3的flocator字段为A、vlocator字段为3,然后根据SID列表中与中间节点R3对应的压缩后的5060,还原出中间节点R3的原始SID为A:3:5060,并将 报文中的5060:3更新为5060:2,用于指示报文转发路径上还有两个function字段为5060的网络设备。R2将确定的原始SID A:3:5060作为目的地址DA转发该报文。For the process of forwarding messages based on 20-bit compression provided in Figure 11, as shown in Figure 11, the SID list included in the SRH in the message sent by the head node R1 to the intermediate node R2 is: <5:8001, 5060: 3>. When the intermediate node R2 receives the message, it determines that the flocator field of the intermediate node R3 is A and the vlocator field is 3, and then restores the original SID of the intermediate node R3 according to the compressed 5060 corresponding to the intermediate node R3 in the SID list It is A:3:5060, and the 5060:3 in the message is updated to 5060:2, which is used to indicate that there are two network devices with a function field of 5060 on the message forwarding path. R2 uses the determined original SID A:3:5060 as the destination address DA to forward the message.
当中间节点R3接收到该报文时,确定中间节点R4的flocator字段为A、vlocator字段为4,然后根据SID列表中与中间节点R4对应的压缩后的5060,还原出中间节点R4的原始SID为A:4:5060,并将报文中的5060:2更新为5060:1,用于指示报文转发路径上还有1个function字段为5060的网络设备。R3将确定的原始SID A:4:5060作为目的地址DA转发该报文。When the intermediate node R3 receives the message, it determines that the flocator field of the intermediate node R4 is A and the vlocator field is 4, and then restores the original SID of the intermediate node R4 according to the compressed 5060 corresponding to the intermediate node R4 in the SID list It is A:4:5060, and the 5060:2 in the message is updated to 5060:1, which is used to indicate that there is a network device with a function field of 5060 on the message forwarding path. R3 uses the determined original SID A:4:5060 as the destination address DA to forward the message.
当中间节点R4接收到该报文时,由于报文中5060:1指示只有一个功能字段为5060的网络设备,而该网络设备即为中间节点R4,因此,中间节点R4需要先确定尾节点的R5的压缩方式,在确定出尾节点的压缩方式为32比特压缩方式后,根据尾节点R5发布的IGP报文或控制设备发送的消息确定尾节点R5的flocator字段为A,然后根据SID列表中与尾节点R5对应的压缩后的5:8001,还原出尾节点R5的原始SID为A:5:8001,后续将确定的原始SID A:5:8001作为目的地址DA转发该报文。When the intermediate node R4 receives the message, because 5060:1 in the message indicates that there is only one network device with a function field of 5060, and this network device is the intermediate node R4, the intermediate node R4 needs to determine the tail node's The compression method of R5, after determining that the compression method of the tail node is 32-bit compression, according to the IGP message issued by the tail node R5 or the message sent by the control device, the flocator field of the tail node R5 is determined to be A, and then according to the SID list The compressed 5:8001 corresponding to the tail node R5, the original SID of the tail node R5 is restored to A:5:8001, and then the determined original SID A:5:8001 is used as the destination address DA to forward the message.
同样地,以上基于图11描述的SID还原的过程也仅作为一种可能的示例,上述还原方式也可以应用于其他转发路径上网络节点的SID还原。其他可能的情形可以参考图15所示的实施例中的解释说明,在此不再赘述。Similarly, the SID restoration process described above based on FIG. 11 is only used as a possible example, and the above restoration method can also be applied to SID restoration of network nodes on other forwarding paths. For other possible situations, reference may be made to the explanations in the embodiment shown in FIG. 15, which will not be repeated here.
基于图14至图17三种不同的还原原始SID的方式可知,在不同的压缩方案中,第二网络设备确定第三网络设备对应的第一段标识的方式也不同,因此,第二网络设备在基于第二段标识还原第三网络设备对应的第一段标识之前,需要先确定接收到的报文中包括的对应与第三网络设备的第二段标识的压缩方案。Based on the three different ways of restoring the original SID in Figures 14 to 17, it can be seen that in different compression schemes, the second network device determines the first segment identifier corresponding to the third network device in different ways. Therefore, the second network device Before restoring the first segment identifier corresponding to the third network device based on the second segment identifier, it is necessary to determine the compression scheme included in the received message corresponding to the second segment identifier of the third network device.
在一种可能的实现方式中,基于图12所示的实施例可知,接收到的报文还携带用于标识第三网络设备对应的第二段标识的压缩方案的标识信息。为了后续便于说明,将该标识信息称为压缩策略标识信息(也即是图12所示的实施例中的标识信息),因此,第一网络设备可以先根据该压缩策略标识信息确定第二段标识对应的压缩方案,然后根据确定的压缩方案通过上述图14至16中相应实施例来还原第三网络设备对应的第一段标识。In a possible implementation manner, based on the embodiment shown in FIG. 12, it can be known that the received message also carries identification information for identifying the compression scheme of the second segment identification corresponding to the third network device. For ease of description, this identification information is called compression strategy identification information (that is, identification information in the embodiment shown in FIG. 12). Therefore, the first network device may first determine the second segment according to the compression strategy identification information. Identify the corresponding compression scheme, and then restore the first segment identifier corresponding to the third network device through the corresponding embodiments in FIGS. 14 to 16 according to the determined compression scheme.
在一种可能的实现方式中,如图12所示,假设该压缩策略标识信息携带在SRH中的一个TLV中。此时,第一网络设备在接收到该报文时,可以对该TLV进行解析,根据该TLV确定第三网络设备的压缩方案。该TLV中指示各个SID的压缩方案已经在图12所示的实施例中进行了详细说明,第一网络设别只需按照图12所示的实施例解析出第三网络设备的压缩方案即可。In a possible implementation manner, as shown in FIG. 12, it is assumed that the compression strategy identification information is carried in a TLV in the SRH. At this time, when the first network device receives the message, it can parse the TLV and determine the compression scheme of the third network device according to the TLV. The compression scheme of each SID indicated in the TLV has been described in detail in the embodiment shown in FIG. 12. The first network device only needs to analyze the compression scheme of the third network device according to the embodiment shown in FIG. 12 .
接下来对本申请实施例提供的SRv6网络中的任一网络设备的结构进行解释说明。Next, the structure of any network device in the SRv6 network provided in the embodiment of the present application will be explained.
图18是本申请实施例提供的一种网络设备的结构示意图,该网络设备可以为上述任一实施例中SRv6网络中报文转发路径中的多个节点中的任一节点。该网络设备1800可以为交换机,路由器或者其他转发报文的网路设备。在该实施例中,该网络设备1800包括:主控板1810、接口板1830和接口板1840。多个接口板的情况下可以包括交换网板(图中未示出),该交换网板用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。FIG. 18 is a schematic structural diagram of a network device provided by an embodiment of the present application. The network device may be any one of multiple nodes in the packet forwarding path in the SRv6 network in any of the foregoing embodiments. The network device 1800 may be a switch, a router, or other network device that forwards packets. In this embodiment, the network device 1800 includes: a main control board 1810, an interface board 1830, and an interface board 1840. In the case of multiple interface boards, a switching network board (not shown in the figure) may be included, and the switching network board is used to complete data exchange between various interface boards (interface boards are also called line cards or service boards).
主控板1810用于完成系统管理、设备维护、协议处理等功能。接口板1830和1840用于提供各种业务接口(例如,POS接口、GE接口、ATM接口等),并实现报文的转发。主控板 1810上主要有3类功能单元:系统管理控制单元、系统时钟单元和系统维护单元。主控板1810、接口板1830以及接口板1840之间通过系统总线与系统背板相连实现互通。接口板1830上包括一个或多个处理器1831。处理器1831用于对接口板进行控制管理并与主控板上的中央处理器进行通信,以及用于报文的转发处理。接口板1830上的存储器1832用于存储转发表项,处理器1831通过查找存储器1832中存储的转发表项进行报文的转发。The main control board 1810 is used to complete functions such as system management, equipment maintenance, and protocol processing. The interface boards 1830 and 1840 are used to provide various service interfaces (for example, POS interface, GE interface, ATM interface, etc.), and implement message forwarding. There are mainly three types of functional units on the main control board 1810: system management control unit, system clock unit, and 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 achieve intercommunication. The interface board 1830 includes one or more processors 1831. The processor 1831 is used for controlling and managing the interface board, communicating with the central processing unit on the main control board, and for forwarding processing of messages. The memory 1832 on the interface board 1830 is used to store forwarding entries, and the processor 1831 forwards the message by looking up the forwarding entries stored in the memory 1832.
所述接口板1830包括一个或多个网络接口1833用于接收上一跳节点发送的报文,并根据处理器1831的指示向下一跳网络节点发送处理后的报文。具体实现过程这里不再逐一赘述。所述处理器1831的具体功能这里同样不再逐一赘述。The interface board 1830 includes one or more network interfaces 1833 for receiving the message sent by the previous hop node, and sending the processed message to the next hop network node according to the instruction of the processor 1831. The specific implementation process will not be repeated here one by one. The specific functions of the processor 1831 are also not repeated here one by one.
可以理解,如图18所示,本实施例中包括多个接口板,采用分布式的转发机制,这种机制下,接口板1840上的操作与所述接口板1830的操作基本相似,为了简洁,不再赘述。此外,可以理解的是,图18中的接口板1830中的处理器1831和/或1841可以是专用硬件或芯片,如网络处理器或者专用集成电路(application specific integrated circuit)来实现上述功能,这种实现方式即为通常所说的转发面采用专用硬件或芯片处理的方式。采用网络处理器这一专用硬件或芯片的具体实现方式可以参考下面图19所示的实施例。在另外的实施方式中,所述处理器1831和/或1841也可以采用通用的处理器,如通用的CPU来实现以上描述的功能。It can be understood that, as shown in FIG. 18, this embodiment includes multiple interface boards and adopts a distributed forwarding mechanism. Under this mechanism, the operation on the interface board 1840 is basically similar to that of the interface board 1830. For the sake of brevity ,No longer. In addition, it can be understood that the processor 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. One way to achieve this is the so-called forwarding plane using dedicated hardware or chip processing. For a specific implementation manner using a dedicated hardware or chip of a network processor, reference may be made to the embodiment shown in FIG. 19 below. In another implementation manner, the processor 1831 and/or 1841 may also adopt 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 more than one, it may include a main main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing capability of the device, the more interface boards provided. In the case of multiple interface boards, the multiple interface boards can communicate with each other through one or more switching network boards, and when there are more than one, the load sharing and redundant backup can be realized together. Under the centralized forwarding architecture, the device does not need to switch the network board, and the interface board undertakes the processing function of the business data of the entire system. Under the distributed forwarding architecture, the device includes multiple interface boards, which can realize data exchange between multiple interface boards through the switching network board, and provide large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture. The specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
具体的实施例中,存储器1832可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器1832可以是独立存在,通过通信总线与处理器1831相连接。存储器1832也可以和处理器1831集成在一起。In a specific embodiment, the memory 1832 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM), or can store Other types of dynamic storage devices for information and instructions can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only Memory, CD-ROM, or Other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures And any other media that can be accessed by the computer, but not limited to this. The memory 1832 may exist independently, and is connected to the processor 1831 through a communication bus. The memory 1832 may also be integrated with the processor 1831.
存储器1832用于存储程序代码,并由处理器1831来控制执行,以执行上述实施例所提供的路径探测方法。处理器1831用于执行存储器1832中存储的程序代码。程序代码中可以包括一个或多个软件模块。这一个或多个软件模块可以为下面图21或图22任一实施例中提供的软件模块。The memory 1832 is used to store program codes, and is controlled by the processor 1831 to execute, so as to execute the path detection method provided in the foregoing embodiments. The processor 1831 is configured to execute the program code stored in the memory 1832. One or more software modules can be included in the program code. The one or more software modules may be the software modules provided in any of the following embodiments in FIG. 21 or FIG. 22.
具体实施例中,所述网络接口1833,可以是使用任何收发器一类的装置,用于与其它设备或通信网络通信,如以太网,无线接入网(radio access networkRAN),无线局域网(wireless local area networks,WLAN)等。In a specific embodiment, the network interface 1833 may be any device such as a transceiver for communicating with other devices or communication networks, such as Ethernet, radio access network RAN, and wireless local area network (wireless local area network). local area networks, WLAN), etc.
图19是本申请实施例提供的另一种网络设备的结构示意图,该网络设备可以为上述图任一实施例提供的SRv6网络中的多个节点中的任一节点。该网络设备1900可以为交换机,路由器或者其他转发报文的网路设备。在该实施例中,该网络设备1900包括:主控板1910、接口板1930、交换网板1920和接口板1940。主控板1910用于完成系统管理、设备维护、协议处理等功能。交换网板1920用于完成各接口板(接口板也称为线卡或业务板)之间的数据交换。接口板1930和1940用于提供各种业务接口(例如,POS接口、GE接口、ATM接口等),并实现数据包的转发。控制平面由主控板1910的各管控单元及接口板1930和1940上的管控单元等构成。主控板1910上主要有3类功能单元:系统管理控制单元、系统时钟单元和系统维护单元。主控板1910、接口板1930和1940,以及交换网板1920之间通过系统总线与系统背板相连实现互通。接口板1930上的中央处理器1931用于对接口板进行控制管理并与主控板上的中央处理器进行通信。接口板1930上的转发表项存储器1934用于存储转发表项,网络处理器1932通过查找转发表项存储器1934中存储的转发表项进行报文的转发。FIG. 19 is a schematic structural diagram of another network device provided by an embodiment of the present application. The network device may be any one of the multiple nodes in the SRv6 network provided in any embodiment of the above figure. The network device 1900 may be a switch, a router, or other network device that forwards packets. In this embodiment, the network device 1900 includes: a main control board 1910, an interface board 1930, a switching network board 1920, and an interface board 1940. The main control board 1910 is used to complete functions such as system management, equipment maintenance, and protocol processing. The switching network board 1920 is used to complete data exchange between various 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 (for example, POS interface, GE interface, ATM interface, etc.) and implement data packet forwarding. The control plane is composed of the management and control units of the main control board 1910 and the management and control units on the interface boards 1930 and 1940. There are mainly three types of functional units on the main control board 1910: 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 switching network board 1920 are connected to the system backplane through the system bus to achieve intercommunication. The central processing unit 1931 on the interface board 1930 is used to control and manage the interface board and communicate with the central processing unit on the main control board. The forwarding entry memory 1934 on the interface board 1930 is used to store forwarding entries, and the network processor 1932 forwards the message by searching for the forwarding entries stored in the forwarding entry memory 1934.
所述接口板1930的物理接口卡1933用于接收上一跳节点发送的报文。具体实现过程这里不再逐一赘述。The physical interface card 1933 of the interface board 1930 is used to receive the message sent by the previous hop node. The specific implementation process will not be repeated here one by one.
所述网络处理器1932的具体功能这里不再逐一赘述。The specific functions of the network processor 1932 will not be repeated here.
然后,处理后的报文通过所述物理接口卡1933向该第一节点的下一跳节点发送。具体实现过程这里不再逐一赘述。Then, the processed message is sent to the next hop node of the first node through the physical interface card 1933. The specific implementation process will not be repeated here one by one.
可以理解,如图19所示,本实施例中包括多个接口板,采用分布式的转发机制,这种机制下,接口板1940上的操作与所述接口板1930的操作基本相似,为了简洁,不再赘述。此外,如上所述,图19中的网络处理器1932以及1942的功能可以用专用集成电路(application specific integrated circuit)替换来实现。It can be understood that, as shown in FIG. 19, this embodiment includes multiple interface boards and adopts a distributed forwarding mechanism. Under this mechanism, the operation on the interface board 1940 is basically similar to the operation of the interface board 1930. For the sake of brevity ,No longer. In addition, as described above, the functions of the network processors 1932 and 1942 in FIG. 19 can be implemented by replacing application specific integrated circuits.
此外,需要说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,该设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,该设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,该设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的设备。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。In addition, it should be noted that there may be one or more main control boards, and when there are more than one, it may include a main main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing capability of the device, the more interface boards provided. There may also be one or more physical interface cards on the interface board. The switching network board may not exist, or there may be one or more. When there are more than one, the load sharing and redundant backup can be realized together. Under the centralized forwarding architecture, the device does not need to switch the network board, and the interface board undertakes the processing function of the business data of the entire system. Under the distributed forwarding architecture, the device can have at least one switching network board, and data exchange between multiple interface boards can be realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture. The specific architecture used depends on the specific networking deployment scenario, and there is no restriction here.
图20是本申请实施例提供的一种上述图19所示网络设备中的接口板2000的结构示意图,该接口板2000所在的网络设备可以为上述任一实施例中的报文转发路径包括的多个节点中的任一节点。该接口板2000可以包括物理接口卡(physical interface card,PIC)2030,网络处理器(network processor,NP)2020,以及流量管理模块(traffic management)2020。FIG. 20 is a schematic structural diagram of the interface board 2000 in the network device shown in FIG. 19 provided by an embodiment of the present application. The network device where the interface board 2000 is located may be included in the packet forwarding path in any of the foregoing embodiments. Any one of multiple nodes. The interface board 2000 may include a physical interface card (PIC) 2030, a network processor (NP) 2020, and a traffic management module (traffic management) 2020.
其中,PIC:物理接口卡(physical interface card),用于实现物理层的对接功能,原始的流量由此进入网络设备的接口板,以及处理后的报文从该PIC卡发出。Among them, PIC: physical interface card (physical interface card), used to realize the docking function of the physical layer, the original traffic enters the interface board of the network device from this, and the processed message is sent from the PIC card.
网络处理器NP2020用于实现报文的转发处理。具体而言,上行报文的处理包括:报文入接口的处理,上行流分类,转发表查找;下行报文的处理:转发表查找,下行流分类,出接 口处理等等。The network processor NP2020 is used to implement message forwarding processing. Specifically, the processing of upstream packets includes: packet inbound interface processing, upstream classification, forwarding table lookup; downstream packet processing: forwarding table lookup, downstream flow classification, outgoing interface processing, and so on.
流量管理TM,用于实现服务质量(Quality of Service,QoS)、线速转发、大容量缓存,队列管理等功能。具体而言,上行流量管理包括:上行Qos处理(如拥塞管理和队列调度等)以及切片处理;下行流量管理包括:组包处理,多播复制,以及下行Qos处理(如拥塞管理和队列调度等)。Traffic ManagementTM is used to implement functions such as Quality of Service (QoS), wire-speed forwarding, large-capacity buffering, and queue management. Specifically, upstream traffic management includes: upstream QoS processing (such as congestion management and queue scheduling, etc.) and slicing processing; downstream traffic management includes: packet processing, multicast replication, and downstream QoS processing (such as congestion management and queue scheduling, etc.) ).
可以理解的是,若网络设备有多个接口板2000的情况下,多个接口板2000之间可以通过交换网2040通信。It is understandable that if the network device has multiple interface boards 2000, the multiple interface boards 2000 can communicate through the switching network 2040.
需要说明的是,图20仅示出了NP内部的示意性处理流程或模块,具体实现中各模块的处理顺序不限于此,而且实际应用中可以根据需要部署其他模块或者处理流程。本申请实施例对比不做限制。It should be noted that FIG. 20 only shows a schematic processing flow or module inside the NP, and the processing sequence of each module in a specific implementation is not limited to this, and other modules or processing flows can be deployed as needed in practical applications. The comparison of the embodiments of this application is not limited.
图21是本申请实施例提供的一种第一网络设备的示意图,应用于支持SRv6协议的网络中。所述SRv6网络中至少包括多个支持SRv6协议的网络设备。在一种可能的实现方式中,所述SRv6网络中也可以包括其他一个或多个不支持SRv6协议的网络设备。第一网络设备例如可以是图3示出的R1,可以是用于实现上述图4、图6、图8、图10中任一提供的方法中的第一网络设备等。如图21所示,该第一网络设备2100包括:FIG. 21 is a schematic diagram of a first network device provided by an embodiment of the present application, which is applied to a network supporting the SRv6 protocol. The SRv6 network includes at least a plurality of network devices supporting the SRv6 protocol. In a possible implementation manner, the SRv6 network may also include one or more other network devices that do not support the SRv6 protocol. The first network device may be, for example, R1 shown in FIG. 3, and may be the first network device used to implement any of the methods provided in FIG. 4, FIG. 6, FIG. 8, and FIG. 10, etc. As shown in FIG. 21, the first network device 2100 includes:
确定模块2101,用于确定与第二网络设备对应的第一段标识,所述第一段标识包括第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域。具体实现方式可以参考图4实施例中的S401、图6实施例中的S601、图8实施例中的S801以及图10实施例中的S1001。The determining module 2101 is configured to determine a first segment identifier corresponding to a second network device, where the first segment identifier includes first identification information, and the first identification information is used to identify the autonomous domain to which the second network device belongs . For specific implementation manners, reference may be made 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.
生成模块2102,用于基于所述第一段标识生成第二段标识,所述第二段标识不包括所述第一标识信息。具体实现方式可以参考图4实施例中的S402、图6实施例中的S602、图8实施例中的S802以及图10实施例中的S1002。The generating module 2102 is configured to generate a second segment identifier based on the first segment identifier, where the second segment identifier does not include the first identifier information. For a specific implementation manner, reference may be made 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.
发送模块2103,用于向所述第二网络设备发送报文,所述报文包括所述第二段标识。具体实现方式可以参考图4实施例中的S403、图6实施例中的S603、图8实施例中的S803以及图10实施例中的S1003。The sending module 2103 is configured to send a message to the second network device, where the message includes the second segment identifier. For specific implementation manners, reference may be made 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.
可选地,确定模块2101,还用于确定与第三网络设备对应的第三段标识,所述第三段标识包括第二标识信息和第三标识信息,所述第二标识信息用于标识所述第三网络设备所属的自治域,所述第三标识信息用于标识所述自治域内的所述第三网络设备;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 identification information and third identification information, and the second identification information is used to identify The autonomous domain to which the third network device belongs, and the third identification information is used to identify the third network device in the autonomous domain;
生成模块2102,还用于基于所述第三段标识生成所述第四段标识,所述第四段标识不包括所述第二标识信息和所述第三标识信息;The generating module 2102 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 identification information and the third identification information;
发送模块2103,还用于向所述第三网络设备发送所述报文,所述报文包括所述第四段标识。The sending module 2103 is further configured to send the message to the third network device, where the message 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 Identifies the same paragraph.
可选地,确定模块2101,还用于确定与多个网络设备对应的多个段标识,所述多个段标识分别包括相同的第四标识信息;Optionally, the determining module 2101 is further configured to determine multiple segment identifiers corresponding to multiple network devices, where the multiple segment identifiers respectively include the same fourth identification information;
生成模块2102,还用于基于所述多个段标识生成第五段标识,所述第五段标识包括所述第四标识信息和第五标识信息,所述第五标识信息用于标识所述多个网络设备的个数;The generating module 2102 is further configured to generate a fifth segment identifier based on the multiple 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 The number of multiple network devices;
发送模块2103,还用于发送所述报文,所述报文包括所述第五段标识。The sending module 2103 is further configured to send the message, and the message 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 used to uniquely identify the plurality of network devices. The multiple network devices in the autonomous domain to which the network device belongs.
可选地,所述多个网络设备包括第二网络设备,所述第二段标识和所述第五段标识为同一段标识。Optionally, the multiple network devices include a second network device, and the second segment identifier and the fifth segment identifier are the same segment identifier.
可选地,所述报文还包括第七标识信息,所述第七标识信息用于标识所述第一网络设备生成所述第二段标识的策略。Optionally, the message further includes seventh identification information, where the seventh identification information is used to identify a strategy for generating the second segment identifier by the first network device.
可选地,所述确定模块2101确定与多个网络设备对应的多个段标识,包括:Optionally, the determining module 2101 determining multiple segment identifiers corresponding to multiple network devices includes:
所述确定模块基于所述多个网络设备分别发送的内部网关协议IGP消息,确定与多个网络设备对应的多个段标识;或者,所述确定模块基于控制设备发送的控制消息,确定与多个网络设备对应的多个段标识。The determining module determines the multiple segment identifiers corresponding to the multiple network devices based on the internal gateway protocol IGP messages sent by the multiple network devices respectively; or, the determining module determines the multiple segments based on the control message sent by the control device. Multiple segment identifiers corresponding to each network device.
在本申请实施例中,第一网络设备可以根据第二网络设备对应的第一段标识确定第二网络设备对应的第二段标识,由于第一段标识包括用于标识第二网络设备所属的自治域的第一标识信息,而第二段标识不包括第一标识信息,因此,第二段标识相当于对第一段标识进行了压缩,如此,第一网络设备在向第二网络设备发送的报文中便可携带压缩后的段标识,以降低第一网络设备作为头节点封装报文的压力。此外,对段标识进行压缩也有利于提升报文转发效率。In the embodiment of the present application, the first network device may determine the second segment identifier corresponding to the second network device according to the first segment identifier corresponding to the second network device, because the first segment identifier includes the identifier used to identify the second network device to which the second network device belongs. The first identification information of the autonomous domain, and the second identification information does not include the first identification information. Therefore, the second identification is equivalent to compressing the first identification. In this way, the first network device is sending to the second network device. The compressed segment identifier can be carried in the message to reduce the pressure of the first network device as the head node to encapsulate the message. In addition, compressing the segment identifier is also beneficial to improve the efficiency of message forwarding.
需要说明的是:上述实施例提供的第一网络设备在确定段标识时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的第一网络设备与段标识的确定方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the first network device provided in the above embodiment determines the segment identifier, only the division of the above functional modules is used as an example for illustration. In actual applications, the above functions can be allocated by different functional modules according to needs. , Divide the internal structure of the device into different functional modules to complete all or part of the functions described above. In addition, the first network device and the method embodiment for determining the segment identifier provided in the above-mentioned embodiment belong to the same concept. For the specific implementation process, please refer to the method embodiment for details, which will not be repeated here.
图22是本申请实施例提供的另一种第一网络设备的示意图,应用于SRv6网络中,所述SRv6网络中至少包括多个支持SRv6协议的网络设备。在一种可能的实现方式中,所述SRv6网络中也可以包括其他一个或多个不支持SRv6协议的网络设备。第一网络设备例如可以是图3示出的任一中间节点R2、R3或R4,可以是用于实现上述图13、图15、图16、图17中任一提供的方法中的第二网络设备等。如图22所示,该第一网络设备2200包括:FIG. 22 is a schematic diagram of another first network device provided by an embodiment of the present application, which is applied to an SRv6 network, and the SRv6 network includes at least a plurality of network devices supporting the SRv6 protocol. In a possible implementation manner, the SRv6 network may also include one or more other network devices that do not support the SRv6 protocol. The first network device may be, for example, any intermediate node R2, R3, or R4 shown in FIG. 3, and may be used to implement the second network in any of the methods provided in FIG. 13, FIG. 15, FIG. 16, and FIG. Equipment, etc. As shown in FIG. 22, the first network device 2200 includes:
接收模块2201,用于接收报文,所述报文包括与所述第二网络设备对应的第一段标识。具体实现方式可以参考图13实施例中的S1301、图15实施例中的S1501、图16实施例中的S1601、以及图17实施例中的S1701。The receiving module 2201 is configured to receive a message, the message including a first segment identifier corresponding to the second network device. For specific implementations, 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.
确定模块2202,用于确定与所述第二网络设备对应的第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域。具体实现方式可以参考图13实施例中的S1302、图15实施例中的S1502、图16实施例中的S1602、以及图17实施例中的S1702。The determining module 2202 is configured to determine first identification information corresponding to the second network device, where the first identification information is used to identify the autonomous domain to which the second network device belongs. For a specific implementation manner, reference may be made 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.
生成模块2203,用于基于所述第一标识信息和所述第一段标识,生成与所述第二网络设备对应的第二段标识。具体实现方式可以参考图13实施例中的S1303、图15实施例中的S1503、图16实施例中的S1603、以及图17实施例中的S1703。The generating module 2203 is configured to generate a second segment identifier corresponding to the second network device based on the first identifier information and the first segment identifier. For specific implementations, 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.
发送模块2204,用于基于所述第二段标识向所述第二网络设备发送所述报文。具体实现 方式可以参考图13实施例中的S1304、图15实施例中的S1504、图16实施例中的S1604、以及图17实施例中的S1704。The sending module 2204 is configured to send the message to the second network device based on the second segment identifier. For specific implementations, 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,
确定模块2202,还用于确定第二标识信息,所述第二标识信息为用于标识该自治域内的该第二网络设备;The determining module 2202 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;
生成模块2203,还用于基于所述第一标识信息、所述第二标识信息和所述第一段标识,生成与所述第二网络设备对应的所述第二段标识。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, the forwarding path of the message includes multiple consecutive network devices, the multiple consecutive network devices correspond to multiple segment identifiers, and the first network device is located in the multiple consecutive network devices on the forwarding path The first one, the multiple segment identifiers include the same third identifier information, the first segment identifier includes the third identifier information and the fourth identifier information, and the fourth identifier information is used to indicate the number of the multiple consecutive network devices ;
所述发送模块2204包括:The sending module 2204 includes:
第一确定子单元,用于基于所述第四标识信息确定第五标识信息;The first determining subunit is configured to determine fifth identification information based on the fourth identification information;
第二确定子单元,用于确定更新后的第一段标识,所述更新后的第一段标识包括所述第三标识信息和所述第五标识信息;The second determining subunit is configured to determine the updated first segment identifier, where the updated first segment identifier includes the third identification information and the fifth identification information;
发送子单元,用于基于所述第二段标识向所述第二网络设备发送所述报文,所述报文中包括所述更新后的第一段标识。The sending subunit is configured to send the message to the second network device based on the second segment identifier, where the message includes the updated first segment identifier.
可选地,第四标识信息为第一数值,第五标识信息为第二数值,第二数值为第一数值减1。Optionally, the fourth identification information is the first value, the fifth identification information is the second value, and the second value is the first value minus one.
可选地,所述确定模块2202包括:Optionally, the determining module 2202 includes:
接收子单元,用于接收消息,所述消息包括对应于所述第二网络设备的第六标识信息和第七标识信息,所述第六标识信息包括所述第一标识信息,所述第七标识信息用于标识所述第一标识信息的长度;The receiving subunit is configured to receive 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, and the seventh identification information. The identification information is used to identify the length of the first identification information;
第三确定子单元,用于基于所述第六标识信息和所述第七标识信息,确定所述第一标识信息。The third determining subunit is 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 message forwarding path by the method provided in the first aspect, the first network device can obtain the compressed part of the segment identifier when receiving the message. Then the compressed message of the second network device is restored to obtain the destination address for forwarding the message. Since the head node compresses the segment identifiers of each node, the bandwidth occupied by the packet transmission between the first network device and the second network device will be reduced, thereby improving the efficiency of packet forwarding.
需要说明的是:上述实施例提供第一网络设备在确定段标识时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供第一网络设备与段标识的确定方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the foregoing embodiment provides that when the first network device determines the segment identifier, only the division of the foregoing functional modules is used as an example for illustration. In actual applications, the foregoing function allocation can be completed by different functional modules as required. That is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the foregoing embodiment provides the same conception of the method for determining the first network device and the segment identifier. For the specific implementation process, refer to the method embodiment, which will not be repeated here.
此外,本申请实施例还提供了一种网络系统,所述系统包括第一网络设备、第二网络设备和第三网络设备,所述第一网络设备,用于确定与第二网络设备对应的第一段标识,所述第一段标识包括第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域, 所述第一网络设备基于所述第一段标识生成第二段标识,所述第二段标识不包括所述第一标识信息,所述第一网络设备向第三网络设备发送报文,所述报文包括所述第二段标识;所述第三网络设备,用于接收报文,所述报文包括与所述第二网络设备对应的所述第二段标识,所述第三网络设备确定与所述第二网络设备对应的所述第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域,所述第三网络设备基于所述第一标识信息和所述第一段标识,生成与所述第二网络设备对应的所述第一段标识,所述第三网络设备基于所述第一段标识向所述第二网络设备发送所述报文。In addition, an embodiment of the present application also provides a network system, which includes a first network device, a second network device, and a third network device. The first network device is used to determine the network device corresponding to the second network device. The first segment identifier, the first segment identifier includes first identification information, the first identification information is used to identify the autonomous domain to which the second network device belongs, and the first network device is based on the first segment identifier Generating a second segment identifier, the second segment identifier does not include the first identification information, the first network device sends a message to a third network device, and the message includes the second segment identifier; The third network device is configured to receive a message, the message including the second segment identifier corresponding to the second network device, and the third network device determines the First identification information, where the first identification information is used to identify the autonomous domain to which the second network device belongs, and the third network device generates a connection with the first identification information based on the first identification information and the first segment identification The first segment identifier corresponding to the second network device, and the third network device sends the message to the second network device based on the first segment identifier.
网络系统中的第一网络设备例如可以是图3示出的R1,用于实现上述图4、图6、图8、图10中任一提供的方法中的第一网络设备,也可以用于本申请前述实施例中提及的R1执行的其他可能的方法。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 any of the methods provided in FIG. 4, FIG. 6, FIG. 8, and FIG. Other possible methods executed by R1 mentioned in the foregoing embodiment of this application.
网络系统中的第二网络设备可以是图3示出的R2、R3和/或R4,用于实现上述图13、图15、图16、图17中任一提供的方法中的第二网络设备,也可以用于本申请前述实施例中提及的R2、R3和/或R4执行的其他可能的方法。The second network device in the network system may be R2, R3, and/or R4 shown in FIG. 3, which is used to implement the second network device in any of the methods provided in FIG. 13, FIG. 15, FIG. 16, and FIG. It can also be used in other possible methods performed by R2, R3, and/or R4 mentioned in the foregoing embodiments of this application.
关于网络系统中的第一网络设备、第二网络设备以及第三网络设备的具体功能已在上述方法实施例中进行了详细说明,在此就不再赘述。The specific functions of the first network device, the second network device, and the third network device in the network system have been described in detail in the above method embodiment, and will not be repeated here.
图23是本发明实施例提供的一种网络设备的结构示意图。上述实施例中的任一网络设备均可以通过图23所示的网络设备2300来实现,此时,该网络设备2300可以为交换机,路由器或者其他转发报文的网路设备。另外,上述实施例中的控制设备同样可以通过图23所示的网络设备2300来实现,此时该网络设备2300的具体功能可以参考前述实施例中的控制设备的具体实现方式,在此不再赘述。参见图23,该网络设备包括至少一个处理器2301,通信总线2302、存储器2303以及至少一个通信接口2304。FIG. 23 is a schematic structural diagram of a network device provided by an embodiment of the present invention. Any network device in the foregoing embodiment may be implemented by the network device 2300 shown in FIG. 23. In this case, the network device 2300 may be a switch, a router, or other network device that forwards packets. In addition, the control device in the foregoing embodiment can also be implemented by the network device 2300 shown in FIG. 23. At this time, the specific functions of the network device 2300 can refer to the specific implementation of the control device in the foregoing embodiment, which will not be repeated here. Go into details. 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.
处理器2301可以是一个通用中央处理器(central processing unit,CPU)、特定应用集成电路(application-specific integrated circuit,ASIC)或一个或多个用于控制本申请方案程序执行的集成电路。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 program execution of the solution of the present application.
通信总线2302可包括一通路,在上述组件之间传送信息。The communication bus 2302 may include a path for transferring information between the above-mentioned components.
存储器2303可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only Memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘或者其它磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器2303可以是独立存在,通过通信总线2302与处理器2301相连接。存储器2303也可以和处理器2301集成在一起。The memory 2303 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions The dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only Memory (CD-ROM) or other optical disc storage, optical disc storage (Including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer Any other media, but not limited to this. The memory 2303 may exist independently, and is connected to the processor 2301 through a communication bus 2302. The memory 2303 may also be integrated with the processor 2301.
其中,存储器2303用于存储执行本申请方案的程序代码,并由处理器2301来控制执行。处理器2301用于执行存储器2303中存储的程序代码。程序代码中可以包括一个或多个软件模块。图4实施例中的控制节点或多个节点中任一节点均可以通过处理器2301以及存储器2303中的程序代码中的一个或多个软件模块,来确定用于开发应用的数据。这一个或多个软件模块可以为图21或图22任一实施例中提供的软件模块。Among them, the memory 2303 is used to store the program code for executing the solution of the present application, and the processor 2301 controls the execution. The processor 2301 is configured to execute the program code stored in the memory 2303. One or more software modules can be included in the program code. The control node or any one of the multiple nodes in the embodiment of FIG. 4 can determine the data used to develop the application through the processor 2301 and one or more software modules in the program code in the memory 2303. The one or more software modules may be the software modules provided in any embodiment of FIG. 21 or FIG. 22.
通信接口2304,使用任何收发器一类的装置,用于与其它设备或通信网络通信,如以太网,无线接入网(radio access networkRAN),无线局域网(wireless local area networks,WLAN)等。The communication interface 2304 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network RAN, wireless local area networks (WLAN), and so on.
在具体实现中,作为一种实施例,网络设备可以包括多个处理器,例如图23中所示的处理器2301和处理器2305。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the network device may include multiple processors, for example, the processor 2301 and the processor 2305 shown in FIG. 23. Each of these processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
上述的网络设备可以是一个通用网络设备或者是一个专用网络设备。在具体实现中,网络设备可以是台式机、便携式电脑、网络服务器、掌上电脑(personal digital assistant,PDA)、移动手机、平板电脑、无线终端设备、通信设备或者嵌入式设备。本申请实施例不限定网络设备的类型。The aforementioned network device may be a general network device or a dedicated network device. In a specific implementation, the network device may be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. The embodiments of this application do not limit the type of network equipment.
可以理解的是,图23所示网络设备为可以上述方法实施例中的任一的节点。此外,本申请实施例中涉及的任一节点也可以基于通用的物理服务器结合网络功能虚拟化NFV技术实现的虚拟的节点。所述虚拟的节点可以为虚拟路由器。所述虚拟的节点可以是运行有用于提供发送消息功能的程序的虚拟机(英文:Virtual Machine,VM),所述虚拟机部署在硬件设备上(例如,物理服务器)。虚拟机指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。本领域技术人员通过阅读本申请即可结合NFV技术在通用物理服务器上虚拟出具有上述功能的多个节点。此处不再赘述。It can be understood that the network device shown in FIG. 23 is a node that can be any of the foregoing method embodiments. In addition, any node involved in the embodiments of the present application may also be a virtual node implemented based on a general physical server combined with network function virtualization NFV technology. The virtual node may be a virtual router. The virtual node may be a virtual machine (English: Virtual Machine, VM) running a program for providing a message sending function, and the virtual machine is deployed on a hardware device (for example, a physical server). A virtual machine refers to a complete computer system with complete hardware system functions that is simulated by software and runs in a completely isolated environment. Those skilled in the art can combine NFV technology to virtualize multiple nodes with the above-mentioned functions on a general physical server by reading this application. I won't repeat them here.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意结合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如:同轴电缆、光纤、数据用户线(digital subscriber line,DSL))或无线(例如:红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如:软盘、硬盘、磁带)、光介质(例如:数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如:固态硬盘(solid state disk,SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on the computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center. Transmission to another website, computer, server or data center via wired (for example: coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example: infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or a data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)), or a semiconductor medium (for example, a solid state disk (SSD)) )Wait.
本领域普通技术人员可以理解实现上述实施例的全部或部分过程可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the process of implementing the above-mentioned embodiments can be completed by hardware, or by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned can be a read-only memory, a magnetic disk or an optical disk, etc.
以上所述为本申请提供的实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above-mentioned examples provided for this application are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection scope of this application. Inside.

Claims (27)

  1. 一种段标识的确定方法,其特征在于,所述方法包括:A method for determining a segment identifier, characterized in that the method includes:
    第一网络设备确定与第二网络设备对应的第一段标识,所述第一段标识包括第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域;The first network device determines a first segment identifier corresponding to the second network device, where the first segment identifier includes first identification information, and the first identification information is used to identify the autonomous domain to which the second network device belongs;
    所述第一网络设备基于所述第一段标识生成第二段标识,所述第二段标识不包括所述第一标识信息;Generating, by the first network device, a second segment identifier based on the first segment identifier, the second segment identifier does not include the first identification information;
    所述第一网络设备向所述第二网络设备发送报文,所述报文包括所述第二段标识。The first network device sends a message to the second network device, and the message includes the second segment identifier.
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    所述第一网络设备确定与第三网络设备对应的第三段标识,所述第三段标识包括第二标识信息和第三标识信息,所述第二标识信息用于标识所述第三网络设备所属的自治域,所述第三标识信息用于标识所述自治域内的所述第三网络设备;The first network device determines a third segment identifier corresponding to the third network device, the third segment identifier includes second identification information and third identification information, and the second identification information is used to identify the third network The autonomous domain to which the device belongs, where the third identification information is used to identify the third network device in the autonomous domain;
    所述第一网络设备基于所述第三段标识生成所述第四段标识,所述第四段标识不包括所述第二标识信息和所述第三标识信息;Generating, by the first network device, the fourth segment identifier based on the third segment identifier, the fourth segment identifier does not include the second identification information and the third identification information;
    所述第一网络设备向所述第三网络设备发送所述报文,所述报文包括所述第四段标识。The first network device sends the message to the third network device, and the message includes the fourth segment identifier.
  3. 如权利要求2所述的方法,其特征在于,所述第二网络设备和第三网络设备为同一设备,所述第一标识信息和所述第二标识信息为同一标识信息,所述第二段标识和所述第四段标识为同一段标识。The method according to claim 2, wherein 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 The segment identifier and the fourth segment identifier are the same segment identifier.
  4. 如权利要求1至3任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 3, wherein the method further comprises:
    所述第一网络设备确定与多个网络设备对应的多个段标识,所述多个段标识分别包括相同的第四标识信息;The first network device determines multiple segment identifiers corresponding to the multiple network devices, and the multiple segment identifiers respectively include the same fourth identification information;
    所述第一网络设备基于所述多个段标识生成第五段标识,所述第五段标识包括所述第四标识信息和第五标识信息,所述第五标识信息用于标识所述多个网络设备的个数;The first network device generates a fifth segment identifier based on the plurality of segment identifiers, where the fifth segment identifier includes the fourth identification information and fifth identification information, and the fifth identification information is used to identify the multiple The number of network devices;
    所述第一网络设备发送所述报文,所述报文包括所述第五段标识。The first network device sends the message, and the message includes the fifth segment identifier.
  5. 如权利要求4所述的方法,其特征在于,所述第五段标识不包括所述第一标识信息和分别对应于所述多个网络设备的第六标识信息,所述第六标识信息分别用于唯一地标识所述多个网络设备所属的自治域内的所述多个网络设备。The method according to claim 4, wherein 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 respectively It is used to uniquely identify the multiple network devices in the autonomous domain to which the multiple network devices belong.
  6. 如权利要求4或5所述的方法,其特征在于,所述多个网络设备包括第二网络设备,所述第二段标识和所述第五段标识为同一段标识。The method according to claim 4 or 5, wherein the multiple network devices include a second network device, and the second segment identifier and the fifth segment identifier are the same segment identifier.
  7. 如权利要求1至6任一项所述的方法,其特征在于,所述报文还包括第七标识信息,所述第七标识信息用于标识所述第一网络设备生成所述第二段标识的策略。The method according to any one of claims 1 to 6, wherein the message further includes seventh identification information, and the seventh identification information is used to identify that the first network device generates the second segment Identify the strategy.
  8. 如权利要求4至7任一项所述的方法,其特征在于,所述第一网络设备确定与多个网络设备对应的多个段标识为:The method according to any one of claims 4 to 7, wherein the first network device determines that the multiple segment identifiers corresponding to the multiple network devices are:
    所述第一网络设备基于所述多个网络设备分别发送的内部网关协议IGP消息,确定与多个网络设备对应的多个段标识;或者,The first network device determines multiple segment identifiers corresponding to the multiple network devices based on the interior gateway protocol IGP messages sent by the multiple network devices respectively; or,
    所述第一网络设备基于控制设备发送的控制消息,确定与多个网络设备对应的多个段标识。The first network device determines multiple segment identifiers corresponding to the multiple network devices based on the control message sent by the control device.
  9. 一种段标识的确定方法,其特征在于,所述方法包括:A method for determining a segment identifier, characterized in that the method includes:
    第一网络设备接收报文,所述报文包括与第二网络设备对应的第一段标识;The first network device receives a message, where the message includes a first segment identifier corresponding to the second network device;
    所述第一网络设备确定与所述第二网络设备对应的第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域;Determining, by the first network device, first identification information corresponding to the second network device, where the first identification information is used to identify the autonomous domain to which the second network device belongs;
    所述第一网络设备基于所述第一标识信息和所述第一段标识,生成与所述第二网络设备对应的第二段标识;Generating, by the first network device, a second segment identifier corresponding to the second network device based on the first identification information and the first segment identifier;
    所述第一网络设备基于所述第二段标识向所述第二网络设备发送所述报文。The first network device sends the message to the second network device based on the second segment identifier.
  10. 如权利要求9所述的方法,其特征在于,所述第二网络设备为所述第一网络设备的下一跳设备,所述方法包括:The method according to claim 9, wherein the second network device is a next hop device of the first network device, and the method comprises:
    所述第一网络设备确定第二标识信息,所述第二标识信息用于标识所述自治域内的所述第二网络设备;Determining second identification information by the first network device, where the second identification information is used to identify the second network device in the autonomous domain;
    所述第一网络设备基于所述第一标识信息和所述第一段标识,生成与所述第二网络设备对应的第二段标识,具体为:The first network device generates a second segment identifier corresponding to the second network device based on the first identification information and the first segment identifier, specifically:
    所述第一网络设备基于所述第一标识信息、所述第二标识信息和所述第一段标识,生成与所述第二网络设备对应的所述第二段标识。The first network device generates 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.
  11. 如权利要求9或10所述的方法,其特征在于,所述报文的转发路径上包括多个连续的网络设备,所述多个连续的网络设备对应于多个段标识,所述第一网络设备位于所述转发路径上所述多个连续的网络设备中的第一个,所述多个段标识包括相同的第三标识信息,所述第一段标识包括所述第三标识信息和第四标识信息,所述第四标识信息用于指示所述多个连续的网络设备的数量,所述第一网络设备基于所述第二段标识向所述第二网络设备发送所述报文,包括:The method according to claim 9 or 10, wherein the forwarding path of the message includes multiple consecutive network devices, and the multiple consecutive network devices correspond to multiple segment identifiers, and the first The network device is located at the first of the plurality of consecutive network devices on the forwarding path, the plurality of segment identifiers include the same third identification information, and the first segment identifier includes the third identification information and Fourth identification information, where the fourth identification information is used to indicate the number of the multiple consecutive network devices, and the first network device sends the message to the second network device based on the second segment identifier ,include:
    所述第一网络设备基于所述第四标识信息确定第五标识信息;Determining, by the first network device, fifth identification information based on the fourth identification information;
    所述第一网络设备确定更新后的第一段标识,所述更新后的第一段标识包括所述第三标识信息和所述第五标识信息;Determining, by the first network device, an updated first segment identifier, where the updated first segment identifier includes the third identification information and the fifth identification information;
    所述第一网络设备基于所述第二段标识向所述第二网络设备发送所述报文,所述报文中包括所述更新后的第一段标识。The first network device sends the message to the second network device based on the second segment identifier, and the message includes the updated first segment identifier.
  12. 如权利要求11所述的方法,其特征在于,所述第四标识信息为第一数值,所述第五标识信息为第二数值,所述第二数值为所述第一数值减1。The method of claim 11, wherein the fourth identification information is a first value, the fifth identification information is a second value, and the second value is the first value minus one.
  13. 根据权利要求9至12任一所述的方法,所述第一网络设备确定与所述第二网络设备对应的第一标识信息,包括:According to the method according to any one of claims 9 to 12, the first network device determining the first identification information corresponding to the second network device includes:
    所述第一网络设备接收消息,所述消息包括对应于所述第二网络设备的第六标识信息和第七标识信息,所述第六标识信息包括所述第一标识信息,所述第七标识信息用于标识所述第一标识信息的长度;The first network device receives a message, 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 The identification information is used to identify 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.
  14. 一种第一网络设备,其特征在于,所述第一网络设备包括:A first network device, characterized in that, the first network device includes:
    确定模块,用于确定与第二网络设备对应的第一段标识,所述第一段标识包括第一标识信息,所述第一标识信息用于标识所述第二网络设备所属的自治域;A determining module, configured to determine a first segment identifier corresponding to a second network device, where the first segment identifier includes first identification information, and the first identification information is used to identify the autonomous domain to which the second network device belongs;
    生成模块,用于基于所述第一段标识生成第二段标识,所述第二段标识不包括所述第一标识信息;A generating module, configured to generate a second segment identifier based on the first segment identifier, where the second segment identifier does not include the first identifier information;
    发送模块,用于向所述第二网络设备发送报文,所述报文包括所述第二段标识。The sending module is configured to send a message to the second network device, where the message includes the second segment identifier.
  15. 根据权利要求14所述的设备,其特征在于,The device according to claim 14, wherein:
    所述确定模块,还用于确定与第三网络设备对应的第三段标识,所述第三段标识包括第二标识信息和第三标识信息,所述第二标识信息用于标识所述第三网络设备所属的自治域,所述第三标识信息用于标识所述自治域内的所述第三网络设备;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 identification information and third identification information, and the second identification information is used to identify the second identification information. 3. The autonomous domain to which the network device belongs, where the third identification 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 identification information and the third identification information;
    所述发送模块还用于向所述第三网络设备发送所述报文,所述报文包括所述第四段标识。The sending module is further configured to send the message to the third network device, where the message includes the fourth segment identifier.
  16. 如权利要求15所述的设备,其特征在于,所述第二网络设备和第三网络设备为同一设备,所述第一标识信息和所述第二标识信息为同一标识信息,所述第二段标识和所述第四段标识为同一段标识。The device according to claim 15, wherein 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 The segment identifier and the fourth segment identifier are the same segment identifier.
  17. 如权利要求14至16任一项所述的设备,其特征在于,The device according to any one of claims 14 to 16, characterized in that:
    所述确定模块,还用于确定与多个网络设备对应的多个段标识,所述多个段标识分别包括相同的第四标识信息;The determining module is further configured to determine multiple segment identifiers corresponding to multiple network devices, and the multiple segment identifiers respectively include the same fourth identification information;
    所述生成模块,还用于基于所述多个段标识生成第五段标识,所述第五段标识包括所述第四标识信息和第五标识信息,所述第五标识信息用于标识所述多个网络设备的个数;The generating module is further configured to generate a fifth segment identifier based on the multiple 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 State the number of multiple network devices;
    所述发送模块,还用于发送所述报文,所述报文包括所述第五段标识。The sending module is further configured to send the message, and the message includes the fifth segment identifier.
  18. 如权利要求17所述的设备,其特征在于,所述第五段标识不包括所述第一标识信息和分别对应于所述多个网络设备的第六标识信息,所述第六标识信息分别用于唯一地标识所述多个网络设备所属的自治域内的所述多个网络设备。The device according to claim 17, wherein 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 respectively It is used to uniquely identify the multiple network devices in the autonomous domain to which the multiple network devices belong.
  19. 如权利要求17或18所述的设备,其特征在于,所述多个网络设备包括所述第二网络设备,所述第二段标识和所述第五段标识为同一段标识。The device according to claim 17 or 18, wherein the plurality of network devices include the second network device, and the second segment identifier and the fifth segment identifier are the same segment identifier.
  20. 如权利要求14至19任一项所述的设备,其特征在于,所述报文还包括第七标识信息,所述第七标识信息用于标识所述第一网络设备生成所述第二段标识的策略。The device according to any one of claims 14 to 19, wherein the message further includes seventh identification information, and the seventh identification information is used to identify that the first network device generates the second segment Identify the strategy.
  21. 如权利要求17至20任一项所述的设备,其特征在于,所述确定模块确定与多个网络设备对应的多个段标识,包括:The device according to any one of claims 17 to 20, wherein the determining module determines multiple segment identifiers corresponding to multiple network devices, comprising:
    所述确定模块基于所述多个网络设备分别发送的内部网关协议IGP消息,确定与多个网络设备对应的多个段标识;或者,The determining module determines the multiple segment identifiers corresponding to the multiple network devices based on the internal gateway protocol IGP messages sent by the multiple network devices respectively; or,
    所述确定模块基于控制设备发送的控制消息,确定与多个网络设备对应的多个段标识。The determining module determines multiple segment identifiers corresponding to multiple network devices based on the control message sent by the control device.
  22. 一种第一网络设备,其特征在于,所述第一网络设备包括:A first network device, characterized in that, the first network device includes:
    接收模块,用于接收报文,所述报文包括与第二网络设备对应的第一段标识;A receiving module, configured to receive a message, the message including the first segment identifier corresponding to the 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 the 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;
    发送模块,用于基于所述第二段标识向所述第二网络设备发送所述报文。The sending module is configured to send the message to the second network device based on the second segment identifier.
  23. 如权利要求22所述的设备,其特征在于,所述第二网络设备为所述第一网络设备的下一跳设备,The device according to 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 generating module is 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.
  24. 如权利要求22或23所述的设备,其特征在于,所述报文的转发路径上包括多个连续的网络设备,所述多个连续的网络设备对应于多个段标识,所述第一网络设备位于所述转发路径上所述多个连续的网络设备中的第一个,所述多个段标识包括相同的第三标识信息,所述第一段标识包括所述第三标识信息和第四标识信息,所述第四标识信息用于指示所述多个连续的网络设备的数量,所述发送模块包括:The device according to claim 22 or 23, wherein the forwarding path of the message includes a plurality of consecutive network devices, and the plurality of consecutive network devices correspond to a plurality of segment identifiers, and the first The network device is located at the first of the plurality of consecutive network devices on the forwarding path, the plurality of segment identifiers include the same third identification information, and the first segment identifier includes the third identification information and Fourth identification information, where the fourth identification information is used to indicate the number of the multiple consecutive network devices, and the sending module includes:
    第一确定子单元,用于基于所述第四标识信息确定第五标识信息;The first determining subunit is configured to determine fifth identification information based on the fourth identification information;
    第二确定子单元,用于确定更新后的第一段标识,所述更新后的第一段标识包括所述第三标识信息和所述第五标识信息;The second determining subunit is configured to determine the updated first segment identifier, where the updated first segment identifier includes the third identification information and the fifth identification information;
    发送子单元,用于基于所述第二段标识向所述第二网络设备发送所述报文,所述报文中包括所述更新后的第一段标识。The sending subunit is configured to send the message to the second network device based on the second segment identifier, where the message includes the updated first segment identifier.
  25. 如权利要求24所述的设备,其特征在于,所述第四标识信息为第一数值,所述第五标识信息为第二数值,所述第二数值为所述第一数值减1。The device of claim 24, wherein the fourth identification information is a first value, the fifth identification information is a second value, and the second value is the first value minus one.
  26. 根据权利要求22至25任一所述的设备,所述确定模块包括:The device according to any one of claims 22 to 25, the determining module comprises:
    接收子单元,用于接收消息,所述消息包括对应于所述第二网络设备的第六标识信息和第七标识信息,所述第六标识信息包括所述第一标识信息,所述第七标识信息用于标识所述第一标识信息的长度;The receiving subunit is configured to receive 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, and the seventh identification information. The identification information is used to identify the length of the first identification information;
    第三确定子单元,用于基于所述第六标识信息和所述第七标识信息,确定所述第一标识信息。The third determining subunit is configured to determine the first identification information based on the sixth identification information and the seventh identification information.
  27. 一种网络设备,其特征在于,所述网络设备包括存储器和处理器;A network device, characterized in that, the network device includes a memory and a processor;
    所述存储器用于存储计算机程序;The memory is used to store a computer program;
    所述处理器用于执行所述存储器中存储的计算机程序以执行权利要求1-8中任一项所述的方法,或者,执行权利要求9-13中任一项所述的方法。The processor is configured to execute a computer program stored in the memory to execute the method according to any one of claims 1-8, or to execute the method according to any one of claims 9-13.
PCT/CN2020/118937 2019-12-30 2020-09-29 Segment identifier determining method and device WO2021135468A1 (en)

Applications Claiming Priority (2)

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

Publications (1)

Publication Number Publication Date
WO2021135468A1 true WO2021135468A1 (en) 2021-07-08

Family

ID=76687104

Family Applications (1)

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

Country Status (2)

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

Cited By (5)

* 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
CN114157601A (en) * 2021-11-29 2022-03-08 中国联合网络通信集团有限公司 Message transmission method, device and storage medium
CN114389996A (en) * 2022-01-04 2022-04-22 烽火通信科技股份有限公司 SRv6SID distribution method and device under resource-based multi-topology environment
CN115065725A (en) * 2022-05-12 2022-09-16 北京奇艺世纪科技有限公司 Data processing method and device, electronic equipment and storage medium
US20230126801A1 (en) * 2020-03-10 2023-04-27 Zte Corporation Packet encapsulation method, packet forwarding method, announcement method, electronic device, and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113726654B (en) * 2021-08-13 2023-05-26 新华三信息安全技术有限公司 Message forwarding method and device of SRV6 protocol, electronic equipment and medium
CN113872866B (en) * 2021-09-28 2023-04-07 中国电信股份有限公司 Message forwarding method, system and storage medium
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

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150256456A1 (en) * 2014-03-06 2015-09-10 Cisco Technology, Inc. Segment routing extension headers
CN105577545A (en) * 2014-10-29 2016-05-11 思科技术公司 Label-switched packets with device-independent labels
CN106789619A (en) * 2015-11-24 2017-05-31 华为技术有限公司 A kind of method for determining mapping server, routing node and autonomous system
CN109218258A (en) * 2017-06-30 2019-01-15 华为技术有限公司 Data pack transmission method and gateway
CN109802888A (en) * 2017-11-16 2019-05-24 中兴通讯股份有限公司 A kind of method and device based on anycast address protection

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10506083B2 (en) * 2017-06-27 2019-12-10 Cisco Technology, Inc. Segment routing gateway storing segment routing encapsulating header used in encapsulating and forwarding of returned native packet
US10924399B2 (en) * 2018-03-15 2021-02-16 Cisco Technology, Inc. Segment routing packet policies and functions including an engineered reverse reply path providing efficiencies in communicating packets in a network
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150256456A1 (en) * 2014-03-06 2015-09-10 Cisco Technology, Inc. Segment routing extension headers
CN105577545A (en) * 2014-10-29 2016-05-11 思科技术公司 Label-switched packets with device-independent labels
CN106789619A (en) * 2015-11-24 2017-05-31 华为技术有限公司 A kind of method for determining mapping server, routing node and autonomous system
CN109218258A (en) * 2017-06-30 2019-01-15 华为技术有限公司 Data pack transmission method and gateway
CN109802888A (en) * 2017-11-16 2019-05-24 中兴通讯股份有限公司 A kind of method and device based on anycast address protection

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230126801A1 (en) * 2020-03-10 2023-04-27 Zte Corporation Packet encapsulation method, packet forwarding method, announcement method, electronic device, and storage medium
CN113691451A (en) * 2021-09-22 2021-11-23 新华三信息安全技术有限公司 Segment identifier determination method and device
CN113691451B (en) * 2021-09-22 2022-08-19 新华三技术有限公司 Segment identifier determination method and device
WO2023045247A1 (en) * 2021-09-22 2023-03-30 新华三技术有限公司 Method and apparatus for determining segment identity
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
CN114389996A (en) * 2022-01-04 2022-04-22 烽火通信科技股份有限公司 SRv6SID distribution method and device under resource-based multi-topology environment
CN114389996B (en) * 2022-01-04 2023-06-09 烽火通信科技股份有限公司 Method and device for SRv SID distribution in multi-topology environment based on resources
CN115065725A (en) * 2022-05-12 2022-09-16 北京奇艺世纪科技有限公司 Data processing method and device, electronic equipment and storage medium
CN115065725B (en) * 2022-05-12 2024-01-12 北京奇艺世纪科技有限公司 Data processing method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113132229A (en) 2021-07-16
CN113132229B (en) 2022-10-28

Similar Documents

Publication Publication Date Title
WO2021135468A1 (en) Segment identifier determining method and device
US8913613B2 (en) Method and system for classification and management of inter-blade network traffic in a blade server
US20180375764A1 (en) Providing Network Efficiencies in Forwarding Packets Among Provider Networks and Applying Segment Routing Policies
US20230122099A1 (en) Packet Forwarding Method, Device, and System
WO2021098271A1 (en) Method for issuing oam configuration information and control node
US20190196857A1 (en) Providing link aggregation and high availability through network virtualization layer
WO2020001442A1 (en) Data processing method and related device
US20230137778A1 (en) Packet Sending Method and Apparatus, Network Device, System, and Storage Medium
US20220255862A1 (en) Packet forwarding method, device, storage medium, and system
WO2022078415A1 (en) Packet forwarding method and network device
JP2023514630A (en) FORWARDING ENTRY GENERATION METHOD, PACKET TRANSMISSION METHOD, NETWORK DEVICE AND SYSTEM
WO2021185043A1 (en) Forwarding path establishment method and apparatus, and computer-readable storage medium
EP4075738A1 (en) Failure protection method for service function chain, device, apparatus, system, and storage medium
WO2022105927A1 (en) Method, device, and system for notifying processing capability of network device
KR20230035674A (en) Route advertisement method and related device
WO2022028216A1 (en) Network layer reachable information transmission method, system and apparatus, and network device
WO2022012489A1 (en) Capability indication method and related device
WO2021057530A1 (en) Method, apparatus and system for determining mapping relationship between routing prefix and segment identification
US20230327986A1 (en) Route Advertisement Method, Apparatus, and System
WO2023179457A1 (en) Method, apparatus and system for identifying service connection, and storage medium
US20220255864A1 (en) Service packet forwarding method, apparatus, and computer storage medium
WO2022088685A1 (en) Semantic name acquisition method and apparatus, device, and storage medium
JP2024506089A (en) Packet forwarding methods, devices, and systems
US9246820B1 (en) Methods and apparatus for implementing multiple loopback links
CN115242699A (en) Message transmission method, slice generation method, device and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20909376

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20909376

Country of ref document: EP

Kind code of ref document: A1