Resolve MAC Address
AI-generatedSummary
Resolves a hostname or IPv4 address on the local network to a MAC address by optionally pinging the host and then reading the n8n server's OS neighbor (ARP) table.
Inputs
- Host (required) — Hostname or IPv4 address to resolve. Hostnames are resolved to an IPv4 address via DNS lookup (family 4); IPv4 literals are used as-is.
- Probe Host — Default true. Sends one ping before reading the neighbor table so the entry gets populated. Ping failure is not fatal; its message is returned as probeError.
- Probe Timeout — Milliseconds (100–60000, default 1000). Used as the ping wait time and as the timeout for the neighbor-table commands.
- Not Found Behavior — Throw Error (default) fails the item if no MAC is found. Return Not Found Status outputs the item with status 'notFound' and no macAddress.
Output shape
One output item per input item, with a resolveMacAddress object in json containing: host, ipAddress, macAddress (uppercase, colon-separated, or undefined), status ('resolved' or 'notFound'), network (details of the matching local interface, or undefined), and probeError (if the ping failed).
The network object includes interfaceName, interfaceAddress, netmask, prefixLength, networkAddress and broadcastAddress, and is only present when the IP falls within a non-internal local IPv4 subnet of the n8n host. Runs
ping,ip neighandarpon the n8n host (Windows uses ping/arp -a), so these tools must be available. Only works for hosts on the same L2 network. With Continue On Fail enabled, errors are emitted as items with anerrorfield. Each item is paired with its input item.
Examples
Example 1: Find the MAC of a LAN device by IP for a Wake-on-LAN workflow.
Host = 192.168.1.20, Probe Host = true, Probe Timeout = 1000, Not Found Behavior = Throw Error.
Example 2: Check whether a device is reachable and known without failing the workflow when it is offline.
Host = {{ $json.hostname }}, Probe Host = true, Probe Timeout = 3000, Not Found Behavior = Return Not Found Status; branch on status with an IF node.