Automate enabling of IPMI over LAN access on HPE iLO

What if you want to enable IPMI/DCMI over LAN across tens or hundreds of HPE servers? Thankfully with Redfish this is easy! By default on…

Automate enabling of IPMI over LAN access on HPE iLO
IPMI/DCMI over Lan settings for iLO 5

What if you want to enable IPMI/DCMI over LAN across tens or hundreds of HPE servers? Thankfully with Redfish this is easy! By default on iLO 5 this setting is disabled for security reasons.

The Manual Way

Login to the iLO Web Interface, and go to Security >Access Settings > under Network and change IPMI/DCMI over LAN to Enabled.

The Automated Way

Using a REST client like Postman you can perform a GET on https://youriLOIPhere/redfish/v1/Managers/1/NetworkProtocol/ which will return a JSON response with all of the settings. The specific JSON object we care about is named IPMI below. When you do your GET request you need to have a Basic HTTP Auth header with the username and password for the iLO. You also need the Content-Type: application/json header.

Now that you see the setting to change, we can do a PATCH request to the same endpoint to change ProtocolEnabled to true

It says a reboot of the iLO is required but in my experience this isn’t needed. I’ve included how to do that below should you need to.

To run this across lots of servers you can create a quick for loop. Replace 10.1.50 with your first 3 octets of your iLO IP address, assuming they are all in the same subnet, and change your range for the last octet. This example would run enable IPMI across 10 servers with the IP address 10.1.50.1–10.1.50.10

for i in {1..10}; do sh redfish_enable_ipmi.sh 10.1.50.$i; done