Describe the use and roles of network simulation and test tools (such as Cisco Modeling Labs and pyATS)

📘Cisco DevNet Associate (200-901 DEVASC)


Modern network automation requires a safe environment to build, test, and validate network configurations, APIs, and automation scripts before deploying them in production networks. Network simulation and testing tools help developers and network engineers design, test, troubleshoot, and validate network behavior without affecting real infrastructure.

Two important tools covered in the Cisco DevNet Associate (200-901 DEVASC) exam are:

  • Cisco Modeling Labs (CML)
  • pyATS

These tools play different but complementary roles in network development, testing, and automation validation.


1. Why Network Simulation and Testing Tools Are Important

In modern IT environments, networks are often automated using APIs, scripts, and infrastructure-as-code tools. If changes are applied directly to production networks without testing, they can cause:

  • Network outages
  • Misconfigurations
  • Security vulnerabilities
  • Service interruptions

Network simulation and testing tools solve this problem by allowing engineers to:

  • Build virtual networks
  • Test automation scripts
  • Validate network configurations
  • Simulate real network devices
  • Run automated verification tests

Key Benefits

BenefitDescription
Safe TestingTest configurations without affecting production
Automation ValidationEnsure scripts work correctly
Faster DevelopmentDevelopers can test code quickly
TroubleshootingRecreate issues in a lab environment
LearningStudents can practice networking without real hardware

These tools are widely used in DevNet workflows, CI/CD pipelines, and network automation testing.


2. Network Simulation Tools

Network simulation tools allow engineers to create a virtual network environment that behaves like real hardware devices.

They simulate devices such as:

  • Routers
  • Switches
  • Firewalls
  • Servers

This enables developers to build entire network topologies in software.


3. Cisco Modeling Labs (CML)

What is Cisco Modeling Labs?

Cisco Modeling Labs is a network simulation platform that allows users to design and run virtual network topologies using Cisco operating systems.

It runs Cisco network images such as:

  • IOSv
  • IOS XRv
  • NX-OSv
  • ASA
  • Linux nodes

This allows users to create realistic Cisco network environments without physical hardware.


How Cisco Modeling Labs Works

CML runs on:

  • Local servers
  • Virtual machines
  • Cloud environments

Users create networks by:

  1. Opening the CML web interface
  2. Dragging network devices into a topology
  3. Connecting them with virtual links
  4. Starting the simulation

Once running, users can:

  • Access device CLI
  • Configure routers and switches
  • Test network protocols
  • Run automation scripts

Example IT Use Case

A network engineer wants to test an automation script that configures OSPF routing across multiple routers.

Instead of using real devices, they:

  1. Build a virtual topology of routers in CML
  2. Run the automation script using Python
  3. Verify the routing tables
  4. Confirm OSPF neighbors form correctly

If something fails, the engineer can debug safely without affecting real networks.


Key Features of Cisco Modeling Labs

1. Virtual Network Topology Creation

Users can create complex network topologies including:

  • Data center networks
  • Enterprise networks
  • Multi-router environments

Example topology:

Router1 ----- Router2
| |
Switch1 Switch2

All devices are virtual.


2. Real Cisco Operating Systems

Unlike simple simulators, CML runs actual Cisco virtual operating systems, which behave like real devices.

This provides high-accuracy testing environments.


3. API Access

CML provides a REST API, allowing automation tools to:

  • Create topologies automatically
  • Start and stop simulations
  • Retrieve network information

This is useful for automation pipelines.


4. Integration with Automation Tools

CML can integrate with tools such as:

  • Python scripts
  • Ansible
  • CI/CD pipelines
  • Testing frameworks

Developers can automatically spin up test networks during software testing.


Typical Use Cases for CML

Use CaseDescription
Network design testingValidate topology design
Automation testingRun scripts against simulated devices
TrainingPractice networking skills
TroubleshootingRecreate network problems
Development labsBuild environments for DevNet labs

4. Network Testing Tools

While simulation tools build networks, testing tools validate network behavior and configurations.

