PXE Server build DHCP

PXE(preboot execute environment,预启动执行环境)是由Intel公司开发的最新技术,工做于Client/Server的网络模式,支持工做站经过网络从远端服务器下载映像,并由此支持经过网络启动操做系统,在启动过程当中,终端要求服务器分配IP地址,再用TFTP(trivial file transfer protocol)或MTFTP(multicast trivial file transfer protocol)协议下载一个启动软件包到本机内存中执行,由这个启动软件包完成终端(客户?)基本软件设置,从而引导预先安装在服务器中的终端操做系统。PXE能够引导多种操做系统,如:Windows95/98/2000/windows2003/windows2008/winXP/win7/win8,linux等。node

  以上来自百度,工厂在测试服务器时,sled(待测服务器)由于出厂的需求,不可能安装系统。可是为了测试组装完成后的sled是否知足出货的要求,则又必须使用操做系统进行检测,使用工具进行出货配置的更新。这边陷入了一个困境。解决方式:配置PXE服务器,使用PXE引导UUT端启动后,UUT端经过网络把启动系统须要的内核和文件系统download本地内存,UUT端即可以正常启动系统,无需安装,不占用sled硬盘资源,无污染,方便管理。linux

 

这里介绍一下在RedHat6.2下搭建PXE服务器的具体作法。ios

PXE 服务器windows

须要软件1,DHCPD 2 tftp-server 3 xinetd 4 syslinux-tftpboot服务器

三个软件均可以在安装镜像中找到,或者安装时选择所有安装。网络

#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample  
#
# ddns-update-style interim;
DHCPDARGS=eth0;
option space PXE;
option PXE.mtftp-ip               code 1 = ip-address;
option PXE.mtftp-cport            code 2 = unsigned integer 16;
option PXE.mtftp-sport            code 3 = unsigned integer 16;
option PXE.mtftp-tmout            code 4 = unsigned integer 8;
option PXE.mtftp-delay            code 5 = unsigned integer 8;
option PXE.discovery-control      code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr   code 7 = ip-address;

ddns-update-style interim;
ignore client-updates;
allow booting;
allow bootp; 
class "pxeclients" {
    match if substring (option vendor-class-identifier,0,9)="PXEClient";
    vendor-option-space PXE;
    option PXE.mtftp-ip 0.0.0.0;
    filename "pxelinux.0";
    }

subnet 192.168.123.0 netmask 255.255.255.0 {
#    option routers                        192.168.70.1;
    option broadcast-address               192.168.123.255;
    option subnet-mask                   255.255.255.0;
    
    option nis-domain                "domain.org";
    option domain-name              "domain.org";
    #option domain-name-servers        server;

    option time-offset              -18000; # Eastern Standard Time
    # --- Selects point-to-point node (default is hybrid). Don't change this unless
    # -- you understand Netbios very well
#       option netbios-node-type 2;
    range dynamic-bootp 192.168.123.10 192.168.123.250;
    
    default-lease-time 60;    
    max-lease-time 240;
    }

以上是dhcpd.conf,DHCPD服务的配置文档,里面具体参数所表明的含义能够百度,或者参考鸟哥的私房菜服务器架设篇less

DHCP主要是给UUT端分配一个可用的IP,之后UUT端使用分配的IP才能够从服务器得到须要的资源。dom

相关文章
相关标签/搜索