Bootstrap

ipmitool 设置网关_ipmitool操作IPMI配置

* 文档转自 https://wiki2.xbits.net:4430/linux:ipmi:ipmitool

## 1. 安装

```

yum install ipmitool

```

* 问题

执行ipmitool 的时候,出现找不到模块的错误,如下:

```

Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory

```

* 解决

```

modprobe ipmi_devintf

modprobe ipmi_si

cat >> /etc/modules << EOF

ipmi_devintf

ipmi_si

EOF

```

## 2. 常用命名操作

* 网络配置

```

查看LAN配置

ipmitool lan print

#配置IP来源,通常为none

ipmitool lan set 1 ipsrc none | static | dhcp | bios

#配置LAN IP

ipmitool lan set 1 ipaddr

#配置LAN子网

ipmitool lan set 1 netmask

#配置网关

ipmitool lan set 1 defgw ipaddr

;