Get Mac Address of a computer behind a router

In Windows you can retrieve the Mac Address of a remote computer using either:
PING then Arp - a

OR
Getmac /s <remotecomputername>
OR
Getmac /s <remoteipaddress>

I wonder if this will apply if a computer is behind a router

Thank you
jskfanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nader alkahtaniConsultantCommented:
You cannot see the MAC behind the router because doesn't forward ARP and MAC from Network to another
JohnBusiness Consultant (Owner)Commented:
You can try Comm View plus Remote Agent to look across subnets.  (tamosoft)
Don JohnstonInstructorCommented:
In Windows you can retrieve the Mac Address of a remote computer using...
No, you can't.  The only way you can learn the MAC address of a computer which is behind a router is to either use something like remote desktop to take control of that computer and look at the MAC or you could login to at router on the same network as the host and inspect the ARP cache of the router.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Rob WilliamsCommented:
If you can ping the PC, i.e. routing is in place you can use psexec to do an ipconfig /all on the remote computer which will give you the MAC.  This assumes you have no other restrictions like firewalls or permissions, but it will work across a router.
    psexec  \\192.168.123.123  -u username  -p  password  IPconfig /all
Or you could run arp on the remote computer
   psexec  \\192.168.123.123  -u username  -p  password  arp -a

https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
andreasSystem AdminCommented:
But all this tricks mentioned above, only works, IF you either have access to the PC/Device or the router itself. As an anonymous user you cannnot find out the MAC address of a device behind a router. There is also no way to code a tool to do this on legitimate ways (without hacking into one of the devices on the same subnet)
Rob WilliamsCommented:
I don't belive there was any mention this was an unknown subnet or group of computers?  Many legitimate business have routers between various networks. Thus they may have credentials and more.
jskfanAuthor Commented:
Rob Williams,
Yes I believe most environments do not have routers within the network, but Switch can be a router when IP Routing is enabled in order to route between Vlans.
So in this case Getmac or Ping+ arp-a commands do not work since it is the same as having a router between Vlans ?
Don JohnstonInstructorCommented:
I believe most environments do not have routers within the network,
I wouldn't say that.  Just about every network I work on have routers.  It's unusual to find one that doesn't. And then it's just a small business with a dozen or so people.
So in this case Getmac or Ping+ arp-a commands do not work since it is the same as having a router between Vlans ?
With getmac, there's no way to specify what network the target is on. I can't speak to ping+ though since I've never used it. But in the end, unless you can get access to the device in question (or a router on the network), you're not going to get the MAC address.
jskfanAuthor Commented:
Let's say you have only one router for traffic to Enter /Exit your network, and within your network you have L3 switches to route your subnets
I mean if you use Getmac or Ping then Arp -a to an IP in a different subnet than the computer you are running the commands on.
Will still not work
Don JohnstonInstructorCommented:
I mean if you use Getmac or Ping then Arp -a to an IP in a different subnet than the computer you are running the commands on.
Will still not work
Correct. It will not work.  You will not get the MAC of a host on a different network.  

Unless you use a program that can remotely manage that host or remotely access another host on that network and look at it's ARP cache.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JohnBusiness Consultant (Owner)Commented:
Did you check out Remote Agent by Tamosoft?  That allow Comm View to work across networks. You might consider a trial version to see if it helps you.
giltjrCommented:
The only way to get the MAC address of a computer that is on a different subnet than you (that is "behind a router") is to somehow have direct access to the same LAN/VLAN (meaning layer 2 network) that the target computer is on.

This means you need to have access to a router  that the target computer is on, have remote access to another computer on the same LAN/VLAN as the target computer, or have remote access to the target computer.

Having remote access to the target computer could mean RDP, telnet, ssh, or via a agent that is installed on the target computer.

If you don't have any of the above, then the only way to get it is to call the user up and ask them for the MAC.
masnrockCommented:
Only works within a subnet. ARP is a not a protocol decides to go across subnets. What exactly are you trying to accomplish?
jskfanAuthor Commented:
Thank you Guys
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.