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.
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.