DHCP Option 66 on Cisco devices

Status
Not open for further replies.

Eli55

Customer
Joined
Jan 2, 2017
Messages
67
Reaction score
6
Hello. We have a couple of satellite offices. We are using yealink and grandstream phones. Satellite offices are on a different subnet and are connected via site to site VPN. I set the DHCP option 66 to the following link: http://domain.3cx.us:5000/provisioning/(random code). Its not working as phones are restarted. What is the right way of doing this? Thanks
 
By Cisco devices do you mean the SPA devices or older Cisco devices?

https://www.3cx.com/Sip-Phones/Cisco-SPA/
https://www.3cx.com/sip-phones/cisco-7940g-7960g/

Those articles cover the DHCP Option 66 configuration

Not working is a very generic statement. But assuming you setup Option 66 correctly then my guess is that this is a networking issue and not a 3CX issue. Most likely you haven't configured internal DNS to resolve your FQDN to the internal IP address and thus over the VPN, so the provisioning requests are going over the internet and aren't working. The easiest way to test would be first to see if you can hit the management console at http://domain.3cx.us:5000 from that satellite office.
 
From the phone logs:

Code:
<131>Nov  7 05:12:30 GUI [1341:1341]: WEB <3+error > 150.242.352:Start to listen the webserver...
<131>Nov  7 05:12:30 ATP [1086]: ATP <3+error > Get static config url is empty
<131>Nov  7 05:12:31 ATP [1086]: DURL<3+error > [HTTP]Client error, ret = 404
<131>Nov  7 05:12:31 ATP [1086]: DURL<3+error > [DCMN]url open fail, recode:-1
<131>Nov  7 05:12:31 ATP [1086]: ATP <3+error > http to file failed, code = 404, msg = , retry = 1
<131>Nov  7 05:12:31 ATP [1086]: DURL<3+error > [HTTP]Client error, ret = 404
<131>Nov  7 05:12:31 ATP [1086]: DURL<3+error > [DCMN]url open fail, recode:-1
<131>Nov  7 05:12:31 ATP [1086]: ATP <3+error > http to file failed, code = 404, msg = , retry = 1
<131>Nov  7 05:12:31 ATP [1086]: DURL<3+error > [HTTP]Client error, ret = 404
<131>Nov  7 05:12:31 ATP [1086]: DURL<3+error > [DCMN]url open fail, recode:-1
<131>Nov  7 05:12:31 ATP [1086]: ATP <3+error > http to file failed, code = 404, msg = , retry = 1

Code:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:5060            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:5061            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:8787          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:8787          127.0.0.1:38007         TIME_WAIT   
tcp        0      0 127.0.0.1:38003         127.0.0.1:8787          TIME_WAIT   
tcp        0      0 Y.Y.0.Y:55373        X.X.0.X:5000       TIME_WAIT   
tcp        0      0 127.0.0.1:8787          127.0.0.1:38006         TIME_WAIT   
tcp        0      0 127.0.0.1:8787          127.0.0.1:38004         TIME_WAIT   
tcp        0      0 127.0.0.1:8787          127.0.0.1:38001         TIME_WAIT   
tcp        0      0 Y.Y.0.Y:55372        X.X.0.X:5000       TIME_WAIT   
tcp        0      0 Y.Y.0.Y:55370        X.X.0.X:5000       TIME_WAIT   
tcp        0      0 Y.Y.0.Y:55371        X.X.0.X:5000       TIME_WAIT   
tcp        0      0 127.0.0.1:8787          127.0.0.1:38000         TIME_WAIT   
tcp        0      0 127.0.0.1:8787          127.0.0.1:38002         TIME_WAIT   
tcp        0      0 127.0.0.1:8787          127.0.0.1:37999         TIME_WAIT   
tcp        0      0 127.0.0.1:8787          127.0.0.1:38008         TIME_WAIT   
tcp        0      0 127.0.0.1:38005         127.0.0.1:8787          TIME_WAIT

Y.Y.0.Y is the phone IP and X.X.0.X is the correct PBX IP. The DHCP option 66 works and it is communicating directly with the PBX. Looks like it's giving 404 errors, which is a 3CX issue or a config issue. The config was done correctly according to https://www.3cx.com/sip-phones/dhcp-option-66/
 
Sorry, for some reason I read your original post as using Cisco phones.

