DHCP client DNS -> DHCP server DNS

Hi!

I'm using dhclient for WAN and isc-dhcpd43 for LAN. How do I supply my LAN clients with the DNS addresses supplied by my ISP?

Thanks in advance,

Radium, Sweden
 
Aha! So dhclient(8) writes to /etc/resolv.conf when it obtains DNS server addresses? Does ISC dhcpd read from /etc/resolv.conf by default if I don't define any in name servers in dhcpd.conf?
 
SirDice said:
Radium said:
So dhclient(8) writes to /etc/resolv.conf when it obtains DNS server addresses?
Yes.
Does ISC dhcpd read from /etc/resolv.conf by default if I don't define any in name servers in dhcpd.conf?
No, it simply won't provide DNS server addresses.

It seems that nobody understands what I'm trying to do. I want dhclient to hand the name servers to dhcpd.conf and I've also set up two VLANs on the WAN port and dhclient requests information that I want to relay to two of my LAN clients via dhcpd. Looking into /sbin/dhclient-script doesn't make me any wiser on how to do this. The information that I want to relay is inside the .leases files for the two VLANs. I've also considered using dhcrelay but that one doesn't seem to be able to help me in any way as it will relay ALL requests. I still want my LAN clients to remain in my LAN but get some extra info only available after dhclient has sent requests to the two VLANs. The two VLANs in question are VoIP and IPTV, with VLAN ID 855 and 845.

Does anyone know the cleanest way to do this? :q
 
You will have to script something yourself. Something that dynamically changes dhcpd.conf. There's no configuration setting that does this 'automagically'.
 
Some replacement DNS forwarders that also implement a DHCP server have an option to do exactly that, for example dns/dnsmasq. Unfortunately the ISC DHCPd was never designed to be used in such way, there's an implicit assumption that the DNS forwarders provided by the DHCP server would be at static well known addresses that do not change often. The DNS forwarder addresses provided by your ISP's DHCP service are often not very static and can change suddenly when the WAN interface gets a new address from a completely new subnet.
 
I'd set up a caching only DNS server on the gateway and have DHCPd supply that address. The caching DNS server will take care of the resolving upstream.
 
Back
Top