Re: [CentOS] dhclient.conf
On 03/03/2015 04:32 PM, Pol Hallen wrote: fig, centos keep only ip from dhcp server (not gw, not dns) > > where is dhclient.conf? I need to create it? If yes, where're the > default options? The dhclient.conf file doesn't exist by default in more modern versions of CentOS. You'll need to create it in /etc/dhcp, or by putting the requested options in /etc/dhcp/dhclient.d For CentOS 7, it should be safe to use http://pkgs.fedoraproject.org/cgit/dhcp.git/plain/README.dhclient.d as guidelines should you choose the latter route. -- Jim Perrin The CentOS Project | http://www.centos.org twitter: @BitIntegrity | GPG Key: FA09AD77 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] dhclient.conf
Hi, On Wed, Mar 4, 2015 at 4:02 AM, Pol Hallen wrote: > Hi all :-) > > on centos 6 I need keep the hostname from a dhcp server: > > cat /etc/sysconfig/network-scripts/ifcfg-eth0 > > DEVICE=eth0 > HWADDR=00:50:56:27:0E:C8 > TYPE=Ethernet > UUID=20924b21-e92a-4944-a054-06d1967155c1 > ONBOOT=yes > NM_CONTROLLED=yes > BOOTPROTO=dhcp > PEERDNS=yes > > with this config, centos keep only ip from dhcp server (not gw, not dns) > > where is dhclient.conf? I need to create it? If yes, where're the default > options? > In DHCP server all this parameters (like DNS, GW, Netmask) have to be configure first. if you want to set the default options for GW and DNS then please do the changes in DHCP server like below. Here is the example of dhcpd.conf file, # # DHCP Server Config File # ddns-update-style none; ignore client-updates; lease-file-name "/var/lib/dhcpd/dhcpd.leases"; authoritative; option domain-name "example.com"; default-lease-time 86400; # 24 hours max-lease-time 172800; # 48 hours subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.1; option subnet-mask 255.255.255.0; option broadcast-address192.168.1.255; option domain-name-servers 192.168.1.1; option ntp-servers 192.168.1.1; range 192.168.1.101 192.168.1.200; } --Regards Ashishkumar S. Yadav ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] dhclient.conf
Hi all :-) on centos 6 I need keep the hostname from a dhcp server: cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=00:50:56:27:0E:C8 TYPE=Ethernet UUID=20924b21-e92a-4944-a054-06d1967155c1 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp PEERDNS=yes with this config, centos keep only ip from dhcp server (not gw, not dns) where is dhclient.conf? I need to create it? If yes, where're the default options? thanks for help! Pol ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] dhclient.conf being ignored!
It seems that the prominent North American Enterprise Linux vendor has decided that dhclient.conf should be ignored, i.e. ifup-eth causes dhclient to be called with "-cf /etc/dhclient-$(DEVICE).conf", and then ifup-eth/ifdown-eth wipes the file out each time. Through the use of "DHCP_HOSTNAME" in ifcfg-eth0 you can specify a host name, but because of the above behavior of ifup-eth other options don't seem to be able to be passed to dhclient. I tried placing supersede ntp-servers into dhclient-up-hooks, but that also seems to be ignored, and my google fu seems to be failing on how to build dhclient-enter-hooks for the purpose (if that would even help). anyone got better suggestions than: a) mod /etc/sysconfig/network-scripts/ifup-eth to build /etc/dhclient-$(DEVICE).conf combining the options I want. b) brute forcing things with `chattr +i /etc/ntp.conf` -- Todd Denniston Crane Division, Naval Surface Warfare Center (NSWC Crane) Harnessing the Power of Technology for the Warfighter ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos