Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[DHCP] dhclient and DNS
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
Watchwolf
n00b
n00b


Joined: 22 Nov 2006
Posts: 39

PostPosted: Fri Nov 23, 2007 6:25 pm    Post subject: [DHCP] dhclient and DNS Reply with quote

hello,

I have a problem with dhclient, he doesn't add DNS in /etc/resolv.conf. :/

Apparently he got DNS from the router:

Quote:

/var/lib/dhcp/dhclient.leases

lease {
interface "eth0";
fixed-address 192.168.1.4;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
option dhcp-lease-time 86400;
option dhcp-message-type 5;
option domain-name-servers 192.168.1.1;
option dhcp-server-identifier 192.168.1.1;
option dhcp-renewal-time 43200;
option dhcp-rebinding-time 73440;
renew 6 2007/11/24 03:22:17;
rebind 6 2007/11/24 14:34:20;
expire 6 2007/11/24 18:10:20;
}


The configuration is
Quote:
cat /etc/dhcp/dhclient.conf
send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
send dhcp-lease-time 3600;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-servers;
timeout 60;
retry 60;
reboot 10;
select-timeout 5;
initial-interval 2;


I don't know why, maybe you have a idea ?
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Sat Nov 24, 2007 8:02 am    Post subject: Reply with quote

Have you tried using /etc/conf.d/net and letting the initscripts handle it instead? Either that or just manually set 192.168.1.1 as your name server in resolv.conf. If that address is constant, there's not much point in having it "dynamically" updated every time you get a lease. Another option: just use another client, like dhcpcd. I mean, yeah, it should work, but it's less hassle to just circumvent dhclient.
_________________
Thomas S. Howard
Back to top
View user's profile Send private message
Watchwolf
n00b
n00b


Joined: 22 Nov 2006
Posts: 39

PostPosted: Sat Nov 24, 2007 4:42 pm    Post subject: Reply with quote

I have to get DNS from dhclient, I can't use dhcpd or just add my DNS in resolv.conf. :(
3 weeks ago dhclient worked correctly, I don't know when this "bug" started.
Back to top
View user's profile Send private message
didymos
Advocate
Advocate


Joined: 10 Oct 2005
Posts: 4798
Location: California

PostPosted: Sun Nov 25, 2007 5:38 am    Post subject: Reply with quote

Why do you have to get DNS from dhclient? The dhcp server on the other end may draw from a pool of various DNS servers, but the IP addresses of those servers are almost certainly static and probably permanently allocated. You should be able to statically configure resolv.conf, no problem. My ISP, for example, instructs you to use DNS autoconfiguration, but I've never done that. I just found out the IP addresses of the nearest DNS servers, and set them myself.
_________________
Thomas S. Howard
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