pick host entries depending on interface address?

Antonio Goméz Soto antonio.gomez.soto at gmail.com
Fri Jan 8 16:16:52 UTC 2010


Hi,

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

So I created host entries containing the mac address. This worked great.

But now VLANs come into play. And the same phone needs a different
IP address for the tftp-server-name depending on which VLAN it is on.

I want the phone to boot (out of the box), receive a tftp-server option
with an ip in the base VLAN. This tftp server will serve it a
config stating the actual vlan, the phone will reboot into the actual VLAN
contact the same dhcp server, which will now give it a new tftp-server
with an ip in the VLAN.

Initially I copied all host entries into both shared-network segments,
but DHCP chooses only the first one.

How do I get it to server the proper tftp-server-name values depending
on the phones' vlan?

Thanks,
Antonio










More information about the dhcp-users mailing list