/r/networkautomation

Photograph via snooOG

A community for sharing knowledge and engaging with a growing community of network automation specialists.

/r/networkautomation

6,948 Subscribers

1

Am So confused

I have excellent experience in wireless as well as in the field of communications via satellite and networks. After that, I learned network automation and Scripting by using PowerShell Python and the Ansible . I also started learning DevOps and I feel that I am distracted and do not know what I want. What do you advise me?

2 Comments
2024/11/26
02:07 UTC

5

YANG suite on VScode (Python)

Hi all,

I’d like to ask you if you know how to run the YANG suite from vscode. I don’t know it is possible or if i necessary need docker.

Thanks :)

8 Comments
2024/11/25
21:43 UTC

5

Master Ansible Template Lookup Plugin: Pass Variables & Generate Configu...

0 Comments
2024/11/16
07:59 UTC

8

Vlan creation Automation using Ansie

Is there a way we can automate vlan creation through ansible by intigrating ansible through Snow taking inputs from snow and executing playbook

5 Comments
2024/11/12
14:25 UTC

5

how to iterate via bunch of vars using other playbook

I've a playbook (https://github.com/edvinaskairys/ansible\_various/blob/main/port\_channel\_2ints.yml) for configuring network interfaces via AWX. In ansible AWX survey mode i need to provide variables like hostname, interface, vlans.

Everything works fine, but i need to expand the playbook, that it would be able to do that when not a single pair of argument is provided, but lots of interfaces. If i want to run it manually i'm running it like that:

ansible-playbook network_port_channel.yml -i /etc/ansible/git/ansible-control/inventories/network_devices/hosts -e "full_fex_interface_number=101/1/28 port_profile_name_prior=LA2:Openstack-Nova interface_description=test hostai=LA2NET01A,LA2NET01B"

But my next goal is to make this playbook to run over a file where lots of variables will be provided. So i would iterate via that file of variables (lets say it can be .csv) and would call that playbook over them like that:

ansible-playbook network_port_channel.yml -i /etc/ansible/git/ansible-control/inventories/network_devices/hosts -e "full_fex_interface_number=101/1/28 port_profile_name_prior=LA2:Openstack-Nova interface_description=test hostai=LA2NET01A,LA2NET01B"
ansible-playbook network_port_channel.yml -i /etc/ansible/git/ansible-control/inventories/network_devices/hosts -e "full_fex_interface_number=101/1/29 port_profile_name_prior=LA2:Openstack-Nova interface_description=test2 hostai=LA2NET01A,LA2NET01B"
ansible-playbook network_port_channel.yml -i /etc/ansible/git/ansible-control/inventories/network_devices/hosts -e "full_fex_interface_number=101/1/30 port_profile_name_prior=LA2:Openstack-Nova interface_description=test4 hostai=LA2NET01A,LA2NET01B"
ansible-playbook network_port_channel.yml -i /etc/ansible/git/ansible-control/inventories/network_devices/hosts -e "full_fex_interface_number=101/1/1 port_profile_name_prior=LA2:Openstack-Nova interface_description=test5 hostai=LA2NET01A,LA2NET01B"
ansible-playbook network_port_channel.yml -i /etc/ansible/git/ansible-control/inventories/network_devices/hosts -e "full_fex_interface_number=101/1/15 port_profile_name_prior=LA2:Openstack-Nova interface_description=test6 hostai=HK2NET01A,HK2NET01B"

etc..

Seems quite easy task, i thought i would create an ansible-playbook, iterate over file and call the ansible-playbook (network_port_channel.yml) against each iteration. But seems Ansible doesn't allow to call other playbook in other playbook.

So what could be my options here ? Should i use some kind of CI/CD tool for that ?

2 Comments
2024/11/08
16:41 UTC

1

Overkill or not?

I am parsing bgp prefix sent and received, routemap metric, mroute summary and mroute count into a json format. The json formatted data is validated with static csv file of what the checks and value should be Example The csv file has 10 ip and their checks (A) 1.1.1.1,34,54,2000,524,300 Etc Etc

