Look what I found …

26 Aug, 2010

Get control with some disco!

Posted by: admin In: CentOS|Switching & Routing

We have a lot of switches and the serverguys never know where they put their server when they need help with something.
This is a common problem for most network techs I pressume. (At least almost everyone I have ever met).

Now there’s quite a few switch portmappers out there you can buy but I like to use NetDisco.

It’s has a neat web interface so the serverguy can check where his server actually is located.You can find it at sourceforge.

Now, if you’re like me you’ll get a bit hesitant when you read the INSTALL pages but at the same time I was about to get started to do the full installation I found out about a much more pleasant way.

Here’s howto:

Ok, first thing, this is a guide for my CentOS5 server installation. It might work the same on other sites but I take no respone for it.

First thing, you will need the EPEL 5 rpm package. just wget it from the link location. After that intall it with for instance rpm -Uhv epel-release-5-3.noarch.rpm.

Once this is done you can actually use yum to install netdisco. This was all new to me and made it a walk in the park.

yum install netdisco.

Now ther will be a lot of dependenices installed like apache2, apache2_modperl,Net-SNMP,Postgress SQL Server,Mason,GraphViz. They’re all mentioned on the netdisco.org page. Whe all this is installed YOU WILL NEED TO RUN THE /usr/sbin/netdisco_config.

This is the initial wizard like setup script for the installation. If you don’t run it, we’ll good luck to you.Basically it query you for a few parameters:

Database password

domain name

snmp community

central router/switch ip

admin user & password.

That’s basically it. Netdisco will start mapping your network, this will take few minutes and you’ll see the progress when new devices are found.

You can the use your normal service commands to check the daemon.

[root@XXX~]# service netdisco status
netdisco (pid 29435) is running…
n e t  d i s c o
————————————————–
Admin Daemon is running under pid 29435.

If you want to you can tweak the netdisco user crontab  since this is where you specify you’re central switch and how often Netdisco will update mac addresses, preform discoverys etc etc. Default it looks like this:

#       This is the crontab for the netdisco user
#       Output is found in /data/netdisco/logs
# $Id: netdisco.crontab,v 1.8 2009/06/10 18:39:03 maxbaker Exp $

#MAILTO=max
PATH=/bin:/usr/bin:/usr/local/bin

# — Weekly –

# Walk network for new devices once a week (Wed @ 14:00)
0 14 * * 3      /usr/share/netdisco/netdisco -b -r your-router.network.com

# — Daily –

# Backup at 1am every day
0 1 * * *       /usr/share/netdisco/netdisco -b -B

# Restart admin panel daemon nightly
0 2 * * *       /usr/share/netdisco/netdisco -b -p restart

# Refresh Graph every day
0 3 * * *       /usr/share/netdisco/netdisco -b -g 2>&1

# Refresh Devices at 9:00 every day
0 9 * * *      /usr/share/netdisco/netdisco -b -R

# — Hourly –

# Arp Nip every hour on the half hour
30 * * * *  /usr/share/netdisco/netdisco -b -a

# Mac Suck every 2 hours
0 */2 * * * /usr/share/netdisco/netdisco -b -m

# Grab NetBios Info from Nodes three times a day
0 8,13,21 * * * /usr/share/netdisco/netdisco -b -w

To get my installation to work . I had to change the permissions on the mason directory unser /usr/share/netdisco. This was default roor:root owned. It took a while for me to find and maybe it’s only on my server this is a problem, but if you get the same error , basically that you can’t view any webpage after initial login, this might do the trick for you. I just changed owner to apache:apache since my apache installation runs with these user priviliges. chown -R apachae:apache mason.

I also noticed that I couldn’t get the MAC to ARP correlatoin working, this beacuse I don’t have a router in the cdp discovery path. I fixed this by adding this to netdisco user’s crontab.

30 * * * *  /usr/share/netdisco/netdisco -b -A my-router.network.com

That’s it. Now you can login, create a few user for the serverguys and have a cup of coffe. At the same time you have just got an uptdated inventory of all your switches, their current ios version, an updated vlan database and serial numbers. By just grabbing that coffe. I tell you, netdisco rocks.

PS. don’t forget to register as a user so that the community knows it’s being used. Register here

No Responses to "Get control with some disco!"

Comment Form

About

This is my place. I can do whatever I want here.. Nice.. :-)
My idea is to publish some of the things I come across while searching for solutions that comes in handy in my line of work.
I hope someone out there will be interested..