Determine Attached MAC Address

Determine Attached MAC Address

Post by rock » Wed, 07 Apr 2004 05:19:24



How might one go about determining the MAC address of the Ethernet NIC
which is physically attached to an Ethernet NIC within a computer
running Linux?

Other Important Facts
=====================
The connection is a physically direct connection via a CAT5 crossover
cable with no other network hardware in between.

The other, physically connected, computer does not have an IP address
assigned; it s NIC is running in promiscuous mode.

 
 
 

Determine Attached MAC Address

Post by Grant Edward » Wed, 07 Apr 2004 05:38:56



Quote:> How might one go about determining the MAC address of the
> Ethernet NIC which is physically attached to an Ethernet NIC
> within a computer running Linux?

You can't determine its MAC address unless it decides to send
you an Ethernet packet containing that MAC address -- and it's
quite trivial to send packets with forged MAC addresses. ;)

--
Grant Edwards                   grante             Yow!  My mind is making
                                  at               ashtrays in Dayton...
                               visi.com            

 
 
 

Determine Attached MAC Address

Post by x86process » Thu, 08 Apr 2004 12:40:28


If your ethernet device is eth0, then as root if you do:

#ifconfig eth0

It will display eth0 settings along with your MAC address in HWaddr
field,

x86

SuSE Linux 9.0-Intel Pentium M 1.40GHz-512 MB-40
GB-14"-1024x768-4.5-4.9 lbs-CD-RW/DVD-ROM-Intel PRO/1000 Gigabit
Ethernet-Intel PRO/Wireless Network Connection 802.11b

----------------------------------------
The post originated from Linux Forum:
----------------------------------------
http://www.linuxforum.com
http://www.linuxforum.com/forums

 
 
 

Determine Attached MAC Address

Post by Grant Edward » Thu, 08 Apr 2004 13:21:37



> If your ethernet device is eth0, then as root if you do:

> #ifconfig eth0

> It will display eth0 settings along with your MAC address in HWaddr
> field,

I thought the OP wanted to find the MAC address of the device
on the other end of the cable.

--
Grant Edwards                   grante             Yow!  You were s'posed
                                  at               to laugh!
                               visi.com            

 
 
 

Determine Attached MAC Address

Post by Charlie Gibb » Fri, 09 Apr 2004 01:51:22





>> If your ethernet device is eth0, then as root if you do:

>> #ifconfig eth0

>> It will display eth0 settings along with your MAC address in HWaddr
>> field,

>I thought the OP wanted to find the MAC address of the device
>on the other end of the cable.

How about "arp -a <hostname>"?  You might want to ping it first
to make sure it's in the cache.

--

\ /  I'm really at ac.dekanfrus if you read it the right way.
 X   Top-posted messages will probably be ignored.  See RFC1855.
/ \  HTML will DEFINITELY be ignored.  Join the ASCII ribbon campaign!

 
 
 

Determine Attached MAC Address

Post by rock » Fri, 09 Apr 2004 03:23:22




> > If your ethernet device is eth0, then as root if you do:

> > #ifconfig eth0

> > It will display eth0 settings along with your MAC address in HWaddr
> > field,

> I thought the OP wanted to find the MAC address of the device
> on the other end of the cable.

Yes, that's correct. I'm looking for the MAC address of the Ethernet
device I'm directly physically connected with.
 
 
 

Determine Attached MAC Address

Post by Grant Edward » Fri, 09 Apr 2004 03:53:38






>>> If your ethernet device is eth0, then as root if you do:

>>> #ifconfig eth0

>>> It will display eth0 settings along with your MAC address in HWaddr
>>> field,

>>I thought the OP wanted to find the MAC address of the device
>>on the other end of the cable.

> How about "arp -a <hostname>"?  You might want to ping it first
> to make sure it's in the cache.

The OP said it doesn't have an IP address.

--
Grant Edwards                   grante             Yow!  Edwin Meese made me
                                  at               wear CORDOVANS!!
                               visi.com            

 
 
 

Determine Attached MAC Address

Post by Alexander Cloute » Sat, 10 Apr 2004 08:42:47



Quote:> How might one go about determining the MAC address of the Ethernet NIC
> which is physically attached to an Ethernet NIC within a computer
> running Linux?

> Other Important Facts
>=====================
> The connection is a physically direct connection via a CAT5 crossover
> cable with no other network hardware in between.

> The other, physically connected, computer does not have an IP address
> assigned; it s NIC is running in promiscuous mode.

Now this is strange.  I was but asked a month ago to help someone with the
same 'problem', they wanted it for auditing purposes.

I told them to either send packets with a destination MAC address of
FF:FF:FF:FF:FF:FF (broadcast address) and you should get replies.....you
really should read the Ethernet document standards document on this[1]

If the other machine did have an IP address then you could broadcast ping the
subnet (255.255.255.255 destination IP).

You might find the ethernet bridging websites are useful with this as the
spanning tree protocol creates a list of MAC addresses for the ethernet
bridge to know whom is where (Ethernet MAC address wise).

