LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

making ethernet connection with mac instead of IP

is there a way to make a TCP/IP connection using the mac address instead of the IP?
- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 1 of 3
(3,245 Views)

James R wrote:
is there a way to make a TCP/IP connection using the mac address instead of the IP?

At first glance I would answer NO but I'll track this thread to find out why not. This is why I say "No".

 

TCP/IP is a loose abrieviation for TCP/IP over ethernet. (I believe I remeber TCP/IP over Token-Ring from a long time ago)

 

The mac address is  pasrt of the ethernet spec. The ethernet spec describes a set of rules for moving undefined packets from one place to another.

 

SO there is a situation where you could be talking TCP/IP and there is no mac address at all.

 

If we assume that the TCP/IP will be limited to only TCP/IP over ethernet then I would have to change my above reply to "maybe".

 

Standing by to learn something!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(3,242 Views)

I'm not sure I can recommend this approach - it may annoy a network admin - but here's one indirect approach for use on Windows.  Use System Exec to send a broadcast ping (usually your broadcast address will be your IP address with 255 in place of the last octet).  In most cases all the machines on your local network will respond (some may be configured not to respond to broadcast pings for security reasons).  This will cause your machine to cache the MAC addresses of all the machines that respond.  Then, use System Exec to execute the command "arp -a" which will return a list of all the IP addresses and associated MAC addresses in your machine's ARP cache.  Find the MAC address you want in that list and you'll have its IP address, which you can then use to establish a connection.

 

This is pretty ugly, though, and not completely reliable.  It will only get you machines on your very-local network - you won't be able to get a MAC address for any machine that can only be reached by going through a router.  Also, as Ben pointed out, it's possible for connections not to need a MAC address at all - for example the loopback connection, when you connect directly to your own machine as localhost or 127.0.0.1.

0 Kudos
Message 3 of 3
(3,215 Views)