CN110995596B - SID distribution method and device based on SRv6 network - Google Patents

SID distribution method and device based on SRv6 network Download PDF

Info

Publication number
CN110995596B
CN110995596B CN201911329833.1A CN201911329833A CN110995596B CN 110995596 B CN110995596 B CN 110995596B CN 201911329833 A CN201911329833 A CN 201911329833A CN 110995596 B CN110995596 B CN 110995596B
Authority
CN
China
Prior art keywords
sid
segment
dynamic
equipment
allocated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911329833.1A
Other languages
Chinese (zh)
Other versions
CN110995596A (en
Inventor
陈旭林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201911329833.1A priority Critical patent/CN110995596B/en
Publication of CN110995596A publication Critical patent/CN110995596A/en
Application granted granted Critical
Publication of CN110995596B publication Critical patent/CN110995596B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/659Internet protocol version 6 [IPv6] addresses

Abstract

The invention provides a SID distribution method and device based on SRv6 network, comprising: acquiring at least one network segment, wherein each network segment comprises at least one IPv6 address; dividing each network segment into a plurality of SID segments which are different in type and have no intersection with each other; determining a corresponding distribution mode according to the type of each SID segment; and distributing the corresponding SID for the routing information of the SR equipment by each SID segment according to the corresponding distribution mode, so that the SR equipment generates a routing table according to the distributed SID. The invention distributes the corresponding SID for the routing information of the SR equipment with the appointed protocol, thereby ensuring the uniqueness and the validity of the SID.

Description

SID distribution method and device based on SRv6 network
Technical Field
The invention relates to the technical field of SR, in particular to a SID (Segment Routing IPv6, SRv6) distribution method and device of a Segment Routing (Segment Routing IPv6, SRv6) network based on the sixth version of Internet protocol.
Background
An SR (Segment Routing) architecture is based on a source route, and implements that a message to be sent is encapsulated on a source node by using the message path Information, where the path Information includes a SID (Segment Identifier) of a route that needs to pass through an SR node and a Routing order of the node, and specifically, when the message passes through the SR node along a transmission path, a table entry corresponding to the SID in the message is searched in a Forwarding Information Base (FIB) to instruct the SR node that receives the message to Forward and process the message, where a plurality of SIDs in the message path Information exist in the form of Segment lists (Segment lists), the Segment lists are encoded from a last Segment of the route, and when the SID in the message is found in the FIB, the SID in the message is instructed to obtain a SID of a next node and Forward the SID.
The SR technology has two implementation manners, one is SR-MPLS (Segment Routing with MPLS) based on Multi-Protocol Label Switching, where MPLS maps Routing information onto Label information, takes the Label as SID, and a Label Switching router searches for an entry corresponding to the Label in FIB according to the Label of a packet, and instructs an SR node that receives the packet to forward and process the packet.
One is SRv6, SRv6 adding a new IPv6 extension Header called SRH (Segment Routing Header), which specifies an explicit path of IPv6, uses the address of IPv6 as SID, adds multiple SIDs in SRH, and the node can implement forwarding function according to the path information contained in the SRH extension Header.
In the prior art, no specific scheme exists for the SID distribution management mode in the SRv6 technology.
Disclosure of Invention
The invention provides a SID (SID identifier) allocation method and device based on SRv6 network, which are used for solving the problem that no specific scheme exists for a SID allocation management mode in SRv6 technology in the prior art.
In a first aspect, the present application provides a SID assignment method based on SRv6 network, including:
acquiring at least one network segment, wherein each network segment comprises at least one IPv6 address;
dividing each network segment into a plurality of SID segments which are different in type and have no intersection with each other;
determining a corresponding distribution mode according to the type of each SID segment;
and distributing the corresponding SID for the routing information of the SR equipment according to the corresponding distribution mode by each SID section, so that the SR equipment generates a routing table according to the distributed SID.
Optionally, if each SID segment includes a dynamic SID segment, assigning, by the SID segment, a corresponding SID to the routing information of the SR device according to a corresponding assignment manner, where the assigning includes:
dividing the dynamic SID segment into a plurality of SID subsegments of fixed length;
when SR equipment of different protocols has SID allocation requirements, allocating at least one unallocated SID sub-segment to the routing information of the SR equipment of the corresponding protocol;
according to the SR equipment with different protocols, releasing the routing information of the distributed SIDs, and updating any SID sub-section into an unallocated SID sub-section when determining that all SIDs of any SID sub-section are released.
Optionally, the SID segment includes a static SID segment, where the static SID segment includes a SID sub-segment, and the assigning, by the SID segment, a corresponding SID to the routing information of the SR device according to a corresponding assignment manner includes:
when SR equipment of a specified protocol except SR-Policy protocol has SID allocation requirement, allocating SID in the static SID segment to the routing information of the SR equipment of the specified protocol.
Optionally, the SID segment includes a BSID segment, the BSID segment includes a SID sub-segment, and the assigning, according to a corresponding assignment manner, each SID segment to the routing information of the SR device, a corresponding SID includes:
and when the SR equipment of the SR-Policy protocol has the requirement of allocating SID, allocating the SID in the BSID segment to the routing information of the SR equipment of the SR-Policy protocol.
Optionally, acquiring at least one network segment includes:
at least one IPv6 network segment is obtained except for a specific IPv6 network segment defining a specific function.
Optionally, when SR devices of different protocols have SID allocation requirements, allocating at least one unallocated SID subsegment to routing information of SR devices of a corresponding protocol, where the routing information includes:
when SR equipment with different protocols has requirements for distributing SID, acquiring unallocated SID subsections in which all SID are not distributed;
the method comprises the steps that a SID generator obtains a value range according to SID of an uncompleted distributed SID sub-section and SID which is already distributed to SR equipment, wherein at least one unallocated SID exists in the uncompleted distributed SID sub-section;
and acquiring the routing information of the SR equipment with the SID allocated to the corresponding protocol in the SID sub-section which is not allocated, and storing the allocated SID in a dynamic SID table.
Optionally, obtaining, in the SID subsegment that is not allocated completely, routing information that the SID is allocated to an SR device of a corresponding protocol includes:
after acquiring a dynamic SID from the SID value range of the SID subsegment which is not distributed, comparing the acquired dynamic SID with a dynamic SID table;
if the dynamic SID table has the acquired dynamic SID, acquiring the dynamic SID again from the SID value range of the SID subsegment which is not allocated, and comparing the dynamic SID with the dynamic SID table, otherwise, allocating the acquired dynamic SID to the routing information of the SR device of the corresponding protocol.
Optionally, obtaining, by a SID generator, routing information, in the SID subsegment that is not completely allocated, of the SID assigned to the SR device of the corresponding protocol according to a SID value range of the SID subsegment that is not completely allocated and an assigned SID, where the routing information includes:
saving the minimum value of any uncompleted allocated SID subsegment as the numerical value of a first counter in the SID generator, and adding 1 to the numerical value of the first counter to obtain a dynamic SID;
if the numerical value of the first counter does not reach the maximum value, comparing the obtained dynamic SID with a dynamic SID table, if the obtained dynamic SID exists in the dynamic SID table, adding 1 to the numerical value of the first counter again to compare with the dynamic SID table, and if the obtained dynamic SID does not exist in the dynamic SID table, allocating the obtained dynamic SID to the routing information of the SR equipment of the corresponding protocol;
and if the numerical value of the first counter reaches the maximum value of any uncompleted distributed SID subsegment and the SID of any uncompleted distributed SID subsegment is not completely distributed, storing the minimum value of any uncompleted distributed SID subsegment in the first counter again to repeat the process, and otherwise, acquiring the minimum value of another uncompleted distributed SID subsegment again and storing the minimum value as the process repeated in the first counter in the SID generator.
Optionally, determining that the SID of any unfinished allocated SID subsegment is not fully allocated includes:
saving the number of the allocated SIDs in any uncompleted allocated SID subsection as the numerical value of a second counter;
determining that the SID of any uncompleted allocated SID sub-segment is not completely allocated when the count of the second counter is not larger than the number of all SIDs of any uncompleted allocated SID sub-segment.
In a second aspect, the present application provides an SRv6 network-based SID assignment apparatus, including:
the network segment acquisition module is used for acquiring at least one network segment, and each network segment comprises at least one IPv6 address;
the dividing module is used for dividing each network segment into a plurality of SID segments which are different in type and have no intersection with each other;
a determining module, configured to determine a corresponding allocation manner according to the type of each SID segment;
and the distribution module is used for distributing the corresponding SID for the routing information of the SR equipment according to the corresponding distribution mode by each SID section, so that the SR equipment generates a routing table according to the distributed SID.
Optionally, if each SID segment includes a dynamic SID segment, the assigning module is configured to assign a corresponding SID to the routing information of the SR device according to a corresponding assignment manner, and specifically configured to:
dividing the dynamic SID segment into a plurality of SID subsegments of fixed length;
when SR equipment of different protocols has SID allocation requirements, allocating at least one unallocated SID sub-segment to the routing information of the SR equipment of the corresponding protocol;
and according to the information of the distributed SIDs released by the SR equipment with different protocols, when all the SIDs of any SID sub-section are determined to be released, updating the any SID sub-section into the unallocated SID sub-section.
Optionally, the SID segment includes a static SID segment, where the static SID segment includes a SID sub-segment, and the allocation module is configured to allocate, to the routing information of the SR device, a corresponding SID by using each SID segment in a corresponding allocation manner, and specifically configured to:
when SR equipment of a specified protocol except SR-Policy protocol has SID allocation requirement, allocating SID in the static SID segment to the routing information of the SR equipment of the specified protocol.
Optionally, the SID segment includes a BSID segment, the BSID segment includes a SID sub-segment, and the allocation module is configured to allocate, to the routing information of the SR device, a corresponding SID for each SID segment according to a corresponding allocation manner, and specifically configured to:
and when the SR equipment of the SR-Policy protocol has the requirement of allocating SID, allocating the SID in the BSID segment to the routing information of the SR equipment of the SR-Policy protocol.
Optionally, the obtaining module is configured to obtain at least one network segment, and specifically configured to:
at least one IPv6 network segment is obtained except for a specific IPv6 network segment defining a specific function.
Optionally, the allocating module is configured to allocate, when SR devices of different protocols have SID allocation requirements, at least one unallocated SID subsegment to routing information of the SR device of a corresponding protocol, and specifically configured to:
when SR equipment with different protocols has requirements for distributing SID, acquiring unallocated SID subsections in which all SID are not distributed;
the method comprises the steps that a SID generator obtains a value range according to SID of an uncompleted distributed SID sub-section and SID which is already distributed to SR equipment, wherein at least one unallocated SID exists in the uncompleted distributed SID sub-section;
and acquiring the routing information of the SR equipment with the SID allocated to the corresponding protocol in the SID sub-section which is not allocated, and storing the allocated SID in a dynamic SID table.
Optionally, the allocating module is configured to acquire, in the SID subsegment that is not allocated, routing information that the SID is allocated to an SR device of a corresponding protocol, and specifically configured to:
after acquiring a dynamic SID from the SID value range of the SID subsegment which is not distributed, comparing the acquired dynamic SID with a dynamic SID table;
if the dynamic SID table has the acquired dynamic SID, acquiring the dynamic SID again from the SID value range of the SID subsegment which is not allocated, and comparing the dynamic SID with the dynamic SID table, otherwise, allocating the acquired dynamic SID to the routing information of the SR device of the corresponding protocol.
Optionally, the assignment module is configured to obtain, by using a SID generator, routing information, which is assigned to the SR device of the corresponding protocol, of the SID in the SID sub-segment that is not assigned according to the SID value range of the SID sub-segment that is not assigned and the assigned SID, and specifically configured to:
saving the minimum value of any uncompleted allocated SID subsegment as the numerical value of a first counter in the SID generator, and adding 1 to the numerical value of the first counter to obtain a dynamic SID;
if the numerical value of the first counter does not reach the maximum value, comparing the obtained dynamic SID with a dynamic SID table, if the obtained dynamic SID exists in the dynamic SID table, adding 1 to the numerical value of the first counter again to compare with the dynamic SID table, and if the obtained dynamic SID does not exist in the dynamic SID table, allocating the obtained dynamic SID to the routing information of the SR equipment of the corresponding protocol;
and if the numerical value of the first counter reaches the maximum value of any uncompleted distributed SID subsegment and the SID of any uncompleted distributed SID subsegment is not completely distributed, storing the minimum value of any uncompleted distributed SID subsegment in the first counter again to repeat the process, and otherwise, acquiring the minimum value of another uncompleted distributed SID subsegment again and storing the minimum value as the process repeated in the first counter in the SID generator.
Optionally, the allocation module is configured to determine that the SID of any unfinished allocated SID sub-segment is not fully allocated, and specifically, is configured to:
saving the number of the allocated SIDs in any uncompleted allocated SID subsection as the numerical value of a second counter;
determining that the SID of any uncompleted allocated SID sub-segment is not completely allocated when the count of the second counter is not larger than the number of all SIDs of any uncompleted allocated SID sub-segment.
In a third aspect, the present application provides an SID assigning apparatus based on SRv6 network, including: a storage unit and a processing unit;
wherein the storage unit is used for storing programs;
the processing unit is used for executing the program in the storage unit and comprises the following steps:
acquiring at least one network segment, wherein each network segment comprises at least one IPv6 address;
dividing each network segment into a plurality of SID segments which are different in type and have no intersection with each other;
determining a corresponding distribution mode according to the type of each SID segment;
and distributing the corresponding SID for the routing information of the SR equipment by each SID segment according to the corresponding distribution mode, so that the SR equipment generates a routing table according to the distributed SID.
In a fourth aspect, the present disclosure also provides a computer storage medium having stored thereon a computer program which, when executed by a processing unit, performs the steps of the method of the first aspect.
In a fifth aspect, the present application further provides a computer program product, including a computer program, where the computer program includes program instructions, and when the program instructions are executed by an electronic device, the electronic device is caused to execute the audio/video preloading method of any one of the above items.
In addition, for technical effects brought by any one implementation manner of the second aspect to the fifth aspect, reference may be made to technical effects brought by different implementation manners of the first aspect, and details are not described here.
The SID distribution method and device based on SRv6 network provided by the invention have the following beneficial effects:
the invention provides a SID distribution method and a SID distribution device based on SRv6 network, which aims at a SID distribution management method in SRv6 technology, and can realize that a corresponding SID is distributed to routing information of SR equipment with a specified protocol in the process of establishing SRv6 network, thereby ensuring the uniqueness and effectiveness of the SID.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of a method for an SR node to obtain a SID and generate an FIB according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a message forwarding process based on SRv6 network according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a SID distribution method based on SRv6 network according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a SID corpus according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a division of a dynamic SID segment into a plurality of SID subsegments according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a SID distribution method based on SRv6 network according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a SID distributing apparatus based on SRv6 network according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a SID distributing apparatus based on SRv6 network according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The term "and/or" in the embodiments of the present invention describes an association relationship of associated objects, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The application scenario described in the embodiment of the present invention is for more clearly illustrating the technical solution of the embodiment of the present invention, and does not form a limitation on the technical solution provided in the embodiment of the present invention, and it can be known by a person skilled in the art that with the occurrence of a new application scenario, the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems. In the description of the present invention, the term "plurality" means two or more unless otherwise specified.
In the existing protocols, including IGP and BGP, the SR information notification process is implemented at the control layer by extending a TLV (Tag-Length-Value) triple field of an SR in an original information field, and the process of acquiring an SID and generating an FIB by an SR node in the above process is described below by taking the BGP protocol as an example, as shown in fig. 1:
step S101, establishing a BGP neighbor relation between equipment A and equipment B, and negotiating to obtain respective SR attribute information;
the device a and the device B are both devices with SR functions, and the SR attributes include, but are not limited to, that the device a and the device B can perform a forwarding process after finding a corresponding entry according to the SID in the FIB.
Step S102, the device B acquires the distributed SID and acquires other attribute information related to the table entry, such as information of the next forwarding node, processing information of the current node, and the like;
step S103, the equipment B sends the SID information and other attribute information to the equipment A through a protocol message;
step S104, after receiving the information, the device A generates a corresponding table entry and stores the table entry in the FIB.
The foregoing describes a process of generating an FIB, where device B establishes a BGP neighbor relationship with device a, device B obtains an assigned SID and then notifies device a of the SID and other routing information related to a forwarding interface person, and device a establishes an entry of device B according to the routing information notified by device B.
There is no specific way to distribute SID for the routing information of SR device at present;
by adding an IPv6 extension header SRH based on the original message in the message forwarding process, an explicit path of IPv6 is specified through the extension header, the address of IPv6 is used as the SID, with multiple SIDs in the SRH, a node may implement the SR function according to the path information contained in the SRH extension header, as described below in conjunction with figure 2, specifically describing the message forwarding process based on SRv6 network, as shown in fig. 2, at the source node device M, the message is encapsulated with the path information of the message, and finally sent to the device N, wherein, the path information encapsulated in the device M includes SID of each SR node in the forwarding process, when the device M encapsulates the message, it carries the SRH including multiple SIDs, where the multiple SIDs exist in the form of Segment List, and setting Segment to represent the number of total SR nodes in the message forwarding process, and the rest Segment to represent the number of the rest SR nodes in the message forwarding process.
In the forwarding process, devices without SR function, such as device 1 and device 3, are also included, and when the packet is forwarded to a device without SR function, the packet is directly forwarded according to the destination address carried by the packet.
The IPv6 address of device M in fig. 2 is 2001: : m, IPv6 address of device N is 2001: : n, each SR node includes a device numbered 11, a device numbered 2, and a device numbered 12 during forwarding, and an IPv6 address of the device numbered 11 is 2001: : 11, IPv6 address 2001 for device number 2: : 2, IPv6 address 2001 for device number 12: : 12;
when the device M sends a message, the IPv6 address with the number of 11 is filled as the destination address according to the Segment set in the SRH, the rest Segment is 3 at the moment, when the message is forwarded to the device with the number of 11, the SID carried by the message is determined to be the same as the IPv6 address of the device with the number of 11 according to the FIB lookup table entry, the rest Segment in the SRH is reduced by 1 according to the table entry, and the destination address of the message is modified to be the SID pointed by the current Segment. And filling the destination address as the IPv6 address of the device B in the message forwarding process until the rest Segment is 0.
In the existing protocol, the IPv6 address of the device is used as the SID of the device, and no specific scheme exists at present for the distribution management mode of the SID of each SR node in the above process, and based on this, the invention provides a SID distribution method based on SRv6 network.
The method ensures the uniqueness of the SID in the SR technology by dividing at least one network segment into a plurality of SID segments with different types and corresponding different protocols to the SID segments with different value ranges, realizes that the multi-protocol commonly uses the dynamic SID segments by dividing the dynamic SID segments into a plurality of SID subsegments for distribution according to different protocol types and different distribution modes, but the SID used between each protocol and each SR device is different, and ensures the uniqueness of the static SID and the BSID by distributing and managing the static SID segments and the BSID (Bind SID, Bind segment identification) segments.
As shown in fig. 3, a SID assignment method based on SRv6 network provided by the present application includes:
step S301, obtaining at least one network segment, wherein each network segment comprises at least one IPv6 address;
the network segment refers to a plurality of IPv6 addresses with a segment of value range, in the embodiment of the application, each network segment comprises at least one IPv6 address, in the prior art, the IPv6 address of the SR node is taken as the SID, so that each network segment comprises at least one SID, and in the embodiment of the application, one or more network segments are taken as the value range of the SID;
the obtained network segments do not include specific IPv6 network segments defining specific functions, such as IPv6 network segments of local link addresses, local loopback addresses, broadcast addresses, and the like, which are not described in detail herein.
Step S302, dividing each network segment into a plurality of SID segments which are different in type and have no intersection with each other;
dividing each obtained network segment into a plurality of SID segments of different types, wherein the SID distribution modes of SR equipment in the protocol are different according to the SID segments of different types, but the division modes of dividing each network segment into a plurality of SID segments can be the same.
As a specific implementation manner, according to the requirements of different protocols, each network segment may be divided into the following 3 SID segments, where the 3 network segments are of different types, and the value ranges of the SID segments of each type are different, including:
1) dynamic SID segment
Determining that SR equipment of any protocol has a distribution SID requirement according to the protocol requirement, wherein the SID is called a dynamic SID when the SID is generated through a network;
the dynamic SID segment divided by each network segment is divided into a plurality of SID subsegments with fixed length, wherein the fixed length of each SID subsegment is a configurable parameter, optionally, the dynamic SID segment can be divided into a plurality of SID subsegments with fixed length on average, or the dynamic SID segment can be divided into a plurality of SID subsegments with fixed length in proportion, and each protocol corresponds to at least one SID subsegment.
2) Static SID segment
According to the protocol requirement, the SR device of the specified protocol except the SR-Policy protocol is determined to have the requirement of allocating SID, and when the SID is the configuration specified by the user, the SID is called static SID.
3)BSID
When the SR device which is determined to be SR-Policy protocol has the requirement of allocating SID according to the protocol requirement, the SID is called BSID.
As shown in fig. 4, optionally, in the present application, all SIDs available in at least one network segment are used as a SID corpus library, and the SID corpus library is correspondingly divided into a dynamic SID library, a static SID library and a BSID library, where the static SID segment corresponds to a static SID and only corresponds to a specified protocol, the BSID segment corresponds to a BSID and also only corresponds to a specified protocol, the dynamic SID library corresponds to multiple protocols, each protocol corresponds to multiple SID subsegments, and multiple subsegments of the same protocol form a SID subset library corresponding to the protocol;
as shown in fig. 5, the dynamic SID segment is divided into a plurality of fixed SID subsections.
Step S303, determining a corresponding distribution mode according to the type of each SID segment;
in the embodiment of the present application, the SID segments include 3 types, which are a dynamic SID segment, a static SID segment, and a BSID segment, and a method for assigning a SID in the 3 types of SID segments to routing information of an SR device in a specified protocol includes the following steps:
1) allocating the dynamic SID segment to the routing information of the SR device according to the corresponding allocation mode
When SR equipment of any protocol has the requirement of allocating SID, at least one unallocated SID sub-segment in the dynamic SID segment is allocated to the routing information of the corresponding SR equipment of the protocol;
the unassigned SID subsegment includes a SID subsegment which is not assigned to any protocol, and optionally, the unassigned SID subsegment further includes a step of releasing the assigned SID by an SR device of any protocol, and when all SIDs of any SID subsegment are released, wherein when the SR device turns off the SR function, the corresponding assigned SID is released by the device.
When SR equipment of any protocol has a requirement of allocating SID, acquiring the unallocated SID subsegment, and acquiring routing information of the SR equipment allocated by SID to a corresponding protocol in the allocated SID subsegment by using a SID generator provided by the application according to the SID value range of the unallocated SID subsegment and the SID value range allocated to the SR equipment, and storing the allocated SID in a dynamic SID table.
And when the SID generator acquires the dynamic SID from the SID value range of the SID subsegment which is not distributed, comparing the SID with the dynamic SID table, if the same dynamic SID exists, acquiring the dynamic SID from the SID value range of the SID subsegment which is not distributed again, and comparing the dynamic SID with the dynamic SID table, otherwise acquiring the routing information of the SR equipment which is distributed by the SID to the corresponding protocol, wherein at least one unallocated SID exists in the SID subsegment which is not distributed.
2) Distributing the static SID segment to the route information of the SR equipment of the appointed protocol according to the corresponding distribution mode
When the SR equipment of the appointed protocol has the requirement of distributing the SID, the SID in the static SID segment is distributed to the routing information of the SR equipment of the appointed protocol, wherein, after one SID in the static SID segment is distributed to the routing information of one SR equipment of the appointed protocol, the routing information of other SR equipment of the appointed protocol cannot be distributed, and the uniqueness of the SID is ensured.
Optionally, one static SID segment corresponds to one designated protocol, and when there is another designated protocol that needs to be correspondingly assigned with a static SID, one static SID segment is reassigned, and the SID in the reassigned static SID segment is assigned to SR devices of the other designated protocol according to the corresponding assignment manner.
3) Distributing the BSID segment to the routing information of the SR equipment of the designated protocol according to the corresponding distribution mode to obtain the corresponding SID
When SR equipment in SR-Policy protocol has requirement of assigning SID, assigning SID in BSID segment to routing information of SR equipment in appointed protocol, wherein, after one SID in BSID segment is assigned to routing information of one SR equipment in appointed protocol, routing information of other SR equipment in said protocol will not be assigned, thus ensuring uniqueness of SID.
Optionally, one BSID segment corresponds to one assigned protocol, and when there is another assigned protocol that needs to be assigned with the BSID, the BSID segment is reassigned, and the SID in the reassigned BSID segment is assigned to the SR device of the other assigned protocol according to the corresponding assignment manner.
Step S304, distributing corresponding SID for the routing information of the SR device according to the corresponding distribution mode for each SID segment, so that the SR device generates a routing table according to the distributed SID.
When the SR device establishes SR relationship with other devices, the SID and other information related to a forwarding interface and the like are notified to the other devices through a route, wherein the SID corresponds to an SR information field in the route information, and one SR device can obtain route information corresponding to a plurality of other devices through establishing SR relationship with other devices.
In the embodiment of the application, the dynamic SID is allocated in a manner that when a SID generator obtains a dynamic SID from a SID value range of an unassigned SID subsegment, the minimum value of any unassigned SID subsegment is stored as the value of a first counter, when SR equipment in a protocol corresponding to the SID subsegment first requires a SID, the value of the first counter is allocated to SR equipment as a dynamic SID, and when other SR equipment in the protocol corresponding to the SID subsegment requires a SID, the value of the first counter is added by one to obtain a dynamic SID, which is allocated to other SR equipment, until the value of the first counter reaches the maximum value of the SID subsegment;
comparing the SID with a dynamic SID table when the dynamic SID is generated every time, if the same SID exists, the dynamic SID is not distributed to SR equipment with requirements, and comparing the dynamic SID table with the dynamic SID table after adding one to the numerical value in the first counter until the same SID value does not exist in the dynamic SID table;
when the value of the first counter reaches the maximum value of the SID subsegment and the SID of the SID subsegment is not completely distributed, the minimum value of the dynamic SID subsegment is stored in the first counter again, and then the process is repeated;
in the embodiment of the application, the number of the SIDs assigned to the SR device in the SID subsegment which is not fully assigned is saved as the value of the second counter, and when the value of the second counter is smaller than the number of the advisable SIDs of the corresponding SID subsegment which is not fully assigned, it is indicated that the SIDs in the SID subsegment are not fully assigned.
The SID assignment method based on SRv6 network proposed in the present application is described in detail below with reference to specific embodiments, as shown in fig. 6:
step S601, obtaining at least one network segment, wherein each network segment comprises at least one IPv6 address;
step S602, dividing each network segment into a dynamic SID segment, a static SID segment and a BSID segment which are not intersected with each other;
step S603, the dynamic SID segment is averagely divided into a plurality of SID subsegments with fixed length, and when the SR equipment of any protocol has the requirement of distributing SID, at least one undistributed SID subsegment is distributed to the routing information of the corresponding SR equipment of the protocol;
step S604, obtaining the routing information of SR equipment which is distributed to the corresponding protocol by the SID in the uncompleted distributed SID subsegment through the SID generator according to the SID value range of the uncompleted distributed SID subsegment and the distributed SID, and storing the distributed SID in a dynamic SID table;
step S605, storing the minimum value of any unallocated SID subsegment as the numerical value of a first counter, obtaining a dynamic SID by adding one to the numerical value of the first counter, comparing the SID with a dynamic SID table to determine whether the same dynamic SID exists, if so, executing step S606, and if not, executing step S607;
step S606, add one to the value of the first counter again until there is no same SID in the dynamic SID table;
step S607, obtain the new dynamic SID and keep in the dynamic SID table;
step S608, when the value of the first counter reaches the maximum value of the dynamic SID subsegment and the SID of the SID subsegment is not completely distributed, the minimum value of the dynamic SID subsegment is stored in the first counter again and step S606 is executed;
saving the number of SIDs which are already allocated to the SR equipment in any SID subsegment which is not completely allocated as the numerical value of a second counter;
when the numerical value of the second counter is determined to be not larger than the number of the possible values of SID of any unallocated SID subsegment, acquiring the SID subsegment again in the dynamic SID segment;
step S609, distributing the static SID segment to the routing information of the SR equipment of the appointed protocol according to the corresponding distribution mode;
step S610, the BSID segment assigns a corresponding SID to the routing information of the SR device with the specified protocol according to the corresponding assignment manner.
The SID assigning method based on SRv6 network in the present invention is explained above, and the SID assigning apparatus based on SRv6 network is explained below.
Please refer to fig. 7, which illustrates an apparatus for SID assignment based on SRv6 network according to an embodiment of the present invention, including:
an obtaining module 701, configured to obtain at least one network segment, where each network segment includes at least one IPv6 address;
a dividing module 702, configured to divide each network segment into multiple SID segments that are of different types and have no intersection with each other;
a determining module 703, configured to determine a corresponding allocation manner according to the type of each SID segment;
the allocating module 704 is configured to allocate, according to the corresponding allocation manner, each SID segment to the routing information of the SR device, so that the SR device generates a routing table according to the allocated SID.
Optionally, if each SID segment includes a dynamic SID segment, the assigning module is configured to assign a corresponding SID to the routing information of the SR device according to a corresponding assignment manner, and specifically configured to:
dividing the dynamic SID segment into a plurality of SID subsegments of fixed length;
when SR equipment of different protocols has SID allocation requirements, allocating at least one unallocated SID sub-segment to the routing information of the SR equipment of the corresponding protocol;
and according to the information of the distributed SIDs released by the SR equipment with different protocols, when all the SIDs of any SID sub-section are determined to be released, updating the any SID sub-section into the unallocated SID sub-section.
Optionally, the SID segment includes a static SID segment, where the static SID segment includes a SID sub-segment, and the allocation module is configured to allocate, to the routing information of the SR device, a corresponding SID by using each SID segment in a corresponding allocation manner, and specifically configured to:
when SR equipment of a specified protocol except SR-Policy protocol has SID allocation requirement, allocating SID in the static SID segment to the routing information of the SR equipment of the specified protocol.
Optionally, the SID segment includes a BSID segment, the BSID segment includes a SID sub-segment, and the allocation module is configured to allocate, to the routing information of the SR device, a corresponding SID for each SID segment according to a corresponding allocation manner, and specifically configured to:
and when the SR equipment of the SR-Policy protocol has the requirement of allocating SID, allocating the SID in the BSID segment to the routing information of the SR equipment of the SR-Policy protocol.
Optionally, the obtaining module is configured to obtain at least one network segment, and specifically configured to:
at least one IPv6 network segment is obtained except for a specific IPv6 network segment defining a specific function.
Optionally, the allocating module is configured to allocate, when SR devices of different protocols have SID allocation requirements, at least one unallocated SID subsegment to routing information of the SR device of a corresponding protocol, and specifically configured to:
when SR equipment with different protocols has requirements for distributing SID, acquiring unallocated SID subsections in which all SID are not distributed;
the method comprises the steps that a SID generator obtains a value range according to SID of an uncompleted distributed SID sub-section and SID which is already distributed to SR equipment, wherein at least one distributed SID exists in the uncompleted distributed SID sub-section;
and acquiring the routing information of the SR equipment with the SID allocated to the corresponding protocol in the SID sub-section which is not allocated, and storing the allocated SID in a dynamic SID table.
Optionally, the allocating module is configured to acquire, in the SID subsegment that is not allocated, routing information that the SID is allocated to an SR device of a corresponding protocol, and specifically configured to:
after acquiring a dynamic SID from the SID value range of the SID subsegment which is not distributed, comparing the acquired dynamic SID with a dynamic SID table;
if the dynamic SID table has the acquired dynamic SID, acquiring the dynamic SID again from the SID value range of the SID subsegment which is not allocated, and comparing the dynamic SID with the dynamic SID table, otherwise, allocating the acquired dynamic SID to the routing information of the SR device of the corresponding protocol.
Optionally, the assignment module is configured to obtain, by using a SID generator, routing information, which is assigned to the SR device of the corresponding protocol, of the SID in the SID sub-segment that is not assigned according to the SID value range of the SID sub-segment that is not assigned and the assigned SID, and specifically configured to:
saving the minimum value of any uncompleted allocated SID subsegment as the numerical value of a first counter in the SID generator, and adding 1 to the numerical value of the first counter to obtain a dynamic SID;
if the numerical value of the first counter does not reach the maximum value, comparing the obtained dynamic SID with a dynamic SID table, if the obtained dynamic SID exists in the dynamic SID table, adding 1 to the numerical value of the first counter again to compare with the dynamic SID table, and if the obtained dynamic SID does not exist in the dynamic SID table, allocating the obtained dynamic SID to the routing information of the SR equipment of the corresponding protocol;
and if the numerical value of the first counter reaches the maximum value of any uncompleted distributed SID subsegment and the SID of any uncompleted distributed SID subsegment is not completely distributed, storing the minimum value of any uncompleted distributed SID subsegment in the first counter again to repeat the process, and otherwise, acquiring the minimum value of another uncompleted distributed SID subsegment again and storing the minimum value as the process repeated in the first counter in the SID generator.
Optionally, the allocation module is configured to determine that the SID of any unfinished allocated SID sub-segment is not fully allocated, and specifically, is configured to:
saving the number of the allocated SIDs in any uncompleted allocated SID subsection as the numerical value of a second counter;
determining that the SID of any uncompleted allocated SID sub-segment is not completely allocated when the count of the second counter is not larger than the number of all SIDs of any uncompleted allocated SID sub-segment.
An SRv6 network-based SID assignment apparatus in the present embodiment is described above from the perspective of a modular functional entity, and an SRv6 network-based SID assignment apparatus in the present embodiment is described below from the perspective of hardware processing.
Referring to fig. 8, an apparatus for SID assignment based on SRv6 network in the embodiment of the present application includes:
at least one processing unit 801 and at least one memory unit 802, and a bus system 809;
wherein the storage unit stores program code that, when executed by the processing unit, causes the processing unit to perform the following:
acquiring at least one network segment, wherein each network segment comprises at least one IPv6 address;
dividing each network segment into a plurality of SID segments which are different in type and have no intersection with each other;
determining a corresponding distribution mode according to the type of each SID segment;
and distributing the corresponding SID for the routing information of the SR equipment by each SID segment according to the corresponding distribution mode, so that the SR equipment generates a routing table according to the distributed SID.
Fig. 8 is a schematic diagram of an apparatus for SID assignment in SRv 6-based network according to an embodiment of the present disclosure, where the apparatus 800 may have a relatively large difference due to different configurations or performances, and may include one or more processing units (CPUs) 801 (e.g., one or more processing units) and a storage unit 802, and one or more storage media 803 (e.g., one or more mass storage devices) for storing applications 804 or data 805. The storage unit 802 and the storage medium 803 may be a transient storage or a persistent storage, among others. The program stored in the storage medium 803 may include one or more modules (not shown), and each module may include a series of instruction operations for the information processing apparatus. Still further, the processing unit 801 may be arranged to communicate with the storage medium 803 to execute a series of instruction operations in the storage medium 803 on the apparatus 800.
The apparatus 800 may also include one or more wired or wireless network interfaces 807, one or more input-output interfaces 808, and/or one or more operating systems 806, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
Optionally, if each SID segment includes a dynamic SID segment, assigning, by the SID segment, a corresponding SID to the routing information of the SR device according to a corresponding assignment manner, where the assigning includes:
dividing the dynamic SID segment into a plurality of SID subsegments of fixed length;
when SR equipment of different protocols has SID allocation requirements, allocating at least one unallocated SID sub-segment to the routing information of the SR equipment of the corresponding protocol;
and according to the information of the distributed SIDs released by the SR equipment with different protocols, when all the SIDs of any SID sub-section are determined to be released, updating the any SID sub-section into the unallocated SID sub-section.
Optionally, the SID segment includes a static SID segment, where the static SID segment includes a SID sub-segment, and the assigning, by the SID segment, a corresponding SID to the routing information of the SR device according to a corresponding assignment manner includes:
when SR equipment of a specified protocol except SR-Policy protocol has SID allocation requirement, allocating SID in the static SID segment to the routing information of the SR equipment of the specified protocol.
Optionally, the SID segment includes a BSID segment, the BSID segment includes a SID sub-segment, and the assigning, according to a corresponding assignment manner, each SID segment to the routing information of the SR device, a corresponding SID includes:
and when the SR equipment of the SR-Policy protocol has the requirement of allocating SID, allocating the SID in the BSID segment to the routing information of the SR equipment of the SR-Policy protocol.
Optionally, acquiring at least one network segment includes:
at least one IPv6 network segment is obtained except for a specific IPv6 network segment defining a specific function.
Optionally, when SR devices of different protocols have SID allocation requirements, allocating at least one unallocated SID subsegment to routing information of SR devices of a corresponding protocol, where the routing information includes:
when SR equipment with different protocols has requirements for distributing SID, acquiring unallocated SID subsections in which all SID are not distributed;
the method comprises the steps that a SID generator obtains a value range according to SID of an uncompleted distributed SID sub-section and SID which is already distributed to SR equipment, wherein at least one distributed SID exists in the uncompleted distributed SID sub-section;
and acquiring the routing information of the SR equipment with the SID allocated to the corresponding protocol in the SID sub-section which is not allocated, and storing the allocated SID in a dynamic SID table.
Optionally, obtaining, in the SID subsegment that is not allocated completely, routing information that the SID is allocated to an SR device of a corresponding protocol includes:
after acquiring a dynamic SID from the SID value range of the SID subsegment which is not distributed, comparing the acquired dynamic SID with a dynamic SID table;
if the dynamic SID table has the acquired dynamic SID, acquiring the dynamic SID again from the SID value range of the SID subsegment which is not allocated, and comparing the dynamic SID with the dynamic SID table, otherwise, allocating the acquired dynamic SID to the routing information of the SR device of the corresponding protocol.
Optionally, obtaining, by a SID generator, routing information, in the SID subsegment that is not completely allocated, of the SID assigned to the SR device of the corresponding protocol according to a SID value range of the SID subsegment that is not completely allocated and an assigned SID, where the routing information includes:
saving the minimum value of any uncompleted allocated SID subsegment as the numerical value of a first counter in the SID generator, and adding 1 to the numerical value of the first counter to obtain a dynamic SID;
if the numerical value of the first counter does not reach the maximum value, comparing the obtained dynamic SID with a dynamic SID table, if the obtained dynamic SID exists in the dynamic SID table, adding 1 to the numerical value of the first counter again to compare with the dynamic SID table, and if the obtained dynamic SID does not exist in the dynamic SID table, allocating the obtained dynamic SID to the routing information of the SR equipment of the corresponding protocol;
and if the numerical value of the first counter reaches the maximum value of any uncompleted distributed SID subsegment and the SID of any uncompleted distributed SID subsegment is not completely distributed, storing the minimum value of any uncompleted distributed SID subsegment in the first counter again to repeat the process, and otherwise, acquiring the minimum value of another uncompleted distributed SID subsegment again and storing the minimum value as the process repeated in the first counter in the SID generator.
Optionally, determining that the SID of any unfinished allocated SID subsegment is not fully allocated includes:
saving the number of the allocated SIDs in any uncompleted allocated SID subsection as the numerical value of a second counter;
determining that the SID of any uncompleted allocated SID sub-segment is not completely allocated when the count of the second counter is not larger than the number of all SIDs of any uncompleted allocated SID sub-segment.
Embodiments of the present invention also provide a computer-readable storage medium, which includes instructions that, when executed on a computer, cause the computer to perform the method for SID assignment based on SRv6 network provided in the foregoing embodiments.
Embodiments of the present disclosure also provide a computer program product including a computer program, where the computer program includes program instructions, and when the program instructions are executed by an electronic device, the electronic device is caused to execute the method for SRv6 network-based SID assignment provided in the foregoing embodiments.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The technical solutions provided by the present application are introduced in detail, and the present application applies specific examples to explain the principles and embodiments of the present application, and the descriptions of the above examples are only used to help understand the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (12)

1. A segment ID distribution method of a segment routing SRv6 network based on the sixth edition of Internet protocol is applied to a segment routing SR device, and is characterized in that the method comprises the following steps:
acquiring at least one network segment, wherein each network segment comprises not less than one IPv6 address;
dividing each network segment into a plurality of SID segments which are different in type and have no intersection with each other;
determining a corresponding distribution mode according to the type of each SID segment;
and distributing the corresponding SID for the routing information of the SR equipment according to the corresponding distribution mode by each SID section, so that the SR equipment generates a routing table according to the distributed SID.
2. The method of claim 1, wherein if each SID segment includes a dynamic SID segment, assigning the SID segment to a corresponding SID for the routing information of the SR device according to a corresponding assignment manner, includes:
dividing the dynamic SID segment into a plurality of SID subsegments of fixed length;
when SR equipment of different protocols has SID allocation requirements, allocating at least one unallocated SID sub-segment to the routing information of the SR equipment of the corresponding protocol;
according to the SR equipment with different protocols, releasing the routing information of the distributed SIDs, and updating any SID sub-section into an unallocated SID sub-section when determining that all SIDs of any SID sub-section are released.
3. The method of claim 1, wherein the SID segment comprises a static SID segment, the static SID segment comprises a SID subsegment, and assigning the SID segments to route information of the SR device according to corresponding assignment manners includes:
when SR equipment of a specified protocol except SR-Policy protocol has SID allocation requirement, allocating SID in the static SID segment to the routing information of the SR equipment of the specified protocol.
4. The method of claim 1, wherein the SID segment includes a binding segment identifier BSID segment, the BSID segment includes a SID sub-segment, and assigning each SID segment to a corresponding SID for the routing information of the SR device according to a corresponding assignment manner includes:
and when the SR equipment of the SR-Policy protocol has the requirement of allocating SID, allocating the SID in the BSID segment to the routing information of the SR equipment of the SR-Policy protocol.
5. The method of any of claims 1-4, wherein obtaining at least one network segment comprises:
at least one IPv6 network segment is obtained except for a specific IPv6 network segment defining a specific function.
6. The method according to claim 2, wherein when SR devices of different protocols have SID allocation requirements, allocating at least one unallocated SID subsegment to routing information of SR devices of a corresponding protocol, including:
when SR equipment with different protocols has requirements for distributing SID, acquiring unallocated SID subsections in which all SID are not distributed;
the method comprises the steps that a SID generator obtains a value range according to SID of an uncompleted distributed SID sub-section and SID which is already distributed to SR equipment, wherein at least one unallocated SID exists in the uncompleted distributed SID sub-section;
and acquiring the routing information of the SR equipment with the SID allocated to the corresponding protocol in the SID sub-section which is not allocated, and storing the allocated SID in a dynamic SID table.
7. The method of claim 6, wherein obtaining routing information of SIDs allocated to SR devices of corresponding protocols in the SID sub-segment without completed allocation comprises:
after acquiring a dynamic SID from the SID value range of the SID subsegment which is not distributed, comparing the acquired dynamic SID with a dynamic SID table;
if the dynamic SID table has the acquired dynamic SID, acquiring the dynamic SID again from the SID value range of the SID subsegment which is not allocated, and comparing the dynamic SID with the dynamic SID table, otherwise, allocating the acquired dynamic SID to the routing information of the SR device of the corresponding protocol.
8. The method of claim 6, wherein obtaining, by a SID generator, routing information of a SID allocated to an SR device of a corresponding protocol in an uncompleted allocated SID sub-segment according to a SID value range of the uncompleted allocated SID sub-segment and an allocated SID comprises:
saving the minimum value of any uncompleted allocated SID subsegment as the numerical value of a first counter in the SID generator, and adding 1 to the numerical value of the first counter to obtain a dynamic SID;
if the numerical value of the first counter does not reach the maximum value, comparing the obtained dynamic SID with a dynamic SID table, if the obtained dynamic SID exists in the dynamic SID table, adding 1 to the numerical value of the first counter again to compare with the dynamic SID table, and if the obtained dynamic SID does not exist in the dynamic SID table, allocating the obtained dynamic SID to the routing information of the SR equipment of the corresponding protocol;
and if the value of the first counter reaches the maximum value of any uncompleted distributed SID subsegment and the SID of any uncompleted distributed SID subsegment is not completely distributed, storing the minimum value of any uncompleted distributed SID subsegment in the first counter again to repeat the process, and otherwise, re-acquiring the minimum value of another uncompleted distributed SID subsegment and storing the minimum value as the process repeated in the first counter in the SID generator.
9. The method of claim 8, wherein determining that the SID of any of the outstanding allocated SID subsegments is not fully allocated comprises:
saving the number of the allocated SIDs in any uncompleted allocated SID subsection as the numerical value of a second counter;
determining that the SID of any uncompleted allocated SID sub-segment is not completely allocated when the count of the second counter is not larger than the number of all SIDs of any uncompleted allocated SID sub-segment.
10. An SRv6 network-based SID assignment apparatus, the apparatus comprising:
the network segment acquisition module is used for acquiring at least one network segment, and each network segment comprises not less than one IPv6 address;
the dividing module is used for dividing each network segment into a plurality of SID segments which are different in type and have no intersection with each other;
a determining module, configured to determine a corresponding allocation manner according to the type of each SID segment;
and the distribution module is used for distributing the corresponding SID for the routing information of the SR equipment according to the corresponding distribution mode by each SID section, so that the SR equipment generates a routing table according to the distributed SID.
11. An apparatus for assigning SIDs in SRv 6-based network, comprising: a storage unit and a processing unit;
wherein the storage unit is used for storing programs;
the processing unit is used for executing the program in the storage unit and comprises the following steps:
acquiring at least one network segment, wherein each network segment comprises not less than one IPv6 address;
dividing each network segment into a plurality of SID segments which are different in type and have no intersection with each other;
determining a corresponding distribution mode according to the type of each SID segment;
and distributing the corresponding SID for the routing information of the SR equipment by each SID segment according to the corresponding distribution mode, so that the SR equipment generates a routing table according to the distributed SID.
12. A computer-readable storage medium comprising computer program instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 9.
CN201911329833.1A 2019-12-20 2019-12-20 SID distribution method and device based on SRv6 network Active CN110995596B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911329833.1A CN110995596B (en) 2019-12-20 2019-12-20 SID distribution method and device based on SRv6 network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911329833.1A CN110995596B (en) 2019-12-20 2019-12-20 SID distribution method and device based on SRv6 network

