Message forwarding method, device, system and computer readable storage medium

文档序号:1675560 发布日期:2019-12-31 浏览:27次 中文

阅读说明:本技术 报文转发方法、装置、系统和计算机可读存储介质 (Message forwarding method, device, system and computer readable storage medium ) 是由 黄灿灿 伍佑明 陈华南 龚霞 朱永庆 于 2018-06-21 设计创作,主要内容包括:本发明公开了一种报文转发方法、装置、系统和计算机可读存储介质,涉及数据通信领域。报文转发方法包括:服务功能转发器SFF从服务功能链SFC报文的报头中获取熵字段中的熵值,其中,熵值是根据报文对应的流量的传输信息确定的;SFF根据熵值确定报文的转发路径;SFF将报文转发到确定的转发路径上。本发明的实施例可以令同一条流量的报文通过同一路径转发,而不同流量的报文实现负载分担,减少了对特定协议的依赖,提高了流量负载分担的应用广度。(The invention discloses a message forwarding method, a message forwarding device, a message forwarding system and a computer readable storage medium, and relates to the field of data communication. The message forwarding method comprises the following steps: the service function forwarder SFF acquires an entropy value in an entropy field from a header of a service function chain SFC message, wherein the entropy value is determined according to transmission information of flow corresponding to the message; the SFF determines a forwarding path of the message according to the entropy value; and the SFF forwards the message to the determined forwarding path. The embodiment of the invention can make the message with the same flow transmitted through the same path, and the message with different flows realize load sharing, thereby reducing the dependence on a specific protocol and improving the application range of the flow load sharing.)

1. A message forwarding method comprises the following steps:

the method comprises the steps that a Service Function Forwarder (SFF) acquires an entropy value in an entropy field from a header of a Service Function Chain (SFC) message, wherein the entropy value is determined according to transmission information of flow corresponding to the message;

the SFF determines a forwarding path of the message according to the entropy value;

and the SFF forwards the message to the determined forwarding path.

2. The packet forwarding method according to claim 1, wherein the SFF determining the forwarding path of the packet according to the entropy includes:

SFF calculates the remainder of the entropy value after modulus of the number of the equivalent paths;

and the SFF determines the path corresponding to the remainder as the forwarding path of the message.

3. The message forwarding method of claim 1,

the transmission information comprises an IP quintuple; and/or the presence of a gas in the gas,

the header of the SFC message is a network service header NSH header.

4. The message forwarding method according to any one of claims 1 to 3, further comprising:

the SFC classifier performs Hash calculation on the transmission information of the flow to obtain an entropy value;

and the SFC classifier adds the entropy value to an entropy field of an NSH header, wherein the NSH header is positioned in the message of the flow.

5. A service function repeater, comprising:

the device comprises an entropy acquisition module, a processing module and a processing module, wherein the entropy acquisition module is configured to acquire an entropy value in an entropy field from a header of a Service Function Chain (SFC) message, and the entropy value is determined according to transmission information of traffic corresponding to the message;

a forwarding path determination module configured to determine a forwarding path of the packet according to the entropy;

and the message forwarding module is configured to forward the message to the determined forwarding path.

6. The service function repeater according to claim 5, wherein the forwarding path determining module is further configured to calculate a remainder after a number of equivalent paths is modulo by an entropy value, and determine a path corresponding to the remainder as the forwarding path of the packet.

7. The service function repeater according to claim 5 or 6,

the transmission information comprises an IP quintuple; and/or the presence of a gas in the gas,

the header of the SFC message is a network service header NSH header.

8. A message forwarding system, comprising:

the service function repeater of any one of claims 5 to 7; and

the SFC classifier is configured to perform hash calculation on transmission information of traffic, obtain an entropy value, and add the entropy value to an entropy field of an NSH header, wherein the NSH header is located in a message of the traffic.

9. A service function repeater, comprising:

a memory; and

