协议分client和server端
计算机重启,BIOS把pxeClient从ROM中调入内存执行,并显示菜单。
经用户选择PXEclient把远端操作系统下载到本地运行。
DHCP server给PXE client分配IP地址;所以DHCP中要有针对PXE的特有配置;
PXEclient中已经存在TFTP client,走TFTP协议从TFTPserver 下载所需文件(内核,根文件系统,bootstrap)。
PXEclient工作时三个二进制文件;内核,跟文件系统,bootstrap;通过bootstrap的选择下载相应的内核以及根文件系统。
一、部署DHCP服务器
编辑 /etc/dhcpd.conf ,内容如下:
#ddns-update-style. interim;
ddns-update-style. ad-hoc;
ignore client-updates;
allow booting;
allow bootp;
option nis-domain "domain.org";
#option domain-name "pxeserver";
option time-offset -18000; # Eastern Standard Time
default-lease-time 1000;
max-lease-time 1600;
#配置网段,网关DNS和IP范围
subnet 10.1.0.0 netmask 255.255.255.0 {
option routers 10.1.0.254;
option subnet-mask 255.255.255.0;
option domain-name-servers 10.20.3.4;
range dynamic-bootp 10.1.0.2 10.1.0.50;
filename "linux-install/pxelinux.0";
}
说明:filename 指定bootstrap的文件名;如果TFTP Server 在不同机器上,用netx-server指定TFTP Server的地址。
二、TFTP SERVER
TFTP Server的配置文件是/etc/xinetd.d/tftp,配置文件的内容如下:
# default: off
# description: The tftp server serves files using the trivial file transfer
# protocol. The tftp protocol is often used to boot diskless
# workstations, download configuration files to network-aware printers,
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
这里制定了/tftpboot为TFTP Server的根目录位置。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21845741/viewspace-606725/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/21845741/viewspace-606725/