The proactive identification of potential network link failures is a critical challenge in network management. Traditional monitoring systems are often reactive, raising alarms only after a failure has occurred, leading to downtime and service disruption. This project addresses this challenge by developing a predictive system capable of forecasting the status of a network link based on its real-time performance metrics. By leveraging a machine learning model, the system can identify subtle patterns in network behavior that precede a failure, enabling preemptive action. The primary objective is to build a complete pipeline, starting from data synthesis and culminating in a user-facing application that provides actionable intelligence.
The project is architected as a four-stage pipeline, where the output of each stage serves as the input for the next. This modular design ensures a clear separation of concerns and facilitates independent development and testing of each component.
- Data Generation (tcp-realtime-logger1.cc): An ns-3 simulation generates a rich dataset by modeling a point-to-point network link under various conditions. It logs key performance indicators (KPIs) like throughput and delay to a CSV file.
- Model Training (predict4.py): A Python script consumes the generated CSV data. It preprocesses the data, trains a Random Forest classifier, evaluates its performance using rigorous metrics, and serializes the trained model into a .joblib file for deployment.
- Backend API (app1.py): A Flask web server loads the serialized model and exposes a /predict REST API endpoint. This backend service acts as the brain of the operation, serving predictions on demand.
- Frontend Interface (cnpinfo1.html): A standard HTML and JavaScript web page provides a user-friendly form. It captures user input for network metrics, communicates with the backend API, and displays the model's prediction in an intuitive, color-coded format.
TCP Protocols used in the project:
- TcpTahoe
- TcpReno
- TcpNewReno
- TcpVegas
- TcpWestwood
Future work:
- Implement more protocols
- Simulate real time traffic of a network
- Improve the machine learning model