CLAIM OF PRIORITY

This application is a national stage of International Application No. PCT/IN2017/050497, filed Oct. 27, 2017, the entire disclosure of which is fully incorporated herein by reference.

CROSS-REFERENCE TO RELATED APPLICATIONS

Cross-reference is made to co-pending application entitled “OPTIMIZED DATAPATH TROUBLESHOOTING WITH TRACE POLICY ENGINE” (PCT Application No. PCT/IN2017/050496906), filed on the same date as the present application and commonly owned. The cross-referenced application is incorporated herein by reference.

TECHNICAL FIELD

Embodiments of the invention relate to the field of Software Defined Networking (SDN), and more specifically, to tracing packets in an SDN network.

BACKGROUND

Software Defined Networking (SDN) is an approach to computer networking that employs a split architecture network in which the forwarding (data) plane is decoupled from the control plane. The use of a split architecture network simplifies the network devices (e.g., switches) implementing the forwarding plane by shifting the intelligence of the network into one or more SDN controllers that oversee the switches. SDN facilitates rapid and open innovation at the network layer by providing a programmable network infrastructure.

An SDN network typically includes multiple switches interconnected with each other and one or more SDN controllers that control the forwarding behavior of the switches. An SDN controller can control the programming of flow tables in the switches to implement any forwarding protocol.

OpenFlow is a communication protocol that enables SDN controllers and switches in an SDN network to communicate with each other. An OpenFlow switch includes a packet processing pipeline that includes one or more flow tables. Each flow table includes one or more flow entries, where each flow entry includes a packet matching criteria and a set of instructions. When an incoming packet matches the packet matching criteria of a flow entry, the corresponding set of instructions of that flow entry are executed. The set of instructions may instruct the switch to perform various operations on the packet including, but not limited to, forwarding the packet to a given port, modifying certain bits in the packet header, encapsulating the packet, and dropping the packet.

The packet processing pipeline of an OpenFlow switch can become extremely complex. For example, an SDN controller may program the packet processing pipeline of a switch to include multiple flow tables and multiple flow entries within those flow tables. The flow entries can include instructions that direct packets to other flow tables in the packet processing pipeline. With such a complex packet processing pipeline, when a packet does not traverse its intended packet processing path, it can become extremely difficult to troubleshoot.

SUMMARY

A method implemented by a switch in a Software Defined Networking (SDN) network to trace packets, where the switch includes a packet processing pipeline that includes a plurality of flow tables. The method includes receiving a packet, determining, at a first flow table of the packet processing pipeline, whether the packet is a trace packet that was recirculated based on content of a first field associated with the packet, and in response to a determination that the packet is trace packet that was recirculated, setting a first field associated with the packet to indicate that tracing is disabled for the packet, setting a second field associated with the packet to indicate that tracing is enabled for the packet, determining a flow table of the packet processing pipeline from which the packet was recirculated, and directing the packet to the flow table from which the packet was recirculated.

A network device configured to function as a switch in a Software Defined Networking (SDN) network to trace packets in the SDN network, where the switch includes a packet processing pipeline that includes a plurality of flow tables. The network device includes a set of one or more processors and a non-transitory machine-readable storage medium having stored therein a packet tracing component. The packet tracing component, when executed by the set of one or more processors, causes the network device to receive a packet, determine, at a first flow table of the packet processing pipeline, whether the packet is a trace packet that was recirculated based on content of a first field associated with the packet and in response to a determination that the packet is a trace packet that was recirculated, set a first field associated with the packet to indicate that tracing is disabled for the packet, set a second field associated with the packet to indicate that tracing is enabled for the packet, determine a flow table of the packet processing pipeline from which the packet was recirculated, and direct the packet to the flow table from which the packet was recirculated.

A non-transitory machine-readable medium has computer code stored therein, which when executed by a set of one or more processors of a network device functioning as a switch in a Software Defined Networking (SDN) network, causes the network device to perform operations for tracing packets in the SDN network, where the switch includes a packet processing pipeline that includes a plurality of flow tables. The operations include receiving a packet, determining, at a first flow table of the packet processing pipeline, whether the packet is a trace packet that was recirculated based on content of a first field associated with the packet, and in response to a determination that the packet is trace packet that was recirculated, setting a first field associated with the packet to indicate that tracing is disabled for the packet, setting a second field associated with the packet to indicate that tracing is enabled for the packet, determining a flow table of the packet processing pipeline from which the packet was recirculated, and directing the packet to the flow table from which the packet was recirculated.

