Connecting to the Switch using Python

Starting to figure it out how python syntax is working and how we can use internal libraries to connect to switches.

Let’s take the telnetlib

Here is a short example of connecting to switch and changing it’s hostname.

telnet_connect

Example of script was taken from telnetlibhttps://docs.python.org/2/library/telnetlib.html 

Great free content to learn the Python and Networking automation

 

 

Leave a comment