Question

Resolve IP address with given MAC-address

Asked by: witty

Is there a tool out there, that gives me the ip-address or the computername with given MAC-address??

thanks
witty

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2000-08-18 at 05:03:05ID11040185
Tags

mac

,

ip

,

resolve

,

address

Topic

Windows NT Operating System

Participating Experts
7
Points
120
Comments
39

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. How To Get The MAC Addres From an IP Address or Comp…
    I am writing a webservice which takes in a MAC address, IP addres, or computername. I check the string and convert IP or Computername to the MAC address. For IP address, I tried to spawn an EXE (NBTSTAT -a IP_Address) so I could parse the output. For computername, I was goin...
  2. Mac Address/IP address
    through Hyperterminal located on accessories, I connected to the switch with its IP address and in the status and counter -Address table menu it shows 02 columns , and a bunch of rows of Mac address and Located port Mac Address located on port 001e6-197b67 I8 I w...
  3. resolve mac to ip
    i know there is software out there that will do this, but id rather not purchase such a simple program. i would like to be able to enter a mac address and get the ip address that its using. this can be from my windows workstation, or cisco router/switch. i know the command...
  4. Determine IP Address given MAC address
    I would like to create a program that is able to resolve an IP address based upon a MAC address. Note that the IP address may be outside of the subnet that the program is going to run on, though it is on the local network. Thanks

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: ch12345Posted on 2000-08-18 at 05:30:05ID: 3978753

What happened to ARP command?

 

by: arminlPosted on 2000-08-18 at 06:11:42ID: 3979324

ch12345:

I think standard arp command cannot do this. Am I wrong?

....Armin

 

by: EnbeePosted on 2000-08-18 at 07:05:43ID: 3980049

ARP is not working. I´m looking also for a tool or a command.

 

by: wittyPosted on 2000-08-18 at 07:10:18ID: 3980098

well, what will work (in theory) is:
ping -n 1 172.16.1.1  >FILE
arp -a 172.16.1.1    >>FILE
ping -n 1 172.16.1.2 >>FILE
arp -a 172.16.1.2    >>FILE
and so on ...

and then do a grep on this file

but this isn't that performent ;-)

witty

 

by: arminlPosted on 2000-08-18 at 08:15:50ID: 3981145

.. and it assumes that you do at least know which IP range the suspect box is in.

....Armin

 

by: tim_holmanPosted on 2000-08-18 at 08:20:57ID: 3981208

Pull down the ARP cache from one of your switches and work it out from there.
You'll only be able to do this reliably within your own managed LAN / WAN.
You can't find the IP address from a MAC address alone for a machine on the Internet, as MAC addresses are non-routable.

 

by: MrHandPosted on 2000-08-18 at 09:00:28ID: 3981762

witty, why not use ipconfig /all

 

by: wittyPosted on 2000-08-21 at 08:07:13ID: 4010703

tim_holman:

can you give me an example how to do this (and of course this issue is only about my LAN!)

The best thing really would be getting ALL MACs with all IPs (or ComputerNames) or vice versa!!

witty

 

by: wittyPosted on 2000-08-21 at 08:34:34ID: 4011344

MrHand:

