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.
Pre-requisites
Have a look at supported browsers and other configurations for Web Manager here.
For .NET, make sure NCache Service (NCacheSvc) is started. If it is not started, type the following command in PowerShell (run as admin):
Start-Service -Name NCacheSvc
- For .NET Core, run NCache Service (NCacheSvc) as Administrator. Please refer to this section for detail.
Using NCache Web Manager
Launch NCache Web Manager by browsing to
http://localhost:8251
or<server-ip>:8251
.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: Alachisoft.NCache.Service.exe.config located in %NCHOME%/bin/service
- .NET Core: Alachisoft.NCache.Service.dll.config located in %NCHOME%/bin/service
<appSettings>
...
<add key = "NCacheServer.BindToClusterIP" value = "20.200.20.38">
<add key = "NCacheServer.BindToClientServerIP" value = "20.200.20.190" />
...
<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
See Also
IP Binding Concepts
Create a Cache
Simulate Cache Usage
Monitor Caches in PerfMon
NCache Programmer's Guide