=head1 NAME Netdisco 1.0 - README =head1 AUTHOR Netdisco is maintained by a team of Open Source developers headed by Eric Miller, Bill Fenner, Oliver Gorwits, and Max Baker. =head1 DESCRIPTION Netdisco is an Open Source web-based network management tool. Designed for moderate to large networks, configuration information and connection data for network devices are retrieved and set by SNMP. With Netdisco you can locate the switch port of an end-user system by IP or MAC address. Data is stored using a SQL database for scalability and speed. Cisco Discovery Protocol (CDP), Foundry Discovery Protocol (FDP), Link Layer Discovery Protocol (LLDP), and SynOptics Network Management Protocol (SONMP) optionally provide automatic discovery of the network topology. The network is inventoried by both device model and operating system (like IOS). Netdisco uses router ARP tables and L2 switch MAC forwarding tables to locate nodes on physical ports and track them by their IP addresses. For each node, a time stamped history of the ports it has visited and the IP addresses it has used is maintained. Netdisco gets all its data, including topology information, with SNMP polls and DNS queries. It does not use CLI access and has no need for privilege passwords. Security features include a wire-side Wireless Access Point (AP) locator. Netdisco was created at the University of California, Santa Cruz (UCSC), Networking and Technology Services (NTS) department. UCSC continues to support the development of Netdisco by providing development servers and beer. The Netdisco project is hosted by Source Forge. See L<http://www.netdisco.org> =head1 FEATURES =head2 Switch Ports From the web interface devices connected to switch and router ports are listed by MAC address. A history of which switch ports a MAC address has been seen at is kept. With a click the you can browse a network device connected to an uplink port. With another click you can disable or enable the switch port, logging the reason, user and date. =over =item * Central location to disable/enable switch ports. Network administrators can disable and enable ports without having to know enable or privilege passwords. Reasons for switching on/off ports are logged for end-of-the-year auditing and reporting. Non-IOS savvy managers can control port access from a familiar browser interface. This feature was designed with a University Residential Networks (ResNet) in mind. Only users you specify in Netdisco will have access to switch off a port. Netdisco will also not allow people to switch off uplink ports by accident. =item * Supports Cisco VLAN Community String indexing (C<public@101>) =item * MAC Address to switch port resolution =item * IP Address to switch port resolution =item * Find Switch Ports with multiple nodes attached =item * Find nodes using multiple IP addresses =item * Find nodes by vendor (using MAC address OUI) =back =head2 Easy Administration =over =item * Controllable through Web Interface or Command Line Interface (CLI) =item * Database store for scalability and speed (Postgresql) =item * Easily extendible to new network devices =item * User system to restrict access and features =back =head2 Network Administration and Security =over =item * Automatic inventory and search of network hardware =item * Administratively enable/disable switch ports from web interface with logging =item * Duplex Mismatch Finder =item * Find Wireless Access Points (APs) from wired-side of network =item * Layer Two Traceroute =back =head2 Reporting =over =item * Graphing of network topology. Clickable image-map of devices. Link speed shown =item * Statistics for number of actual nodes connected to network =back =head2 Inventory of Network Devices =over =item * by Operating System (IOS,CatOS,HP...) =item * by Model, Vendor, OSI Layer, DNS Name =item * Find device ports that are blocking (via Spanning Tree Protocol) =item * Find devices using IP's w/out DNS entries =back =head2 SUPPORTED DEVICES Netdisco supports any Network device that talks SNMP and has basic information available through MIB-II (RFC 1213). Additional vendor-specific information is available for a number of devices, but especially for Cisco, Extreme, Foundry, HP, and Nortel/Bay devices. Device support is handled through C<SNMP::Info> -- a Perl module that is an integral part of Netdisco that handles device-specific code. See the C<Device Matrix> at L<http://snmp-info.sourceforge.net> for a list of devices that have been tested against Netdisco. SNMP::Info can be extended for new families of devices relatively easily with a little Perl knowledge. =head1 SUPPORT Please use the C<netdisco-users> mailing list for all problems and comments. L<http://lists.sourceforge.net/lists/listinfo/netdisco-users> In case of bugs, please use the Bug interface from SourceForge page at: L<http://sourceforge.net/projects/netdisco> =head1 GLOSSARY =over 4 =item Device Any device connected to the network that contributes to the physical topology. Devices need to be accessible via SNMP. A device usually has multiple interfaces (ports) and can have multiple IP addresses. =item Node A node is anything connected to a device. Nodes are uniquely identified by their MAC addresses. A node may or may not have IP addresses associated with it. =item Macsuck B<Technical Answer> : The process in Netdisco that goes out to all Layer-2 devices and gets the Forwarding Tables / CAM Tables. Each row in the table maps a MAC address to a switch port. This process is what makes devices show up on switch ports. Netdisco will attempt to detect uplink ports in case you are missing topology data during macsuck. Check the logs of the macsuck / macwalk for notifications of detected uplink ports, and add that data to your F<netdisco-topology.txt>. B<Fun Answer> - From Douglas M. McKeown : "This is where you go to a switch (Layer 2) and find all the MAC (or Ethernet Hardware) addresses which this device is connected to. So you plug your Dell into your HP Switch and that HP Switch is uplinked to your Core switch (not using the word router here. we're talking simple, physical network connections, sort of like electrical wires.) Well your Dell has a MAC address of let's say "A" and amazingly, your HP switch has a MAC address of "B" and your Core switch has an address of "1". Well if you Macsuck your Core switch, it doesn't have your Dell connected to it, but it does have "B" which is another switch. So you Macsuck "B" and it has MAC addresses for 1, B and A! You don't really Macsuck an end device (your Dell). So what do we know? - Core (1) knows about HP Switch "B". - HP Switch "B" knows about Core (1) and Dell "A". - Dell "A" knows about HP Switch "B". Does "1" know about "A" ? If it's a router it does. Otherwise it asks who has "A" and switch "B" says, I know! So 1 goes to B which goes to A. Got it?" =item Arpnip The process in Netdisco that goes out to every Layer-3 device and gets its ARP cache. Each entry in the ARP Cache maps a MAC address to an IP address. This process is what lets Netdisco map an Ethernet address to an IP address. Combined with the Macsuck process, Netdisco can ultimately resolve an IP address to a switch port. If you have a small network that only has layer-2 devices on it, and you use a Linux or BSD box as your router, you will need to install net-snmp on the machine, and then have netdisco discover that machine. Otherwise you will not be able to resolve a MAC address to an IP address. =item CDP / FDP / LLDP / SONMP Having topology information is crucial for Netdisco to function. So. if you network does not support one of the above Layer2 discover protocols, you B<must> put the information in the F<netdisco-topology.txt> file. See L<Topology Information> in this file. From Douglas McKeown : "CDP is the B<Cisco Discovery Protocol>. Sort of an add-on for when switches talk to switches about who's connected to whom. CDP quickly tells other switches that it has switches connected. Netdisco really likes CDP a lot for mapping out the network and automatically discovering the topology. If your devices don't use CDP, then you need to work with the F<netdisco-topology.txt> file to create a layout of your network." Note that LLDP (IEEE Standard), FDP (Foundry), and SONMP (Nortel/Bay) are supported, and anywhere you see CDP you can assume we mean LLDP, FDP, and SONMP too. =over =item Security Warning B<WARNING>! There is a potential community string exposure when Netdisco is auto-discovering network equipment (C<netdisco> L<-r|/item__2dr__7c_7c__2d_2ddiscoverall_root_device>). If a malicious host were to implement CDP and Netdisco were to discover that host, Netdisco would send all read-only community strings to that device in an attempt to add it to the topology. There are two main ways to avoid this exposure: =over =item List addresses of valid devices Use the L<discover_only> and/or L<discover_no> configuration keywords to control what IP addresses netdisco will be permitted to visit. C<discover_only> is inclusive, and C<discover_no> is exclusive; it's recommended to use C<discover_only> if feasible. When using this method, check the backend log for devices visible via CDP but not via SNMP. These may point out the need to expand the range that is discoverable, or may be instances of this class of attack. Additionaly C<discover_no_type> can be used to prevent netdisco from visiting certain devices based on the device_type returned by CDP. =item Disable CDP and other discovery protocols This solution involves disabling CDP and other discovery protocols from your user-connection ports, and leaving it on on inter-device ports. Unfortunately, in some configurations, user-connection ports B<are> inter-device ports, e.g., especially when you want to keep the ability to easily add a phone to a port that didn't have one previously. Sample C<IOS> Code for above: interface range fastethernet1/1-32 no cdp enable Make sure you don't disable CDP on any ports that are connected to other pieces of infrastructure. Also make sure you don't use the global command C<no cdp run>, since that will disable CDP entirely. =back =back =back =head1 INSTALL See the INSTALL document for instructions and requirements to install Netdisco. =head1 USING NETDISCO =head2 Components Netdisco has three components : =over 4 =item 1. Back-end The back-end talks to devices via SNMP. Contained in the back-end is the logic to create the topology, collect statistics and generate graphs. Most of the back-end is controlled by cron jobs. A background daemon is put resident to run maintenance tasks collected from the front-end. This keeps these sometimes memory intensive tasks and code out of the httpd processes. =item 2. Database Netdisco uses PostgreSQL to store all its information. Careful abstraction of the database calls means that Netdisco can be ported to another SQL platform easily. Hooks to use other databases are present. =item 3. Front-end The front-end operates on stored data only. This abstraction is both for speed and security. Some front-end administration tasks are put in a queue in the database that a daemon running from the back-end picks up and processes. The number of people using Netdisco can scale with the web server capacity, and will create no extra load on the devices. =back =head2 Command-Line Options =over =item -b || --batchmode Batch Mode. Redirect output to log file. Log file directory set in configuration file under L<datadir>. =item -C || --configfile file Set Config file. Default is netdisco.conf. =item -D || --debug DEBUG. Sends copious information to STDOUT =item -L || --nologging No Log. This will not add entries to the L<log|/"item_log"> table. =item -n || --nodestoo Delete Nodes. Used with --expiredevice only. =item -N || --newonly New Only. On a network discovery L<-r|/item__2dr__7c_7c__2d_2ddiscoverall_root_device>, only discover found devices that aren't in the database. =item -P || --port port Port. Specify Port for removal of nodes L<-e|/item__2de__7c_7c__2d_2dexpirenodes_device>. =item -S || --dumpsql Debug. carp() SQL commands. Sets $netdisco::SQLCARP to 1. =item -V || --archive archiVe nodes. Used with L<-e|/item__2de__7c_7c__2d_2dexpirenodes_device> only. =back =head2 Command-Line Commands =over =item -a || --arpwalk Arp Walk. ArpNip each device that has Layer 3 capabilities. =item -A || --arpnip device ArpNip. ArpNip's a single device. See L<ArpNipper> in Design. Devices listed in C<arpnip_no> in the config file are excluded. If there is a C<arpnip_only> entry in the config file, devices not listed are excluded. See the entry below. =item -B || --backup Backup and Nightly Maintenance. =over =item Removes Devices and nodes that are old using the C<expire_*> config file directives (see below). =item Creates Archive data files for L<node|"item_node">,L<node_ip|"item_node_ip">,L<device|"item_device">, and L<device_ip|"item_device_ip"> tables. =item Calls Database cleanup routines (L<-K|/item__2dk__7c_7c__2d_2dcleannodes>) as well. =item Exports NMIS config file if L<nmis_dump> is set. =back This routine should be run nightly. For a full backup run F<sql/pg --back> to backup the whole database. =item -d || --discover device Discover Device. IP addresses and subnets listed in C<discover_no> in the config file are excluded. If there is a C<discover_only> entry in the config file, IP addresses and subnets not listed are excluded. See the entry below. =item -e || --expirenodes device Expire Nodes for given device. Use L<-V|/item__2dv__7c_7c__2d_2darchive> to archiVe instead of delete. Specify a port with L<-P|/item__2dp__7c_7c__2d_2dport_port> to delete or archive nodes on a per port basis. =item --expire-nodes-subnet subnet Finds all devices in given subnet and runs expire nodes on each. Will display devices effected and then ask for confirmation. Subnet is specified in CIDR format : 192.168.0.0/24 =item -E || --expiredevice device Delete a device. Use L<-n|/item__2dn__7c_7c__2d_2dnodestoo> to delete nodes as well. =item -F || --discoverfile file Discover Device from given File. Used to restore backed up info from L<-B|/item__2db__7c_7c__2d_2dbackup>, and to discover devices that are not available through topology information. Use L<-T|/item__2dt__7c_7c__2d_2dtopofile> to only import Topology Information. =item -g || --graph Graph. Creates graph using GraphViz. Can create image output (png,gif) or vector output (svg). NOTE: You can safely ignore all warnings about C<size too small for label>. Make sure you have a relatively new version of GraphViz. You need a newer version of GraphViz if you get an error similar to: Creating CMAP : /var/www/netdisco/html/netmap.map warning, language cmap not recognized, use one of: ps hpgl pcl mif... =item -h || --help Prints out command line usage. =item -i || --changeip old_ip new_ip Change IP address of device. Creates new entry, removes old one and moves nodes over to the new one. =item -I || --expireips Expire IP Addresses from L<node_ip|"item_node_ip"> table. This will delete entries from the node_ip table that are not matching entries (MAC Addresses) found in the node or device_port tables. =item -k || --cleanalias alias klean-up. DANGEROUS. Deletes from the F<device> table any IP address that is found as an alias in the F<alias> table. =item -K || --cleannodes Database Node Klean-up. Permanently deletes nodes matching: =over =item 1. MAC Addresses that are Switch Port Addresses =item 2. MAC Addresses that are listed on non-existent ports =item 3. MAC Addresses that exist on ports with topology information (uplink ports) =back =item -m || --macwalk Mac Suck each device in the database that has Layer 2 capabilities. =item -M || --macsuck device Mac Suck given device only. Devices listed in C<macsuck_no> in the config file are excluded. If there is a C<macsuck_only> entry in the config file, devices not listed are excluded. See the entry below. =item -O || --oui Import OUI information from oui.txt =item -p || --daemon [start,stop,status,restart] Control the Admin Daemon. Takes arguments (start,stop,status,restart). =item -r || --discoverall root_device_list Walk the network with the given (comma-seperated) root(s). Use L<-N|/item__2dn__7c_7c__2d_2dnewonly> to discover new devices only. Given root devices will always be discovered. =item -R || --refresh Refresh devices. Will run a discover (L<-d|/item__2dd__7c_7c__2d_2ddiscover_device>) for each device in the database. =item -T || --topofile Import Topology Data. Will import manual topology data stored in file specified by configuration option L<topofile> . Use L<-F|/item__2df__7c_7c__2d_2ddiscoverfile_file> to specify a different file from the command line. It is not necessary to do this after every change. This is only a convenience switch. =item -u || --user [user] [password] [port_control?] [admin?] ["full name"] Add or Change a User. Supply all four arguments (user pw port_control admin) for command-line control, or supply less for interactive prompts. It's better to use interactive prompts so that the password doesn't get stored in your shell history file and exported to the process table. =item -v || --version =back =head2 Features =over =item Admin Daemon The admin daemon is a copy of C<netdisco> that runs in the background. From the web C<Admin Panel>, jobs are put in a queue in the database. The daemon picks up these jobs and executes them from the back-end as user C<netdisco>. The daemon is restarted daily in a cron job, or can be manually started as root : su - netdisco -c "/var/www/netdisco -p restart" =item Port Info / Jack Search This feature integrates Netdisco with other databases that have port info. Port Info was designed around data coming out of a Pinnacles database at UCSC, and might prove to be site-specific. However, see C<port_info.html> for a good example of how to access other databases using the C<netdisco.pm> SQL routines. Enable this feature by setting C<port_info> to true in C<netdisco.conf> =item Port Control Port Control allows a user of Netdisco to administratively turn a port on or off. To do this the back-end requires a read-write community string for the device in question. The admin daemon must also be enabled. Netdisco keeps a log for each port holding information about why a port was turned on or off. A reason for turning switch the port is chosen from a list to provide future audits of admin activity. The user and IP address of the request are stored. To change the default reasons, modify the C<%PORT_CONTROL_REASONS> hash in C<netdisco.pm> Optionally if the C<portctl_email> setting is set in C<netdisco.conf>, an e-mail is sent out with a notification of the switching. Locally at UCSC that e-mail is sent to an administrative mailing list. To turn this feature off uncheck the C<Port Control> checkbox from all users in the C<Admin Panel>. By default Netdisco will be allowed to shut off - Switch Ports - IP Phones - Router Ports that are NOT uplinks By setting certain config file directives you can allow Netdisco to shutoff uplink ports and VLAN interfaces. But this is B<REALLY NOT RECOMMENDED>. See below for the required commands. =item Web Console The Web Console allows netdisco to front-end the web interface of a switch or router. Traffic can then be routed over https, through Netdisco's web server. An additional security layer is added by requiring the user to be logged into Netdisco. The normal security measures used by the device's web server are still active. The Web console is a reverse proxy that runs on Apache. You must enable it in C<netdisco_apache.conf> and C<netdisco_apache_dir.conf>. The add devices and models to the configuration lines C<web_console_vendors> and C<web_console_models> in C<netdisco.conf>. =back =head2 Netdisco Maintenance =over =item Refreshing a device To refresh or discover a device and its ports, use the L<-d|/item__2dd__7c_7c__2d_2ddiscover_device> command: netdisco -d mydevice =item Importing Topology Information It is not necessary to import the topology information after changing F<netdisco-topology.txt>. You should however restart the admin daemon. The topology text file is re-parsed each time you run netdisco. As a convenience you can use the topology file to quickly seed Netdisco with devices. To import all the topology information at once make sure the topology filename is set in C<netdisco.conf> and use the L<-T|/item__2dt__7c_7c__2d_2dtopofile> command: netdisco -T =item Aborting a process of Netdisco Hit Ctrl-C if you are running a netdisco process, or send the job the INT signal. The job can cleanup after itself, write out its stats and log entries. kill -INT jobpid There is currently no way to stop a job inside the Admin daemon. Send the daemon an INT signal and it will terminate after its current job has completed. =item Changing the IP Address of a Device If a device is being replaced with a different device and a different IP, see L</Deleting a Device> below. netdisco -i old-ip-address new-ip-address Changing the IP address of a device will: =over =item 1. Discover the new device =item 2. Remove Old Device Entry, port, and aliases =item 3. Move the old nodes to the new device. =back =item Auto-Deleting Old Data From the Database In order for Netdisco to be self-maintaining data has to be taken out of the database as well as put in. The following config file directives are used to auto-prune stuff from the database : =over =item expire_devices =item expire_nodes =item expire_nodes_archive =back See each item's entry in the L<Config File> Section below for more details. The expire data routines are called from the L<-B|/item__2db__7c_7c__2d_2dbackup>/Backup routine, which should be running nightly via cron. =item Deleting a Device To delete a device use the L<-E|/item__2de__7c_7c__2d_2dexpiredevice_device> command followed by the device name or IP. Set L<-n|/item__2dn__7c_7c__2d_2dnodestoo> to delete all the nodes seen on that device as well This is rather permanent. Make sure you run L<-B|/item__2db__7c_7c__2d_2dbackup>ackup before you do this. =item Deleting Nodes Nodes consist of two components -- the switch port to MAC address mapping in the C<node> table, and the MAC address to IP mapping in the C<node_ip> table. To remove nodes from a switch, use the Admin Panel on the web side and choose either C<Delete Nodes> or C<Archive Nodes>. Archiving nodes will set the archive bit so that the data will be available, but not always showing. You can also delete nodes from the command line using the L<-e|/item__2de__7c_7c__2d_2dexpirenodes_device> command with or without the L<-V|/item__2dv__7c_7c__2d_2darchive> flag. Database Cleanup L<-K|/item__2dk__7c_7c__2d_2dcleannodes> will delete nodes that seem to be extraneous. See L<-K|/item__2dk__7c_7c__2d_2dcleannodes> for more details. Once you have cleared out nodes from a switch, then run L<-I|/item__2di__7c_7c__2d_2dexpireips> to remove unused node to IP mappings. This is rather permanent. Make sure you run L<-B|/item__2db__7c_7c__2d_2dbackup>ackup before you do this. =item Adding / Changing Users The easiest way to add a user is to use the C<Add User> form in the Admin Panel. After first installing Netdisco you need to add an admin user by running L<-u|/item__2du__7c_7c__2d_2duser__5buser_5d__5bpassword_5d__>. =item Migrating the Users table to a new host If you are moving your Netdisco install over to another machine and you want to keep your users table, here is the process : source$ pg_dump -a -d -U netdisco -t users netdisco > user_dump.sql source$ scp user_dump.sql dest: dest$ cd /var/www/netdisco/sql dest$ ./pg /path/to/user_dump.sql =item Localhost (127.0.0.1) is showing up on CDP Links See "How the Switch Selects the IP Address To Include in Outbound CDP Packets" in ftp://ftp.hp.com/pub/networking/software/59692375_e1.pdf =item Device Model comes up as 'Products.' The device is probably newer than your Cisco MIBs. Redownload L<ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz> and install these newest mibs into F</usr/local/share/snmp/mibs>. =item Things are getting Really slow For some reason over here at UCSC, things get real slow in Postgres after a while. Even though we are doing frequent VACUUM's on all the data, it seems to be dragging down after a while. This turns out to be an INDEX bloat problem on Postgres versions less than 7.4. Recently doing this on a Postgres 7.3 install changed the amount of space that Netdisco's database was using from 16G to 400M !!! In order to fix this we do a C<VACUUM FULL ANALYZE VERBOSE> and C<REINDEX> from C<pg>. This command locks each table before it does the VACUUM, and therefore can be more thorough. It's a good idea to take netdisco down temporarily while you do this. I do this about once a month, or when I notice it dragging down. Use C<Netdisco Statistics> as a good metric of things slowing down. This may get fixed with changes in VACUUM in Postgres 7.4 and above. Procedure for doing a vacuum full (as root): =over =item 1. Shutdown the admin daemon /var/www/netdisco/bin/netdisco_daemon stop =item 2. Clear the cron tab for user netdisco crontab -u netdisco -r =item 3. Comment out the netdisco config file Includes in httpd.conf =item 4. Restart Apache /usr/local/apache/bin/apachectl graceful =item 5. Check to see if any netdisco jobs are running and wait for them or kill them ps killall netdisco =item 6. Run REINDEX and VACUUM FULL Before: df -h /var/www/netdisco/sql/pg # before comparison : select relname, relpages from pg_class order by relpages desc; REINDEX TABLE node; REINDEX TABLE node_ip; REINDEX TABLE device; REINDEX TABLE device_port; REINDEX TABLE device_port_log; VACUUM FULL ANALYZE VERBOSE; # after comparison : select relname, relpages from pg_class order by relpages desc; \q After: df -h =item 7. Restart Postgres (just for fun) /usr/local/etc/rc.d/010.pgsql restart OR /etc/rc.d/init.d/pgsql restart OR /etc/rc.d/pgsql restart =item 8. Uncomment lines in httpd.conf =item 9. Restart Apache /usr/local/apache/bin/apachectl graceful =item 10. Reload crontab for user netdisco crontab -u netdisco /var/www/netdisco/netdisco.crontab =item 11. Restart Admin Daemon /var/www/netdisco/bin/netdisco_daemon start =back =item Clearing the Admin Queue If your admin queue is just getting too long and you want to clear it you can do it by just dropping the table and readding it. cd sql ./pg admin.sql =back =head2 Topology Information Topology information is crucial to Netdisco's performance. It allows the application to know which ports are uplink ports and which have connected nodes. Ports that are uplink ports that are not marked so in Netdisco will appear to B<steal> MAC address entries from their rightful ports. So it is critical to use the topology file and CDP/FDP/SONMP to maintain a topology. =head3 Autodetection of uplink ports During macsuck if Netdisco finds the MAC address of a known device or switch port, then that port is marked as an uplink. Nodes will not collect at these switch ports, and a warning message will be printed. Check the logs of your macsuck and macwalk jobs in order to find and correct autodetected uplink ports. Add these ports to your netdisco-topology.txt file. =head3 Manual Topology Information Netdisco will auto-discover the layer-two topology of a network using CDP. However, many networks have parts of the topology that are not covered by CDP. Use the manual topology file C<netdisco-topology.txt> to supply the layout of the network if your network has devices that don't talk CDP or misreport information. The manual topology file only requires one side of the data to be entered. Both directions of a link will be forced to the given data if one side is listed. B<File Format> The format of the manual topology consists of four types of lines: =over =item #comment Comments are delimited with a C<#> They can happen on any line. Escape as C<\#> if you need to use a literal pound sign. =item routername Any line that does not start with C<link:> or C<alias:> is assumed to be a the DNS name or IP address of a network device. =item link: Lines that start with C<link:> connect two devices together. The format is link:outgoing port,destination device,Destination port The outgoing port belongs to the device listed above the C<link:> line. The Destination Device and Port tell Netdisco who is on the other end of this link. The device can be a DNS name or an IP Address. B<NOTE>: The port names must match exactly how Netdisco sees it. Go to the device and check it out. You might think of it as C<port 1> but Netdisco might think of it as C<RMONPort26onunit1>. =item alias: Not implemented for output. The backup file will have these lines just for informations' sake. Alias IPs on a device are found during discovery. Many network devices like routers have multiple IP addresses assigned to them. If the device cannot or does not supply this information to Netdisco in a standard way, you can add IP addresses used here. =back White space in the file (except for line breaks) is ignored. Tabbing over before C<line:> lines makes it easier to read, but is not required. B<File Uses> Some reasons the manual topology file is used: =over =item 1. Man in the Middle Let's say you have two CDP speaking devices with a non-CDP speaking device in between them [Cisco] ---> [Bay] ---> [HP] The Cisco and HP devices (CDP speakers) find each other and the Bay device never appears. You would then have to add these lines to the topology file: ciscoswitch.my.company link:EtherNet0/1,bayswitch.my.company,25 bayswitch.my.company link:26,hpswitch.my.company,J3 This tells Netdisco that port C<Ethernet0/1> on C<ciscoswitch> is connected to Port C<25> on C<bayswitch>. Then in turn Port 26 on C<bayswitch> is connected to port C<J3> on C<hpswitch>. A note about devices that are I<CDP Aware> and that implement CDP: I<CDP Aware> devices are devices that probably do not speak CDP (probably for legal reasons) but that are smart enough not to forward CDP packets. Cisco devices that have CDP disabled are usually still I<CDP Aware> and will not forward the packets. Man-in-the-middle situations occur when the device both does not speak CDP and is not I<CDP Aware>. =item 2. Isolated Network Segment If you have a segment of your network that is not connected directly, or connected through a non physical link like a VPN, then you might fudge an entry to connect that segment of the network with the main one. =item 3. Attach a non-CDP speaking device Anywhere a device that does not supply topology information is connected to the network, an entry must be added in the manual topology file. =back =head2 Cron Jobs Netdisco is controlled via cron jobs. Jobs are run as user C<netdisco>. Multiple jobs can be run at once. The default jobs are : =over =item * MacSuck - Every 2 hours MacSuck all the devices in the database. =item * ArpNip - Every 2 hours ArpNip all the devices in the database. (Offset from Macsuck by 1 hours) =item * Refresh Devices - Once a day refresh device information. =item * Backup - Once a day backup information. =item * Graph - Once a day re-create the graph. =item * Walk Network - Once a week (Wed @ 14:00) try and discover new devices. =item * Restart Admin Daemon - Once a day just for good measure. =back =head1 Config File The settings in C<netdisco.conf> are used both in the back-end and the front-end. When you make a change in the config file that is used in the web front end, you must reload apache. The config information is shared between processes for speed and memory performance. su - -c "/usr/local/apache/bin/apachectl restart" Multiple config files can be used in the back-end by calling Netdisco with the C<-C> option: netdisco -C myotherfile.conf =head2 General Items =over =item domain STRING. Trimmed from all DNS names viewed. Leave blank to show all domain names. Add a dot in front of your value : .ucsc.edu =item home PATH. Full path to where netdisco lives. Is the root path for all other files and paths. =item customer STRING. Name added to page titles and heading. =item customericon STRING. URL,width,height - replaces discoball icon with custom logo. =back =head2 Database Maintenance New in version 0.93 these directives are included to help make Netdisco more self-maintaining. B<Setting these will result in permanent data removal.> =over =item expire_devices DAYS. Devices that have not been refreshed in this number of days will be removed. All nodes connected to this device will be removed as well. =item expire_nodes DAYS. Nodes that have not been refreshed in this number of days will be removed from the database. Archived and non-archived nodes are removed. This includes SwitchPort/MAC and MAC/IP mappings. =item expire_nodes_archive DAYS. Archived data for switch-port/MAC and MAC/IP mappings older than this number of days will be removed. =back =head2 Back-End Items =over =item arpnip_no LIST:string. Devices that won't be arpnipped. See C<bulkwalk_no> for syntax. If you have any layer-3 devices that have been discovered by netdisco but are using proxy-ARP as a way to get to other devices, place them here. Alternately, if you have many proxy-ARP clients but one (or a handful of) central device with all of the proper ARP info, put that in C<arpnip_only>. =item arpnip_only LIST:string. If present, only arpnip these devices. See C<bulkwalk_no> for syntax. =item compress EXECUTABLE. Full path and command line arguments to the compression program used in L<compresslogs> =item compresslogs BOOLEAN. Compress log files? See L<compress> entry above. =item datadir PATH. Full or relative path to the directory that backups and logs will be stored in =item discover_no LIST:string. IP addresses in this list will not be visited during discovery. See L<bulkwalk_no> for syntax, except that only hostnames, IP addresses and subnets are valid. =item discover_no_type REGEX:string. Place a pattern here to exclude the discovery of certain devices based on the CDP device type information. Good for excluding a whole device class like lightweight access points or IP phones that have CDP but don't talk SNMP. =item discover_only LIST:string. If present, discovery will be limited to only IP addresses in this list. If you have a management VLAN, put that subnet here to avoid discovering user devices. See L<bulkwalk_no> for syntax, except that only hostnames, IP addresses and subnets are valid. =item ignore_interfaces LIST:STRING If present, device ports matching any of the items in this list will be ignored by the discovery process. Note this may have side effects - connected devices and nodes on those ports will in turn also not be discovered. Each item in the list is separated by a comma and may be a Perl regular expression. A useful example for this option might be: EOBC,unrouted VLAN,StackPort,Control Plane Interface,SPAN (S|R)P Interface,StackSub =item ignore_private_nets Not fully implemented. BOOLEAN. Set to true to ignore aliases that are part of private nets: 10.0.0.0/8 172.16.0.0/16 and 192.168.0.0/24 =item logextension STRING. The extension to add to log files. =item macsuck_bleed BOOLEAN. Set to true will let nodes accumulate on uplink ports without topology information. This is a debug option to help you figure out your topology and generally should not be set. =item macsuck_no LIST:string. Don't macsuck these devices. See C<bulkwalk_no> for syntax. =item macsuck_only LIST:string. If present, only macsuck these devices. See C<bulkwalk_no> for syntax. =item macsuck_no_vlan LIST:Strings. Comma separated list of VLAN names not to visit when MACsucking. This option was used to speed up MACsucking on certain Cisco Catalyst family devices where you have to connect to each VLAN with SNMP to get the forwarding tables. Certain default VLANs will not answer to SNMP, and Netdisco has to wait for them to timeout. VLANs listed here are overrided regardless of L<macsuck_all_vlans> value. =item macsuck_timeout SECONDS. Timeout for devices when mac sucking. =item macsuck_all_vlans BOOLEAN. Set to macsuck all VLANs, not just the ones that are being used on ports. This is a debug option. Set this if you think that the option of not macsucking VLANs that aren't in use on device ports is some how interfering. Setting this would revert macsuck to the same behavior as 0.93 and before. Does not override L<macsuck_no_vlan>. =item max_procs INTEGER. The number of simultaneous processes to use when collecting data from devices. Using several processes speeds up data collection, but uses more database resources. Be careful of using up all of your database connection handles. Typical values are 15-25. Note that the load average will be quite high with this option, very nearly the same as the value of max_procs. However, that's because each of these processes spends much of its time waiting for responses from the device, so is ready to run. The high load average doesn't affect the usability of the system in the same way that a high load average caused by cpu-bound jobs would. =item nbt_days DAYS. The maximum age of a node for it to be checked for NetBIOS information. Default 7. =item nmis_dump FILENAME. Set this option to have nightly() (-B) dump an NMIS L<http://www.sins.com.au/nmis> style Config file. Warning, this file will contain SNMP Community strings. Optional Override options are : =over =item nmis_group STRING. Group to use with nmis_dump. Default C<Network> =item nmis_role STRING. Role to use with nmis_dump. Default C<core> =item nmis_collect STRING. Collect option to use with nmis_dump. Default C<true> =item nmis_active STRING. Active option for nmis_dump file. Default C<true> =item nmis_net STRING. Net identifier to use. Default C<lan> =item nmis_port INT. SNMP Port to list in nmis_dump file. Default C<161> =back =item node_monitor_email STRING. If set, consult the node_monitor table for MAC addresses that are being monitored after every macwalk. If any of the monitored MAC addresses appear or move, send an email to the node_monitor_email setting and any cc address listed in the database. Note that the node_monitor table must currently be maintained via raw sql access, there is no admin page for it. =item reverse_sysname BOOLEAN. Turn this on to have Netdisco do a reverse lookup of the sysName.0 field to use as the management IP address for a device. See bug 810939 and device_root() for more info. Default C<false> =item store_modules BOOLEAN. Set to false to skip the module inventory on device discovery. The module inventory can double the device discovery time so if you aren't using the information you can skip it. =item store_wireless_clients BOOLEAN. Set to false to skip the wireless client information gathering. This is captured at macsuck time, so if you aren't using the information you can skip it. =item topofile FILE. Full path of the file that contains manual topology information. Defaults to F<netdisco-topology.txt> =item timeout SECONDS. Timeout for refreshing or discovering a device =back =head3 Admin Panel =over =item daemon_bg BOOLEAN. Run daemon in the background? =item daemon_pid FILE. Filename for the pid file used by admin daemon. Must be writable by daemon user. =item daemon_poll SECONDS. Time to wait to check for new items in the queue. =back =head3 Database Settings The five database settings are C<db> , C<db_user>, C<db_pw>, C<db_opts>, and C<db_env>. You can run multiple database types in Netdisco. See C<port_info> for an instance of this. For each of the above settings, the database shortcut name (you choose) is inserted after C<db>. Postgres is the required first database, and uses the short name C<Pg>. The following lines must be added : =over =item db_Pg STRING. Database connect string to give to DBI. Default : C<dbi:Pg:dbname=netdisco> =item db_Pg_user STRING. Database user =item db_Pg_pw STRING. Database Password =item db_Pg_opts HASH. Options to add to the connect string. Default : C<PrintError =E<gt> 1, AutoCommit =E<gt> 1> =item db_Pg_env HASH. Environment variables to be set before running database calls. Separate multiple entries with commas. Mainly used for Oracle. Default : not set. Example : db_Oracle_env = ORACLE_HOME => /usr/local/oracle7, ORACLE_STUFF=>1 =back =head3 SNMP Settings =over =item bulkwalk_off BOOLEAN. Set to true to use GETNEXT instead of BULKWALK for every device. This slows things down, but might be necessary for problem devices. Set to false to use BULKWALK even if netdisco thinks you have a buggy version of Net-SNMP (e.g., because your installation is patched) Other solutions include addding C< sub bulkwalk_off { 1; } > to the device class that is misbehaving in SNMP::Info. This will turn off bulkwalk for a class of devices, not all. Also see L<bulkwalk_no> to turn BULKWALK off on a per-device or device class level. Default is on. SNMP::Info 1.0 or higher required. =item bulkwalk_no LIST:STRING. A comma separated list of devices to not bulkwalk This list can take five different inputs: =over =item Hostname or IP Simply put the device's name or IP address in the list. switch1, switch2, switch3 =item model:regex Add an entire model type for excluding from bulkwalking. This can be a simple string like C<6500> or it could be a regular expression like C<(2512|65\d\d)>. The regex must match the whole string (it's anchored). =item vendor:regex Add an entire vendor type for excluding form bulkwalking. This can be a simple string like C<hp> or it could be a regular expression like C<(cisco|hp)>. The regex must match the whole string (it's anchored). =item Subnet You can exclude a whole subnet of devices from bulkwalking. Use CIDR notation. 128.1.0.0/16 =item Blanket Wildcard You can use a single asterix C<*> to specify that all devices not be bulkwalked. =back =item bulkwalk_repeaters INT. Sets MaxRepeaters on BULKWALK operations. See C<perldoc SNMP> for more info. Default is 20. SNMP::Info 1.0 or higher required. =item community LIST:STRING. A comma separated list of community strings to try on each device. =item community_rw LIST:STRING. OPTIONAL. A comma separated list of Read-Write community strings. This is only necessary if you turn on the C<port_control> command. =item get_community STRING. An external program to run to get the community string for a given device. This is useful if, for example, you have you devices already configured in another NMS and you want to use that information instead of configuring C<community> and/or C<community_rw> in this file. The strings %IP% and %HOST% are replaced by the IP address and the hostname (or IP address if no hostname is known) of the system being contacted. The command must return output in the following form: community=<list of readonly-communities> setCommunity=<list of write-communities> If the community string is not known for the given system, the command should return no output and the community strings configured in netdisco will be used. =item mibdirs LIST:STRING. A comma separated list of directories to search for MIB files. =item nonincreasing BOOLEAN. Setting this to true will allow the bulkwalk of devices that have tables with non-increasing OIDs. The default is to not allow this behavior to prevent problem devices from looping indefinitely. Requires Net-SNMP 5.3 or higher. See patch # 1364650 in Net-SNMP or bug # 1176130. =item snmpforce_v1 LIST:STRING. A comma separated list of devices. Forces matching devices to use SNMPv1 See L<bulkwalk_no> for syntax. =item snmpforce_v2 LIST:STRING. A comma separated list of devices. Forces matching devices to use SNMPv2c See L<bulkwalk_no> for syntax. =item snmpforce_v3 LIST:STRING. A comma separated list of devices. Forces matching devices to use SNMPv3. See L<bulkwalk_no> for syntax. =item snmpver INT. Default version of SNMP protocol to connect with. =item snmptimeout INT. Settings for 'Timeout' field passed to SNMP::Session. Micro-seconds before retry, Default 1000000 micro-seconds = 1 second. =item snmpretries INT. Settings for 'Retries' field passed to SNMP::Session =item v3_users LIST. The users to try for SNMPv3 (like L<community> for SNMPv1/SNMPv2) =item v3_users_rw LIST. The users to try for SNMPv3 read-write access. =item v3_user STRING. Colon seperated values: user:auth/enc[:authproto:authpass[:privproto:privpass]] user is the SNMPv3 username, as listed in v3_users or v3_users_rw. auth/enc specifies what levels of authorization/privacy you are configuring. The possible values are: =over =item none only use noAuthNoPriv, the user has no authorization or privacy configured. =item auth Use authNoPriv - authorization but no privacy. =item enc Use authPriv - authorization and privacy for all requests. =item auth,enc Use authNoPriv for read and authPriv for write. =back authproto is the authorization protocol, and can be any that the underlying library supports, e.g., SHA or MD5. authpass is the authorization pass phrase. privproto is the privacy proto, e.g., DES or AES. privpass is the privacy pass phrase. No support is currently provided for providing hexadecimal keys directly. Such support might use the prefix "0x" to identify a hex key, so be careful how you choose your pass phrases. =back =head2 Port Control =over =item portctl_email EMAIL. Address that reports of use of C<Port Control> are sent to. =item portctl_nophones BOOLEAN. Set to True to make sure an IP Phone port never can be turned off/on. Default false. =item portctl_timeout SECONDS. Amount of time to wait for a response from the admin daemon. =item portctl_uplinks BOOLEAN. Set to True to allow Netdisco to be able to disable Uplinks. (Router Interfaces too) Default False. B<EXTREMELY VERY DANGEROUS> - Turning off uplinks will take out chunks of your network. =item portctl_vlans BOOLEAN. Set to True to allow Netdisco to be able to disable VLAN interfaces. Default False. B<EXTREMELY VERY DANGEROUS> - Turning off a VLAN could take out most of your network. =item vlanctl BOOLEAN. Set to True to allow Netdisco to be able to change the default VLAN on an interface. =back =head2 Web Settings =over =item port_info BOOLEAN. Turns on the C<Port Info> and C<Jack Search> features. =item secure_server BOOLEAN. If a secure server is present. Requires web login, password changing and all admin functions to be run in secure space. =item traceroute BOOLEAN. If the traceroute button should be present in the top bar. The L2 Traceroute function has limits and may be slow on large networks, so the link to it can be disabled. =item web_console_models LIST:STRING. Comma separated list of models that want to use the Web Console =item web_console_vendors LIST:STRING. Comma separated list of vendors that use the Web Console. =item webpath PATH. URL Path added to the beginning of links on the web front-end =item websession MINUTES. Amount of time a session lasts before someone has to login again. =item apache_auth BOOLEAN. Whether to use Apache-based authentication. If this is configured both here and in netdisco_apache_dir.conf, then logins will trust the REMOTE_USER set by Apache. If the user is found in the user database, then the appropriate privileges are applied; if the user is not found then they have access but no port control or admin access. There is another link on the sidebar, "Netdisco Login" to log in using the netdisco user database. =back =head3 LDAP Settings =over =item ldap_server LIST:STRING. Comma separated list of LDAP servers. If using Active Directory these would be domain controllers. =item ldap_user_string STRING. String to construct the user portion of the DN. %USER% is a variable which will be replaced at runtime with the logon name entered on the logon page of the application. Examples: cn=%USER%, uid=%USER%. Active Directory users may use DOMAIN\%USER% and skip all other options except ldap_server as this notation eliminates the need to construct the full distinguished name. =item ldap_base STRING. String which indicates where in the hierarchy to begin searches. If a proxy user is not defined and anonymous binds are not enabled this value will be appended to the ldap_user_string to construct the distinguished name for authentication. =item ldap_proxy_user STRING. User to bind with to perform searches. If defined as anonymous, then anonymous binds will be performed and ldap_proxy_pass will be ignored. For organizations with users in multiple OU's this option can be used to search for the user and construct the DN based upon the result. =item ldap_proxy_pass STRING. Proxy user password. Ignored if proxy user defined as anonymous. =item ldap_opts HASH. Options to add to the connect string. Normally only needed if server does not support LDAPv3. =item ldap_tls_opts HASH. If defined, the connection will use Transport Layer Security (TLS) which provides an encrypted connection. TLS is the preferred method of encryption, ldaps (port 636) is not supported. This is only possible if using LDAPv3 and the server supports it. These are the options for the TLS connection. See the Net::LDAP documentation under start_tls for options, but the defaults should work in most cases. =item Example configuration to use Microsoft Active Directory ldap_server = AD-Domain-Controller1,AD-Domain-Controller2 ldap_user_string = DOMAIN\%USER% Note: Only one domain is currently supported in this configuration =item Example configuration to use Novell E-Directory ldap_server = LDAP-Server-1,LDAP-Server-2 ldap_user_string = cn=%USER% ldap_base = o=MYORGANIZATION ldap_proxy_user = anonymous Note: This configuration will support users split across multiple containers as long as the containers exist below MYORGANIZATION =back =head3 Graph Settings =over =item edge_color STRING. Default color for link between devices. =item graph FILE. Full path and name to the GIF graph of the network. Path should be the same as in the C<netmap.html> component. =item graph_bg STRING. Background color for the graph. =item graph_color STRING. Text color for the graph =item graph_default STRING. Default type of graph to view in NetMap (svg,gif,png). Optional, defaults to C<svg>. =item graph_epsilon INT. Sets the C<epsilon> attribute in C<GraphViz> used to control the graph solver. Set to an integer value. This will improve the mapping and visual quality of them graph. Each integer step can mean an exponential time increase in the solving of the graph. =item graph_clusters BOOLEAN. Creates clusters of nodes based on their location field. Best with L<graph_layout> C<fdp>. Only use if all or most devices in a given location have the same location string. =item graph_layout STRING. Choose program to render graph with. Valid options are C<neato>, C<twopi>, C<circo> and C<fdp>. =item graph_fontpath STRING. Path for graphviz to find font files to be used for L<node_font>. Defaults to L<home>. =item graph_map FILE. Set to Full path and name to the ISMAP data for the network. Path should be the same as in the C<netmap.html> component. =item graph_nodesep FLOAT. Node Separation (in inches) of nodes in graph. =item graph_overlap BOOLEAN. Parameter passed to C<GraphViz> for the C<overlap=""> feature. =item graph_png FILE. Full path and name to the PNG graph of the network. Path should be the same as in the C<netmap.html> component. Use this if you prefer not to use GIF, or if your graphviz binary doesn't support GIF, reporting an error similar to C<Renderer type: "gif" not recognized. Use one of: [...png...]>. =item graph_ranksep FLOAT. Rank Separation of elements in graph. =item graph_ratio FLOAT or STRING. Graph's aspect ratio, may be a floating point number, or one of the keywords fill, compress, or auto. =item graph_raw FILE. Set to create the raw (.dot) graph file as well. =item graph_splines BOOLEAN. Turn on GraphViz's spline engine? (Is very processor intensive). =item graph_svg FILE. Set to create an SVG version of the graph. Requires GraphViz 0.8 or greater. =item graph_timeout MINUTES. Time to allow C<neato> to try and solve the graph. Default 60min. =item graph_x, graph_y FLOAT. The X and Y dimensions of the graph in inches. To convert to pixels, times by 100 (96 actually). So the default values of 30x30 will give you a graph that is about 3000x3000 pixels wide. =item node_fillcolor STRING. Default background color for device =item node_fixedsize BOOLEAN. True keeps the box size small and fixed (for huge graphs); false allows the box to be sized to fit the text inside. Default TRUE. =item node_font FILE. Name of the True Type Font used for label of node. Exclude .ttf in name. =item node_fontcolor STRING. Color of text =item node_fontsize FLOAT. Size of text in Pixels. Note that for the graph_overlap=scale option, the font gets scaled down and so an oversized font is used. =item node_map STRING. Colon separated list of values. Multiple node_map entries can exist. Entry is in format: Variable:Regular Expression:Attribute:Value:Key String:Key Title Variables that you can use include : label,ip Attributes can be any node attribute usable in GraphViz, such as fillcolor and color Examples: label:cat(?!-g):fillcolor:blue:cat:Blue Box - Catalyst Switch If the label (dns name) matches cat, but not cat-g, make it blue, with an entry in the key like C<[cat] Blue Box - Catalyst Switch> ip:^169\.233:color:yellow:node:Yellow Border - ResNet If the IP address of the device starts with 169.233, then make the border around the device yellow, with an entry in the key like C<[node] Yellow Border - ResNet>. You may leave off Key String and Key Title to get no entry in the key for this color combination. This can be useful to get only one key entry when using multiple node_map entries with the same attribute/value. =item node_problem STRING. Color to use for devices that are not accessible =item node_shape STRING. Default shape for device, normally box. =item node_style STRING. Default style of device, normally filled. =item root_device STRING. IP address of a device to be used as the "center" of the graph. =back =head1 DESIGN =head2 Design Goals =over 4 =item * Use of SNMP Leaf Names only; No OIDs =item * Easily extendible to new devices. No device-specific hacks in logic =item * Modular back-end database front-end setup =item * Security. Front-end abstraction from device manipulation means sensitive network devices are not exposed to a web interface . =item * Data Archiving. Data structures and backup routines to provide online and offline storage of network structure and usage. =item * Highly Configurable. Extract out all possible options to F<netdisco.conf> and avoid site-specific code. =item * Administration available on both command line and web interfaces. =back =head2 Back-End Components =over 4 =item netdisco.pm Perl Module that holds all the SQL interaction routines as well as some helper routines. Used by both the back-end and front-end. =item SNMP::Info Perl Modules created for this project that are used to provide the interaction between the device and Netdisco over SNMP. All device-specific changes are done in these modules. =item Network Walker Using a device as a starting point (root), the walker then tries to visit every device directly connected to the starting point. Neighboring devices are found with CDP. =item ArpNipper The ArpNipper is visits each discovered device with Layer 3 capabilities. Each device's ARP Cache is read and the IP address to MAC address translation is stored in the B<node_ip> table. The original ArpNipper was written by Jim Warner at UCSC. =item MacSucker The MacSucker visits each device with Layer 2 capabilities. Each device's Forwarding Table is read. MAC addresses that are on ports without a physical mapping (virtual ports) are skipped. MAC Addresses on ports with a neighbor recorded are skipped (uplink ports). MAC Addresses that are actually switch ports are skipped. The remaining MAC addresses are recorded as nodes in the B<nodes> table. If the device supports the v_name() call, and has VLANs, then the MacSucker tries to connect to each VLAN and macksuck() each VLAN. This is required for some devices like the Cisco Catalyst 5000, 3500, 1900, 6500 series. A few speedups are implemented for the devices that require each VLAN to visited: =over =item L<macsuck_no_vlan> This config file directive lists VLANs that exist in every device by default but do not ever have MAC addresses attached to them. =item L<macsuck_no> Use this config file directive to exclude problem devices. =item Macsuck only happens on VLANS listed under ports (New 0.94) Many VLANs may be on the device or in the vtpdomain, but only a few of them may be in use on device_ports. Macsuck will not try to visit the VLANs that are not in use on device ports. See L<macsuck_all_vlans> to override this. =back The original MacSucker was written by Mark Boolootian at UCSC. =item Helper Routines The 40+ routines for creating backups, logging, etc. Browse the source code or check out netdisco-api for more info. =back =head2 Database Netdisco uses PostgreSQL as its database store. Indexing is used heavily to speed up queries and facilitate large data sets. See the C<sql/> directory and INSTALL for more information. =head3 SQL Tables =over =item admin Queue for admin control panel tasks to be sent back and forth from the front-end. =item device Holds device information. Each device is identified by unique IP Address. =item device_ip Holds alias IP Addresses for devices. Each device can have multiple IP's stored in this table. The master IP address is either taken from SNMP information or from the reverse DNS entry of the device name. Also used to link a certain alias to a port. =item device_port Holds the interface (port) information for each device. One row for each interface exists with information about the port status. =item device_port_log Contains log entries for port_control, tool used for administratively enabling and disabling ports. =item device_port_ssid Holds SSID information for wireless access points. =item device_port_wireless Holds channel and power information for wireless access points. =item log Holds log entries for human use. =item node Holds an entry for each MAC address connected to the network that isn't a device. Tells on which switch port the node was seen, and when it was seen there. Also holds the archived data on node location. Archived data has the column ''active'' set to false. Data comes from L<MacSucker> =item node_ip Maps a MAC Address to an IP address. Has no notion of where this node was seen. Keeps time stamps of when this is from. Data comes from L<ArpNipper>. Archived data is similar to the L<node> table, where ``active'' is set to false for archived data. =item node_monitor Lists MAC addresses that are to be monitored for presence on the network; if one appears or moves at the end of a macwalk, send email to L<node_monitor_email> and the CC field in the node_monitor_table, if set. =item node_nbt Maps a MAC address to an IP address and its NetBIOS information, including NBT name, domain, and user. Archived data is similar to the L<node> table, where ``active'' is set to false for archived data. =item node_wireless Holds information about the a wireless station's radio -- maximum possible rate, current transmit rate, signal strength and quality, and rx/tx packets and bytes. This table has no archived data; it only contains the most recent sample for a given MAC address. =item process This table is used to coordinate the work of multiple child processes when performing parallel work. =item sessions Web sessions created by MasonX::Request::WithApacheSessions. Stores information about a current session in the global $m->session hash under mason. =item oui Populated with data from oui.txt Oui.txt contains the Organizationally Unique Identifiers (OUI) that map a MAC address to a vendor. The database is controlled by the IEEE. See INSTALL for more information. =item users User information for web front end. =back =head1 THANKS I would like to thank the following people for their contributions to Netdisco : Mark Boolootian and Jim Warner (Through who's ideas Netdisco was born and shaped) (UCSC) , Mike Hunter (UCB), Brian Wilson (NCSU), Bradley Baetz (bbaetz), David Temkin (sig.com), Edson Manners (FSU), Dmitry Sergienko (Trifle Co, .ua), Remo Rickli (PSI, Switzerland), Jean-Philippe Luiggi (sagem.com), A.L.M Buxey (Loughborough University, UK), Kevin Cheek (UMICH), John Bigrow (bnl.gov), George Pavel (llnl.gov), Charles Goldsmith (wokka.org), Douglas M. McKeown (saintmarys.edu), Revital Shvarzman (York U, Ontario), Walter Gould (Auburn U), Lindsay Druet and Colin Palmer (U of Waikato, Hamilton NZ), Dusty Hall (Auburn U), Jon Monroe (center pointe), Eric Miller (jeneric), Bill Fenner, Oliver Gorwits (Oxford U), Alexander Barthel (http://archiv.tu-chemnitz.de/pub/2005/0045/), Bill Anderson, Carlos Vicente (U Oregon), Alexander Hartmaier (t-systems.at), Justin Hunter (Arizona State U), Jethro Binks (U of Strathclyde, Glasgow), Jordi Guijarro (UAB.es), Sam Stickland (spacething.org), Stefan Radman (CTBTO.org), Clint Wise, Max Kosmach, Bernhard Augenstein. And probably lots of other people I forgot to put in here. Not to mention the authors and communities of all the other software that Netdisco is built upon. =cut