These tools ensure that networks operate as expected after:

  • Configuration changes
  • Automation deployments
  • Software updates

5. pyATS

What is pyATS?

pyATS is a Python-based network testing and automation framework developed by Cisco.

It is used to:

  • Automate network testing
  • Validate network state
  • Perform configuration verification
  • Run automated test cases

pyATS is widely used in network automation and DevOps pipelines.


Components of pyATS

pyATS consists of several key components.

1. Testbed

A testbed describes the network devices used for testing.

It is usually defined in a YAML file.

Example:

devices:
router1:
os: iosxe
type: router
connections:
cli:
protocol: ssh
ip: 10.1.1.1

This tells pyATS how to connect to the device.


2. Test Scripts

Test scripts define automated tests written in Python.

These scripts perform tasks such as:

  • Running show commands
  • Checking interface status
  • Validating routing tables

Example workflow:

  1. Connect to device
  2. Run show ip interface brief
  3. Verify interfaces are up
  4. Generate test result

3. Genie Libraries

Genie is a library within pyATS that helps parse and validate network data.

Example:

Raw CLI output:

show ip route

Genie converts it into structured data like:

{
"routes": {
"10.1.1.0/24": {
"protocol": "ospf"
}
}
}

This allows scripts to easily analyze network information.


4. Automated Test Execution

pyATS runs automated tests that produce:

  • Pass results
  • Fail results
  • Detailed reports

Example report output:

Test ResultsTestcase: Interface Status
Result: PASSTestcase: OSPF Neighbor Check
Result: FAIL

6. Example IT Workflow Using pyATS

Example: Verifying a network after configuration deployment.

Step 1 — Deploy configuration using automation tools.

Step 2 — Run pyATS tests to verify:

  • Interfaces are operational
  • Routing protocols are working
  • VLANs are configured correctly

Step 3 — Generate automated report.

If tests fail, the deployment can be rolled back before users experience problems.


7. Integration with DevOps and CI/CD

Network testing tools like pyATS are commonly integrated into CI/CD pipelines.

Typical workflow:

  1. Developer writes automation script
  2. Simulation environment is created (CML)
  3. Script configures devices
  4. pyATS runs verification tests
  5. Pipeline reports success or failure

This ensures network changes are validated automatically before deployment.


8. Differences Between CML and pyATS

FeatureCisco Modeling LabspyATS
TypeSimulation toolTesting framework
PurposeCreate virtual networksTest network behavior
EnvironmentVirtual topologyReal or simulated devices
UsageNetwork design and simulationAutomation testing
InterfaceWeb UI and APIPython scripts

Simple summary

  • CML → Build the virtual network
  • pyATS → Test the network automatically

They are often used together in automation workflows.


9. Role in Network Automation Development

Network simulation and testing tools play important roles in modern infrastructure automation.

Development Phase

Developers write automation scripts.

Simulation Phase

CML creates a virtual network for testing.

Testing Phase

pyATS runs automated verification tests.

Deployment Phase

Validated automation is deployed to production.

This approach ensures reliable, safe, and repeatable network automation.


10. Key Exam Points (DEVASC 200-901)

For the exam, remember the following:

Cisco Modeling Labs (CML)

  • Cisco network simulation platform
  • Creates virtual network topologies
  • Runs virtual Cisco devices
  • Used for design, testing, and training
  • Provides API integration

pyATS

  • Python-based network testing framework
  • Used for automated validation
  • Supports testbed definitions
  • Uses Genie parsers for structured data
  • Generates automated test reports

Combined Workflow

CML + pyATS enables:

  • Simulation
  • Automation testing
  • Continuous network validation

Final Summary

Network simulation and testing tools are essential in modern network automation workflows.

  • Cisco Modeling Labs (CML) allows engineers to build virtual network environments that simulate real Cisco devices. It is used for topology design, automation testing, and network experimentation.
  • pyATS is a Python-based automated network testing framework that validates device configurations, verifies network operations, and generates detailed test reports.

Together, these tools help developers and network engineers build reliable automation, test network behavior safely, and prevent configuration errors before deployment.

Buy Me a Coffee