redhat – 在RHEL 6上配置DHCP

我有一个RHEL6的全新安装,我无法找到任何配置文件来为dhclient进行高级配置.
我试图在Ubuntu上找到类似dhclient.conf的东西,所以我可以修改诸如supersede domains,fqdn之类的选项,
也许它们应该在“/ etc / sysconfig / networking / devices / ifcfg-eth0”上,在这种情况下,哪些设置与那些dhclient.conf配置相匹配?

解决方法

配置文件是/etc/dhcp/dhclient-${DEVICE}.conf,/​​etc/dhclient-${DEVICE}.conf或/etc/dhcp/dhclient.conf中的一个.使用存在的第一个.

来自/ etc / sysconfig / network-scripts / ifup-eth(Fedora 14; RHEL6可能类似):

# allow users to use generic '/etc/dhcp/dhclient.conf' (as documented in manpage!)
# if per-device file doesn't exist or is empty
if [ -s /etc/dhcp/dhclient-${DEVICE}.conf ]; then
   DHCLIENTCONF="-cf /etc/dhcp/dhclient-${DEVICE}.conf";
elif [ -s /etc/dhclient-${DEVICE}.conf ]; then
   DHCLIENTCONF="-cf /etc/dhclient-${DEVICE}.conf";
else
   DHCLIENTCONF='';
fi;

从dhclient手册页:

-cf <config-file>
          Path to the client configuration file.  If unspecified,the default /etc/dhcp/dhclient.conf is used.

相关文章

1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...
如何抑制stable_secret读取关键的“net.ipv6.conf.all.stabl...
1 删除0字节文件 find -type f -size 0 -exec rm -rf {} ...
## 步骤 1:安装必要的软件包 首先,需要确保系统已安装 `dh...