IPMI(Intelligent Platform Management Interface)란 지능형 플랫폼관리 인터페이스이다.
이는 플랫폼에 대한 관리 인터페이스로 OS 이전 창치들에 대한 관려 인터페이스를 나타낸다.
OpenIPMI는 레드헷을 비롯하여 데비안 등의 거의 대부분의 배포판 리눅스에서 기본적으로 설치되는 리눅스 패키지 중의 하나이다.
로컬시스템뿐만 아니라 원격지의 장비에 대해서도 상태확인 및 동작이 가능하다.
소스컴파일로도 설치가 가능하며 손쉽게 yum 패키지를 통해서 가능하다.
[root@chonnom ~]# yum -y install OpenIPMI-tools Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: centos.mirror.cdnetworks.com * base: centos.mirror.cdnetworks.com * extras: centos.mirror.cdnetworks.com * updates: centos.mirror.cdnetworks.com Setting up Install Process Resolving Dependencies There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them. The program yum-complete-transaction is found in the yum-utils package. --> Running transaction check ---> Package OpenIPMI-tools.i386 0:2.0.16-7.el5 set to be updated --> Finished Dependency Resolution
Dependencies Resolved
================================================================================================= Package Arch Version Repository Size ================================================================================================= Installing: OpenIPMI-tools i386 2.0.16-7.el5 base 402 k
Transaction Summary ================================================================================================= Install 1 Package(s) Upgrade 0 Package(s)
Total download size: 402 k Downloading Packages: OpenIPMI-tools-2.0.16-7.el5.i386.rpm | 402 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : OpenIPMI 1/1
Installed: OpenIPMI-tools.i386 0:2.0.16-7.el5
Complete! |
※ 커널을 컴파일을 해서 사용하는 경우에는 config 옵션확인
*
* IPMI top-level message handler * IPMI top-level message handler (IPMI_HANDLER) [M/n/y/?] m Generate a panic event to all BMCs on a panic (IPMI_PANIC_EVENT) [N/y/?] (NEW) y Generate OEM events containing the panic string (IPMI_PANIC_STRING) [N/y/?] (NEW) y Device interface for IPMI (IPMI_DEVICE_INTERFACE) [N/m/?] (NEW) m IPMI System Interface handler (IPMI_SI) [N/m/?] (NEW) m IPMI Watchdog Timer (IPMI_WATCHDOG) [N/m/?] (NEW) m IPMI Poweroff (IPMI_POWEROFF) [N/m/?] (NEW) m |
필요조건
IPMI over LAN을 사용하기 위해서는 아래의 몇 가지 조건을 만족하여야 한다.
서버용 보드가 아닌 일반보드에는 아직도 지원되지 않는게 많다.
1. IPMI version 1.5 이상을 지원하는 Hardware Platform(메인보드)
2. Serial Over LAN 기능을 사용하기 위한 RMCP+ protocol이 지원되는 Hardware Platform.
3. SMBUS를 통해 BMC와 통신하기 위한 UDP 623 port의 개방.
※ BMC : Baseboard Management Controllers. IPMI compliant micro controllers that handle system event management. These are usually available as cPCI cards.
메인보드 지원여부확인
[root@chonnom linux]# dmidecode |more
.........................................................
.........................................................
.........................................................
Handle 0x001A, DMI type 38, 18 bytes IPMI Device Information Interface Type: Unknown Specification Version: 1.5 I2C Slave Address: 0x00 NV Storage Device: Not Present Base Address: 0x0000000000000CA8 (I/O) Register Spacing: Successive Byte Boundaries
Handle 0x001B, DMI type 127, 4 bytes End Of Table |
원격지 네트워크 설정
로컬에서 로컬장비를 컨트롤하는건 별로 무의미한거 같고 원격지 서버를 컨트롤 하기위한 조건을 살펴본다.
원격지를 접속하기 이전에 원격지 서버 메인보드에 아이피를 설정하는데 실제 서버하고는 별도로 생성한다.
아래 빨간색 부분을 보면 아직 네트워크가 미설정되어있는 상태이다.
[root@chonnom ]# ipmitool lan print 1 Set in Progress : Set Complete Auth Type Support : NONE MD2 MD5 OEM Auth Type Enable : Callback : NONE MD2 MD5 OEM : User : NONE MD2 MD5 OEM : Operator : NONE MD2 MD5 OEM : Admin : NONE MD2 MD5 OEM : OEM : IP Address Source : DHCP Address IP Address : 0.0.0.0 Subnet Mask : 0.0.0.0 MAC Address : 00:e0:81:b9:18:c3 SNMP Community String : AMI IP Header : TTL=0x00 Flags=0x00 Precedence=0x00 TOS=0x00 BMC ARP Control : ARP Responses Disabled, Gratuitous ARP Disabled Gratituous ARP Intrvl : 0.0 seconds Default Gateway IP : 0.0.0.0 Default Gateway MAC : 00:00:00:00:00:00 Backup Gateway IP : 0.0.0.0 Backup Gateway MAC : 00:00:00:00:00:00 802.1q VLAN ID : Disabled 802.1q VLAN Priority : 0 RMCP+ Cipher Suites : 1,2,3,6,7,8,11,12,0,0,0,0,0,0,0,0 Cipher Suite Priv Max : aaaaXXaaaXXaaXX : X=Cipher Suite Unused : c=CALLBACK : u=USER : o=OPERATOR : a=ADMIN : O=OEM
# dhcp 설정을 static 으로 변경
[root@waf ~]# ipmitool lan set 1 ipsrc static
# ipaddress 설정
[root@waf ~]# ipmitool lan set 1 ipaddr 192.168.39.15 Setting LAN IP Address to 192.168.39.15
# netmask 설정
[root@waf ~]# ipmitool lan set 1 netmask 255.255.255.224
# default gateway 설정
[root@waf ~]# ipmitool lan set 1 defgw ipaddr 192.168.39.1 Setting LAN Default Gateway IP to 192.168.39.1
# 설정값 확인
[root@waf ~]# ipmitool lan print 1 Set in Progress : Set Complete Auth Type Support : NONE MD2 MD5 OEM Auth Type Enable : Callback : NONE MD2 MD5 OEM : User : NONE MD2 MD5 OEM : Operator : NONE MD2 MD5 OEM : Admin : NONE MD2 MD5 OEM : OEM : IP Address Source : Static Address IP Address : 192.168.39.15 Subnet Mask : 255.255.255.224 MAC Address : 00:e0:81:b9:18:c3 SNMP Community String : AMI IP Header : TTL=0x00 Flags=0x00 Precedence=0x00 TOS=0x00 BMC ARP Control : ARP Responses Disabled, Gratuitous ARP Disabled Gratituous ARP Intrvl : 0.0 seconds Default Gateway IP : 192.168.39.1 Default Gateway MAC : 00:00:00:00:00:00 Backup Gateway IP : 0.0.0.0 Backup Gateway MAC : 00:00:00:00:00:00 802.1q VLAN ID : Disabled 802.1q VLAN Priority : 0 RMCP+ Cipher Suites : 1,2,3,6,7,8,11,12,0,0,0,0,0,0,0,0 Cipher Suite Priv Max : aaaaXXaaaXXaaXX : X=Cipher Suite Unused : c=CALLBACK : u=USER : o=OPERATOR : a=ADMIN : O=OEM |
이로써 네트워크 설정은 끝이났다.
ping 으로 네트워크 여부를 확인해보면 된다.
원격에서 접속하기 위한 유저생성
# default 유저리스트
[root@waf ~]# ipmitool user list 1 ID Name Enabled Callin Link Auth IPMI Msg Channel Priv Limit 1 true false false true ADMINISTRATOR 2 root true false false true ADMINISTRATOR
# 유저생성 (ID 3으로 smileserv 유저생성) set name <user id> <username>
[root@waf ~]# ipmitool user set name 3 smileserv
# ID 3 유저에 패스워드 생성 set password <user id> [<password>]
[root@waf ~]# ipmitool user set password 3 xxxxxxxxxx
# 추가한 유저확인
[root@waf ~]# ipmitool user list 1 ID Name Enabled Callin Link Auth IPMI Msg Channel Priv Limit 1 true false false true ADMINISTRATOR 2 root true false false true ADMINISTRATOR 3 smileserv false true false false NO ACCESS
# 권한 생성 ipmitool user priv <user id> <privilege level> [<channel number>]
[root@waf ~]# ipmitool user priv 3 4 1
[root@waf ~]# ipmitool user list 1 ID Name Enabled Callin Link Auth IPMI Msg Channel Priv Limit 1 true false false true ADMINISTRATOR 2 root true false false true ADMINISTRATOR 3 smileserv true true false true ADMINISTRATOR |
Privilege Level |
Description |
3 |
Operator: can manage the server but not add or delete new users (서버를 관리할수는 있지만 사용자를 추가하거나 삭제할수 없음) |
4 |
Administrator: has full IPMI privileges (모든권한) |
원격에서 제어하기
[root@chonnom_remote ]# ipmitool -I lan -H 192.168.39.15 -U smileserv power status Password: Chassis Power is on
[root@Bridge kernel]# ipmitool -I lan -H 192.168.39.15 -U smileserv power off Password: Chassis Power Control: Down/Off |