DHCP Option 66 can be used for a host name or an ip address. In both case it is normally a string.
If used for an IP address, according to what i'm used to, it is necessary to convert the IP address to a string. Using four hex values does not work, at least with Aastra phones.
So you need to put "s" before the IP address to convert it to an string :
and you'll get this raw value :
0x 31 39 32 2e 31 36 38 2e 31 31 32 2e 31 35 30
dhcp-server option print
# NAME CODE VALUE RAW-VALUE
6 TFTP server 66 s'192.168.112.150' 3139322e3136382e3131322e313530
If you try to use four hex values for the IP (like this : '192.168.112.150' ), a phone or Wireshark will not decode it correctly, as shown here in Wireshark :
When using four hex values for the option 66 code value you will get something like this :
TFTP Server Name: \300\250\310d
The same goes in the phone. So the phone will not take it and will try another method to get the tftp file server address, or will fail to download the config file.
When using hex values converted as a string (like this : s'192.168.112.150') you'll get the right IP address decoded inside Wireshark and it will work in the phone :
TFTP Server Name: 192.168.112.150
Another solution is to use an mDNS server on the IPBX side. Aastra / Mitel phones do know how to get the tftp server address from it.
I prefer to use DHCP option 66, as i have seen frequent crashes on the mDNS linux deamon.