在RHEL上configurationDHCP

我有一个全新的RHEL6安装,我无法find任何configuration文件来做dhclient的高级configuration。 我试图在Ubuntu上find像dhclient.conf这样的东西,所以我可以修改select像supersede域,fqdn,也许他们应该在“/ etc / sysconfig / networking / devices / ifcfg-eth0”在那种情况下是什么设置匹配那些dhclient.confconfiguration?

configuration文件是/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)NetworkManagerdynamic创buildIPv4的dhclient.conf文件。 它使用dhclient默认值为IPv6运行dhclient,因为没有指定configuration文件,只是指定了接口设备(例如,eth0)。 你可以通过执行“ps aux | grep dhclient”来检查。 我试图在“正确的位置”提供我想要的选项,只发现NetworkManager在每次运行时都会覆盖文件。

2)您可以使用configuration文件的默认位置之一来提供您希望为IPv6configuration的任何选项。 至less它似乎在为我工作。

3)不要害怕编辑ifcfg-ethX,而不要依赖GUInetworkingconfiguration器。 有一些configuration选项的组合不允许这应该是合法的,可能是有用的。

干杯,戴夫

/ etc / sysconfig / networking / devices / ifcfg-eth0仅用于基本设置,对于要使用的选项,请在shell中运行# yum install dhclient# yum install dhclient

其实你可以在/etc/sysconfig/network-scripts/ifcfg-eth?做一堆这样的事情/etc/sysconfig/network-scripts/ifcfg-eth? – 对于Red Hat 5系列,您可以在这里find文档: http : //www.linuxtopia.org/online_books/centos_linux_guides/centos_linux_reference_guide/s1-networkscripts-interfaces.html

我认为,如果不是全部,那么这个function在RH6中仍然可以工作。