Software-defined networks (SDNs) are extensively deployed in many network configurations. However, the development of new technology presents several vulnerabilities and risks that continue to pose challenges for manufacturers in addressing them. One of the primary obstacles encountered in deploying an intrusion detection system (IDS) is the absence of an openly accessible dataset, especially one obtained from SDN and SDN-based Internet of Things (IoT) networks. This work produces a comprehensive dataset to evaluate the effectiveness of anomaly-based IDSs in detecting inter- and intradomain attacks. The dataset comprises 86 features extracted from approximately 40 million records obtained from simulated SDN-based IoT networks captured within two flow profiles representing normal and 15 different attack types. In addition, the evaluation is demonstrated by employing six widely used machine learning and deep learning approaches for IDSs: decision tree classifiers, random forest classifiers, deep neural networks, K-nearest neighbours, Bernoulli naive Bayes, and logistic regression.