cisco · Catalyst 9000 Series · 16 pp.
Cisco Catalyst 9000 Series Switch iPXE User Manual PDF
Related manuals
Contents
Document text
About iPXE
iPXE iPXE is an enhanced version of the Pre-boot eXecution Environment (PXE), which is an open standard for network booting. This module describes the iPXE feature and how to configure it. Information About iPXE, on page 1 How to Configure iPXE, on page 9 Configuration Examples for iPXE, on page 11 Troubleshooting Tips for iPXE, on page 14 Additional References for iPXE, on page 15 Feature Information for iPXE, on page 15 Information About iPXE About iPXE iPXE is an enhanced version of the Pre-boot eXecution Environment (PXE), which is an open standard for network booting. iPXE netboot provides:
• IPv4 and IPv6 protocols • FTP/HTTP/TFTP boot image download • Embedded scripts into the image • Stateless and stateful address auto-configuration (SLAAC) using Dynamic Host Configuration Protocol Version 4 (DHCPv4) and/or DHCPv6, boot URI, and parameters for DHCPv6 options depending on the IPv6 router advertisement. Netboot Requirements The following are the primary requirements for netbooting: • DHCP server with proper configuration. • Boot image available on the FTP/HTTP/TFTP server. • Device configured to boot from a network-based source. iPXE 1
iPXE Overview
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 boot modes: • iPXE Timeout—Boots through iPXE network boot. Configures a timeout in seconds for iPXE network boot by using the IPXE_TIMEOUT rommon variable. Use the boot ipxe timeout command to configure iPXE timeout. 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. You can activate device boot as specified below: • If BOOTMODE=ipxe-forever, device boot is not activated without user intervention (this is possible only if ENABLE_BREAK=yes).
• If BOOTMODE=ipxe-timeout, device boot is activated when the specified IPXE_TIMEOUT variable (in seconds) has elapsed. • If BOOTMODE=device, device boot is activated. This is the default active mode. • Device boot can also be activated through the CLI. Device boot is the default boot mode. Note 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 YES, the rommon or device prompt is activated.
If manual boot is set to NO, the autoboot variable is executed; this means that the value set in the BOOT variable is followed. The following section describes how an iPXE bootloader works: iPXE iPXE Overview iPXE 2
iPXE Overview
Figure 1: iPXE Bootloader Workflow 1. Bootloader sends a DHCP discover message, and when the server replies, the Bootloader sends a DHCP request. 2. 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). 3. Bootloader downloads and boots the image from the network source. 4. 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. Because the current iPXE implementation works only via the management port (GigabitEthernet0/0), DHCP requests sent through the front panel ports are not supported. Note When using a static network configuration to network boot, ROMMON uses the following environment variables (and all of them are required): • BOOT—URLs separated by semicolon (;) to boot from.
• IP_ADDRESS—Statically assigned IP address of a device. • DEFAULT_GATEWAY—Default gateway of the device. • IP_SUBNET_MASK—IPv4 or IPv6 prefix information. IPv4—Subnet mask of the device in the format WWW.XXX.YYY.ZZZ eg. 255.255.255.0. iPXE iPXE Overview iPXE 3
IPv6 iPXE Network Boot
IPv6—Subnet prefix length of the device in the format NNN eg. 64 or 112. 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 rommon iPXE 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 configured the boot manual switch command. 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 static network configuration is taken from the IP_ADDRESS, DEFAULT_GATEWAY, and IP_SUBNET_MASK variables. The BOOT variable may also contain a device filesystem-based path, in which case, a device filesystem-based boot is initiated. The DHCP server used for booting can identify a device through the Product ID (PID) (available in DHCP Option 60), chassis serial number (available in DHCP option 61), or the MAC address of the device.
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 DESCR:“WS-C3850-12X48U-L” PID:WS-C3850-12X48U-L, VID:V01 , SN:F0C1911V01A NAME:”Switch1 -Power Supply DESCR:“Switch1 -Power Supply PID:PWR-C1-1100WAC, VID:V01, SN:LIT1847146Q The following is sample output from the show switch command: Device# show switch Switch/Stack Mac Address : 046c.9d01.7d80 - Local Mac Address Mac persistency wait time:
Indefinite H/W Current Switch# Role Mac Address Priority Version State ------------------------------------------------------------------------------------- 1 Member 046c.9d1e.1a00 1 Ready 2 Standby 046c.9d01.7d80 1 Ready *3 Active f8b7.e24e.9a00 1 P2B Ready The following rommon variables should be configured for iPXE: • BOOTMODE = ipxe-forever | ipxe-timeout | device • IPXE_TIMEOUT = seconds IPv6 iPXE Network Boot This illustration displays how IPv6 iPXE network boot works on a Cisco device: iPXE IPv6 iPXE Network Boot iPXE 4