首页/系统/服务器硬件与 RAID 速查/ipmitool 配置 BMC 网络(lan 命令)
带外管理72 条

ipmitool 配置 BMC 网络(lan 命令)

通过 lan 子命令查看与修改 BMC 网络:静态 IP/掩码/网关或 DHCP;远程修改前要确认带内通道可用,避免把自己锁在外面。

查看与设置

查看与设置
ipmitool -I lanplus -H 10.0.0.10 -U admin -f /root/.ipmi_pass lan print 1
ipmitool -I lanplus -H 10.0.0.10 -U admin -f /root/.ipmi_pass lan set 1 ipsrc static
ipmitool -I lanplus -H 10.0.0.10 -U admin -f /root/.ipmi_pass lan set 1 ipaddr 10.0.0.20
ipmitool -I lanplus -H 10.0.0.10 -U admin -f /root/.ipmi_pass lan set 1 netmask 255.255.255.0
ipmitool -I lanplus -H 10.0.0.10 -U admin -f /root/.ipmi_pass lan set 1 defgw ipaddr 10.0.0.1
lan print N打印通道 N 的 IP/掩码/网关/告警设置
ipsrcstatic 或 dhcp
改完验证重新 lan print 并 ping 新地址
通道号先 channel info 确认活动 LAN 通道,再执行 set
改 IP 前确认另有可达路径(带内或串口);远端操作中改错地址会失联。

易错点

  • 通道号写错:多通道机型上改了非活动通道,配置不生效
  • 只改 ipaddr 不改网关:跨网段管理时连不上

数据来源与参考

  • ipmitool 手册(lan 子命令)
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