Device Programmability means the ability to configure, control, and manage network devices (like routers, switches, firewalls) using software or code, rather than logging in manually and typing CLI commands.
In short β
π Itβs how network automation happens.
Instead of an engineer configuring 100 devices manually, scripts or automation tools push configurations automatically using APIs or programmable interfaces.
βοΈ Traditional Networking vs Programmable Networking
| Feature | Traditional Networking | Device Programmability |
|---|---|---|
| Configuration Method | Manual CLI (per device) | Automated using scripts/APIs |
| Speed | Slow and error-prone | Fast and consistent |
| Scalability | Difficult for large networks | Easily scales to hundreds/thousands of devices |
| Control | Device-specific | Centralized and programmable |
| Adaptability | Static | Dynamic (policy-driven and responsive) |
π§© How Device Programmability Works
Modern network devices support APIs or data models that allow software (like SDN controllers or automation tools) to communicate directly with them.
Typical workflow:
- Automation script/tool (e.g., Python, Ansible) sends configuration commands.
- The device API/agent interprets and applies the change.
- The device returns a response/status (success/failure, interface info, etc.).
- Software can verify, rollback, or update further based on feedback.
π§± Key Building Blocks of Device Programmability
1. APIs (Application Programming Interfaces)
- Enable communication between applications and devices.
- Most common: REST APIs, NETCONF, gRPC/gNMI, SNMP (legacy).
2. Data Models
- Define how device configuration/state is structured.
- Common models: YANG, JSON, XML.
3. Transport Protocols
- Define how data is exchanged between systems.
- Examples: HTTP/HTTPS, SSH, TLS, gRPC.
4. Automation Tools
- Tools/libraries to implement programmability:
- Ansible (declarative, YAML-based)
- Python scripts (with Paramiko, NAPALM, Netmiko)
- Terraform (for infrastructure as code)
- Cisco NSO / Juniper PyEZ / FortiManager APIs
π Common Device Programmability Interfaces
| Protocol | Type | Description |
|---|---|---|
| NETCONF | XML-based | Standard IETF protocol for configuration management using YANG models |
| RESTCONF | HTTP-based | Lightweight interface using REST and YANG |
| gRPC/gNMI | Binary protocol | High-performance API for telemetry and configuration |
| SNMP | Legacy | Used for monitoring, not ideal for configuration |
| CLI over SSH | Script-based | Basic automation using Python (Netmiko, Paramiko) |
π§° Example: Using Python for Device Programmability
Hereβs a simple Python example using Netmiko to configure a Cisco router:
from netmiko import ConnectHandler
device = {
"device_type": "cisco_ios",
"host": "192.168.1.1",
"username": "admin",
"password": "cisco123",
}
conn = ConnectHandler(**device)
config_commands = [
"interface GigabitEthernet0/1",
"description Connected_to_Firewall",
"ip address 10.1.1.1 255.255.255.0",
"no shutdown"
]
conn.send_config_set(config_commands)
conn.save_config()
conn.disconnect()
β This script logs into a router, configures an interface, and saves the configuration β automatically.
π Benefits of Device Programmability
- Automation β Save time and reduce manual errors
- Scalability β Manage thousands of devices centrally
- Agility β Respond quickly to network changes or failures
- Consistency β Enforce uniform policies and configs
- Integration β Connect network with cloud, security, and monitoring systems
π§© Real-World Use Cases
- Network configuration automation
- Zero-touch provisioning (ZTP)
- Telemetry and monitoring
- Policy-based routing and QoS
- Dynamic firewall or ACL updates
- SDN integration and orchestration
ποΈ Vendors Supporting Device Programmability
- Cisco β NX-OS, IOS-XE, IOS-XR (NETCONF/RESTCONF/gNMI APIs)
- Juniper β Junos with PyEZ, NETCONF, REST API
- Arista β eAPI (JSON-RPC), gNMI
- Fortinet β REST API, Ansible collections
- VMware NSX, Palo Alto, Huawei, and others β all provide API-based programmability.
π§ Summary
| Concept | Description |
|---|---|
| Definition | Ability to configure/manage devices via APIs or scripts |
| Goal | Automate and simplify network operations |
| Protocols | NETCONF, RESTCONF, gNMI, SNMP |
| Languages/Tools | Python, Ansible, Terraform |
| Benefits | Automation, consistency, scalability, agility |
Leave a comment