Avatar Avatar

Testing network topologies in Cisco Modeling Labs (CML) is essential for engineers, architects, and instructors who want to validate designs or experiment with new configurations. The testing process often starts with setting up basic routing protocol configurations every single time, which can be tedious. Now, with Python and Tkinter, our team is working to make this repetitive task a thing of the past and bring significant benefits to the CML community.

The challenge: Time-consuming configuration

When working with CML to simulate network topologies, users typically spend a lot of time configuring foundational settings. Whether you’re building a three-tier enterprise setup, a service MPLS network, or a simple three-router topology to test a certain feature, the initial work is nearly always monotonous, involving:

  • Assigning point-to-point IPs and loopbacks
  • Enabling routing protocols (OSPF, EIGRP, IS-IS, BGP)
  • Repeating the same base configuration for both IPv4 and IPv6 environments

These unexciting, decade-old configurations are necessary, but what if we could have a ready-made lab with pre-loaded basic configurations, all with just a few clicks?

Solution: Automation with Python and Tkinter

As a solution, we developed a Python script with a Tkinter-based graphical interface. Here’s how the script works and why it’s exciting:

  • User-friendly GUI: With Tkinter, users can visually design their topology by selecting the number of routers, defining links, and choosing which routing protocols (e.g., OSPF, BGP, or MPLS) to apply to each connection.
  • Automatic config generation: Once users make their selections, the script generates standardized configuration files for each router, preloading the base settings.
  • Quick review and export: Users can review the generated configurations, make adjustments, and export them as YAML files ready for import into CML.
  • Plug-and-play in CML: The YAML file is imported into CML, instantly creating a topology with all the core configs in place—saving hours of manual configuration.

Why Tkinter?

Tkinter is Python’s standard GUI toolkit. It’s simple, lightweight, and perfect for quickly building desktop applications with interactive elements like dropdowns, tables, and buttons. For network engineers who may not be full-time software developers, Tkinter offers an approachable way to create tools that make everyday work easier.

User benefits include:

  • Speed and efficiency: No more manually typing out the same IP assignments and protocol stanzas for every new lab. With just a few clicks, users can spin up a fully configured topology, focusing their energy on what really matters: testing, learning, and innovating.
  • Consistency and reliability: Preloaded configurations reduce the risk of typos and misconfigurations. Every lab starts with a solid, predictable baseline.
  • Flexibility: The script supports different topologies (from 3 to 5 routers and beyond) and a wide array of protocols (including OSPF, EIGRP, BGP, IS-IS, MPLS, and more). Users can mix and match protocols per link for realistic, complex scenarios.
  • Community collaboration: By planning to contribute our script to the CML Community repository, we want to embrace open collaboration. Others can use, improve, and extend the tool—potentially adding support for non-Cisco devices, new protocols, or direct integration as a CML plugin.

Here are some examples of scenarios in which the script could be useful:

  • Instructor lab prep: An instructor quickly generates OSPF and BGP configs for a four-router CCNP lab, saving setup time before class.
  • Enterprise engineer testing: An engineer prototypes a new MPLS topology with preloaded LDP and BGP configs, focusing on advanced features rather than the basics.
  • Student practice: A student practicing for CCNA can spin up a variety of routing topologies, getting hands-on without the frustration of repetitive setup.

Community and evolution

The team is actively developing enhancements—support for advanced features such as GRE, IPsec, and deeper integration with various Cisco OS versions (IOS XE, XR, NX-OS) is on the roadmap. By sharing our work on the CML Community site, we hope to gather feedback and see how widely users adopt the solution. If there’s enough demand, we hope the script can one day become an official CML plugin, offering seamless automation for all users.

If you’re interested in trying the team’s script or contributing to its development, watch the CML Community repository and join the CML Community on the Cisco Learning Network so you don’t miss upcoming blog posts and webinars that showcase this tool in action. Here are some points to remember for future use:

  • The script is meant to reduce manual, repeatable work for CML users of all backgrounds (engineers, architects, instructors, and students).
  • Community feedback will help guide future features and integration paths.
  • While the script currently uses Tkinter for the interface, future versions may explore other integration methods with CML to achieve even smoother workflows.

Our initiative is a great example of how small automation tools can have a big impact. By leveraging Python and Tkinter, our team hopes to resolve a common challenge for CML users—freeing up valuable time and energy for genuine innovation and testing. We hope our contribution will further the CML culture of shared progress and continuous improvement in network simulation and design.

What do you think? Will you try Tkinter? Let us know in the comments!


Sign up for Cisco U. | Join the  Cisco Learning Network today for free.

Learn with Cisco

X | Threads | Facebook | LinkedIn | Instagram | YouTube

Use  #CiscoU and #CiscoCert to join the conversation.

Authors

Hari Natarajan

Senior Solution Architect

Sushritha Hiriyur Suresh

Network Consulting Engineer