Solved

get computer name based on mac address

Posted on 2007-03-19
5
280 Views
Last Modified: 2010-03-18
how can i get computer name based on mac address?
0
Comment
Question by:ellandrd
  • 2
  • 2
5 Comments
 
LVL 70

Expert Comment

by:KCTS
ID: 18746707
I can't think why you would ever need to do this. Do you have a specific reason in mind?

If you are talking about the local PC then ipconfig/all will show the MAC address, IP Address and Hostname and a load of other stuff as well

The problem with MAC to Hostname is there is no direct way of doing. The MAC is mapped to the IP address with the ARP protocol so for PCs on the local subnet the ARP cache is going to contain the MAC and IP of machines that your PC has communictates with recently. you can view this with ARP -a.

But there is no hostname info in ARP. Also this is only applicable to the local subnet, so there is no cached MAC info about remote machines.

If there is cached MAC and IP information about a machine in your local ARP Cache then, providing you have a reverse lookup zone set up in DNS, you could do a reverse lookup on the IP address and get the Hostname. This two stage process is very clumbersome and will not work for non-local machines.

I dont know of any utilities that could provide such information in an easier way.
Perhaps someone else does?
0
 
LVL 16

Author Comment

by:ellandrd
ID: 18746715
i had a few users trying to connect to my wireless network.  i have 1 already kicked off but i have one unknown user.

i would just kickoff all users but then i have to go and add them all one by one on again and i have 30 users... - this is a days job that im not wanting to spend doing today so finding out the computer name based on mac address i can tell who's who, as on my network i have named all computers in the same format....
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 500 total points
ID: 18746791
Try this:

@echo off
REM ping all hosts on the 192.168.0.x network.  Change as needed.
for /l %%a in (1,1,254) do ping -n 1 -w 10 192.168.0.%%a
REM Take arp table and sort by MAC address
arp -a | find "-" | sort /+20 > arp.txt
Show it in notepad and look through list for the mac address
start arp.txt

Once you have the IP you could try

nbtstat -A 192.168.x.x

or even check your dns / dhcp server to see if it has this entry with a computer name

Steve
0
 
LVL 70

Expert Comment

by:KCTS
ID: 18746853
If you know the MACs of the allowed computers why not set up MAC filtering on the wireless access point to prohibit other users.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 18746872
Thanks for selecting my answer....

MAC filtering is a good basic plan on an AP though as KCTS has suggested, I tend to prefer leaving the AP fairly open and putting a firewall in front of it to authenticate the users etc. but as always depends what you need / want.

Steve
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to roll into all sub dirs 7 44
Exchange 2010 smtp and senderbase ratings 3 49
sync conflicts 1 55
Strange routing problem between subnets 2 77
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now