[nsp] I need a script that will tell me who's connected on a switch

Osama I. Dosary oid at saudi.net.sa
Sun Jun 6 09:26:38 EDT 2004


There is cool tool called RANCID. It is a bit of expect and perl,
(http://www.shrubbery.net/rancid/,) is also included in the FreeBSD ports.
It monitors config changes and stores configuration history and sends
updates by email. The RANCID package includes a utility called 'clogin'.
You give clogin the commands you want to issue on the router and the
router name/ip. It will perform the commands, and you can see the output
of its sessions with routers.

I'm using it, and I like it. But I had to write a small python output
parser since the output includes every character sent to and received
from the routers/switches.

I've also heard of other libraries tools that can be used that you might
want to take a look at:
Ciscoconf: http://sourceforge.net/projects/cosi-nms/
http://cosi-nms.sourceforge.net/related.html
If you like Perl there is a Perl library called Net::Telnet::Cisco,
which is also included in ActiveState Perl for Windows.
(I've looked for something similar in Python, but no luck.)

In order to perform the tasks you mentioned with RANCID, clogin can
handle the login into the device and running the commands. But you will
need to write some additional scripts to call clogin and extract to
information from the output.



Goldberg Alain (IT) wrote:

> 
>I other words, I'll feed the script which switch IP and port, and the
>router IP , and the script will lookup the MAC address(es) on this port,
>and then will look into the router and provide me with the IP(s)
>corresponding to this (those) Mac Addresses, then eventually I'll use
>another tool/script to figure out what's behind this IP.  
>
>So, before I'll go to write the script... Is anything already available
>?
>
>P.S. I need the ability to run it ad-hoc, so various systems such as
>Ciscoworks that keep old information and/or require a specific host
>agent are not good enough. 
>________________________________________________________________________
>________________________________________________________________________
>_________________
>Alain Goldberg - Network manager - CCDA/CCNA AGG-RIPE - Tower
>Semiconductors LTD.    Tel : 972-4-6506003 Fax : 972-4-6547788 Cell:
>972-64-209662
>________________________________________________________________________
>________________________________________________________________________
>_________________
>
>
>
>_______________________________________________
>cisco-nsp mailing list  cisco-nsp at puck.nether.net
>https://puck.nether.net/mailman/listinfo/cisco-nsp
>archive at http://puck.nether.net/pipermail/cisco-nsp/
>
>




More information about the cisco-nsp mailing list