LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-26-2007, 01:51 PM   #1
nickraj
LQ Newbie
 
Registered: Sep 2006
Location: usa
Posts: 25

Rep: Reputation: 15
MAC address of remote PC


HOW do i get MAC address of remote computer.
 
Old 01-26-2007, 01:53 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
There are many ways to do this.. you need to give a lot more details about what kind of access you have to that machine etc... if you have no access to it, you can not get it's mac as it serves no purpose outside of the local network, so would not be included in any data as a side effet or anything.
 
Old 01-26-2007, 02:11 PM   #3
nickraj
LQ Newbie
 
Registered: Sep 2006
Location: usa
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie
There are many ways to do this.. you need to give a lot more details about what kind of access you have to that machine etc... if you have no access to it, you can not get it's mac as it serves no purpose outside of the local network, so would not be included in any data as a side effet or anything.
I mean remote computer on the same LAN .... .... and can you aslo tell how to get the MAC of a Linux box from a Windows box .... I am able to get the IP by pinging the linux box .. but then using arp -a <IP> i cant get mac because there is a router connection the two networks... and i get the mac of the router
 
Old 01-26-2007, 02:35 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
right well as above, you can't. not outright... you have no reason to need it, so no standard protocol exists to do this. log into the box, run ifconfig, and grep the mac address out of it.
 
Old 01-26-2007, 03:25 PM   #5
nickraj
LQ Newbie
 
Registered: Sep 2006
Location: usa
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie
right well as above, you can't. not outright... you have no reason to need it, so no standard protocol exists to do this. log into the box, run ifconfig, and grep the mac address out of it.
Isn't it possible to accces the table of the router so that I can get the mac for a perticular ip . Or there is no way
 
Old 01-26-2007, 10:55 PM   #6
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Quote:
Originally Posted by nickraj
Isn't it possible to accces the table of the router so that I can get the mac for a perticular ip . Or there is no way
Not unless you have access to the router. MAC addresses are layer2 addresses and only useful between machines that are physically connected. When an ethernet frame is forwarded to the next device in the route, the MAC address of the sender is removed and replaced with the MAC address of the router that forwards the packet to the next router or device. You can only see MAC addresses of machines in your own subnet (and then only if it's not forwarded by a bridge or other devices that proxies ARP).
 
Old 01-27-2007, 12:20 PM   #7
nickraj
LQ Newbie
 
Registered: Sep 2006
Location: usa
Posts: 25

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by chort
Not unless you have access to the router. MAC addresses are layer2 addresses and only useful between machines that are physically connected. When an ethernet frame is forwarded to the next device in the route, the MAC address of the sender is removed and replaced with the MAC address of the router that forwards the packet to the next router or device. You can only see MAC addresses of machines in your own subnet (and then only if it's not forwarded by a bridge or other devices that proxies ARP).
Thanks , but i am still curious to find any method to do that.....the subnet is connected to a router , and that is connected to another subnet ...router knows the mac of receiver??then why cant we get mac ???there must be some way ...
 
Old 01-27-2007, 12:27 PM   #8
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
nmap will tell you the remote MAC address:

Code:
# nmap -v 192.168.0.100

Starting Nmap 4.20 ( http://insecure.org ) at 2007-01-27 11:25 MST
Initiating ARP Ping Scan at 11:25
Scanning 192.168.0.100 [1 port]
Completed ARP Ping Scan at 11:25, 0.00s elapsed (1 total hosts)
Initiating SYN Stealth Scan at 11:25
   [...snip...]
MAC Address: 00:0E:0C:22:12:47 (Intel)

Nmap finished: 1 IP address (1 host up) scanned in 0.727 seconds
               Raw packets sent: 1698 (74.710KB) | Rcvd: 1698 (78.104KB)
This may only work in your own subnet as chort mentioned...

Last edited by bulliver; 01-27-2007 at 12:29 PM.
 
Old 01-27-2007, 01:03 PM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well it's not a "may" for all the reasons myself and chort gave above...
 
Old 01-27-2007, 01:06 PM   #10
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
well it's not a "may" for all the reasons myself and chort gave above...
noted...
 
Old 01-27-2007, 02:07 PM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by bulliver
noted...
i just said it like that as for once chort didn't prove i was wrong!
 
Old 01-27-2007, 09:25 PM   #12
maybbach
Member
 
Registered: Feb 2004
Location: Cincinnati, OH
Distribution: SimplyMepis 3.3
Posts: 68

Rep: Reputation: 15
if ur on the same subnet the easiest way is to ping the ip address of the device then check the arp table. check man arp cuz im not sure what they exact switch is.

edit: oops, didn't realize there was a router in between the 2 nodes. when the packet is routed, the mac address is dropped since it's layer 2. unless u have access to the router and its arp table, ur SOL

Last edited by maybbach; 01-27-2007 at 09:27 PM.
 
Old 01-28-2007, 12:41 AM   #13
placemevinod
LQ Newbie
 
Registered: Jan 2007
Posts: 5

Rep: Reputation: 0
can be done

s u can also try this out


get in to the ssh mode of the remote mechine if u know the ip address of the same.
then get in to the machine using ssh and get the ifconfig
 
Old 01-28-2007, 12:53 AM   #14
wildar
Member
 
Registered: Jan 2007
Distribution: Mandriva 2008, Mandrake 2005, Ubuntu 8.04.1
Posts: 239

Rep: Reputation: 30
You could try calling the person that uses the remote system you are interested in, to look up the MAC address for you. I know this isn't very high tech, but if it works it works,
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can i obtain the --- MAC ADDRESS --- of a remote host?? eder_michael11 Linux - General 6 08-18-2014 03:10 PM
Find out a remote mac address antken Linux - Networking 5 05-05-2009 03:17 PM
Getting MAC address of remote Equipment eljofi Linux - Networking 1 04-11-2006 06:00 PM
How to find an IP address from the MAC address of a remote machine ? jitz Linux - General 3 01-03-2006 07:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration