LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-18-2011, 07:40 PM   #1
Arodef
Member
 
Registered: Apr 2004
Distribution: Centos, Fedora
Posts: 125

Rep: Reputation: 17
Which config file do I need to edit to disable getting hostname from DHCP server?


I need to disable the system from assigning its hostname when it gets its IP assignment from the DHCP server (aka my router). Which configuration file do I need to edit to disable that? I need the system to stick with its default hostname assignment (localhost.localdomain). I checked the usual suspects for networking but I didn't see anything that would indicate to get the hostname from the dhcp server. Thanks for any help!

Last edited by Arodef; 03-18-2011 at 07:46 PM.
 
Old 03-18-2011, 07:50 PM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
In Ubuntu there is a file "/etc/dhcp3/dhclient.conf" and there is:
Code:
request subnet-mask, broadcast-address, time-offset, routers,
    domain-name, domain-name-servers, domain-search, host-name,
    netbios-name-servers, netbios-scope, interface-mtu,
    rfc3442-classless-static-routes, ntp-servers;
Remove "host-name" from the list. It is nice solution, but server can be configured to force transmiting hostname, then remove the file "/etc/dhcp3/dhclient-exit-hooks.d/hostname".
 
Old 03-18-2011, 07:56 PM   #3
Arodef
Member
 
Registered: Apr 2004
Distribution: Centos, Fedora
Posts: 125

Original Poster
Rep: Reputation: 17
Thanks for the quick reply, I'm using RHEL/CentOS and it doesn't look like there's a matching file for that.
 
Old 03-18-2011, 08:42 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Look for a /etc/dhclient-eth0.conf file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hostname is not getting updated by dhcp server hv905c Linux - Server 2 11-14-2007 11:18 AM
LAN Server w/DHCP - hostname? dbc001 Linux - Server 6 08-03-2007 07:07 PM
help to edit Edit my bootloader's config file from kernel prompt jagdishpandey Linux - Kernel 5 07-03-2007 06:59 AM
How to edit a config file in FC4? heffo_j Fedora 7 12-12-2005 09:20 PM
Laptop doesn't get hostname from DHCP server wyohman Mandriva 5 06-01-2005 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration