How to set Server DHCP options for Lync Phone Devices and other Lync related UC devices.


Lync DHCP options Script 1,2,3,4,5,43 and 120

Lync 2010 and 2013 comes with an executable for adding the options for the DHCP server. If you are using a 64 bit server for DHCP, then begin by copying the files dhcputil.exe and dhcpconfigscript.bat command from the following folder C:\Program Files\Common Files\Microsoft Lync Server 2013.  I found that I needed to copy the files to my DHCP server.

DHCPUtil is at C:\Program Files\Common Files\Microsoft Lync Server 2013

image001

 

image002

Scenario

Run the following

.\DHCPUtil.exe -SipServer Server.Domain.com

.\DHCPUtil.exe -SipServer Server.Domain.com –runconfigscript

If u have the following problem when you are trying to run the DHCPUTIL.exe on the DHCP Server

image003

Then you need to install the following and restart the server (DHCP Server)

Visual C++ Redistributable for Visual Studio 2012 Update 4

http://www.microsoft.com/en-us/download/details.aspx?id=30679

To set the DHCP server options, First review what data the command uses:

Run the following Command from the Lync Server

The following command will generate the input values we need

  • Open Power Shell.
  • run the command .\dhcputil.exe -sipserver FQDN (example .\dhcputil.exe -sipserver lync.mydomain.com)

image004

 

.\dhcputil.exe -sipserver server.domain.com >c:\lync.tx

X64 DHCP Server

If you have a 64 bit DHCP server, then you can perform the following

  • run  .\dhcputil.exe -sipserver FQDN -runconfigscript
  • In my case I had to remove the delete values as from the batch file located at C:\Program Files\Common Files\Microsoft Lync Server 2013. I then copied to my DHCP server. I deleted the highlighted options below.

image005

NTP time. DHCP option 4 and 42

To set the NTP time DHCP option,   Go to DHCP scope options and choose configure

Choose options 4 and 42 – Time Server and NTP servers. Place the correct values here, the time-server should be the PDC emulator and the NTP server is found by w32tm /query /configuration

image006

DHCP option 119

Right click the ipv4 under the authorized DHCP server and choose set predefined options:

image007

  • Using DHCP Manager highlight IPv4 and select Set Predefined Options then click Add.  Enter a  Name of DNS Search List, select a Data Type of String, and enter a Code of 119.  The Description field is optional

image008

  • Under IPv4 highlight Server Options select Configure Options.  Locate 119 DNS Search Listand enter the desired domain names in the String field, using a semi-colon to separate additional names (e.g. local;mslync.net).

image009

At this point the Scope Options (which display both inherited Server Options and Scope-level options) should display at least the following items: 003 Router, 004 Time Server, 006 DNS Servers, 015 DNS Domain Name, 119 DNS Search List.  Additional items may be included which are specific to your existing deployment and are not utilized by Lync.

image010

This complete setup of the options for identifier (001), URL Scheme (002),WebServerFqdn (003) , WebServerPort (004), CertProvREIPath (005), DNS search list (119), UC sip server (120). Time Server (004) and  NTP Server (042).  If you don’t have option 3,6, and 15 add router, DNS servers and DNS domain Name by using the configure option

  • To validate the new changes highlight the server name in DHCP Managerand refresh the console.  Expand IPv4 and then highlightServer Options to the new options should be listed.image011
  • To view the details of these new options simply view the properties of any one entry in this list and the Advanced option list should appear, showing the MSUCClientVendor Class 

image012

You should have the following server options

image013

And scope options

image014

 

You should have the following server options

image015

And scope options

image016

 Is it working?

DHCP Option 43

As previously mentioned Option 43 is not really a single option but a number of sub-options which tell the phone where to locate the Certificate Provisioning service on the Lync server.

Option Number
Option Name
ASCII Value (example)
001
UCIdentifier
MS-UC-Client
002
URLScheme
https
003
WebServerFQDN
lync.schertz.local
004
WebServerPort
443
005
CertProvRelPath
/CertProv/CertProvisioningService.svc

 

DHCP Option 120

Once the certificate is downloaded to the phone then a valid Lync registrar server needs to be located.  The value of Option 120 will be the FQDN of the Lync server which will handle authentication requests from the phones.  This must be a Lync server as the Aries devices cannot sign into a down-level OCS 2007 or 2007 R2 server.

Option Number
Option Name
ASCII Value (example)
120 UCSipServer lync.schertz.local

 image017

To make sure everything is working

Validate that the DHCP options entries were created and that a client computer can discover Lync Server by running DHCPUtil.exe -EmulateClient on the client computer. If it returns without errors, the entries were created correctly.

Copy the DHCPUtil.exe program to a test computer and execute the following command.

 

.\DHCPUtil.exe -EmulateClient

It will send a broadcast out

image018

And should get a response with the options and success

image019

Ref:

http://tomtalks.uk/2013/02/setting-up-dhcp-server-options-manually-for-lync-20102013-phones/

https://social.technet.microsoft.com/Forums/lync/en-US/477c5308-d4e0-410d-8cf0-a22546fda8c5/dhcputilexe-msvcr110dll

http://blog.schertz.name/2010/12/configuring-lync-server-for-phone-edition-devices/

https://digitalbamboo.wordpress.com/2013/08/31/how-to-set-server-dhcp-options-for-lync-phone-devices-and-other-lync-related-uc-devices/

http://technet.microsoft.com/en-us/library/gg398369(v=ocs.14).aspx

http://www.gecko-studio.co.uk/the-program-cant-start-because-msvcr110-dll-is-missing/

Download

http://www.microsoft.com/en-us/download/details.aspx?id=30679

http://www.confusedamused.com/notebook/using-dhcputil-for-lync-phone-edition-dhcp-server-configuration/

 

 

Advertisements

One thought on “How to set Server DHCP options for Lync Phone Devices and other Lync related UC devices.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s