Brandeis University IOS TFTP Server Copyright 2008 Brandeis University This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . == How it works == Cisco routers provide a rich SNMP API, but much of their functionality is accessible only through the interactive command line. It may be convenient to automate tasks that require CLI functionality, but it's a pain to use expect-style automation. Fortunately, many Cisco routers support the hostConfigSet OID in the OLD-CISCO-SYS-MIB. This OID allows you to cause the router to configure itself using a file fetched from a TFTP server. This package contains a "fake" TFTP server meant to be used with hostConfigSet. It doesn't serve real files from a filesystem - instead it uses the requested filename to determine the IOS commands to return. Currently only "block-" and "unblock-" are implemented. They add and remove null routes to the specified IP, using the following IOS commands: ip route 255.255.255.255 null0 no ip route 255.255.255.255 null0 == Requirements == * UNIX-like system (developed on RedHat Linux) * Perl with IO::Socket and Sys::Syslog * Border router that supports OLD-CISCO-SYS-MIB == Setup == 1. Copy ios-tftpd.pl somewhere, like /usr/local/sbin. 2. Optionally copy ios-tftpd.init into your SysV init directory: # cp ios-tftpd.init /etc/init.d/ios-tftpd On systems with chkconfig, you can then enable the service with: # chkconfig --add ios-tftpd # chkconfig ios-tftpd on