dynamic dns - omitting duplicate names
Barnaby Scott
bds at waywood.co.uk
Wed Mar 25 17:48:45 UTC 2009
Glenn Satchell wrote:
> Hi Barnaby
>
> I think you could handle this quite simply by creating a class, eg:
>
> # perform dns updates for every client
> ddns-update-style interim;
>
> # except those in this class
> class "music-players" {
> match if option host-name = "musicplayer";
> ddns-updates off;
> }
>
> Alternatively you could assign a new ddns-hostname in the class,
> perhaps with a suffix containing part or all of the mac or ip address.
>
> regards,
> -glenn
Thanks Glenn, that's beaut!
I feel a bit guilty because it's all there in man dhcpd.conf - I had
read it, but it's only now that you show me how that the fog begins to
clear!
What I wanted to achieve is now working perfectly, but if I may, I have
one more query:
Given your lead, I tried to go one step further and use a substring, but
that doesn't seem to work.
Copying yours, I now have:
class "music-players" {
match if option host-name = "SonosZP";
ddns-updates off;
However there is also a thing on the network calling itself a SonosCR.
Though there is only one of these (+ multiple SonosZP's), the chances
are there might be more than one in future. In trying to be clever and
anticipate this I tried:
class "music-players" {
match if substring (option host-name, 1, 5) = "Sonos";
ddns-updates off;
but this doesn't work. Any idea why?
Many thanks again for your excellent answer.
Barnaby
More information about the dhcp-users
mailing list