eNMS is an open source web application designed to help automate networks.
It encompasses the following aspects of network automation:
- Configuration management: commit/rollback of a configuration via NAPALM.
- Netmiko scripting: using netmiko to push a configuration, or display the result of a set of commands.
- Ansible support: sending and managing ansible playbooks.
- Scheduling: any task can be scheduled to run at a specific time, periodically or not.
While network automation traditionally requires scripting skills, eNMS provides a way to automate networks graphically, in a few simple steps:
- Creation of the network (e.g by importing a spreadsheet describing the network topology)
- Visualization of the network on a world map, or via a force-based algorithm.
- Selection of the target devices, on the graphical view.
- Scheduling of the script.
Please note that it is still in beta version and the master branch is undergoing major changes, which are not yet reflected in the readme.
Read the docs for more up-to-date information
Join us on the Network to Code slack, channel #enms for the latest updates !
You can find a demo of eNMS here !
Nodes and links can be created in two ways:
- one by one by specifying all properties manually, in the Object creation page.
- by importing an Excel file with one sheet per type of object. Examples of such Excel files are available in the /project folder.
Once your objects have been created, you can go to the Overview page. All objects are displayed in a sortable and searchable table.
The dashboard displays pie charts for any property. You can select, for both nodes and links, which properties are displayed as pie charts in the dashboard.
Network visualization is of paramount importance for quickly understanding the network topology. There are two ways of visualizing the network in eNMS:
- Geographical view: you can display the network in 2D or 3D, with Open Street Map or Google Map. A clusterized view is also available for large networks (> 10K nodes), for scalability.
- Logical view: the geographical view only makes sense if we have all GPS coordinates: it is not always the case. The logical view uses a graph-drawing algorithm to display the network in an aesthetically pleasing way.
Networks can be exported on Google Earth from the geographical view: the resulting file is stored in the /kmz folder.
eNMS uses PuTTY to automatically establish an SSH connection to any SSH-enabled device from the web interface. Your credentials are automatically provided to PuTTY for faster login.
There are four types of task in eNMS:
- Netmiko configuration task: list of commands to configure the device (plain text or Jinja2 template).
- Netmiko show commands task: list of “show commands” which output will be displayed in the task logs.
- NAPALM configuration task: partial or full configuration (plain text or Jinja2 template).
- NAPALM getters: list of getters which output will be displayed in the task logs.
For each task, you can select a list of target devices. A script is sent to all target devices at the same time, with multiple processes (multiprocessing
library).
Note: netmiko has a linux driver, which means that eNMS can also be used on Unix servers.
eNMS also provides some scheduling functions:
- Start date: instead of running the task immediately, the task will start at a specific time.
- Frequency: the task will be run periodically. This is especially useful for tasks that pull some information from the device, i.e netmiko show commands / NAPALM getters tasks.
- Create a script in the Script creation page.
- Set the script parameters (netmiko driver, global delay factor, target devices).
For complex scripts, it is best to use Jinja2 templating language:
- Write a Jinja2 template in the Script creation page.
- Import a YAML file that contains all associated variables. eNMS will take care of converting the template to a real text-based script.
NAPALM is an automation framework that provides a set of functions to interact with different network device Operating Systems using a unified API. NAPALM can be used to change the configuration (merge or replace), either via a plain text script or a Jinja2-enabled template.
Note: the NAPALM driver used by eNMS is the one you configure in the "Operating System" property of a node.
For NAPALM to work, you should respect NAPALM drivers syntax: ios, iosxr, nxos, junos, eos
You can schedule a task to retrieve the output of a list of commands (show, ping, traceroute, etc) periodically. The result is stored in the database and displayed in the logs of the task, in the Task management page.
You can also schedule a task to retrieve a NAPALM getter periodically.
For all periodic tasks, you can compare the results between any two devices, at two different times.
The comparison result is displayed with two methods:
- A unified diff: show just the lines that have changed plus a few lines of context, in an inline style. (like Git)
- A ndiff: list every line and highlights interline changes.
The user can filter the objects available in the GUI by searching for specific value for each property. For each property, the user can choose to use a regular expression instead of a hardcoded value: regexes allows for specific search like a location or an IP subnet.
In the following example, we use the regexes [france|spain]
for location
to filter all objects that are not in France or in Spain, as well as the regex [Router|Switch]
for type
to filter all nodes that are neither a router, nor a switch.
Note that filters apply to everything in eNMS that uses objects: dashboard, object deletion, geographical and logical views, task scheduling, etc. You can use them to visualize or send to script to a specific subset of devices.
Let's imagine that you want to send a script to all routers with IOS 12.4(24)T or IOS 12.4(11)T. By default, all devices will be displayed in the netmiko / napalm script scheduling page.
The first step will be to filters the nodes:
- go to the Object filtering page
- set the "Operating System" to
IOS
- set the "OS version" to
12.4\((24|11)\)T
- tick the regex box for the "OS version" parameter
- apply the filter
After that, in the netmiko / napalm scheduling page, only the devices that match those criteria will be displayed: all devices in the multiple selection box can therefore be selected as target devices.
It is possible to configure a TACACS+ server in eNMS: upon authentication, a request will be sent to the server to check the credentials and log in the user.
(Optional) Set up a virtual environment
git clone https://github.com/afourmy/eNMS.git
cd eNMS
pip install -r requirements.txt
cd source
python flask_app.py
4. Go the http://127.0.0.1:5100/
docker pull afourmy/enms
docker images
docker run -p 5100:5100 image_name
For any feedback, advice, feature request, join us on the Network to Code slack (channel #enms)