Re: MAC ADDRESS

From: Rod Smith (rodsmith_at_nessus.rodsbooks.com)
Date: 06/14/04


Date: Mon, 14 Jun 2004 19:19:57 -0000

In article <2j5eapFqf0ibU1@uni-berlin.de>,
        "robeto" <rrr@noce.it> writes:
>
> "James Knott" <bit_bucket@rogers.com> wrote in message
> news:fnfzc.27619$0FI1.10037@news01.bloor.is.net.cable.rogers.com...
>> robeto wrote:
>>
>> > How can I retrieve the MAC address of a machine from the ip in a different
>> > subnet from mine?
>>
>> You need something on that other subnet to read the mac and relay it to you.
>> The mac address doesn't pass through the router.
>
> Yes. I know...
> But I want to know another solution. I don't want to relay to another
> server.
> In winzoz you can use nbtstat. is it possible that there isn't a linux
> equivalent?

I just tried with NBTSTAT in Windows XP and got clearly erroneous MAC
addresses (00-00-00-00-00-00 for all the machines I tried). Perhaps it's
working correctly for you, but not for me.

In any event, the rough Linux equivalent of NBTSTAT is nmblookup, but I
can't seem to get it to report MAC addresses. AFAIK and as others have
said, there's no way to get the MAC address directly from another subnet;
you'll need to enlist the help of a computer on that subnet. Presumably
NBTSTAT is using the remote network's domain controller, master browser,
or some other SMB/CIFS system to get the information. (If it's really
getting it at all; on my network it's clearly either not getting or not
reporting accurate information.) If a tool to get this information in the
same way exists in Linux, chances are it'd be in the Samba suite. The
other alternative would be to use some other protocol to extract the
information with the help of another system without using SMB/CIFS --
say, using ssh to run arp on a remote system, as in "ssh
remotesystem.example.com arp 192.168.1.7" to find the MAC address of
192.168.1.7, using remotesystem.example.com as an intermediary.

-- 
Rod Smith, rodsmith@rodsbooks.com
http://www.rodsbooks.com
Author of books on Linux, FreeBSD, and networking


Relevant Pages

  • RE: [Full-disclosure] Snatching IP on LAN, how to DoS/block such machines?
    ... Your are running a decent network with a non ... or on an outlet on the same subnet (user hardcodes IP and may be ... The network admin then blocks the users MAC at routerlevel. ... "It is not possible to have smart switches to each endpoint":) ...
    (Full-Disclosure)
  • [Full-disclosure] Snatching IP on LAN, how to DoS/block such machines?
    ... Your are running a decent network with a non ... anywhere where this subnet is available) ... The network admin then blocks the users MAC at routerlevel. ... "It is not possible to have smart switches to each endpoint":) ...
    (Full-Disclosure)
  • Re: [Full-disclosure] Snatching IP on LAN, how to DoS/block such machines?
    ... So we're back the "how do i DoS my clients" on my subnet, ... > The network admin then blocks the users MAC at routerlevel. ... this is pretty useless to the hijacking user. ...
    (Full-Disclosure)
  • Re: Very basic JetDirect
    ... The problem generally is that when setting up a printer in Mac OS 10.3, there are 3 main protocols listed under "IP Printing", all requiring me ... subnet as) the current address of the printer. ... A net dude told me I look for a range of assigned MAC addresses for the vender, and do some kind of scan for MAC addresses. ... the computer's address to 192.168.2.51, for example, and you should be able to telnet to the printer and change the address. ...
    (comp.periphs.printers)
  • Re: Very basic JetDirect
    ... The latest version of JetAdmin seems to be for other machines besides mine. ... subnet as) the current address of the printer. ... A net dude told me I look for a range of assigned MAC addresses for the vender, and do some kind of scan for MAC addresses. ... the computer's address to 192.168.2.51, for example, and you should be able to telnet to the printer and change the address. ...
    (comp.periphs.printers)