Implementation of OSPF and Static Routing Using Python Scripts in Cisco Packet Tracer Network Simulation

  • Ananda Syafika State University of Medan
  • Dedy Kiswanto State University of Medan
  • Benedict Sandi Pangestu Rosa State University of Medan
  • Nayla Luthfiah Hanan State University of Medan
Keywords: Static routing; Dynamic Routing; OSPF; Python

Abstract

The increasing complexity of computer networks demands a faster and more accurate process of configuring network devices. Manually configuring routers is time-consuming and prone to configuration inconsistencies, requiring a more efficient approach. This study aims to implement static routing and dynamic routing configurations based on the OSPF (Open Shortest Path First) protocol using the Python programming language in a simulation of the Cisco Packet Tracer network. The network topology consists of three routers, three switches, and three PCs with predefined IP addressing. Python scripts are designed to generate router interface configurations, static routing, and OSPF based on topological data, as well as store the results into .txt files. The test is performed using ping commands, show ip route, and show ip ospf neighbor to verify inter-network connectivity. The test results showed that both routing methods successfully connected three different subnets with 0% packet loss under stable network conditions. Python-based scripts have been shown to speed up the configuration preparation process as well as produce more consistent and structured configurations compared to manual methods.

Published
2026-10-09
How to Cite
Syafika, A., Kiswanto, D., Rosa, B. S. P., & Hanan, N. L. (2026). Implementation of OSPF and Static Routing Using Python Scripts in Cisco Packet Tracer Network Simulation. IJCONSIST JOURNALS, 8(1), 11-18. https://doi.org/10.33005/ijconsist.v8i1.197
Section
Articles