iPXE Overview
Network bootloaders support booting from a network-based source. The bootloaders boot an image located on an HTTP, FTP, or TFTP server. A network boot source is detected automatically by using an iPXE-like solution.
iPXE enables network boot for a device that is offline. The following are the three types of iPXE boot modes:
-
iPXE Timeout—Configures a timeout in seconds for iPXE network boot by using the IPXE_TIMEOUT rommon variable. When the timeout expires, device boot is activated.
-
iPXE Forever—Boots through iPXE network boot. The device sends DHCP requests forever, when the boot ipxe forever command is configured. This is an iPXE-only boot (which means that the bootloader will not fall back to a device boot or a command prompt, because it will send DHCP requests forever until it receives a valid DHCP response.)
-
Device—Boots using the local device BOOT line configured on it. When device boot is configured, the configured IPXE_TIMEOUT rommon variable is ignored. Device boot is the default boot mode.
Note |
Manual boot is another term used in this document. Manual boot is a flag that determines whether to do a rommon reload or not. When the device is in rommon mode, you have to manually issue the boot command. If manual boot is set to 1, the rommon or device prompt is activated. If manual boot is set to 0, the device is reloaded; but rommon mode is not activated. |
-
Bootloader sends a DHCP request.
-
The DHCP response includes the IP address and boot file name. The boot file name indicates that the boot image is to be retrieved from a TFTP server (tftp://server/filename), FTP server (ftp://userid:password@server/filename), or an HTTP server (http://server/filename). Because the current iPXE implementation works only via the management port (GigabitEthernet0/0), DHCP requests sent through the front panel ports are not supported.
-
Bootloader downloads and boots the image from the network source.
-
If no DHCP response is received, the bootloader keeps sending DHCP requests forever or for a specified period of time, based on the boot mode configured. When a timeout occurs, the bootloader reverts to a device-based boot. The device sends DHCP requests forever only if the configured boot mode is ipxe-forever . If the ipxe-timeout boot mode command is configured, DHCP requests are sent for the specified amount of time, and when the timeout expires, device boot mode is activated.
When manual boot is disabled, the bootloader determines whether to execute a device boot or a network boot based on the configured value of the iPXE ROMMON variable. Irrespective of whether manual boot is enabled or disabled, the bootloader uses the BOOTMODE variable to determine whether to do a device boot or a network boot. Manual boot means that the user has to manually type the boot manual switch command to start the boot process. When manual boot is disabled, and when the device reloads, the boot process starts automatically.
When iPXE is disabled, the contents of the existing BOOT variable are used to determine how to boot the device. The BOOT variable may contain a network-based uniform resource identifier (URI) (for example, http://, ftp://, tftp://), and a network boot is initiated; however DHCP is not used to get the network image path. The device IP address is taken from the IP_ADDR variable. The BOOT variable may also contain a device-based path, in which case, a device-based boot is initiated.
To identify the device on a remote DHCP server for booting purposes, use the chassis serial number (available in DHCP option 61), the Product ID (PID) (available in DHCP Option 60), or the device MAC Address. The show inventory and show switch commands also display these values on the device.
The following is sample output from the show inventory command:
Device# show inventory
NAME:“c38xx Stack”, DESCR:“c38xx Stack”
PID:WS-3850-12X-48U-L, VID:V01 , SN: F0C1911V01A
NAME:“Switch 1”, DESCR:“WS-C3850-12X48U-L”
PID:WS-C3850-12X48U-L, VID:V01 , SN:F0C1911V01A
NAME:”Switch1 -Power Supply B”, DESCR:“Switch1 -Power Supply B”
PID:PWR-C1-1100WAC, VID:V01, SN:LIT1847146Q
The following rommon variables should be configured for iPXE:
-
BOOTMODE = ipxe-forever | ipxe-timeout | device
-
IPXE_TIMEOUT = seconds