CN112653622B - SRv6uSID forwarding method and device - Google Patents

SRv6uSID forwarding method and device Download PDF

Info

Publication number
CN112653622B
CN112653622B CN202011466756.7A CN202011466756A CN112653622B CN 112653622 B CN112653622 B CN 112653622B CN 202011466756 A CN202011466756 A CN 202011466756A CN 112653622 B CN112653622 B CN 112653622B
Authority
CN
China
Prior art keywords
message
usid
station
information
matching
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
CN202011466756.7A
Other languages
Chinese (zh)
Other versions
CN112653622A (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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202011466756.7A priority Critical patent/CN112653622B/en
Publication of CN112653622A publication Critical patent/CN112653622A/en
Application granted granted Critical
Publication of CN112653622B publication Critical patent/CN112653622B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Landscapes

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

Abstract

The invention discloses a method and a device for forwarding SRv6uSID, wherein the method for forwarding SRv6uSID comprises the following steps: calculating the incoming direction message DA information and the outgoing direction message DA information of each site according to the uSID segment routing path, and generating a matching item based on the incoming direction message DA information and the outgoing direction message DA information of each site; issuing a first matching table and a second matching table for the terminal station and issuing a third matching table for the terminal station; receiving a message needing to execute uSID forwarding logic from a message inlet of a current site, and determining whether the current site is a passing site or a terminating site according to DA information carried in the message; if the current station is a station-passing station, performing first pipeline processing on the message according to the first matching table, and performing second pipeline processing on the message according to the second matching table; and if the current station is the terminal station, processing the message according to the third matching table. The message actions are unified, and the difficulty of hardware support is reduced.

Description

SRv6uSID forwarding method and device
Technical Field
The invention belongs to the field of SRv6, and particularly relates to a SRv6uSID forwarding method and device.
Background
SR (Segment Routing) is a Segment Routing mechanism that uses a path list (IPv4 uses MPLS labels, IPv6 uses IPv6 addresses of Routing headers) to specify the network path on which to route packets. The packet must pass through each node in the label list, and possibly other intermediate nodes, making its function very similar to the loose source routing mechanism of IPv 4. The loose source routing mechanism reduces the number of labels required to route a packet to a destination, and the network forwards the packet along the shortest path between nodes in the label list. SR uses IGP to replace RSVP/LDP to distribute label, and uses IGP FRR to realize reliable protection between nodes. The SR also supports Anycast protection, which is convenient for realizing the protection of the border nodes of the routing domain and the path load sharing protection. The SR also supports the binding label, and can well support the intercommunication of heterogeneous networks.
SRv6 technology is a new generation IP bearer network core protocol of Native IPv6 and Source Routing (Source Routing), is a segment Routing implementation under IPv6 network, is an evolution scheme of future MPLS-SR technology, is used for meeting the service bearer requirements of the future 5G and cloud era, and is a development direction of the future 5G core network construction. SRv6 as a new technology, the related standards are very many and as the segment routing technology itself is in the process of evolution, in order to solve the problem that SRv6 has an excessive cost (MPLS-SR 20bit/SRv 6128 bit) compared with MPLS-SR segment routing encapsulation technology, there are many leading operators, OTTs, equipment vendors and chip vendors in the cisco industry, and an IETF draft-files-spring-srv 6-net-pgm-extension-uSID-00 is submitted. This draft extends the existing SRv6 framework and defines a new Segment type uSID (micro Segment). A128-bit IPv6 address is divided into 8 shares, the 1 st share is used for representing uSID block information, and in addition, each of the 7 shares is used for representing a Segment information (uSID), so that the SRv6 Segment efficiency is improved by 7 times, and the problems of overlarge overhead, bearing efficiency, MTU and the like are thoroughly solved. However, a new action of uN is defined in the ussid draft, and the action description thereof puts high requirements on hardware, so that the ASIC chip which currently has solidified logic support SRv6 cannot support the ussid extension. However, when implementing the uSID by using NP (Network Processor chip), there is also a problem that hardware resources and SRv6 cannot be shared, which results in high implementation cost.
Disclosure of Invention
Aiming at the defects or improvement requirements in the prior art, the invention provides an SRv6uSID forwarding method and device, aiming at converting message DA content displacement/copy operation in uN action into modified message DA action after accurate matching, unifying the message actions of uSID/SRv6, greatly reducing the difficulty of hardware supporting SRv6uSID standard, and providing a feasible scheme for supporting the uSID standard for the existing ASIC chip only supporting SRv6 standard; for an NP chip, when the uSID is realized, hardware resources and SRv6 can be shared, and the realization cost is lower than that of TCAM, so that the technical problems that at present, an ASIC chip of a solidified logic is difficult to support SRv6uSID extension, and when the uSID is realized by adopting a network processor chip, the hardware resources and SRv6 cannot be shared, and the realization cost is too high are solved.
To achieve the above object, according to an aspect of the present invention, there is provided an SRv6uSID forwarding method, including:
calculating the incoming direction message DA information and the outgoing direction message DA information of each site according to the uSID segment routing path, and generating a matching item based on the incoming direction message DA information and the outgoing direction message DA information of each site to establish a corresponding matching table;
aiming at each station, issuing a first matching table and a second matching table for passing the station, and issuing a third matching table for the terminal station, wherein the first matching table comprises a matching item and a first processing action which are generated based on incoming direction message DA information, the second matching table comprises a matching item and a second processing action which are generated based on outgoing direction message DA information, and the third matching table comprises a matching item and an SRv6End action which are generated based on the incoming direction message DA information;
receiving a message needing to execute uSID forwarding logic from a message inlet of a current site, and determining whether the current site is a passing site or a terminating site according to DA information carried in the message;
if the current station is the station passing station, performing first pipeline processing on the message according to the first matching table, and performing second pipeline processing on the message according to the second matching table;
and if the current station is the terminal station, processing the message according to the third matching table.
Preferably, the receiving, from the message inlet of the current station, a message that needs to execute the uSID forwarding logic, and determining whether the current station is a station-passing station or an end station according to DA information carried in the message includes:
receiving a message needing to execute SRv6 logic from a message inlet of a current site, analyzing a current SID pointed by the message to obtain uSID address block information, and judging whether the uSID address block information exists in the uSID address block database;
if the uSID address block information exists in the uSID address block database, the message needs to execute uSID forwarding logic;
and if the uSID address block information does not exist in the uSID address block database, the current SID is a common SRv6 SID, and SRv6 forwarding logic is directly executed.
Preferably, the receiving, from the message inlet of the current station, a message that needs to execute the uSID forwarding logic, and determining whether the current station is a station-passing station or an end station according to DA information carried in the message includes:
receiving a message needing to execute uSID forwarding logic from a message inlet of a current site, and performing 128-bit accurate matching on DA information of the message to determine whether a relevant uSID configuration table entry exists in the current site;
if the matching is successful, the current site has related uSID configuration table entries, and whether all DA [48..63] of the message are 0 is judged;
if the DA [48..63] of the message is all 0, the current site is the terminal site;
and if the DA [48..63] of the message is not completely 0, the current site is the site passing.
Preferably, the receiving, from the message inlet of the current station, a message that needs to execute the uSID forwarding logic, and determining whether the current station is a station-passing station or a terminal station according to DA information carried in the message further includes:
if the matching fails, the current site has no related uSID configuration table entry, and reports the message to a processor for processing, and sends out the corresponding uSID configuration table entry.
Preferably, the first processing action is: and modifying the incoming direction message DA information received from the message inlet into the outgoing direction message DA information corresponding to the site to obtain a middle message, orienting the middle message to an internal loop back port, and setting a service processing identifier for the middle message.
Preferably, the second processing action is: and processing the intermediate message to obtain a target message, and setting an output port of the target message as the next hop of the uSID segment route.
Preferably, if the current station is a station-passing station, performing first pipeline processing on the packet according to the first matching table, and performing second pipeline processing on the packet according to the second matching table includes:
if the current station is over-station, the DA information of the message is accurately matched according to the first matching table, if the matching is successful, the incoming direction message DA information received from the message inlet is modified into the outgoing direction message DA information corresponding to the station to obtain a middle message, the middle message is oriented to an internal loop back port, a service processing identifier is set for the middle message, and the first-time pipeline processing is completed;
and acquiring the intermediate message from an internal loopback interface, accurately matching DA information of the message according to the second matching table, if the matching is successful, determining a second processing action corresponding to the intermediate message according to a service processing identifier of the intermediate message, processing the intermediate message based on the second processing action to obtain a target message, and setting an output port of the target message as a next hop of the uSID segment route.
Preferably, the service processing identifier includes a three-layer service processing identifier and a two-layer service processing identifier, and the second processing action includes three-layer routing forwarding and two-layer routing forwarding, correspondingly.
Preferably, if the current station is the terminating station, processing the packet according to the third matching table includes:
and if the current station is the terminal station, performing accurate matching on the DA information of the message according to the third matching table, and if the matching is successful, executing SRv6End action.
According to another aspect of the present invention, there is provided an SRv6uSID forwarding device, including at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor programmed to perform the methods of the present invention.
Generally, compared with the prior art, the technical scheme of the invention has the following beneficial effects: the invention provides a method and a device for forwarding SRv6uSID, wherein the method for forwarding SRv6uSID comprises the following steps: calculating the incoming direction message DA information and the outgoing direction message DA information of each site according to the uSID segment routing path, and generating a matching item based on the incoming direction message DA information and the outgoing direction message DA information of each site to establish a corresponding matching table; aiming at each station, issuing a first matching table and a second matching table for passing the station, and issuing a third matching table for the terminal station, wherein the first matching table comprises a matching item and a first processing action which are generated based on incoming direction message DA information, the second matching table comprises a matching item and a second processing action which are generated based on outgoing direction message DA information, and the third matching table comprises a matching item and an SRv6End action which are generated based on the incoming direction message DA information; receiving a message needing to execute uSID forwarding logic from a message inlet of a current site, and determining whether the current site is a passing site or a terminating site according to DA information carried in the message; if the current station is the station passing station, performing first pipeline processing on the message according to the first matching table, and performing second pipeline processing on the message according to the second matching table; and if the current station is the terminal station, processing the message according to the third matching table.
In the invention, the message DA content displacement/copy operation in the uN action is converted into the modified message DA action after accurate matching, the message actions of the uSID/SRv6 are unified, the difficulty of hardware supporting SRv6uSID standard is greatly reduced, and a feasible scheme for supporting the uSID standard is provided for the existing ASIC chip only supporting SRv6 standard. For the NP chip, hardware resources and SRv6 can be shared when implementing the uSID, while the cost of implementation is lower than that of TCAM. Based on the scheme of the invention, the productization of SRv6uSID standard can be accelerated, and the implementation cost is reduced.
Drawings
Fig. 1 is a schematic flowchart of an SRv6uSID forwarding method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a uSID extended SID format according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a uSID logic pseudo-code provided in an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating changes of a uSID path packet according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a configuration of a uSID entry according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a specific SRv6uSID forwarding method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an SRv6uSID forwarding apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example 1:
at present, the SRv6usi draft is used as a SRv 6-segment routing extension, which solves the problem of too large expenditure of SRv6 and too low bearing efficiency, but the newly defined uN action in the draft puts high requirements on the message format and the message processing action of the data forwarding plane, if the implementation is completely defined according to the draft definition, the currently solidified logic ASIC chip is difficult to support SRv6usi extension, and when the network processor chip is used to implement usi, the hardware resources and SRv6 cannot be shared, which results in too high implementation cost.
Referring to fig. 1, to solve the foregoing problem, the present embodiment provides an SRv6uSID forwarding method, including the following steps:
step 101: and calculating the incoming direction message DA information and the outgoing direction message DA information of each site according to the uSID segment routing path, and generating a matching item based on the incoming direction message DA information and the outgoing direction message DA information of each site so as to establish a corresponding matching table.
The message da (destination address) information refers to message destination address information.
As shown in fig. 2, the uSID standard is to expand the content of SRv6 SID, further divide the SID of 128 bits, the SID conforming to the uSID standard is also called uSID carrier, and the whole SID consists of three parts, i.e., uSID address block (32 bits), active uSID/next uSID/last uSID (n 16 bits), uSID carrier end flag (16 bits), where the active uSID is the first uSID immediately following uSID address block.
In this embodiment, the relevant uSID address block information is updated into the uSID address block database, where the uSID address block database is generated according to the routing protocol advertisement, and specifies which 32-bit strings are identified as uSID address blocks. The uSID address block database is used to determine whether the inbound direction SRv6 message needs to execute uSID logic.
Step 102: and aiming at each station, issuing a first matching table and a second matching table for passing the station, and issuing a third matching table for the terminal station, wherein the first matching table comprises a matching item and a first processing action which are generated based on the DA information of the incoming direction message, the second matching table comprises a matching item and a second processing action which are generated based on the DA information of the outgoing direction message, and the third matching table comprises a matching item and an SRv6End action which are generated based on the DA information of the incoming direction message.
The first matching table is an accurate matching table and can be shared with Local SID, the second matching table is an FIB table or an LPM table, and the third matching table is an accurate matching table and can be shared with Local SID.
Step 103: receiving a message needing to execute uSID forwarding logic from a message inlet of a current site, and determining whether the current site is a passing site or a terminating site according to DA information carried in the message.
If the station is passed, executing step 104; if the terminal station is the terminal station, step 105 is executed.
Step 104: and if the current station is the station passing station, performing first pipeline processing on the message according to the first matching table, and performing second pipeline processing on the message according to the second matching table.
Step 105: and if the current station is the terminal station, processing the message according to the third matching table.
In a preferred embodiment, step 103 specifically includes: receiving a message needing to execute SRv6 logic from a message inlet of a current site, analyzing a current SID pointed by the message to obtain uSID address block information, and judging whether the uSID address block information exists in the uSID address block database. If the uSID address block information exists in the uSID address block database, the message needs to execute uSID forwarding logic; and if the uSID address block information does not exist in the uSID address block database, the current SID is a common SRv6 SID, and SRv6 forwarding logic is directly executed.
In a preferred embodiment, step 103 further comprises: receiving a message needing to execute uSID forwarding logic from a message inlet of a current site, and performing 128-bit accurate matching on DA information of the message to determine whether a relevant uSID configuration table entry exists in the current site; if the matching is successful, the current site has related uSID configuration table entries, and whether all DA [48..63] of the message are 0 is judged; if the DA [48..63] of the message is all 0, the current site is the terminal site; and if the DA [48..63] of the message is not completely 0, the current site is the site passing.
If the matching fails, the current site has no related uSID configuration table entry, and reports the message to a processor for processing, and sends out the corresponding uSID configuration table entry.
In this embodiment, the first processing action is: and modifying the incoming direction message DA information received from the message inlet into the outgoing direction message DA information corresponding to the site to obtain a middle message, orienting the middle message to an internal loop back port, and setting a service processing identifier for the middle message. The second processing action is as follows: and processing the intermediate message to obtain a target message, and setting an output port of the target message as the next hop of the uSID segment route. The service processing identifier comprises a three-layer service processing identifier and a two-layer service processing identifier, and the second processing action comprises three-layer route forwarding and two-layer route forwarding corresponding to the three-layer service processing identifier and the two-layer service processing identifier.
In combination with the specific execution process of the first processing action and the second processing action, the step 104 specifically includes: if the current station is over-station, the DA information of the message is accurately matched according to the first matching table, if the matching is successful, the incoming direction message DA information received from the message inlet is modified into the outgoing direction message DA information corresponding to the station to obtain a middle message, the middle message is oriented to an internal loop back port, a service processing identifier is set for the middle message, and the first-time pipeline processing is completed; and acquiring the intermediate message from an internal loopback interface, accurately matching DA information of the message according to the second matching table, if the matching is successful, determining a second processing action corresponding to the intermediate message according to a service processing identifier of the intermediate message, processing the intermediate message based on the second processing action to obtain a target message, and setting an output port of the target message as a next hop of the uSID segment route.
In an actual application scenario, step 104 specifically includes: and if the current station is the terminal station, performing accurate matching on the DA information of the message according to the third matching table, and if the matching is successful, executing SRv6End action.
Generally, the whole scheme of this embodiment is composed of the implementation of the uSID logic pseudo code, the design and issue of the forwarding table entry, the pipeline forwarding process flow, and the like, and the following description is made based on the foregoing points.
(1) The uSID logic pseudo code realizes: as shown in fig. 3, the existing uSID standard implementation is on the left and the optimized implementation is on the right. The whole optimization is divided into two parts of uSID station passing and uSID terminating processing.
For the station-crossing, the pre-optimization logic copies the contents of bits 48 to 127 in the uSID carrier to bits 32-111 (i.e., binary left-shifted by 16 bits, note numbering from 0); the contents of bits 112 to 127 are set to "0000" (carrier end flag) in 16, and then the updated destination address (i.e. the prefix combining the uSID block and the active uSID) is looked up in FIB (Forward Information Base, abbreviated as FIB) and forwarded according to the matched entry.
The logic after optimization is divided into two stages. And stage 1, accurately matching the incoming direction message received by the service port with DA [0..31] [32..127], modifying DA information in the message if the matching is successful, redirecting the message to an internal loopback port, and setting a service processing mark. And 2, carrying out FIB (focused ion beam) lookup on the message with the service processing mark returned by the internal loop and forwarding the message according to the matched entry.
For the terminating station, the pre-optimization logic first performs SRv6End actions to determine if DA [48..63] is 0, and if 0 indicates that DA has only uSID address block + last uSID.
And the optimized logic directly issues the uSID address block + the last uSID + [0..0] as a matching item, and if the uSID address block + the last uSID + [0..0] is exactly matched, SRv6End action is executed. After optimization, the accurate matching table of the cross-station logic stage 1 is commonly used with an accurate matching table of the final logic and an SRv6 standard Local SID table; the station-crossing stage 2 logic is common with the three-layer routing HOST/FIB table, thereby realizing SRv6/SRv6uSID standard unification on hardware design.
(2) Designing and issuing a forwarding table item: as shown in fig. 4, a typical uSID segment path consists of a head station, a tail station and several intermediate station groups supporting the uSID standard. When the station (uSID1, uSID2, uSID3) supporting the uSID standard executes the station-crossing operation, the DA [48..127] of the ingress message is shifted to the left by 16 bits, the DA [112..127] is set to be 0, the DA content of the egress message is changed into DA [0..31] [48..127] [0000], and the egress message is forwarded to the uSID next hop station. When a station (uSID4) supporting the uSID standard performs station-passing operation, the message is directly performed with SRv6End action.
As shown in fig. 5, based on the above analysis, the table entry is issued according to the station-crossing and the terminal station, and 1, the station-crossing table entry is issued: 1) the matching item of the precise matching table (Local SID/first matching table) is the information of the entry message DA of each uSID passing the station, the action is that DA is replaced by the content of an exit message and a forwarding port is set as an internal loopback port; 2) and the matching item of the FIB table (second matching table) is the information of the egress message DA, and the action is to set the forwarding port as the uSID next hop egress. 2. Issuing a table entry of the terminating station: the exact match table (local SID/third match table) contains only the entry packet DA of uSID address block + last uSID + [0..0], and the action is to execute SRv6End action.
(3) And the uSID service flow processing flow comprises the following steps: and analyzing the current SID of the data message of the entrance SRv6 of the current site, and if the SID [0..31] belongs to the configured uSID address block, indicating that the message executes uSID forwarding. Otherwise normal SRv6 forwarding is performed. If the message executes uSID forwarding, it needs to further judge whether SID [48..63] is empty, if it is empty, the current station is uSID terminating station, if not, it is over station. Matching the inlet message with a first matching table and a third matching table issued by configuration, if the inlet message is hit with a certain matching item in the first matching table, firstly executing DA modification operation to obtain a middle message, designating the middle message outlet as an internal loopback port, setting a service processing mark, matching the middle message from the internal loopback port with the second matching table, processing the middle message to obtain a target message, and setting an outlet port of the target message as the next hop of the uSID section route; if it is a hit with a match in the third match table, SRv6End actions are performed directly.
In this embodiment, the message DA content displacement/copy operation in the uN action is converted into an accurately matched modified message DA action, and the message actions of the uSID/SRv6 are unified, so that the difficulty of hardware supporting the SRv6uSID standard is greatly reduced, and for the existing ASIC chip only supporting the SRv6 standard, there is a feasible scheme for supporting the uSID standard. For the NP chip, hardware resources and SRv6 can be shared when implementing the uSID, while the cost of implementation is lower than that of TCAM. Based on the scheme of the invention, the productization of SRv6uSID standard can be accelerated, and the implementation cost is reduced.
Example 2:
the following describes the implementation process of the foregoing embodiment 1 with reference to fig. 4 and 5:
firstly, a matching table is issued based on a uSID forwarding path:
firstly, updating the related uSID address block information into a uSID address block database, where the uSID address block database is used to determine whether the inbound direction SRv6 packet needs to execute uSID logic on the current SID.
Then, the ingress direction message DA information and the egress direction message DA information of each site tunnel of the uuid segment routing path are calculated, as shown in fig. 4.
In an actual application scenario, the segment routing and path information routing protocol of the SRv6/SRv6uSID standard is completely issued, so that it can know the uSID address block [0..31] which executes uSID logical forwarding, and the uSID ID of the uSID site on the relevant path, and for the incoming direction packet, the DA information is equal to uSID address block [0..31] + current site uSID [16bit ] + subsequent site uSID [16 [ + complement 0 ]. For the outgoing direction message, if the message is a non-terminal site, the 16 bits of the active uSID directly following the uSID address block [0..31] in the incoming direction DA information are removed, the subsequent address block is shifted to the left by 16 bits, the 0 is not supplemented, and the outgoing direction DA information is obtained. For the terminating site, SRv6End actions are performed directly.
Wherein the station-crossing satisfies DA [48..63 ]! 0;
entering direction message DA information: DA [0..31] (uSID address block) + DA [32..47] (current uSID station) + DA [48.. n ] (subsequent uSID) + [0000] (uSID bearer end flag, which may be null);
outgoing direction message DA information: DA [0..31] (uSID address block) + DA [48..63] (current uSID station) + DA [64.. n ] (subsequent uSID) + [0000] (uSID bearer end flag, which may be null).
Wherein the terminal station satisfies DA [48..63] ═ 0;
entering direction message DA information: DA [0..31] (uSID address block) + DA [32..47] (last uSID station) + [0000] (uSID bearer end flag);
outgoing direction message DA information: regardless, SRv6End actions are performed.
After the incoming direction message DA information and the outgoing direction message DA information corresponding to each site are obtained, matching items are generated based on the incoming direction message DA information and the outgoing direction message DA information so as to establish a first matching table, a second matching table and a third matching table. And issuing the first matching table and the second matching table to the corresponding terminal stations, and issuing the third matching table to the corresponding terminal stations.
Wherein, in the first matching table (Local SID), the matching item is the content DA [0..31] (uSID address block) + DA [32..47] (current uSID station) + DA [48.. n ] (subsequent uSID) + [0000] of the incoming direction message DA; the first processing action is to modify the message DA into DANew, DA [0..31] (uSID address block) + DA [48..63] (current uSID station) + DA [64.. n ] (subsequent uSID) + [0000], direct the message output to an internal loop, set a service processing mark and a pipeline number +1, wherein the pipeline number is used for indicating that the message is subjected to first pipeline processing, and distinguish the message subjected to single pipeline processing from the message subjected to multiple pipeline processing
In the second matching table (FIB/LPM), the matching item is the content of an outgoing direction message DA, DA [0..31] (uSID address block) + DA [48..63] (current uSID station) + DA [64.. n ] (subsequent uSID) + [0000], the second processing action is to process the intermediate message to obtain a target message, and an egress port of the target message is set to be the next hop of the uSID segment route, for example, the service processing identifier is an L3 processing identifier, the second processing action is to perform normal three-layer route forwarding, and the egress port is the next hop of the uSID segment route; the service processing identifier is an L2 processing identifier, the second processing action is to execute ordinary two-layer route forwarding, and the exit port is the uSID segment route next hop.
In the third matching table (Local SID), the matching entry is DA [0..31] (uSID address block) + DA [32..47] (last uSID station) + [0000] (uSID carrier End flag), and the processing action is to execute SRv6End action.
As shown in fig. 4 and 5, the whole segment routing path is composed of a head site, a uSID1 site, a uSID2 site, a uSID3 site, a uSID4 site, and a tail site. The contents of an incoming direction message IPv6 DA and an outgoing direction message IPv6 DA passing through each site are shown in fig. 3. For site uSID1, where site uSID1 is over-station, the matching entry of the first matching table (Local SID) is uSID blk + uSID1+ uSID2+ uSID3+ uSID4+0000+0000[0..127], the first processing action is to modify IPv6 DA to uSID blk + uSID2+ uSID3+ uSID4+0000+0000+0000[0..127], and the packet is redirected to the inner loopback port. The matching item of the second matching table (FIB) is uSID blk + uSID2+ uSID3+ uSID4+0000+0000+0000, and the second processing action is used for redirecting the message to the uSID segment route next hop. Similar processing is done for site uSID2/uSID 3. uSID4 is the terminating station, and the third matching table (Local SID) configures the table entry as matching entry uSID + uSID4+0000+0000+0000[0..127], and acts to execute SRv6End action.
With reference to fig. 6, the SRv6uSID packet pipeline forwarding process is as follows:
step 2.1: an ethernet message to execute SRv6 logic is received from a traffic port. The current SID pointed to by the SL in the SRH header is parsed. And searching in the uSID address block database by using SID [0..31] as a key word, and if the search is successful, indicating that the message needs to execute uSID forwarding logic. Step 2.2 is performed. If the lookup fails, the current SID is a normal SRv6 SID, the forwarding logic SRv6 is executed to execute step 2.4.
Step 2.2: and (3) carrying out 128-bit accurate matching on the message IPv6 DA in the step 2.1, if the matching is successful, indicating that a related uSID configuration table item exists, and executing the step 2.3. If the matching fails, it indicates that the relevant uSID configuration table entry has not been issued yet, and the message needs to be sent to the CPU for processing.
Step 2.3: and (3) judging whether the message IPv6 DA [48..63] in the step 2.2 is a uSID bearer termination mark (all 0) or not, if so, indicating that the station only has the last uSID, and executing the action of the uSID termination station to execute the step 2.3.1. If not, it indicates that the station still has at least one next-hop uSID, and the uSID needs to perform station-passing action, and step 2.3.2 is performed.
Step 2.3.1: and (3) carrying out 128-bit accurate matching on the message in the step 2.2, wherein the action is SRv6 End. Execution continues SRv6 with forwarding logic.
Step 2.3.2: the message of step 2.2 is first subjected to 128-bit exact matching, with the action of modifying the ingress message DA to DA [0..31] (uSID address block) + DA [48..63] (current uSID station) + DA [64.. n ] (subsequent uSID) + [ 0000), and redirecting the message to the inner loopback. The pipeline number is incremented by 1, the L3 process flag is set, and step 2.3.2.1 is performed.
Step 2.3.2.1: and performing ordinary L3 route search on the message entering from the loopback interface in the step 2.3.2 according to the contents of DA [0..31] (uSID address block) + DA [48..63] (current uSID station) + DA [64.. n ] (subsequent uSID) + [0000], and performing corresponding forwarding on the message according to a matching result if the matching is successful. If the matching fails, the message needs to be sent to the CPU for processing, and step 2.5 is executed.
Step 2.4: standard SRv6 processing logic is performed on the received message.
Step 2.5: and checking whether the uSID configuration table entry of the station is issued or not according to the uSID message content of the CPU, and if not, retransmitting the uSID configuration table entry of the station and discarding the message.
Example 3:
referring to fig. 7, fig. 7 is a schematic structural diagram of an SRv6uSID forwarding device according to an embodiment of the present invention. The SRv6uSID forwarding device of the present embodiment includes one or more processors 41 and a memory 42. Fig. 7 illustrates an example of one processor 41.
The processor 41 and the memory 42 may be connected by a bus or other means, and fig. 7 illustrates the connection by a bus as an example.
Memory 42, which is a non-volatile computer-readable storage medium based on methods, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, the methods of the above-described embodiments, and corresponding program instructions. The processor 41 implements the methods of the foregoing embodiments by executing non-volatile software programs, instructions, and modules stored in the memory 42 to thereby execute various functional applications and data processing.
The memory 42 may include, among other things, high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 42 may optionally include memory located remotely from processor 41, which may be connected to processor 41 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
It should be noted that, for the information interaction, execution process and other contents between the modules and units in the apparatus and system, the specific contents may refer to the description in the embodiment of the method of the present invention because the same concept is used as the embodiment of the processing method of the present invention, and are not described herein again.
Those of ordinary skill in the art will appreciate that all or part of the steps of the various methods of the embodiments may be implemented by associated hardware as instructed by a program, which may be stored on a computer-readable storage medium, which may include: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1. An SRv6uSID forwarding method, comprising:
calculating the incoming direction message DA information and the outgoing direction message DA information of each site according to the uSID segment routing path, and generating a matching item based on the incoming direction message DA information and the outgoing direction message DA information of each site to establish a corresponding matching table;
aiming at each station, issuing a first matching table and a second matching table for passing the station, and issuing a third matching table for the terminal station, wherein the first matching table comprises a matching item and a first processing action which are generated based on incoming direction message DA information, the second matching table comprises a matching item and a second processing action which are generated based on outgoing direction message DA information, and the third matching table comprises a matching item and an SRv6End action which are generated based on the incoming direction message DA information; wherein the first processing action is: modifying incoming direction message DA information received from a message inlet into outgoing direction message DA information corresponding to the site to obtain a middle message, orienting the middle message to an internal loop back port, and setting a service processing identifier for the middle message; the second processing action is as follows: processing the intermediate message to obtain a target message, and setting an output port of the target message as the next hop of the uSID segment route;
receiving a message needing to execute uSID forwarding logic from a message inlet of a current site, and determining whether the current site is a passing site or a terminating site according to DA information carried in the message;
if the current station is the station passing station, performing first pipeline processing on the message according to the first matching table, and performing second pipeline processing on the message according to the second matching table;
and if the current station is the terminal station, processing the message according to the third matching table.
2. The method according to claim 1, wherein the receiving a message requiring implementation of the uSID forwarding logic from the message inlet of the current station, and determining whether the current station is a passing station or an end station according to DA information carried in the message comprises:
receiving a message needing to execute SRv6 logic from a message inlet of a current site, analyzing a current SID pointed by the message to obtain uSID address block information, and judging whether the uSID address block information exists in the uSID address block database;
if the uSID address block information exists in the uSID address block database, the message needs to execute uSID forwarding logic;
and if the uSID address block information does not exist in the uSID address block database, the current SID is a common SRv6 SID, and SRv6 forwarding logic is directly executed.
3. The method according to claim 1, wherein the receiving a message requiring implementation of the uSID forwarding logic from the message inlet of the current station, and determining whether the current station is a passing station or an end station according to DA information carried in the message comprises:
receiving a message needing to execute uSID forwarding logic from a message inlet of a current site, and performing 128-bit accurate matching on DA information of the message to determine whether a relevant uSID configuration table entry exists in the current site;
if the matching is successful, the current site has related uSID configuration table entries, and whether all DA [48..63] of the message are 0 is judged;
if the DA [48..63] of the message is all 0, the current site is the terminal site;
and if the DA [48..63] of the message is not completely 0, the current site is the site passing.
4. The method according to claim 3, wherein the receiving a message requiring implementation of the uSID forwarding logic from the message entry of the current station, and determining whether the current station is a passing station or an end station according to DA information carried in the message further comprises:
if the matching fails, the current site has no related uSID configuration table entry, and reports the message to a processor for processing, and sends out the corresponding uSID configuration table entry.
5. The method of claim 1, wherein if the current station is a station-passing station, performing first pipeline processing on the packet according to the first matching table, and performing second pipeline processing on the packet according to the second matching table comprises:
if the current station is over-station, the DA information of the message is accurately matched according to the first matching table, if the matching is successful, the incoming direction message DA information received from the message inlet is modified into the outgoing direction message DA information corresponding to the station to obtain a middle message, the middle message is oriented to an internal loop back port, a service processing identifier is set for the middle message, and the first-time pipeline processing is completed;
and acquiring the intermediate message from an internal loopback port, performing accurate matching on DA information of the message according to the second matching table, if the matching is successful, determining a second processing action corresponding to the intermediate message according to a service processing identifier of the intermediate message, processing the intermediate message based on the second processing action to obtain a target message, and setting an output port of the target message as a next hop of the uSID segment route.
6. The method of claim 5, wherein the service handling identifier comprises a layer three service handling identifier and a layer two service handling identifier, and wherein the second processing action comprises layer three route forwarding and layer two route forwarding.
7. The method according to claim 1, wherein if the current station is an end station, processing the packet according to the third matching table comprises:
and if the current station is the terminal station, performing accurate matching on the DA information of the message according to the third matching table, and if the matching is successful, executing SRv6End action.
8. An SRv6uSID forwarding device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor and programmed to perform the method of any of claims 1-7.
CN202011466756.7A 2020-12-14 2020-12-14 SRv6uSID forwarding method and device Active CN112653622B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011466756.7A CN112653622B (en) 2020-12-14 2020-12-14 SRv6uSID forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011466756.7A CN112653622B (en) 2020-12-14 2020-12-14 SRv6uSID forwarding method and device

Publications (2)

Publication Number Publication Date
CN112653622A CN112653622A (en) 2021-04-13
CN112653622B true CN112653622B (en) 2022-04-19

Family

ID=75353971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011466756.7A Active CN112653622B (en) 2020-12-14 2020-12-14 SRv6uSID forwarding method and device

Country Status (1)

Country Link
CN (1) CN112653622B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443651B (en) * 2021-12-31 2023-05-05 北京发现角科技有限公司 Method and device for processing buried point data to ODS layer
CN115022415B (en) * 2022-05-23 2023-08-25 烽火通信科技股份有限公司 Multi-layer SID message termination method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111628995A (en) * 2020-05-26 2020-09-04 新华三信息安全技术有限公司 SID compression method, SID compression device, SID compression equipment and storage medium based on SRv6

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10841220B1 (en) * 2019-05-03 2020-11-17 Cisco Technology, Inc. SRv6 with micro segment identifiers
CN111064664B (en) * 2020-01-03 2022-04-22 苏州盛科通信股份有限公司 IPV6 segmented routing coding method
CN111935014B (en) * 2020-10-19 2020-12-29 网络通信与安全紫金山实验室 Message forwarding method and device based on SRv6 network, storage medium and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111628995A (en) * 2020-05-26 2020-09-04 新华三信息安全技术有限公司 SID compression method, SID compression device, SID compression equipment and storage medium based on SRv6

Also Published As

Publication number Publication date
CN112653622A (en) 2021-04-13

Similar Documents

Publication Publication Date Title
US10749794B2 (en) Enhanced error signaling and error handling in a network environment with segment routing
WO2022121349A1 (en) Computing power application traffic forwarding method and apparatus
US10652144B2 (en) Segment routing network processing of packets including packets having a segment identifier structure providing processing and/or memory efficiencies
CN109379359B (en) SRv6 data packet processing method and device
US11979322B2 (en) Method and apparatus for providing service for traffic flow
US7280752B2 (en) Network address routing using multiple routing identifiers
CN112953831A (en) Message forwarding method and device
US11652735B2 (en) Multicast data packet processing method, and apparatus
WO2020156166A1 (en) Packet processing method and device
CN112468397B (en) IPv6 message processing method and device
CN112653622B (en) SRv6uSID forwarding method and device
WO2022007503A1 (en) Service traffic processing method and apparatus
CN112202670B (en) SRv 6-segment route forwarding method and device
CN107580079A (en) A kind of message transmitting method and device
US20240106751A1 (en) Method and apparatus for processing detnet data packet
CN112929281A (en) Message processing method, device and equipment of network equipment based on FPGA
CN113194033B (en) Message forwarding method and device based on SDN (software defined network) segment routing networking and storage medium
CN113726667A (en) Reverse Path Forwarding (RPF) checking method and device
US20230081052A1 (en) Method and apparatus for sending multicast packet
WO2023274083A1 (en) Route publishing method and apparatus, packet forwarding method and apparatus, device, and storage medium
CN113992564B (en) Message processing method and device
CN113542126B (en) Generalized SRv6 full-path compression method and device
CN113055268A (en) Method, device, equipment and medium for tunnel traffic load balancing
US10924395B2 (en) Seamless multipoint label distribution protocol (mLDP) transport over a bit index explicit replication (BIER) core
US20230135615A1 (en) Mac-based routing

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