Spectrum fragmentation limits the efficiency of spectrum utilization in elastic optical networks (EONs). This paper studies how to take advantage of the centralized network control and management provided by software-defined EONs (SD-EONs) for realizing OpenFlow-assisted implementation of online defragmentation (DF). We first discuss the overall system design and OpenFlow protocol extensions to support efficient online DF and conduct DF experiments with routing and spectrum assignment (RSA) reconfigurations in a single-domain SD-EON.
Then, we propose to realize fragmentation-aware RSA (FA-RSA) in multi-domain SD-EONs with the cooperation of multiple OpenFlow controllers. In order to provision inter-domain lightpaths with restricted domain visibility on intradomain resource utilization, we design and implement an inter-domain protocol to facilitate FA-RSA in multi-domain SD-EONs and demonstrate controlling the spectrum fragmentation on inter-domain links with FA-RSA. Our experimental results indicate that the OpenFlow-controlled DF systems perform well and can improve the performance of SD-EONs effectively.