本虚拟机使用nat方式实现上网
本机IP:192.168.147.3
网关为:192.168.147.2
/etc/dhcpd.conf中配置如下:
ddns-update-style interim;
ignore client-updates;
subnet 192.168.147.0 netmask 255.255.255.0 {
allow booting;
allow bootp;
allow unknown-clients;
option routers 192.168.147.2;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.147.2;
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.147.100 192.168.147.254;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.147.3;
filename "pxelinux.0";
}
重启失败
解决:
由于使用的是centos 6.5 ,在这个版本中的dhcpd.conf配置文件是在/etc/dhcp/dhcpd.conf
而6版本以下是在/etc/下,6版本以上是在/etc/dhcp/下
由于配置错配置文件目录而导致dhcp无法启动
本机IP:192.168.147.3
网关为:192.168.147.2
/etc/dhcpd.conf中配置如下:
ddns-update-style interim;
ignore client-updates;
subnet 192.168.147.0 netmask 255.255.255.0 {
allow booting;
allow bootp;
allow unknown-clients;
option routers 192.168.147.2;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.147.2;
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.147.100 192.168.147.254;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.147.3;
filename "pxelinux.0";
}
重启失败
解决:
由于使用的是centos 6.5 ,在这个版本中的dhcpd.conf配置文件是在/etc/dhcp/dhcpd.conf
而6版本以下是在/etc/下,6版本以上是在/etc/dhcp/下
由于配置错配置文件目录而导致dhcp无法启动
编辑回复