I use cobbler to provision our new Dell servers, which is great but it needs the MAC addresses of the servers to identify each machine.

Previously, I have been doing this manually:

  1. log in to the DRAC web interface
  2. launch the java console
  3. rebooting the server
  4. go into the BIOS
  5. navigate to Embedded Devices
  6. manually record the MAC addresses

This takes quite a while, and is prone to error.

I recently had another 42 servers to deploy to I looked for a way to automate this process. I found one!

I got the inkling that this should be possible because I noticed that the System | Properties | System Details page in the DRAC web interface lists the MAC addresses in the Main System Chassis section:

Embedded NIC MAC Addresses
    NIC1  Ethernet a4:ba:db:11:38:2d
          iSCSI    00:00:00:00:00:00
    NIC2  Ethernet a4:ba:db:11:38:2e
          iSCSI    00:00:00:00:00:00

So, I checked in the DRAC6 documentation for a suitable command, and found it: racadm racdump

This dumps a whole load of information about the DRAC and the attached system. However, pass the output through a simple grep and … bingo!

$ racadm -r $DRAC -u root -p calvin racdump | egrep '^MAC Address|^NIC. Ethernet'
MAC Address             = a4:ba:db:11:38:2f
NIC1 Ethernet           = a4:ba:db:11:38:2d
NIC2 Ethernet           = a4:ba:db:11:38:2e
NIC3 Ethernet           = N/A
NIC4 Ethernet           = N/A