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 255.255.252.0

   ipmitool lan set 1 defgw ipaddr 10.127.xx.xx

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 192.168.1.1 dev eth0
To set up routing:
ip route add 192.168.1.0/24 via 192.168.1.1 dev eth0

Advertisements
How to set openBMC to use static address

6 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

    Like

    1. 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 192.168.1.1 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 192.168.1.1 dev eth0” command.
      Thank you,
      Jack

      Like

      1. 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 .

        Like

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s