Given a Linux server with an ethernet card, another device say an unconfigured router is connected with a patch lead (or an ethernet lead cabled in a different way if needed).
They're both powered up. Is there a way on the linux box to get the MAC address of the other device? There's no IP network going on here just two connected ethernet interfaces.
EDIT: The devices that this is concerning come with base config expecting to get an IP off a DHCP server which I can run on the linux host and work off that as soon as they get their temp IP.
ifconfig
ifacepointopoint
IP.address.of.another.point That will make ARP unnecessary. See ifconfig(8) for details.ping -b 255.255.255.255
and thenarp -a -n
. There's no universal way to remotely discern an unconfigured router port's MAC because some routers do not enable ports until they're configured to do so.tshark -i <imterface> -Y lldp
to capture LLDP packets, which contain peer MAC address.