CN115396354A - SRv6 message SID segmented query method and application - Google Patents

SRv6 message SID segmented query method and application Download PDF

Info

Publication number
CN115396354A
CN115396354A CN202211021389.9A CN202211021389A CN115396354A CN 115396354 A CN115396354 A CN 115396354A CN 202211021389 A CN202211021389 A CN 202211021389A CN 115396354 A CN115396354 A CN 115396354A
Authority
CN
China
Prior art keywords
sid
srv6 message
segment
key
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211021389.9A
Other languages
Chinese (zh)
Other versions
CN115396354B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for SRv6 message SID subsection query and application, the method includes the following steps: acquiring the segment lengths of Block, node and Function + alignment of the SRv6 message from a source port for receiving the SRv6 message; inquiring whether a Key table corresponding to the SRv6 message exists in a Block table entry according to the Block segment length of the SRv6 message; if yes, node table entries are indexed according to the Key tables corresponding to the SRv6 messages in the Block table entries, and whether the Key tables corresponding to the SRv6 messages exist in the indexed Node table entries is inquired; if yes, according to the Key table index Function + alignment table item corresponding to the SRv6 message in the Node table item, and inquiring whether a Key table corresponding to the SRv6 message exists in the indexed Function + alignment table item; if so, indexing the AD table in the Function + alignment table entry according to the AD Index in the Key table corresponding to the SRv6 message in the Function + alignment table entry so as to obtain the editing and forwarding behaviors of the SRv6 message. The method can realize the sectional query of the SRv6 message SID, improve the flexibility of the SID query and reduce the chip resource consumption.

Description

