CN113923161A - Message forwarding method and device - Google Patents
Message forwarding method and device Download PDFInfo
- Publication number
- CN113923161A CN113923161A CN202111170596.6A CN202111170596A CN113923161A CN 113923161 A CN113923161 A CN 113923161A CN 202111170596 A CN202111170596 A CN 202111170596A CN 113923161 A CN113923161 A CN 113923161A
- Authority
- CN
- China
- Prior art keywords
- message
- ipv6
- identifier
- forwarded
- interface
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/34—Source 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 application provides a message forwarding method and device. The scheme is as follows: acquiring a message to be forwarded; the message to be forwarded comprises a destination address and a target slice identifier; according to the destination address, acquiring a first identifier of an output interface for forwarding the message to be forwarded from the forwarding table entry; acquiring a second identifier of a sub-interface corresponding to the target slice identifier and the first identifier from an interface-slice identifier mapping table according to the target slice identifier and the first identifier; and forwarding the message to be forwarded through the subinterface indicated by the second identifier. By applying the technical scheme provided by the embodiment of the application, the overhead of the control plane is reduced.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for forwarding a packet.
Background
With the development of network technology, service messages of different users can be transmitted simultaneously on the same bearer network. In order to eliminate the worry of users about the safety of service message transmission and the transmission quality of service messages, the network can be divided into a plurality of network slices through a network slicing technology, so that corresponding logic virtual networks are provided for different users, the service messages among the users are isolated from each other and do not interfere with each other, and the bandwidth of each service message is guaranteed.
However, when the number of network slices in the network is large, in order to ensure normal use of each network slice, the control plane needs to consume a large amount of overhead for information distribution and routing calculation, so as to ensure normal transmission of messages in the network slices.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for forwarding a packet, so as to reduce overhead of a control plane. The specific technical scheme is as follows:
the embodiment of the application provides a message forwarding method, which is applied to a network node, and comprises the following steps:
acquiring a message to be forwarded; the message to be forwarded comprises a destination address and a target slice identifier;
acquiring a first identifier of an output interface for forwarding the message to be forwarded from a forwarding table entry according to the destination address;
acquiring a second identifier of a sub-interface corresponding to the target slice identifier and the first identifier from an interface-slice identifier mapping table according to the target slice identifier and the first identifier;
and forwarding the message to be forwarded through the subinterface indicated by the second identifier.
Optionally, if the network node is an ingress node, before obtaining the packet to be forwarded, the method further includes:
receiving a first Internet Protocol Version 6 (IPv 6) message;
sending message information of the first IPv6 message to a controller;
receiving a target slice identifier issued by the controller according to the message information;
the step of obtaining the message to be forwarded includes:
and encapsulating an outer layer IPv6 header on the outer layer of the first IPv6 message to obtain a message to be forwarded, wherein the outer layer IPv6 header comprises an IPv6 basic header, and a source address of the IPv6 basic header is filled with the target slice identifier.
Optionally, if the network node is an ingress node, before obtaining the packet to be forwarded, the method further includes:
receiving an Internet Protocol Version 6 Routing Policy (Segment Routing Internet Protocol Version 6Policy, SRv6 Policy) issued by the controller; the Segment Routing Identity (SID) list of the SRv6Policy carries slice identifiers;
receiving a first IPv6 message;
the step of obtaining the message to be forwarded includes:
determining a target SRv6Policy of the first IPv6 message according to the message information of the first IPv6 message;
an outer layer IPv6 Header is encapsulated in an outer layer of the first IPv6 message, so as to obtain a message to be forwarded, where the outer layer IPv6 Header includes an IPv6 basic Header and a Segment Routing Header (SRH), a source address of the IPv6 basic Header is filled with a target slice identifier in the target SRv6Policy, and the SRH is filled with a SID list in the target SRv6 Policy.
Optionally, the outer IPv6 header of the to-be-processed packet includes an IPv6 basic header, and a communication classification field or a flow label field of the IPv6 basic header carries identification information;
if the network node is an intermediate node, the step of obtaining the message to be forwarded includes:
receiving a second IPv6 message forwarded by the previous hop node;
if the outer layer IPv6 header of the second IPv6 message carries the identification information, determining the second IPv6 message as a message to be forwarded; the identification information is used for indicating that the target slice identification is filled in the source address of the IPv6 basic header included in the outer IPv6 header.
Optionally, before obtaining the packet to be forwarded, the method further includes:
receiving a first instruction, wherein the first instruction is used for instructing the division processing of a target interface of the network node;
dividing the target interface into a plurality of sub-interfaces based on the first instruction;
receiving a second instruction, wherein the second instruction comprises a slice identifier allocated to each subinterface;
and constructing an interface identifier of the target interface, an interface identifier corresponding to each sub-interface and a mapping table between slice identifiers corresponding to each sub-interface based on the second instruction to obtain an interface-slice identifier mapping table.
The embodiment of the present application further provides a packet forwarding apparatus, which is applied to a network node, and the apparatus includes:
the first acquisition module is used for acquiring the message to be forwarded; the message to be forwarded comprises a destination address and a target slice identifier;
a second obtaining module, configured to obtain, according to the destination address, a first identifier of an egress interface for forwarding the to-be-forwarded packet from a forwarding table entry;
a third obtaining module, configured to obtain, according to the target slice identifier and the first identifier, a second identifier of a sub-interface corresponding to the target slice identifier and the first identifier from an interface-slice identifier mapping table;
and the forwarding module is used for forwarding the message to be forwarded through the subinterface indicated by the second identifier.
Optionally, the apparatus further comprises:
a first receiving module, configured to receive a first IPv6 message before obtaining a message to be forwarded if the network node is an ingress node;
the sending module is used for sending the message information of the first IPv6 message to a controller;
the second receiving module is used for receiving the target slice identifier issued by the controller according to the message information;
the first obtaining module is specifically configured to encapsulate an outer IPv6 header on an outer layer of the first IPv6 message to obtain a to-be-forwarded message, where the outer IPv6 header includes an IPv6 basic header, and a source address of the IPv6 basic header is filled with the target slice identifier.
Optionally, the apparatus further comprises:
a third receiving module, configured to receive SRv6Policy sent by the controller before obtaining the packet to be forwarded if the network node is an ingress node; the SID list of the SRv6Policy carries slice identifiers;
the fourth receiving module is used for receiving the first IPv6 message;
the first obtaining module is specifically configured to determine, according to the message information of the first IPv6 message, a target SRv6Policy of the first IPv6 message; and encapsulating an outer layer IPv6 header in the outer layer of the first IPv6 message to obtain a message to be forwarded, wherein the outer layer IPv6 header comprises an IPv6 basic header and an SRH, a source address of the IPv6 basic header is filled with a target slice identifier in the target SRv6Policy, and the SRH is filled with a SID list in the target SRv6 Policy.
Optionally, the outer IPv6 header of the to-be-processed packet includes an IPv6 basic header, and a communication classification field or a flow label field of the IPv6 basic header carries identification information;
if the network node is an intermediate node, the first obtaining module is specifically configured to receive a second IPv6 message forwarded by a previous-hop node; if the outer layer IPv6 header of the second IPv6 message carries the identification information, determining the second IPv6 message as a message to be forwarded; the identification information is used for indicating that the target slice identification is filled in the source address of the IPv6 basic header included in the outer IPv6 header.
Optionally, the apparatus further comprises:
a fifth receiving module, configured to receive a first instruction before obtaining a packet to be forwarded, where the first instruction is used to instruct a target interface of the network node to be divided;
a dividing module, configured to divide the target interface into a plurality of sub-interfaces based on the first instruction;
a sixth receiving module, configured to receive a second instruction, where the second instruction includes a slice identifier allocated to each subinterface;
and the construction module is used for constructing the interface identifier of the target interface, the interface identifier corresponding to each sub-interface and a mapping table between the slice identifiers corresponding to each sub-interface based on the second instruction to obtain an interface-slice identifier mapping table.
Embodiments of the present application also provide a network node, comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing any of the above message forwarding method steps.
Embodiments of the present application further provide a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing any of the above message forwarding method steps.
An embodiment of the present application further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any of the above-mentioned message forwarding methods.
In the technical solution provided in the embodiment of the present application, after acquiring a to-be-forwarded packet including a destination address and a target slice identifier, a network node acquires, according to the destination address, a first identifier of an outgoing interface for forwarding the to-be-forwarded packet, so as to acquire, according to the first identifier and the target slice identifier, a second identifier of a sub-interface corresponding to the target slice identifier and the first identifier from an interface-slice identifier mapping table, and forward the to-be-forwarded packet through the sub-interface indicated by the second identifier.
Compared with the prior art that a large amount of information distribution and path calculation are required, in the technical scheme provided in the embodiment of the present application, after determining the outgoing interface of the packet to be forwarded, the network node determines the sub-interface corresponding to the packet to be forwarded directly according to the pre-stored interface-slice identifier mapping table, and does not need to rely on the forwarding channel included in the forwarding table, that is, the control plane does not need to perform information distribution and route calculation according to the corresponding relationship between the outgoing interface and the plurality of sub-interfaces corresponding to the outgoing interface in the information distribution and path calculation process, which effectively reduces the overhead required by the control plane for performing information distribution and route calculation.
Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application 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, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1-a is a schematic diagram of a SRv6 network;
FIG. 1-b is a schematic diagram of one configuration of a network slice in the SRv6 network shown in FIG. 1-a;
fig. 2 is a first flowchart of a message forwarding method according to an embodiment of the present application;
fig. 3 is a second flowchart of a message forwarding method according to an embodiment of the present application;
fig. 4-a is a schematic diagram of a header of a packet to be forwarded according to an embodiment of the present application;
FIG. 4-b is a schematic diagram of a source address in the outer IPv6 header shown in FIG. 4-a;
fig. 5 is a third flowchart illustrating a message forwarding method according to an embodiment of the present application;
fig. 6 is a fourth flowchart illustrating a message forwarding method according to an embodiment of the present application;
fig. 7 is a sixth flowchart of a message forwarding method according to an embodiment of the present application;
fig. 8 is a signaling diagram of a message forwarding process according to an embodiment of the present application;
fig. 9 is a schematic diagram of a network slice provided in an embodiment of the present application;
fig. 10 is a schematic structural diagram of a message forwarding apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a network node according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
In the related technology, in order to ensure the security and transmission quality of different service messages transmitted by a plurality of users through the same network, the network slicing technology is used for carrying out network slicing processing on the network to obtain a plurality of network slices, so that the service messages of the different users are transmitted by the plurality of network slices.
However, after obtaining a plurality of network slices, in order to ensure normal transmission of the packet in each network slice, the control plane needs to perform a large amount of information distribution and routing calculation to determine the forwarding table entry of each sub-interface including the output interface.
For ease of understanding, fig. 1-a and 1-b are illustrated as examples. Fig. 1-a is a schematic diagram of a SRv6 network structure. Fig. 1-b is a schematic diagram of a network slice in the SRv6 network shown in fig. 1-a.
In the SRv6 network shown in FIG. 1-a, there are two transmission paths between nodes D1-D4, namely path D0-D1-D4 and path D0-D2-D3-D4. In order to enable the SRv6 network to simultaneously support the transmission of service messages of multiple users, the SRv6 network shown in fig. 1-a may be subjected to network slicing processing.
For example, for the paths D0-D1-D4 shown in FIG. 1-a, 3 transmission channels may be created between node D0 and node D1, and between node D1 and node D4, respectively, as shown in FIG. 1-b, namely, transmission channels 1-3 between node D0 and node D1, and transmission channels 4-6 between node D1 and node D4 in FIG. 1-b. At this point, three network slices are included in fig. 1-b. For example, a network slice1 composed of transmission channels 1 and 4, a network slice2 composed of transmission channels 2 and 5, and a network slice3 composed of transmission channels 3 and 6.
For each network slice shown in fig. 1-b, in order to ensure normal transmission of a service packet in each network slice, the control plane needs to perform information distribution and routing calculation for each transmission channel in the information distribution and path calculation processes.
For ease of understanding, the description will be made only in terms of the information distribution process. In the SRv6 network shown in fig. 1-a, neighbor establishment of node D0 and node D1 only requires sending a Border Gateway Protocol (BGP) message. However, in the network slice shown in fig. 1-b, the neighbor establishment of the node D0 and the node D1 needs to send three BGP messages, that is, each transmission channel needs to have a corresponding BGP message.
Therefore, for each network slice, the control plane needs to consume a large amount of overhead when performing information distribution and routing calculation.
In order to solve the problems in the related art, embodiments of the present application provide a message forwarding method. As shown in fig. 2, fig. 2 is a first flowchart of a message forwarding method provided in this embodiment. The method is applied to the network node and specifically comprises the following steps.
Step S201, obtaining a message to be forwarded; the message to be forwarded comprises a destination address and a target slice identifier.
Step S202, according to the destination address, a first identifier of an output interface for forwarding the message to be forwarded is obtained from the forwarding table entry.
Step S203, according to the target slice identifier and the first identifier, a second identifier of the sub-interface corresponding to the target slice identifier and the first identifier is obtained from the interface-slice identifier mapping table.
And step S204, forwarding the message to be forwarded through the subinterface indicated by the second identifier.
Through the method shown in fig. 2, after acquiring a to-be-forwarded message including a destination address and a target slice identifier, a network node acquires a first identifier of an outgoing interface for forwarding the to-be-forwarded message according to the destination address, thereby acquiring, according to the first identifier and the target slice identifier, a second identifier of a sub-interface corresponding to the target slice identifier and the first identifier from an interface-slice identifier mapping table, and forwarding the to-be-forwarded message through the sub-interface indicated by the second identifier.
Compared with the prior art that a large amount of information distribution and path calculation are required, in the technical scheme provided in the embodiment of the present application, after determining the outgoing interface of the packet to be forwarded, the network node determines the sub-interface corresponding to the packet to be forwarded directly according to the pre-stored interface-slice identifier mapping table, and does not need to rely on the forwarding channel included in the forwarding table, that is, the control plane does not need to perform information distribution and route calculation according to the corresponding relationship between the outgoing interface and the plurality of sub-interfaces corresponding to the outgoing interface in the information distribution and path calculation process, which effectively reduces the overhead required by the control plane for performing information distribution and route calculation.
The following examples are given to illustrate the examples of the present application.
Aiming at the step S201, obtaining a message to be forwarded; the message to be forwarded comprises a destination address and a target slice identifier.
In this embodiment, the network node may be an entry node in a network slice, or may be an intermediate node in the network slice. Here, the network node is not particularly limited.
The entry node is the first node in the network slice, and the intermediate node is other nodes except the entry node and the destination node in the network slice. Still taking the above-mentioned fig. 1-b as an example, in the 3 network slices shown in fig. 1-b, the entry node is node D0, and the intermediate node is node D1.
The number of intermediate nodes included in a network slice varies according to the network structure of the network slice. Here, the number of intermediate nodes in the network slice is not particularly limited.
In this embodiment, the five-tuple information of the to-be-forwarded message includes a destination address, and the to-be-forwarded message further includes a slice identifier of a network slice, that is, the target slice identifier. For the description of the target slice identifier included in the packet to be forwarded, reference may be made to the following description, which is not described herein again.
In step S202, the first identifier of the outgoing interface for forwarding the packet to be forwarded is obtained from the forwarding table entry according to the destination address.
In this step, the forwarding table entry includes information such as a destination address, a next hop, an egress interface, and the like. The next hop and egress interface in the forwarding entry may be represented in the form of an identifier. After acquiring the message to be forwarded, the network node may search, according to the destination address of the message to be forwarded, an identifier of an outgoing interface corresponding to the next hop, that is, the first identifier, in the forwarding table entry, thereby determining the outgoing interface corresponding to the message to be forwarded.
In an optional embodiment, the destination address in the message to be forwarded may be an SID address. In step S202, according to the destination address, the first identifier of the outgoing interface for forwarding the packet to be forwarded is obtained from the forwarding table entry, which may specifically be represented as:
and searching the identifier of the next hop outgoing interface corresponding to the target SID address in the forwarding table entry according to the target address, the corresponding relation between the next hop and the outgoing interface in the forwarding table entry and the target SID address in the inner layer IPv6 basic header of the message to be forwarded to obtain the first identifier.
For convenience of understanding, with respect to the network slice corresponding to the SRv6 network shown in fig. 1-a, the network node is node D0, and the determination of the first identifier is described with reference to the forwarding table entry shown in table 1.
TABLE 1
SID | Next hop | Outlet interface |
A:A:A:A:0:1::1 | D1 | G0/1/0 |
A:A:A:A:0:2::1 | D2 | G0/1/1 |
After receiving the packet to be forwarded, the node D0 may obtain the destination SID address stored in the destination address of the inner layer IPv6 basic header of the packet to be forwarded.
When the destination SID address in the message to be forwarded is A: A: A: A:0:1, the node D0 can determine, according to the forwarding table entry shown in Table 1, that the next hop corresponding to A: A: A:0:1 is node D1, and the identifier of the egress interface corresponding to node D1 is G0/1/0. At this time, the node D0 may determine G0/1/0 as the first identifier of the outgoing interface corresponding to the packet to be forwarded.
When the destination SID address in the message to be forwarded is A: A: A: A:0:2: 1, the node D0 can determine, according to the forwarding table entry shown in Table 1, that the next hop corresponding to A: A: A:0:2: 1 is node D2, and the identifier of the egress interface corresponding to node D2 is G0/1/1. At this time, the node D0 may determine G0/1/1 as the first identifier of the outgoing interface corresponding to the packet to be forwarded.
In this embodiment of the present application, the message to be forwarded includes two IPv6 headers, that is, the inner IPv6 basic header and the outer IPv6 header that is additionally encapsulated. The outer IPv6 header may include an IPv6 base header and an SRH. For the outer IPv6 header, reference is made to the following description, which is not repeated herein.
In step S203, the second identifier of the sub-interface corresponding to the target slice identifier and the first identifier is obtained from the interface-slice identifier mapping table according to the target slice identifier and the first identifier.
In the embodiment of the application, a plurality of network slices can be obtained after the network slices are performed on the network. In each network slice, a plurality of subinterfaces exist between two adjacent nodes. Each sub-interface may correspond to a transmission channel between two nodes, or may correspond to a transmission queue between two nodes. Here, the expression of the subinterface is not particularly limited.
After determining the first identifier of the outgoing interface corresponding to the packet to be forwarded, the network node may determine, according to a pre-stored interface-slice identifier mapping table, an identifier corresponding to the target slice identifier among the identifiers of the multiple sub-interfaces corresponding to the first identifier as a second identifier. That is, in the interface-slice identifier mapping table, the identifier of the subinterface corresponding to the first identifier and the target switching identifier is determined as the second identifier, so as to determine the target subinterface corresponding to the packet to be forwarded.
For ease of understanding, the determination of the second identifier described above is described in conjunction with table 2.
TABLE 2
As shown in table 2, it is now assumed that the first identifier of the outgoing interface determined in step S202 is G0/1/0, and at this time, according to table 2, the network node may determine that there are three corresponding sub-interfaces of G0/1/0, i.e., the identifiers G0/1/0.1, G0/1/0.2, and G0/1/0.3 correspond to the respective sub-interfaces. Therefore, when the target slice identifier carried by the packet to be forwarded is 1, according to the corresponding relationship shown in table 2, the network node may determine G0/1/0.1 as the second identifier corresponding to the packet to be forwarded, that is, determine the sub-interface corresponding to G0/1/0.1 as the target sub-interface. When the target slice identifier carried by the packet to be forwarded is 2, according to the corresponding relationship shown in table 2, the network node may determine G0/1/0.2 as the second identifier corresponding to the packet to be forwarded, that is, determine the sub-interface corresponding to G0/1/0.2 as the target sub-interface. When the target slice identifier carried by the packet to be forwarded is 3, according to the corresponding relationship shown in table 2, the network node may determine G0/1/0.3 as the second identifier corresponding to the packet to be forwarded, that is, determine the sub-interface corresponding to G0/1/0.3 as the target sub-interface.
In the embodiment of the application, when the network slicing technology is used for carrying out network slicing processing on a network, the controller plans the network slices according to the service requirements and the network slice range uploaded by each node in the network, and issues slice information to each node. The slice information may include slice identification, bandwidth, life cycle, etc. information for the network slice. And each node constructs a corresponding sub-interface according to the received slice information. At this time, each node may establish a corresponding relationship among the slice identifier, the identifier of the outgoing interface, and the identifier of the sub-interface, and notify its neighboring nodes through a BGP packet, so that each node stores the corresponding relationship.
In step S204, the message to be forwarded is forwarded through the subinterface indicated by the second identifier.
In this step, after determining the second identifier, the network node may forward the packet to be forwarded to the next-hop node by using the sub-interface indicated by the second identifier. The next hop node may be a certain network node in the network slice, or may be a destination node of the network slice.
For example, through table 2, the network node determines that the second identifier corresponding to the packet to be forwarded is G0/1/0.1, that is, the target sub-interface determined by the network node is the sub-interface corresponding to G0/1/0.1. At this time, the network node may forward the packet to be forwarded to the target subinterface, and transmit the packet to the next-hop node through the target subinterface.
In the above embodiment, a forwarding process of a received packet to be forwarded is only described as an example by using one network node in a network slice. Each network node in the network slice may forward the received packet to be forwarded according to the methods shown in the above steps S201 to S204.
In an optional embodiment, when the network node is an entry node in the network slice, according to the method shown in fig. 2, an embodiment of the present application further provides a packet forwarding method. As shown in fig. 3, fig. 3 is a second flowchart of a message forwarding method provided in this embodiment. The method comprises the following steps.
Step S301, receiving a first IPv6 message.
In this step, the other device may send a first IPv6 message to the ingress node. At this time, the ingress node will receive the first IPv6 message.
The other device may be a Customer Edge (CE) device or the like. For example, CE1 and CE2 connect an ingress node and a destination node, respectively, of a network slice in a network. At some point, the CE1 sends a message to the CE2 through the network slice. At this time, the CE1 will send an IPv6 message to the ingress node, and the ingress node will receive the IPv6 message sent by the CE 1.
In the embodiments of the present application, the other devices are not particularly limited.
And step S302, receiving the target slice identification issued by the controller according to the message information.
In an optional embodiment, after receiving the first IPv6 message, the ingress node may report message information of the first IPv6 message, such as five-tuple information, to the controller. After receiving the message information, the controller may issue a target slice identifier for the first IPv6 message to the ingress node.
In another alternative embodiment, the controller may monitor whether the ingress node receives the first IPv6 message in real time. When the controller monitors that the ingress node receives the first IPv6 message, the controller may obtain the message information of the first IPv6 message, so as to issue the target slice identifier for the first IPv6 message to the ingress node.
In an optional embodiment, the target slice identifier may be issued through a control instruction, that is, in step S302, the target slice identifier issued by the receiving controller according to the message information may specifically be represented as:
the ingress node may receive a control instruction issued by the controller for the first IPv6 packet, where the control instruction includes a target slice identifier.
In an embodiment of the present application, the control plane includes the controller and a control module of a node in the related art. Here, the control module in the node is not specifically described.
Through the steps S301 to S302, since the network slice is planned by the controller according to the service requirement, after the ingress node receives the first IPv6 message, the controller can accurately determine the network slice corresponding to the first IPv6 message according to the message information of the message, so as to send the target slice identifier corresponding to the network slice to the ingress node, which effectively ensures the accuracy of the target slice identifier received by the ingress node.
Step S303, an outer layer IPv6 header is packaged on the outer layer of the first IPv6 message to obtain a message to be forwarded, the outer layer IPv6 header comprises an IPv6 basic header, and a source address of the IPv6 basic header is filled with a target slice identifier.
In this step, after receiving the first IPv6 message and determining the target slice identifier of the message to be forwarded, the ingress node may encapsulate an outer IPv6 header outside the IPv6 basic header (i.e., the inner IPv6 basic header) of the first IPv6 message, where the outer IPv6 header may include an IPv6 basic header and an SRH. The ingress node may pad the target slice identification to this outer layer IPv6 header. At this time, the ingress node may determine the first IPv6 message as a message to be forwarded.
In an alternative embodiment, the target slice id may fill the lower 16 bits of the IPv6 basic header source address of the outer IPv6 header.
The low 16 bits of the source address of the outer IPv6 header of the message to be forwarded are used as the storage space of the target slice identifier, so that the value range of the target slice identifier can be 0-216-1 (i.e., 0-65535). This greatly increases the number of target slice identifiers for network slices, thereby increasing the number of network slices that can be deployed in the network and improving network scalability.
For ease of understanding, the description will be made with reference to fig. 4-a and 4-b as an example. Fig. 4-a is a schematic diagram of a header of a packet to be forwarded according to an embodiment of the present application. Figure 4-b is a schematic diagram of the source address in the outer IPv6 header shown in figure 4-a.
The message header shown in fig. 4-a includes an outer IPv6 header and a memory IPv6 basic header. Wherein, the outer IPv6 header comprises an IPv6 basic header and an SRH. The IPv6 basic Header includes Version (Version), Traffic class (Traffic class), Flow label (Flow label), Payload Length (Payload Length), Next Header (Next Header), Hop Limit (Hop Limit), Source Address (Source Address), Destination Address (Destination Address) in fig. 4-a. The structure of the inner IPv6 basic header shown in fig. 4-a can refer to the structure of the IPv6 basic header included in the outer IPv6 header, and the inner IPv6 basic header will not be specifically described herein.
The source address shown in fig. 4-b includes a location identifier (Locator), a Function (Function), and a slice identifier.
After receiving the target slice identifier, the ingress node may add the target slice identifier to the lower 16 bits of the source address shown in fig. 4-a to obtain the source address shown in fig. 4-b, and encapsulate the IPv6 header including the source address into the first IPv6 message to obtain the to-be-forwarded message carrying the target slice identifier.
The above step S303 is a refinement of the above step S201.
In the embodiment of the application, after receiving the first IPv6 message, the entry node obtains the target slice identifier from the controller, so that the entry node can determine, based on the target slice identifier, a network slice corresponding to the message to be forwarded, and accuracy and efficiency of determining the network slice are improved.
Step S304, according to the destination address, obtaining the first identifier of the output interface for forwarding the message to be forwarded from the forwarding table entry.
Step S305, according to the target slice identifier and the first identifier, obtaining a second identifier of the sub-interface corresponding to the target slice identifier and the first identifier from the interface-slice identifier mapping table.
Step S306, the message to be forwarded is forwarded through the subinterface indicated by the second identifier.
The above steps S304 to S306 are the same as the above steps S202 to S204.
In another optional embodiment, when the network node is an ingress node, according to the method shown in fig. 2, the embodiment of the present application further provides a packet forwarding method. As shown in fig. 5, fig. 5 is a third flowchart illustrating a message forwarding method according to an embodiment of the present application. The method comprises the following steps.
Step S501, SRv6Policy sent by the controller is received; SRv6Policy carries slice ID in the SID list.
In this step, after network slicing SRv6, the controller may determine SRv6Policy for the transmission path corresponding to each network slice, and the slice id for each network slice. At this point, the controller may issue SRv6Policy carrying the slice id to the ingress node of each network slice.
In the embodiment of the present application, the slice id may be carried in SID list of SRv6 Policy.
Each SID in the SID list indicates each node through which a message passes. That is, the SID list may indicate the transmission path of the message transmission.
Step S502, receiving a first IPv6 message.
Step S503, according to the message information of the first IPv6 message, determining the target SRv6Policy of the first IPv6 message.
In this step, after receiving the first IPv6 message, the ingress node may determine, according to the message information of the first IPv6 message, a target SRv6Policy of the first IPv6 message from SRv6Policy issued from the controller.
The target slice identifier may be issued by SRv6Policy, that is, in step S302, the target slice identifier issued by the receiving controller may specifically be represented as:
receiving SRv6Policy issued by a controller aiming at a first IPv6 message; SRv6Policy carries the target slice ID in its transmission path.
Step S504, an outer layer IPv6 header is packaged on the outer layer of the first IPv6 message to obtain a message to be forwarded, the outer layer IPv6 header comprises an IPv6 basic header and an SRH, a target slice identifier in a target SRv6Policy is filled in a source address of the IPv6 basic header, and an SID list in a target SRv6Policy is filled in the SRH.
In this step, after determining a target SRv6Policy corresponding to the first IPv6 message, the ingress node may encapsulate an outer IPv6 header in an outer layer of the first IPv6 message, fill a switching identifier in the target SRv6Policy, that is, a target slice identifier, in a source address of an IPv6 basic header of the outer IPv6 header, fill a SID list in the target SRv6Policy in an SRH of the outer IPv6 header, and obtain a message to be forwarded.
The above steps S503 to S504 are refinements of the above step S202.
Through the steps S501 to S504, after network slicing is performed on SRv6 networks, the ingress node will obtain SRv6Policy corresponding to the network slice and the slice identifier corresponding to each network slice in time, so that after the received first IPv6 packet, the SID list and the target slice identifier are encapsulated to the outer IPv6 header to obtain a packet to be forwarded, which is convenient for the intermediate node to forward the packet to be forwarded in the later stage.
Step S505, according to the destination address, obtaining a first identifier of an egress interface for forwarding the packet to be forwarded from the forwarding table entry.
Step S506, according to the target slice identifier and the first identifier, obtaining a second identifier of the sub-interface corresponding to the target slice identifier and the first identifier from the interface-slice identifier mapping table.
And step S507, forwarding the message to be forwarded through the subinterface indicated by the second identifier.
The above-described steps S505 to S507 are the same as the above-described steps S203 to S205.
In an optional embodiment, after encapsulating the target slice identifier to the source address of the IPv6 basic header included in the outer IPv6 header, in order to facilitate the intermediate node to accurately identify that the received packet is a to-be-forwarded packet carrying the target slice identifier at a later stage, the outer IPv6 header of the to-be-forwarded packet may carry preset identifier information, where the identifier information is used to indicate that the source address of the IPv6 basic header included in the outer IPv6 header is filled with the target slice identifier.
In an alternative embodiment, the ingress node may add the above-mentioned identification information in the communication classification field of the IPv6 basic header included in the outer IPv6 header of the packet to be forwarded.
For the sake of understanding, the above-mentioned outer IPv6 header in fig. 4-a is still used as an example for description.
The outer IPv6 header shown in fig. 4-a includes 8-bit (bit) storage space in the traffic classification field of the IPv6 base header. In two known communication standards, Differential Service Code Points (DSCPs) for Differentiated Services are stored in bits 1 to 6 (i.e., bits 0 to 5) of a communication classification field, and Explicit Congestion Control (ECN) for Transmission Control Protocol (TCP) Congestion Control is stored in bits 7 to 8 (i.e., bits 6 to 7).
In this embodiment, most of the network nodes are devices such as routers. In a router or the like, the 7 th bit to the 8 th bit of the communication classification field are not used, that is, the values of the 7 th bit to the 8 th bit are null or do not have any meaning of a preset value. At this time, after encapsulating the target slice identifier to the source address of the IPv6 basic header included in the outer IPv6 header, the ingress node may add the identifier information to the 7 th bit and/or the 8 th bit of the communication classification field of the IPv6 basic header included in the outer IPv6 header. For example, the ingress node may place bit 7 and/or bit 8, etc. of the traffic classification field of the IPv6 base header included in the outer IPv6 header.
In another alternative embodiment, the ingress node may add the above-mentioned identification information in the flow label field of the IPv6 base header included in the outer layer IPv6 header.
For the sake of understanding, the outer IPv6 header shown in fig. 4-a is still used as an example for description.
In the IPv6 basic header included in the outer IPv6 header shown in fig. 4-a, the flow label field may or may not have bits to which identification information can be added.
When there are bits in the flow label field to which the identification information can be added, the ingress node may add the identification information in the flow label field by referring to the above-mentioned manner of adding the identification information in the traffic classification field, which is not specifically described herein.
When the flow label field does not have a bit to which identification information can be added, the entry node may modify the value of some bits in the flow label field that do not affect the transmission or processing of the later packet to a value corresponding to the identification information.
In the embodiment of the present application, the position where the identification information is added in the header of the outer IPv6 and the adding manner are not particularly limited.
In an optional embodiment, when the network node is an intermediate node, according to the method shown in fig. 2, the embodiment of the present application further provides a packet forwarding method. As shown in fig. 6, fig. 6 is a fourth flowchart illustrating a message forwarding method according to an embodiment of the present application. The method comprises the following steps.
Step S601, receiving the second IPv6 message forwarded by the previous-hop node.
Step S602, if the outer IPv6 header of the second IPv6 message carries identification information, determining the second IPv6 message as a message to be forwarded; the identification information is used to indicate that the source address of the IPv6 basic header included in the outer IPv6 header is filled with the target slice identification.
In this embodiment, after receiving the second IPv6 message, the intermediate node may determine whether the outer IPv6 header of the second IPv6 message carries the preset identification information. When the outer IPv6 header of the second IPv6 message carries the identification information, the intermediate node may determine to forward the message to be forwarded through the network slice. At this time, the intermediate node may determine the second IPv6 message as a message to be forwarded.
The above steps S601 to S602 are refinements of the above step S201.
Step S603, obtaining a first identifier of an egress interface for forwarding the packet to be forwarded from the forwarding table entry according to the destination address.
Step S604, according to the target slice identifier and the first identifier, obtaining a second identifier of the sub-interface corresponding to the target slice identifier and the first identifier from the interface-slice identifier mapping table.
Step S605, forward the packet to be forwarded through the sub-interface indicated by the second identifier.
The above-described steps S603 to S605 are the same as the above-described steps S203 to S205.
In an optional embodiment, after receiving the second IPv6 packet, the intermediate node may determine that the second IPv6 packet is not forwarded through the network slice if the packet header of the second IPv6 packet does not carry the identifier information. At this time, the intermediate node may forward the second IPv6 message according to the forwarding table.
In this embodiment, after receiving the second IPv6 message, the intermediate node determines whether the received second IPv6 message is a to-be-forwarded message that is forwarded through a network slice by determining whether the outer IPv6 header of the second IPv6 message carries identification information, so that the to-be-forwarded message is forwarded by using the network slice, and therefore, it is ensured that service messages of different users can be transmitted in different network slices, and safety and transmission quality of service messages of different users transmitted by using different network slices are ensured.
In an optional embodiment, according to the method shown in fig. 2, an embodiment of the present application further provides a message forwarding method. As shown in fig. 7, fig. 7 is a sixth flowchart illustrating a message forwarding method according to an embodiment of the present application. The method comprises the following steps.
Step S701, receiving a first instruction, where the first instruction is used to instruct to perform division processing on a target interface of a network node.
In this step, the control plane may send a first instruction to the network node, where the first instruction instructs to partition a target interface of the network node. At this point, the network node will receive the first instruction.
Step S702, dividing the target interface into a plurality of sub-interfaces based on the first instruction.
Step S703 is to receive a second instruction, where the second instruction includes a slice identifier allocated to each subinterface.
In this step, the control plane may send a second instruction to the network node, where the second instruction includes a slice identifier allocated to each sub-interface divided by the target interface in the network node. At this point, the network node will receive the second instruction.
Step S704, based on the second instruction, an interface identifier of the target interface, an interface identifier corresponding to each sub-interface, and a mapping table between slice identifiers corresponding to each sub-interface are constructed to obtain an interface-slice identifier mapping table.
In this step, the network node may construct, according to the slice identifier included in the received second instruction, an interface identifier of the target interface, an interface identifier corresponding to each sub-interface included in the target interface, and a mapping table between slice identifiers corresponding to each sub-interface, to obtain an interface-slice identifier mapping table.
In this embodiment, after the network node constructs and obtains the interface-slice identifier mapping table, the network node may store the interface-slice identifier mapping table.
Through the above steps S701 to S704, the network node may divide SRv6 network into a plurality of network slices according to the first instruction, and construct an interface-slice identifier mapping table according to the second instruction, so as to facilitate the forwarding of a forwarding packet to be expected later.
Step S705, obtaining a message to be forwarded; the message to be forwarded comprises a destination address and a target slice identifier.
Step S706, according to the destination address, a first identifier of an output interface for forwarding the message to be forwarded is obtained from the forwarding table entry.
Step S707, according to the target slice identifier and the first identifier, obtaining a second identifier of the sub-interface corresponding to the target slice identifier and the first identifier from the interface-slice identifier mapping table.
Step S708, the message to be forwarded is forwarded through the subinterface indicated by the second identifier.
The above steps S705 to S708 and the above steps S201 to S204.
For ease of understanding, the above message forwarding process is described below with reference to fig. 8 and 9. Fig. 8 is a signaling diagram of a message forwarding process according to an embodiment of the present application. Fig. 9 is a schematic diagram of a network slice according to an embodiment of the present application. In the network slice shown in fig. 8, there are three transmission paths as shown in fig. 1-b above between every two neighboring nodes.
Step S801, the ingress node receives the first IPv6 message.
In the network slice shown in FIG. 9, 10 nodes are included, node D0-node D9. Wherein the entry node is D0, and the destination node is D9. In the message forwarding process, the D0 receives a first IPv6 message.
Now assume that the SID is planned as: a: A: A: K: wherein the Common prefix (Common prefix) is: a, and K are node numbers of the nodes. At this time, in the entry node shown in fig. 9, the SID configuration is as shown in table 3.
TABLE 3
In table 3, X denotes a certain interface on node D0, where END denotes the SID of a certain node and end.x denotes the SID of a link between two nodes.
Step S802, the controller obtains the message information of the first IPv6 message received by the ingress node, and determines SRv6Policy for the first IPv6 message.
In the controller, SRv6Policy between ingress node D0 and destination node D9 is shown in table 4.
TABLE 4
In table 4, there are 3 messages transmitted from the node D0 to SRv6Policy corresponding to the node D9, that is, D0-D9-Slice1, D0-D9-Slice2, and D0-D9-Slice3 in table 4. Wherein the SID lists of D0-D9-Slice2 and D0-D9-Slice3 are not shown in detail. Each SRv6Policy is stored in a corresponding Slice identifier, e.g., 1 for Slice identifiers D0-D9-Slice 1.
After the node D0 receives the first IPv6 message, the controller may determine SRv6Policy for the first IPv6 message, such as D0-D9-Slice1 shown in table 4.
In step S803, the controller issues SRv6Policy carrying the target slice id of the network slice to the ingress node.
In fig. 9, the controller issues the above D0-D9-Slice1 to the node D0, where the node D0-D9-Slice1 carries the Slice identifier 1.
Step S804, the ingress node receives SRv6Policy of the controller for the first IPv6 message.
Step S805, when the ingress node performs packet steering by using the received SRv6Policy, the ingress node encapsulates the target slice identifier carried in the SRv6Policy to the lower 16 bits of the source address of the IPv6 basic header included in the outer IPv6 header of the first IPv6 packet, so as to obtain the packet to be forwarded.
In FIG. 9, the node D0 adds the Slice identifier 1 carried in the D0-D9-Slice1 to the lower 16 bits of the source address of the IPv6 basic header included in the outer IPv6 header, i.e. the bits corresponding to the End A: A: A: A:0: 9: 0-A: A: A:0: 9: FFFF shown in the above Table 3.
The ingress node may add, while encapsulating the target slice identifier to the lower 16 bits of the source address of the IPv6 basic header included in the outer IPv6 header of the first IPv6 packet, identification information indicating that the lower 16 bits of the source address are the target slice identifier in the IPv6 basic header of the outer IPv6 header of the first IPv6 packet.
Step S806, the ingress node searches the first identifier of the egress interface of the next hop in the forwarding table entry according to the destination address in the packet to be forwarded.
According to the SID configured in table 3, the next hop corresponding to the node D0 may be the node D1 or the node D5. Thus, according to Table 3, when the destination address in the message to be forwarded is end.X A: A: A: A:0:1, the next hop is node D1, at which time the first identifier of the outgoing interface is 0/1/0; when the destination address in the message to be forwarded is end.X A: A: A: A:0:2, the next hop is node D5, and the first identifier of the outgoing interface is 0/1/1.
Step S807, the entry node obtains the data in the low 16 bits of the source address of the IPv6 basic header included in the outer IPv6 header of the message to be forwarded, so as to obtain the target slice identifier.
According to the End A of the outer IPv6 header of the message to be forwarded, A: A: A:0: 9: 0-A: A: A:0: 9: FFFF, the value 1 stored in the 16 bits is determined by the node D0 to be 1.
Step S808, the ingress node identifies, according to a pre-stored interface-slice identifier mapping table, a second identifier of a sub-interface corresponding to the target slice identifier in the plurality of sub-interfaces corresponding to the first identifier of the egress interface.
The above-described pre-stored interface-slice id mapping table is shown in table 5.
TABLE 5
According to the mapping table shown in table 5, when the first identifier of the outgoing interface is 0/1/0, the identifier of the sub-interface corresponding to the target slice identifier 1 is 0/1/0.1 among the sub-interfaces corresponding to 0/1/0, that is, among the sub-interfaces corresponding to 0/1/0.1, 0/1/0.2 and 0/1/0.3 shown in table 5. At this time, the node D0 determines the subinterface labeled 0/1/0.1 as the target subinterface for transmitting the packet to be forwarded. I.e., 0/1/0.1, is the second label.
According to the mapping table shown in table 5, when the first identifier of the outbound interface is 0/1/1, the identifier of the sub-interface corresponding to the target slice identifier 1 is 0/1/1.1 because the sub-interfaces corresponding to 0/1/1, that is, the sub-interfaces corresponding to 0/1/1.1, 0/1/1.2, and 0/1/1.3 shown in table 5, are included. At this time, the node D0 determines the subinterface identified as 0/1/1.1 as the target subinterface for transmitting the packet to be forwarded. That is, 0/1/1.1 is the second label.
Step S809, the ingress node forwards the packet to be forwarded through the sub-interface indicated by the second identifier.
The intermediate node is any forwarding node between the entry node and the destination node in the network slice. Here, the description will be given by taking the intermediate node as the next hop node after the entry node in the network slice, but the description is not limited thereto.
Step S810, the intermediate node receives the packet to be forwarded.
In this step, the outer IPv6 header of the to-be-forwarded packet received by the intermediate node carries the identification information.
Step S811, the intermediate node searches for the third identifier of the next hop outgoing interface in the forwarding table entry according to the destination address in the packet to be forwarded.
Step S812, the intermediate node obtains the data in the low 16 bits of the source address of the IPv6 basic header included in the outer IPv6 header of the packet to be forwarded, to obtain the target slice identifier.
In step S813, the intermediate node obtains a fourth identifier of the sub-interface corresponding to the target slice identifier and the third identifier from the interface-slice identifier mapping table.
Step S814, the intermediate node forwards the message to be forwarded through the sub-interface indicated by the fourth identifier.
In this step, the next hop node is a next hop node after the intermediate node in the network slice. The next-hop node may be an intermediate node or a destination node. Here, the next hop node is not particularly limited.
In the embodiment shown in fig. 8, only the entry node in the network slice and the next network node (i.e., the intermediate node) corresponding to the entry node are taken as examples for description. When the network slice further includes other network nodes, the network node shown in fig. 8 may be referred to perform packet forwarding on the forwarding process of the packet to be forwarded, and here, the forwarding processes of the packet to be forwarded by the other network nodes in the network slice are not specifically described.
Based on the same inventive concept, according to the message forwarding method provided in the embodiment of the present application, the embodiment of the present application further provides a message forwarding apparatus. As shown in fig. 10, fig. 10 is a schematic structural diagram of a message forwarding apparatus provided in this embodiment. The device is applied to a network node and specifically comprises the following modules.
A first obtaining module 1001, configured to obtain a packet to be forwarded; the message to be forwarded comprises a destination address and a target slice identifier;
a second obtaining module 1002, configured to obtain, according to the destination address, a first identifier of an egress interface for forwarding the packet to be forwarded from the forwarding table entry;
a third obtaining module 1003, configured to obtain, according to the target slice identifier and the first identifier, a second identifier of the sub-interface corresponding to the target slice identifier and the first identifier from the interface-slice identifier mapping table;
a forwarding module 1004, configured to forward the packet to be forwarded through the sub-interface indicated by the second identifier.
Optionally, the message forwarding apparatus may further include:
the first receiving module is used for receiving a first IPv6 message before acquiring the message to be forwarded if the network node is an entrance node;
the sending module is used for sending message information of the first IPv6 message to the controller;
the second receiving module is used for receiving the target slice identifier issued by the controller according to the message information;
the first obtaining module 1001 may be specifically configured to encapsulate an outer IPv6 header in an outer layer of the first IPv6 message to obtain a to-be-forwarded message, where the outer IPv6 header includes an IPv6 basic header, and a source address of the IPv6 basic header is filled with a target slice identifier.
Optionally, the message forwarding apparatus may further include:
a third receiving module, configured to receive SRv6Policy sent by the controller before obtaining the packet to be forwarded if the network node is an ingress node; SRv6Policy carries slice ID in SID list;
the fourth receiving module is used for receiving the first IPv6 message;
the first obtaining module 1001 may be specifically configured to determine a target SRv6Policy of the first IPv6 packet according to the packet information of the first IPv6 packet; and encapsulating an outer layer IPv6 header in the outer layer of the first IPv6 message to obtain a message to be forwarded, wherein the outer layer IPv6 header comprises an IPv6 basic header and an SRH, a source address of the IPv6 basic header is filled with a target slice identifier in a target SRv6Policy, and the SRH is filled with an SID list in a target SRv6 Policy.
Optionally, the outer IPv6 header of the to-be-processed packet includes an IPv6 basic header, and a communication classification field or a flow label field of the IPv6 basic header carries identification information;
if the network node is an intermediate node, the first obtaining module 1001 may be specifically configured to receive a second IPv6 message forwarded by the previous-hop node; if the outer layer IPv6 head of the second IPv6 message carries identification information, determining the second IPv6 message as a message to be forwarded; the identification information is used to indicate that the source address of the IPv6 basic header included in the outer IPv6 header is filled with the target slice identification.
Optionally, the message forwarding apparatus may further include:
a fifth receiving module, configured to receive a first instruction before obtaining the packet to be forwarded, where the first instruction is used to instruct a target interface of a network node to be divided;
the dividing module is used for dividing the target interface into a plurality of sub-interfaces based on the first instruction;
a sixth receiving module, configured to receive a second instruction, where the second instruction includes a slice identifier allocated to each subinterface;
and the construction module is used for constructing the interface identifier of the target interface, the interface identifier corresponding to each sub-interface and a mapping table between the slice identifiers corresponding to each sub-interface based on the second instruction to obtain an interface-slice identifier mapping table.
By the device provided by the embodiment of the application, after acquiring a to-be-forwarded message including a destination address and a target slice identifier, a network node acquires a first identifier of an output interface for forwarding the to-be-forwarded message according to the destination address, so as to acquire a second identifier of a sub-interface corresponding to the target slice identifier and the first identifier from an interface-slice identifier mapping table according to the first identifier and the target slice identifier, and forward the to-be-forwarded message through the sub-interface indicated by the second identifier.
Compared with the prior art that a large amount of information distribution and path calculation are required, in the technical scheme provided in the embodiment of the present application, after determining the outgoing interface of the packet to be forwarded, the network node determines the sub-interface corresponding to the packet to be forwarded directly according to the pre-stored interface-slice identifier mapping table, and does not need to rely on the forwarding channel included in the forwarding table, that is, the control plane does not need to perform information distribution and route calculation according to the corresponding relationship between the outgoing interface and the plurality of sub-interfaces corresponding to the outgoing interface in the information distribution and path calculation process, which effectively reduces the overhead required by the control plane for performing information distribution and route calculation.
Based on the same inventive concept, according to the message forwarding method provided in the embodiment of the present application, the embodiment of the present application further provides a network node, as shown in fig. 11, including a processor 1101 and a machine-readable storage medium 1102, where the machine-readable storage medium 1102 stores machine-executable instructions that can be executed by the processor 1101. The processor 1101 is caused by machine executable instructions to implement any of the steps shown in fig. 2-3 and fig. 5-8 described above.
In an optional embodiment, as shown in fig. 11, the network node may further include: a communication interface 1103 and a communication bus 1104; the processor 1101, the machine-readable storage medium 1102 and the communication interface 1103 complete mutual communication through the communication bus 1104, and the communication interface 1103 is used for communication between the network node and other devices.
Based on the same inventive concept, according to the message forwarding method provided in the embodiment of the present application, an embodiment of the present application further provides a machine-readable storage medium, where a machine-executable instruction capable of being executed by a processor is stored in the machine-readable storage medium. The processor is caused by machine executable instructions to implement any of the steps shown in fig. 2-3 and 5-8 described above.
Based on the same inventive concept, according to the message forwarding method provided in the embodiment of the present application, the embodiment of the present application further provides a computer program product, which, when running on a computer, causes the computer to execute any one of the steps shown in fig. 2 to 3 and fig. 5 to 8.
The communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
The machine-readable storage medium may include a RAM (Random Access Memory) and a NVM (Non-Volatile Memory), such as at least one disk Memory. Additionally, the machine-readable storage medium may be at least one memory device located remotely from the aforementioned processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also DSPs (Digital Signal Processing), ASICs (Application Specific Integrated circuits), FPGAs (Field Programmable Gate arrays) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
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, for embodiments of the message forwarding apparatus, the network node, the machine-readable storage medium, and the computer program product, the description is relatively simple due to the embodiment of the message forwarding method, and relevant points can be referred to part of the description of the embodiment of the message forwarding method.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims (10)
1. A message forwarding method is applied to a network node, and the method comprises the following steps:
acquiring a message to be forwarded; the message to be forwarded comprises a destination address and a target slice identifier;
acquiring a first identifier of an output interface for forwarding the message to be forwarded from a forwarding table entry according to the destination address;
acquiring a second identifier of a sub-interface corresponding to the target slice identifier and the first identifier from an interface-slice identifier mapping table according to the target slice identifier and the first identifier;
and forwarding the message to be forwarded through the subinterface indicated by the second identifier.
2. The method according to claim 1, wherein if the network node is an ingress node, before obtaining the packet to be forwarded, the method further comprises:
receiving a first internet protocol version 6 IPv6 message;
sending message information of the first IPv6 message to a controller;
receiving a target slice identifier issued by the controller according to the message information;
the step of obtaining the message to be forwarded includes:
and encapsulating an outer layer IPv6 header on the outer layer of the first IPv6 message to obtain a message to be forwarded, wherein the outer layer IPv6 header comprises an IPv6 basic header, and a source address of the IPv6 basic header is filled with the target slice identifier.
3. The method according to claim 1, wherein if the network node is an ingress node, before obtaining the packet to be forwarded, the method further comprises:
receiving an internet protocol version 6 routing strategy SRv6Policy sent by the controller; the segment routing identifier SID list of the SRv6Policy carries slice identifiers;
receiving a first internet protocol version 6 IPv6 message;
the step of obtaining the message to be forwarded includes:
determining a target SRv6Policy of the first IPv6 message according to the message information of the first IPv6 message;
and encapsulating an outer layer IPv6 header in the outer layer of the first IPv6 message to obtain a message to be forwarded, wherein the outer layer IPv6 header comprises an IPv6 basic header and a segmented routing header SRH, a source address of the IPv6 basic header is filled with a target slice identifier in the target SRv6Policy, and the SRH is filled with a SID list in the target SRv6 Policy.
4. The method according to any one of claims 1 to 3, wherein the outer IPv6 header of the packet to be processed includes an IPv6 basic header, and the traffic classification field or the flow label field of the IPv6 basic header carries identification information;
if the network node is an intermediate node, the step of obtaining the message to be forwarded includes:
receiving a second IPv6 message forwarded by the previous hop node;
if the outer layer IPv6 header of the second IPv6 message carries the identification information, determining the second IPv6 message as a message to be forwarded; the identification information is used for indicating that the target slice identification is filled in the source address of the IPv6 basic header included in the outer IPv6 header.
5. The method of claim 1, wherein prior to obtaining the packet to be forwarded, the method further comprises:
receiving a first instruction, wherein the first instruction is used for instructing the division processing of a target interface of the network node;
dividing the target interface into a plurality of sub-interfaces based on the first instruction;
receiving a second instruction, wherein the second instruction comprises a slice identifier allocated to each subinterface;
and constructing an interface identifier of the target interface, an interface identifier corresponding to each sub-interface and a mapping table between slice identifiers corresponding to each sub-interface based on the second instruction to obtain an interface-slice identifier mapping table.
6. A packet forwarding apparatus, applied to a network node, the apparatus comprising:
the first acquisition module is used for acquiring the message to be forwarded; the message to be forwarded comprises a destination address and a target slice identifier;
a second obtaining module, configured to obtain, according to the destination address, a first identifier of an egress interface for forwarding the to-be-forwarded packet from a forwarding table entry;
a third obtaining module, configured to obtain, according to the target slice identifier and the first identifier, a second identifier of a sub-interface corresponding to the target slice identifier and the first identifier from an interface-slice identifier mapping table;
and the forwarding module is used for forwarding the message to be forwarded through the subinterface indicated by the second identifier.
7. The apparatus of claim 6, further comprising:
a first receiving module, configured to receive a first internet protocol version 6 IPv6 message before acquiring a message to be forwarded if the network node is an ingress node;
the sending module is used for sending the message information of the first IPv6 message to a controller;
the second receiving module is used for receiving the target slice identifier issued by the controller according to the message information;
the first obtaining module is specifically configured to encapsulate an outer IPv6 header on an outer layer of the first IPv6 message to obtain a to-be-forwarded message, where the outer IPv6 header includes an IPv6 basic header, and a source address of the IPv6 basic header is filled with the target slice identifier.
8. The apparatus of claim 6, further comprising:
a third receiving module, configured to receive, before obtaining the packet to be forwarded, an internet protocol version 6 routing Policy SRv6Policy issued by the controller if the network node is an ingress node; the segment routing identifier SID list of the SRv6Policy carries slice identifiers;
a fourth receiving module, configured to receive a first internet protocol version 6 IPv6 message;
the first obtaining module is specifically configured to determine, according to the message information of the first IPv6 message, a target SRv6Policy of the first IPv6 message; and encapsulating an outer layer IPv6 header in the outer layer of the first IPv6 message to obtain a message to be forwarded, wherein the outer layer IPv6 header comprises an IPv6 basic header and a segmented routing header SRH, a source address of the IPv6 basic header is filled with a target slice identifier in the target SRv6Policy, and the SRH is filled with a SID list in the target SRv6 Policy.
9. The apparatus according to any of claims 6-8, wherein the outer IPv6 header of the packet to be processed includes an IPv6 basic header, and the traffic classification field or the flow label field of the IPv6 basic header carries identification information;
if the network node is an intermediate node, the first obtaining module is specifically configured to receive a second IPv6 message forwarded by a previous-hop node; if the outer layer IPv6 header of the second IPv6 message carries the identification information, determining the second IPv6 message as a message to be forwarded; the identification information is used for indicating that the target slice identification is filled in the source address of the IPv6 basic header included in the outer IPv6 header.
10. The apparatus of claim 6, further comprising:
a fifth receiving module, configured to receive a first instruction before obtaining a packet to be forwarded, where the first instruction is used to instruct a target interface of the network node to be divided;
a dividing module, configured to divide the target interface into a plurality of sub-interfaces based on the first instruction;
a sixth receiving module, configured to receive a second instruction, where the second instruction includes a slice identifier allocated to each subinterface;
and the construction module is used for constructing the interface identifier of the target interface, the interface identifier corresponding to each sub-interface and a mapping table between the slice identifiers corresponding to each sub-interface based on the second instruction to obtain an interface-slice identifier mapping table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111170596.6A CN113923161B (en) | 2021-10-08 | 2021-10-08 | Message forwarding method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111170596.6A CN113923161B (en) | 2021-10-08 | 2021-10-08 | Message forwarding method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113923161A true CN113923161A (en) | 2022-01-11 |
CN113923161B CN113923161B (en) | 2023-08-22 |
Family
ID=79238370
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111170596.6A Active CN113923161B (en) | 2021-10-08 | 2021-10-08 | Message forwarding method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113923161B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024012316A1 (en) * | 2022-07-11 | 2024-01-18 | 中国移动通信有限公司研究院 | Packet processing method and device, network node and storage medium |
WO2024055682A1 (en) * | 2022-09-14 | 2024-03-21 | 华为技术有限公司 | Message processing method and apparatus |
US20240106749A1 (en) * | 2020-03-17 | 2024-03-28 | Huawei Technologies Co., Ltd. | Packet processing method and apparatus, device, and storage medium |
WO2024093286A1 (en) * | 2022-11-04 | 2024-05-10 | 华为技术有限公司 | Method and apparatus for processing slice configuration information |
WO2024119935A1 (en) * | 2022-12-07 | 2024-06-13 | 中兴通讯股份有限公司 | Data collection methods, and electronic device and computer-readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111835637A (en) * | 2019-04-15 | 2020-10-27 | 华为技术有限公司 | Data processing method based on SRv6 and related network equipment |
CN112491713A (en) * | 2019-09-11 | 2021-03-12 | 华为技术有限公司 | Data transmission control method and device |
US20210084009A1 (en) * | 2018-05-25 | 2021-03-18 | Huawei Technologies Co., Ltd. | Route generation method and device |
CN113055202A (en) * | 2019-12-26 | 2021-06-29 | 华为技术有限公司 | Method, device and system for transmitting data message |
CN113411834A (en) * | 2020-03-17 | 2021-09-17 | 华为技术有限公司 | Message processing method, device, equipment and storage medium |
CN113411258A (en) * | 2021-06-07 | 2021-09-17 | 新华三技术有限公司 | Message processing method and device |
-
2021
- 2021-10-08 CN CN202111170596.6A patent/CN113923161B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210084009A1 (en) * | 2018-05-25 | 2021-03-18 | Huawei Technologies Co., Ltd. | Route generation method and device |
CN111835637A (en) * | 2019-04-15 | 2020-10-27 | 华为技术有限公司 | Data processing method based on SRv6 and related network equipment |
CN112491713A (en) * | 2019-09-11 | 2021-03-12 | 华为技术有限公司 | Data transmission control method and device |
CN113055202A (en) * | 2019-12-26 | 2021-06-29 | 华为技术有限公司 | Method, device and system for transmitting data message |
CN113411834A (en) * | 2020-03-17 | 2021-09-17 | 华为技术有限公司 | Message processing method, device, equipment and storage medium |
CN113411258A (en) * | 2021-06-07 | 2021-09-17 | 新华三技术有限公司 | Message processing method and device |
Non-Patent Citations (1)
Title |
---|
石鸿伟;黄凤芝;: "基于SRv6的网络切片技术研究", 电子技术与软件工程, no. 16, pages 27 - 30 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20240106749A1 (en) * | 2020-03-17 | 2024-03-28 | Huawei Technologies Co., Ltd. | Packet processing method and apparatus, device, and storage medium |
WO2024012316A1 (en) * | 2022-07-11 | 2024-01-18 | 中国移动通信有限公司研究院 | Packet processing method and device, network node and storage medium |
WO2024055682A1 (en) * | 2022-09-14 | 2024-03-21 | 华为技术有限公司 | Message processing method and apparatus |
WO2024093286A1 (en) * | 2022-11-04 | 2024-05-10 | 华为技术有限公司 | Method and apparatus for processing slice configuration information |
WO2024119935A1 (en) * | 2022-12-07 | 2024-06-13 | 中兴通讯股份有限公司 | Data collection methods, and electronic device and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113923161B (en) | 2023-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109831382B (en) | Path calculation method, device and equipment | |
US11374848B2 (en) | Explicit routing with network function encoding | |
CN109873760B (en) | Method and device for processing route, and method and device for data transmission | |
KR102139712B1 (en) | Packet processing method and device | |
CN113923161A (en) | Message forwarding method and device | |
KR101445470B1 (en) | Communication available transport network bandwidth to l2 ethernet nodes | |
EP2708001B1 (en) | Label switched routing to connect low power network domains | |
CN110912796B (en) | Communication method, device and system | |
CN107968750B (en) | Message transmission method, device and node | |
CN107770073B (en) | Method, device and system for information synchronization | |
US20210409312A1 (en) | Fault Protection Method, Node, and Storage Medium | |
CN112671641B (en) | Message forwarding method and device | |
CN107317752B (en) | Method and device for forwarding data message | |
CN110324159B (en) | Link configuration method, controller and storage medium | |
CN111147372B (en) | Downlink message sending and forwarding method and device | |
EP4191966A1 (en) | Method and device for processing data message, storage medium, and electronic device | |
EP4024782A1 (en) | Method by which host network performance requirements may be programmed, device and system | |
CN114710975B (en) | Method, base station, network element and device for multi-domain transmission and multi-transmission network context identification | |
CN113726653B (en) | Message processing method and device | |
CN106230730B (en) | Multicast transmission method and device | |
CN110708229A (en) | Method, device and system for receiving and transmitting message | |
CN115348202A (en) | Data transmission method, device and equipment based on network slice and storage medium | |
CN108199960B (en) | Multicast data message forwarding method, entrance routing bridge, exit routing bridge and system | |
WO2022228090A1 (en) | Path learning method and device, service node, and storage medium | |
CN112910791A (en) | Diversion system and method thereof |
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 |