What ports does the Network License Manager use, and how can I set those ports?

588 views (last 30 days)
I would like to know which ports the network license manager uses so that I can configure the license manager in my environment. I would like to know which ports it uses, and how I can change the ports.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 Jun 2023
Edited: MathWorks Support Team on 19 Jun 2023
The network license manager requires two TCP ports for normal operation. The license manager contains two processes, the license manager daemon (lmgrd) and the vendor daemon (MLM). Each of these processes operate on a different port. The ports for each process are specified within the MATLAB license file on the license server. These ports are not locked and can be changed to any available TCP ports on the machine.
The port used by the license manager daemon (lmgrd) is used to listen for incoming license requests from the client application. This port is set to 27000 by default during installation. Once lmgrd is contacted by the client application, the vendor daemon (MLM) responds with the name and location of the vendor daemon and a second port number. The second port is used for communication between the client application and MLM. The MLM port is the one that is used for communication of license checkout and status requests. The port used by MLM is not set by default. When it is not set, the port is chosen randomly.
The ports of the license manager are specified within the license.dat file on the license manager machine. The license manager files are located in the MATLAB installation directory (on the server) in the flexlm folder on Windows (etc as of R2010b), and in the MATLAB installation directory in the etc subdirectory on all other systems. The port for lmgrd is set in the SERVER line of the license.dat file. For example, to specify port 27000, you would have the following:
SERVER server1 8090bf8d 27000
To change the port, change 27000 to another number. It is recommended that you choose a value between 27000 and 27010.
The port assignment for MLM is specified in the DAEMON line of the license.dat file. By default this is not set. To change the port you can append "port=" and the port number at the end of the DAEMON line. For example:
DAEMON MLM "C:\Program Files\MATLAB\R2018b\etc\win64\mlm.exe" port=1049
In this example, the port for MLM would be 1049. Specifying the port assignment for MLM can be useful if you are running the license manager through a firewall. In that case you will want to use specified ports so that these can be opened in the firewall.

More Answers (1)

Moubarak Moundou Megna
Moubarak Moundou Megna on 15 Sep 2020
ça ne marche pas chez moi


Find more on Manage Products in Help Center and File Exchange


No tags entered yet.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!