a processor coupled to the memory, the processor configured to perform the message forwarding method of any of claims 1-4 based on instructions stored in the memory.

10. A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, implements the message forwarding method of any one of claims 1 to 4.

Technical Field

The present invention relates to the field of data communications, and in particular, to a method, an apparatus, a system, and a computer-readable storage medium for forwarding a packet.

Background

Existing SFC load sharing is implemented through the entrypy (entropy) label of MPLS. MPLS opens up a label value space specifically for entropy values to select forwarding paths. However, the scheme of implementing SFC load balancing using MPLS entropy labels has the following problems.

(1) The application of entcopy labels in MPLS networks (RFC6790) has been revoked by RFC (7447).

(2) This scheme is only applicable to scenarios where MPLS is used to carry SFC, and the range of usage is too small.

Disclosure of Invention

The embodiment of the invention aims to solve the technical problem that: how to improve the application scope of traffic load sharing.

According to a first aspect of some embodiments of the present invention, there is provided a packet forwarding method, including: the service function forwarder SFF acquires an entropy value in an entropy field from a header of a service function chain SFC message, wherein the entropy value is determined according to transmission information of flow corresponding to the message; the SFF determines a forwarding path of the message according to the entropy value; and the SFF forwards the message to the determined forwarding path.

In some embodiments, the SFF determining the forwarding path of the packet according to the entropy includes: SFF calculates the remainder of the entropy value after modulus of the number of the equivalent paths; and the SFF determines the path corresponding to the remainder as the forwarding path of the message.

In some embodiments, the transport information includes an IP quintuple; and/or the header of the SFC message is a network service header NSH header.

In some embodiments, the packet forwarding method further includes: the SFC classifier performs Hash calculation on the transmission information of the flow to obtain an entropy value; the SFC classifier adds the entropy value to the entropy field of the NSH header, which is located in the message of the traffic.

According to a second aspect of some embodiments of the present invention there is provided a service function forwarder comprising: the device comprises an entropy acquisition module, a processing module and a processing module, wherein the entropy acquisition module is configured to acquire an entropy value in an entropy field from a header of a Service Function Chain (SFC) message, and the entropy value is determined according to transmission information of traffic corresponding to the message; the forwarding path determining module is configured to determine a forwarding path of the message according to the entropy value; and the message forwarding module is configured to forward the message to the determined forwarding path.

In some embodiments, the forwarding path determining module is further configured to calculate a remainder obtained by modulo the number of equivalent paths by the entropy value, and determine a path corresponding to the remainder as the forwarding path of the packet.

In some embodiments, the transport information includes an IP quintuple; and/or the header of the SFC message is a network service header NSH header.

According to a third aspect of some embodiments of the present invention, there is provided a packet forwarding system, including: any one of the aforementioned service function forwarders; and the SFC classifier is configured to perform hash calculation on the transmission information of the flow, obtain an entropy value and add the entropy value to an entropy field of an NSH header, wherein the NSH header is positioned in the message of the flow.

According to a fourth aspect of some embodiments of the present invention there is provided a service function repeater comprising: a memory; and a processor coupled to the memory, the processor configured to perform any of the foregoing message forwarding methods based on instructions stored in the memory.

According to a fifth aspect of some embodiments of the present invention, there is provided a computer readable storage medium having a computer program stored thereon, wherein the program is configured to implement any one of the message forwarding methods when executed by a processor.

Some embodiments of the above invention have the following advantages or benefits: the embodiment of the invention can make the message with the same flow transmitted through the same path, and the message with different flows realize load sharing, thereby reducing the dependence on a specific protocol and improving the application range of the flow load sharing.

Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.

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 for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.

Fig. 1 is an exemplary flow diagram of a message forwarding method according to some embodiments of the invention.

Fig. 2 is an exemplary flow chart of a message forwarding method according to further embodiments of the present invention.

FIG. 3 is an exemplary flow chart of an entropy addition method according to some embodiments of the invention.

Fig. 4 is an exemplary block diagram of a message forwarding system according to some embodiments of the invention.

Fig. 5 is an exemplary block diagram of an SFF according to some embodiments of the invention.

Fig. 6 is an exemplary block diagram of an SFF according to further embodiments of the present invention.

Fig. 7 is an exemplary block diagram of an SFF in accordance with still further embodiments of the invention.

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. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses. 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.

The relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.

Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.

In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.

Fig. 1 is an exemplary flow diagram of a message forwarding method according to some embodiments of the invention. As shown in fig. 1, the packet forwarding method of this embodiment includes steps S102 to S

In step S102, a Service Function Forwarder (SFF) obtains an entropy value in an entropy field from a header of a Service Function Chain (SFC) message, where the entropy value is determined according to transmission information of traffic corresponding to the message. The same traffic has the same transmission information.

In some embodiments, the transport information may include, for example, an IP five-tuple, i.e., source IP address, destination IP address, source MAC address, destination MAC address, port number. Messages with the same IP quintuple can be considered to belong to the same flow.

In some embodiments, the entropy value may be a hash value of the IP quintuple of the packet.

In some embodiments, the header of the SFC message is a Network Service Header (NSH).

In step S104, the SFF determines a forwarding path of the packet according to the entropy.

In step S106, the SFF forwards the packet to the determined forwarding path.

In order to prevent the messages from arriving out of order, the messages of the same flow are prevented from being forwarded through a plurality of different paths as much as possible. Because the entropy is determined according to the transmission information of the flow, the SFF determines the forwarding path of the packet indirectly according to the transmission information of the flow, so that the packet of the same flow is forwarded on the same path. Different traffic flows are distributed to different forwarding paths as much as possible due to different transmission information.

By the method of the embodiment, the message with the same flow can be forwarded through the same path, and the messages with different flows realize load sharing, so that the dependence on a specific protocol is reduced, and the application range of the flow load sharing is improved.

In some embodiments, the SFF may determine the forwarding path of the packet according to the entropy and the number of equivalent paths. An embodiment of the message forwarding method of the present invention is described below with reference to fig. 2.

Fig. 2 is an exemplary flow chart of a message forwarding method according to further embodiments of the present invention. As shown in fig. 2, the message forwarding method of this embodiment includes steps S202 to S208.

In step S202, the SFF obtains an entropy value in an entropy field from a header of the SFC message, where the entropy value is determined according to transmission information of traffic corresponding to the message.

In step S204, the SFF calculates the remainder of the entropy value modulo the number of Equal Cost paths (ECMP). The number of equal cost paths can be obtained from the SFF. In some embodiments, equal cost values are used to label equal cost paths, and paths with the same cost value are equal cost paths. The number of the same cost value on one router is the number of equivalent paths.

In step S206, the SFF determines the path corresponding to the remainder as the forwarding path of the packet. For example, when the entropy value is 15 and the number of equal cost paths is 4, a forwarding path corresponding to a remainder 3 obtained by modulo 4 by 15 may be used as a forwarding path of the packet.

In step S208, the SFF forwards the packet to the determined forwarding path.

By the method of the embodiment, the forwarding path corresponding to the same flow can be determined in a mode of taking a module, so that the application range of flow load sharing is improved.

In some embodiments, an entropy value may be added to the message by an SFC classifier (classifier). An embodiment of the entropy adding method of the invention is described below with reference to fig. 3.

FIG. 3 is an exemplary flow chart of an entropy addition method according to some embodiments of the invention. As shown in fig. 3, the message forwarding method of this embodiment includes steps S302 to S308.

In step S302, the SFC classifier performs hash calculation on the transmission information of the traffic to obtain an entropy value. In some embodiments, the entropy value may be obtained by hashing the IP quintuple.

In step S304, the SFC classifier adds the entropy value to the entropy field of the NSH header, where the NSH header is located in the packet of the traffic. In some embodiments, the SFC classifier may add an entropy field to the header of the NSH to store the entropy value, for example, a 20-bit field may be added.

