- Community Home
- >
- Networking
- >
- Legacy
- >
- Switches, Hubs, Modems
- >
- Perlscript to connect hp switch and read the mac-a...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-12-2008 10:00 PM
тАО10-12-2008 10:00 PM
Perlscript to connect hp switch and read the mac-address
I need a perlscript to connect my hp procurve switch and read the mac-address from the connected hosts.
Can someone help me with an example?
Thanks Christian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2008 01:39 AM
тАО10-13-2008 01:39 AM
Re: Perlscript to connect hp switch and read the mac-address
if I true understand you
you want look pc mac address each port on switch
is this true ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2008 02:11 AM
тАО10-13-2008 02:11 AM
Re: Perlscript to connect hp switch and read the mac-address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2008 03:47 AM
тАО10-13-2008 03:47 AM
Re: Perlscript to connect hp switch and read the mac-address
with snmp there is no way to find out a matching witch mac-address connect on which port on the switch. (like the command show mac-address vlan 1)
;-)) I know my english is not good.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2008 05:13 AM
тАО10-13-2008 05:13 AM
Re: Perlscript to connect hp switch and read the mac-address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2008 10:46 AM
тАО10-13-2008 10:46 AM
Re: Perlscript to connect hp switch and read the mac-address
sorry the script do not work.
#!/usr/bin/perl
my $address = "x.x.x.x";
my $community = "public";
use SNMP::BridgeQuery;
use SNMP::BridgeQuery qw(querymacs queryports queryat);
my $fdb = queryfdb(host => $address,
comm => $community);
unless (exists $fdb->{error}) {
($fdb->{$mac} = "n/a") unless (exists $fdb->{$mac});
print "This MAC address was found on port: ".$fdb->{$mac}."\n";
}
~
Output:
/test.pl
This MAC address was found on port: n/a
But I do not why. The mac addresses are in the snmp parameter (with a snmpwalk).
It is very mysteries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2008 12:04 PM
тАО10-14-2008 12:04 PM
Re: Perlscript to connect hp switch and read the mac-address
given that NeDi (www.nedi.ch) can do exactly that (correlate host MAC addresses to switch ports on ProCurve boxes), the information has to be there in the SNMP MIBs. The discovery module is even a perl script, so you might have a look into it for how it's done.
HTH,
Andre.