pick host entries depending on interface address?

Antonio Goméz Soto antonio.gomez.soto at gmail.com
Fri Jan 8 17:43:34 UTC 2010


Op 08-01-10 17:29, Simon Hobson schreef:
> Antonio Goméz Soto wrote:
>
>> I have the following problem:
>>
>> - given a linux system on a base network serving multiple sites
>> - VoIP phones from different brands, that need different DHCP options.
>>
>> I didn't want to match on vendor-specific options, so initially I
>> auto-generated the following file from the phone database:
>>
>> group { # Company empty
>> group { # Building office
>> option time-offset 3600;
>> shared-network OFFICENET {
>> subnet 10.0.0.0 netmask 255.255.255.0 { # OFFICE_IPNET
>> option routers 10.0.0.1;
>> range 10.0.0.100 10.0.0.200;
>> host phone-4-on-OFFICENET { # Aastra 55i
>> hardware ethernet 00:08:5D:19:73:4A;
>> option tftp-server-name "http://10.0.0.1/ps/aastra/cfg";
>> }
>> etcetera
>
> NOTE - HOST STATEMENTS ARE GLOBAL IN SCOPE. As is stated on this list
> quite regularly, and in the warning I believe dhcpd now emits when
> starting up with a config like yours. Put simply they will NOT work like
> you are expecting. To be more specific, if you embed host statements in
> anything but the global scope then you will get option inheritance
> issues that you almost certain do not want.
>
>
>> How do I get it to server the proper tftp-server-name values depending
>> on the phones' vlan?
>
> Do you want different options for different classes of device ? If not,
> then you can do something as simple as this :
>
> subnet .... {
> option tftp-server-name "something" ;
> ...
> }
> subnet .... {
> option tftp-server-name "something else" ;
> ...
> }
>

Hi Simon,

yes, I want diffferent options for different classes of devices,
AND for the same device diferent options depending on the subnet
they reside.

Thanks,
Antonio





More information about the dhcp-users mailing list