IPMI 「Unable to establish IPMI v2 / RMCP+ session」


1.現象網絡

IPMI lan 接口沒法訪問,具體以下面命令執行後出現的錯誤提示:session

[root@localhost ~]#   ipmitool -I lanplus -H 10.10.77.48 -U ADMIN -P ADMIN sel listless

Error: Unable to establish IPMI v2 / RMCP+ sessionide

Get SEL Info command failed測試

You have new mail in /var/spool/mail/root接口

登陸到10.10.77.48上去檢查下,在本地經過KCS接口執行的狀況,發現都成功:ip

[root@localhost ~]# ipmitool user listit

ID Name             Callin  Link Auth  IPMI Msg   Channel Priv Limitio

2  ADMIN            true    false      false      Unknown (0x00)class

You have new mail in /var/spool/mail/root

[root@localhost ~]# ipmitool user list 1

ID Name             Callin  Link Auth  IPMI Msg   Channel Priv Limit

2  ADMIN            false   false      true       ADMINISTRATOR

[root@localhost ~]# ipmitool -I lanplus -H 10.10.77.48 -U ADMIN -P ADMIN sel list

1 | 08/03/2017 | 17:26:02 | Unknown #0xff |  | Asserted

2 | 08/03/2017 | 17:26:38 | Power Supply #0xc8 | Power Supply AC lost | Asserted

3 | 08/03/2017 | 17:30:38 | Unknown #0xff |  | Asserted

4 | 08/03/2017 | 17:31:13 | Power Supply #0xc8 | Power Supply AC lost | Asserted

5 | 08/03/2017 | 17:43:33 | Unknown #0xff |  | Asserted

You have new mail in /var/spool/mail/root



2解決過程

2.1和正確配置、能訪問的比較網絡:都OK

2.2檢查用戶並刪去不用的用戶

2.3獲得LAN interface的channel編號

2.4受權用戶經過這個channel能夠登陸

2.5測試。

前面兩步直接執行相應的命令就行了,咱們從第三步開始看具體怎麼執行。能夠看到'ipmitool channel info」 在此種模式下顯示默認的KCS channel:

[root@localhost ~]# 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

但咱們是不的是LAN interface,繼續往下逐一測試,找到Lan interface對應的channel ID:

[root@localhost ~]# 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    : enabled

User Level Auth     : enabled

Access Mode         : always available

Non-Volatile Settings

Alerting           : enabled

Per-message Auth    : enabled

User Level Auth     : enabled

Access Mode         : always available

經過上面命令能夠看到, LAN interface對應的channel ID 爲1,由於只有它的Medium Type   是 802.3 LAN。

2.2向LAN channel  添加用戶:

很容易犯錯的地方出如今這裏,覺得下面的命令列出的頁是Lan channel 看到的用戶。

[root@localhost ~]# ipmitool user list

ID Name             Callin  Link Auth  IPMI Msg   Channel Priv Limit

2  ADMIN            true    false      false      Unknown (0x00)

3                   true    true       true       OPERATOR

4                   true    true       true       OPERATOR

其實否則,上面默認看到是被受權使用KCS channel的用戶,要查看Lan channel的用戶信息,要用下面的命令:

[root@localhost ~]# ipmitool user list 1

ID Name             Callin  Link Auth  IPMI Msg   Channel Priv Limit

2  ADMIN            true    false      true       ADMINISTRATOR

而後添加權限:

[root@localhost ~]# ipmitool user enable 2

[root@localhost ~]# ipmitool user priv 2 4 1

[root@localhost ~]# ipmitool user set name ADMIN

本地測試經過,經過LAN interface 遠程登陸也經過:

[root@localhost ~]# ipmitool user set password 2 ADMIN

[root@localhost ~]# ipmitool user test 2 16

Password for user 2:

Success

You have new mail in /var/spool/mail/root

[root@localhost ~]# ipmitool user test 2 20

Password for user 2:

Set User Password command failed (user 2): Unknown (0x80)

Failure: password incorrect

[root@localhost ~]# ipmitool user test 2 20

Password for user 2:

Success



3.總結

使用IPMI命令管理用戶、通道、權限的時候,務必理解用戶權限管理是基於通道的,同一個用戶能夠被受權使用某個通道而被禁止使用其餘通道。

相關文章
相關標籤/搜索