.
I have tested them successfully on Linux and Windows XP.
# Uses sourceforge net-snmp utilities and the CISCO-CDP-MIB.
# 1) Install net-snmp from http://net-snmp.sourceforge.net.
# 2) Download these mibs from ftp://ftp.cisco.com/pub/mibs/v2
# CISCO-SMI
# SNMP-FRAMEWORK-MIB
# RMON-MIB
# CISCO-TC
# CISCO-VTP-MIB
# RFC1155-SMI
# RFC-1212
# SNMPv2-TC-v1
# CISCO-CDP-MIB
# 3) Copy these MIBS to /usr/share/snmp/mibs or c:\usr\share\snmp\mibs,
# depending on where you installed the net-snmp utilities
# 4) In /usr/etc/snmp/snmp.conf, add the lines:
# mibs +CISCO-CDP-MIB
#
# This will allow textual OID's instead of numeric OID's.
#
# 5) Add the net-snmp bin directory to the PATH environment variable,
# so that the script can find the executable.
#
# Example: Getting Cisco neighbour devices for IOS switch 10.170.41.5
# 'cisco' is the configured SNMP read community string.
#
D:\Dev\perl\ciscoworks>perl getCdpNeighbours.pl 10.170.41.5 cisco
10.170.41.62:Customer_Demo_:cisco WS-C3550-24
10.170.41.6:FastEthSwitch:cisco WS-C2924M-XL
10.170.41.30:Core:FE511
10.170.41.31:core:FE511
10.170.41.70:edge:FE511
10.170.41.65:Switch:Cisco WS-C3550-24
Perl script file: