OpenFlow controller that emulates a layer 2 switch