Network Automation Flashcards
Disadvantages of Manual Configuration of Network Hardware Using CLIs
- Lots of Typing
- Prone to Errors
- Inconsistencies
- Infeasible for large networks; scaling can be slow
- Multi-vendor Environments with Different Syntaxes
Python Scripts for Configuration of Network Hardware
- Automates set up
- Code can easily be reused
- One scripts won’t account for different syntaxes
Phases of Automation
Provisioning: Initial configuration of new hardware. Automated through
- Plugging in a console cable and running a script
- Detecting DHCP requests and firing automatic network configuration
Configuration Management: Ensures configurations remain constant
Lifecycle Management: Data collection, monitoring, application of patches/updates
Ansible
Open-source Automation Tool
- Agentless: No client software to be installed on nodes, it runs commands over SSH
- Playbooks: Define tasks in YML
- Idempotent: Changes only made if necessary, only runs necessary commands, wont update device with correct config
- Push-based Model: Devices cannot request config, Ansible must SSH and provide it
Ansible Components
Inventory: A list of managed nodes
Playbooks: YAML files that define tasks to be executed on managed nodes
Roles: Reusable units of tasks and configs shareable across multiple playbooks
Modules: Predefined units of code that perform specific tasks. Modules exist for vendor specific devices
Playbooks Version Control
Provides change history of network configuration
Allows for auditing
Intent-based Automation
Defines high-level network policies and behaviours using intent.
Translates business intent to realisable configuration
- Automates provisioning, optimisation and troubleshooting
NETCONF
Protocol for managing network devices through programmatic interface
- Uses SSH
YANG
Modelling language that describes network objects and configurations in an XML tree format
RESTCONFIG
A programmatic interface for accessing data defined in YANG using concept defined in NETCONF
- HTTP based method for switch configuration using data from YANG