Software-defined networking (SDN) is a new paradigm that allows developing more flexible network applications. A SDN controller, which represents a centralised controlling point, is responsible for running various network applications as well as maintaining different network services and functionalities. Choosing an efficient intrusion detection system helps in reducing the overhead of the running controller and creates a more secure network. In this study, we investigate the performance of the well-known anomaly-based intrusion detection approaches in terms of accuracy, false alarm rate, precision, recall, f1-measure, area under receiver operator characteristic curve, execution time and McNemar's test. Precisely, the authors focus on supervised machine-learning approaches where we use the following classifiers: decision trees, extreme learning machine, Naive Bayes, linear discriminant analysis, neural networks, support vector machines, random forest, K-nearest-neighbour, AdaBoost, RUSBoost, LogitBoost and BaggingTrees where we employ the well-known NSL-KDD benchmark dataset to compare the performance of each one of these classifiers.