The security of the Internet of Things (IoT) ecosystem has become a critical challenge due to a tremendous increase in the vulnerable connected IoT devices. Software-Defined Network (SDN) becomes a choice for managing IoT and offers new approaches to solve security problems. Link flooding attack (LFA), cut off the network connectivity on a particular target area of the network. This attack uses legitimate, and low density flows to flood selected links of the target area. Therefore, these flows can not be easily distinguished by traditional approaches. In this paper, firstly, we present a framework for IoT network based on SDN designed for security solutions against LFA attack. The presented framework consists of an SDN controller connected with SDN switches and SDN switches integrated with the IoT-getaway. Secondly, we proposed a scheme that employs hop-by-hop network measurement to capture abnormal link performance for detecting LFA. Afterward, it employs a centralized traffic engineering to eliminate link bottlenecks and mitigating LFA. The proposed scheme will be developed as an application at the application layer of POX controller. The evaluation demonstrates that the proposed method can effectively optimize the process of measuring link performance for detecting and mitigating LFA.