USD ($)
$
United States Dollar
India Rupee

How to start learning Automation in Networking

By Vabhya Chaterjee in 15 Oct 2023 | 02:57 pm
Vabhya Chaterjee

Vabhya Chaterjee

Student
Loyal User
Forums Top User
Posts: 5
Likes: 4
Member since: 27 May 2023

This is my first job as a network engineer. I completed ccna and after giving many interviews I got my first job in HCL as an L1 engineer. Here I came to know many new technologies which I am not aware of including automation. Please let me now hw to learn automation. I want to grow my career towards network automation.

15 Oct 2023 | 02:57 pm
0 Likes
Charlie yadhu

Charlie yadhu

Student
Loyal User
Posts: 3
Likes: 3
Member since: 5 Jul 2023

Hey, you need to understand the fundamentals of python first, no need to be an expert in python. Start couple of very short scripts in python. Then take a networking script and understand it and edit as per your usage. Play with more and more scripts and Once you are fine with understanding and modifying python as per your requirement. This is what you are required to do. Here is an example

To log in to a Cisco router via SSH using Python, you can use the paramiko library, which provides SSH functionality. Here's a basic Python script to achieve this:


import paramiko


# Define the SSH parameters

host = "your_router_ip"  # Replace with your router's IP address

port = 22  # Default SSH port

username = "your_username"  # Replace with your SSH username

password = "your_password"  # Replace with your SSH password


# Create an SSH client

ssh = paramiko.SSHClient()

ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())


try:

    # Connect to the router

    ssh.connect(host, port, username, password)


    # Execute commands (replace these with your specific commands)

    stdin, stdout, stderr = ssh.exec_command("show version")

    

    # Print the output

    print(stdout.read().decode())


    # Close the SSH connection

    ssh.close()


except Exception as e:

    print(f"Error: {str(e)}")



Then learn Ansible. Ansible is a scripting language written in python specifically for networking jobs there are several modules in Ansible which can directly be used in networking job rather then writing your own code from the scratch.  


Hope this will help. 

17 Oct 2023 | 09:35 pm
1 Likes

Report

Please describe about the report short and clearly.

Join Cisco ACI Live Training – Starting 7th December! Enroll Now to Master ACI.
Join Cisco ACI Live Training – Starting 7th December! Enroll Now to Master ACI.
Expert-Led Cisco ACI Training with Lab Access.
Day
Hr
Min
Sec
Register Now