[Tutor] cisco router + telnetlib
Daniel McQuay
simplebob at gmail.com
Thu May 25 00:18:46 CEST 2006
Hello List,
I am rather new to programming and I was wondering y'all think the best way
to configure a cisco router using python would be. currently I am using
telnetlib. my problem is, I get an error after connecting to the router.
here is the error I get when I use IDLE:
Enter IP: 205.180.0.3
Warning: Problem with getpass. Passwords may be echoed.
Router Password: cisco
Warning: Problem with getpass. Passwords may be echoed.
Router Secret: class
Enter Router hostname: RouterBob
Traceback (most recent call last):
File "C:\Documents and Settings\bob\My
Documents\Administration\Scripts\cisco_config.py", line 20, in ?
tn.write("hostname " + hostName + "\n")
File "C:\Python24\lib\telnetlib.py", line 292, in write
self.sock.sendall(buffer)
File "<string>", line 1, in sendall
error: (10053, 'Software caused connection abort')
>>>
I have also attached the script that I use. could you please point me in the
right direction.
thank you in advance,
--
Daniel McQuay
boxster.homelinux.org
Dead Possum Productions
814.825.0847
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060524/79b69995/attachment.htm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cisco_config.py
Url: http://mail.python.org/pipermail/tutor/attachments/20060524/79b69995/attachment.asc
More information about the Tutor
mailing list