Last Updated:

Find MAC addresses of lan-connected devices 

Sometimes the need may arise, for security or other reasons, to know what is the MAC address of the network card that corresponds to a certain IP address within a LAN.

In general, the MAC address is one of the most powerful tools for administering, monitoring and securing a LAN, providing a level of granularity that allows administrators to achieve more precise and secure management.

Finding the MAC (Media Access Control) addresses of devices connected in a LAN can be useful for several reasons related to network management, security and monitoring. Here is a list of the main reasons why it is advantageous to know the MAC addresses of devices:

  1. Network management and monitoring:
    • Device identification: Each device on the network has a unique MAC address, which allows the device to be uniquely identified (e.g. computers, printers, IP cameras, etc.).
    • Network mapping: Allows the creation of a detailed map of active devices on the network, useful for system administrators and network technicians.
  2. Network Access Control and Management:
    • MAC filtering: The router or firewall can be configured to allow or block access to specific devices based on their MAC address, increasing network security.
    • Restricted access to authorised devices: A list of authorised devices can be created, restricting network access only to devices with known and registered MAC addresses.
  3. Diagnostics and troubleshooting:
    • Performance monitoring: Identifying which device is causing slowdowns or connection problems on the network can be facilitated by knowing MAC addresses.
    • Isolation of connection problems: If a device has network problems, knowing the MAC address allows the problematic device to be traced and the cause of the malfunction to be isolated.
  4. Network security:
    • Detection of unauthorised devices: Can help discover unauthorised or suspicious devices connecting to the network without administrator permission.
    • Prevention of ARP spoofing attacks: Monitoring MAC addresses can help detect ARP spoofing attacks, where a malicious device attempts to fool the network's routing system.
  5. Bandwidth control and QoS (Quality of Service):
    • Bandwidth management: Some routers allow the bandwidth available for each MAC address to be limited, allowing critical devices (such as servers or streaming devices) to be prioritised.
    • Setting QoS policies: The MAC address can be used to apply traffic prioritisation policies for specific devices (e.g. reserving more bandwidth for video conferencing or online gaming).
  6. Logging and auditing:
    • Auditing and tracking: MAC addresses can be used to track who has used a particular connection or network resource at a given time, especially in corporate environments.
    • Device history: Keeping a record of the MAC addresses of connected devices can be useful for resource management or auditing purposes.
  7. Support for configuring Wi-Fi networks:
    • Authentication and access control on Wi-Fi networks: Many Wi-Fi routers offer the ability to configure authentication based on MAC addresses, allowing only devices with certain addresses to connect to the wireless network.
  8. IP address conflict resolution:
    • Detecting IP conflicts: In a network where static IP addresses are used, a MAC address can be useful for identifying and resolving conflicts between devices that may be trying to use the same IP address.

To find the MAC addresses of devices connected to a LAN, you can use different commands depending on the operating system you are using. Here are some of the most common solutions:

On Windows

  • Open the Command Prompt (you can do this by typing cmd in the search bar and pressing Enter).
  • Execute the command: arp -a

On Linux / macOS

  • Open the Terminal.
  • Execute the command: arp -n or ip neighbour

Both commands will display the MAC addresses associated with the IP addresses in the ARP table.

On Routers (Access via web interface or SSH)

If you have administrative access to the router (via web interface or SSH), many routers provide a view of the connected network and associated devices, showing both IP and MAC addresses. The exact location depends on the router model, but is usually in the ‘Device List’, ‘LAN Status’, ‘DHCP Clients’ or similar.

Using Nmap (Linux/MacOS/Windows with Cygwin or WSL)

If you have installed Nmap, a network scanning tool, you can use the following command to detect devices on the LAN and display MAC addresses as root/administrator:

  • Execute the command: nmap -sn 192.168.1.0/24

Make sure to replace 192.168.1.0/24 with your network IP range. Nmap will scan the network and return the MAC addresses of the devices found.

Beware that sometimes, the use of nmap can be considered an attack/footprinting attempt.

Using a network application (e.g. Fing)

If you prefer to use a graphical tool or a mobile application, Fing is a popular free app that allows you to scan the LAN and display information on the MAC addresses of connected devices.

If the computer is correctly connected to the network, the output will be a list of IP addresses alongside the MAC address. Keep in mind that the divider between the characters that make up the MAC address is the hyphen, but some devices, including some routers, only accept the colon-divided format. Simply replace the hyphen with the colon, for example:

Output of the arp -a command (Windows):

IP address Physical address Type

192.168.1.1 00-14-22-01-23-45 dynamic

192.168.1.10 00-25-96-ec-14-a7 dynamic

Output of the ip neighbour command (Linux/macOS):

192.168.1.1 dev eth0 lladdr 00:14:22:01:23:45 REACHABLE

192.168.1.10 dev eth0 lladdr 00:25:96:ec:14:a7 STALE

These commands will allow you to easily find the MAC addresses of devices connected to your LAN.