Cheers

Alex

[1] according to RFC894 it is:

"The Ethernet - A Local Area Network", Version 1.0, Digital
   Equipment Corporation, Intel Corporation, Xerox Corporation,
   September 1980.

 
 
 

Determine Attached MAC Address

Post by x86process » Sun, 11 Apr 2004 06:10:41


Try as root user,

#ifdown eth0
#ifup eth0

If you have your DHCP setup properly, you should get an output like:
Determining IP address ...

Now try,

#ifconfig eth0

and see if you get an IP address. Otherwise, post the contents of the
/etc/sysconfig/network-scripts/ifcfg-eth0 file,

x86

SuSE Linux 9.0-Intel Pentium M 1.40GHz-512 MB-40
GB-14"-1024x768-4.5-4.9 lbs-CD-RW/DVD-ROM-Intel PRO/1000 Gigabit
Ethernet-Intel PRO/Wireless Network Connection 802.11b

----------------------------------------
The post originated from Linux Forum:
----------------------------------------
http://www.linuxforum.com
http://www.linuxforum.com/forums

 
 
 

Determine Attached MAC Address

Post by Grant Edward » Sun, 11 Apr 2004 06:23:45



Quote:> Try as root user,

> #ifdown eth0
> #ifup eth0

> If you have your DHCP setup properly, you should get an output like:
> Determining IP address ...

> Now try,

> #ifconfig eth0

> and see if you get an IP address. Otherwise, post the contents of the
> /etc/sysconfig/network-scripts/ifcfg-eth0 file,

I give up, how does that tell him the MAC address of the
ethernet board at the other end of a crossover cable that's
connected to his machine?

--
Grant Edwards                   grante             Yow!  What I need is a
                                  at               MATURE RELATIONSHIP with a
                               visi.com            FLOPPY DISK...

 
 
 

Determine Attached MAC Address

Post by Douglas Clinto » Tue, 13 Apr 2004 12:02:23




>> How might one go about determining the MAC address of the
>> Ethernet NIC which is physically attached to an Ethernet NIC
>> within a computer running Linux?

> You can't determine its MAC address unless it decides to send
> you an Ethernet packet containing that MAC address -- and it's
> quite trivial to send packets with forged MAC addresses. ;)

try netstat...its your new friend.

Good Luck

 
 
 

Determine Attached MAC Address

Post by Grant Edward » Tue, 13 Apr 2004 12:56:09





>>> How might one go about determining the MAC address of the
>>> Ethernet NIC which is physically attached to an Ethernet NIC
>>> within a computer running Linux?

>> You can't determine its MAC address unless it decides to send
>> you an Ethernet packet containing that MAC address -- and it's
>> quite trivial to send packets with forged MAC addresses. ;)

> try netstat...its your new friend.

Care to exand upon your suggestion a little?  I don't see how
you can determine what the OP wants to know by using netstat.

--
Grant Edwards                   grante             Yow!  Yow! We're going to
                                  at               a new disco!
                               visi.com            

 
 
 

Determine Attached MAC Address

Post by Tauno Voipi » Wed, 21 Apr 2004 04:07:40





>>>If your ethernet device is eth0, then as root if you do:

>>>#ifconfig eth0

>>>It will display eth0 settings along with your MAC address in HWaddr
>>>field,

>>I thought the OP wanted to find the MAC address of the device
>>on the other end of the cable.

> Yes, that's correct. I'm looking for the MAC address of the Ethernet
> device I'm directly physically connected with.

As long as the peer (the other end of the cable) does not
transmit anything, there is no way to get the MAC address,
short of reading it from the interface card sticker.

Tauno Voipio

 
 
 

1. How can I determine IP address of attached device without its MAC?

Is there a way that I can determine the MAC address or IP address of a second
hand device that I have aquired. I use 10.x.x.x addresses here, but I believe
that the device used 192.168.x.x addresses. I plugged in a laptop, and wrote a
script to ping 192.168.0.1 to 192.168.0.255, but I could not find it,
so I think it has been set up maybe with 192.168.1.x or 192.168.2.x or maybe
something else.

Unfortunately, I do not know the MAC address of the device. I think that the
sticker has come off, and there is no factory reset button to return the
address to a sensible default.

I know that the device has been configured with a static address. I need to
know the address so that I can telnet it and configure it for my network.

Thanks in advance to anyone who can help.

Mark.

--
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/

2. single user -> readonly fs???

3. checking if a MAC address exist in a LAN and which is the attached IP address

4. French language support help using troff and dpost...

5. Determining IP address from MAC address

6. Reading is much more interesting than TV (1546/1708)

7. How to determine a mac address on a remote computer with only ip address known?

8. Q: anybody using Millenium 230MH ramdac in linux?

9. Remotely determine IP given MAC address?

10. Determine IP address assigned to MAC

11. mounting via ssh, and determining IP from MAC address remotely

12. Determine MAC address on solaris

13. determining the physical address of a given user address