well, I get the ip and the MAC of *my* PC :-(

But I want a tool, that tells me the IP address (or ComputerName) of a given MAC-address!

If I had that much time, I would go around my office, and type "ipconfig" on every machine (and there are *only* about 500)!!

witty

 

by: arminlPosted on 2000-08-21 at 09:14:55ID: 4012034

Seems there isn't such a tool avaliable. So we'll have to write one.

I think that automating witty's approach using some simple batch program loops would do the trick (though running through all the adresses will take a few minutes).

I'd be happy to write and post such a "tool", but of course I'd like you to confirm that this is an acceptable solution for you, before I spend the time to do it.

....Armin

 

by: wittyPosted on 2000-08-21 at 09:50:29ID: 4012643

I just found a faster method with nbtstat!!!

You will need NETBIOS, but that's the thing, that will generally work for me (with few exceptions)!

You won't get the MAC-Addresses of devices don't using NETBIOS, but I will get their address with ping and arp!!

thanks witty

 

by: arminlPosted on 2000-08-21 at 10:05:15ID: 4012928

The outcome is limited to machines with Microsoft OS or compatible on it. No print boxes, no routers, switches, ect. And you still get only one adress at a time.

Of yourse, if I make a batch loop solution I can use the same routine to trigger and filter NBTSTAT, with no difference (except the above limitation).

And I doubt nbtstat -a is faster than ping (though this needs to be tested).

"To batch or not to batch", still the major question.

Armin

 

by: wittyPosted on 2000-08-21 at 10:13:01ID: 4013082

well, one command resolving ALL MAC-addresses of devices using TCP/IP would be GREAT!!


witty

 

by: arminlPosted on 2000-08-21 at 11:55:29ID: 4013993

Batch or not batch?

....Armin :-)

 

by: wittyPosted on 2000-08-21 at 12:14:30ID: 4014314

ok ;-)

I would be very happy, obtaining such a tool!!!
=> NO BATCH :-)

witty

 

by: arminlPosted on 2000-08-21 at 12:59:04ID: 4014831

Your wish is my command.

@if [%debug%]==[] Echo off
cls
echo ---------------------------------------------
echo MAC discovery tool V1.0 (C) 2000 Armin Linder
echo ---------------------------------------------
If [%1]==[] goto Help
If [%1]==[/?] goto Help

REM parse the starting IP adress in %1
for /F "tokens=1,2,3,4 delims=." %%w in ('echo %1') do call :intoenv %%w %%x %%y %%z SW SX SY SZ
Echo Starting Adress: %SW%.%SX%.%SY%.%SZ%
Set EI=%2
If [%EI%]==[] Set EI=%1
Echo Ending Adress:   %EI%
Echo.

Set CW=%SW%
Set CX=%SX%
Set CY=%SY%
Set CZ=%SZ%
If NOT [%CZ%]==[0] Echo %Time%: %CW%.%CX%.%CY%.%CZ% ...

:loop
      Set CI=%CW%.%CX%.%CY%.%CZ%
      If [%CZ%]==[0] Echo %Time%: %CI% ...
      Ping -n 1 %CI% -w 100 >nul
      For /F "tokens=1,2 skip=3" %%i in ('arp -a %CI%') do Call :HostInfo %%i %%j
      if [%CI%]==[%EI%] goto loopend
      If [%CZ%]==[255] (Set CZ=0) Else (Set /A CZ=CZ+1 & Goto loop)
      If [%CY%]==[255] (Set CY=0) Else (Set /A CY=CY+1 & Goto loop)
      If [%CX%]==[255] (Set CX=0) Else (Set /A CX=CX+1 & Goto loop)
      If [%CW%]==[255] (goto loopend) Else (Set /A CW=CW+1 & Goto loop)
      goto loop
:loopend

goto end

:IncZ
      Set %1=0
      Set /A %2=%2+1
      Goto :EOF

:HostInfo
      If [%2]==[00-00-00-00-00-00] Goto EndHostInfo
      Echo         IP: %1 MAC: %2
:EndHostInfo
      Goto :EOF

:IntoEnv
      Set %5=%1
      Set %6=%2
      Set %7=%3
      Set %8=%4
      Goto :EOF      

:help
      echo Usage: scanmac starting-ip [ending-ip]
      echo.
      echo will list IP and MAC adresses of all active computers
      echo within a physical network segment.
      echo.
      echo if ending-ip is omitted, ending-ip = starting-ip
      echo.
      Pause
      goto end

:end

Tool is currently scanning my office net (8 C-class IP subnets on physical ethernet, 2 currently populated). Running smoothly so far. Will post screenshot of results in approx 15 minutes for completeness. Currently on subnet 5 of 8.

command line has been:

scanmac 192.168.8.1 192.168.15.254

Known issues:

