Pages

Friday, May 10, 2013

[IPMI] SOL Commands

[IPMI] SOL Commands
SOL Activating - NetFn = Transport (0x0ch), CMD = 0x20h, Privilege Level = b2, M/O = O
Note:
This command provides a mechanism for the BMC to notify a remote application connected to serial port that a SOL payload is activating on another channel


Set SOL Configuration Parameters - Transport (0x0ch), CMD = 21h, Privilege Level = Admin, M/O = O
| Linux |
[IPMItool]
ipmitool raw 0x0c 0x21 D[1] Byte 1
Request Data Byte 1
[7:4] - reserved
[3:0] - Channel number
D[2] Byte 2
Parameter Selector
per Table 26-5, SOL Configuration Parameters
      #0 - Set In Progress (volatile)
      #1 - SOL Enable
      #2 - SOL Authentication
      #3 - Character Accumulate Interval & Character Send Threshold
      #4 - SOL Retry
      #5 - SOL non-volatile bit rate (non-volatile)
      #6 - SOL volatile bit rate (volatile)
      #7 - SOL Payload Channel (optional, Read Only)
      #8 - SOL Payload Port Number (Read Only or Read/Write)
#199:255 - OEM Parameters
D[3:N] Byte [3:N]
Configuration Parameter Data
per Table 26-5, SOL Configuration Parameters

ipmitool sol set <parameter> <value> Parameter & Value
SOL Set Parameters and Values
SOL set parameters and values:

  set-in-progress             set-complete | set-in-progress | commit-write
  enabled                     true | false
  force-encryption            true | false
  force-authentication        true | false
  privilege-level             user | operator | admin | oem
  character-accumulate-level  <in 5 ms increments>
  character-send-threshold    N
  retry-count                 N
  retry-interval              <in 10 ms increments>
  non-volatile-bit-rate       serial | 9.6 | 19.2 | 38.4 | 57.6 | 115.2
  volatile-bit-rate           serial | 9.6 | 19.2 | 38.4 | 57.6 | 115.2
[<channel>]
[ipmiutil]
ipmiutil cmd 00 20 30 21 D[1] Byte 1
Request Data Byte 1
[7:4] - reserved
[3:0] - Channel number
D[2] Byte 2
Parameter Selector
per Table 26-5, SOL Configuration Parameters
      #0 - Set In Progress (volatile)
      #1 - SOL Enable
      #2 - SOL Authentication
      #3 - Character Accumulate Interval & Character Send Threshold
      #4 - SOL Retry
      #5 - SOL non-volatile bit rate (non-volatile)
      #6 - SOL volatile bit rate (volatile)
      #7 - SOL Payload Channel (optional, Read Only)
      #8 - SOL Payload Port Number (Read Only or Read/Write)
#199:255 - OEM Parameters
D[3:N] Byte [3:N]
Configuration Parameter Data
per Table 26-5, SOL Configuration Parameters

icmd 00 20 30 21 D[1] Byte 1
Request Data Byte 1
[7:4] - reserved
[3:0] - Channel number
D[2] Byte 2
Parameter Selector
per Table 26-5, SOL Configuration Parameters
      #0 - Set In Progress (volatile)
      #1 - SOL Enable
      #2 - SOL Authentication
      #3 - Character Accumulate Interval & Character Send Threshold
      #4 - SOL Retry
      #5 - SOL non-volatile bit rate (non-volatile)
      #6 - SOL volatile bit rate (volatile)
      #7 - SOL Payload Channel (optional, Read Only)
      #8 - SOL Payload Port Number (Read Only or Read/Write)
#199:255 - OEM Parameters
D[3:N] Byte [3:N]
Configuration Parameter Data
per Table 26-5, SOL Configuration Parameters

