设置IPMI ip 地址
# ipmitool lan set 1 ipsrc dhcp
# ipmitool lan print 1
# ipmitool lan set 1 ipsrc static
# ipmitool lan set 1 ipaddress 192.168.100.200 Setting LAN IP Address to 192.168.100.200
# ipmitool lan set 1 netmask 255.255.255.0 Setting LAN Subnet Mask to 255.255.255.0
# ipmitool lan set 1 defgw ipaddr 192.168.100.254 Setting LAN Default Gateway IP to 192.168.100.254
# ipmitool lan print 1
命令说明
使用静态地址:ipmitool lan set <channel_no> ipsrc static
使用动态地址:ipmitool lan set <channel_no> ipsrc dhcp
设置IP:ipmitool lan set <channel_no> ipaddr <x.x.x.x>
设置掩码:ipmitool lan set <channel_no> netmask <x.x.x.x>
设置网关:ipmitool lan set <channel_no> defgw ipaddr <x.x.x.x>
本地操作 -I open 表示接口本地:ipmitool -I open lan print 1
操作远程机器 -I lan 表示接口远程:ipmitool -I lan -H 192.168.100.201 -U ADMIN -P ADMIN lan print 1
改变服务器引导方式
ipmitool -I lan -H 192.168.100.200 -U ADMIN -P ADMIN chassis bootdev pxe ipmitool -I lan -H 192.168.100.200 -U ADMIN -P ADMIN chassis bootdev disk ipmitool -I lan -H 192.168.100.200 -U ADMIN -P ADMIN chassis bootdev cdrom
服务器电源管理
ipmitool -I lan -H 192.168.100.200 -U ADMIN -P ADMIN chassis power off
ipmitool -I lan -H 192.168.100.200 -U ADMIN -P ADMIN chassis power reset ipmitool -I lan -H 192.168.100.200 -U ADMIN -P ADMIN chassis power on
ipmitool -I lan -H 192.168.100.200 -U ADMIN -P ADMIN chassis power status