Network Automation and Programmability Notes for CCNA
Introduction to Network Automation
● Definition: Network automation involves using software tools and scripts to
configure, manage, and operate network devices and infrastructure without
manual intervention.
● Benefits:
○ Reduces manual errors
○ Increases operational efficiency
○ Improves scalability
○ Enhances consistency in configuration
Key Concepts of Network Automation
1. Automation Tools:
○ Ansible: Agentless tool for configuration management and
automation.
○ Python: Popular programming language for scripting automation
tasks.
○ Puppet and Chef: Tools for managing network and server
configurations.
2. APIs (Application Programming Interfaces):
○ Allow communication between different software components.
○ Types of APIs used in networking:
■ RESTful APIs
■ NETCONF (Network Configuration Protocol)
■ gRPC
3. Infrastructure as Code (IaC):
○ Concept of managing network infrastructure using code rather than
manual configuration.
○ Examples: Ansible playbooks, Terraform scripts.
Introduction to Network Programmability
● Definition: Network programmability refers to using software programming
to control and manage network behavior dynamically.
● Significance:
○ Provides flexibility to adjust network resources based on business
needs.
○ Supports automation of repetitive tasks.
Key Components of Network Programmability
1. SDN (Software-Defined Networking):
○ Separates control plane (decision-making) from data plane
(forwarding).
○ Centralized control using SDN controllers like OpenDaylight or Cisco
APIC.
2. Protocols for Programmability:
○ OpenFlow: Protocol for SDN communication.
○ NETCONF/RESTCONF: For device configuration.
3. Model-Driven Programmability:
○ Uses YANG models to describe the network configuration.
○ Tools: Cisco NSO (Network Services Orchestrator).
4. Telemetry and Monitoring:
○ Use real-time data to monitor network health.
○ Examples: Cisco Streaming Telemetry, SNMP.
Automation in Cisco Environments
1. Cisco DNA Center:
○ Centralized management and automation platform.
○ Features: Intent-based networking, real-time telemetry, network
assurance.
2. Cisco DevNet:
○ Developer platform with APIs, SDKs, and tools for network
automation and programmability.
3. Cisco EEM (Embedded Event Manager):
○ Enables automated responses to network events.
4. Cisco NETCONF/YANG:
○ Allows programmatic configuration of network devices.
Key Python Libraries for Networking
● Netmiko: Simplifies SSH connections to network devices.
● NAPALM: Abstraction library for managing network devices.
● Paramiko: SSH library for remote connections.
● Requests: For making REST API calls.
Common Use Cases of Network Automation
1. Configuration Management: Automating device configurations to ensure
consistency.
2. Network Monitoring: Real-time alerts and data collection.
3. Troubleshooting: Automated diagnostics to identify and resolve issues.
4. Device Upgrades: Streamlined software upgrades across multiple
devices.
Best Practices for Network Automation
● Start small with automation tasks and gradually scale up.
● Maintain version control for automation scripts (e.g., using Git).
● Test scripts in a lab environment before applying to production.
● Document all automation workflows.
Challenges in Automation and Programmability
● Complexity: Requires understanding of both networking and programming.
● Security Risks: Automating access to devices can pose risks if not
handled securely.
● Tool Selection: Choosing the right tool for specific tasks.
Conclusion
Network automation and programmability are integral to modern networking,
enabling efficiency, flexibility, and scalability. CCNA-certified professionals should
familiarize themselves with tools, protocols, and concepts to stay relevant in the
evolving industry.