09-08-2017 06:40 PM - edited 03-05-2019 09:06 AM
Hello everyone,
Need some help with python script. I never used python before. I need to deploy tacacs config for con0 and aux line to all routers and switches.
I have Python 2.7.13 installed on my windows 7
1. I have a router I want to test it by deploying script to it via telnet. How do you suggest i do that while having this router connected to a production network? My thought is to not have any routing enabled and only configure a loop back on the router with an IP address that is routable via the production network. Best practices?
2. I have attached what i have so far scripted very rough draft. I have no idea how to deploy it with python via telnet and what the script is lacking. would i put the IP address of the router where it says "(HOST)". Can anyone give me some pointers?
Thank you!
Solved! Go to Solution.
09-20-2017 05:37 PM
Hi Francesco,
It's going to take me a bit to get a router test on since I had to deploy the one I had.
I attached a very basic one. I wanted to make sure I get the basic concepts because i will have to explain in a project plan what the script is doing and test it. Plus it was easier to find what was wrong when it didnt work.
so originally the scripts never worked because I found that I had a no aaa new model and did not have that enabled so the commands didnt work at all when running the script. Once I identified that I enabled and ran my script which worked up to the point of configuring the aaa global config mode BUT it didnt work all the way. I saw that the login configuration under line con 0 and aux 0 had no configuration.
Thanks for you help.
P
09-20-2017 05:42 PM
09-21-2017 01:57 PM
Hi,
So with my simple script that I sent you I did run into an issue.
it configures global config mode the aaa but when going into line con0 and line aux it does not configure. I will have a router to test next week. but any ideas why?
09-21-2017 04:57 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide