Introduction to Batfish
What is Batfish?
Batfish is an open source network analysis tool. It takes configuration files (snapshots) from network devices and then creates a vendor agnostic data model that you can interrogate offline to validate network changes before you make them.
Batfish can also rebuild the control plane and routing table offline so you can query that to see if any network changes will affect the routing table.
It also works for firewall rules and you can query if a network change for example will block access to a key application.
This is really just scratching the surface of what Batfish can do, so let’s install it and start looking at some simple examples.
Also, as Batfish can run offline it makes it great to add into a CI pipeline to validate changes before they are deployed.
The latest Batfish documentation can be found here:
Batfish runs as a container so you just need a machine that supports Docker, for this Batfish tutorial I will be using Ubuntu 22. It is also recommended that you also install Pybatfish in a virtual environment.
- Install Docker
- Install Batfish
- Create a virtual environment
- Install PyBatfish
- Upgrade Batfish
There are two versions of Batfish, a lightweight version and one that comes with Jupyter notebook. For this tutorial we are going to install the full (allinone) version.
docker pull batfish/allinone
To run Batfish just enter this command
docker run --name batfish -v batfish-data:/data -p 8888:8888 -p 9997:9997 -p 9996:9996 batfish/allinone
Setting up Batfish for network analysis and configuration validation
Using Batfish to troubleshoot network issues
Ansible & Batfish
Batfish vs PyATS
Batfish enterprise was the GUI front ended enterprise supported version of Batfish managed and maintained by Intentionet. However it has since been discontinued as Batfish was acquired AWS in 2022 and the future of Batfish Enterprise at this point is unclear.
Leveraging Batfish for configuration management and deployment
Advanced Batfish features for large-scale network management
Case study: Using Batfish to streamline network operations at XYZ Company
Best practices for using Batfish in network automation workflows
A comparison of Batfish with other network automation tools
Real-world use cases of Batfish Network Automation in action
Frequently asked questions about Batfish and network automation
- Introduction to Batfish Network Automation
- Benefits of using Batfish for Network Configuration Verification
- How Batfish helps in Network Auditing and Troubleshooting
- Using Batfish for Multi-Vendor Network Environments
- Real-world use cases of Batfish Network Automation in action.
What is Batfish used for?
Batfish finds errors and guarantees the correctness of planned or current network configurations. Batfish was originally developed by researchers at Microsoft and provides validation of network configurations from an offline data model. It has now been purchased by AWS