# Defining \<port\>@\<host\> to one or more license servers

You can define your license servers by using the \<port\>@\<host\>
function. This method is not constrained by architecture because a
license server defined by \<port\>@\<host\> communicates directly to the
ESRI daemon through the specified TCP/IP port, working around the
limitation of architecture specific license files.

Setting an environment variable (eg. ESRI_LICENSE_FILE) enables the
\<port\>@\<host\> functionality. This variable is set in a client\'s
environment, not on the server side. Both \<port\> and \<host\> are
found in the SERVER line of your license file. The TCP/IP \<port\> is
indicated at the end of the SERVER line. The host name, \<host\>, is the
second item listed in the SERVER line.

Additionally, \<port\>@\<host\> can be abbreviated as simply @\<host\>
as long as the port number in the license file falls within the range of
27000 through 27009 (inclusive).

One advantage of using the \<port\>@\<host\> method for defining your
license server is the disk containing the license file need not be
shared as the lmgrd daemon is recognized on the network through the
predefined TCP/IP port. This is significant on Windows because the
license manager is installed on the \<SystemDrive\>, which is normally
the root partition, a partition most system administrators do not want
shared for security reasons.

# Defining the path to one or more license files

You can define your license servers by defining the path to one or more
license files. However, this method is limited by architecture because
the UNIX and Windows license files are a bit different. These
differences cannot be reconciled functionally by a license manager of an
opposing architecture.

See Also:  [How are Unix and Windows license files
different?](../../../../../../../../C:/Program%20Files/ESRI/License/Documentation/license_manager_guide/faq/unix_nt_file_differences_.htm)

When defining one or more license files using the ESRI_LICENSE_FILE
variable, you can state the absolute paths, the variable paths (UNIX
only), or both.

# Environment Variables 

Environment variables provide each ArcGIS or ArcSDE client the ability
to define one or more license servers. Typically environment variables
will be used by ArcInfo Workstation or ArcSDE users.  These variables
are set in a client\'s environment, not on the server side.

#### Note to Windows ArcGIS Desktop users: 

#### The ArcGIS Desktop comes with a utility that allows you to change your license manager.  Please read [**The Desktop Administrator**](../../../../../../../../C:/Program%20Files/ESRI/License/Documentation/license_manager_guide/getstartwindows/the_desktop_administrator.htm) before you set up your environment variables.

Environment Variable Search Order

ArcGIS and ArcSDE client installations use environment variables to
search for a valid license manager.  

Important notes when setting up environment variables:

-   The ESRI_LICENSE_FILE and LM_LICENSE_FILE environment variable
    settings take precedence over the license manager you are using for
    ALL your ArcGIS applications.  This variable setting will override
    the license manager chosen during installation, and the license
    manager set in the Desktop Administrator.  Make certain that the
    license server(s) you specify in these environment variables contain
    all the necessary features.

-   Once an application has connected to a valid license manager, no
    other license manager can be accessed by that application during
    that session.  

The applications search for a valid license manager in the following
order:

#### UNIX:

1\. ESRI_LICENSE_FILE

2\. LM_LICENSE_FILE\*

3\. The sysgen directory in ARCHOME or SDEHOME.

#### Windows:

1\. ESRI_LICENSE_FILE

2\. LM_LICENSE_FILE\*

3\. LICENSE_SERVER registry entry found under:

HKEY_LOCAL_MACHINE\>SOFTWARE\>ESRI\>License

Direct Connect:

1\. ESRI_ARCSDE_LICENSE_FILE\*\*

2\. ESRI_LICENSE_FILE

3\. LM_LICENSE_FILE\*

\*We **strongly** suggest ESRI software clients use the
ESRI_LICENSE_FILE variable rather than LM_LICENSE_FILE. Historically,
the LM_LICENSE_FILE variable was used, but as more software vendors
incorporated FLEXlm into their software, collision problems using this
variable began to occur. At FLEXlm v4.1, GLOBEtrotter Software Inc.
(GSI) introduced the vendor specific environment variables such as
ESRI_LICENSE_FILE.

\*\*The ESRI_ARCSDE_LICENSE_FILE variable is new at 8.1.  For a
Read\\Write connection, Direct Connect users must set this variable to
specify a license server that contains an ArcSDE feature.  The license
manager in the ESRI_ARCSDE_LICENSE_FILE variable can be different than
the license manager specified during installation or specified in the
Desktop Administrator. The ArcGIS applications (ArcMap, ArcCatalog,
ArcGIS extensions) are not affected by the ESRI_ARCSDE_LICENSE_FILE
variable.  These applications will continue to use the license manager
you specified during your ArcGIS installation and to change your license
manager in the ArcGIS Desktop Administrator.

#### When you set the environment variable, there are two methods to define your license server: 

1\) [Defining the path to one or more license
files](../../../../../../../../C:/Program%20Files/ESRI/License/Documentation/license_manager_guide/advanced/path_to_license_files.htm)

2\) [Defining \<port\>@\<host\> to one or more license
servers](../../../../../../../../C:/Program%20Files/ESRI/License/Documentation/license_manager_guide/advanced/define_port_at_host.htm)

Defining multiple license servers:

There is a limitation to defining multiple license servers. Once an
ArcGIS or ArcSDE session is started, that client session is assigned to
the specific license server from which its initial license was checked
out. From then on, the only extension licenses available to that
particular session are those available on from the currently assigned
license server. **A client cannot simultaneously connect to multiple
license servers.**

For example, you defined your ESRI_LICENSE_FILE variable with server A
listed first and server B listed second.  The applications will first
look for server A. If server A is not running or does not contain the
license features the application is requesting, the applications will
connect to server B.

Example: Server A has ArcSDE and GRID licenses while server B has only
ArcInfo licenses. When you start ArcInfo, your client session determines
there are no ArcInfo licenses available on server A, so your client
session checks out an ArcInfo license from server B. When you decide to
start GRID, you will receive an error message because your client
session is assigned to server B, where no GRID licenses exist.

# Sharing Licenses Across Architectures

Sharing licenses across UNIX and Windows architectures is possible using
the \<port\>@\<host\> functionality available in FLEXlm v6.0 (and
higher). This functionality relies on TCP/IP protocol for direct
communication with the license server daemon (ESRI) on a heterogeneous
network.

Setting the ESRI_LICENSE_FILE environment variable enables the
\<port\>@\<host\> functionality. This variable is set in a client\'s
environment, not on the server side. Both \<port\> and \<host\> are
found in the SERVER line of your license file. The TCP/IP \<port\> is
indicated at the end of the SERVER line. The host name, \<host\>, is the
second item listed in the SERVER line.

See Also:  [Defining \<port\>@\<host\> to one or more
licenses](../../../../../../../../C:/Program%20Files/ESRI/License/Documentation/license_manager_guide/advanced/define_port_at_host.htm)