Automatically configure interfaces

Synopsis

  ifconf [--configurator <configurator>] [<interface>] [<interface>...]

Examples

Automatically configure the first available interface

  ifconf

Automatically configure the interface "net0"

  ifconf net0

Retry automatic configuration indefinitely until it succeeds

  :retry
  ifconf || goto retry

Automatically configure the interface "net0" using DHCP

  ifconf --configurator dhcp net0

Automatically configure the interface "net0" using IPv6

  ifconf --configurator ipv6 net0

Description

Automatically configure a network interface. iPXE will open the first specified network interface and attempt to automatically configure it. If automatic configuration succeeds, the command will terminate and the network interface will be left open. If automatic configuration fails, the network interface will be closed and iPXE will proceed to the next network interface in the list.

If no network interfaces are explicitly specified, iPXE will try all available network interfaces.

If no configurators are explicitly specified, iPXE will try all available configurators.

Command status

Success One network interface was successfully configured
Failure No network interfaces were successfully configured

See also

Build options

The IPv6 protocol is available only when the build option NET_PROTO_IPV6 is enabled.

Notes

There is no difference between the commands ifconf and dhcp.

ifconf will not automatically close all other network interfaces before starting to attempt automatic configuration. If you have already opened other network interfaces, then you may wish to execute ifclose before executing ifconf.

ifconf will succeed if any configurator manages to successfully obtain a configuration. If you want to ensure that both DHCP and IPv6 have succeeded, then you must use each configurator explicitly:

  ifconf -c dhcp
  ifconf -c ipv6

Automatic configuration via DHCP will succeed if it manages to obtain an IP address. If you are using a ProxyDHCP server to provide a boot filename, then you may wish to keep retrying DHCP until it obtains a response from the ProxyDHCP server as well as obtaining the IP address from the DHCP server. You can do this using a script fragment such as:

  :retry
  ifconf -c dhcp && isset ${filename} || goto retry
 
cmd/ifconf.txt · Last modified: 2014/08/15 15:51 by mcb30
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL http://ipxe.org
References to "iPXE" may not be altered or removed.