Project

General

Profile

Actions

Bug #499

closed

DHCP custom options on multiple interfaces not handled properly

Added by Chris Buechler almost 14 years ago. Updated over 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
DHCP (IPv4)
Target version:
Start date:
04/11/2010
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0
Affected Architecture:

Description

When you have custom options defined on multiple interfaces, only the first interface is handled correctly. Example config:

 <dhcpd>
                <lan>
                        <enable/>
                        <range>
                                <from>192.168.1.10</from>
                                <to>192.168.1.245</to>
                        </range>
                        <defaultleasetime/>
                        <maxleasetime/>
                        <netmask></netmask>
                        <failover_peerip/>
                        <gateway/>
                        <domain/>
                        <domainsearchlist/>
                        <ddnsdomain/>
                        <tftp/>
                        <ldap/>
                        <next-server/>
                        <filename/>
                        <rootpath/>
                        <numberoptions>
                                <item>
                                        <number>128</number>
                                        <value>VLAN-A=100;</value>
                                </item>
                        </numberoptions>
                </lan>
                <opt2>
                        <range>
                                <from>172.16.100.100</from>
                                <to>172.16.100.200</to>
                        </range>
                        <defaultleasetime/>
                        <maxleasetime/>
                        <netmask/>
                        <failover_peerip/>
                        <gateway/>
                        <domain/>
                        <domainsearchlist/>
                        <enable/>
                        <ddnsdomain/>
                        <tftp>111.222.111.222</tftp>
                        <ldap/>
                        <next-server/>
                        <filename/>
                        <rootpath/>
                        <numberoptions>
                                <item>
                                        <number>2</number>
                                        <value>-18000</value>
                                </item>
                        </numberoptions>
                        <ntpserver>172.16.100.1</ntpserver>
                </opt2>
        </dhcpd>

Results in dhcpd.conf:

option ldap-server code 95 = text;
option domain-search-list code 119 = text;
option custom-opt-0 code 128 = text;
option custom-opt-1 code 2 = text;

default-lease-time 7200;
max-lease-time 86400;
log-facility local7;
ddns-update-style none;
one-lease-per-client true;
deny duplicates;
ping-check true;
authoritative;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
        pool {
                range 192.168.1.10 192.168.1.245;
        }
        option routers 192.168.1.1;
        option domain-name-servers 192.168.1.1;

        option custom-opt-0 "VLAN-A=100;";
}
subnet 172.16.100.0 netmask 255.255.255.0 {
        pool {
                range 172.16.100.100 172.16.100.200;
        }
        option routers 172.16.100.1;
        option domain-name-servers 172.16.100.1;
        option ntp-servers 172.16.100.1;
        option tftp-server-name "111.222.111.222";

        option custom-opt-0 "-18000";

}
Actions #1

Updated by Ermal Luçi almost 14 years ago

  • Status changed from New to Feedback
Actions #2

Updated by Josh Stompro over 13 years ago

I can confirm that this is resolved in snapshot " Nanobsd i386 Beta4 Dec 2 11:27:45 EST 2010"

Entering the same thing as Chris results in the following

dhcpd.conf

option domain-name "example.org";
option ldap-server code 95 = text;
option domain-search-list code 119 = text;
option custom-lan-0 code 128 = text;
option custom-opt1-0 code 2 = text;

default-lease-time 7200;
max-lease-time 86400;
log-facility local7;
ddns-update-style none;
one-lease-per-client true;
deny duplicates;
ping-check true;
authoritative;
subnet 192.168.227.0 netmask 255.255.255.192 {
        pool {
                range 192.168.227.36 192.168.227.62;
        }
        option routers 192.168.227.1;
        option domain-name "example.org";
        option domain-search-list "example.org";
        option domain-name-servers 192.168.227.1;

        option custom-lan-0 "VLAN-A=100;";
}

subnet 192.168.1.0 netmask 255.255.255.0 {
        pool {
                range 192.168.1.130 192.168.1.245;
        }
        option routers 192.168.1.1;
        option domain-name-servers 192.168.1.1;
        default-lease-time 1800;
        max-lease-time 5400;

        option custom-opt1-0 "-18000";
}

Actions #3

Updated by Jim Pingle over 13 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF