xref: /openbmc/phosphor-host-ipmid/docs/ipmitool-commands-cheatsheet.md (revision a1bd285e9a5862695bf58db0ce7afea655e04ced)
1f8e9e38bSRatan Gupta# IPMI command cheat sheet
2f8e9e38bSRatan Gupta
3f8e9e38bSRatan GuptaThis document is intended to provide a set of IPMI commands for quick reference.
4f8e9e38bSRatan Gupta
5*a1bd285eSPatrick WilliamsNote: If the ipmitool is on the BMC then set the interface as "-I dbus" and if
6*a1bd285eSPatrick Williamsthe ipmitool is outside the BMC (i.e on the network) then set the interface as
7f8e9e38bSRatan Gupta"-I lanplus".
8f8e9e38bSRatan Gupta
9f8e9e38bSRatan Gupta## Network Configuration
10f8e9e38bSRatan Gupta
11f8e9e38bSRatan Gupta### Set the interface mode
12f8e9e38bSRatan Gupta
13*a1bd285eSPatrick Williams`ipmitool lan set <channel> ipsrc static`
14f8e9e38bSRatan Gupta
15f8e9e38bSRatan Gupta### Set the IP Address
16f8e9e38bSRatan Gupta
17*a1bd285eSPatrick Williams`ipmitool lan set <channel> ipaddr <x.x.x.x>`
18f8e9e38bSRatan Gupta
19f8e9e38bSRatan Gupta### Set the network mask
20f8e9e38bSRatan Gupta
21*a1bd285eSPatrick Williams`ipmitool lan set <channel> netmask <x.x.x.x>`
22f8e9e38bSRatan Gupta
23f8e9e38bSRatan Gupta### Set the default gateway
24f8e9e38bSRatan Gupta
25*a1bd285eSPatrick Williams`ipmitool lan set <channel> defgw ipaddr <x.x.x.x>`
26f8e9e38bSRatan Gupta
27f8e9e38bSRatan Gupta### Set the VLAN
28f8e9e38bSRatan Gupta
29*a1bd285eSPatrick Williams`ipmitool lan set <channel> vlan id <id>`
30f8e9e38bSRatan Gupta
31f8e9e38bSRatan Gupta### Delete the VLAN
32f8e9e38bSRatan Gupta
33*a1bd285eSPatrick Williams`ipmitool lan set <channel> vlan id off`
34f8e9e38bSRatan Gupta
35*a1bd285eSPatrick WilliamsNOTE: The user can group multiple set operations since the IPMI daemon waits for
36*a1bd285eSPatrick Williams10 seconds after each set operation before applying the configuration.
37