CN107800579B - Full-path detection method, device and system - Google Patents

Full-path detection method, device and system Download PDF

Info

Publication number
CN107800579B
CN107800579B CN201610782778.1A CN201610782778A CN107800579B CN 107800579 B CN107800579 B CN 107800579B CN 201610782778 A CN201610782778 A CN 201610782778A CN 107800579 B CN107800579 B CN 107800579B
Authority
CN
China
Prior art keywords
detection
sff
message
hop
local
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610782778.1A
Other languages
Chinese (zh)
Other versions
CN107800579A (en
Inventor
徐晓旸
厉益舟
庄艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610782778.1A priority Critical patent/CN107800579B/en
Publication of CN107800579A publication Critical patent/CN107800579A/en
Application granted granted Critical
Publication of CN107800579B publication Critical patent/CN107800579B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/123Evaluation of link metrics

Landscapes

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

Abstract

The invention discloses a full-path detection method, a device and a system, which are used for adapting to path connectivity detection of a service chain in an SF load balancing mode. The method comprises the steps that a controller generates a change factor for each SF, and sends the change factor corresponding to the SF to an SFF corresponding to the SF, wherein the change factor is used for generating a message number; sending a detection message carrying an initial message number to a first-hop SFF in a service chain, enabling the first-hop SFF to generate a new message number based on the initial message number and a change factor corresponding to a local SF of the first-hop SFF, carrying the new message number in the detection message, and forwarding the detection message carrying the new message number to the local SF to complete the forwarding of the detection message; and receiving the reported detection message carrying the target message number, and obtaining a forwarding path of the detection message based on the target message number and a preset rule to complete full-path detection. Thus, full path detection under a service chain scene can be realized.

Description

Full-path detection method, device and system
Technical Field
The invention relates to the field of computers, in particular to a full-path detection method, a full-path detection device and a full-path detection system.
Background
A Service Function Chain (SFC) defines and instantiates a group of ordered Service Functions (SF) for service flows to pass through, and is also referred to as a service chain (SF) for short, which aims to provide an end-to-end service path for users. The SF may refer to a firewall (firewall), a Network Address Translator (NATs), or other functions of a specific application (application-specific), such as a load balancer. When a message is forwarded from one end of a Service chain to the other end, it needs to pass through a specific Service Path (RSP) composed of a plurality of SFs and their connected Service Function Forwarders (SFFs). Each RSP has a unique Path Identifier (SPI), and as shown in fig. 1, a Service Path diagram of a specific Service chain is shown.
The service chain architecture consists of a control plane, SF, SFF and classifier (classifier). The control plane is mainly responsible for life cycle management, service chain construction, configuration issuing, state management and the like of a service chain, and the functions of the control plane are usually realized by a controller; the classifier identifies the flow of a specific service chain through a flow identification strategy and forwards the flow to a first-hop SFF of the corresponding service chain, and the classifier can be specific service equipment and can also be integrated into network equipment; the SF is responsible for specific business strategy execution and is mainly provided by a business manufacturer; the SFF is responsible for forwarding the traffic identified by the classifier to the local SF and the next-hop SFF according to the service chain rules, mainly provided by the network vendor.
In an existing networking environment, an SF typically consists of traditional hardware devices (e.g., firewalls, load balancers) or software virtualization devices. The performance specification of a single SF device is limited, and when the traffic on the traffic path is too large, the SF is prone to performance bottlenecks. To deal with this problem, the IETF SFC working Group introduces the concept of Service Function Group (SFG). That is, each hop of the traffic path is not necessarily a single SF, and may be an SFG composed of a plurality of SFs of the same type. At this time, the traffic flows through each SF in the SFG in a balanced manner, and when the SF in the SFG reaches the performance threshold, a new SF may be dynamically inserted into the SFG to balance the traffic. This mode is referred to as SF load balancing mode.
Full path probing is an important means for detecting network connectivity, and the connectivity of each path is diagnosed by sending probe messages to all end-to-end paths in the network.
When an SF load balancing mode occurs in a service chain, there are often multiple actual service paths corresponding to one RSP, and it is important to ensure connectivity of all the actual service paths to implement a complete service chain function. Therefore, a need exists to implement full path probing of a traffic chain.
In the existing full-path detection scheme based on an Internet Protocol (IP) network, a controller issues a detection message to a source device, an Access Control List (ACL) is configured for all devices on a path to guide the forwarding of the detection message, and a full-path traversal effect is achieved by issuing different detection messages for different paths and configuring different ACLs. Because the service chain relates to upper layer service forwarding, and the forwarding rule is greatly different from the forwarding rule based on the IP network, the existing full path detection scheme based on the IP network is not suitable, and therefore a full path detection scheme is urgently needed to adapt to path connectivity detection of the service chain in the SF load balancing mode.
Disclosure of Invention
The embodiment of the invention provides a full-path detection method, a device and a system, which are used for adapting to path connectivity detection of a service chain in an SF load balancing mode.
The embodiment of the invention provides the following specific technical scheme:
in a first aspect, the present invention provides a full path detection method, including:
the controller determines a change factor of each service function SF according to a preset rule, and transmits the change factor corresponding to the SF to a service function forwarder SFF corresponding to the SF, wherein the change factor is used for generating a message number; sending a detection message carrying an initial message number to a first-hop SFF in a service chain, enabling the first-hop SFF to generate a new message number based on the initial message number and a change factor corresponding to a local SF of the first-hop SFF, carrying the new message number in the detection message, and forwarding the detection message carrying the new message number to the local SF; and receiving a detection message which carries a target message number and is reported by the target SF or an SFF corresponding to the target SF, and obtaining a forwarding path of the detection message based on the target message number and the preset rule to complete full-path detection.
In this way, the controller configures a variation factor for each SF in the service chain, and sends a detection message carrying an initial message number to a first SFF in the service chain, so that the first-hop SFF generates a new message number based on the initial message number and the variation factor corresponding to the local SF of the first-hop SFF, carries the new message number in the detection message, and forwards the subsequent message, thereby not only effectively controlling the number of the detection messages sent to the service chain by the controller, but also obtaining a forwarding path of the detection message based on the received destination message number, thereby realizing full-path detection, and the method is simple and easy to implement.
In one possible design, the determining, by the controller, the variation factor of each SF according to a preset rule includes the controller generating the variation factor of each SF according to the preset rule, where the preset rule conforms to the following formula:
Figure BDA0001104405550000031
wherein the factormnRepresenting the variation factor corresponding to SF with the logic number n in the mth hop, wherein m and n are positive integers, SfNumiIndicating the number of SFs for the ith hop.
The variation factors generated by the preset rules can ensure that the message numbers in the detection messages corresponding to each SF are different, so that the controller can accurately obtain the forwarding paths of the detection messages according to the target message numbers.
In one possible design, the determining, by the controller, the variation factor of each SF according to a preset rule includes the controller generating the variation factor of each SF according to the preset rule, where the preset rule conforms to the following formula:
Figure BDA0001104405550000041
wherein the factormnRepresents the variation factor corresponding to SF with the logic number n in the mth hop, wherein m and n are positive integers, [ SfNumi]An exponential power of 2 that represents the number of SFs of no less than and closest to the number of SFs of the ith hop.
The change factor regularity value generated by the preset rule can ensure that the message numbers in the detection message corresponding to each SF are different, so that the controller can accurately obtain the forwarding path of the detection message according to the target message number.
In one possible design, the controller determines the variation factor of each SF according to a preset rule, including:
the controller configures a corresponding change factor for each SF in advance, wherein the difference value of the change factors of adjacent SFs is larger than a preset threshold value.
The configured variation factors in the design have great flexibility, and the message numbers in the detection messages corresponding to each SF can be ensured to be different when the difference value of the variation factors of the adjacent SFs is larger than a preset threshold value, so that the controller can accurately obtain the forwarding path of the detection messages according to the target message numbers.
In one possible design, after receiving the destination message number, the controller obtains a forwarding path corresponding to the detection message based on a pre-stored mapping relationship between the destination message number and the forwarding path, thereby completing full-path detection, wherein the mapping relationship between the destination message number and the forwarding path is pre-calculated based on a preset rule, an initial message number, and the forwarding path of the service chain.
In the design, the forwarding path corresponding to the detection message is obtained according to the target message number through the pre-stored mapping relation between the target message number and the forwarding path, and the scheme is simple and convenient to implement.
In a second aspect, a full path detection method is provided, including:
a service function forwarder SFF in a service chain receives a detection message, wherein the detection message carries a message number; determining the last hop equipment of the detection message; when the previous hop device of the detection message is the local SF of the SFF, forwarding the detection message to the next hop SFF; when the last hop device of the detection packet is a controller or another SFF, generating a new packet number for each local SF of the SFF based on the packet number and a variation factor of the local SF, carrying the new packet number in the detection packet, and forwarding the detection packet carrying the new packet number to the local SF.
Therefore, the SFF in the service chain can generate a new message number aiming at each local SF based on the message number carried in the received detection message, and the new message number is carried in the detection message to forward the detection message.
In one possible design, the method further includes:
and when the last hop equipment of the detection message is the target SF, sending the detection message to the controller.
In one possible design, the SFF generating, for each local SF of the SFF, a new packet number based on the packet number and a variation factor of the local SF includes:
and the SFF calculates the sum of the message number and the change factor of the local SF aiming at each local SF of the SFF to obtain the new message number.
In the design, the SFF changes the message number of each local SF according to the original message number and the change factor of each local SF to obtain a new message number, thereby realizing the change of the message number in the forwarding process of the detection message.
In a third aspect, a full path detection system is provided, including: a controller and at least one traffic function forwarder SFF,
the controller is used for determining a change factor of each service function SF according to a preset rule and sending the change factor corresponding to the SF to the SFF corresponding to the SF, wherein the change factor is used for generating a message number; sending a detection message carrying an initial message number to a first-hop SFF in a service chain, enabling the first-hop SFF to generate a new message number based on the initial message number and a change factor corresponding to a local SF of the first-hop SFF, carrying the new message number in the detection message, and forwarding the detection message carrying the new message number to the local SF; receiving a detection message which carries a target message number and is reported by a target SF or an SFF corresponding to the target SF, and obtaining a forwarding path of the detection message based on the target message number and the preset rule to complete full-path detection;
each SFF is used for receiving a detection message, and the detection message carries a message number; determining the last hop equipment of the detection message, and forwarding the detection message to the SFF of the next hop when the last hop equipment of the detection message is the local SF of the SFF; when the last hop device of the detection packet is the controller or another SFF, generating a new packet number for each local SF of the SFF based on the packet number and the variation factor of the local SF, carrying the new packet number in the detection packet, and forwarding the detection packet carrying the new packet number to the local SF.
In a fourth aspect, there is provided a full path detecting apparatus comprising:
the processing unit is used for determining a change factor of each service function SF according to a preset rule and sending the change factor corresponding to the SF to a service function forwarder SFF corresponding to the SF, wherein the change factor is used for generating a message number;
a sending unit, configured to send a detection packet carrying an initial packet number to a first-hop SFF in a service chain, so that the first-hop SFF generates a new packet number based on the initial packet number and a change factor corresponding to a local SF of the first-hop SFF, and forwards the detection packet carrying the new packet number to the local SF;
a receiving unit, configured to receive a detection message carrying a target message number and reported by a target SF or an SFF corresponding to the target SF;
and the processing unit is used for obtaining the forwarding path of the detection message based on the target message number and the preset rule and finishing the full-path detection.
In a fifth aspect, a full path detection apparatus is provided, which is applied to a service function forwarder SFF in a service chain, and includes:
a receiving unit, configured to receive a detection packet, where the detection packet carries a packet number;
a processing unit, configured to determine a previous-hop device of the probe packet;
when the previous hop device of the detection message is the local service function SF of the SFF, forwarding the detection message to the next hop SFF;
when the last hop device of the detection packet is a controller or another SFF, generating a new packet number for each local SF of the SFF based on the packet number and a variation factor of the local SF, carrying the new packet number in the detection packet, and forwarding the detection packet carrying the new packet number to the local SF.
In a sixth aspect, an apparatus is provided, which includes a processor, a memory, a transmitter and a receiver, wherein the memory stores a computer readable program, and the processor controls the transmitter and the receiver by executing the program in the memory, so as to implement the full path detection method according to the first aspect.
In a seventh aspect, an apparatus is provided, which includes a processor, a memory and a receiver, wherein the memory stores a computer readable program, and the processor controls the receiver by executing the program in the memory, so as to implement the full path detection method according to the second aspect.
In an eighth aspect, the present application provides a computer storage medium for storing computer software instructions for the controller according to the first or second aspect, which contains a program designed to execute the method implemented by the controller.
In a ninth aspect, the present application provides a computer storage medium for storing computer software instructions for the SFF of the first and second aspects, which contains a program designed to execute the SFF-implemented method.
Drawings
Fig. 1 is a schematic diagram of a service path of a specific service chain;
FIG. 2 is a flowchart of a full path detection method according to an embodiment of the present invention;
FIG. 3 is a flowchart of a full path detection method according to an embodiment of the present invention;
fig. 4 is a diagram illustrating an example of a specific full path detection of a service chain according to an embodiment of the present invention;
fig. 5 is a diagram illustrating an example of full path detection of a specific service chain according to an embodiment of the present invention;
fig. 6 is a diagram illustrating an example of full path detection of a specific service chain according to an embodiment of the present invention;
FIG. 7 is a block diagram of a full path detection apparatus according to an embodiment of the present invention;
FIG. 8 is a block diagram of a full path probing apparatus in an embodiment of the present invention;
FIG. 9 is a block diagram of another full path detection apparatus in an embodiment of the present invention;
fig. 10 is a block diagram of another full path detection apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly described below with reference to the drawings in the embodiments of the present invention.
Fig. 1 shows an RSP with SPI of 10, which is composed of three SFs, the first hop is SF1, the second hop is SF2, and the third hop is SF3, and SFFs connected to them are SFF1, SFF2, and SFF3, respectively. During actual deployment, SFF1, SFF2 and SFF3 may overlap. When a source device (src) needs to send traffic to a destination device (dst), a classifier identifies that the traffic conforms to a matching policy of the RSP, and then the packet is added with service chain encapsulation and forwarded to an SFF1, all SFFs and SFs forward the packet along the RSP, and after receiving a service chain packet returned by an SF3, an SFF3 of the last hop strips the service chain encapsulation, and sends the original packet to the dst.
Optionally, each SF of the traffic path in fig. 1 is not limited to a single SF, and may be an SFG formed by a plurality of SFs of the same type.
Aiming at the situation that the full-path detection scheme based on the IP network in the prior art cannot be applied to the service chain, the embodiment of the invention provides a full-path detection method, a device and a system so as to adapt to the path connectivity detection of the service chain in the SF load balancing mode. The method and the device are based on the same inventive concept, and because the principles of solving the problems of the method and the device are similar, the implementation of the device and the method can be mutually referred, and repeated parts are not repeated.
Referring to fig. 2, fig. 2 is a flowchart of a full path detection method according to an embodiment of the present invention, where the method is executed by a controller, and the specific process is as follows:
step 21: the controller determines the change factor of each SF according to a preset rule, and sends the change factor corresponding to the SF to the SFF corresponding to the SF, wherein the change factor is used for generating a message number.
Optionally, when the controller configures a change factor for each SF, the change factors corresponding to each SF have no association, and the change factors corresponding to different SFs may be the same or different. The preset rule is determined by the controller, and the controller configures the change factors and then issues the change factors to the SFFs corresponding to the SFs through the configuration surface.
Specifically, when the controller determines the variation factor of each SF according to a preset rule, the following three possible implementations are included:
in a first possible implementation, the controller generates the variation factor for each SF according to a preset rule, where the preset rule conforms to the following formula:
Figure BDA0001104405550000091
wherein m represents the position of the SF hop count in the service chain, n represents the logic number of the SF in the hop count, m and n are positive integers, and the factormnRepresenting the variation factor SfNum corresponding to SF with the logic number n in the mth hop in the service chainiIndicating the number of SFs for the ith hop.
In a second possible implementation, the controller generates the variation factor for each SF according to a preset rule, where the preset rule conforms to the following formula:
Figure BDA0001104405550000092
wherein m represents the position of the SF hop count in the service chain, n represents the logic number of the SF in the hop count, m and n are positive integers, and the factormnRepresents the variation factor corresponding to SF with the logic number n in the mth hop in the service chain, [ SfNumi]Indicates the number of SF not less than the ith hop andthe number of SFs of i hops is nearest to the power of 2.
In a third possible implementation, the generating, by the controller, the change factor of each SF according to a preset rule includes:
the controller configures a corresponding change factor for each SF in advance, wherein the difference value of the change factors of adjacent SFs is larger than a preset threshold value.
It should be noted that, in order to accurately distinguish different service paths, it is necessary to logically number each hop SF in a service path or an SF in each hop SFG, and optionally, when logically numbering is performed on each hop SF or an SF in each hop SFG, renumbering is necessary, for example, the SF in each hop SF or an SF in each hop SFG starts from 0, and is sequentially incremented, and integer value numbering is performed, so that the logical position of the SF at a corresponding hop count can be accurately identified.
Step 22: the controller sends a detection message carrying an initial message number to a first-hop SFF in a service chain, so that the first-hop SFF generates a new message number based on the initial message number and a change factor corresponding to a local SF of the first-hop SFF, and carries the new message number in the detection message, and forwards the detection message carrying the new message number to the local SF.
Therefore, the quantity of the detection messages issued to the service chain by the controller can be effectively controlled, the quantity of the issued detection messages is equal to the quantity of the first-hop SFFs and is far smaller than the quantity of the forwarding paths in the service chain, and the method is simple in scheme and easy to implement.
Optionally, after forwarding the detection packet carrying the new packet number to the local SF by the first-hop SFF, the local SF sends the detection packet to the SFF corresponding to the local SF.
Step 23: and the controller receives a detection message which carries a target message number and is reported by the target SF or an SFF corresponding to the target SF, and obtains a forwarding path of the detection message based on the target message number and the preset rule to complete full-path detection.
Optionally, the controller calculates in advance a mapping relationship between the destination packet number and the forwarding path based on a preset rule, the initial packet number, and the forwarding path of the service chain, so that after receiving the destination packet number, the controller can obtain the forwarding path corresponding to the destination packet based on the mapping relationship between the destination packet number and the forwarding path, thereby completing full path detection.
Referring to fig. 3, fig. 3 is a flowchart of a full path detection method provided in the embodiment of the present invention, where the method is executed by an SFF in a service chain, and a specific flow is as follows:
step 31: and the SFF in the service chain receives a detection message, wherein the detection message carries a message number.
Step 32: and the SFF determines the last hop equipment of the detection message.
Step 33: and when the last hop equipment of the detection message is the local SF of the SFF, forwarding the detection message to the next hop SFF.
Step 34: when the last hop device of the detection packet is a controller or another SFF, generating a new packet number for each local SF of the SFF based on the packet number and a variation factor of the local SF, carrying the new packet number in the detection packet, and forwarding the detection packet carrying the new packet number to the local SF.
Optionally, when detecting that the probe packet is from the destination SF, the SFF sends the probe packet to the controller.
Wherein, the step 32 of the SFF sending the previous hop device of the detection packet includes two situations:
in the first case, the SFF detects that the probe packet is from a previous-hop SFF.
In the second case, the SFF detects that the probe packet is from a controller.
Specifically, when the last-hop device of the detection packet is a controller or another SFF, the SFF calculates, for each local SF of the SFF, a sum of a packet number carried in the detection packet and a variation factor of the local SF, to obtain a new packet number, when the SFF generates, for each local SF of the SFF, a new packet number based on the packet number and the variation factor of the local SF. The change rule of the message number specifically conforms to the following formula (3):
PacketId=PacketId+factor (3)
wherein, the packetId represents the message number, and the factor represents a change factor corresponding to a local SF.
The above formula describes the rule of change of the message number of the SF: the new message number is equal to the original message number received by the SFF plus the corresponding change factor of the SF.
The first embodiment is as follows:
the preset rule of SF adopts the formula (1) in the first possible embodiment described above:
Figure BDA0001104405550000111
wherein: m represents the hop position of the SF in the service chain, m corresponding to the first hop SF is 1, m corresponding to the second hop SF is 2, and so on; n represents the logic number of the SF in the hop number, the logic number of the SF in each hop is sequentially increased from 0, and m and n are positive integers. factormnRepresents the variation factor, SfNum, corresponding to the SF with the logic number n in the mth hop in the service chainiIndicates the number of SFs of the ith hop,
Figure BDA0001104405550000121
representing the product of the number of SFs from hop 1 to hop m-1.
A preset rule of SF represented by formula (1): the SF has a change factor value equal to the product of the number of all SFs preceding the current hop count of the SF multiplied by the logical number of the SF.
The change rule of the message number adopts the formula (3): PacketId + factor
The initial message number of the detection message is marked as BaseId, and the BaseId is 0 under the default condition.
The change rule of the message number represented by formula (3): the new message number value corresponding to the SF is equal to the original message number value plus the change factor value corresponding to the SF.
And the controller adopts a forward reduction mode when reducing the detection message forwarding path. Specifically, the forward reduction rule of the controller is as follows:
the controller generates a target message number value corresponding to each forwarding path of the detection message in advance according to information such as BaseId, a preset rule, service chain topology and the like, stores the corresponding relation between the forwarding path and the target message number locally in the controller, and obtains the forwarding path corresponding to the target message number in the detection message through local search when the controller receives the reported detection message, so that the full-path detection of the service chain is completed.
Fig. 4 is a diagram illustrating an example of full path detection for a specific service chain. The traffic chain in fig. 4 has two hops, the first hop is SFG1 containing 3 SFs, the second hop is SFG2 containing 2 SFs, and the logical number n and the corresponding change factor value of these SFs are marked in fig. 4.
Specifically, the variation factor of each SF is generated by the control according to equation (1). For example, the Factor of variation of SF1 in the first hop10Factor of SF2 in the first hop, 0 ═ 1 × 0111-1, the Factor of SF3 change in the first hop13Factor of SF4 change in the second hop, 1 × 2 ═ 220Factor of SF5 in the second hop, 3 x 021=3*1=3。
The controller firstly sends a probe message with initial PacketId equal to 0 to the SFF1 and the SFF2 of the first hop, after receiving the probe message, the SFF1 changes the PacketId according to the formula (3) and sends the changed PacketId to the corresponding SF, the PacketId of the probe message received by the SF1 is 0+0 and 0, the PacketId of the probe message received by the SF2 is 0+1 and 1, and similarly, the PacketId of the probe message received by the SF3 is 0+ 2; after the SF1, SF2 and SF3 process the detection message, the detection message is sent to the corresponding SFF, namely, the SF1 and SF2 send the processed detection message to SFF1, the SF3 sends the processed detection message to SFF2, and the SFF1 and the SFF2 receive the detection message returned from the corresponding local SF and forward the detection message to the next-hop SFF, namely SFF 3; the SFF3 forwards the probe message sent from the previous-hop SFF to the local SF (i.e., SF4 and SF5) of the SFF3 after receiving the probe message, before forwarding, the PacketId is changed according to formula (3), and finally the SF4 receives three probe messages, where the PacketId is 0,1, 2, and the SF5 receives three probe messages, and the PacketId is 3, 4, 5. SF4 and SF5 are target SFs in a service chain, and report a detection message to the controller, and optionally, SF4 and SF5 send the detection message to SFF3, and SFF3 reports the detection message to the controller; the controller checks the detection result according to a mapping table of pre-calculated forwarding paths and destination message numbers, an example of the mapping table is shown in table 1.
TABLE 1
Route of travel PacketId
SF1==>SF4 0
SF2==>SF4 1
SF3==>SF4 2
SF1==>SF5 3
SF2==>SF5 4
SF3==>SF5 5
For example, if the controller receives probe messages 0,1, and 2 reported by the SFF4, as can be seen from table 1, forwarding paths of SF1 ═ SF4, SF2 ═ SF4, and SF3 ═ SF4 are all connected; if the controller receives the probe messages 3, 4, and 5 reported by the SFF5, as can be seen from table 1, forwarding paths of SF1 ═ SF5, SF2 ═ SF5, and SF3 ═ SF5 are all connected; if the controller receives the probe messages 3 and 4 reported by the SFF5, as can be seen from table 1, paths of SF1 ═ SF5, SF2 ═ SF5 are all connected, and a forwarding path of SF3 ═ SF5 has a fault. Example two:
the preset rule of SF in the first embodiment adopts formula (2) in the second possible implementation manner:
Figure BDA0001104405550000131
the elements in formula (2) are defined by the same formula (1), wherein [ SfNumi]Represents not less than SfNumiAnd SfNumiThe nearest 2 to the power of the exponent.
Fig. 5 is an exemplary diagram of a specific full path detection of a service chain, where the service chain in fig. 5 has two hops, the first hop is SFG1 and includes 3 SFs, and the second hop is SFG2 and includes 2 SFs, and the logic number n and the corresponding change factor value of these SFs are marked in fig. 5. In fig. 5, the change factor value corresponding to SF5 in SFG2 is 4, and the specific service chain full path probing process is the same as that in the first embodiment, and is not described herein again.
Example three:
the preset rule of the SF adopts the third possible implementation manner, as long as the interval of the change factors of the adjacent SFs is set to be large enough, the set value of the change factor needs to be satisfied that the number of the finally generated message is unique, fig. 6 is an exemplary diagram of the full path detection of a specific service chain, the service chain in fig. 6 has two hops in total, the first hop is SFG1 and includes 3 SFs, the second hop is SFG2 and includes 2 SFs, and the logic number n of the SF and the corresponding value of the change factor are marked in fig. 6. Wherein, the value of the SF variation factor does not follow the formula, only the last message number is ensured not to be repeated, and the last message number is (110,120,130,210,220,230). The specific process of detecting the whole path of the service chain is the same as that in the first embodiment, and is not described herein again.
At this time, the mapping table of the forwarding path of the probe packet and the packet number of the service chain is shown in table 2.
TABLE 2
Route of travel PacketId
SF1==>SF4 110
SF2==>SF4 120
SF3==>SF4 130
SF1==>SF5 210
SF2==>SF5 220
SF3==>SF5 230
Example four:
if the forwarding factor of the SF is generated according to the formula (1), a reverse reduction mode is adopted when the controller reduces the forwarding path of the detection message.
The reverse reduction mode of the controller is as follows:
assuming that the total hop number of the forwarding path is m, firstly preprocessing the target message number in the reported detection message, and recording kmThe PacketId is the reported destination message number, the BaseId is the initial message number issued by the controller,then, the logic number n of SF (SF) passing by the detection message at the ith hop is calculated through iterationiAnd i is m, m-1, m-2, …,1, and m is a positive integer.
ni=ki/AMi(i=m,m-1,m-2,…,1)
ki-1=ki%AMi(i=m,m-1,m-2,…,2)
Figure BDA0001104405550000151
Taking fig. 4 as an example, the probing path has two hops in total, i.e. m is 2, and AM1=1, AM 23, 0 base id; after the controller receives the packet with PakectId of 4, k is calculated first24-0-4; then, n and k are calculated iteratively:
n2=k2/AM2=4/3=1,
k1=k2%AM2=4%3=1,
n1=k1%AM1=1/1=1,
from this, it can be inferred that the path corresponding to the probe packet with the PacketId of 4 is n11 (i.e. SF2), n2When the forwarding path of the probe packet corresponding to the PacketId 4 is SF2 (i.e., SF5), the forwarding path is 1 (i.e., SF5)>SF5。
As shown in fig. 7, an embodiment of the present invention provides a full path detection system, including: a controller and at least one SFF, wherein:
the controller is used for determining a change factor of each service function SF according to a preset rule and sending the change factor corresponding to the SF to the SFF corresponding to the SF, wherein the change factor is used for generating a message number; sending a detection message carrying an initial message number to a first-hop SFF in the service chain, enabling the first-hop SFF to generate a new message number based on the initial message number and a change factor corresponding to a local SF of the first-hop SFF, and carrying the new message number in the detection message, and forwarding the detection message carrying the new message number to the local SF; receiving a detection message which carries a target message number and is reported by a target SF or an SFF corresponding to the target SF, and obtaining a forwarding path of the detection message based on the target message number and the preset rule to complete full-path detection;
each SFF is used for receiving a detection message, and the detection message carries a message number; determining the last hop equipment of the detection message, and forwarding the detection message to the SFF of the next hop when the last hop equipment of the detection message is the local SF of the SFF; when the last hop device of the detection packet is the controller or another SFF, generating a new packet number for each local SF of the SFF based on the packet number and the variation factor of the local SF, carrying the new packet number in the detection packet, and forwarding the detection packet carrying the new packet number to the local SF.
Based on the foregoing embodiment, as shown in fig. 7, based on the full path detection method provided in the foregoing embodiment, an embodiment of the present invention provides a full path detection apparatus 700, where the apparatus is configured to execute an execution process of a controller in the foregoing method embodiment, and as shown in fig. 7, the apparatus 700 includes a processing unit 701, a sending unit 702, and a receiving unit 703, where:
a processing unit 701, configured to determine a variation factor of each service function SF according to a preset rule, and send the variation factor corresponding to the SF to an SFF corresponding to the SF, where the variation factor is used to generate a packet number; wherein the SFF may be the apparatus 900 shown in fig. 9 or the device 1000 shown in fig. 10.
A sending unit 702, configured to send a detection packet carrying an initial packet number to a first-hop SFF in a service chain, so that the first-hop SFF generates a new packet number based on the initial packet number and a change factor corresponding to a local SF of the first-hop SFF, and forwards the detection packet carrying the new packet number to the local SF;
a receiving unit 703, configured to receive a detection message carrying a target message number and reported by a target SF or an SFF corresponding to the target SF;
the processing unit 701 is configured to obtain a forwarding path of the detection packet based on the destination packet number and the preset rule, and complete full path detection.
Optionally, when the processing unit 701 determines, according to a preset rule, that the variation factor of each SF includes the variation factor of each SF generated by the controller according to the preset rule, the preset rule conforms to the following formula:
Figure BDA0001104405550000171
wherein the factormnRepresenting the variation factor corresponding to SF with the logic number n in the mth hop, wherein m and n are positive integers, SfNumiIndicating the number of SFs for the ith hop.
Optionally, when the processing unit 701 determines, according to a preset rule, that the variation factor of each SF includes the variation factor of each SF generated by the controller according to the preset rule, the preset rule conforms to the following formula:
Figure BDA0001104405550000172
wherein the factormnRepresents the variation factor corresponding to SF with the logic number n in the mth hop, wherein m and n are positive integers, [ SfNumi]An exponential power of 2 that represents the number of SFs of no less than and closest to the number of SFs of the ith hop.
Optionally, when the processing unit 701 determines the variation factor of each service function SF according to a preset rule, the processing unit is specifically configured to:
and configuring a corresponding change factor for each SF in advance, wherein the difference value of the change factors of the adjacent SFs is larger than a preset threshold value.
It should be noted that, for the functional implementation and the interaction manner of each unit of the apparatus 700 in the embodiment of the present invention, reference may be further made to the description of the related method embodiment, which is not described herein again.
Based on the same inventive concept, an embodiment of the present invention further provides a full path probing apparatus 800, where the apparatus 800 is configured to execute the execution process of the controller in the above method embodiment, as shown in fig. 8, the apparatus 800 includes a processor 801, a memory 802, a transmitter 803, and a receiver 804, where program codes for executing the solution of the present invention are stored in the memory 802, and are used to instruct the processor 801 to execute the full path probing method shown in fig. 2 in cooperation with the transmitter 803 or the receiver 804.
The invention can also solidify the code corresponding to the method shown in fig. 2 into the chip by programming the processor, so that the chip can execute the method shown in fig. 2 when running. As shown in fig. 9, based on the full path detection method provided in the foregoing embodiment, an embodiment of the present invention provides a full path detection apparatus 900, where the apparatus is configured to execute an execution process of an SFF in the foregoing method embodiment, and as shown in fig. 9, the apparatus 900 includes a processing unit 901 and a receiving unit 902, where:
a receiving unit 902, configured to receive a detection packet, where the detection packet carries a packet number;
a processing unit 901, configured to determine a previous-hop device of the probe packet;
when the previous hop device of the detection message is the local service function SF of the SFF, forwarding the detection message to the next hop SFF;
when the last hop device of the detection packet is a controller or another SFF, generating a new packet number for each local SF of the SFF based on the packet number and a variation factor of the local SF, carrying the new packet number in the detection packet, and forwarding the detection packet carrying the new packet number to the local SF.
The controller may be the apparatus 700 shown in fig. 7 or the device 800 shown in fig. 8.
Optionally, the apparatus further comprises:
a sending unit 903, configured to send the probe packet to the controller when a last hop device of the probe packet is a destination SF.
Optionally, when the processing unit 901 generates a new packet number based on the packet number and the variation factor of the local SF for each local SF of the SFF, the processing unit is specifically configured to:
and calculating the sum of the message number and the change factor of the local SF aiming at each local SF of the SFF to obtain the new message number.
The functional implementation and the interaction manner of each unit of the apparatus 900 in the embodiment of the present invention may further refer to the description of the related method embodiment, and are not described herein again.
It should be understood that the division of the units in the above devices 700 and 900 is only a logical division, and the actual implementation can be wholly or partially integrated into one physical entity or can be physically separated. For example, each of the above units may be a processing element separately set up, or may be implemented by being integrated in a certain chip of the controller, or may be stored in a storage element of the controller in the form of program code, and a certain processing element of the controller calls and executes the functions of each of the above units. In addition, the units can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the method or the units above may be implemented by hardware integrated logic circuits in a processor element or instructions in software. The processing element may be a general-purpose processor, such as a Central Processing Unit (CPU), or may be one or more integrated circuits configured to implement the above method, such as: one or more application-specific integrated circuits (ASICs), one or more microprocessors (DSPs), one or more field-programmable gate arrays (FPGAs), etc. Based on the same inventive concept, an embodiment of the present invention further provides a full path probing apparatus 1000, where the apparatus 1000 is configured to perform the SFF execution process in the foregoing method embodiment, as shown in fig. 10, the apparatus 1000 includes a processor 1001, a memory 1002, a receiver 1003 and a transmitter 1004, and program codes for executing the scheme of the present invention are stored in the memory 1002, and are used for instructing the processor 1001 to execute the full path probing method shown in fig. 3 in cooperation with the receiver 1003 and the transmitter 1004
The invention can also solidify the code corresponding to the method shown in fig. 3 into the chip by programming the processor, so that the chip can execute the method shown in fig. 3 when running. It is to be understood that the device 1000 of this embodiment may be configured to implement all functions related to the SFF in the foregoing method embodiment, and a specific implementation process of the device may refer to related descriptions of the SFF execution method in the foregoing method embodiment, which is not described herein again.
It is understood that the processors involved in the above-described apparatus 800 and apparatus 1000 according to embodiments of the present invention may be a CPU, DSP, ASIC, or one or more integrated circuits for controlling the execution of programs according to aspects of the present invention. The one or more memories included in the computer system may be a read-only memory (ROM) or another type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or another type of dynamic storage device that can store information and instructions, or a disk memory. The memories are connected with the processor through a bus; the above-mentioned receiver and transmitter may implement their functions through a transceiver, which may be a physical module capable of implementing a transceiving function, in order to communicate with other devices. The memory may be a RAM, and stores a program for executing the present invention.
The memories, transmitters and receivers may be connected to the processor via a bus or may be connected to the processor via dedicated connection lines.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
It will be apparent to those skilled in the art that various modifications and variations can be made in the embodiments of the present invention without departing from the scope of the embodiments of the invention. Thus, if such modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to encompass such modifications and variations.

Claims (15)

1. A full path detection method, comprising:
the controller determines a change factor of each service function SF according to a preset rule, and transmits the change factor corresponding to the SF to a service function forwarder SFF corresponding to the SF, wherein the change factor is used for generating a message number;
the controller sends a detection message carrying an initial message number to a first-hop SFF in a service chain, so that the first-hop SFF generates a new message number based on the initial message number and a change factor corresponding to a local SF of the first-hop SFF, and the new message number is carried in the detection message, and the detection message carrying the new message number is forwarded to the local SF;
and the controller receives a detection message which carries a target message number and is reported by the target SF or an SFF corresponding to the target SF, and obtains a forwarding path of the detection message based on the target message number and the preset rule to complete full-path detection.
2. The method of claim 1, wherein the controller determining the variation factor for each SF according to a preset rule comprises the controller generating the variation factor for each SF according to a preset rule, the preset rule complying with the following formula:
Figure FDA0002276263460000011
wherein the factormnRepresenting the variation factor corresponding to SF with the logic number n in the mth hop, wherein m and n are positive integers, SfNumiIndicates the ith hopThe number of SFs of (a).
3. The method of claim 1, wherein the controller determining the variation factor for each SF according to a preset rule comprises the controller generating the variation factor for each SF according to a preset rule, the preset rule complying with the following formula:
Figure FDA0002276263460000012
wherein the factormnRepresents the variation factor corresponding to SF with the logic number n in the mth hop, wherein m and n are positive integers, [ SfNumi]An exponential power of 2 that represents the number of SFs of no less than and closest to the number of SFs of the ith hop.
4. The method of claim 1, wherein the controller determines the variation factor for each SF according to a preset rule, comprising:
the controller configures a corresponding change factor for each SF in advance, wherein the difference value of the change factors of adjacent SFs is larger than a preset threshold value.
5. A full path detection method, comprising:
a service function forwarder SFF in a service chain receives a detection message, wherein the detection message carries a message number;
the SFF determines the last hop equipment of the detection message;
when the previous hop device of the detection message is the local SF of the SFF, forwarding the detection message to the next hop SFF;
when the last hop device of the detection packet is a controller or another SFF, generating a new packet number for each local SF of the SFF based on the packet number and a variation factor of the local SF, carrying the new packet number in the detection packet, and forwarding the detection packet carrying the new packet number to the local SF.
6. The method of claim 5, wherein the method further comprises:
and when the last hop equipment of the detection message is the target SF, sending the detection message to the controller.
7. The method of claim 5, wherein the SFF generates a new packet number based on the packet number and a variation factor of the local SF for each local SF of the SFF, comprising:
and the SFF calculates the sum of the message number and the change factor of the local SF aiming at each local SF of the SFF to obtain the new message number.
8. A full path detection system, comprising: a controller and at least one traffic function forwarder SFF,
the controller is used for determining a change factor of each service function SF according to a preset rule and sending the change factor corresponding to the SF to the SFF corresponding to the SF, wherein the change factor is used for generating a message number; sending a detection message carrying an initial message number to a first-hop SFF in a service chain, enabling the first-hop SFF to generate a new message number based on the initial message number and a change factor corresponding to a local SF of the first-hop SFF, carrying the new message number in the detection message, and forwarding the detection message carrying the new message number to the local SF; receiving a detection message which carries a target message number and is reported by a target SF or an SFF corresponding to the target SF, and obtaining a forwarding path of the detection message based on the target message number and the preset rule to complete full-path detection;
each SFF is used for receiving a detection message, and the detection message carries a message number; determining the last hop equipment of the detection message, and forwarding the detection message to the SFF of the next hop when the last hop equipment of the detection message is the local SF of the SFF; when the last hop device of the detection packet is the controller or another SFF, generating a new packet number for each local SF of the SFF based on the packet number and the variation factor of the local SF, carrying the new packet number in the detection packet, and forwarding the detection packet carrying the new packet number to the local SF.
9. A full path detection apparatus, comprising:
the processing unit is used for determining a change factor of each service function SF according to a preset rule and sending the change factor corresponding to the SF to a service function forwarder SFF corresponding to the SF, wherein the change factor is used for generating a message number;
a sending unit, configured to send a detection packet carrying an initial packet number to a first-hop SFF in a service chain, so that the first-hop SFF generates a new packet number based on the initial packet number and a change factor corresponding to a local SF of the first-hop SFF, and forwards the detection packet carrying the new packet number to the local SF;
a receiving unit, configured to receive a detection message carrying a target message number and reported by a target SF or an SFF corresponding to the target SF;
and the processing unit is further configured to obtain a forwarding path of the detection packet based on the destination packet number and the preset rule, and complete full-path detection.
10. The apparatus as claimed in claim 9, wherein the processing unit determining the variation factor of each SF according to a preset rule comprises the processing unit generating the variation factor of each SF according to the preset rule, and the preset rule conforms to the following formula:
Figure FDA0002276263460000041
wherein the factormnRepresenting the variation factor corresponding to SF with the logic number n in the mth hop, wherein m and n are positive integers, SfNumiIndicating the number of SFs for the ith hop.
11. The apparatus as claimed in claim 9, wherein the processing unit determining the variation factor of each SF according to a preset rule comprises the processing unit generating the variation factor of each SF according to the preset rule, and the preset rule conforms to the following formula:
Figure FDA0002276263460000042
wherein the factormnRepresents the variation factor corresponding to SF with the logic number n in the mth hop, wherein m and n are positive integers, [ SfNumi]An exponential power of 2 that represents the number of SFs of no less than and closest to the number of SFs of the ith hop.
12. The apparatus according to claim 9, wherein the processing unit, when determining the variation factor of each service function SF according to a preset rule, is specifically configured to:
and configuring a corresponding change factor for each SF in advance, wherein the difference value of the change factors of the adjacent SFs is larger than a preset threshold value.
13. A full path detection device applied to a Service Function Forwarder (SFF) in a service chain is characterized by comprising:
a receiving unit, configured to receive a detection packet, where the detection packet carries a packet number;
a processing unit, configured to determine a previous-hop device of the probe packet;
when the previous hop device of the detection message is the local service function SF of the SFF, forwarding the detection message to the next hop SFF;
when the last hop device of the detection packet is a controller or another SFF, generating a new packet number for each local SF of the SFF based on the packet number and a variation factor of the local SF, carrying the new packet number in the detection packet, and forwarding the detection packet carrying the new packet number to the local SF.
14. The apparatus of claim 13, wherein the apparatus further comprises:
and the sending unit is used for sending the detection message to the controller when the last hop equipment of the detection message is the target SF.
15. The apparatus of claim 13, wherein the processing unit, for each local SF of the SFF, is specifically configured to, when generating a new packet number based on the packet number and a variation factor of the local SF:
and calculating the sum of the message number and the change factor of the local SF aiming at each local SF of the SFF to obtain the new message number.
CN201610782778.1A 2016-08-31 2016-08-31 Full-path detection method, device and system Active CN107800579B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610782778.1A CN107800579B (en) 2016-08-31 2016-08-31 Full-path detection method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610782778.1A CN107800579B (en) 2016-08-31 2016-08-31 Full-path detection method, device and system

Publications (2)

Publication Number Publication Date
CN107800579A CN107800579A (en) 2018-03-13
CN107800579B true CN107800579B (en) 2020-03-20

Family

ID=61529521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610782778.1A Active CN107800579B (en) 2016-08-31 2016-08-31 Full-path detection method, device and system

Country Status (1)

Country Link
CN (1) CN107800579B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110620724B (en) * 2018-06-19 2021-09-14 中国电信股份有限公司 Method, node and communication system for realizing service chain path tracking

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312607A (en) * 2012-03-09 2013-09-18 华为技术有限公司 Transmission path selection method and device
WO2015180559A1 (en) * 2014-05-26 2015-12-03 华为技术有限公司 Fault detection method and apparatus for service chain
CN105812257A (en) * 2014-12-29 2016-07-27 中兴通讯股份有限公司 Business chain router management system and use method thereof
CN105847072A (en) * 2015-01-15 2016-08-10 华为技术有限公司 Method and device for detecting transmission path of data stream in software defined network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312607A (en) * 2012-03-09 2013-09-18 华为技术有限公司 Transmission path selection method and device
WO2015180559A1 (en) * 2014-05-26 2015-12-03 华为技术有限公司 Fault detection method and apparatus for service chain
CN105812257A (en) * 2014-12-29 2016-07-27 中兴通讯股份有限公司 Business chain router management system and use method thereof
CN105847072A (en) * 2015-01-15 2016-08-10 华为技术有限公司 Method and device for detecting transmission path of data stream in software defined network

Also Published As

Publication number Publication date
CN107800579A (en) 2018-03-13

Similar Documents

Publication Publication Date Title
CN108463989B (en) Business function linking across multiple sub-networks
EP3259885B1 (en) Traffic engineering feeder for packet switched networks
CN106559324A (en) A kind of method E-Packeted based on equal cost multipath and the network equipment
US20210211371A1 (en) Methods in a telecommunications network
US10659350B2 (en) Data routing method and apparatus
WO2017140112A1 (en) Multi-channel packet forwarding method and device
JP6443864B2 (en) Method, apparatus and system for implementing packet loss detection
CN105376162B (en) A kind of link-state information notifying method and equipment
US20170201466A1 (en) Data packet processing apparatus and method
JP6946470B2 (en) How to determine the transmission path and the node
CN106034071B (en) Data message transmission method and edge route-bridge equipment
CN104205745B (en) Method and device for processing message
CN113542059B (en) Segment routing multipath BFD detection method, device and storage medium
CN109194575B (en) Routing method and device
CN106411553B (en) Method and device for optimizing service chain path
CN107800579B (en) Full-path detection method, device and system
WO2021238207A1 (en) Advertisement information processing method, device, and storage medium
CN109379283A (en) Self-organized network communication method, apparatus and ad hoc network based on Internet of Things heterogeneous device
CN110636003A (en) Message forwarding method, device, system and computer readable storage medium
CN111654440B (en) Intelligent routing method, electronic equipment and storage medium
CN112583720B (en) Inter-autonomous system traceroute messages
CN105765903B (en) A kind of topology discovery method and equipment
CN105721234A (en) Port aggregation method and apparatus
EP3694161A1 (en) Conflict resolution in segment routing
US11671322B2 (en) Configuration of a network using a flex-algorithm routing mechanism

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