

Using arp, you can in fact determine the MAC address of. Type arp -a without the quotation marks at the command prompt and press the Enter key. In Windows, Linux and other operating systems, the command line utility arp shows this information. and Jython 2. First get the broadcast address of your LAN (you can find that out using: ifconfig Then ping that address in order to refresh the ARP table of the system. If you want to put a little more effort in, and parse more data out, I recommend using the -online argument to the ip command, which will let you treat every line as a new device: $ ip -o linkġ: lo: mtu 16436 qdisc noqueue \ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00Ģ: eth0: mtu 1500 qdisc pfifo_fast qlen 1000\ link/ether 00:0c:29:30:21:48 brd ff:ff:ff:ff:ff:ffģ: eth1: mtu 1500 qdisc pfifo_fast qlen 1000\ link/ether 00:0c:29:30:21:52 brd ff:ff:ff:ff:ff:ffĤ: tun0: mtu 1500 qdisc pfifo_fast qlen 100\ link/ĥ: sit0: mtu 1480 qdisc noop \ link/sit 0.0.0.0 brd 0.0.0. Open a command-line window on any network-attached computer. Get MAC addresses of remote hosts and local interfaces. You can trivially get the mac address from this output with awk: $ ip link show eth0 | awk '/ether/ ' The command displays a list of network adapters or equivalent devices and their MAC.


I like using /sbin/ip for these kind of tasks, because it is far easier to parse: $ ip link show eth0Ģ: eth0: mtu 1500 qdisc pfifo_fast qlen 1000 In the Command Prompt window type getmac /v /fo list and then press Enter.
