redhat – 在RHEL 6上配置DHCP

前端之家收集整理的这篇文章主要介绍了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.
原文链接:https://www.f2er.com/linux/399524.html

猜你在找的Linux相关文章