IPMI 接口配置
bios配置ipmi
- IPMI接口和RJ45的網口外觀上一樣,一般主板上帶有的IPMI接口會和網卡分開放置,具體區分還要看主板的Specification,下面紅色部分的即為IPMI接口
- 找到IPMI接口后,我們要接上一根網線。然后開機點亮,按F2或者DEL進入BIOS,具體按那個按鈕看開機提示,例如我的這台機器需要按F2進入BIOS
- 進入BIOS之后,選擇Server Mgmt菜單,如圖所示
- 進入Server Mgmt菜單之后選擇BMC network configuration
- 選中BMC network configuration后按Enter鍵進入,會有如下顯示
- 在Configuration Address source選項選擇Static(意思即為配置靜態的IPMI地址,當然啦如果有配置DHCP服務,此項也可以選擇DHCP)
選中Station IP Address選項按enter鍵輸入IP地址,eg 192.168.124.46
選中Subnet mask選項按enter鍵輸入子網掩碼,eg 255.255.255.0
選中Router IP Address 選項按enter鍵輸入網關 ,eg 192.168.124.254
以上具體地址配置要根據你們自己實際的網絡環境,配置好之后如下圖 - 配置好之后按F10保存退出。(注意不同品牌的機器保存的按鈕不同,具體看BIOS的說明)
- 然后我們打開瀏覽器輸入剛才配置的IP地址192.168.124.46,按Enter時候會需要輸入用戶名,密碼。這里需要說明一下不同品牌的機器默認的IPMI用戶名密碼是不一樣的,比如說Gigabyte用戶名是admin,密碼是password.
不知道密碼? 忘記了 怎么辦?
#安裝ipmi工具
[root@xi01 ~]# yum install ipmitool -y
# 設置ipmi用戶
[root@xi03 ~]# ipmitool user set name 2 admin
[root@xi03 ~]# ipmitool user set password 2 admin
Set User Password command successful (user 2)
- 輸入過用戶名密碼之后,我們就可以遠程監控系統的溫度,遠程開關機等等操作。
Linux下使用命令行配置IPMI
1.BIOS配置,這個簡單,直接開機進BIOS,在進階選項里配置IPMI的IP,掩碼,網關。
2.開機過程中,按照提示,按ctrl + E 進入IPMI的配置界面,沒有拍照,上不了圖。那些選項,自己看着就懂了。
3.在linux下配置,
檢查
查看內核是否支持ipmi
# lsmod |grep ipmi
[root@xi03 ~]# lsmod |grep ipmi
ipmi_si 59571 0
ipmi_devintf 17603 0
ipmi_msghandler 56032 2 ipmi_devintf,ipmi_si
如果什么也沒有顯示,說明沒有加載模塊兒。
需要執行命令加載模塊。
# modprobe ipmi_msghandler
# modprobe ipmi_devintf
# modprobe ipmi_si
3.1安裝 ipmitool yum install -y ipmitool
3.2 配置IP的獲取方式 IP 掩碼 網關
ipmitool lan set 1 ipsrc static | dhcp
ipmitool lan set 1 ipaddr 192.168.1.2
ipmitool lan set 1 netmask 255.255.255.0
ipmitool lan set 1 defgw 192.168.1.254
3.3查看IPMI配置
ipmitool lan print 1 (1可以不加,默認顯示channel 1的配置)
[root@xi03 ~]# ipmitool lan print 1
Set in Progress : Set Complete
Auth Type Support : NONE MD2 MD5 PASSWORD
Auth Type Enable : Callback : NONE MD2 MD5 PASSWORD
: User : NONE MD2 MD5 PASSWORD
: Operator : NONE MD2 MD5 PASSWORD
: Admin : NONE MD2 MD5 PASSWORD
: OEM :
IP Address Source : Static Address
IP Address : 192.168.12.201
Subnet Mask : 255.255.252.0
MAC Address : 00:8c:fa:05:01:ce
SNMP Community String : AMI
IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control : ARP Responses Enabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl : 0.0 seconds
Default Gateway IP : 192.168.12.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 : 0,1,2,3,6,7,8,11,12
Cipher Suite Priv Max : caaaXXaaaXXaaXX
: X=Cipher Suite Unused
: c=CALLBACK
: u=USER
: o=OPERATOR
: a=ADMIN
: O=OEM
Bad Password Threshold : 0
Invalid password disable: yes
Attempt Count Reset Int.: 0
User Lockout Interval : 0
# 查看用戶列表
[root@xi03 ~]# ipmitool user list 1
ID Name Callin Link Auth IPMI Msg Channel Priv Limit
1 false false true USER
2 admin false false true ADMINISTRATOR
3 Admin true true true ADMINISTRATOR
4 administrator false false true ADMINISTRATOR
5 admin true true true ADMINISTRATOR
6 true false false NO ACCESS
7 true false false NO ACCESS
8 true false false NO ACCESS
9 true false false ADMINISTRATOR
10 true false false NO ACCESS
關於channel,大多數服務器默認只啟用channel 1,可有的服務器默認是有兩個channel的,比如inspur服務器,它默認有兩個channel 1 和 channel 3,當你只需用一個channel時,你必須把其中一個channel禁掉,否則可能會影響正常使用。