Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cmd:dhcp [2011/02/27 13:10]
mcb30
cmd:dhcp [2014/01/29 14:19]
mcb30
Line 1: Line 1:
-====== Configure interface(s) using DHCP ====== +~~REDIRECT>cmd:ifconf~~
- +
-===== Synopsis ===== +
- +
-    dhcp [<​interface>] [<​interface>​...] +
- +
-===== Examples ===== +
- +
-=== Configure the first available interface using DHCP === +
- +
-    dhcp +
- +
-=== Configure the interface "​net0"​ using DHCP === +
- +
-    dhcp net0 +
- +
-=== Retry DHCP indefinitely until it succeeds === +
- +
-    :​retry_dhcp +
-    dhcp || goto retry_dhcp +
- +
-===== Description ===== +
- +
-Configure a network interface using DHCP.  iPXE will open the first specified network interface and attempt to acquire an IP address via DHCP.  If DHCP succeeds, the command will terminate and the network interface will be left open.  If DHCP 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. +
- +
-===== Command status ===== +
- +
-^ Success ​  | One network interface was successfully configured using DHCP  | +
-^ Failure ​  | No network interfaces were successfully configured using DHCP | +
- +
-===== See also ===== +
- +
-  * ''​[[:​cmd:autoboot]]''​ +
-  * ''​[[:​cmd:​route]]''​ +
-  * [[:cmd|List of all iPXE commands]] +
- +
-===== Notes ===== +
- +
-''​dhcp''​ will not automatically close all other network interfaces before starting to attempt DHCP.  If you have already opened other network interfaces, then you may wish to execute ''​[[:​cmd:​ifclose]]''​ before executing ''​dhcp''​. +
- +
-''​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_dhcp +
-    dhcp && isset ${filename} || goto retry_dhcp+
  
cmd/dhcp.txt · Last modified: 2014/01/29 14:19 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.