Now the output i got for 1.1.1.1 from router (B) 1.1.1.1,35,54,3000,5,24

The B is checked with A

I am using 2 method

Simple lookup check in A and giving output

Class SVM model algorithm on A and later pass B in model to check if there is any anomaly

Using class SVM is overkill yes or no?

5 Comments
2024/11/06
18:50 UTC

11

Automating firewall rules

Hi guys, hope you are doing well.

This is the only place I know where I might get some help with a dilemma. Let me give you some context.

The thing is, I'm working on a project to automate a couple of Fortigates using Ansible. Access method is FortiOS REST API and, so far, I've been using only Ansible modules from fortios collection. Data to load onto Fortigates is 100% gathered from YAML files in host_vars and group_vars.

I'm currently in the process of automating firewall policies and, unlike previous fortios objects, firewall rules need to follow an order to be accurate.

Policy is read from top to bottom as you all know

Even though fortios.firewall_policy module has capabilities to move policies, I couldn't find a way to take advantage of that and make it work.

I'm thinking of using Ansible URI module to send a HTTP PUT with all firewall rules at once, sorted as they need to be. Of course, having created the new rules first, using the fortios module.

Having explained that, what do you guys think about using URI module with PUT method? Is it a bad practice? Has anyone tried to automate firewall rules? How did you sort firewall rules? Do you know a page with real-world examples? (Not tutorials but production grade playbooks/roles/tasks examples with Fortigates)

Moving away from fortios modules doesn't make me feel comfortable but it seems like the only way forward I can see.

Thanks in advance for your help.<br>

EDIT: I tried using PUT but it didn't work. The resource /api/v2/cmdb/firewall/policy/ doesn't accept that HTTP method, PUT is accepted only on paths /api/v2/cmdb/firewall/policy/{policyid}. So, my idea of loading all rules at once is not valid. 👎

9 Comments
2024/11/02
03:57 UTC

10

common task(-s) to automate ?

Hi folks,

I want to ask, what are the most typical task that you automate in your company ? or you wish it's automated ?

I did some automation and it's usually:

- configure interface/subinterface

- configure subnet

- get IP-address/mac-address from device

I'm curios, what are the tasks that you usually automate? or what things are not explained well on the internet from Python ?

10 Comments
2024/10/31
20:19 UTC

4

When to start diving into network automation?

I've started learning Python from the ground up, and want some advice on when to start diving into more network automaton focused learning.

I'm around half way into Python crash course, and am itching to start playing with some of the networking library's, and netmiko. For now this is simply for my own learning, as I have a few ideas on small tools to build for myself to help me with my day job. I'm currently working on ENARSI, but later would like to try to down the devnet path, or at least the associate.

Is this book (or at least the 1st half) enough of a foundation from which I can start applying it to network stuff? Basically I wanted to ensure I have a decent grounding in the basics before I go down the network automation path.

5 Comments
2024/10/30
21:05 UTC

3

Ansible RegEx Search Filter Tutorial: How to Parse Configuration | Creat...

0 Comments
2024/10/26
14:19 UTC

23

Learning network automation

Hey guys recently had an interview with meta interviewer, it didn’t go as expected . I have 3 years of network engineer experience but I lack in network automation . Can anyone help me where to start from scratch

25 Comments
2024/10/25
18:56 UTC

1

Get OLTs Alarm ID using python

Hello everyone, I'm currently working on setting up an environment for alarm monitoring from several OLTs using the TL1 protocol. However, I’ve noticed that not all alarm IDs are available in TL1. Does anyone have alternative suggestions for creating a monitoring environment for this purpose? Thank you!

4 Comments
2024/10/25
06:34 UTC

5

Ansible Can’t SSH into Cisco SMB Devices - Need Help!

Hey everyone,

