分享

PXE 预启动执行环境

 梦醉千秋 2014-01-15
2010-11-22 16:11 1110人阅读 评论(0) 收藏 举报

英文原文摘自:http://en./wiki/Preboot_Execution_Environment

 

The Preboot eXecution Environment (PXE, and also known as Pre-Execution Environment) is an environment to boot computers using a network interface independently of data storage devices (like hard disks) or installed operating systems.

 

PXE是一种通过网络接口独立访问数据存储设备或安装的操作系统来启动计算机的环境(个人认为英文原文的表达也不好)

 

PXE was introduced as part of the Wired for Management framework by Intel and is described in the specification (version 2.1) published by Intel and Systemsoft on September 20, 1999.[1] It makes use of several network protocols like Internet Protocol (IP), User Datagram Protocol (UDP), Dynamic Host Configuration Protocol (DHCP) and Trivial File Transfer Protocol (TFTP) and of concepts like Globally Unique Identifier (GUID), Universally Unique Identifier (UUID) and Universal Network Device Interface and extends the firmware of the PXE client (the computer to be bootstrapped via PXE) with a set of predefined Application Programming Interfaces (APIs).

 

PXE是WfM框架的一部分,由Intel公布,在WfM2.1的说明书里有介绍,这个说明书由Intel和Systemsoft在1999.9.20联合发布。

PXE使用多种网络协议,比如因特网协议(IP),用户数据报协议(UDP),动态主机配置协议(DHCP)和简单文件传输协议(TFTP),并且还用到

一些概念,比如全局唯一标识符(GUID),宇宙唯一标识符(UUID)和通用网络设备接口,PXE还通过一套预定义应用程序接口扩展PXE客户端固件(PXE客户端就是通过PXE启动的电脑)。

 

The firmware on the client tries to locate a PXE redirection service on the network (Proxy DHCP) in order to receive information about available PXE boot servers. After parsing the answer, the firmware will ask an appropriate boot server for the file path of a network bootstrap program (NBP), download it into the computer's random-access memory (RAM) using TFTP, possibly verify it, and finally execute it. If only one NBP is used among all PXE clients it could be specified using BOOTP without any need of a proxy DHCP, but a TFTP boot server is still required.

 

客户端上的固件会试图定位一个位于网络上(代理DHCP)的PXE重定向服务,以便于获取关羽可用PXE启动服务器的信息。在分析了回应之后,固件会请求一个合适的启动服务器来调用网络引导程序,通过TFTP协议把这个引导程序下载到计算机的只读存储器里,有可能会做验证,最终会执行下载的安装程序。如果只有一个引导程序被用于所有PXE客户端,它可能被声明不需要任何代理DHCP而使用BOOTP协议,但是一个TFTP服务器还是必须的。

 

PXE was designed to be applicable to many system architectures. The 2.1 version of the specification assigns architecture identifiers to six system types, including IA-64 and DEC Alpha. However, the specification only completely covers IA-32. Intel included PXE in the EFI for IA-64, creating a de-facto standard with the implementation.

 

PXE基于很多种系统架构而设计。2.1版本的说明里对六种系统类型制定了系统标识,包括IA-64和DEC Alpha。然而,说明书只是完全覆盖了IA-32。对于支持IA-64的扩展固件接口(EFI),intel在里面包含了PXE,创建了一个有执行力的合乎法理的标准。

 

The PXE protocol is approximately a combination of DHCP and TFTP, albeit with subtle modifications to both. DHCP is used to locate the appropriate boot server or servers, with TFTP used to download the initial bootstrap program and additional files.

To initiate a PXE bootstrap session the PXE firmware broadcasts a DHCPDISCOVER packet extended with PXE-specific options (extended DHCPDISCOVER) to port 67/UDP (DHCP server port). The PXE options identify the firmware as capable of PXE, but they will be ignored by standard DHCP servers. If the firmware receives DHCPOFFERs from such servers, it may configure itself by requesting one of the offered configurations.

 

