Host declaration for multiple hardware interfaces and multiple

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Mar 30 07:13:12 UTC 2011


Rainer Stumbaum wrote:

>subnet a {
>   ddns-domainname "access.example.org";
>   ddns-hostname = host-decl-name;
>...
>		host test01 {
>			hardware ethernet 00:50:56:8e:5e:c1;
>			fixed-address 10.20.30.21;
>			}
>...

You can forget anything like that - host declarations are global in 
scope irrespective of where you define them. However, they also have 
inheritance based on where they are defined which can lead to strange 
effects where a host gets (for example) the wrong routers !

I think we've only ever had one enquiry on here where that latter 
effect was desired, so just keep the host declarations global.

But going back to the original problem. If you keep the data in a 
database, then your can have your script generate the hostname 
declarations at the same time as the host declaration. Store the 
hostname you want used, and have your script tack on some subnet 
specific suffix for the host declaration.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the dhcp-users mailing list