CN115396354B - SRv6 message SID segmentation query method and application - Google Patents

SRv6 message SID segmentation query method and application Download PDF

Info

Publication number
CN115396354B
CN115396354B CN202211021389.9A CN202211021389A CN115396354B CN 115396354 B CN115396354 B CN 115396354B CN 202211021389 A CN202211021389 A CN 202211021389A CN 115396354 B CN115396354 B CN 115396354B
Authority
CN
China
Prior art keywords
message
srv
sid
segment
key
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
CN202211021389.9A
Other languages
Chinese (zh)
Other versions
CN115396354A (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.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications 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 Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202211021389.9A priority Critical patent/CN115396354B/en
Publication of CN115396354A publication Critical patent/CN115396354A/en
Application granted granted Critical
Publication of CN115396354B publication Critical patent/CN115396354B/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/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
    • H04L45/745Address table lookup; Address filtering
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a SRv message SID segment query method and application, the method comprises the following steps: acquiring the segment lengths of the Block, the Node and the function+area of the SRv message from a source port for receiving the SRv message; inquiring whether a Key table corresponding to the SRv message exists in a Block table entry according to the Block segment length of the SRv6 message; if yes, indexing a Node table item according to a Key table corresponding to the SRv message in the Block table item, and inquiring whether a Key table corresponding to the SRv message exists in the indexed Node table item; if yes, searching whether a Key table corresponding to the SRv6 message exists in the indexed function+area table item according to the Key table index function+area table item corresponding to the SRv message in the Node table item; if yes, indexing the AD table in the function+area table item according to the AD Index in the Key table corresponding to the SRv message in the function+area table item, so as to obtain the editing and forwarding behaviors of the SRv message. The method can realize the segmented query of the SRv message SID, improve the query flexibility of the SID and reduce the consumption of chip resources.

Description

SRv6 message SID segmentation query method and application
Technical Field
The invention relates to the field of communication, in particular to a SRv message SID segmentation query method and application.
Background
SRv6 is a new generation IP bearer protocol based on IPv6 and Source Routing (Source Routing), can unify traditional complex network protocols, realizes network protocol simplification and application level SLA guarantee, and is the basis for constructing intelligent IP networks in 5G and cloud era. SRv6 can unify IP forwarding and tunnel forwarding, has the flexibility and strong programmable capability of IPv6, and provides strong support for future intelligent IP network slicing, deterministic network, service chain and other applications. SRv6 is therefore currently a hotspot for research in the field of network technology.
Internet protocol version 6-segment routing (SRv) refers to forwarding traffic messages in an IPv6 network through SRv tunnels using the SR technique with the IPv6 address as the SID. In SRv, the SID is an identification that defines a certain network function, representing a network instruction. This SID, called SRv SID, takes the form of an IPv6 address, but does not correspond to the IPv6 address of the interface that any SR node includes.
The information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person of ordinary skill in the art.
Disclosure of Invention
The invention aims to provide a SRv6 message SID segmentation query method and application, and solves the problems that in the prior art, only one SID table is used as a Key table for SID query, chip resource is wasted and flexibility is not enough.
To achieve the above objective, an embodiment of the present invention provides a method for segment query of SRv6 message SID.
In one or more embodiments of the invention, the method comprises: acquiring the segment lengths of Block, node and function+area of SID in the SRv message from a source port for receiving SRv message; inquiring whether a Key table corresponding to a Block segment of the SID in the SRv message exists in a Block table entry according to the Block segment length of the SID in the SRv message; if yes, indexing a Node table item according to a Key table corresponding to the Block segment of the SID in the SRv message in the Block table item, and inquiring whether a Key table corresponding to the Node segment of the SID in the SRv message exists in the indexed Node table item; if yes, indexing a function+area table item according to a Key table corresponding to the Node segment of the SID in the SRv message in the Node table item, and inquiring whether a Key table corresponding to the function+area segment of the SID in the SRv message exists in the indexed function+area table item; if yes, indexing an AD Index in an Action table of the function+area segment according to a Key table corresponding to the function+area segment of the SID in the SRv6 message, and indexing the AD Index to editing and forwarding behaviors of the SRv message according to the AD Index.
In one or more embodiments of the present invention, according to the Block segment length of the SID in the SRv message, inquiring whether a Key table corresponding to the Block segment of the SID in the SRv message exists in the Block table entry includes: acquiring information corresponding to the Block segment length from the SRv6 message; searching a Key table with the length of the Block segment length in the Block table item; and judging whether the information corresponding to the Block segment length in the SRv message SID table is consistent with the information in the Key table searched in the Block table entry.
In one or more embodiments of the present invention, indexing a Node table entry according to a Key table corresponding to a Block segment of a SID in the SRv message in the Block table entry, and querying whether a Key table corresponding to a Node segment of the SID in the SRv message exists in the indexed Node table entry, including: indexing an AD table in the Block table according to the AD Index in the Key table searched in the Block table, and indexing a Node table according to the Pointer and Step in the AD table; when the Node table item indexes a corresponding Key table, acquiring information corresponding to the Node segment length in the SRv message SID table; searching a Key table which is indexed in the Node table item and has the length of the Node segmentation length; and judging whether the information corresponding to the Node segment length in the SRv message SID table is consistent with the information in the Key table of the Node segment length.
In one or more embodiments of the present invention, according to a Key table index function+area table entry corresponding to a Node segment of a SID in the SRv message in the Node table entry, and whether a Key table corresponding to a function+area segment of the SID in the SRv message exists or not is queried in the indexed function+area table entry, including: indexing an AD table in the Node table according to the AD Index in the Key table searched in the Node table, and indexing a function+area table according to the Pointer and Step in the AD table; when the corresponding Key table is indexed in the function+area table item, acquiring information corresponding to the function+area segment length in the SRv message SID table; searching a Key table which is indexed in the function+area table item and has the length of the function+area segment length; and judging whether the information corresponding to the function+area segment length in the SRv6 message SID table is consistent with the information in the Key table of the function+area segment length.
In one or more embodiments of the invention, the method further comprises: when the lengths of the Key tables in the table entries of the present stage are smaller than the segment lengths of the present stage in the SID table of the SRv message, the Key tables of the adjacent table entries of the present stage are combined, so that the combined Key table length is equal to the segment length of the present stage in the SID table of the SRv message; and indexing the AD table in the current level table according to the index information in the Key table of the first table in the adjacent current level table, and acquiring the information of the index lower level table from the AD table in the current level table.
In one or more embodiments of the present invention, indexing a lower-level entry according to index information in a Key table of a first entry in the neighboring present-level entries includes: and indexing a Key table in a lower-level table item according to a pointer+ (length/c Step), wherein the Pointer is the first address of the Key table in the lower-level table item, the length is the segmentation length of the lower level in the SRv message SID table, c is the length of the Key table in the lower-level table item, and Step is the number of the Key tables of the corresponding lower-level table item of the present-level table item.
In one or more embodiments of the invention, the method further comprises: discarding the SRv message when the Key table corresponding to the SRv message does not exist in the Block table entry; discarding the SRv message when the Key table corresponding to the SRv message does not exist in the Node table entry; and discarding the SRv message when the Key table corresponding to the SRv message does not exist in the function+area table entry.
In another aspect of the present invention, an apparatus for segment query of SRv message SID is provided, which includes an acquisition module, a query module, and a behavior module.
An obtaining module, configured to obtain, from a source port that receives the SRv message, a Block, a Node, and a function+area segment length of the SID in the SRv message.
The query module is used for querying whether a Key table corresponding to the Block segment of the SID in the SRv message exists in the Block table item according to the Block segment length of the SID in the SRv message; if yes, indexing a Node table item according to a Key table corresponding to the Block segment of the SID in the SRv message in the Block table item, and inquiring whether a Key table corresponding to the Node segment of the SID in the SRv message exists in the indexed Node table item; if yes, index function+area table item according to Key table corresponding to Node segment of SID in SRv message in Node table item, and query whether there is Key table corresponding to function+area segment of SID in SRv message in indexed function+area table item.
And the behavior module is used for indexing the AD Index in the Action table of the function+area section according to the Key table corresponding to the function+area section of the SID in the SRv6 message, and indexing the AD Index to the editing and forwarding behavior of the SRv6 message according to the AD Index.
In one or more embodiments of the present invention, the query module is further configured to: acquiring information corresponding to the Block segment length from the SRv6 message; searching a Key table with the length of the Block segment length in the Block table item; and judging whether the information corresponding to the Block segment length in the SRv message SID table is consistent with the information in the Key table searched in the Block table entry.
In one or more embodiments of the present invention, the query module is further configured to: indexing an AD table in the Block table according to the AD Index in the Key table searched in the Block table, and indexing a Node table according to the Pointer and Step in the AD table; when the Node table item indexes a corresponding Key table, acquiring information corresponding to the Node segment length in the SRv message SID table; searching a Key table which is indexed in the Node table item and has the length of the Node segmentation length; and judging whether the information corresponding to the Node segment length in the SRv message SID table is consistent with the information in the Key table of the Node segment length.
In one or more embodiments of the present invention, the query module is further configured to: indexing an AD table in the Node table according to the AD Index in the Key table searched in the Node table, and indexing a function+area table according to the Pointer and Step in the AD table; when the corresponding Key table is indexed in the function+area table item, acquiring information corresponding to the function+area segment length in the SRv message SID table; searching a Key table which is indexed in the function+area table item and has the length of the function+area segment length; and judging whether the information corresponding to the function+area segment length in the SRv6 message SID table is consistent with the information in the Key table of the function+area segment length.
In one or more embodiments of the present invention, the query module is further configured to: when the lengths of the Key tables in the table entries of the present stage are smaller than the segment lengths of the present stage in the SID table of the SRv message, the Key tables of the adjacent table entries of the present stage are combined, so that the combined Key table length is equal to the segment length of the present stage in the SID table of the SRv message; and indexing the AD table in the current level table according to the index information in the Key table of the first table in the adjacent current level table, and acquiring the information of the index lower level table from the AD table in the current level table.
In one or more embodiments of the present invention, the query module is further configured to: and indexing a Key table in a lower-level table item according to a pointer+ (length/c Step), wherein the Pointer is the first address of the Key table in the lower-level table item, the length is the segmentation length of the lower level in the SRv message SID table, c is the length of the Key table in the lower-level table item, and Step is the number of the Key tables of the corresponding lower-level table item of the present-level table item.
In one or more embodiments of the invention, the behavior module is further to: discarding the SRv message when the Key table corresponding to the SRv message does not exist in the Block table entry; discarding the SRv message when the Key table corresponding to the SRv message does not exist in the Node table entry; and discarding the SRv message when the Key table corresponding to the SRv message does not exist in the function+area table entry.
In another aspect of the present invention, there is provided an electronic device including: at least one processor; and a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of SRv message SID segment query as described above.
In another aspect of the invention, a computer readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the method of segment querying of SRv message SID as described.
Compared with the prior art, the method and the application for the segment query of the SRv message SID can realize the segment query of the SRv message SID by segmenting the SID table and configuring the same Key table in each segment and flexible combination of each segment, thereby improving the flexibility of the SID query and reducing the consumption of chip resources.
Drawings
FIG. 1 is a flow chart of a method of SRv message SID segmentation query in accordance with an embodiment of the present invention;
FIG. 2 is a SRv message encapsulation format diagram of a method for SRv message SID segmentation query in accordance with an embodiment of the present invention;
FIG. 3 is a SRv message format diagram of a method for SRv message SID segmentation query in accordance with an embodiment of the present invention;
FIG. 4 is a segment length source diagram of a method for segment querying of a SRv message SID in accordance with an embodiment of the present invention;
FIG. 5 is a diagram of the Key table structure of a method for segment query of a SRv message SID in accordance with an embodiment of the present invention;
FIG. 6 is a schematic diagram of a table entry concatenation relationship of a method for segment query of SRv message SIDs according to an embodiment of the present invention;
FIG. 7 is a block diagram of an apparatus for segment query of a SRv message SID in accordance with an embodiment of the present invention;
fig. 8 is a hardware configuration diagram of a computing device for SRv message SID segment query according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the invention is, therefore, to be taken in conjunction with the accompanying drawings, and it is to be understood that the scope of the invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the term "comprise" or variations thereof such as "comprises" or "comprising", etc. will be understood to include the stated element or component without excluding other elements or components.
The following describes in detail the technical solutions provided by the embodiments of the present invention with reference to the accompanying drawings.
Example 1
As shown in fig. 1 to 6, a method for segment query of SRv message SID in an embodiment of the present invention is described, which includes the following steps.
In step S101, the segment lengths of Block, node, and function+area of the SID in the SRv packet are obtained from the source port receiving the SRv packet.
SRv6 message encapsulation format as shown in fig. 2, the SRH and SID List are encapsulated after IPv6 Header. The SRH contains a total of 7 fields of Next Header, header Ext Length, routing Type, segment Left, last Entry, flags, and Tag. SRv6 each Segment is identified by SID (Segment ID), and the SID is a special IPv6 address, with both the routing capability of the normal IPv6 address and the unique behavior of SRv 6.
Each SRv node maintains a SID table (actually part of the routing table) consisting of a number of 128bit SIDs, as shown in fig. 3, SRv SIDs are typically composed of three parts, locator, function and optional figure, respectively. Wherein, the Locator is divided into two parts of Block and Node. The Locator identifies SRv nodes, each Node has at least one globally unique Locator value, as a shared prefix of the local SID, other nodes access the local SID through the Locator route, wherein Block identifies a common prefix of SRv domains, and Node identifies a Node in a SRv domain. The Function identifies different behaviors within the SRv node, such as END, END. X, etc., a few of which also require the delivery of an figure parameter. The image identifies parameters to which the instruction corresponds when executed, which may include flows, services, or any other relevant information.
As shown in fig. 4, different SRv domains are distinguished by the source port, so that the lengths of different SID segments can be obtained from the source port receiving SRv messages. Specifically, the Block length, the Node length and the function+area length are added to be less than or equal to 128.
In step S102, whether a Key table corresponding to a Block segment of the SID in the SRv6 packet exists in the Block table entry is queried according to the Block segment length of the SID in the SRv packet.
Shown in fig. 5 is the contents of the SRv SID Key table in the chip. SID SUB as Key, pointer, step, AD Index as Action. Wherein, the next level Key table is indexed using Pointer+step, and the AD table is indexed using AD Index.
The series relationship of the three-level Key table in the chip is shown in FIG. 6. Including Block tables, node tables, and function+area tables. The contents of the entries in the three tables are the same, so that the three tables can share the same chip memory, and the size of each table item is flexibly distributed according to different use scenes, thereby achieving the purpose of saving chip resources.
Specifically, acquiring information corresponding to the Block segment length in a SRv message SID table; searching a Key table with the length of the Block segment in the Block table item; and judging whether the information corresponding to the Block segment length in the SRv message SID table is consistent with the information in the Key table searched in the Block table entry. If the information corresponding to the Block segment length in the SRv message SID table is consistent with the information in the Key table found in the Block table entry, the next level Key table, namely the Key table in the Node table entry, is indexed through the pointer+step in the Key table of the present level, otherwise, the SRv message is discarded.
In addition, when the lengths of the Key tables in the table entries of the present level (i.e. the Block table entries) are smaller than the segment lengths of the present level in the SRv message SID table, the Key tables of the adjacent table entries of the present level are combined, so that the combined Key table length is equal to the segment lengths of the present level in the SRv message SID table; and indexing the lower-level table item according to the index information in the Key table of the first table item in the adjacent present-level table items.
For example, the length of the Key in each entry in the Key table is 8bits, in other words, the granularity of the Key table is 8bits. The keys of adjacent entries may be combined as needed to form a longer Key (16/24/…/120/128) while using the Action of the first of the adjacent entries as the Action of the entire Key table. In this case, the number of adjacent entries is required to be Length/8, and Length is the Length of the SID segment corresponding to the Key table of this stage. Therefore, the purpose of flexibly inquiring the segment information with different lengths can be realized.
The three-level Key table can also realize the relation of N to N among table items. That is, the previous stage table entry may index a plurality of next stage table entries, and the next stage table entry may also be indexed by a plurality of previous stage table entries. The relation of N to N among the table items is realized through a pointer+ (Length/c) Step, wherein the Pointer is the head address of a Key table in a lower table item (namely Node table item), the Length is the segment Length of the lower stage in a SRv message SID table, c is the Length of the Key table in the lower table item, and Step is the number of the Key tables of the corresponding lower table items of the present table item.
In step S103, the Node table entry is indexed according to the Key table corresponding to the Block segment of the SID in the SRv message in the Block table entry, and whether the Key table corresponding to the Node segment of the SID in the SRv message exists is queried in the indexed Node table entry.
Indexing an AD table in the Block table according to the AD Index in the Key table searched in the Block table, and indexing a Node table according to the Pointer and Step in the AD table; when the Node table item indexes the corresponding Key table, acquiring the information corresponding to the Node segment length in the SRv message SID table; searching Key table with length being Node segment length and indexed in Node table item; and judging whether the information corresponding to the Node segment length in the SRv message SID table is consistent with the information in the Key table of the Node segment length. If the information corresponding to the Node segment length in the SRv message SID table is consistent with the information in the Key table found in the Node table entry, the next level Key table, namely the Key table in the function+area table entry, is indexed by the pointer+step in the Key table of the present level, otherwise, the SRv message is discarded.
In step S104, according to the Key table index function+area table entry corresponding to the Node segment of the SID in the SRv message in the Node table entry, whether the Key table corresponding to the function+area segment of the SID in the SRv message exists is queried in the indexed function+area table entry.
Indexing an AD table in the Node table according to the AD Index in the found Key table in the Node table, and indexing a function+area table according to the Pointer and Step in the AD table; when the corresponding Key table is indexed in the function+area table item, acquiring information corresponding to the function+area segment length in the SRv message SID table; searching a Key table which is indexed in the function+area table item and has the length of the function+area segment length; judging whether the information corresponding to the function+area segment length in the SRv message SID table is consistent with the information in the Key table of the function+area segment length. If the information corresponding to the function+area segment length in the SRv message SID table is consistent with the information in the Key table found in the function+area table item, the editing and forwarding actions of the SRv message are obtained through the AD table corresponding to the AD Index in the Key table of the present stage, otherwise, the SRv message is discarded.
In step S105, the Key table corresponding to the function+area segment of the SID in the SRv message is indexed to the AD Index in the Action table of the function+area segment, and the editing and forwarding actions of the SRv message are indexed according to the AD Index.
According to the SRv message SID segmentation query method and application of the embodiment of the invention, the segmentation query of SRv message SID can be realized by segmenting the SID table and configuring the same Key table in each segment, so that the flexibility of SID query is improved, and the consumption of chip resources is reduced.
As shown in fig. 7, an apparatus for SRv message SID segment query according to an embodiment of the present invention is described.
In the embodiment of the invention, the SRv message SID segmented query device comprises an acquisition module 701, a query module 702 and a behavior module 703.
An obtaining module 701, configured to obtain, from a source port that receives the SRv message, a Block, a Node, and a segment length of function+segment of the SID in the SRv message.
The query module 702 is configured to query whether a Key table corresponding to a Block segment of the SID in the SRv6 packet exists in a Block table entry according to a Block segment length of the SID in the SRv packet; if yes, indexing a Node table item according to a Key table corresponding to the Block segment of the SID in the SRv message in the Block table item, and inquiring whether a Key table corresponding to the Node segment of the SID in the SRv message exists in the indexed Node table item; if yes, according to the Key table index function+area table item corresponding to the Node segment of the SID in the SRv message in the Node table item, and inquiring whether the Key table corresponding to the function+area segment of the SID in the SRv message exists in the indexed function+area table item.
The behavior module 703 is configured to Index an AD Index in an Action table of the function+area segment according to a Key table corresponding to the function+area segment of the SID in the SRv message, and Index an editing and forwarding behavior of the SRv message according to the AD Index. The query module 702 is further configured to: acquiring information corresponding to the Block segment length in a SRv message SID table; searching a Key table with the length of the Block segment in the Block table item; and judging whether the information corresponding to the Block segment length in the SRv message SID table is consistent with the information in the Key table searched in the Block table entry.
The query module 702 is further configured to: indexing an AD table in the Block table according to the AD Index in the Key table searched in the Block table, and indexing a Node table according to the Pointer and Step in the AD table; when the Node table item indexes the corresponding Key table, acquiring the information corresponding to the Node segment length in the SRv message SID table; searching Key table with length being Node segment length and indexed in Node table item; and judging whether the information corresponding to the Node segment length in the SRv message SID table is consistent with the information in the Key table of the Node segment length.
The query module 702 is further configured to: indexing an AD table in the Node table according to the AD Index in the found Key table in the Node table, and indexing a function+area table according to the Pointer and Step in the AD table; when the corresponding Key table is indexed in the function+area table item, acquiring information corresponding to the function+area segment length in the SRv message SID table; searching a Key table which is indexed in the function+area table item and has the length of the function+area segment length; judging whether the information corresponding to the function+area segment length in the SRv message SID table is consistent with the information in the Key table of the function+area segment length.
The query module 702 is further configured to: when the lengths of the Key tables in the table items of the present stage are smaller than the segment lengths of the present stage in the SRv message SID table, the Key tables of the adjacent table items of the present stage are combined, so that the combined Key table length is equal to the segment length of the present stage in the SRv message SID table; and indexing the AD table in the current level table according to the index information in the Key table of the first table in the adjacent current level table, and acquiring the information of the index lower level table from the AD table in the current level table.
The query module 702 is further configured to: and indexing a Key table in a lower-level table item according to a pointer+ (length/c Step), wherein the Pointer is the first address of the Key table in the lower-level table item, the length is the segment length of the lower level in the SRv message SID table, c is the length of the Key table in the lower-level table item, and Step is the number of the Key tables of the corresponding lower-level table item of the present-level table item.
The behavior module 703 is also configured to: discarding SRv message when the Key table corresponding to SRv message does not exist in the Block table entry; discarding SRv message when there is no Key table corresponding to SRv message in Node table item; and discarding SRv message when the Key table corresponding to SRv6 message does not exist in the function+area table entry.
Fig. 8 shows a hardware block diagram of a computing device 80 for SRv6 message SID segment query, according to an embodiment of the present description. As shown in fig. 8, computing device 80 may include at least one processor 801, memory 802 (e.g., non-volatile memory), memory 803, and communication interface 804, and at least one processor 801, memory 802, memory 803, and communication interface 804 are connected together via bus 805. The at least one processor 801 executes at least one computer readable instruction stored or encoded in memory 802.
It should be appreciated that the computer-executable instructions stored in the memory 802, when executed, cause the at least one processor 801 to perform the various operations and functions described above in connection with fig. 1-8 in various embodiments of the present specification.
In embodiments of the present description, computing device 80 may include, but is not limited to: personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile computing devices, smart phones, tablet computers, cellular phones, personal Digital Assistants (PDAs), handsets, messaging devices, wearable computing devices, consumer electronic devices, and the like.
According to one embodiment, a program product, such as a machine-readable medium, is provided. The machine-readable medium may have instructions (i.e., elements described above implemented in software) that, when executed by a machine, cause the machine to perform the various operations and functions described above in connection with fig. 1-8 in various embodiments of the specification. In particular, a system or apparatus provided with a readable storage medium having stored thereon software program code implementing the functions of any of the above embodiments may be provided, and a computer or processor of the system or apparatus may be caused to read out and execute instructions stored in the readable storage medium.
According to the SRv message SID segmentation query method and application of the embodiment of the invention, the segmentation query of SRv message SID can be realized by segmenting the SID table and configuring the same Key table in each segment, so that the flexibility of SID query is improved, and the consumption of chip resources is reduced.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing descriptions of specific exemplary embodiments of the present invention are presented for purposes of illustration and description. It is not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application to thereby enable one skilled in the art to make and utilize the invention in various exemplary embodiments and with various modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalents.

Claims (10)

1. A method for segment query of SRv message SID, the method comprising:
acquiring the segment lengths of Block, node and function+area of SID in the SRv message from a source port for receiving SRv message;
inquiring whether a Key table corresponding to a Block segment of the SID in the SRv message exists in a Block table entry according to the Block segment length of the SID in the SRv message; if so, the first and second data are not identical,
according to the Key table corresponding to the Block segment of the SID in the SRv message in the Block table entry, the Node table entry is indexed, and whether the Key table corresponding to the Node segment of the SID in the SRv message exists is inquired in the indexed Node table entry; if so, the first and second data are not identical,
according to the Key table index function+area table item corresponding to the Node segment of the SID in the SRv message in the Node table item, inquiring whether a Key table corresponding to the function+area segment of the SID in the SRv message exists in the indexed function+area table item; if so, the first and second data are not identical,
according to the Key table Index corresponding to the function+area segment of the SID in the SRv6 message, the AD Index in the Action table of the function+area segment is indexed, and according to the AD Index, the editing and forwarding actions of the SRv message are indexed.
2. The method of claim 1, wherein querying whether a Key table corresponding to a Block segment of a SID in the SRv message exists in a Block table entry according to a Block segment length of the SID in the SRv message comprises:
acquiring information corresponding to the Block segment length from the SRv6 message;
searching a Key table with the length of the Block segment length in the Block table item;
and judging whether the information corresponding to the Block segment length in the SRv message SID table is consistent with the information in the Key table searched in the Block table entry.
3. The method of claim 2, wherein indexing Node entries according to Key tables corresponding to Block segments of SIDs in SRv messages in the Block entries, and querying whether Key tables corresponding to Node segments of SIDs in SRv messages exist in the indexed Node entries, comprises:
indexing an AD table in the Block table according to the AD Index in the Key table searched in the Block table, and indexing a Node table according to the Pointer and Step in the AD table;
when the Node table item indexes a corresponding Key table, acquiring information corresponding to the Node segment length from the SRv message;
searching a Key table which is indexed in the Node table item and has the length of the Node segmentation length;
and judging whether the information corresponding to the Node segment length in the SRv message SID table is consistent with the information in the Key table of the Node segment length.
4. The method of claim 3, wherein indexing a function+area table entry according to a Key table corresponding to a Node segment of the SID in the SRv message in the Node table entry, and querying whether a Key table corresponding to a function+area segment of the SID in the SRv message exists in the indexed function+area table entry, comprises:
indexing an AD table in the Node table according to the AD Index in the Key table searched in the Node table, and indexing a function+area table according to the Pointer and Step in the AD table;
when the corresponding Key table is indexed in the function+area table item, acquiring information corresponding to the function+area segment length in the SRv message SID table;
searching a Key table which is indexed in the function+area table item and has the length of the function+area segment length;
and judging whether the information corresponding to the function+area segment length in the SRv6 message SID table is consistent with the information in the Key table of the function+area segment length.
5. The method of SRv6 message SID segment query of claim 1, further comprising:
when the lengths of the Key tables in the table entries of the present stage are smaller than the segment lengths of the present stage in the SID table of the SRv message, the Key tables of the adjacent table entries of the present stage are combined, so that the combined Key table length is equal to the segment length of the present stage in the SID table of the SRv message; and
and indexing the AD table in the current level table according to the index information in the Key table of the first table in the adjacent current level table, and acquiring the information of the index lower level table from the AD table in the current level table.
6. The method of claim 5, wherein indexing the lower level entries according to the index information in the Key table of the first entry in the neighboring current level entries comprises:
and indexing a Key table in a lower-level table item according to a pointer+ (length/c Step), wherein the Pointer is the first address of the Key table in the lower-level table item, the length is the segmentation length of the lower level in the SRv message SID table, c is the length of the Key table in the lower-level table item, and Step is the number of the Key tables of the corresponding lower-level table item of the present-level table item.
7. The method of SRv6 message SID segment query of claim 1, further comprising:
discarding the SRv message when the Key table corresponding to the SRv message does not exist in the Block table entry;
discarding the SRv message when the Key table corresponding to the SRv message does not exist in the Node table entry; and
and discarding the SRv message when the Key table corresponding to the SRv message does not exist in the function+area table entry.
8. An apparatus for segment query of SRv message SID, the apparatus comprising:
an obtaining module, configured to obtain, from a source port that receives a SRv message, a Block, a Node, and a function+area segment length of a SID in the SRv message;
the query module is used for querying whether a Key table corresponding to the Block segment of the SID in the SRv message exists in the Block table item according to the Block segment length of the SID in the SRv message; if yes, indexing a Node table item according to a Key table corresponding to the Block segment of the SID in the SRv message in the Block table item, and inquiring whether a Key table corresponding to the Node segment of the SID in the SRv message exists in the indexed Node table item; if yes, indexing a function+area table item according to a Key table corresponding to the Node segment of the SID in the SRv message in the Node table item, and inquiring whether a Key table corresponding to the function+area segment of the SID in the SRv message exists in the indexed function+area table item;
and the behavior module is used for indexing the AD Index in the Action table of the function+area section according to the Key table corresponding to the function+area section of the SID in the SRv6 message, and indexing the AD Index to the editing and forwarding behavior of the SRv6 message according to the AD Index.
9. An electronic device, comprising:
at least one processor; and
a memory storing instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of SRv message SID segment query of any one of claims 1 to 7.
10. A computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, which when executed by a processor, implements the steps of the method of SRv message SID segment query in accordance with any one of claims 1 to 7.
CN202211021389.9A 2022-08-24 2022-08-24 SRv6 message SID segmentation query method and application Active CN115396354B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211021389.9A CN115396354B (en) 2022-08-24 2022-08-24 SRv6 message SID segmentation query method and application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211021389.9A CN115396354B (en) 2022-08-24 2022-08-24 SRv6 message SID segmentation query method and application

Publications (2)

Publication Number Publication Date
CN115396354A CN115396354A (en) 2022-11-25
CN115396354B true CN115396354B (en) 2023-06-02

Family

ID=84123563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211021389.9A Active CN115396354B (en) 2022-08-24 2022-08-24 SRv6 message SID segmentation query method and application

Country Status (1)

Country Link
CN (1) CN115396354B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314219A (en) * 2020-02-24 2020-06-19 盛科网络(苏州)有限公司 Efficient forwarding method and device for IPv6 segmented routing
CN111628995A (en) * 2020-05-26 2020-09-04 新华三信息安全技术有限公司 SID compression method, SID compression device, SID compression equipment and storage medium based on SRv6
CN112134801A (en) * 2020-08-11 2020-12-25 中盈优创资讯科技有限公司 Method and device for processing segment identification SID and each node
CN113852552A (en) * 2021-09-23 2021-12-28 网络通信与安全紫金山实验室 Network communication method, system and storage medium
WO2022078509A1 (en) * 2020-10-15 2022-04-21 中兴通讯股份有限公司 Method and apparatus for encapsulating extension header of ipv6 packet
WO2022117092A1 (en) * 2020-12-04 2022-06-09 苏州盛科通信股份有限公司 Time delay measurement method and apparatus based on srv6 sid
WO2022143989A1 (en) * 2020-12-31 2022-07-07 苏州盛科通信股份有限公司 Sid compression method and apparatus based on srv6 protocol

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314219A (en) * 2020-02-24 2020-06-19 盛科网络(苏州)有限公司 Efficient forwarding method and device for IPv6 segmented routing
CN111628995A (en) * 2020-05-26 2020-09-04 新华三信息安全技术有限公司 SID compression method, SID compression device, SID compression equipment and storage medium based on SRv6
CN112134801A (en) * 2020-08-11 2020-12-25 中盈优创资讯科技有限公司 Method and device for processing segment identification SID and each node
WO2022078509A1 (en) * 2020-10-15 2022-04-21 中兴通讯股份有限公司 Method and apparatus for encapsulating extension header of ipv6 packet
WO2022117092A1 (en) * 2020-12-04 2022-06-09 苏州盛科通信股份有限公司 Time delay measurement method and apparatus based on srv6 sid
WO2022143989A1 (en) * 2020-12-31 2022-07-07 苏州盛科通信股份有限公司 Sid compression method and apparatus based on srv6 protocol
CN113852552A (en) * 2021-09-23 2021-12-28 网络通信与安全紫金山实验室 Network communication method, system and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于SRv6的网络切片技术研究;石鸿伟;黄凤芝;;电子技术与软件工程(第16期);全文 *

Also Published As

Publication number Publication date
CN115396354A (en) 2022-11-25

Similar Documents

Publication Publication Date Title
CN109729012B (en) Unicast message transmission method and device
CN108259346B (en) Equivalent routing table item establishing method and device
US8903972B2 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
CN112311600A (en) Strategy suggestion generation method and device based on network data analysis
CN105426244A (en) Application process management method and application process management device
CN114143257A (en) Method for generating table entry, method, device and system for sending message
CN108399175B (en) Data storage and query method and device
CN113472718A (en) Service processing method, device, equipment and storage medium
CN115396354B (en) SRv6 message SID segmentation query method and application
CN109617821B (en) Transmission method, main control board and equipment of multicast message
CN115314563A (en) Message generation method, message processing method and message processing device
CN111367916A (en) Data storage method and device
CN108259350B (en) Message transmission method and device and machine-readable storage medium
CN112087389A (en) Message matching table look-up method, system, storage medium and terminal
CN114079634B (en) Message forwarding method and device and computer readable storage medium
CN115514702A (en) Method and device for quickly switching link, electronic equipment and storage medium
US20200169463A1 (en) Software-defined networking device based on service profile learning
CN114915584A (en) Message forwarding method, device and system
US9444735B2 (en) Contextual summarization tag and type match using network subnetting
CN115914142A (en) Message processing method, message forwarding method, device and equipment
CN108737522B (en) Message processing method, device and system
CN115914173A (en) Chip implementation method and application of OAM (operation administration and maintenance) under multi-core architecture
CN103825971A (en) Method for generating 4over6 channel dynamically
CN112468600B (en) Application message notification method, system and storage medium based on network matrix
CN115914089A (en) ARP outlet fast switching chip implementation method and application

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