BrianTX
(Korg Regular)
2002-06-06 06:01 PM
MAC Address

Is there a script or program that will enumerate remote MAC addresses (not necessarily PCs, just nodes) for given IPs? I have fiddled with ping and arp and had limited success.

Brian


Kdyer
(KiX Supporter)
2002-06-06 06:14 PM
Re: MAC Address

Brian,

You should be able get what you need from this?

http://cwashington.netreach.net/depo/view.asp?Index=612&ScriptType=vbscript

I know it is not Kix, but should be portable.

HTH,

- Kent


BrianTX
(Korg Regular)
2002-06-06 07:40 PM
Re: MAC Address

Hmm. thanks for the good info... but I don't think that will work for non-Windows OSes. I'm specifically talking about hp jetdirect print servers and linux machines.

Brian


Les
(KiX Master)
2002-06-06 07:46 PM
Re: MAC Address

Here's a low-tech brain fart. When I need to know a MAC quickly without going to my NMS, what I do is to clear my ARP cache (ARP -D), ping the device, and check my ARP (ARP -A).

Using SNMP, you should be able to query the ARP table of your router.


BrianTX
(Korg Regular)
2002-06-06 09:33 PM
Re: MAC Address

I have been fiddling around with it but it only works on the local subnet.

Brian


Howard Bullock
(KiX Supporter)
2002-06-06 09:41 PM
Re: MAC Address

Each router maintains its own list of MAC addresses that it has seen. I think you will have to hit each router and consolidate the lists.

Les
(KiX Master)
2002-06-06 10:56 PM
Re: MAC Address

...and I bet you've got a Perl script that'll do just that...

If you don't, a quick search on google will get you one.


Howard Bullock
(KiX Supporter)
2002-06-06 11:50 PM
Re: MAC Address

Sorry, I'll ease up on the Perl stuff. [Roll Eyes]

NTDOCAdministrator
(KiX Master)
2002-06-07 12:35 AM
Re: MAC Address

Oh!... Don't be sorry Howard. We all love KiXtart, but we all also want solutions to our problems as well, even if it is not KiXtart. [Roll Eyes]

Howard Bullock
(KiX Supporter)
2002-06-07 12:48 AM
Re: MAC Address

Les, Yeah what he said! [Wink]

Les
(KiX Master)
2002-06-07 02:07 AM
Re: MAC Address

EH HB, don't need to apologize for the Perl stuff. If KiX won't do it and Perl will, better to show what Perl can do. Maybe in the future, new versions of KiX will be able to do it too.

The only reason I mentioned it is that I was searching Google for a solution and all I could find was Perl stuff. You know, Perl is big in the NMS/SNMP arena. Take MRTG for example. I only wish there was room enough for both KiX and Perl. Unfortunately, not even enough for KiX (in my brain, that is). [Frown]

[ 07 June 2002, 02:09: Message edited by: LLigetfa ]


Howard Bullock
(KiX Supporter)
2002-06-07 02:27 AM
Re: MAC Address

You know, I have an empty KiXtart web page on my site. I just can find anything to post on it that is not already here. I can't really compete in the KixTart arena.

ShawnAdministrator
(KiX Supporter)
2002-06-07 02:32 AM
Re: MAC Address

oh man - im not saying anything. howard, your a sh*t disturber man, i like you. gawd, i've fallen and i can't get up - my gut is splitting - roflmao

[ 07 June 2002, 02:33: Message edited by: Shawn ]


Howard Bullock
(KiX Supporter)
2002-06-07 02:38 AM
Re: MAC Address

Don't hurt yourself [Big Grin]

BrianTX
(Korg Regular)
2002-06-07 04:26 PM
Re: MAC Address

I actually found some code written in C, but I don't have a C compiler so that doesn't do me too much good. It's not really a huge big deal.. I just thought it would be nice to have a command-line utility that resolves MAC addresses. This would help me in managing printer queues, mainly. Thanks for the effort guys.

Brian


Les
(KiX Master)
2002-06-07 06:47 PM
Re: MAC Address

Brian,
Did you know you can also query the MAC from your DHCP server (providing they use DHCP)?


BrianTX
(Korg Regular)
2002-06-07 08:26 PM
Re: MAC Address

We are using static IPs for our printers (I wish we weren't, but that's not my decision.)..

Brian


Kdyer
(KiX Supporter)
2002-06-07 08:48 PM
Re: MAC Address

Brian,

Send me your c code.. I should be able to compile it fer ya..

Kent


BrianTX
(Korg Regular)
2002-06-10 02:35 AM
Re: MAC Address

Thanks, Kent.. I'm not worried about it anymore, though. [Smile] I've been given the job of maintaining print queues (along with my many other duties -- IE patches, investigating SMS, logon scripts, McAfee deployment and updates, proxy server/monitoring software, various and sundry desktop support issues)... Anyway, we are converting from token ring to ethernet and I was updating the database including MAC addresses... but I found another way to do it (albeit a hair less convenient) via HP Web Jet Admin.

Brian

P.S. If you want to look at the C++ code, I found it here:

http://tangentsoft.net/wskfaq/examples/getmac-snmp.html