cbrom606_cbrom使用方法_网络教材cd rom(2)

电脑杂谈  发布时间:2017-04-27 01:15:36  来源:网络整理

# At least one of the vendor-specific PXE options must be set in

# order for the client boot ROMs to realize that we are a PXE-compliant

# server. We set the MCAST IP address to 0.0.0.0 to tell the boot ROM

# that we can't provide multicast TFTP (address 0.0.0.0 means no

# address).

option PXE.mtftp-ip 0.0.0.0;

# This is the name of the file the boot ROMs should download.

filename "pxelinux.0";

# This is the name of the server they should get it from.

next-server 192.168.0.1;

}

ddns-update-style interim;

ignore client-updates;

default-lease-time 1200;

max-lease-time 9200;

option subnet-mask 255.255.255.0;

option broadcast-address 192.168.0.255;

option routers 192.168.0.254;

option domain-name-servers 192.168.0.1,192.168.0.2;

option domain-name "mydomain.org";

subnet 192.168.0.0 netmask 255.255.255.0 {

range 192.168.0.10 192.168.0.100;

}

host q10 {

hardware ethernet 00:00:F0:6B:38:5B;

fixed-address 192.168.0.22;

}

dhcpd.conf配置文件中几个关键部分说明如下:host q10{…}定义了笔记本Q10网卡的MAC地址与IP地址的对应关系,表明DHCP Server为Q10分配一个固定的IP:192.168.0.22;filename ""指定bootstrap的文件名;netx-server指定TFTP Server的地址。其它的配置请读者参考DHCP Server的手册。

配置TFTP server

选用tftp-hpa,TFTP Server的配置文件是/etc/xinetd.d/tftp,配置文件的内容如下:

service tftp

{

socket_type = dgram

protocol = udp

wait = yes

user = root

server = /usr/sbin/in.tftpd

server_args = -u nobody -s /tftpboot

disable = no

per_source = 11

cps = 100 2

}

这里制定了/tftpboot为TFTP Server的根目录位置。

配置bootstrap

bootstrap文件在dhcpd.conf中被指定为pxelinux.0文件,放置在/tftpboot。Linux内核以及Linux根文件系统也放置在/tftpboot。pxelinux.0在执行过程中,要读配置文件,所有的配置文件都放在/tftpboot/pxelinux.cfg/目录下。由于PXElinux具有为不同的PXE Client提供不同的Linux内核以及根文件系统的功能,所以要通过不同的配置文件名来区分出不同的PXE Client的需求。比如一个PXE Client由DHCP Server分配的IP地址为192.168.0.22,那么相对应的配置文件名为/tftpboot/pxelinux.cfg/C0A80016(注:C0A80016为IP地址192.168.0.22的十六进制表示)。如果找不到,就按照顺序C0A80016->; C0A8001->; C0A800->; C0A80->; C0A8->; C0A->; C0->; C->;default查找配置文件。


本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-43694-2.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...