* cannot detect scanning computer's own MAC address (guess why :-))
* can scan all IP subnets on physical ethernet if you set default gateway of scanning machine to own IP address (undocumented Microsoft? IP stack feature, but sometimes convenient)
* does not exclude invalid host adresses (0 and 255), scanning them doesn't do any harm.
* easy to change to use nbtstat instead of arp. Trade "physical subnet" and "cannot detect own adress" limitation against "NETBIOS boxes only" limitation -- your choice.
* ping is configured to wait only 100 msec for response, to keep scanning time of empty subnets low, and send just one single ping packet. May lead to missing MACs on heavily loaded segments. Customize ping parameters if necessary.
* included some tactically well choosen echos so you can see scanning progress.
* output may redirected to file for further processing.
* pure batch, tested on Windows 2000 box. Should work with NT4 right away (except time-stamp). Testing with NT4 box in progress.

Oops, W2000 test just completed successfully. Took me a while to write this comment. Tool scanned 8 nets (2048 adresses), took 15 minutes to complete. See results in next message.

....Armin


 

by: arminlPosted on 2000-08-21 at 13:10:16ID: 4014953

Finished task on NT4 box perfectly, except time-stamp, NT4 does not yet support %Time%.

Results on Windows 2000 box:

---------------------------------------------
MAC discovery tool V1.0 (C) 2000 Armin Linder
---------------------------------------------
Starting Adress: 192.168.8.1
Ending Adress:   192.168.15.254

21:39:09.19: 192.168.8.1 ...
21:41:17.49: 192.168.9.0 ...
        IP: 192.168.9.1 MAC: 00-50-da-11-89-62
        IP: 192.168.9.2 MAC: 00-50-da-11-8a-6f
        IP: 192.168.9.3 MAC: 00-01-02-1b-a0-a1
        IP: 192.168.9.4 MAC: 00-50-da-11-8a-90
        IP: 192.168.9.5 MAC: 00-01-02-1b-9f-78
        IP: 192.168.9.6 MAC: 00-01-02-1b-a1-bc
        IP: 192.168.9.8 MAC: 00-50-da-11-8a-7a
21:43:22.16: 192.168.10.0 ...
21:45:30.86: 192.168.11.0 ...
21:47:39.04: 192.168.12.0 ...
21:49:47.23: 192.168.13.0 ...
21:51:55.41: 192.168.14.0 ...
21:54:03.59: 192.168.15.0 ...
        IP: 192.168.15.1 MAC: 00-a0-24-f1-31-be
        IP: 192.168.15.10 MAC: 00-50-04-19-e6-4d
        IP: 192.168.15.11 MAC: 00-50-da-56-19-d8
C:\>

 

by: tim_holmanPosted on 2000-08-21 at 15:05:54ID: 4016310

You could also use a port scanner to scan a range of IP address (ping only), and then determine the MAC address from the ARP cache.

 

by: wittyPosted on 2000-08-22 at 00:16:56ID: 4019985

arminl:

Hi and thank you VERY much for your code - but I get the error, that the label EOF isn't found!
Does this methode "for ... in ... do call LABEL" really work with NT4?

witty

 

by: wittyPosted on 2000-08-22 at 00:18:49ID: 4019989

tim_holman:

the problem is: my arp cache only holds up to 4 or 5 addresses (at least if I do a portscan, and then "arp -a", I will only see 4 or 5 addresses!)

witty

 

by: arminlPosted on 2000-08-22 at 00:43:24ID: 4020168

They do. I tested the routine on my NT 4 box (NT Server, SP5) as well as on 2000. Did you copy/paste the routine, or punch it in (typo ...?)

If you want, send me a direct e-mail to armin.linder@adlon.de, and I'll send you the file againas an e-mail attachment.

Armin.Linder@Adlon.de

 

by: arminlPosted on 2000-08-22 at 01:26:15ID: 4020433

Got the malfunctioning batch from witty and looked into it.

The problem is that Experts Exchange when copying the batch from the browser seems to append a trailing blank to all lines, which invalidates some string comparisions.

