Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] How to stop dhcpcd from looking up hostname?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 321

PostPosted: Sat Aug 09, 2008 4:55 pm    Post subject: [Solved] How to stop dhcpcd from looking up hostname? Reply with quote

Hi,

Every time I start my pc, it would try to look up the hostname of my pc. But my dhcp server do not provide that function, and it always saying it failed to look up the hostname. What's more annoying, when I work in a windows domain, it would find a wired hostname, which is actually belongs to another windows pc.

I read the man page carefully, and googled for a while, but did not find any way to stop the dhcpcd from looking up the hostname. Could someone help me stop it.

Many thanks :)
_________________
David Shen


Last edited by davidshen84 on Wed Aug 13, 2008 1:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Mon Aug 11, 2008 2:21 am    Post subject: Reply with quote

/etc/conf.d/net:

Quote:
dhcp_eth0="nosendhost"


from /etc/conf.d/net.example.

cheers
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 321

PostPosted: Tue Aug 12, 2008 2:09 am    Post subject: Reply with quote

bunder wrote:
/etc/conf.d/net:

Quote:
dhcp_eth0="nosendhost"


from /etc/conf.d/net.example.

cheers


Thanks, but that does not seem to work for me. I edit the /etc/conf.d/net file and reboot my pc, I still have a wired hostname retrieved from the dhcp server. Does that host name can be cached in my local? How can I remove it?

Thanks again.
_________________
David Shen
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Tue Aug 12, 2008 12:44 pm    Post subject: Reply with quote

what is in /etc/conf.d/hostname??

Code:
cat /etc/conf.d/hostname
# /etc/conf.d/hostname

# Set to the hostname of this machine
HOSTNAME="amd"


If this is set to "localhost" or nothing then dhcp will always try and set the hostname
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Aug 12, 2008 5:08 pm    Post subject: Reply with quote

dhcpcd-4 no longer does this by default
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 321

PostPosted: Wed Aug 13, 2008 12:52 pm    Post subject: Reply with quote

richard.scott wrote:
what is in /etc/conf.d/hostname??

Code:
cat /etc/conf.d/hostname
# /etc/conf.d/hostname

# Set to the hostname of this machine
HOSTNAME="amd"


If this is set to "localhost" or nothing then dhcp will always try and set the hostname


Yes it is "localhost"...So, I should change it, right? Thanks. :)
_________________
David Shen
Back to top
View user's profile Send private message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 321

PostPosted: Wed Aug 13, 2008 12:54 pm    Post subject: Reply with quote

UberLord wrote:
dhcpcd-4 no longer does this by default


Sorry, but what is a dhcpcd-4? The next version of dhcpcd, right? But I found cannot emerge it right now...:(
_________________
David Shen
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Aug 13, 2008 1:38 pm    Post subject: Reply with quote

Yes, it's the next version. It's currently masked as it's not "stable" yet. However you can unmask it by adding "net-misc/dhcpcd" to /etc/portage/package.keywords
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
rahulthewall
Veteran
Veteran


Joined: 01 Nov 2007
Posts: 1264
Location: Zürich

PostPosted: Wed Aug 13, 2008 1:38 pm    Post subject: Reply with quote

davidshen84 wrote:
UberLord wrote:
dhcpcd-4 no longer does this by default


Sorry, but what is a dhcpcd-4? The next version of dhcpcd, right? But I found cannot emerge it right now...:(


That is because it is masked. You can add it to /etc/portage/package.keywords if you want to install it. However, please remember that it is not marked as stable yet by the Gentoo team, so you might experience some problems. However, I am using the latest version of dhcpcd and it works without a problem for me.
_________________
Who shall guard the guards?
Back to top
View user's profile Send private message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 321

PostPosted: Thu Aug 14, 2008 7:15 am    Post subject: Reply with quote

rahulthewall3000 wrote:
davidshen84 wrote:
UberLord wrote:
dhcpcd-4 no longer does this by default


Sorry, but what is a dhcpcd-4? The next version of dhcpcd, right? But I found cannot emerge it right now...:(


That is because it is masked. You can add it to /etc/portage/package.keywords if you want to install it. However, please remember that it is not marked as stable yet by the Gentoo team, so you might experience some problems. However, I am using the latest version of dhcpcd and it works without a problem for me.


Thanks. By setting a new hostname in /etc/conf.d/hostname, dhcpcd works for me as expected. I think I do not need dhcpcd-4 for now.:)
_________________
David Shen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum