Command Usage
更新时间: 2026/08/06
在Gitcode上查看源码

Command Usage

Syntax formats for local and remote execution

1. Local execution (either)

ipmicmd -k "f 0 <netfn> <cmd> [data]" smi 0
ipmitool raw <netfn> <cmd> [data]

2. Remote execution

ipmitool -I lanplus -H <IP> -U <user> -P <pass> raw <netfn> <cmd> [data]

Basic Syntax Format of ipmicmd

ipmicmd -k "f <channel> <netfn> <cmd> [data...]" smi <interface_id>

Parameter description:

  • -k: specifies whether to use the KCS or BT interface.
  • f: indicates that the raw command is executed.
  • <channel>: channel number, which is usually 0 (system interface)
  • <netfn>: network function code (hexadecimal. The request NetFn needs to be used, that is, an even number.)
  • <cmd>: command code (hexadecimal)
  • [data...]: command data byte (optional, hexadecimal)
  • smi: indicates that the SMI interface is used.
  • <interface_id>: interface ID. The value is usually 0.

Original ipmitool Command Format

ipmitool [-I <interface>] raw <netfn> <cmd> [data...]

Parameter description:

-I <interface>: specifies the interface type.

  • open: local KCS or BT interface (default)
  • lanplus: IPMI v2.0 LAN interface
  • lan: IPMI v1.5 LAN interface

-H <host>: BMC IP address

-U <username>: user name

-P <password>: password

raw: Sends the original IPMI command.

<netfn>: network function code (decimal or hexadecimal, using the request NetFn)

<cmd>: command code (decimal or hexadecimal)

[data...]: command data byte (decimal or hexadecimal)

ipmicmd and ipmitool parameter description comparison

ParameteripmicmdipmitoolDescription
Type-k + smi 0-I open (default)Local KCS or BT interface
Channel No.f 0No need to specifyipmitool automatic processing
NetFnHexadecimal (for example, 06)Hexadecimal or decimal (for example, 0x06 or 6)The request NetFn (even number) must be used.
CMDHexadecimal (for example, 01)Hexadecimal or decimal (for example, 0x01 or 1)Command Code
Data byteHexadecimal space separation (for example, 00 01)Hexadecimal or decimal separated by spaces (for example, 0x00 0x01)Optional parameters

To convert ipmicmd to ipmitool, delete -k "f 0" and "smi 0 from and add 0x before NetFn/CMD/Data. The following is an example of format conversion:

ToolsComplete formatExample
ipmicmdipmicmd -k "f 0 <netfn> <cmd> [data]" smi 0ipmicmd -k "f 0 06 01" smi 0
ipmitoolipmitool raw <netfn> <cmd> [data]ipmitool raw 0x06 0x01

Must Know

  1. NetFn request/response: The sent command is an even number (for example, 0x06), and the received response is an odd number (for example, 0x07).
  2. Number format: ipmicmd must be a hexadecimal number and cannot be prefixed with 0x. ipmitool must be prefixed with 0x or use a decimal number.
  3. The ipmitool mc info command is more intuitive than the ipmitool raw 0x06 0x01 command.
  4. Tips: Add -v or -vv to view details.
  5. The maximum length of the data returned by the ipmicmd command is 36 bytes. If the length of the returned data exceeds 36 bytes, you are advised to run the ipmitool command.

Encryption algorithm suites

When IPMI commands are sent using RMCP/RMCP Plus, the default encryption algorithm suites supported vary depending on the device model. For details, see the following table.

Encryption algorithm suitesModel Range
Cipher suite 17 is enabled by default.DP120, DP220, DP4210, OceanStor Pacific 9950 Data cluster module, OceanStor Pacific 9950 Node, FusionCube 500, CM421 V2, CM221 V2, CM311T V2, CM211S V2, CM221S V2, CM411 V2
Cipher suite 1, 2, 3, and 17 are enabled by default.RH1288 V3, RH2288 V3, RH2288H V3, XH310 V3, RH8100 V3, RH5885 V3, RH5885H V3, 5288 V3, 1288H V5, 2288H V5, 2288C V5, 5288 V5, 2288 V5(JDM), 5885H V5, 2488 V5, 2488H V5, 1288X V5, 2288X V5, 5288X V5, 2298 V5, 1288H V6, 2288H V6, 2488H V6, CH121 V3, CH121H V3, CH121L V3, CH140 V3, CH140L V3, CH220 V3, CH222 V3, CH242 V3, CH226 V3, CH225 V3, CH121 V5, CH242 V5, CH121L V5, CH225 V5, CH221 V5, FD Controller, CX220, CX620, CX621, CX320, CX318, CX710, CX712, CX820, CX916, CX920, CX930, MM630, MM810, MM650, MM920, MM921, MM510, RM110, RM210, XH622 V3, XH628 V3, XH620 V3, XH310 V3, XH321 V3, XH321 V5, XH321L V5, XH628 V5, 9008, 9016, 9032, RH8100 V3, 9008 V5 Base, 9008 V5 Advance, 8100 V5, Taishan 100 2180, TaiShan 100 2280, TaiShan 100 5280, TaiShan 100 XR320, TaiShan 200 1280, TaiShan 200 2180, TaiShan 200 2280, TaiShan 200 5280, TaiShan 200 2480, TaiShan 200 2280E, TaiShan 200 5290, TaiShan 200 XA320, G560, G2500, G560 V5, G530 V5, Atlas 800 9000, A800-9000, Atlas 800 9010, A800-9010, Atlas 500 Pro, A500 Pro, DA120 V2, DA120C V2, DH120 V5, DH120C V5, DA140C V2, DH140C V6, DA121C V2, CM221, CN221, CM221S, CN221 V2, CN221S V2, SMM410, SMM420, SMM810, SMM820, Atlas 800I A2 2UP, A800I 2UP, Atlas 900 A3 SuperPoDA900 A3 SuperPoD, Atlas9000 RCK A3A9000 RCK A3

Note: If the version of CM221, CN221, CN221 V2, CN221S V2, SMM410, SMM420, SMM810 and iBMCBMC of SMM820 is 3.2.1.13 or later, only cipher suite 17 is enabled by default.