Category: Network Automation
-
SRX Performance Testing
For a project, I had to gather data in order to measure the SRX performance under different traffic loads. This was done for a SRX chassis system in cluster mode. The following commands were utilized in order to capture metrics when the system was subjected to traffic load: show system uptime show system statistics show chassis […]
-
Ansible – Cisco Config Implementation
The goal of this article is to explain configuration implementation on Cisco IOS after the config has been generated as shown in Ansible Config Generator III: config-implementation.yml — – hosts: switch gather_facts: true connection: local tasks: – name: OBTAIN LOGIN CREDENTIALS include_vars: secrets.yml – name: DEFINE PROVIDER […]
-
Ansible – Config Generator III
For Part I & Part II of this series. The goal of this playbook is to be able to generate unique configuration for each switch. In this case, we are configuring a port to work as an access-port for a specific vlan. The port and vlan variable is different for each switch. config-gen.yml — – […]
-
Ansible – Config Generator – II
For the first part of this series, check this – 1st part of this series. — – hosts: local connection: local gather_facts: no tasks: – name: GET DATA include_vars: ./host_vars/file.yml – name: GENERATE CONFIG template: src: ./SVI.j2 dest: ./{{ item.vlan }}.conf with_items: “{{ file_vlan }}” This […]
-
Ansible – Config Generator – I
Before proceeding, make sure to install “netaddr” as this is required for “ipaddr()” used in the Jinja2 configuration template. pip install netaddr aggr.yml is the playbook that will be utilized for generating L3 SVI configuration: — – hosts: local connection: local gather_facts: no tasks: – name: GENERATE CONFIG template: src: ./SVI.j2 dest: ./{{ item.vlan }}.conf […]
-
Ansible – Encrypting Password
Basic Ansible automation playbook provides a method for accessing Cisco IOS devices and executing “show commands”. The “secrets.yml” file contains the username and password in plain-text. ansible-vault can be utilized to encrypt the “secrets.yml” file. Encrypt a file using ansible-vault: ansible-vault encrypt secrets.yml View the contents of an encrypted file: ansible-vault view secrets.yml Decrypt a […]
-
Ansible – Basic Playbook
The goal of this post is to provide you with a simple way to utilize Ansible 2.x and obtain data from Cisco IOS devices by running “show” commands. Github Reference. Ansible Installation: Before starting, make sure you have ansible installed. Create a working directory: mkdir ansible_play cd ansible_play Create the following 4 files within the […]
-
Ansible – Installation
If you have root access to your box, you can utilize the following link in order to install Ansible. I would recommend Ansible 2.1 & later version if your goal is to utilize Ansible as a Network Automation tool. Creating a Virtual Environment with Ansible: If you don’t have root access to the bastion host […]
-
F5 – Automating CLI Execution
Purpose: This is a really simple way to automate CLI command execution on multiple F5 devices using Bash & TCL scripting. The scripts have been tested on a linux and a mac machine. How to use it: There is a bash script (F5_Bash_v1) that is utilized to collect the username/password for F5 access. A text […]