Publications (2)

Publication Number Publication Date
CN110995596A CN110995596A (en) 2020-04-10
CN110995596B true CN110995596B (en) 2022-04-12

Family

ID=70073740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911329833.1A Active CN110995596B (en) 2019-12-20 2019-12-20 SID distribution method and device based on SRv6 network

Country Status (1)

Country Link
CN (1) CN110995596B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113691490A (en) * 2020-05-19 2021-11-23 华为技术有限公司 Method and device for checking SRv6 message
CN113746729B (en) * 2020-05-28 2023-03-10 华为技术有限公司 Method and device for processing binding segment identifier
CN112087387B (en) * 2020-08-14 2022-04-19 烽火通信科技股份有限公司 Network processor and data packet forwarding method
CN114257542A (en) * 2020-09-19 2022-03-29 华为技术有限公司 Method, system, device, equipment and storage medium for distributing path identifiers
EP4207640A4 (en) * 2020-09-19 2024-02-28 Huawei Tech Co Ltd Path identifier allocation method, system, apparatus and device, and storage medium
CN112243010B (en) * 2020-11-13 2021-08-06 中盈优创资讯科技有限公司 SRv 6-based traffic collection method and device, computer equipment and storage medium
CN112422435B (en) * 2020-11-13 2022-03-25 新华三技术有限公司合肥分公司 Message forwarding control method and device and electronic equipment
CN113691451B (en) * 2021-09-22 2022-08-19 新华三技术有限公司 Segment identifier determination method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104718730A (en) * 2012-10-05 2015-06-17 思科技术公司 Segment routing techniques
CN105871721A (en) * 2015-01-19 2016-08-17 中兴通讯股份有限公司 Segment routing processing method, processing device and sending device
CN107968752A (en) * 2016-10-20 2018-04-27 新华三技术有限公司 A kind of SID acquisition methods and device
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
CN109688057A (en) * 2018-12-13 2019-04-26 Ut斯达康通讯有限公司 The message forwarding method and device of section route network based on IPV6

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9369371B2 (en) * 2012-10-05 2016-06-14 Cisco Technologies, Inc. Method and system for path monitoring using segment routing
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104718730A (en) * 2012-10-05 2015-06-17 思科技术公司 Segment routing techniques
CN105871721A (en) * 2015-01-19 2016-08-17 中兴通讯股份有限公司 Segment routing processing method, processing device and sending device
CN107968752A (en) * 2016-10-20 2018-04-27 新华三技术有限公司 A kind of SID acquisition methods and device
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
CN109688057A (en) * 2018-12-13 2019-04-26 Ut斯达康通讯有限公司 The message forwarding method and device of section route network based on IPV6

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
"An Efficient Linux Kernel Implementation of Service Function Chaining for Legacy VNFs Based on IPv6 Segment Routing";Andrea Mayer,等;《2019 IEEE Conference on Network Softwarization (NetSoft)》;20190822;第333-341页 *
"draft-ietf-6man-segment-routing-header-26";C. Filsfils, Ed.,等;《IETF》;20191022;第1-32页 *
"RFC8402";C. Filsfils, Ed.,等;《IETF》;20180731;第1-32页 *
"基于流量工程的分段路由增量部署方案的研究";刚亦柔;《中国优秀硕士学位论文全文数据库信息科技辑》;20190831;I139-49 *