PXE协议是近似于DHCP和TFTP协议的一个整合体,虽说对两者有些许的修改。使用DHCP协议定位合适的启动服务器或服务器,使用TFTP协议下载初始化引导程序和其他附加文件。

要初始化一个PXE引导区,PXE固件会发送一个叫做“DHCP发现”的包,这个包包含PXE说明选项(也叫扩展“DHCP发现”),发向67端口。PXE选项里包含有识别具有PXE功能固件的信息,但这些选项将被标准DHCP服务器所忽略。如果固件从具有PXE功能的服务器接受DHCP邀请,固件会从所有的邀请里选一个进行配置。

 

If a PXE redirection service (Proxy DHCP) receives an extended DHCPDISCOVER, it replies by sending a DHCPOFFER packet extended with PXE-specific options (extended DHCPOFFER) to the client to port 68/UDP (DHCP client port).

An extended DHCPOFFER contains mainly:

  • a PXE Discovery Control field to decide whether Multicasting, Broadcasting, or Unicasting is to be used for contacting PXE boot servers
  • a list of IP addresses of each available PXE Boot Server Type
  • a PXE Boot Menu with each entry representing a PXE Boot Server Type
  • a PXE Boot Prompt telling the user to press a certain key to see the boot menu
  • a timeout to launch the first boot menu entry if it expires.

The Proxy DHCP service may also be run on the same host as the standard DHCP service. Since both services cannot share port 67/UDP, the Proxy DHCP runs on port 4011/UDP and expects the extended DHCPDISCOVER packets from PXE Clients to be DHCPREQUESTs. The standard DHCP service has to send a special combination of PXE options in its DHCPOFFER, so the PXE client knows to look for a Proxy DHCP on the same host, port 4011/UDP.

 

如果一个PXE重定向服务(代理DHCP)接受一个扩展DHCP发现, 它会发送一个带有PXE说明选项的DHCPOFFER包到客户端的68端口作为回应。

一个扩展DHCPOFFER主要包含:

一个PXE发现控制域,用来决定是采用多播,广播或单播中的哪一种连接PXE启动服务器;

一个包含各种可用PXE启动服务器IP地址的列表;

一个PXE启动菜单,菜单里的每一项代表一个PXE启动服务器类型;

一个PXE启动提示,告诉用户按哪个键查看启动菜单;

运行第一个启动菜单的超时设定。

 

代理DHCP服务可以运行在相同的主机作为标准DHCP服务。因为代理DHCP服务和标准DHCP服务不能共用67端口,代理DHCP使用4011端口,并期望从PXE客户端获取扩展DHCP发现包作为DHCP请求。标准DHCP服务必须通过DHCPOFFER发送一个特别的PXE选项的整合体,因此PXE客户端知道在同一个主机上的4011端口查询一个代理DHCP.

 

To contact a PXE Boot Server the booting system must have an IP address (perhaps from a DHCP server).

It multicasts or unicasts a DHCPREQUEST packet extended with PXE-specific options (extended DHCPREQUEST) to port 4011/UDP or broadcasts it to port 67/UDP. This packet contains the PXE Boot Server type and the PXE Boot Layer, allowing multiple boot server types to run from one daemon. The extended DHCPREQUEST may be a DHCPINFORM.

 

要和一个PXE启动服务器建立联系,正在启动的系统必须有一个IP地址(这个地址可能是从一个DHCP服务器获取)。它多播或单播一个带有PXE扩展选项的DHCP请求包到4011端口或67端口。这个包包含PXE启动服务器类型和PXE启动层次,允许多种类型的启动服务器从一个守护者运行。这里的扩展DHCP请求可能是一个DHCP通知。

 

A PXE Boot Server receiving an extended DHCPREQUEST configured for the requested type and client architecture responds with an extended DHCPACK including:

  • the complete file path to download the NBP via TFTP.
  • PXE Boot Server type and PXE Boot Layer it answered
  • the multicast TFTP configuration, if MTFTP as described in the PXE specification should be used.

