#PYTHON

Published: 29 August 2019
on channel: Amit Bhat
618
7

!PYTHON PROGRAM FOR CONFIGURING SWITCH
import getpass
import telnetlib

HOST = "192.168.164.130"
user =raw_input("Enter your telnet username: ")
pwd = getpass.getpass()

tn = telnetlib.Telnet(HOST)

tn.read_until("Username: ")
tn.write(user + "\n")
if pwd:
tn.read_until("Password: ")
tn.write(pwd + "\n")

tn.write("enable\n")
tn.write("cisco\n")
tn.write("config t\n")
for n in range (2,11):
tn.write("vlan " + str(n) + "\n")
tn.write("name P_VLAN_" + str(n) + "\n")

tn.write("end\n")
tn.write("exit\n")

print tn.read_all()


On this page of the site you can watch the video online #PYTHON with a duration of hours minute second in good quality, which was uploaded by the user Amit Bhat 29 August 2019, share the link with friends and acquaintances, this video has already been watched 618 times on youtube and it was liked by 7 viewers. Enjoy your viewing!