Mapping tables might better just for the reason of not disclosing the addresses to 3-rd party and for reliability.
You can add this script to script library and then use macro %[name_of_script] to get mac address of that node's interface that has primary IP address.
You can add this script to script library and then use macro %[name_of_script] to get mac address of that node's interface that has primary IP address.
Code Select
mac = NULL;
for (i:$node->interfaces)
{
if ($node->ipAddr == i->ipAddr) mac = i->macAddr;
}
return mac;