What is network automation and infrastructure as code?

Why Interviewers Ask This

Interviewers ask this to evaluate whether you have the depth of knowledge needed to mentor others and lead technical decisions. The expected answer goes beyond definitions into practical implications and real-world consequences.

Answer

Network automation uses software to provision, configure, test, and operate network devices — replacing manual CLI work. Benefits: speed (minutes instead of hours/days for changes), consistency (no human error, same configuration everywhere), scalability (manage hundreds of devices as easily as one), and audit trails (track all changes via version control). Tools: Ansible (agentless, YAML playbooks, most popular for network automation — uses SSH and APIs to configure Cisco, Juniper, Arista, etc.), Python with Netmiko/NAPALM (Netmiko for SSH connections, NAPALM for multi-vendor abstraction), Terraform (infrastructure as code — provision cloud networking resources declaratively). Infrastructure as Code (IaC) treats network configurations like software — stored in Git, peer-reviewed, tested, and deployed through CI/CD pipelines. Model-driven programmability: YANG data models, NETCONF/RESTCONF protocols replace CLI for network configuration. This is the future of network operations.

Common Mistake

A common mistake is memorizing definitions without understanding implications. When asked this question, go one level deeper — explain what happens when this concept is misused or ignored.