Network troubleshooting is a field where automation is sorely needed. While the network has grown in many other ways since 1960s, the tools we use to troubleshoot and manage it have stayed very much the same. Could we use the programmability of SDN to automate this problem? In this thesis work, we developed a prototype that would systematically troubleshoot the network with automation. The prototype automatically captures network behaviour, matches it against a network policy and creates its own test packets to troubleshoot the network policy, on a live system. When the prototype discovers a policy violation it will troubleshoot further down the SDN layers and move down a decision tree based on what the search finds on each layer. The result showed that by the end of a troubleshooting search, the user would know what violating packet, packet path, policy rule, devices, flow entries and ports were the cause of the network problem. The results also showed that the automation of network troubleshooting could cause unexpected behaviour, and that some results were closely tied to timing between different POX controller applications. By using the prototype, network operators could observe network wide traffic, both manually and automatically test that certain policy conditions were uphold on their network. The developed prototype, sdn_dump, helps solve network problems with automation by pinpointing violating behaviour and the network path it takes. Expanding the prototype to include troubleshooting of more SDN layers, and expanding the scope of the descriptive language should be a priority as future work of this thesis.