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
Parameter | Notes |
---|---|
session_id | A valid session ID. See Session Management for details. |
network_type | Either dhcp or static . |
hostname | static and dynamic. The host name to be used. |
address | static only. The static IP address to use for the interface. |
mask | static only. The network mask to use for the interface. |
gateway | static only. The gateway IP address to use for the interface. |
dns | static only. One or more DNS addresses. To use multiple DNS servers, just keep providing more parameters. |
Field details
Field | Notes |
---|---|
NetworkType | Either static or dhcp , depending on the requested change. |