SRv6 message SID segmented query method and application
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an application for SRv6 message SID segment query.
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 a foundation for constructing an intelligent IP network in 5G and cloud era. The SRv6 can unify IP forwarding and tunnel forwarding, has the flexibility and strong programmability of IPv6, and provides a strong support for the application of future intelligent IP network slices, deterministic networks, service chains and the like. Therefore, SRv6 is currently the focus of research in the field of network technology.
The internet protocol version 6-segment routing (SRv 6) is to use SR technology in IPv6 network, and forward a service packet through SRv6 tunnel with IPv6 address as SID. In SRv6, SID refers to an identifier that defines a certain network function, representing a network instruction. This SID, referred to as SRv6 SID, takes the form of an IPv6 address, but does not correspond to the IPv6 address of the interface that any SR node comprises.
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 skilled in the art.
Disclosure of Invention
The invention aims to provide a method for sectional query of an SRv6 message SID and application thereof, which solve the problems of chip resource waste and insufficient flexibility caused by the fact that only one SID table is used as a Key table for SID query in the prior art.
In order to achieve the above object, an embodiment of the present invention provides a method for SRv6 packet SID segment query.
In one or more embodiments of the invention, the method comprises: acquiring the lengths of blocks, nodes and Function + fragments of SID in an SRv6 message from a source port for receiving the SRv6 message; inquiring whether a Key table corresponding to the Block segment of the SID in the SRv6 message exists in a Block table item according to the Block segment length of the SID in the SRv6 message; if yes, node table entries are indexed according to a Key table corresponding to a Block segment of the SID in the SRv6 message in the Block table entries, and whether a Key table corresponding to a Node segment of the SID in the SRv6 message exists or not is inquired in the indexed Node table entries; if yes, according to the Key table index Function + alignment table entry corresponding to the Node segment of SID in the SRv6 message in the Node table entry, and inquiring whether a Key table corresponding to the Function + alignment segment of SID in the SRv6 message exists in the indexed Function + alignment table entry; and if so, indexing an AD Index in an Action table of the Function segment and the alignment segment according to a Key table corresponding to the Function segment and the alignment segment of the SID in the SRv6 message, and indexing editing and forwarding behaviors of the SRv6 message according to the AD Index.
In one or more embodiments of the present invention, querying whether a Key table corresponding to a Block segment of a SID in an SRv6 message exists in a Block table entry according to a Block segment length of the SID in the SRv6 message includes: acquiring information corresponding to the Block segment length from the SRv6 message; searching a Key table with the length being the length of the Block segment in the Block table entry; and judging whether the information corresponding to the Block segment length in the SRv6 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 entry according to a Key table corresponding to a Block segment of a SID in an SRv6 message in the Block entry, and querying whether a Key table corresponding to a Node segment of a SID in the SRv6 message exists in the indexed Node entry includes: indexing an AD table in the Block table item according to the AD Index in the Key table searched in the Block table item, and indexing a Node table item according to a Pointer and a Step in the AD table; when the Node table entry indexes a corresponding Key table, acquiring information corresponding to the Node segment length in the SRv6 message SID table; searching a Key table which is indexed in the Node table entry and has the length of the Node segment length; and judging whether the information corresponding to the Node segment length in the SRv6 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 + alignment entry corresponding to a Node segment of a SID in an SRv6 message in the Node entries, and querying whether there is a Key table corresponding to a Function + alignment segment of the SID in the SRv6 message in the indexed Function + alignment entry, the method includes: indexing an AD table in the Node table items according to an AD Index in a Key table searched in the Node table items, and indexing a Function + instruction table item according to a Pointer and a Step in the AD table; when a corresponding Key table is indexed in the Function + alignment entry, acquiring information corresponding to the Function + alignment segment length in the SRv6 message SID table; searching a Key table which is indexed in the Function + alignment table entry and has the length of the Function + alignment segment; and judging whether the information corresponding to the Function + alignment segment length in the SID table of the SRv6 message is consistent with the information in the Key table of the Function + alignment 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 current level are all smaller than the segment length of the current level in the SRv6 message SID table, combining the Key tables of the adjacent table entries of the current level so that the length of the combined Key table is equal to the segment length of the current level in the SRv6 message SID table; and indexing the AD table in the current-level table entry according to the index information in the Key table of the first table entry in the adjacent current-level table entries, and acquiring the information of the index lower-level table entry from the AD table in the current-level table entry.
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 adjacent current-level entries includes: and indexing a Key table in a subordinate table entry according to Pointer + (length/c Step), wherein Pointer is the first address of the Key table in the subordinate table entry, length is the length of a subordinate segment in the SRv6 message SID table, c is the length of the Key table in the subordinate table entry, and Step is the number of the Key table of the subordinate table entry corresponding to the current table entry.
In one or more embodiments of the invention, the method further comprises: when the Key table corresponding to the SRv6 message does not exist in the Block table entry, discarding the SRv6 message; when the Key table corresponding to the SRv6 message does not exist in the Node table entry, discarding the SRv6 message; and when the Key table corresponding to the SRv6 message does not exist in the Function + alignment table entry, discarding the SRv6 message.
In another aspect of the present invention, an apparatus for SRv6 packet SID segment query is provided, which includes an obtaining module, a querying module, and a behavior module.
An obtaining module, configured to obtain, from a source port that receives an SRv6 message, segment lengths of a Block, a Node, and a Function + instruction of an SID in the SRv6 message.
The query module is used for querying whether a Key table corresponding to a Block segment of the SID in the SRv6 message exists in a Block table item according to the Block segment length of the SID in the SRv6 message; if yes, node table entries are indexed according to a Key table corresponding to a Block segment of the SID in the SRv6 message in the Block table entries, and whether a Key table corresponding to a Node segment of the SID in the SRv6 message exists or not is inquired in the indexed Node table entries; if yes, according to the Key table index Function + alignment table entry corresponding to the Node segment of SID in the SRv6 message in the Node table entry, and inquiring whether the Key table corresponding to the Function + alignment segment of SID in the SRv6 message exists in the indexed Function + alignment table entry.
And the behavior module is used for indexing the AD Index in the Action table of the Function + alignment segment according to the Key table corresponding to the Function + alignment segment of the SID in the SRv6 message, and indexing the editing and forwarding behaviors of the SRv6 message according to the AD Index.
In one or more embodiments of the 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 being the length of the Block segment in the Block table entry; and judging whether the information corresponding to the Block segment length in the SRv6 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 invention, the query module is further configured to: indexing an AD table in the Block table item according to the AD Index in the Key table searched in the Block table item, and indexing a Node table item according to a Pointer and a Step in the AD table; when the Node table entry indexes a corresponding Key table, acquiring information corresponding to the Node segment length in the SRv6 message SID table; searching a Key table which is indexed in the Node table entry and has the length of the Node segmentation length; and judging whether the information corresponding to the Node segment length in the SRv6 message SID table is consistent with the information in the Key table of the Node segment length.
In one or more embodiments of the invention, the query module is further configured to: indexing an AD table in the Node table items according to an AD Index in a Key table searched in the Node table items, and indexing a Function + instruction table item according to a Pointer and a Step in the AD table; when the corresponding Key table is indexed in the Function + alignment table entry, acquiring information corresponding to the Function + alignment segment length in the SRv6 message SID table; searching a Key table which is indexed in the Function + alignment table entry and has the length of the Function + alignment segment; and judging whether the information corresponding to the Function + alignment segment length in the SID table of the SRv6 message is consistent with the information in the Key table of the Function + alignment segment length.
In one or more embodiments of the invention, the query module is further configured to: when the lengths of the Key tables in the table entries of the current level are all smaller than the length of the segment of the current level in the SRv6 message SID table, combining the Key tables of the adjacent table entries of the current level, so that the length of the Key tables after combination is equal to the length of the segment of the current level in the SRv6 message SID table; and indexing the AD table in the current-level table entry according to the index information in the Key table of the first table entry in the adjacent current-level table entries, and acquiring the information for indexing the lower-level table entry from the AD table in the current-level table entry.
In one or more embodiments of the invention, the query module is further configured to: and indexing a Key table in a subordinate table entry according to Pointer + (length/c Step), wherein Pointer is the first address of the Key table in the subordinate table entry, length is the length of a subordinate segment in the SRv6 message SID table, c is the length of the Key table in the subordinate table entry, and Step is the number of the Key table of the subordinate table entry corresponding to the current table entry.
In one or more embodiments of the invention, the behavior module is further configured to: when the Key table corresponding to the SRv6 message does not exist in the Block table entry, discarding the SRv6 message; when the Key table corresponding to the SRv6 message does not exist in the Node table entry, discarding the SRv6 message; and when the Key table corresponding to the SRv6 message does not exist in the Function + alignment table entry, discarding the SRv6 message.
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 SRv6 message SID segmentation polling as described above.
In another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of SRv6 message SID fragment querying as described.
Compared with the prior art, the method and the application for SRv6 message SID segmented query can realize the segmented query of SRv6 message SID by segmenting the SID table, configuring the same Key table in each segment and flexibly combining each segment, thereby improving the flexibility of SID query and reducing chip resource consumption.
Drawings
Fig. 1 is a flowchart of a method for sectional query of an SRv6 message SID according to an embodiment of the present invention;
fig. 2 is an SRv6 packet encapsulation format diagram of a method for SRv6 packet SID segment query according to an embodiment of the present invention;
fig. 3 is an SRv6 message format diagram of a method for SRv6 message SID segmentation query according to an embodiment of the present invention;
FIG. 4 is a segment length source diagram of a method for querying segments of SIDs in an SRv6 message according to an embodiment of the present invention;
FIG. 5 is a Key table structure diagram of a method for sectional query of an SRv6 message SID according to an embodiment of the present invention;
fig. 6 is a table entry series relationship diagram of a method for SRv6 message SID segment query according to an embodiment of the present invention;
fig. 7 is a structural diagram of an apparatus for SRv6 message SID segmentation query according to an embodiment of the present invention;
fig. 8 is a hardware block diagram of a computing device for SRv6 message SID segmentation query in accordance with an embodiment of the present invention.
Detailed Description
The following detailed description of the present invention is provided in conjunction with the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
Throughout the specification and claims, unless explicitly stated otherwise, the word "comprise", or variations such as "comprises" or "comprising", will be understood to imply the inclusion of a stated element or component but not the exclusion of any other element or component.
The technical solutions provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Example 1
Referring to fig. 1 to 6, a method for SRv6 message SID fragment query in an embodiment of the present invention is described, which includes the following steps.
In step S101, segment lengths of Block, node, and Function + instruction of the SID in the SRv6 message are obtained from the source port that receives the SRv6 message.
The SRv6 packet encapsulation format is shown in fig. 2, and SRH and SID List are encapsulated after IPv6 Header. SRH contains 7 fields in total, next Header, header Ext Length, routing Type, segment Length, last Entry, flags, and Tag. In the SRv6, each Segment is identified by SID (Segment ID), which is a special IPv6 address and has both routing capability of ordinary IPv6 address and behavior capability specific to SRv 6.
Each SRv6 node maintains a SID table (actually part of the routing table) consisting of a number of 128-bit SIDs, as shown in fig. 3, and the SRv6 SID is generally composed of three parts, namely Locator, function and optionally, archive. Wherein, the Locator is divided into a Block part and a Node part. The Locator identifies the SRv6 Node, each Node at least has a globally unique Locator value as a shared prefix of the local SID, and other nodes access the Node SID through the Locator route, wherein Block identifies a common prefix of an SRv6 domain, and Node identifies a Node in a certain SRv6 domain. Function identifies different behaviors within SRv6 node such as END, end.x, etc., and few behaviors also require the delivery of the attribute parameter. The fragments identify the corresponding parameters of the instructions when executed, which may contain flows, services, or any other relevant information.
As shown in fig. 4, different SRv6 domains are distinguished by the source port, so that the lengths of different SID segments can be obtained from the source port receiving the SRv6 packet. Specifically, the Block length, the Node length, and the Function + alignment length are added to be equal to or less than 128.
In step S102, whether a Key table corresponding to the Block segment of the SID in the SRv6 message exists in the Block table entry is queried according to the Block segment length of the SID in the SRv6 message.
Shown in fig. 5 is the contents of the SRv6 SID Key table in the chip. SID SUB as Key, pointer, step, AD Index as Action. Wherein, index the next level Key table by Pointer + Step, and Index the AD table by AD Index.
FIG. 6 shows the concatenation relationship of the three levels of Key tables in the chip. Including Block table, node table and Function + attribute table. The contents of the entries in the three tables are the same, so that the three tables can share the same chip memory, the size of each block of entries can be flexibly distributed according to different use scenes, and the purpose of saving chip resources is achieved.
Specifically, information corresponding to the Block segment length in an SRv6 message SID table is obtained; searching a Key table with the length of a Block segment in a Block table entry; and judging whether the information corresponding to the Block segment length in the SRv6 message SID table is consistent with the information in the Key table searched in the Block table entry. And if the information corresponding to the Block segment length in the SID table of the SRv6 message is consistent with the information in the Key table found in the Block table, indexing the Key table of the next level, namely the Key table in the Node table, through the Pointer and the Step in the Key table of the current level, or else, discarding the SRv6 message.
In addition, when the lengths of the Key tables in the current-level table entries (namely, the Block table entries) are smaller than the length of the current-level segment in the SRv6 message SID table, combining the Key tables of the adjacent current-level table entries, so that the length of the combined Key tables is equal to the length of the current-level segment in the SRv6 message SID table; and indexing the subordinate table items according to the index information in the Key table of the first table item in the adjacent current-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. Keys of several adjacent entries can be combined to form a longer Key (16/24/\8230;/120/128) as required, and the Action of the first entry in the several adjacent entries is used as the Action of the whole Key table. In this case, the number of the adjacent entries is Length/8, and Length is the Length of the SID segment corresponding to the Key table of this level. Therefore, the purpose of flexibly inquiring the segmented information with different lengths can be realized.
The third-level Key table can also realize the relation of N to N between table entries. That is, the previous-level table entry may index a plurality of next-level table entries, and the next-level table entry may also be indexed by a plurality of previous-level table entries. The relation of N to N between the table entries is realized through Pointer + (Length/c Step), wherein, pointer is the first address of the Key table in the next table entry (i.e. Node table entry), length is the Length of the next stage of the SRv6 message SID table, c is the Length of the Key table in the next table entry, and Step is the number of the Key tables corresponding to the next table entry in the current stage.
In step S103, the Node table entry is indexed according to the Key table corresponding to the Block segment of SID in the SRv6 message in the Block table entry, and whether the Key table corresponding to the Node segment of SID in the SRv6 message exists is queried in the indexed Node table entry.
Indexing an AD table in the Block table item according to the AD Index in the Key table searched in the Block table item, and indexing a Node table item according to a Pointer and a Step in the AD table; when a corresponding Key table is indexed in a Node table item, acquiring information corresponding to Node segment lengths in an SRv6 message SID table; searching a Key table which is indexed in the Node table item and has the length of the Node segment length; and judging whether the information corresponding to the Node segment length in the SRv6 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 SRv6 message SID table is consistent with the information in the Key table found in the Node table entry, the Key table at the next level, namely the Key table in the Function + alignment table entry, is indexed through the Pointer + Step in the Key table at the current level, otherwise, the SRv6 message is discarded.
In step S104, according to the Key table index Function + alignment entry corresponding to the Node segment of SID in the SRv6 message in the Node entry, it is queried in the indexed Function + alignment entry whether there is a Key table corresponding to the Function + alignment segment of SID in the SRv6 message.
Indexing an AD table in the Node table items according to the AD Index in the Key table searched in the Node table items, and indexing a Function + instruction table item according to a Pointer and a Step in the AD table; when a corresponding Key table is indexed in a Function + alignment table entry, acquiring information corresponding to the Function + alignment segment length in an SRv6 message SID table; searching a Key table which is indexed in the Function + alignment table entry and has the length of the Function + alignment segment; and judging whether the information corresponding to the Function + alignment segment length in the SID table of the SRv6 message is consistent with the information in the Key table of the Function + alignment segment length. If the information corresponding to the Function + alignment segment length in the SID table of the SRv6 message is consistent with the information in the Key table found in the Function + alignment entry, the AD table corresponding to the AD Index in the Key table of the current level is used for obtaining the editing and forwarding behaviors of the SRv6 message, otherwise, the SRv6 message is discarded.
In step S105, according to the Key table corresponding to the Function + alignment segment of the SID in the SRv6 message, the AD Index in the Action table of the Function + alignment segment is indexed, and according to the AD Index, the editing and forwarding behavior of the SRv6 message is indexed.
According to the method and the application for the SRv6 message SID subsection query, the SID table is sectioned and the same Key table is configured in each section, so that the SRv6 message SID subsection query is realized, the SID query flexibility is improved, and the chip resource consumption is reduced.
Fig. 7 shows an apparatus for SRv6 message SID segmentation query according to an embodiment of the present invention.
In the embodiment of the present invention, the apparatus for SRv6 packet SID segment query includes an obtaining module 701, a querying module 702, and a behavior module 703.
An obtaining module 701, configured to obtain, from a source port that receives the SRv6 packet, segment lengths of a Block, a Node, and a Function + instruction of an SID in the SRv6 packet.
The query module 702 is configured to query, according to the Block segment length of the SID in the SRv6 message, whether a Key table corresponding to the Block segment of the SID in the SRv6 message exists in the Block table entry; if yes, node table items are indexed according to a Key table corresponding to a Block segment of the SID in the SRv6 message in the Block table items, and whether a Key table corresponding to a Node segment of the SID in the SRv6 message exists or not is inquired in the indexed Node table items; if yes, according to the Key table index Function + alignment table entry corresponding to the Node segment of SID in SRv6 message in Node table entry, and inquiring whether the Key table corresponding to the Function + alignment segment of SID in SRv6 message exists in the indexed Function + alignment table entry.
The behavior module 703 is configured to Index to the AD Index in the Action table of the Function + alignment segment according to the Key table corresponding to the Function + alignment segment of the SID in the SRv6 message, and Index to the editing and forwarding behavior of the SRv6 message according to the AD Index. The query module 702 is further configured to: acquiring information corresponding to Block segment length in an SRv6 message SID table; searching a Key table with the length of a Block segment in a Block table entry; and judging whether the information corresponding to the Block segment length in the SRv6 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 a Pointer and a Step in the AD table; when a corresponding Key table is indexed in a Node table item, acquiring information corresponding to Node segment lengths in an SRv6 message SID table; searching a Key table which is indexed in the Node table item and has the length of the Node segment length; and judging whether the information corresponding to the Node segment length in the SRv6 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 items according to the AD Index in the Key table searched in the Node table items, and indexing a Function + instruction table item according to a Pointer and a Step in the AD table; when a corresponding Key table is indexed in a Function + alignment table entry, acquiring information corresponding to the Function + alignment segment length in an SRv6 message SID table; searching a Key table which is indexed in the Function + alignment table entry and has the length of the Function + alignment segment; and judging whether the information corresponding to the Function + alignment segment length in the SID table of the SRv6 message is consistent with the information in the Key table of the Function + alignment segment length.
The query module 702 is further configured to: when the lengths of the Key tables in the table entries of the current level are all smaller than the length of the segment of the current level in the SRv6 message SID table, combining the Key tables of the adjacent table entries of the current level so that the length of the Key tables after combination is equal to the length of the segment of the current level in the SRv6 message SID table; and indexing the AD table in the current-level table entry according to the index information in the Key table of the first table entry in the adjacent current-level table entries, and acquiring the information of the index lower-level table entry from the AD table in the current-level table entry.
The query module 702 is further configured to: and indexing a Key table in a subordinate table entry according to Pointer + (length/c Step), wherein Pointer is the first address of the Key table in the subordinate table entry, length is the length of a segment at the lower stage in an SRv6 message SID table, c is the length of the Key table in the subordinate table entry, and Step is the number of the Key tables of the subordinate table entries corresponding to the current table entry.
The behavior module 703 is further configured to: when the Key table corresponding to the SRv6 message does not exist in the Block table entry, discarding the SRv6 message; when the Key table corresponding to the SRv6 message does not exist in the Node table entry, discarding the SRv6 message; and when the Key table corresponding to the SRv6 message does not exist in the Function + alignment table entry, discarding the SRv6 message.
Fig. 8 illustrates a hardware block diagram of a computing device 80 for SRv6 message SID segmentation queries in accordance with an embodiment of the present description. As shown in fig. 8, computing device 80 may include at least one processor 801, storage 802 (e.g., non-volatile storage), memory 803, and a communication interface 804, and the at least one processor 801, storage 802, memory 803, and communication interface 804 are connected together via a bus 805. The at least one processor 801 executes at least one computer readable instruction stored or encoded in the 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 the various embodiments of the present description.
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 electronics, and the like.
According to one embodiment, a program product, such as a machine-readable medium, is provided. A machine-readable medium may have instructions (i.e., elements described above as being implemented in software) that, when executed by a machine, cause the machine to perform various operations and functions described above in connection with fig. 1-8 in the various embodiments of the present specification. Specifically, a system or apparatus may be provided which is provided with a readable storage medium on which software program code implementing the functions of any of the above embodiments is stored, and causes a computer or processor of the system or apparatus to read out and execute instructions stored in the readable storage medium.
According to the method and the application for the SRv6 message SID subsection query, the SID table is sectioned and the same Key table is configured in each section, so that the SRv6 message SID subsection query is realized, the SID query flexibility is improved, and the chip resource consumption is reduced.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 have been 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 certain principles of the invention and its practical application to enable one skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and 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 SRv6 message SID segment query is characterized in that the method comprises:
acquiring the lengths of blocks, nodes and Function + fragments of SID in an SRv6 message from a source port for receiving the SRv6 message;
inquiring whether a Key table corresponding to the Block segment of the SID in the SRv6 message exists in a Block table item according to the Block segment length of the SID in the SRv6 message; if so,
indexing a Node table item according to a Key table corresponding to a Block segment of the SID in the SRv6 message in the Block table item, and inquiring whether a Key table corresponding to a Node segment of the SID in the SRv6 message exists in the indexed Node table item; if so,
according to the Key table index Function + alignment table entry corresponding to the Node segment of the SID in the SRv6 message in the Node table entry, inquiring whether a Key table corresponding to the Function + alignment segment of the SID in the SRv6 message exists in the indexed Function + alignment table entry; if so,
and according to the Key table corresponding to the Function + alignment segment of the SID in the SRv6 message, indexing the AD Index in the Action table of the Function + alignment segment, and according to the AD Index, indexing the editing and forwarding behaviors of the SRv6 message.
2. The method according to claim 1, wherein querying whether a Key table corresponding to a Block segment of a SID in the SRv6 message exists in a Block entry according to a Block segment length of the SID in the SRv6 message comprises:
acquiring information corresponding to the Block segment length from the SRv6 message;
searching a Key table with the length being the length of the Block segment in the Block table entry;
and judging whether the information corresponding to the Block segment length in the SRv6 message SID table is consistent with the information in the Key table searched in the Block table entry.
3. The method according to claim 2, wherein the Node entry is indexed according to a Key table corresponding to a Block segment of the SID in the SRv6 message in the Block entry, and whether a Key table corresponding to a Node segment of the SID in the SRv6 message exists is queried in the indexed Node entry, including:
indexing an AD table in the Block table item according to the AD Index in the Key table searched in the Block table item, and indexing a Node table item according to a Pointer and a Step in the AD table;
when the Node table entry indexes a corresponding Key table, acquiring information corresponding to the Node segment length from the SRv6 message;
searching a Key table which is indexed in the Node table entry and has the length of the Node segmentation length;
and judging whether the information corresponding to the Node segment length in the SRv6 message SID table is consistent with the information in the Key table of the Node segment length.
4. The method of claim 3, wherein the step of querying the SRv6 message SID fragment according to the Key table index Function + alignment entry corresponding to the Node fragment of the SID in the SRv6 message in the Node entry and querying whether the Key table corresponding to the Function + alignment fragment of the SID in the SRv6 message exists in the indexed Function + alignment entry comprises the steps of:
indexing an AD table in the Node table items according to an AD Index in a Key table searched in the Node table items, and indexing a Function + instruction table item according to a Pointer and a Step in the AD table;
when the corresponding Key table is indexed in the Function + alignment table entry, acquiring information corresponding to the Function + alignment segment length in the SRv6 message SID table;
searching a Key table which is indexed in the Function + alignment table entry and has the length of the Function + alignment segment;
and judging whether the information corresponding to the Function + alignment segment length in the SID table of the SRv6 message is consistent with the information in the Key table of the Function + alignment segment length.
5. The method for SRv6 packet SID fragment query as claimed in claim 1, wherein said method further comprises:
when the lengths of the Key tables in the table entries of the current level are all smaller than the length of the segment of the current level in the SRv6 message SID table, combining the Key tables of the adjacent table entries of the current level, so that the length of the Key tables after combination is equal to the length of the segment of the current level in the SRv6 message SID table; and
and indexing the AD table in the current-level table entry according to the index information in the Key table of the first table entry in the adjacent current-level table entries, and acquiring the information for indexing the lower-level table entry from the AD table in the current-level table entry.
6. The method of claim 5, wherein indexing a subordinate table entry according to index information in a Key table of a first table entry of the adjacent current-level table entries comprises:
and indexing a Key table in a subordinate table entry according to Pointer + (length/c Step), wherein Pointer is the first address of the Key table in the subordinate table entry, length is the length of a subordinate segment in the SRv6 message SID table, c is the length of the Key table in the subordinate table entry, and Step is the number of the Key table of the subordinate table entry corresponding to the current table entry.
7. The method for SRv6 packet SID fragment query as claimed in claim 1, wherein said method further comprises:
when the Key table corresponding to the SRv6 message does not exist in the Block table entry, discarding the SRv6 message;
when the Key table corresponding to the SRv6 message does not exist in the Node table entry, discarding the SRv6 message; and
and when the Key table corresponding to the SRv6 message does not exist in the Function + alignment table entry, discarding the SRv6 message.
8. An apparatus for SRv6 packet SID segmentation query, the apparatus comprising:
an obtaining module, configured to obtain, from a source port that receives an SRv6 message, segment lengths of a Block, a Node, and a Function + instruction of an SID in the SRv6 message;
the query module is used for querying whether a Key table corresponding to a Block segment of the SID in the SRv6 message exists in a Block table item according to the Block segment length of the SID in the SRv6 message; if yes, node table entries are indexed according to a Key table corresponding to a Block segment of the SID in the SRv6 message in the Block table entries, and whether a Key table corresponding to a Node segment of the SID in the SRv6 message exists or not is inquired in the indexed Node table entries; if yes, according to the Key table index Function + alignment table entry corresponding to the Node segment of SID in the SRv6 message in the Node table entry, and inquiring whether a Key table corresponding to the Function + alignment segment of SID in the SRv6 message exists in the indexed Function + alignment table entry;
and the behavior module is used for indexing the AD Index in the Action table of the Function + alignment segment according to the Key table corresponding to the Function + alignment segment of the SID in the SRv6 message, and indexing the editing and forwarding behaviors 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 SRv6 message SID segmentation query as recited in any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of SRv6 message SID fragment query as claimed in 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 true CN115396354A (en) 2022-11-25
CN115396354B 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的网络切片技术研究", 电子技术与软件工程, no. 16 *

