Implementation of OSPF and Static Routing Using Python Scripts in Cisco Packet Tracer Network Simulation
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.
Copyright (c) 2026 Ananda Syafika, Dedy Kiswanto, Benedict Sandi Pangestu Rosa, Nayla Luthfiah Hanan

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlike 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).
.png)
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.


