手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

TFTP+DHCP+NFS+FTP实现网络安装Linux

[日期:2010-07-17] 来源:Linux社区  作者:Linux [字体:大 中 小]

(二):安装并配置DHCP

(1)安装包

[root@localhost Server]# yum -y install dhcpd

(2)配置DHCP

[root@localhost ~]# cat /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample >>/etc/dhcpd.conf

(3)在配置文件中加入选项支持pxe功能,具体内容见文件 

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;

 

class "pxeclients" {

match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";

option vendor-class-identifier "PXEClient";

vendor-option-space PXE;

option PXE.mtftp-ip 0.0.0.0;

filename "pxelinux.0";

next-server 192.168.1.254;

option broadcast-address 192.168.1.255;  }

ddns-update-style interim;

ignore client-updates; 

subnet 192.168.1.0 netmask 255.255.255.0 { 

# --- default gateway

option routers                  192.168.1.254;

option subnet-mask              255.255.255.0;

 

option nis-domain               "domain.org";

option domain-name              "domain.org";

option domain-name-servers      192.168.1.254;

 

option time-offset              -18000; # Eastern Standard Time

#       option ntp-servers              192.168.1.1;

#       option netbios-name-servers     192.168.1.1;

# --- 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.1.128 192.168.1.245;

default-lease-time 21600;

max-lease-time 43200;

 

# we want the nameserver to appear at a fixed address

host ns {

next-server marvin.RedHat.com;

hardware ethernet 12:34:56:78:AB:CD;

fixed-address 207.175.42.254;

}

}

(4)启动dhcp服务:

[root@localhost ~]# service dhcpd start

linux
相关资讯       网络安装Linux 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款