ipmi_sim(1)

πŸ’– ipmi_sim β€” the IPMI LAN BMC Simulator, bestie edition πŸ’–

okay so you found the ipmi_sim(1) page, and honestly? it's giving iconic daemon energy. it lives in the OpenIPMI manual, and it's here to let you pretend to be a BMC without actually having a BMC. let's get into it 🫢


✨ NAME ✨

ipmi_sim β€” IPMI LAN BMC Simulator. that's the whole vibe. a fake BMC. a simulation. a little guy who thinks he's a baseboard management controller. πŸ’…


🌸 SYNOPSIS 🌸

ipmi_sim [-c config-file] [-f command-file] [-x command] [-s state-dir]
[-d] [-n]

πŸ¦‹ DESCRIPTION πŸ¦‹

so the ipmi_sim daemon emulates an IPMI BMC simulator, and you can talk to it over the IPMI 1.5 or 2.0 LAN protocol, or through various serial protocols. versatile queen. πŸ’…

it's useful standing alone for prototyping (very "just me and my fake BMC against the world"), and you can also pair it up with a virtual machine like QEMU so it acts as an IPMI BMC emulator. and β€” plot twist β€” you can even use it to implement an actual BMC, at which point it's not so much a simulator anymore. glow-up arc fr fr. πŸ‘‘

ipmi_sim supports the full authentication capabilities of the IPMI LAN protocol. the whole thing. all of it. no cap.

ipmi_sim also supports multiple IP addresses for fault-tolerance. but here's the lil detail you gotta remember: messages coming in on an address are always sent back out on the same address they came in on. always. every time. it's loyal like that. 🫢


πŸ’… OPTIONS πŸ’…

  • -c config-file β€” sets the configuration file to something other than the default of /etc/ipmi/lan.conf. peek at ipmi_lan(5) for the deets. πŸ“„
  • -f command-file β€” tells it a command file to execute when ipmi_sim starts up. this is generally used to set up the IPMI environment. see ipmi_sim_cmd(5) for details. πŸŽ€
  • -x command β€” executes a single command. one and done. ✨
  • -s state-dir β€” specifies a state directory for ipmi_sim to use instead of the default. the state directory must exist, and ipmi_sim will store information there for when it restarts. for instance, if someone changes user information, then it stores the new user information there and what's in the config file will no longer be used. so like… the state dir ate and the config file is just sitting there like 😭
  • -d β€” turns on debugging to standard output (if -n is not specified) and the debug output of syslog. debugging bestie mode. πŸ”₯
  • -n β€” disables console and I/O on standard input and output. quiet mode. shhh. πŸ™ˆ

πŸŽ€ CONFIGURATION πŸŽ€

configuration is accomplished through the file /etc/ipmi/lan.conf. a file with another name or path may be specified using the -c option. see the ipmi_lan(5) config file man page for more details. iykyk. πŸ“„


🌈 COMMANDS 🌈

when ipmi_sim starts up, it has an empty environment. no BMC, no management controllers. nothing. a blank canvas. a fresh face. πŸ₯Ί

so you have to execute commands to set things up. that's the assignment.

the commands can also be used to set sensor states, inject events, and do other things you might want to do when simulating a BMC. see the ipmi_sim_cmd(5) man page for details. go off. πŸ’œ


πŸ”’ SECURITY πŸ”’

ipmi_sim implements normal IPMI security. the default is no access for anyone, so the default is pretty safe. bestie is locked down. πŸ”

but be careful what you add, because this is access to control your box. like, actual control. of your actual box. 😭

straight and none authorizations are not recommended β€” you should probably stick with md2 or md5 if you are not using RMCP+. fr fr, choose wisely. πŸ’€


⭐ PERSISTENCE ⭐

things that are supposed to be persistent in a BMC are kept in files, generally in /var/ipmi_sim/<name>, where <name> is the name of the BMC specified in the configuration file. the following things are persistent:

  • SDRs β€” this is named sdr.<mcnum>.main and is the main SDR repository. πŸ“š
  • SEL β€” this is named sel.<mcnum>. πŸ“
  • Users β€” this is named users.mc<mcnum>. πŸ‘₯
  • LAN parameters β€” this is named lanparm.mc<mcnum>.<channel>. 🌐
  • SOL parameters β€” this is named sol.mc<mcnum>. πŸ–₯️

the <mcnum> is the hexadecimal number of the MC. hex girlies rise. πŸ”’


🧚 Serial Over LAN (SOL) 🧚

ipmi_sim implements Serial Over LAN for hooking an RMCP+ connection to a standard Unix serial port. this is configured in the ipmi_lan(5) configuration file. ✨

a SOL interface is done on a per-MC basis. so if the MC is set to a non-BMC, you can define a SOL interface on it and it will work if you reroute the commands to that MC. it's a little weird, but it works. lowkey relatable. πŸ™ˆ only interface 1 is supported at the moment.

a SOL interface can also hold history that is kept even if nothing is connected to the SOL interface from the LAN. so if you want to see what has happened on the serial port, you can connect to interface 2 and it will dump the history. iconic. the history is optionally persistent β€” if the program terminates normally and is restarted, the history is restored if it is configured to do so. 🫢

a SOL interface can create a FRU on the MC to let you fetch the history via the FRU interface. bonus content. πŸ’–


πŸ‘‘ SIGNALS πŸ‘‘

SIGHUP

ipmi_sim should handle SIGHUP and reread it's configuration files. however, it doesn't right now. it might in the future, but for now you will have to kill it and restart it. 😭

clients should handle reconnecting in this case. if they don't, they are broken. no cap, that's just the truth. πŸ’€


πŸ’œ ERROR OUTPUT πŸ’œ

at startup, all error output goes to stderr. after that, all error output goes to syslog. phase one vs phase two, basically. ✨


πŸ“ FILES πŸ“

/etc/ipmi_lan.conf


🌸 SEE ALSO 🌸

ipmi_lan(5), ipmi_sim_cmd(5), ipmi_ui(1), openipmish(1)


πŸ’– AUTHOR πŸ’–

Corey Minyard <cminyard@mvista.com> β€” the legend, the moment, the icon. πŸ‘‘


and that's the whole page bestie, brought to you by OpenIPMI, dated 06/26/12. stay safe, lock down your auth, and go simulate a BMC responsibly. mwah. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from