A method performed by a first network node for tracing a packet in a pipeline, the pipeline being comprised in a second network node, the pipeline comprising a set of flow tables, the first network node and the second network node operating in a software defined network using OpenFlow, the method comprising: - sending a first indication to the second network node that is to receive the packet, wherein the first indication is a part of the packet comprising a trace bit, and the packet to be provided with a Time To Live, TTL, value, the first indication instructing the second network node to have each flow table comprised in the set of flow tables to decrement the TTL value by 1, based upon detection of the trace bit, - setting an initial value of the TTL value in the packet to be equal to 1, - sending the packet comprising the trace bit and the TTL value to the second network node, wherein the packet is provided to a first flow table (table 0) comprised in the set of flow tables, the set of flow tables having been set to process the packet in an order, - receiving the packet, from another flow table in the set of flow tables, with the TTL value of 0, and for every remaining flow table in the set of flow tables, and for as long as there is at least one remaining flow table in the set of flow tables, following the order of the flow tables in the set of flow tables, and one flow table at a time: a) incrementing the TTL value by 1, and b) repeating the sending of the packet, and the receiving of the packet, until one of: i) a last flow table in the set of flow tables is reached, and ii) a criterion is met, and initiating sending, to a third network node, a second indication of a route followed by the packet in the pipeline, based on one of: iii) the packet having been received from all the flow tables in the set of flow tables, and iv) the criterion having been met, wherein the second indication is based on a saved identifier comprising the flow table and the group table received from the packet. - sending a first indication to the second network node that is to receive the packet, wherein the first indication is a part of the packet comprising a trace bit, and the packet to be provided with a Time To Live, TTL, value, the first indication instructing the second network node to have each flow table comprised in the set of flow tables to decrement the TTL value by 1, based upon detection of the trace bit, - setting an initial value of the TTL value in the packet to be equal to 1, - sending the packet comprising the trace bit and the TTL value to the second network node, wherein the packet is provided to a first flow table (table 0) comprised in the set of flow tables, the set of flow tables having been set to process the packet in an order, - receiving the packet, from another flow table in the set of flow tables, with the TTL value of 0, and for every remaining flow table in the set of flow tables, and for as long as there is at least one remaining flow table in the set of flow tables, following the order of the flow tables in the set of flow tables, and one flow table at a time: a) incrementing the TTL value by 1, and b) repeating the sending of the packet, and the receiving of the packet, until one of: i) a last flow table in the set of flow tables is reached, and ii) a criterion is met, and initiating sending, to a third network node, a second indication of a route followed by the packet in the pipeline, based on one of: iii) the packet having been received from all the flow tables in the set of flow tables, and iv) the criterion having been met, wherein the second indication is based on a saved identifier comprising the flow table and the group table received from the packet. for every remaining flow table in the set of flow tables, and for as long as there is at least one remaining flow table in the set of flow tables, following the order of the flow tables in the set of flow tables, and one flow table at a time: a) incrementing the TTL value by 1, and b) repeating the sending of the packet, and the receiving of the packet, until one of: i) a last flow table in the set of flow tables is reached, and ii) a criterion is met, and a) incrementing the TTL value by 1, and b) repeating the sending of the packet, and the receiving of the packet, until one of: i) a last flow table in the set of flow tables is reached, and ii) a criterion is met, and initiating sending, to a third network node, a second indication of a route followed by the packet in the pipeline, based on one of: iii) the packet having been received from all the flow tables in the set of flow tables, and iv) the criterion having been met, wherein the second indication is based on a saved identifier comprising the flow table and the group table received from the packet.