Also Published As

Publication number Publication date
CN115396354B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN107515878B (en) Data index management method and device
CN111767143A (en) Transaction data processing method, device, equipment and system
CN104572727A (en) Data querying method and device
CN108259346B (en) Equivalent routing table item establishing method and device
CN111130946B (en) Acceleration method and device for deep packet identification and storage medium
CN102111331B (en) Matching method based on hash table and adopting mask five-element rule
CN106878367B (en) Method and device for realizing asynchronous call of service interface
CN111355816B (en) Server selection method, device, equipment and distributed service system
US8271635B2 (en) Multi-tier, multi-state lookup
CN105429879A (en) Flow table item querying method, flow table item querying equipment and flow table item querying system
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
CN112087389B (en) Message matching table look-up method, system, storage medium and terminal
CN111625617A (en) Data indexing method and device and computer readable storage medium
CN111367916A (en) Data storage method and device
CN116489237A (en) Data packet processing method and device and network equipment
WO2018077138A1 (en) Data configuration method, index management method, related apparatus and computing device
CN110908996A (en) Data processing method and device
CN112866208B (en) Table item configuration method, message processing method, device, equipment and storage medium
CN114079634B (en) Message forwarding method and device and computer readable storage medium
CN103902554A (en) Data access method and device
CN108737522B (en) Message processing method, device and system
CN108833724B (en) CDR synthesis method and device
US20200169463A1 (en) Software-defined networking device based on service profile learning

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