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等。
以上来自百度,工厂在测试服务器时,sled(待测服务器)因为出厂的需求,不可能安装系统。但是为了测试组装完成后的sled是否满足出货的要求,则又必须使用操作系统进行检测,使用工具进行出货配置的更新。这边陷入了一个困境。解决方式:配置PXE服务器,使用PXE引导UUT端启动后,UUT端通过网络把启动系统需要的内核和文件系统download本地内存,UUT端便可以正常启动系统,无需安装,不占用sled硬盘资源,无污染,方便管理。
这里介绍一下在RedHat6.2下搭建PXE服务器的具体做法。
PXE 服务器
需要软件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服务的配置文档,里面具体参数所代表的含义可以百度,或者参考鸟哥的私房菜服务器架设篇
DHCP主要是给UUT端分配一个可用的IP,以后UUT端使用分配的IP才可以从服务器获得需要的资源。
posted on 2016-10-08 21:11 Devin_Blogs 阅读(336) 评论(0) 收藏 举报
浙公网安备 33010602011771号