Networking Forums

Networking Forums > Computer Networking > Linux Networking > Get MAC Address

Reply
Thread Tools Display Modes

Get MAC Address

 
 
leif.buckner@gmail.com
Guest
Posts: n/a

 
      03-23-2006, 01:38 PM
What's the best way to get the MAC address of a remote IP via BASH?

 
Reply With Quote
 
 
 
 
Davide Bianchi
Guest
Posts: n/a

 
      03-23-2006, 01:59 PM
On 2006-03-23, (E-Mail Removed) <(E-Mail Removed)> wrote:
> What's the best way to get the MAC address of a remote IP via BASH?


arp
man arp for more info

Davide

--
I try to explain, but he goes into the back room and gets this wizened old
guy with a pocket protector and a nametag that read "Senior Engineer."
-- Jack Twilley
 
Reply With Quote
 
Lew Pitcher
Guest
Posts: n/a

 
      03-23-2006, 02:04 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Davide Bianchi wrote:
> On 2006-03-23, (E-Mail Removed) <(E-Mail Removed)> wrote:
>> What's the best way to get the MAC address of a remote IP via BASH?

>
> arp
> man arp for more info


And remember, arp only knows about MAC addresses on the local lan
segment. If you are trying to obtain a MAC address past the lan gateway,
then you have to come up with an application solution.


- --

Lew Pitcher, IT Specialist, Corporate Technology Solutions,
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEIrkLagVFX4UWr64RApbSAJ4lT5iWU6+l+odzkS7Dqv BjI1vNGACfQZ3L
BuW9ZrW+0w9LMdc+CNoQk4Q=
=lUTL
-----END PGP SIGNATURE-----
 
Reply With Quote
 
leif.buckner@gmail.com
Guest
Posts: n/a

 
      03-23-2006, 02:44 PM
That's my problem exactly. The MAC I need is across the gateway,
another subnet -- across a WAN actually. I can RDP into the box just
fine and get the MAC by running ipconfig /all (a windows server), but I
would like to more elegantly do it via a BASH prompt. Is there some
tool that does this?

 
Reply With Quote
 
Lew Pitcher
Guest
Posts: n/a

 
      03-23-2006, 03:00 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(E-Mail Removed) wrote:
> That's my problem exactly. The MAC I need is across the gateway,
> another subnet -- across a WAN actually. I can RDP into the box just
> fine and get the MAC by running ipconfig /all (a windows server), but I
> would like to more elegantly do it via a BASH prompt. Is there some
> tool that does this?


Nope. There is no tool to do what you ask.

It looks like you are going to have to build one. It will likely be a
client/server architecture, with the server sitting on the far end (the
source of the MAC address you want) and the client on your local
machine. It /can/ be as simple as a ssh/rsh/telnet "script" that logs on
to the far machine and runs ipconfig to extract the MAC address, or
something more specific to the task, but it is something that you are
going to have to develop.

Sorry


- --

Lew Pitcher, IT Specialist, Corporate Technology Solutions,
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEIsY5agVFX4UWr64RAnPqAKCjiCnmHLdxqRj19howLV 8T5tQuzACfc4AZ
dNegRNkDkd/vg7f2JjbmNko=
=qIyR
-----END PGP SIGNATURE-----
 
Reply With Quote
 
Philippe WEILL
Guest
Posts: n/a

 
      03-23-2006, 03:27 PM


(E-Mail Removed) wrote:
> That's my problem exactly. The MAC I need is across the gateway,
> another subnet -- across a WAN actually. I can RDP into the box just
> fine and get the MAC by running ipconfig /all (a windows server), but I
> would like to more elegantly do it via a BASH prompt. Is there some
> tool that does this?
>


Perhaps you could find the information by SNMP on other router or directly on
the server
so after you could easily script
 
Reply With Quote
 
R
Guest
Posts: n/a

 
      04-05-2006, 04:17 PM
Ahh. its a windows box. Then you might be able to do something with
nmblookup -A IPADDRESS . It might pull the same info if you do an
nbtstat -A IPADDRESS . It includes the MAC.

-R

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pipex Address: Post Office wont sent registered letter as they say the address is invalid! W Broadband 16 05-13-2008 09:30 PM
Coffee shop wifi will not give me IP address, but gives everyone else IP address. But static IP works! Jennifer R Wireless Internet 5 09-30-2007 06:12 AM
access violation at address 004075e5 module WUSB54G4.exe of address 00000368 Houndog Wireless Internet 10 02-13-2006 06:56 PM
"access violation at address 004075e5 module WUSB54G4.exe of address 00000368 Houndog Windows Networking 0 02-12-2006 09:40 PM
When Linux PC boots, Does it sends RARP packet to get its IP address by embedding its Hardware address? santa19992000@yahoo.com Linux Networking 2 10-16-2005 10:40 PM



1 2 3 4 5 6 7 8 9 10 11