Koozali.org: home of the SME Server

howto configure DHCP server to assign DNS servers

Offline swissis

  • ***
  • 61
  • +0/-0
howto configure DHCP server to assign DNS servers
« on: June 16, 2006, 01:09:01 PM »
Hi, on SME 6 i used a contric dhcpmanager. with that i was able to assign a primary and secondary dns server to the leases.
How can this be done in 7rc3 without contrib?
...

Offline mmccarn

  • *
  • 2,656
  • +10/-0
howto configure DHCP server to assign DNS servers
« Reply #1 on: June 16, 2006, 02:51:13 PM »
Caveat: I've never done this, I don't know if it's a good idea with a SME server, and I don't know what actual problem you're going to fix by doing this.  

You should be able to do what you want by setting the "Corporate DNS Servers" under "Configuration", "Domains", "Modify corporate DNS settings" in the server-manager; this causes the SME server to use the specified servers for all non-local lookups, instead of resolving all values itself...

If you still want custom DNS entries for your workstations, it looks like you could:

# mkdir -p /etc/e-smith/templates-custom/etc/dhcpd.conf
# cp /etc/e-smith/templates/etc/dhcpd.conf/25DomainNameServers /etc/e-smith/templates-custom/etc/dhcpd.conf
# pico /etc/e-smith/templates-custom/etc/dhcpd.conf/25DomainNameServers


Modify 25DomainNameServers to reflect the DNS server settings you want to use, making it look something like this:
option domain-name-servers a.b.c.d, w.x.y.z;

then

# expand-template /etc/dhcpd.conf
# service dhcpd restart


If you're feeling ambitious you could create new configuration database entries and modify your custom template to use these values.

The following command would set the configuration database value for dhcpd:domain-name-servers to the specified values, creating the necessary data items if they don't already exist:
# db configuration setprop dhcpd domain-name-servers a.b.c.d,w.x.y.z

Look at 02setupRange for a sample of how to read values from the configuration database.

Good luck!

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: howto configure DHCP server to assign DNS servers
« Reply #2 on: June 16, 2006, 04:06:59 PM »
Quote from: "swissis"
Hi, on SME 6 i used a contric dhcpmanager. with that i was able to assign a primary and secondary dns server to the leases.


You don't need to. The SME server already includes a reliable caching DNS resolver, and tells the clients to use it via the DHCP leases. If you tell the clients to use different DNS servers than the server itself uses, you are almost certain to have confusing problems.

To put it another way, the DHCP server is already configured to assign DNS servers.

Offline swissis

  • ***
  • 61
  • +0/-0
howto configure DHCP server to assign DNS servers
« Reply #3 on: June 17, 2006, 10:51:51 AM »
The problem i have is the following.

Behind my sme-server 172.16.10.9 is a windows domain and a windows dns-server with ip 172.16.10.12

with the lease the clients get only 172.16.10.9 as dns with works fine for internet. but if i want to do something with group-policy editor or window domain based stuff the domain can't be found.

I used to assign 172.16.10.12 as primary, and 172.16.10.9 as secundary dns-server to the clients by lease with the dhcp-manager.

Then everything work fine.

If i'm doing some totaly wrong please tell me
...

Offline mmccarn

  • *
  • 2,656
  • +10/-0
howto configure DHCP server to assign DNS servers
« Reply #4 on: June 17, 2006, 02:46:19 PM »
Gotta love Active Directory!

I think your problems will go away if you set your SME box to use a "Corporate DNS Server"

- open the server-manager
- click "Domains" (under "Configuration")
- click on "Modify corporate DNS settings"
- set your "Primary corporate DNS server" to 172.16.10.12

Now when your XP clients do DNS lookups for Active Directory information the SME box will forward the request to 172.16.10.12 and hopefully the lookup will succeed.  If not, you'll need to do what you did before - set 172.16.10.12 as the primary DNS server for the workstations...

Offline swissis

  • ***
  • 61
  • +0/-0
howto configure DHCP server to assign DNS servers
« Reply #5 on: June 19, 2006, 12:22:59 PM »
I tried the  "Corporate DNS Server" option but it didn't work.

With the user-template however it works fine.

Thanks
...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
howto configure DHCP server to assign DNS servers
« Reply #6 on: June 19, 2006, 11:02:14 PM »
Quote from: "swissis"
I tried the  "Corporate DNS Server" option but it didn't work.


It would work I believe if you also disabled the DHCP server on the SME server and enabled it on the Windows box. Your problem comes about because you have two "bosses" on the one network.

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
howto configure DHCP server to assign DNS servers
« Reply #7 on: June 20, 2006, 02:47:19 AM »
swissis

The proper way to do it is to dissable the SME DHCP as well as the domain contol and enable DHCP as well as setup the windows server as the domain controller ...  then tell the windows server to rout the ppl to the internet gatway through your SME server.

This is the only way you will ba able to do things with the windows group-policy.

I have this setup here at work and it works as required ... we have 2 x windows 2000 servers ... 1 x PDC, 1 X BDC then we have the SME server just as an e-mail/web/ftp/ what ever else it does except PDC and DHCP.

If you require a more detailed setup I will have to look at the configs and let you know.

Regards,

Tib