An EOS agent to dynamically update IRR based prefix-lists
Project description
Prefix-list Agent for Arista EOS
Periodically retrieve data from the IRR and build prefix-list objects on EOS.
Overview
The PrefixListAgent
is an EOS SDK based agent that runs under ProcMrg
on an
Arista EOS based device or VM.
The agent maintains up-to-date prefix-list policy objects for use in EOS routing policy configurations, based on data in the IRR.
The agent will periodically check the running configuration of the device to gather a list of prefix-lists that it is responsible for maintaining. It will then retrieve the required data from the IRR via an RPTK web service, and update the prefix-lists without calling the EOS config parser.
Installation
From RPM (recommended)
Install the agent as an EOS extension:
ar#copy https://github.com/wolcomm/eos-prefix-list-agent/releases/download/0.1.0a8/prefix_list_agent-0.1.0a8-1.noarch.rpm extension:
ar#extension prefix_list_agent-0.1.0a8-1.noarch.rpm
ar#sh extensions
Name Version/Release Status Extension
----------------------------------------- ------------------ --------- ---------
prefix_list_agent-0.1.0a8-1.noarch.rpm 0.1.0a8/1 A, I 1
A: available | NA: not available | I: installed | NI: not installed | F: forced
Persist the extension to be installed on boot:
ar#copy installed-extensions boot-extensions
Copy completed successfully.
ar#sh boot-extensions
prefix_list_agent-0.1.0a8-1.noarch.rpm
Using pip
This method is not recommended unless you know what you are doing. Without additional configuration, the installation will not persist across reloads.
Drop to the shell:
ar#bash
Install from PyPI:
$ sudo pip install prefix-list-agent
Agent Configuration
Daemon
Configure the agent as an EOS "daemon":
ar#conf t
ar(config)#daemon PrefixListAgent
ar(config-daemon-PrefixListAgent)#exec /usr/bin/PrefixListAgent
Tracing
Enable tracing using the EOS agent tracing infrastructure, e.g.:
ar(config)#trace PrefixListAgent-PrefixListAgent setting PrefixList*/0-6
Set Configuration Options
Set configuration options using the command:
ar(config-daemon-PrefixListAgent)#option <option-name> value <option-value>
Available configuration options are:
-
rptk_endpoint
(default:None
, required):The RPTK web service endpoint to connect to when retrieving prefix-list data.
-
source_dir
(default:/tmp/prefix-lists
):The local directory to write prefix-list files to.
-
refresh_interval
(default:3600
):The interval between prefix-list updates.
Start the Agent
ar(config-daemon-PrefixListAgent)#no shutdown
Prefix-List Configuration
The PrefixListAgent will check the running configuration for source-based prefix-lists matching the form:
ip[v6] prefix-list ${irr_object} source file:${source_dir}/${policy}/${file_name}
Where:
${irr_object}
: The IRR object (aut-num
oras-set
) to build the prefix-list from.${source_dir}
: The configuredsource_dir
, as above.${policy}
: The resolution policy to use when resolving the IRR object to a prefix-list. Must be a valid policy available on the RPTK web service. You can check the available policies with:
$ curl -q ${rptk_endpoint}/policies | jq
${file_name}
: The file to write the resulting prefix-list data to. This name should be unique per resolution policy.
After the next update, you should be able to see the entries with:
ar#show ip[v6] prefix-list ${irr_object} detail
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file prefix_list_agent-0.1.1.tar.gz
.
File metadata
- Download URL: prefix_list_agent-0.1.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5751cf9ca0c6602dd08cfe612fcf93964bdf0eee8e5932e78b55d4eb925c2a7b |
|
MD5 | 4910efbc940b5803c653e799f9c26a55 |
|
BLAKE2b-256 | 1052389017e7ea8edb5ce2469552c18b7b8465f6c08dae4492d0c036a119139f |
File details
Details for the file prefix_list_agent-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: prefix_list_agent-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd81fef4b61aeeab180c6d20bb011ac7e0ec5c2ed2f7fddca2307dcd86d947c8 |
|
MD5 | 35f3fe6c67f24b3049bf0819e1faa7e0 |
|
BLAKE2b-256 | 9af45ad151b210d4450b96dc1f010eef08d9dba8dbb625cad243a4195a97e362 |