in reply to getting mac address
This is not exactly a perl question... but here is one answer.
Simple MAC queries depend upon the operating system used:
Operating system | Method |
Windows 95 and newer | winipcfg |
Windows NT and newer | ipconfig /all |
Linux and some Unix | ifconfig -a |
Macintosh with Open Transport | TCP/IP Control Panel - Info or User Mode/Advanced |
Macintosh with MacTCP | TCP/IP Control Panel - Ethernet icon |
In addition, you can also find the MAC of all computers on your network. If using linux, the arp utility (/sbin/arp) will display cached arp requests on your machine:
$ ./arp -a ? (192.168.1.1) at 00:06:25:E7:E8:09 [ether] on eth1 ? (192.168.1.101) at 00:06:25:2F:69:6F [ether] on eth1
You may have to ping the machine first to ensure the information is contained in the cache.
Manufacturer Information
On a side note, the first 24 bits of the MAC identifies the device manufacturer via the Organizationally Unique Identifiers (OUI). A simple perl script can probe the IEEE database of OUI to determine the related hardware per MAC address.
CPAN
You may also want to look at SNMP::BridgeQuery
|
---|
In Section
Seekers of Perl Wisdom