The SFC classifier is used to identify network traffic and assign the network traffic to different SFCs. The SFC classifier may operate on a variety of devices, such as may be located at the head node of the SFC. The SFC classifier may also add a header to the message, which may be of the type NSH header, for example. Therefore, the entropy value can be added to the message by utilizing the time of adding the header by the SFC classifier.

The packet forwarding process in some embodiments of the present invention is described below with reference to two exemplary pieces of traffic information. Let the IP quintuple of flow 1 be { source IP address 1, destination IP address 1, source MAC address 1, destination IP address 1, port number 1}, and the IP quintuple of flow 2 be { source IP address 2, destination IP address 2, source MAC address 2, destination IP address 2, port number 2 }. Both of these different flows need to be handled by SFC X ═ a-B-C.

The SFC X has two load sharing paths, which are:

SFC X1:A-B1-C

SFC X2:A-B2-C

when the message of the flow 1 or the flow 2 is sent from the classifier, it is found that there is no load sharing path when reaching the a, and therefore the flow 1 and the flow 2 both reach the a. When the message of the flow 1 or the flow 2 is sent from A to B, the SFF finds that two sharing paths exist. Thus, SFF modulo 2 the entropy of traffic 1, lets the message go to B1 if the remainder is 0, and to B2 if the remainder is 1. The flow 2 is processed in a similar manner and will not be described herein. When there is enough traffic in the network, the load of B1 and B2 will be very close, thus achieving traffic load sharing.

An embodiment of the message forwarding system of the present invention is described below with reference to fig. 4.

Fig. 4 is an exemplary block diagram of a message forwarding system according to some embodiments of the invention. As shown in fig. 4, the packet forwarding system 40 of this embodiment includes an SFF410 and an SFC classifier 420.

The SFC classifier 420 is configured to perform a hash calculation on the transmission information of the traffic, obtain an entropy value, and add the entropy value to an entropy field of an NSH header, where the NSH header is located in the packet of the traffic.

An embodiment of the SFF of the present invention is described below with reference to fig. 5.

Fig. 5 is an exemplary block diagram of an SFF according to some embodiments of the invention. As shown in fig. 5, the SFF500 of this embodiment includes: an entropy obtaining module 5100, configured to obtain an entropy value in an entropy field from a header of a service function chain SFC message, where the entropy value is determined according to transmission information of traffic corresponding to the message; a forwarding path determining module 5200 configured to determine a forwarding path of the packet according to the entropy; the message forwarding module 5300 is configured to forward the message to the determined forwarding path.

In some embodiments, the forwarding path determining module 5200 is further configured to calculate a remainder obtained by modulo the number of equivalent paths by the entropy value, and determine a path corresponding to the remainder as a forwarding path of the packet.

In some embodiments, the transport information includes an IP quintuple.

In some embodiments, the header of the SFC message is a network service header NSH header.

Fig. 6 is an exemplary block diagram of an SFF according to further embodiments of the present invention. As shown in fig. 6, the SFF600 of this embodiment includes: a memory 610 and a processor 620 coupled to the memory 610, wherein the processor 620 is configured to execute the message forwarding method in any of the foregoing embodiments based on instructions stored in the memory 610.

Memory 610 may include, for example, system memory, fixed non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), and other programs.

Fig. 7 is an exemplary block diagram of an SFF in accordance with still further embodiments of the invention. As shown in fig. 7, the SFF700 of this embodiment includes: the memory 710 and the processor 720 may further include an input/output interface 730, a network interface 740, a storage interface 750, and the like. These interfaces 730, 740, 750, as well as the memory 710 and the processor 720, may be connected, for example, by a bus 760. The input/output interface 730 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 740 provides a connection interface for various networking devices. The storage interface 750 provides a connection interface for external storage devices such as an SD card and a usb disk.

An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement any one of the foregoing message forwarding methods.

As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种BGP报文处理方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!