CN113973074A - Message processing method and device, electronic equipment and medium - Google Patents

Message processing method and device, electronic equipment and medium Download PDF

Info

Publication number
CN113973074A
CN113973074A CN202111246202.0A CN202111246202A CN113973074A CN 113973074 A CN113973074 A CN 113973074A CN 202111246202 A CN202111246202 A CN 202111246202A CN 113973074 A CN113973074 A CN 113973074A
Authority
CN
China
Prior art keywords
node
sid
message
srv6
segment list
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
CN202111246202.0A
Other languages
Chinese (zh)
Other versions
CN113973074B (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202111246202.0A priority Critical patent/CN113973074B/en
Publication of CN113973074A publication Critical patent/CN113973074A/en
Application granted granted Critical
Publication of CN113973074B publication Critical patent/CN113973074B/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

Landscapes

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

Abstract

The embodiment of the invention provides a message processing method, a message processing device, electronic equipment and a medium, and relates to the technical field of communication. The method comprises the following steps: determining G-SID of each node in the message forwarding path, and filling SID information of the last node in the message forwarding path in a segment list indicated by SL ═ 0; sequentially filling the G-SID from the penultimate node to the positive node included in the message forwarding path into each filling bit from the segment list indicated by SL ═ 1 to the segment list indicated by SL ═ N according to the sequence from small to large of the SI value corresponding to the filling bit; filling SRv6SID of the first node in the message forwarding path in the segment list indicated by SL ═ N + 1; and forwarding SRv6 messages to the intermediate node, wherein the SRH of the SRv6 message comprises segment lists indicated by SL ═ 0 to segment lists indicated by SL ═ N + 1. The problem that the SRH can not be correctly popped up in the last but one jump can be solved.

Description

Message processing method and device, electronic equipment and medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for processing a packet, an electronic device, and a medium.
Background
Segment Routing IPv6 (Segment Routing IPv6, SRv6) refers to Segment Routing (SR) implemented based on the IPv6 forwarding plane. A route extension Header (SRH) is inserted into an IPv6 message, a Segment list (Segment list) is added into the SRH to indicate a forwarding path of the message, and the SL includes Segment Identifiers (SIDs) of nodes in the forwarding path.
As shown in fig. 1, the SID includes a common prefix (common prefix), a Node ID (Node ID), a function (contribution) field, and an optional parameter section (extensions), which may be referred to as extensions for short. Each SID in one SRv6 domain has the same common prefix, and in the current SRv6 optimization scheme, the common prefix of the SID can be compressed, and the variable part of the SID, i.e., the G-SID in fig. 1, is carried in the SRH, and the G-SID includes the Node ID and the contribution part in the SID.
For example, if the packet forwarding path is node 7 → node 6 → node 5 → node 4 → node 3 → node 2 → node 1, as shown in fig. 2, SRv6SID of node 7 is filled in segment list [2], the arrangement manner of G-SIDs of other nodes in segment list is continuous from right to left, that is, G-SIDs of node 6, node 5, node 4 and node 3 are sequentially filled in segment list [1], and G-SIDs of node 2 and node 1 are sequentially filled in segment list [0] from right to left.
In the process of message forwarding, after receiving a message, an intermediate node in a forwarding path may splice a next G-SID in the segment list with a common prefix in an IPv6 destination address of the current message to form a SID of 128b, use the SID as an IPv6 destination address of the message, and then search a routing table for message forwarding. If the current scene supports the PSP, the next to last node on the forwarding path needs to pop up the SRH in the message. That is, when the message is forwarded to the node 2, the node 2 needs to pop up the SRH in the message.
However, in this case, the node 2 may determine that it is not the last G-SID by whether the G-SID corresponding route of the node 2 carries continuous Compression (COC), and if the COC is carried, it indicates that the node 2 is not the last G-SID. At this time, the node 2 needs to determine whether the node 2 is the penultimate node, but the node 2 cannot acquire the detailed route of the node 1, and further cannot determine whether the node 1 is the last G-SID, so that the node 2 cannot determine whether the node is the penultimate node in the forwarding path, and further cannot pop up the SRH.
Disclosure of Invention
An object of the present embodiment is to provide a message processing method, an apparatus, an electronic device, and a medium, so as to solve a problem that an SRH cannot be popped up. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a message processing method, where the method is applied to a head node in an SRv6 network, and the method includes:
determining the G-SID of each node in the message forwarding path;
filling SID information of the last node in the message forwarding path in a segment list indicated by SL ═ 0;
sequentially filling the G-SID from the penultimate node to the positive node included in the message forwarding path into each filling bit from the segment list indicated by SL ═ 1 to the segment list indicated by SL ═ N according to the sequence from small to large of the SI value corresponding to the filling bit; adding 1 to the SL value every time a segment list is added until the G-SID of the positive second node is filled;
filling the SRv6SID of the first node in the message forwarding path in a segment list indicated by SL ═ N + 1;
and forwarding SRv6 a message to an intermediate node, wherein the SRH of the SRv6 message comprises a segment list indicated by SL ═ 0 to a segment list indicated by SL ═ N + 1.
In one possible implementation, the SID information is a G-SID; the filling SID information of the last node in the packet forwarding path in the segment list indicated by SL ═ 0 includes:
and filling the G-SID of the last node in the message forwarding path in the highest filling bit in the segment list indicated by SL ═ 0.
In one possible implementation, after padding the SRv6SID of the first node in the packet forwarding path in the segment list indicated by SL ═ N +1, the method further includes:
and issuing the initial SI of the G-SID of the second node in the message forwarding path in a segment list to a forwarding plane of the head node, so that the forwarding plane fills the initial SI at the lowest two bits of the destination IPv6 address of the SRv6 message, and generates the SRv6 message.
In one possible implementation, the SID information is an uncompressed SRv6 SID; the filling SID information of the last node in the packet forwarding path in the segment list indicated by SL ═ 0 includes:
and filling the uncompressed SRv6SID of the last node in the message forwarding path in a segment list indicated by SL ═ 0.
In a second aspect, an embodiment of the present application provides a message processing method, where the method is applied to an intermediate node in an SRv6 network, and the method includes:
receiving SRv6 a message, wherein an SRH of the SRv6 message includes a plurality of segment lists, and the segment list indicated by SL ═ 0 is only filled with SID information of the last node in the message forwarding path;
if the SL value carried in the SRH of the SRv6 message is 1 and the SI value carried in the destination IPv6 address of the SRv6 message is 0, popping up the SRH, and filling SID information in a segment list indicated by SL ═ 0 to the SRv6 message to obtain an IPv6 message;
and forwarding the IPv6 message.
In one possible implementation, the SID information is a G-SID or an uncompressed SRv6 SID.
In a third aspect, an embodiment of the present application provides a packet processing apparatus, where the apparatus is applied to a head node in an SRv6 network, and the apparatus includes:
a determining module, configured to determine a G-SID of each node included in the packet forwarding path;
a padding module, configured to pad SID information of a last node in the packet forwarding path in a segment list indicated by SL ═ 0; sequentially filling the G-SID from the penultimate node to the positive node included in the message forwarding path into each filling bit from the segment list indicated by SL ═ 1 to the segment list indicated by SL ═ N according to the sequence from small to large of the SI value corresponding to the filling bit; adding 1 to the SL value every time a segment list is added until the G-SID of the positive second node is filled; filling the SRv6SID of the first node in the message forwarding path in a segment list indicated by SL ═ N + 1;
a forwarding module, configured to forward SRv6 a packet to an intermediate node, where an SRH of the SRv6 packet includes a segment list indicated by SL ═ 0 to a segment list indicated by SL ═ N + 1.
In one possible implementation, the SID information is a G-SID; the filling module is specifically configured to:
and filling the G-SID of the last node in the message forwarding path in the highest filling bit in the segment list indicated by SL ═ 0.
In one possible implementation, the apparatus further includes:
and an issuing module, configured to issue an initial SI of a G-SID of a second node in the packet forwarding path in a segment list to a forwarding plane of the head node, so that the forwarding plane fills the initial SI at the lowest two bits of a destination IPv6 address of an SRv6 packet, and generates the SRv6 packet.
In one possible implementation, the SID information is an uncompressed SRv6 SID; the filling module is specifically configured to:
and filling the uncompressed SRv6SID of the last node in the message forwarding path in a segment list indicated by SL ═ 0.
In a fourth aspect, an embodiment of the present application provides a packet processing apparatus, where the apparatus is applied to an intermediate node in an SRv6 network, and the apparatus includes:
a receiving module, configured to receive SRv6 a message, where an SRH of the SRv6 message includes multiple segment lists, and a segment list indicated by SL ═ 0 is only filled with SID information of a last node in a message forwarding path;
a processing module, configured to pop up the SRH if the SL value carried in the SRH of the SRv6 message is 1 and the SI value carried in the destination IPv6 address of the SRv6 message is 0, and fill SID information in a segment list indicated by SL ═ 0 in the SRv6 message to obtain an IPv6 message;
and the forwarding module is used for forwarding the IPv6 message.
In one possible implementation, the SID information is a G-SID or an uncompressed SRv6 SID.
In a fifth aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor configured to implement the method steps of any one of the first or second aspects when executing a program stored in the memory.
In a sixth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of the first aspect or the second aspect.
In a seventh aspect, the present application further provides a computer program product containing instructions, which when executed on a computer, causes the computer to perform the method of the first aspect or the second aspect.
The embodiment of the invention has the following beneficial effects:
by adopting the technical scheme, the segment list indicated by SL ═ 0 in the SRH carried by the SRv6 message can be ensured to only include the SID information of the last node in the message forwarding path, so that after an intermediate node in the message forwarding path receives the SRv6 message, whether the intermediate node is the penultimate node in the message forwarding path can be determined only according to the position of the G-SID of the intermediate node in the segment list indicated by SL ═ 1, the segment list indicated by SL ═ 0 does not need to be judged to include the G-SIDs of how many nodes, and the penultimate node can be ensured to correctly pop up the SRH.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a diagram of a SID provided in the background art;
FIG. 2 is an exemplary diagram of a segment list provided in the background art;
fig. 3 is an exemplary schematic diagram of an SRH provided in an embodiment of the present application;
fig. 4 is a flowchart of a message processing method according to an embodiment of the present application;
FIG. 5 is an exemplary diagram of another segment list provided by an embodiment of the present application;
FIG. 6 is an exemplary diagram of another segment list provided by an embodiment of the present application;
FIG. 7 is an exemplary diagram of another segment list provided by an embodiment of the present application;
fig. 8 is a flowchart of another message processing method according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of another message processing apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For convenience of description, related concepts related to the embodiments of the present application are explained.
Psp (payload Segment POP of the SRH) refers to the removal of the SRH in the SRv6 message by the penultimate node in the forwarding path. The operation of removing the SRH may also be referred to as "popping the SRH".
The G-SID (Generalized-SID) is SRv6SID after compression.
The COC is a kind of navigator issued by the G-SID, and is used for identifying whether the next SID in the segment list is also the compressed G-SID in the scene of the compressed SID.
The segment index (SL) is the number of the next segment list to be processed.
Segment List is a List of SIDs, which can be referred to as a Segment List. The nodes on the message forwarding path are arranged from far to near, that is, the coding is carried out from the last Segment of the transmission path, Segment List [0] represents the last SID List of the message forwarding path, Segment List [1] represents the last-but-one SID List of the message forwarding path, and so on.
SRv6 the header of the message includes IPv6 header and SRH, and as shown in fig. 3, the IPv6 header includes version number (version), Traffic class, flow label (flow label), load length (payload length), Next header (Next header), Hop limit (Hop limit), source address (source address), and destination address (destination address).
The destination address includes, among other things, a common prefix (common prefix), a G-SID, padding bits, and a SI ((G-SID Index)). The last two bits of the destination address of the SI are used to indicate the number of the next G-SID to be processed, and the value ranges from 0 to 3.
SRH is a routing extension header in SRv6 message, and SRH includes: next header, SRH length (Hdr Ext Len), Routing Type (Routing Type), segment index (Segments Left), Last hop (Last Entry), Flags, and Tag (Tag).
Wherein, Next Header: 8bits, which is used to identify the type of the next header.
Hdr Ext Len: the length is 8bits, which indicates the length of the SRH header in units of 8 bytes, excluding the first 8 bytes.
Routing Type: the length is 8bits, the field is the routing type, the value is 4, and the SRH is carried.
Last Entry: the length is 8bits, and the serial number of the first SID of the actual forwarding path of the message in the SRH header.
Flag: the length is 8bits, which is flag bit information.
Tag: the length is 16bits and is used for marking a group of messages with the same characteristics.
Segments Left, 8bits in length, hereinafter abbreviated as SL, is the number of the next segment list to be processed.
Also included in the SRH are a plurality of segment lists, three of which are shown in fig. 3 by way of example, where the segment list indicated by SL ═ 0 includes a 128bit SRv6 SID. The segment list indicated by SL ═ 1 includes four G-SIDs, which are G-SID0, G-SID1, G-SID2, and G-SID 3. The SL 2 segment list includes a 128bit SRv6 SID.
It should be noted that fig. 3 is only a schematic diagram, and SRv6SID accounts for 16B (byte) in fig. 3, and each G-SID accounts for 4B (byte), and SI may indicate the position of the G-SID within the range of 16B. For example, SI ═ 0 is used to denote G-SID0 in fig. 3, SI ═ 1 is used to denote G-SID1, SI ═ 2 is used to denote G-SID2, and SI ═ 3 is used to denote G-SID 3.
An application scenario of the embodiment of the present application is described below.
The embodiment of the application is applied to SRv6 networks supporting PSP.
In some scenarios, to relieve SRv6 the burden on the tail node, the SRH of SRv6 may be removed by the next to last node in the packet forwarding path of the SRv6 network.
In other scenarios, if there is a device a that does not support SRv6 in the current network stock device, a device B that supports SRv6 networks may be deployed in front of the device, so that the device a may access the SRv6 network as a tail node, which is beneficial to incremental deployment. In this case, since the device a does not have the capability of processing SRv6 messages, the device B needs to remove the SRH in the SRV6 message and forward the IPv6 message to the device a.
All the nodes referred to in the embodiments of the present application are network devices in SRv6 network, and may be, for example, routers, switches, and the like.
In order to enable normal popping of an SRH at a penultimate hop in a process of forwarding SRv6 messages, an embodiment of the present application provides a message processing method, where the method is applied to a head node in a SRv6 network, as shown in fig. 4, and the method includes:
s401, determining the G-SID of each node included in the message forwarding path.
For example, the packet forwarding path is node 7 → node 6 → node 5 → node 4 → node 3 → node 2 → node 1, and the G-SID from node 1 to node 7 needs to be determined.
S402, filling SID information of the last node in the packet forwarding path in the segment list indicated by SL ═ 0.
The Segment lists can be represented as Segment List [0], Segment List [1], Segment List [2], and so on, as specified by the standard protocol. Wherein, Segment List [0] is the last Segment List to be processed, Segment List [1] is the second last Segment List to be processed, and Segment List [2] is the third last Segment List to be processed.
SL ═ 0 is used to indicate Segment List [0], SL ═ 1 is used to indicate Segment List [1], SL ═ 2 is used to indicate Segment List [2], and so on.
In this step, the SID information of the last node in the packet forwarding path may be filled in the segment list [0 ]. For example, SID information of node 1 is padded in segment list [0 ].
S403, sequentially filling the G-SID from the node next to the node on the packet forwarding path to the node on the positive number in the segment list indicated by SL ═ 1 to the filling bits in the segment list indicated by SL ═ N according to the ascending order of the SI values corresponding to the filling bits.
Adding 1 to the SL value every time a segment list is added until the G-SID of the positive second node is filled;
the Segment List indicated by SL ═ 1 is Segment List [1], and the Segment List indicated by SL ═ 2 is Segment List [2 ].
Each segment list comprises four filling bits, and the SI values of the four filling bits from left to right in the segment list are 0, 1, 2, and 3 in sequence.
In this embodiment, starting from the G-SID of the penultimate node included in the forwarding path, filling each G-SID in the segment list indicated by SL ═ 1 in the order from low to high according to the filling bits, after the segment list indicated by SL ═ 1 is filled, continuing to fill SL +1 in the segment list indicated by SL ═ 2 until the G-SID of the positive second node in the packet forwarding path is filled, where the segment list where the G-SID of the positive second node is located is the segment list indicated by SL ═ N.
As an example, as shown in fig. 5, SID information of node 1 may be padded in the segment list indicated by SL ═ 0, then the G-SID of node 2 may be padded in the position where the segment list SI indicated by SL ═ 1 is 0, the G-SID of node 3 may be padded in the position where the segment list SI indicated by SL ═ 1 is 1, the G-SID of node 4 may be padded in the position where the segment list SI indicated by SL ═ 1 is 3, and the G-SID of node 5 may be padded in the position where the segment list SI indicated by SL ═ 1 is 4.
At this time, since the G-SID of the node 6 is not yet padded, SL +1 is obtained as SL 2. And fills the G-SID of the node 6 at the position where the segment list SI indicated by SL 2 is 1, so far, the G-SIDs of the nodes 1 to 6 have been completely filled, i.e., the above-mentioned N2.
S404, filling the SRv6SID of the first node in the packet forwarding path in the segment list indicated by SL ═ N + 1.
Continuing with the example in the previous step, the uncompressed SRv6SID of node 7 is populated in the segment list indicated by SL ═ 3.
S405, forwarding SRv6 message to the intermediate node, where the SRH of the SRv6 message includes a segment list indicated by SL ═ 0 to a segment list indicated by SL ═ N + 1.
It is understood that the SRH of the SRv6 message includes the segment lists populated in S402-S404, and may include the segment list shown in fig. 5, for example.
By adopting the method, the segment list indicated by SL ═ 0 in the SRH carried by the SRv6 message can be ensured to only comprise the SID information of the last node in the message forwarding path, so that after the intermediate node in the message forwarding path receives the SRv6 message, whether the intermediate node is the penultimate node in the message forwarding path can be determined only according to the position of the G-SID of the intermediate node in the segment list indicated by SL ═ 1, the segment list indicated by SL ═ 0 does not need to be judged to comprise the G-SIDs of a plurality of nodes, and the penultimate node can be ensured to correctly pop up the SRH.
In an embodiment of the present application, the S402, padding SID information of a last node in a packet forwarding path in a segment list indicated by SL ═ 0 includes the following two implementation manners:
in the first mode, the SID information is G-SID.
The head node may pad the G-SID of the last node in the packet forwarding path with the highest padding bits in the segment list indicated by SL ═ 0.
As shown in fig. 6, taking the packet forwarding path as node 7 → node 6 → node 5 → node 4 → node 3 → node 2 → node 1 as an example, the G-SID of node 1 is padded in the segment list indicated by SL-0 at the position of SI-4.
In this way, the segment list indicated by SL ═ 0 only includes one G-SID, so in the segment list indicated by SL ═ 1, the node to which the G-SID filled in the position where SI ═ 0 belongs must be the penultimate node in the forwarding path, so that this node can directly pop up the SRH, without further determining how many G-SIDs are in the segment list indicated by SL ═ 0, and the SRH can be correctly popped up.
In the second mode, the SID information is an uncompressed SRv6 SID.
The head node may pad the uncompressed SRv6SID of the last node in the packet forwarding path in the segment list indicated by SL ═ 0.
That is, it can be specified that the SRv6SID of the last node in the forwarding path cannot be compressed, and then the segment list indicated by SL ═ 0 can only be filled with one uncompressed SRv6 SID.
As shown in fig. 7, still taking the packet forwarding path as node 7 → node 6 → node 5 → node 4 → node 3 → node 2 → node 1 as an example, the SRv6SID of node 1 is filled in the segment list indicated by SL ═ 0. The G-SID of the node 2, the node 3, the node 4, and the node 5 is padded in the segment list indicated by SL ═ 1, the G-SID of the node 6 is padded in the segment list indicated by SL ═ 2, and the G-SID of the node 7 is padded in the segment list indicated by SL ═ 3.
In this way, the segment list indicated by SL ═ 0 only includes one uncompressed SRv6SID, so in the segment list indicated by SL ═ 1, the node to which the G-SID filled in the SI ═ 0 position belongs must be the penultimate node in the forwarding path, so that this node can directly pop up the SRH, without further determining how many G-SIDs are in the segment list indicated by SL ═ 0, and the SRH can be correctly popped up.
In another embodiment of the present application, after padding the SRv6SID of the first node in the packet forwarding path in the segment list indicated by SL ═ N +1, the method further includes:
and issuing the initial SI of the G-SID of the first node in the message forwarding path in the segment list to the forwarding plane of the head node, so that the forwarding plane fills the initial SI at the lowest two bits of the destination IPv6 address of the SRv6 message, and generates a SRv6 message.
After receiving the initial SI, the forwarding plane of the head node may fill the SRv6SID in the segment list indicated by SL ═ N +1 in the destination address part of the IPv6 header when generating SRv6 packet, and fill the initial SI in the position of the lowest two bits of the destination address of the IPv6 header.
Furthermore, when the intermediate node receives the SRv6 message, the position of the G-SID of the next node in the message forwarding path in the segment list can be determined based on the SL value in the SRH and the initial SI filled with the lowest two bits of the destination address, so as to obtain the G-SID of the next node from the position, and fill the obtained G-SID in the destination address part of the IPv6 header.
And the intermediate node splices the G-SID with the common prefix and the Args to recover the standard SRv6 SID. In addition, the intermediate node needs to update the SI of the lowest two bits of the destination address to the SI of the next G-SID after the G-SID.
Taking fig. 7 as an example, the destination address of the IPv6 header of the SRv6 message is filled with the SRv6SID of the node 7 by the header node, and the lowest two bits of the destination address are filled with the SI of the node 6, that is, the SI is 0. The value of segment Left padding in this SRH is 2.
Since the destination address of the SRv6 message is the SRv6SID of node 7, the head node forwards the SRv6 message to node 7, and after receiving the message, node 7 can obtain the G-SID of node 6 from the location where SL is 2 and SI is 0. Further, the node 7 fills the destination address of the SRv6 message with the G-SID of the node 6, updates the SI filled in the destination address to 4, updates the Segments Left in the SRH header to 1, and forwards the SRv6 message.
In the embodiment of the present application, an arrangement manner of each G-SID included in a packet forwarding path in a segment list is changed, and a control plane of a head node may send an initial SI of a G-SID of a first node in the packet forwarding path in the segment list to a forwarding plane, so that the forwarding plane may fill the initial SI in a destination IPv6 address of an IPv6 header, thereby ensuring that the forwarding plane correctly generates a SRv6 packet, and enabling an intermediate node that receives the SRv6 packet to accurately obtain a position of a next G-SID in the segment list, so that the SRv6 packet can be correctly forwarded.
Corresponding to the foregoing method embodiment, another message processing method is also provided in this application embodiment, as shown in fig. 8, where the method includes:
s801, receiving SRv6 messages, wherein the SRH of the SRv6 message includes multiple segment lists, and the segment list indicated by SL ═ 0 is only filled with SID information of the last node in the message forwarding path.
And S802, if the SL value carried in the SRH of the SRv6 message is 1 and the SI value carried in the destination IPv6 address of the SRv6 message is 0, popping up the SRH, and filling SID information in the segment list indicated by SL being 0 into the SRv6 message to obtain the IPv6 message.
According to the G-SID arrangement in the embodiment of the present application, since only the SID information of the last node in the packet forwarding path is filled in the segment list indicated by SL ═ 0, in the segment list indicated by SL ═ 1, the G-SID of SI ═ 0 is inevitably the penultimate node in the packet forwarding path, so that the SRH can be popped up when the SL value carried in the SRH is 1 and the SI value carried by the destination IPv6 address of the SRv6 packet is 0.
And S803, forwarding the IPv6 message.
By adopting the method, in the SRH of the SRv6 message received by the intermediate node, the SL ═ 0 indicates the segment list
Only including the SID information of the last node in the packet forwarding path, so that when the packet forwarding path is in
After receiving the SRv6 message, the intermediate node only needs to determine that the SL value carried in the SRH of the SRv6 message is 1, and
SRv6 if the SI value carried by the destination IPv6 address of the message is 0, it can be determined that the message is the reverse of the message forwarding path
Counting the second node without judging how many nodes' G-SIDs are included in the segment list indicated by SL ═ 0, which can ensure that
The penultimate node correctly pops up the SRH.
In one embodiment, the G-SID information is a G-SID, in which case, the COC of the node to which the G-SID belongs, which is padded at the position of SL ═ 1 and SI ═ 0, is equal to 1, that is, the G-SID of the last node in the packet forwarding path is also compressed.
In another embodiment, the G-SID information is an uncompressed SRv6 SID. In this case, the COC of the node to which the G-SID belongs, which is filled in the SL 1 and SI 0 positions, is 0, i.e., the last node of the packet forwarding path is not compressed.
Corresponding to the foregoing method embodiment, an embodiment of the present application further provides a message processing apparatus, where the apparatus is applied to a head node in SRv6 network, and as shown in fig. 9, the apparatus includes:
a determining module 901, configured to determine a G-SID of each node included in a packet forwarding path;
a padding module 902, configured to pad SID information of a last node in the packet forwarding path in a segment list indicated by SL ═ 0; sequentially filling the G-SID from the penultimate node to the positive node included in the message forwarding path into each filling bit from the segment list indicated by SL ═ 1 to the segment list indicated by SL ═ N according to the sequence from small to large of the SI value corresponding to the filling bit; adding 1 to the SL value every time a segment list is added until the G-SID of the positive second node is filled; filling the SRv6SID of the first node in the message forwarding path in a segment list indicated by SL ═ N + 1;
a forwarding module 903, configured to forward SRv6 a packet to an intermediate node, where an SRH of the SRv6 packet includes a segment list indicated by SL ═ 0 to a segment list indicated by SL ═ N + 1.
Optionally, the SID information is a G-SID; the filling module 902 is specifically configured to:
and filling the G-SID of the last node in the message forwarding path in the highest filling bit in the segment list indicated by SL ═ 0.
Optionally, the apparatus further comprises:
and an issuing module, configured to issue an initial SI of a G-SID of a second node in the packet forwarding path in a segment list to a forwarding plane of the head node, so that the forwarding plane fills the initial SI at the lowest two bits of a destination IPv6 address of an SRv6 packet, and generates the SRv6 packet.
Optionally, the SID information is an uncompressed SRv6 SID; the filling module 902 is specifically configured to:
and filling the uncompressed SRv6SID of the last node in the message forwarding path in a list indicated by SL ═ 0.
Corresponding to the foregoing method embodiment, an embodiment of the present application further provides another packet processing apparatus, where the apparatus is applied to an intermediate node in SRv6 network, and as shown in fig. 10, the apparatus includes:
a receiving module 1001, configured to receive SRv6 a packet, where an SRH of the SRv6 packet includes multiple segment lists, and a segment list indicated by SL ═ 0 is only filled with SID information of a last node in a packet forwarding path;
a processing module 1002, configured to pop up the SRH if the SL value carried in the SRH of the SRv6 message is 1 and the SI value carried in the destination IPv6 address of the SRv6 message is 0, and fill SID information in a segment list indicated by SL being 0 in the SRv6 message to obtain an IPv6 message;
a forwarding module 1003, configured to forward the IPv6 packet.
Optionally, the SID information is a G-SID or an uncompressed SRv6 SID.
The embodiment of the invention also provides electronic equipment, and the electronic equipment can be the head node in the embodiment or an intermediate node. As shown in fig. 11, the system comprises a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, wherein the processor 1101, the communication interface 1102 and the memory 1103 are communicated with each other through the communication bus 1104,
a memory 1103 for storing a computer program;
the processor 1101 is configured to implement the method steps in the above-described method embodiments when executing the program stored in the memory 1103.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the message processing methods described above.
In another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the message processing methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1. A message processing method, applied to a head node in SRv6 network, the method comprising:
determining the G-SID of each node in the message forwarding path;
filling SID information of the last node in the message forwarding path in a segment list indicated by SL ═ 0;
sequentially filling the G-SID from the penultimate node to the positive node included in the message forwarding path into each filling bit from the segment list indicated by SL ═ 1 to the segment list indicated by SL ═ N according to the sequence from small to large of the SI value corresponding to the filling bit; adding 1 to the SL value every time a segment list is added until the G-SID of the positive second node is filled;
filling the SRv6SID of the first node in the message forwarding path in a segment list indicated by SL ═ N + 1;
and forwarding SRv6 a message to an intermediate node, wherein the SRH of the SRv6 message comprises a segment list indicated by SL ═ 0 to a segment list indicated by SL ═ N + 1.
2. The method of claim 1, wherein the SID information is a G-SID; the filling SID information of the last node in the packet forwarding path in the segment list indicated by SL ═ 0 includes:
and filling the G-SID of the last node in the message forwarding path in the highest filling bit in the segment list indicated by SL ═ 0.
3. The method of claim 1 or 2, wherein after padding the SRv6SID of the first node in the packet forwarding path in a segment list indicated by SL ═ N +1, the method further comprises:
and issuing the initial SI of the G-SID of the second node in the message forwarding path in a segment list to a forwarding plane of the head node, so that the forwarding plane fills the initial SI at the lowest two bits of the destination IPv6 address of the SRv6 message, and generates the SRv6 message.
4. The method of claim 1, wherein the SID information is an uncompressed SRv6 SID; the filling SID information of the last node in the packet forwarding path in the segment list indicated by SL ═ 0 includes:
and filling the uncompressed SRv6SID of the last node in the message forwarding path in a segment list indicated by SL ═ 0.
5. A message processing method is applied to SRv6 intermediate nodes in the network, and the method comprises:
receiving SRv6 a message, wherein an SRH of the SRv6 message includes a plurality of segment lists, and the segment list indicated by SL ═ 0 is only filled with SID information of the last node in the message forwarding path;
if the SL value carried in the SRH of the SRv6 message is 1 and the SI value carried in the destination IPv6 address of the SRv6 message is 0, popping up the SRH, and filling SID information in a segment list indicated by SL ═ 0 to the SRv6 message to obtain an IPv6 message;
and forwarding the IPv6 message.
6. The method of claim 5, wherein the SID information is a G-SID or an uncompressed SRv6 SID.
7. A message processing apparatus, for use in SRv6 a head node in a network, the apparatus comprising:
a determining module, configured to determine a G-SID of each node included in the packet forwarding path;
a padding module, configured to pad SID information of a last node in the packet forwarding path in a segment list indicated by SL ═ 0; sequentially filling the G-SID from the penultimate node to the positive node included in the message forwarding path into each filling bit from the segment list indicated by SL ═ 1 to the segment list indicated by SL ═ N according to the sequence from small to large of the SI value corresponding to the filling bit; adding 1 to the SL value every time a segment list is added until the G-SID of the positive second node is filled; filling the SRv6SID of the first node in the message forwarding path in a segment list indicated by SL ═ N + 1;
a forwarding module, configured to forward SRv6 a packet to an intermediate node, where an SRH of the SRv6 packet includes a segment list indicated by SL ═ 0 to a segment list indicated by SL ═ N + 1.
8. The apparatus of claim 7, wherein the SID information is a G-SID; the filling module is specifically configured to:
and filling the G-SID of the last node in the message forwarding path in the highest filling bit in the segment list indicated by SL ═ 0.
9. The apparatus of claim 7 or 8, further comprising:
and an issuing module, configured to issue an initial SI of a G-SID of a second node in the packet forwarding path in a segment list to a forwarding plane of the head node, so that the forwarding plane fills the initial SI at the lowest two bits of a destination IPv6 address of an SRv6 packet, and generates the SRv6 packet.
10. The apparatus of claim 7, wherein the SID information is an uncompressed SRv6 SID; the filling module is specifically configured to:
and filling the uncompressed SRv6SID of the last node in the message forwarding path in a segment list indicated by SL ═ 0.
11. A message processing apparatus, for use at an intermediate node in SRv6 network, the apparatus comprising:
a receiving module, configured to receive SRv6 a message, where an SRH of the SRv6 message includes multiple segment lists, and a segment list indicated by SL ═ 0 is only filled with SID information of a last node in a message forwarding path;
a processing module, configured to pop up the SRH if the SL value carried in the SRH of the SRv6 message is 1 and the SI value carried in the destination IPv6 address of the SRv6 message is 0, and fill SID information in a segment list indicated by SL ═ 0 in the SRv6 message to obtain an IPv6 message;
and the forwarding module is used for forwarding the IPv6 message.
12. The apparatus of claim 11, wherein the SID information is a G-SID or an uncompressed SRv6 SID.
13. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN202111246202.0A 2021-10-26 2021-10-26 Message processing method and device, electronic equipment and medium Active CN113973074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111246202.0A CN113973074B (en) 2021-10-26 2021-10-26 Message processing method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111246202.0A CN113973074B (en) 2021-10-26 2021-10-26 Message processing method and device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN113973074A true CN113973074A (en) 2022-01-25
CN113973074B CN113973074B (en) 2022-12-20

Family

ID=79588304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111246202.0A Active CN113973074B (en) 2021-10-26 2021-10-26 Message processing method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN113973074B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024083219A1 (en) * 2022-10-21 2024-04-25 中国移动通信有限公司研究院 Message processing method and apparatus, and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112787923A (en) * 2019-11-07 2021-05-11 华为技术有限公司 Message processing method, device and system
US20210243107A1 (en) * 2018-05-03 2021-08-05 Futurewei Technologies, Inc. Explicit routing with network function encoding
US20210250288A1 (en) * 2020-02-10 2021-08-12 Huawei Technologies Co., Ltd. Method for Forwarding Packet in Hybrid Network, Device, and System
CN113472658A (en) * 2021-06-29 2021-10-01 新华三信息安全技术有限公司 Message packaging method, message forwarding method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210243107A1 (en) * 2018-05-03 2021-08-05 Futurewei Technologies, Inc. Explicit routing with network function encoding
CN112787923A (en) * 2019-11-07 2021-05-11 华为技术有限公司 Message processing method, device and system
US20210250288A1 (en) * 2020-02-10 2021-08-12 Huawei Technologies Co., Ltd. Method for Forwarding Packet in Hybrid Network, Device, and System
CN113472658A (en) * 2021-06-29 2021-10-01 新华三信息安全技术有限公司 Message packaging method, message forwarding method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024083219A1 (en) * 2022-10-21 2024-04-25 中国移动通信有限公司研究院 Message processing method and apparatus, and device and storage medium

Also Published As

Publication number Publication date
CN113973074B (en) 2022-12-20

Similar Documents

Publication Publication Date Title
CN111917640B (en) SRv6 network segment list generation method, message forwarding method, device and system
CN110417657B (en) Method and device for processing multicast data message
CN111628995A (en) SID compression method, SID compression device, SID compression equipment and storage medium based on SRv6
CN111510386B (en) Method and device for processing message
CN114598642A (en) Method for sending network performance parameters and calculating network performance and network node
CN112787922B (en) Message processing method, network node and system
CN112787927B (en) Segmented routing message forwarding method and device and preset logic circuit unit
CN116319524A (en) Method, equipment and system for forwarding message in SR network
WO2021083341A1 (en) Method for processing message, and network node and system
EP4009596A1 (en) Message forwarding method, device, and system in sr network
CN112448888A (en) Method, equipment and system for forwarding message in SR network
CN111382115B (en) Path creating method and device for network on chip and electronic equipment
WO2021043232A1 (en) Method by which host network performance requirements may be programmed, device and system
CN113973074B (en) Message processing method and device, electronic equipment and medium
CN110545229A (en) Message sending method and device in VXLAN axis networking mode
US11115324B2 (en) System and method for performing segment routing over an MPLS network
CN112769738B (en) DetNet data packet processing method and device
CN112511424A (en) Method for forwarding and forwarding message, head node, forwarding node and storage medium
CN113300929B (en) Message forwarding method and device, electronic equipment and storage medium
CN116405431A (en) Data processing method, network node and computer readable storage medium
CN113630316B (en) Data transmission method and communication device
CN111464443A (en) Message forwarding method, device, equipment and storage medium based on service function chain
US10171368B1 (en) Methods and apparatus for implementing multiple loopback links
CN104702505A (en) Message transmission method and node
CN107483334B (en) Message forwarding method and device

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