I’ve been wrestling with an issue that’s been bugging me for a while, and I haven’t been able to resolve it yet. Whenever I try to SSH into a Cisco CBS or SG 300 switch without the ip ssh password-auth command, Ansible fails to establish an SSH connection. I even tried using Paramiko for SSH, but no luck there either.

I also wrote a Python script using Pexpect to inject that command, but running the script with both Pexpect and the threading module led to an unintended management plane lockout — which was a headache!

Has anyone encountered a similar problem or found a workaround? Any advice would be much appreciated!

10 Comments
2024/10/12
03:42 UTC

12

Some resources for learning network automation

I’m a network engineer trying get into network automation. I have knowledge using push JSOn/XML files to SDNs. I also knowledge of creating some python scripts to generate config files. But I need some automation resources to learn Ansible and python. Also some example work cases that I can utilize automation for.

8 Comments
2024/10/07
02:28 UTC

21

Network automation book?

Hello, I have a CCNA and work a networking job at the moment, so I believe I have a good foundation in networking but wanted to look into network automation. I do not have time at the moment to go after a certification but was wondering if anyone could recommend a book to get a good overview of the different aspects of network automation. I have played around with different API's and Python with the help of AI but want to get a better overall understanding, any books good to start with for foundation?

8 Comments
2024/10/02
17:00 UTC

3

Ansible Tutorial: Zip filter for combining config data structures Cisco Example

0 Comments
2024/09/22
07:54 UTC

17

Share some scripts you use!

Let's see your most useful script. Doesn't have to be directly related to networking.

12 Comments
2024/09/20
11:55 UTC

0

Exploring the Potential of L4S and Wi-Fi 7 in Reducing Latency

Hey r/networkautomation , I wanted to share some findings from our recent research at Excentis, where we've been digging deep into low-latency technologies. We've been exploring L4S (Low Latency, Low Loss, and Scalable Throughput) alongside Wi-Fi 7 to see how they impact network performance.

Our latest case study paper, "Is L4S the Real Latency Killer?", is the result of collaboration with Nokia Bell Labs. We put their access point to the test to see how L4S performs in a Wi-Fi network environment. We built our setup in layers, starting with basic Wi-Fi 6 configurations and gradually incorporating Dual-Queue Coupled AQM (DualQ AQM) to evaluate L4S performance. We also configured latency-optimized EDCA/WMM parameters at the MAC layer for further analysis.

If you're interested in low-latency networking and want to dive into the details, feel free to check out our case study paper.

Would love to hear your thoughts or experiences with L4S or other low-latency technologies!

3 Comments
2024/09/20
07:47 UTC

6

Launch Alert: Simplify Network Automation with NetworkFlow!

We are thrilled to announce the launch of our new website, networkflow.co.nz! 🎊

At NetworkFlow, we're committed to making network configuration automation easier and more efficient for you. Our site now features a powerful tool that leverages Jinja2 and flow charts to quickly generate network configuration templates. Say goodbye to manual configurations and hello to streamlined automation! 🌐

🔧 Key Features:

  • Jinja2 Integration: Easily create and manage configuration templates with Jinja2.
  • Flow Charts: Visualize and automate network setups using intuitive flow charts.
  • Simplified Automation: Reduce errors and save time with our user-friendly tools.

Explore our website today and see how we can help you simplify your network automation processes. We're excited to support you in achieving seamless and efficient network management!

🔗 Visit networkflow.co.nz to get started.

https://preview.redd.it/m8k0ux7kvgpd1.png?width=1484&format=png&auto=webp&s=9f8e180bef4f34a8b18620c60434647f0b0ead21

0 Comments
2024/09/18
01:01 UTC

29

Network Automation

This topic seemed to gain traction, but how much ? I've never seen REAL automation on enteprises market, maybe they do it in big Cloud providers, and ISPs for very repetitive tasks. They have the need, the knowledge, the money. And of cource big software companies (Google, Meta, Microsoft), I believe they had SDN much more than marketing started talking about it.

