Configure IP Binding in Multiple NICs (Optional)
If you have multiple network cards (meaning multiple IP addresses) in your cache servers then you must bind NCache server to one of the IP addresses. NCache installer automatically binds the cache server to one of the IP addresses but you may want to change this binding based on your preference. Once bound, this IP address must be specified to identify this cache server both for cluster configuration (config.ncconf) and for client/server configuration (client.ncconf).
You can configure IP Binding via NCache Web Manager or by manually editing configuration.
Using NCache Web Manager
Launch NCache Web Manager by browsing to http://localhost:8251 (Windows) or
<server-ip>:8251(Windows + Linux).
In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache to configure. Against the cache name, click on View Details.
This opens up the detailed configuration page for the cache.
Under Server Nodes tab, check the box against the server node IP to change NIC. Click on the button on the toolbar to change NIC.
Configure NIC dialog will open. It will list all network cards available on that node with their assigned IP addresses.
Select the Cluster option from drop down in front of the IP with which you want to bind the client and server.
- Click OK.
Manually Editing Configuration
You can also specify IP by modifying the service configuration file of all servers. This file is found in NCache installation as follows:
.NET: Alachsioft.NCache.Service.exe.config located in %NCHOME%/bin/service
- .NET Core: Alachsioft.NCache.Service.dll.config located in %NCHOME%/bin/service
<appSettings> ... <add key = "NCacheServer.BindToClusterIP" value = "18.104.22.168"> <add key = "NCacheServer.BindToClientServerIP" value = "22.214.171.124" /> ... <appSettings>
- For the configuration changes made to take effect, restart NCache Service. Make sure you have enough privileges to restart the service. If the user is not the part of the Administrator's group, make sure to run Windows PowerShell as administrator, otherwise you might get an error message that "Cannot open ncachesvc service on computer".
Execute the following command in PowerShell to restart NCache Service:
Restart-Service -Name NCacheSvc