Objective: This research proposes a methodology for improving real-time traffic prediction by constructing dataset from the live traffic in Software-Defined Networks (SDNs). Methods: This work applies time-series based machine learning models such as XGBoost Regressor, LSTM, and Seasonal ARIMA, on the collected and preprocessed traffic data from SDN switches. Findings: Simulation shows that the percentage of error parameters that depict accuracy and goodness of fit for traffic predictions are still weak and needs improvement, as these predictions have the potential to compose new policies for the dynamic environment. Novelty: The consensus method is applied to forecast future network traffic across multiple time slots as consensus strengthens the decisions. Keywords: Software defined networking, Traffic prediction, Consensus, Machine learning, Time series data