On enteprises we can maybe see some config templating done with Fortimanager, DNAC tools. Not everybody uses them. But just to make an example, if you need to connect and gather the output of a few show commands, you still need to do it manually or write your own scripts.

13 Comments
2024/09/06
08:23 UTC

3

Cisco AutoInstall will not write to memory

Hello,

At work we are currently trying to automate switch firmware upgrades using AutoInstall on a Cisco 9200L.

The issue we're facing is at the end of the sequence no matter what mode or command we use it will not write to memory but the upgrade itself seems to work.

Does anyone here have any experience in trying to automate switch upgrades using AutoInstall and could maybe give some insight?

Thanks! :)

3 Comments
2024/09/05
07:02 UTC

6

Struggling to find a thesis project idea (I am completely new to network automation)

Hello guys,

For some context, I am currently enrolled in a network automation academy where we have been thought about computer networks from scratch by doing the first 2 CCNA modules (ITN & SRWE).

We are about to finish the second module and then start doing network automation.. Considering these experiences, I am looking towards doing a network automation project for my final undergrad thesis project. The problem is that I have to specifically choose the project topic really early, before I start the network automation part of the academy I am enrolled in, so I don't know what I could actually do.

I am thinking about creating a python application with a GUI that would allow users to automatically create and configure topologies in GNS3.

Do you guys have any suggestions? TL;DR: I want to do network automation for my final undergrad thesis, but I don't know what project to choose as I have yet to gain any experience in Network Automation

3 Comments
2024/09/01
22:46 UTC

30

Network Automation Landscape

Hey gang, here is a [work in progress] landscape of the network automation tooling, projects, and products etc.

https://steinzi.com/network-automation-landscape/

Codes over on GitHub, feel free to send a pull request and add whatever!
https://github.com/steinzi/network-automation-landscape/

3 Comments
2024/08/28
15:17 UTC

3

Is eNMS still alive?

I've recently come across eNMS which looks like it has the potential to be a really interesting tool.

Has anyone played with it? If so, any comments?

Also; I note that activity on the public github repo has fallen off a bit of a cliff recently. Anyone have any insight on whether this is still an active project, or has the author move on?

0 Comments
2024/08/25
19:57 UTC

5

Audit net config

I have a Jinja template that I use to configure 100 SRX firewalls. Now, I need to audit all 100 SRX devices to check if they are compliant with the template. I regularly use Python, pytest, Batfish, and Nornir, so I can find a solution, but I'd like to see how you would approach this problem? I want to avoid to write iper complicate test.

13 Comments
2024/08/19
19:13 UTC

3

Ansible json_query filter : Efficiently filter JSON data using JMESPath

0 Comments
2024/08/18
08:15 UTC

5

Live/Instructor-led network automation training

Hi,

I've read a few similar posts about general training on here and the r/networking sub but I haven't seen anything specifically for live/instructor-led training.

I learn best with live training, ideally in-person but that ain't gonna happen anymore (thanks, COVID). My networking and python knowledge is sound but I really don't mind going over fundamental python stuff again because there's likely something small or relevant to network automation that could be very helpful. i.e. all skill-level recommendations welcome.

What are the recommendations for live training?

I've had my eye on the Network to Code courses, particularly the Network Programming & Automation course. I've also seen recommendations for Packet Coders Network Automation with Python Bootcamp, and it looks good. It looks like they cover different topics so I'll likely plan to do both.

Thanks

7 Comments
2024/08/06
08:43 UTC

3

Ansible TextFSM CLI Parser: Easily parse Device show commands using TextFSM regex | Cisco Example

0 Comments
2024/08/04
07:35 UTC

3

advise on how to automate a bunch of Opengear IM7248's

2 Comments
2024/08/01
04:29 UTC

1

Transport Error/Saw EOF

Hi Guys,

While trying fetch output from the device, getting Authentication Failed : Transport Out or Saw EOF error. Any idea what is that error or how to fix that?

0 Comments
2024/07/29
12:04 UTC

Back To Top