Network management solutions are used to manage network devices such as routers, switches, servers, and of course the nodes. These NMS solutions determine the elements in your network and pull out information about the connected devices using the SNMP protocol. Further, the solution allows you to lay SNMP-traps depending upon the behavior of the devices, so that an alert can be sent to administrators to take appropriate action in case of any failure.
JFFNMS (Just for Fun Network Management System) is a solution that comes for free and lets you manage your entire network from any location using just a Web browser. Available for both Linux and Windows platforms, its features include SNMP polling of routers, switches and network interface status. For proactive monitoring, it has alarms and SNMP events traps. The performance of the network can be actively monitored and this is displayed using graphs. Various network and device statistics like interface and host information (such as that of CPU, memory and disk) are available through the application. Alerts that are sent through e-mail are based upon alarm filters. Here we will see how to set this up on Windows. We would need Apache, PHP and MySQL to deploy JFFNMS, and we can install all of this on any version of Windows. The installer package for JFFNMS is on this month's PCQEssential CD.
Preparing your system
We need to first install Apache and MySQL. The latest setup packages for these need to be downloaded from their websites for the Win32 platform. The Apache file we used was 'apache_2.0.52-win32.x86-no_ssl.msi'. For MySQL, we used the 'mysql-essential-4.1.14-win32.msi'. Let's install both in their 'Full' install modes.
Configuring MySQL for JFFNMS
During the installation of MySQL from the 'Server Machine' setting, select 'Non-transaction database only'. Set up the 'root password' for the database as 'jffnms'.
Install PHP 5
Finally, we need PHP 5 for Windows. Download this file from http://www.php.net/get/php-5.0.5-Win32.zip. This is a zip file and we need to first extract its contents to 'C:\\PHP'. We need to perform a couple of simple steps to allow PHP to use MySQL.
This is done from the Command prompt as shown ahead. Remember to replace 'C:\\Windows' with the path to your Windows folder.
C:\\PHP\\>copy php.ini-dist c:\\windows\\php.ini
C:\\PHP\\>copy libmysql.dll c:\\windows\\
C:\\PHP\\>copy extra\\mibs to c:\\usr\\mibs
Create the folder 'C:\\jffnms', then on the PCQEssential CD go to the JFFNMS folder and copy all the files to it on the hard disk. Before we install JFFNMS, we need to create a user for the application with Windows. So, open User Manager (Administrative Tools) and create a 'jffnms' with any password (remember to check 'Password Never Expires' and uncheck 'Must change password at next logon' for this user). Then right click on the 'jffnms' folder and give this user 'Full Control' permission including for all its sub-folders.
Installing other utilities
JFFNMS also requires some tools that will do network mining to extract data from your running network. Download WinPCAP for NMAP from http://winpcap.polito.it/ and install them as well. Then download RRDTOOL (rrdtool-1.0.49-win32-bin.zip) from http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/?M=D. Extract this zip file to a temporary folder and copy the 'rrdtool.exe' file to 'c:\\jffnms'. Download NMAP for Windows (nmap-3.81-win32.zip) from http://www.insecure.org/nmap/nmap_ download.html. Again, extract the archive to a temporary folder and copy 'nmap.exe' to 'c:\\jffnms'. That completes the installation of JFFNMS.
Configuring Apache and PHP
Open 'c:\\program files\\apache group\\Apache2\\conf\\httpd. conf' file in Notepad and edit or add the following lines.
LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php
Now open 'c:\\php\\php.ini' file in Notepad and edit or add :
register_globals = On
register_argc_argv = On
allow_url_fopen = On
extension_dir = c:\\php\\ext
(Uncomment the following):
(set it to your mail server IP or DNS name)
SMTP = your.mailserver.com
Save this file and copy it to 'c:\\windows' (replace with the path to your Windows folder) and restart the Apache service. Note, if you don't change the entries mentioned above, JFFNMS will not work.
Configuring MySQL database
It's time to create and prepare a database for our JFFNMS setup. Issue the following command on your Windows command prompt.
C:\\> cd c:\\Program Files\\MySQL\\MySQL Server 4.1\\bin\\
C:\\Program Files\\MySQL\\MySQL Server 4.1\\bin\\> mysql.exe -u root –p jffnms
mysql>CREATE DATABASE jffnms;
mysql>GRANT ALL PRIVILEGES ON jffnms.* TO jffnms@localhost IDENTIFIED BY 'jffnms';
Now we have to create a data structure in MySQL database, so that JFFNMS can use it to store the network information. JFFNMS provides us with a pre-defined data structure that can be directly imported into our MySQL database. To do so, issue this command.
c:\\Program Files\\MySQL\\MySQL Server 4.1\\bin\\>mysql.exe -ujffnms -pjffnms jffnms < c:\\jffnms\\docs\\ jffnms-0.8.2.mysql
This command will import all required database in to MySQL.
It's not over yet and we still need to configure the JFFNMS itself, so that entire system can work in sync. Open a browser on the JFFNMS machine and type in http://localhost. You will be asked for a username and password, enter 'admin' in both fields to login. This will bring up a configuration page on your screen, where you can change the password.
On the same page you will get some error messages for 'diff', 'neato', 'smsclient', 'fping', 'ntpq', 'PgSQL' and 'SOAP' that you can ignore. Save the configuration. Ignore these errors and save the configurations. Any other error except those listed above will need changing the values on this page until everything turns to green color. Finally you have to create a scheduled task 'Auto discovery' of your network. Open the 'Windows Scheduled Tasks' folder from Control Panel and add a new task. On the first/second page of the wizard, browse to and select 'c:\\ jffnms\\engine\\windows\\autodiscovery _interfaces.bat'.
Select the schedule as 'Daily' and change the start time to 7.00 AM and repeat to 'Every 1 Days'. You need to enter a username and password for the task to run-you must use the local administrator credentials here. Create three more scheduled tasks in the same way for the files 'consolidate.bat', 'poller.bat' and 'rrd_analizer.bat'. Set the 'repeat' schedule for each of these as 1 minute, 4 minutes and 30 minutes respectively and set them all for a duration of 24 hours.
Now, open the JFFNMS Web-management console using your browser. Leave the setup running for sometime and your entire network will be discovered and displayed, and become available for management.