Network Programming and Network Programmability
Network Programming and Network Programmability
There is a distinct difference between network programming and network programmability.
Network programming is classified as using programming languages and software tools to develop applications that interact with network devices.
Network programmability is the capability of a network to be controlled and configured via software, enabling automation and orchestration of network behaviour.
A good analogy would be:
Network programming is like building a race car – you’re coding how it communicates and performs, whereas network programmability is like designing the racetrack and traffic system – you’re controlling how the whole environment operates.
Here's a more detailed breakdown:
Network Programming:
Focus: Developing software (applications, scripts, etc.) that interfaces and interacts with network devices, such as; routers, switches, and servers.
Tools: The tools in question here are programming languages (e.g. Python, Java, C++, etc.), APIs, and network protocols.
Purpose: The intention is to build applications which are capable of managing network devices, automating tasks, or to develop new network-based services.
Example: A Python script can be created to configure a router automatically, or to build a web application to monitor network traffic, or to develop a software-defined networking (SDN) controller.
Network Programmability:
Focus: Enabling a network to be controlled and configured via software, facilitating; automation, orchestration, and the programmability of network devices.
Tools: Orchestration frameworks, APIs and scripting languages.
Purpose: The automation of network tasks, thus enabling centralised control, whilst improving network performance and security.
Example: Dynamically route traffic based on real-time network conditions using a SDN controller, or automate routine tasks such as software updates, or new service deployments by deploying a network automation platform.
Key Differences:
Scope: Network programming focuses on individual applications or scripts, whilst network programmability encompasses the entire network infrastructure.
Level of Abstraction: Network programming more often than not deals with lower-level details, whilst network programmability provides high-level interfaces for interacting with the network.
Control: Network programming typically involves individual applications interacting with the network, whilst network programmability facilitates centralised control and orchestration of the behaviour of the network.
Benefits: Network programming enables customer solutions and new services to be deployed, whilst network programmability offers benefits such as improved automation, flexibility and efficiency.
So how do I know which tools to use?
You will certainly use different tools and languages, depending on whether you are focusing on network programming or network programmability.
Network Programming Languages
Here is a list of some of the top recommended network programming languages. Note the list is not exhaustive and will be dependent on individual preferences.
Perl: Perl has been around for a long time and is still popular in development environments. It is capable of managing networks, systems and web servers effortlessly. In fact, its popularity rose as more and more services moved to the internet, with Perl’s ability to execute programmes on web servers to dynamically generate websites.
Bash: Bash is the native shell of Unix-based systems, including Linux and macOS. Bash is the command-line interface (CLI) that enables admins to execute commands using highly intricate syntax to automate system processes, regardless of whether they are commonly performed tasks, or maintenance cycles, such as upgrades and automating system setup tasks to ensure systems are all configured and managed in the same fashion.
TCL: (Pronounced ‘tickle’). The Tool Command Language (TCL) is among the more mature programming languages. It was born out of frustration, due to practices by developers, embedding their own languages into applications. It is a general-purpose language which is as powerful as it is simple. Benefits are native extensibility with C/C++, Java and Python, its speed and power to create anything from scripted applications to GUIs, to embedding its code into C-based apps.
Python: Python is by far the most popular programming language in use by developers today. Python has a relatively low learning curve, which, combined with robust support communities and flexible interoperability, makes it the ideal choice for developing programmes. Even though Python is commonly used for automating system administration tasks, by design, it can be leveraged via the use of plug-ins and scripts to integrate nicely into a variety of workflows, whether the focus be coding, administration, or management.
Java: Java is a high-level, object-oriented programming language known for its platform independence, meaning code can be written once and run on any device with a Java Virtual Machine (JVM). It is widely used for developing web applications, mobile apps, (especially Android), enterprise software, and more.
C++: C++ is a high-level, general-purpose programming language known for its speed, performance, and flexibility. Developed as an extension of the C language, it supports both procedural and object-oriented programming paradigms. C++ is widely used in systems programming, game development, and other performance-critical applications.
Network Programmability and Automation Tools
Several tools excel at network programmability and automation. Among the most popular are Ansible, NetBox and other tools utilising Python for network automation. These tools offer a range of capabilities, from automating device configuration, to managing complex network workflows.
Here is a more detailed look at some of the top contenders:
Ansible:
What it is: A popular open-source automation tool, known for its ease of use and agentless architecture.
Key Features: Ansible uses YAML playbooks to automate tasks, making it easy to manage devices, configure network services, and orchestrate complex workflows.
Use Cases: Automating device configurations, managing software installations, and deploying applications across multiple network devices.
NetBox:
What it is: A powerful and versatile open-source tool for managing network infrastructure.
Key Features: NetBox offers a centralised view of network devices, IP addresses, and other assets, facilitating tasks such as; provisioning, change management, and compliance.
Use Cases: Automating IP address allocation, managing network device inventory, and generating comprehensive network documentation.
Python with Libraries:
What it is: Python’s versatility and extensive libraries make it a powerful choice for network automation.
Key Features: Libraries like Napalm (Network Automation and Programmability Abstraction Layer with Multivendor support) and Netmiko provide abstraction layer for interacting with different network devices.
Use Cases: automating device configuration, parsing device commands, and generating reports on network health.
Summary
When you are considering introducing network programmability and automation into your network, evaluate as many network programming and network programmability tools as you can so you can make an informed decision regarding which tools or platforms would best suit your network environment.
Also, if you already have an Agile framework in place, it is important to decide whether the tools you choose will work with CI/CD (Continuous Integration/Continuous Delivery or Continuous Deployment) pipelines.
Senior Network Engineer @ NOV || 2x CCIE
2mo💯 👌🏾 Insightful ..