IPMI Konfiguration unter Linux mittels ipmitool

Aus Wiki Thomas-Krenn.AG

Wechseln zu: Navigation, Suche

Unter Linux kann der Befehl ipmitool (http://ipmitool.sourceforge.net/) unter anderem zur IPMI Konfiguration eines Servers verwendet werden.

Hardware und Software Voraussetzungen

Das folgende Beispiel zeigt die Konfiguration von IPMI auf einem Linux-Server. Damit die Konfiguration durchgeführt werden kann, muss das Devicefile /dev/ipmi0 vorhanden sein. Falls dieses noch nicht vorhanden ist, können Sie es wie folgt erstellen:

  • unter SuSE/Red Hat/CentOS: /etc/init.d/ipmi start (erfordert das Package OpenIPMI)
  • unter Debian: /usr/share/ipmitool/ipmi.init.basic (Falls hierbei eine Fehlermeldung kommt ipmi_kcs_drv not found müssen Sie die entsprechende if-Abfrage im Script auskommentieren, siehe auch [1])

Die unten beschriebene Vorgehensweise wurde auf einem Intel SR2500 unter CentOS 4 mit ipmitool version 1.8.7 getestet. Grundsätzlich sollte die Konfiguration auf anderen Systemen mit IPMI Unterstützung ähnlich funktionieren.

LAN Konfiguration

Hier wird der erste IPMI LAN channel konfiguriert - somit ist die konfigurierte IP Adresse am ersten LAN Port des Servers erreichbar. Für das Standardgateway muss neben der IP Adresse des Gateways auch dessen MAC Adresse konfiguriert werden.

[root@sr2500 ~]# ipmitool lan set 1 ipsrc static
[root@sr2500 ~]# ipmitool lan set 1 ipaddr 192.168.1.211
Setting LAN IP Address to 192.168.1.211
[root@sr2500 ~]# ipmitool lan set 1 netmask 255.255.255.0
Setting LAN Subnet Mask to 255.255.255.0
[root@sr2500 ~]# ipmitool lan set 1 defgw ipaddr 192.168.1.254
Setting LAN Default Gateway IP to 192.168.1.254
[root@sr2500 ~]# ipmitool lan set 1 defgw macaddr 00:0e:0c:aa:8e:13
Setting LAN Default Gateway MAC to 00:0e:0c:aa:8e:13
[root@sr2500 ~]# ipmitool lan set 1 arp respond on
Enabling BMC-generated ARP responses
[root@sr2500 ~]# ipmitool lan set 1 auth ADMIN MD5

Bei der LAN-Konfiguration wird Set in Progress nicht automatisch auf Set Complete gesetzt. Dies kann manuell über ein raw-Kommando gemacht werden (siehe dazu auch http://www.mail-archive.com/ipmitool-devel@lists.sourceforge.net/msg00095.html)

[root@sr2500 ~]# ipmitool lan print 1
Set in Progress         : Set In Progress
[...]
[root@sr2500 ~]# ipmitool raw 0x0c 1 1 0 0

[root@sr2500 ~]# ipmitool lan print 1
Set in Progress         : Set Complete
Auth Type Support       : NONE MD5 PASSWORD 
Auth Type Enable        : Callback : 
                        : User     : 
                        : Operator : 
                        : Admin    : MD5 
                        : OEM      : 
IP Address Source       : Static Address
IP Address              : 192.168.1.211
Subnet Mask             : 255.255.255.0
MAC Address             : 00:0e:0c:ea:92:a2
SNMP Community String   : 
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control         : ARP Responses Enabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl   : 2.0 seconds
Default Gateway IP      : 192.168.1.254
Default Gateway MAC     : 00:0e:0c:aa:8e:13
Backup Gateway IP       : 0.0.0.0
Backup Gateway MAC      : 00:00:00:00:00:00
RMCP+ Cipher Suites     : None
Cipher Suite Priv Max   : XXXXXXXXXXXXXXX
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM
[root@sr2500 ~]# 

Benutzer Konfiguration

Nun wird noch ein Benutzer eingerichet.

[root@sr2500 ~]# ipmitool user set name 2 admin
[root@sr2500 ~]# ipmitool user set password 2
Password for user 2: 
Password for user 2: 
[root@sr2500 ~]# ipmitool channel setaccess 1 2 link=on ipmi=on privilege=4
[root@sr2500 ~]# ipmitool user enable 2
[root@sr2500 ~]# 

Der Server kann nun remote gesteuert werden, wie in Ipmitool zur Remotesteuerung von Server nutzen beschrieben.

Persönliche Werkzeuge