set <setting> <value>
set net0/ip 192.168.0.100 set net0/netmask 255.255.255.0 set net0/gateway 192.168.0.1
set dns 192.168.0.1
set keep-san 1 autoboot
ifclose net0 set net0/mac 52:54:00:12:34:56 ifopen net0
set esc:hex 1b # ANSI escape character - "^[" set cls ${esc:string}[2J # ANSI clear screen sequence - "^[[2J" echo ${cls}
Set value of the specified configuration setting to the specified value.
The value will be interpreted according to the type specified as part of the setting name. For example, the command:
set net0/ip:hex 0a:00:00:64
is equivalent to the command:
set net0/ip:ipv4 10.0.0.100
If no type is explicitly specified, then the setting's default type will be used.
Success | The configuration setting was applied successfully |
---|---|
Failure | The configuration setting was not applied successfully |
You can use the config
command to browse and edit settings interactively.
You can use the read
command to prompt the user to enter a single setting.
Settings are generally applied immediately. For example, the command:
set net0/ip 192.168.0.1
will immediately change the IPv4 address associated with the network interface “net0”. In some cases, further action may be required in order to apply a setting. For example, the command:
set net0/mac 52:54:00:12:34:56
will not take effect properly until the network interface is closed and reopened. See the documentation on individual settings for further details.
Older versions of iPXE allowed ANSI escape sequences to be defined using code such as:
set esc:hex 1b ; set cls ${esc}[2J ; echo ${cls}
This should instead be
set esc:hex 1b ; set cls ${esc:string}[2J ; echo ${cls}