Brandeis University router management utilities 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 == This is a suite of commands for managing routers. Invoke rutil by itself for usage information. The commands are as follows: arp-lookup Shows arp data for a MAC or IP address border-route Sets or clears a null route for an IP address on the border router(s) findport Locates the switch and port where a MAC or IP address is connected. Also displays the VLAN on that switch port. getvlan Returns the VLAN number of a specified switch port gulp Shows all logins from an IP address as recorded in GULP setvlan Sets the VLAN number of a specified switch port setvlanaddr Like findport + setvlan. Given an IP or MAC, finds its switch and port and changes the VLAN there == Requirements == * UNIX-like system (developed on RedHat Linux) * PHP with SNMP support * A working Brandeis arp2db setup for arp-lookup and findport * A working Brandeis GULP setup for gulp * A working Brandeis ios-tftpd setup for border-route == Setup == 1. Copy sbin/rutil somewhere in your PATH, like /usr/local/sbin 2. Optionally make symbolic links to rutil. These will allow you to invoke subcommands more easily. For example, to be able to use findport by typing "findport 123.123.123.123" instead of "rutil findport 123.123.123.123," make a symbolic link from findport to rutil. 3. Edit lib/router-config.php. Specify your local values for database credentials, SNMP community strings, border routers, IOS TFTP server, etc. If you want to use the special "quarantine" and "unquarantine" settings for setvlan, also fill in code for the is_quarantinable_vlan(), is_quarantine_vlan(), get_quarantine_vlan() and get_unquarantine_vlan() functions. 4. Copy the files from lib/* somewhere in the PHP include path. I like to create /usr/local/lib/php and add that to the path in php.ini.