When you say DNS works correctly, are you saying that you can specifically use http://domain.3cx.us:5000 from the satellite office and hit the management console? And if you ping/traceroute the FQDN from the satellite office it's resolving to the internal IP and going over the VPN?

(the above was written before your last post)

404 is a page not found. So that would only be a 3CX issue if it's actually getting to 3CX. So after confirming DNS resolution and trace is staying internal the next step is to try and manually download a config file. So this would be doing http:/domain.3cx.us:5001/provisioning/randompath/macaddress.cfg or something similar depending on the phone model. If that work works from the satellite office then it's time to start looking at the Option 66/phones.
 
Which link would I use for the phones to show up as new phones when they are plugged in?

I put a phonebook XML as a config just to test and got this:
Code:
<134>Nov  7 06:17:10 GUI [1072:1072]: STUI<6+info  > 030.821.678:OnProcessCallCenterMsg() currentpage :
<134>Nov  7 06:17:10 ATP [1086]: DURL<6+info  > [DCMN]download to file...
<134>Nov  7 06:17:10 ATP [1086]: DURL<6+info  > [DCMN]Enter Func dl_url_parse....
<134>Nov  7 06:17:10 ATP [1086]: DURL<6+info  > [DCMN]Skip Space Success!
<134>Nov  7 06:17:10 ATP [1086]: DURL<6+info  > [DCMN]Connecting domain.3cx.us:5000
<134>Nov  7 06:17:10 GUI [1072:1072]: ETLL<6+info  > 030.840.808:mkit_reply return [0], msgReply[0x60d03]: 0. result[0]
<134>Nov  7 06:17:10 ATP [1086]: DURL<6+info  > [DCMN]Connecting IP = X.X.0.X, Port = 5000
<134>Nov  7 06:17:10 ATP [1086]: DURL<6+info  > [HTTP]Request Line: GET /provisioning/(CODE)/yealink_phonebook.xml HTTP/1.1
<134>Nov  7 06:17:10 ATP [1086]: DURL<6+info  > [HTTP]Host: domain.3cx.us:5000
<134>Nov  7 06:17:10 ATP [1086]: DURL<6+info  > [HTTP]User-Agent: Yealink SIP-T41P 36.83.0.130 00:15:65:7a:24:b8
<134>Nov  7 06:17:10 ATP [1086]: DURL<6+info  > [HTTP]process response
<133>Nov  7 06:17:11 ATP [1086]: DURL<5+notice> [HTTP]response code: 200
<134>Nov  7 06:17:11 ATP [1086]: DURL<6+info  > [HTTP]Content-Length: 23357
<133>Nov  7 06:17:11 ATP [1086]: DURL<5+notice> [HTTP]response process finish!
<134>Nov  7 06:17:11 ATP [1086]: ATP <6+info  > need_cmp_md5=1
<131>Nov  7 06:17:11 ATP [1086]: ATP <3+error >  M7 model file sscanf error, ver_id=1097539896
<134>Nov  7 06:17:11 ATP [1086]: ATP <6+info  > Config file format is not support!
<131>Nov  7 06:17:11 ATP [1086]: ATP <3+error > Load model file fail
<133>Nov  7 06:17:11 ATP [1086]: ATP <5+notice> sync and protect switch not open!
<134>Nov  7 06:17:11 ATP [1086]: ATP <6+info  > Update fail, and return
<134>Nov  7 06:17:11 ATP [1086]: ATP <6+info  > Upgrade by DHCP option Fail
<131>Nov  7 06:17:11 ATP [1086]: ATP <3+error > url with auth parameter fail
<131>Nov  7 06:17:11 ATP [1086]: ATP <3+error > Get static config url fail

DHCP option 66 is working and the phone is picking it up correctly. We want to see the phones as new phones when they are plugged in so it's easy to configure them, rather than going to the web interface, putting the links, adding mac addresses to 3cx, etc.
 
I was able to get the PnP provisioning working using a 3cx SBC. Thank you cobaltit
 
So for future reference, phones showing as 'new' in the console relies on PnP which is either local to the phone or via SBC. If you wanted DHCP Option 66 to work you would first add the phone manually to the extension via the MAC address and then 3CX will have a configuration file. If you don't add them first, then 3CX won't have a configuration file to send to the phone when it requests it.
 
  • Like
Reactions: Eli55
Status
Not open for further replies.

Forum statistics

Threads
111,991
Messages
590,166
Members
164,929
Latest member
Cloudstar