Table of Contents

Delete configuration setting

Synopsis

  clear <setting>

Examples

Clear any statically-assigned IP address for "net0"

  clear net0/ip
  clear net0/netmask
  clear net0/gateway

Description

Delete the specified configuration setting.

Command status

Success The configuration setting was deleted successfully
Failure The configuration setting was not deleted successfully

See also

Notes

The configuration setting will be cleared only within the specified scope. This may reveal an underlying value for the setting within a child scope. For example, suppose that we already have a DNS server address obtained via DHCP, which we then override manually using the set command:

  iPXE> dhcp net0
  DHCP (net0 52:54:00:12:34:56).... ok
  iPXE> show dns
  net0.dhcp/dns:ipv4 = 192.168.0.1
  iPXE> set dns 8.8.8.8
  iPXE> show dns
  dns:ipv4 = 8.8.8.8

If we then clear the DNS server address within the top-level scope, the underlying value will be restored:

  iPXE> show dns
  dns:ipv4 = 8.8.8.8
  iPXE> clear dns
  iPXE> show dns
  net0.dhcp/dns:ipv4 = 192.168.0.1