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