Koozali.org: home of the SME Server
Obsolete Releases => SME Server 9.x => Topic started by: globalsi on October 18, 2017, 05:53:06 PM
-
Hi,
I have a SME9.2 in serveronly mode. He's doing the DHCP.
Is it possible to configure the SME DHCP with 2 DNS servers : the SME himself in priority and another external DNS (for example 8.8.8.8 ) when the SME is down (for maintenance for example) ?
Thanks.
-
If your SME is down it can't do anything :-)
This may help:
https://wiki.contribs.org/Dhcpmanager
You can set custom DNS, but that will only help clients that have got an IP address
-
If your SME is down it can't do anything :-)
sure :-o
You can set custom DNS, but that will only help clients that have got an IP address
Yes, it will be case for the majority of the machines.
Thank you.
-
globalsi
In the client (eg Windows) under Network in Control Panel, you can configure an alternate DNS server.
Typically this would be set to "Obtain DNS server address automatically", but you can manually set a primary DNS server IP & an alternate server IP address.
This should apply to other client OS's.
As stated if the SME server is down, then any alternate DNS settings entered there will be inaccessible.
-
janet,
Yes, i can do it manually but i prefer do it automatically with the DHCP (easier and faster 8-) )
As stated if the SME server is down, then any alternate DNS settings entered there will be inaccessible.
I'm disagree.
All computers will receive from the DHCP a primary DNS server (SME) and an alternate DNS server (with lease-time equal 1 day)
If i shutdown the SME server, the computers will use the alternate DNS server for the web or emails...
-
globalsi
AFAIK any alternate DNS settings possible in SME server, are for SME server to access an external DNS server or alternate external DNS server if the first one is down.
Normally external DNS servers are not setup in SME, as SME server can do DNS lookups on its own
-
You can create a custom copy of 25DomainNameServers to do this.
mkdir -p /etc/e-smith/templates-custom/etc/dhcpd.conf
cd /etc/e-smith/templates-custom/etc/dhcpd.conf
# note the dot at the end of the next line...
cp /etc/e-smith/templates/etc/dhcpd.conf/25DomainNameServers .
Edit the custom version of 25DomainNameServers to show the DNS servers you want to use. The default value is { $LocalIP } (the curly braces cause perl evaluation in the output, while plain text is output as-is). Multiple values should be comma delimited, and the line should end in a semicolon eg:
option domain-name-servers my.ns1.com,192.168.1.99,my.third.nsserver.com;
The way I read the docs for dhcpd.conf, the dhcp server is doing the name lookups if you use names in the config file, then providing all resulting IP addresses to the clients.
To activate your changes:
expand-template /etc/dhcpd.conf
sv t dhcpd
To completely remove your changes:
rm -f /etc/e-smith/templates-custom/etc/dhcpd.conf/25DomainNameServers
expand-template /etc/dhcpd.conf
sv t dhcpd
[edit]
For your original request (add "8.8.8.8" as a secondary DNS for clients), add that IP after { $LocalIP } and before the semicolon:
option domain-name-servers { $LocalIP },8.8.8.8;
-
A question... what hapoens on a client when they refresh their address and the server is down?
Does it use the existing data?
Clearly if a client boots/reboots with the server down it will not get any details.
-
ReetP,
If they ask a new ip and the DHCP server is off, they will receive no answer and get no ip (and no dns) -> no network (local or not).
Luckily, if a machine reboot, it will ask a new ip only if the lease expires.
-
AFAIK any alternate DNS settings possible in SME server, are for SME server to access an external DNS server or alternate external DNS server if the first one is down.
Normally external DNS servers are not setup in SME, as SME server can do DNS lookups on its own
I don't need the SME server use an alternate DNS, i need to have an alternate dns in the computers configuration if my server SME is down for 1 hour or 2.
-
Thank you mmccarn for your tip !
It's lighter that install Dhcpmanager.
-
ReetP,
If they ask a new ip and the DHCP server is off, they will receive no answer and get no ip (and no dns) -> no network (local or not).
Luckily, if a machine reboot, it will ask a new ip only if the lease expires.
OK.
Never had the experience but.... !
-
All computers will receive from the DHCP a primary DNS server (SME) and an alternate DNS server (with lease-time equal 1 day)
This can only work if either 1) you don't ever care about any of the forward and reverse DNS zones which SME server manages locally or 2) you configure some system to mirror SME server's local zones on your alternate DNS server.
How much downtime does your SME server suffer?
-
How much downtime does your SME server suffer?
Mine? Prior preparation and planning prevents piss poor performance.
Something verging on zero in my case :-) If it was more than a few minutes for an upgrade reboot I'd have my boss on my back. And if you'd ever met my wife you'd know how ugly that can get.....
ROFLMAO.....
-
How much downtime does your SME server suffer?
For me, it's also for some minors down time (mainly updated and reboot (my wife is fed up that I work at night ... :? ); optionally change inverter)
-
This can only work if either 1) you don't ever care about any of the forward and reverse DNS zones which SME server manages locally or 2) you configure some system to mirror SME server's local zones on your alternate DNS server.
I should explain. This is because all alternative DNS servers should always (within TTL during changes) return the same data for all queries.