Also Published As

Publication number Publication date
CN110995596A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
CN110995596B (en) SID distribution method and device based on SRv6 network
US9999030B2 (en) Resource provisioning method
CN107580083B (en) Method and system for allocating IP addresses of containers
CN109889621B (en) Configuration method and device of virtual private cloud service
CN103814554B (en) A kind of communication means of virtual easily extensible local area network (LAN), device and system
US20220377045A1 (en) Network virtualization of containers in computing systems
CN105657081B (en) The method, apparatus and system of DHCP service are provided
US10698739B2 (en) Multitenant access to multiple desktops on host machine partitions in a service provider network
JP5484427B2 (en) Network system management method, network system, and management server
CN104734931A (en) Method and device for establishing link between virtual network functions
CN109981493B (en) Method and device for configuring virtual machine network
CN108924268A (en) A kind of container cloud service system and pod creation method, device
CN111510515B (en) Method and device for distinguishing containers of mixed application environment
US9705741B2 (en) Dynamically allocating network addresses
CN103475704A (en) Method for virtual node configuration for virtual cluster application
CN105099950A (en) Resource allocation method, message communication method and devices
CN113810230A (en) Method, device and system for carrying out network configuration on containers in container cluster
JP2016116184A (en) Network monitoring device and virtual network management method
CN114500462A (en) Virtual private cloud network address allocation method and device, electronic equipment and medium
CN106559338A (en) Tenant's division methods, device and SDN system in SDN
US7792936B2 (en) Method and apparatus for virtualizing network resources
US20210409343A1 (en) Network controller
EP4083795A1 (en) Method for deploying virtual machine, and related apparatus
CN110636149A (en) Remote access method, device, router and storage medium
WO2022057487A1 (en) Path identifier allocation method, system, apparatus and device, and storage medium

Legal Events

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