CCNA-200-301- aaa5GITTC-Unlocked

(Jester) #1

Steps:




  1. Launch Python program.




  2. Enter the snippet code then save as python file.




#!/usr/bin/env_python
import getpass
import sys
import telnetlib

HOST = 1.1.1.1
user = raw_input(“5G-ITTC CCNA Training.”)
password = getpass.getpass()
tn = telnetlib.Telnet(HOST)
tn.read_until(“Username po ninyo: “)
tn.write(user + “\n”)
if password:
tn.read_until(“Password po: “)
tn.write(password + “\n”)
tn.write(“configure terminal\n”)


for x in range(2, 60):
tn.write(“vlan “ + str(x) + “ \n”)
tn.write(“name 5GITTC” + str(x) + “ \n”)


tn.write(“end \n”)
tn.write(“exit \n”)
print tn.read_all()


  1. Telnet the L3 switch.

Free download pdf