The booting system accepts information from only one extended DHCPOFFER.

A 2.1 version PXE Boot Server supports "Boot Integrity Services" ([2]) allowing the Client to verify downloaded NBPs using a checksum file which is downloaded from the same boot server as the NBP.

To get the file path of this credentials file another exchange of extended DHCPREQUEST and extended DHCPACK is required.

 

一个接收被配置了请求类型和客户端结构的扩展DHCP请求的PXE启动服通过一个扩展DHCPACK响应,这个响应包括:

通过TFTP下载NBP的完整文件路径;

PXE启动服务器类型和答复的PXE启动层;

如果在PXE说明里描述的MTFTP应该被使用,则还应包含多播TFTP配置。

启动系统仅仅从一个扩展DHCPOFFER接收信息。

一个2.1版本的PXE启动服务器支持完整性启动服务,这种服务器允许客户端使用一个从同一个启动服务器下载作为NBP的校验和文件验证下载的NBP。

要获取这个证书文件,另一个扩展DHCP请求和扩展DHCP响应的验证是必要条件。

 

After receiving the requested extended DHCPACK, the Network Bootstrap Program is uploaded into RAM and after it is verified or if verification is not required, the NBP will be executed. It has access to the APIs of the PXE firmware extension (Pre-boot, UDP, TFTP, Universal Network Device Interface (UNDI)). Its functions or tasks are not described in the PXE specification.

 

在接收了扩展DHCP请求响应后,网络引导程序被加载到RAM里,在经过验证或不需要验证之后,引导程序将被执行。引导程序可以访问PXE固件扩展的API(预启动,UDP,TFTP,通用网络设备接口(UNDI))。引导程序的功能和任务在PXE说明里没有被描述到。

 

The PXE Client/Server Protocol was designed so:

  • it can be used in the same network as an existing DHCP environment without interference
  • it can be integrated completely into standard DHCP services
  • it can be easily extended at the most important points without a call for papers
  • every service (DHCP, Proxy DHCP, Boot Server) can be implemented standalone or in any combination of them

PXE客户端/服务器协议所带来的好处是:

它可以被用于一个没有干扰并带有DHCP环境的相同的网络;

它可以完全被整合进标准DHCP服务里;

它可以被很容易的扩展到最重要的点,而不需要记录任何东西;

每个服务(DHCP,代理DHCP,启动服务器)可以被单独执行或者并发执行。

 

Additionally the PXE firmware extension was designed as an Option ROM for the IA-32 BIOS so you can get a personal computer (PC) PXE-capable by installing a NIC that provides a PXE Option ROM. Note, this procedure also applies to the newer AMD64 processor standard for PC.

The design goal of utilizing existing DHCP and TFTP servers cannot be achieved in a strictly conforming implementation. Some aspects of the PXE protocol require that the DHCP and TFTP servers be modified and communicate. One specific example is using multicast, where DHCP packets provide the multicast group information rather than an opening RFC-2090 multicast TFTP exchange. The impact of this is minimal as the most common PXE client implementation (written by Intel and provided at no cost as a linkable IA32 binary module) interoperates with a combination of isolated DHCP and unicast TFTP servers.

 

额外的,PXE固件扩展作为一个针对IA-32 BIOS的可选ROM而设计,所以你可以通过安装一个提供PXE可选ROM的NIC来配置一台具有PXE功能的个人电脑,注意,这个过程同样应用于最新的PC AMD64处理器。

 

在一个严格遵守协议的执行环境里,使用存在的DHCP和TFTP服务器的设计目标不能实现。PXE协议的一些方面需要DHCP和TFTP服务器可以被修改和交互。一个鲜明的例子是当DHCP包提供多播组信息而不是一个开放的RFC-2090多播TFTP交互的时候使用多播。作为最重要的通用PXE客户端执行环境(由Intel著作并提供一个IA32二进制模型的免费链接)同孤立的DHCP和单播TFTP服务器的联合进行协作,这种影响是微小的。 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多