How to set openBMC to use static address

Good number of openPOWER servers run openBMC. OpenBMC as of today does NOT support network IPMI but it does support host-BMC IPMI. We can use this to set static IP on BMC using standard IPMI tool commands

Set openBMC to static IP from Host / Petitboot:

To set the BMC running openBMC to static address, run following ipmitool commands from petitboot / host.

   ipmitool lan set 1 ipsrc static

   ipmitool lan set 1 ipaddr 10.127.xx.xx

   ipmitool lan set 1 netmask

   ipmitool lan set 1 defgw ipaddr 10.127.xx.xx

   ipmitool raw 0x06 0x40

You can print lan credentials using:

ipmitool lan print

Remember default credentials of BMC is    root   and 0penBmc

Set openBMC to get static IP from openBMC linux shell:

You can use standard linux “ip” command to set the IP address to static

To check interfaces
ip a
To force eth0 down
ip link set eth0 down
To force eth0 up
ip link set eth0 up
To set static ip
ip addr add dev eth0
To set up routing:
ip route add via dev eth0


9 thoughts on “How to set openBMC to use static address

  1. Jack Jasson says:

    Hi Adi,
    I want to set static IP address to BMC, but when i used that commands you give above, i did not set static ip address to BMC. When look ip address of BMC using ifconfig command, i see different ip address of BMC that i set. Do you any recommend about this issue?
    thank you


    • Jack Jasson says:

      I log in openBmc using ssh. IP of openBmc is DHCP in default. I want to change DHCP ip to static ip. I used “ip addr add dev eth0” command to set static ip on openBmc linux shell. But when i use ifconfig command to see ip of openbmc, i see different ip. and when i use “ip a” command to see ip of openBmc, i see two of ip addresses which belong to eth0. one of them is dynamically set by DHCP server, another one is static ip set by “ip addr add dev eth0” command.
      Thank you,


      • adigangidi says:

        Can you try to do this via the other set of instructions where you execute commands via the host ? Meanwhile I will check why this stuff isn’t working by verifying on local machine .


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s