On 2009-03-23, Lars Hansson <[email protected]> wrote:
> Hey,
> I have some problems with using OpenBSD 4.4's dhcpd together with
> Mitel VoIP phones that I'd hope someone could shed some light on.
> Mitel VoIP phones requires custom options to load firmware, set VLAN
> etc and i cant quite get it to work with OpenBSD's dhcpd. it works
> fine one a Linux box running isc-dhcp 3.0.6 although curiously not
> enough on isc-dhcp on OpenBSd 4.4.
>
> ISC-DHCP:
> # MITEL specific options
> option space mitel;
> option mitel.tftp code 128 = ip-address;
> option mitel.icp code 129 = ip-address;
> option mitel.id code 130 = text;
> option mitel.vlan code 132 = signed integer 32;
> option mitel.l2p code 133 = signed integer 32;
> option mitel.dscp code 134 = unsigned integer 8;
>
> option mitel.tftp 172.30.179.7;
> option mitel.icp 10.107.10.17;
> option mitel.id "MITEL IP PHONE";
> option mitel.vlan 11;
> option mitel.l2p 6;
> option mitel.dscp 46;
>
> I know OpenBSd's dhcp does not support options the same way but I
> thought the below would work:
>
> option option-128 "172.30.179.7";
> option option-129 "10.107.10.17";
..
> option mitel.vlan 02;
> option mitel.l2p 06;
> option mitel.dscp 46;
you are giving these as text strings, but the phone actually requires IP
addresses or numbers.
you can patch like this,
Index: tables.c
===================================================================
RCS file: /cvs/src/usr.sbin/dhcpd/tables.c,v
retrieving revision 1.8
diff -N -u -p tables.c
--- tables.c 13 Jan 2009 21:11:57 -0000 1.8
+++ tables.c 23 Mar 2009 19:53:22 -0000
@@ -190,13 +190,13 @@ struct option dhcp_options[256] = {
{ "option-125", "X", &dhcp_universe, 125 },
{ "option-126", "X", &dhcp_universe, 126 },
{ "option-127", "X", &dhcp_universe, 127 },
- { "option-128", "X", &dhcp_universe, 128 },
- { "option-129", "X", &dhcp_universe, 129 },
- { "option-130", "X", &dhcp_universe, 130 },
+ { "mitel-tftp", "I", &dhcp_universe, 128 },
+ { "mitel-icp", "I", &dhcp_universe, 129 },
+ { "mitel-id", "X", &dhcp_universe, 130 },
{ "option-131", "X", &dhcp_universe, 131 },
- { "option-132", "X", &dhcp_universe, 132 },
- { "option-133", "X", &dhcp_universe, 133 },
- { "option-134", "X", &dhcp_universe, 134 },
+ { "mitel-vlan", "l", &dhcp_universe, 132 },
+ { "mitel-l2p", "l", &dhcp_universe, 133 },
+ { "mitel-dscp", "B", &dhcp_universe, 134 },
{ "option-135", "X", &dhcp_universe, 135 },
{ "option-136", "X", &dhcp_universe, 136 },
{ "option-137", "X", &dhcp_universe, 137 },
these ones have a whole bunch of clashes with other vendor options (see
http://www.iana.org/assignments/bootp-dhcp-parameters/) and they aren't
assigned or tentatively assigned, so I don't think they can be hard-
coded into our dhcpd by default.