因在项目中存在不严格按照文档操作且不留痕等原因,导致统计服务器IPMI管理口设置混乱,地址信息更新不及时。

安装ipmitool

># yum install -y ipmitool
加载需要的模块

新安装命令时ipmi相关模块可能没有加载,需要手动加载或重启系统。

># modprobe ipmi_watchdog
># modprobe ipmi_poweroff
># modprobe ipmi_devintf
查看模块加载
># lsmod | grep -i ipmi
ipmi_si                59965  0 
ipmi_devintf           17459  0 
ipmi_msghandler        56728  2 ipmi_devintf,ipmi_si

配置ipmi网卡

查看网口信息

默认是1,根据实际情况选择。

># ipmitool lan print 2
Set in Progress         : Set Complete
Auth Type Support       : NONE MD2 MD5 PASSWORD 
Auth Type Enable        : Callback : MD5 
                        : User     : MD5 
                        : Operator : MD5 
                        : Admin    : MD5 
                        : OEM      : 
IP Address Source       : Static Address
IP Address              : 128.0.0.10
Subnet Mask             : 255.255.0.0
MAC Address             : xx:xx:xx:xx:xx:xx
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   : 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     : 
Cipher Suite Priv Max   : caaaaaaaaaaaXXX
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM
Bad Password Threshold  : 0
Invalid password disable: no
Attempt Count Reset Int.: 0
User Lockout Interval   : 0
配置IP

IP地址不可与其他网卡重复

ipmitool lan set 1 ipaddr 10.8.68.22
配置网关
ipmitool lan set 1 defgw ipaddr 10.8.68.1
配置子网掩码
ipmitool lan set 1 netmask 255.255.255.0

配置用户信息

查看用户信息

根据ID进行设置

[root@localhost ~]# ipmitool user list 1
ID  Name         Callin  Link Auth    IPMI Msg   Channel Priv Limit
1                    false   false      true       ADMINISTRATOR
2   zteroot          false   false      true       ADMINISTRATOR
修改用户名
ipmitool user set name 2 root
配置密码
ipmitool user set password 2 111111
END

本文标题:在Centos系统下使用ipmitool命令配置IPMI管理口信息

本文作者:宇宙最帅的男人

本文链接:https://lolicp.com/linux/202209466.html

版权声明:转载或者引用本文内容请注明来源及原作者,本文著作权归作者 (宇宙最帅的男人) 所有。

除非另有说明,本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议

最后修改:2022 年 12 月 01 日
如果觉得我的文章对你有用,请随意赞赏