IPMI: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(리터럴 ** 볼드 마커 제거 (MediaWiki는 ''' 볼드, **는 리터럴))
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
== What is IPMI ==
= IPMI =
'''Intelligent Platform Management Interface''' ('''IPMI''') is a set of computer interface specifications for an autonomous computer subsystem that provides management and monitoring capabilities '''independently of the host system's CPU, firmware ([[BIOS]] or UEFI) and operating system'''.<ref>https://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface</ref>
[[File:Ipmi block diagram.png|center|frameless|480x480px|ipmi_block_diagram]]
A BMC (baseboard management controller) is a core building block of IPMI sub-system. [https://www.openbmc.org/ OpenBMC] is a [[Linux]] Foundation Collaborative open-source BMC project.


IPMItool is a utility to monitor, configure, and manage devices that [[support]] the Intelligent Platform Management Interface (IPMI) and available with recent Linux Ubuntu distributions
== Overview ==


== IPMItool<ref>https://github.com/scottjg/ipmitool</ref> ==
IPMI(Intelligent Platform Management Interface)는 호스트 시스템의 CPU, 펌웨어([[BIOS/UEFI]]), 운영체제와 독립적으로 작동하는 컴퓨터 인터페이스 사양입니다. 서버 관리 및 모니터링을 위한 자율적 서브시스템을 제공합니다.
IPMItool uses the System Interface (in-band) to run the IPMI command on the local BMC through the OpenIPMI Driver. IPMItool can also use a LAN Interface to receive IPMI responses from a remote  (out-band) IPMI-based platform, if you know its BMC IP address and have user access to the BMC.<syntaxhighlight lang="bash">
$ sudo ipmitool channel info
Channel 0xf info:
  Channel Medium Type  : System Interface
  Channel Protocol Type : KCS
  Session Support      : session-less
  Active Session Count  : 0
  Protocol Vendor ID    : 7154
</syntaxhighlight>Most platforms with IPMI also have a LAN interface that is assigned to channel number 1<syntaxhighlight>
$ sudo ipmitool channel info 1
Channel 0x1 info:
  Channel Medium Type  : 802.3 LAN
  Channel Protocol Type : IPMB-1.0
  Session Support      : multi-session
  Active Session Count  : 0
  Protocol Vendor ID    : 7154
  Volatile(active) Settings
    Alerting            : enabled
    Per-message Auth    : disabled
    User Level Auth    : enabled
    Access Mode        : always available
  Non-Volatile Settings
    Alerting            : enabled
    Per-message Auth    : disabled
    User Level Auth    : enabled
    Access Mode        : always available
</syntaxhighlight>IPMItool supports various interface for remote commands


*         open          Linux OpenIPMI Interface [default]
=== Summary ===
*         imb            Intel IMB Interface
*         lan             IPMI v1.5 LAN Interface
*         lanplus       IPMI v2.0 RMCP+ LAN Interface
*         free           FreeIPMI IPMI Interface
*         serial-terminal  Serial Interface, Terminal Mode
*         serial-basic  Serial Interface, Basic Mode
*         dummy      Linux DummyIPMI Interface
*         usb           IPMI USB Interface(OEM Interface for AMI Devices)


== IPMI Security ==
* 무엇인가? — 서버 관리용 자율적 서브시스템 사양 (BMC 기반)
Restrict IPMI traffic to trusted internal networks. Traffic from IPMI must be restricted to a management VLAN segment with strong network controls. <u>The default password on a shipped system must be changed to utilize stronger passwords</u>. Devices that run IPMI must have strong, unique passwords set for the IPMI service. 
* 왜 필요한가? — OS 독립적 서버 모니터링, 원격 관리, 전원 제어
* 언제 사용하는가? — 데이터센터 서버 관리, 원격 전원 제어, 센서 모니터링


Each defined cipher suite specifies what authentication, integrity, and encryption protocol are used when an IPMI connection is made. 
== Purpose ==


System's Cipher suite can be checked by "ipmitool lan print" output <syntaxhighlight lang="bash">
이 문서가 존재하는 이유
$ sudo ipmitool lan print
 
...
* Goal: IPMI 기본 개념, ipmitool 사용법, 보안 설정, 실전 명령어 제공
RMCP+ Cipher Suites     : 0,1,2,3,6,7,8,11,12,15,16,17
* Scope: IPMI 아키텍처, ipmitool 명령어, 보안(Cipher suite), LAN 설정, 센서 모니터링
Cipher Suite Priv Max  : caaaaaaaaaaaXXX
* Non-goals: BMC 펌웨어 업그레이드, OpenBMC 상세 개발 가이드는 별도 문서
                        :     X=Cipher Suite Unused
 
                        :     c=CALLBACK
== Key Concepts ==
                        :     u=USER
 
                        :     o=OPERATOR
{| class="wikitable"
                        :     a=ADMIN
! Concept
                        :     O=OEM
! Description
...
! Related
|-
| BMC
| Baseboard Management Controller — IPMI 핵심 하드웨어
| [[IPMI]]
|-
| ipmitool
| IPMI 관리 유틸리티 (CLI)
| [[IPMI]]
|-
| In-band
| 호스트 OS를 통한 IPMI 접근 (KCS)
| [[IPMI]]
|-
| Out-band
| LAN을 통한 원격 IPMI 접근 (RMCP+)
| [[IPMI]]
|-
| Cipher Suite
| IPMI 인증/암호화 프로토콜
| [[Cipher suite]]
|-
| SEL
| System Event Log — 이벤트 기록
| [[IPMI]]
|-
| SOL
| Serial-over-LAN — 원격 콘솔
| [[IPMI]]
|}
 
== Architecture ==
 
IPMI는 BMC(Baseboard Management Controller)를 핵심으로 하는 독립 서브시스템입니다:
 
<syntaxhighlight lang="mermaid">
graph TD
    A[IPMI Subsystem] --> B[BMC - Baseboard Management Controller]
     B --> C[In-band Interface]
    B --> D[Out-band Interface - LAN]
     C --> E[OpenIPMI Driver]
     C --> F[ipmitool - Local]
     D --> G[ipmitool - Remote]
     B --> H[Sensors - Temp/Fan/Voltage]
     B --> I[Power Control]
     B --> J[Event Log - SEL]
</syntaxhighlight>
</syntaxhighlight>


=== [[Cipher suite]]<ref>https://en.wikipedia.org/wiki/Cipher_suite</ref> ===
== Workflow ==
 
{| class="wikitable"
! Stage
! Input
! Output
|-
| Check Status
| ipmitool chassis status
| Power/Sensor status
|-
| Power Control
| ipmitool chassis power on/off
| Server power state change
|-
| Sensor Monitor
| ipmitool sdr list
| Temperature/Fan/Voltage readings
|-
| Remote Console
| ipmitool sol activate
| Serial-over-LAN session
|}
 
== Detailed Explanation ==
 
=== What is IPMI ===
 
IPMI는 호스트 시스템과 독립적으로 작동하는 서버 관리 인터페이스입니다. BMC(Baseboard Management Controller)가 핵심 구성 요소이며, OpenBMC은 Linux Foundation의 오픈소스 BMC 프로젝트입니다.
 
=== ipmitool Interface Types ===
 
* open — Linux OpenIPMI Interface (기본값, in-band)
* imb — Intel IMB Interface
* lan — IPMI v1.5 LAN Interface (out-band)
* lanplus — IPMI v2.0 RMCP+ LAN Interface (out-band, 권장)
* free — FreeIPMI IPMI Interface
* serial-terminal — Serial Interface, Terminal Mode
* serial-basic — Serial Interface, Basic Mode
* dummy — Linux DummyIPMI Interface
* usb — IPMI USB Interface (AMI OEM)


* Cipher 0 is an option that is enabled by default on many IPMI-enabled devices that allows authentication to be bypassed. Disable cipher 0 to prevent attackers from bypassing authentication and sending arbitrary IPMI commands.
=== IPMI Security ===
* Cipher suite 3 (authentication – RAKP-HMAC-SHA1; integrity – HMAC-SHA1-96; confidentiality – AES-CBC-128) - Cipher suite 3 is the default option on the IPMItool
* Cipher suite 17 (authentication – RAKP-HMAC-SHA256; integrity – HMAC-SHA256-128; confidentiality – AES-CBC-128).


* Others
* IPMI 트래픽은 신뢰할 수 있는 내부 네트워크로 제한
** Anonymous logins must be disabled.
* 관리 VLAN 세그먼트에서 강력한 네트워크 제어 적용
** Create IPMI accounts with a user name. Nameless account must be disabled.
* 기본 비밀번호는 반드시 강력한 비밀번호로 변경
** Use strong passwords
* 각 IPMI 서비스는 고유한 강력한 비밀번호 설정
 
=== Cipher Suite ===
 
* Cipher 0 — 인증 우회 가능 (비활성화 권장)
* Cipher 3 — 기본 옵션 (RAKP-HMAC-SHA1, AES-CBC-128)
* Cipher 17 — 고급 보안 (RAKP-HMAC-SHA256, AES-CBC-128)
 
추가 보안 조치:
* 익명 로그인 비활성화
* 이름 없는 계정 비활성화
* 강력한 비밀번호 사용
 
=== IPMI Commands ===


== IPMI Usage ==
{| class="wikitable"
{| class="wikitable"
|+
! Command
!commands
! Description
!Description
! Notes
!Notes and coments (All examples use in-bound command)
|-
For out-bound (remote) connection, need to add -I <Interface> -H <hostip> -U <username> -P <password> options
| raw
| RAW IPMI 요청 전송
| —
|-
| i2c
| I2C Master Write-Read
| —
|-
| lan
| LAN 채널 설정
| IPv4 설정 포함
|-
| lan6
| IPv6 LAN 채널 설정
| —
|-
| chassis
| chassis 상태 및 전원 제어
| power on/off/cycle/policy
|-
| power
| 전원 명령어 단축
| chassis power 대체
|-
| event
| 사전 정의된 이벤트 전송
| —
|-
| mc
| Management Controller 상태
| mc info/reset
|-
| sdr
| Sensor Data Repository
| sdr list/type
|-
| sensor
| 상세 센서 정보
| —
|-
| fru
| FRU 정보 출력
| fru print
|-
| sel
| System Event Log
| sel list/clear/elist
|-
| pef
| Platform Event Filtering
| —
|-
| sol
| Serial-over-LAN
| activate/deactivate
|-
|-
|raw
| user
|Send a RAW IPMI request and print response
| Management Controller 사용자
|
| user list/set name/password
|-
|-
|i2c
| channel
|Send an I2C Master Write-Read command and print response
| Management Controller 채널
|
| —
|-
|-
|spd
| session
|Print SPD info from remote I2C device
| 세션 정보 출력
|
| —
|-
|-
|lan
| dcmi
|Configure LAN Channels
| Data Center Management Interface
|<syntaxhighlight>
| power reading/get_limit/set_limit
# Show current lan configuration
|}
 
=== IPMI Usage Examples ===
 
==== LAN 설정 ====
 
<syntaxhighlight lang="bash">
# 현재 LAN 설정 확인
$ sudo ipmitool lan print
$ sudo ipmitool lan print
$ sudo ipmitool lan6 print
$ sudo ipmitool lan6 print


# Set IPv4 information
# IPv4 설정
$ sudo ipmitool lan set 1 ipaddr <Your IP address for the BMC>
$ sudo ipmitool lan set 1 ipaddr <BMC_IP>
$ sudo ipmitool lan set 1 netmask <Your Subnet Mask>
$ sudo ipmitool lan set 1 netmask <Subnet_Mask>
$ sudo ipmitool lan set 1 snmp <Your SNMP>
$ sudo ipmitool lan set 1 snmp <SNMP>
$ sudo ipmitool lan set 1 defgw ipaddr <Your gateway server>
$ sudo ipmitool lan set 1 defgw ipaddr <Gateway>
</syntaxhighlight>IPMI Cipher suite<syntaxhighlight lang="bash">
</syntaxhighlight>
# To check current cipher suites
 
==== Cipher Suite 변경 ====
 
<syntaxhighlight lang="bash">
# 현재 Cipher Suite 확인
$ sudo ipmitool lan print
$ sudo ipmitool lan print
...
RMCP+ Cipher Suites    : 0,1,2,3,6,7,8,11,12,15,16,17
Cipher Suite Priv Max  : caaaaaaaaaaaXXX
                        :    X=Cipher Suite Unused
                        :    c=CALLBACK
                        :    u=USER
                        :    o=OPERATOR
                        :    a=ADMIN
                        :    O=OEM
...


# To change new cipher Suite
# Cipher 3만 활성화
# Example enable only cipher suites 3
$ sudo ipmitool lan set 1 cipher_privs XXXaXXXXXXXXXXX
$sudo ipmitool lan set 1 cipher_privs XXXaXXXXXXXXXXX
 
# Cipher 3과 17 활성화
$ sudo ipmitool lan set 1 cipher_privs XXaXXXXXXXaXXXX
</syntaxhighlight>
 
==== 전원 제어 ====


# Example enable only cipher suites 3 and 17
<syntaxhighlight lang="bash">
$sudo ipmitool lan set 1 cipher_privs XXaXXXXXXXaXXXX
# 시스템 상태 확인
$ sudo ipmitool chassis status


# 전원 켜기
$ sudo ipmitool chassis power on
# 정상 종료
$ sudo ipmitool chassis power soft
# 즉시 전원 끄기
$ sudo ipmitool chassis power off
# 전원 사이클 (재부팅)
$ sudo ipmitool chassis power cycle
# 전원 복구 정책 설정
$ sudo ipmitool chassis policy always-on
# 다음 부팅 장치 설정
$ sudo ipmitool chassis bootdev pxe
$ sudo ipmitool chassis bootdev cdrom
$ sudo ipmitool chassis bootdev bios
</syntaxhighlight>
</syntaxhighlight>
|-
|lan6
|Configure IPv6 LAN Channels
|
|-
|chassis
|Get chassis status and set power state
|<syntaxhighlight>
# Show system status
$ sudo ipmitool chassis status 
System Power        : on
Power Overload      : false
Power Interlock      : inactive
Main Power Fault    : false
Power Control Fault  : false
Power Restore Policy : always-off
Last Power Event    : ac-failed
Chassis Intrusion    : inactive
Front-Panel Lockout  : inactive
Drive Fault          : false
Cooling/Fan Fault    : false
Sleep Button Disable : allowed
Diag Button Disable  : allowed
Reset Button Disable : allowed
Power Button Disable : allowed
Sleep Button Disabled: false
Diag Button Disabled : false
Reset Button Disabled: false
Power Button Disabled: false


# To power on the server
==== 센서 모니터링 ====
$sudo ipmitool chassis power on
 
<syntaxhighlight lang="bash">
# 모든 센서 목록
$ sudo ipmitool sdr list
 
# 센서 타입별 목록
$ sudo ipmitool sdr type Temperature
$ sudo ipmitool sdr type Fan
$ sudo ipmitool sdr type 'Power Supply'


#To gracefully shut down the OS and power off the server to standby power mode
# 상세 센서 정보
$sudo ipmitool chassis power soft
$ sudo ipmitool sensor
</syntaxhighlight>


# To perform an immediate power off from full-power mode to standby power mode (not graceful)
==== System Event Log (SEL) ====
$sudo ipmitool chassis power off


# To reset the server (cycle power on and off):
<syntaxhighlight lang="bash">
$sudo ipmitool chassis power cycle
# SEL 정보 확인
$ sudo ipmitool sel info


# To set chassis policy command to determine what the system does when the system experiences a power loss (and after the power is restored).
# SEL 목록
# ipmitool chassis policy <state>
$ sudo ipmitool sel list
$ sudo ipmitool chassis policy <state>, where chassis policy <state>
  list       : return supported policies
  always-on  : turn on when power is restored
  previous    : return to previous state when power is restored
  always-off  : stay off after power is restored


# 확장 목록
$ sudo ipmitool sel elist


</syntaxhighlight><syntaxhighlight>
# SEL 초기화
# To modify boot device for next reboot
$ sudo ipmitool sel clear
$sudo ipmitool chassis bootdev pxe
$sudo ipmitool chassis bootdev cdrom
$sudo ipmitool chassis bootdev bios
</syntaxhighlight>
</syntaxhighlight>
|-
|power
|Shortcut to chassis power commands
|
|-
|event
|Send pre-defined events to MC
|
|-
|mc
|Management Controller status and global enables
|<syntaxhighlight>
# To check MC (BMC) information
$ sudo ipmitool mc info


# To reset MC (BMC) controller
==== Serial-over-LAN (SOL) ====
$sudo ipmitool mc reset [ warm | cold ]
 
<syntaxhighlight lang="bash">
# SOL 활성화
$ sudo ipmitool sol activate
 
# SOL 비활성화
$ sudo ipmitool sol deactivate
 
# 재시도 간격 설정
$ sudo ipmitool sol set retry-interval value
</syntaxhighlight>
</syntaxhighlight>
|-
|sdr
|Print Sensor Data Repository entries and readings
|<syntaxhighlight>
#To check sensor information
$sudo ipmitool sdr list


# To list up sonsoer type
==== 사용자 관리 ====
$ sudo ipmitool sdr type
 
Sensor Types:
<syntaxhighlight lang="bash">
        Temperature              (0x01)  Voltage                  (0x02)
# 사용자 목록
        Current                  (0x03)  Fan                      (0x04)
$ sudo ipmitool user list 1
        Physical Security        (0x05)  Platform Security        (0x06)
 
        Processor                (0x07)  Power Supply              (0x08)
# 사용자 이름 설정
        Power Unit                (0x09)  Cooling Device            (0x0a)
$ sudo ipmitool user set name 2 <New_Name>
        Other                    (0x0b)  Memory                    (0x0c)
 
        Drive Slot / Bay          (0x0d)  POST Memory Resize        (0x0e)
# 비밀번호 설정
        System Firmwares          (0x0f)  Event Logging Disabled    (0x10)
$ sudo ipmitool user set password 2 <New_Password>
        Watchdog1                (0x11)  System Event              (0x12)
 
        Critical Interrupt        (0x13)  Button                    (0x14)
# 익명 사용자 비밀번호 설정
        Module / Board            (0x15)  Microcontroller          (0x16)
$ sudo ipmitool lan set 1 password <New_Password>
        Add-in Card              (0x17)  Chassis                  (0x18)
 
        Chip Set                  (0x19)  Other FRU                (0x1a)
# 사용자 삭제 (이름 비우기)
        Cable / Interconnect      (0x1b)  Terminator                (0x1c)
$ sudo ipmitool user set name <ID> ""
        System Boot Initiated    (0x1d)  Boot Error                (0x1e)
        OS Boot                  (0x1f)  OS Critical Stop          (0x20)
        Slot / Connector          (0x21)  System ACPI Power State  (0x22)
        Watchdog2                (0x23)  Platform Alert            (0x24)
        Entity Presence          (0x25)  Monitor ASIC              (0x26)
        LAN                      (0x27)  Management Subsys Health  (0x28)
        Battery                  (0x29)  Session Audit            (0x2a)
        Version Change            (0x2b)  FRU State                (0x2c)
       
# To check specific sdr type
$sudo ipmitool sdr type Temperature
$sudo ipmitool sdr type Fan
$sudo ipmitool sdr type ‘Power Supply’
</syntaxhighlight>
</syntaxhighlight>
|-
|sensor
|Print detailed sensor information
|
|-
|fru
|Print built-in FRU and scan SDR for FRU locators
|<syntaxhighlight>
#fru print Prints the FRU information.
$sudo ipmitool fru


==== DCMI (Data Center Management Interface) ====
<syntaxhighlight lang="bash">
# 전력 정보 확인
$ sudo ipmitool dcmi power reading
# 전력 제한 확인
$ sudo ipmitool dcmi power get_limit
# 전력 제한 설정
$ sudo ipmitool dcmi power set_limit
</syntaxhighlight>
</syntaxhighlight>
|-
|gendev
|Read/Write Device associated with Generic Device locators sdr
|
|-
|sel
|Print System Event Log (SEL)
Returns an error log
|#ipmitool sel list
...
6c | 10/29/2024 | 05:55:17 | Temperature #0x30 | Upper Critical going high | Asserted
...
The first column is a unique record number in the hexadecimal format.
The next two columns are the date and time stamp.
The fourth column shows the corresponding sensor.
The final column shows a description<syntaxhighlight>
# To check system logging


$sudo ipmitool sel info
==== ipmievd (IPMI Event Daemon) ====
$sudo ipmitool sel list
 
$sudo ipmitool sel elist # extended list (see manpage)  
<syntaxhighlight lang="bash">
$sudo ipmitool sel clear
# ipmievd 활성화
</syntaxhighlight>ipmievd - IPMI event daemon for sending events to syslog. To check ipmievd status we can use systemctl commands<syntaxhighlight>
#on Ubuntu, ipmievd is disabled by default
$ sudo systemctl enable ipmievd
$ sudo systemctl enable ipmievd
Synchronizing state of ipmievd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ipmievd
Created symlink /etc/systemd/system/ipmi.service → /lib/systemd/system/ipmievd.service.
Created symlink /etc/systemd/system/multi-user.target.wants/ipmievd.service → /lib/systemd/system/ipmievd.service.


# enable and start ipmievd
# ipmievd 시작
$ sudo systemctl start ipmievd
$ sudo systemctl start ipmievd
$ sudo systemctl status ipmievd   
● ipmievd.service - IPMI event daemon
    Loaded: loaded (/lib/systemd/system/ipmievd.service; enabled; vendor preset: enabled)
    Active: active (running) since Thu 2024-10-31 09:32:09 KST; 13s ago
    Process: 377408 ExecStart=/usr/sbin/ipmievd open daemon (code=exited, status=0/SUCCESS)
  Main PID: 377420 (ipmievd)
      Tasks: 1 (limit: 308967)
    Memory: 1.8M
    CGroup: /system.slice/ipmievd.service
            └─377420 /usr/sbin/ipmievd open daemon


# ipmievd 상태 확인
$ sudo systemctl status ipmievd
</syntaxhighlight>
</syntaxhighlight>
|-
|pef
|Configure Platform Event Filtering (PEF)
|
|-
|sol
|Configure and connect IPMIv2.0 Serial-over-LAN
|<syntaxhighlight>
#Activates SOL system console
$sudo ipmitool sol activate


#Deactivates SOL system console.
== Configuration ==
$sudo ipmitool sol deactivate
 
<syntaxhighlight lang="bash">
# BMC 정보 확인
$ sudo ipmitool mc info
 
# BMC 리셋
$ sudo ipmitool mc reset [warm | cold]
 
# LAN 설정
$ sudo ipmitool lan set 1 ipaddr <BMC_IP>
$ sudo ipmitool lan set 1 netmask <Subnet_Mask>
$ sudo ipmitool lan set 1 defgw ipaddr <Gateway>
 
# Cipher Suite 설정 (Cipher 3만)
$ sudo ipmitool lan set 1 cipher_privs XXXaXXXXXXXXXXX
 
# 사용자 설정
$ sudo ipmitool user set name 2 admin
$ sudo ipmitool user set password 2 <Strong_Password>
</syntaxhighlight>
 
== Examples ==
 
=== Example 1: 원격 서버 전원 제어 ===
 
<syntaxhighlight lang="bash">
# 원격 서버 상태 확인
$ sudo ipmitool -I lanplus -H <BMC_IP> -U <username> -P <password> chassis status


#Sets the default retry-interval value in milliseconds.
# 원격 서버 전원 켜기
$sudo ipmitool sol set retry-interval value
$ sudo ipmitool -I lanplus -H <BMC_IP> -U <username> -P <password> chassis power on


# 원격 서버 전원 끄기
$ sudo ipmitool -I lanplus -H <BMC_IP> -U <username> -P <password> chassis power off
</syntaxhighlight>
</syntaxhighlight>
|-
|tsol
|Configure and connect with Tyan IPMIv1.5 Serial-over-LAN
|
|-
|isol
|Configure IPMIv1.5 Serial-over-LAN
|
|-
|user
|Configure Management Controller users
|<syntaxhighlight>
# List up IPMI users
$ sudo ipmitool user list 1
ID  Name            Callin  Link Auth  IPMI Msg  Channel Priv Limit
1                    false  false      true      ADMINISTRATOR
2  root            false  false      true      ADMINISTRATOR
3                    true    false      false      NO ACCESS
...


#To change the name of userid 2, run the following command:
=== Example 2: 센서 모니터링 ===
$ sudo ipmitool user set name 2 <New User ID>


#To set a new password for userid 2, run the following command:
<syntaxhighlight lang="bash">
$ sudo ipmitool user set password 2 ipmitool user set password 2 <New Password>
# 모든 센서 확인
$ sudo ipmitool sdr list


#You can also use a null user for anonymous login. To change the password for the null user (userid 1) on the LAN channel, run the following command:
# 온도 센서만 확인
$ sudo ipmitool lan set 1 password <New Password>
$ sudo ipmitool sdr type Temperature


#To delete user id, Set user name to empty
# 상세 센서 정보
$sudo ipmitool user set name <ID> ""
$ sudo ipmitool sensor
</syntaxhighlight>
</syntaxhighlight>
|-
|channel
|Configure Management Controller channels
|
|-
|session
|Print session information
|
|-
|dcmi
|Data Center Management Interface
|<syntaxhighlight>
# To check system power information


$ sudo ipmitool dcmi power
== Best Practices ==
power <command>
 
    reading      Get power related readings from the system
* Cipher 0 비활성화 (인증 우회 방지)
    get_limit    Get the configured power limits
* Cipher 3 또는 17 사용 (권장)
    set_limit    Set a power limit option
* 기본 비밀번호 반드시 변경
    activate      Activate the set power limit
* 고유한 강력한 비밀번호 사용
    deactivate    Deactivate the set power limit
* 익명 로그인 비활성화
* 이름 없는 계정 비활성화
* IPMI 트래픽 관리 VLAN으로 제한
* ipmievd 활성화하여 이벤트 syslog 전송
* 정기적인 SEL 확인
 
== Limitations ==
 
* IPMI v1.5는 보안 취약점 존재 (v2.0 권장)
* Cipher 0 비활성화 시 구형 장치 호환성 문제
* LAN 인터페이스 설정 오류 시 원격 관리 불가
* BMC 리셋 시 일시적 관리 중단
 
== References ==
 
* https://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface
* https://github.com/scottjg/ipmitool
* https://www.openbmc.org/
 
== Related Pages ==
 
* [[Cipher suite]]
* [[BIOS]]
* [[BIOS vs UEFI]]
* [[Linux]]
* [[OpenBMC]]
 
[[Category:Hardware]]
== Knowledge Graph ==
 
Related
 
→ [[BIOS]]
→ [[Server]]
→ [[OpenBMC]]
→ [[BMC]]


$ sudo ipmitool dcmi power reading
[[Category:Reference]]


    Instantaneous power reading:                  425 Watts
== Redfish ==
    Minimum during sampling period:                  0 Watts
    Maximum during sampling period:              1520 Watts
    Average power reading over sample period:      319 Watts
    IPMI timestamp:                          Thu Oct 31 01:30:54 2024
    Sampling period:                          00000005 Seconds.
    Power reading state is:                  activated
   
$ sudo ipmitool dcmi power get_limit


    Current Limit State: Power Limit Active
Redfish는 IPMI의 차세대 관리 프로토콜. RESTful API 기반. JSON 데이터 형식.
    Exception actions:  Hard Power Off & Log Event to SEL
    Power Limit:        500 Watts
    Correction time:    1000 milliseconds
    Sampling period:    5 seconds


<syntaxhighlight lang="bash">
# Redfish API 호출
curl -k -u admin:password https://bmc-ip/redfish/v1/Systems/1


# 시스템 상태 확인
curl -k -u admin:password https://bmc-ip/redfish/v1/Systems/1/Status


# 바이오스 설정 변경
curl -k -X PATCH -u admin:password \
  -H "Content-Type: application/json" \
  -d '{"ProcessorCoreCount": 16}' \
  https://bmc-ip/redfish/v1/Systems/1/Bios/Settings
</syntaxhighlight>
</syntaxhighlight>
|-
|nm
|Node Manager Interface
|
|-
|sunoem
|OEM Commands for Sun servers
|
|-
|kontronoem
|OEM Commands for Kontron devices
|
|-
|picmg
|Run a PICMG/ATCA extended cmd
|
|-
|fwum
|Update IPMC using Kontron OEM Firmware Update Manager
|
|-
|firewall
|Configure Firmware Firewall
|
|-
|delloem
|OEM Commands for Dell systems
|
|-
|shell
|Launch interactive IPMI shell
|
|-
|exec
|Run list of commands from file
|
|-
|set
|Set runtime variable for shell and exec
|
|-
|hpm
|Update HPM components using PICMG HPM.1 file
|
|-
|ekanalyzer
|run FRU-Ekeying analyzer using FRU files
|
|-
|ime
|Update Intel Manageability Engine Firmware
|
|-
|vita
|Run a VITA 46.11 extended cmd
|
|}


== References ==
== OpenBMC ==
<references />
 
OpenBMC은 리눅스 기반 BMC 운영체제. Redfish API, Web UI, D-Bus 인터페이스 제공.
 
<syntaxhighlight lang="bash">
# OpenBMC D-Bus 인터페이스
busctl call org.openbmc.control.Host /org/openbmc/control/host0 org.openbmc.control.Host Start
 
# 바이오스 설정 (D-Bus)
busctl get-property org.openbmc.settings.Bios /org/openbmc/settings/Bios org.freedesktop.DBus.Properties Properties
 
# OpenBMC Web UI
https://bmc-ip (Redfish API + Web 인터페이스)
</syntaxhighlight>

Latest revision as of 13:53, 2 October 2026

IPMI

Overview

IPMI(Intelligent Platform Management Interface)는 호스트 시스템의 CPU, 펌웨어(BIOS/UEFI), 운영체제와 독립적으로 작동하는 컴퓨터 인터페이스 사양입니다. 서버 관리 및 모니터링을 위한 자율적 서브시스템을 제공합니다.

Summary

  • 무엇인가? — 서버 관리용 자율적 서브시스템 사양 (BMC 기반)
  • 왜 필요한가? — OS 독립적 서버 모니터링, 원격 관리, 전원 제어
  • 언제 사용하는가? — 데이터센터 서버 관리, 원격 전원 제어, 센서 모니터링

Purpose

이 문서가 존재하는 이유

  • Goal: IPMI 기본 개념, ipmitool 사용법, 보안 설정, 실전 명령어 제공
  • Scope: IPMI 아키텍처, ipmitool 명령어, 보안(Cipher suite), LAN 설정, 센서 모니터링
  • Non-goals: BMC 펌웨어 업그레이드, OpenBMC 상세 개발 가이드는 별도 문서

Key Concepts

Concept Description Related
BMC Baseboard Management Controller — IPMI 핵심 하드웨어 IPMI
ipmitool IPMI 관리 유틸리티 (CLI) IPMI
In-band 호스트 OS를 통한 IPMI 접근 (KCS) IPMI
Out-band LAN을 통한 원격 IPMI 접근 (RMCP+) IPMI
Cipher Suite IPMI 인증/암호화 프로토콜 Cipher suite
SEL System Event Log — 이벤트 기록 IPMI
SOL Serial-over-LAN — 원격 콘솔 IPMI

Architecture

IPMI는 BMC(Baseboard Management Controller)를 핵심으로 하는 독립 서브시스템입니다:

graph TD
    A[IPMI Subsystem] --> B[BMC - Baseboard Management Controller]
    B --> C[In-band Interface]
    B --> D[Out-band Interface - LAN]
    C --> E[OpenIPMI Driver]
    C --> F[ipmitool - Local]
    D --> G[ipmitool - Remote]
    B --> H[Sensors - Temp/Fan/Voltage]
    B --> I[Power Control]
    B --> J[Event Log - SEL]

Workflow

Stage Input Output
Check Status ipmitool chassis status Power/Sensor status
Power Control ipmitool chassis power on/off Server power state change
Sensor Monitor ipmitool sdr list Temperature/Fan/Voltage readings
Remote Console ipmitool sol activate Serial-over-LAN session

Detailed Explanation

What is IPMI

IPMI는 호스트 시스템과 독립적으로 작동하는 서버 관리 인터페이스입니다. BMC(Baseboard Management Controller)가 핵심 구성 요소이며, OpenBMC은 Linux Foundation의 오픈소스 BMC 프로젝트입니다.

ipmitool Interface Types

  • open — Linux OpenIPMI Interface (기본값, in-band)
  • imb — Intel IMB Interface
  • lan — IPMI v1.5 LAN Interface (out-band)
  • lanplus — IPMI v2.0 RMCP+ LAN Interface (out-band, 권장)
  • free — FreeIPMI IPMI Interface
  • serial-terminal — Serial Interface, Terminal Mode
  • serial-basic — Serial Interface, Basic Mode
  • dummy — Linux DummyIPMI Interface
  • usb — IPMI USB Interface (AMI OEM)

IPMI Security

  • IPMI 트래픽은 신뢰할 수 있는 내부 네트워크로 제한
  • 관리 VLAN 세그먼트에서 강력한 네트워크 제어 적용
  • 기본 비밀번호는 반드시 강력한 비밀번호로 변경
  • 각 IPMI 서비스는 고유한 강력한 비밀번호 설정

Cipher Suite

  • Cipher 0 — 인증 우회 가능 (비활성화 권장)
  • Cipher 3 — 기본 옵션 (RAKP-HMAC-SHA1, AES-CBC-128)
  • Cipher 17 — 고급 보안 (RAKP-HMAC-SHA256, AES-CBC-128)

추가 보안 조치:

  • 익명 로그인 비활성화
  • 이름 없는 계정 비활성화
  • 강력한 비밀번호 사용

IPMI Commands

Command Description Notes
raw RAW IPMI 요청 전송 —
i2c I2C Master Write-Read —
lan LAN 채널 설정 IPv4 설정 포함
lan6 IPv6 LAN 채널 설정 —
chassis chassis 상태 및 전원 제어 power on/off/cycle/policy
power 전원 명령어 단축 chassis power 대체
event 사전 정의된 이벤트 전송 —
mc Management Controller 상태 mc info/reset
sdr Sensor Data Repository sdr list/type
sensor 상세 센서 정보 —
fru FRU 정보 출력 fru print
sel System Event Log sel list/clear/elist
pef Platform Event Filtering —
sol Serial-over-LAN activate/deactivate
user Management Controller 사용자 user list/set name/password
channel Management Controller 채널 —
session 세션 정보 출력 —
dcmi Data Center Management Interface power reading/get_limit/set_limit

IPMI Usage Examples

LAN 설정

# 현재 LAN 설정 확인
$ sudo ipmitool lan print
$ sudo ipmitool lan6 print

# IPv4 설정
$ sudo ipmitool lan set 1 ipaddr <BMC_IP>
$ sudo ipmitool lan set 1 netmask <Subnet_Mask>
$ sudo ipmitool lan set 1 snmp <SNMP>
$ sudo ipmitool lan set 1 defgw ipaddr <Gateway>

Cipher Suite 변경

# 현재 Cipher Suite 확인
$ sudo ipmitool lan print

# Cipher 3만 활성화
$ sudo ipmitool lan set 1 cipher_privs XXXaXXXXXXXXXXX

# Cipher 3과 17 활성화
$ sudo ipmitool lan set 1 cipher_privs XXaXXXXXXXaXXXX

전원 제어

# 시스템 상태 확인
$ sudo ipmitool chassis status

# 전원 켜기
$ sudo ipmitool chassis power on

# 정상 종료
$ sudo ipmitool chassis power soft

# 즉시 전원 끄기
$ sudo ipmitool chassis power off

# 전원 사이클 (재부팅)
$ sudo ipmitool chassis power cycle

# 전원 복구 정책 설정
$ sudo ipmitool chassis policy always-on

# 다음 부팅 장치 설정
$ sudo ipmitool chassis bootdev pxe
$ sudo ipmitool chassis bootdev cdrom
$ sudo ipmitool chassis bootdev bios

센서 모니터링

# 모든 센서 목록
$ sudo ipmitool sdr list

# 센서 타입별 목록
$ sudo ipmitool sdr type Temperature
$ sudo ipmitool sdr type Fan
$ sudo ipmitool sdr type 'Power Supply'

# 상세 센서 정보
$ sudo ipmitool sensor

System Event Log (SEL)

# SEL 정보 확인
$ sudo ipmitool sel info

# SEL 목록
$ sudo ipmitool sel list

# 확장 목록
$ sudo ipmitool sel elist

# SEL 초기화
$ sudo ipmitool sel clear

Serial-over-LAN (SOL)

# SOL 활성화
$ sudo ipmitool sol activate

# SOL 비활성화
$ sudo ipmitool sol deactivate

# 재시도 간격 설정
$ sudo ipmitool sol set retry-interval value

사용자 관리

# 사용자 목록
$ sudo ipmitool user list 1

# 사용자 이름 설정
$ sudo ipmitool user set name 2 <New_Name>

# 비밀번호 설정
$ sudo ipmitool user set password 2 <New_Password>

# 익명 사용자 비밀번호 설정
$ sudo ipmitool lan set 1 password <New_Password>

# 사용자 삭제 (이름 비우기)
$ sudo ipmitool user set name <ID> ""

DCMI (Data Center Management Interface)

# 전력 정보 확인
$ sudo ipmitool dcmi power reading

# 전력 제한 확인
$ sudo ipmitool dcmi power get_limit

# 전력 제한 설정
$ sudo ipmitool dcmi power set_limit

ipmievd (IPMI Event Daemon)

# ipmievd 활성화
$ sudo systemctl enable ipmievd

# ipmievd 시작
$ sudo systemctl start ipmievd

# ipmievd 상태 확인
$ sudo systemctl status ipmievd

Configuration

# BMC 정보 확인
$ sudo ipmitool mc info

# BMC 리셋
$ sudo ipmitool mc reset [warm | cold]

# LAN 설정
$ sudo ipmitool lan set 1 ipaddr <BMC_IP>
$ sudo ipmitool lan set 1 netmask <Subnet_Mask>
$ sudo ipmitool lan set 1 defgw ipaddr <Gateway>

# Cipher Suite 설정 (Cipher 3만)
$ sudo ipmitool lan set 1 cipher_privs XXXaXXXXXXXXXXX

# 사용자 설정
$ sudo ipmitool user set name 2 admin
$ sudo ipmitool user set password 2 <Strong_Password>

Examples

Example 1: 원격 서버 전원 제어

# 원격 서버 상태 확인
$ sudo ipmitool -I lanplus -H <BMC_IP> -U <username> -P <password> chassis status

# 원격 서버 전원 켜기
$ sudo ipmitool -I lanplus -H <BMC_IP> -U <username> -P <password> chassis power on

# 원격 서버 전원 끄기
$ sudo ipmitool -I lanplus -H <BMC_IP> -U <username> -P <password> chassis power off

Example 2: 센서 모니터링

# 모든 센서 확인
$ sudo ipmitool sdr list

# 온도 센서만 확인
$ sudo ipmitool sdr type Temperature

# 상세 센서 정보
$ sudo ipmitool sensor

Best Practices

  • Cipher 0 비활성화 (인증 우회 방지)
  • Cipher 3 또는 17 사용 (권장)
  • 기본 비밀번호 반드시 변경
  • 고유한 강력한 비밀번호 사용
  • 익명 로그인 비활성화
  • 이름 없는 계정 비활성화
  • IPMI 트래픽 관리 VLAN으로 제한
  • ipmievd 활성화하여 이벤트 syslog 전송
  • 정기적인 SEL 확인

Limitations

  • IPMI v1.5는 보안 취약점 존재 (v2.0 권장)
  • Cipher 0 비활성화 시 구형 장치 호환성 문제
  • LAN 인터페이스 설정 오류 시 원격 관리 불가
  • BMC 리셋 시 일시적 관리 중단

References

Related Pages

Knowledge Graph

Related

→ BIOS → Server → OpenBMC → BMC

Redfish

Redfish는 IPMI의 차세대 관리 프로토콜. RESTful API 기반. JSON 데이터 형식.

# Redfish API 호출
curl -k -u admin:password https://bmc-ip/redfish/v1/Systems/1

# 시스템 상태 확인
curl -k -u admin:password https://bmc-ip/redfish/v1/Systems/1/Status

# 바이오스 설정 변경
curl -k -X PATCH -u admin:password \
  -H "Content-Type: application/json" \
  -d '{"ProcessorCoreCount": 16}' \
  https://bmc-ip/redfish/v1/Systems/1/Bios/Settings

OpenBMC

OpenBMC은 리눅스 기반 BMC 운영체제. Redfish API, Web UI, D-Bus 인터페이스 제공.

# OpenBMC D-Bus 인터페이스
busctl call org.openbmc.control.Host /org/openbmc/control/host0 org.openbmc.control.Host Start

# 바이오스 설정 (D-Bus)
busctl get-property org.openbmc.settings.Bios /org/openbmc/settings/Bios org.freedesktop.DBus.Properties Properties

# OpenBMC Web UI
https://bmc-ip (Redfish API + Web 인터페이스)