Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Obtaining the MAC Address (Physical Address) of Any Computer on Your Local Subnet

3 ratings | 2.00 out of 5
Print

Downloads

Filename: get_remote_mac_address.vi
Requirements: View

This example allows you to retrieve the MAC address of a remote computer on your local subnet. It uses calls to the System Exec VI which calls the Windows utilities "ping" and "arp" which return this information. It then parses the MAC address and returns it.

Unfortunately the "arp" command does not properly return the MAC address when fed the IP address of the computer that runs it, so if you feed the VI the IP address of the computer that is executing the VI, it will attempt to use "ipconfig" to get the local computer's MAC address.

Because these commands are Windows-specific, this example will work only with Windows operating systems. Furthermore, when obtaining the MAC address of the local computer, the "ipconfig" command is used. This command only exists on Windows NT, 2000, and XP.

Requirements


Filename: get_remote_mac_address.vi

Software Requirements


Application Software: LabVIEW Full Development System 6.1
Language(s): LabVIEW

 
3 ratings | 2.00 out of 5
Print

Reader Comments | Submit a comment »

it is only for english version: see Get Network card information for better call
The vi is only for english version. See Get Network card information for better call http://decibel.ni.com/content/docs/DOC-1267 and search phisical address in the card info
- Gianluca Bacchiega, IRS. bacchiega@irsweb.it - Apr 28, 2009

Returns the incorrect MAC address
When run on the local machine with multiple network adapters the MAC address returned is for the first adapter listed in the "ipconfig /all" list , and not necessarily the one bound to the IP address specified.
- Greg Sussman, Process Automation Corp. gsussman@processauto.com - Mar 19, 2008

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).