Either remove all the trailing blanks, or send me an e-mail to get the "clean"  version.

....Armin

 

by: tim_holmanPosted on 2000-08-22 at 01:52:08ID: 4020643

All this for 30 points... Armin - you're INSANE !!!

 

by: wittyPosted on 2000-08-22 at 02:03:48ID: 4020742

tim_holman:

Did I give him 30 points???
I don't think so!


I haven't given him any points yet, but believe me, he won't get only 30!!!

witty

 

by: wittyPosted on 2000-08-22 at 02:04:26ID: 4020746

Thanks for this progi!!

 

by: arminlPosted on 2000-08-22 at 02:59:29ID: 4021211

Tim

it's never the points that are my main reason to contribute in Experts Exchange, but finding solutions to problems. Getting some points every now and then is convenient because I can use them to post own questions that has very often saved me hours after hours looking in books for answers others probably already have at hand.

I have been thinking a while ago about how to achieve this MAC infos myself, but never took the time to sit down and go into the details.

Actually I have started writing the program about 3 hours before witty agreed to a batch file scanning all adresses, since that's not exactly what we all have been seeking for because of the obvious performance problem on large subnets.

So my primary reward is having the program, not the points.

And yes, I am insane, that's exactly what my girlfirnd says to me when I return from the office well after midnight as well. Insane, maybe, but happy with it. :-)

....Armin

 

by: MrHandPosted on 2000-08-22 at 08:27:16ID: 4025873

Armin, very slick script. Question, why would one need to know MAC addresses as they apply to this scenario? Wouldn't hostname and ip suffice? Thanks in advance.

 

by: arminlPosted on 2000-08-22 at 10:47:44ID: 4027837

I don't know what exactly for witty uses the script for, for me it was more a technical challenge to find a working solution.

Since I do however have witty's real e-mail adress I'll forward the question to him and ask him to post a comment here if he likes.

Armin.Linder@Adlon.de

 

by: wittyPosted on 2000-08-22 at 22:51:24ID: 4032421

Well do you really want to know what I want it for?

OK:
We use good(?), old Token-Ring!
Switches are from Madge (CAU & LAM).
The software shipped with the switches looks fine, but we often have beaconings on the LAN, what the software and the CAU don't recognize!

The only way how I can find out, that there are beaconings and between which NICs this occurs is our AS/400.
The Network-Management tools of the AS/400 tell me the MAC-Address of the adapter, that produces the errors in the LAN!

And this script will do the rest!

In the past, I had to click on every connection in the software of the switch to find out the MAC, but this is very boring;-) doing this on 500 connections!

I hope I explained clearly!

witty

 

by: MrHandPosted on 2000-08-23 at 07:56:42ID: 4037959

Witty, I use Token Ring, too. :~(

 

by: wittyPosted on 2000-08-23 at 08:50:56ID: 4038831

MrHand, what tools do you use, to detect errors on the ring (on hopefully locate them)?

witty

 

by: MrHandPosted on 2000-08-23 at 10:15:58ID: 4040013

The standard fare: ping, ipconfig, tracert, nbtstat. Also use a sniffer, but mostly with the old hardware, my two feet, eyes and hands.

 

by: tim_holmanPosted on 2000-08-23 at 14:03:19ID: 4043906

Doesn't the owner of the beaconing PC start complaining ?

:)

 

by: wittyPosted on 2000-08-23 at 22:47:04ID: 4048112

Not only he :-( !!
But the whole ring starts to die!
If I don't find this error for about 2 hours, the ring is dead (NOBODY can work!!)

witty

 

by: tim_holmanPosted on 2000-08-24 at 10:47:05ID: 4056472

Roll on FDDI....

 

by: InclininWirefreePosted on 2002-10-26 at 12:40:17ID: 7373260

 

by: InclininWirefreePosted on 2002-10-26 at 12:41:06ID: 7373262

 

by: cpadmPosted on 2008-06-09 at 09:00:21ID: 21744247

Fantastic script Armin!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...