Cisco TFTP - Advanced functionality?
Hi Everyone,
Google didn't help me. Probably searching the wrong words. Question - How granular can Cisco TFTP get? Can a tftp run -config update only change a small part of a run-config or does a tftp transfer always replace the entire current run config?
Thanks
Google didn't help me. Probably searching the wrong words. Question - How granular can Cisco TFTP get? Can a tftp run -config update only change a small part of a run-config or does a tftp transfer always replace the entire current run config?
Thanks
Comments
-
networker050184 Mod Posts: 11,962 ModThe CLI TFTP commands are not that granular. Not in IOS anyway. Might be able to hit a shell in other version but not sure.
You'd be better off having a script that runs to do something like that. Either logging into the router and screen scraping or pulling the file and diff on the server. Something along those lines.
In the end it's probably not worth the trouble really. I'd just keep a current config file and x number of previous versions.An expert is a man who has made all the mistakes which can be made. -
OfWolfAndMan Member Posts: 923 ■■■■□□□□□□What are you trying to do exactly?
Not granular at all. It's either all or nothing.:study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation [] -
Node Man Member Posts: 668 ■■■□□□□□□□I am trying to think of scenarios to practice making scripts in bash and python to work with my cisco lab.
-
OfWolfAndMan Member Posts: 923 ■■■■□□□□□□I think you might appreciate this then:
https://pynet.twb-tech.com
Also, check out pexpect. It's another popular one for network guys.
Also, if you're just trying to do config backups to a tftp server, I have a solution for you that will make things simpler, assuming you don't have another program that will do it for you.
#kron policy-list DAILY_BACKUP
#cli show running-config | redirect tftp://[IP address]/[optional folder]/[txt file name]
#cli write memory
#kron occurrence [Occurrence name] at [HH:MM] recurring
#policy-list DAILY_BACKUP
This would just save one backup, but it runs it every day at your time specified, and anything IOS 12.2+ can run it. Again, this is only if you don't have a server that isn't doing this for you already.:study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation [] -
networker050184 Mod Posts: 11,962 ModIf you're trying to practice with bash or python I'd do what I suggested above. Login, pull config, diff between old config, keep new if changes. Something along those lines should get some gears turning in your head.An expert is a man who has made all the mistakes which can be made.