The disclosure relates to the field of communications, and in particular to a method and device for fault detection.
Service Function Chaining (SFC) is a network technology which is currently studied and standardized. Since a data center network develops to an overlay network, a network edge has become a demarcation point between a virtual network and a physical network. The network edge may be a server or a ToR switch or a gateway. However, Overlay technology cannot solve all the problems. There are many middlewares in a data center, such as, a firewall or load balancer. These devices are processed based on user services. It is obviously infeasible if these devices are traversed through a tunnel.
This deployment model in the data center requires that a virtual firewall or load balancer can be arbitrarily deployed in a network, that is, regardless of a network topology; a drawback of the deployment model is that if traffic can be flexibly processed through a virtual firewall or load balancer, a new middleware such a virtual firewall or load balancer will be generated. These virtual firewalls or load balancers are deployed in an edge of a network and can be achieved by a standard server.
In the related art, a service processing function such as a virtual firewall, load balancer or gateway is referred to as a service function, and after being processed through a series of service functions, the traffic will form the SFC.
At present, an SFC framework in the relevant art can be classified into the following components:
1. Service Overlay, which is the Overlay technology that each network edge node needs to communicate;
2. Generic Service Control Plane (GSCP), which is a controller forming the SFC;
3. Service Classification, in which the flow identification is required, and then, a specific SFC processing is performed on a specific stream;
4. Dataplane Metadata, which is a major feature of the SFC framework, in which metadata allows each edge service processing node to exchange information with each other, so as to achieve specific service processing purposes;
5. Service Function Path (SFP), in which
6. Service Function Forwarder (SFF) in which data packets are transmitted between nodes of the SFC and encapsulate a layer of service function packet Network Service Header (NSH) outside a data frame. This NSH is parsed, encapsulated, and decapsulated by an SFF component on a service function node.
In summary, the SFC is a technology of separating network device service functions and forwarding, which implements an independent operation and processing of service functions and enhances a forwarding performance of a network device.
In order to protect critical applications, a certain number of redundant backup links may be designed in a network. When the network fails, a network device is required to quickly detect a fault and switch traffic to at least one backup link to speed up a network convergence speed. At present, some links achieve rapid fault detection through a hardware detection mechanism. However, some links (eg, Ethernet links) do not have such a detection mechanism. At this point, applications will rely on a mechanism of a upper layer protocol to perform a fault detection. A detection time of the upper layer protocol is more than 1 second, and such fault detection time is intolerable for some applications. Although some routing protocols such as Open Shortest Path First (OSPF), Link State Routing Protocol (ISIS) have a Fast Hello function to speed up a detection speed, the fault detection time can only reach an accuracy of 1 second, and the Fast Hello function is only for this protocol and cannot provide fast fault detection for other protocols.
A Bidirectional Forwarding Detection (BFD) protocol is generated in this context, which provides a common, standardized, media-independent, and protocol-independent fast fault detection mechanism. The BFD establishes a session on two network devices to detect a bidirectional forwarding path between these two network devices and provides services for upper layer applications. The BFD does not have a neighbor discovery mechanism, but relies on served upper layer applications to inform neighbor information of the BFD to establish a session. After the session is established, BFD packets will be sent periodically. If the BFD packets are not received within the detection time, the bidirectional forwarding path is considered to fail and the served upper layer applications are informed of performing a corresponding processing.
However, there is a lack of a fault detection mechanism based on the BFD connectivity between various service function instances in the SFC in a existing SFC technology.
At least one embodiment of the disclosure provides a method and device for fault detection to solve a problem that there is a lack of a fault detection mechanism based on a BFD connectivity between various service function instances in an SFC in the related art.
In an embodiment of the disclosure, a method for fault detection is provided, which includes that: creating a Bidirectional Forwarding Detection (BFD) session on a service function path established between a first service function instance in a management domain of a local-end service function node and a second service function instance in a management domain of an opposite-end service function node; and performing connectivity fault detection by interaction of a BFD control packet between the local-end service function node and the opposite-end service function node.
In an example embodiment, performing connectivity fault detection by the interaction of the BFD control packet includes: receiving the BFD control packet from the opposite-end service function node within a preset time period specified by a timer, wherein the BFD control packet carries an identification number of the first service function instance; and keeping the BFD session in an open state and resetting the timer in the case of determining, according to the identification number, that the first service function instance corresponding to the identification number in the management domain of the local-end service function node is in an active state.
In an example embodiment, before determining, according to the identification number, that the first service function instance is in the active state, the method further includes: acquiring that a status field of a BFD in the BFD control packet is in the open state currently from the BFD control packet.
In an example embodiment, performing connectivity fault detection by the interaction of the BFD control packet includes: waiting for the BFD control packet sent by the opposite-end service function node within a preset time period specified by a timer; and closing the BFD session and performing a service function path switching operation when the BFD control packet is not received within the preset time period, and informing the opposite-end service function node that a link fault occurs.
In an example embodiment, performing connectivity fault detection by the interaction of the BFD control packet includes: closing the BFD session and configuring the BFD control packet in the case of determining that the first service function instance in the management domain of local-end service function node has failed or has been closed, wherein a status field of a BFD in the BFD control packet is set to be in a closed state and an identification number of the second service function instance is encapsulated in the BFD control packet; and sending the BFD control packet to the opposite-end service function node.
In an example embodiment, creating the BFD session includes: adding a BFD function component in the management domain of the local-end service function node; and informing, by the local-end service function node where the first service function instance is located, the BFD function component of BFD session creation information, wherein the BFD session creation information is used for creating, by the BFD function component, the BFD session, and the BFD session creation information includes at least one of an identification number of the first service function instance, an identification number of the second service function instance, identification information of the local-end service function node, and identification information of the opposite-end service function node.
In another embodiment of the disclosure, a device for fault detection is provided, which includes that: an establishing component arranged to create a Bidirectional Forwarding Detection (BFD) session on a service function path established between a first service function instance in a management domain of a local-end service function node and a second service function instance in a management domain of an opposite-end service function node; and a detecting component arranged to perform connectivity fault detection by interaction of a BFD control packet between the local-end service function node and the opposite-end service function node.
In an example embodiment, the detecting component includes: a receiving element arranged to receive the BFD control packet from the opposite-end service function node within a preset time period specified by a timer, wherein the BFD control packet carries an identification number of the first service function instance; and a first executing element arranged to keep the BFD session in an open state and reset the timer in the case of determining, according to the identification number, that the first service function instance corresponding to the identification number in the management domain of the local-end service function node is in an active state.
In an example embodiment, the detecting component further includes: an acquiring element arranged to acquire that a status field of a BFD in the BFD control packet is in the open state currently from the BFD control packet.
In an example embodiment, the detecting component includes: a processing element arranged to wait for the BFD control packet sent by the opposite-end service function node within a preset time period specified by a timer; and a second executing element arranged to close the BFD session and perform a service function path switching operation when the BFD control packet is not received within the preset time period, and inform the opposite-end service function node that a link fault occurs.
In an example embodiment, the detecting component includes: a configuring element arranged to close the BFD session and configure the BFD control packet in the case of determining that the first service function instance in the management domain of local-end service function node has failed or has been closed, wherein a status field of a BFD in the BFD control packet is set to be in a closed state and an identification number of the second service function instance is encapsulated in the BFD control packet; and a sending element arranged to send the BFD control packet to the opposite-end service function node.
In an example embodiment, the establishing component includes: an adding element arranged to add a BFD function component in the management domain of the local-end service function node; and an informing element arranged to inform, by the local-end service function node where the first service function instance is located, the BFD function component of BFD session creation information, wherein the BFD session creation information is used for creating, by the BFD function component, the BFD session, and the BFD session creation information includes at least one of an identification number of the first service function instance, an identification number of the second service function instance, identification information of the local-end service function node, and identification information of the opposite-end service function node.
According to at least one embodiment of the disclosure, by creating the BFD session on the service function path established between the first service function instance in the management domain of the local-end service function node and the second service function instance in the management domain of the opposite-end service function node; and performing connectivity fault detection by the interaction of with the BFD control packet between the local-end service function node and the opposite-end service function node, the problem that there is a lack of the fault detection mechanism based on the BFD connectivity between various service function instances in the SFC in the related art is solved, so as to achieve performing connectivity detection between service function instances on a service function path.
The drawings are described here to provide further understanding of the disclosure, and form a part of the present application. The schematic embodiments and description of the disclosure are adopted to explain the disclosure, and do not form improper limits to the disclosure. In the drawings:
The disclosure is described below with reference to the drawings and the embodiments in detail. It needs to be noted that the embodiments in the present application and the characteristics in the embodiments may be combined with each other under the condition of no conflicts.
Step S202: A BFD session is created on a service function path established between a first service function instance in a management domain of a local-end service function node and a second service function instance in a management domain of an opposite-end service function node.
Step S204: Connectivity fault detection is performed by interaction of a BFD control packet between local-end service function node and the opposite-end service function node.
There is a lack of a fault detection mechanism based on a BFD connectivity between various service function instances in a SFC in the related art. The method as shown in
In an example embodiment, in Step S204, performing connectivity fault detection by the interaction of the BFD control packet may include the following operations:
Step S1: The BFD control packet is received from the opposite-end service function node within a preset time period specified by a timer, in which the BFD control packet carries an identification number of the first service function instance.
Step S2: The BFD session is kept in an open state and the timer is reset in the case that the local-end service function node determines, according to the identification number, that the first service function instance corresponding to the identification number in the management domain of the local-end service function node is in an active state.
In an example embodiment, in Step S2, before determining, according to the identification number, that the first service function instance is in the active state, the method further includes the following step.
Step S3: It is acquired that a status field of a BFD in the BFD control packet is in the open state currently from the BFD control packet. It is thus determined that the second service function instance on the second service function node does not have an abnormality or is closed. Therefore, the BFD session can be continuously kept in the case of determining at the same that the first service function instance in the management domain of the local-end service function node is also in the active state (that is, no abnormality occurs or it is not closed).
In an example embodiment,
In an example embodiment, in Step S204, performing the connectivity fault detection by the interaction of the BFD control packet may include the following steps:
Step S4: The BFD control packet sent by the opposite-end service function node is waited for within a preset time period specified by a timer.
Step S5: The BFD session is closed and a service function path switching operation is performed when the BFD control packet is not received within the preset time period, and the opposite-end service function node is informed that a link fault occurs.
When the link fault occurs between the service function nodes, if each service function node does not receive the BFD control packet within the detection time, the BFD session will be moved to the closed state, and the relevant applications will be informed that the opposite end link fails so as to close the session and inform a managing component of taking measures such as SFP path switching.
Step S402: The BFD control packet sent by the opposite-end service function node is waited for within the preset time period specified by the timer to determine whether the above BFD control packet is received within the preset time; if the above BFD control packet is received within the preset time, the flow proceeds to Step S404; if the above BFD control packet is not received within the preset time, the flow turns to Step S408.
Step S404: The BFD control packet sent by the opposite-end service function node is received within the preset time period specified by the timer.
Step S406: It is determined whether the status field of the BFD in the BFD control packet is set to be in a closed state and an identification number of the second service function instance is encapsulated in the BFD control packet; if the status field of the BFD in the BFD control packet is set to be in the closed state and the identification number of the second service function instance is encapsulated in the BFD control packet, the flow proceeds to Step S408; if the status field of the BFD in the BFD control packet is not set to be in a closed state or the identification number of the second service function instance is not encapsulated in the BFD control packet, the flow turns to Step S412.
Step S408: The BFD session is moved to the closed state and then the BFD session is closed.
Step S410: The managing component is informed of taking measures such as SFP path switching; and the flow ends.
Step S412: When the service function instance represented by the identification number of the destination service function instance in the BFD control packet is in the active state, the detection time timer will be reset and the session will be kept in an open state; and the flow ends.
In an example embodiment, in Step S204, performing the connectivity fault detection by interaction of the BFD control packet may include the following operations:
Step S6: The BFD session is closed and the BFD control packet is configured in the case of determining that the first service function instance in the management domain of local-end service function node has failed or has been closed, moreover a status field of a BFD in the BFD control packet is set to be in a closed state and an identification number of the second service function instance is encapsulated in the BFD control packet.
Step S7: The BFD control packet is sent to the opposite-end service function node. When a service function instance of one of the service function nodes fails or is closed, the service function node closes the session. And when the BFD control packet is sent, a local current session state will be filled into the status field of the BFD, the status is set to be closed, the identification number of the destination service function instance is encapsulated, and is sent to the opposite-end service function node. After receiving the BFD control packet, the opposite-end service function node will close the session and inform the managing component of taking measures such as SFP path switching.
Step S502: It is determined whether the first service function instance inside the local-end service function node has failed or has been closed; if the first service function instance has failed or has been closed, the flow proceeds to Step S504; if the first service function instance is not failed and is not closed, the flow turns to Step S508.
Step S504: The BFD session is closed when it is determined that the first service function instance has failed or has been closed.
Step S506: The status field of the BFD in the BFD control packet is set to be in the closed state.
Step S508: The BFD control packet is sent to the opposite-end service function node; and the flow ends.
In an example, in Step S202, creating the BFD session may include the following steps.
Step S7: A BFD function component is added in the management domain of the local-end service function node.
Step S8: The local-end service function node where the first service function instance is located informs the BFD function component of BFD session creation information, moreover the BFD session creation information is used for creating, by the BFD function component, the BFD session, and the BFD session creation information may include, but is not limited to, at least one of:
(1) an identification number of the first service function instance;
(2) an identification number of the second service function instance;
(3) identification information of the local-end service function node; and
(4) identification information of the opposite-end service function node.
A peer entity is formed between two service function instances that require BFD detection, and the associated BFD protocol configuration and SFP and BFD linkage are bound. When a new SFP is established and the SFP contains the above two service function instances, the service function node where the service function instance is located can inform BFD of the information of two service function instances and service function paths.
The above information may include, but is not limited to, the identification number of the source service function instance, the identification number of the destination service function instance, the service function path, the Internet Protocol (IP) address of the source service function node, and the IP address of the destination service function node.
The IP address of the above source service function node is the IP address of the service function node where the above service function instance is located; the IP address of the above destination service function node is the IP address of the service function node where the opposite-end service function instance is located.
Further, the BFD establishes a session based on the received neighbor information. The session information may include, but is not limited to, the identification number of the source service function instance, the identification number of the destination service function instance, the IP address of the source service function node, and the IP address of the destination service function node.
The example embodiments described above will be further described below with reference to the preferred embodiments shown in
In general, the connectivity fault between service function instances is often caused by the following two reasons:
a first reason: a link between service function nodes fails, that is, a physical or virtual link between the service function nodes fails; and
a second reason: a service function instance fails or is closed, that is, a link between the service function nodes may be intact, but the service function instance cannot work properly due to a fact that the service function instance is closed initiatively by a user, the service function instance suspends, etc.
Step 1: A BFD detection mechanism is configured and a linkage SFC is configured on a service function node 1 where the service function instance 1 is located and a service function node 2 where the service function instance 2 is located.
Step 2: After an SFP containing the service function instance 1 and the service function instance 2 is created, the service function instance 1 informs a BFD component of the service function node 1 of requiring a creation of a session. At the same time, the service function instance 2 informs the BFD component of the service function node 2 of also requiring a creation of a session.
Step 3: The BFD successfully creates a session based on the two service function instances. The identification number of the service function instance 1 is 1000, the identification number of the service function instance 2 is 2000, the IP address of the service function node 1 is 192.168.1.1, and the IP address of the service function node 2 is 192.178.1.1.
Step 4: The service function node 1 checks that the process of the service function instance 1 operates normally, sends the BFD control packet to the service function node 2 regularly and periodically and encapsulates the optional item in which the identification number of the service function instance 2 is 2000; the service function node 2 checks that the process of the service function instance 2 operates normally, sends the BFD control packet to the service function node 1 regularly and periodically and encapsulates the optional item in which the identification number of the service function instance 1 is 1000.
Step 5: The service function node 1 receives the BFD control packet sent by the other party in the configured time, determines that the service function instance with the identification number of 1000 operates normally, resets the timer and keeps the session in the active state; and the service function node 2 receives the BFD control packet sent by the other party in the configured time, determines that the service function instance with the identification number of 2000 operates normally, resets the timer and keeps the session in the active state.
Step 6: The service function node 1 has a link fault.
Step 7: The service function node 2 cannot receive the BFD control packet sent by the other party in the configured time. Therefore, the session is closed and the relevant application is informed of performing SFP path switching.
Step 1: A BFD detection mechanism is configured and a linkage SFC is configured on a service function node 1 where the service function instance 1 is located and a service function node 2 where the service function instance 2 is located.
Step 2: After an SFP containing the service function instance 1 and the service function instance 2 is created, the service function instance 1 informs a BFD component of the service function node 1 of requiring a creation of a session. At the same time, the service function instance 2 informs the BFD component of the service function node 2 of also requiring a creation of a session.
Step 3: The BFD successfully creates a session based on the two service function instances. The identification number of the service function instance 1 is 1000, the identification number of the service function instance 2 is 2000, the IP address of the service function node 1 is 192.168.1.1, and the IP address of the service function node 2 is 192.178.1.1.
Step 4: The service function node 1 checks that the process of the service function instance 1 operates normally, sends the BFD control packet to the service function node 2 regularly and periodically and encapsulates the optional item in which the identification number of the service function instance 2 is 2000; the service function node 2 checks that the process of the service function instance 2 operates normally, sends the BFD control packet to the service function node 1 regularly and periodically and encapsulates the optional item in which the identification number of the service function instance 1 is 1000.
Step 5: The service function node 1 receives the BFD control packet sent by the other party in the configured time, determines that the service function instance with the identification number of 1000 operates normally, resets the timer and keeps the session in the active state; and the service function node 2 receives the BFD control packet sent by the other party in the configured time, determines that the service function instance with the identification number of 2000 operates normally, resets the timer and keeps the session in the active state.
Step 6: The operator manually closes the service function instance 2.
Step 7: The service function node 2 checks that the process of the service function instance 2 is closed, sets the status field of the BFD control packet to be down, sends the BFD control packet to the service function node 1, and closes the session at the same time.
Step 8: The service function node 1 cannot receive the BFD control packet sent by the other party in the configured time, but a value of the status field of the packet has been set to be closed.
Step 9: The service function node 1 closes the session and informs relevant applications of performing SFP path switching.
The device as shown in
Preferably, as shown in
In an example embodiment, as shown in
In an example embodiment, as shown in
In an example embodiment, as shown in
In an example embodiment, as shown in
From the above description, it can be seen that the above embodiments achieve the following technical effects (it should be noted that these effects are the effects achievable by certain preferred embodiments): the technical solution provided by the embodiments of the disclosure provides a manner of the SFC and BFD detection technology linkage so as to achieve performing fault detection between the service function nodes.
Obviously, those skilled in the art should know that each of the above components or steps of the disclosure may be implemented by a universal computing device, and the components or steps may be concentrated on a single computing device or distributed on a network formed by a plurality of computing devices, and may optionally be implemented by programmable codes executable for the computing devices, so that the components or steps may be stored in a storage device for execution with the computing devices, and, in some cases, the steps shown or described may be performed in a order different from the order herein, or the components or steps may form each integrated circuit component, or multiple components or steps therein may form a single integrated circuit component for implementation. As a consequence, the disclosure is not limited to any specific hardware and software combination.
The above are only example embodiments of the disclosure and not intended to limit the disclosure, and for the technician of the field, the disclosure may have various modifications and variations. Any modifications, equivalent replacements, improvements and the like within the spirit and principle of the disclosure shall fall within the scope of protection as defined in the disclosure.
As described above, a method and device for fault detection provided according to at least one embodiment of the disclosure have the following advantageous effects: a Bidirectional Forwarding Detection (BFD) session is created on a service function path established between a first service function instance in a management domain of a local-end service function node and a second service function instance in a management domain of an opposite-end service function node; and connectivity fault detection is performed by interaction of a BFD control packet between local-end service function node and the opposite-end service function node so as to achieve performing connectivity detection between service function instances on a service function path.
Number | Date | Country | Kind |
---|---|---|---|
201410564306.X | Oct 2014 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2014/092067 | 11/24/2014 | WO | 00 |