View previous topic :: View next topic |
Author |
Message |
Watchwolf n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 22 Nov 2006 Posts: 39
|
Posted: Fri Nov 23, 2007 6:25 pm Post subject: [DHCP] dhclient and DNS |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
didymos Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1790706086435438446060f.jpg)
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Sat Nov 24, 2007 8:02 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Watchwolf n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 22 Nov 2006 Posts: 39
|
Posted: Sat Nov 24, 2007 4:42 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
didymos Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1790706086435438446060f.jpg)
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Sun Nov 25, 2007 5:38 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|
|
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
|
|