I am trying to write a script to parse some of devices from DHCP lease file in Openwrt with corresponding addresses . I am maintain a list with some vendor MAC address . When i connect a device to the router , i want to fetch the IP address ,MAC address and Name of that device using the vendor MAC
Tag: mac-address
Get MAC address using shell script
Currently all the solution mentioned for getting the MAC address always use eth0. But what if instead of eth0 my interfaces start with eth1. Also on OS X the interface names are different. Also the interface eth0 may be present but is unused. i.e. not active, it doesn’t have an IP. So is there a way I could get the