3

Our Current DHCPD.conf looks like the following.

subnet 10.0.32.0 netmask 255.255.255.0
{
        range 10.0.32.100 10.0.32.254;
        option subnet-mask 255.255.255.0;
        option broadcast-address 10.0.32.255;
        option domain-name-servers 208.67.222.222,208.67.220.220;
        option routers 10.0.32.5;

        host Dev-ABaird-W {
                hardware ethernet 00:1D:09:3E:49:13;
                fixed-address 10.0.32.94;
    }

    ... more static hosts ....

}

About as basic as it gets. The old router is 10.0.32.1, our company wanted to implement a squid proxy to better monitor web traffic while at work, and if necessary block large time-wasters, IE Facebook.com.

However, we've quickly realized that this change has played a mean prank on our Polycom SIP Phones. Occasionally our phones will not ring, the end recipient hears ringing (this is artificially created by our PBX) however the handset never rings. The ONLY thing that has changed in our network is the option routers line.

So, Since all Polycom MAC addresses begin with 00:04:F2 would it be possible in DHCP to say any 00:04:F2:::* MAC addresses get option routers 10.0.32.1, and anything else must talk with our Gateway?

grufftech
  • 6,620
  • 4
  • 35
  • 37

2 Answers2

4

You can use a conditional expression to match against the MAC address of the phones:

if substring(hardware, 1, 3) = 00:04:f2 {
    option routers 10.0.32.1;
} else {
    option routers 10.0.32.5;
}

I tested this inside a subnet stanza, but I believe it will work anywhere that an option command will work. Tested with ISC DHCPD 3.1.2.

James Sneeringer
  • 6,755
  • 23
  • 27
0

I believe what your looking for is groups. Groups will allow to you pass different options, such as routers, to different groups of hosts.

For example.

subnet 10.0.32.0 netmask 255.255.255.0
{
        range 10.0.32.100 10.0.32.254;
        option subnet-mask 255.255.255.0;
        option broadcast-address 10.0.32.255;
        option domain-name-servers 208.67.222.222,208.67.220.220;
        option routers 10.0.32.1;
}


group {
     # Group uses a different router.
     option routers 10.0.32.5;

     host Dev-ABaird-W {
                hardware ethernet 00:1D:09:3E:49:13;
                fixed-address 10.0.32.94;
     }

     ... more hosts ...
}
David
  • 3,519
  • 21
  • 17