来自http://en.wikipedia.org/wiki/Preboot_Execution_Environment
http://zh.wikipedia.org/wiki/PXE
预启动执行环境(Preboot eXecution Environment,PXE,也被称为预执行环境)是让计算机通过网卡独立地使用数据设备(如硬盘)或者安装操作系统。
PXE当初是作为Intel的有线管理体系的一部分,Intel 和 Systemsoft于1999年9月20日公布其规格(版本2.1)[1]。通过使用像网际协议(IP)、用户数据报协议(UDP)、动态主机设定协定(DHCP)、小型文件传输协议(TFTP)等几种网络协议和全局唯一标识符(GUID)、通用网络驱动接口(UNDI)、通用唯一识别码(UUID)的概念并通过对客户机(通过PXE自检的电脑)固件扩展预设的API来实现目的。
PXE 客户机(client)这个术语是指机器在PXE启动过程中的角色。一个PXE 客户机(client)可以是一台服务器、桌面级电脑、笔记本电脑或者其他装有PXE启动代码的机器。
The Preboot eXecution Environment (PXE, also known asPre-Execution Environment; sometimes pronounced "pixie") is an environment toboot computers using a network interface independently of data storage devices (like hard disks) or installed operating systems.
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 (IPv4), 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启动服务器,要在网络中尝试找出PXE重定向服务(DHCP代理)。在分析返回的包后,固件会向合适的启动服务器询问网络自检程序(NBP)的路径,并且通过TFTP协议下载到电脑的内存中,有可能会去校验它,最后执行它。当只有全部的PXE 客户机(client)只使用一个NBP时,全部的PXE 客户机可能会被指定是用BOOTP协议,从而不需要DHCP代理,但是仍然需要TFTP启动服务。
PXE被设计成适合各种计算机体系。2.1版的描述中确定了6种系统规格,包括IA-64和DEC Alpha。可是只有IA-32的完全表述.Intel 在IA-64 的 扩展固件接口中包括了PXE,落实了标准。
PXE 协议大致上结合了DHCP和TFTP,虽然都有在两者上面有改进。DHCP用于查找合适的启动服务器,TFTP用于下载初始引导程序和附加文件。
为了开始一个PXE自检会话,PXE固件广播一个带有明确的PXE选项DHCPDISCOVER包(扩展DHCPDISCOVER)到67/UDP端口(DHCP服务器端口)。PXE选项是PXE固件有PXE能力的鉴定,但是会一般的DHCP服务忽略。当固件受到从这样的服务受到DHCPOFFER包时,它会通过要求其提供配置信息来自我配置。
当 PXE 重定向服务 (DHCP代理) 收到一个 扩展DHCPDISCOVER 包时,它会通过发送一个带有明确的PXE选项DHCPDISCOVER包到PXE客户机的68/UDP端口 (DHCP 客户机端口)来回答。 一个扩展DHCPDISCOVER包主要包含:
一个DHCP代理服务可能在相同的主机上运行一个标准的DHCP服务器。尽管两个服务不可以共享67/UDP 端口,DHCP代理服务在4011/UDP 端口上运行,要求从客户端来的DHCPDISCOVER 包变成DHCPREQUEST 包。标准DHCP服务在其发送的DHCPOFFER 包中加入特殊的PXE 选项组合,这样PXE客户端知道可以在同一个主机的 4011/UDP 端口找到一个DHCP代理服务。
和一个正在启动系统的启动服务联系必须有一个IP地址(可能来自DHCP服务)。
通过多播或单播一个带有特殊的PXE选项的DHCPREQUEST 包(扩展DHCPREQUEST包)到 4011/UDP端口,或者广播(网路)这种包到 67/UDP端口。这种包包含有PXE启动服务类型和PXE启动层,一个守护进程允许运行多个启动服务类型。 一个扩展 DHCPREQUEST包可能是一个DHCPINFORM包。
Chain
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 thefile 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 usingBOOTP without any need of a proxy DHCP, but aTFTP boot server is still required.
PXE was designed to be applicable to many system architectures. The 2.1 version of the specification assigns architecture identifiers to six system types, includingIA-64 andDEC Alpha. However, the specification only completely coversIA-32. Intel included PXE in theEFI for IA-64, creating a de facto standard with the implementation.
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.
If a PXE redirection service (Proxy DHCP) receives an extended DHCPDISCOVER, it replies with anextended DHCPOFFER to the client's port 68/UDP (DHCP client port).
An extended DHCPOFFER contains mainly:
The Proxy DHCP service may also run on the same host as the standard DHCP service. Since two services cannot share port 67/UDP, the Proxy DHCP runs on port 4011/UDP and expects theextended DHCPDISCOVER packets from PXE Clients to be DHCPREQUESTs.[2] 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.
To contact a PXE Boot Server the booting system must have an IP address (perhaps from a DHCP server).
It multicasts orunicasts a DHCPREQUEST packet extended with PXE-specific options (extendedDHCPREQUEST) to port 4011/UDP or broadcasts it to port 67/UDP. This packet contains the PXE Boot Servertype and the PXE Boot Layer, allowing multiple boot server types to run from onedaemon. The extended DHCPREQUEST may be aDHCPINFORM.
A PXE Boot Server receiving an extended DHCPREQUEST configured for the requestedtype and client architecture responds with an extended DHCPACK including:
The booting system accepts information from only one extended DHCPOFFER.
A 2.1 version PXE Boot Server supports "Boot Integrity Services" ([3]) 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.
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.
The PXE Client/Server Protocol was designed so:
Additionally the PXE firmware extension was designed as an Option ROM for the IA-32 BIOS so a personal computer (PC) can be made PXE-capable by installing a NIC that provides a PXE Option ROM. 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.
--------------------------------------
TFTP是多点的TFTP服务,应用在windows无盘工作站的服务端