Example Code

Find Device IP Address from MAC Address

Code and Documents

Attachment

Overview

This VI is intended to help you determine the IP address of real-time targets on your network using the device's MAC Address.

 

Description

The program uses the windows command prompt "arp -a" command to get a list of devices in the system's address resolution protocol table. That list is then searched for the MAC address and the corresponding IP address is returned.

 

Requirements

Software

LabVIEW 2013+

Hardware

Network Access

 

 

Steps to Implement or Execute Code

  1. Enter MAC address of a real-time target (usually listed on the back of the controller).
  2. Ensure the target is connected to the same network as your PC.
  3. Run the program and click "Go."

 

Additional Information or Reference

 

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

 

Rob B
FlexRIO Product Manager

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Jacob_K
Member
Member
on

This program will only find the IP address of devices that have already connected to the computer and the MAC information is already in the local ARP table.  With LabVIEW is it possible to send an ARP request in order to discover MAC ID and IP from unknown devices via an ARP Broadcast Message?

Jacob K