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 02-02-2008, 02:25 AM   #1
ravi_chobey
Member
 
Registered: Sep 2007
Location: Bangalore,India
Distribution: Fedora,Mandriva,Debian
Posts: 180

Rep: Reputation: 30
Question Determining MAC id of remote machine


Hi All,

Currently i am working on a ARM9 processor system,it is having a ethernet port.I don't know the MAC id of that port.Is is possible to determine the MAC id of that board? I need your support for this.
I have tried this command, is mentioned in man page of ifconfig:

[root@localhost ~]# ifconfig dstaddr addr
addr: Unknown host
ifconfig: `--help' gives usage information.

Is there any command for that?

Regards,
Ravi
 
Old 02-02-2008, 05:00 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Just type 'ifconfig' ( without the quotes ) as root user, it will list all interfaces. Assuming you have only one card, you should see one called localhost and one called somehting like eth0. eth0 will be the interface you need to look at. There should be a field marded HWaddr with some digits after it. Those digits are your MAC address.

It you type 'ifconfig --help' the system will give you help for the command. Also, 'man ifconfig' will give you information on how to use the command.
 
Old 02-02-2008, 08:17 AM   #3
MyHeartPumpsFreon
Member
 
Registered: Oct 2007
Location: The States, Florida
Distribution: Lonely Werewolf
Posts: 251

Rep: Reputation: 30
In addition to ifconfig, iwconfig will give you basic information about the wireless access point you're connected to: essid, MAC address, bit rate, link quality and frequency.

Just an FYI.

Brandon
 
Old 02-02-2008, 10:03 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
The command ifconfig will display information for the computer your typing the command on but will not work for a remote machine. For a remote PC on your local network you can use the arp command i.e.
arp -a

If nothing is displayed then the remote machine is not in the arp table. Pinging the device should fix that problem.
 
Old 02-03-2008, 10:20 PM   #5
ravi_chobey
Member
 
Registered: Sep 2007
Location: Bangalore,India
Distribution: Fedora,Mandriva,Debian
Posts: 180

Original Poster
Rep: Reputation: 30
Smile

Dear All,

Thanks for your support.

The "arp -a" worked for it.

Regards,
Ravi
 
Old 02-04-2008, 08:02 AM   #6
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
An alternative way to do it is with arping. Example:
Code:
arping -c1 192.168.1.100 2> /dev/null | \
grep "Unicast reply from" | awk '{print $5}' | cut -c 2-18
This would give you the MAC address of the box with IP 192.168.1.100.

Just my
 
  


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
Determining whether or not a machine has been penetrated jnguy Linux - Security 4 05-05-2006 04:05 AM
Complicated one: MySQL, rsync, remote machine, local machine daiver Linux - General 2 02-27-2006 12:14 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
Linux: Determining MAC address from C Mad_C Programming 9 02-11-2005 04:27 AM
determining if shell is local connection or remote SaxyWeed Linux - General 3 01-26-2004 11:17 PM

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

All times are GMT -5. The time now is 08:02 PM.

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