How to find the MAC address of a PC or device on the LAN

Find the MAC Address of a PC or Device on Your Network (LAN): Have you ever needed to find the MAC address of a computer or device connected to your local network? Whether you're assigning static IPs, setting up MAC filtering, or just troubleshooting connectivity, being able to locate this hardware identifier is essential.

In the following simple solution, I'll cover several ways to find a device's MAC address using tools available in Windows, macOS, Linux, and even through your router. These methods assume that you already know the IP address of the device you're trying to identify and that it's located on the same local subnet.

find the MAC address of a PC or device on a local network

Note: These techniques rely on protocols like ARP or Neighbor Discovery, which only work for devices on the same local network segment (Layer 2). They will not work across routed networks or VLANs unless you're inspecting ARP/NDP tables from an upstream switch or router.

Why Find a Device's MAC Address?

There are many reasons to look up a MAC address on your network:

  • Assign static IP addresses via DHCP reservation
  • Apply MAC address filtering on a router or switch
  • Identify unknown devices on your LAN
  • Troubleshoot network conflicts or duplicate IP addresses

How to Find the MAC Address of a PC or Device on Your Network (LAN)

Here are several ways to find a MAC address on Windows, Linux, and macOS. The examples below use 192.168.1.100 as the target device's IP address. Replace it with the actual IP address of the device you're trying to identify.

Finding a MAC Address in Windows (Command Prompt)

  1. Open the Run dialog by pressing Windows + R, type cmd or powershell, and press Enter.
  2. Ping the target device:
    ping 192.168.1.100
  3. View the ARP cache to find the MAC address:
    arp -a
  4. Look for the IP address you just pinged. Its corresponding Physical Address is the MAC address.

PowerShell Alternative

PowerShell provides another way to check the device and retrieve its neighbor information:

Test-Connection 192.168.1.100 -Count 1
Get-NetNeighbor -IPAddress 192.168.1.100

Lookup MAC Address on macOS (Terminal)

  1. Open Terminal from Applications > Utilities > Terminal.
  2. Ping the device:
    ping -c1 192.168.1.100
  3. View the ARP table for the target IP:
    arp -a | grep 192.168.1.100
  4. The MAC address will appear next to the IP address.

Find your own MAC addresses:

networksetup -listallhardwareports

Finding a MAC Address in Linux

  1. Open a terminal.
  2. Ping the device:
    ping -c1 192.168.1.100
  3. Check your neighbor table for the target IP:
    ip neigh show | grep 192.168.1.100
  4. If the ip command is not available, you can also use:
    arp -n

Advanced: You can use arp-scan or arping to discover or verify devices on your local network:

sudo arp-scan --localnet
sudo arping 192.168.1.100

Using Your Router or Access Point to Find MAC Addresses

If the device is not responding to pings, or you need to identify devices from a central location, check your router's web interface. Many routers maintain a list of connected devices along with their IP and MAC addresses.

  • Log in to your router. Common local addresses include 192.168.1.1 and 192.168.0.1.
  • Look under sections such as Connected Devices, DHCP Clients, LAN Status, or Device List.
  • Look for the device name or IP address. The corresponding MAC address should be listed in the same entry.

On managed switches and enterprise routers, you can often view MAC-to-port mappings using CLI commands such as:

show mac address-table

MAC Address Randomization & Privacy Notes

Modern operating systems and mobile devices, including Windows 10/11, Android, iOS, and macOS, often use MAC address randomization for privacy. This can affect the MAC address you see on a network.

  • Devices may report different MAC addresses to different Wi-Fi networks.
  • Randomized MAC addresses may not match the device's permanent hardware MAC address.
  • If you need a consistent MAC address for a DHCP reservation or MAC filtering, check the device's Wi-Fi privacy settings.

IPv6 Devices? Use NDP Instead of ARP

If your network uses IPv6 instead of IPv4, ARP does not apply. IPv6 uses Neighbor Discovery Protocol (NDP) instead.

Windows (PowerShell):

Get-NetNeighbor -AddressFamily IPv6

Linux:

ip -6 neigh

macOS:

ndp -a

Final Notes on Finding MAC Addresses

Finding a MAC address is often essential for managing a local network, whether you're configuring DHCP reservations, identifying unknown devices, troubleshooting connectivity, or managing access control. For IPv4 networks, ARP provides the address mapping between IP addresses and MAC addresses, while IPv6 uses NDP for neighbor discovery.

These built-in tools make MAC address lookup relatively simple, provided the device is accessible on the same local network segment. For larger or segmented networks, checking the ARP/NDP tables on your router, managed switch, or other network infrastructure can provide additional visibility.