ipmitool lan set 1 ipsrc static
ipmitool lan set 1 ipaddr 192.168.1.211
ipmitool lan set 1 netmask 255.255.255.0
ipmitool lan set 1 defgw ipaddr 192.168.1.254
ipmitool lan set 1 defgw macaddr 00:0e:0c:aa:8e:13
ipmitool lan set 1 arp respond on
ipmitool lan set 1 auth ADMIN MD5
ipmitool lan set 1 access on
检查配置
ipmitool lan print 1
用户配置
用户需要具有admin权限
ipmitool user set name 2 admin
出现报错:
Set User Name command failed (user 2, name admin): Invalid data field in request
这是因为系统已经设置了一些帐号,已经占用了2这个序列号,并且已经设置为名字admin
可以通过以下命令检查系统中已经具有的帐号
ipmitool user list 1
这里1表示channel 1
显示输出
ID Name Callin Link Auth IPMI Msg Channel Priv Limit
1 false false true ADMINISTRATOR
2 admin false false true ADMINISTRATOR
3 tom true true true ADMINISTRATOR
4 jerry true true true ADMINISTRATOR
所以我们将命令修改成
ipmitool user set name 5 jack
此时再次检查ipmitool user list 1就会看到
ID Name Callin Link Auth IPMI Msg Channel Priv Limit
1 false false true ADMINISTRATOR
2 admin false false true ADMINISTRATOR
3 tom true true true ADMINISTRATOR
4 jerry true true true ADMINISTRATOR
5 jack true false false NO ACCESS
ipmitool user set name 6 monitor
ipmitool user set password 6
ipmitool channel setaccess 1 6 link=on ipmi=on callin=on privilege=2
ipmitool user enable 6
然后检查一下用户权限
ipmitool channel getaccess 1 6
显示输出如下:
Maximum User IDs : 10
Enabled User IDs : 4
User ID : 6
User Name : monitor
Fixed Name : No
Access Available : call-in / callback
Link Authentication : enabled
IPMI Messaging : enabled
Privilege Level : USER
查看访问权限对应的level,使用如下命令
ipmitool channel
可以看到输出:
Possible privilege levels are:
1 Callback level
2 User level
3 Operator level
4 Administrator level
5 OEM Proprietary level
15 No access