A Dynamic Algorithm for Loop Detection in Software Defined Networks

A potential problem in computer networks is the existence of loops, which are cyclical paths through the network’s switches that can cause some packets to never leave the network. We present a dynamic algorithm built on the Header Space Analysis of Kazemian et. al. [1] which allows the detection of loops in software defined networks — such as ones created using OpenFlow [3]— over a sequence of rule insertions and deletions on the network’s switches. A key ingredient in our algorithm is a dynamic strongly connected component algorithm by Roddity and Zwick [5]. After a polynomial time pre-processing stage on the network description, our algorithm detects if the insertion or removal of a particular rule in a software defined network will cause some collection of headers to loop in the network. We present a theoretical and experimental analysis of our algorithm, and conclude that in densely connected networks (i.e. much more highly connected than in practice), it can detect negative network behaviour while sustaining a reasonable amount of rule insertions per second, as long as the rule insertions are batched.