API Docs
LuxMiner commands
netset

netset

Description

Change the miner network configuration. By default, the miner starts with an automatic setup (DHCP), but you can change it to static IPs using this command.

When the configuration is updated, you will get the usual API result and the network stack will restart in ~5s after the command is executed. Keep this mind when automating network changes.

Command

$ echo '{"command": "netset", "parameter":"6EnwsDg2,static,MyHost,192.168.0.50,255.255.255.0,192.168.0.1,8.8.8.8"}' | nc $MINER_IP 4028 | jq

Example

The example below sets the network to a static IP address:

$ echo '{"command": "netset", "parameter":"6EnwsDg2,static,MyHost,192.168.0.50,255.255.255.0,192.168.0.1,8.8.8.8"}' | nc $MINER_IP 4028 | jq
{
  "NETSET": [
    {
      "NetworkType": "static"
    }
  ],
  "STATUS": [
    {
      "Code": 336,
      "Description": "LUXminer 0.1.0-15436f7140",
      "Msg": "Network change scheduled",
      "STATUS": "S",
      "When": 1667917312
    }
  ],
  "id": 1
}

The example below changes the network stack to use DHCP:

$ echo '{"command": "netset", "parameter":"6EnwsDg2,dhcp,MyHost"}' | nc $MINER_IP 4028 | jq
{
  "NETSET": [
    {
      "NetworkType": "dhcp"
    }
  ],
  "STATUS": [
    {
      "Code": 336,
      "Description": "LUXminer 0.1.0-15436f7140",
      "Msg": "Network change scheduled",
      "STATUS": "S",
      "When": 1667917312
    }
  ],
  "id": 1
}

Parameters

ParameterNotes
session_idA valid session ID. See Session Management for details.
network_typeEither dhcp or static.
hostnamestatic and dynamic. The host name to be used.
addressstatic only. The static IP address to use for the interface.
maskstatic only. The network mask to use for the interface.
gatewaystatic only. The gateway IP address to use for the interface.
dnsstatic only. One or more DNS addresses. To use multiple DNS servers, just keep providing more parameters.

Field details

FieldNotes
NetworkTypeEither static or dhcp, depending on the requested change.