How can I set the general LAN settings (IP, netmask, gateway, etc) on IPMI (specifically the 6016T-6RFT+, 6016T-LN4F and 6016T-NTRF) using IPMITOOL?
Here is the instruciton to change the LAN setting:
Create a batch script file (lansetup.scr, for example) with the LAN setting:
# cat lansetup.scr
lan set 1 ipsrc static
lan set 1 ipaddr 172.31.1.44
lan set 1 netmask 255.255.0.0
lan set 1 defgw ipaddr 172.31.0.1
Exectute the batch script file in IPMITOOL shell:
# ipmitool -I open exec lansetup.scr
Setting LAN IP Address to 172.31.1.44
Setting Lan Subnet Mask to 255.255.0.0
Setting Lan Default Gateway IP to 172.31.0.1
or you can use following shell command to change the IP:
# ipmitool -I open shell
> exec lan set 1 ipsrc static
> exec lan set 1 ipaddr 192.168.0.100
> exec lan set 1 netmask 255.255.255.0
> exec lan set 1 defgw ipaddr 192.168.0.1
> exit
To return to DHCP, use:
> exec lan set 1 ipsrc dhcp