[FreeIPMI]
ipmi-raw 0x00 0x0c 0x21 D[1] Byte 1
Request Data Byte 1
[7:4] - reserved
[3:0] - Channel number
D[2] Byte 2
Parameter Selector
per Table 26-5, SOL Configuration Parameters
      #0 - Set In Progress (volatile)
      #1 - SOL Enable
      #2 - SOL Authentication
      #3 - Character Accumulate Interval & Character Send Threshold
      #4 - SOL Retry
      #5 - SOL non-volatile bit rate (non-volatile)
      #6 - SOL volatile bit rate (volatile)
      #7 - SOL Payload Channel (optional, Read Only)
      #8 - SOL Payload Port Number (Read Only or Read/Write)
#199:255 - OEM Parameters
D[3:N] Byte [3:N]
Configuration Parameter Data
per Table 26-5, SOL Configuration Parameters

| MS-DOS |
[ipmitool]
ipmitool 20 30 21 Data[1:N]

--Completion Code--
80h = parameter not supported
81h = attempt to set the 'set in progress' value (in parameter #0) when not in the 'set complete' state
          (This completion code provides a way to recognize that another party has already 'claimed' the parameters)
82h = attempt to write read-only parameter
83h = attempt to read write-only parameter

For example   Hint: hover over Place your mouse over the highlighted area in below
for Response Data description
[IPMItool in Linux]
Set #2 - SOL Authentication
$ ipmitool raw 0x0c 0x21 0x01 0x02 0x02

$ ipmitool sol set privilege-level user 1
Set #5 - SOL Non-Volatile Bit Rate
$ ipmitool raw 0x0c 0x21 0x01 0x05 0x0a

$ ipmitool sol set non-volatile-bit-rate 115.2 1
[ipmiutil in Linux]
Set #1 - SOL Enable
$ icmd 00 20 30 21 01 01 00
ipmiutil ver 3.08
icmd ver 3.08
This is a test tool to compose IPMI commands.
Do not use without knowledge of the IPMI specification.
-- BMC version 1.7, IPMI version 2.0
send_icmd ret = 0
ipmiutil cmd, completed successfully
[FreeIPMI in Linux]
Set #4 - SOL Retry
$ ipmi-raw 0x00 0x0c 0x21 0x01 0x04 0x07 0xff
rcvd: 21 00 Byte 1
Completion Code
00h = Command Completed Normally
80h = parameter not supported
81h = attempt to set the 'set in progress' value (in parameter #0) when not in the 'set complete' state
82h = attempt to write read-only parameter
83h = attempt to read write-only parameter



Get SOL Configuration Parameters - NetFn = Transport (0x0ch), CMD = 0x22h, Privilege Level = User, M/O = O
| Linux |
[IPMItool]
ipmitool raw 0x0c 0x22 D[1] Byte 1
Request Data Byte 1
  [7] - 0b = get parameter
        1b = get parameter revision only
[6:4] - reserved
[3:0] - Channel number
D[2] Byte 2
Parameter Selector
per Table 26-5, SOL Configuration Parameters
      #0 - Set In Progress (volatile)
      #1 - SOL Enable
      #2 - SOL Authentication
      #3 - Character Accumulate Interval & Character Send Threshold
      #4 - SOL Retry
      #5 - SOL non-volatile bit rate (non-volatile)
      #6 - SOL volatile bit rate (volatile)
      #7 - SOL Payload Channel (optional, Read Only)
      #8 - SOL Payload Port Number (Read Only or Read/Write)
#199:255 - OEM Parameters
D[3] Byte 3
Set Selector
Selects a given set of parameters under a given Parameter selector value
00h if parameter doesn't use a Set Selector
D[4] Byte 4
Block Selector
00h if parameter does not require a block number

ipmitool sol info [<channel number>]
[ipmiutil]
ipmiutil cmd 00 20 30 22 D[1] Byte 1
Request Data Byte 1
  [7] - 0b = get parameter
        1b = get parameter revision only
[6:4] - reserved
[3:0] - Channel number
D[2] Byte 2
Parameter Selector
per Table 26-5, SOL Configuration Parameters
      #0 - Set In Progress (volatile)
      #1 - SOL Enable
      #2 - SOL Authentication
      #3 - Character Accumulate Interval & Character Send Threshold
      #4 - SOL Retry
      #5 - SOL non-volatile bit rate (non-volatile)
      #6 - SOL volatile bit rate (volatile)
      #7 - SOL Payload Channel (optional, Read Only)
      #8 - SOL Payload Port Number (Read Only or Read/Write)
#199:255 - OEM Parameters
D[3] Byte 3
Set Selector
Selects a given set of parameters under a given Parameter selector value
00h if parameter doesn't use a Set Selector
D[4] Byte 4
Block Selector
00h if parameter does not require a block number

icmd 00 20 30 22 D[1] Byte 1
Request Data Byte 1
  [7] - 0b = get parameter
        1b = get parameter revision only
[6:4] - reserved
[3:0] - Channel number
D[2] Byte 2
Parameter Selector
per Table 26-5, SOL Configuration Parameters
      #0 - Set In Progress (volatile)
      #1 - SOL Enable
      #2 - SOL Authentication
      #3 - Character Accumulate Interval & Character Send Threshold
      #4 - SOL Retry
      #5 - SOL non-volatile bit rate (non-volatile)
      #6 - SOL volatile bit rate (volatile)
      #7 - SOL Payload Channel (optional, Read Only)
      #8 - SOL Payload Port Number (Read Only or Read/Write)
#199:255 - OEM Parameters
D[3] Byte 3
Set Selector
Selects a given set of parameters under a given Parameter selector value
00h if parameter doesn't use a Set Selector
D[4] Byte 4
Block Selector
00h if parameter does not require a block number

[FreeIPMI]
ipmi-raw 0x00 0x0c 0x22 D[1] Byte 1
Request Data Byte 1
  [7] - 0b = get parameter
        1b = get parameter revision only
[6:4] - reserved
[3:0] - Channel number
D[2] Byte 2
Parameter Selector
per Table 26-5, SOL Configuration Parameters
      #0 - Set In Progress (volatile)
      #1 - SOL Enable
      #2 - SOL Authentication
      #3 - Character Accumulate Interval & Character Send Threshold
      #4 - SOL Retry
      #5 - SOL non-volatile bit rate (non-volatile)
      #6 - SOL volatile bit rate (volatile)
      #7 - SOL Payload Channel (optional, Read Only)
      #8 - SOL Payload Port Number (Read Only or Read/Write)
#199:255 - OEM Parameters
D[3] Byte 3
Set Selector
Selects a given set of parameters under a given Parameter selector value
00h if parameter doesn't use a Set Selector
D[4] Byte 4
Block Selector
00h if parameter does not require a block number

| MS-DOS |
[ipmitool]
ipmitool 20 30 22 Data[1:4]

--Completion Code--
80h = parameter not supported

For example   Hint: hover over Place your mouse over the highlighted area in below
for Response Data description
[IPMItool in Linux]
$ ipmitool raw 0x0c 0x22 0x01 0x05 0x00 0x00
 11 Byte 2
Response Data Byte 2
[7:0] - Parameter revision
Format:
MSN = present revision
LSN = oldest revision parameter is backward compatible with
11h for parameters in this specification
0a Byte 2
Response Data Byte 3
#5 - SOL non-volatile bit rate (non-volatile)
Data 1
[7:4] - Reserved
[3:0] - Bit Rate
        1-5h = reserved. Support for bit rates other than 19.2 kbps is optional
        0h: Use setting presently configured for IPMI over serial channel
        6h: 9600 bps
        7h: 19.2 kbps
        8h: 38.4 kbps
        9h: 57.6 kbps
        Ah: 115.2 kbps
        all other = reserved

$ ipmitool sol info 0x01
Set in progress                 : set-complete
Enabled                         : true
Force Encryption                : false
Force Authentication            : false
Privilege Level                 : USER
Character Accumulate Level (ms) : 20
Character Send Threshold        : 50
Retry Count                     : 7
Retry Interval (ms)             : 2550
Volatile Bit Rate (kbps)        : 115.2
Non-Volatile Bit Rate (kbps)    : 115.2
Payload Channel                 : 1 (0x01)
Payload Port                    : 623
[ipmiutil in Linux]
$ icmd 00 20 30 22 01 04 00 00
ipmiutil ver 3.08
icmd ver 3.08
This is a test tool to compose IPMI commands.
Do not use without knowledge of the IPMI specification.
-- BMC version 1.7, IPMI version 2.0
respData[len=3]: 11 07 ff 11 Byte 2
Response Data Byte 2
[7:0] - Parameter revision
Format:
MSN = present revision
LSN = oldest revision parameter is backward compatible with
11h for parameters in this specification
00 Byte 3
Response Data Byte 3
#4 - SOL Retry
Byte 1: Retry Count
[7:3] - Reserved
[2:0] - Retry count. 1-based
0 = no retries after packet is transmitted
Packet will be dropped if no ACK/NACK received by time retries expire
00 Byte 4
Response Data Byte 4
#4 - SOL Retry
Byte 2: Retry Interval. 1-based
Retry Interval in 10 ms increments
Sets the time that the BMC will wait before the first retry and the time between retries when sending SOL packets to the remote console
00h: Retries sent back-to-back

send_icmd ret = 0
ipmiutil cmd, completed successfully
[FreeIPMI in Linux]
$ ipmi-raw 0x00 0x0c 0x22 0x01 0x01 0x00 0x00
rcvd: 22 00 Byte 1
Completion Code
00h = Command Completed Normally
80h = parameter not supported
11 Byte 2
Response Data Byte 2
[7:0] - Parameter revision
Format:
MSN = present revision
LSN = oldest revision parameter is backward compatible with
11h for parameters in this specification
01 Byte 3
Response Data Byte 3
#1 - SOL Enable
Byte 1:
[7:1] - Reserved
  [0] - SOL Enable
Note, this controls whether the SOL payload type can be activated
Noter that whether an SOL stream can be established is also dependent on the Access Mode and Authentication settings for the corresponding LAN channel
The enabled/disabled state and access mode settings for the serial/modem channel have no effect on SOL
        1b = enable SOL payload
        0b = disable SOL payload

[IPMI tool under DOS]
c:\> ipmitool 20 30 22 01 05 00 00
34 22 00 11 0a


============================================================
Using SOL
| Linux |
[IPMItool]
Activate
ipmitool -I lanplus -H ${bmc_ip} -U ${bmc_user} -P ${bmc_password} sol activate
Deactivate
ipmitool -I lanplus -H ${bmc_ip} -U ${bmc_user} -P ${bmc_password} sol deactivate
[ipmiutil]
Activate
ipmiutil sol -a -N ${bmc_ip} -U ${bmc_user} -P ${bmc_password}
isol -a -N ${bmc_ip} -U ${bmc_user} -P ${bmc_password}
Deactivate
ipmiutil sol -d -N ${bmc_ip} -U ${bmc_user} -P ${bmc_password}
isol -d -N ${bmc_ip} -U ${bmc_user} -P ${bmc_password}
[FreeIPMI]
Activate
ipmiconsole --hostname ${bmc_ip} --user ${bmc_user} --password ${bmc_password}
ipmiconsole -h ${bmc_ip} -u ${bmc_user} -p ${bmc_password}
ipmi-console --hostname ${bmc_ip} --user ${bmc_user} --password ${bmc_password}
ipmi-console -h ${bmc_ip} -u ${bmc_user} -p ${bmc_password}
Deactivate
ipmiconsole --hostname ${bmc_ip} --user ${bmc_user} --password ${bmc_password} --deactivate
ipmiconsole -h ${bmc_ip} -u ${bmc_user} -p ${bmc_password} --deactivate
ipmi-console --hostname ${bmc_ip} --user ${bmc_user} --password ${bmc_password} --deactivate
ipmi-console -h ${bmc_ip} -u ${bmc_user} -p ${bmc_password} --deactivate

For example
[IPMItool in Linux]
$ ipmitool -I lanplus -H ${bmc_ip} -U ${bmc_user} -P ${bmc_password} sol activate
[SOL Session operational. Use ~? for help]
For Help, Press [Shift + ~, Shift + ?]
~?
    Supported escape sequences:
        ~.  - terminate connection
        ~^Z - suspend ipmitool
        ~^X - suspend ipmitool, but don't restore tty on restart
        ~B  - send break
        ~?  - this message
        ~~  - send the escape character by typing it twice
        (Note that escapes are only recognized immediately after newline.)
Send Break, Press [Shift + ~, Shift + B]
~B [send break]
Terminate Connection, Press [Shift + ~, .]
~. [terminated ipmitool]
Deactivate Connection
$ ipmitool -I lanplus -H ${bmc_ip} -U ${bmc_user} -P ${bmc_password} sol deactivate
$ ipmitool -I lanplus -H ${bmc_ip} -U ${bmc_user} -P ${bmc_password} sol deactivate
Info: SOL payload already de-activated
[ipmiutil in Linux]
$ ipmiutil sol -a -N ${bmc_ip} -U ${bmc_user} -P ${bmc_password}
$ isol -a -N ${bmc_ip} -U ${bmc_user} -P ${bmc_password}
ipmiutil ver 3.08
isol ver 3.08
-- BMC version 1.07, IPMI version 2.0
Opening lanplus connection to node 172.16.97.38 ...
[SOL session is running, use '~.' to end, '~?' for help.]
Show Help Message, Press [Shift + ~, Shift + ?]
~?
Supported SOL escape sequences:
        ~.  - terminate connection
        ~B  - send break
        ~D  - send ctl-alt-delete (chassis soft reset)
        ~?  - show this help message
        ~~  - send the escape character by typing it twice
Terminate Connection, Press [Shift + ~, .]
isol exit via user input
ipmiutil sol, completed successfully
Deactivate Connetion
$ isol -d -N ${bmc_ip} -U ${bmc_user} -P ${bmc_password}
ipmiutil ver 3.08
isol ver 3.08
-- BMC version 1.07, IPMI version 2.0
Opening lanplus connection to node 172.16.97.38 ...
ipmiutil sol, Invalid Session Handle or Empty Buffer
[FreeIPMI in Linux]
$ ipmiconsole -h ${bmc_ip} -u ${bmc_user} -p ${bmc_password}
$ ipmi-console --hostname ${bmc_ip} --username ${bmc_user} --password ${bmc_password}
[SOL established]
Display Available Escape Sequences, Press [Shift + &, Shift + ?]
&? - this menu
&. - exit
&B - generate break
&D - send DEL character
&& - & character
Generate Break, Press [Shift + &, Shift + B]
[generate break]
Terminate Connection, Press [Shift + &, .]

[closing the connection]
Deactivate SOL Session
$ ipmiconsole -h ${bmc_ip} -u ${bmc_user} -p ${bmc_password} --deactivate
$ ipmi-console --hostname ${bmc_ip} --username ${bmc_user} --password ${bmc_password} --deactivate


Reference
[1] "Intelligent Platform Management Interface Specification Second Generation v2.0 Document Revision 1.1"
https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf
[2] "IPMItool" http://sourceforge.net/projects/ipmitool/
[3] "IPMI Command Test Tool" http://www.intel.com/design/servers/ipmi/ipmi_tool.htm
[4] "IPMIUTIL USER GUIDE" http://ipmiutil.sourceforge.net/
[5] "FreeIPMI Documentation" http://www.gnu.org/software/freeipmi/index.html

Last Updated: May 23, 2018

No comments:

Post a Comment