[root@cobbler cobbler]# vim dhcp.template
subnet 10.10.10.0 netmask 255.255.255.0 {
option routers 10.10.10.2;
option domain-name-servers 10.10.10.2;
option subnet-mask 255.255.255.0;
range dynamic-bootp 10.10.10.100 10.10.10.200;
default-lease-time 21600;
max-lease-time 43200;
next-server $next_server;
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
if option pxe-system-type = 00:02 {
filename "ia64/elilo.efi";
} else if option pxe-system-type = 00:06 {
filename "grub/grub-x86.efi";
} else if option pxe-system-type = 00:07 {
filename "grub/grub-x86_64.efi";
} else {
filename "pxelinux.0";
}
}
}
备注:主要修改网段、DNS、网关等信息
[root@cobbler cobbler]# cobbler sync
通过cobbler管理的dhcp的配置文件
[root@cobbler cobbler]# egrep -v '^#|^$' /etc/dhcp/dhcpd.conf
ddns-update-style interim;
allow booting;
allow bootp;
ignore client-updates;
set vendorclass = option vendor-class-identifier;
option pxe-system-type code 93 = unsigned integer 16;
subnet 10.10.10.0 netmask 255.255.255.0 {
option routers 10.10.10.2;
option domain-name-servers 10.10.10.2;
option subnet-mask 255.255.255.0;
range dynamic-bootp 10.10.10.100 10.10.10.200;
default-lease-time 21600;
max-lease-time 43200;
next-server 10.10.10.222;
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
if option pxe-system-type = 00:02 {
filename "ia64/elilo.efi";
} else if option pxe-system-type = 00:06 {
filename "grub/grub-x86.efi";
} else if option pxe-system-type = 00:07 {
filename "grub/grub-x86_64.efi";
} else {
filename "pxelinux.0";
}
}
}
group {
}
CentOS7下利用Cobbler安装部署CentOS(2)
内容版权声明:除非注明,否则皆为本站原创文章。