Showing results for 
Search instead for 
Did you mean: 

Find ip address of DUT



I have a microwave module that contains 6800 power pc chip. It communicates via Ethernet using TCP. DHCP was just added to the operating system software. My labview program now has to programmatically find the IP address of the unit under test.


How do I do that?


Thanks for your help.


Ken M

Sr. Test Engineer

Mercury Computers


0 Kudos
Message 1 of 4
The most primitive approach would be to iterate over the DHCP address range with a specific query until you get the expected response. (Don't wait for the timeout, you can reset each attempt after e.g. 100ms). Is it always the same device (MAC address) or does it change frequently? Do you have control over the dhcp server? Do you have full dcomentation? Maybe it responds to multicast queries?
0 Kudos
Message 2 of 4

Do you know its MAC address?


What control do you have over the network?  Are you running it over a company LAN, or do you just need the equipment on your bench? (You can use a cheap ethernet router to firewall out between your company LAN and a new network you configure on the bench through the cheap router.)


On our equipment, the first three bytes (OUI) are static and known to us.  The last three bytes (NIC) are the serial number of the device.  Scanning the barcode or keying in the serial number is all we need to know to build the MAC address.  01:23:45 could be the first three, if its serial number is 12648430, in hex that's 0xC0FFEE, building the MAC address into 01:23:45:C0:FF:EE.  From there, depending on the level of control on your LAN, you could just assign that MAC to an IP using the "arp -s ip_address mac_address" command.


If the device doesn't move around a lot, just set it to a static IP. 


Iterating through an entire subnet wastes a lot of time and resources, as well as possibly trip domain-level firewall/antivirus alarms.  I would advise against this if possible.

0 Kudos
Message 3 of 4



Thanks for the suggestions.


After some discussion with the developers, for testing purposes, they have set up a static IP address. This is good because it simplies my code a little and reduces the error an operator can make when typing in an IP address or my taking time to develop a vi to find it automatically.


The unit is only connected to the PC used for testing. It is not on a network. Yes, it has a fixed mac address.


This test ftp's a temp calibration file to the unit. The unit is then calibrated and the real file is then ftp'd to the FPGA.


Thanks for your help.


0 Kudos
Message 4 of 4